Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
ReactVR-DBMonster
This file has been truncated, but you can view the full file.
(function(global) {
global.__DEV__=true;
global.__BUNDLE_START_TIME__=Date.now();
})(typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : this);
(function(global) {
'use strict';
global.require=_require;
global.__d=define;
var modules=Object.create(null);
if(__DEV__){
var verboseNamesToModuleIds=Object.create(null);
}
function define(moduleId,factory){
if(moduleId in modules){
return;
}
modules[moduleId]={
factory:factory,
hasError:false,
isInitialized:false,
exports:undefined};
if(__DEV__){
modules[moduleId].hot=createHotReloadingObject();
var verboseName=modules[moduleId].verboseName=arguments[2];
verboseNamesToModuleIds[verboseName]=moduleId;
}
}
function _require(moduleId){
var module=__DEV__?
modules[moduleId]||modules[verboseNamesToModuleIds[moduleId]]:
modules[moduleId];
return module&&module.isInitialized?
module.exports:
guardedLoadModule(moduleId,module);
}
var inGuard=false;
function guardedLoadModule(moduleId,module){
if(!inGuard&&global.ErrorUtils){
inGuard=true;
var returnValue=void 0;
try{
returnValue=loadModuleImplementation(moduleId,module);
}catch(e){
global.ErrorUtils.reportFatalError(e);
}
inGuard=false;
return returnValue;
}else{
return loadModuleImplementation(moduleId,module);
}
}
function loadModuleImplementation(moduleId,module){
var nativeRequire=global.nativeRequire;
if(!module&&nativeRequire){
nativeRequire(moduleId);
module=modules[moduleId];
}
if(__DEV__&&!module){
module=modules[verboseNamesToModuleIds[moduleId]];
if(module){
console.warn(
'Requiring module \''+moduleId+'\' by name is only supported for '+
'debugging purposes and will break in production');
}
}
if(!module){
throw unknownModuleError(moduleId);
}
if(module.hasError){
throw moduleThrewError(moduleId);
}
if(__DEV__){var
Systrace=_require.Systrace;
}
module.isInitialized=true;
var exports=module.exports={};var _module=
module,factory=_module.factory;
try{
if(__DEV__){
Systrace.beginEvent('JS_require_'+(module.verboseName||moduleId));
}
var moduleObject={exports:exports};
if(__DEV__&&module.hot){
moduleObject.hot=module.hot;
}
factory(global,_require,moduleObject,exports);
if(!__DEV__){
module.factory=undefined;
}
if(__DEV__){
Systrace.endEvent();
}
return module.exports=moduleObject.exports;
}catch(e){
module.hasError=true;
module.isInitialized=false;
module.exports=undefined;
throw e;
}
}
function unknownModuleError(id){
var message='Requiring unknown module "'+id+'".';
if(__DEV__){
message+=
'If you are sure the module is there, try restarting the packager or running "npm install".';
}
return Error(message);
}
function moduleThrewError(id){
return Error('Requiring module "'+id+'", which threw an exception.');
}
if(__DEV__){var
createHotReloadingObject;(function(){_require.Systrace={beginEvent:function beginEvent(){},endEvent:function endEvent(){}};createHotReloadingObject=function createHotReloadingObject(){
var hot={
acceptCallback:null,
accept:function accept(callback){hot.acceptCallback=callback;}};
return hot;
};
var acceptAll=function acceptAll(dependentModules,inverseDependencies){
if(!dependentModules||dependentModules.length===0){
return true;
}
var notAccepted=dependentModules.filter(
function(module){return!accept(module,undefined,inverseDependencies);});
var parents=[];
for(var i=0;i<notAccepted.length;i++){
if(inverseDependencies[notAccepted[i]].length===0){
return false;
}
parents.pushAll(inverseDependencies[notAccepted[i]]);
}
return acceptAll(parents,inverseDependencies);
};
var accept=function accept(id,factory,inverseDependencies){
var mod=modules[id];
if(!mod){
define(id,factory);
return true;
}var
hot=mod.hot;
if(!hot){
console.warn(
'Cannot accept module because Hot Module Replacement '+
'API was not installed.');
return false;
}
if(factory){
mod.factory=factory;
}
mod.hasError=false;
mod.isInitialized=false;
_require(id);
if(hot.acceptCallback){
hot.acceptCallback();
return true;
}else{
if(!inverseDependencies){
throw new Error('Undefined `inverseDependencies`');
}
return acceptAll(inverseDependencies[id],inverseDependencies);
}
};
global.__accept=accept;})();
}
})(typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : this);
(function(global) {
Object.assign=function(target,sources){
if(__DEV__){
if(target==null){
throw new TypeError('Object.assign target cannot be null or undefined');
}
if(typeof target!=='object'&&typeof target!=='function'){
throw new TypeError(
'In this environment the target of assign MUST be an object.'+
'This error is a performance optimization and not spec compliant.');
}
}
for(var nextIndex=1;nextIndex<arguments.length;nextIndex++){
var nextSource=arguments[nextIndex];
if(nextSource==null){
continue;
}
if(__DEV__){
if(typeof nextSource!=='object'&&
typeof nextSource!=='function'){
throw new TypeError(
'In this environment the sources for assign MUST be an object.'+
'This error is a performance optimization and not spec compliant.');
}
}
for(var key in nextSource){
if(__DEV__){
var hasOwnProperty=Object.prototype.hasOwnProperty;
if(!hasOwnProperty.call(nextSource,key)){
throw new TypeError(
'One of the sources for assign has an enumerable key on the '+
'prototype chain. This is an edge case that we do not support. '+
'This error is a performance optimization and not spec compliant.');
}
}
target[key]=nextSource[key];
}
}
return target;
};
})(typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : this);
(function(global) {
var inspect=function(){
function inspect(obj,opts){
var ctx={
seen:[],
stylize:stylizeNoColor};
return formatValue(ctx,obj,opts.depth);
}
function stylizeNoColor(str,styleType){
return str;
}
function arrayToHash(array){
var hash={};
array.forEach(function(val,idx){
hash[val]=true;
});
return hash;
}
function formatValue(ctx,value,recurseTimes){
var primitive=formatPrimitive(ctx,value);
if(primitive){
return primitive;
}
var keys=Object.keys(value);
var visibleKeys=arrayToHash(keys);
if(isError(value)&&(
keys.indexOf('message')>=0||keys.indexOf('description')>=0)){
return formatError(value);
}
if(keys.length===0){
if(isFunction(value)){
var name=value.name?': '+value.name:'';
return ctx.stylize('[Function'+name+']','special');
}
if(isRegExp(value)){
return ctx.stylize(RegExp.prototype.toString.call(value),'regexp');
}
if(isDate(value)){
return ctx.stylize(Date.prototype.toString.call(value),'date');
}
if(isError(value)){
return formatError(value);
}
}
var base='',array=false,braces=['{','}'];
if(isArray(value)){
array=true;
braces=['[',']'];
}
if(isFunction(value)){
var n=value.name?': '+value.name:'';
base=' [Function'+n+']';
}
if(isRegExp(value)){
base=' '+RegExp.prototype.toString.call(value);
}
if(isDate(value)){
base=' '+Date.prototype.toUTCString.call(value);
}
if(isError(value)){
base=' '+formatError(value);
}
if(keys.length===0&&(!array||value.length==0)){
return braces[0]+base+braces[1];
}
if(recurseTimes<0){
if(isRegExp(value)){
return ctx.stylize(RegExp.prototype.toString.call(value),'regexp');
}else{
return ctx.stylize('[Object]','special');
}
}
ctx.seen.push(value);
var output;
if(array){
output=formatArray(ctx,value,recurseTimes,visibleKeys,keys);
}else{
output=keys.map(function(key){
return formatProperty(ctx,value,recurseTimes,visibleKeys,key,array);
});
}
ctx.seen.pop();
return reduceToSingleString(output,base,braces);
}
function formatPrimitive(ctx,value){
if(isUndefined(value))
return ctx.stylize('undefined','undefined');
if(isString(value)){
var simple='\''+JSON.stringify(value).replace(/^"|"$/g,'').
replace(/'/g,"\\'").
replace(/\\"/g,'"')+'\'';
return ctx.stylize(simple,'string');
}
if(isNumber(value))
return ctx.stylize(''+value,'number');
if(isBoolean(value))
return ctx.stylize(''+value,'boolean');
if(isNull(value))
return ctx.stylize('null','null');
}
function formatError(value){
return'['+Error.prototype.toString.call(value)+']';
}
function formatArray(ctx,value,recurseTimes,visibleKeys,keys){
var output=[];
for(var i=0,l=value.length;i<l;++i){
if(hasOwnProperty(value,String(i))){
output.push(formatProperty(ctx,value,recurseTimes,visibleKeys,
String(i),true));
}else{
output.push('');
}
}
keys.forEach(function(key){
if(!key.match(/^\d+$/)){
output.push(formatProperty(ctx,value,recurseTimes,visibleKeys,
key,true));
}
});
return output;
}
function formatProperty(ctx,value,recurseTimes,visibleKeys,key,array){
var name,str,desc;
desc=Object.getOwnPropertyDescriptor(value,key)||{value:value[key]};
if(desc.get){
if(desc.set){
str=ctx.stylize('[Getter/Setter]','special');
}else{
str=ctx.stylize('[Getter]','special');
}
}else{
if(desc.set){
str=ctx.stylize('[Setter]','special');
}
}
if(!hasOwnProperty(visibleKeys,key)){
name='['+key+']';
}
if(!str){
if(ctx.seen.indexOf(desc.value)<0){
if(isNull(recurseTimes)){
str=formatValue(ctx,desc.value,null);
}else{
str=formatValue(ctx,desc.value,recurseTimes-1);
}
if(str.indexOf('\n')>-1){
if(array){
str=str.split('\n').map(function(line){
return' '+line;
}).join('\n').substr(2);
}else{
str='\n'+str.split('\n').map(function(line){
return' '+line;
}).join('\n');
}
}
}else{
str=ctx.stylize('[Circular]','special');
}
}
if(isUndefined(name)){
if(array&&key.match(/^\d+$/)){
return str;
}
name=JSON.stringify(''+key);
if(name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)){
name=name.substr(1,name.length-2);
name=ctx.stylize(name,'name');
}else{
name=name.replace(/'/g,"\\'").
replace(/\\"/g,'"').
replace(/(^"|"$)/g,"'");
name=ctx.stylize(name,'string');
}
}
return name+': '+str;
}
function reduceToSingleString(output,base,braces){
var numLinesEst=0;
var length=output.reduce(function(prev,cur){
numLinesEst++;
if(cur.indexOf('\n')>=0)numLinesEst++;
return prev+cur.replace(/\u001b\[\d\d?m/g,'').length+1;
},0);
if(length>60){
return braces[0]+(
base===''?'':base+'\n ')+
' '+
output.join(',\n ')+
' '+
braces[1];
}
return braces[0]+base+' '+output.join(', ')+' '+braces[1];
}
function isArray(ar){
return Array.isArray(ar);
}
function isBoolean(arg){
return typeof arg==='boolean';
}
function isNull(arg){
return arg===null;
}
function isNullOrUndefined(arg){
return arg==null;
}
function isNumber(arg){
return typeof arg==='number';
}
function isString(arg){
return typeof arg==='string';
}
function isSymbol(arg){
return typeof arg==='symbol';
}
function isUndefined(arg){
return arg===void 0;
}
function isRegExp(re){
return isObject(re)&&objectToString(re)==='[object RegExp]';
}
function isObject(arg){
return typeof arg==='object'&&arg!==null;
}
function isDate(d){
return isObject(d)&&objectToString(d)==='[object Date]';
}
function isError(e){
return isObject(e)&&(
objectToString(e)==='[object Error]'||e instanceof Error);
}
function isFunction(arg){
return typeof arg==='function';
}
function isPrimitive(arg){
return arg===null||
typeof arg==='boolean'||
typeof arg==='number'||
typeof arg==='string'||
typeof arg==='symbol'||
typeof arg==='undefined';
}
function objectToString(o){
return Object.prototype.toString.call(o);
}
function hasOwnProperty(obj,prop){
return Object.prototype.hasOwnProperty.call(obj,prop);
}
return inspect;
}();
var OBJECT_COLUMN_NAME='(index)';
var LOG_LEVELS={
trace:0,
info:1,
warn:2,
error:3};
function setupConsole(global){
if(!global.nativeLoggingHook){
return;
}
function getNativeLogFunction(level){
return function(){
var str=void 0;
if(arguments.length===1&&typeof arguments[0]==='string'){
str=arguments[0];
}else{
str=Array.prototype.map.call(arguments,function(arg){
return inspect(arg,{depth:10});
}).join(', ');
}
var logLevel=level;
if(str.slice(0,9)==='Warning: '&&logLevel>=LOG_LEVELS.error){
logLevel=LOG_LEVELS.warn;
}
global.nativeLoggingHook(str,logLevel);
};
}
function repeat(element,n){
return Array.apply(null,Array(n)).map(function(){return element;});
};
function consoleTablePolyfill(rows){
if(!Array.isArray(rows)){
var data=rows;
rows=[];
for(var key in data){
if(data.hasOwnProperty(key)){
var row=data[key];
row[OBJECT_COLUMN_NAME]=key;
rows.push(row);
}
}
}
if(rows.length===0){
global.nativeLoggingHook('',LOG_LEVELS.info);
return;
}
var columns=Object.keys(rows[0]).sort();
var stringRows=[];
var columnWidths=[];
columns.forEach(function(k,i){
columnWidths[i]=k.length;
for(var j=0;j<rows.length;j++){
var cellStr=(rows[j][k]||'?').toString();
stringRows[j]=stringRows[j]||[];
stringRows[j][i]=cellStr;
columnWidths[i]=Math.max(columnWidths[i],cellStr.length);
}
});
function joinRow(row,space){
var cells=row.map(function(cell,i){
var extraSpaces=repeat(' ',columnWidths[i]-cell.length).join('');
return cell+extraSpaces;
});
space=space||' ';
return cells.join(space+'|'+space);
};
var separators=columnWidths.map(function(columnWidth){
return repeat('-',columnWidth).join('');
});
var separatorRow=joinRow(separators,'-');
var header=joinRow(columns);
var table=[header,separatorRow];
for(var i=0;i<rows.length;i++){
table.push(joinRow(stringRows[i]));
}
global.nativeLoggingHook('\n'+table.join('\n'),LOG_LEVELS.info);
}
var originalConsole=global.console;
var descriptor=Object.getOwnPropertyDescriptor(global,'console');
if(descriptor){
Object.defineProperty(global,'originalConsole',descriptor);
}
global.console={
error:getNativeLogFunction(LOG_LEVELS.error),
info:getNativeLogFunction(LOG_LEVELS.info),
log:getNativeLogFunction(LOG_LEVELS.info),
warn:getNativeLogFunction(LOG_LEVELS.warn),
trace:getNativeLogFunction(LOG_LEVELS.trace),
debug:getNativeLogFunction(LOG_LEVELS.trace),
table:consoleTablePolyfill};
if(__DEV__&&originalConsole){
Object.keys(console).forEach(function(methodName){
var reactNativeMethod=console[methodName];
if(originalConsole[methodName]){
console[methodName]=function(){
originalConsole[methodName].apply(originalConsole,arguments);
reactNativeMethod.apply(console,arguments);
};
}
});
}
}
if(typeof module!=='undefined'){
module.exports=setupConsole;
}else{
setupConsole(global);
}
})(typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : this);
(function(global) {
var _inGuard=0;
var _globalHandler=function onError(e){
throw e;
};
var ErrorUtils={
setGlobalHandler:function setGlobalHandler(fun){
_globalHandler=fun;
},
getGlobalHandler:function getGlobalHandler(){
return _globalHandler;
},
reportError:function reportError(error){
_globalHandler&&_globalHandler(error);
},
reportFatalError:function reportFatalError(error){
_globalHandler&&_globalHandler(error,true);
},
applyWithGuard:function applyWithGuard(fun,context,args){
try{
_inGuard++;
return fun.apply(context,args);
}catch(e){
ErrorUtils.reportError(e);
}finally{
_inGuard--;
}
},
applyWithGuardIfNeeded:function applyWithGuardIfNeeded(fun,context,args){
if(ErrorUtils.inGuard()){
return fun.apply(context,args);
}else{
ErrorUtils.applyWithGuard(fun,context,args);
}
},
inGuard:function inGuard(){
return _inGuard;
},
guard:function guard(fun,name,context){
if(typeof fun!=='function'){
console.warn('A function must be passed to ErrorUtils.guard, got ',fun);
return null;
}
name=name||fun.name||'<generated guard>';
function guarded(){
return(
ErrorUtils.applyWithGuard(
fun,
context||this,
arguments,
null,
name));
}
return guarded;
}};
global.ErrorUtils=ErrorUtils;
})(typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : this);
(function(global) {
if(Number.EPSILON===undefined){
Object.defineProperty(Number,'EPSILON',{
value:Math.pow(2,-52)});
}
if(Number.MAX_SAFE_INTEGER===undefined){
Object.defineProperty(Number,'MAX_SAFE_INTEGER',{
value:Math.pow(2,53)-1});
}
if(Number.MIN_SAFE_INTEGER===undefined){
Object.defineProperty(Number,'MIN_SAFE_INTEGER',{
value:-(Math.pow(2,53)-1)});
}
if(!Number.isNaN){(function(){
var globalIsNaN=global.isNaN;
Object.defineProperty(Number,'isNaN',{
configurable:true,
enumerable:false,
value:function isNaN(value){
return typeof value==='number'&&globalIsNaN(value);
},
writable:true});})();
}
})(typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : this);
(function(global) {
if(!String.prototype.startsWith){
String.prototype.startsWith=function(search){
'use strict';
if(this==null){
throw TypeError();
}
var string=String(this);
var pos=arguments.length>1?
Number(arguments[1])||0:0;
var start=Math.min(Math.max(pos,0),string.length);
return string.indexOf(String(search),pos)===start;
};
}
if(!String.prototype.endsWith){
String.prototype.endsWith=function(search){
'use strict';
if(this==null){
throw TypeError();
}
var string=String(this);
var stringLength=string.length;
var searchString=String(search);
var pos=arguments.length>1?
Number(arguments[1])||0:stringLength;
var end=Math.min(Math.max(pos,0),stringLength);
var start=end-searchString.length;
if(start<0){
return false;
}
return string.lastIndexOf(searchString,start)===start;
};
}
if(!String.prototype.repeat){
String.prototype.repeat=function(count){
'use strict';
if(this==null){
throw TypeError();
}
var string=String(this);
count=Number(count)||0;
if(count<0||count===Infinity){
throw RangeError();
}
if(count===1){
return string;
}
var result='';
while(count){
if(count&1){
result+=string;
}
if(count>>=1){
string+=string;
}
}
return result;
};
}
if(!String.prototype.includes){
String.prototype.includes=function(search,start){
'use strict';
if(typeof start!=='number'){
start=0;
}
if(start+search.length>this.length){
return false;
}else{
return this.indexOf(search,start)!==-1;
}
};
}
})(typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : this);
(function(global) {
function findIndex(predicate,context){
if(this==null){
throw new TypeError(
'Array.prototype.findIndex called on null or undefined');
}
if(typeof predicate!=='function'){
throw new TypeError('predicate must be a function');
}
var list=Object(this);
var length=list.length>>>0;
for(var i=0;i<length;i++){
if(predicate.call(context,list[i],i,list)){
return i;
}
}
return-1;
}
if(!Array.prototype.findIndex){
Object.defineProperty(Array.prototype,'findIndex',{
enumerable:false,
writable:true,
configurable:true,
value:findIndex});
}
if(!Array.prototype.find){
Object.defineProperty(Array.prototype,'find',{
enumerable:false,
writable:true,
configurable:true,
value:function value(predicate,context){
if(this==null){
throw new TypeError(
'Array.prototype.find called on null or undefined');
}
var index=findIndex.call(this,predicate,context);
return index===-1?undefined:this[index];
}});
}
if(!Array.prototype.includes){
Object.defineProperty(Array.prototype,'includes',{
enumerable:false,
writable:true,
configurable:true,
value:function value(searchElement){
var O=Object(this);
var len=parseInt(O.length)||0;
if(len===0){
return false;
}
var n=parseInt(arguments[1])||0;
var k;
if(n>=0){
k=n;
}else{
k=len+n;
if(k<0){
k=0;
}
}
var currentElement;
while(k<len){
currentElement=O[k];
if(searchElement===currentElement||
searchElement!==searchElement&&currentElement!==currentElement){
return true;
}
k++;
}
return false;
}});
}
})(typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : this);
(function(global) {
if(!Array.from){
Array.from=function(arrayLike){
if(arrayLike==null){
throw new TypeError('Object is null or undefined');
}
var mapFn=arguments[1];
var thisArg=arguments[2];
var C=this;
var items=Object(arrayLike);
var symbolIterator=typeof Symbol==='function'?typeof Symbol==='function'?
Symbol.iterator:'@@iterator':
'@@iterator';
var mapping=typeof mapFn==='function';
var usingIterator=typeof items[symbolIterator]==='function';
var key=0;
var ret;
var value;
if(usingIterator){
ret=typeof C==='function'?
new C():
[];
var it=items[symbolIterator]();
var next;
while(!(next=it.next()).done){
value=next.value;
if(mapping){
value=mapFn.call(thisArg,value,key);
}
ret[key]=value;
key+=1;
}
ret.length=key;
return ret;
}
var len=items.length;
if(isNaN(len)||len<0){
len=0;
}
ret=typeof C==='function'?
new C(len):
new Array(len);
while(key<len){
value=items[key];
if(mapping){
value=mapFn.call(thisArg,value,key);
}
ret[key]=value;
key+=1;
}
ret.length=key;
return ret;
};
}
})(typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : this);
(function(global) {
(function(){
var hasOwnProperty=Object.prototype.hasOwnProperty;
if(typeof Object.entries!=='function'){
Object.entries=function(object){
if(object==null){
throw new TypeError('Object.entries called on non-object');
}
var entries=[];
for(var key in object){
if(hasOwnProperty.call(object,key)){
entries.push([key,object[key]]);
}
}
return entries;
};
}
if(typeof Object.values!=='function'){
Object.values=function(object){
if(object==null){
throw new TypeError('Object.values called on non-object');
}
var values=[];
for(var key in object){
if(hasOwnProperty.call(object,key)){
values.push(object[key]);
}
}
return values;
};
}
})();
})(typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : this);
(function(global) {
var babelHelpers=global.babelHelpers={};
babelHelpers.createRawReactElement=function(){
var REACT_ELEMENT_TYPE=typeof Symbol==="function"&&(typeof Symbol==="function"?Symbol.for:"@@for")&&(typeof Symbol==="function"?Symbol.for:"@@for")("react.element")||0xeac7;
return function createRawReactElement(type,key,props){
return{
$$typeof:REACT_ELEMENT_TYPE,
type:type,
key:key,
ref:null,
props:props,
_owner:null};
};
}();
babelHelpers.classCallCheck=function(instance,Constructor){
if(!(instance instanceof Constructor)){
throw new TypeError("Cannot call a class as a function");
}
};
babelHelpers.createClass=function(){
function defineProperties(target,props){
for(var i=0;i<props.length;i++){
var descriptor=props[i];
descriptor.enumerable=descriptor.enumerable||false;
descriptor.configurable=true;
if("value"in descriptor)descriptor.writable=true;
Object.defineProperty(target,descriptor.key,descriptor);
}
}
return function(Constructor,protoProps,staticProps){
if(protoProps)defineProperties(Constructor.prototype,protoProps);
if(staticProps)defineProperties(Constructor,staticProps);
return Constructor;
};
}();
babelHelpers.defineProperty=function(obj,key,value){
if(key in obj){
Object.defineProperty(obj,key,{
value:value,
enumerable:true,
configurable:true,
writable:true});
}else{
obj[key]=value;
}
return obj;
};
babelHelpers._extends=babelHelpers.extends=Object.assign||function(target){
for(var i=1;i<arguments.length;i++){
var source=arguments[i];
for(var key in source){
if(Object.prototype.hasOwnProperty.call(source,key)){
target[key]=source[key];
}
}
}
return target;
};
babelHelpers.get=function get(object,property,receiver){
if(object===null)object=Function.prototype;
var desc=Object.getOwnPropertyDescriptor(object,property);
if(desc===undefined){
var parent=Object.getPrototypeOf(object);
if(parent===null){
return undefined;
}else{
return get(parent,property,receiver);
}
}else if("value"in desc){
return desc.value;
}else{
var getter=desc.get;
if(getter===undefined){
return undefined;
}
return getter.call(receiver);
}
};
babelHelpers.inherits=function(subClass,superClass){
if(typeof superClass!=="function"&&superClass!==null){
throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);
}
subClass.prototype=Object.create(superClass&&superClass.prototype,{
constructor:{
value:subClass,
enumerable:false,
writable:true,
configurable:true}});
if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;
};
babelHelpers.interopRequireDefault=function(obj){
return obj&&obj.__esModule?obj:{
default:obj};
};
babelHelpers.interopRequireWildcard=function(obj){
if(obj&&obj.__esModule){
return obj;
}else{
var newObj={};
if(obj!=null){
for(var key in obj){
if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key];
}
}
newObj.default=obj;
return newObj;
}
};
babelHelpers.objectWithoutProperties=function(obj,keys){
var target={};
for(var i in obj){
if(keys.indexOf(i)>=0)continue;
if(!Object.prototype.hasOwnProperty.call(obj,i))continue;
target[i]=obj[i];
}
return target;
};
babelHelpers.possibleConstructorReturn=function(self,call){
if(!self){
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}
return call&&(typeof call==="object"||typeof call==="function")?call:self;
};
babelHelpers.slicedToArray=function(){
function sliceIterator(arr,i){
var _arr=[];
var _n=true;
var _d=false;
var _e=undefined;
try{
for(var _i=arr[typeof Symbol==="function"?Symbol.iterator:"@@iterator"](),_s;!(_n=(_s=_i.next()).done);_n=true){
_arr.push(_s.value);
if(i&&_arr.length===i)break;
}
}catch(err){
_d=true;
_e=err;
}finally{
try{
if(!_n&&_i["return"])_i["return"]();
}finally{
if(_d)throw _e;
}
}
return _arr;
}
return function(arr,i){
if(Array.isArray(arr)){
return arr;
}else if((typeof Symbol==="function"?Symbol.iterator:"@@iterator")in Object(arr)){
return sliceIterator(arr,i);
}else{
throw new TypeError("Invalid attempt to destructure non-iterable instance");
}
};
}();
babelHelpers.taggedTemplateLiteral=function(strings,raw){
return Object.freeze(Object.defineProperties(strings,{
raw:{
value:Object.freeze(raw)}}));
};
babelHelpers.toArray=function(arr){
return Array.isArray(arr)?arr:Array.from(arr);
};
babelHelpers.toConsumableArray=function(arr){
if(Array.isArray(arr)){
for(var i=0,arr2=Array(arr.length);i<arr.length;i++){arr2[i]=arr[i];}
return arr2;
}else{
return Array.from(arr);
}
};
})(typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : this);
__d(0 /* DBMonster/vr/client.js */, function(global, require, module, exports) {
var _reactVrWeb=require(12 /* ./../custom-react-vr/react-vr-web */);
function init(bundle,parent,options){
var vr=new _reactVrWeb.VRInstance(bundle,'DBMonster',parent,babelHelpers.extends({},
options));
vr.render=function(){
};
vr.start();
return vr;
}
window.ReactVR={init:init};
}, "DBMonster/vr/client.js");
__d(12 /* ReactVRApp */, function(global, require, module, exports) {Object.defineProperty(exports,"__esModule",{value:true});exports.VRInstance=exports.ReactNativeContext=exports.Module=exports.createRootView=exports.bundleFromRoot=undefined;
var _bundleFromRoot=require(13 /* ./js/bundleFromRoot */);var _bundleFromRoot2=babelHelpers.interopRequireDefault(_bundleFromRoot);
var _createRootView=require(14 /* ./js/createRootView */);var _createRootView2=babelHelpers.interopRequireDefault(_createRootView);
var _Module=require(17 /* ./js/Modules/Module */);var _Module2=babelHelpers.interopRequireDefault(_Module);
var _VRInstance=require(87 /* ./js/VRInstance */);var _VRInstance2=babelHelpers.interopRequireDefault(_VRInstance);
var _ReactNativeContext=require(15 /* ./js/ReactNativeContext */);exports.
bundleFromRoot=_bundleFromRoot2.default;exports.
createRootView=_createRootView2.default;exports.
Module=_Module2.default;exports.
ReactNativeContext=_ReactNativeContext.ReactNativeContext;exports.
VRInstance=_VRInstance2.default;
}, "ReactVRApp");
__d(13 /* react-vr-web/js/bundleFromRoot.js */, function(global, require, module, exports) {Object.defineProperty(exports,"__esModule",{value:true});exports.default=
bundleFromRoot;function bundleFromRoot(root){
var path=location.pathname;
if(!path.endsWith('/')){
path=path.substr(0,path.lastIndexOf('/'));
}else{
path=path.substr(0,path.length-1);
}
return location.protocol+'//'+location.host+path+'/'+root;
}
}, "react-vr-web/js/bundleFromRoot.js");
__d(14 /* react-vr-web/js/createRootView.js */, function(global, require, module, exports) {Object.defineProperty(exports,"__esModule",{value:true});exports.default=
createRootView;var _ReactNativeContext=require(15 /* ./ReactNativeContext */);var DEVTOOLS_FLAG=/\bdevtools\b/;var HOTRELOAD_FLAG=/\bhotreload\b/;var BRIDGE_CODE='\nvar Status = undefined;\n\nonmessage = function(e) {\n var msg = JSON.parse(e.data);\n if (!msg || !msg.cmd) {\n return;\n }\n if (msg.cmd === \'moduleConfig\' ) {\n __fbBatchedBridgeConfig = msg.moduleConfig;\n Status = \'moduleConfig\';\n } else\n if (msg.cmd === \'bundle\' && Status === \'moduleConfig\') {\n try {\n importScripts(msg.bundleName);\n Status = \'bundle\';\n } catch (e) {\n console.warn(e);\n var xmlhttp = new XMLHttpRequest();\n xmlhttp.open("GET", msg.bundleName, true);\n xmlhttp.onreadystatechange=function() {\n if (xmlhttp.readyState == 4) {\n var result = JSON.parse(xmlhttp.responseText);\n if (result) {\n if (result.type === \'UnableToResolveError\' || result.type === \'NotFoundError\') {\n console.warn(result.message);\n } else {\n if (result.snippet) {\n // remove all color characters and split the lines for improved clarity\n result.snippet = result.snippet.replace(/\\u001b\\[.*?m/g, \'\').split(\'\\n\');\n }\n if (result.filename && result.filename.indexOf(\':\') <= 2) {\n result.filename = \'file:///\' + result.filename;\n }\n if (result.errors) {\n for (var i=0; i<result.errors.length; i++) {\n var error = result.errors[i];\n if (error.filename && error.filename.indexOf(\':\') <= 2) {\n error.filename = \'file:///\' + error.filename;\n }\n }\n }\n console.warn(JSON.stringify(result, undefined, 2));\n }\n }\n }\n }\n xmlhttp.send(null);\n }\n } else if (Status === \'bundle\') {\n if (msg.cmd === \'exec\') {\n var results = __fbBatchedBridge.callFunctionReturnFlushedQueue.apply(null, [msg.module, msg.function, msg.args]);\n try {\n postMessage(JSON.stringify({cmd: \'exec\', results: results}));\n } catch (e) {\n console.warn(e);\n console.warn(msg);\n console.warn(JSON.stringify(results))\n }\n } else\n if (msg.cmd === \'invoke\') {\n var results = __fbBatchedBridge.invokeCallbackAndReturnFlushedQueue.apply(null, [msg.id, msg.args]);\n try {\n postMessage(JSON.stringify({cmd: \'exec\', results: results}));\n } catch (e) {\n console.warn(e);\n console.warn(msg);\n console.warn(JSON.stringify(results))\n }\n } else\n if (msg.cmd === \'flush\') {\n var results = __fbBatchedBridge.flushedQueue.apply(null);\n try {\n postMessage(JSON.stringify({cmd: \'exec\', results: results}));\n } catch (e) {\n console.warn(e);\n console.warn(msg);\n console.warn(JSON.stringify(results))\n }\n }\n }\n}\n';if(__DEV__){if(DEVTOOLS_FLAG.test(location.search)){BRIDGE_CODE+='__DEVTOOLS__ = true;\n';if(window.__REACT_DEVTOOLS_GLOBAL_HOOK__){console.log('We detected that you have the React Devtools extension installed. '+'Please note that at this time, React VR is only compatible with the '+'standalone React Native Inspector that ships with Nuclide.');}}}function createRootView(guisys,name){var options=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};
if(!guisys){
throw new Error('ReactVR Root View must attach to an OVRUI GUI!');
}
if(!name||typeof name!=='string'){
throw new Error(
'ReactVR Root View must have a module name to mount');
}
var initialProps=options.initialProps||{};
var contextOptions={
isLowLatency:options.isLowLatency};
if(options.assetRoot){
contextOptions.assetRoot=options.assetRoot;
}
if(HOTRELOAD_FLAG.test(location.search)){
contextOptions.enableHotReload=true;
}
if(options.enableHotReload){
contextOptions.enableHotReload=options.enableHotReload;
}
var bundleURL=options.bundle||'../index.bundle?platform=vr';
if(contextOptions.enableHotReload){
bundleURL+='&hot=true';
}
var bridgeCodeBlob=new Blob([BRIDGE_CODE]);
var rn=new _ReactNativeContext.ReactNativeContext(
guisys,
URL.createObjectURL(bridgeCodeBlob),
contextOptions);
if(Array.isArray(options.nativeModules)){
for(var _iterator=options.nativeModules,_isArray=Array.isArray(_iterator),_i=0,_iterator=_isArray?_iterator:_iterator[typeof Symbol==='function'?Symbol.iterator:'@@iterator']();;){var _ref;if(_isArray){if(_i>=_iterator.length)break;_ref=_iterator[_i++];}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value;}var module=_ref;
rn.registerModule(module);
}
}
rn.init(bundleURL);
rn.createRootView(name,initialProps);
return{
context:rn,
frame:function frame(camera){
rn.frame(camera);
}};
}
}, "react-vr-web/js/createRootView.js");
__d(15 /* react-vr-web/js/ReactNativeContext.js */, function(global, require, module, exports) {Object.defineProperty(exports,"__esModule",{value:true});exports.ReactNativeContext=undefined;
var _AndroidConstants=require(16 /* ./Modules/AndroidConstants */);var _AndroidConstants2=babelHelpers.interopRequireDefault(_AndroidConstants);
var _AsyncLocalStorage=require(18 /* ./Modules/AsyncLocalStorage */);var _AsyncLocalStorage2=babelHelpers.interopRequireDefault(_AsyncLocalStorage);
var _ExternalAssets=require(19 /* ./Modules/ExternalAssets */);var _ExternalAssets2=babelHelpers.interopRequireDefault(_ExternalAssets);
var _History=require(20 /* ./Modules/History */);var _History2=babelHelpers.interopRequireDefault(_History);
var _LinkingManager=require(21 /* ./Modules/LinkingManager */);var _LinkingManager2=babelHelpers.interopRequireDefault(_LinkingManager);
var _Networking=require(22 /* ./Modules/Networking */);var _Networking2=babelHelpers.interopRequireDefault(_Networking);
var _RCTResourceManager=require(23 /* ./Utils/RCTResourceManager */);
var _RCTInputControls=require(24 /* ./Utils/RCTInputControls */);
var _RCTHeadModel=require(53 /* ./Utils/RCTHeadModel */);
var _RCTVideoModule=require(54 /* ./Modules/RCTVideoModule */);var _RCTVideoModule2=babelHelpers.interopRequireDefault(_RCTVideoModule);
var _RCTAudioModule=require(55 /* ./Modules/RCTAudioModule */);var _RCTAudioModule2=babelHelpers.interopRequireDefault(_RCTAudioModule);
var _Timing=require(60 /* ./Modules/Timing */);var _Timing2=babelHelpers.interopRequireDefault(_Timing);
var _UIManager=require(61 /* ./Modules/UIManager */);var _UIManager2=babelHelpers.interopRequireDefault(_UIManager);
var _WebSocketModule=require(83 /* ./Modules/WebSocketModule */);var _WebSocketModule2=babelHelpers.interopRequireDefault(_WebSocketModule);
var _ReactVRConstants=require(84 /* ./Modules/ReactVRConstants */);var _ReactVRConstants2=babelHelpers.interopRequireDefault(_ReactVRConstants);
var _RCTExceptionsManager=require(85 /* ./Modules/RCTExceptionsManager */);var _RCTExceptionsManager2=babelHelpers.interopRequireDefault(_RCTExceptionsManager);
var _RCTSourceCode=require(86 /* ./Modules/RCTSourceCode */);var _RCTSourceCode2=babelHelpers.interopRequireDefault(_RCTSourceCode);
var _ovrui=require(25 /* ovrui */);var OVRUI=babelHelpers.interopRequireWildcard(_ovrui);
var _three=require(30 /* three */);var THREE=babelHelpers.interopRequireWildcard(_three);
var ROOT_VIEW_INCREMENT=10;
function replaceHiddenAttributes(key,value){
if(key.charAt&&key.charAt(0)==='_'){
return undefined;
}else{
return value;
}
}
function describe(ctx){
var remoteModuleConfig=[];
for(var m in ctx.modules){
var module=ctx.modules[m]._describe();
if(__DEV__){
console.log(module);
}
remoteModuleConfig.push(module);
}
return remoteModuleConfig;
}var
ReactNativeContext=exports.ReactNativeContext=function(){
function ReactNativeContext(guiSys,bridgeURL){var options=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};babelHelpers.classCallCheck(this,ReactNativeContext);
this.modules=[];
this.currentRootTag=1;
this.worker=new Worker(bridgeURL);
this.guiSys=guiSys;
this.messages=[];
this.isLowLatency=!!options.isLowLatency;
this.enableHotReload=!!options.enableHotReload;
this.lastHit=null;
this.lastHitType=OVRUI.GuiSysHitType.GAZE;
this.UIManager=new _UIManager2.default(this,guiSys);
this.Timing=new _Timing2.default(this);
this.RCTResourceManager=new _RCTResourceManager.RCTResourceManager();
this.RCTInputControls=new _RCTInputControls.RCTInputControls(this,guiSys);
this.HeadModel=new _RCTHeadModel.RCTHeadModel(this);
this.VideoModule=new _RCTVideoModule2.default(this);
this.AudioModule=new _RCTAudioModule2.default(this);
this._moduleForTag=[];
this._cameraParentFromTag=[];
this.registerModule(this.UIManager);
this.registerModule(new _AndroidConstants2.default(this));
this.registerModule(new _AsyncLocalStorage2.default(this));
this.registerModule(new _History2.default(this));
this.registerModule(new _Networking2.default(this));
this.registerModule(new _LinkingManager2.default(this));
this.registerModule(this.Timing);
this.registerModule(this.VideoModule);
this.registerModule(this.AudioModule);
this.registerModule(new _WebSocketModule2.default(this));
this.registerModule(new _ReactVRConstants2.default());
this.registerModule(new _RCTExceptionsManager2.default());
this.registerModule(new _RCTSourceCode2.default());
this.registerModule(new _ExternalAssets2.default(options.assetRoot));
guiSys.eventDispatcher.addEventListener('GuiSysEvent',this._onGuiSysEvent.bind(this));
guiSys.eventDispatcher.addEventListener('UIViewEvent',this._onUIViewEvent.bind(this));
(function(self){
self.worker.onmessage=function(e)
{
var msg=JSON.parse(e.data);
if(!msg||!msg.cmd){
return;
}
if(msg.cmd==='exec'){
var results=msg.results;
if(results&&results.length){
self.messages.push(results);
}
}
};
})(this);
}babelHelpers.createClass(ReactNativeContext,[{key:'init',value:function init(
bundle){
this.worker.postMessage(
JSON.stringify({cmd:'moduleConfig',moduleConfig:{
remoteModuleConfig:describe(this)}},
replaceHiddenAttributes));
this.worker.postMessage(JSON.stringify({cmd:'bundle',bundleName:bundle}));
if(this.enableHotReload){
var bundleURL=new URL(bundle);
console.warn('HotReload on '+bundle);
this.callFunction(
'HMRClient',
'enable',
[
'vr',
bundleURL.pathname.toString().substr(1),
bundleURL.hostname,
bundleURL.port]);
}
}},{key:'shutdown',value:function shutdown()
{
for(var m in this.modules){
this.modules[m].shutdown&&this.modules[m].shutdown();
}
}},{key:'createRootView',value:function createRootView(
module,props){
var tag=this.currentRootTag;
this.currentRootTag+=ROOT_VIEW_INCREMENT;
this.worker.postMessage(JSON.stringify({
cmd:'exec',
module:'AppRegistry',
function:'runApplication',
args:[module,{initialProps:props,rootTag:tag}]}));
this._moduleForTag[tag]=module;
this._cameraParentFromTag[tag]=new THREE.Object3D();
this.UIManager.createRootView(tag);
return tag;
}},{key:'updateRootView',value:function updateRootView(
tag,props){
this.worker.postMessage(JSON.stringify({
cmd:'exec',
module:'AppRegistry',
function:'runApplication',
args:[this._moduleForTag[tag],{initialProps:props,rootTag:tag}]}));
}},{key:'destroyRootView',value:function destroyRootView(
tag){
delete this._moduleForTag[tag];
var cameraParent=this._cameraParentFromTag[tag];
if(cameraParent){
for(var _iterator=cameraParent.children,_isArray=Array.isArray(_iterator),_i=0,_iterator=_isArray?_iterator:_iterator[typeof Symbol==='function'?Symbol.iterator:'@@iterator']();;){var _ref;if(_isArray){if(_i>=_iterator.length)break;_ref=_iterator[_i++];}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value;}var child=_ref;
cameraParent.remove(child);
}
delete this._cameraParentFromTag[tag];
}
this.worker.postMessage(JSON.stringify({
cmd:'exec',
module:'AppRegistry',
function:'unmountApplicationComponentAtRootTag',
args:[tag]}));
}},{key:'_onGuiSysEvent',value:function _onGuiSysEvent(
event){
switch(event.eventType){
case OVRUI.GuiSysEventType.HIT_CHANGED:
if(this.lastHit!==event.args.currentHit||this.lastHitType!==event.args.currentHitType){
this.lastHit=event.args.currentHit;
this.lastHitType=event.args.currentHitType;
}
break;
default:
break;}
}},{key:'_onUIViewEvent',value:function _onUIViewEvent(
event){
switch(event.eventType){
case OVRUI.UIViewEventType.FOCUS_LOST:
{
var viewTag=event.view?this.getHitTag(event.view):undefined;
var targetTag=event.args.target?this.getHitTag(event.args.target):undefined;
if(viewTag){
if(event.args.hitType===OVRUI.GuiSysHitType.GAZE){
this.callFunction(
'RCTEventEmitter',
'receiveEvent',
[viewTag,'topGazeExit',[targetTag]]);
}
if(event.args.hitType===OVRUI.GuiSysHitType.MOUSE){
this.callFunction(
'RCTEventEmitter',
'receiveEvent',
[viewTag,'topMouseExit',[targetTag]]);
}
this.callFunction(
'RCTEventEmitter',
'receiveEvent',
[viewTag,'topExit',[targetTag]]);
}
}
break;
case OVRUI.UIViewEventType.FOCUS_GAINED:
{
var _viewTag=event.view?this.getHitTag(event.view):undefined;
var _targetTag=event.args.target?this.getHitTag(event.args.target):undefined;
if(_viewTag){
if(event.args.hitType===OVRUI.GuiSysHitType.GAZE){
this.callFunction(
'RCTEventEmitter',
'receiveEvent',
[_viewTag,'topGazeEnter',[_targetTag]]);
}
if(event.args.hitType===OVRUI.GuiSysHitType.MOUSE){
this.callFunction(
'RCTEventEmitter',
'receiveEvent',
[_viewTag,'topMouseEnter',[_targetTag]]);
}
this.callFunction(
'RCTEventEmitter',
'receiveEvent',
[_viewTag,'topEnter',[_targetTag]]);
}
}
break;
default:
break;}
}},{key:'frame',value:function frame(
camera,rootTag){
var frameStart=window.performance?performance.now():Date.now();
this.Timing&&this.Timing.frame(frameStart);
this.worker.postMessage(JSON.stringify({
cmd:'flush'}));
for(var index in this.messages){
var results=this.messages[index];
if(results&&results.length>=3){
var moduleIndex=results[0];
var funcIndex=results[1];
var params=results[2];
for(var i=0;i<moduleIndex.length;i++)
{
this.modules[moduleIndex[i]].
_functionMap[funcIndex[i]].
apply(this.modules[moduleIndex[i]],params[i]);
}
}
}
this.messages=[];
this.UIManager&&this.UIManager.frame();
this.HeadModel&&this.HeadModel.frame(camera);
this.VideoModule&&this.VideoModule.frame();
this.AudioModule&&this.AudioModule.frame(camera);
this._applySceneTransform(camera,rootTag);
this.Timing&&this.Timing.idle(frameStart);
}},{key:'_applySceneTransform',value:function _applySceneTransform(
camera,rootTag){
var worldMatrix=this.UIManager.getSceneCameraTransform(rootTag);
var cameraParent=this._cameraParentFromTag[rootTag];
if(!worldMatrix||!cameraParent){
return;
}
if(camera.parent&&camera.parent.uuid!==cameraParent.uuid){
console.warn('Camera object already has a parent; '+
'Use of \'transform\' property on <Scene> will have no effect.');
this._cameraParentFromTag[rootTag]=null;
return;
}
if(cameraParent.children.length===0){
cameraParent.add(camera);
}
cameraParent.matrixAutoUpdate=false;
cameraParent.matrix.fromArray(worldMatrix);
cameraParent.updateMatrixWorld(true);
}},{key:'getHitTag',value:function getHitTag(
hit){
while(hit){
if(hit.tag){
return hit.tag;
}
hit=hit.parent;
}
return undefined;
}},{key:'callFunction',value:function callFunction(
moduleName,functionName,args){
this.worker.postMessage(JSON.stringify({
cmd:'exec',
module:moduleName,
function:functionName,
args:args}));
}},{key:'invokeCallback',value:function invokeCallback(
id,args){
this.worker.postMessage(JSON.stringify({
cmd:'invoke',
id:id,
args:args}));
}},{key:'registerModule',value:function registerModule(
module){
this.modules.push(module);
}}]);return ReactNativeContext;}();
}, "react-vr-web/js/ReactNativeContext.js");
__d(16 /* react-vr-web/js/Modules/AndroidConstants.js */, function(global, require, module, exports) {Object.defineProperty(exports,"__esModule",{value:true});
var _Module2=require(17 /* ./Module */);var _Module3=babelHelpers.interopRequireDefault(_Module2);var
AndroidConstants=function(_Module){babelHelpers.inherits(AndroidConstants,_Module);
function AndroidConstants(){babelHelpers.classCallCheck(this,AndroidConstants);var _this=babelHelpers.possibleConstructorReturn(this,(AndroidConstants.__proto__||Object.getPrototypeOf(AndroidConstants)).call(this,
'AndroidConstants'));
_this.Version=22;return _this;
}return AndroidConstants;}(_Module3.default);exports.default=AndroidConstants;
}, "react-vr-web/js/Modules/AndroidConstants.js");
__d(17 /* react-vr-web/js/Modules/Module.js */, function(global, require, module, exports) {Object.defineProperty(exports,"__esModule",{value:true});var
Module=function(){
function Module(name){babelHelpers.classCallCheck(this,Module);
if(name.startsWith('RCT')){
name=name.substr(3);
}
this.name=name;
this._functionMap=[];
}babelHelpers.createClass(Module,[{key:'getName',value:function getName()
{
return this.name;
}},{key:'_describe',value:function _describe()
{
var constants={};
var functions=[];
var promiseFunctions=[];
var syncFunctions=[];
var methodID=0;
var proto=Object.getPrototypeOf(this);
var protoMembers=Object.getOwnPropertyNames(proto);
for(var _iterator=protoMembers,_isArray=Array.isArray(_iterator),_i=0,_iterator=_isArray?_iterator:_iterator[typeof Symbol==='function'?Symbol.iterator:'@@iterator']();;){var _ref;if(_isArray){if(_i>=_iterator.length)break;_ref=_iterator[_i++];}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value;}var attr=_ref;
var member=proto[attr];
if(
attr[0]==='_'||
attr==='constructor'||
typeof member!=='function')
{
continue;
}
var name=attr;
if(name[0]==='$'){
name=name.substring(1);
promiseFunctions.push(methodID);
}
this._functionMap[methodID]=member;
functions.push(name);
methodID++;
}
for(var _attr in this){
var member=this[_attr];
if(_attr[0]==='_'||typeof member==='function'){
continue;
}
constants[_attr]=member;
}
return[
this.name,
constants,
functions,
promiseFunctions,
syncFunctions];
}}]);return Module;}();exports.default=Module;
}, "react-vr-web/js/Modules/Module.js");
__d(18 /* react-vr-web/js/Modules/AsyncLocalStorage.js */, function(global, require, module, exports) {Object.defineProperty(exports,"__esModule",{value:true});
var _Module2=require(17 /* ./Module */);var _Module3=babelHelpers.interopRequireDefault(_Module2);var
AsyncLocalStorage=function(_Module){babelHelpers.inherits(AsyncLocalStorage,_Module);
function AsyncLocalStorage(rnctx){babelHelpers.classCallCheck(this,AsyncLocalStorage);var _this=babelHelpers.possibleConstructorReturn(this,(AsyncLocalStorage.__proto__||Object.getPrototypeOf(AsyncLocalStorage)).call(this,
'AsyncLocalStorage'));
_this._rnctx=rnctx;
_this._db=null;return _this;
}babelHelpers.createClass(AsyncLocalStorage,[{key:'_prepareDB',value:function _prepareDB()
{var _this2=this;
return new Promise(function(resolve,reject){
if(_this2._db){
return resolve(_this2._db);
}
var request=window.indexedDB.open('AsyncStorage',1);
request.onerror=function(event){
reject({
message:'Error opening database'});
};
request.onupgradeneeded=function(event){
var db=event.target.result;
_this2._db=db;
db.createObjectStore('pairs',{keyPath:'key'});
resolve(db);
};
request.onsuccess=function(event){
var db=event.target.result;
_this2._db=db;
resolve(db);
};
});
}},{key:'_getRow',value:function _getRow(
objectStore,key){
return new Promise(function(resolve,reject){
var request=objectStore.get(key);
request.onerror=function(event){
reject({
message:event.target.error.name,
key:key});
};
request.onsuccess=function(event){
var row=event.target.result;
if(!row){
resolve([key,undefined]);
}else{
resolve([row.key,row.value]);
}
};
});
}},{key:'_putRow',value:function _putRow(
objectStore,
row)
{
return new Promise(function(resolve,reject){
var request=objectStore.put(row);
request.onerror=function(event){
reject({
message:event.target.error.name,
key:row.key});
};
request.onsuccess=function(){
resolve();
};
});
}},{key:'_deleteRow',value:function _deleteRow(
objectStore,
key)
{
return new Promise(function(resolve,reject){
var request=objectStore.delete(key);
request.onerror=function(event){
reject({
message:event.target.error.name,
key:key});
};
request.onsuccess=function(){
resolve();
};
});
}},{key:'multiGet',value:function multiGet(
keys,cb){var _this3=this;
this._prepareDB().then(function(db){
var transaction=db.transaction(['pairs']);
var objectStore=transaction.objectStore('pairs');
var gets=[];
keys.forEach(function(key){return gets.push(_this3._getRow(objectStore,key));});
return Promise.all(gets);
}).then(function(rows){
_this3._rnctx.invokeCallback(cb,[undefined,rows]);
},function(err){
_this3._rnctx.invokeCallback(cb,[err]);
});
}},{key:'multiSet',value:function multiSet(
pairs,cb){var _this4=this;
this._prepareDB().then(function(db){
var transaction=db.transaction(['pairs'],'readwrite');
var objectStore=transaction.objectStore('pairs');
var puts=[];
pairs.forEach(function(pair){
var row={key:pair[0],value:pair[1]};
puts.push(_this4._putRow(objectStore,row));
});
return Promise.all(puts);
}).then(function(){
_this4._rnctx.invokeCallback(cb,[]);
},function(err){
_this4._rnctx.invokeCallback(cb,[err]);
});
}},{key:'multiRemove',value:function multiRemove(
keys,cb){var _this5=this;
this._prepareDB().then(function(db){
var transaction=db.transaction(['pairs'],'readwrite');
var objectStore=transaction.objectStore('pairs');
var deletes=[];
keys.forEach(function(key){return deletes.push(_this5._deleteRow(objectStore,key));});
return Promise.all(deletes);
}).then(function(){
_this5._rnctx.invokeCallback(cb,[]);
},function(err){
_this5._rnctx.invokeCallback(cb,[err]);
});
}},{key:'clear',value:function clear(
cb){var _this6=this;
this._prepareDB().then(function(db){
return new Promise(function(resolve,reject){
var transaction=db.transaction(['pairs'],'readwrite');
var objectStore=transaction.objectStore('pairs');
var request=objectStore.clear();
request.onerror=function(event){
reject({
message:event.target.error.name});
};
request.onsuccess=function(){
resolve();
};
});
}).then(function(){
_this6._rnctx.invokeCallback(cb,[]);
},function(err){
_this6._rnctx.invokeCallback(cb,[err]);
});
}},{key:'getAllKeys',value:function getAllKeys(
cb){var _this7=this;
this._prepareDB().then(function(db){
return new Promise(function(resolve,reject){
var transaction=db.transaction(['pairs']);
var objectStore=transaction.objectStore('pairs');
var request=objectStore.openCursor();
var keys=[];
request.onerror=function(event){
reject({
message:event.target.error.name});
};
request.onsuccess=function(event){
var cursor=event.target.result;
if(cursor){
keys.push(cursor.key);
cursor.continue();
}else{
resolve(keys);
}
};
});
}).then(function(keys){
_this7._rnctx.invokeCallback(cb,[undefined,keys]);
},function(err){
_this7._rnctx.invokeCallback(cb,[err]);
});
}}]);return AsyncLocalStorage;}(_Module3.default);exports.default=AsyncLocalStorage;
}, "react-vr-web/js/Modules/AsyncLocalStorage.js");
__d(19 /* react-vr-web/js/Modules/ExternalAssets.js */, function(global, require, module, exports) {Object.defineProperty(exports,"__esModule",{value:true});
var _Module2=require(17 /* ./Module */);var _Module3=babelHelpers.interopRequireDefault(_Module2);var
ExternalAssets=function(_Module){babelHelpers.inherits(ExternalAssets,_Module);
function ExternalAssets(assetRoot){babelHelpers.classCallCheck(this,ExternalAssets);var _this=babelHelpers.possibleConstructorReturn(this,(ExternalAssets.__proto__||Object.getPrototypeOf(ExternalAssets)).call(this,
'ExternalAssets'));
_this.assetRoot=assetRoot;return _this;
}return ExternalAssets;}(_Module3.default);exports.default=ExternalAssets;
}, "react-vr-web/js/Modules/ExternalAssets.js");
__d(20 /* react-vr-web/js/Modules/History.js */, function(global, require, module, exports) {Object.defineProperty(exports,"__esModule",{value:true});
var _Module2=require(17 /* ./Module */);var _Module3=babelHelpers.interopRequireDefault(_Module2);var
History=function(_Module){babelHelpers.inherits(History,_Module);
function History(rnctx){babelHelpers.classCallCheck(this,History);var _this=babelHelpers.possibleConstructorReturn(this,(History.__proto__||Object<