(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;var 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=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-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; 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); }; } var repeat=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'; function guarded(){ return( ErrorUtils.applyWithGuard( fun, context||this, arguments, null, name)); } return guarded; }}; global.ErrorUtils=ErrorUtils; function setupErrorGuard(){ var onError=function onError(e){ throw e; }; global.ErrorUtils.setGlobalHandler(onError); } setupErrorGuard(); })(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=0){ k=n; }else{ k=len+n; if(k<0){ k=0; } } var currentElement; while(k=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>>react#componentDidMount',+new Date()); var navigator=this.navigator; _reactNative.BackAndroid.addEventListener('hardwareBackPress',function(){ if(navigator&&navigator.getCurrentRoutes().length>1){ navigator.pop(); return true; } return false; }); }},{key:'componentWillUnmount',value:function componentWillUnmount() { _reactNative.BackAndroid.removeEventListener('hardwareBackPress'); }}],[{key:'_renderPage',value:function _renderPage(route,nav){switch(route.id){case'main':return _react2.default.createElement(_MainScreen2.default,{nav:nav});break;case'webview':return _react2.default.createElement(_WebView2.default,{url:route.url});break;}}}]);return ReactTabApp;}(_react.Component); _reactNative.AppRegistry.registerComponent('SmartReactApp',function(){return ReactTabApp;}); }, "SmartRectNativeApp/index.android.js"); __d(12 /* react/react.js */, function(global, require, module, exports) {'use strict'; module.exports=require(13 /* ./lib/React */); }, "react/react.js"); __d(13 /* react/lib/React.js */, function(global, require, module, exports) { 'use strict'; var _assign=require(14 /* object-assign */); var ReactChildren=require(15 /* ./ReactChildren */); var ReactComponent=require(27 /* ./ReactComponent */); var ReactClass=require(30 /* ./ReactClass */); var ReactDOMFactories=require(35 /* ./ReactDOMFactories */); var ReactElement=require(19 /* ./ReactElement */); var ReactPropTypes=require(40 /* ./ReactPropTypes */); var ReactVersion=require(41 /* ./ReactVersion */); var onlyChild=require(42 /* ./onlyChild */); var warning=require(21 /* fbjs/lib/warning */); var createElement=ReactElement.createElement; var createFactory=ReactElement.createFactory; var cloneElement=ReactElement.cloneElement; if(process.env.NODE_ENV!=='production'){ var ReactElementValidator=require(37 /* ./ReactElementValidator */); createElement=ReactElementValidator.createElement; createFactory=ReactElementValidator.createFactory; cloneElement=ReactElementValidator.cloneElement; } var __spread=_assign; if(process.env.NODE_ENV!=='production'){ var warned=false; __spread=function __spread(){ process.env.NODE_ENV!=='production'?warning(warned,'React.__spread is deprecated and should not be used. Use '+'Object.assign directly or another helper function with similar '+'semantics. You may be seeing this warning due to your compiler. '+'See https://fb.me/react-spread-deprecation for more details.'):void 0; warned=true; return _assign.apply(null,arguments); }; } var React={ Children:{ map:ReactChildren.map, forEach:ReactChildren.forEach, count:ReactChildren.count, toArray:ReactChildren.toArray, only:onlyChild}, Component:ReactComponent, createElement:createElement, cloneElement:cloneElement, isValidElement:ReactElement.isValidElement, PropTypes:ReactPropTypes, createClass:ReactClass.createClass, createFactory:createFactory, createMixin:function createMixin(mixin){ return mixin; }, DOM:ReactDOMFactories, version:ReactVersion, __spread:__spread}; module.exports=React; }, "react/lib/React.js"); __d(14 /* object-assign/index.js */, function(global, require, module, exports) {'use strict'; var hasOwnProperty=Object.prototype.hasOwnProperty; var propIsEnumerable=Object.prototype.propertyIsEnumerable; function toObject(val){ if(val===null||val===undefined){ throw new TypeError('Object.assign cannot be called with null or undefined'); } return Object(val); } function shouldUseNative(){ try{ if(!Object.assign){ return false; } var test1=new String('abc'); test1[5]='de'; if(Object.getOwnPropertyNames(test1)[0]==='5'){ return false; } var test2={}; for(var i=0;i<10;i++){ test2['_'+String.fromCharCode(i)]=i; } var order2=Object.getOwnPropertyNames(test2).map(function(n){ return test2[n]; }); if(order2.join('')!=='0123456789'){ return false; } var test3={}; 'abcdefghijklmnopqrst'.split('').forEach(function(letter){ test3[letter]=letter; }); if(Object.keys(babelHelpers.extends({},test3)).join('')!== 'abcdefghijklmnopqrst'){ return false; } return true; }catch(e){ return false; } } module.exports=shouldUseNative()?Object.assign:function(target,source){ var from; var to=toObject(target); var symbols; for(var s=1;s1){ var childArray=Array(childrenLength); for(var i=0;i1){ var childArray=Array(childrenLength); for(var i=0;i1?_len-1:0),_key=1;_key<_len;_key++){ args[_key-1]=arguments[_key]; } var argIndex=0; var message='Warning: '+format.replace(/%s/g,function(){ return args[argIndex++]; }); if(typeof console!=='undefined'){ console.error(message); } try{ throw new Error(message); }catch(x){} }; warning=function warning(condition,format){ if(format===undefined){ throw new Error('`warning(condition, format, ...args)` requires a warning '+'message argument'); } if(format.indexOf('Failed Composite propType: ')===0){ return; } if(!condition){ for(var _len2=arguments.length,args=Array(_len2>2?_len2-2:0),_key2=2;_key2<_len2;_key2++){ args[_key2-2]=arguments[_key2]; } printWarning.apply(undefined,[format].concat(args)); } }; })(); } module.exports=warning; }, "fbjs/lib/warning.js"); __d(22 /* fbjs/lib/emptyFunction.js */, function(global, require, module, exports) {"use strict"; function makeEmptyFunction(arg){ return function(){ return arg; }; } var emptyFunction=function emptyFunction(){}; emptyFunction.thatReturns=makeEmptyFunction; emptyFunction.thatReturnsFalse=makeEmptyFunction(false); emptyFunction.thatReturnsTrue=makeEmptyFunction(true); emptyFunction.thatReturnsNull=makeEmptyFunction(null); emptyFunction.thatReturnsThis=function(){ return this; }; emptyFunction.thatReturnsArgument=function(arg){ return arg; }; module.exports=emptyFunction; }, "fbjs/lib/emptyFunction.js"); __d(23 /* react/lib/canDefineProperty.js */, function(global, require, module, exports) { 'use strict'; var canDefineProperty=false; if(process.env.NODE_ENV!=='production'){ try{ Object.defineProperty({},'x',{get:function get(){}}); canDefineProperty=true; }catch(x){ } } module.exports=canDefineProperty; }, "react/lib/canDefineProperty.js"); __d(24 /* react/lib/traverseAllChildren.js */, function(global, require, module, exports) { 'use strict'; var _prodInvariant=require(17 /* ./reactProdInvariant */); var ReactCurrentOwner=require(20 /* ./ReactCurrentOwner */); var ReactElement=require(19 /* ./ReactElement */); var getIteratorFn=require(25 /* ./getIteratorFn */); var invariant=require(18 /* fbjs/lib/invariant */); var KeyEscapeUtils=require(26 /* ./KeyEscapeUtils */); var warning=require(21 /* fbjs/lib/warning */); var SEPARATOR='.'; var SUBSEPARATOR=':'; var didWarnAboutMaps=false; function getComponentKey(component,index){ if(component&&typeof component==='object'&&component.key!=null){ return KeyEscapeUtils.escape(component.key); } return index.toString(36); } function traverseAllChildrenImpl(children,nameSoFar,callback,traverseContext){ var type=typeof children; if(type==='undefined'||type==='boolean'){ children=null; } if(children===null||type==='string'||type==='number'||ReactElement.isValidElement(children)){ callback(traverseContext,children, nameSoFar===''?SEPARATOR+getComponentKey(children,0):nameSoFar); return 1; } var child; var nextName; var subtreeCount=0; var nextNamePrefix=nameSoFar===''?SEPARATOR:nameSoFar+SUBSEPARATOR; if(Array.isArray(children)){ for(var i=0;i1?_len-1:0),_key=1;_key<_len;_key++){ args[_key-1]=arguments[_key]; } if(newThis!==component&&newThis!==null){ process.env.NODE_ENV!=='production'?warning(false,'bind(): React component methods may only be bound to the '+'component instance. See %s',componentName):void 0; }else if(!args.length){ process.env.NODE_ENV!=='production'?warning(false,'bind(): You are binding a component method to the component. '+'React does this for you automatically in a high-performance '+'way, so you can safely remove this call. See %s',componentName):void 0; return boundMethod; } var reboundMethod=_bind.apply(boundMethod,arguments); reboundMethod.__reactBoundContext=component; reboundMethod.__reactBoundMethod=method; reboundMethod.__reactBoundArguments=args; return reboundMethod; }; } return boundMethod; } function bindAutoBindMethods(component){ var pairs=component.__reactAutoBindPairs; for(var i=0;i.'; } } return info; } function validateExplicitKey(element,parentType){ if(!element._store||element._store.validated||element.key!=null){ return; } element._store.validated=true; var memoizer=ownerHasKeyUseWarning.uniqueKey||(ownerHasKeyUseWarning.uniqueKey={}); var currentComponentErrorInfo=getCurrentComponentErrorInfo(parentType); if(memoizer[currentComponentErrorInfo]){ return; } memoizer[currentComponentErrorInfo]=true; var childOwner=''; if(element&&element._owner&&element._owner!==ReactCurrentOwner.current){ childOwner=' It was passed a child from '+element._owner.getName()+'.'; } process.env.NODE_ENV!=='production'?warning(false,'Each child in an array or iterator should have a unique "key" prop.'+'%s%s See https://fb.me/react-warning-keys for more information.%s',currentComponentErrorInfo,childOwner,ReactComponentTreeDevtool.getCurrentStackAddendum(element)):void 0; } function validateChildKeys(node,parentType){ if(typeof node!=='object'){ return; } if(Array.isArray(node)){ for(var i=0;i=_iterator.length)break;_ref=_iterator[_i++];}else{_i=_iterator.next();if(_i.done)break;_ref=_i.value;}var key=_ref;_loop(key); }})(); } var ReactNativeInternal=require(188 /* react/lib/ReactNative */); function applyForwarding(key){ if(__DEV__){ Object.defineProperty( ReactNative, key, Object.getOwnPropertyDescriptor(ReactNativeInternal,key)); return; } ReactNative[key]=ReactNativeInternal[key]; } for(var key in ReactNativeInternal){ applyForwarding(key); } if(__DEV__){ Object.defineProperty(ReactNative.addons,'Perf',{ enumerable:true, get:function get(){ if(__DEV__){ addonWarn('Perf','react-addons-perf'); } return require(496 /* react/lib/ReactPerf */); }}); Object.defineProperty(ReactNative.addons,'TestUtils',{ enumerable:true, get:function get(){ if(__DEV__){ addonWarn('update','react-addons-test-utils'); } return require(542 /* react/lib/ReactTestUtils */); }}); } module.exports=ReactNative; }, "react-native/Libraries/react-native/react-native.js"); __d(44 /* fbjs/lib/warning.js */, function(global, require, module, exports) { 'use strict'; var emptyFunction=require(45 /* ./emptyFunction */); var warning=emptyFunction; if(process.env.NODE_ENV!=='production'){ (function(){ var printWarning=function printWarning(format){ for(var _len=arguments.length,args=Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){ args[_key-1]=arguments[_key]; } var argIndex=0; var message='Warning: '+format.replace(/%s/g,function(){ return args[argIndex++]; }); if(typeof console!=='undefined'){ console.error(message); } try{ throw new Error(message); }catch(x){} }; warning=function warning(condition,format){ if(format===undefined){ throw new Error('`warning(condition, format, ...args)` requires a warning '+'message argument'); } if(format.indexOf('Failed Composite propType: ')===0){ return; } if(!condition){ for(var _len2=arguments.length,args=Array(_len2>2?_len2-2:0),_key2=2;_key2<_len2;_key2++){ args[_key2-2]=arguments[_key2]; } printWarning.apply(undefined,[format].concat(args)); } }; })(); } module.exports=warning; }, "fbjs/lib/warning.js"); __d(45 /* fbjs/lib/emptyFunction.js */, function(global, require, module, exports) {"use strict"; function makeEmptyFunction(arg){ return function(){ return arg; }; } var emptyFunction=function emptyFunction(){}; emptyFunction.thatReturns=makeEmptyFunction; emptyFunction.thatReturnsFalse=makeEmptyFunction(false); emptyFunction.thatReturnsTrue=makeEmptyFunction(true); emptyFunction.thatReturnsNull=makeEmptyFunction(null); emptyFunction.thatReturnsThis=function(){ return this; }; emptyFunction.thatReturnsArgument=function(arg){ return arg; }; module.exports=emptyFunction; }, "fbjs/lib/emptyFunction.js"); __d(46 /* ActivityIndicator */, function(global, require, module, exports) { 'use strict'; var ColorPropType=require(47 /* ColorPropType */); var NativeMethodsMixin=require(49 /* react/lib/NativeMethodsMixin */); var Platform=require(59 /* Platform */); var PropTypes=require(40 /* react/lib/ReactPropTypes */); var React=require(103 /* React */); var StyleSheet=require(104 /* StyleSheet */); var View=require(116 /* View */); var requireNativeComponent=require(130 /* requireNativeComponent */); var GRAY='#999999'; var ActivityIndicator=React.createClass({displayName:'ActivityIndicator', mixins:[NativeMethodsMixin], propTypes:babelHelpers.extends({}, View.propTypes,{ animating:PropTypes.bool, color:ColorPropType, size:PropTypes.oneOf([ 'small', 'large']), hidesWhenStopped:PropTypes.bool}), getDefaultProps:function getDefaultProps(){ return{ animating:true, color:Platform.OS==='ios'?GRAY:undefined, hidesWhenStopped:true, size:'small'}; }, render:function render(){var _props= this.props;var onLayout=_props.onLayout;var style=_props.style;var props=babelHelpers.objectWithoutProperties(_props,['onLayout','style']); var sizeStyle=void 0; switch(props.size){ case'small': sizeStyle=styles.sizeSmall; break; case'large': sizeStyle=styles.sizeLarge; break;} return( React.createElement(View,{ onLayout:onLayout, style:[styles.container,style]}, React.createElement(RCTActivityIndicator,babelHelpers.extends({}, props,{ style:sizeStyle, styleAttr:'Normal', indeterminate:true})))); }}); var styles=StyleSheet.create({ container:{ alignItems:'center', justifyContent:'center'}, sizeSmall:{ width:20, height:20}, sizeLarge:{ width:36, height:36}}); if(Platform.OS==='ios'){ var RCTActivityIndicator=requireNativeComponent( 'RCTActivityIndicatorView', ActivityIndicator, {nativeOnly:{activityIndicatorViewStyle:true}}); }else if(Platform.OS==='android'){ var RCTActivityIndicator=requireNativeComponent( 'AndroidProgressBar', ActivityIndicator, {nativeOnly:{ indeterminate:true, progress:true, styleAttr:true}}); } module.exports=ActivityIndicator; }, "ActivityIndicator"); __d(47 /* ColorPropType */, function(global, require, module, exports) { 'use strict'; var ReactPropTypeLocationNames=require(33 /* react/lib/ReactPropTypeLocationNames */); var normalizeColor=require(48 /* normalizeColor */); var colorPropType=function colorPropType(isRequired,props,propName,componentName,location,propFullName){ var color=props[propName]; if(color===undefined||color===null){ if(isRequired){ var locationName=ReactPropTypeLocationNames[location]; return new Error( 'Required '+locationName+' `'+(propFullName||propName)+ '` was not specified in `'+componentName+'`.'); } return; } if(typeof color==='number'){ return; } if(normalizeColor(color)===null){ var locationName=ReactPropTypeLocationNames[location]; return new Error( 'Invalid '+locationName+' `'+(propFullName||propName)+ '` supplied to `'+componentName+'`: '+color+'\n'+'Valid color formats are\n - \'#f0f\' (#rgb)\n - \'#f0fc\' (#rgba)\n - \'#ff00ff\' (#rrggbb)\n - \'#ff00ff00\' (#rrggbbaa)\n - \'rgb(255, 255, 255)\'\n - \'rgba(255, 255, 255, 1.0)\'\n - \'hsl(360, 100%, 100%)\'\n - \'hsla(360, 100%, 100%, 1.0)\'\n - \'transparent\'\n - \'red\'\n - 0xff00ff00 (0xrrggbbaa)\n'); } }; var ColorPropType=colorPropType.bind(null,false); ColorPropType.isRequired=colorPropType.bind(null,true); module.exports=ColorPropType; }, "ColorPropType"); __d(48 /* normalizeColor */, function(global, require, module, exports) { 'use strict'; function normalizeColor(color){ var match; if(typeof color==='number'){ if(color>>>0===color&&color>=0&&color<=0xffffffff){ return color; } return null; } if(match=matchers.hex6.exec(color)){ return parseInt(match[1]+'ff',16)>>>0; } if(names.hasOwnProperty(color)){ return names[color]; } if(match=matchers.rgb.exec(color)){ return( parse255(match[1])<<24| parse255(match[2])<<16| parse255(match[3])<<8| 0x000000ff)>>> 0; } if(match=matchers.rgba.exec(color)){ return( parse255(match[1])<<24| parse255(match[2])<<16| parse255(match[3])<<8| parse1(match[4]))>>> 0; } if(match=matchers.hex3.exec(color)){ return parseInt( match[1]+match[1]+ match[2]+match[2]+ match[3]+match[3]+ 'ff', 16)>>> 0; } if(match=matchers.hex8.exec(color)){ return parseInt(match[1],16)>>>0; } if(match=matchers.hex4.exec(color)){ return parseInt( match[1]+match[1]+ match[2]+match[2]+ match[3]+match[3]+ match[4]+match[4], 16)>>> 0; } if(match=matchers.hsl.exec(color)){ return( hslToRgb( parse360(match[1]), parsePercentage(match[2]), parsePercentage(match[3]))| 0x000000ff)>>> 0; } if(match=matchers.hsla.exec(color)){ return( hslToRgb( parse360(match[1]), parsePercentage(match[2]), parsePercentage(match[3]))| parse1(match[4]))>>> 0; } return null; } function hue2rgb(p,q,t){ if(t<0){ t+=1; } if(t>1){ t-=1; } if(t<1/6){ return p+(q-p)*6*t; } if(t<1/2){ return q; } if(t<2/3){ return p+(q-p)*(2/3-t)*6; } return p; } function hslToRgb(h,s,l){ var q=l<0.5?l*(1+s):l+s-l*s; var p=2*l-q; var r=hue2rgb(p,q,h+1/3); var g=hue2rgb(p,q,h); var b=hue2rgb(p,q,h-1/3); return( Math.round(r*255)<<24| Math.round(g*255)<<16| Math.round(b*255)<<8); } var NUMBER='[-+]?\\d*\\.?\\d+'; var PERCENTAGE=NUMBER+'%'; function call(){for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];} return'\\(\\s*('+args.join(')\\s*,\\s*(')+')\\s*\\)'; } var matchers={ rgb:new RegExp('rgb'+call(NUMBER,NUMBER,NUMBER)), rgba:new RegExp('rgba'+call(NUMBER,NUMBER,NUMBER,NUMBER)), hsl:new RegExp('hsl'+call(NUMBER,PERCENTAGE,PERCENTAGE)), hsla:new RegExp('hsla'+call(NUMBER,PERCENTAGE,PERCENTAGE,NUMBER)), hex3:/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, hex4:/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, hex6:/^#([0-9a-fA-F]{6})$/, hex8:/^#([0-9a-fA-F]{8})$/}; function parse255(str){ var int=parseInt(str,10); if(int<0){ return 0; } if(int>255){ return 255; } return int; } function parse360(str){ var int=parseFloat(str); return(int%360+360)%360/360; } function parse1(str){ var num=parseFloat(str); if(num<0){ return 0; } if(num>1){ return 255; } return Math.round(num*255); } function parsePercentage(str){ var int=parseFloat(str,10); if(int<0){ return 0; } if(int>100){ return 1; } return int/100; } var names={ transparent:0x00000000, aliceblue:0xf0f8ffff, antiquewhite:0xfaebd7ff, aqua:0x00ffffff, aquamarine:0x7fffd4ff, azure:0xf0ffffff, beige:0xf5f5dcff, bisque:0xffe4c4ff, black:0x000000ff, blanchedalmond:0xffebcdff, blue:0x0000ffff, blueviolet:0x8a2be2ff, brown:0xa52a2aff, burlywood:0xdeb887ff, burntsienna:0xea7e5dff, cadetblue:0x5f9ea0ff, chartreuse:0x7fff00ff, chocolate:0xd2691eff, coral:0xff7f50ff, cornflowerblue:0x6495edff, cornsilk:0xfff8dcff, crimson:0xdc143cff, cyan:0x00ffffff, darkblue:0x00008bff, darkcyan:0x008b8bff, darkgoldenrod:0xb8860bff, darkgray:0xa9a9a9ff, darkgreen:0x006400ff, darkgrey:0xa9a9a9ff, darkkhaki:0xbdb76bff, darkmagenta:0x8b008bff, darkolivegreen:0x556b2fff, darkorange:0xff8c00ff, darkorchid:0x9932ccff, darkred:0x8b0000ff, darksalmon:0xe9967aff, darkseagreen:0x8fbc8fff, darkslateblue:0x483d8bff, darkslategray:0x2f4f4fff, darkslategrey:0x2f4f4fff, darkturquoise:0x00ced1ff, darkviolet:0x9400d3ff, deeppink:0xff1493ff, deepskyblue:0x00bfffff, dimgray:0x696969ff, dimgrey:0x696969ff, dodgerblue:0x1e90ffff, firebrick:0xb22222ff, floralwhite:0xfffaf0ff, forestgreen:0x228b22ff, fuchsia:0xff00ffff, gainsboro:0xdcdcdcff, ghostwhite:0xf8f8ffff, gold:0xffd700ff, goldenrod:0xdaa520ff, gray:0x808080ff, green:0x008000ff, greenyellow:0xadff2fff, grey:0x808080ff, honeydew:0xf0fff0ff, hotpink:0xff69b4ff, indianred:0xcd5c5cff, indigo:0x4b0082ff, ivory:0xfffff0ff, khaki:0xf0e68cff, lavender:0xe6e6faff, lavenderblush:0xfff0f5ff, lawngreen:0x7cfc00ff, lemonchiffon:0xfffacdff, lightblue:0xadd8e6ff, lightcoral:0xf08080ff, lightcyan:0xe0ffffff, lightgoldenrodyellow:0xfafad2ff, lightgray:0xd3d3d3ff, lightgreen:0x90ee90ff, lightgrey:0xd3d3d3ff, lightpink:0xffb6c1ff, lightsalmon:0xffa07aff, lightseagreen:0x20b2aaff, lightskyblue:0x87cefaff, lightslategray:0x778899ff, lightslategrey:0x778899ff, lightsteelblue:0xb0c4deff, lightyellow:0xffffe0ff, lime:0x00ff00ff, limegreen:0x32cd32ff, linen:0xfaf0e6ff, magenta:0xff00ffff, maroon:0x800000ff, mediumaquamarine:0x66cdaaff, mediumblue:0x0000cdff, mediumorchid:0xba55d3ff, mediumpurple:0x9370dbff, mediumseagreen:0x3cb371ff, mediumslateblue:0x7b68eeff, mediumspringgreen:0x00fa9aff, mediumturquoise:0x48d1ccff, mediumvioletred:0xc71585ff, midnightblue:0x191970ff, mintcream:0xf5fffaff, mistyrose:0xffe4e1ff, moccasin:0xffe4b5ff, navajowhite:0xffdeadff, navy:0x000080ff, oldlace:0xfdf5e6ff, olive:0x808000ff, olivedrab:0x6b8e23ff, orange:0xffa500ff, orangered:0xff4500ff, orchid:0xda70d6ff, palegoldenrod:0xeee8aaff, palegreen:0x98fb98ff, paleturquoise:0xafeeeeff, palevioletred:0xdb7093ff, papayawhip:0xffefd5ff, peachpuff:0xffdab9ff, peru:0xcd853fff, pink:0xffc0cbff, plum:0xdda0ddff, powderblue:0xb0e0e6ff, purple:0x800080ff, rebeccapurple:0x663399ff, red:0xff0000ff, rosybrown:0xbc8f8fff, royalblue:0x4169e1ff, saddlebrown:0x8b4513ff, salmon:0xfa8072ff, sandybrown:0xf4a460ff, seagreen:0x2e8b57ff, seashell:0xfff5eeff, sienna:0xa0522dff, silver:0xc0c0c0ff, skyblue:0x87ceebff, slateblue:0x6a5acdff, slategray:0x708090ff, slategrey:0x708090ff, snow:0xfffafaff, springgreen:0x00ff7fff, steelblue:0x4682b4ff, tan:0xd2b48cff, teal:0x008080ff, thistle:0xd8bfd8ff, tomato:0xff6347ff, turquoise:0x40e0d0ff, violet:0xee82eeff, wheat:0xf5deb3ff, white:0xffffffff, whitesmoke:0xf5f5f5ff, yellow:0xffff00ff, yellowgreen:0x9acd32ff}; module.exports=normalizeColor; }, "normalizeColor"); __d(49 /* react/lib/NativeMethodsMixin.js */, function(global, require, module, exports) { 'use strict'; var _prodInvariant=require(17 /* ./reactProdInvariant */); var ReactNativeAttributePayload=require(50 /* ./ReactNativeAttributePayload */); var TextInputState=require(57 /* react-native/lib/TextInputState */); var UIManager=require(102 /* react-native/lib/UIManager */); var findNodeHandle=require(100 /* ./findNodeHandle */); var invariant=require(18 /* fbjs/lib/invariant */); function warnForStyleProps(props,validAttributes){ for(var key in validAttributes.style){ if(!(validAttributes[key]||props[key]===undefined)){ console.error('You are setting the style `{ '+key+': ... }` as a prop. You '+'should nest it in a style object. '+'E.g. `{ style: { '+key+': ... } }`'); } } } var NativeMethodsMixin={ measure:function measure(callback){ UIManager.measure(findNodeHandle(this),mountSafeCallback(this,callback)); }, measureInWindow:function measureInWindow(callback){ UIManager.measureInWindow(findNodeHandle(this),mountSafeCallback(this,callback)); }, measureLayout:function measureLayout(relativeToNativeNode,onSuccess,onFail) { UIManager.measureLayout(findNodeHandle(this),relativeToNativeNode,mountSafeCallback(this,onFail),mountSafeCallback(this,onSuccess)); }, setNativeProps:function setNativeProps(nativeProps){ if(process.env.NODE_ENV!=='production'){ warnForStyleProps(nativeProps,this.viewConfig.validAttributes); } var updatePayload=ReactNativeAttributePayload.create(nativeProps,this.viewConfig.validAttributes); UIManager.updateView(findNodeHandle(this),this.viewConfig.uiViewClassName,updatePayload); }, focus:function focus(){ TextInputState.focusTextInput(findNodeHandle(this)); }, blur:function blur(){ TextInputState.blurTextInput(findNodeHandle(this)); }}; function throwOnStylesProp(component,props){ if(props.styles!==undefined){ var owner=component._owner||null; var name=component.constructor.displayName; var msg='`styles` is not a supported property of `'+name+'`, did '+'you mean `style` (singular)?'; if(owner&&owner.constructor&&owner.constructor.displayName){ msg+='\n\nCheck the `'+owner.constructor.displayName+'` parent '+' component.'; } throw new Error(msg); } } if(process.env.NODE_ENV!=='production'){ var NativeMethodsMixin_DEV=NativeMethodsMixin; !(!NativeMethodsMixin_DEV.componentWillMount&&!NativeMethodsMixin_DEV.componentWillReceiveProps)?process.env.NODE_ENV!=='production'?invariant(false,'Do not override existing functions.'):_prodInvariant('16'):void 0; NativeMethodsMixin_DEV.componentWillMount=function(){ throwOnStylesProp(this,this.props); }; NativeMethodsMixin_DEV.componentWillReceiveProps=function(newProps){ throwOnStylesProp(this,newProps); }; } function mountSafeCallback(context,callback){ return function(){ if(!callback||context.isMounted&&!context.isMounted()){ return undefined; } return callback.apply(context,arguments); }; }; module.exports=NativeMethodsMixin; }, "react/lib/NativeMethodsMixin.js"); __d(50 /* react/lib/ReactNativeAttributePayload.js */, function(global, require, module, exports) { 'use strict'; var ReactNativePropRegistry=require(51 /* ./ReactNativePropRegistry */); var deepDiffer=require(52 /* react-native/lib/deepDiffer */); var flattenStyle=require(54 /* react-native/lib/flattenStyle */); var emptyObject={}; var removedKeys=null; var removedKeyCount=0; function defaultDiffer(prevProp,nextProp){ if(typeof nextProp!=='object'||nextProp===null){ return true; }else{ return deepDiffer(prevProp,nextProp); } } function resolveObject(idOrObject){ if(typeof idOrObject==='number'){ return ReactNativePropRegistry.getByID(idOrObject); } return idOrObject; } function restoreDeletedValuesInNestedArray(updatePayload,node,validAttributes){ if(Array.isArray(node)){ var i=node.length; while(i--&&removedKeyCount>0){ restoreDeletedValuesInNestedArray(updatePayload,node[i],validAttributes); } }else if(node&&removedKeyCount>0){ var obj=resolveObject(node); for(var propKey in removedKeys){ if(!removedKeys[propKey]){ continue; } var nextProp=obj[propKey]; if(nextProp===undefined){ continue; } var attributeConfig=validAttributes[propKey]; if(!attributeConfig){ continue; } if(typeof nextProp==='function'){ nextProp=true; } if(typeof nextProp==='undefined'){ nextProp=null; } if(typeof attributeConfig!=='object'){ updatePayload[propKey]=nextProp; }else if(typeof attributeConfig.diff==='function'||typeof attributeConfig.process==='function'){ var nextValue=typeof attributeConfig.process==='function'?attributeConfig.process(nextProp):nextProp; updatePayload[propKey]=nextValue; } removedKeys[propKey]=false; removedKeyCount--; } } } function diffNestedArrayProperty(updatePayload,prevArray,nextArray,validAttributes){ var minLength=prevArray.length0&&updatePayload){ restoreDeletedValuesInNestedArray(updatePayload,nextProp,attributeConfig); removedKeys=null; } } } for(propKey in prevProps){ if(nextProps[propKey]!==undefined){ continue; } attributeConfig=validAttributes[propKey]; if(!attributeConfig){ continue; } if(updatePayload&&updatePayload[propKey]!==undefined){ continue; } prevProp=prevProps[propKey]; if(prevProp===undefined){ continue; } if(typeof attributeConfig!=='object'||typeof attributeConfig.diff==='function'||typeof attributeConfig.process==='function'){ (updatePayload||(updatePayload={}))[propKey]=null; if(!removedKeys){ removedKeys={}; } if(!removedKeys[propKey]){ removedKeys[propKey]=true; removedKeyCount++; } }else{ updatePayload=clearNestedProperty(updatePayload,prevProp,attributeConfig); } } return updatePayload; } function addProperties(updatePayload,props,validAttributes){ return diffProperties(updatePayload,emptyObject,props,validAttributes); } function clearProperties(updatePayload,prevProps,validAttributes){ return diffProperties(updatePayload,prevProps,emptyObject,validAttributes); } var ReactNativeAttributePayload={ create:function create(props,validAttributes){ return addProperties(null, props,validAttributes); }, diff:function diff(prevProps,nextProps,validAttributes){ return diffProperties(null, prevProps,nextProps,validAttributes); }}; module.exports=ReactNativeAttributePayload; }, "react/lib/ReactNativeAttributePayload.js"); __d(51 /* react/lib/ReactNativePropRegistry.js */, function(global, require, module, exports) { 'use strict'; function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}} var objects={}; var uniqueID=1; var emptyObject={}; var ReactNativePropRegistry=function(){ function ReactNativePropRegistry(){ _classCallCheck(this,ReactNativePropRegistry); } ReactNativePropRegistry.register=function register(object){ var id=++uniqueID; if(process.env.NODE_ENV!=='production'){ Object.freeze(object); } objects[id]=object; return id; }; ReactNativePropRegistry.getByID=function getByID(id){ if(!id){ return emptyObject; } var object=objects[id]; if(!object){ console.warn('Invalid style with id `'+id+'`. Skipping ...'); return emptyObject; } return object; }; return ReactNativePropRegistry; }(); module.exports=ReactNativePropRegistry; }, "react/lib/ReactNativePropRegistry.js"); __d(52 /* react-native/lib/deepDiffer.js */, function(global, require, module, exports) { 'use strict'; module.exports=require(53 /* deepDiffer */); }, "react-native/lib/deepDiffer.js"); __d(53 /* deepDiffer */, function(global, require, module, exports) { 'use strict'; var deepDiffer=function deepDiffer(one,two){ if(one===two){ return false; } if(typeof one==='function'&&typeof two==='function'){ return false; } if(typeof one!=='object'||one===null){ return one!==two; } if(typeof two!=='object'||two===null){ return true; } if(one.constructor!==two.constructor){ return true; } if(Array.isArray(one)){ var len=one.length; if(two.length!==len){ return true; } for(var ii=0;ii1<<5&&( this._debugInfo[this._callbackID>>5]=null); this._debugInfo[this._callbackID>>1]=[module,method]; } onFail&¶ms.push(this._callbackID); this._callbacks[this._callbackID++]=onFail; onSucc&¶ms.push(this._callbackID); this._callbacks[this._callbackID++]=onSucc; } var preparedParams=this._serializeNativeParams?JSON.stringify(params):params; if(__DEV__){ global.nativeTraceBeginAsyncFlow&& global.nativeTraceBeginAsyncFlow(TRACE_TAG_REACT_APPS,'native',this._callID); } this._callID++; this._queue[MODULE_IDS].push(module); this._queue[METHOD_IDS].push(method); this._queue[PARAMS].push(preparedParams); var now=new Date().getTime(); if(global.nativeFlushQueueImmediate&& now-this._lastFlush>=MIN_TIME_BETWEEN_FLUSHES_MS){ global.nativeFlushQueueImmediate(this._queue); this._queue=[[],[],[],this._callID]; this._lastFlush=now; } Systrace.counterEvent('pending_js_to_native_queue',this._queue[0].length); if(__DEV__&&SPY_MODE&&isFinite(module)){ console.log('JS->N : '+this._remoteModuleTable[module]+'.'+ this._remoteMethodTable[module][method]+'('+JSON.stringify(params)+')'); } }},{key:'__callFunction',value:function __callFunction( module,method,args){ this._lastFlush=new Date().getTime(); this._eventLoopStartTime=this._lastFlush; Systrace.beginEvent(module+'.'+method+'()'); if(__DEV__&&SPY_MODE){ console.log('N->JS : '+module+'.'+method+'('+JSON.stringify(args)+')'); } var moduleMethods=this._callableModules[module]; invariant( !!moduleMethods, 'Module %s is not a registered callable module.', module); var result=moduleMethods[method].apply(moduleMethods,args); Systrace.endEvent(); return result; }},{key:'__invokeCallback',value:function __invokeCallback( cbID,args){ this._lastFlush=new Date().getTime(); this._eventLoopStartTime=this._lastFlush; var callback=this._callbacks[cbID]; if(__DEV__){ var debug=this._debugInfo[cbID>>1]; var _module=debug&&this._remoteModuleTable[debug[0]]; var method=debug&&this._remoteMethodTable[debug[0]][debug[1]]; if(!callback){ var errorMessage='Callback with id '+cbID+': '+_module+'.'+method+'() not found'; if(method){ errorMessage='The callback '+method+'() exists in module '+_module+', '+'but only one callback may be registered to a function in a native module.'; } invariant( callback, errorMessage); } var profileName=debug?'':cbID; if(callback&&SPY_MODE&&__DEV__){ console.log('N->JS : '+profileName+'('+JSON.stringify(args)+')'); } Systrace.beginEvent('MessageQueue.invokeCallback('+ profileName+', '+stringifySafe(args)+')'); }else{ if(!callback){ return; } } this._callbacks[cbID&~1]=null; this._callbacks[cbID|1]=null; callback.apply(null,args); if(__DEV__){ Systrace.endEvent(); } }},{key:'_genModulesConfig',value:function _genModulesConfig( modules){ if(Array.isArray(modules)){ return modules; }else{ var moduleArray=[]; var moduleNames=Object.keys(modules); for(var i=0,l=moduleNames.length;i0?args[args.length-1]:null; var secondLastArg=args.length>1?args[args.length-2]:null; var hasSuccCB=typeof lastArg==='function'; var hasErrorCB=typeof secondLastArg==='function'; hasErrorCB&&invariant( hasSuccCB, 'Cannot have a non-function arg after a function arg.'); var numCBs=hasSuccCB+hasErrorCB; var onSucc=hasSuccCB?lastArg:null; var onFail=hasErrorCB?secondLastArg:null; args=args.slice(0,args.length-numCBs); return self.__nativeCall(module,method,args,onFail,onSucc); }; } fn.type=type; return fn; }},{key:'registerCallableModule',value:function registerCallableModule( name,methods){ this._callableModules[name]=methods; }}]);return MessageQueue;}(); function moduleHasConstants(moduleArray){ return!Array.isArray(moduleArray[1]); } function arrayContains(array,value){ return array.indexOf(value)!==-1; } function createErrorFromErrorData(errorData){var message= errorData.message;var extraErrorInfo=babelHelpers.objectWithoutProperties(errorData,['message']); var error=new Error(message); error.framesToPop=1; return babelHelpers.extends(error,extraErrorInfo); } function lazyProperty(target,name,f){ Object.defineProperty(target,name,{ configurable:true, enumerable:true, get:function get(){ var value=f(); Object.defineProperty(target,name,{ configurable:true, enumerable:true, writeable:true, value:value}); return value; }}); } module.exports=MessageQueue; }, "MessageQueue"); __d(63 /* Systrace */, function(global, require, module, exports) { 'use strict'; var TRACE_TAG_REACT_APPS=1<<17; var TRACE_TAG_JSC_CALLS=1<<27; var _enabled=false; var _asyncCookie=0; var ReactSystraceDevtool=__DEV__?{ onBeginReconcilerTimer:function onBeginReconcilerTimer(debugID,timerType){ var displayName=require(38 /* react/lib/ReactComponentTreeDevtool */).getDisplayName(debugID); Systrace.beginEvent('ReactReconciler.'+timerType+'('+displayName+')'); }, onEndReconcilerTimer:function onEndReconcilerTimer(debugID,timerType){ Systrace.endEvent(); }, onBeginLifeCycleTimer:function onBeginLifeCycleTimer(debugID,timerType){ var displayName=require(38 /* react/lib/ReactComponentTreeDevtool */).getDisplayName(debugID); Systrace.beginEvent(displayName+'.'+timerType+'()'); }, onEndLifeCycleTimer:function onEndLifeCycleTimer(debugID,timerType){ Systrace.endEvent(); }}: null; var Systrace={ setEnabled:function setEnabled(enabled){ if(_enabled!==enabled){ if(__DEV__){ if(enabled){ global.nativeTraceBeginLegacy&&global.nativeTraceBeginLegacy(TRACE_TAG_JSC_CALLS); require(64 /* react/lib/ReactDebugTool */).addDevtool(ReactSystraceDevtool); }else{ global.nativeTraceEndLegacy&&global.nativeTraceEndLegacy(TRACE_TAG_JSC_CALLS); require(64 /* react/lib/ReactDebugTool */).removeDevtool(ReactSystraceDevtool); } } _enabled=enabled; } }, beginEvent:function beginEvent(profileName,args){ if(_enabled){ profileName=typeof profileName==='function'? profileName():profileName; global.nativeTraceBeginSection(TRACE_TAG_REACT_APPS,profileName,args); } }, endEvent:function endEvent(){ if(_enabled){ global.nativeTraceEndSection(TRACE_TAG_REACT_APPS); } }, beginAsyncEvent:function beginAsyncEvent(profileName){ var cookie=_asyncCookie; if(_enabled){ _asyncCookie++; profileName=typeof profileName==='function'? profileName():profileName; global.nativeTraceBeginAsyncSection(TRACE_TAG_REACT_APPS,profileName,cookie,0); } return cookie; }, endAsyncEvent:function endAsyncEvent(profileName,cookie){ if(_enabled){ profileName=typeof profileName==='function'? profileName():profileName; global.nativeTraceEndAsyncSection(TRACE_TAG_REACT_APPS,profileName,cookie,0); } }, counterEvent:function counterEvent(profileName,value){ if(_enabled){ profileName=typeof profileName==='function'? profileName():profileName; global.nativeTraceCounter&& global.nativeTraceCounter(TRACE_TAG_REACT_APPS,profileName,value); } }, attachToRelayProfiler:function attachToRelayProfiler(relayProfiler){ relayProfiler.attachProfileHandler('*',function(name){ var cookie=Systrace.beginAsyncEvent(name); return function(){ Systrace.endAsyncEvent(name,cookie); }; }); relayProfiler.attachAggregateHandler('*',function(name,callback){ Systrace.beginEvent(name); callback(); Systrace.endEvent(); }); }, swizzleJSON:function swizzleJSON(){ Systrace.measureMethods(JSON,'JSON',[ 'parse', 'stringify']); }, measureMethods:function measureMethods(object,objectName,methodNames){ if(!__DEV__){ return; } methodNames.forEach(function(methodName){ object[methodName]=Systrace.measure( objectName, methodName, object[methodName]); }); }, measure:function measure(objName,fnName,func){ if(!__DEV__){ return func; } var profileName=objName+'.'+fnName; return function(){ if(!_enabled){ return func.apply(this,arguments); } Systrace.beginEvent(profileName); var ret=func.apply(this,arguments); Systrace.endEvent(); return ret; }; }}; if(__DEV__){ require.Systrace=Systrace; } module.exports=Systrace; }, "Systrace"); __d(64 /* react/lib/ReactDebugTool.js */, function(global, require, module, exports) { 'use strict'; var ReactInvalidSetStateWarningDevTool=require(65 /* ./ReactInvalidSetStateWarningDevTool */); var ReactHostOperationHistoryDevtool=require(66 /* ./ReactHostOperationHistoryDevtool */); var ReactComponentTreeDevtool=require(38 /* ./ReactComponentTreeDevtool */); var ExecutionEnvironment=require(67 /* fbjs/lib/ExecutionEnvironment */); var performanceNow=require(68 /* fbjs/lib/performanceNow */); var warning=require(21 /* fbjs/lib/warning */); var eventHandlers=[]; var handlerDoesThrowForEvent={}; function emitEvent(handlerFunctionName,arg1,arg2,arg3,arg4,arg5){ eventHandlers.forEach(function(handler){ try{ if(handler[handlerFunctionName]){ handler[handlerFunctionName](arg1,arg2,arg3,arg4,arg5); } }catch(e){ process.env.NODE_ENV!=='production'?warning(handlerDoesThrowForEvent[handlerFunctionName],'exception thrown by devtool while handling %s: %s',handlerFunctionName,e+'\n'+e.stack):void 0; handlerDoesThrowForEvent[handlerFunctionName]=true; } }); } var _isProfiling=false; var flushHistory=[]; var lifeCycleTimerStack=[]; var currentFlushNesting=0; var currentFlushMeasurements=null; var currentFlushStartTime=null; var currentTimerDebugID=null; var currentTimerStartTime=null; var currentTimerNestedFlushDuration=null; var currentTimerType=null; function clearHistory(){ ReactComponentTreeDevtool.purgeUnmountedComponents(); ReactHostOperationHistoryDevtool.clearHistory(); } function getTreeSnapshot(registeredIDs){ return registeredIDs.reduce(function(tree,id){ var ownerID=ReactComponentTreeDevtool.getOwnerID(id); var parentID=ReactComponentTreeDevtool.getParentID(id); tree[id]={ displayName:ReactComponentTreeDevtool.getDisplayName(id), text:ReactComponentTreeDevtool.getText(id), updateCount:ReactComponentTreeDevtool.getUpdateCount(id), childIDs:ReactComponentTreeDevtool.getChildIDs(id), ownerID:ownerID||ReactComponentTreeDevtool.getOwnerID(parentID), parentID:parentID}; return tree; },{}); } function resetMeasurements(){ var previousStartTime=currentFlushStartTime; var previousMeasurements=currentFlushMeasurements||[]; var previousOperations=ReactHostOperationHistoryDevtool.getHistory(); if(currentFlushNesting===0){ currentFlushStartTime=null; currentFlushMeasurements=null; clearHistory(); return; } if(previousMeasurements.length||previousOperations.length){ var registeredIDs=ReactComponentTreeDevtool.getRegisteredIDs(); flushHistory.push({ duration:performanceNow()-previousStartTime, measurements:previousMeasurements||[], operations:previousOperations||[], treeSnapshot:getTreeSnapshot(registeredIDs)}); } clearHistory(); currentFlushStartTime=performanceNow(); currentFlushMeasurements=[]; } function checkDebugID(debugID){ process.env.NODE_ENV!=='production'?warning(debugID,'ReactDebugTool: debugID may not be empty.'):void 0; } function beginLifeCycleTimer(debugID,timerType){ if(currentFlushNesting===0){ return; } process.env.NODE_ENV!=='production'?warning(!currentTimerType,'There is an internal error in the React performance measurement code. '+'Did not expect %s timer to start while %s timer is still in '+'progress for %s instance.',timerType,currentTimerType||'no',debugID===currentTimerDebugID?'the same':'another'):void 0; currentTimerStartTime=performanceNow(); currentTimerNestedFlushDuration=0; currentTimerDebugID=debugID; currentTimerType=timerType; } function endLifeCycleTimer(debugID,timerType){ if(currentFlushNesting===0){ return; } process.env.NODE_ENV!=='production'?warning(currentTimerType===timerType,'There is an internal error in the React performance measurement code. '+'We did not expect %s timer to stop while %s timer is still in '+'progress for %s instance. Please report this as a bug in React.',timerType,currentTimerType||'no',debugID===currentTimerDebugID?'the same':'another'):void 0; if(_isProfiling){ currentFlushMeasurements.push({ timerType:timerType, instanceID:debugID, duration:performanceNow()-currentTimerStartTime-currentTimerNestedFlushDuration}); } currentTimerStartTime=null; currentTimerNestedFlushDuration=null; currentTimerDebugID=null; currentTimerType=null; } function pauseCurrentLifeCycleTimer(){ var currentTimer={ startTime:currentTimerStartTime, nestedFlushStartTime:performanceNow(), debugID:currentTimerDebugID, timerType:currentTimerType}; lifeCycleTimerStack.push(currentTimer); currentTimerStartTime=null; currentTimerNestedFlushDuration=null; currentTimerDebugID=null; currentTimerType=null; } function resumeCurrentLifeCycleTimer(){ var _lifeCycleTimerStack$=lifeCycleTimerStack.pop(); var startTime=_lifeCycleTimerStack$.startTime; var nestedFlushStartTime=_lifeCycleTimerStack$.nestedFlushStartTime; var debugID=_lifeCycleTimerStack$.debugID; var timerType=_lifeCycleTimerStack$.timerType; var nestedFlushDuration=performanceNow()-nestedFlushStartTime; currentTimerStartTime=startTime; currentTimerNestedFlushDuration+=nestedFlushDuration; currentTimerDebugID=debugID; currentTimerType=timerType; } var ReactDebugTool={ addDevtool:function addDevtool(devtool){ eventHandlers.push(devtool); }, removeDevtool:function removeDevtool(devtool){ for(var i=0;i1){ for(var ii=1;ii0){ var passIdleCallbacks=JSTimersExecution.requestIdleCallbacks.slice(); JSTimersExecution.requestIdleCallbacks=[]; for(var i=0;i0){ var passImmediates=JSTimersExecution.immediates.slice(); JSTimersExecution.immediates=[]; for(var i=0;i0; }, callImmediates:function callImmediates(){ JSTimersExecution.errors=null; while(JSTimersExecution.callImmediatesPass()){} if(JSTimersExecution.errors){ JSTimersExecution.errors.forEach(function(error){return( require(76 /* JSTimers */).setTimeout(function(){throw error;},0));}); } }, emitTimeDriftWarning:function emitTimeDriftWarning(warningMessage){ if(hasEmittedTimeDriftWarning){ return; } hasEmittedTimeDriftWarning=true; console.warn(warningMessage); }, _clearIndex:function _clearIndex(i){ JSTimersExecution.timerIDs[i]=null; JSTimersExecution.callbacks[i]=null; JSTimersExecution.types[i]=null; }}; module.exports=JSTimersExecution; }, "JSTimersExecution"); __d(72 /* fbjs/lib/keyMirror.js */, function(global, require, module, exports) { 'use strict'; var invariant=require(56 /* ./invariant */); var keyMirror=function keyMirror(obj){ var ret={}; var key; !(obj instanceof Object&&!Array.isArray(obj))?process.env.NODE_ENV!=='production'?invariant(false,'keyMirror(...): Argument must be an object.'):invariant(false):void 0; for(key in obj){ if(!obj.hasOwnProperty(key)){ continue; } ret[key]=key; } return ret; }; module.exports=keyMirror; }, "fbjs/lib/keyMirror.js"); __d(73 /* fbjs/lib/performanceNow.js */, function(global, require, module, exports) {'use strict'; var performance=require(74 /* ./performance */); var performanceNow; if(performance.now){ performanceNow=function performanceNow(){ return performance.now(); }; }else{ performanceNow=function performanceNow(){ return Date.now(); }; } module.exports=performanceNow; }, "fbjs/lib/performanceNow.js"); __d(74 /* fbjs/lib/performance.js */, function(global, require, module, exports) { 'use strict'; var ExecutionEnvironment=require(75 /* ./ExecutionEnvironment */); var performance; if(ExecutionEnvironment.canUseDOM){ performance=window.performance||window.msPerformance||window.webkitPerformance; } module.exports=performance||{}; }, "fbjs/lib/performance.js"); __d(75 /* fbjs/lib/ExecutionEnvironment.js */, function(global, require, module, exports) { 'use strict'; var canUseDOM=!!(typeof window!=='undefined'&&window.document&&window.document.createElement); var ExecutionEnvironment={ canUseDOM:canUseDOM, canUseWorkers:typeof Worker!=='undefined', canUseEventListeners:canUseDOM&&!!(window.addEventListener||window.attachEvent), canUseViewport:canUseDOM&&!!window.screen, isInWorker:!canUseDOM}; module.exports=ExecutionEnvironment; }, "fbjs/lib/ExecutionEnvironment.js"); __d(76 /* JSTimers */, function(global, require, module, exports) { 'use strict'; var RCTTiming=require(60 /* NativeModules */).Timing; var JSTimersExecution=require(71 /* JSTimersExecution */); var JSTimers={ Types:JSTimersExecution.Types, _getFreeIndex:function _getFreeIndex(){ var freeIndex=JSTimersExecution.timerIDs.indexOf(null); if(freeIndex===-1){ freeIndex=JSTimersExecution.timerIDs.length; } return freeIndex; }, setTimeout:function setTimeout(func,duration){for(var _len=arguments.length,args=Array(_len>2?_len-2:0),_key=2;_key<_len;_key++){args[_key-2]=arguments[_key];} var newID=JSTimersExecution.GUID++; var freeIndex=JSTimers._getFreeIndex(); JSTimersExecution.timerIDs[freeIndex]=newID; JSTimersExecution.callbacks[freeIndex]=function(){ return func.apply(undefined,args); }; JSTimersExecution.types[freeIndex]=JSTimersExecution.Type.setTimeout; RCTTiming.createTimer(newID,duration||0,Date.now(),false); return newID; }, setInterval:function setInterval(func,duration){for(var _len2=arguments.length,args=Array(_len2>2?_len2-2:0),_key2=2;_key2<_len2;_key2++){args[_key2-2]=arguments[_key2];} var newID=JSTimersExecution.GUID++; var freeIndex=JSTimers._getFreeIndex(); JSTimersExecution.timerIDs[freeIndex]=newID; JSTimersExecution.callbacks[freeIndex]=function(){ return func.apply(undefined,args); }; JSTimersExecution.types[freeIndex]=JSTimersExecution.Type.setInterval; RCTTiming.createTimer(newID,duration||0,Date.now(),true); return newID; }, setImmediate:function setImmediate(func){for(var _len3=arguments.length,args=Array(_len3>1?_len3-1:0),_key3=1;_key3<_len3;_key3++){args[_key3-1]=arguments[_key3];} var newID=JSTimersExecution.GUID++; var freeIndex=JSTimers._getFreeIndex(); JSTimersExecution.timerIDs[freeIndex]=newID; JSTimersExecution.callbacks[freeIndex]=function(){ return func.apply(undefined,args); }; JSTimersExecution.types[freeIndex]=JSTimersExecution.Type.setImmediate; JSTimersExecution.immediates.push(newID); return newID; }, requestAnimationFrame:function requestAnimationFrame(func){ var newID=JSTimersExecution.GUID++; var freeIndex=JSTimers._getFreeIndex(); JSTimersExecution.timerIDs[freeIndex]=newID; JSTimersExecution.callbacks[freeIndex]=func; JSTimersExecution.types[freeIndex]=JSTimersExecution.Type.requestAnimationFrame; RCTTiming.createTimer(newID,1,Date.now(),false); return newID; }, requestIdleCallback:function requestIdleCallback(func){ if(JSTimersExecution.requestIdleCallbacks.length===0){ RCTTiming.setSendIdleEvents(true); } var newID=JSTimersExecution.GUID++; var freeIndex=JSTimers._getFreeIndex(); JSTimersExecution.timerIDs[freeIndex]=newID; JSTimersExecution.callbacks[freeIndex]=func; JSTimersExecution.types[freeIndex]=JSTimersExecution.Type.requestIdleCallback; JSTimersExecution.requestIdleCallbacks.push(newID); return newID; }, cancelIdleCallback:function cancelIdleCallback(timerID){ JSTimers._clearTimerID(timerID); var index=JSTimersExecution.requestIdleCallbacks.indexOf(timerID); if(index!==-1){ JSTimersExecution.requestIdleCallbacks.splice(index,1); } if(JSTimersExecution.requestIdleCallbacks.length===0){ RCTTiming.setSendIdleEvents(false); } }, clearTimeout:function clearTimeout(timerID){ JSTimers._clearTimerID(timerID); }, clearInterval:function clearInterval(timerID){ JSTimers._clearTimerID(timerID); }, clearImmediate:function clearImmediate(timerID){ JSTimers._clearTimerID(timerID); var index=JSTimersExecution.immediates.indexOf(timerID); if(index!==-1){ JSTimersExecution.immediates.splice(index,1); } }, cancelAnimationFrame:function cancelAnimationFrame(timerID){ JSTimers._clearTimerID(timerID); }, _clearTimerID:function _clearTimerID(timerID){ if(timerID==null){ return; } var index=JSTimersExecution.timerIDs.indexOf(timerID); if(index!==-1){ JSTimersExecution._clearIndex(index); var type=JSTimersExecution.types[index]; if(type!==JSTimersExecution.Type.setImmediate&& type!==JSTimersExecution.Type.requestIdleCallback){ RCTTiming.deleteTimer(timerID); } } }}; module.exports=JSTimers; }, "JSTimers"); __d(77 /* stringifySafe */, function(global, require, module, exports) { 'use strict'; function stringifySafe(arg){ var ret; var type=typeof arg; if(arg===undefined){ ret='undefined'; }else if(arg===null){ ret='null'; }else if(type==='string'){ ret='"'+arg+'"'; }else if(type==='function'){ try{ ret=arg.toString(); }catch(e){ ret='[function unknown]'; } }else{ try{ ret=JSON.stringify(arg); }catch(e){ if(typeof arg.toString==='function'){ try{ ret=arg.toString(); }catch(E){} } } } return ret||'["'+type+'" failed to stringify]'; } module.exports=stringifySafe; }, "stringifySafe"); __d(78 /* HeapCapture */, function(global, require, module, exports) { 'use strict'; var HeapCapture={ captureHeap:function captureHeap(token,path){ var error=null; try{ global.nativeCaptureHeap(path); console.log('HeapCapture.captureHeap succeeded: '+path); }catch(e){ console.log('HeapCapture.captureHeap error: '+e.toString()); error=e.toString(); } require(60 /* NativeModules */).JSCHeapCapture.operationComplete(token,error); }}; module.exports=HeapCapture; }, "HeapCapture"); __d(79 /* HMRClient */, function(global, require, module, exports) { 'use strict'; var Platform=require(59 /* Platform */); var invariant=require(56 /* fbjs/lib/invariant */); var HMRClient={ enable:function enable(platform,bundleEntry,host,port){ invariant(platform,'Missing required parameter `platform`'); invariant(bundleEntry,'Missing required paramenter `bundleEntry`'); invariant(host,'Missing required paramenter `host`'); var WebSocket=require(80 /* WebSocket */); var wsHostPort=port!==null&&port!==''? host+':'+port: host; var wsUrl='ws://'+wsHostPort+'/hot?'+('platform='+ platform+'&')+('bundleEntry='+ bundleEntry.replace('.bundle','.js')); var activeWS=new WebSocket(wsUrl); activeWS.onerror=function(e){ var error='Hot loading isn\'t working because it cannot connect to the development server.\n\nTry the following to fix the issue:\n- Ensure that the packager server is running and available on the same network'; if(Platform.OS==='ios'){ error+='\n- Ensure that the Packager server URL is correctly set in AppDelegate'; }else{ error+='\n- Ensure that your device/emulator is connected to your machine and has USB debugging enabled - run \'adb devices\' to see a list of connected devices\n- If you\'re on a physical device connected to the same machine, run \'adb reverse tcp:8081 tcp:8081\' to forward requests from your device\n- If your device is on the same Wi-Fi network, set \'Debug server host & port for device\' in \'Dev settings\' to your machine\'s IP address and the port of the local dev server - e.g. 10.0.1.1:8081'; } error+='\n\nURL: '+ host+':'+port+'\n\nError: '+ e.message; throw new Error(error); }; activeWS.onmessage=function(_ref){var data=_ref.data; var HMRLoadingView=require(97 /* HMRLoadingView */); data=JSON.parse(data); switch(data.type){ case'update-start':{ HMRLoadingView.showMessage('Hot Loading...'); break; } case'update':{var _ret=function(){var _data$body= data.body;var modules=_data$body.modules;var sourceMappingURLs=_data$body.sourceMappingURLs;var sourceURLs=_data$body.sourceURLs;var inverseDependencies=_data$body.inverseDependencies; if(Platform.OS==='ios'){ var RCTRedBox=require(60 /* NativeModules */).RedBox; RCTRedBox&&RCTRedBox.dismiss&&RCTRedBox.dismiss(); }else{ var RCTExceptionsManager=require(60 /* NativeModules */).ExceptionsManager; RCTExceptionsManager&&RCTExceptionsManager.dismissRedbox&&RCTExceptionsManager.dismissRedbox(); } modules.forEach(function(_ref2,i){var id=_ref2.id;var code=_ref2.code; code=code+'\n\n'+sourceMappingURLs[i]; var injectFunction=typeof global.nativeInjectHMRUpdate==='function'? global.nativeInjectHMRUpdate: eval; code=['__accept(', id+',','function(global,require,module,exports){',''+ code, '\n},',''+ JSON.stringify(inverseDependencies),');']. join(''); injectFunction(code,sourceURLs[i]); }); HMRLoadingView.hide(); return'break';}();if(_ret==='break')break; } case'update-done':{ HMRLoadingView.hide(); break; } case'error':{ HMRLoadingView.hide(); throw new Error(data.body.type+' '+data.body.description); } default:{ throw new Error('Unexpected message: '+data); }} }; }}; module.exports=HMRClient; }, "HMRClient"); __d(80 /* WebSocket */, function(global, require, module, exports) { 'use strict'; var NativeEventEmitter=require(81 /* NativeEventEmitter */); var Platform=require(59 /* Platform */); var RCTWebSocketModule=require(60 /* NativeModules */).WebSocketModule; var WebSocketEvent=require(91 /* WebSocketEvent */); var EventTarget=require(92 /* event-target-shim */); var base64=require(96 /* base64-js */); var CONNECTING=0; var OPEN=1; var CLOSING=2; var CLOSED=3; var CLOSE_NORMAL=1000; var WEBSOCKET_EVENTS=[ 'close', 'error', 'message', 'open']; var nextWebSocketId=0;var WebSocket=function(_EventTarget){babelHelpers.inherits(WebSocket,_EventTarget); function WebSocket(url,protocols,options){babelHelpers.classCallCheck(this,WebSocket);var _this=babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(WebSocket).call(this));_this.CONNECTING=CONNECTING;_this.OPEN=OPEN;_this.CLOSING=CLOSING;_this.CLOSED=CLOSED;_this.readyState=CONNECTING; if(typeof protocols==='string'){ protocols=[protocols]; } if(!Array.isArray(protocols)){ protocols=null; } _this._eventEmitter=new NativeEventEmitter(RCTWebSocketModule); _this._socketId=nextWebSocketId++; RCTWebSocketModule.connect(url,protocols,options,_this._socketId); _this._registerEvents();return _this; }babelHelpers.createClass(WebSocket,[{key:'close',value:function close( code,reason){ if(this.readyState===this.CLOSING|| this.readyState===this.CLOSED){ return; } this.readyState=this.CLOSING; this._close(code,reason); }},{key:'send',value:function send( data){ if(this.readyState===this.CONNECTING){ throw new Error('INVALID_STATE_ERR'); } if(typeof data==='string'){ RCTWebSocketModule.send(data,this._socketId); return; } if(typeof ArrayBuffer!=='undefined'&& typeof Uint8Array!=='undefined'){ if(ArrayBuffer.isView(data)){ data=data.buffer; } if(data instanceof ArrayBuffer){ data=base64.fromByteArray(new Uint8Array(data)); RCTWebSocketModule.sendBinary(data,this._socketId); return; } } throw new Error('Unsupported data type'); }},{key:'ping',value:function ping() { if(this.readyState===this.CONNECTING){ throw new Error('INVALID_STATE_ERR'); } RCTWebSocketModule.ping(this._socketId); }},{key:'_close',value:function _close( code,reason){ if(Platform.OS==='android'){ var statusCode=typeof code==='number'?code:CLOSE_NORMAL; var closeReason=typeof reason==='string'?reason:''; RCTWebSocketModule.close(statusCode,closeReason,this._socketId); }else{ RCTWebSocketModule.close(this._socketId); } }},{key:'_unregisterEvents',value:function _unregisterEvents() { this._subscriptions.forEach(function(e){return e.remove();}); this._subscriptions=[]; }},{key:'_registerEvents',value:function _registerEvents() {var _this2=this; this._subscriptions=[ this._eventEmitter.addListener('websocketMessage',function(ev){ if(ev.id!==_this2._socketId){ return; } _this2.dispatchEvent(new WebSocketEvent('message',{ data:ev.type==='binary'?base64.toByteArray(ev.data).buffer:ev.data})); }), this._eventEmitter.addListener('websocketOpen',function(ev){ if(ev.id!==_this2._socketId){ return; } _this2.readyState=_this2.OPEN; _this2.dispatchEvent(new WebSocketEvent('open')); }), this._eventEmitter.addListener('websocketClosed',function(ev){ if(ev.id!==_this2._socketId){ return; } _this2.readyState=_this2.CLOSED; _this2.dispatchEvent(new WebSocketEvent('close',{ code:ev.code, reason:ev.reason})); _this2._unregisterEvents(); _this2.close(); }), this._eventEmitter.addListener('websocketFailed',function(ev){ if(ev.id!==_this2._socketId){ return; } _this2.dispatchEvent(new WebSocketEvent('error',{ message:ev.message})); _this2.dispatchEvent(new WebSocketEvent('close',{ message:ev.message})); _this2._unregisterEvents(); _this2.close(); })]; }}]);return WebSocket;}(EventTarget.apply(undefined,WEBSOCKET_EVENTS));WebSocket.CONNECTING=CONNECTING;WebSocket.OPEN=OPEN;WebSocket.CLOSING=CLOSING;WebSocket.CLOSED=CLOSED; module.exports=WebSocket; }, "WebSocket"); __d(81 /* NativeEventEmitter */, function(global, require, module, exports) { 'use strict'; var EventEmitter=require(82 /* EventEmitter */); var Platform=require(59 /* Platform */); var RCTDeviceEventEmitter=require(86 /* RCTDeviceEventEmitter */); var invariant=require(56 /* fbjs/lib/invariant */);var NativeEventEmitter=function(_EventEmitter){babelHelpers.inherits(NativeEventEmitter,_EventEmitter); function NativeEventEmitter(nativeModule){babelHelpers.classCallCheck(this,NativeEventEmitter);var _this=babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(NativeEventEmitter).call(this, RCTDeviceEventEmitter.sharedSubscriber)); if(Platform.OS==='ios'){ invariant(nativeModule,'Native module cannot be null.'); _this._nativeModule=nativeModule; }return _this; }babelHelpers.createClass(NativeEventEmitter,[{key:'addListener',value:function addListener( eventType,listener,context){ if(Platform.OS==='ios'){ this._nativeModule.addListener(eventType); } return babelHelpers.get(Object.getPrototypeOf(NativeEventEmitter.prototype),'addListener',this).call(this,eventType,listener,context); }},{key:'removeAllListeners',value:function removeAllListeners( eventType){ invariant(eventType,'eventType argument is required.'); if(Platform.OS==='ios'){ var count=this.listeners(eventType).length; this._nativeModule.removeListeners(count); } babelHelpers.get(Object.getPrototypeOf(NativeEventEmitter.prototype),'removeAllListeners',this).call(this,eventType); }},{key:'removeSubscription',value:function removeSubscription( subscription){ if(Platform.OS==='ios'){ this._nativeModule.removeListeners(1); } babelHelpers.get(Object.getPrototypeOf(NativeEventEmitter.prototype),'removeSubscription',this).call(this,subscription); }}]);return NativeEventEmitter;}(EventEmitter); module.exports=NativeEventEmitter; }, "NativeEventEmitter"); __d(82 /* EventEmitter */, function(global, require, module, exports) { var EmitterSubscription=require(83 /* EmitterSubscription */); var EventSubscriptionVendor=require(85 /* EventSubscriptionVendor */); var emptyFunction=require(45 /* fbjs/lib/emptyFunction */); var invariant=require(56 /* fbjs/lib/invariant */);var EventEmitter=function(){ function EventEmitter(subscriber){babelHelpers.classCallCheck(this,EventEmitter); this._subscriber=subscriber||new EventSubscriptionVendor(); }babelHelpers.createClass(EventEmitter,[{key:'addListener',value:function addListener( eventType,listener,context){ return this._subscriber.addSubscription( eventType, new EmitterSubscription(this,this._subscriber,listener,context)); }},{key:'once',value:function once( eventType,listener,context){var _this=this; return this.addListener(eventType,function(){for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];} _this.removeCurrentListener(); listener.apply(context,args); }); }},{key:'removeAllListeners',value:function removeAllListeners( eventType){ this._subscriber.removeAllSubscriptions(eventType); }},{key:'removeCurrentListener',value:function removeCurrentListener() { invariant( !!this._currentSubscription, 'Not in an emitting cycle; there is no current subscription'); this.removeSubscription(this._currentSubscription); }},{key:'removeSubscription',value:function removeSubscription( subscription){ invariant( subscription.emitter===this, 'Subscription does not belong to this emitter.'); this._subscriber.removeSubscription(subscription); }},{key:'listeners',value:function listeners( eventType){ var subscriptions=this._subscriber.getSubscriptionsForType(eventType); return subscriptions? subscriptions.filter(emptyFunction.thatReturnsTrue).map( function(subscription){ return subscription.listener; }): []; }},{key:'emit',value:function emit( eventType){ var subscriptions=this._subscriber.getSubscriptionsForType(eventType); if(subscriptions){ for(var i=0,l=subscriptions.length;i0){ var types=Array(arguments.length); for(var i=0;i0){ throw new Error('Invalid string. Length must be a multiple of 4'); } var len=b64.length; placeHolders='='===b64.charAt(len-2)?2:'='===b64.charAt(len-1)?1:0; arr=new Arr(b64.length*3/4-placeHolders); l=placeHolders>0?b64.length-4:b64.length; var L=0; function push(v){ arr[L++]=v; } for(i=0,j=0;i>16); push((tmp&0xFF00)>>8); push(tmp&0xFF); } if(placeHolders===2){ tmp=decode(b64.charAt(i))<<2|decode(b64.charAt(i+1))>>4; push(tmp&0xFF); }else if(placeHolders===1){ tmp=decode(b64.charAt(i))<<10|decode(b64.charAt(i+1))<<4|decode(b64.charAt(i+2))>>2; push(tmp>>8&0xFF); push(tmp&0xFF); } return arr; } function uint8ToBase64(uint8){ var i, extraBytes=uint8.length%3, output="", temp,length; function encode(num){ return lookup.charAt(num); } function tripletToBase64(num){ return encode(num>>18&0x3F)+encode(num>>12&0x3F)+encode(num>>6&0x3F)+encode(num&0x3F); } for(i=0,length=uint8.length-extraBytes;i>2); output+=encode(temp<<4&0x3F); output+='=='; break; case 2: temp=(uint8[uint8.length-2]<<8)+uint8[uint8.length-1]; output+=encode(temp>>10); output+=encode(temp>>4&0x3F); output+=encode(temp<<2&0x3F); output+='='; break;} return output; } exports.toByteArray=b64ToByteArray; exports.fromByteArray=uint8ToBase64; })(typeof exports==='undefined'?this.base64js={}:exports); }, "base64-js/lib/b64.js"); __d(97 /* HMRLoadingView */, function(global, require, module, exports) { 'use strict'; var ToastAndroid=require(98 /* ToastAndroid */); var TOAST_SHORT_DELAY=2000;var HMRLoadingView=function(){function HMRLoadingView(){babelHelpers.classCallCheck(this,HMRLoadingView);}babelHelpers.createClass(HMRLoadingView,null,[{key:'showMessage',value:function showMessage( message){ if(HMRLoadingView._showing){ return; } ToastAndroid.show(message,ToastAndroid.SHORT); HMRLoadingView._showing=true; setTimeout(function(){ HMRLoadingView._showing=false; },TOAST_SHORT_DELAY); }},{key:'hide',value:function hide() { }}]);return HMRLoadingView;}(); module.exports=HMRLoadingView; }, "HMRLoadingView"); __d(98 /* ToastAndroid */, function(global, require, module, exports) { 'use strict'; var RCTToastAndroid=require(60 /* NativeModules */).ToastAndroid; var ToastAndroid={ SHORT:RCTToastAndroid.SHORT, LONG:RCTToastAndroid.LONG, TOP:RCTToastAndroid.TOP, BOTTOM:RCTToastAndroid.BOTTOM, CENTER:RCTToastAndroid.CENTER, show:function show( message, duration) { RCTToastAndroid.show(message,duration); }, showWithGravity:function showWithGravity( message, duration, gravity) { RCTToastAndroid.showWithGravity(message,duration,gravity); }}; module.exports=ToastAndroid; }, "ToastAndroid"); __d(99 /* UIManager */, function(global, require, module, exports) { 'use strict'; var Platform=require(59 /* Platform */); var NativeModules=require(60 /* NativeModules */);var UIManager=NativeModules.UIManager; var findNodeHandle=require(100 /* react/lib/findNodeHandle */); var _takeSnapshot=UIManager.takeSnapshot; UIManager.takeSnapshot=function _callee( view, options){return regeneratorRuntime.async(function _callee$(_context){while(1){switch(_context.prev=_context.next){case 0:if( _takeSnapshot){_context.next=3;break;} console.warn('UIManager.takeSnapshot is not available on this platform');return _context.abrupt('return');case 3: if(typeof view!=='number'&&view!=='window'){ view=findNodeHandle(view)||'window'; }return _context.abrupt('return', _takeSnapshot(view,options));case 5:case'end':return _context.stop();}}},null,this);}; if(Platform.OS==='ios'){(function(){ function normalizePrefix(moduleName){ return moduleName.replace(/^(RCT|RK)/,''); } Object.keys(UIManager).forEach(function(viewName){ var viewConfig=UIManager[viewName]; if(viewConfig.Manager){(function(){ var constants=void 0; Object.defineProperty(viewConfig,'Constants',{ configurable:true, enumerable:true, get:function get(){ if(constants){ return constants; } constants={}; var viewManager=NativeModules[normalizePrefix(viewConfig.Manager)]; viewManager&&Object.keys(viewManager).forEach(function(key){ var value=viewManager[key]; if(typeof value!=='function'){ constants[key]=value; } }); return constants; }}); var commands=void 0; Object.defineProperty(viewConfig,'Commands',{ configurable:true, enumerable:true, get:function get(){ if(commands){ return commands; } commands={}; var viewManager=NativeModules[normalizePrefix(viewConfig.Manager)]; var index=0; viewManager&&Object.keys(viewManager).forEach(function(key){ var value=viewManager[key]; if(typeof value==='function'){ commands[key]=index++; } }); return commands; }});})(); } });})(); } module.exports=UIManager; }, "UIManager"); __d(100 /* react/lib/findNodeHandle.js */, function(global, require, module, exports) { 'use strict'; var _prodInvariant=require(17 /* ./reactProdInvariant */); var ReactCurrentOwner=require(20 /* ./ReactCurrentOwner */); var ReactInstanceMap=require(101 /* ./ReactInstanceMap */); var invariant=require(18 /* fbjs/lib/invariant */); var warning=require(21 /* fbjs/lib/warning */); function findNodeHandle(componentOrHandle){ if(process.env.NODE_ENV!=='production'){ var owner=ReactCurrentOwner.current; if(owner!==null){ process.env.NODE_ENV!=='production'?warning(owner._warnedAboutRefsInRender,'%s is accessing findNodeHandle inside its render(). '+'render() should be a pure function of props and state. It should '+'never access something that requires stale data from the previous '+'render, such as refs. Move this logic to componentDidMount and '+'componentDidUpdate instead.',owner.getName()||'A component'):void 0; owner._warnedAboutRefsInRender=true; } } if(componentOrHandle==null){ return null; } if(typeof componentOrHandle==='number'){ return componentOrHandle; } var component=componentOrHandle; var internalInstance=ReactInstanceMap.get(component); if(internalInstance){ return internalInstance.getHostNode(); }else{ var rootNodeID=component._rootNodeID; if(rootNodeID){ return rootNodeID; }else{ !( typeof component==='object'&&'_rootNodeID'in component|| component.render!=null&&typeof component.render==='function')?process.env.NODE_ENV!=='production'?invariant(false,'findNodeHandle(...): Argument is not a component (type: %s, keys: %s)',typeof component,Object.keys(component)):_prodInvariant('21',typeof component,Object.keys(component)):void 0; !false?process.env.NODE_ENV!=='production'?invariant(false,'findNodeHandle(...): Unable to find node handle for unmounted component.'):_prodInvariant('22'):void 0; } } } module.exports=findNodeHandle; }, "react/lib/findNodeHandle.js"); __d(101 /* react/lib/ReactInstanceMap.js */, function(global, require, module, exports) { 'use strict'; var ReactInstanceMap={ remove:function remove(key){ key._reactInternalInstance=undefined; }, get:function get(key){ return key._reactInternalInstance; }, has:function has(key){ return key._reactInternalInstance!==undefined; }, set:function set(key,value){ key._reactInternalInstance=value; }}; module.exports=ReactInstanceMap; }, "react/lib/ReactInstanceMap.js"); __d(102 /* react-native/lib/UIManager.js */, function(global, require, module, exports) { 'use strict'; module.exports=require(99 /* UIManager */); }, "react-native/lib/UIManager.js"); __d(103 /* React */, function(global, require, module, exports) { 'use strict'; module.exports=require(13 /* react/lib/React */); }, "React"); __d(104 /* StyleSheet */, function(global, require, module, exports) { 'use strict'; var PixelRatio=require(105 /* PixelRatio */); var ReactNativePropRegistry=require(51 /* react/lib/ReactNativePropRegistry */); var StyleSheetValidation=require(107 /* StyleSheetValidation */); var flatten=require(55 /* flattenStyle */); var hairlineWidth=PixelRatio.roundToNearestPixel(0.4); if(hairlineWidth===0){ hairlineWidth=1/PixelRatio.get(); } var absoluteFillObject={ position:'absolute', left:0, right:0, top:0, bottom:0}; var absoluteFill=ReactNativePropRegistry.register(absoluteFillObject); module.exports={ hairlineWidth:hairlineWidth, absoluteFill:absoluteFill, absoluteFillObject:absoluteFillObject, flatten:flatten, create:function create(obj){ var result={}; for(var key in obj){ StyleSheetValidation.validateStyle(key,obj); result[key]=ReactNativePropRegistry.register(obj[key]); } return result; }}; }, "StyleSheet"); __d(105 /* PixelRatio */, function(global, require, module, exports) { 'use strict'; var Dimensions=require(106 /* Dimensions */);var PixelRatio=function(){function PixelRatio(){babelHelpers.classCallCheck(this,PixelRatio);}babelHelpers.createClass(PixelRatio,null,[{key:'get',value:function get() { return Dimensions.get('window').scale; }},{key:'getFontScale',value:function getFontScale() { return Dimensions.get('window').fontScale||PixelRatio.get(); }},{key:'getPixelSizeForLayoutSize',value:function getPixelSizeForLayoutSize( layoutSize){ return Math.round(layoutSize*PixelRatio.get()); }},{key:'roundToNearestPixel',value:function roundToNearestPixel( layoutSize){ var ratio=PixelRatio.get(); return Math.round(layoutSize*ratio)/ratio; }},{key:'startDetecting',value:function startDetecting() {}}]);return PixelRatio;}(); module.exports=PixelRatio; }, "PixelRatio"); __d(106 /* Dimensions */, function(global, require, module, exports) { 'use strict'; var Platform=require(59 /* Platform */); var UIManager=require(99 /* UIManager */); var RCTDeviceEventEmitter=require(86 /* RCTDeviceEventEmitter */); var invariant=require(56 /* fbjs/lib/invariant */); var dimensions={};var Dimensions=function(){function Dimensions(){babelHelpers.classCallCheck(this,Dimensions);}babelHelpers.createClass(Dimensions,null,[{key:'set',value:function set( dims){ if(dims&&dims.windowPhysicalPixels){ dims=JSON.parse(JSON.stringify(dims)); var windowPhysicalPixels=dims.windowPhysicalPixels; dims.window={ width:windowPhysicalPixels.width/windowPhysicalPixels.scale, height:windowPhysicalPixels.height/windowPhysicalPixels.scale, scale:windowPhysicalPixels.scale, fontScale:windowPhysicalPixels.fontScale}; if(Platform.OS==='android'){ var screenPhysicalPixels=dims.screenPhysicalPixels; dims.screen={ width:screenPhysicalPixels.width/screenPhysicalPixels.scale, height:screenPhysicalPixels.height/screenPhysicalPixels.scale, scale:screenPhysicalPixels.scale, fontScale:screenPhysicalPixels.fontScale}; delete dims.screenPhysicalPixels; }else{ dims.screen=dims.window; } delete dims.windowPhysicalPixels; } babelHelpers.extends(dimensions,dims); }},{key:'get',value:function get( dim){ invariant(dimensions[dim],'No dimension set for key '+dim); return dimensions[dim]; }}]);return Dimensions;}(); Dimensions.set(UIManager.Dimensions); RCTDeviceEventEmitter.addListener('didUpdateDimensions',function(update){ Dimensions.set(update); }); module.exports=Dimensions; }, "Dimensions"); __d(107 /* StyleSheetValidation */, function(global, require, module, exports) { 'use strict'; var ImageStylePropTypes=require(108 /* ImageStylePropTypes */); var ReactPropTypeLocations=require(31 /* react/lib/ReactPropTypeLocations */); var TextStylePropTypes=require(114 /* TextStylePropTypes */); var ViewStylePropTypes=require(115 /* ViewStylePropTypes */); var invariant=require(56 /* fbjs/lib/invariant */);var StyleSheetValidation=function(){function StyleSheetValidation(){babelHelpers.classCallCheck(this,StyleSheetValidation);}babelHelpers.createClass(StyleSheetValidation,null,[{key:'validateStyleProp',value:function validateStyleProp( prop,style,caller){ if(!__DEV__){ return; } if(allStylePropTypes[prop]===undefined){ var message1='"'+prop+'" is not a valid style property.'; var message2='\nValid style props: '+ JSON.stringify(Object.keys(allStylePropTypes).sort(),null,' '); styleError(message1,style,caller,message2); } var error=allStylePropTypes[prop]( style, prop, caller, ReactPropTypeLocations.prop); if(error){ styleError(error.message,style,caller); } }},{key:'validateStyle',value:function validateStyle( name,styles){ if(!__DEV__){ return; } for(var prop in styles[name]){ StyleSheetValidation.validateStyleProp(prop,styles[name],'StyleSheet '+name); } }},{key:'addValidStylePropTypes',value:function addValidStylePropTypes( stylePropTypes){ for(var key in stylePropTypes){ allStylePropTypes[key]=stylePropTypes[key]; } }}]);return StyleSheetValidation;}(); var styleError=function styleError(message1,style,caller,message2){ invariant( false, message1+'\n'+(caller||'<>')+': '+ JSON.stringify(style,null,' ')+(message2||'')); }; var allStylePropTypes={}; StyleSheetValidation.addValidStylePropTypes(ImageStylePropTypes); StyleSheetValidation.addValidStylePropTypes(TextStylePropTypes); StyleSheetValidation.addValidStylePropTypes(ViewStylePropTypes); module.exports=StyleSheetValidation; }, "StyleSheetValidation"); __d(108 /* ImageStylePropTypes */, function(global, require, module, exports) { 'use strict'; var ImageResizeMode=require(109 /* ImageResizeMode */); var LayoutPropTypes=require(110 /* LayoutPropTypes */); var ReactPropTypes=require(40 /* react/lib/ReactPropTypes */); var ColorPropType=require(47 /* ColorPropType */); var ShadowPropTypesIOS=require(111 /* ShadowPropTypesIOS */); var TransformPropTypes=require(112 /* TransformPropTypes */); var ImageStylePropTypes=babelHelpers.extends({}, LayoutPropTypes, ShadowPropTypesIOS, TransformPropTypes,{ resizeMode:ReactPropTypes.oneOf(Object.keys(ImageResizeMode)), backfaceVisibility:ReactPropTypes.oneOf(['visible','hidden']), backgroundColor:ColorPropType, borderColor:ColorPropType, borderWidth:ReactPropTypes.number, borderRadius:ReactPropTypes.number, overflow:ReactPropTypes.oneOf(['visible','hidden']), tintColor:ColorPropType, opacity:ReactPropTypes.number, overlayColor:ReactPropTypes.string, borderTopLeftRadius:ReactPropTypes.number, borderTopRightRadius:ReactPropTypes.number, borderBottomLeftRadius:ReactPropTypes.number, borderBottomRightRadius:ReactPropTypes.number}); module.exports=ImageStylePropTypes; }, "ImageStylePropTypes"); __d(109 /* ImageResizeMode */, function(global, require, module, exports) { 'use strict'; var keyMirror=require(72 /* fbjs/lib/keyMirror */); var ImageResizeMode=keyMirror({ contain:null, cover:null, stretch:null, center:null, repeat:null}); module.exports=ImageResizeMode; }, "ImageResizeMode"); __d(110 /* LayoutPropTypes */, function(global, require, module, exports) { 'use strict'; var ReactPropTypes=require(40 /* react/lib/ReactPropTypes */); var LayoutPropTypes={ width:ReactPropTypes.number, height:ReactPropTypes.number, top:ReactPropTypes.number, left:ReactPropTypes.number, right:ReactPropTypes.number, bottom:ReactPropTypes.number, minWidth:ReactPropTypes.number, maxWidth:ReactPropTypes.number, minHeight:ReactPropTypes.number, maxHeight:ReactPropTypes.number, margin:ReactPropTypes.number, marginVertical:ReactPropTypes.number, marginHorizontal:ReactPropTypes.number, marginTop:ReactPropTypes.number, marginBottom:ReactPropTypes.number, marginLeft:ReactPropTypes.number, marginRight:ReactPropTypes.number, padding:ReactPropTypes.number, paddingVertical:ReactPropTypes.number, paddingHorizontal:ReactPropTypes.number, paddingTop:ReactPropTypes.number, paddingBottom:ReactPropTypes.number, paddingLeft:ReactPropTypes.number, paddingRight:ReactPropTypes.number, borderWidth:ReactPropTypes.number, borderTopWidth:ReactPropTypes.number, borderRightWidth:ReactPropTypes.number, borderBottomWidth:ReactPropTypes.number, borderLeftWidth:ReactPropTypes.number, position:ReactPropTypes.oneOf([ 'absolute', 'relative']), flexDirection:ReactPropTypes.oneOf([ 'row', 'row-reverse', 'column', 'column-reverse']), flexWrap:ReactPropTypes.oneOf([ 'wrap', 'nowrap']), justifyContent:ReactPropTypes.oneOf([ 'flex-start', 'flex-end', 'center', 'space-between', 'space-around']), alignItems:ReactPropTypes.oneOf([ 'flex-start', 'flex-end', 'center', 'stretch']), alignSelf:ReactPropTypes.oneOf([ 'auto', 'flex-start', 'flex-end', 'center', 'stretch']), flex:ReactPropTypes.number, zIndex:ReactPropTypes.number}; module.exports=LayoutPropTypes; }, "LayoutPropTypes"); __d(111 /* ShadowPropTypesIOS */, function(global, require, module, exports) { 'use strict'; var ColorPropType=require(47 /* ColorPropType */); var ReactPropTypes=require(40 /* react/lib/ReactPropTypes */); var ShadowPropTypesIOS={ shadowColor:ColorPropType, shadowOffset:ReactPropTypes.shape( {width:ReactPropTypes.number,height:ReactPropTypes.number}), shadowOpacity:ReactPropTypes.number, shadowRadius:ReactPropTypes.number}; module.exports=ShadowPropTypesIOS; }, "ShadowPropTypesIOS"); __d(112 /* TransformPropTypes */, function(global, require, module, exports) { 'use strict'; var ReactPropTypes=require(40 /* react/lib/ReactPropTypes */); var deprecatedPropType=require(113 /* deprecatedPropType */); var ArrayOfNumberPropType=ReactPropTypes.arrayOf(ReactPropTypes.number); var TransformMatrixPropType=function TransformMatrixPropType( props, propName, componentName) { if(props[propName]){ return new Error( 'The transformMatrix style property is deprecated. '+ 'Use `transform: [{ matrix: ... }]` instead.'); } }; var DecomposedMatrixPropType=function DecomposedMatrixPropType( props, propName, componentName) { if(props[propName]){ return new Error( 'The decomposedMatrix style property is deprecated. '+ 'Use `transform: [...]` instead.'); } }; var TransformPropTypes={ transform:ReactPropTypes.arrayOf( ReactPropTypes.oneOfType([ ReactPropTypes.shape({perspective:ReactPropTypes.number}), ReactPropTypes.shape({rotate:ReactPropTypes.string}), ReactPropTypes.shape({rotateX:ReactPropTypes.string}), ReactPropTypes.shape({rotateY:ReactPropTypes.string}), ReactPropTypes.shape({rotateZ:ReactPropTypes.string}), ReactPropTypes.shape({scale:ReactPropTypes.number}), ReactPropTypes.shape({scaleX:ReactPropTypes.number}), ReactPropTypes.shape({scaleY:ReactPropTypes.number}), ReactPropTypes.shape({translateX:ReactPropTypes.number}), ReactPropTypes.shape({translateY:ReactPropTypes.number}), ReactPropTypes.shape({skewX:ReactPropTypes.string}), ReactPropTypes.shape({skewY:ReactPropTypes.string})])), transformMatrix:TransformMatrixPropType, decomposedMatrix:DecomposedMatrixPropType, scaleX:deprecatedPropType(ReactPropTypes.number,'Use the transform prop instead.'), scaleY:deprecatedPropType(ReactPropTypes.number,'Use the transform prop instead.'), rotation:deprecatedPropType(ReactPropTypes.number,'Use the transform prop instead.'), translateX:deprecatedPropType(ReactPropTypes.number,'Use the transform prop instead.'), translateY:deprecatedPropType(ReactPropTypes.number,'Use the transform prop instead.')}; module.exports=TransformPropTypes; }, "TransformPropTypes"); __d(113 /* deprecatedPropType */, function(global, require, module, exports) { 'use strict'; var UIManager=require(99 /* UIManager */); function deprecatedPropType( propType, explanation) { return function validate(props,propName,componentName){ if(!UIManager[componentName]&&props[propName]!==undefined){ console.warn('`'+propName+'` supplied to `'+componentName+'` has been deprecated. '+explanation); } return propType(props,propName,componentName); }; } module.exports=deprecatedPropType; }, "deprecatedPropType"); __d(114 /* TextStylePropTypes */, function(global, require, module, exports) { 'use strict'; var ReactPropTypes=require(40 /* react/lib/ReactPropTypes */); var ColorPropType=require(47 /* ColorPropType */); var ViewStylePropTypes=require(115 /* ViewStylePropTypes */); var TextStylePropTypes=babelHelpers.extends(Object.create(ViewStylePropTypes),{ color:ColorPropType, fontFamily:ReactPropTypes.string, fontSize:ReactPropTypes.number, fontStyle:ReactPropTypes.oneOf(['normal','italic']), fontWeight:ReactPropTypes.oneOf( ['normal','bold', '100','200','300','400','500','600','700','800','900']), textShadowOffset:ReactPropTypes.shape( {width:ReactPropTypes.number,height:ReactPropTypes.number}), textShadowRadius:ReactPropTypes.number, textShadowColor:ColorPropType, letterSpacing:ReactPropTypes.number, lineHeight:ReactPropTypes.number, textAlign:ReactPropTypes.oneOf( ['auto','left','right','center','justify']), textAlignVertical:ReactPropTypes.oneOf( ['auto','top','bottom','center']), textDecorationLine:ReactPropTypes.oneOf( ['none','underline','line-through','underline line-through']), textDecorationStyle:ReactPropTypes.oneOf( ['solid','double','dotted','dashed']), textDecorationColor:ColorPropType, writingDirection:ReactPropTypes.oneOf( ['auto','ltr','rtl'])}); module.exports=TextStylePropTypes; }, "TextStylePropTypes"); __d(115 /* ViewStylePropTypes */, function(global, require, module, exports) { 'use strict'; var LayoutPropTypes=require(110 /* LayoutPropTypes */); var ReactPropTypes=require(40 /* react/lib/ReactPropTypes */); var ColorPropType=require(47 /* ColorPropType */); var ShadowPropTypesIOS=require(111 /* ShadowPropTypesIOS */); var TransformPropTypes=require(112 /* TransformPropTypes */); var ViewStylePropTypes=babelHelpers.extends({}, LayoutPropTypes, ShadowPropTypesIOS, TransformPropTypes,{ backfaceVisibility:ReactPropTypes.oneOf(['visible','hidden']), backgroundColor:ColorPropType, borderColor:ColorPropType, borderTopColor:ColorPropType, borderRightColor:ColorPropType, borderBottomColor:ColorPropType, borderLeftColor:ColorPropType, borderRadius:ReactPropTypes.number, borderTopLeftRadius:ReactPropTypes.number, borderTopRightRadius:ReactPropTypes.number, borderBottomLeftRadius:ReactPropTypes.number, borderBottomRightRadius:ReactPropTypes.number, borderStyle:ReactPropTypes.oneOf(['solid','dotted','dashed']), borderWidth:ReactPropTypes.number, borderTopWidth:ReactPropTypes.number, borderRightWidth:ReactPropTypes.number, borderBottomWidth:ReactPropTypes.number, borderLeftWidth:ReactPropTypes.number, opacity:ReactPropTypes.number, overflow:ReactPropTypes.oneOf(['visible','hidden']), elevation:ReactPropTypes.number}); module.exports=ViewStylePropTypes; }, "ViewStylePropTypes"); __d(116 /* View */, function(global, require, module, exports) { 'use strict'; var EdgeInsetsPropType=require(117 /* EdgeInsetsPropType */); var NativeMethodsMixin=require(49 /* react/lib/NativeMethodsMixin */); var PropTypes=require(40 /* react/lib/ReactPropTypes */); var React=require(103 /* React */); var ReactNativeStyleAttributes=require(122 /* ReactNativeStyleAttributes */); var ReactNativeViewAttributes=require(128 /* ReactNativeViewAttributes */); var StyleSheetPropType=require(129 /* StyleSheetPropType */); var UIManager=require(99 /* UIManager */); var ViewStylePropTypes=require(115 /* ViewStylePropTypes */); var requireNativeComponent=require(130 /* requireNativeComponent */); var stylePropType=StyleSheetPropType(ViewStylePropTypes); var AccessibilityTraits=[ 'none', 'button', 'link', 'header', 'search', 'image', 'selected', 'plays', 'key', 'text', 'summary', 'disabled', 'frequentUpdates', 'startsMedia', 'adjustable', 'allowsDirectInteraction', 'pageTurn']; var AccessibilityComponentType=[ 'none', 'button', 'radiobutton_checked', 'radiobutton_unchecked']; var forceTouchAvailable=UIManager.RCTView.Constants&& UIManager.RCTView.Constants.forceTouchAvailable||false; var statics={ AccessibilityTraits:AccessibilityTraits, AccessibilityComponentType:AccessibilityComponentType, forceTouchAvailable:forceTouchAvailable}; var View=React.createClass({displayName:'View', mixins:[NativeMethodsMixin], viewConfig:{ uiViewClassName:'RCTView', validAttributes:ReactNativeViewAttributes.RCTView}, statics:babelHelpers.extends({}, statics), propTypes:{ accessible:PropTypes.bool, accessibilityLabel:PropTypes.string, accessibilityComponentType:PropTypes.oneOf(AccessibilityComponentType), accessibilityLiveRegion:PropTypes.oneOf([ 'none', 'polite', 'assertive']), importantForAccessibility:PropTypes.oneOf([ 'auto', 'yes', 'no', 'no-hide-descendants']), accessibilityTraits:PropTypes.oneOfType([ PropTypes.oneOf(AccessibilityTraits), PropTypes.arrayOf(PropTypes.oneOf(AccessibilityTraits))]), onAccessibilityTap:PropTypes.func, onMagicTap:PropTypes.func, testID:PropTypes.string, onResponderGrant:PropTypes.func, onResponderMove:PropTypes.func, onResponderReject:PropTypes.func, onResponderRelease:PropTypes.func, onResponderTerminate:PropTypes.func, onResponderTerminationRequest:PropTypes.func, onStartShouldSetResponder:PropTypes.func, onStartShouldSetResponderCapture:PropTypes.func, onMoveShouldSetResponder:PropTypes.func, onMoveShouldSetResponderCapture:PropTypes.func, hitSlop:EdgeInsetsPropType, onLayout:PropTypes.func, pointerEvents:PropTypes.oneOf([ 'box-none', 'none', 'box-only', 'auto']), style:stylePropType, removeClippedSubviews:PropTypes.bool, renderToHardwareTextureAndroid:PropTypes.bool, shouldRasterizeIOS:PropTypes.bool, collapsable:PropTypes.bool, needsOffscreenAlphaCompositing:PropTypes.bool}, render:function render(){ return React.createElement(RCTView,this.props); }}); var RCTView=requireNativeComponent('RCTView',View,{ nativeOnly:{ nativeBackgroundAndroid:true}}); if(__DEV__){ var viewConfig=UIManager.viewConfigs&&UIManager.viewConfigs.RCTView||{}; for(var prop in viewConfig.nativeProps){ var viewAny=View; if(!viewAny.propTypes[prop]&&!ReactNativeStyleAttributes[prop]){ throw new Error( 'View is missing propType for native prop `'+prop+'`'); } } } var ViewToExport=RCTView; if(__DEV__){ ViewToExport=View; }else{ babelHelpers.extends(RCTView,statics); } module.exports=ViewToExport; }, "View"); __d(117 /* EdgeInsetsPropType */, function(global, require, module, exports) { 'use strict'; var PropTypes=require(40 /* react/lib/ReactPropTypes */); var createStrictShapeTypeChecker=require(118 /* createStrictShapeTypeChecker */); var EdgeInsetsPropType=createStrictShapeTypeChecker({ top:PropTypes.number, left:PropTypes.number, bottom:PropTypes.number, right:PropTypes.number}); module.exports=EdgeInsetsPropType; }, "EdgeInsetsPropType"); __d(118 /* createStrictShapeTypeChecker */, function(global, require, module, exports) { 'use strict'; var ReactPropTypeLocationNames=require(33 /* react/lib/ReactPropTypeLocationNames */); var invariant=require(56 /* fbjs/lib/invariant */); var merge=require(119 /* merge */); function createStrictShapeTypeChecker( shapeTypes) { function checkType(isRequired,props,propName,componentName,location){ if(!props[propName]){ if(isRequired){ invariant( false, 'Required object `'+propName+'` was not specified in '+('`'+ componentName+'`.')); } return; } var propValue=props[propName]; var propType=typeof propValue; var locationName= location&&ReactPropTypeLocationNames[location]||'(unknown)'; if(propType!=='object'){ invariant( false, 'Invalid '+locationName+' `'+propName+'` of type `'+propType+'` '+('supplied to `'+ componentName+'`, expected `object`.')); } var allKeys=merge(props[propName],shapeTypes); for(var key in allKeys){ var checker=shapeTypes[key]; if(!checker){ invariant( false, 'Invalid props.'+propName+' key `'+key+'` supplied to `'+componentName+'`.'+'\nBad object: '+ JSON.stringify(props[propName],null,' ')+'\nValid keys: '+ JSON.stringify(Object.keys(shapeTypes),null,' ')); } var error=checker(propValue,key,componentName,location); if(error){ invariant( false, error.message+'\nBad object: '+ JSON.stringify(props[propName],null,' ')); } } } function chainedCheckType( props, propName, componentName, location) { return checkType(false,props,propName,componentName,location); } chainedCheckType.isRequired=checkType.bind(null,true); return chainedCheckType; } module.exports=createStrictShapeTypeChecker; }, "createStrictShapeTypeChecker"); __d(119 /* merge */, function(global, require, module, exports) { "use strict"; var mergeInto=require(120 /* mergeInto */); var merge=function merge(one,two){ var result={}; mergeInto(result,one); mergeInto(result,two); return result; }; module.exports=merge; }, "merge"); __d(120 /* mergeInto */, function(global, require, module, exports) { "use strict"; var mergeHelpers=require(121 /* mergeHelpers */); var checkMergeObjectArg=mergeHelpers.checkMergeObjectArg; var checkMergeIntoObjectArg=mergeHelpers.checkMergeIntoObjectArg; function mergeInto(one,two){ checkMergeIntoObjectArg(one); if(two!=null){ checkMergeObjectArg(two); for(var key in two){ if(!two.hasOwnProperty(key)){ continue; } one[key]=two[key]; } } } module.exports=mergeInto; }, "mergeInto"); __d(121 /* mergeHelpers */, function(global, require, module, exports) { "use strict"; var invariant=require(56 /* fbjs/lib/invariant */); var keyMirror=require(72 /* fbjs/lib/keyMirror */); var MAX_MERGE_DEPTH=36; var isTerminal=function isTerminal(o){ return typeof o!=='object'||o===null; }; var mergeHelpers={ MAX_MERGE_DEPTH:MAX_MERGE_DEPTH, isTerminal:isTerminal, normalizeMergeArg:function normalizeMergeArg(arg){ return arg===undefined||arg===null?{}:arg; }, checkMergeArrayArgs:function checkMergeArrayArgs(one,two){ invariant( Array.isArray(one)&&Array.isArray(two), 'Tried to merge arrays, instead got %s and %s.', one, two); }, checkMergeObjectArgs:function checkMergeObjectArgs(one,two){ mergeHelpers.checkMergeObjectArg(one); mergeHelpers.checkMergeObjectArg(two); }, checkMergeObjectArg:function checkMergeObjectArg(arg){ invariant( !isTerminal(arg)&&!Array.isArray(arg), 'Tried to merge an object, instead got %s.', arg); }, checkMergeIntoObjectArg:function checkMergeIntoObjectArg(arg){ invariant( (!isTerminal(arg)||typeof arg==='function')&&!Array.isArray(arg), 'Tried to merge into an object, instead got %s.', arg); }, checkMergeLevel:function checkMergeLevel(level){ invariant( level>>8)>>>0; if(Platform.OS==='android'){ int32Color=int32Color|0x0; } return int32Color; } module.exports=processColor; }, "processColor"); __d(125 /* processTransform */, function(global, require, module, exports) { 'use strict'; var MatrixMath=require(126 /* MatrixMath */); var Platform=require(59 /* Platform */); var invariant=require(56 /* fbjs/lib/invariant */); var stringifySafe=require(77 /* stringifySafe */); function processTransform(transform){ var result=MatrixMath.createIdentityMatrix(); transform.forEach(function(transformation){ var key=Object.keys(transformation)[0]; var value=transformation[key]; if(__DEV__){ _validateTransform(key,value,transformation); } switch(key){ case'matrix': MatrixMath.multiplyInto(result,result,value); break; case'perspective': _multiplyTransform(result,MatrixMath.reusePerspectiveCommand,[value]); break; case'rotateX': _multiplyTransform(result,MatrixMath.reuseRotateXCommand,[_convertToRadians(value)]); break; case'rotateY': _multiplyTransform(result,MatrixMath.reuseRotateYCommand,[_convertToRadians(value)]); break; case'rotate': case'rotateZ': _multiplyTransform(result,MatrixMath.reuseRotateZCommand,[_convertToRadians(value)]); break; case'scale': _multiplyTransform(result,MatrixMath.reuseScaleCommand,[value]); break; case'scaleX': _multiplyTransform(result,MatrixMath.reuseScaleXCommand,[value]); break; case'scaleY': _multiplyTransform(result,MatrixMath.reuseScaleYCommand,[value]); break; case'translate': _multiplyTransform(result,MatrixMath.reuseTranslate3dCommand,[value[0],value[1],value[2]||0]); break; case'translateX': _multiplyTransform(result,MatrixMath.reuseTranslate2dCommand,[value,0]); break; case'translateY': _multiplyTransform(result,MatrixMath.reuseTranslate2dCommand,[0,value]); break; case'skewX': _multiplyTransform(result,MatrixMath.reuseSkewXCommand,[_convertToRadians(value)]); break; case'skewY': _multiplyTransform(result,MatrixMath.reuseSkewYCommand,[_convertToRadians(value)]); break; default: throw new Error('Invalid transform name: '+key);} }); return result; } function _multiplyTransform( result, matrixMathFunction, args) { var matrixToApply=MatrixMath.createIdentityMatrix(); var argsWithIdentity=[matrixToApply].concat(args); matrixMathFunction.apply(this,argsWithIdentity); MatrixMath.multiplyInto(result,result,matrixToApply); } function _convertToRadians(value){ var floatValue=parseFloat(value,10); return value.indexOf('rad')>-1?floatValue:floatValue*Math.PI/180; } function _validateTransform(key,value,transformation){ invariant( !value.getValue, 'You passed an Animated.Value to a normal component. '+ 'You need to wrap that component in an Animated. For example, '+ 'replace by .'); var multivalueTransforms=[ 'matrix', 'translate']; if(multivalueTransforms.indexOf(key)!==-1){ invariant( Array.isArray(value), 'Transform with key of %s must have an array as the value: %s', key, stringifySafe(transformation)); } switch(key){ case'matrix': invariant( value.length===9||value.length===16, 'Matrix transform must have a length of 9 (2d) or 16 (3d). '+ 'Provided matrix has a length of %s: %s', value.length, stringifySafe(transformation)); break; case'translate': break; case'rotateX': case'rotateY': case'rotateZ': case'rotate': case'skewX': case'skewY': invariant( typeof value==='string', 'Transform with key of "%s" must be a string: %s', key, stringifySafe(transformation)); invariant( value.indexOf('deg')>-1||value.indexOf('rad')>-1, 'Rotate transform must be expressed in degrees (deg) or radians '+ '(rad): %s', stringifySafe(transformation)); break; case'perspective': invariant( typeof value==='number', 'Transform with key of "%s" must be a number: %s', key, stringifySafe(transformation)); invariant( value!==0, 'Transform with key of "%s" cannot be zero: %s', key, stringifySafe(transformation)); break; default: invariant( typeof value==='number', 'Transform with key of "%s" must be a number: %s', key, stringifySafe(transformation));} } module.exports=processTransform; }, "processTransform"); __d(126 /* MatrixMath */, function(global, require, module, exports) { 'use strict'; var invariant=require(56 /* fbjs/lib/invariant */); var MatrixMath={ createIdentityMatrix:function createIdentityMatrix(){ return[ 1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1]; }, createCopy:function createCopy(m){ return[ m[0],m[1],m[2],m[3], m[4],m[5],m[6],m[7], m[8],m[9],m[10],m[11], m[12],m[13],m[14],m[15]]; }, createOrthographic:function createOrthographic(left,right,bottom,top,near,far){ var a=2/(right-left); var b=2/(top-bottom); var c=-2/(far-near); var tx=-(right+left)/(right-left); var ty=-(top+bottom)/(top-bottom); var tz=-(far+near)/(far-near); return[ a,0,0,0, 0,b,0,0, 0,0,c,0, tx,ty,tz,1]; }, createFrustum:function createFrustum(left,right,bottom,top,near,far){ var r_width=1/(right-left); var r_height=1/(top-bottom); var r_depth=1/(near-far); var x=2*(near*r_width); var y=2*(near*r_height); var A=(right+left)*r_width; var B=(top+bottom)*r_height; var C=(far+near)*r_depth; var D=2*(far*near*r_depth); return[ x,0,0,0, 0,y,0,0, A,B,C,-1, 0,0,D,0]; }, createPerspective:function createPerspective(fovInRadians,aspect,near,far){ var h=1/Math.tan(fovInRadians/2); var r_depth=1/(near-far); var C=(far+near)*r_depth; var D=2*(far*near*r_depth); return[ h/aspect,0,0,0, 0,h,0,0, 0,0,C,-1, 0,0,D,0]; }, createTranslate2d:function createTranslate2d(x,y){ var mat=MatrixMath.createIdentityMatrix(); MatrixMath.reuseTranslate2dCommand(mat,x,y); return mat; }, reuseTranslate2dCommand:function reuseTranslate2dCommand(matrixCommand,x,y){ matrixCommand[12]=x; matrixCommand[13]=y; }, reuseTranslate3dCommand:function reuseTranslate3dCommand(matrixCommand,x,y,z){ matrixCommand[12]=x; matrixCommand[13]=y; matrixCommand[14]=z; }, createScale:function createScale(factor){ var mat=MatrixMath.createIdentityMatrix(); MatrixMath.reuseScaleCommand(mat,factor); return mat; }, reuseScaleCommand:function reuseScaleCommand(matrixCommand,factor){ matrixCommand[0]=factor; matrixCommand[5]=factor; }, reuseScale3dCommand:function reuseScale3dCommand(matrixCommand,x,y,z){ matrixCommand[0]=x; matrixCommand[5]=y; matrixCommand[10]=z; }, reusePerspectiveCommand:function reusePerspectiveCommand(matrixCommand,p){ matrixCommand[11]=-1/p; }, reuseScaleXCommand:function reuseScaleXCommand(matrixCommand,factor){ matrixCommand[0]=factor; }, reuseScaleYCommand:function reuseScaleYCommand(matrixCommand,factor){ matrixCommand[5]=factor; }, reuseScaleZCommand:function reuseScaleZCommand(matrixCommand,factor){ matrixCommand[10]=factor; }, reuseRotateXCommand:function reuseRotateXCommand(matrixCommand,radians){ matrixCommand[5]=Math.cos(radians); matrixCommand[6]=Math.sin(radians); matrixCommand[9]=-Math.sin(radians); matrixCommand[10]=Math.cos(radians); }, reuseRotateYCommand:function reuseRotateYCommand(matrixCommand,amount){ matrixCommand[0]=Math.cos(amount); matrixCommand[2]=-Math.sin(amount); matrixCommand[8]=Math.sin(amount); matrixCommand[10]=Math.cos(amount); }, reuseRotateZCommand:function reuseRotateZCommand(matrixCommand,radians){ matrixCommand[0]=Math.cos(radians); matrixCommand[1]=Math.sin(radians); matrixCommand[4]=-Math.sin(radians); matrixCommand[5]=Math.cos(radians); }, createRotateZ:function createRotateZ(radians){ var mat=MatrixMath.createIdentityMatrix(); MatrixMath.reuseRotateZCommand(mat,radians); return mat; }, reuseSkewXCommand:function reuseSkewXCommand(matrixCommand,radians){ matrixCommand[4]=Math.sin(radians); matrixCommand[5]=Math.cos(radians); }, reuseSkewYCommand:function reuseSkewYCommand(matrixCommand,radians){ matrixCommand[0]=Math.cos(radians); matrixCommand[1]=Math.sin(radians); }, multiplyInto:function multiplyInto(out,a,b){ var a00=a[0],a01=a[1],a02=a[2],a03=a[3], a10=a[4],a11=a[5],a12=a[6],a13=a[7], a20=a[8],a21=a[9],a22=a[10],a23=a[11], a30=a[12],a31=a[13],a32=a[14],a33=a[15]; var b0=b[0],b1=b[1],b2=b[2],b3=b[3]; out[0]=b0*a00+b1*a10+b2*a20+b3*a30; out[1]=b0*a01+b1*a11+b2*a21+b3*a31; out[2]=b0*a02+b1*a12+b2*a22+b3*a32; out[3]=b0*a03+b1*a13+b2*a23+b3*a33; b0=b[4];b1=b[5];b2=b[6];b3=b[7]; out[4]=b0*a00+b1*a10+b2*a20+b3*a30; out[5]=b0*a01+b1*a11+b2*a21+b3*a31; out[6]=b0*a02+b1*a12+b2*a22+b3*a32; out[7]=b0*a03+b1*a13+b2*a23+b3*a33; b0=b[8];b1=b[9];b2=b[10];b3=b[11]; out[8]=b0*a00+b1*a10+b2*a20+b3*a30; out[9]=b0*a01+b1*a11+b2*a21+b3*a31; out[10]=b0*a02+b1*a12+b2*a22+b3*a32; out[11]=b0*a03+b1*a13+b2*a23+b3*a33; b0=b[12];b1=b[13];b2=b[14];b3=b[15]; out[12]=b0*a00+b1*a10+b2*a20+b3*a30; out[13]=b0*a01+b1*a11+b2*a21+b3*a31; out[14]=b0*a02+b1*a12+b2*a22+b3*a32; out[15]=b0*a03+b1*a13+b2*a23+b3*a33; }, determinant:function determinant(matrix){var _matrix=babelHelpers.slicedToArray( matrix,16);var m00=_matrix[0];var m01=_matrix[1];var m02=_matrix[2];var m03=_matrix[3];var m10=_matrix[4];var m11=_matrix[5];var m12=_matrix[6];var m13=_matrix[7];var m20=_matrix[8];var m21=_matrix[9];var m22=_matrix[10];var m23=_matrix[11];var m30=_matrix[12];var m31=_matrix[13];var m32=_matrix[14];var m33=_matrix[15]; return( m03*m12*m21*m30-m02*m13*m21*m30- m03*m11*m22*m30+m01*m13*m22*m30+ m02*m11*m23*m30-m01*m12*m23*m30- m03*m12*m20*m31+m02*m13*m20*m31+ m03*m10*m22*m31-m00*m13*m22*m31- m02*m10*m23*m31+m00*m12*m23*m31+ m03*m11*m20*m32-m01*m13*m20*m32- m03*m10*m21*m32+m00*m13*m21*m32+ m01*m10*m23*m32-m00*m11*m23*m32- m02*m11*m20*m33+m01*m12*m20*m33+ m02*m10*m21*m33-m00*m12*m21*m33- m01*m10*m22*m33+m00*m11*m22*m33); }, inverse:function inverse(matrix){ var det=MatrixMath.determinant(matrix); if(!det){ return matrix; }var _matrix2=babelHelpers.slicedToArray( matrix,16);var m00=_matrix2[0];var m01=_matrix2[1];var m02=_matrix2[2];var m03=_matrix2[3];var m10=_matrix2[4];var m11=_matrix2[5];var m12=_matrix2[6];var m13=_matrix2[7];var m20=_matrix2[8];var m21=_matrix2[9];var m22=_matrix2[10];var m23=_matrix2[11];var m30=_matrix2[12];var m31=_matrix2[13];var m32=_matrix2[14];var m33=_matrix2[15]; return[ (m12*m23*m31-m13*m22*m31+m13*m21*m32-m11*m23*m32-m12*m21*m33+m11*m22*m33)/det, (m03*m22*m31-m02*m23*m31-m03*m21*m32+m01*m23*m32+m02*m21*m33-m01*m22*m33)/det, (m02*m13*m31-m03*m12*m31+m03*m11*m32-m01*m13*m32-m02*m11*m33+m01*m12*m33)/det, (m03*m12*m21-m02*m13*m21-m03*m11*m22+m01*m13*m22+m02*m11*m23-m01*m12*m23)/det, (m13*m22*m30-m12*m23*m30-m13*m20*m32+m10*m23*m32+m12*m20*m33-m10*m22*m33)/det, (m02*m23*m30-m03*m22*m30+m03*m20*m32-m00*m23*m32-m02*m20*m33+m00*m22*m33)/det, (m03*m12*m30-m02*m13*m30-m03*m10*m32+m00*m13*m32+m02*m10*m33-m00*m12*m33)/det, (m02*m13*m20-m03*m12*m20+m03*m10*m22-m00*m13*m22-m02*m10*m23+m00*m12*m23)/det, (m11*m23*m30-m13*m21*m30+m13*m20*m31-m10*m23*m31-m11*m20*m33+m10*m21*m33)/det, (m03*m21*m30-m01*m23*m30-m03*m20*m31+m00*m23*m31+m01*m20*m33-m00*m21*m33)/det, (m01*m13*m30-m03*m11*m30+m03*m10*m31-m00*m13*m31-m01*m10*m33+m00*m11*m33)/det, (m03*m11*m20-m01*m13*m20-m03*m10*m21+m00*m13*m21+m01*m10*m23-m00*m11*m23)/det, (m12*m21*m30-m11*m22*m30-m12*m20*m31+m10*m22*m31+m11*m20*m32-m10*m21*m32)/det, (m01*m22*m30-m02*m21*m30+m02*m20*m31-m00*m22*m31-m01*m20*m32+m00*m21*m32)/det, (m02*m11*m30-m01*m12*m30-m02*m10*m31+m00*m12*m31+m01*m10*m32-m00*m11*m32)/det, (m01*m12*m20-m02*m11*m20+m02*m10*m21-m00*m12*m21-m01*m10*m22+m00*m11*m22)/det]; }, transpose:function transpose(m){ return[ m[0],m[4],m[8],m[12], m[1],m[5],m[9],m[13], m[2],m[6],m[10],m[14], m[3],m[7],m[11],m[15]]; }, multiplyVectorByMatrix:function multiplyVectorByMatrix( v, m) {var _v=babelHelpers.slicedToArray( v,4);var vx=_v[0];var vy=_v[1];var vz=_v[2];var vw=_v[3]; return[ vx*m[0]+vy*m[4]+vz*m[8]+vw*m[12], vx*m[1]+vy*m[5]+vz*m[9]+vw*m[13], vx*m[2]+vy*m[6]+vz*m[10]+vw*m[14], vx*m[3]+vy*m[7]+vz*m[11]+vw*m[15]]; }, v3Length:function v3Length(a){ return Math.sqrt(a[0]*a[0]+a[1]*a[1]+a[2]*a[2]); }, v3Normalize:function v3Normalize( vector, v3Length) { var im=1/(v3Length||MatrixMath.v3Length(vector)); return[ vector[0]*im, vector[1]*im, vector[2]*im]; }, v3Dot:function v3Dot(a,b){ return a[0]*b[0]+ a[1]*b[1]+ a[2]*b[2]; }, v3Combine:function v3Combine( a, b, aScale, bScale) { return[ aScale*a[0]+bScale*b[0], aScale*a[1]+bScale*b[1], aScale*a[2]+bScale*b[2]]; }, v3Cross:function v3Cross(a,b){ return[ a[1]*b[2]-a[2]*b[1], a[2]*b[0]-a[0]*b[2], a[0]*b[1]-a[1]*b[0]]; }, quaternionToDegreesXYZ:function quaternionToDegreesXYZ(q,matrix,row){var _q=babelHelpers.slicedToArray( q,4);var qx=_q[0];var qy=_q[1];var qz=_q[2];var qw=_q[3]; var qw2=qw*qw; var qx2=qx*qx; var qy2=qy*qy; var qz2=qz*qz; var test=qx*qy+qz*qw; var unit=qw2+qx2+qy2+qz2; var conv=180/Math.PI; if(test>0.49999*unit){ return[0,2*Math.atan2(qx,qw)*conv,90]; } if(test<-0.49999*unit){ return[0,-2*Math.atan2(qx,qw)*conv,-90]; } return[ MatrixMath.roundTo3Places( Math.atan2(2*qx*qw-2*qy*qz,1-2*qx2-2*qz2)*conv), MatrixMath.roundTo3Places( Math.atan2(2*qy*qw-2*qx*qz,1-2*qy2-2*qz2)*conv), MatrixMath.roundTo3Places( Math.asin(2*qx*qy+2*qz*qw)*conv)]; }, roundTo3Places:function roundTo3Places(n){ var arr=n.toString().split('e'); return Math.round(arr[0]+'e'+(arr[1]?+arr[1]-3:3))*0.001; }, decomposeMatrix:function decomposeMatrix(transformMatrix){ invariant( transformMatrix.length===16, 'Matrix decomposition needs a list of 3d matrix values, received %s', transformMatrix); var perspective=[]; var quaternion=[]; var scale=[]; var skew=[]; var translation=[]; if(!transformMatrix[15]){ return; } var matrix=[]; var perspectiveMatrix=[]; for(var i=0;i<4;i++){ matrix.push([]); for(var j=0;j<4;j++){ var value=transformMatrix[i*4+j]/transformMatrix[15]; matrix[i].push(value); perspectiveMatrix.push(j===3?0:value); } } perspectiveMatrix[15]=1; if(!MatrixMath.determinant(perspectiveMatrix)){ return; } if(matrix[0][3]!==0||matrix[1][3]!==0||matrix[2][3]!==0){ var rightHandSide=[ matrix[0][3], matrix[1][3], matrix[2][3], matrix[3][3]]; var inversePerspectiveMatrix=MatrixMath.inverse( perspectiveMatrix); var transposedInversePerspectiveMatrix=MatrixMath.transpose( inversePerspectiveMatrix); var perspective=MatrixMath.multiplyVectorByMatrix( rightHandSide, transposedInversePerspectiveMatrix); }else{ perspective[0]=perspective[1]=perspective[2]=0; perspective[3]=1; } for(var i=0;i<3;i++){ translation[i]=matrix[3][i]; } var row=[]; for(i=0;i<3;i++){ row[i]=[ matrix[i][0], matrix[i][1], matrix[i][2]]; } scale[0]=MatrixMath.v3Length(row[0]); row[0]=MatrixMath.v3Normalize(row[0],scale[0]); skew[0]=MatrixMath.v3Dot(row[0],row[1]); row[1]=MatrixMath.v3Combine(row[1],row[0],1.0,-skew[0]); skew[0]=MatrixMath.v3Dot(row[0],row[1]); row[1]=MatrixMath.v3Combine(row[1],row[0],1.0,-skew[0]); scale[1]=MatrixMath.v3Length(row[1]); row[1]=MatrixMath.v3Normalize(row[1],scale[1]); skew[0]/=scale[1]; skew[1]=MatrixMath.v3Dot(row[0],row[2]); row[2]=MatrixMath.v3Combine(row[2],row[0],1.0,-skew[1]); skew[2]=MatrixMath.v3Dot(row[1],row[2]); row[2]=MatrixMath.v3Combine(row[2],row[1],1.0,-skew[2]); scale[2]=MatrixMath.v3Length(row[2]); row[2]=MatrixMath.v3Normalize(row[2],scale[2]); skew[1]/=scale[2]; skew[2]/=scale[2]; var pdum3=MatrixMath.v3Cross(row[1],row[2]); if(MatrixMath.v3Dot(row[0],pdum3)<0){ for(i=0;i<3;i++){ scale[i]*=-1; row[i][0]*=-1; row[i][1]*=-1; row[i][2]*=-1; } } quaternion[0]= 0.5*Math.sqrt(Math.max(1+row[0][0]-row[1][1]-row[2][2],0)); quaternion[1]= 0.5*Math.sqrt(Math.max(1-row[0][0]+row[1][1]-row[2][2],0)); quaternion[2]= 0.5*Math.sqrt(Math.max(1-row[0][0]-row[1][1]+row[2][2],0)); quaternion[3]= 0.5*Math.sqrt(Math.max(1+row[0][0]+row[1][1]+row[2][2],0)); if(row[2][1]>row[1][2]){ quaternion[0]=-quaternion[0]; } if(row[0][2]>row[2][0]){ quaternion[1]=-quaternion[1]; } if(row[1][0]>row[0][1]){ quaternion[2]=-quaternion[2]; } var rotationDegrees; if( quaternion[0]<0.001&&quaternion[0]>=0&& quaternion[1]<0.001&&quaternion[1]>=0) { rotationDegrees=[0,0,MatrixMath.roundTo3Places( Math.atan2(row[0][1],row[0][0])*180/Math.PI)]; }else{ rotationDegrees=MatrixMath.quaternionToDegreesXYZ(quaternion,matrix,row); } return{ rotationDegrees:rotationDegrees, perspective:perspective, quaternion:quaternion, scale:scale, skew:skew, translation:translation, rotate:rotationDegrees[2], rotateX:rotationDegrees[0], rotateY:rotationDegrees[1], scaleX:scale[0], scaleY:scale[1], translateX:translation[0], translateY:translation[1]}; }}; module.exports=MatrixMath; }, "MatrixMath"); __d(127 /* sizesDiffer */, function(global, require, module, exports) { 'use strict'; var dummySize={width:undefined,height:undefined}; var sizesDiffer=function sizesDiffer(one,two){ one=one||dummySize; two=two||dummySize; return one!==two&&( one.width!==two.width|| one.height!==two.height); }; module.exports=sizesDiffer; }, "sizesDiffer"); __d(128 /* ReactNativeViewAttributes */, function(global, require, module, exports) { 'use strict'; var ReactNativeStyleAttributes=require(122 /* ReactNativeStyleAttributes */); var ReactNativeViewAttributes={}; ReactNativeViewAttributes.UIView={ pointerEvents:true, accessible:true, accessibilityLabel:true, accessibilityComponentType:true, accessibilityLiveRegion:true, accessibilityTraits:true, importantForAccessibility:true, testID:true, renderToHardwareTextureAndroid:true, shouldRasterizeIOS:true, onLayout:true, onAccessibilityTap:true, onMagicTap:true, collapsable:true, needsOffscreenAlphaCompositing:true, style:ReactNativeStyleAttributes}; ReactNativeViewAttributes.RCTView=babelHelpers.extends({}, ReactNativeViewAttributes.UIView,{ removeClippedSubviews:true}); module.exports=ReactNativeViewAttributes; }, "ReactNativeViewAttributes"); __d(129 /* StyleSheetPropType */, function(global, require, module, exports) { 'use strict'; var createStrictShapeTypeChecker=require(118 /* createStrictShapeTypeChecker */); var flattenStyle=require(55 /* flattenStyle */); function StyleSheetPropType( shape) { var shapePropType=createStrictShapeTypeChecker(shape); return function(props,propName,componentName,location){ var newProps=props; if(props[propName]){ newProps={}; newProps[propName]=flattenStyle(props[propName]); } return shapePropType(newProps,propName,componentName,location); }; } module.exports=StyleSheetPropType; }, "StyleSheetPropType"); __d(130 /* requireNativeComponent */, function(global, require, module, exports) { 'use strict'; var ReactNativeStyleAttributes=require(122 /* ReactNativeStyleAttributes */); var UIManager=require(99 /* UIManager */); var UnimplementedView=require(131 /* UnimplementedView */); var createReactNativeComponentClass=require(132 /* react/lib/createReactNativeComponentClass */); var insetsDiffer=require(166 /* insetsDiffer */); var pointsDiffer=require(167 /* pointsDiffer */); var matricesDiffer=require(123 /* matricesDiffer */); var processColor=require(124 /* processColor */); var resolveAssetSource=require(168 /* resolveAssetSource */); var sizesDiffer=require(127 /* sizesDiffer */); var verifyPropTypes=require(172 /* verifyPropTypes */); var warning=require(44 /* fbjs/lib/warning */); function requireNativeComponent( viewName, componentInterface, extraConfig) { var viewConfig=UIManager[viewName]; if(!viewConfig||!viewConfig.NativeProps){ warning(false,'Native component for "%s" does not exist',viewName); return UnimplementedView; } var nativeProps=babelHelpers.extends({}, UIManager.RCTView.NativeProps, viewConfig.NativeProps); viewConfig.uiViewClassName=viewName; viewConfig.validAttributes={}; viewConfig.propTypes=componentInterface&&componentInterface.propTypes; for(var key in nativeProps){ var useAttribute=false; var attribute={}; var differ=TypeToDifferMap[nativeProps[key]]; if(differ){ attribute.diff=differ; useAttribute=true; } var processor=TypeToProcessorMap[nativeProps[key]]; if(processor){ attribute.process=processor; useAttribute=true; } viewConfig.validAttributes[key]=useAttribute?attribute:true; } viewConfig.validAttributes.style=ReactNativeStyleAttributes; if(__DEV__){ componentInterface&&verifyPropTypes( componentInterface, viewConfig, extraConfig&&extraConfig.nativeOnly); } return createReactNativeComponentClass(viewConfig); } var TypeToDifferMap={ CATransform3D:matricesDiffer, CGPoint:pointsDiffer, CGSize:sizesDiffer, UIEdgeInsets:insetsDiffer}; function processColorArray(colors){ return colors&&colors.map(processColor); } var TypeToProcessorMap={ CGColor:processColor, CGColorArray:processColorArray, UIColor:processColor, UIColorArray:processColorArray, CGImage:resolveAssetSource, UIImage:resolveAssetSource, RCTImageSource:resolveAssetSource, Color:processColor, ColorArray:processColorArray}; module.exports=requireNativeComponent; }, "requireNativeComponent"); __d(131 /* UnimplementedView */, function(global, require, module, exports) { 'use strict'; var React=require(103 /* React */); var StyleSheet=require(104 /* StyleSheet */); var UnimplementedView=React.createClass({displayName:'UnimplementedView', setNativeProps:function setNativeProps(){ }, render:function render(){ var View=require(116 /* View */); return( React.createElement(View,{style:[styles.unimplementedView,this.props.style]}, this.props.children)); }}); var styles=StyleSheet.create({ unimplementedView:{ borderWidth:1, borderColor:'red', alignSelf:'flex-start'}}); module.exports=UnimplementedView; }, "UnimplementedView"); __d(132 /* react/lib/createReactNativeComponentClass.js */, function(global, require, module, exports) { 'use strict'; var ReactNativeBaseComponent=require(133 /* ./ReactNativeBaseComponent */); var createReactNativeComponentClass=function createReactNativeComponentClass(viewConfig){ var Constructor=function Constructor(element){ this._currentElement=element; this._topLevelWrapper=null; this._hostParent=null; this._hostContainerInfo=null; this._rootNodeID=null; this._renderedChildren=null; }; Constructor.displayName=viewConfig.uiViewClassName; Constructor.viewConfig=viewConfig; Constructor.propTypes=viewConfig.propTypes; Constructor.prototype=new ReactNativeBaseComponent(viewConfig); Constructor.prototype.constructor=Constructor; return Constructor; }; module.exports=createReactNativeComponentClass; }, "react/lib/createReactNativeComponentClass.js"); __d(133 /* react/lib/ReactNativeBaseComponent.js */, function(global, require, module, exports) { 'use strict'; var _assign=require(14 /* object-assign */); var NativeMethodsMixin=require(49 /* ./NativeMethodsMixin */); var ReactNativeAttributePayload=require(50 /* ./ReactNativeAttributePayload */); var ReactNativeComponentTree=require(134 /* ./ReactNativeComponentTree */); var ReactNativeEventEmitter=require(135 /* ./ReactNativeEventEmitter */); var ReactNativeTagHandles=require(144 /* ./ReactNativeTagHandles */); var ReactMultiChild=require(153 /* ./ReactMultiChild */); var UIManager=require(102 /* react-native/lib/UIManager */); var deepFreezeAndThrowOnMutationInDev=require(164 /* react-native/lib/deepFreezeAndThrowOnMutationInDev */); var registrationNames=ReactNativeEventEmitter.registrationNames; var putListener=ReactNativeEventEmitter.putListener; var deleteListener=ReactNativeEventEmitter.deleteListener; var deleteAllListeners=ReactNativeEventEmitter.deleteAllListeners; var ReactNativeBaseComponent=function ReactNativeBaseComponent(viewConfig){ this.viewConfig=viewConfig; }; ReactNativeBaseComponent.Mixin={ getPublicInstance:function getPublicInstance(){ return this; }, unmountComponent:function unmountComponent(){ ReactNativeComponentTree.uncacheNode(this); deleteAllListeners(this); this.unmountChildren(); this._rootNodeID=null; }, initializeChildren:function initializeChildren(children,containerTag,transaction,context){ var mountImages=this.mountChildren(children,transaction,context); if(mountImages.length){ var createdTags=[]; for(var i=0,l=mountImages.length;i-1)?process.env.NODE_ENV!=='production'?invariant(false,'EventPluginRegistry: Cannot inject event plugins that do not exist in the plugin ordering, `%s`.',pluginName):_prodInvariant('96',pluginName):void 0; if(EventPluginRegistry.plugins[pluginIndex]){ continue; } !PluginModule.extractEvents?process.env.NODE_ENV!=='production'?invariant(false,'EventPluginRegistry: Event plugins must implement an `extractEvents` method, but `%s` does not.',pluginName):_prodInvariant('97',pluginName):void 0; EventPluginRegistry.plugins[pluginIndex]=PluginModule; var publishedEvents=PluginModule.eventTypes; for(var eventName in publishedEvents){ !publishEventForPlugin(publishedEvents[eventName],PluginModule,eventName)?process.env.NODE_ENV!=='production'?invariant(false,'EventPluginRegistry: Failed to publish event `%s` for plugin `%s`.',eventName,pluginName):_prodInvariant('98',eventName,pluginName):void 0; } } } function publishEventForPlugin(dispatchConfig,PluginModule,eventName){ !!EventPluginRegistry.eventNameDispatchConfigs.hasOwnProperty(eventName)?process.env.NODE_ENV!=='production'?invariant(false,'EventPluginHub: More than one plugin attempted to publish the same event name, `%s`.',eventName):_prodInvariant('99',eventName):void 0; EventPluginRegistry.eventNameDispatchConfigs[eventName]=dispatchConfig; var phasedRegistrationNames=dispatchConfig.phasedRegistrationNames; if(phasedRegistrationNames){ for(var phaseName in phasedRegistrationNames){ if(phasedRegistrationNames.hasOwnProperty(phaseName)){ var phasedRegistrationName=phasedRegistrationNames[phaseName]; publishRegistrationName(phasedRegistrationName,PluginModule,eventName); } } return true; }else if(dispatchConfig.registrationName){ publishRegistrationName(dispatchConfig.registrationName,PluginModule,eventName); return true; } return false; } function publishRegistrationName(registrationName,PluginModule,eventName){ !!EventPluginRegistry.registrationNameModules[registrationName]?process.env.NODE_ENV!=='production'?invariant(false,'EventPluginHub: More than one plugin attempted to publish the same registration name, `%s`.',registrationName):_prodInvariant('100',registrationName):void 0; EventPluginRegistry.registrationNameModules[registrationName]=PluginModule; EventPluginRegistry.registrationNameDependencies[registrationName]=PluginModule.eventTypes[eventName].dependencies; if(process.env.NODE_ENV!=='production'){ var lowerCasedName=registrationName.toLowerCase(); EventPluginRegistry.possibleRegistrationNames[lowerCasedName]=registrationName; if(registrationName==='onDoubleClick'){ EventPluginRegistry.possibleRegistrationNames.ondblclick=registrationName; } } } var EventPluginRegistry={ plugins:[], eventNameDispatchConfigs:{}, registrationNameModules:{}, registrationNameDependencies:{}, possibleRegistrationNames:process.env.NODE_ENV!=='production'?{}:null, injectEventPluginOrder:function injectEventPluginOrder(InjectedEventPluginOrder){ !!EventPluginOrder?process.env.NODE_ENV!=='production'?invariant(false,'EventPluginRegistry: Cannot inject event plugin ordering more than once. You are likely trying to load more than one copy of React.'):_prodInvariant('101'):void 0; EventPluginOrder=Array.prototype.slice.call(InjectedEventPluginOrder); recomputePluginOrdering(); }, injectEventPluginsByName:function injectEventPluginsByName(injectedNamesToPlugins){ var isOrderingDirty=false; for(var pluginName in injectedNamesToPlugins){ if(!injectedNamesToPlugins.hasOwnProperty(pluginName)){ continue; } var PluginModule=injectedNamesToPlugins[pluginName]; if(!namesToPlugins.hasOwnProperty(pluginName)||namesToPlugins[pluginName]!==PluginModule){ !!namesToPlugins[pluginName]?process.env.NODE_ENV!=='production'?invariant(false,'EventPluginRegistry: Cannot inject two different event plugins using the same name, `%s`.',pluginName):_prodInvariant('102',pluginName):void 0; namesToPlugins[pluginName]=PluginModule; isOrderingDirty=true; } } if(isOrderingDirty){ recomputePluginOrdering(); } }, getPluginModuleForEvent:function getPluginModuleForEvent(event){ var dispatchConfig=event.dispatchConfig; if(dispatchConfig.registrationName){ return EventPluginRegistry.registrationNameModules[dispatchConfig.registrationName]||null; } for(var phase in dispatchConfig.phasedRegistrationNames){ if(!dispatchConfig.phasedRegistrationNames.hasOwnProperty(phase)){ continue; } var PluginModule=EventPluginRegistry.registrationNameModules[dispatchConfig.phasedRegistrationNames[phase]]; if(PluginModule){ return PluginModule; } } return null; }, _resetEventPlugins:function _resetEventPlugins(){ EventPluginOrder=null; for(var pluginName in namesToPlugins){ if(namesToPlugins.hasOwnProperty(pluginName)){ delete namesToPlugins[pluginName]; } } EventPluginRegistry.plugins.length=0; var eventNameDispatchConfigs=EventPluginRegistry.eventNameDispatchConfigs; for(var eventName in eventNameDispatchConfigs){ if(eventNameDispatchConfigs.hasOwnProperty(eventName)){ delete eventNameDispatchConfigs[eventName]; } } var registrationNameModules=EventPluginRegistry.registrationNameModules; for(var registrationName in registrationNameModules){ if(registrationNameModules.hasOwnProperty(registrationName)){ delete registrationNameModules[registrationName]; } } if(process.env.NODE_ENV!=='production'){ var possibleRegistrationNames=EventPluginRegistry.possibleRegistrationNames; for(var lowerCasedName in possibleRegistrationNames){ if(possibleRegistrationNames.hasOwnProperty(lowerCasedName)){ delete possibleRegistrationNames[lowerCasedName]; } } } }}; module.exports=EventPluginRegistry; }, "react/lib/EventPluginRegistry.js"); __d(139 /* react/lib/EventPluginUtils.js */, function(global, require, module, exports) { 'use strict'; var _prodInvariant=require(17 /* ./reactProdInvariant */); var EventConstants=require(136 /* ./EventConstants */); var ReactErrorUtils=require(140 /* ./ReactErrorUtils */); var invariant=require(18 /* fbjs/lib/invariant */); var warning=require(21 /* fbjs/lib/warning */); var ComponentTree; var TreeTraversal; var injection={ injectComponentTree:function injectComponentTree(Injected){ ComponentTree=Injected; if(process.env.NODE_ENV!=='production'){ process.env.NODE_ENV!=='production'?warning(Injected&&Injected.getNodeFromInstance&&Injected.getInstanceFromNode,'EventPluginUtils.injection.injectComponentTree(...): Injected '+'module is missing getNodeFromInstance or getInstanceFromNode.'):void 0; } }, injectTreeTraversal:function injectTreeTraversal(Injected){ TreeTraversal=Injected; if(process.env.NODE_ENV!=='production'){ process.env.NODE_ENV!=='production'?warning(Injected&&Injected.isAncestor&&Injected.getLowestCommonAncestor,'EventPluginUtils.injection.injectTreeTraversal(...): Injected '+'module is missing isAncestor or getLowestCommonAncestor.'):void 0; } }}; var topLevelTypes=EventConstants.topLevelTypes; function isEndish(topLevelType){ return topLevelType===topLevelTypes.topMouseUp||topLevelType===topLevelTypes.topTouchEnd||topLevelType===topLevelTypes.topTouchCancel; } function isMoveish(topLevelType){ return topLevelType===topLevelTypes.topMouseMove||topLevelType===topLevelTypes.topTouchMove; } function isStartish(topLevelType){ return topLevelType===topLevelTypes.topMouseDown||topLevelType===topLevelTypes.topTouchStart; } var validateEventDispatches; if(process.env.NODE_ENV!=='production'){ validateEventDispatches=function validateEventDispatches(event){ var dispatchListeners=event._dispatchListeners; var dispatchInstances=event._dispatchInstances; var listenersIsArr=Array.isArray(dispatchListeners); var listenersLen=listenersIsArr?dispatchListeners.length:dispatchListeners?1:0; var instancesIsArr=Array.isArray(dispatchInstances); var instancesLen=instancesIsArr?dispatchInstances.length:dispatchInstances?1:0; process.env.NODE_ENV!=='production'?warning(instancesIsArr===listenersIsArr&&instancesLen===listenersLen,'EventPluginUtils: Invalid `event`.'):void 0; }; } function executeDispatch(event,simulated,listener,inst){ var type=event.type||'unknown-event'; event.currentTarget=EventPluginUtils.getNodeFromInstance(inst); if(simulated){ ReactErrorUtils.invokeGuardedCallbackWithCatch(type,listener,event); }else{ ReactErrorUtils.invokeGuardedCallback(type,listener,event); } event.currentTarget=null; } function executeDispatchesInOrder(event,simulated){ var dispatchListeners=event._dispatchListeners; var dispatchInstances=event._dispatchInstances; if(process.env.NODE_ENV!=='production'){ validateEventDispatches(event); } if(Array.isArray(dispatchListeners)){ for(var i=0;i=deviceScale){ return scales[i]; } } return scales[scales.length-1]||1; }}]);return AssetSourceResolver;}(); module.exports=AssetSourceResolver; }, "AssetSourceResolver"); __d(171 /* react-native/local-cli/bundle/assetPathUtils.js */, function(global, require, module, exports) { 'use strict'; function getAndroidAssetSuffix(scale){ switch(scale){ case 0.75:return'ldpi'; case 1:return'mdpi'; case 1.5:return'hdpi'; case 2:return'xhdpi'; case 3:return'xxhdpi'; case 4:return'xxxhdpi';} } function getAndroidDrawableFolderName(asset,scale){ var suffix=getAndroidAssetSuffix(scale); if(!suffix){ throw new Error( 'Don\'t know which android drawable suffix to use for asset: '+ JSON.stringify(asset)); } var androidFolder='drawable-'+suffix; return androidFolder; } function getAndroidResourceIdentifier(asset){ var folderPath=getBasePath(asset); return(folderPath+'/'+asset.name). toLowerCase(). replace(/\//g,'_'). replace(/([^a-z0-9_])/g,''). replace(/^assets_/,''); } function getBasePath(asset){ var basePath=asset.httpServerLocation; if(basePath[0]==='/'){ basePath=basePath.substr(1); } return basePath; } module.exports={ getAndroidAssetSuffix:getAndroidAssetSuffix, getAndroidDrawableFolderName:getAndroidDrawableFolderName, getAndroidResourceIdentifier:getAndroidResourceIdentifier, getBasePath:getBasePath}; }, "react-native/local-cli/bundle/assetPathUtils.js"); __d(172 /* verifyPropTypes */, function(global, require, module, exports) { 'use strict'; var ReactNativeStyleAttributes=require(122 /* ReactNativeStyleAttributes */); function verifyPropTypes( componentInterface, viewConfig, nativePropsToIgnore) { if(!viewConfig){ return; } var componentName= componentInterface.displayName|| componentInterface.name|| 'unknown'; if(!componentInterface.propTypes){ throw new Error( '`'+componentName+'` has no propTypes defined`'); } var nativeProps=viewConfig.NativeProps; for(var prop in nativeProps){ if(!componentInterface.propTypes[prop]&& !ReactNativeStyleAttributes[prop]&&( !nativePropsToIgnore||!nativePropsToIgnore[prop])){ var message; if(componentInterface.propTypes.hasOwnProperty(prop)){ message='`'+componentName+'` has incorrectly defined propType for native prop `'+ viewConfig.uiViewClassName+'.'+prop+'` of native type `'+nativeProps[prop]; }else{ message='`'+componentName+'` has no propType for native prop `'+ viewConfig.uiViewClassName+'.'+prop+'` of native type `'+ nativeProps[prop]+'`'; } message+='\nIf you haven\'t changed this prop yourself, this usually means that '+ 'your versions of the native code and JavaScript code are out of sync. Updating both '+ 'should make this error go away.'; throw new Error(message); } } } module.exports=verifyPropTypes; }, "verifyPropTypes"); __d(173 /* ActivityIndicatorIOS */, function(global, require, module, exports) { 'use strict'; var React=require(103 /* React */); var View=require(116 /* View */); var ActivityIndicatorIOS=React.createClass({displayName:'ActivityIndicatorIOS', render:function render(){ return React.createElement(View,this.props); }}); module.exports=ActivityIndicatorIOS; }, "ActivityIndicatorIOS"); __d(174 /* ReactNativeART */, function(global, require, module, exports) { 'use strict'; var Color=require(175 /* art/core/color */); var Path=require(176 /* ARTSerializablePath */); var Transform=require(179 /* art/core/transform */); var React=require(103 /* React */); var ReactNativeViewAttributes=require(128 /* ReactNativeViewAttributes */); var createReactNativeComponentClass=require(132 /* react/lib/createReactNativeComponentClass */); var merge=require(119 /* merge */); function arrayDiffer(a,b){ if(a==null||b==null){ return true; } if(a.length!==b.length){ return true; } for(var i=0;ig){ cx-=gx; cy-=gy; }else if(u>0&&g!=0){ cx-=u/g*gx; cy-=u/g*gy; } v1=cx*cx+cy*cy; cx=c2x-sx;cy=c2y-sy; u=cx*gx+cy*gy; if(u>g){ cx-=gx; cy-=gy; }else if(u>0&&g!=0){ cx-=u/g*gx; cy-=u/g*gy; } v2=cx*cx+cy*cy; if(v1<0.01&&v2<0.01){ this.onLine(sx,sy,ex,ey); return; } if(isNaN(v1)||isNaN(v2)){ throw new Error('Bad input'); } var s1x=(c1x+c2x)*0.5,s1y=(c1y+c2y)*0.5, l1x=(c1x+sx)*0.5,l1y=(c1y+sy)*0.5, l2x=(l1x+s1x)*0.5,l2y=(l1y+s1y)*0.5, r2x=(ex+c2x)*0.5,r2y=(ey+c2y)*0.5, r1x=(r2x+s1x)*0.5,r1y=(r2y+s1y)*0.5, l2r1x=(l2x+r1x)*0.5,l2r1y=(l2y+r1y)*0.5; this.onBezierCurve(sx,sy,l1x,l1y,l2x,l2y,l2r1x,l2r1y); this.onBezierCurve(l2r1x,l2r1y,r1x,r1y,r2x,r2y,ex,ey); }, onArc:function onArc(sx,sy,ex,ey,cx,cy,rx,ry,sa,ea,ccw,rotation){ var rad=rotation?rotation*Math.PI/180:0,cos=Math.cos(rad),sin=Math.sin(rad), xx=cos*rx,yx=-sin*ry, xy=sin*rx,yy=cos*ry; var arc=ea-sa; if(arc<0&&!ccw)arc+=Math.PI*2;else if(arc>0&&ccw)arc-=Math.PI*2; var n=Math.ceil(Math.abs(arc/(Math.PI/2))), step=arc/n, k=4/3*Math.tan(step/4); var x=Math.cos(sa),y=Math.sin(sa); for(var i=0;im.yy/m.xy?-1:1; if(m.xx<0?m.xy>=0:m.xy<0)flip=-flip; return this.rotate(deg-Math.atan2(flip*m.yx,flip*m.xx)*180/Math.PI,x,y); }, scaleTo:function scaleTo(x,y){ var m=this; var h=Math.sqrt(m.xx*m.xx+m.yx*m.yx); m.xx/=h;m.yx/=h; h=Math.sqrt(m.yy*m.yy+m.xy*m.xy); m.yy/=h;m.xy/=h; return this.scale(x,y); }, resizeTo:function resizeTo(width,height){ var w=this.width,h=this.height; if(!w||!h)return this; return this.scaleTo(width/w,height/h); }, inversePoint:function inversePoint(x,y){ var a=this.xx,b=this.yx, c=this.xy,d=this.yy, e=this.x,f=this.y; var det=b*c-a*d; if(det==0)return null; return{ x:(d*(e-x)+c*(y-f))/det, y:(a*(f-y)+b*(x-e))/det}; }, point:function point(x,y){ var m=this; return{ x:m.xx*x+m.xy*y+m.x, y:m.yx*x+m.yy*y+m.y}; }}); }, "art/core/transform.js"); __d(180 /* DatePickerIOS */, function(global, require, module, exports) { 'use strict'; var React=require(103 /* React */); var StyleSheet=require(104 /* StyleSheet */); var Text=require(181 /* Text */); var View=require(116 /* View */); var DummyDatePickerIOS=React.createClass({displayName:'DummyDatePickerIOS', render:function render(){ return( React.createElement(View,{style:[styles.dummyDatePickerIOS,this.props.style]}, React.createElement(Text,{style:styles.datePickerText},'DatePickerIOS is not supported on this platform!'))); }}); var styles=StyleSheet.create({ dummyDatePickerIOS:{ height:100, width:300, backgroundColor:'#ffbcbc', borderWidth:1, borderColor:'red', alignItems:'center', justifyContent:'center', margin:10}, datePickerText:{ color:'#333333', margin:20}}); module.exports=DummyDatePickerIOS; }, "DatePickerIOS"); __d(181 /* Text */, function(global, require, module, exports) { 'use strict'; var NativeMethodsMixin=require(49 /* react/lib/NativeMethodsMixin */); var Platform=require(59 /* Platform */); var React=require(103 /* React */); var ReactNativeViewAttributes=require(128 /* ReactNativeViewAttributes */); var StyleSheetPropType=require(129 /* StyleSheetPropType */); var TextStylePropTypes=require(114 /* TextStylePropTypes */); var Touchable=require(182 /* Touchable */); var createReactNativeComponentClass= require(132 /* react/lib/createReactNativeComponentClass */); var merge=require(119 /* merge */); var stylePropType=StyleSheetPropType(TextStylePropTypes); var viewConfig={ validAttributes:merge(ReactNativeViewAttributes.UIView,{ isHighlighted:true, numberOfLines:true, ellipsizeMode:true, allowFontScaling:true, selectable:true}), uiViewClassName:'RCTText'}; var Text=React.createClass({displayName:'Text', propTypes:{ ellipsizeMode:React.PropTypes.oneOf(['head','middle','tail','clip']), numberOfLines:React.PropTypes.number, onLayout:React.PropTypes.func, onPress:React.PropTypes.func, onLongPress:React.PropTypes.func, selectable:React.PropTypes.bool, suppressHighlighting:React.PropTypes.bool, style:stylePropType, testID:React.PropTypes.string, allowFontScaling:React.PropTypes.bool, accessible:React.PropTypes.bool}, getDefaultProps:function getDefaultProps(){ return{ accessible:true, allowFontScaling:true, ellipsizeMode:'tail'}; }, getInitialState:function getInitialState(){ return merge(Touchable.Mixin.touchableGetInitialState(),{ isHighlighted:false}); }, mixins:[NativeMethodsMixin], viewConfig:viewConfig, getChildContext:function getChildContext(){ return{isInAParentText:true}; }, childContextTypes:{ isInAParentText:React.PropTypes.bool}, contextTypes:{ isInAParentText:React.PropTypes.bool}, _handlers:null, _hasPressHandler:function _hasPressHandler(){ return!!this.props.onPress||!!this.props.onLongPress; }, touchableHandleActivePressIn:null, touchableHandleActivePressOut:null, touchableHandlePress:null, touchableHandleLongPress:null, touchableGetPressRectOffset:null, render:function render(){var _this=this; var newProps=this.props; if(this.props.onStartShouldSetResponder||this._hasPressHandler()){ if(!this._handlers){ this._handlers={ onStartShouldSetResponder:function onStartShouldSetResponder(){ var shouldSetFromProps=_this.props.onStartShouldSetResponder&& _this.props.onStartShouldSetResponder(); var setResponder=shouldSetFromProps||_this._hasPressHandler(); if(setResponder&&!_this.touchableHandleActivePressIn){ for(var key in Touchable.Mixin){ if(typeof Touchable.Mixin[key]==='function'){ _this[key]=Touchable.Mixin[key].bind(_this); } } _this.touchableHandleActivePressIn=function(){ if(_this.props.suppressHighlighting||!_this._hasPressHandler()){ return; } _this.setState({ isHighlighted:true}); }; _this.touchableHandleActivePressOut=function(){ if(_this.props.suppressHighlighting||!_this._hasPressHandler()){ return; } _this.setState({ isHighlighted:false}); }; _this.touchableHandlePress=function(){ _this.props.onPress&&_this.props.onPress(); }; _this.touchableHandleLongPress=function(){ _this.props.onLongPress&&_this.props.onLongPress(); }; _this.touchableGetPressRectOffset=function(){ return PRESS_RECT_OFFSET; }; } return setResponder; }, onResponderGrant:function(e,dispatchID){ this.touchableHandleResponderGrant(e,dispatchID); this.props.onResponderGrant&& this.props.onResponderGrant.apply(this,arguments); }.bind(this), onResponderMove:function(e){ this.touchableHandleResponderMove(e); this.props.onResponderMove&& this.props.onResponderMove.apply(this,arguments); }.bind(this), onResponderRelease:function(e){ this.touchableHandleResponderRelease(e); this.props.onResponderRelease&& this.props.onResponderRelease.apply(this,arguments); }.bind(this), onResponderTerminate:function(e){ this.touchableHandleResponderTerminate(e); this.props.onResponderTerminate&& this.props.onResponderTerminate.apply(this,arguments); }.bind(this), onResponderTerminationRequest:function(){ var allowTermination=this.touchableHandleResponderTerminationRequest(); if(allowTermination&&this.props.onResponderTerminationRequest){ allowTermination=this.props.onResponderTerminationRequest.apply(this,arguments); } return allowTermination; }.bind(this)}; } newProps=babelHelpers.extends({}, this.props, this._handlers,{ isHighlighted:this.state.isHighlighted}); } if(Touchable.TOUCH_TARGET_DEBUG&&newProps.onPress){ newProps=babelHelpers.extends({}, newProps,{ style:[this.props.style,{color:'magenta'}]}); } if(this.context.isInAParentText){ return React.createElement(RCTVirtualText,newProps); }else{ return React.createElement(RCTText,newProps); } }}); var PRESS_RECT_OFFSET={top:20,left:20,right:20,bottom:30}; var RCTText=createReactNativeComponentClass(viewConfig); var RCTVirtualText=RCTText; if(Platform.OS==='android'){ RCTVirtualText=createReactNativeComponentClass({ validAttributes:merge(ReactNativeViewAttributes.UIView,{ isHighlighted:true}), uiViewClassName:'RCTVirtualText'}); } module.exports=Text; }, "Text"); __d(182 /* Touchable */, function(global, require, module, exports) { 'use strict'; var BoundingDimensions=require(183 /* BoundingDimensions */); var Position=require(184 /* Position */); var React=require(103 /* React */); var TouchEventUtils=require(185 /* fbjs/lib/TouchEventUtils */); var View=require(116 /* View */); var keyMirror=require(72 /* fbjs/lib/keyMirror */); var normalizeColor=require(48 /* normalizeColor */); var queryLayoutByID=require(186 /* queryLayoutByID */); var States=keyMirror({ NOT_RESPONDER:null, RESPONDER_INACTIVE_PRESS_IN:null, RESPONDER_INACTIVE_PRESS_OUT:null, RESPONDER_ACTIVE_PRESS_IN:null, RESPONDER_ACTIVE_PRESS_OUT:null, RESPONDER_ACTIVE_LONG_PRESS_IN:null, RESPONDER_ACTIVE_LONG_PRESS_OUT:null, ERROR:null}); var IsActive={ RESPONDER_ACTIVE_PRESS_OUT:true, RESPONDER_ACTIVE_PRESS_IN:true}; var IsPressingIn={ RESPONDER_INACTIVE_PRESS_IN:true, RESPONDER_ACTIVE_PRESS_IN:true, RESPONDER_ACTIVE_LONG_PRESS_IN:true}; var IsLongPressingIn={ RESPONDER_ACTIVE_LONG_PRESS_IN:true}; var Signals=keyMirror({ DELAY:null, RESPONDER_GRANT:null, RESPONDER_RELEASE:null, RESPONDER_TERMINATED:null, ENTER_PRESS_RECT:null, LEAVE_PRESS_RECT:null, LONG_PRESS_DETECTED:null}); var Transitions={ NOT_RESPONDER:{ DELAY:States.ERROR, RESPONDER_GRANT:States.RESPONDER_INACTIVE_PRESS_IN, RESPONDER_RELEASE:States.ERROR, RESPONDER_TERMINATED:States.ERROR, ENTER_PRESS_RECT:States.ERROR, LEAVE_PRESS_RECT:States.ERROR, LONG_PRESS_DETECTED:States.ERROR}, RESPONDER_INACTIVE_PRESS_IN:{ DELAY:States.RESPONDER_ACTIVE_PRESS_IN, RESPONDER_GRANT:States.ERROR, RESPONDER_RELEASE:States.NOT_RESPONDER, RESPONDER_TERMINATED:States.NOT_RESPONDER, ENTER_PRESS_RECT:States.RESPONDER_INACTIVE_PRESS_IN, LEAVE_PRESS_RECT:States.RESPONDER_INACTIVE_PRESS_OUT, LONG_PRESS_DETECTED:States.ERROR}, RESPONDER_INACTIVE_PRESS_OUT:{ DELAY:States.RESPONDER_ACTIVE_PRESS_OUT, RESPONDER_GRANT:States.ERROR, RESPONDER_RELEASE:States.NOT_RESPONDER, RESPONDER_TERMINATED:States.NOT_RESPONDER, ENTER_PRESS_RECT:States.RESPONDER_INACTIVE_PRESS_IN, LEAVE_PRESS_RECT:States.RESPONDER_INACTIVE_PRESS_OUT, LONG_PRESS_DETECTED:States.ERROR}, RESPONDER_ACTIVE_PRESS_IN:{ DELAY:States.ERROR, RESPONDER_GRANT:States.ERROR, RESPONDER_RELEASE:States.NOT_RESPONDER, RESPONDER_TERMINATED:States.NOT_RESPONDER, ENTER_PRESS_RECT:States.RESPONDER_ACTIVE_PRESS_IN, LEAVE_PRESS_RECT:States.RESPONDER_ACTIVE_PRESS_OUT, LONG_PRESS_DETECTED:States.RESPONDER_ACTIVE_LONG_PRESS_IN}, RESPONDER_ACTIVE_PRESS_OUT:{ DELAY:States.ERROR, RESPONDER_GRANT:States.ERROR, RESPONDER_RELEASE:States.NOT_RESPONDER, RESPONDER_TERMINATED:States.NOT_RESPONDER, ENTER_PRESS_RECT:States.RESPONDER_ACTIVE_PRESS_IN, LEAVE_PRESS_RECT:States.RESPONDER_ACTIVE_PRESS_OUT, LONG_PRESS_DETECTED:States.ERROR}, RESPONDER_ACTIVE_LONG_PRESS_IN:{ DELAY:States.ERROR, RESPONDER_GRANT:States.ERROR, RESPONDER_RELEASE:States.NOT_RESPONDER, RESPONDER_TERMINATED:States.NOT_RESPONDER, ENTER_PRESS_RECT:States.RESPONDER_ACTIVE_LONG_PRESS_IN, LEAVE_PRESS_RECT:States.RESPONDER_ACTIVE_LONG_PRESS_OUT, LONG_PRESS_DETECTED:States.RESPONDER_ACTIVE_LONG_PRESS_IN}, RESPONDER_ACTIVE_LONG_PRESS_OUT:{ DELAY:States.ERROR, RESPONDER_GRANT:States.ERROR, RESPONDER_RELEASE:States.NOT_RESPONDER, RESPONDER_TERMINATED:States.NOT_RESPONDER, ENTER_PRESS_RECT:States.RESPONDER_ACTIVE_LONG_PRESS_IN, LEAVE_PRESS_RECT:States.RESPONDER_ACTIVE_LONG_PRESS_OUT, LONG_PRESS_DETECTED:States.ERROR}, error:{ DELAY:States.NOT_RESPONDER, RESPONDER_GRANT:States.RESPONDER_INACTIVE_PRESS_IN, RESPONDER_RELEASE:States.NOT_RESPONDER, RESPONDER_TERMINATED:States.NOT_RESPONDER, ENTER_PRESS_RECT:States.NOT_RESPONDER, LEAVE_PRESS_RECT:States.NOT_RESPONDER, LONG_PRESS_DETECTED:States.NOT_RESPONDER}}; var HIGHLIGHT_DELAY_MS=130; var PRESS_EXPAND_PX=20; var LONG_PRESS_THRESHOLD=500; var LONG_PRESS_DELAY_MS=LONG_PRESS_THRESHOLD-HIGHLIGHT_DELAY_MS; var LONG_PRESS_ALLOWED_MOVEMENT=10; var TouchableMixin={ componentWillUnmount:function componentWillUnmount(){ this.touchableDelayTimeout&&clearTimeout(this.touchableDelayTimeout); this.longPressDelayTimeout&&clearTimeout(this.longPressDelayTimeout); this.pressOutDelayTimeout&&clearTimeout(this.pressOutDelayTimeout); }, touchableGetInitialState:function touchableGetInitialState(){ return{ touchable:{touchState:undefined,responderID:null}}; }, touchableHandleResponderTerminationRequest:function touchableHandleResponderTerminationRequest(){ return!this.props.rejectResponderTermination; }, touchableHandleStartShouldSetResponder:function touchableHandleStartShouldSetResponder(){ return!this.props.disabled; }, touchableLongPressCancelsPress:function touchableLongPressCancelsPress(){ return true; }, touchableHandleResponderGrant:function touchableHandleResponderGrant(e){ var dispatchID=e.currentTarget; e.persist(); this.pressOutDelayTimeout&&clearTimeout(this.pressOutDelayTimeout); this.pressOutDelayTimeout=null; this.state.touchable.touchState=States.NOT_RESPONDER; this.state.touchable.responderID=dispatchID; this._receiveSignal(Signals.RESPONDER_GRANT,e); var delayMS= this.touchableGetHighlightDelayMS!==undefined? Math.max(this.touchableGetHighlightDelayMS(),0):HIGHLIGHT_DELAY_MS; delayMS=isNaN(delayMS)?HIGHLIGHT_DELAY_MS:delayMS; if(delayMS!==0){ this.touchableDelayTimeout=setTimeout( this._handleDelay.bind(this,e), delayMS); }else{ this._handleDelay(e); } var longDelayMS= this.touchableGetLongPressDelayMS!==undefined? Math.max(this.touchableGetLongPressDelayMS(),10):LONG_PRESS_DELAY_MS; longDelayMS=isNaN(longDelayMS)?LONG_PRESS_DELAY_MS:longDelayMS; this.longPressDelayTimeout=setTimeout( this._handleLongDelay.bind(this,e), longDelayMS+delayMS); }, touchableHandleResponderRelease:function touchableHandleResponderRelease(e){ this._receiveSignal(Signals.RESPONDER_RELEASE,e); }, touchableHandleResponderTerminate:function touchableHandleResponderTerminate(e){ this._receiveSignal(Signals.RESPONDER_TERMINATED,e); }, touchableHandleResponderMove:function touchableHandleResponderMove(e){ if(this.state.touchable.touchState===States.RESPONDER_INACTIVE_PRESS_IN){ return; } if(!this.state.touchable.positionOnActivate){ return; } var positionOnActivate=this.state.touchable.positionOnActivate; var dimensionsOnActivate=this.state.touchable.dimensionsOnActivate; var pressRectOffset=this.touchableGetPressRectOffset? this.touchableGetPressRectOffset():{ left:PRESS_EXPAND_PX, right:PRESS_EXPAND_PX, top:PRESS_EXPAND_PX, bottom:PRESS_EXPAND_PX}; var pressExpandLeft=pressRectOffset.left; var pressExpandTop=pressRectOffset.top; var pressExpandRight=pressRectOffset.right; var pressExpandBottom=pressRectOffset.bottom; var hitSlop=this.touchableGetHitSlop? this.touchableGetHitSlop():null; if(hitSlop){ pressExpandLeft+=hitSlop.left; pressExpandTop+=hitSlop.top; pressExpandRight+=hitSlop.right; pressExpandBottom+=hitSlop.bottom; } var touch=TouchEventUtils.extractSingleTouch(e.nativeEvent); var pageX=touch&&touch.pageX; var pageY=touch&&touch.pageY; if(this.pressInLocation){ var movedDistance=this._getDistanceBetweenPoints(pageX,pageY,this.pressInLocation.pageX,this.pressInLocation.pageY); if(movedDistance>LONG_PRESS_ALLOWED_MOVEMENT){ this._cancelLongPressDelayTimeout(); } } var isTouchWithinActive= pageX>positionOnActivate.left-pressExpandLeft&& pageY>positionOnActivate.top-pressExpandTop&& pageX< positionOnActivate.left+ dimensionsOnActivate.width+ pressExpandRight&& pageY< positionOnActivate.top+ dimensionsOnActivate.height+ pressExpandBottom; if(isTouchWithinActive){ this._receiveSignal(Signals.ENTER_PRESS_RECT,e); var curState=this.state.touchable.touchState; if(curState===States.RESPONDER_INACTIVE_PRESS_IN){ this._cancelLongPressDelayTimeout(); } }else{ this._cancelLongPressDelayTimeout(); this._receiveSignal(Signals.LEAVE_PRESS_RECT,e); } }, _remeasureMetricsOnActivation:function _remeasureMetricsOnActivation(){ queryLayoutByID( this.state.touchable.responderID, null, this._handleQueryLayout); }, _handleQueryLayout:function _handleQueryLayout(l,t,w,h,globalX,globalY){ this.state.touchable.positionOnActivate&& Position.release(this.state.touchable.positionOnActivate); this.state.touchable.dimensionsOnActivate&& BoundingDimensions.release(this.state.touchable.dimensionsOnActivate); this.state.touchable.positionOnActivate=Position.getPooled(globalX,globalY); this.state.touchable.dimensionsOnActivate=BoundingDimensions.getPooled(w,h); }, _handleDelay:function _handleDelay(e){ this.touchableDelayTimeout=null; this._receiveSignal(Signals.DELAY,e); }, _handleLongDelay:function _handleLongDelay(e){ this.longPressDelayTimeout=null; var curState=this.state.touchable.touchState; if(curState!==States.RESPONDER_ACTIVE_PRESS_IN&& curState!==States.RESPONDER_ACTIVE_LONG_PRESS_IN){ console.error('Attempted to transition from state `'+curState+'` to `'+ States.RESPONDER_ACTIVE_LONG_PRESS_IN+'`, which is not supported. This is '+ 'most likely due to `Touchable.longPressDelayTimeout` not being cancelled.'); }else{ this._receiveSignal(Signals.LONG_PRESS_DETECTED,e); } }, _receiveSignal:function _receiveSignal(signal,e){ var responderID=this.state.touchable.responderID; var curState=this.state.touchable.touchState; var nextState=Transitions[curState]&&Transitions[curState][signal]; if(!responderID&&signal===Signals.RESPONDER_RELEASE){ return; } if(!nextState){ throw new Error( 'Unrecognized signal `'+signal+'` or state `'+curState+ '` for Touchable responder `'+responderID+'`'); } if(nextState===States.ERROR){ throw new Error( 'Touchable cannot transition from `'+curState+'` to `'+signal+ '` for responder `'+responderID+'`'); } if(curState!==nextState){ this._performSideEffectsForTransition(curState,nextState,signal,e); this.state.touchable.touchState=nextState; } }, _cancelLongPressDelayTimeout:function _cancelLongPressDelayTimeout(){ this.longPressDelayTimeout&&clearTimeout(this.longPressDelayTimeout); this.longPressDelayTimeout=null; }, _isHighlight:function _isHighlight(state){ return state===States.RESPONDER_ACTIVE_PRESS_IN|| state===States.RESPONDER_ACTIVE_LONG_PRESS_IN; }, _savePressInLocation:function _savePressInLocation(e){ var touch=TouchEventUtils.extractSingleTouch(e.nativeEvent); var pageX=touch&&touch.pageX; var pageY=touch&&touch.pageY; var locationX=touch&&touch.locationX; var locationY=touch&&touch.locationY; this.pressInLocation={pageX:pageX,pageY:pageY,locationX:locationX,locationY:locationY}; }, _getDistanceBetweenPoints:function _getDistanceBetweenPoints(aX,aY,bX,bY){ var deltaX=aX-bX; var deltaY=aY-bY; return Math.sqrt(deltaX*deltaX+deltaY*deltaY); }, _performSideEffectsForTransition:function _performSideEffectsForTransition(curState,nextState,signal,e){var _this=this; var curIsHighlight=this._isHighlight(curState); var newIsHighlight=this._isHighlight(nextState); var isFinalSignal= signal===Signals.RESPONDER_TERMINATED|| signal===Signals.RESPONDER_RELEASE; if(isFinalSignal){ this._cancelLongPressDelayTimeout(); } if(!IsActive[curState]&&IsActive[nextState]){ this._remeasureMetricsOnActivation(); } if(IsPressingIn[curState]&&signal===Signals.LONG_PRESS_DETECTED){ this.touchableHandleLongPress&&this.touchableHandleLongPress(e); } if(newIsHighlight&&!curIsHighlight){ this._savePressInLocation(e); this.touchableHandleActivePressIn&&this.touchableHandleActivePressIn(e); }else if(!newIsHighlight&&curIsHighlight&&this.touchableHandleActivePressOut){ if(this.touchableGetPressOutDelayMS&&this.touchableGetPressOutDelayMS()){ this.pressOutDelayTimeout=setTimeout(function(){ _this.touchableHandleActivePressOut(e); },this.touchableGetPressOutDelayMS()); }else{ this.touchableHandleActivePressOut(e); } } if(IsPressingIn[curState]&&signal===Signals.RESPONDER_RELEASE){ var hasLongPressHandler=!!this.props.onLongPress; var pressIsLongButStillCallOnPress= IsLongPressingIn[curState]&&( !hasLongPressHandler|| !this.touchableLongPressCancelsPress()); var shouldInvokePress=!IsLongPressingIn[curState]||pressIsLongButStillCallOnPress; if(shouldInvokePress&&this.touchableHandlePress){ this.touchableHandlePress(e); } } this.touchableDelayTimeout&&clearTimeout(this.touchableDelayTimeout); this.touchableDelayTimeout=null; }}; var Touchable={ Mixin:TouchableMixin, TOUCH_TARGET_DEBUG:false, renderDebugView:function renderDebugView(_ref){var color=_ref.color;var hitSlop=_ref.hitSlop; if(!Touchable.TOUCH_TARGET_DEBUG){ return null; } if(!__DEV__){ throw Error('Touchable.TOUCH_TARGET_DEBUG should not be enabled in prod!'); } var debugHitSlopStyle={}; hitSlop=hitSlop||{top:0,bottom:0,left:0,right:0}; for(var key in hitSlop){ debugHitSlopStyle[key]=-hitSlop[key]; } var hexColor='#'+('00000000'+normalizeColor(color).toString(16)).substr(-8); return( React.createElement(View,{ pointerEvents:'none', style:babelHelpers.extends({ position:'absolute', borderColor:hexColor.slice(0,-2)+'55', borderWidth:1, borderStyle:'dashed', backgroundColor:hexColor.slice(0,-2)+'0F'}, debugHitSlopStyle)})); }}; module.exports=Touchable; }, "Touchable"); __d(183 /* BoundingDimensions */, function(global, require, module, exports) { 'use strict'; var PooledClass=require(16 /* react/lib/PooledClass */); var twoArgumentPooler=PooledClass.twoArgumentPooler; function BoundingDimensions(width,height){ this.width=width; this.height=height; } BoundingDimensions.prototype.destructor=function(){ this.width=null; this.height=null; }; BoundingDimensions.getPooledFromElement=function(element){ return BoundingDimensions.getPooled( element.offsetWidth, element.offsetHeight); }; PooledClass.addPoolingTo(BoundingDimensions,twoArgumentPooler); module.exports=BoundingDimensions; }, "BoundingDimensions"); __d(184 /* Position */, function(global, require, module, exports) { 'use strict'; var PooledClass=require(16 /* react/lib/PooledClass */); var twoArgumentPooler=PooledClass.twoArgumentPooler; function Position(left,top){ this.left=left; this.top=top; } Position.prototype.destructor=function(){ this.left=null; this.top=null; }; PooledClass.addPoolingTo(Position,twoArgumentPooler); module.exports=Position; }, "Position"); __d(185 /* fbjs/lib/TouchEventUtils.js */, function(global, require, module, exports) {"use strict"; var TouchEventUtils={ extractSingleTouch:function extractSingleTouch(nativeEvent){ var touches=nativeEvent.touches; var changedTouches=nativeEvent.changedTouches; var hasTouches=touches&&touches.length>0; var hasChangedTouches=changedTouches&&changedTouches.length>0; return!hasTouches&&hasChangedTouches?changedTouches[0]:hasTouches?touches[0]:nativeEvent; }}; module.exports=TouchEventUtils; }, "fbjs/lib/TouchEventUtils.js"); __d(186 /* queryLayoutByID */, function(global, require, module, exports) { 'use strict'; var UIManager=require(99 /* UIManager */); var queryLayoutByID=function queryLayoutByID( tag, onError, onSuccess) { if(tag==null){ return; } UIManager.measure( tag, onSuccess); }; module.exports=queryLayoutByID; }, "queryLayoutByID"); __d(187 /* DrawerLayoutAndroid */, function(global, require, module, exports) { 'use strict'; var ColorPropType=require(47 /* ColorPropType */); var NativeMethodsMixin=require(49 /* react/lib/NativeMethodsMixin */); var Platform=require(59 /* Platform */); var React=require(103 /* React */); var ReactNative=require(188 /* react/lib/ReactNative */); var ReactPropTypes=require(40 /* react/lib/ReactPropTypes */); var StatusBar=require(383 /* StatusBar */); var StyleSheet=require(104 /* StyleSheet */); var UIManager=require(99 /* UIManager */); var View=require(116 /* View */); var DrawerConsts=UIManager.AndroidDrawerLayout.Constants; var dismissKeyboard=require(384 /* dismissKeyboard */); var requireNativeComponent=require(130 /* requireNativeComponent */); var RK_DRAWER_REF='drawerlayout'; var INNERVIEW_REF='innerView'; var DRAWER_STATES=[ 'Idle', 'Dragging', 'Settling']; var DrawerLayoutAndroid=React.createClass({displayName:'DrawerLayoutAndroid', statics:{ positions:DrawerConsts.DrawerPosition}, propTypes:babelHelpers.extends({}, View.propTypes,{ keyboardDismissMode:ReactPropTypes.oneOf([ 'none', 'on-drag']), drawerBackgroundColor:ColorPropType, drawerPosition:ReactPropTypes.oneOf([ DrawerConsts.DrawerPosition.Left, DrawerConsts.DrawerPosition.Right]), drawerWidth:ReactPropTypes.number, drawerLockMode:ReactPropTypes.oneOf([ 'unlocked', 'locked-closed', 'locked-open']), onDrawerSlide:ReactPropTypes.func, onDrawerStateChanged:ReactPropTypes.func, onDrawerOpen:ReactPropTypes.func, onDrawerClose:ReactPropTypes.func, renderNavigationView:ReactPropTypes.func.isRequired, statusBarBackgroundColor:ColorPropType}), mixins:[NativeMethodsMixin], getDefaultProps:function getDefaultProps(){ return{ drawerBackgroundColor:'white'}; }, getInitialState:function getInitialState(){ return{statusBarBackgroundColor:undefined}; }, getInnerViewNode:function getInnerViewNode(){ return this.refs[INNERVIEW_REF].getInnerViewNode(); }, componentDidMount:function componentDidMount(){ this._updateStatusBarBackground(); }, componentDidReceiveProps:function componentDidReceiveProps(){ this._updateStatusBarBackground(); }, render:function render(){ var drawStatusBar=Platform.Version>=21&&this.props.statusBarBackgroundColor; var drawerViewWrapper= React.createElement(View,{ style:[ styles.drawerSubview, {width:this.props.drawerWidth,backgroundColor:this.props.drawerBackgroundColor}], collapsable:false}, this.props.renderNavigationView(), drawStatusBar&&React.createElement(View,{style:styles.drawerStatusBar})); var childrenWrapper= React.createElement(View,{ref:INNERVIEW_REF,style:styles.mainSubview,collapsable:false}, drawStatusBar&& React.createElement(StatusBar,{ translucent:true, backgroundColor:this.state.statusBarBackgroundColor}), drawStatusBar&& React.createElement(View,{style:[ styles.statusBar, {backgroundColor:this.props.statusBarBackgroundColor}]}), this.props.children); return( React.createElement(AndroidDrawerLayout,babelHelpers.extends({}, this.props,{ ref:RK_DRAWER_REF, drawerWidth:this.props.drawerWidth, drawerPosition:this.props.drawerPosition, drawerLockMode:this.props.drawerLockMode, style:[styles.base,this.props.style], onDrawerSlide:this._onDrawerSlide, onDrawerOpen:this._onDrawerOpen, onDrawerClose:this._onDrawerClose, onDrawerStateChanged:this._onDrawerStateChanged}), childrenWrapper, drawerViewWrapper)); }, _onDrawerSlide:function _onDrawerSlide(event){ if(this.props.onDrawerSlide){ this.props.onDrawerSlide(event); } if(this.props.keyboardDismissMode==='on-drag'){ dismissKeyboard(); } }, _onDrawerOpen:function _onDrawerOpen(){ if(this.props.onDrawerOpen){ this.props.onDrawerOpen(); } }, _onDrawerClose:function _onDrawerClose(){ if(this.props.onDrawerClose){ this.props.onDrawerClose(); } }, _onDrawerStateChanged:function _onDrawerStateChanged(event){ if(this.props.onDrawerStateChanged){ this.props.onDrawerStateChanged(DRAWER_STATES[event.nativeEvent.drawerState]); } }, openDrawer:function openDrawer(){ UIManager.dispatchViewManagerCommand( this._getDrawerLayoutHandle(), UIManager.AndroidDrawerLayout.Commands.openDrawer, null); }, closeDrawer:function closeDrawer(){ UIManager.dispatchViewManagerCommand( this._getDrawerLayoutHandle(), UIManager.AndroidDrawerLayout.Commands.closeDrawer, null); }, _getDrawerLayoutHandle:function _getDrawerLayoutHandle(){ return ReactNative.findNodeHandle(this.refs[RK_DRAWER_REF]); }, _updateStatusBarBackground:function _updateStatusBarBackground(){var _this=this; if(Platform.Version>=21&&this.props.statusBarBackgroundColor){ if(this.state.statusBarBackgroundColor!=='transparent'){ requestAnimationFrame(function(){ _this.setState({statusBarBackgroundColor:'transparent'}); }); } }else{ this.setState({statusBarBackgroundColor:undefined}); } }}); var styles=StyleSheet.create({ base:{ flex:1, elevation:16}, mainSubview:{ position:'absolute', top:0, left:0, right:0, bottom:0}, drawerSubview:{ position:'absolute', top:0, bottom:0}, statusBar:{ height:StatusBar.currentHeight}, drawerStatusBar:{ position:'absolute', top:0, left:0, right:0, height:StatusBar.currentHeight, backgroundColor:'rgba(0, 0, 0, 0.251)'}}); var AndroidDrawerLayout=requireNativeComponent('AndroidDrawerLayout',DrawerLayoutAndroid); module.exports=DrawerLayoutAndroid; }, "DrawerLayoutAndroid"); __d(188 /* react/lib/ReactNative.js */, function(global, require, module, exports) { 'use strict'; var ReactNativeComponentTree=require(134 /* ./ReactNativeComponentTree */); var ReactNativeDefaultInjection=require(189 /* ./ReactNativeDefaultInjection */); var ReactElement=require(19 /* ./ReactElement */); var ReactNativeMount=require(222 /* ./ReactNativeMount */); var ReactUpdates=require(145 /* ./ReactUpdates */); var findNodeHandle=require(100 /* ./findNodeHandle */); ReactNativeDefaultInjection.inject(); var render=function render(element,mountInto,callback){ return ReactNativeMount.renderComponent(element,mountInto,callback); }; var ReactNative={ hasReactNativeInitialized:false, findNodeHandle:findNodeHandle, render:render, unmountComponentAtNode:ReactNativeMount.unmountComponentAtNode, unstable_batchedUpdates:ReactUpdates.batchedUpdates, unmountComponentAtNodeAndRemoveContainer:ReactNativeMount.unmountComponentAtNodeAndRemoveContainer}; if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!=='undefined'&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject==='function'){ __REACT_DEVTOOLS_GLOBAL_HOOK__.inject({ ComponentTree:{ getClosestInstanceFromNode:function getClosestInstanceFromNode(node){ return ReactNativeComponentTree.getClosestInstanceFromNode(node); }, getNodeFromInstance:function getNodeFromInstance(inst){ while(inst._renderedComponent){ inst=inst._renderedComponent; } if(inst){ return ReactNativeComponentTree.getNodeFromInstance(inst); }else{ return null; } }}, Mount:ReactNativeMount, Reconciler:require(148 /* ./ReactReconciler */)}); } module.exports=ReactNative; }, "react/lib/ReactNative.js"); __d(189 /* react/lib/ReactNativeDefaultInjection.js */, function(global, require, module, exports) { 'use strict'; var _prodInvariant=require(17 /* ./reactProdInvariant */); require(190 /* react-native/lib/InitializeJavaScriptAppEngine */); var EventPluginHub=require(137 /* ./EventPluginHub */); var EventPluginUtils=require(139 /* ./EventPluginUtils */); var RCTEventEmitter=require(364 /* react-native/lib/RCTEventEmitter */); var ReactComponentEnvironment=require(154 /* ./ReactComponentEnvironment */); var ReactDefaultBatchingStrategy=require(366 /* ./ReactDefaultBatchingStrategy */); var ReactElement=require(19 /* ./ReactElement */); var ReactEmptyComponent=require(161 /* ./ReactEmptyComponent */); var ReactNativeBridgeEventPlugin=require(367 /* ./ReactNativeBridgeEventPlugin */); var ReactHostComponent=require(162 /* ./ReactHostComponent */); var ReactNativeComponentEnvironment=require(370 /* ./ReactNativeComponentEnvironment */); var ReactNativeComponentTree=require(134 /* ./ReactNativeComponentTree */); var ReactNativeEventEmitter=require(135 /* ./ReactNativeEventEmitter */); var ReactNativeEventPluginOrder=require(373 /* ./ReactNativeEventPluginOrder */); var ReactNativeGlobalResponderHandler=require(374 /* ./ReactNativeGlobalResponderHandler */); var ReactNativeTextComponent=require(375 /* ./ReactNativeTextComponent */); var ReactNativeTreeTraversal=require(376 /* ./ReactNativeTreeTraversal */); var ReactSimpleEmptyComponent=require(377 /* ./ReactSimpleEmptyComponent */); var ReactUpdates=require(145 /* ./ReactUpdates */); var ResponderEventPlugin=require(378 /* ./ResponderEventPlugin */); var invariant=require(18 /* fbjs/lib/invariant */); function inject(){ RCTEventEmitter.register(ReactNativeEventEmitter); EventPluginHub.injection.injectEventPluginOrder(ReactNativeEventPluginOrder); EventPluginUtils.injection.injectComponentTree(ReactNativeComponentTree); EventPluginUtils.injection.injectTreeTraversal(ReactNativeTreeTraversal); ResponderEventPlugin.injection.injectGlobalResponderHandler(ReactNativeGlobalResponderHandler); EventPluginHub.injection.injectEventPluginsByName({ 'ResponderEventPlugin':ResponderEventPlugin, 'ReactNativeBridgeEventPlugin':ReactNativeBridgeEventPlugin}); ReactUpdates.injection.injectReconcileTransaction(ReactNativeComponentEnvironment.ReactReconcileTransaction); ReactUpdates.injection.injectBatchingStrategy(ReactDefaultBatchingStrategy); ReactComponentEnvironment.injection.injectEnvironment(ReactNativeComponentEnvironment); var EmptyComponent=function EmptyComponent(instantiate){ var View=require(382 /* react-native/lib/View */); return new ReactSimpleEmptyComponent(ReactElement.createElement(View,{ collapsable:true, style:{position:'absolute'}}), instantiate); }; ReactEmptyComponent.injection.injectEmptyComponentFactory(EmptyComponent); ReactHostComponent.injection.injectTextComponentClass(ReactNativeTextComponent); ReactHostComponent.injection.injectGenericComponentClass(function(tag){ var info=''; if(typeof tag==='string'&&/^[a-z]/.test(tag)){ info+=' Each component name should start with an uppercase letter.'; } !false?process.env.NODE_ENV!=='production'?invariant(false,'Expected a component class, got %s.%s',tag,info):_prodInvariant('18',tag,info):void 0; }); } module.exports={ inject:inject}; }, "react/lib/ReactNativeDefaultInjection.js"); __d(190 /* react-native/lib/InitializeJavaScriptAppEngine.js */, function(global, require, module, exports) { 'use strict'; module.exports=require(191 /* InitializeJavaScriptAppEngine */); }, "react-native/lib/InitializeJavaScriptAppEngine.js"); __d(191 /* InitializeJavaScriptAppEngine */, function(global, require, module, exports) { require(192 /* regenerator-runtime/runtime */); if(global.GLOBAL===undefined){ global.GLOBAL=global; } if(global.window===undefined){ global.window=global; } function setUpProcess(){ global.process=global.process||{}; global.process.env=global.process.env||{}; if(!global.process.env.NODE_ENV){ global.process.env.NODE_ENV=__DEV__?'development':'production'; } } function setUpProfile(){ var Systrace=require(63 /* Systrace */); Systrace.setEnabled(global.__RCTProfileIsProfiling||false); } function setUpConsole(){ var ExceptionsManager=require(193 /* ExceptionsManager */); ExceptionsManager.installConsoleErrorReporter(); if(__DEV__){ require(201 /* RCTLog */); } } function defineProperty(object,name,newValue){ var descriptor=Object.getOwnPropertyDescriptor(object,name); if(descriptor){ var backupName='original'+name[0].toUpperCase()+name.substr(1); Object.defineProperty(object,backupName,babelHelpers.extends({}, descriptor,{ value:object[name]})); }var _ref= descriptor||{};var enumerable=_ref.enumerable;var writable=_ref.writable; Object.defineProperty(object,name,{ configurable:true, enumerable:enumerable!==false, writable:writable!==false, value:newValue}); } function defineLazyProperty( object, name, getNewValue) { var defineLazyObjectProperty=require(202 /* defineLazyObjectProperty */); var descriptor=getPropertyDescriptor(object,name); if(descriptor){ var backupName='original'+name[0].toUpperCase()+name.substr(1); Object.defineProperty(object,backupName,descriptor); } defineLazyObjectProperty(object,name,{ get:getNewValue, enumerable:descriptor?descriptor.enumerable!==false:true, writable:descriptor?descriptor.writable!==false:true}); } function setUpErrorHandler(){ if(global.__fbDisableExceptionsManager){ return; } function handleError(e,isFatal){ try{ require(193 /* ExceptionsManager */).handleException(e,isFatal); }catch(ee){ console.log('Failed to print error: ',ee.message); throw e; } } var ErrorUtils=require(70 /* ErrorUtils */); ErrorUtils.setGlobalHandler(handleError); } function setUpTimers(){ var defineLazyTimer=function defineLazyTimer(name){ defineLazyProperty(global,name,function(){return require(76 /* JSTimers */)[name];}); }; defineLazyTimer('setTimeout'); defineLazyTimer('setInterval'); defineLazyTimer('setImmediate'); defineLazyTimer('clearTimeout'); defineLazyTimer('clearInterval'); defineLazyTimer('clearImmediate'); defineLazyTimer('requestAnimationFrame'); defineLazyTimer('cancelAnimationFrame'); defineLazyTimer('requestIdleCallback'); defineLazyTimer('cancelIdleCallback'); } function setUpAlert(){ if(!global.alert){ global.alert=function(text){ require(203 /* Alert */).alert('Alert',''+text); }; } } function setUpPromise(){ defineLazyProperty(global,'Promise',function(){return require(205 /* Promise */);}); } function setUpXHR(){ defineLazyProperty(global,'XMLHttpRequest',function(){return require(211 /* XMLHttpRequest */);}); defineLazyProperty(global,'FormData',function(){return require(213 /* FormData */);}); defineLazyProperty(global,'fetch',function(){return require(198 /* fetch */).fetch;}); defineLazyProperty(global,'Headers',function(){return require(198 /* fetch */).Headers;}); defineLazyProperty(global,'Request',function(){return require(198 /* fetch */).Request;}); defineLazyProperty(global,'Response',function(){return require(198 /* fetch */).Response;}); defineLazyProperty(global,'WebSocket',function(){return require(80 /* WebSocket */);}); } function setUpGeolocation(){ if(global.navigator===undefined){ Object.defineProperty(global,'navigator',{ configurable:true, enumerable:true, writable:true, value:{}}); }var _global= global;var navigator=_global.navigator; Object.defineProperty(navigator,'product',{value:'ReactNative'}); defineLazyProperty(navigator,'geolocation',function(){return require(214 /* Geolocation */);}); } function setUpCollections(){ defineProperty(global,'Map',require(215 /* Map */)); defineProperty(global,'Set',require(220 /* Set */)); } function setUpDevTools(){ if(__DEV__){ if(!window.document){ var setupDevtools=require(221 /* setupDevtools */); setupDevtools(); } require(225 /* RCTDebugComponentOwnership */); require(226 /* react-transform-hmr */); } } function getPropertyDescriptor(object,name){ while(object){ var descriptor=Object.getOwnPropertyDescriptor(object,name); if(descriptor){ return descriptor; } object=Object.getPrototypeOf(object); } } setUpProcess(); setUpProfile(); setUpConsole(); setUpTimers(); setUpAlert(); setUpPromise(); setUpErrorHandler(); setUpXHR(); setUpGeolocation(); setUpCollections(); setUpDevTools(); require(86 /* RCTDeviceEventEmitter */); require(362 /* RCTNativeAppEventEmitter */); require(363 /* PerformanceLogger */); }, "InitializeJavaScriptAppEngine"); __d(192 /* regenerator-runtime/runtime.js */, function(global, require, module, exports) { !function(global){ "use strict"; var hasOwn=Object.prototype.hasOwnProperty; var undefined; var $Symbol=typeof Symbol==="function"?Symbol:{}; var iteratorSymbol=$Symbol.iterator||"@@iterator"; var toStringTagSymbol=$Symbol.toStringTag||"@@toStringTag"; var inModule=typeof module==="object"; var runtime=global.regeneratorRuntime; if(runtime){ if(inModule){ module.exports=runtime; } return; } runtime=global.regeneratorRuntime=inModule?module.exports:{}; function wrap(innerFn,outerFn,self,tryLocsList){ var generator=Object.create((outerFn||Generator).prototype); var context=new Context(tryLocsList||[]); generator._invoke=makeInvokeMethod(innerFn,self,context); return generator; } runtime.wrap=wrap; function tryCatch(fn,obj,arg){ try{ return{type:"normal",arg:fn.call(obj,arg)}; }catch(err){ return{type:"throw",arg:err}; } } var GenStateSuspendedStart="suspendedStart"; var GenStateSuspendedYield="suspendedYield"; var GenStateExecuting="executing"; var GenStateCompleted="completed"; var ContinueSentinel={}; function Generator(){} function GeneratorFunction(){} function GeneratorFunctionPrototype(){} var Gp=GeneratorFunctionPrototype.prototype=Generator.prototype; GeneratorFunction.prototype=Gp.constructor=GeneratorFunctionPrototype; GeneratorFunctionPrototype.constructor=GeneratorFunction; GeneratorFunctionPrototype[toStringTagSymbol]=GeneratorFunction.displayName="GeneratorFunction"; function defineIteratorMethods(prototype){ ["next","throw","return"].forEach(function(method){ prototype[method]=function(arg){ return this._invoke(method,arg); }; }); } runtime.isGeneratorFunction=function(genFun){ var ctor=typeof genFun==="function"&&genFun.constructor; return ctor? ctor===GeneratorFunction|| (ctor.displayName||ctor.name)==="GeneratorFunction": false; }; runtime.mark=function(genFun){ if(Object.setPrototypeOf){ Object.setPrototypeOf(genFun,GeneratorFunctionPrototype); }else{ genFun.__proto__=GeneratorFunctionPrototype; if(!(toStringTagSymbol in genFun)){ genFun[toStringTagSymbol]="GeneratorFunction"; } } genFun.prototype=Object.create(Gp); return genFun; }; runtime.awrap=function(arg){ return new AwaitArgument(arg); }; function AwaitArgument(arg){ this.arg=arg; } function AsyncIterator(generator){ function invoke(method,arg,resolve,reject){ var record=tryCatch(generator[method],generator,arg); if(record.type==="throw"){ reject(record.arg); }else{ var result=record.arg; var value=result.value; if(value instanceof AwaitArgument){ return Promise.resolve(value.arg).then(function(value){ invoke("next",value,resolve,reject); },function(err){ invoke("throw",err,resolve,reject); }); } return Promise.resolve(value).then(function(unwrapped){ result.value=unwrapped; resolve(result); },reject); } } if(typeof process==="object"&&process.domain){ invoke=process.domain.bind(invoke); } var previousPromise; function enqueue(method,arg){ function callInvokeWithMethodAndArg(){ return new Promise(function(resolve,reject){ invoke(method,arg,resolve,reject); }); } return previousPromise= previousPromise?previousPromise.then( callInvokeWithMethodAndArg, callInvokeWithMethodAndArg): callInvokeWithMethodAndArg(); } this._invoke=enqueue; } defineIteratorMethods(AsyncIterator.prototype); runtime.async=function(innerFn,outerFn,self,tryLocsList){ var iter=new AsyncIterator( wrap(innerFn,outerFn,self,tryLocsList)); return runtime.isGeneratorFunction(outerFn)? iter: iter.next().then(function(result){ return result.done?result.value:iter.next(); }); }; function makeInvokeMethod(innerFn,self,context){ var state=GenStateSuspendedStart; return function invoke(method,arg){ if(state===GenStateExecuting){ throw new Error("Generator is already running"); } if(state===GenStateCompleted){ if(method==="throw"){ throw arg; } return doneResult(); } while(true){ var delegate=context.delegate; if(delegate){ if(method==="return"|| method==="throw"&&delegate.iterator[method]===undefined){ context.delegate=null; var returnMethod=delegate.iterator["return"]; if(returnMethod){ var record=tryCatch(returnMethod,delegate.iterator,arg); if(record.type==="throw"){ method="throw"; arg=record.arg; continue; } } if(method==="return"){ continue; } } var record=tryCatch( delegate.iterator[method], delegate.iterator, arg); if(record.type==="throw"){ context.delegate=null; method="throw"; arg=record.arg; continue; } method="next"; arg=undefined; var info=record.arg; if(info.done){ context[delegate.resultName]=info.value; context.next=delegate.nextLoc; }else{ state=GenStateSuspendedYield; return info; } context.delegate=null; } if(method==="next"){ context.sent=context._sent=arg; }else if(method==="throw"){ if(state===GenStateSuspendedStart){ state=GenStateCompleted; throw arg; } if(context.dispatchException(arg)){ method="next"; arg=undefined; } }else if(method==="return"){ context.abrupt("return",arg); } state=GenStateExecuting; var record=tryCatch(innerFn,self,context); if(record.type==="normal"){ state=context.done? GenStateCompleted: GenStateSuspendedYield; var info={ value:record.arg, done:context.done}; if(record.arg===ContinueSentinel){ if(context.delegate&&method==="next"){ arg=undefined; } }else{ return info; } }else if(record.type==="throw"){ state=GenStateCompleted; method="throw"; arg=record.arg; } } }; } defineIteratorMethods(Gp); Gp[iteratorSymbol]=function(){ return this; }; Gp[toStringTagSymbol]="Generator"; Gp.toString=function(){ return"[object Generator]"; }; function pushTryEntry(locs){ var entry={tryLoc:locs[0]}; if(1 in locs){ entry.catchLoc=locs[1]; } if(2 in locs){ entry.finallyLoc=locs[2]; entry.afterLoc=locs[3]; } this.tryEntries.push(entry); } function resetTryEntry(entry){ var record=entry.completion||{}; record.type="normal"; delete record.arg; entry.completion=record; } function Context(tryLocsList){ this.tryEntries=[{tryLoc:"root"}]; tryLocsList.forEach(pushTryEntry,this); this.reset(true); } runtime.keys=function(object){ var keys=[]; for(var key in object){ keys.push(key); } keys.reverse(); return function next(){ while(keys.length){ var key=keys.pop(); if(key in object){ next.value=key; next.done=false; return next; } } next.done=true; return next; }; }; function values(iterable){ if(iterable){ var iteratorMethod=iterable[iteratorSymbol]; if(iteratorMethod){ return iteratorMethod.call(iterable); } if(typeof iterable.next==="function"){ return iterable; } if(!isNaN(iterable.length)){ var i=-1,next=function next(){ while(++i=0;--i){ var entry=this.tryEntries[i]; var record=entry.completion; if(entry.tryLoc==="root"){ return handle("end"); } if(entry.tryLoc<=this.prev){ var hasCatch=hasOwn.call(entry,"catchLoc"); var hasFinally=hasOwn.call(entry,"finallyLoc"); if(hasCatch&&hasFinally){ if(this.prev=0;--i){ var entry=this.tryEntries[i]; if(entry.tryLoc<=this.prev&& hasOwn.call(entry,"finallyLoc")&& this.prev=0;--i){ var entry=this.tryEntries[i]; if(entry.finallyLoc===finallyLoc){ this.complete(entry.completion,entry.afterLoc); resetTryEntry(entry); return ContinueSentinel; } } }, "catch":function _catch(tryLoc){ for(var i=this.tryEntries.length-1;i>=0;--i){ var entry=this.tryEntries[i]; if(entry.tryLoc===tryLoc){ var record=entry.completion; if(record.type==="throw"){ var thrown=record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield:function delegateYield(iterable,resultName,nextLoc){ this.delegate={ iterator:values(iterable), resultName:resultName, nextLoc:nextLoc}; return ContinueSentinel; }}; }( typeof global==="object"?global: typeof window==="object"?window: typeof self==="object"?self:this); }, "regenerator-runtime/runtime.js"); __d(193 /* ExceptionsManager */, function(global, require, module, exports) { 'use strict'; var exceptionID=0; function reportException(e,isFatal){ var parseErrorStack=require(194 /* parseErrorStack */); var symbolicateStackTrace=require(197 /* symbolicateStackTrace */); var RCTExceptionsManager=require(60 /* NativeModules */).ExceptionsManager; var currentExceptionID=++exceptionID; if(RCTExceptionsManager){ var stack=parseErrorStack(e); if(isFatal){ RCTExceptionsManager.reportFatalException(e.message,stack,currentExceptionID); }else{ RCTExceptionsManager.reportSoftException(e.message,stack,currentExceptionID); } if(__DEV__){ symbolicateStackTrace(stack).then( function(prettyStack){ if(prettyStack){ RCTExceptionsManager.updateExceptionMessage(e.message,prettyStack,currentExceptionID); }else{ throw new Error('The stack is null'); } }). catch( function(error){return( console.warn('Unable to symbolicate stack trace: '+error.message));}); } } } function handleException(e,isFatal){ if(!e.message){ e=new Error(e); } (console._errorOriginal||console.error)(e.message); reportException(e,isFatal); } function installConsoleErrorReporter(){ if(console._errorOriginal){ return; } console._errorOriginal=console.error.bind(console); console.error=function reactConsoleError(){ console._errorOriginal.apply(null,arguments); if(!console.reportErrorsAsExceptions){ return; } if(arguments[0]&&arguments[0].stack){ reportException(arguments[0],false); }else{ var stringifySafe=require(77 /* stringifySafe */); var str=Array.prototype.map.call(arguments,stringifySafe).join(', '); if(str.slice(0,10)==='"Warning: '){ return; } var error=new Error('console.error: '+str); error.framesToPop=1; reportException(error,false); } }; if(console.reportErrorsAsExceptions===undefined){ console.reportErrorsAsExceptions=true; } } module.exports={handleException:handleException,installConsoleErrorReporter:installConsoleErrorReporter}; }, "ExceptionsManager"); __d(194 /* parseErrorStack */, function(global, require, module, exports) { 'use strict'; var stacktraceParser=require(195 /* stacktrace-parser */); function parseErrorStack(e){ if(!e||!e.stack){ return[]; } var stack=Array.isArray(e.stack)?e.stack:stacktraceParser.parse(e.stack); var framesToPop=e.framesToPop||0; while(framesToPop--){ stack.shift(); } return stack; } module.exports=parseErrorStack; }, "parseErrorStack"); __d(195 /* stacktrace-parser/index.js */, function(global, require, module, exports) {module.exports=require(196 /* ./lib/stacktrace-parser.js */); }, "stacktrace-parser/index.js"); __d(196 /* stacktrace-parser/lib/stacktrace-parser.js */, function(global, require, module, exports) { var UNKNOWN_FUNCTION=''; var StackTraceParser={ parse:function parse(stackString){ var chrome=/^\s*at (?:(?:(?:Anonymous function)?|((?:\[object object\])?\S+(?: \[as \S+\])?)) )?\(?((?:file|http|https):.*?):(\d+)(?::(\d+))?\)?\s*$/i, gecko=/^(?:\s*([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i, node=/^\s*at (?:((?:\[object object\])?\S+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i, lines=stackString.split('\n'), stack=[], parts, element; for(var i=0,j=lines.length;i-1?upcased:method; } function Request(input,options){ options=options||{}; var body=options.body; if(Request.prototype.isPrototypeOf(input)){ if(input.bodyUsed){ throw new TypeError('Already read'); } this.url=input.url; this.credentials=input.credentials; if(!options.headers){ this.headers=new Headers(input.headers); } this.method=input.method; this.mode=input.mode; if(!body){ body=input._bodyInit; input.bodyUsed=true; } }else{ this.url=input; } this.credentials=options.credentials||this.credentials||'omit'; if(options.headers||!this.headers){ this.headers=new Headers(options.headers); } this.method=normalizeMethod(options.method||this.method||'GET'); this.mode=options.mode||this.mode||null; this.referrer=null; if((this.method==='GET'||this.method==='HEAD')&&body){ throw new TypeError('Body not allowed for GET or HEAD requests'); } this._initBody(body); } Request.prototype.clone=function(){ return new Request(this); }; function decode(body){ var form=new FormData(); body.trim().split('&').forEach(function(bytes){ if(bytes){ var split=bytes.split('='); var name=split.shift().replace(/\+/g,' '); var value=split.join('=').replace(/\+/g,' '); form.append(decodeURIComponent(name),decodeURIComponent(value)); } }); return form; } function headers(xhr){ var head=new Headers(); var pairs=(xhr.getAllResponseHeaders()||'').trim().split('\n'); pairs.forEach(function(header){ var split=header.trim().split(':'); var key=split.shift().trim(); var value=split.join(':').trim(); head.append(key,value); }); return head; } Body.call(Request.prototype); function Response(bodyInit,options){ if(!options){ options={}; } this.type='default'; this.status=options.status; this.ok=this.status>=200&&this.status<300; this.statusText=options.statusText; this.headers=options.headers instanceof Headers?options.headers:new Headers(options.headers); this.url=options.url||''; this._initBody(bodyInit); } Body.call(Response.prototype); Response.prototype.clone=function(){ return new Response(this._bodyInit,{ status:this.status, statusText:this.statusText, headers:new Headers(this.headers), url:this.url}); }; Response.error=function(){ var response=new Response(null,{status:0,statusText:''}); response.type='error'; return response; }; var redirectStatuses=[301,302,303,307,308]; Response.redirect=function(url,status){ if(redirectStatuses.indexOf(status)===-1){ throw new RangeError('Invalid status code'); } return new Response(null,{status:status,headers:{location:url}}); }; self.Headers=Headers; self.Request=Request; self.Response=Response; self.fetch=function(input,init){ return new Promise(function(resolve,reject){ var request; if(Request.prototype.isPrototypeOf(input)&&!init){ request=input; }else{ request=new Request(input,init); } var xhr=new XMLHttpRequest(); function responseURL(){ if('responseURL'in xhr){ return xhr.responseURL; } if(/^X-Request-URL:/m.test(xhr.getAllResponseHeaders())){ return xhr.getResponseHeader('X-Request-URL'); } return; } xhr.onload=function(){ var options={ status:xhr.status, statusText:xhr.statusText, headers:headers(xhr), url:responseURL()}; var body='response'in xhr?xhr.response:xhr.responseText; resolve(new Response(body,options)); }; xhr.onerror=function(){ reject(new TypeError('Network request failed')); }; xhr.ontimeout=function(){ reject(new TypeError('Network request failed')); }; xhr.open(request.method,request.url,true); if(request.credentials==='include'){ xhr.withCredentials=true; } if('responseType'in xhr&&support.blob){ xhr.responseType='blob'; } request.headers.forEach(function(value,name){ xhr.setRequestHeader(name,value); }); xhr.send(typeof request._bodyInit==='undefined'?null:request._bodyInit); }); }; self.fetch.polyfill=true; })(typeof self!=='undefined'?self:this); }, "whatwg-fetch/fetch.js"); __d(200 /* getDevServer */, function(global, require, module, exports) { 'use strict';var _require= require(60 /* NativeModules */);var SourceCode=_require.SourceCode; var _cachedDevServerURL=void 0; var FALLBACK='http://localhost:8081/'; function getDevServer(){ if(_cachedDevServerURL===undefined){ var match=SourceCode.scriptURL&&SourceCode.scriptURL.match(/^https?:\/\/.*?\//); _cachedDevServerURL=match?match[0]:null; } return{ url:_cachedDevServerURL||FALLBACK, bundleLoadedFromServer:_cachedDevServerURL!==null}; } module.exports=getDevServer; }, "getDevServer"); __d(201 /* RCTLog */, function(global, require, module, exports) { 'use strict'; var BatchedBridge=require(61 /* BatchedBridge */); var invariant=require(56 /* fbjs/lib/invariant */); var levelsMap={ log:'log', info:'info', warn:'warn', error:'error', fatal:'error'};var RCTLog=function(){function RCTLog(){babelHelpers.classCallCheck(this,RCTLog);}babelHelpers.createClass(RCTLog,null,[{key:'logIfNoNativeHook',value:function logIfNoNativeHook() { var args=Array.prototype.slice.call(arguments); var level=args.shift(); var logFn=levelsMap[level]; invariant( logFn, 'Level "'+level+'" not one of '+Object.keys(levelsMap)); if(typeof global.nativeLoggingHook==='undefined'){ console[logFn].apply(console,args); } return true; }}]);return RCTLog;}(); BatchedBridge.registerCallableModule( 'RCTLog', RCTLog); module.exports=RCTLog; }, "RCTLog"); __d(202 /* defineLazyObjectProperty */, function(global, require, module, exports) { 'use strict'; function defineLazyObjectProperty( object, name, descriptor) {var get=descriptor.get; var enumerable=descriptor.enumerable!==false; var writable=descriptor.writable!==false; var value=void 0; var valueSet=false; function getValue(){ if(!valueSet){ setValue(get()); } return value; } function setValue(newValue){ value=newValue; valueSet=true; Object.defineProperty(object,name,{ value:newValue, configurable:true, enumerable:enumerable, writable:writable}); } Object.defineProperty(object,name,{ get:getValue, set:setValue, configurable:true, enumerable:enumerable}); } module.exports=defineLazyObjectProperty; }, "defineLazyObjectProperty"); __d(203 /* Alert */, function(global, require, module, exports) { 'use strict'; var AlertIOS=require(204 /* AlertIOS */); var Platform=require(59 /* Platform */); var DialogModuleAndroid=require(60 /* NativeModules */).DialogManagerAndroid;var Alert=function(){function Alert(){babelHelpers.classCallCheck(this,Alert);}babelHelpers.createClass(Alert,null,[{key:'alert',value:function alert( title, message, buttons, type) { if(Platform.OS==='ios'){ if(typeof type!=='undefined'){ console.warn('Alert.alert() with a 4th "type" parameter is deprecated and will be removed. Use AlertIOS.prompt() instead.'); AlertIOS.alert(title,message,buttons,type); return; } AlertIOS.alert(title,message,buttons); }else if(Platform.OS==='android'){ AlertAndroid.alert(title,message,buttons); } }}]);return Alert;}();var AlertAndroid=function(){function AlertAndroid(){babelHelpers.classCallCheck(this,AlertAndroid);}babelHelpers.createClass(AlertAndroid,null,[{key:'alert',value:function alert( title, message, buttons) { var config={ title:title||'', message:message||''}; var validButtons=buttons?buttons.slice(0,3):[{text:'OK'}]; var buttonPositive=validButtons.pop(); var buttonNegative=validButtons.pop(); var buttonNeutral=validButtons.pop(); if(buttonNeutral){ config=babelHelpers.extends({},config,{buttonNeutral:buttonNeutral.text||''}); } if(buttonNegative){ config=babelHelpers.extends({},config,{buttonNegative:buttonNegative.text||''}); } if(buttonPositive){ config=babelHelpers.extends({},config,{buttonPositive:buttonPositive.text||''}); } DialogModuleAndroid.showAlert( config, function(errorMessage){return console.warn(errorMessage);}, function(action,buttonKey){ if(action!==DialogModuleAndroid.buttonClicked){ return; } if(buttonKey===DialogModuleAndroid.buttonNeutral){ buttonNeutral.onPress&&buttonNeutral.onPress(); }else if(buttonKey===DialogModuleAndroid.buttonNegative){ buttonNegative.onPress&&buttonNegative.onPress(); }else if(buttonKey===DialogModuleAndroid.buttonPositive){ buttonPositive.onPress&&buttonPositive.onPress(); } }); }}]);return AlertAndroid;}(); module.exports=Alert; }, "Alert"); __d(204 /* AlertIOS */, function(global, require, module, exports) { 'use strict'; var RCTAlertManager=require(60 /* NativeModules */).AlertManager;var AlertIOS=function(){function AlertIOS(){babelHelpers.classCallCheck(this,AlertIOS);}babelHelpers.createClass(AlertIOS,null,[{key:'alert',value:function alert( title, message, callbackOrButtons, type) { if(typeof type!=='undefined'){ console.warn('AlertIOS.alert() with a 4th "type" parameter is deprecated and will be removed. Use AlertIOS.prompt() instead.'); this.prompt(title,message,callbackOrButtons,type); return; } this.prompt(title,message,callbackOrButtons,'default'); }},{key:'prompt',value:function prompt( title, message, callbackOrButtons) {var type=arguments.length<=3||arguments[3]===undefined?'plain-text':arguments[3];var defaultValue=arguments[4]; if(typeof type==='function'){ console.warn( 'You passed a callback function as the "type" argument to AlertIOS.prompt(). React Native is '+ 'assuming you want to use the deprecated AlertIOS.prompt(title, defaultValue, buttons, callback) '+ 'signature. The current signature is AlertIOS.prompt(title, message, callbackOrButtons, type, defaultValue) '+ 'and the old syntax will be removed in a future version.'); var callback=type; var defaultValue=message; RCTAlertManager.alertWithArgs({ title:title||undefined, type:'plain-text', defaultValue:defaultValue}, function(id,value){ callback(value); }); return; } var callbacks=[]; var buttons=[]; var cancelButtonKey; var destructiveButtonKey; if(typeof callbackOrButtons==='function'){ callbacks=[callbackOrButtons]; }else if(callbackOrButtons instanceof Array){ callbackOrButtons.forEach(function(btn,index){ callbacks[index]=btn.onPress; if(btn.style==='cancel'){ cancelButtonKey=String(index); }else if(btn.style==='destructive'){ destructiveButtonKey=String(index); } if(btn.text||index<(callbackOrButtons||[]).length-1){ var btnDef={}; btnDef[index]=btn.text||''; buttons.push(btnDef); } }); } RCTAlertManager.alertWithArgs({ title:title||undefined, message:message||undefined, buttons:buttons, type:type||undefined, defaultValue:defaultValue, cancelButtonKey:cancelButtonKey, destructiveButtonKey:destructiveButtonKey}, function(id,value){ var cb=callbacks[id]; cb&&cb(value); }); }}]);return AlertIOS;}(); module.exports=AlertIOS; }, "AlertIOS"); __d(205 /* Promise */, function(global, require, module, exports) { 'use strict'; var Promise=require(206 /* fbjs/lib/Promise.native */); if(__DEV__){ require(210 /* promise/setimmediate/rejection-tracking */).enable({ allRejections:true, onUnhandled:function onUnhandled(id,error){var message=error.message;var stack=error.stack; var warning= 'Possible Unhandled Promise Rejection (id: '+id+'):\n'+( message==null?'':message+'\n')+( stack==null?'':stack); console.warn(warning); }, onHandled:function onHandled(id){ var warning= 'Promise Rejection Handled (id: '+id+')\n'+ 'This means you can ignore any previous messages of the form '+('"Possible Unhandled Promise Rejection (id: '+ id+'):"'); console.warn(warning); }}); } module.exports=Promise; }, "Promise"); __d(206 /* fbjs/lib/Promise.native.js */, function(global, require, module, exports) { 'use strict'; var Promise=require(207 /* promise/setimmediate/es6-extensions */); require(209 /* promise/setimmediate/done */); Promise.prototype['finally']=function(onSettled){ return this.then(onSettled,onSettled); }; module.exports=Promise; }, "fbjs/lib/Promise.native.js"); __d(207 /* promise/setimmediate/es6-extensions.js */, function(global, require, module, exports) {'use strict'; var Promise=require(208 /* ./core.js */); module.exports=Promise; var TRUE=valuePromise(true); var FALSE=valuePromise(false); var NULL=valuePromise(null); var UNDEFINED=valuePromise(undefined); var ZERO=valuePromise(0); var EMPTYSTRING=valuePromise(''); function valuePromise(value){ var p=new Promise(Promise._61); p._81=1; p._65=value; return p; } Promise.resolve=function(value){ if(value instanceof Promise)return value; if(value===null)return NULL; if(value===undefined)return UNDEFINED; if(value===true)return TRUE; if(value===false)return FALSE; if(value===0)return ZERO; if(value==='')return EMPTYSTRING; if(typeof value==='object'||typeof value==='function'){ try{ var then=value.then; if(typeof then==='function'){ return new Promise(then.bind(value)); } }catch(ex){ return new Promise(function(resolve,reject){ reject(ex); }); } } return valuePromise(value); }; Promise.all=function(arr){ var args=Array.prototype.slice.call(arr); return new Promise(function(resolve,reject){ if(args.length===0)return resolve([]); var remaining=args.length; function res(i,val){ if(val&&(typeof val==='object'||typeof val==='function')){ if(val instanceof Promise&&val.then===Promise.prototype.then){ while(val._81===3){ val=val._65; } if(val._81===1)return res(i,val._65); if(val._81===2)reject(val._65); val.then(function(val){ res(i,val); },reject); return; }else{ var then=val.then; if(typeof then==='function'){ var p=new Promise(then.bind(val)); p.then(function(val){ res(i,val); },reject); return; } } } args[i]=val; if(--remaining===0){ resolve(args); } } for(var i=0;i=0, loaded:loaded, total:total}); }},{key:'__didCompleteResponse',value:function __didCompleteResponse( requestId, error, timeOutError) { if(requestId===this._requestId){ if(error){ if(this._responseType===''||this._responseType==='text'){ this._response=error; } this._hasError=true; if(timeOutError){ this._timedOut=true; } } this._clearSubscriptions(); this._requestId=null; this.setReadyState(this.DONE); } }},{key:'_clearSubscriptions',value:function _clearSubscriptions() { (this._subscriptions||[]).forEach(function(sub){ sub.remove(); }); this._subscriptions=[]; }},{key:'getAllResponseHeaders',value:function getAllResponseHeaders() { if(!this.responseHeaders){ return null; } var headers=this.responseHeaders||{}; return Object.keys(headers).map(function(headerName){ return headerName+': '+headers[headerName]; }).join('\n'); }},{key:'getResponseHeader',value:function getResponseHeader( header){ var value=this._lowerCaseResponseHeaders[header.toLowerCase()]; return value!==undefined?value:null; }},{key:'setRequestHeader',value:function setRequestHeader( header,value){ if(this.readyState!==this.OPENED){ throw new Error('Request has not been opened'); } this._headers[header.toLowerCase()]=value; }},{key:'setTrackingName',value:function setTrackingName( trackingName){ this._trackingName=trackingName; return this; }},{key:'open',value:function open( method,url,async){ if(this.readyState!==this.UNSENT){ throw new Error('Cannot open, already sending'); } if(async!==undefined&&!async){ throw new Error('Synchronous http requests are not supported'); } if(!url){ throw new Error('Cannot load an empty url'); } this._method=method.toUpperCase(); this._url=url; this._aborted=false; this.setReadyState(this.OPENED); }},{key:'send',value:function send( data){var _this3=this; if(this.readyState!==this.OPENED){ throw new Error('Request has not been opened'); } if(this._sent){ throw new Error('Request has already been sent'); } this._sent=true; var incrementalEvents=this._incrementalEvents|| !!this.onreadystatechange|| !!this.onprogress; this._subscriptions.push(RCTNetworking.addListener( 'didSendNetworkData', function(args){return _this3.__didUploadProgress.apply(_this3,babelHelpers.toConsumableArray(args));})); this._subscriptions.push(RCTNetworking.addListener( 'didReceiveNetworkResponse', function(args){return _this3.__didReceiveResponse.apply(_this3,babelHelpers.toConsumableArray(args));})); this._subscriptions.push(RCTNetworking.addListener( 'didReceiveNetworkData', function(args){return _this3.__didReceiveData.apply(_this3,babelHelpers.toConsumableArray(args));})); this._subscriptions.push(RCTNetworking.addListener( 'didReceiveNetworkIncrementalData', function(args){return _this3.__didReceiveIncrementalData.apply(_this3,babelHelpers.toConsumableArray(args));})); this._subscriptions.push(RCTNetworking.addListener( 'didReceiveNetworkDataProgress', function(args){return _this3.__didReceiveDataProgress.apply(_this3,babelHelpers.toConsumableArray(args));})); this._subscriptions.push(RCTNetworking.addListener( 'didCompleteNetworkResponse', function(args){return _this3.__didCompleteResponse.apply(_this3,babelHelpers.toConsumableArray(args));})); var nativeResponseType='text'; if(this._responseType==='arraybuffer'||this._responseType==='blob'){ nativeResponseType='base64'; } invariant(this._method,'Request method needs to be defined.'); invariant(this._url,'Request URL needs to be defined.'); RCTNetworking.sendRequest( this._method, this._trackingName, this._url, this._headers, data, nativeResponseType, incrementalEvents, this.timeout, this.__didCreateRequest.bind(this)); }},{key:'abort',value:function abort() { this._aborted=true; if(this._requestId){ RCTNetworking.abortRequest(this._requestId); } if(!(this.readyState===this.UNSENT|| this.readyState===this.OPENED&&!this._sent|| this.readyState===this.DONE)){ this._reset(); this.setReadyState(this.DONE); } this._reset(); }},{key:'setResponseHeaders',value:function setResponseHeaders( responseHeaders){ this.responseHeaders=responseHeaders||null; var headers=responseHeaders||{}; this._lowerCaseResponseHeaders= Object.keys(headers).reduce(function(lcaseHeaders,headerName){ lcaseHeaders[headerName.toLowerCase()]=headers[headerName]; return lcaseHeaders; },{}); }},{key:'setReadyState',value:function setReadyState( newState){ this.readyState=newState; this.dispatchEvent({type:'readystatechange'}); if(newState===this.DONE&&!this._aborted){ if(this._hasError){ if(this._timedOut){ this.dispatchEvent({type:'timeout'}); }else{ this.dispatchEvent({type:'error'}); } }else{ this.dispatchEvent({type:'load'}); } } }},{key:'addEventListener',value:function addEventListener( type,listener){ if(type==='readystatechange'||type==='progress'){ this._incrementalEvents=true; } babelHelpers.get(Object.getPrototypeOf(XMLHttpRequest.prototype),'addEventListener',this).call(this,type,listener); }},{key:'responseType',get:function get(){return this._responseType;},set:function set(responseType){if(this._sent){throw new Error('Failed to set the \'responseType\' property on \'XMLHttpRequest\': The '+'response type cannot be set after the request has been sent.');}if(!SUPPORTED_RESPONSE_TYPES.hasOwnProperty(responseType)){warning(false,'The provided value \''+responseType+'\' is not a valid \'responseType\'.');return;}invariant(SUPPORTED_RESPONSE_TYPES[responseType]||responseType==='document','The provided value \''+responseType+'\' is unsupported in this environment.');this._responseType=responseType;}},{key:'responseText',get:function get(){if(this._responseType!==''&&this._responseType!=='text'){throw new Error("The 'responseText' property is only available if 'responseType' "+('is set to \'\' or \'text\', but it is \''+this._responseType+'\'.'));}if(this.readyState=len){ this._iteratedObject=undefined; return createIterResultObject(undefined,true); } this._nextIndex=index+1; if(kind===KIND_KEY){ return createIterResultObject(index,false); }else if(kind===KIND_VALUE){ return createIterResultObject(array[index],false); }else if(kind===KIND_KEY_VAL){ return createIterResultObject([index,array[index]],false); } }},{key: '@@iterator',value:function iterator(){ return this; }}]);return ArrayIterator;}();var StringIterator=function(){ function StringIterator(string){babelHelpers.classCallCheck(this,StringIterator); if(typeof string!=='string'){ throw new TypeError('Object is not a string'); } this._iteratedString=string; this._nextIndex=0; }babelHelpers.createClass(StringIterator,[{key:'next',value:function next() { if(!this instanceof StringIterator){ throw new TypeError('Object is not a StringIterator'); } if(this._iteratedString==null){ return createIterResultObject(undefined,true); } var index=this._nextIndex; var s=this._iteratedString; var len=s.length; if(index>=len){ this._iteratedString=undefined; return createIterResultObject(undefined,true); } var ret; var first=s.charCodeAt(index); if(first<0xD800||first>0xDBFF||index+1===len){ ret=s[index]; }else{ var second=s.charCodeAt(index+1); if(second<0xDC00||second>0xDFFF){ ret=s[index]; }else{ ret=s[index]+s[index+1]; } } this._nextIndex=index+ret.length; return createIterResultObject(ret,false); }},{key: '@@iterator',value:function iterator(){ return this; }}]);return StringIterator;}(); function createIterResultObject(value,done){ return{value:value,done:done}; } return function(object,kind){ if(typeof object==='string'){ return new StringIterator(object); }else if(Array.isArray(object)){ return new ArrayIterator(object,kind||KIND_VALUE); }else{ return object[ITERATOR_SYMBOL](); } }; }(); }else{ return function(object){ return object[ITERATOR_SYMBOL](); }; } }(); babelHelpers.extends(toIterator,{ KIND_KEY:KIND_KEY, KIND_VALUE:KIND_VALUE, KIND_KEY_VAL:KIND_KEY_VAL, ITERATOR_SYMBOL:ITERATOR_SYMBOL}); module.exports=toIterator; }, "toIterator"); __d(219 /* _shouldPolyfillES6Collection */, function(global, require, module, exports) { function shouldPolyfillES6Collection(collectionName){ var Collection=global[collectionName]; if(Collection==null){ return true; } if(typeof global.Symbol!=='function'){ return true; } var proto=Collection.prototype; return Collection==null|| typeof Collection!=='function'|| typeof proto.clear!=='function'|| new Collection().size!==0|| typeof proto.keys!=='function'|| typeof proto.forEach!=='function'; } module.exports=shouldPolyfillES6Collection; }, "_shouldPolyfillES6Collection"); __d(220 /* Set */, function(global, require, module, exports) { var Map=require(215 /* Map */); var toIterator=require(218 /* toIterator */); var _shouldPolyfillES6Collection=require(219 /* _shouldPolyfillES6Collection */); module.exports=function(global,undefined){ if(!_shouldPolyfillES6Collection('Set')){ return global.Set; }var Set=function(){ function Set(iterable){babelHelpers.classCallCheck(this,Set); if(this==null|| typeof this!=='object'&&typeof this!=='function'){ throw new TypeError('Wrong set object type.'); } initSet(this); if(iterable!=null){ var it=toIterator(iterable); var next; while(!(next=it.next()).done){ this.add(next.value); } } }babelHelpers.createClass(Set,[{key:'add',value:function add( value){ this._map.set(value,value); this.size=this._map.size; return this; }},{key:'clear',value:function clear() { initSet(this); }},{key:'delete',value:function _delete( value){ var ret=this._map.delete(value); this.size=this._map.size; return ret; }},{key:'entries',value:function entries() { return this._map.entries(); }},{key:'forEach',value:function forEach( callback){ var thisArg=arguments[1]; var it=this._map.keys(); var next; while(!(next=it.next()).done){ callback.call(thisArg,next.value,next.value,this); } }},{key:'has',value:function has( value){ return this._map.has(value); }},{key:'values',value:function values() { return this._map.values(); }}]);return Set;}(); Set.prototype[toIterator.ITERATOR_SYMBOL]=Set.prototype.values; Set.prototype.keys=Set.prototype.values; function initSet(set){ set._map=new Map(); set.size=set._map.size; } return Set; }(Function('return this')()); }, "Set"); __d(221 /* setupDevtools */, function(global, require, module, exports) { 'use strict'; var Platform=require(59 /* Platform */); var NativeModules=require(60 /* NativeModules */); function setupDevtools(){ var messageListeners=[]; var closeListeners=[]; var hostname='localhost'; if(Platform.OS==='android'&&NativeModules.AndroidConstants){ hostname=NativeModules.AndroidConstants.ServerHost.split(':')[0]; } var ws=new window.WebSocket('ws://'+hostname+':8097/devtools'); var FOR_BACKEND={ resolveRNStyle:require(55 /* flattenStyle */), wall:{ listen:function listen(fn){ messageListeners.push(fn); }, onClose:function onClose(fn){ closeListeners.push(fn); }, send:function send(data){ ws.send(JSON.stringify(data)); }}}; ws.onclose=handleClose; ws.onerror=handleClose; ws.onopen=function(){ tryToConnect(); }; var hasClosed=false; function handleClose(){ if(!hasClosed){ hasClosed=true; setTimeout(setupDevtools,2000); closeListeners.forEach(function(fn){return fn();}); } } function tryToConnect(){ ws.send('attach:agent'); var _interval=setInterval(function(){return ws.send('attach:agent');},500); ws.onmessage=function(evt){ if(evt.data.indexOf('eval:')===0){ clearInterval(_interval); initialize(evt.data.slice('eval:'.length)); } }; } function initialize(text){ try{ eval(text); }catch(e){ console.error('Failed to eval: '+e.message); return; } var ReactNativeComponentTree=require(134 /* react/lib/ReactNativeComponentTree */); window.__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({ ComponentTree:{ getClosestInstanceFromNode:function getClosestInstanceFromNode(node){ return ReactNativeComponentTree.getClosestInstanceFromNode(node); }, getNodeFromInstance:function getNodeFromInstance(inst){ while(inst._renderedComponent){ inst=inst._renderedComponent; } if(inst){ return ReactNativeComponentTree.getNodeFromInstance(inst); }else{ return null; } }}, Mount:require(222 /* react/lib/ReactNativeMount */), Reconciler:require(148 /* react/lib/ReactReconciler */)}); ws.onmessage=handleMessage; } function handleMessage(evt){ var data; try{ data=JSON.parse(evt.data); }catch(e){ return console.error('failed to parse json: '+evt.data); } if(data.$close||data.$error){ closeListeners.forEach(function(fn){return fn();}); window.__REACT_DEVTOOLS_GLOBAL_HOOK__.emit('shutdown'); tryToConnect(); return; } if(data.$open){ return; } messageListeners.forEach(function(fn){ try{ fn(data); }catch(e){ console.log(data); throw e; } }); } } module.exports=setupDevtools; }, "setupDevtools"); __d(222 /* react/lib/ReactNativeMount.js */, function(global, require, module, exports) { 'use strict'; var ReactElement=require(19 /* ./ReactElement */); var ReactInstrumentation=require(151 /* ./ReactInstrumentation */); var ReactNativeContainerInfo=require(223 /* ./ReactNativeContainerInfo */); var ReactNativeTagHandles=require(144 /* ./ReactNativeTagHandles */); var ReactReconciler=require(148 /* ./ReactReconciler */); var ReactUpdateQueue=require(224 /* ./ReactUpdateQueue */); var ReactUpdates=require(145 /* ./ReactUpdates */); var UIManager=require(102 /* react-native/lib/UIManager */); var emptyObject=require(29 /* fbjs/lib/emptyObject */); var instantiateReactComponent=require(157 /* ./instantiateReactComponent */); var shouldUpdateReactComponent=require(160 /* ./shouldUpdateReactComponent */); var TopLevelWrapper=function TopLevelWrapper(){}; TopLevelWrapper.prototype.isReactComponent={}; if(process.env.NODE_ENV!=='production'){ TopLevelWrapper.displayName='TopLevelWrapper'; } TopLevelWrapper.prototype.render=function(){ return this.props; }; function mountComponentIntoNode(componentInstance,containerTag,transaction){ var markup=ReactReconciler.mountComponent(componentInstance,transaction,null,ReactNativeContainerInfo(containerTag),emptyObject); componentInstance._renderedComponent._topLevelWrapper=componentInstance; ReactNativeMount._mountImageIntoNode(markup,containerTag); } function batchedMountComponentIntoNode(componentInstance,containerTag){ var transaction=ReactUpdates.ReactReconcileTransaction.getPooled(); transaction.perform(mountComponentIntoNode,null,componentInstance,containerTag,transaction); ReactUpdates.ReactReconcileTransaction.release(transaction); } var ReactNativeMount={ _instancesByContainerID:{}, findNodeHandle:require(100 /* ./findNodeHandle */), renderComponent:function renderComponent(nextElement,containerTag,callback){ var nextWrappedElement=new ReactElement(TopLevelWrapper,null,null,null,null,null,nextElement); var topRootNodeID=containerTag; var prevComponent=ReactNativeMount._instancesByContainerID[topRootNodeID]; if(prevComponent){ var prevWrappedElement=prevComponent._currentElement; var prevElement=prevWrappedElement.props; if(shouldUpdateReactComponent(prevElement,nextElement)){ ReactUpdateQueue.enqueueElementInternal(prevComponent,nextWrappedElement,emptyObject); if(callback){ ReactUpdateQueue.enqueueCallbackInternal(prevComponent,callback); } return prevComponent; }else{ ReactNativeMount.unmountComponentAtNode(containerTag); } } if(!ReactNativeTagHandles.reactTagIsNativeTopRootID(containerTag)){ console.error('You cannot render into anything but a top root'); return null; } ReactNativeTagHandles.assertRootTag(containerTag); var instance=instantiateReactComponent(nextWrappedElement,false); ReactNativeMount._instancesByContainerID[containerTag]=instance; ReactUpdates.batchedUpdates(batchedMountComponentIntoNode,instance,containerTag); if(process.env.NODE_ENV!=='production'){ ReactInstrumentation.debugTool.onMountRootComponent(instance._renderedComponent._debugID); } var component=instance.getPublicInstance(); if(callback){ callback.call(component); } return component; }, _mountImageIntoNode:function _mountImageIntoNode(mountImage,containerID){ var childTag=mountImage; UIManager.setChildren(containerID,[childTag]); }, unmountComponentAtNodeAndRemoveContainer:function unmountComponentAtNodeAndRemoveContainer(containerTag){ ReactNativeMount.unmountComponentAtNode(containerTag); UIManager.removeRootView(containerTag); }, unmountComponentAtNode:function unmountComponentAtNode(containerTag){ if(!ReactNativeTagHandles.reactTagIsNativeTopRootID(containerTag)){ console.error('You cannot render into anything but a top root'); return false; } var instance=ReactNativeMount._instancesByContainerID[containerTag]; if(!instance){ return false; } if(process.env.NODE_ENV!=='production'){ ReactInstrumentation.debugTool.onBeginFlush(); } ReactNativeMount.unmountComponentFromNode(instance,containerTag); delete ReactNativeMount._instancesByContainerID[containerTag]; if(process.env.NODE_ENV!=='production'){ ReactInstrumentation.debugTool.onEndFlush(); } return true; }, unmountComponentFromNode:function unmountComponentFromNode(instance,containerID){ ReactReconciler.unmountComponent(instance); UIManager.removeSubviewsFromContainerWithID(containerID); }}; module.exports=ReactNativeMount; }, "react/lib/ReactNativeMount.js"); __d(223 /* react/lib/ReactNativeContainerInfo.js */, function(global, require, module, exports) { 'use strict'; function ReactNativeContainerInfo(tag){ var info={ _tag:tag}; return info; } module.exports=ReactNativeContainerInfo; }, "react/lib/ReactNativeContainerInfo.js"); __d(224 /* react/lib/ReactUpdateQueue.js */, function(global, require, module, exports) { 'use strict'; var _prodInvariant=require(17 /* ./reactProdInvariant */); var ReactCurrentOwner=require(20 /* ./ReactCurrentOwner */); var ReactInstanceMap=require(101 /* ./ReactInstanceMap */); var ReactInstrumentation=require(151 /* ./ReactInstrumentation */); var ReactUpdates=require(145 /* ./ReactUpdates */); var invariant=require(18 /* fbjs/lib/invariant */); var warning=require(21 /* fbjs/lib/warning */); function enqueueUpdate(internalInstance){ ReactUpdates.enqueueUpdate(internalInstance); } function formatUnexpectedArgument(arg){ var type=typeof arg; if(type!=='object'){ return type; } var displayName=arg.constructor&&arg.constructor.name||type; var keys=Object.keys(arg); if(keys.length>0&&keys.length<20){ return displayName+' (keys: '+keys.join(', ')+')'; } return displayName; } function getInternalInstanceReadyForUpdate(publicInstance,callerName){ var internalInstance=ReactInstanceMap.get(publicInstance); if(!internalInstance){ if(process.env.NODE_ENV!=='production'){ process.env.NODE_ENV!=='production'?warning(!callerName,'%s(...): Can only update a mounted or mounting component. '+'This usually means you called %s() on an unmounted component. '+'This is a no-op. Please check the code for the %s component.',callerName,callerName,publicInstance.constructor.displayName):void 0; } return null; } if(process.env.NODE_ENV!=='production'){ process.env.NODE_ENV!=='production'?warning(ReactCurrentOwner.current==null,'%s(...): Cannot update during an existing state transition (such as '+'within `render` or another component\'s constructor). Render methods '+'should be a pure function of props and state; constructor '+'side-effects are an anti-pattern, but can be moved to '+'`componentWillMount`.',callerName):void 0; } return internalInstance; } var ReactUpdateQueue={ isMounted:function isMounted(publicInstance){ if(process.env.NODE_ENV!=='production'){ var owner=ReactCurrentOwner.current; if(owner!==null){ process.env.NODE_ENV!=='production'?warning(owner._warnedAboutRefsInRender,'%s is accessing isMounted inside its render() function. '+'render() should be a pure function of props and state. It should '+'never access something that requires stale data from the previous '+'render, such as refs. Move this logic to componentDidMount and '+'componentDidUpdate instead.',owner.getName()||'A component'):void 0; owner._warnedAboutRefsInRender=true; } } var internalInstance=ReactInstanceMap.get(publicInstance); if(internalInstance){ return!!internalInstance._renderedComponent; }else{ return false; } }, enqueueCallback:function enqueueCallback(publicInstance,callback,callerName){ ReactUpdateQueue.validateCallback(callback,callerName); var internalInstance=getInternalInstanceReadyForUpdate(publicInstance); if(!internalInstance){ return null; } if(internalInstance._pendingCallbacks){ internalInstance._pendingCallbacks.push(callback); }else{ internalInstance._pendingCallbacks=[callback]; } enqueueUpdate(internalInstance); }, enqueueCallbackInternal:function enqueueCallbackInternal(internalInstance,callback){ if(internalInstance._pendingCallbacks){ internalInstance._pendingCallbacks.push(callback); }else{ internalInstance._pendingCallbacks=[callback]; } enqueueUpdate(internalInstance); }, enqueueForceUpdate:function enqueueForceUpdate(publicInstance){ var internalInstance=getInternalInstanceReadyForUpdate(publicInstance,'forceUpdate'); if(!internalInstance){ return; } internalInstance._pendingForceUpdate=true; enqueueUpdate(internalInstance); }, enqueueReplaceState:function enqueueReplaceState(publicInstance,completeState){ var internalInstance=getInternalInstanceReadyForUpdate(publicInstance,'replaceState'); if(!internalInstance){ return; } internalInstance._pendingStateQueue=[completeState]; internalInstance._pendingReplaceState=true; enqueueUpdate(internalInstance); }, enqueueSetState:function enqueueSetState(publicInstance,partialState){ if(process.env.NODE_ENV!=='production'){ ReactInstrumentation.debugTool.onSetState(); process.env.NODE_ENV!=='production'?warning(partialState!=null,'setState(...): You passed an undefined or null state object; '+'instead, use forceUpdate().'):void 0; } var internalInstance=getInternalInstanceReadyForUpdate(publicInstance,'setState'); if(!internalInstance){ return; } var queue=internalInstance._pendingStateQueue||(internalInstance._pendingStateQueue=[]); queue.push(partialState); enqueueUpdate(internalInstance); }, enqueueElementInternal:function enqueueElementInternal(internalInstance,nextElement,nextContext){ internalInstance._pendingElement=nextElement; internalInstance._context=nextContext; enqueueUpdate(internalInstance); }, validateCallback:function validateCallback(callback,callerName){ !(!callback||typeof callback==='function')?process.env.NODE_ENV!=='production'?invariant(false,'%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.',callerName,formatUnexpectedArgument(callback)):_prodInvariant('122',callerName,formatUnexpectedArgument(callback)):void 0; }}; module.exports=ReactUpdateQueue; }, "react/lib/ReactUpdateQueue.js"); __d(225 /* RCTDebugComponentOwnership */, function(global, require, module, exports) { 'use strict'; var BatchedBridge=require(61 /* BatchedBridge */); var RCTDebugComponentOwnership={ getOwnerHierarchy:function getOwnerHierarchy(requestID,tag){ throw new Error( 'This seems to be unused. Will disable until it is needed again.'); }}; BatchedBridge.registerCallableModule( 'RCTDebugComponentOwnership', RCTDebugComponentOwnership); module.exports=RCTDebugComponentOwnership; }, "RCTDebugComponentOwnership"); __d(226 /* react-transform-hmr/lib/index.js */, function(global, require, module, exports) {'use strict'; Object.defineProperty(exports,'__esModule',{ value:true}); var _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');}};}(); exports['default']=proxyReactComponents; function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{'default':obj};} var _reactProxy=require(227 /* react-proxy */); var _globalWindow=require(361 /* global/window */); var _globalWindow2=_interopRequireDefault(_globalWindow); var componentProxies=undefined; if(_globalWindow2['default'].__reactComponentProxies){ componentProxies=_globalWindow2['default'].__reactComponentProxies; }else{ componentProxies={}; Object.defineProperty(_globalWindow2['default'],'__reactComponentProxies',{ configurable:true, enumerable:false, writable:false, value:componentProxies}); } function proxyReactComponents(_ref){ var filename=_ref.filename; var components=_ref.components; var imports=_ref.imports; var locals=_ref.locals; var _imports=_slicedToArray(imports,1); var React=_imports[0]; var _locals=_slicedToArray(locals,1); var hot=_locals[0].hot; if(!React.Component){ throw new Error('imports[0] for react-transform-hmr does not look like React.'); } if(!hot||typeof hot.accept!=='function'){ throw new Error('locals[0] does not appear to be a `module` object with Hot Module '+'replacement API enabled. You should disable react-transform-hmr in '+'production by using `env` section in Babel configuration. See the '+'example in README: https://github.com/gaearon/react-transform-hmr'); } if(Object.keys(components).some(function(key){ return!components[key].isInFunction; })){ hot.accept(function(err){ if(err){ console.warn('[React Transform HMR] There was an error updating '+filename+':'); console.error(err); } }); } var forceUpdate=(0,_reactProxy.getForceUpdate)(React); return function wrapWithProxy(ReactClass,uniqueId){ var _components$uniqueId=components[uniqueId]; var _components$uniqueId$isInFunction=_components$uniqueId.isInFunction; var isInFunction=_components$uniqueId$isInFunction===undefined?false:_components$uniqueId$isInFunction; var _components$uniqueId$displayName=_components$uniqueId.displayName; var displayName=_components$uniqueId$displayName===undefined?uniqueId:_components$uniqueId$displayName; if(isInFunction){ return ReactClass; } var globalUniqueId=filename+'$'+uniqueId; if(componentProxies[globalUniqueId]){ (function(){ console.info('[React Transform HMR] Patching '+displayName); var instances=componentProxies[globalUniqueId].update(ReactClass); setTimeout(function(){ return instances.forEach(forceUpdate); }); })(); }else{ componentProxies[globalUniqueId]=(0,_reactProxy.createProxy)(ReactClass); } return componentProxies[globalUniqueId].get(); }; } module.exports=exports['default']; }, "react-transform-hmr/lib/index.js"); __d(227 /* react-proxy/modules/index.js */, function(global, require, module, exports) {'use strict'; Object.defineProperty(exports,"__esModule",{ value:true}); exports.getForceUpdate=exports.createProxy=undefined; var _supportsProtoAssignment=require(228 /* ./supportsProtoAssignment */); var _supportsProtoAssignment2=_interopRequireDefault(_supportsProtoAssignment); var _createClassProxy=require(229 /* ./createClassProxy */); var _createClassProxy2=_interopRequireDefault(_createClassProxy); var _reactDeepForceUpdate=require(360 /* react-deep-force-update */); var _reactDeepForceUpdate2=_interopRequireDefault(_reactDeepForceUpdate); function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};} if(!(0,_supportsProtoAssignment2.default)()){ console.warn('This JavaScript environment does not support __proto__. '+'This means that react-proxy is unable to proxy React components. '+'Features that rely on react-proxy, such as react-transform-hmr, '+'will not function as expected.'); } exports.createProxy=_createClassProxy2.default; exports.getForceUpdate=_reactDeepForceUpdate2.default; }, "react-proxy/modules/index.js"); __d(228 /* react-proxy/modules/supportsProtoAssignment.js */, function(global, require, module, exports) {"use strict"; Object.defineProperty(exports,"__esModule",{ value:true}); exports.default=supportsProtoAssignment; var x={}; var y={supports:true}; try{ x.__proto__=y; }catch(err){} function supportsProtoAssignment(){ return x.supports||false; }; }, "react-proxy/modules/supportsProtoAssignment.js"); __d(229 /* react-proxy/modules/createClassProxy.js */, function(global, require, module, exports) {'use strict'; Object.defineProperty(exports,"__esModule",{ value:true}); var _extends=Object.assign||function(target){for(var i=1;i-1){ return; } context[key]=instance[key]; }); })(); } } try{ ProxyComponent=new Function('factory','instantiate','return function '+(InitialComponent.name||'ProxyComponent')+'() {\n return instantiate(factory, this, arguments);\n }')(function(){ return CurrentComponent; },instantiate); }catch(err){ ProxyComponent=function ProxyComponent(){ return instantiate(function(){ return CurrentComponent; },this,arguments); }; } ProxyComponent.prototype=prototypeProxy.get(); ProxyComponent.toString=function toString(){ return CurrentComponent.toString(); }; function update(NextComponent){ if(typeof NextComponent!=='function'){ throw new Error('Expected a constructor.'); } var existingProxy=findProxy(NextComponent); if(existingProxy){ return update(existingProxy.__getCurrent()); } CurrentComponent=NextComponent; var mountedInstances=prototypeProxy.update(NextComponent.prototype); ProxyComponent.prototype.constructor=ProxyComponent; ProxyComponent.__proto__=NextComponent.__proto__; Object.getOwnPropertyNames(NextComponent).forEach(function(key){ if(RESERVED_STATICS.indexOf(key)>-1){ return; } var staticDescriptor=_extends({},Object.getOwnPropertyDescriptor(NextComponent,key),{ configurable:true}); if(!wasStaticModifiedByUser(key)){ Object.defineProperty(ProxyComponent,key,staticDescriptor); staticDescriptors[key]=staticDescriptor; } }); Object.getOwnPropertyNames(ProxyComponent).forEach(function(key){ if(RESERVED_STATICS.indexOf(key)>-1){ return; } if(NextComponent.hasOwnProperty(key)){ return; } var descriptor=Object.getOwnPropertyDescriptor(ProxyComponent,key); if(descriptor&&!descriptor.configurable){ return; } if(!wasStaticModifiedByUser(key)){ delete ProxyComponent[key]; delete staticDescriptors[key]; } }); ProxyComponent.displayName=NextComponent.displayName||NextComponent.name; mountedInstances.forEach(_bindAutoBindMethods2.default); mountedInstances.forEach(_deleteUnknownAutoBindMethods2.default); return mountedInstances; }; function get(){ return ProxyComponent; } function getCurrent(){ return CurrentComponent; } update(InitialComponent); var proxy={get:get,update:update}; addProxy(ProxyComponent,proxy); Object.defineProperty(proxy,'__getCurrent',{ configurable:false, writable:false, enumerable:false, value:getCurrent}); return proxy; } function createFallback(Component){ var CurrentComponent=Component; return{ get:function get(){ return CurrentComponent; }, update:function update(NextComponent){ CurrentComponent=NextComponent; }}; } function createClassProxy(Component){ return Component.__proto__&&(0,_supportsProtoAssignment2.default)()?proxyClass(Component):createFallback(Component); } }, "react-proxy/modules/createClassProxy.js"); __d(230 /* lodash/find.js */, function(global, require, module, exports) {var createFind=require(231 /* ./_createFind */), findIndex=require(334 /* ./findIndex */); var find=createFind(findIndex); module.exports=find; }, "lodash/find.js"); __d(231 /* lodash/_createFind.js */, function(global, require, module, exports) {var baseIteratee=require(232 /* ./_baseIteratee */), isArrayLike=require(294 /* ./isArrayLike */), keys=require(289 /* ./keys */); function createFind(findIndexFunc){ return function(collection,predicate,fromIndex){ var iterable=Object(collection); if(!isArrayLike(collection)){ var iteratee=baseIteratee(predicate,3); collection=keys(collection); predicate=function predicate(key){return iteratee(iterable[key],key,iterable);}; } var index=findIndexFunc(collection,predicate,fromIndex); return index>-1?iterable[iteratee?collection[index]:index]:undefined; }; } module.exports=createFind; }, "lodash/_createFind.js"); __d(232 /* lodash/_baseIteratee.js */, function(global, require, module, exports) {var baseMatches=require(233 /* ./_baseMatches */), baseMatchesProperty=require(316 /* ./_baseMatchesProperty */), identity=require(330 /* ./identity */), isArray=require(297 /* ./isArray */), property=require(331 /* ./property */); function baseIteratee(value){ if(typeof value=='function'){ return value; } if(value==null){ return identity; } if(typeof value=='object'){ return isArray(value)? baseMatchesProperty(value[0],value[1]): baseMatches(value); } return property(value); } module.exports=baseIteratee; }, "lodash/_baseIteratee.js"); __d(233 /* lodash/_baseMatches.js */, function(global, require, module, exports) {var baseIsMatch=require(234 /* ./_baseIsMatch */), getMatchData=require(313 /* ./_getMatchData */), matchesStrictComparable=require(315 /* ./_matchesStrictComparable */); function baseMatches(source){ var matchData=getMatchData(source); if(matchData.length==1&&matchData[0][2]){ return matchesStrictComparable(matchData[0][0],matchData[0][1]); } return function(object){ return object===source||baseIsMatch(object,source,matchData); }; } module.exports=baseMatches; }, "lodash/_baseMatches.js"); __d(234 /* lodash/_baseIsMatch.js */, function(global, require, module, exports) {var Stack=require(235 /* ./_Stack */), baseIsEqual=require(276 /* ./_baseIsEqual */); var UNORDERED_COMPARE_FLAG=1, PARTIAL_COMPARE_FLAG=2; function baseIsMatch(object,source,matchData,customizer){ var index=matchData.length, length=index, noCustomizer=!customizer; if(object==null){ return!length; } object=Object(object); while(index--){ var data=matchData[index]; if(noCustomizer&&data[2]? data[1]!==object[data[0]]: !(data[0]in object)) { return false; } } while(++index-1; } module.exports=listCacheHas; }, "lodash/_listCacheHas.js"); __d(243 /* lodash/_listCacheSet.js */, function(global, require, module, exports) {var assocIndexOf=require(239 /* ./_assocIndexOf */); function listCacheSet(key,value){ var data=this.__data__, index=assocIndexOf(data,key); if(index<0){ data.push([key,value]); }else{ data[index][1]=value; } return this; } module.exports=listCacheSet; }, "lodash/_listCacheSet.js"); __d(244 /* lodash/_stackClear.js */, function(global, require, module, exports) {var ListCache=require(236 /* ./_ListCache */); function stackClear(){ this.__data__=new ListCache(); } module.exports=stackClear; }, "lodash/_stackClear.js"); __d(245 /* lodash/_stackDelete.js */, function(global, require, module, exports) { function stackDelete(key){ return this.__data__['delete'](key); } module.exports=stackDelete; }, "lodash/_stackDelete.js"); __d(246 /* lodash/_stackGet.js */, function(global, require, module, exports) { function stackGet(key){ return this.__data__.get(key); } module.exports=stackGet; }, "lodash/_stackGet.js"); __d(247 /* lodash/_stackHas.js */, function(global, require, module, exports) { function stackHas(key){ return this.__data__.has(key); } module.exports=stackHas; }, "lodash/_stackHas.js"); __d(248 /* lodash/_stackSet.js */, function(global, require, module, exports) {var ListCache=require(236 /* ./_ListCache */), Map=require(249 /* ./_Map */), MapCache=require(261 /* ./_MapCache */); var LARGE_ARRAY_SIZE=200; function stackSet(key,value){ var cache=this.__data__; if(cache instanceof ListCache){ var pairs=cache.__data__; if(!Map||pairs.lengtharrLength)){ return false; } var stacked=stack.get(array); if(stacked&&stack.get(other)){ return stacked==other; } var index=-1, result=true, seen=bitmask&UNORDERED_COMPARE_FLAG?new SetCache():undefined; stack.set(array,other); stack.set(other,array); while(++index-1&&value%1==0&&value<=MAX_SAFE_INTEGER; } module.exports=isLength; }, "lodash/isLength.js"); __d(296 /* lodash/isObjectLike.js */, function(global, require, module, exports) { function isObjectLike(value){ return!!value&&typeof value=='object'; } module.exports=isObjectLike; }, "lodash/isObjectLike.js"); __d(297 /* lodash/isArray.js */, function(global, require, module, exports) { var isArray=Array.isArray; module.exports=isArray; }, "lodash/isArray.js"); __d(298 /* lodash/_isIndex.js */, function(global, require, module, exports) { var MAX_SAFE_INTEGER=9007199254740991; var reIsUint=/^(?:0|[1-9]\d*)$/; function isIndex(value,length){ length=length==null?MAX_SAFE_INTEGER:length; return!!length&&( typeof value=='number'||reIsUint.test(value))&& value>-1&&value%1==0&&value'; } }; } function proxyMethod(name){ var proxiedMethod=function proxiedMethod(){ if(typeof current[name]==='function'){ return current[name].apply(this,arguments); } }; (0,_assign2.default)(proxiedMethod,current[name]); proxiedMethod.toString=proxyToString(name); return proxiedMethod; } function proxiedComponentDidMount(){ mountedInstances.push(this); if(typeof current.componentDidMount==='function'){ return current.componentDidMount.apply(this,arguments); } } proxiedComponentDidMount.toString=proxyToString('componentDidMount'); function proxiedComponentWillUnmount(){ var index=mountedInstances.indexOf(this); if(index!==-1){ mountedInstances.splice(index,1); } if(typeof current.componentWillUnmount==='function'){ return current.componentWillUnmount.apply(this,arguments); } } proxiedComponentWillUnmount.toString=proxyToString('componentWillUnmount'); function defineProxyProperty(name,descriptor){ Object.defineProperty(proxy,name,descriptor); } function defineProxyPropertyWithValue(name,value){ var _ref=Object.getOwnPropertyDescriptor(current,name)||{}; var _ref$enumerable=_ref.enumerable; var enumerable=_ref$enumerable===undefined?false:_ref$enumerable; var _ref$writable=_ref.writable; var writable=_ref$writable===undefined?true:_ref$writable; defineProxyProperty(name,{ configurable:true, enumerable:enumerable, writable:writable, value:value}); } function createAutoBindMap(){ if(!current.__reactAutoBindMap){ return; } var __reactAutoBindMap={}; for(var name in current.__reactAutoBindMap){ if(typeof proxy[name]==='function'&¤t.__reactAutoBindMap.hasOwnProperty(name)){ __reactAutoBindMap[name]=proxy[name]; } } return __reactAutoBindMap; } function createAutoBindPairs(){ var __reactAutoBindPairs=[]; for(var i=0;i1?sources[length-1]:undefined, guard=length>2?sources[2]:undefined; customizer=assigner.length>3&&typeof customizer=='function'?( length--,customizer): undefined; if(guard&&isIterateeCall(sources[0],sources[1],guard)){ customizer=length<3?undefined:customizer; length=1; } object=Object(object); while(++index=LARGE_ARRAY_SIZE){ includes=cacheHas; isCommon=false; values=new SetCache(values); } outer: while(++index-1; } module.exports=arrayIncludes; }, "lodash/_arrayIncludes.js"); __d(350 /* lodash/_baseIndexOf.js */, function(global, require, module, exports) {var baseFindIndex=require(335 /* ./_baseFindIndex */), baseIsNaN=require(351 /* ./_baseIsNaN */); function baseIndexOf(array,value,fromIndex){ if(value!==value){ return baseFindIndex(array,baseIsNaN,fromIndex); } var index=fromIndex-1, length=array.length; while(++index0&&predicate(value)){ if(depth>1){ baseFlatten(value,depth-1,predicate,isStrict,result); }else{ arrayPush(result,value); } }else if(!isStrict){ result[result.length]=value; } } return result; } module.exports=baseFlatten; }, "lodash/_baseFlatten.js"); __d(356 /* lodash/_arrayPush.js */, function(global, require, module, exports) { function arrayPush(array,values){ var index=-1, length=values.length, offset=array.length; while(++index=0){ return false; } if(component[name].__reactBoundArguments!==null){ return false; } return true; } function shouldDeleteModernInstanceMethod(component,name){ var prototype=component.constructor.prototype; var prototypeDescriptor=Object.getOwnPropertyDescriptor(prototype,name); if(!prototypeDescriptor||!prototypeDescriptor.get){ return false; } if(prototypeDescriptor.get().length!==component[name].length){ return false; } return true; } function shouldDeleteInstanceMethod(component,name){ var descriptor=Object.getOwnPropertyDescriptor(component,name); if(typeof descriptor.value!=='function'){ return; } if(component.__reactAutoBindMap||component.__reactAutoBindPairs){ return shouldDeleteClassicInstanceMethod(component,name); }else{ return shouldDeleteModernInstanceMethod(component,name); } } function deleteUnknownAutoBindMethods(component){ var names=Object.getOwnPropertyNames(component); names.forEach(function(name){ if(shouldDeleteInstanceMethod(component,name)){ delete component[name]; } }); } }, "react-proxy/modules/deleteUnknownAutoBindMethods.js"); __d(360 /* react-deep-force-update/lib/index.js */, function(global, require, module, exports) {"use strict"; exports.__esModule=true; exports["default"]=getForceUpdate; function traverseRenderedChildren(internalInstance,callback,argument){ callback(internalInstance,argument); if(internalInstance._renderedComponent){ traverseRenderedChildren(internalInstance._renderedComponent,callback,argument); }else{ for(var key in internalInstance._renderedChildren){ if(internalInstance._renderedChildren.hasOwnProperty(key)){ traverseRenderedChildren(internalInstance._renderedChildren[key],callback,argument); } } } } function setPendingForceUpdate(internalInstance){ if(internalInstance._pendingForceUpdate===false){ internalInstance._pendingForceUpdate=true; } } function forceUpdateIfPending(internalInstance,React){ if(internalInstance._pendingForceUpdate===true){ var publicInstance=internalInstance._instance; React.Component.prototype.forceUpdate.call(publicInstance); } } function getForceUpdate(React){ return function(instance){ var internalInstance=instance._reactInternalInstance; traverseRenderedChildren(internalInstance,setPendingForceUpdate); traverseRenderedChildren(internalInstance,forceUpdateIfPending,React); }; } module.exports=exports["default"]; }, "react-deep-force-update/lib/index.js"); __d(361 /* global/window.js */, function(global, require, module, exports) {if(typeof window!=="undefined"){ module.exports=window; }else if(typeof global!=="undefined"){ module.exports=global; }else if(typeof self!=="undefined"){ module.exports=self; }else{ module.exports={}; } }, "global/window.js"); __d(362 /* RCTNativeAppEventEmitter */, function(global, require, module, exports) { 'use strict'; var BatchedBridge=require(61 /* BatchedBridge */); var RCTDeviceEventEmitter=require(86 /* RCTDeviceEventEmitter */); var RCTNativeAppEventEmitter=RCTDeviceEventEmitter; BatchedBridge.registerCallableModule( 'RCTNativeAppEventEmitter', RCTNativeAppEventEmitter); module.exports=RCTNativeAppEventEmitter; }, "RCTNativeAppEventEmitter"); __d(363 /* PerformanceLogger */, function(global, require, module, exports) { 'use strict'; var BatchedBridge=require(61 /* BatchedBridge */); var fbjsPerformanceNow=require(73 /* fbjs/lib/performanceNow */); var performanceNow=global.nativePerformanceNow||fbjsPerformanceNow; var timespans={}; var extras={}; var PerformanceLogger={ addTimespan:function addTimespan(key,lengthInMs,description){ if(timespans[key]){ if(__DEV__){ console.log( 'PerformanceLogger: Attempting to add a timespan that already exists ', key); } return; } timespans[key]={ description:description, totalTime:lengthInMs}; }, startTimespan:function startTimespan(key,description){ if(timespans[key]){ if(__DEV__){ console.log( 'PerformanceLogger: Attempting to start a timespan that already exists ', key); } return; } timespans[key]={ description:description, startTime:performanceNow()}; }, stopTimespan:function stopTimespan(key){ if(!timespans[key]||!timespans[key].startTime){ if(__DEV__){ console.log( 'PerformanceLogger: Attempting to end a timespan that has not started ', key); } return; } if(timespans[key].endTime){ if(__DEV__){ console.log( 'PerformanceLogger: Attempting to end a timespan that has already ended ', key); } return; } timespans[key].endTime=performanceNow(); timespans[key].totalTime= timespans[key].endTime-timespans[key].startTime; }, clear:function clear(){ timespans={}; extras={}; }, clearExceptTimespans:function clearExceptTimespans(keys){ timespans=Object.keys(timespans).reduce(function(previous,key){ if(keys.indexOf(key)!==-1){ previous[key]=timespans[key]; } return previous; },{}); extras={}; }, getTimespans:function getTimespans(){ return timespans; }, hasTimespan:function hasTimespan(key){ return!!timespans[key]; }, logTimespans:function logTimespans(){ for(var key in timespans){ if(timespans[key].totalTime){ console.log(key+': '+timespans[key].totalTime+'ms'); } } }, addTimespans:function addTimespans(newTimespans,labels){ for(var i=0,l=newTimespans.length;i component.',this._stringText):_prodInvariant('20',this._stringText):void 0; this._hostParent=hostParent; var tag=ReactNativeTagHandles.allocateTag(); this._rootNodeID=tag; var nativeTopRootTag=hostContainerInfo._tag; UIManager.createView(tag,'RCTRawText',nativeTopRootTag,{text:this._stringText}); ReactNativeComponentTree.precacheNode(this,tag); return tag; }, getHostNode:function getHostNode(){ return this._rootNodeID; }, receiveComponent:function receiveComponent(nextText,transaction,context){ if(nextText!==this._currentElement){ this._currentElement=nextText; var nextStringText=''+nextText; if(nextStringText!==this._stringText){ this._stringText=nextStringText; UIManager.updateView(this._rootNodeID,'RCTRawText',{text:this._stringText}); if(process.env.NODE_ENV!=='production'){ ReactInstrumentation.debugTool.onSetText(this._debugID,nextStringText); } } } }, unmountComponent:function unmountComponent(){ ReactNativeComponentTree.uncacheNode(this); this._currentElement=null; this._stringText=null; this._rootNodeID=null; }}); module.exports=ReactNativeTextComponent; }, "react/lib/ReactNativeTextComponent.js"); __d(376 /* react/lib/ReactNativeTreeTraversal.js */, function(global, require, module, exports) { 'use strict'; function getLowestCommonAncestor(instA,instB){ var depthA=0; for(var tempA=instA;tempA;tempA=tempA._hostParent){ depthA++; } var depthB=0; for(var tempB=instB;tempB;tempB=tempB._hostParent){ depthB++; } while(depthA-depthB>0){ instA=instA._hostParent; depthA--; } while(depthB-depthA>0){ instB=instB._hostParent; depthB--; } var depth=depthA; while(depth--){ if(instA===instB){ return instA; } instA=instA._hostParent; instB=instB._hostParent; } return null; } function isAncestor(instA,instB){ while(instB){ if(instB===instA){ return true; } instB=instB._hostParent; } return false; } function getParentInstance(inst){ return inst._hostParent; } function traverseTwoPhase(inst,fn,arg){ var path=[]; while(inst){ path.push(inst); inst=inst._hostParent; } var i; for(i=path.length;i-->0;){ fn(path[i],false,arg); } for(i=0;i0;){ fn(pathTo[i],false,argTo); } } module.exports={ isAncestor:isAncestor, getLowestCommonAncestor:getLowestCommonAncestor, getParentInstance:getParentInstance, traverseTwoPhase:traverseTwoPhase, traverseEnterLeave:traverseEnterLeave}; }, "react/lib/ReactNativeTreeTraversal.js"); __d(377 /* react/lib/ReactSimpleEmptyComponent.js */, function(global, require, module, exports) { 'use strict'; var _assign=require(14 /* object-assign */); var ReactReconciler=require(148 /* ./ReactReconciler */); var ReactSimpleEmptyComponent=function ReactSimpleEmptyComponent(placeholderElement,instantiate){ this._currentElement=null; this._renderedComponent=instantiate(placeholderElement); }; _assign(ReactSimpleEmptyComponent.prototype,{ mountComponent:function mountComponent(transaction,hostParent,hostContainerInfo,context){ return ReactReconciler.mountComponent(this._renderedComponent,transaction,hostParent,hostContainerInfo,context); }, receiveComponent:function receiveComponent(){}, getHostNode:function getHostNode(){ return ReactReconciler.getHostNode(this._renderedComponent); }, unmountComponent:function unmountComponent(){ ReactReconciler.unmountComponent(this._renderedComponent); this._renderedComponent=null; }}); module.exports=ReactSimpleEmptyComponent; }, "react/lib/ReactSimpleEmptyComponent.js"); __d(378 /* react/lib/ResponderEventPlugin.js */, function(global, require, module, exports) { 'use strict'; var _prodInvariant=require(17 /* ./reactProdInvariant */); var EventConstants=require(136 /* ./EventConstants */); var EventPluginUtils=require(139 /* ./EventPluginUtils */); var EventPropagators=require(368 /* ./EventPropagators */); var ResponderSyntheticEvent=require(379 /* ./ResponderSyntheticEvent */); var ResponderTouchHistoryStore=require(380 /* ./ResponderTouchHistoryStore */); var accumulate=require(381 /* ./accumulate */); var invariant=require(18 /* fbjs/lib/invariant */); var keyOf=require(34 /* fbjs/lib/keyOf */); var isStartish=EventPluginUtils.isStartish; var isMoveish=EventPluginUtils.isMoveish; var isEndish=EventPluginUtils.isEndish; var executeDirectDispatch=EventPluginUtils.executeDirectDispatch; var hasDispatches=EventPluginUtils.hasDispatches; var executeDispatchesInOrderStopAtTrue=EventPluginUtils.executeDispatchesInOrderStopAtTrue; var responderInst=null; var trackedTouchCount=0; var previousActiveTouches=0; var changeResponder=function changeResponder(nextResponderInst,blockHostResponder){ var oldResponderInst=responderInst; responderInst=nextResponderInst; if(ResponderEventPlugin.GlobalResponderHandler!==null){ ResponderEventPlugin.GlobalResponderHandler.onChange(oldResponderInst,nextResponderInst,blockHostResponder); } }; var eventTypes={ startShouldSetResponder:{ phasedRegistrationNames:{ bubbled:keyOf({onStartShouldSetResponder:null}), captured:keyOf({onStartShouldSetResponderCapture:null})}}, scrollShouldSetResponder:{ phasedRegistrationNames:{ bubbled:keyOf({onScrollShouldSetResponder:null}), captured:keyOf({onScrollShouldSetResponderCapture:null})}}, selectionChangeShouldSetResponder:{ phasedRegistrationNames:{ bubbled:keyOf({onSelectionChangeShouldSetResponder:null}), captured:keyOf({onSelectionChangeShouldSetResponderCapture:null})}}, moveShouldSetResponder:{ phasedRegistrationNames:{ bubbled:keyOf({onMoveShouldSetResponder:null}), captured:keyOf({onMoveShouldSetResponderCapture:null})}}, responderStart:{registrationName:keyOf({onResponderStart:null})}, responderMove:{registrationName:keyOf({onResponderMove:null})}, responderEnd:{registrationName:keyOf({onResponderEnd:null})}, responderRelease:{registrationName:keyOf({onResponderRelease:null})}, responderTerminationRequest:{ registrationName:keyOf({onResponderTerminationRequest:null})}, responderGrant:{registrationName:keyOf({onResponderGrant:null})}, responderReject:{registrationName:keyOf({onResponderReject:null})}, responderTerminate:{registrationName:keyOf({onResponderTerminate:null})}}; function setResponderAndExtractTransfer(topLevelType,targetInst,nativeEvent,nativeEventTarget){ var shouldSetEventType=isStartish(topLevelType)?eventTypes.startShouldSetResponder:isMoveish(topLevelType)?eventTypes.moveShouldSetResponder:topLevelType===EventConstants.topLevelTypes.topSelectionChange?eventTypes.selectionChangeShouldSetResponder:eventTypes.scrollShouldSetResponder; var bubbleShouldSetFrom=!responderInst?targetInst:EventPluginUtils.getLowestCommonAncestor(responderInst,targetInst); var skipOverBubbleShouldSetFrom=bubbleShouldSetFrom===responderInst; var shouldSetEvent=ResponderSyntheticEvent.getPooled(shouldSetEventType,bubbleShouldSetFrom,nativeEvent,nativeEventTarget); shouldSetEvent.touchHistory=ResponderTouchHistoryStore.touchHistory; if(skipOverBubbleShouldSetFrom){ EventPropagators.accumulateTwoPhaseDispatchesSkipTarget(shouldSetEvent); }else{ EventPropagators.accumulateTwoPhaseDispatches(shouldSetEvent); } var wantsResponderInst=executeDispatchesInOrderStopAtTrue(shouldSetEvent); if(!shouldSetEvent.isPersistent()){ shouldSetEvent.constructor.release(shouldSetEvent); } if(!wantsResponderInst||wantsResponderInst===responderInst){ return null; } var extracted; var grantEvent=ResponderSyntheticEvent.getPooled(eventTypes.responderGrant,wantsResponderInst,nativeEvent,nativeEventTarget); grantEvent.touchHistory=ResponderTouchHistoryStore.touchHistory; EventPropagators.accumulateDirectDispatches(grantEvent); var blockHostResponder=executeDirectDispatch(grantEvent)===true; if(responderInst){ var terminationRequestEvent=ResponderSyntheticEvent.getPooled(eventTypes.responderTerminationRequest,responderInst,nativeEvent,nativeEventTarget); terminationRequestEvent.touchHistory=ResponderTouchHistoryStore.touchHistory; EventPropagators.accumulateDirectDispatches(terminationRequestEvent); var shouldSwitch=!hasDispatches(terminationRequestEvent)||executeDirectDispatch(terminationRequestEvent); if(!terminationRequestEvent.isPersistent()){ terminationRequestEvent.constructor.release(terminationRequestEvent); } if(shouldSwitch){ var terminateEvent=ResponderSyntheticEvent.getPooled(eventTypes.responderTerminate,responderInst,nativeEvent,nativeEventTarget); terminateEvent.touchHistory=ResponderTouchHistoryStore.touchHistory; EventPropagators.accumulateDirectDispatches(terminateEvent); extracted=accumulate(extracted,[grantEvent,terminateEvent]); changeResponder(wantsResponderInst,blockHostResponder); }else{ var rejectEvent=ResponderSyntheticEvent.getPooled(eventTypes.responderReject,wantsResponderInst,nativeEvent,nativeEventTarget); rejectEvent.touchHistory=ResponderTouchHistoryStore.touchHistory; EventPropagators.accumulateDirectDispatches(rejectEvent); extracted=accumulate(extracted,rejectEvent); } }else{ extracted=accumulate(extracted,grantEvent); changeResponder(wantsResponderInst,blockHostResponder); } return extracted; } function canTriggerTransfer(topLevelType,topLevelInst,nativeEvent){ return topLevelInst&&( topLevelType===EventConstants.topLevelTypes.topScroll&&!nativeEvent.responderIgnoreScroll||trackedTouchCount>0&&topLevelType===EventConstants.topLevelTypes.topSelectionChange||isStartish(topLevelType)||isMoveish(topLevelType)); } function noResponderTouches(nativeEvent){ var touches=nativeEvent.touches; if(!touches||touches.length===0){ return true; } for(var i=0;i=0)?process.env.NODE_ENV!=='production'?invariant(false,'Ended a touch event which was not counted in trackedTouchCount.'):_prodInvariant('132'):void 0; } ResponderTouchHistoryStore.recordTouchTrack(topLevelType,nativeEvent); var extracted=canTriggerTransfer(topLevelType,targetInst,nativeEvent)?setResponderAndExtractTransfer(topLevelType,targetInst,nativeEvent,nativeEventTarget):null; var isResponderTouchStart=responderInst&&isStartish(topLevelType); var isResponderTouchMove=responderInst&&isMoveish(topLevelType); var isResponderTouchEnd=responderInst&&isEndish(topLevelType); var incrementalTouch=isResponderTouchStart?eventTypes.responderStart:isResponderTouchMove?eventTypes.responderMove:isResponderTouchEnd?eventTypes.responderEnd:null; if(incrementalTouch){ var gesture=ResponderSyntheticEvent.getPooled(incrementalTouch,responderInst,nativeEvent,nativeEventTarget); gesture.touchHistory=ResponderTouchHistoryStore.touchHistory; EventPropagators.accumulateDirectDispatches(gesture); extracted=accumulate(extracted,gesture); } var isResponderTerminate=responderInst&&topLevelType===EventConstants.topLevelTypes.topTouchCancel; var isResponderRelease=responderInst&&!isResponderTerminate&&isEndish(topLevelType)&&noResponderTouches(nativeEvent); var finalTouch=isResponderTerminate?eventTypes.responderTerminate:isResponderRelease?eventTypes.responderRelease:null; if(finalTouch){ var finalEvent=ResponderSyntheticEvent.getPooled(finalTouch,responderInst,nativeEvent,nativeEventTarget); finalEvent.touchHistory=ResponderTouchHistoryStore.touchHistory; EventPropagators.accumulateDirectDispatches(finalEvent); extracted=accumulate(extracted,finalEvent); changeResponder(null); } var numberActiveTouches=ResponderTouchHistoryStore.touchHistory.numberActiveTouches; if(ResponderEventPlugin.GlobalInteractionHandler&&numberActiveTouches!==previousActiveTouches){ ResponderEventPlugin.GlobalInteractionHandler.onChange(numberActiveTouches); } previousActiveTouches=numberActiveTouches; return extracted; }, GlobalResponderHandler:null, GlobalInteractionHandler:null, injection:{ injectGlobalResponderHandler:function injectGlobalResponderHandler(GlobalResponderHandler){ ResponderEventPlugin.GlobalResponderHandler=GlobalResponderHandler; }, injectGlobalInteractionHandler:function injectGlobalInteractionHandler(GlobalInteractionHandler){ ResponderEventPlugin.GlobalInteractionHandler=GlobalInteractionHandler; }}}; module.exports=ResponderEventPlugin; }, "react/lib/ResponderEventPlugin.js"); __d(379 /* react/lib/ResponderSyntheticEvent.js */, function(global, require, module, exports) { 'use strict'; var SyntheticEvent=require(369 /* ./SyntheticEvent */); var ResponderEventInterface={ touchHistory:function touchHistory(nativeEvent){ return null; }}; function ResponderSyntheticEvent(dispatchConfig,dispatchMarker,nativeEvent,nativeEventTarget){ return SyntheticEvent.call(this,dispatchConfig,dispatchMarker,nativeEvent,nativeEventTarget); } SyntheticEvent.augmentClass(ResponderSyntheticEvent,ResponderEventInterface); module.exports=ResponderSyntheticEvent; }, "react/lib/ResponderSyntheticEvent.js"); __d(380 /* react/lib/ResponderTouchHistoryStore.js */, function(global, require, module, exports) { 'use strict'; var _prodInvariant=require(17 /* ./reactProdInvariant */); var EventPluginUtils=require(139 /* ./EventPluginUtils */); var invariant=require(18 /* fbjs/lib/invariant */); var warning=require(21 /* fbjs/lib/warning */); var isEndish=EventPluginUtils.isEndish; var isMoveish=EventPluginUtils.isMoveish; var isStartish=EventPluginUtils.isStartish; var MAX_TOUCH_BANK=20; var touchBank=[]; var touchHistory={ touchBank:touchBank, numberActiveTouches:0, indexOfSingleActiveTouch:-1, mostRecentTimeStamp:0}; function timestampForTouch(touch){ return touch.timeStamp||touch.timestamp; } function createTouchRecord(touch){ return{ touchActive:true, startPageX:touch.pageX, startPageY:touch.pageY, startTimeStamp:timestampForTouch(touch), currentPageX:touch.pageX, currentPageY:touch.pageY, currentTimeStamp:timestampForTouch(touch), previousPageX:touch.pageX, previousPageY:touch.pageY, previousTimeStamp:timestampForTouch(touch)}; } function resetTouchRecord(touchRecord,touch){ touchRecord.touchActive=true; touchRecord.startPageX=touch.pageX; touchRecord.startPageY=touch.pageY; touchRecord.startTimeStamp=timestampForTouch(touch); touchRecord.currentPageX=touch.pageX; touchRecord.currentPageY=touch.pageY; touchRecord.currentTimeStamp=timestampForTouch(touch); touchRecord.previousPageX=touch.pageX; touchRecord.previousPageY=touch.pageY; touchRecord.previousTimeStamp=timestampForTouch(touch); } function getTouchIdentifier(_ref){ var identifier=_ref.identifier; !(identifier!=null)?process.env.NODE_ENV!=='production'?invariant(false,'Touch object is missing identifier.'):_prodInvariant('138'):void 0; process.env.NODE_ENV!=='production'?warning(identifier<=MAX_TOUCH_BANK,'Touch identifier %s is greater than maximum supported %s which causes '+'performance issues backfilling array locations for all of the indices.',identifier,MAX_TOUCH_BANK):void 0; return identifier; } function recordTouchStart(touch){ var identifier=getTouchIdentifier(touch); var touchRecord=touchBank[identifier]; if(touchRecord){ resetTouchRecord(touchRecord,touch); }else{ touchBank[identifier]=createTouchRecord(touch); } touchHistory.mostRecentTimeStamp=timestampForTouch(touch); } function recordTouchMove(touch){ var touchRecord=touchBank[getTouchIdentifier(touch)]; if(touchRecord){ touchRecord.touchActive=true; touchRecord.previousPageX=touchRecord.currentPageX; touchRecord.previousPageY=touchRecord.currentPageY; touchRecord.previousTimeStamp=touchRecord.currentTimeStamp; touchRecord.currentPageX=touch.pageX; touchRecord.currentPageY=touch.pageY; touchRecord.currentTimeStamp=timestampForTouch(touch); touchHistory.mostRecentTimeStamp=timestampForTouch(touch); }else{ console.error('Cannot record touch move without a touch start.\n'+'Touch Move: %s\n','Touch Bank: %s',printTouch(touch),printTouchBank()); } } function recordTouchEnd(touch){ var touchRecord=touchBank[getTouchIdentifier(touch)]; if(touchRecord){ touchRecord.touchActive=false; touchRecord.previousPageX=touchRecord.currentPageX; touchRecord.previousPageY=touchRecord.currentPageY; touchRecord.previousTimeStamp=touchRecord.currentTimeStamp; touchRecord.currentPageX=touch.pageX; touchRecord.currentPageY=touch.pageY; touchRecord.currentTimeStamp=timestampForTouch(touch); touchHistory.mostRecentTimeStamp=timestampForTouch(touch); }else{ console.error('Cannot record touch end without a touch start.\n'+'Touch End: %s\n','Touch Bank: %s',printTouch(touch),printTouchBank()); } } function printTouch(touch){ return JSON.stringify({ identifier:touch.identifier, pageX:touch.pageX, pageY:touch.pageY, timestamp:timestampForTouch(touch)}); } function printTouchBank(){ var printed=JSON.stringify(touchBank.slice(0,MAX_TOUCH_BANK)); if(touchBank.length>MAX_TOUCH_BANK){ printed+=' (original size: '+touchBank.length+')'; } return printed; } var ResponderTouchHistoryStore={ recordTouchTrack:function recordTouchTrack(topLevelType,nativeEvent){ if(isMoveish(topLevelType)){ nativeEvent.changedTouches.forEach(recordTouchMove); }else if(isStartish(topLevelType)){ nativeEvent.changedTouches.forEach(recordTouchStart); touchHistory.numberActiveTouches=nativeEvent.touches.length; if(touchHistory.numberActiveTouches===1){ touchHistory.indexOfSingleActiveTouch=nativeEvent.touches[0].identifier; } }else if(isEndish(topLevelType)){ nativeEvent.changedTouches.forEach(recordTouchEnd); touchHistory.numberActiveTouches=nativeEvent.touches.length; if(touchHistory.numberActiveTouches===1){ for(var i=0;i component requires a `source` property rather than `src`.'); } if(source&&(source.uri||Array.isArray(source))){ var style=void 0; var sources=void 0; if(source.uri){var _width=source.width;var _height=source.height; style=flattenStyle([{width:_width,height:_height},styles.base,this.props.style]); sources=[{uri:source.uri}]; }else{ style=flattenStyle([styles.base,this.props.style]); sources=source; }var _props= this.props;var onLoadStart=_props.onLoadStart;var onLoad=_props.onLoad;var onLoadEnd=_props.onLoadEnd; var nativeProps=merge(this.props,{ style:style, shouldNotifyLoadEvents:!!(onLoadStart||onLoad||onLoadEnd), src:sources, loadingIndicatorSrc:loadingIndicatorSource?loadingIndicatorSource.uri:null}); if(nativeProps.children){ var containerStyle=filterObject(style,function(val,key){return!ImageSpecificStyleKeys.has(key);}); var imageStyle=filterObject(style,function(val,key){return ImageSpecificStyleKeys.has(key);}); var imageProps=merge(nativeProps,{ style:[imageStyle,styles.absoluteImage], children:undefined}); return( React.createElement(View,{style:containerStyle}, React.createElement(RKImage,imageProps), this.props.children)); }else{ if(this.context.isInAParentText){ return React.createElement(RCTTextInlineImage,nativeProps); }else{ return React.createElement(RKImage,nativeProps); } } } return null; }}); var styles=StyleSheet.create({ base:{ overflow:'hidden'}, absoluteImage:{ left:0, right:0, top:0, bottom:0, position:'absolute'}}); var cfg={ nativeOnly:{ src:true, loadingIndicatorSrc:true, defaultImageSrc:true, imageTag:true, progressHandlerRegistered:true, shouldNotifyLoadEvents:true}}; var RKImage=requireNativeComponent('RCTImageView',Image,cfg); var RCTTextInlineImage=requireNativeComponent('RCTTextInlineImage',Image,cfg); module.exports=Image; }, "Image"); __d(386 /* fbjs/lib/filterObject.js */, function(global, require, module, exports) { 'use strict'; var hasOwnProperty=Object.prototype.hasOwnProperty; function filterObject(object,callback,context){ if(!object){ return null; } var result={}; for(var name in object){ if(hasOwnProperty.call(object,name)&&callback.call(context,object[name],name,object)){ result[name]=object[name]; } } return result; } module.exports=filterObject; }, "fbjs/lib/filterObject.js"); __d(387 /* ImageEditor */, function(global, require, module, exports) { 'use strict'; var RCTImageEditingManager=require(60 /* NativeModules */).ImageEditingManager;var ImageEditor=function(){function ImageEditor(){babelHelpers.classCallCheck(this,ImageEditor);}babelHelpers.createClass(ImageEditor,null,[{key:'cropImage',value:function cropImage( uri, cropData, success, failure) { RCTImageEditingManager.cropImage(uri,cropData,success,failure); }}]);return ImageEditor;}(); module.exports=ImageEditor; }, "ImageEditor"); __d(388 /* ImageStore */, function(global, require, module, exports) { 'use strict'; var RCTImageStoreManager=require(60 /* NativeModules */).ImageStoreManager;var ImageStore=function(){function ImageStore(){babelHelpers.classCallCheck(this,ImageStore);}babelHelpers.createClass(ImageStore,null,[{key:'hasImageForTag',value:function hasImageForTag( uri,callback){ if(RCTImageStoreManager.hasImageForTag){ RCTImageStoreManager.hasImageForTag(uri,callback); }else{ console.warn('hasImageForTag() not implemented'); } }},{key:'removeImageForTag',value:function removeImageForTag( uri){ if(RCTImageStoreManager.removeImageForTag){ RCTImageStoreManager.removeImageForTag(uri); }else{ console.warn('removeImageForTag() not implemented'); } }},{key:'addImageFromBase64',value:function addImageFromBase64( base64ImageData, success, failure) { RCTImageStoreManager.addImageFromBase64(base64ImageData,success,failure); }},{key:'getBase64ForTag',value:function getBase64ForTag( uri, success, failure) { RCTImageStoreManager.getBase64ForTag(uri,success,failure); }}]);return ImageStore;}(); module.exports=ImageStore; }, "ImageStore"); __d(389 /* KeyboardAvoidingView */, function(global, require, module, exports) { 'use strict'; var Keyboard=require(88 /* Keyboard */); var LayoutAnimation=require(390 /* LayoutAnimation */); var Platform=require(59 /* Platform */); var PropTypes=require(40 /* react/lib/ReactPropTypes */); var React=require(103 /* React */); var TimerMixin=require(391 /* react-timer-mixin */); var View=require(116 /* View */); var viewRef='VIEW'; var KeyboardAvoidingView=React.createClass({displayName:'KeyboardAvoidingView', mixins:[TimerMixin], propTypes:babelHelpers.extends({}, View.propTypes,{ behavior:PropTypes.oneOf(['height','position','padding']), keyboardVerticalOffset:PropTypes.number.isRequired}), getDefaultProps:function getDefaultProps(){ return{ keyboardVerticalOffset:0}; }, getInitialState:function getInitialState(){ return{ bottom:0}; }, subscriptions:[], frame:null, relativeKeyboardHeight:function relativeKeyboardHeight(keyboardFrame){ var frame=this.frame; if(!frame){ return 0; } var y1=Math.max(frame.y,keyboardFrame.screenY-this.props.keyboardVerticalOffset); var y2=Math.min(frame.y+frame.height,keyboardFrame.screenY+keyboardFrame.height-this.props.keyboardVerticalOffset); return Math.max(y2-y1,0); }, onKeyboardChange:function onKeyboardChange(event){ if(!event){ this.setState({bottom:0}); return; }var duration=event.duration;var easing=event.easing;var endCoordinates=event.endCoordinates; var height=this.relativeKeyboardHeight(endCoordinates); if(duration&&easing){ LayoutAnimation.configureNext({ duration:duration, update:{ duration:duration, type:LayoutAnimation.Types[easing]||'keyboard'}}); } this.setState({bottom:height}); }, onLayout:function onLayout(event){ this.frame=event.nativeEvent.layout; }, componentWillUpdate:function componentWillUpdate(nextProps,nextState,nextContext){ if(nextState.bottom===this.state.bottom&& this.props.behavior==='height'&& nextProps.behavior==='height'){ nextState.bottom=0; } }, componentWillMount:function componentWillMount(){ if(Platform.OS==='ios'){ this.subscriptions=[ Keyboard.addListener('keyboardWillChangeFrame',this.onKeyboardChange)]; }else{ this.subscriptions=[ Keyboard.addListener('keyboardDidHide',this.onKeyboardChange), Keyboard.addListener('keyboardDidShow',this.onKeyboardChange)]; } }, componentWillUnmount:function componentWillUnmount(){ this.subscriptions.forEach(function(sub){return sub.remove();}); }, render:function render(){var _props= this.props;var behavior=_props.behavior;var children=_props.children;var style=_props.style;var props=babelHelpers.objectWithoutProperties(_props,['behavior','children','style']); switch(behavior){ case'height': var heightStyle=void 0; if(this.frame){ heightStyle={height:this.frame.height-this.state.bottom,flex:0}; } return( React.createElement(View,babelHelpers.extends({ref:viewRef,style:[style,heightStyle],onLayout:this.onLayout},props), children)); case'position': var positionStyle={bottom:this.state.bottom}; return( React.createElement(View,babelHelpers.extends({ref:viewRef,style:style,onLayout:this.onLayout},props), React.createElement(View,{style:positionStyle}, children))); case'padding': var paddingStyle={paddingBottom:this.state.bottom}; return( React.createElement(View,babelHelpers.extends({ref:viewRef,style:[style,paddingStyle],onLayout:this.onLayout},props), children)); default: return( React.createElement(View,babelHelpers.extends({ref:viewRef,onLayout:this.onLayout,style:style},props), children));} }}); module.exports=KeyboardAvoidingView; }, "KeyboardAvoidingView"); __d(390 /* LayoutAnimation */, function(global, require, module, exports) { 'use strict'; var PropTypes=require(40 /* react/lib/ReactPropTypes */); var UIManager=require(99 /* UIManager */); var createStrictShapeTypeChecker=require(118 /* createStrictShapeTypeChecker */); var keyMirror=require(72 /* fbjs/lib/keyMirror */); var TypesEnum={ spring:true, linear:true, easeInEaseOut:true, easeIn:true, easeOut:true, keyboard:true}; var Types=keyMirror(TypesEnum); var PropertiesEnum={ opacity:true, scaleXY:true}; var Properties=keyMirror(PropertiesEnum); var animChecker=createStrictShapeTypeChecker({ duration:PropTypes.number, delay:PropTypes.number, springDamping:PropTypes.number, initialVelocity:PropTypes.number, type:PropTypes.oneOf( Object.keys(Types)). isRequired, property:PropTypes.oneOf( Object.keys(Properties))}); var configChecker=createStrictShapeTypeChecker({ duration:PropTypes.number.isRequired, create:animChecker, update:animChecker, delete:animChecker}); function configureNext(config,onAnimationDidEnd){ configChecker({config:config},'config','LayoutAnimation.configureNext'); UIManager.configureNextLayoutAnimation( config,onAnimationDidEnd||function(){},function(){}); } function create(duration,type,creationProp){ return{ duration:duration, create:{ type:type, property:creationProp}, update:{ type:type}, delete:{ type:type, property:creationProp}}; } var Presets={ easeInEaseOut:create( 300,Types.easeInEaseOut,Properties.opacity), linear:create( 500,Types.linear,Properties.opacity), spring:{ duration:700, create:{ type:Types.linear, property:Properties.opacity}, update:{ type:Types.spring, springDamping:0.4}, delete:{ type:Types.linear, property:Properties.opacity}}}; var LayoutAnimation={ configureNext:configureNext, create:create, Types:Types, Properties:Properties, configChecker:configChecker, Presets:Presets, easeInEaseOut:configureNext.bind( null,Presets.easeInEaseOut), linear:configureNext.bind( null,Presets.linear), spring:configureNext.bind( null,Presets.spring)}; module.exports=LayoutAnimation; }, "LayoutAnimation"); __d(391 /* react-timer-mixin/TimerMixin.js */, function(global, require, module, exports) { 'use strict'; var GLOBAL=typeof window==='undefined'?global:window; var setter=function setter(_setter,_clearer,array){ return function(callback,delta){ var id=_setter(function(){ _clearer.call(this,id); callback.apply(this,arguments); }.bind(this),delta); if(!this[array]){ this[array]=[id]; }else{ this[array].push(id); } return id; }; }; var clearer=function clearer(_clearer,array){ return function(id){ if(this[array]){ var index=this[array].indexOf(id); if(index!==-1){ this[array].splice(index,1); } } _clearer(id); }; }; var _timeouts='TimerMixin_timeouts'; var _clearTimeout=clearer(GLOBAL.clearTimeout,_timeouts); var _setTimeout=setter(GLOBAL.setTimeout,_clearTimeout,_timeouts); var _intervals='TimerMixin_intervals'; var _clearInterval=clearer(GLOBAL.clearInterval,_intervals); var _setInterval=setter(GLOBAL.setInterval,function(){},_intervals); var _immediates='TimerMixin_immediates'; var _clearImmediate=clearer(GLOBAL.clearImmediate,_immediates); var _setImmediate=setter(GLOBAL.setImmediate,_clearImmediate,_immediates); var _rafs='TimerMixin_rafs'; var _cancelAnimationFrame=clearer(GLOBAL.cancelAnimationFrame,_rafs); var _requestAnimationFrame=setter(GLOBAL.requestAnimationFrame,_cancelAnimationFrame,_rafs); var TimerMixin={ componentWillUnmount:function componentWillUnmount(){ this[_timeouts]&&this[_timeouts].forEach(function(id){ GLOBAL.clearTimeout(id); }); this[_timeouts]=null; this[_intervals]&&this[_intervals].forEach(function(id){ GLOBAL.clearInterval(id); }); this[_intervals]=null; this[_immediates]&&this[_immediates].forEach(function(id){ GLOBAL.clearImmediate(id); }); this[_immediates]=null; this[_rafs]&&this[_rafs].forEach(function(id){ GLOBAL.cancelAnimationFrame(id); }); this[_rafs]=null; }, setTimeout:_setTimeout, clearTimeout:_clearTimeout, setInterval:_setInterval, clearInterval:_clearInterval, setImmediate:_setImmediate, clearImmediate:_clearImmediate, requestAnimationFrame:_requestAnimationFrame, cancelAnimationFrame:_cancelAnimationFrame}; module.exports=TimerMixin; }, "react-timer-mixin/TimerMixin.js"); __d(392 /* ListView */, function(global, require, module, exports) { 'use strict'; var ListViewDataSource=require(393 /* ListViewDataSource */); var React=require(103 /* React */); var ReactNative=require(188 /* react/lib/ReactNative */); var RCTScrollViewManager=require(60 /* NativeModules */).ScrollViewManager; var ScrollView=require(395 /* ScrollView */); var ScrollResponder=require(397 /* ScrollResponder */); var StaticRenderer=require(400 /* StaticRenderer */); var TimerMixin=require(391 /* react-timer-mixin */); var cloneReferencedElement=require(401 /* react-clone-referenced-element */); var isEmpty=require(394 /* isEmpty */); var merge=require(119 /* merge */); var PropTypes=React.PropTypes; var DEFAULT_PAGE_SIZE=1; var DEFAULT_INITIAL_ROWS=10; var DEFAULT_SCROLL_RENDER_AHEAD=1000; var DEFAULT_END_REACHED_THRESHOLD=1000; var DEFAULT_SCROLL_CALLBACK_THROTTLE=50; var ListView=React.createClass({displayName:'ListView', _childFrames:[], _sentEndForContentLength:null, _scrollComponent:null, _prevRenderedRowsCount:0, _visibleRows:{}, scrollProperties:{}, mixins:[ScrollResponder.Mixin,TimerMixin], statics:{ DataSource:ListViewDataSource}, propTypes:babelHelpers.extends({}, ScrollView.propTypes,{ dataSource:PropTypes.instanceOf(ListViewDataSource).isRequired, renderSeparator:PropTypes.func, renderRow:PropTypes.func.isRequired, initialListSize:PropTypes.number.isRequired, onEndReached:PropTypes.func, onEndReachedThreshold:PropTypes.number.isRequired, pageSize:PropTypes.number.isRequired, renderFooter:PropTypes.func, renderHeader:PropTypes.func, renderSectionHeader:PropTypes.func, renderScrollComponent:React.PropTypes.func.isRequired, scrollRenderAheadDistance:React.PropTypes.number.isRequired, onChangeVisibleRows:React.PropTypes.func, removeClippedSubviews:React.PropTypes.bool, stickyHeaderIndices:PropTypes.arrayOf(PropTypes.number).isRequired, enableEmptySections:PropTypes.bool}), getMetrics:function getMetrics(){ return{ contentLength:this.scrollProperties.contentLength, totalRows:this.props.enableEmptySections?this.props.dataSource.getRowAndSectionCount():this.props.dataSource.getRowCount(), renderedRows:this.state.curRenderedRowsCount, visibleRows:Object.keys(this._visibleRows).length}; }, getScrollResponder:function getScrollResponder(){ if(this._scrollComponent&&this._scrollComponent.getScrollResponder){ return this._scrollComponent.getScrollResponder(); } }, scrollTo:function scrollTo(){ if(this._scrollComponent&&this._scrollComponent.scrollTo){var _scrollComponent; (_scrollComponent=this._scrollComponent).scrollTo.apply(_scrollComponent,arguments); } }, setNativeProps:function setNativeProps(props){ if(this._scrollComponent){ this._scrollComponent.setNativeProps(props); } }, getDefaultProps:function getDefaultProps(){ return{ initialListSize:DEFAULT_INITIAL_ROWS, pageSize:DEFAULT_PAGE_SIZE, renderScrollComponent:function renderScrollComponent(props){return React.createElement(ScrollView,props);}, scrollRenderAheadDistance:DEFAULT_SCROLL_RENDER_AHEAD, onEndReachedThreshold:DEFAULT_END_REACHED_THRESHOLD, stickyHeaderIndices:[]}; }, getInitialState:function getInitialState(){ return{ curRenderedRowsCount:this.props.initialListSize, highlightedRow:{}}; }, getInnerViewNode:function getInnerViewNode(){ return this._scrollComponent.getInnerViewNode(); }, componentWillMount:function componentWillMount(){ this.scrollProperties={ visibleLength:null, contentLength:null, offset:0}; this._childFrames=[]; this._visibleRows={}; this._prevRenderedRowsCount=0; this._sentEndForContentLength=null; }, componentDidMount:function componentDidMount(){var _this=this; this.requestAnimationFrame(function(){ _this._measureAndUpdateScrollProps(); }); }, componentWillReceiveProps:function componentWillReceiveProps(nextProps){var _this2=this; if(this.props.dataSource!==nextProps.dataSource|| this.props.initialListSize!==nextProps.initialListSize){ this.setState(function(state,props){ _this2._prevRenderedRowsCount=0; return{ curRenderedRowsCount:Math.min( Math.max( state.curRenderedRowsCount, props.initialListSize), props.enableEmptySections?props.dataSource.getRowAndSectionCount():props.dataSource.getRowCount())}; },function(){return _this2._renderMoreRowsIfNeeded();}); } }, componentDidUpdate:function componentDidUpdate(){var _this3=this; this.requestAnimationFrame(function(){ _this3._measureAndUpdateScrollProps(); }); }, _onRowHighlighted:function _onRowHighlighted(sectionID,rowID){ this.setState({highlightedRow:{sectionID:sectionID,rowID:rowID}}); }, render:function render(){ var bodyComponents=[]; var dataSource=this.props.dataSource; var allRowIDs=dataSource.rowIdentities; var rowCount=0; var sectionHeaderIndices=[]; var header=this.props.renderHeader&&this.props.renderHeader(); var footer=this.props.renderFooter&&this.props.renderFooter(); var totalIndex=header?1:0; for(var sectionIdx=0;sectionIdx=this._prevRenderedRowsCount&& dataSource.sectionHeaderShouldUpdate(sectionIdx); bodyComponents.push( React.createElement(StaticRenderer,{ key:'s_'+sectionID, shouldUpdate:!!shouldUpdateHeader, render:this.props.renderSectionHeader.bind( null, dataSource.getSectionHeaderData(sectionIdx), sectionID)})); sectionHeaderIndices.push(totalIndex++); } for(var rowIdx=0;rowIdx=this._prevRenderedRowsCount&& dataSource.rowShouldUpdate(sectionIdx,rowIdx); var row= React.createElement(StaticRenderer,{ key:'r_'+comboID, shouldUpdate:!!shouldUpdateRow, render:this.props.renderRow.bind( null, dataSource.getRowData(sectionIdx,rowIdx), sectionID, rowID, this._onRowHighlighted)}); bodyComponents.push(row); totalIndex++; if(this.props.renderSeparator&&( rowIdx!==rowIDs.length-1||sectionIdx===allRowIDs.length-1)){ var adjacentRowHighlighted= this.state.highlightedRow.sectionID===sectionID&&( this.state.highlightedRow.rowID===rowID|| this.state.highlightedRow.rowID===rowIDs[rowIdx+1]); var separator=this.props.renderSeparator( sectionID, rowID, adjacentRowHighlighted); if(separator){ bodyComponents.push(separator); totalIndex++; } } if(++rowCount===this.state.curRenderedRowsCount){ break; } } if(rowCount>=this.state.curRenderedRowsCount){ break; } }var _props= this.props;var renderScrollComponent=_props.renderScrollComponent;var props=babelHelpers.objectWithoutProperties(_props,['renderScrollComponent']); if(!props.scrollEventThrottle){ props.scrollEventThrottle=DEFAULT_SCROLL_CALLBACK_THROTTLE; } if(props.removeClippedSubviews===undefined){ props.removeClippedSubviews=true; } babelHelpers.extends(props,{ onScroll:this._onScroll, stickyHeaderIndices:this.props.stickyHeaderIndices.concat(sectionHeaderIndices), onKeyboardWillShow:undefined, onKeyboardWillHide:undefined, onKeyboardDidShow:undefined, onKeyboardDidHide:undefined}); return cloneReferencedElement(renderScrollComponent(props),{ ref:this._setScrollComponentRef, onContentSizeChange:this._onContentSizeChange, onLayout:this._onLayout}, header,bodyComponents,footer); }, _measureAndUpdateScrollProps:function _measureAndUpdateScrollProps(){ var scrollComponent=this.getScrollResponder(); if(!scrollComponent||!scrollComponent.getInnerViewNode){ return; } RCTScrollViewManager&&RCTScrollViewManager.calculateChildFrames&& RCTScrollViewManager.calculateChildFrames( ReactNative.findNodeHandle(scrollComponent), this._updateVisibleRows); }, _setScrollComponentRef:function _setScrollComponentRef(scrollComponent){ this._scrollComponent=scrollComponent; }, _onContentSizeChange:function _onContentSizeChange(width,height){ var contentLength=!this.props.horizontal?height:width; if(contentLength!==this.scrollProperties.contentLength){ this.scrollProperties.contentLength=contentLength; this._updateVisibleRows(); this._renderMoreRowsIfNeeded(); } this.props.onContentSizeChange&&this.props.onContentSizeChange(width,height); }, _onLayout:function _onLayout(event){var _event$nativeEvent$la= event.nativeEvent.layout;var width=_event$nativeEvent$la.width;var height=_event$nativeEvent$la.height; var visibleLength=!this.props.horizontal?height:width; if(visibleLength!==this.scrollProperties.visibleLength){ this.scrollProperties.visibleLength=visibleLength; this._updateVisibleRows(); this._renderMoreRowsIfNeeded(); } this.props.onLayout&&this.props.onLayout(event); }, _maybeCallOnEndReached:function _maybeCallOnEndReached(event){ if(this.props.onEndReached&& this.scrollProperties.contentLength!==this._sentEndForContentLength&& this._getDistanceFromEnd(this.scrollProperties)visibleMax||maxthis.props.onEndReachedThreshold){ this._sentEndForContentLength=null; } this.props.onScroll&&this.props.onScroll(e); }}); module.exports=ListView; }, "ListView"); __d(393 /* ListViewDataSource */, function(global, require, module, exports) { 'use strict'; var invariant=require(56 /* fbjs/lib/invariant */); var isEmpty=require(394 /* isEmpty */); var warning=require(44 /* fbjs/lib/warning */); function defaultGetRowData( dataBlob, sectionID, rowID) { return dataBlob[sectionID][rowID]; } function defaultGetSectionHeaderData( dataBlob, sectionID) { return dataBlob[sectionID]; }var ListViewDataSource=function(){ function ListViewDataSource(params){babelHelpers.classCallCheck(this,ListViewDataSource); invariant( params&&typeof params.rowHasChanged==='function', 'Must provide a rowHasChanged function.'); this._rowHasChanged=params.rowHasChanged; this._getRowData=params.getRowData||defaultGetRowData; this._sectionHeaderHasChanged=params.sectionHeaderHasChanged; this._getSectionHeaderData= params.getSectionHeaderData||defaultGetSectionHeaderData; this._dataBlob=null; this._dirtyRows=[]; this._dirtySections=[]; this._cachedRowCount=0; this.rowIdentities=[]; this.sectionIdentities=[]; }babelHelpers.createClass(ListViewDataSource,[{key:'cloneWithRows',value:function cloneWithRows( dataBlob, rowIdentities) { var rowIds=rowIdentities?[rowIdentities]:null; if(!this._sectionHeaderHasChanged){ this._sectionHeaderHasChanged=function(){return false;}; } return this.cloneWithRowsAndSections({s1:dataBlob},['s1'],rowIds); }},{key:'cloneWithRowsAndSections',value:function cloneWithRowsAndSections( dataBlob, sectionIdentities, rowIdentities) { invariant( typeof this._sectionHeaderHasChanged==='function', 'Must provide a sectionHeaderHasChanged function with section data.'); invariant( !sectionIdentities||!rowIdentities||sectionIdentities.length===rowIdentities.length, 'row and section ids lengths must be the same'); var newSource=new ListViewDataSource({ getRowData:this._getRowData, getSectionHeaderData:this._getSectionHeaderData, rowHasChanged:this._rowHasChanged, sectionHeaderHasChanged:this._sectionHeaderHasChanged}); newSource._dataBlob=dataBlob; if(sectionIdentities){ newSource.sectionIdentities=sectionIdentities; }else{ newSource.sectionIdentities=Object.keys(dataBlob); } if(rowIdentities){ newSource.rowIdentities=rowIdentities; }else{ newSource.rowIdentities=[]; newSource.sectionIdentities.forEach(function(sectionID){ newSource.rowIdentities.push(Object.keys(dataBlob[sectionID])); }); } newSource._cachedRowCount=countRows(newSource.rowIdentities); newSource._calculateDirtyArrays( this._dataBlob, this.sectionIdentities, this.rowIdentities); return newSource; }},{key:'getRowCount',value:function getRowCount() { return this._cachedRowCount; }},{key:'getRowAndSectionCount',value:function getRowAndSectionCount() { return this._cachedRowCount+this.sectionIdentities.length; }},{key:'rowShouldUpdate',value:function rowShouldUpdate( sectionIndex,rowIndex){ var needsUpdate=this._dirtyRows[sectionIndex][rowIndex]; warning(needsUpdate!==undefined, 'missing dirtyBit for section, row: '+sectionIndex+', '+rowIndex); return needsUpdate; }},{key:'getRowData',value:function getRowData( sectionIndex,rowIndex){ var sectionID=this.sectionIdentities[sectionIndex]; var rowID=this.rowIdentities[sectionIndex][rowIndex]; warning( sectionID!==undefined&&rowID!==undefined, 'rendering invalid section, row: '+sectionIndex+', '+rowIndex); return this._getRowData(this._dataBlob,sectionID,rowID); }},{key:'getRowIDForFlatIndex',value:function getRowIDForFlatIndex( index){ var accessIndex=index; for(var ii=0;ii=this.rowIdentities[ii].length){ accessIndex-=this.rowIdentities[ii].length; }else{ return this.rowIdentities[ii][accessIndex]; } } return null; }},{key:'getSectionIDForFlatIndex',value:function getSectionIDForFlatIndex( index){ var accessIndex=index; for(var ii=0;ii=this.rowIdentities[ii].length){ accessIndex-=this.rowIdentities[ii].length; }else{ return this.sectionIdentities[ii]; } } return null; }},{key:'getSectionLengths',value:function getSectionLengths() { var results=[]; for(var ii=0;ii but not '+ '`scrollEventThrottle`. You will only receive one event. '+ 'Using `16` you get all the events but be aware that it may '+ 'cause frame drops, use a bigger number if you don\'t need as '+ 'much precision.'); } } if(Platform.OS==='android'){ if(this.props.keyboardDismissMode==='on-drag'){ dismissKeyboard(); } } this.scrollResponderHandleScroll(e); }, _handleContentOnLayout:function _handleContentOnLayout(e){var _e$nativeEvent$layout= e.nativeEvent.layout;var width=_e$nativeEvent$layout.width;var height=_e$nativeEvent$layout.height; this.props.onContentSizeChange&&this.props.onContentSizeChange(width,height); }, _scrollViewRef:null, _setScrollViewRef:function _setScrollViewRef(ref){ this._scrollViewRef=ref; }, _innerViewRef:null, _setInnerViewRef:function _setInnerViewRef(ref){ this._innerViewRef=ref; }, render:function render(){ var contentContainerStyle=[ this.props.horizontal&&styles.contentContainerHorizontal, this.props.contentContainerStyle]; var style=void 0,childLayoutProps=void 0; if(__DEV__&&this.props.style){ style=flattenStyle(this.props.style); childLayoutProps=['alignItems','justifyContent']. filter(function(prop){return style&&style[prop]!==undefined;}); invariant( childLayoutProps.length===0, 'ScrollView child layout ('+JSON.stringify(childLayoutProps)+ ') must be applied through the contentContainerStyle prop.'); } var contentSizeChangeProps={}; if(this.props.onContentSizeChange){ contentSizeChangeProps={ onLayout:this._handleContentOnLayout}; } var contentContainer= React.createElement(View,babelHelpers.extends({}, contentSizeChangeProps,{ ref:this._setInnerViewRef, style:contentContainerStyle, removeClippedSubviews:this.props.removeClippedSubviews, collapsable:false}), this.props.children); var alwaysBounceHorizontal= this.props.alwaysBounceHorizontal!==undefined? this.props.alwaysBounceHorizontal: this.props.horizontal; var alwaysBounceVertical= this.props.alwaysBounceVertical!==undefined? this.props.alwaysBounceVertical: !this.props.horizontal; var baseStyle=this.props.horizontal?styles.baseHorizontal:styles.baseVertical; var props=babelHelpers.extends({}, this.props,{ alwaysBounceHorizontal:alwaysBounceHorizontal, alwaysBounceVertical:alwaysBounceVertical, style:[baseStyle,this.props.style], onTouchStart:this.scrollResponderHandleTouchStart, onTouchMove:this.scrollResponderHandleTouchMove, onTouchEnd:this.scrollResponderHandleTouchEnd, onScrollBeginDrag:this.scrollResponderHandleScrollBeginDrag, onScrollEndDrag:this.scrollResponderHandleScrollEndDrag, onMomentumScrollBegin:this.scrollResponderHandleMomentumScrollBegin, onMomentumScrollEnd:this.scrollResponderHandleMomentumScrollEnd, onStartShouldSetResponder:this.scrollResponderHandleStartShouldSetResponder, onStartShouldSetResponderCapture:this.scrollResponderHandleStartShouldSetResponderCapture, onScrollShouldSetResponder:this.scrollResponderHandleScrollShouldSetResponder, onScroll:this._handleScroll, onResponderGrant:this.scrollResponderHandleResponderGrant, onResponderTerminationRequest:this.scrollResponderHandleTerminationRequest, onResponderTerminate:this.scrollResponderHandleTerminate, onResponderRelease:this.scrollResponderHandleResponderRelease, onResponderReject:this.scrollResponderHandleResponderReject, sendMomentumEvents:this.props.onMomentumScrollBegin||this.props.onMomentumScrollEnd?true:false});var decelerationRate=this.props.decelerationRate; if(decelerationRate){ props.decelerationRate=processDecelerationRate(decelerationRate); } var ScrollViewClass=void 0; if(Platform.OS==='ios'){ ScrollViewClass=RCTScrollView; }else if(Platform.OS==='android'){ if(this.props.horizontal){ ScrollViewClass=AndroidHorizontalScrollView; }else{ ScrollViewClass=AndroidScrollView; } } invariant( ScrollViewClass!==undefined, 'ScrollViewClass must not be undefined'); var refreshControl=this.props.refreshControl; if(refreshControl){ if(Platform.OS==='ios'){ return( React.createElement(ScrollViewClass,babelHelpers.extends({},props,{ref:this._setScrollViewRef}), refreshControl, contentContainer)); }else if(Platform.OS==='android'){ return React.cloneElement( refreshControl, {style:props.style}, React.createElement(ScrollViewClass,babelHelpers.extends({},props,{style:baseStyle,ref:this._setScrollViewRef}), contentContainer)); } } return( React.createElement(ScrollViewClass,babelHelpers.extends({},props,{ref:this._setScrollViewRef}), contentContainer)); }}); var styles=StyleSheet.create({ baseVertical:{ flex:1, flexDirection:'column'}, baseHorizontal:{ flex:1, flexDirection:'row'}, contentContainerHorizontal:{ flexDirection:'row'}}); var nativeOnlyProps=void 0,AndroidScrollView=void 0,AndroidHorizontalScrollView=void 0,RCTScrollView=void 0; if(Platform.OS==='android'){ nativeOnlyProps={ nativeOnly:{ sendMomentumEvents:true}}; AndroidScrollView=requireNativeComponent('RCTScrollView',ScrollView,nativeOnlyProps); AndroidHorizontalScrollView=requireNativeComponent( 'AndroidHorizontalScrollView', ScrollView, nativeOnlyProps); }else if(Platform.OS==='ios'){ nativeOnlyProps={ nativeOnly:{ onMomentumScrollBegin:true, onMomentumScrollEnd:true, onScrollBeginDrag:true, onScrollEndDrag:true}}; RCTScrollView=requireNativeComponent('RCTScrollView',ScrollView,nativeOnlyProps); } module.exports=ScrollView; }, "ScrollView"); __d(396 /* PointPropType */, function(global, require, module, exports) { 'use strict'; var PropTypes=require(40 /* react/lib/ReactPropTypes */); var createStrictShapeTypeChecker=require(118 /* createStrictShapeTypeChecker */); var PointPropType=createStrictShapeTypeChecker({ x:PropTypes.number, y:PropTypes.number}); module.exports=PointPropType; }, "PointPropType"); __d(397 /* ScrollResponder */, function(global, require, module, exports) { 'use strict'; var Dimensions=require(106 /* Dimensions */); var Platform=require(59 /* Platform */); var Keyboard=require(88 /* Keyboard */); var ReactNative=require(188 /* react/lib/ReactNative */); var Subscribable=require(398 /* Subscribable */); var TextInputState=require(58 /* TextInputState */); var UIManager=require(99 /* UIManager */);var _require= require(60 /* NativeModules */);var ScrollViewManager=_require.ScrollViewManager; var invariant=require(56 /* fbjs/lib/invariant */); var IS_ANIMATING_TOUCH_START_THRESHOLD_MS=16; var ScrollResponderMixin={ mixins:[Subscribable.Mixin], scrollResponderMixinGetInitialState:function scrollResponderMixinGetInitialState(){ return{ isTouching:false, lastMomentumScrollBeginTime:0, lastMomentumScrollEndTime:0, observedScrollSinceBecomingResponder:false, becameResponderWhileAnimating:false}; }, scrollResponderHandleScrollShouldSetResponder:function scrollResponderHandleScrollShouldSetResponder(){ return this.state.isTouching; }, scrollResponderHandleStartShouldSetResponder:function scrollResponderHandleStartShouldSetResponder(){ return false; }, scrollResponderHandleStartShouldSetResponderCapture:function scrollResponderHandleStartShouldSetResponderCapture(e){ var currentlyFocusedTextInput=TextInputState.currentlyFocusedField(); if(!this.props.keyboardShouldPersistTaps&& currentlyFocusedTextInput!=null&& e.target!==currentlyFocusedTextInput){ return true; } return this.scrollResponderIsAnimating(); }, scrollResponderHandleResponderReject:function scrollResponderHandleResponderReject(){ }, scrollResponderHandleTerminationRequest:function scrollResponderHandleTerminationRequest(){ return!this.state.observedScrollSinceBecomingResponder; }, scrollResponderHandleTouchEnd:function scrollResponderHandleTouchEnd(e){ var nativeEvent=e.nativeEvent; this.state.isTouching=nativeEvent.touches.length!==0; this.props.onTouchEnd&&this.props.onTouchEnd(e); }, scrollResponderHandleResponderRelease:function scrollResponderHandleResponderRelease(e){ this.props.onResponderRelease&&this.props.onResponderRelease(e); var currentlyFocusedTextInput=TextInputState.currentlyFocusedField(); if(!this.props.keyboardShouldPersistTaps&& currentlyFocusedTextInput!=null&& e.target!==currentlyFocusedTextInput&& !this.state.observedScrollSinceBecomingResponder&& !this.state.becameResponderWhileAnimating){ this.props.onScrollResponderKeyboardDismissed&& this.props.onScrollResponderKeyboardDismissed(e); TextInputState.blurTextInput(currentlyFocusedTextInput); } }, scrollResponderHandleScroll:function scrollResponderHandleScroll(e){ this.state.observedScrollSinceBecomingResponder=true; this.props.onScroll&&this.props.onScroll(e); }, scrollResponderHandleResponderGrant:function scrollResponderHandleResponderGrant(e){ this.state.observedScrollSinceBecomingResponder=false; this.props.onResponderGrant&&this.props.onResponderGrant(e); this.state.becameResponderWhileAnimating=this.scrollResponderIsAnimating(); }, scrollResponderHandleScrollBeginDrag:function scrollResponderHandleScrollBeginDrag(e){ this.props.onScrollBeginDrag&&this.props.onScrollBeginDrag(e); }, scrollResponderHandleScrollEndDrag:function scrollResponderHandleScrollEndDrag(e){ this.props.onScrollEndDrag&&this.props.onScrollEndDrag(e); }, scrollResponderHandleMomentumScrollBegin:function scrollResponderHandleMomentumScrollBegin(e){ this.state.lastMomentumScrollBeginTime=Date.now(); this.props.onMomentumScrollBegin&&this.props.onMomentumScrollBegin(e); }, scrollResponderHandleMomentumScrollEnd:function scrollResponderHandleMomentumScrollEnd(e){ this.state.lastMomentumScrollEndTime=Date.now(); this.props.onMomentumScrollEnd&&this.props.onMomentumScrollEnd(e); }, scrollResponderHandleTouchStart:function scrollResponderHandleTouchStart(e){ this.state.isTouching=true; this.props.onTouchStart&&this.props.onTouchStart(e); }, scrollResponderHandleTouchMove:function scrollResponderHandleTouchMove(e){ this.props.onTouchMove&&this.props.onTouchMove(e); }, scrollResponderIsAnimating:function scrollResponderIsAnimating(){ var now=Date.now(); var timeSinceLastMomentumScrollEnd=now-this.state.lastMomentumScrollEndTime; var isAnimating=timeSinceLastMomentumScrollEnd2?_len-2:0),_key=2;_key<_len;_key++){children[_key-2]=arguments[_key];} if(originalRef==null||cloneRef==null){ return React.cloneElement.apply(React,[element,config].concat(children)); } if(typeof originalRef!=='function'){ if(__DEV__){ console.warn( 'Cloning an element with a ref that will be overwritten because it '+ 'is not a function. Use a composable callback-style ref instead. '+ 'Ignoring ref: '+originalRef); } return React.cloneElement.apply(React,[element,config].concat(children)); } return React.cloneElement.apply(React,[element,babelHelpers.extends({}, config,{ ref:function ref(component){ cloneRef(component); originalRef(component); }})].concat( children)); } module.exports=cloneReferencedElement; }, "react-clone-referenced-element/cloneReferencedElement.js"); __d(402 /* MapView */, function(global, require, module, exports) { 'use strict'; var ColorPropType=require(47 /* ColorPropType */); var EdgeInsetsPropType=require(117 /* EdgeInsetsPropType */); var Image=require(385 /* Image */); var NativeMethodsMixin=require(49 /* react/lib/NativeMethodsMixin */); var Platform=require(59 /* Platform */); var React=require(103 /* React */); var StyleSheet=require(104 /* StyleSheet */); var View=require(116 /* View */); var deprecatedPropType=require(113 /* deprecatedPropType */); var processColor=require(124 /* processColor */); var resolveAssetSource=require(168 /* resolveAssetSource */); var requireNativeComponent=require(130 /* requireNativeComponent */); var MapView=React.createClass({displayName:'MapView', mixins:[NativeMethodsMixin], propTypes:babelHelpers.extends({}, View.propTypes,{ style:View.propTypes.style, showsUserLocation:React.PropTypes.bool, followUserLocation:React.PropTypes.bool, showsPointsOfInterest:React.PropTypes.bool, showsCompass:React.PropTypes.bool, zoomEnabled:React.PropTypes.bool, rotateEnabled:React.PropTypes.bool, pitchEnabled:React.PropTypes.bool, scrollEnabled:React.PropTypes.bool, mapType:React.PropTypes.oneOf([ 'standard', 'satellite', 'hybrid']), region:React.PropTypes.shape({ latitude:React.PropTypes.number.isRequired, longitude:React.PropTypes.number.isRequired, latitudeDelta:React.PropTypes.number, longitudeDelta:React.PropTypes.number}), annotations:React.PropTypes.arrayOf(React.PropTypes.shape({ latitude:React.PropTypes.number.isRequired, longitude:React.PropTypes.number.isRequired, animateDrop:React.PropTypes.bool, draggable:React.PropTypes.bool, onDragStateChange:React.PropTypes.func, onFocus:React.PropTypes.func, onBlur:React.PropTypes.func, title:React.PropTypes.string, subtitle:React.PropTypes.string, leftCalloutView:React.PropTypes.element, rightCalloutView:React.PropTypes.element, detailCalloutView:React.PropTypes.element, tintColor:ColorPropType, image:Image.propTypes.source, view:React.PropTypes.element, id:React.PropTypes.string, hasLeftCallout:deprecatedPropType( React.PropTypes.bool, 'Use `leftCalloutView` instead.'), hasRightCallout:deprecatedPropType( React.PropTypes.bool, 'Use `rightCalloutView` instead.'), onLeftCalloutPress:deprecatedPropType( React.PropTypes.func, 'Use `leftCalloutView` instead.'), onRightCalloutPress:deprecatedPropType( React.PropTypes.func, 'Use `rightCalloutView` instead.')})), overlays:React.PropTypes.arrayOf(React.PropTypes.shape({ coordinates:React.PropTypes.arrayOf(React.PropTypes.shape({ latitude:React.PropTypes.number.isRequired, longitude:React.PropTypes.number.isRequired})), lineWidth:React.PropTypes.number, strokeColor:ColorPropType, fillColor:ColorPropType, id:React.PropTypes.string})), maxDelta:React.PropTypes.number, minDelta:React.PropTypes.number, legalLabelInsets:EdgeInsetsPropType, onRegionChange:React.PropTypes.func, onRegionChangeComplete:React.PropTypes.func, onAnnotationPress:React.PropTypes.func, active:React.PropTypes.bool}), statics:{ PinColors:{ RED:'#ff3b30', GREEN:'#4cd964', PURPLE:'#c969e0'}}, render:function render(){var _this=this; var children=[];var _props=this.props;var annotations=_props.annotations;var overlays=_props.overlays;var followUserLocation=_props.followUserLocation; annotations=annotations&&annotations.map(function(annotation){var id= annotation.id;var image=annotation.image;var tintColor=annotation.tintColor;var view=annotation.view;var leftCalloutView=annotation.leftCalloutView;var rightCalloutView=annotation.rightCalloutView;var detailCalloutView=annotation.detailCalloutView; if(!view&&image&&tintColor){ view=React.createElement(Image,{ style:{ tintColor:processColor(tintColor)}, source:image}); image=undefined; } if(view){ if(image){ console.warn('`image` and `view` both set on annotation. Image will be ignored.'); } var viewIndex=children.length; children.push(React.cloneElement(view,{ style:[styles.annotationView,view.props.style||{}]})); } if(leftCalloutView){ var leftCalloutViewIndex=children.length; children.push(React.cloneElement(leftCalloutView,{ style:[styles.calloutView,leftCalloutView.props.style||{}]})); } if(rightCalloutView){ var rightCalloutViewIndex=children.length; children.push(React.cloneElement(rightCalloutView,{ style:[styles.calloutView,rightCalloutView.props.style||{}]})); } if(detailCalloutView){ var detailCalloutViewIndex=children.length; children.push(React.cloneElement(detailCalloutView,{ style:[styles.calloutView,detailCalloutView.props.style||{}]})); } var result=babelHelpers.extends({}, annotation,{ tintColor:tintColor&&processColor(tintColor), image:image, viewIndex:viewIndex, leftCalloutViewIndex:leftCalloutViewIndex, rightCalloutViewIndex:rightCalloutViewIndex, detailCalloutViewIndex:detailCalloutViewIndex, view:undefined, leftCalloutView:undefined, rightCalloutView:undefined, detailCalloutView:undefined}); result.id=id||encodeURIComponent(JSON.stringify(result)); result.image=image&&resolveAssetSource(image); return result; }); overlays=overlays&&overlays.map(function(overlay){var id=overlay.id;var fillColor=overlay.fillColor;var strokeColor=overlay.strokeColor; var result=babelHelpers.extends({}, overlay,{ strokeColor:strokeColor&&processColor(strokeColor), fillColor:fillColor&&processColor(fillColor)}); result.id=id||encodeURIComponent(JSON.stringify(result)); return result; }); var findByAnnotationId=function findByAnnotationId(annotationId){ if(!annotations){ return null; } for(var i=0,l=annotations.length;i=19?UIManager.RCTModalHostView.Constants.StatusBarHeight:0}; var animationType=this.props.animationType; if(!animationType){ animationType='none'; if(this.props.animated){ animationType='slide'; } } return( React.createElement(RCTModalHostView,{ animationType:animationType, transparent:this.props.transparent, onRequestClose:this.props.onRequestClose, onShow:this.props.onShow, style:styles.modal, onStartShouldSetResponder:this._shouldSetResponder}, React.createElement(View,{style:[styles.container,containerStyles]}, this.props.children))); }},{key:'_shouldSetResponder',value:function _shouldSetResponder() { return true; }}]);return Modal;}(React.Component);Modal.propTypes={animationType:PropTypes.oneOf(['none','slide','fade']),transparent:PropTypes.bool,visible:PropTypes.bool,onRequestClose:Platform.OS==='android'?PropTypes.func.isRequired:PropTypes.func,onShow:PropTypes.func,animated:deprecatedPropType(PropTypes.bool,'Use the `animationType` prop instead.')};Modal.defaultProps={visible:true}; var side=I18nManager.isRTL?'right':'left'; var styles=StyleSheet.create({ modal:{ position:'absolute'}, container:(_container={ position:'absolute'},babelHelpers.defineProperty(_container, side,0),babelHelpers.defineProperty(_container,'top', 0),_container)}); module.exports=Modal; }, "Modal"); __d(404 /* I18nManager */, function(global, require, module, exports) { 'use strict'; var I18nManager=require(60 /* NativeModules */).I18nManager||{ isRTL:false, allowRTL:function allowRTL(){}}; module.exports=I18nManager; }, "I18nManager"); __d(405 /* Navigator */, function(global, require, module, exports) { 'use strict'; var AnimationsDebugModule=require(60 /* NativeModules */).AnimationsDebugModule; var Dimensions=require(106 /* Dimensions */); var InteractionMixin=require(406 /* InteractionMixin */); var NavigationContext=require(411 /* NavigationContext */); var NavigatorBreadcrumbNavigationBar=require(416 /* NavigatorBreadcrumbNavigationBar */); var NavigatorNavigationBar=require(422 /* NavigatorNavigationBar */); var NavigatorSceneConfigs=require(423 /* NavigatorSceneConfigs */); var PanResponder=require(424 /* PanResponder */); var React=require(103 /* React */); var StyleSheet=require(104 /* StyleSheet */); var Subscribable=require(398 /* Subscribable */); var TimerMixin=require(391 /* react-timer-mixin */); var View=require(116 /* View */); var clamp=require(426 /* clamp */); var flattenStyle=require(55 /* flattenStyle */); var invariant=require(56 /* fbjs/lib/invariant */); var rebound=require(427 /* rebound */); var PropTypes=React.PropTypes; var SCREEN_WIDTH=Dimensions.get('window').width; var SCREEN_HEIGHT=Dimensions.get('window').height; var SCENE_DISABLED_NATIVE_PROPS={ pointerEvents:'none', style:{ top:SCREEN_HEIGHT, bottom:-SCREEN_HEIGHT, opacity:0}}; var __uid=0; function getuid(){ return __uid++; } function getRouteID(route){ if(route===null||typeof route!=='object'){ return String(route); } var key='__navigatorRouteID'; if(!route.hasOwnProperty(key)){ Object.defineProperty(route,key,{ enumerable:false, configurable:false, writable:false, value:getuid()}); } return route[key]; } var styles=StyleSheet.create({ container:{ flex:1, overflow:'hidden'}, defaultSceneStyle:{ position:'absolute', left:0, right:0, bottom:0, top:0}, baseScene:{ position:'absolute', overflow:'hidden', left:0, right:0, bottom:0, top:0}, disabledScene:{ top:SCREEN_HEIGHT, bottom:-SCREEN_HEIGHT}, transitioner:{ flex:1, backgroundColor:'transparent', overflow:'hidden'}}); var GESTURE_ACTIONS=[ 'pop', 'jumpBack', 'jumpForward']; var Navigator=React.createClass({displayName:'Navigator', propTypes:{ configureScene:PropTypes.func, renderScene:PropTypes.func.isRequired, initialRoute:PropTypes.object, initialRouteStack:PropTypes.arrayOf(PropTypes.object), onWillFocus:PropTypes.func, onDidFocus:PropTypes.func, navigationBar:PropTypes.node, navigator:PropTypes.object, sceneStyle:View.propTypes.style}, statics:{ BreadcrumbNavigationBar:NavigatorBreadcrumbNavigationBar, NavigationBar:NavigatorNavigationBar, SceneConfigs:NavigatorSceneConfigs}, mixins:[TimerMixin,InteractionMixin,Subscribable.Mixin], getDefaultProps:function getDefaultProps(){ return{ configureScene:function configureScene(){return NavigatorSceneConfigs.PushFromRight;}, sceneStyle:styles.defaultSceneStyle}; }, getInitialState:function getInitialState(){var _this=this; this._navigationBarNavigator=this.props.navigationBarNavigator||this; this._renderedSceneMap=new Map(); var routeStack=this.props.initialRouteStack||[this.props.initialRoute]; invariant( routeStack.length>=1, 'Navigator requires props.initialRoute or props.initialRouteStack.'); var initialRouteIndex=routeStack.length-1; if(this.props.initialRoute){ initialRouteIndex=routeStack.indexOf(this.props.initialRoute); invariant( initialRouteIndex!==-1, 'initialRoute is not in initialRouteStack.'); } return{ sceneConfigStack:routeStack.map( function(route){return _this.props.configureScene(route,routeStack);}), routeStack:routeStack, presentedIndex:initialRouteIndex, transitionFromIndex:null, activeGesture:null, pendingGestureProgress:null, transitionQueue:[]}; }, componentWillMount:function componentWillMount(){var _this2=this; this.__defineGetter__('navigationContext',this._getNavigationContext); this._subRouteFocus=[]; this.parentNavigator=this.props.navigator; this._handlers={}; this.springSystem=new rebound.SpringSystem(); this.spring=this.springSystem.createSpring(); this.spring.setRestSpeedThreshold(0.05); this.spring.setCurrentValue(0).setAtRest(); this.spring.addListener({ onSpringEndStateChange:function onSpringEndStateChange(){ if(!_this2._interactionHandle){ _this2._interactionHandle=_this2.createInteractionHandle(); } }, onSpringUpdate:function onSpringUpdate(){ _this2._handleSpringUpdate(); }, onSpringAtRest:function onSpringAtRest(){ _this2._completeTransition(); }}); this.panGesture=PanResponder.create({ onMoveShouldSetPanResponder:this._handleMoveShouldSetPanResponder, onPanResponderRelease:this._handlePanResponderRelease, onPanResponderMove:this._handlePanResponderMove, onPanResponderTerminate:this._handlePanResponderTerminate}); this._interactionHandle=null; this._emitWillFocus(this.state.routeStack[this.state.presentedIndex]); }, componentDidMount:function componentDidMount(){ this._handleSpringUpdate(); this._emitDidFocus(this.state.routeStack[this.state.presentedIndex]); }, componentWillUnmount:function componentWillUnmount(){ if(this._navigationContext){ this._navigationContext.dispose(); this._navigationContext=null; } this.spring.destroy(); if(this._interactionHandle){ this.clearInteractionHandle(this._interactionHandle); } }, immediatelyResetRouteStack:function immediatelyResetRouteStack(nextRouteStack){var _this3=this; var destIndex=nextRouteStack.length-1; this.setState({ routeStack:nextRouteStack, sceneConfigStack:nextRouteStack.map( function(route){return _this3.props.configureScene(route,nextRouteStack);}), presentedIndex:destIndex, activeGesture:null, transitionFromIndex:null, transitionQueue:[]}, function(){ _this3._handleSpringUpdate(); _this3._navBar&&_this3._navBar.immediatelyRefresh(); _this3._emitDidFocus(_this3.state.routeStack[_this3.state.presentedIndex]); }); }, _transitionTo:function _transitionTo(destIndex,velocity,jumpSpringTo,cb){ if(this.state.presentedIndex===destIndex){ cb&&cb(); return; } if(this.state.transitionFromIndex!==null){ this.state.transitionQueue.push({ destIndex:destIndex, velocity:velocity, cb:cb}); return; } this.state.transitionFromIndex=this.state.presentedIndex; this.state.presentedIndex=destIndex; this.state.transitionCb=cb; this._onAnimationStart(); if(AnimationsDebugModule){ AnimationsDebugModule.startRecordingFps(); } var sceneConfig=this.state.sceneConfigStack[this.state.transitionFromIndex]|| this.state.sceneConfigStack[this.state.presentedIndex]; invariant( sceneConfig, 'Cannot configure scene at index '+this.state.transitionFromIndex); if(jumpSpringTo!=null){ this.spring.setCurrentValue(jumpSpringTo); } this.spring.setOvershootClampingEnabled(true); this.spring.getSpringConfig().friction=sceneConfig.springFriction; this.spring.getSpringConfig().tension=sceneConfig.springTension; this.spring.setVelocity(velocity||sceneConfig.defaultTransitionVelocity); this.spring.setEndValue(1); }, _handleSpringUpdate:function _handleSpringUpdate(){ if(!this.isMounted()){ return; } if(this.state.transitionFromIndex!=null){ this._transitionBetween( this.state.transitionFromIndex, this.state.presentedIndex, this.spring.getCurrentValue()); }else if(this.state.activeGesture!=null){ var presentedToIndex=this.state.presentedIndex+this._deltaForGestureAction(this.state.activeGesture); this._transitionBetween( this.state.presentedIndex, presentedToIndex, this.spring.getCurrentValue()); } }, _completeTransition:function _completeTransition(){ if(!this.isMounted()){ return; } if(this.spring.getCurrentValue()!==1&&this.spring.getCurrentValue()!==0){ if(this.state.pendingGestureProgress){ this.state.pendingGestureProgress=null; } return; } this._onAnimationEnd(); var presentedIndex=this.state.presentedIndex; var didFocusRoute=this._subRouteFocus[presentedIndex]||this.state.routeStack[presentedIndex]; if(AnimationsDebugModule){ AnimationsDebugModule.stopRecordingFps(Date.now()); } this.state.transitionFromIndex=null; this.spring.setCurrentValue(0).setAtRest(); this._hideScenes(); if(this.state.transitionCb){ this.state.transitionCb(); this.state.transitionCb=null; } this._emitDidFocus(didFocusRoute); if(this._interactionHandle){ this.clearInteractionHandle(this._interactionHandle); this._interactionHandle=null; } if(this.state.pendingGestureProgress){ var gestureToIndex=this.state.presentedIndex+this._deltaForGestureAction(this.state.activeGesture); this._enableScene(gestureToIndex); this.spring.setEndValue(this.state.pendingGestureProgress); return; } if(this.state.transitionQueue.length){ var queuedTransition=this.state.transitionQueue.shift(); this._enableScene(queuedTransition.destIndex); this._emitWillFocus(this.state.routeStack[queuedTransition.destIndex]); this._transitionTo( queuedTransition.destIndex, queuedTransition.velocity, null, queuedTransition.cb); } }, _emitDidFocus:function _emitDidFocus(route){ this.navigationContext.emit('didfocus',{route:route}); if(this.props.onDidFocus){ this.props.onDidFocus(route); } }, _emitWillFocus:function _emitWillFocus(route){ this.navigationContext.emit('willfocus',{route:route}); var navBar=this._navBar; if(navBar&&navBar.handleWillFocus){ navBar.handleWillFocus(route); } if(this.props.onWillFocus){ this.props.onWillFocus(route); } }, _hideScenes:function _hideScenes(){ var gesturingToIndex=null; if(this.state.activeGesture){ gesturingToIndex=this.state.presentedIndex+this._deltaForGestureAction(this.state.activeGesture); } for(var i=0;i=this.state.routeStack.length-1&& gestureName==='jumpForward'; return wouldOverswipeForward||wouldOverswipeBack; }, _deltaForGestureAction:function _deltaForGestureAction(gestureAction){ switch(gestureAction){ case'pop': case'jumpBack': return-1; case'jumpForward': return 1; default: invariant(false,'Unsupported gesture action '+gestureAction); return;} }, _handlePanResponderRelease:function _handlePanResponderRelease(e,gestureState){var _this4=this; var sceneConfig=this.state.sceneConfigStack[this.state.presentedIndex]; var releaseGestureAction=this.state.activeGesture; if(!releaseGestureAction){ return; } var releaseGesture=sceneConfig.gestures[releaseGestureAction]; var destIndex=this.state.presentedIndex+this._deltaForGestureAction(this.state.activeGesture); if(this.spring.getCurrentValue()===0){ this.spring.setCurrentValue(0).setAtRest(); this._completeTransition(); return; } var isTravelVertical=releaseGesture.direction==='top-to-bottom'||releaseGesture.direction==='bottom-to-top'; var isTravelInverted=releaseGesture.direction==='right-to-left'||releaseGesture.direction==='bottom-to-top'; var velocity,gestureDistance; if(isTravelVertical){ velocity=isTravelInverted?-gestureState.vy:gestureState.vy; gestureDistance=isTravelInverted?-gestureState.dy:gestureState.dy; }else{ velocity=isTravelInverted?-gestureState.vx:gestureState.vx; gestureDistance=isTravelInverted?-gestureState.dx:gestureState.dx; } var transitionVelocity=clamp(-10,velocity,10); if(Math.abs(velocity)releaseGesture.fullDistance*releaseGesture.stillCompletionRatio; transitionVelocity=hasGesturedEnoughToComplete?releaseGesture.snapVelocity:-releaseGesture.snapVelocity; } if(transitionVelocity<0||this._doesGestureOverswipe(releaseGestureAction)){ if(this.state.transitionFromIndex==null){ var transitionBackToPresentedIndex=this.state.presentedIndex; this.state.presentedIndex=destIndex; this._transitionTo( transitionBackToPresentedIndex, -transitionVelocity, 1-this.spring.getCurrentValue()); } }else{ this._emitWillFocus(this.state.routeStack[destIndex]); this._transitionTo( destIndex, transitionVelocity, null, function(){ if(releaseGestureAction==='pop'){ _this4._cleanScenesPastIndex(destIndex); } }); } this._detachGesture(); }, _handlePanResponderTerminate:function _handlePanResponderTerminate(e,gestureState){ if(this.state.activeGesture==null){ return; } var destIndex=this.state.presentedIndex+this._deltaForGestureAction(this.state.activeGesture); this._detachGesture(); var transitionBackToPresentedIndex=this.state.presentedIndex; this.state.presentedIndex=destIndex; this._transitionTo( transitionBackToPresentedIndex, null, 1-this.spring.getCurrentValue()); }, _attachGesture:function _attachGesture(gestureId){ this.state.activeGesture=gestureId; var gesturingToIndex=this.state.presentedIndex+this._deltaForGestureAction(this.state.activeGesture); this._enableScene(gesturingToIndex); }, _detachGesture:function _detachGesture(){ this.state.activeGesture=null; this.state.pendingGestureProgress=null; this._hideScenes(); }, _handlePanResponderMove:function _handlePanResponderMove(e,gestureState){ if(this._isMoveGestureAttached!==undefined){ invariant( this._expectingGestureGrant, 'Responder granted unexpectedly.'); this._attachGesture(this._expectingGestureGrant); this._onAnimationStart(); this._expectingGestureGrant=undefined; } var sceneConfig=this.state.sceneConfigStack[this.state.presentedIndex]; if(this.state.activeGesture){ var gesture=sceneConfig.gestures[this.state.activeGesture]; return this._moveAttachedGesture(gesture,gestureState); } var matchedGesture=this._matchGestureAction(GESTURE_ACTIONS,sceneConfig.gestures,gestureState); if(matchedGesture){ this._attachGesture(matchedGesture); } }, _moveAttachedGesture:function _moveAttachedGesture(gesture,gestureState){ var isTravelVertical=gesture.direction==='top-to-bottom'||gesture.direction==='bottom-to-top'; var isTravelInverted=gesture.direction==='right-to-left'||gesture.direction==='bottom-to-top'; var distance=isTravelVertical?gestureState.dy:gestureState.dx; distance=isTravelInverted?-distance:distance; var gestureDetectMovement=gesture.gestureDetectMovement; var nextProgress=(distance-gestureDetectMovement)/( gesture.fullDistance-gestureDetectMovement); if(nextProgress<0&&gesture.isDetachable){ var gesturingToIndex=this.state.presentedIndex+this._deltaForGestureAction(this.state.activeGesture); this._transitionBetween(this.state.presentedIndex,gesturingToIndex,0); this._detachGesture(); if(this.state.pendingGestureProgress!=null){ this.spring.setCurrentValue(0); } return; } if(this._doesGestureOverswipe(this.state.activeGesture)){ var frictionConstant=gesture.overswipe.frictionConstant; var frictionByDistance=gesture.overswipe.frictionByDistance; var frictionRatio=1/(frictionConstant+Math.abs(nextProgress)*frictionByDistance); nextProgress*=frictionRatio; } nextProgress=clamp(0,nextProgress,1); if(this.state.transitionFromIndex!=null){ this.state.pendingGestureProgress=nextProgress; }else if(this.state.pendingGestureProgress){ this.spring.setEndValue(nextProgress); }else{ this.spring.setCurrentValue(nextProgress); } }, _matchGestureAction:function _matchGestureAction(eligibleGestures,gestures,gestureState){var _this5=this; if(!gestures||!eligibleGestures||!eligibleGestures.some){ return null; } var matchedGesture=null; eligibleGestures.some(function(gestureName,gestureIndex){ var gesture=gestures[gestureName]; if(!gesture){ return; } if(gesture.overswipe==null&&_this5._doesGestureOverswipe(gestureName)){ return false; } var isTravelVertical=gesture.direction==='top-to-bottom'||gesture.direction==='bottom-to-top'; var isTravelInverted=gesture.direction==='right-to-left'||gesture.direction==='bottom-to-top'; var startedLoc=isTravelVertical?gestureState.y0:gestureState.x0; var currentLoc=isTravelVertical?gestureState.moveY:gestureState.moveX; var travelDist=isTravelVertical?gestureState.dy:gestureState.dx; var oppositeAxisTravelDist= isTravelVertical?gestureState.dx:gestureState.dy; var edgeHitWidth=gesture.edgeHitWidth; if(isTravelInverted){ startedLoc=-startedLoc; currentLoc=-currentLoc; travelDist=-travelDist; oppositeAxisTravelDist=-oppositeAxisTravelDist; edgeHitWidth=isTravelVertical? -(SCREEN_HEIGHT-edgeHitWidth): -(SCREEN_WIDTH-edgeHitWidth); } if(startedLoc===0){ startedLoc=currentLoc; } var moveStartedInRegion=gesture.edgeHitWidth==null|| startedLoc=gesture.gestureDetectMovement; if(!moveTravelledFarEnough){ return false; } var directionIsCorrect=Math.abs(travelDist)>Math.abs(oppositeAxisTravelDist)*gesture.directionRatio; if(directionIsCorrect){ matchedGesture=gestureName; return true; }else{ _this5._eligibleGestures=_this5._eligibleGestures.slice().splice(gestureIndex,1); } }); return matchedGesture||null; }, _transitionSceneStyle:function _transitionSceneStyle(fromIndex,toIndex,progress,index){ var viewAtIndex=this.refs['scene_'+index]; if(viewAtIndex===null||viewAtIndex===undefined){ return; } var sceneConfigIndex=fromIndex=0&&fromIndex>=0){ navBar.updateProgress(progress,fromIndex,toIndex); } }, _handleResponderTerminationRequest:function _handleResponderTerminationRequest(){ return false; }, _getDestIndexWithinBounds:function _getDestIndexWithinBounds(n){ var currentIndex=this.state.presentedIndex; var destIndex=currentIndex+n; invariant( destIndex>=0, 'Cannot jump before the first route.'); var maxIndex=this.state.routeStack.length-1; invariant( maxIndex>=destIndex, 'Cannot jump past the last route.'); return destIndex; }, _jumpN:function _jumpN(n){ var destIndex=this._getDestIndexWithinBounds(n); this._enableScene(destIndex); this._emitWillFocus(this.state.routeStack[destIndex]); this._transitionTo(destIndex); }, jumpTo:function jumpTo(route){ var destIndex=this.state.routeStack.indexOf(route); invariant( destIndex!==-1, 'Cannot jump to route that is not in the route stack'); this._jumpN(destIndex-this.state.presentedIndex); }, jumpForward:function jumpForward(){ this._jumpN(1); }, jumpBack:function jumpBack(){ this._jumpN(-1); }, push:function push(route){var _this6=this; invariant(!!route,'Must supply route to push'); var activeLength=this.state.presentedIndex+1; var activeStack=this.state.routeStack.slice(0,activeLength); var activeAnimationConfigStack=this.state.sceneConfigStack.slice(0,activeLength); var nextStack=activeStack.concat([route]); var destIndex=nextStack.length-1; var nextSceneConfig=this.props.configureScene(route,nextStack); var nextAnimationConfigStack=activeAnimationConfigStack.concat([nextSceneConfig]); this._emitWillFocus(nextStack[destIndex]); this.setState({ routeStack:nextStack, sceneConfigStack:nextAnimationConfigStack}, function(){ _this6._enableScene(destIndex); _this6._transitionTo(destIndex,nextSceneConfig.defaultTransitionVelocity); }); }, _popN:function _popN(n){var _this7=this; if(n===0){ return; } invariant( this.state.presentedIndex-n>=0, 'Cannot pop below zero'); var popIndex=this.state.presentedIndex-n; var presentedRoute=this.state.routeStack[this.state.presentedIndex]; var popSceneConfig=this.props.configureScene(presentedRoute); this._enableScene(popIndex); this._emitWillFocus(this.state.routeStack[popIndex]); this._transitionTo( popIndex, popSceneConfig.defaultTransitionVelocity, null, function(){ _this7._cleanScenesPastIndex(popIndex); }); }, pop:function pop(){ if(this.state.transitionQueue.length){ return; } if(this.state.presentedIndex>0){ this._popN(1); } }, replaceAtIndex:function replaceAtIndex(route,index,cb){var _this8=this; invariant(!!route,'Must supply route to replace'); if(index<0){ index+=this.state.routeStack.length; } if(this.state.routeStack.length<=index){ return; } var nextRouteStack=this.state.routeStack.slice(); var nextAnimationModeStack=this.state.sceneConfigStack.slice(); nextRouteStack[index]=route; nextAnimationModeStack[index]=this.props.configureScene(route,nextRouteStack); if(index===this.state.presentedIndex){ this._emitWillFocus(route); } this.setState({ routeStack:nextRouteStack, sceneConfigStack:nextAnimationModeStack}, function(){ if(index===_this8.state.presentedIndex){ _this8._emitDidFocus(route); } cb&&cb(); }); }, replace:function replace(route){ this.replaceAtIndex(route,this.state.presentedIndex); }, replacePrevious:function replacePrevious(route){ this.replaceAtIndex(route,this.state.presentedIndex-1); }, popToTop:function popToTop(){ this.popToRoute(this.state.routeStack[0]); }, popToRoute:function popToRoute(route){ var indexOfRoute=this.state.routeStack.indexOf(route); invariant( indexOfRoute!==-1, 'Calling popToRoute for a route that doesn\'t exist!'); var numToPop=this.state.presentedIndex-indexOfRoute; this._popN(numToPop); }, replacePreviousAndPop:function replacePreviousAndPop(route){ if(this.state.routeStack.length<2){ return; } this.replacePrevious(route); this.pop(); }, resetTo:function resetTo(route){var _this9=this; invariant(!!route,'Must supply route to push'); this.replaceAtIndex(route,0,function(){ if(_this9.state.presentedIndex>0){ _this9._popN(_this9.state.presentedIndex); } }); }, getCurrentRoutes:function getCurrentRoutes(){ return this.state.routeStack.slice(); }, _cleanScenesPastIndex:function _cleanScenesPastIndex(index){ var newStackLength=index+1; if(newStackLength0){ _nextUpdateHandle=setTimeout(_processUpdate,0+DEBUG_DELAY); }else{ _nextUpdateHandle=setImmediate(_processUpdate); } } } function _processUpdate(){ _nextUpdateHandle=0; var interactionCount=_interactionSet.size; _addInteractionSet.forEach(function(handle){return( _interactionSet.add(handle));}); _deleteInteractionSet.forEach(function(handle){return( _interactionSet.delete(handle));}); var nextInteractionCount=_interactionSet.size; if(interactionCount!==0&&nextInteractionCount===0){ _emitter.emit(InteractionManager.Events.interactionComplete); }else if(interactionCount===0&&nextInteractionCount!==0){ _emitter.emit(InteractionManager.Events.interactionStart); } if(nextInteractionCount===0){ while(_taskQueue.hasTasksToProcess()){ _taskQueue.processNext(); if(_deadline>0&& BatchedBridge.getEventLoopRunningTime()>=_deadline){ _scheduleUpdate(); break; } } } _addInteractionSet.clear(); _deleteInteractionSet.clear(); } module.exports=InteractionManager; }, "InteractionManager"); __d(408 /* TaskQueue */, function(global, require, module, exports) { 'use strict'; var infoLog=require(409 /* infoLog */); var invariant=require(56 /* fbjs/lib/invariant */); var DEBUG=false;var TaskQueue=function(){ function TaskQueue(_ref){var onMoreTasks=_ref.onMoreTasks;babelHelpers.classCallCheck(this,TaskQueue); this._onMoreTasks=onMoreTasks; this._queueStack=[{tasks:[],popable:false}]; }babelHelpers.createClass(TaskQueue,[{key:'enqueue',value:function enqueue( task){ this._getCurrentQueue().push(task); }},{key:'enqueueTasks',value:function enqueueTasks( tasks){var _this=this; tasks.forEach(function(task){return _this.enqueue(task);}); }},{key:'cancelTasks',value:function cancelTasks( tasksToCancel){ this._queueStack=this._queueStack. map(function(queue){return babelHelpers.extends({}, queue,{ tasks:queue.tasks.filter(function(task){return tasksToCancel.indexOf(task)===-1;})});}). filter(function(queue,idx){return queue.tasks.length>0||idx===0;}); }},{key:'hasTasksToProcess',value:function hasTasksToProcess() { return this._getCurrentQueue().length>0; }},{key:'processNext',value:function processNext() { var queue=this._getCurrentQueue(); if(queue.length){ var task=queue.shift(); try{ if(task.gen){ DEBUG&&infoLog('genPromise for task '+task.name); this._genPromise(task); }else if(task.run){ DEBUG&&infoLog('run task '+task.name); task.run(); }else{ invariant( typeof task==='function', 'Expected Function, SimpleTask, or PromiseTask, but got:\n'+ JSON.stringify(task,null,2)); DEBUG&&infoLog('run anonymous task'); task(); } }catch(e){ e.message='TaskQueue: Error with task '+(task.name||'')+': '+ e.message; throw e; } } }},{key:'_getCurrentQueue',value:function _getCurrentQueue() { var stackIdx=this._queueStack.length-1; var queue=this._queueStack[stackIdx]; if(queue.popable&& queue.tasks.length===0&& this._queueStack.length>1){ this._queueStack.pop(); DEBUG&&infoLog('popped queue: ',{stackIdx:stackIdx,queueStackSize:this._queueStack.length}); return this._getCurrentQueue(); }else{ return queue.tasks; } }},{key:'_genPromise',value:function _genPromise( task){var _this2=this; this._queueStack.push({tasks:[],popable:false}); var stackIdx=this._queueStack.length-1; DEBUG&&infoLog('push new queue: ',{stackIdx:stackIdx}); DEBUG&&infoLog('exec gen task '+task.name); task.gen(). then(function(){ DEBUG&&infoLog( 'onThen for gen task '+task.name, {stackIdx:stackIdx,queueStackSize:_this2._queueStack.length}); _this2._queueStack[stackIdx].popable=true; _this2.hasTasksToProcess()&&_this2._onMoreTasks(); }). catch(function(ex){ ex.message='TaskQueue: Error resolving Promise in task '+task.name+': '+ex.message; throw ex; }). done(); }}]);return TaskQueue;}(); module.exports=TaskQueue; }, "TaskQueue"); __d(409 /* infoLog */, function(global, require, module, exports) { 'use strict'; function infoLog(){var _console; return(_console=console).log.apply(_console,arguments); } module.exports=infoLog; }, "infoLog"); __d(410 /* setImmediate */, function(global, require, module, exports) { module.exports=global.setImmediate; }, "setImmediate"); __d(411 /* NavigationContext */, function(global, require, module, exports) { 'use strict'; var NavigationEvent=require(412 /* NavigationEvent */); var NavigationEventEmitter=require(413 /* NavigationEventEmitter */); var NavigationTreeNode=require(414 /* NavigationTreeNode */); var Set=require(220 /* Set */); var emptyFunction=require(45 /* fbjs/lib/emptyFunction */); var invariant=require(56 /* fbjs/lib/invariant */);var AT_TARGET= NavigationEvent.AT_TARGET;var BUBBLING_PHASE=NavigationEvent.BUBBLING_PHASE;var CAPTURING_PHASE=NavigationEvent.CAPTURING_PHASE; var LegacyEventTypes=new Set([ 'willfocus', 'didfocus']);var NavigationContext=function(){ function NavigationContext(){babelHelpers.classCallCheck(this,NavigationContext); this._bubbleEventEmitter=new NavigationEventEmitter(this); this._captureEventEmitter=new NavigationEventEmitter(this); this._currentRoute=null; this.__node=new NavigationTreeNode(this); this._emitCounter=0; this._emitQueue=[]; this.addListener('willfocus',this._onFocus); this.addListener('didfocus',this._onFocus); }babelHelpers.createClass(NavigationContext,[{key:'appendChild',value:function appendChild( childContext){ this.__node.appendChild(childContext.__node); }},{key:'addListener',value:function addListener( eventType, listener, useCapture) { if(LegacyEventTypes.has(eventType)){ useCapture=false; } var emitter=useCapture? this._captureEventEmitter: this._bubbleEventEmitter; if(emitter){ return emitter.addListener(eventType,listener,this); }else{ return{remove:emptyFunction}; } }},{key:'emit',value:function emit( eventType,data,didEmitCallback){var _this=this; if(this._emitCounter>0){ var args=Array.prototype.slice.call(arguments); this._emitQueue.push(args); return; } this._emitCounter++; if(LegacyEventTypes.has(eventType)){ this.__emit( eventType, data, null, { defaultPrevented:false, eventPhase:AT_TARGET, propagationStopped:true, target:this}); }else{ var targets=[this]; var parentTarget=this.parent; while(parentTarget){ targets.unshift(parentTarget); parentTarget=parentTarget.parent; } var propagationStopped=false; var defaultPrevented=false; var callback=function callback(event){ propagationStopped=propagationStopped||event.isPropagationStopped(); defaultPrevented=defaultPrevented||event.defaultPrevented; }; targets.some(function(currentTarget){ if(propagationStopped){ return true; } var extraInfo={ defaultPrevented:defaultPrevented, eventPhase:CAPTURING_PHASE, propagationStopped:propagationStopped, target:_this}; currentTarget.__emit(eventType,data,callback,extraInfo); },this); targets.reverse().some(function(currentTarget){ if(propagationStopped){ return true; } var extraInfo={ defaultPrevented:defaultPrevented, eventPhase:BUBBLING_PHASE, propagationStopped:propagationStopped, target:_this}; currentTarget.__emit(eventType,data,callback,extraInfo); },this); } if(didEmitCallback){ var event=NavigationEvent.pool(eventType,this,data); propagationStopped&&event.stopPropagation(); defaultPrevented&&event.preventDefault(); didEmitCallback.call(this,event); event.dispose(); } this._emitCounter--; while(this._emitQueue.length){ var args=this._emitQueue.shift(); this.emit.apply(this,args); } }},{key:'dispose',value:function dispose() { this._bubbleEventEmitter&&this._bubbleEventEmitter.removeAllListeners(); this._captureEventEmitter&&this._captureEventEmitter.removeAllListeners(); this._bubbleEventEmitter=null; this._captureEventEmitter=null; this._currentRoute=null; }},{key:'__emit',value:function __emit( eventType, data, didEmitCallback, extraInfo) { var emitter; switch(extraInfo.eventPhase){ case CAPTURING_PHASE: emitter=this._captureEventEmitter; break; case AT_TARGET: emitter=this._bubbleEventEmitter; break; case BUBBLING_PHASE: emitter=this._bubbleEventEmitter; break; default: invariant(false,'invalid event phase %s',extraInfo.eventPhase);} if(extraInfo.target===this){ extraInfo.eventPhase=AT_TARGET; } if(emitter){ emitter.emit( eventType, data, didEmitCallback, extraInfo); } }},{key:'_onFocus',value:function _onFocus( event){ invariant( event.data&&event.data.hasOwnProperty('route'), 'event type "%s" should provide route', event.type); this._currentRoute=event.data.route; }},{key:'parent',get:function get(){var parent=this.__node.getParent();return parent?parent.getValue():null;}},{key:'top',get:function get(){var result=null;var parentNode=this.__node.getParent();while(parentNode){result=parentNode.getValue();parentNode=parentNode.getParent();}return result;}},{key:'currentRoute',get:function get(){return this._currentRoute;}}]);return NavigationContext;}(); module.exports=NavigationContext; }, "NavigationContext"); __d(412 /* NavigationEvent */, function(global, require, module, exports) { 'use strict'; var invariant=require(56 /* fbjs/lib/invariant */);var NavigationEventPool=function(){ function NavigationEventPool(){babelHelpers.classCallCheck(this,NavigationEventPool); this._list=[]; }babelHelpers.createClass(NavigationEventPool,[{key:'get',value:function get( type,currentTarget,data){ var event=void 0; if(this._list.length>0){ event=this._list.pop(); event.constructor.call(event,type,currentTarget,data); }else{ event=new NavigationEvent(type,currentTarget,data); } return event; }},{key:'put',value:function put( event){ this._list.push(event); }}]);return NavigationEventPool;}(); var _navigationEventPool=new NavigationEventPool();var NavigationEvent=function(){babelHelpers.createClass(NavigationEvent,null,[{key:'pool',value:function pool( type,currentTarget,data){ return _navigationEventPool.get(type,currentTarget,data); }}]); function NavigationEvent(type,currentTarget,data){babelHelpers.classCallCheck(this,NavigationEvent); this.target=currentTarget; this.eventPhase=NavigationEvent.NONE; this._type=type; this._currentTarget=currentTarget; this._data=data; this._defaultPrevented=false; this._disposed=false; this._propagationStopped=false; }babelHelpers.createClass(NavigationEvent,[{key:'preventDefault',value:function preventDefault() { this._defaultPrevented=true; }},{key:'stopPropagation',value:function stopPropagation() { this._propagationStopped=true; }},{key:'stop',value:function stop() { this.preventDefault(); this.stopPropagation(); }},{key:'isPropagationStopped',value:function isPropagationStopped() { return this._propagationStopped; }},{key:'dispose',value:function dispose() { invariant(!this._disposed,'NavigationEvent is already disposed'); this._disposed=true; this.target=null; this.eventPhase=NavigationEvent.NONE; this._type=''; this._currentTarget=null; this._data=null; this._defaultPrevented=false; _navigationEventPool.put(this); }},{key:'type',get:function get(){return this._type;}},{key:'currentTarget',get:function get(){return this._currentTarget;}},{key:'data',get:function get(){return this._data;}},{key:'defaultPrevented',get:function get(){return this._defaultPrevented;}}]);return NavigationEvent;}(); NavigationEvent.NONE=0; NavigationEvent.CAPTURING_PHASE=1; NavigationEvent.AT_TARGET=2; NavigationEvent.BUBBLING_PHASE=3; module.exports=NavigationEvent; }, "NavigationEvent"); __d(413 /* NavigationEventEmitter */, function(global, require, module, exports) { 'use strict'; var EventEmitter=require(82 /* EventEmitter */); var NavigationEvent=require(412 /* NavigationEvent */);var NavigationEventEmitter=function(_EventEmitter){babelHelpers.inherits(NavigationEventEmitter,_EventEmitter); function NavigationEventEmitter(target){babelHelpers.classCallCheck(this,NavigationEventEmitter);var _this=babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(NavigationEventEmitter).call(this)); _this._emitting=false; _this._emitQueue=[]; _this._target=target;return _this; }babelHelpers.createClass(NavigationEventEmitter,[{key:'emit',value:function emit( eventType, data, didEmitCallback, extraInfo) { if(this._emitting){ var args=Array.prototype.slice.call(arguments); this._emitQueue.push(args); return; } this._emitting=true; var event=NavigationEvent.pool(eventType,this._target,data); if(extraInfo){ if(extraInfo.target){ event.target=extraInfo.target; } if(extraInfo.eventPhase){ event.eventPhase=extraInfo.eventPhase; } if(extraInfo.defaultPrevented){ event.preventDefault(); } if(extraInfo.propagationStopped){ event.stopPropagation(); } } babelHelpers.get(Object.getPrototypeOf(NavigationEventEmitter.prototype),'emit',this).call(this,String(eventType),event); if(typeof didEmitCallback==='function'){ didEmitCallback.call(this._target,event); } event.dispose(); this._emitting=false; while(this._emitQueue.length){ var args=this._emitQueue.shift(); this.emit.apply(this,args); } }}]);return NavigationEventEmitter;}(EventEmitter); module.exports=NavigationEventEmitter; }, "NavigationEventEmitter"); __d(414 /* NavigationTreeNode */, function(global, require, module, exports) { 'use strict'; var invariant=require(56 /* fbjs/lib/invariant */); var immutable=require(415 /* immutable */);var List=immutable.List;var NavigationTreeNode=function(){ function NavigationTreeNode(value){babelHelpers.classCallCheck(this,NavigationTreeNode); this.__parent=null; this._children=new List(); this._value=value; }babelHelpers.createClass(NavigationTreeNode,[{key:'getValue',value:function getValue() { return this._value; }},{key:'getParent',value:function getParent() { return this.__parent; }},{key:'getChildrenCount',value:function getChildrenCount() { return this._children.size; }},{key:'getChildAt',value:function getChildAt( index){ return index>-1&&index-1, 'The node to be removed is not a child of this node.'); child.__parent=null; this._children=this._children.splice(index,1); }},{key:'indexOf',value:function indexOf( child){ return this._children.indexOf(child); }},{key:'forEach',value:function forEach( callback,context){ this._children.forEach(callback,context); }},{key:'map',value:function map( callback,context){ return this._children.map(callback,context).toJS(); }},{key:'some',value:function some( callback,context){ return this._children.some(callback,context); }}]);return NavigationTreeNode;}(); module.exports=NavigationTreeNode; }, "NavigationTreeNode"); __d(415 /* immutable/dist/immutable.js */, function(global, require, module, exports) { (function(global,factory){ typeof exports==='object'&&typeof module!=='undefined'?module.exports=factory(): typeof define==='function'&&define.amd?define(factory): global.Immutable=factory(); })(this,function(){'use strict';var SLICE$0=Array.prototype.slice; function createClass(ctor,superClass){ if(superClass){ ctor.prototype=Object.create(superClass.prototype); } ctor.prototype.constructor=ctor; } function Iterable(value){ return isIterable(value)?value:Seq(value); } createClass(KeyedIterable,Iterable); function KeyedIterable(value){ return isKeyed(value)?value:KeyedSeq(value); } createClass(IndexedIterable,Iterable); function IndexedIterable(value){ return isIndexed(value)?value:IndexedSeq(value); } createClass(SetIterable,Iterable); function SetIterable(value){ return isIterable(value)&&!isAssociative(value)?value:SetSeq(value); } function isIterable(maybeIterable){ return!!(maybeIterable&&maybeIterable[IS_ITERABLE_SENTINEL]); } function isKeyed(maybeKeyed){ return!!(maybeKeyed&&maybeKeyed[IS_KEYED_SENTINEL]); } function isIndexed(maybeIndexed){ return!!(maybeIndexed&&maybeIndexed[IS_INDEXED_SENTINEL]); } function isAssociative(maybeAssociative){ return isKeyed(maybeAssociative)||isIndexed(maybeAssociative); } function isOrdered(maybeOrdered){ return!!(maybeOrdered&&maybeOrdered[IS_ORDERED_SENTINEL]); } Iterable.isIterable=isIterable; Iterable.isKeyed=isKeyed; Iterable.isIndexed=isIndexed; Iterable.isAssociative=isAssociative; Iterable.isOrdered=isOrdered; Iterable.Keyed=KeyedIterable; Iterable.Indexed=IndexedIterable; Iterable.Set=SetIterable; var IS_ITERABLE_SENTINEL='@@__IMMUTABLE_ITERABLE__@@'; var IS_KEYED_SENTINEL='@@__IMMUTABLE_KEYED__@@'; var IS_INDEXED_SENTINEL='@@__IMMUTABLE_INDEXED__@@'; var IS_ORDERED_SENTINEL='@@__IMMUTABLE_ORDERED__@@'; var DELETE='delete'; var SHIFT=5; var SIZE=1<>>0; if(''+uint32Index!==index||uint32Index===4294967295){ return NaN; } index=uint32Index; } return index<0?ensureSize(iter)+index:index; } function returnTrue(){ return true; } function wholeSlice(begin,end,size){ return(begin===0||size!==undefined&&begin<=-size)&&( end===undefined||size!==undefined&&end>=size); } function resolveBegin(begin,size){ return resolveIndex(begin,size,0); } function resolveEnd(end,size){ return resolveIndex(end,size,size); } function resolveIndex(index,size,defaultIndex){ return index===undefined? defaultIndex: index<0? Math.max(0,size+index): size===undefined? index: Math.min(size,index); } var ITERATE_KEYS=0; var ITERATE_VALUES=1; var ITERATE_ENTRIES=2; var REAL_ITERATOR_SYMBOL=typeof Symbol==='function'&&(typeof Symbol==='function'?Symbol.iterator:'@@iterator'); var FAUX_ITERATOR_SYMBOL='@@iterator'; var ITERATOR_SYMBOL=REAL_ITERATOR_SYMBOL||FAUX_ITERATOR_SYMBOL; function Iterator(next){ this.next=next; } Iterator.prototype.toString=function(){ return'[Iterator]'; }; Iterator.KEYS=ITERATE_KEYS; Iterator.VALUES=ITERATE_VALUES; Iterator.ENTRIES=ITERATE_ENTRIES; Iterator.prototype.inspect= Iterator.prototype.toSource=function(){return this.toString();}; Iterator.prototype[ITERATOR_SYMBOL]=function(){ return this; }; function iteratorValue(type,k,v,iteratorResult){ var value=type===0?k:type===1?v:[k,v]; iteratorResult?iteratorResult.value=value:iteratorResult={ value:value,done:false}; return iteratorResult; } function iteratorDone(){ return{value:undefined,done:true}; } function hasIterator(maybeIterable){ return!!getIteratorFn(maybeIterable); } function isIterator(maybeIterator){ return maybeIterator&&typeof maybeIterator.next==='function'; } function getIterator(iterable){ var iteratorFn=getIteratorFn(iterable); return iteratorFn&&iteratorFn.call(iterable); } function getIteratorFn(iterable){ var iteratorFn=iterable&&( REAL_ITERATOR_SYMBOL&&iterable[REAL_ITERATOR_SYMBOL]|| iterable[FAUX_ITERATOR_SYMBOL]); if(typeof iteratorFn==='function'){ return iteratorFn; } } function isArrayLike(value){ return value&&typeof value.length==='number'; } createClass(Seq,Iterable); function Seq(value){ return value===null||value===undefined?emptySequence(): isIterable(value)?value.toSeq():seqFromValue(value); } Seq.of=function(){ return Seq(arguments); }; Seq.prototype.toSeq=function(){ return this; }; Seq.prototype.toString=function(){ return this.__toString('Seq {','}'); }; Seq.prototype.cacheResult=function(){ if(!this._cache&&this.__iterateUncached){ this._cache=this.entrySeq().toArray(); this.size=this._cache.length; } return this; }; Seq.prototype.__iterate=function(fn,reverse){ return seqIterate(this,fn,reverse,true); }; Seq.prototype.__iterator=function(type,reverse){ return seqIterator(this,type,reverse,true); }; createClass(KeyedSeq,Seq); function KeyedSeq(value){ return value===null||value===undefined? emptySequence().toKeyedSeq(): isIterable(value)? isKeyed(value)?value.toSeq():value.fromEntrySeq(): keyedSeqFromValue(value); } KeyedSeq.prototype.toKeyedSeq=function(){ return this; }; createClass(IndexedSeq,Seq); function IndexedSeq(value){ return value===null||value===undefined?emptySequence(): !isIterable(value)?indexedSeqFromValue(value): isKeyed(value)?value.entrySeq():value.toIndexedSeq(); } IndexedSeq.of=function(){ return IndexedSeq(arguments); }; IndexedSeq.prototype.toIndexedSeq=function(){ return this; }; IndexedSeq.prototype.toString=function(){ return this.__toString('Seq [',']'); }; IndexedSeq.prototype.__iterate=function(fn,reverse){ return seqIterate(this,fn,reverse,false); }; IndexedSeq.prototype.__iterator=function(type,reverse){ return seqIterator(this,type,reverse,false); }; createClass(SetSeq,Seq); function SetSeq(value){ return( value===null||value===undefined?emptySequence(): !isIterable(value)?indexedSeqFromValue(value): isKeyed(value)?value.entrySeq():value). toSetSeq(); } SetSeq.of=function(){ return SetSeq(arguments); }; SetSeq.prototype.toSetSeq=function(){ return this; }; Seq.isSeq=isSeq; Seq.Keyed=KeyedSeq; Seq.Set=SetSeq; Seq.Indexed=IndexedSeq; var IS_SEQ_SENTINEL='@@__IMMUTABLE_SEQ__@@'; Seq.prototype[IS_SEQ_SENTINEL]=true; createClass(ArraySeq,IndexedSeq); function ArraySeq(array){ this._array=array; this.size=array.length; } ArraySeq.prototype.get=function(index,notSetValue){ return this.has(index)?this._array[wrapIndex(this,index)]:notSetValue; }; ArraySeq.prototype.__iterate=function(fn,reverse){ var array=this._array; var maxIndex=array.length-1; for(var ii=0;ii<=maxIndex;ii++){ if(fn(array[reverse?maxIndex-ii:ii],ii,this)===false){ return ii+1; } } return ii; }; ArraySeq.prototype.__iterator=function(type,reverse){ var array=this._array; var maxIndex=array.length-1; var ii=0; return new Iterator(function() {return ii>maxIndex? iteratorDone(): iteratorValue(type,ii,array[reverse?maxIndex-ii++:ii++]);}); }; createClass(ObjectSeq,KeyedSeq); function ObjectSeq(object){ var keys=Object.keys(object); this._object=object; this._keys=keys; this.size=keys.length; } ObjectSeq.prototype.get=function(key,notSetValue){ if(notSetValue!==undefined&&!this.has(key)){ return notSetValue; } return this._object[key]; }; ObjectSeq.prototype.has=function(key){ return this._object.hasOwnProperty(key); }; ObjectSeq.prototype.__iterate=function(fn,reverse){ var object=this._object; var keys=this._keys; var maxIndex=keys.length-1; for(var ii=0;ii<=maxIndex;ii++){ var key=keys[reverse?maxIndex-ii:ii]; if(fn(object[key],key,this)===false){ return ii+1; } } return ii; }; ObjectSeq.prototype.__iterator=function(type,reverse){ var object=this._object; var keys=this._keys; var maxIndex=keys.length-1; var ii=0; return new Iterator(function(){ var key=keys[reverse?maxIndex-ii:ii]; return ii++>maxIndex? iteratorDone(): iteratorValue(type,key,object[key]); }); }; ObjectSeq.prototype[IS_ORDERED_SENTINEL]=true; createClass(IterableSeq,IndexedSeq); function IterableSeq(iterable){ this._iterable=iterable; this.size=iterable.length||iterable.size; } IterableSeq.prototype.__iterateUncached=function(fn,reverse){ if(reverse){ return this.cacheResult().__iterate(fn,reverse); } var iterable=this._iterable; var iterator=getIterator(iterable); var iterations=0; if(isIterator(iterator)){ var step; while(!(step=iterator.next()).done){ if(fn(step.value,iterations++,this)===false){ break; } } } return iterations; }; IterableSeq.prototype.__iteratorUncached=function(type,reverse){ if(reverse){ return this.cacheResult().__iterator(type,reverse); } var iterable=this._iterable; var iterator=getIterator(iterable); if(!isIterator(iterator)){ return new Iterator(iteratorDone); } var iterations=0; return new Iterator(function(){ var step=iterator.next(); return step.done?step:iteratorValue(type,iterations++,step.value); }); }; createClass(IteratorSeq,IndexedSeq); function IteratorSeq(iterator){ this._iterator=iterator; this._iteratorCache=[]; } IteratorSeq.prototype.__iterateUncached=function(fn,reverse){ if(reverse){ return this.cacheResult().__iterate(fn,reverse); } var iterator=this._iterator; var cache=this._iteratorCache; var iterations=0; while(iterations=cache.length){ var step=iterator.next(); if(step.done){ return step; } cache[iterations]=step.value; } return iteratorValue(type,iterations,cache[iterations++]); }); }; function isSeq(maybeSeq){ return!!(maybeSeq&&maybeSeq[IS_SEQ_SENTINEL]); } var EMPTY_SEQ; function emptySequence(){ return EMPTY_SEQ||(EMPTY_SEQ=new ArraySeq([])); } function keyedSeqFromValue(value){ var seq= Array.isArray(value)?new ArraySeq(value).fromEntrySeq(): isIterator(value)?new IteratorSeq(value).fromEntrySeq(): hasIterator(value)?new IterableSeq(value).fromEntrySeq(): typeof value==='object'?new ObjectSeq(value): undefined; if(!seq){ throw new TypeError( 'Expected Array or iterable object of [k, v] entries, '+ 'or keyed object: '+value); } return seq; } function indexedSeqFromValue(value){ var seq=maybeIndexedSeqFromValue(value); if(!seq){ throw new TypeError( 'Expected Array or iterable object of values: '+value); } return seq; } function seqFromValue(value){ var seq=maybeIndexedSeqFromValue(value)|| typeof value==='object'&&new ObjectSeq(value); if(!seq){ throw new TypeError( 'Expected Array or iterable object of values, or keyed object: '+value); } return seq; } function maybeIndexedSeqFromValue(value){ return( isArrayLike(value)?new ArraySeq(value): isIterator(value)?new IteratorSeq(value): hasIterator(value)?new IterableSeq(value): undefined); } function seqIterate(seq,fn,reverse,useKeys){ var cache=seq._cache; if(cache){ var maxIndex=cache.length-1; for(var ii=0;ii<=maxIndex;ii++){ var entry=cache[reverse?maxIndex-ii:ii]; if(fn(entry[1],useKeys?entry[0]:ii,seq)===false){ return ii+1; } } return ii; } return seq.__iterateUncached(fn,reverse); } function seqIterator(seq,type,reverse,useKeys){ var cache=seq._cache; if(cache){ var maxIndex=cache.length-1; var ii=0; return new Iterator(function(){ var entry=cache[reverse?maxIndex-ii:ii]; return ii++>maxIndex? iteratorDone(): iteratorValue(type,useKeys?entry[0]:ii-1,entry[1]); }); } return seq.__iteratorUncached(type,reverse); } function fromJS(json,converter){ return converter? fromJSWith(converter,json,'',{'':json}): fromJSDefault(json); } function fromJSWith(converter,json,key,parentJSON){ if(Array.isArray(json)){ return converter.call(parentJSON,key,IndexedSeq(json).map(function(v,k){return fromJSWith(converter,v,k,json);})); } if(isPlainObj(json)){ return converter.call(parentJSON,key,KeyedSeq(json).map(function(v,k){return fromJSWith(converter,v,k,json);})); } return json; } function fromJSDefault(json){ if(Array.isArray(json)){ return IndexedSeq(json).map(fromJSDefault).toList(); } if(isPlainObj(json)){ return KeyedSeq(json).map(fromJSDefault).toMap(); } return json; } function isPlainObj(value){ return value&&(value.constructor===Object||value.constructor===undefined); } function is(valueA,valueB){ if(valueA===valueB||valueA!==valueA&&valueB!==valueB){ return true; } if(!valueA||!valueB){ return false; } if(typeof valueA.valueOf==='function'&& typeof valueB.valueOf==='function'){ valueA=valueA.valueOf(); valueB=valueB.valueOf(); if(valueA===valueB||valueA!==valueA&&valueB!==valueB){ return true; } if(!valueA||!valueB){ return false; } } if(typeof valueA.equals==='function'&& typeof valueB.equals==='function'&& valueA.equals(valueB)){ return true; } return false; } function deepEqual(a,b){ if(a===b){ return true; } if( !isIterable(b)|| a.size!==undefined&&b.size!==undefined&&a.size!==b.size|| a.__hash!==undefined&&b.__hash!==undefined&&a.__hash!==b.__hash|| isKeyed(a)!==isKeyed(b)|| isIndexed(a)!==isIndexed(b)|| isOrdered(a)!==isOrdered(b)) { return false; } if(a.size===0&&b.size===0){ return true; } var notAssociative=!isAssociative(a); if(isOrdered(a)){ var entries=a.entries(); return b.every(function(v,k){ var entry=entries.next().value; return entry&&is(entry[1],v)&&(notAssociative||is(entry[0],k)); })&&entries.next().done; } var flipped=false; if(a.size===undefined){ if(b.size===undefined){ if(typeof a.cacheResult==='function'){ a.cacheResult(); } }else{ flipped=true; var _=a; a=b; b=_; } } var allEqual=true; var bSize=b.__iterate(function(v,k){ if(notAssociative?!a.has(v): flipped?!is(v,a.get(k,NOT_SET)):!is(a.get(k,NOT_SET),v)){ allEqual=false; return false; } }); return allEqual&&a.size===bSize; } createClass(Repeat,IndexedSeq); function Repeat(value,times){ if(!(this instanceof Repeat)){ return new Repeat(value,times); } this._value=value; this.size=times===undefined?Infinity:Math.max(0,times); if(this.size===0){ if(EMPTY_REPEAT){ return EMPTY_REPEAT; } EMPTY_REPEAT=this; } } Repeat.prototype.toString=function(){ if(this.size===0){ return'Repeat []'; } return'Repeat [ '+this._value+' '+this.size+' times ]'; }; Repeat.prototype.get=function(index,notSetValue){ return this.has(index)?this._value:notSetValue; }; Repeat.prototype.includes=function(searchValue){ return is(this._value,searchValue); }; Repeat.prototype.slice=function(begin,end){ var size=this.size; return wholeSlice(begin,end,size)?this: new Repeat(this._value,resolveEnd(end,size)-resolveBegin(begin,size)); }; Repeat.prototype.reverse=function(){ return this; }; Repeat.prototype.indexOf=function(searchValue){ if(is(this._value,searchValue)){ return 0; } return-1; }; Repeat.prototype.lastIndexOf=function(searchValue){ if(is(this._value,searchValue)){ return this.size; } return-1; }; Repeat.prototype.__iterate=function(fn,reverse){ for(var ii=0;ii1?' by '+this._step:'')+ ' ]'; }; Range.prototype.get=function(index,notSetValue){ return this.has(index)? this._start+wrapIndex(this,index)*this._step: notSetValue; }; Range.prototype.includes=function(searchValue){ var possibleIndex=(searchValue-this._start)/this._step; return possibleIndex>=0&& possibleIndex=0&&indexmaxIndex?iteratorDone():iteratorValue(type,ii++,v); }); }; Range.prototype.equals=function(other){ return other instanceof Range? this._start===other._start&& this._end===other._end&& this._step===other._step: deepEqual(this,other); }; var EMPTY_RANGE; createClass(Collection,Iterable); function Collection(){ throw TypeError('Abstract'); } createClass(KeyedCollection,Collection);function KeyedCollection(){} createClass(IndexedCollection,Collection);function IndexedCollection(){} createClass(SetCollection,Collection);function SetCollection(){} Collection.Keyed=KeyedCollection; Collection.Indexed=IndexedCollection; Collection.Set=SetCollection; var imul= typeof Math.imul==='function'&&Math.imul(0xffffffff,2)===-2? Math.imul: function imul(a,b){ a=a|0; b=b|0; var c=a&0xffff; var d=b&0xffff; return c*d+((a>>>16)*d+c*(b>>>16)<<16>>>0)|0; }; function smi(i32){ return i32>>>1&0x40000000|i32&0xBFFFFFFF; } function hash(o){ if(o===false||o===null||o===undefined){ return 0; } if(typeof o.valueOf==='function'){ o=o.valueOf(); if(o===false||o===null||o===undefined){ return 0; } } if(o===true){ return 1; } var type=typeof o; if(type==='number'){ var h=o|0; if(h!==o){ h^=o*0xFFFFFFFF; } while(o>0xFFFFFFFF){ o/=0xFFFFFFFF; h^=o; } return smi(h); } if(type==='string'){ return o.length>STRING_HASH_CACHE_MIN_STRLEN?cachedHashString(o):hashString(o); } if(typeof o.hashCode==='function'){ return o.hashCode(); } if(type==='object'){ return hashJSObj(o); } if(typeof o.toString==='function'){ return hashString(o.toString()); } throw new Error('Value type '+type+' cannot be hashed.'); } function cachedHashString(string){ var hash=stringHashCache[string]; if(hash===undefined){ hash=hashString(string); if(STRING_HASH_CACHE_SIZE===STRING_HASH_CACHE_MAX_SIZE){ STRING_HASH_CACHE_SIZE=0; stringHashCache={}; } STRING_HASH_CACHE_SIZE++; stringHashCache[string]=hash; } return hash; } function hashString(string){ var hash=0; for(var ii=0;ii0){ switch(node.nodeType){ case 1: return node.uniqueID; case 9: return node.documentElement&&node.documentElement.uniqueID;} } } var usingWeakMap=typeof WeakMap==='function'; var weakMap; if(usingWeakMap){ weakMap=new WeakMap(); } var objHashUID=0; var UID_HASH_KEY='__immutablehash__'; if(typeof Symbol==='function'){ UID_HASH_KEY=Symbol(UID_HASH_KEY); } var STRING_HASH_CACHE_MIN_STRLEN=16; var STRING_HASH_CACHE_MAX_SIZE=255; var STRING_HASH_CACHE_SIZE=0; var stringHashCache={}; function assertNotInfinite(size){ invariant( size!==Infinity, 'Cannot perform this action with an infinite size.'); } createClass(Map,KeyedCollection); function Map(value){ return value===null||value===undefined?emptyMap(): isMap(value)&&!isOrdered(value)?value: emptyMap().withMutations(function(map){ var iter=KeyedIterable(value); assertNotInfinite(iter.size); iter.forEach(function(v,k){return map.set(k,v);}); }); } Map.prototype.toString=function(){ return this.__toString('Map {','}'); }; Map.prototype.get=function(k,notSetValue){ return this._root? this._root.get(0,undefined,k,notSetValue): notSetValue; }; Map.prototype.set=function(k,v){ return updateMap(this,k,v); }; Map.prototype.setIn=function(keyPath,v){ return this.updateIn(keyPath,NOT_SET,function(){return v;}); }; Map.prototype.remove=function(k){ return updateMap(this,k,NOT_SET); }; Map.prototype.deleteIn=function(keyPath){ return this.updateIn(keyPath,function(){return NOT_SET;}); }; Map.prototype.update=function(k,notSetValue,updater){ return arguments.length===1? k(this): this.updateIn([k],notSetValue,updater); }; Map.prototype.updateIn=function(keyPath,notSetValue,updater){ if(!updater){ updater=notSetValue; notSetValue=undefined; } var updatedValue=updateInDeepMap( this, forceIterator(keyPath), notSetValue, updater); return updatedValue===NOT_SET?undefined:updatedValue; }; Map.prototype.clear=function(){ if(this.size===0){ return this; } if(this.__ownerID){ this.size=0; this._root=null; this.__hash=undefined; this.__altered=true; return this; } return emptyMap(); }; Map.prototype.merge=function(){ return mergeIntoMapWith(this,undefined,arguments); }; Map.prototype.mergeWith=function(merger){var iters=SLICE$0.call(arguments,1); return mergeIntoMapWith(this,merger,iters); }; Map.prototype.mergeIn=function(keyPath){var iters=SLICE$0.call(arguments,1); return this.updateIn( keyPath, emptyMap(), function(m){return typeof m.merge==='function'? m.merge.apply(m,iters): iters[iters.length-1];}); }; Map.prototype.mergeDeep=function(){ return mergeIntoMapWith(this,deepMerger,arguments); }; Map.prototype.mergeDeepWith=function(merger){var iters=SLICE$0.call(arguments,1); return mergeIntoMapWith(this,deepMergerWith(merger),iters); }; Map.prototype.mergeDeepIn=function(keyPath){var iters=SLICE$0.call(arguments,1); return this.updateIn( keyPath, emptyMap(), function(m){return typeof m.mergeDeep==='function'? m.mergeDeep.apply(m,iters): iters[iters.length-1];}); }; Map.prototype.sort=function(comparator){ return OrderedMap(sortFactory(this,comparator)); }; Map.prototype.sortBy=function(mapper,comparator){ return OrderedMap(sortFactory(this,comparator,mapper)); }; Map.prototype.withMutations=function(fn){ var mutable=this.asMutable(); fn(mutable); return mutable.wasAltered()?mutable.__ensureOwner(this.__ownerID):this; }; Map.prototype.asMutable=function(){ return this.__ownerID?this:this.__ensureOwner(new OwnerID()); }; Map.prototype.asImmutable=function(){ return this.__ensureOwner(); }; Map.prototype.wasAltered=function(){ return this.__altered; }; Map.prototype.__iterator=function(type,reverse){ return new MapIterator(this,type,reverse); }; Map.prototype.__iterate=function(fn,reverse){var this$0=this; var iterations=0; this._root&&this._root.iterate(function(entry){ iterations++; return fn(entry[1],entry[0],this$0); },reverse); return iterations; }; Map.prototype.__ensureOwner=function(ownerID){ if(ownerID===this.__ownerID){ return this; } if(!ownerID){ this.__ownerID=ownerID; this.__altered=false; return this; } return makeMap(this.size,this._root,ownerID,this.__hash); }; function isMap(maybeMap){ return!!(maybeMap&&maybeMap[IS_MAP_SENTINEL]); } Map.isMap=isMap; var IS_MAP_SENTINEL='@@__IMMUTABLE_MAP__@@'; var MapPrototype=Map.prototype; MapPrototype[IS_MAP_SENTINEL]=true; MapPrototype[DELETE]=MapPrototype.remove; MapPrototype.removeIn=MapPrototype.deleteIn; function ArrayMapNode(ownerID,entries){ this.ownerID=ownerID; this.entries=entries; } ArrayMapNode.prototype.get=function(shift,keyHash,key,notSetValue){ var entries=this.entries; for(var ii=0,len=entries.length;ii=MAX_ARRAY_MAP_SIZE){ return createNodes(ownerID,entries,key,value); } var isEditable=ownerID&&ownerID===this.ownerID; var newEntries=isEditable?entries:arrCopy(entries); if(exists){ if(removed){ idx===len-1?newEntries.pop():newEntries[idx]=newEntries.pop(); }else{ newEntries[idx]=[key,value]; } }else{ newEntries.push([key,value]); } if(isEditable){ this.entries=newEntries; return this; } return new ArrayMapNode(ownerID,newEntries); }; function BitmapIndexedNode(ownerID,bitmap,nodes){ this.ownerID=ownerID; this.bitmap=bitmap; this.nodes=nodes; } BitmapIndexedNode.prototype.get=function(shift,keyHash,key,notSetValue){ if(keyHash===undefined){ keyHash=hash(key); } var bit=1<<((shift===0?keyHash:keyHash>>>shift)&MASK); var bitmap=this.bitmap; return(bitmap&bit)===0?notSetValue: this.nodes[popCount(bitmap&bit-1)].get(shift+SHIFT,keyHash,key,notSetValue); }; BitmapIndexedNode.prototype.update=function(ownerID,shift,keyHash,key,value,didChangeSize,didAlter){ if(keyHash===undefined){ keyHash=hash(key); } var keyHashFrag=(shift===0?keyHash:keyHash>>>shift)&MASK; var bit=1<=MAX_BITMAP_INDEXED_SIZE){ return expandNodes(ownerID,nodes,bitmap,keyHashFrag,newNode); } if(exists&&!newNode&&nodes.length===2&&isLeafNode(nodes[idx^1])){ return nodes[idx^1]; } if(exists&&newNode&&nodes.length===1&&isLeafNode(newNode)){ return newNode; } var isEditable=ownerID&&ownerID===this.ownerID; var newBitmap=exists?newNode?bitmap:bitmap^bit:bitmap|bit; var newNodes=exists?newNode? setIn(nodes,idx,newNode,isEditable): spliceOut(nodes,idx,isEditable): spliceIn(nodes,idx,newNode,isEditable); if(isEditable){ this.bitmap=newBitmap; this.nodes=newNodes; return this; } return new BitmapIndexedNode(ownerID,newBitmap,newNodes); }; function HashArrayMapNode(ownerID,count,nodes){ this.ownerID=ownerID; this.count=count; this.nodes=nodes; } HashArrayMapNode.prototype.get=function(shift,keyHash,key,notSetValue){ if(keyHash===undefined){ keyHash=hash(key); } var idx=(shift===0?keyHash:keyHash>>>shift)&MASK; var node=this.nodes[idx]; return node?node.get(shift+SHIFT,keyHash,key,notSetValue):notSetValue; }; HashArrayMapNode.prototype.update=function(ownerID,shift,keyHash,key,value,didChangeSize,didAlter){ if(keyHash===undefined){ keyHash=hash(key); } var idx=(shift===0?keyHash:keyHash>>>shift)&MASK; var removed=value===NOT_SET; var nodes=this.nodes; var node=nodes[idx]; if(removed&&!node){ return this; } var newNode=updateNode(node,ownerID,shift+SHIFT,keyHash,key,value,didChangeSize,didAlter); if(newNode===node){ return this; } var newCount=this.count; if(!node){ newCount++; }else if(!newNode){ newCount--; if(newCount>>shift)&MASK; var idx2=(shift===0?keyHash:keyHash>>>shift)&MASK; var newNode; var nodes=idx1===idx2? [mergeIntoNode(node,ownerID,shift+SHIFT,keyHash,entry)]:( newNode=new ValueNode(ownerID,keyHash,entry),idx1>>=1){ expandedNodes[ii]=bitmap&1?nodes[count++]:undefined; } expandedNodes[including]=node; return new HashArrayMapNode(ownerID,count+1,expandedNodes); } function mergeIntoMapWith(map,merger,iterables){ var iters=[]; for(var ii=0;ii>1&0x55555555); x=(x&0x33333333)+(x>>2&0x33333333); x=x+(x>>4)&0x0f0f0f0f; x=x+(x>>8); x=x+(x>>16); return x&0x7f; } function setIn(array,idx,val,canEdit){ var newArray=canEdit?array:arrCopy(array); newArray[idx]=val; return newArray; } function spliceIn(array,idx,val,canEdit){ var newLen=array.length+1; if(canEdit&&idx+1===newLen){ array[idx]=val; return array; } var newArray=new Array(newLen); var after=0; for(var ii=0;ii0&&size=0&&index>>level&MASK; if(originIndex>=this.array.length){ return new VNode([],ownerID); } var removingFirst=originIndex===0; var newChild; if(level>0){ var oldChild=this.array[originIndex]; newChild=oldChild&&oldChild.removeBefore(ownerID,level-SHIFT,index); if(newChild===oldChild&&removingFirst){ return this; } } if(removingFirst&&!newChild){ return this; } var editable=editableVNode(this,ownerID); if(!removingFirst){ for(var ii=0;ii>>level&MASK; if(sizeIndex>=this.array.length){ return this; } var newChild; if(level>0){ var oldChild=this.array[sizeIndex]; newChild=oldChild&&oldChild.removeAfter(ownerID,level-SHIFT,index); if(newChild===oldChild&&sizeIndex===this.array.length-1){ return this; } } var editable=editableVNode(this,ownerID); editable.array.splice(sizeIndex+1); if(newChild){ editable.array[sizeIndex]=newChild; } return editable; }; var DONE={}; function iterateList(list,reverse){ var left=list._origin; var right=list._capacity; var tailPos=getTailOffset(right); var tail=list._tail; return iterateNodeOrLeaf(list._root,list._level,0); function iterateNodeOrLeaf(node,level,offset){ return level===0? iterateLeaf(node,offset): iterateNode(node,level,offset); } function iterateLeaf(node,offset){ var array=offset===tailPos?tail&&tail.array:node&&node.array; var from=offset>left?0:left-offset; var to=right-offset; if(to>SIZE){ to=SIZE; } return function(){ if(from===to){ return DONE; } var idx=reverse?--to:from++; return array&&array[idx]; }; } function iterateNode(node,level,offset){ var values; var array=node&&node.array; var from=offset>left?0:left-offset>>level; var to=(right-offset>>level)+1; if(to>SIZE){ to=SIZE; } return function(){ do{ if(values){ var value=values(); if(value!==DONE){ return value; } values=null; } if(from===to){ return DONE; } var idx=reverse?--to:from++; values=iterateNodeOrLeaf( array&&array[idx],level-SHIFT,offset+(idx<=list.size||index<0){ return list.withMutations(function(list){ index<0? setListBounds(list,index).set(0,value): setListBounds(list,0,index+1).set(index,value); }); } index+=list._origin; var newTail=list._tail; var newRoot=list._root; var didAlter=MakeRef(DID_ALTER); if(index>=getTailOffset(list._capacity)){ newTail=updateVNode(newTail,list.__ownerID,0,index,value,didAlter); }else{ newRoot=updateVNode(newRoot,list.__ownerID,list._level,index,value,didAlter); } if(!didAlter.value){ return list; } if(list.__ownerID){ list._root=newRoot; list._tail=newTail; list.__hash=undefined; list.__altered=true; return list; } return makeList(list._origin,list._capacity,list._level,newRoot,newTail); } function updateVNode(node,ownerID,level,index,value,didAlter){ var idx=index>>>level&MASK; var nodeHas=node&&idx0){ var lowerNode=node&&node.array[idx]; var newLowerNode=updateVNode(lowerNode,ownerID,level-SHIFT,index,value,didAlter); if(newLowerNode===lowerNode){ return node; } newNode=editableVNode(node,ownerID); newNode.array[idx]=newLowerNode; return newNode; } if(nodeHas&&node.array[idx]===value){ return node; } SetRef(didAlter); newNode=editableVNode(node,ownerID); if(value===undefined&&idx===newNode.array.length-1){ newNode.array.pop(); }else{ newNode.array[idx]=value; } return newNode; } function editableVNode(node,ownerID){ if(ownerID&&node&&ownerID===node.ownerID){ return node; } return new VNode(node?node.array.slice():[],ownerID); } function listNodeFor(list,rawIndex){ if(rawIndex>=getTailOffset(list._capacity)){ return list._tail; } if(rawIndex<1<0){ node=node.array[rawIndex>>>level&MASK]; level-=SHIFT; } return node; } } function setListBounds(list,begin,end){ if(begin!==undefined){ begin=begin|0; } if(end!==undefined){ end=end|0; } var owner=list.__ownerID||new OwnerID(); var oldOrigin=list._origin; var oldCapacity=list._capacity; var newOrigin=oldOrigin+begin; var newCapacity=end===undefined?oldCapacity:end<0?oldCapacity+end:oldOrigin+end; if(newOrigin===oldOrigin&&newCapacity===oldCapacity){ return list; } if(newOrigin>=newCapacity){ return list.clear(); } var newLevel=list._level; var newRoot=list._root; var offsetShift=0; while(newOrigin+offsetShift<0){ newRoot=new VNode(newRoot&&newRoot.array.length?[undefined,newRoot]:[],owner); newLevel+=SHIFT; offsetShift+=1<=1<oldTailOffset?new VNode([],owner):oldTail; if(oldTail&&newTailOffset>oldTailOffset&&newOriginSHIFT;level-=SHIFT){ var idx=oldTailOffset>>>level&MASK; node=node.array[idx]=editableVNode(node.array[idx],owner); } node.array[oldTailOffset>>>SHIFT&MASK]=oldTail; } if(newCapacity=newTailOffset){ newOrigin-=newTailOffset; newCapacity-=newTailOffset; newLevel=SHIFT; newRoot=null; newTail=newTail&&newTail.removeBefore(owner,0,newOrigin); }else if(newOrigin>oldOrigin||newTailOffset>>newLevel&MASK; if(beginIndex!==newTailOffset>>>newLevel&MASK){ break; } if(beginIndex){ offsetShift+=(1<oldOrigin){ newRoot=newRoot.removeBefore(owner,newLevel,newOrigin-offsetShift); } if(newRoot&&newTailOffsetmaxSize){ maxSize=iter.size; } if(!isIterable(value)){ iter=iter.map(function(v){return fromJS(v);}); } iters.push(iter); } if(maxSize>list.size){ list=list.setSize(maxSize); } return mergeIntoCollectionWith(list,merger,iters); } function getTailOffset(size){ return size>>SHIFT<=SIZE&&list.size>=map.size*2){ newList=list.filter(function(entry,idx){return entry!==undefined&&i!==idx;}); newMap=newList.toKeyedSeq().map(function(entry){return entry[0];}).flip().toMap(); if(omap.__ownerID){ newMap.__ownerID=newList.__ownerID=omap.__ownerID; } }else{ newMap=map.remove(k); newList=i===list.size-1?list.pop():list.set(i,undefined); } }else{ if(has){ if(v===list.get(i)[1]){ return omap; } newMap=map; newList=list.set(i,[k,v]); }else{ newMap=map.set(k,list.size); newList=list.set(list.size,[k,v]); } } if(omap.__ownerID){ omap.size=newMap.size; omap._map=newMap; omap._list=newList; omap.__hash=undefined; return omap; } return makeOrderedMap(newMap,newList); } createClass(ToKeyedSequence,KeyedSeq); function ToKeyedSequence(indexed,useKeys){ this._iter=indexed; this._useKeys=useKeys; this.size=indexed.size; } ToKeyedSequence.prototype.get=function(key,notSetValue){ return this._iter.get(key,notSetValue); }; ToKeyedSequence.prototype.has=function(key){ return this._iter.has(key); }; ToKeyedSequence.prototype.valueSeq=function(){ return this._iter.valueSeq(); }; ToKeyedSequence.prototype.reverse=function(){var this$0=this; var reversedSequence=reverseFactory(this,true); if(!this._useKeys){ reversedSequence.valueSeq=function(){return this$0._iter.toSeq().reverse();}; } return reversedSequence; }; ToKeyedSequence.prototype.map=function(mapper,context){var this$0=this; var mappedSequence=mapFactory(this,mapper,context); if(!this._useKeys){ mappedSequence.valueSeq=function(){return this$0._iter.toSeq().map(mapper,context);}; } return mappedSequence; }; ToKeyedSequence.prototype.__iterate=function(fn,reverse){var this$0=this; var ii; return this._iter.__iterate( this._useKeys? function(v,k){return fn(v,k,this$0);}:( ii=reverse?resolveSize(this):0, function(v){return fn(v,reverse?--ii:ii++,this$0);}), reverse); }; ToKeyedSequence.prototype.__iterator=function(type,reverse){ if(this._useKeys){ return this._iter.__iterator(type,reverse); } var iterator=this._iter.__iterator(ITERATE_VALUES,reverse); var ii=reverse?resolveSize(this):0; return new Iterator(function(){ var step=iterator.next(); return step.done?step: iteratorValue(type,reverse?--ii:ii++,step.value,step); }); }; ToKeyedSequence.prototype[IS_ORDERED_SENTINEL]=true; createClass(ToIndexedSequence,IndexedSeq); function ToIndexedSequence(iter){ this._iter=iter; this.size=iter.size; } ToIndexedSequence.prototype.includes=function(value){ return this._iter.includes(value); }; ToIndexedSequence.prototype.__iterate=function(fn,reverse){var this$0=this; var iterations=0; return this._iter.__iterate(function(v){return fn(v,iterations++,this$0);},reverse); }; ToIndexedSequence.prototype.__iterator=function(type,reverse){ var iterator=this._iter.__iterator(ITERATE_VALUES,reverse); var iterations=0; return new Iterator(function(){ var step=iterator.next(); return step.done?step: iteratorValue(type,iterations++,step.value,step); }); }; createClass(ToSetSequence,SetSeq); function ToSetSequence(iter){ this._iter=iter; this.size=iter.size; } ToSetSequence.prototype.has=function(key){ return this._iter.includes(key); }; ToSetSequence.prototype.__iterate=function(fn,reverse){var this$0=this; return this._iter.__iterate(function(v){return fn(v,v,this$0);},reverse); }; ToSetSequence.prototype.__iterator=function(type,reverse){ var iterator=this._iter.__iterator(ITERATE_VALUES,reverse); return new Iterator(function(){ var step=iterator.next(); return step.done?step: iteratorValue(type,step.value,step.value,step); }); }; createClass(FromEntriesSequence,KeyedSeq); function FromEntriesSequence(entries){ this._iter=entries; this.size=entries.size; } FromEntriesSequence.prototype.entrySeq=function(){ return this._iter.toSeq(); }; FromEntriesSequence.prototype.__iterate=function(fn,reverse){var this$0=this; return this._iter.__iterate(function(entry){ if(entry){ validateEntry(entry); var indexedIterable=isIterable(entry); return fn( indexedIterable?entry.get(1):entry[1], indexedIterable?entry.get(0):entry[0], this$0); } },reverse); }; FromEntriesSequence.prototype.__iterator=function(type,reverse){ var iterator=this._iter.__iterator(ITERATE_VALUES,reverse); return new Iterator(function(){ while(true){ var step=iterator.next(); if(step.done){ return step; } var entry=step.value; if(entry){ validateEntry(entry); var indexedIterable=isIterable(entry); return iteratorValue( type, indexedIterable?entry.get(0):entry[0], indexedIterable?entry.get(1):entry[1], step); } } }); }; ToIndexedSequence.prototype.cacheResult= ToKeyedSequence.prototype.cacheResult= ToSetSequence.prototype.cacheResult= FromEntriesSequence.prototype.cacheResult= cacheResultThrough; function flipFactory(iterable){ var flipSequence=makeSequence(iterable); flipSequence._iter=iterable; flipSequence.size=iterable.size; flipSequence.flip=function(){return iterable;}; flipSequence.reverse=function(){ var reversedSequence=iterable.reverse.apply(this); reversedSequence.flip=function(){return iterable.reverse();}; return reversedSequence; }; flipSequence.has=function(key){return iterable.includes(key);}; flipSequence.includes=function(key){return iterable.has(key);}; flipSequence.cacheResult=cacheResultThrough; flipSequence.__iterateUncached=function(fn,reverse){var this$0=this; return iterable.__iterate(function(v,k){return fn(k,v,this$0)!==false;},reverse); }; flipSequence.__iteratorUncached=function(type,reverse){ if(type===ITERATE_ENTRIES){ var iterator=iterable.__iterator(type,reverse); return new Iterator(function(){ var step=iterator.next(); if(!step.done){ var k=step.value[0]; step.value[0]=step.value[1]; step.value[1]=k; } return step; }); } return iterable.__iterator( type===ITERATE_VALUES?ITERATE_KEYS:ITERATE_VALUES, reverse); }; return flipSequence; } function mapFactory(iterable,mapper,context){ var mappedSequence=makeSequence(iterable); mappedSequence.size=iterable.size; mappedSequence.has=function(key){return iterable.has(key);}; mappedSequence.get=function(key,notSetValue){ var v=iterable.get(key,NOT_SET); return v===NOT_SET? notSetValue: mapper.call(context,v,key,iterable); }; mappedSequence.__iterateUncached=function(fn,reverse){var this$0=this; return iterable.__iterate( function(v,k,c){return fn(mapper.call(context,v,k,c),k,this$0)!==false;}, reverse); }; mappedSequence.__iteratorUncached=function(type,reverse){ var iterator=iterable.__iterator(ITERATE_ENTRIES,reverse); return new Iterator(function(){ var step=iterator.next(); if(step.done){ return step; } var entry=step.value; var key=entry[0]; return iteratorValue( type, key, mapper.call(context,entry[1],key,iterable), step); }); }; return mappedSequence; } function reverseFactory(iterable,useKeys){ var reversedSequence=makeSequence(iterable); reversedSequence._iter=iterable; reversedSequence.size=iterable.size; reversedSequence.reverse=function(){return iterable;}; if(iterable.flip){ reversedSequence.flip=function(){ var flipSequence=flipFactory(iterable); flipSequence.reverse=function(){return iterable.flip();}; return flipSequence; }; } reversedSequence.get=function(key,notSetValue) {return iterable.get(useKeys?key:-1-key,notSetValue);}; reversedSequence.has=function(key) {return iterable.has(useKeys?key:-1-key);}; reversedSequence.includes=function(value){return iterable.includes(value);}; reversedSequence.cacheResult=cacheResultThrough; reversedSequence.__iterate=function(fn,reverse){var this$0=this; return iterable.__iterate(function(v,k){return fn(v,k,this$0);},!reverse); }; reversedSequence.__iterator= function(type,reverse){return iterable.__iterator(type,!reverse);}; return reversedSequence; } function filterFactory(iterable,predicate,context,useKeys){ var filterSequence=makeSequence(iterable); if(useKeys){ filterSequence.has=function(key){ var v=iterable.get(key,NOT_SET); return v!==NOT_SET&&!!predicate.call(context,v,key,iterable); }; filterSequence.get=function(key,notSetValue){ var v=iterable.get(key,NOT_SET); return v!==NOT_SET&&predicate.call(context,v,key,iterable)? v:notSetValue; }; } filterSequence.__iterateUncached=function(fn,reverse){var this$0=this; var iterations=0; iterable.__iterate(function(v,k,c){ if(predicate.call(context,v,k,c)){ iterations++; return fn(v,useKeys?k:iterations-1,this$0); } },reverse); return iterations; }; filterSequence.__iteratorUncached=function(type,reverse){ var iterator=iterable.__iterator(ITERATE_ENTRIES,reverse); var iterations=0; return new Iterator(function(){ while(true){ var step=iterator.next(); if(step.done){ return step; } var entry=step.value; var key=entry[0]; var value=entry[1]; if(predicate.call(context,value,key,iterable)){ return iteratorValue(type,useKeys?key:iterations++,value,step); } } }); }; return filterSequence; } function countByFactory(iterable,grouper,context){ var groups=Map().asMutable(); iterable.__iterate(function(v,k){ groups.update( grouper.call(context,v,k,iterable), 0, function(a){return a+1;}); }); return groups.asImmutable(); } function groupByFactory(iterable,grouper,context){ var isKeyedIter=isKeyed(iterable); var groups=(isOrdered(iterable)?OrderedMap():Map()).asMutable(); iterable.__iterate(function(v,k){ groups.update( grouper.call(context,v,k,iterable), function(a){return a=a||[],a.push(isKeyedIter?[k,v]:v),a;}); }); var coerce=iterableClass(iterable); return groups.map(function(arr){return reify(iterable,coerce(arr));}); } function sliceFactory(iterable,begin,end,useKeys){ var originalSize=iterable.size; if(begin!==undefined){ begin=begin|0; } if(end!==undefined){ end=end|0; } if(wholeSlice(begin,end,originalSize)){ return iterable; } var resolvedBegin=resolveBegin(begin,originalSize); var resolvedEnd=resolveEnd(end,originalSize); if(resolvedBegin!==resolvedBegin||resolvedEnd!==resolvedEnd){ return sliceFactory(iterable.toSeq().cacheResult(),begin,end,useKeys); } var resolvedSize=resolvedEnd-resolvedBegin; var sliceSize; if(resolvedSize===resolvedSize){ sliceSize=resolvedSize<0?0:resolvedSize; } var sliceSeq=makeSequence(iterable); sliceSeq.size=sliceSize===0?sliceSize:iterable.size&&sliceSize||undefined; if(!useKeys&&isSeq(iterable)&&sliceSize>=0){ sliceSeq.get=function(index,notSetValue){ index=wrapIndex(this,index); return index>=0&&indexsliceSize){ return iteratorDone(); } var step=iterator.next(); if(useKeys||type===ITERATE_VALUES){ return step; }else if(type===ITERATE_KEYS){ return iteratorValue(type,iterations-1,undefined,step); }else{ return iteratorValue(type,iterations-1,step.value[1],step); } }); }; return sliceSeq; } function takeWhileFactory(iterable,predicate,context){ var takeSequence=makeSequence(iterable); takeSequence.__iterateUncached=function(fn,reverse){var this$0=this; if(reverse){ return this.cacheResult().__iterate(fn,reverse); } var iterations=0; iterable.__iterate(function(v,k,c) {return predicate.call(context,v,k,c)&&++iterations&&fn(v,k,this$0);}); return iterations; }; takeSequence.__iteratorUncached=function(type,reverse){var this$0=this; if(reverse){ return this.cacheResult().__iterator(type,reverse); } var iterator=iterable.__iterator(ITERATE_ENTRIES,reverse); var iterating=true; return new Iterator(function(){ if(!iterating){ return iteratorDone(); } var step=iterator.next(); if(step.done){ return step; } var entry=step.value; var k=entry[0]; var v=entry[1]; if(!predicate.call(context,v,k,this$0)){ iterating=false; return iteratorDone(); } return type===ITERATE_ENTRIES?step: iteratorValue(type,k,v,step); }); }; return takeSequence; } function skipWhileFactory(iterable,predicate,context,useKeys){ var skipSequence=makeSequence(iterable); skipSequence.__iterateUncached=function(fn,reverse){var this$0=this; if(reverse){ return this.cacheResult().__iterate(fn,reverse); } var isSkipping=true; var iterations=0; iterable.__iterate(function(v,k,c){ if(!(isSkipping&&(isSkipping=predicate.call(context,v,k,c)))){ iterations++; return fn(v,useKeys?k:iterations-1,this$0); } }); return iterations; }; skipSequence.__iteratorUncached=function(type,reverse){var this$0=this; if(reverse){ return this.cacheResult().__iterator(type,reverse); } var iterator=iterable.__iterator(ITERATE_ENTRIES,reverse); var skipping=true; var iterations=0; return new Iterator(function(){ var step,k,v; do{ step=iterator.next(); if(step.done){ if(useKeys||type===ITERATE_VALUES){ return step; }else if(type===ITERATE_KEYS){ return iteratorValue(type,iterations++,undefined,step); }else{ return iteratorValue(type,iterations++,step.value[1],step); } } var entry=step.value; k=entry[0]; v=entry[1]; skipping&&(skipping=predicate.call(context,v,k,this$0)); }while(skipping); return type===ITERATE_ENTRIES?step: iteratorValue(type,k,v,step); }); }; return skipSequence; } function concatFactory(iterable,values){ var isKeyedIterable=isKeyed(iterable); var iters=[iterable].concat(values).map(function(v){ if(!isIterable(v)){ v=isKeyedIterable? keyedSeqFromValue(v): indexedSeqFromValue(Array.isArray(v)?v:[v]); }else if(isKeyedIterable){ v=KeyedIterable(v); } return v; }).filter(function(v){return v.size!==0;}); if(iters.length===0){ return iterable; } if(iters.length===1){ var singleton=iters[0]; if(singleton===iterable|| isKeyedIterable&&isKeyed(singleton)|| isIndexed(iterable)&&isIndexed(singleton)){ return singleton; } } var concatSeq=new ArraySeq(iters); if(isKeyedIterable){ concatSeq=concatSeq.toKeyedSeq(); }else if(!isIndexed(iterable)){ concatSeq=concatSeq.toSetSeq(); } concatSeq=concatSeq.flatten(true); concatSeq.size=iters.reduce( function(sum,seq){ if(sum!==undefined){ var size=seq.size; if(size!==undefined){ return sum+size; } } }, 0); return concatSeq; } function flattenFactory(iterable,depth,useKeys){ var flatSequence=makeSequence(iterable); flatSequence.__iterateUncached=function(fn,reverse){ var iterations=0; var stopped=false; function flatDeep(iter,currentDepth){var this$0=this; iter.__iterate(function(v,k){ if((!depth||currentDepth0; } function zipWithFactory(keyIter,zipper,iters){ var zipSequence=makeSequence(keyIter); zipSequence.size=new ArraySeq(iters).map(function(i){return i.size;}).min(); zipSequence.__iterate=function(fn,reverse){ var iterator=this.__iterator(ITERATE_VALUES,reverse); var step; var iterations=0; while(!(step=iterator.next()).done){ if(fn(step.value,iterations++,this)===false){ break; } } return iterations; }; zipSequence.__iteratorUncached=function(type,reverse){ var iterators=iters.map(function(i) {return i=Iterable(i),getIterator(reverse?i.reverse():i);}); var iterations=0; var isDone=false; return new Iterator(function(){ var steps; if(!isDone){ steps=iterators.map(function(i){return i.next();}); isDone=steps.some(function(s){return s.done;}); } if(isDone){ return iteratorDone(); } return iteratorValue( type, iterations++, zipper.apply(null,steps.map(function(s){return s.value;}))); }); }; return zipSequence; } function reify(iter,seq){ return isSeq(iter)?seq:iter.constructor(seq); } function validateEntry(entry){ if(entry!==Object(entry)){ throw new TypeError('Expected [K, V] tuple: '+entry); } } function resolveSize(iter){ assertNotInfinite(iter.size); return ensureSize(iter); } function iterableClass(iterable){ return isKeyed(iterable)?KeyedIterable: isIndexed(iterable)?IndexedIterable: SetIterable; } function makeSequence(iterable){ return Object.create( ( isKeyed(iterable)?KeyedSeq: isIndexed(iterable)?IndexedSeq: SetSeq). prototype); } function cacheResultThrough(){ if(this._iter.cacheResult){ this._iter.cacheResult(); this.size=this._iter.size; return this; }else{ return Seq.prototype.cacheResult.call(this); } } function defaultComparator(a,b){ return a>b?1:a=0;ii--){ head={ value:arguments[ii], next:head}; } if(this.__ownerID){ this.size=newSize; this._head=head; this.__hash=undefined; this.__altered=true; return this; } return makeStack(newSize,head); }; Stack.prototype.pushAll=function(iter){ iter=IndexedIterable(iter); if(iter.size===0){ return this; } assertNotInfinite(iter.size); var newSize=this.size; var head=this._head; iter.reverse().forEach(function(value){ newSize++; head={ value:value, next:head}; }); if(this.__ownerID){ this.size=newSize; this._head=head; this.__hash=undefined; this.__altered=true; return this; } return makeStack(newSize,head); }; Stack.prototype.pop=function(){ return this.slice(1); }; Stack.prototype.unshift=function(){ return this.push.apply(this,arguments); }; Stack.prototype.unshiftAll=function(iter){ return this.pushAll(iter); }; Stack.prototype.shift=function(){ return this.pop.apply(this,arguments); }; Stack.prototype.clear=function(){ if(this.size===0){ return this; } if(this.__ownerID){ this.size=0; this._head=undefined; this.__hash=undefined; this.__altered=true; return this; } return emptyStack(); }; Stack.prototype.slice=function(begin,end){ if(wholeSlice(begin,end,this.size)){ return this; } var resolvedBegin=resolveBegin(begin,this.size); var resolvedEnd=resolveEnd(end,this.size); if(resolvedEnd!==this.size){ return IndexedCollection.prototype.slice.call(this,begin,end); } var newSize=this.size-resolvedBegin; var head=this._head; while(resolvedBegin--){ head=head.next; } if(this.__ownerID){ this.size=newSize; this._head=head; this.__hash=undefined; this.__altered=true; return this; } return makeStack(newSize,head); }; Stack.prototype.__ensureOwner=function(ownerID){ if(ownerID===this.__ownerID){ return this; } if(!ownerID){ this.__ownerID=ownerID; this.__altered=false; return this; } return makeStack(this.size,this._head,ownerID,this.__hash); }; Stack.prototype.__iterate=function(fn,reverse){ if(reverse){ return this.reverse().__iterate(fn); } var iterations=0; var node=this._head; while(node){ if(fn(node.value,iterations++,this)===false){ break; } node=node.next; } return iterations; }; Stack.prototype.__iterator=function(type,reverse){ if(reverse){ return this.reverse().__iterator(type); } var iterations=0; var node=this._head; return new Iterator(function(){ if(node){ var value=node.value; node=node.next; return iteratorValue(type,iterations++,value); } return iteratorDone(); }); }; function isStack(maybeStack){ return!!(maybeStack&&maybeStack[IS_STACK_SENTINEL]); } Stack.isStack=isStack; var IS_STACK_SENTINEL='@@__IMMUTABLE_STACK__@@'; var StackPrototype=Stack.prototype; StackPrototype[IS_STACK_SENTINEL]=true; StackPrototype.withMutations=MapPrototype.withMutations; StackPrototype.asMutable=MapPrototype.asMutable; StackPrototype.asImmutable=MapPrototype.asImmutable; StackPrototype.wasAltered=MapPrototype.wasAltered; function makeStack(size,head,ownerID,hash){ var map=Object.create(StackPrototype); map.size=size; map._head=head; map.__ownerID=ownerID; map.__hash=hash; map.__altered=false; return map; } var EMPTY_STACK; function emptyStack(){ return EMPTY_STACK||(EMPTY_STACK=makeStack(0)); } function mixin(ctor,methods){ var keyCopier=function keyCopier(key){ctor.prototype[key]=methods[key];}; Object.keys(methods).forEach(keyCopier); Object.getOwnPropertySymbols&& Object.getOwnPropertySymbols(methods).forEach(keyCopier); return ctor; } Iterable.Iterator=Iterator; mixin(Iterable,{ toArray:function toArray(){ assertNotInfinite(this.size); var array=new Array(this.size||0); this.valueSeq().__iterate(function(v,i){array[i]=v;}); return array; }, toIndexedSeq:function toIndexedSeq(){ return new ToIndexedSequence(this); }, toJS:function toJS(){ return this.toSeq().map( function(value){return value&&typeof value.toJS==='function'?value.toJS():value;}). __toJS(); }, toJSON:function toJSON(){ return this.toSeq().map( function(value){return value&&typeof value.toJSON==='function'?value.toJSON():value;}). __toJS(); }, toKeyedSeq:function toKeyedSeq(){ return new ToKeyedSequence(this,true); }, toMap:function toMap(){ return Map(this.toKeyedSeq()); }, toObject:function toObject(){ assertNotInfinite(this.size); var object={}; this.__iterate(function(v,k){object[k]=v;}); return object; }, toOrderedMap:function toOrderedMap(){ return OrderedMap(this.toKeyedSeq()); }, toOrderedSet:function toOrderedSet(){ return OrderedSet(isKeyed(this)?this.valueSeq():this); }, toSet:function toSet(){ return Set(isKeyed(this)?this.valueSeq():this); }, toSetSeq:function toSetSeq(){ return new ToSetSequence(this); }, toSeq:function toSeq(){ return isIndexed(this)?this.toIndexedSeq(): isKeyed(this)?this.toKeyedSeq(): this.toSetSeq(); }, toStack:function toStack(){ return Stack(isKeyed(this)?this.valueSeq():this); }, toList:function toList(){ return List(isKeyed(this)?this.valueSeq():this); }, toString:function toString(){ return'[Iterable]'; }, __toString:function __toString(head,tail){ if(this.size===0){ return head+tail; } return head+' '+this.toSeq().map(this.__toStringMapper).join(', ')+' '+tail; }, concat:function concat(){var values=SLICE$0.call(arguments,0); return reify(this,concatFactory(this,values)); }, includes:function includes(searchValue){ return this.some(function(value){return is(value,searchValue);}); }, entries:function entries(){ return this.__iterator(ITERATE_ENTRIES); }, every:function every(predicate,context){ assertNotInfinite(this.size); var returnValue=true; this.__iterate(function(v,k,c){ if(!predicate.call(context,v,k,c)){ returnValue=false; return false; } }); return returnValue; }, filter:function filter(predicate,context){ return reify(this,filterFactory(this,predicate,context,true)); }, find:function find(predicate,context,notSetValue){ var entry=this.findEntry(predicate,context); return entry?entry[1]:notSetValue; }, findEntry:function findEntry(predicate,context){ var found; this.__iterate(function(v,k,c){ if(predicate.call(context,v,k,c)){ found=[k,v]; return false; } }); return found; }, findLastEntry:function findLastEntry(predicate,context){ return this.toSeq().reverse().findEntry(predicate,context); }, forEach:function forEach(sideEffect,context){ assertNotInfinite(this.size); return this.__iterate(context?sideEffect.bind(context):sideEffect); }, join:function join(separator){ assertNotInfinite(this.size); separator=separator!==undefined?''+separator:','; var joined=''; var isFirst=true; this.__iterate(function(v){ isFirst?isFirst=false:joined+=separator; joined+=v!==null&&v!==undefined?v.toString():''; }); return joined; }, keys:function keys(){ return this.__iterator(ITERATE_KEYS); }, map:function map(mapper,context){ return reify(this,mapFactory(this,mapper,context)); }, reduce:function reduce(reducer,initialReduction,context){ assertNotInfinite(this.size); var reduction; var useFirst; if(arguments.length<2){ useFirst=true; }else{ reduction=initialReduction; } this.__iterate(function(v,k,c){ if(useFirst){ useFirst=false; reduction=v; }else{ reduction=reducer.call(context,reduction,v,k,c); } }); return reduction; }, reduceRight:function reduceRight(reducer,initialReduction,context){ var reversed=this.toKeyedSeq().reverse(); return reversed.reduce.apply(reversed,arguments); }, reverse:function reverse(){ return reify(this,reverseFactory(this,true)); }, slice:function slice(begin,end){ return reify(this,sliceFactory(this,begin,end,true)); }, some:function some(predicate,context){ return!this.every(not(predicate),context); }, sort:function sort(comparator){ return reify(this,sortFactory(this,comparator)); }, values:function values(){ return this.__iterator(ITERATE_VALUES); }, butLast:function butLast(){ return this.slice(0,-1); }, isEmpty:function isEmpty(){ return this.size!==undefined?this.size===0:!this.some(function(){return true;}); }, count:function count(predicate,context){ return ensureSize( predicate?this.toSeq().filter(predicate,context):this); }, countBy:function countBy(grouper,context){ return countByFactory(this,grouper,context); }, equals:function equals(other){ return deepEqual(this,other); }, entrySeq:function entrySeq(){ var iterable=this; if(iterable._cache){ return new ArraySeq(iterable._cache); } var entriesSequence=iterable.toSeq().map(entryMapper).toIndexedSeq(); entriesSequence.fromEntrySeq=function(){return iterable.toSeq();}; return entriesSequence; }, filterNot:function filterNot(predicate,context){ return this.filter(not(predicate),context); }, findLast:function findLast(predicate,context,notSetValue){ return this.toKeyedSeq().reverse().find(predicate,context,notSetValue); }, first:function first(){ return this.find(returnTrue); }, flatMap:function flatMap(mapper,context){ return reify(this,flatMapFactory(this,mapper,context)); }, flatten:function flatten(depth){ return reify(this,flattenFactory(this,depth,true)); }, fromEntrySeq:function fromEntrySeq(){ return new FromEntriesSequence(this); }, get:function get(searchKey,notSetValue){ return this.find(function(_,key){return is(key,searchKey);},undefined,notSetValue); }, getIn:function getIn(searchKeyPath,notSetValue){ var nested=this; var iter=forceIterator(searchKeyPath); var step; while(!(step=iter.next()).done){ var key=step.value; nested=nested&&nested.get?nested.get(key,NOT_SET):NOT_SET; if(nested===NOT_SET){ return notSetValue; } } return nested; }, groupBy:function groupBy(grouper,context){ return groupByFactory(this,grouper,context); }, has:function has(searchKey){ return this.get(searchKey,NOT_SET)!==NOT_SET; }, hasIn:function hasIn(searchKeyPath){ return this.getIn(searchKeyPath,NOT_SET)!==NOT_SET; }, isSubset:function isSubset(iter){ iter=typeof iter.includes==='function'?iter:Iterable(iter); return this.every(function(value){return iter.includes(value);}); }, isSuperset:function isSuperset(iter){ iter=typeof iter.isSubset==='function'?iter:Iterable(iter); return iter.isSubset(this); }, keySeq:function keySeq(){ return this.toSeq().map(keyMapper).toIndexedSeq(); }, last:function last(){ return this.toSeq().reverse().first(); }, max:function max(comparator){ return maxFactory(this,comparator); }, maxBy:function maxBy(mapper,comparator){ return maxFactory(this,comparator,mapper); }, min:function min(comparator){ return maxFactory(this,comparator?neg(comparator):defaultNegComparator); }, minBy:function minBy(mapper,comparator){ return maxFactory(this,comparator?neg(comparator):defaultNegComparator,mapper); }, rest:function rest(){ return this.slice(1); }, skip:function skip(amount){ return this.slice(Math.max(0,amount)); }, skipLast:function skipLast(amount){ return reify(this,this.toSeq().reverse().skip(amount).reverse()); }, skipWhile:function skipWhile(predicate,context){ return reify(this,skipWhileFactory(this,predicate,context,true)); }, skipUntil:function skipUntil(predicate,context){ return this.skipWhile(not(predicate),context); }, sortBy:function sortBy(mapper,comparator){ return reify(this,sortFactory(this,comparator,mapper)); }, take:function take(amount){ return this.slice(0,Math.max(0,amount)); }, takeLast:function takeLast(amount){ return reify(this,this.toSeq().reverse().take(amount).reverse()); }, takeWhile:function takeWhile(predicate,context){ return reify(this,takeWhileFactory(this,predicate,context)); }, takeUntil:function takeUntil(predicate,context){ return this.takeWhile(not(predicate),context); }, valueSeq:function valueSeq(){ return this.toIndexedSeq(); }, hashCode:function hashCode(){ return this.__hash||(this.__hash=hashIterable(this)); }}); var IterablePrototype=Iterable.prototype; IterablePrototype[IS_ITERABLE_SENTINEL]=true; IterablePrototype[ITERATOR_SYMBOL]=IterablePrototype.values; IterablePrototype.__toJS=IterablePrototype.toArray; IterablePrototype.__toStringMapper=quoteString; IterablePrototype.inspect= IterablePrototype.toSource=function(){return this.toString();}; IterablePrototype.chain=IterablePrototype.flatMap; IterablePrototype.contains=IterablePrototype.includes; (function(){ try{ Object.defineProperty(IterablePrototype,'length',{ get:function get(){ if(!Iterable.noLengthWarning){ var stack; try{ throw new Error(); }catch(error){ stack=error.stack; } if(stack.indexOf('_wrapObject')===-1){ console&&console.warn&&console.warn( 'iterable.length has been deprecated, '+ 'use iterable.size or iterable.count(). '+ 'This warning will become a silent error in a future version. '+ stack); return this.size; } } }}); }catch(e){} })(); mixin(KeyedIterable,{ flip:function flip(){ return reify(this,flipFactory(this)); }, findKey:function findKey(predicate,context){ var entry=this.findEntry(predicate,context); return entry&&entry[0]; }, findLastKey:function findLastKey(predicate,context){ return this.toSeq().reverse().findKey(predicate,context); }, keyOf:function keyOf(searchValue){ return this.findKey(function(value){return is(value,searchValue);}); }, lastKeyOf:function lastKeyOf(searchValue){ return this.findLastKey(function(value){return is(value,searchValue);}); }, mapEntries:function mapEntries(mapper,context){var this$0=this; var iterations=0; return reify(this, this.toSeq().map( function(v,k){return mapper.call(context,[k,v],iterations++,this$0);}). fromEntrySeq()); }, mapKeys:function mapKeys(mapper,context){var this$0=this; return reify(this, this.toSeq().flip().map( function(k,v){return mapper.call(context,k,v,this$0);}). flip()); }}); var KeyedIterablePrototype=KeyedIterable.prototype; KeyedIterablePrototype[IS_KEYED_SENTINEL]=true; KeyedIterablePrototype[ITERATOR_SYMBOL]=IterablePrototype.entries; KeyedIterablePrototype.__toJS=IterablePrototype.toObject; KeyedIterablePrototype.__toStringMapper=function(v,k){return JSON.stringify(k)+': '+quoteString(v);}; mixin(IndexedIterable,{ toKeyedSeq:function toKeyedSeq(){ return new ToKeyedSequence(this,false); }, filter:function filter(predicate,context){ return reify(this,filterFactory(this,predicate,context,false)); }, findIndex:function findIndex(predicate,context){ var entry=this.findEntry(predicate,context); return entry?entry[0]:-1; }, indexOf:function indexOf(searchValue){ var key=this.toKeyedSeq().keyOf(searchValue); return key===undefined?-1:key; }, lastIndexOf:function lastIndexOf(searchValue){ var key=this.toKeyedSeq().reverse().keyOf(searchValue); return key===undefined?-1:key; }, reverse:function reverse(){ return reify(this,reverseFactory(this,false)); }, slice:function slice(begin,end){ return reify(this,sliceFactory(this,begin,end,false)); }, splice:function splice(index,removeNum){ var numArgs=arguments.length; removeNum=Math.max(removeNum|0,0); if(numArgs===0||numArgs===2&&!removeNum){ return this; } index=resolveBegin(index,index<0?this.count():this.size); var spliced=this.slice(0,index); return reify( this, numArgs===1? spliced: spliced.concat(arrCopy(arguments,2),this.slice(index+removeNum))); }, findLastIndex:function findLastIndex(predicate,context){ var key=this.toKeyedSeq().findLastKey(predicate,context); return key===undefined?-1:key; }, first:function first(){ return this.get(0); }, flatten:function flatten(depth){ return reify(this,flattenFactory(this,depth,false)); }, get:function get(index,notSetValue){ index=wrapIndex(this,index); return index<0||this.size===Infinity|| this.size!==undefined&&index>this.size? notSetValue: this.find(function(_,key){return key===index;},undefined,notSetValue); }, has:function has(index){ index=wrapIndex(this,index); return index>=0&&(this.size!==undefined? this.size===Infinity||indexb?-1:0; } function hashIterable(iterable){ if(iterable.size===Infinity){ return 0; } var ordered=isOrdered(iterable); var keyed=isKeyed(iterable); var h=ordered?1:0; var size=iterable.__iterate( keyed? ordered? function(v,k){h=31*h+hashMerge(hash(v),hash(k))|0;}: function(v,k){h=h+hashMerge(hash(v),hash(k))|0;}: ordered? function(v){h=31*h+hash(v)|0;}: function(v){h=h+hash(v)|0;}); return murmurHashOfSize(size,h); } function murmurHashOfSize(size,h){ h=imul(h,0xCC9E2D51); h=imul(h<<15|h>>>-15,0x1B873593); h=imul(h<<13|h>>>-13,5); h=(h+0xE6546B64|0)^size; h=imul(h^h>>>16,0x85EBCA6B); h=imul(h^h>>>13,0xC2B2AE35); h=smi(h^h>>>16); return h; } function hashMerge(a,b){ return a^b+0x9E3779B9+(a<<6)+(a>>2)|0; } var Immutable={ Iterable:Iterable, Seq:Seq, Collection:Collection, Map:Map, OrderedMap:OrderedMap, List:List, Stack:Stack, Set:Set, OrderedSet:OrderedSet, Record:Record, Range:Range, Repeat:Repeat, is:is, fromJS:fromJS}; return Immutable; }); }, "immutable/dist/immutable.js"); __d(416 /* NavigatorBreadcrumbNavigationBar */, function(global, require, module, exports) { 'use strict'; var NavigatorBreadcrumbNavigationBarStyles=require(417 /* NavigatorBreadcrumbNavigationBarStyles */); var NavigatorNavigationBarStylesAndroid=require(418 /* NavigatorNavigationBarStylesAndroid */); var NavigatorNavigationBarStylesIOS=require(421 /* NavigatorNavigationBarStylesIOS */); var Platform=require(59 /* Platform */); var React=require(103 /* React */); var StyleSheet=require(104 /* StyleSheet */); var View=require(116 /* View */);var _require= require(415 /* immutable */);var Map=_require.Map; var guid=require(216 /* guid */); var invariant=require(56 /* fbjs/lib/invariant */); var Interpolators=NavigatorBreadcrumbNavigationBarStyles.Interpolators; var NavigatorNavigationBarStyles=Platform.OS==='android'? NavigatorNavigationBarStylesAndroid:NavigatorNavigationBarStylesIOS; var PropTypes=React.PropTypes; var CRUMB_PROPS=Interpolators.map(function(){return{style:{}};}); var ICON_PROPS=Interpolators.map(function(){return{style:{}};}); var SEPARATOR_PROPS=Interpolators.map(function(){return{style:{}};}); var TITLE_PROPS=Interpolators.map(function(){return{style:{}};}); var RIGHT_BUTTON_PROPS=Interpolators.map(function(){return{style:{}};}); var navStatePresentedIndex=function navStatePresentedIndex(navState){ if(navState.presentedIndex!==undefined){ return navState.presentedIndex; } return navState.observedTopOfStack; }; var initStyle=function initStyle(index,presentedIndex){ return index===presentedIndex?NavigatorBreadcrumbNavigationBarStyles.Center[index]: indexfromIndex?progress:1-progress; var oldDistToCenter=index-fromIndex; var newDistToCenter=index-toIndex; var interpolate; invariant( Interpolators[index], 'Cannot find breadcrumb interpolators for '+index); if(oldDistToCenter>0&&newDistToCenter===0|| newDistToCenter>0&&oldDistToCenter===0){ interpolate=Interpolators[index].RightToCenter; }else if(oldDistToCenter<0&&newDistToCenter===0|| newDistToCenter<0&&oldDistToCenter===0){ interpolate=Interpolators[index].CenterToLeft; }else if(oldDistToCenter===newDistToCenter){ interpolate=Interpolators[index].RightToCenter; }else{ interpolate=Interpolators[index].RightToLeft; } if(interpolate.Crumb(CRUMB_PROPS[index].style,amount)){ this._setPropsIfExists('crumb_'+index,CRUMB_PROPS[index]); } if(interpolate.Icon(ICON_PROPS[index].style,amount)){ this._setPropsIfExists('icon_'+index,ICON_PROPS[index]); } if(interpolate.Separator(SEPARATOR_PROPS[index].style,amount)){ this._setPropsIfExists('separator_'+index,SEPARATOR_PROPS[index]); } if(interpolate.Title(TITLE_PROPS[index].style,amount)){ this._setPropsIfExists('title_'+index,TITLE_PROPS[index]); } var right=this.refs['right_'+index]; var rightButtonStyle=RIGHT_BUTTON_PROPS[index].style; if(right&&interpolate.RightItem(rightButtonStyle,amount)){ right.setNativeProps({ style:rightButtonStyle, pointerEvents:rightButtonStyle.opacity===0?'none':'auto'}); } }, updateProgress:function updateProgress(progress,fromIndex,toIndex){ var max=Math.max(fromIndex,toIndex); var min=Math.min(fromIndex,toIndex); for(var index=min;index<=max;index++){ this._updateIndexProgress(progress,index,fromIndex,toIndex); } }, onAnimationStart:function onAnimationStart(fromIndex,toIndex){ var max=Math.max(fromIndex,toIndex); var min=Math.min(fromIndex,toIndex); for(var index=min;index<=max;index++){ this._setRenderViewsToHardwareTextureAndroid(index,true); } }, onAnimationEnd:function onAnimationEnd(){ var max=this.props.navState.routeStack.length-1; for(var index=0;index<=max;index++){ this._setRenderViewsToHardwareTextureAndroid(index,false); } }, _setRenderViewsToHardwareTextureAndroid:function _setRenderViewsToHardwareTextureAndroid(index,renderToHardwareTexture){ var props={ renderToHardwareTextureAndroid:renderToHardwareTexture}; this._setPropsIfExists('icon_'+index,props); this._setPropsIfExists('separator_'+index,props); this._setPropsIfExists('title_'+index,props); this._setPropsIfExists('right_'+index,props); }, componentWillMount:function componentWillMount(){ this._reset(); }, render:function render(){ var navState=this.props.navState; var icons=navState&&navState.routeStack.map(this._getBreadcrumb); var titles=navState.routeStack.map(this._getTitle); var buttons=navState.routeStack.map(this._getRightButton); return( React.createElement(View,{ key:this._key, style:[styles.breadCrumbContainer,this.props.style]}, titles, icons, buttons)); }, immediatelyRefresh:function immediatelyRefresh(){ this._reset(); this.forceUpdate(); }, _reset:function _reset(){ this._key=guid(); this._descriptors={ crumb:new Map(), title:new Map(), right:new Map()}; }, _getBreadcrumb:function _getBreadcrumb(route,index){ if(this._descriptors.crumb.has(route)){ return this._descriptors.crumb.get(route); } var navBarRouteMapper=this.props.routeMapper; var firstStyles=initStyle(index,navStatePresentedIndex(this.props.navState)); var breadcrumbDescriptor= React.createElement(View,{ key:'crumb_'+index, ref:'crumb_'+index, style:firstStyles.Crumb}, React.createElement(View,{ref:'icon_'+index,style:firstStyles.Icon}, navBarRouteMapper.iconForRoute(route,this.props.navigator)), React.createElement(View,{ref:'separator_'+index,style:firstStyles.Separator}, navBarRouteMapper.separatorForRoute(route,this.props.navigator))); this._descriptors.crumb=this._descriptors.crumb.set(route,breadcrumbDescriptor); return breadcrumbDescriptor; }, _getTitle:function _getTitle(route,index){ if(this._descriptors.title.has(route)){ return this._descriptors.title.get(route); } var titleContent=this.props.routeMapper.titleContentForRoute( this.props.navState.routeStack[index], this.props.navigator); var firstStyles=initStyle(index,navStatePresentedIndex(this.props.navState)); var titleDescriptor= React.createElement(View,{ key:'title_'+index, ref:'title_'+index, style:firstStyles.Title}, titleContent); this._descriptors.title=this._descriptors.title.set(route,titleDescriptor); return titleDescriptor; }, _getRightButton:function _getRightButton(route,index){ if(this._descriptors.right.has(route)){ return this._descriptors.right.get(route); } var rightContent=this.props.routeMapper.rightContentForRoute( this.props.navState.routeStack[index], this.props.navigator); if(!rightContent){ this._descriptors.right=this._descriptors.right.set(route,null); return null; } var firstStyles=initStyle(index,navStatePresentedIndex(this.props.navState)); var rightButtonDescriptor= React.createElement(View,{ key:'right_'+index, ref:'right_'+index, style:firstStyles.RightItem}, rightContent); this._descriptors.right=this._descriptors.right.set(route,rightButtonDescriptor); return rightButtonDescriptor; }, _setPropsIfExists:function _setPropsIfExists(ref,props){ var ref=this.refs[ref]; ref&&ref.setNativeProps(props); }}); var styles=StyleSheet.create({ breadCrumbContainer:{ overflow:'hidden', position:'absolute', height:NavigatorNavigationBarStyles.General.TotalNavHeight, top:0, left:0, right:0}}); module.exports=NavigatorBreadcrumbNavigationBar; }, "NavigatorBreadcrumbNavigationBar"); __d(417 /* NavigatorBreadcrumbNavigationBarStyles */, function(global, require, module, exports) { 'use strict'; var NavigatorNavigationBarStylesAndroid=require(418 /* NavigatorNavigationBarStylesAndroid */); var buildStyleInterpolator=require(419 /* buildStyleInterpolator */); var merge=require(119 /* merge */); var NAV_BAR_HEIGHT=NavigatorNavigationBarStylesAndroid.General.NavBarHeight; var SPACING=8; var ICON_WIDTH=40; var SEPARATOR_WIDTH=9; var CRUMB_WIDTH=ICON_WIDTH+SEPARATOR_WIDTH; var NAV_ELEMENT_HEIGHT=NAV_BAR_HEIGHT; var OPACITY_RATIO=100; var ICON_INACTIVE_OPACITY=0.6; var MAX_BREADCRUMBS=10; var CRUMB_BASE={ position:'absolute', flexDirection:'row', top:0, width:CRUMB_WIDTH, height:NAV_ELEMENT_HEIGHT, backgroundColor:'transparent'}; var ICON_BASE={ width:ICON_WIDTH, height:NAV_ELEMENT_HEIGHT}; var SEPARATOR_BASE={ width:SEPARATOR_WIDTH, height:NAV_ELEMENT_HEIGHT}; var TITLE_BASE={ position:'absolute', top:0, height:NAV_ELEMENT_HEIGHT, backgroundColor:'transparent', alignItems:'flex-start'}; var FIRST_TITLE_BASE=merge(TITLE_BASE,{ left:0, right:0}); var RIGHT_BUTTON_BASE={ position:'absolute', top:0, right:0, overflow:'hidden', opacity:1, height:NAV_ELEMENT_HEIGHT, backgroundColor:'transparent'}; var LEFT=[]; var CENTER=[]; var RIGHT=[]; for(var i=0;i= '+( anim.threshold+' ? '+anim.to+' : '+anim.from)+';\n'); }; var computeNextValIdentity=function computeNextValIdentity(anim){ return' nextScalarVal = value;\n'; }; var operationVar=function operationVar(name){ return name+'ReuseOp'; }; var createReusableOperationVars=function createReusableOperationVars(anims){ var ret=''; for(var name in anims){ if(ShouldAllocateReusableOperationVars[name]){ ret+='var '+operationVar(name)+' = [];\n'; } } return ret; }; var newlines=function newlines(statements){ return'\n'+statements.join('\n')+'\n'; }; var computeNextMatrixOperationField=function computeNextMatrixOperationField(anim,name,dimension,index){ var fieldAccess=operationVar(name)+'['+index+']'; if(anim.from[dimension]!==undefined&&anim.to[dimension]!==undefined){ return' '+anim.from[dimension]!==anim.to[dimension]? computeNextValLinear(anim,anim.from[dimension],anim.to[dimension],fieldAccess): fieldAccess+' = '+anim.from[dimension]+';'; }else{ return' '+fieldAccess+' = '+InitialOperationField[name][index]+';'; } }; var unrolledVars=[]; for(var varIndex=0;varIndex<16;varIndex++){ unrolledVars.push('m'+varIndex); } var setNextMatrixAndDetectChange=function setNextMatrixAndDetectChange(orderedMatrixOperations){ var fn=[ ' var transform = result.transform !== undefined ? '+ 'result.transform : (result.transform = [{ matrix: [] }]);'+ ' var transformMatrix = transform[0].matrix;']; fn.push.apply( fn, inline(MatrixOps.unroll,['transformMatrix'].concat(unrolledVars))); for(var i=0;ifromIndex?progress:1-progress; var oldDistToCenter=index-fromIndex; var newDistToCenter=index-toIndex; var interpolate; if(oldDistToCenter>0&&newDistToCenter===0|| newDistToCenter>0&&oldDistToCenter===0){ interpolate=this.props.navigationStyles.Interpolators.RightToCenter; }else if(oldDistToCenter<0&&newDistToCenter===0|| newDistToCenter<0&&oldDistToCenter===0){ interpolate=this.props.navigationStyles.Interpolators.CenterToLeft; }else if(oldDistToCenter===newDistToCenter){ interpolate=this.props.navigationStyles.Interpolators.RightToCenter; }else{ interpolate=this.props.navigationStyles.Interpolators.RightToLeft; } COMPONENT_NAMES.forEach(function(componentName){ var component=this._components[componentName].get(this.props.navState.routeStack[index]); var props=this._getReusableProps(componentName,index); if(component&&interpolate[componentName](props.style,amount)){ props.pointerEvents=props.style.opacity===0?'none':'box-none'; component.setNativeProps(props); } },this); }, updateProgress:function updateProgress( progress, fromIndex, toIndex) { var max=Math.max(fromIndex,toIndex); var min=Math.min(fromIndex,toIndex); for(var index=min;index<=max;index++){ this._updateIndexProgress(progress,index,fromIndex,toIndex); } }, render:function render(){var _this2=this; var navBarStyle={ height:this.props.navigationStyles.General.TotalNavHeight}; var navState=this.props.navState; var components=navState.routeStack.map(function(route,index){return( COMPONENT_NAMES.map(function(componentName){return( _this2._getComponent(componentName,route,index));}));}); return( React.createElement(View,{ key:this._key, style:[styles.navBarContainer,navBarStyle,this.props.style]}, components)); }, _getComponent:function _getComponent( componentName, route, index) {var _this3=this; if(this._descriptors[componentName].includes(route)){ return this._descriptors[componentName].get(route); } var rendered=null; var content=this.props.routeMapper[componentName]( this.props.navState.routeStack[index], this.props.navigator, index, this.props.navState); if(!content){ return null; } var componentIsActive=index===navStatePresentedIndex(this.props.navState); var initialStage=componentIsActive? this.props.navigationStyles.Stages.Center: this.props.navigationStyles.Stages.Left; rendered= React.createElement(View,{ ref:function ref(_ref){ _this3._components[componentName]=_this3._components[componentName].set(route,_ref); }, pointerEvents:componentIsActive?'box-none':'none', style:initialStage[componentName]}, content); this._descriptors[componentName]=this._descriptors[componentName].set(route,rendered); return rendered; }}); var styles=StyleSheet.create({ navBarContainer:{ position:'absolute', top:0, left:0, right:0, backgroundColor:'transparent'}}); module.exports=NavigatorNavigationBar; }, "NavigatorNavigationBar"); __d(423 /* NavigatorSceneConfigs */, function(global, require, module, exports) { 'use strict'; var Dimensions=require(106 /* Dimensions */); var PixelRatio=require(105 /* PixelRatio */); var I18nManager=require(404 /* I18nManager */); var buildStyleInterpolator=require(419 /* buildStyleInterpolator */); var IS_RTL=I18nManager.isRTL; var SCREEN_WIDTH=Dimensions.get('window').width; var SCREEN_HEIGHT=Dimensions.get('window').height; var ToTheLeftIOS={ transformTranslate:{ from:{x:0,y:0,z:0}, to:{x:-SCREEN_WIDTH*0.3,y:0,z:0}, min:0, max:1, type:'linear', extrapolate:true, round:PixelRatio.get()}, opacity:{ value:1.0, type:'constant'}}; var ToTheRightIOS=babelHelpers.extends({}, ToTheLeftIOS,{ transformTranslate:{ from:{x:0,y:0,z:0}, to:{x:SCREEN_WIDTH*0.3,y:0,z:0}}}); var FadeToTheLeft={ transformTranslate:{ from:{x:0,y:0,z:0}, to:{x:-Math.round(Dimensions.get('window').width*0.3),y:0,z:0}, min:0, max:1, type:'linear', extrapolate:true, round:PixelRatio.get()}, transformScale:{ from:{x:1,y:1,z:1}, to:{x:0.95,y:0.95,z:1}, min:0, max:1, type:'linear', extrapolate:true}, opacity:{ from:1, to:0.3, min:0, max:1, type:'linear', extrapolate:false, round:100}, translateX:{ from:0, to:-Math.round(Dimensions.get('window').width*0.3), min:0, max:1, type:'linear', extrapolate:true, round:PixelRatio.get()}, scaleX:{ from:1, to:0.95, min:0, max:1, type:'linear', extrapolate:true}, scaleY:{ from:1, to:0.95, min:0, max:1, type:'linear', extrapolate:true}}; var FadeToTheRight=babelHelpers.extends({}, FadeToTheLeft,{ transformTranslate:{ from:{x:0,y:0,z:0}, to:{x:Math.round(SCREEN_WIDTH*0.3),y:0,z:0}}, translateX:{ from:0, to:Math.round(SCREEN_WIDTH*0.3)}}); var FadeIn={ opacity:{ from:0, to:1, min:0.5, max:1, type:'linear', extrapolate:false, round:100}}; var FadeOut={ opacity:{ from:1, to:0, min:0, max:0.5, type:'linear', extrapolate:false, round:100}}; var ToTheLeft={ transformTranslate:{ from:{x:0,y:0,z:0}, to:{x:-Dimensions.get('window').width,y:0,z:0}, min:0, max:1, type:'linear', extrapolate:true, round:PixelRatio.get()}, opacity:{ value:1.0, type:'constant'}, translateX:{ from:0, to:-Dimensions.get('window').width, min:0, max:1, type:'linear', extrapolate:true, round:PixelRatio.get()}}; var ToTheRight={ transformTranslate:{ from:{x:0,y:0,z:0}, to:{x:Dimensions.get('window').width,y:0,z:0}, min:0, max:1, type:'linear', extrapolate:true, round:PixelRatio.get()}, opacity:{ value:1.0, type:'constant'}, translateX:{ from:0, to:Dimensions.get('window').width, min:0, max:1, type:'linear', extrapolate:true, round:PixelRatio.get()}}; var ToTheUp={ transformTranslate:{ from:{x:0,y:0,z:0}, to:{x:0,y:-Dimensions.get('window').height,z:0}, min:0, max:1, type:'linear', extrapolate:true, round:PixelRatio.get()}, opacity:{ value:1.0, type:'constant'}, translateY:{ from:0, to:-Dimensions.get('window').height, min:0, max:1, type:'linear', extrapolate:true, round:PixelRatio.get()}}; var ToTheDown={ transformTranslate:{ from:{x:0,y:0,z:0}, to:{x:0,y:Dimensions.get('window').height,z:0}, min:0, max:1, type:'linear', extrapolate:true, round:PixelRatio.get()}, opacity:{ value:1.0, type:'constant'}, translateY:{ from:0, to:Dimensions.get('window').height, min:0, max:1, type:'linear', extrapolate:true, round:PixelRatio.get()}}; var FromTheRight={ opacity:{ value:1.0, type:'constant'}, transformTranslate:{ from:{x:Dimensions.get('window').width,y:0,z:0}, to:{x:0,y:0,z:0}, min:0, max:1, type:'linear', extrapolate:true, round:PixelRatio.get()}, translateX:{ from:Dimensions.get('window').width, to:0, min:0, max:1, type:'linear', extrapolate:true, round:PixelRatio.get()}, scaleX:{ value:1, type:'constant'}, scaleY:{ value:1, type:'constant'}}; var FromTheLeft=babelHelpers.extends({}, FromTheRight,{ transformTranslate:{ from:{x:-SCREEN_WIDTH,y:0,z:0}, to:{x:0,y:0,z:0}, min:0, max:1, type:'linear', extrapolate:true, round:PixelRatio.get()}, translateX:{ from:-SCREEN_WIDTH, to:0, min:0, max:1, type:'linear', extrapolate:true, round:PixelRatio.get()}}); var FromTheDown=babelHelpers.extends({}, FromTheRight,{ transformTranslate:{ from:{y:SCREEN_HEIGHT,x:0,z:0}, to:{x:0,y:0,z:0}, min:0, max:1, type:'linear', extrapolate:true, round:PixelRatio.get()}, translateY:{ from:SCREEN_HEIGHT, to:0, min:0, max:1, type:'linear', extrapolate:true, round:PixelRatio.get()}}); var FromTheTop=babelHelpers.extends({}, FromTheRight,{ transformTranslate:{ from:{y:-SCREEN_HEIGHT,x:0,z:0}, to:{x:0,y:0,z:0}, min:0, max:1, type:'linear', extrapolate:true, round:PixelRatio.get()}, translateY:{ from:-SCREEN_HEIGHT, to:0, min:0, max:1, type:'linear', extrapolate:true, round:PixelRatio.get()}}); var ToTheBack={ transformTranslate:{ from:{x:0,y:0,z:0}, to:{x:0,y:0,z:0}, min:0, max:1, type:'linear', extrapolate:true, round:PixelRatio.get()}, transformScale:{ from:{x:1,y:1,z:1}, to:{x:0.95,y:0.95,z:1}, min:0, max:1, type:'linear', extrapolate:true}, opacity:{ from:1, to:0.3, min:0, max:1, type:'linear', extrapolate:false, round:100}, scaleX:{ from:1, to:0.95, min:0, max:1, type:'linear', extrapolate:true}, scaleY:{ from:1, to:0.95, min:0, max:1, type:'linear', extrapolate:true}}; var FromTheFront={ opacity:{ value:1.0, type:'constant'}, transformTranslate:{ from:{x:0,y:Dimensions.get('window').height,z:0}, to:{x:0,y:0,z:0}, min:0, max:1, type:'linear', extrapolate:true, round:PixelRatio.get()}, translateY:{ from:Dimensions.get('window').height, to:0, min:0, max:1, type:'linear', extrapolate:true, round:PixelRatio.get()}, scaleX:{ value:1, type:'constant'}, scaleY:{ value:1, type:'constant'}}; var ToTheBackAndroid={ opacity:{ value:1, type:'constant'}}; var FromTheFrontAndroid={ opacity:{ from:0, to:1, min:0.5, max:1, type:'linear', extrapolate:false, round:100}, transformTranslate:{ from:{x:0,y:100,z:0}, to:{x:0,y:0,z:0}, min:0, max:1, type:'linear', extrapolate:true, round:PixelRatio.get()}, translateY:{ from:100, to:0, min:0, max:1, type:'linear', extrapolate:true, round:PixelRatio.get()}}; var BaseOverswipeConfig={ frictionConstant:1, frictionByDistance:1.5}; var BaseLeftToRightGesture={ isDetachable:false, gestureDetectMovement:2, notMoving:0.3, directionRatio:0.66, snapVelocity:2, edgeHitWidth:30, stillCompletionRatio:3/5, fullDistance:SCREEN_WIDTH, direction:'left-to-right'}; var BaseRightToLeftGesture=babelHelpers.extends({}, BaseLeftToRightGesture,{ direction:'right-to-left'}); var BaseDownUpGesture=babelHelpers.extends({}, BaseLeftToRightGesture,{ fullDistance:SCREEN_HEIGHT, direction:'down-to-up'}); var BaseUpDownGesture=babelHelpers.extends({}, BaseLeftToRightGesture,{ fullDistance:SCREEN_HEIGHT, direction:'up-to-down'}); var directionMapping={ ToTheStartIOS:ToTheLeftIOS, ToTheEndIOS:ToTheRightIOS, FadeToTheStart:FadeToTheLeft, FadeToTheEnd:FadeToTheRight, ToTheStart:ToTheLeft, ToTheEnd:ToTheRight, FromTheStart:FromTheLeft, FromTheEnd:FromTheRight, BaseStartToEndGesture:BaseLeftToRightGesture, BaseEndToStartGesture:BaseRightToLeftGesture}; if(IS_RTL){ directionMapping={ ToTheStartIOS:ToTheRightIOS, ToTheEndIOS:ToTheLeftIOS, FadeToTheStart:FadeToTheRight, FadeToTheEnd:FadeToTheLeft, ToTheStart:ToTheRight, ToTheEnd:ToTheLeft, FromTheStart:FromTheRight, FromTheEnd:FromTheLeft, BaseStartToEndGesture:BaseRightToLeftGesture, BaseEndToStartGesture:BaseLeftToRightGesture}; } var BaseConfig={ gestures:{ pop:directionMapping.BaseStartToEndGesture}, springFriction:26, springTension:200, defaultTransitionVelocity:1.5, animationInterpolators:{ into:buildStyleInterpolator(directionMapping.FromTheEnd), out:buildStyleInterpolator(directionMapping.FadeToTheStart)}}; var NavigatorSceneConfigs={ PushFromRight:babelHelpers.extends({}, BaseConfig,{ animationInterpolators:{ into:buildStyleInterpolator(directionMapping.FromTheEnd), out:buildStyleInterpolator(directionMapping.ToTheStartIOS)}}), FloatFromRight:babelHelpers.extends({}, BaseConfig), FloatFromLeft:babelHelpers.extends({}, BaseConfig,{ gestures:{ pop:directionMapping.BaseEndToStartGesture}, animationInterpolators:{ into:buildStyleInterpolator(directionMapping.FromTheStart), out:buildStyleInterpolator(directionMapping.FadeToTheEnd)}}), FloatFromBottom:babelHelpers.extends({}, BaseConfig,{ gestures:{ pop:babelHelpers.extends({}, directionMapping.BaseStartToEndGesture,{ edgeHitWidth:150, direction:'top-to-bottom', fullDistance:SCREEN_HEIGHT})}, animationInterpolators:{ into:buildStyleInterpolator(FromTheFront), out:buildStyleInterpolator(ToTheBack)}}), FloatFromBottomAndroid:babelHelpers.extends({}, BaseConfig,{ gestures:null, defaultTransitionVelocity:3, springFriction:20, animationInterpolators:{ into:buildStyleInterpolator(FromTheFrontAndroid), out:buildStyleInterpolator(ToTheBackAndroid)}}), FadeAndroid:babelHelpers.extends({}, BaseConfig,{ gestures:null, animationInterpolators:{ into:buildStyleInterpolator(FadeIn), out:buildStyleInterpolator(FadeOut)}}), HorizontalSwipeJump:babelHelpers.extends({}, BaseConfig,{ gestures:{ jumpBack:babelHelpers.extends({}, directionMapping.BaseStartToEndGesture,{ overswipe:BaseOverswipeConfig, edgeHitWidth:null, isDetachable:true}), jumpForward:babelHelpers.extends({}, directionMapping.BaseEndToStartGesture,{ overswipe:BaseOverswipeConfig, edgeHitWidth:null, isDetachable:true})}, animationInterpolators:{ into:buildStyleInterpolator(directionMapping.FromTheEnd), out:buildStyleInterpolator(directionMapping.ToTheStart)}}), HorizontalSwipeJumpFromRight:babelHelpers.extends({}, BaseConfig,{ gestures:{ jumpBack:babelHelpers.extends({}, directionMapping.BaseEndToStartGesture,{ overswipe:BaseOverswipeConfig, edgeHitWidth:null, isDetachable:true}), jumpForward:babelHelpers.extends({}, directionMapping.BaseStartToEndGesture,{ overswipe:BaseOverswipeConfig, edgeHitWidth:null, isDetachable:true}), pop:directionMapping.BaseEndToStartGesture}, animationInterpolators:{ into:buildStyleInterpolator(directionMapping.FromTheStart), out:buildStyleInterpolator(directionMapping.FadeToTheEnd)}}), VerticalUpSwipeJump:babelHelpers.extends({}, BaseConfig,{ gestures:{ jumpBack:babelHelpers.extends({}, BaseDownUpGesture,{ overswipe:BaseOverswipeConfig, edgeHitWidth:null, isDetachable:true}), jumpForward:babelHelpers.extends({}, BaseDownUpGesture,{ overswipe:BaseOverswipeConfig, edgeHitWidth:null, isDetachable:true})}, animationInterpolators:{ into:buildStyleInterpolator(FromTheDown), out:buildStyleInterpolator(ToTheUp)}}), VerticalDownSwipeJump:babelHelpers.extends({}, BaseConfig,{ gestures:{ jumpBack:babelHelpers.extends({}, BaseUpDownGesture,{ overswipe:BaseOverswipeConfig, edgeHitWidth:null, isDetachable:true}), jumpForward:babelHelpers.extends({}, BaseUpDownGesture,{ overswipe:BaseOverswipeConfig, edgeHitWidth:null, isDetachable:true})}, animationInterpolators:{ into:buildStyleInterpolator(FromTheTop), out:buildStyleInterpolator(ToTheDown)}})}; module.exports=NavigatorSceneConfigs; }, "NavigatorSceneConfigs"); __d(424 /* PanResponder */, function(global, require, module, exports) { 'use strict'; var InteractionManager=require(407 /* ./InteractionManager */); var TouchHistoryMath=require(425 /* react/lib/TouchHistoryMath */); var currentCentroidXOfTouchesChangedAfter=TouchHistoryMath.currentCentroidXOfTouchesChangedAfter; var currentCentroidYOfTouchesChangedAfter=TouchHistoryMath.currentCentroidYOfTouchesChangedAfter; var previousCentroidXOfTouchesChangedAfter=TouchHistoryMath.previousCentroidXOfTouchesChangedAfter; var previousCentroidYOfTouchesChangedAfter=TouchHistoryMath.previousCentroidYOfTouchesChangedAfter; var currentCentroidX=TouchHistoryMath.currentCentroidX; var currentCentroidY=TouchHistoryMath.currentCentroidY; var PanResponder={ _initializeGestureState:function _initializeGestureState(gestureState){ gestureState.moveX=0; gestureState.moveY=0; gestureState.x0=0; gestureState.y0=0; gestureState.dx=0; gestureState.dy=0; gestureState.vx=0; gestureState.vy=0; gestureState.numberActiveTouches=0; gestureState._accountsForMovesUpTo=0; }, _updateGestureStateOnMove:function _updateGestureStateOnMove(gestureState,touchHistory){ gestureState.numberActiveTouches=touchHistory.numberActiveTouches; gestureState.moveX=currentCentroidXOfTouchesChangedAfter(touchHistory,gestureState._accountsForMovesUpTo); gestureState.moveY=currentCentroidYOfTouchesChangedAfter(touchHistory,gestureState._accountsForMovesUpTo); var movedAfter=gestureState._accountsForMovesUpTo; var prevX=previousCentroidXOfTouchesChangedAfter(touchHistory,movedAfter); var x=currentCentroidXOfTouchesChangedAfter(touchHistory,movedAfter); var prevY=previousCentroidYOfTouchesChangedAfter(touchHistory,movedAfter); var y=currentCentroidYOfTouchesChangedAfter(touchHistory,movedAfter); var nextDX=gestureState.dx+(x-prevX); var nextDY=gestureState.dy+(y-prevY); var dt=touchHistory.mostRecentTimeStamp-gestureState._accountsForMovesUpTo; gestureState.vx=(nextDX-gestureState.dx)/dt; gestureState.vy=(nextDY-gestureState.dy)/dt; gestureState.dx=nextDX; gestureState.dy=nextDY; gestureState._accountsForMovesUpTo=touchHistory.mostRecentTimeStamp; }, create:function create(config){ var interactionState={ handle:null}; var gestureState={ stateID:Math.random()}; PanResponder._initializeGestureState(gestureState); var panHandlers={ onStartShouldSetResponder:function onStartShouldSetResponder(e){ return config.onStartShouldSetPanResponder===undefined? false: config.onStartShouldSetPanResponder(e,gestureState); }, onMoveShouldSetResponder:function onMoveShouldSetResponder(e){ return config.onMoveShouldSetPanResponder===undefined? false: config.onMoveShouldSetPanResponder(e,gestureState); }, onStartShouldSetResponderCapture:function onStartShouldSetResponderCapture(e){ if(e.nativeEvent.touches.length===1){ PanResponder._initializeGestureState(gestureState); } gestureState.numberActiveTouches=e.touchHistory.numberActiveTouches; return config.onStartShouldSetPanResponderCapture!==undefined? config.onStartShouldSetPanResponderCapture(e,gestureState): false; }, onMoveShouldSetResponderCapture:function onMoveShouldSetResponderCapture(e){ var touchHistory=e.touchHistory; if(gestureState._accountsForMovesUpTo===touchHistory.mostRecentTimeStamp){ return false; } PanResponder._updateGestureStateOnMove(gestureState,touchHistory); return config.onMoveShouldSetPanResponderCapture? config.onMoveShouldSetPanResponderCapture(e,gestureState): false; }, onResponderGrant:function onResponderGrant(e){ if(!interactionState.handle){ interactionState.handle=InteractionManager.createInteractionHandle(); } gestureState.x0=currentCentroidX(e.touchHistory); gestureState.y0=currentCentroidY(e.touchHistory); gestureState.dx=0; gestureState.dy=0; if(config.onPanResponderGrant){ config.onPanResponderGrant(e,gestureState); } return config.onShouldBlockNativeResponder===undefined? true: config.onShouldBlockNativeResponder(); }, onResponderReject:function onResponderReject(e){ clearInteractionHandle(interactionState,config.onPanResponderReject,e,gestureState); }, onResponderRelease:function onResponderRelease(e){ clearInteractionHandle(interactionState,config.onPanResponderRelease,e,gestureState); PanResponder._initializeGestureState(gestureState); }, onResponderStart:function onResponderStart(e){ var touchHistory=e.touchHistory; gestureState.numberActiveTouches=touchHistory.numberActiveTouches; if(config.onPanResponderStart){ config.onPanResponderStart(e,gestureState); } }, onResponderMove:function onResponderMove(e){ var touchHistory=e.touchHistory; if(gestureState._accountsForMovesUpTo===touchHistory.mostRecentTimeStamp){ return; } PanResponder._updateGestureStateOnMove(gestureState,touchHistory); if(config.onPanResponderMove){ config.onPanResponderMove(e,gestureState); } }, onResponderEnd:function onResponderEnd(e){ var touchHistory=e.touchHistory; gestureState.numberActiveTouches=touchHistory.numberActiveTouches; clearInteractionHandle(interactionState,config.onPanResponderEnd,e,gestureState); }, onResponderTerminate:function onResponderTerminate(e){ clearInteractionHandle(interactionState,config.onPanResponderTerminate,e,gestureState); PanResponder._initializeGestureState(gestureState); }, onResponderTerminationRequest:function onResponderTerminationRequest(e){ return config.onPanResponderTerminationRequest===undefined? true: config.onPanResponderTerminationRequest(e,gestureState); }}; return{ panHandlers:panHandlers, getInteractionHandle:function getInteractionHandle(){ return interactionState.handle; }}; }}; function clearInteractionHandle( interactionState, callback, event, gestureState) { if(interactionState.handle){ InteractionManager.clearInteractionHandle(interactionState.handle); interactionState.handle=null; } if(callback){ callback(event,gestureState); } } module.exports=PanResponder; }, "PanResponder"); __d(425 /* react/lib/TouchHistoryMath.js */, function(global, require, module, exports) { 'use strict'; var TouchHistoryMath={ centroidDimension:function centroidDimension(touchHistory,touchesChangedAfter,isXAxis,ofCurrent){ var touchBank=touchHistory.touchBank; var total=0; var count=0; var oneTouchData=touchHistory.numberActiveTouches===1?touchHistory.touchBank[touchHistory.indexOfSingleActiveTouch]:null; if(oneTouchData!==null){ if(oneTouchData.touchActive&&oneTouchData.currentTimeStamp>touchesChangedAfter){ total+=ofCurrent&&isXAxis?oneTouchData.currentPageX:ofCurrent&&!isXAxis?oneTouchData.currentPageY:!ofCurrent&&isXAxis?oneTouchData.previousPageX:oneTouchData.previousPageY; count=1; } }else{ for(var i=0;i=touchesChangedAfter){ var toAdd; if(ofCurrent&&isXAxis){ toAdd=touchTrack.currentPageX; }else if(ofCurrent&&!isXAxis){ toAdd=touchTrack.currentPageY; }else if(!ofCurrent&&isXAxis){ toAdd=touchTrack.previousPageX; }else{ toAdd=touchTrack.previousPageY; } total+=toAdd; count++; } } } return count>0?total/count:TouchHistoryMath.noCentroid; }, currentCentroidXOfTouchesChangedAfter:function currentCentroidXOfTouchesChangedAfter(touchHistory,touchesChangedAfter){ return TouchHistoryMath.centroidDimension(touchHistory,touchesChangedAfter,true, true); }, currentCentroidYOfTouchesChangedAfter:function currentCentroidYOfTouchesChangedAfter(touchHistory,touchesChangedAfter){ return TouchHistoryMath.centroidDimension(touchHistory,touchesChangedAfter,false, true); }, previousCentroidXOfTouchesChangedAfter:function previousCentroidXOfTouchesChangedAfter(touchHistory,touchesChangedAfter){ return TouchHistoryMath.centroidDimension(touchHistory,touchesChangedAfter,true, false); }, previousCentroidYOfTouchesChangedAfter:function previousCentroidYOfTouchesChangedAfter(touchHistory,touchesChangedAfter){ return TouchHistoryMath.centroidDimension(touchHistory,touchesChangedAfter,false, false); }, currentCentroidX:function currentCentroidX(touchHistory){ return TouchHistoryMath.centroidDimension(touchHistory,0, true, true); }, currentCentroidY:function currentCentroidY(touchHistory){ return TouchHistoryMath.centroidDimension(touchHistory,0, false, true); }, noCentroid:-1}; module.exports=TouchHistoryMath; }, "react/lib/TouchHistoryMath.js"); __d(426 /* clamp */, function(global, require, module, exports) { function clamp(min,value,max){ if(valuemax){ return max; } return value; } module.exports=clamp; }, "clamp"); __d(427 /* rebound/rebound.js */, function(global, require, module, exports) { (function(){ var rebound={}; var util=rebound.util={}; var concat=Array.prototype.concat; var slice=Array.prototype.slice; util.bind=function bind(func,context){ var args=slice.call(arguments,2); return function(){ func.apply(context,concat.call(args,slice.call(arguments))); }; }; util.extend=function extend(target,source){ for(var key in source){ if(source.hasOwnProperty(key)){ target[key]=source[key]; } } }; var SpringSystem=rebound.SpringSystem=function SpringSystem(looper){ this._springRegistry={}; this._activeSprings=[]; this.listeners=[]; this._idleSpringIndices=[]; this.looper=looper||new AnimationLooper(); this.looper.springSystem=this; }; util.extend(SpringSystem.prototype,{ _springRegistry:null, _isIdle:true, _lastTimeMillis:-1, _activeSprings:null, listeners:null, _idleSpringIndices:null, setLooper:function setLooper(looper){ this.looper=looper; looper.springSystem=this; }, createSpring:function createSpring(tension,friction){ var springConfig; if(tension===undefined||friction===undefined){ springConfig=SpringConfig.DEFAULT_ORIGAMI_SPRING_CONFIG; }else{ springConfig= SpringConfig.fromOrigamiTensionAndFriction(tension,friction); } return this.createSpringWithConfig(springConfig); }, createSpringWithBouncinessAndSpeed:function createSpringWithBouncinessAndSpeed(bounciness,speed){ var springConfig; if(bounciness===undefined||speed===undefined){ springConfig=SpringConfig.DEFAULT_ORIGAMI_SPRING_CONFIG; }else{ springConfig= SpringConfig.fromBouncinessAndSpeed(bounciness,speed); } return this.createSpringWithConfig(springConfig); }, createSpringWithConfig:function createSpringWithConfig(springConfig){ var spring=new Spring(this); this.registerSpring(spring); spring.setSpringConfig(springConfig); return spring; }, getIsIdle:function getIsIdle(){ return this._isIdle; }, getSpringById:function getSpringById(id){ return this._springRegistry[id]; }, getAllSprings:function getAllSprings(){ var vals=[]; for(var id in this._springRegistry){ if(this._springRegistry.hasOwnProperty(id)){ vals.push(this._springRegistry[id]); } } return vals; }, registerSpring:function registerSpring(spring){ this._springRegistry[spring.getId()]=spring; }, deregisterSpring:function deregisterSpring(spring){ removeFirst(this._activeSprings,spring); delete this._springRegistry[spring.getId()]; }, advance:function advance(time,deltaTime){ while(this._idleSpringIndices.length>0){this._idleSpringIndices.pop();} for(var i=0,len=this._activeSprings.length;i0){ var idx=this._idleSpringIndices.pop(); idx>=0&&this._activeSprings.splice(idx,1); } }, loop:function loop(currentTimeMillis){ var listener; if(this._lastTimeMillis===-1){ this._lastTimeMillis=currentTimeMillis-1; } var ellapsedMillis=currentTimeMillis-this._lastTimeMillis; this._lastTimeMillis=currentTimeMillis; var i=0,len=this.listeners.length; for(i=0;i0&&( startend|| start>end&&this.getCurrentValue()Spring.MAX_DELTA_TIME_SEC){ adjustedDeltaTime=Spring.MAX_DELTA_TIME_SEC; } this._timeAccumulator+=adjustedDeltaTime; var tension=this._springConfig.tension, friction=this._springConfig.friction, position=this._currentState.position, velocity=this._currentState.velocity, tempPosition=this._tempState.position, tempVelocity=this._tempState.velocity, aVelocity,aAcceleration, bVelocity,bAcceleration, cVelocity,cAcceleration, dVelocity,dAcceleration, dxdt,dvdt; while(this._timeAccumulator>=Spring.SOLVER_TIMESTEP_SEC){ this._timeAccumulator-=Spring.SOLVER_TIMESTEP_SEC; if(this._timeAccumulator0){ this._interpolate(this._timeAccumulator/Spring.SOLVER_TIMESTEP_SEC); } if(this.isAtRest()|| this._overshootClampingEnabled&&this.isOvershooting()){ if(this._springConfig.tension>0){ this._startValue=this._endValue; this._currentState.position=this._endValue; }else{ this._endValue=this._currentState.position; this._startValue=this._endValue; } this.setVelocity(0); isAtRest=true; } var notifyActivate=false; if(this._wasAtRest){ this._wasAtRest=false; notifyActivate=true; } var notifyAtRest=false; if(isAtRest){ this._wasAtRest=true; notifyAtRest=true; } this.notifyPositionUpdated(notifyActivate,notifyAtRest); }, notifyPositionUpdated:function notifyPositionUpdated(notifyActivate,notifyAtRest){ for(var i=0,len=this.listeners.length;i18&&tension<=44){ friction=this.b3Friction2(tension); }else{ friction=this.b3Friction3(tension); } return friction; }}); util.extend(SpringConfig,{ fromOrigamiTensionAndFriction:function fromOrigamiTensionAndFriction(tension,friction){ return new SpringConfig( OrigamiValueConverter.tensionFromOrigamiValue(tension), OrigamiValueConverter.frictionFromOrigamiValue(friction)); }, fromBouncinessAndSpeed:function fromBouncinessAndSpeed(bounciness,speed){ var bouncyConversion=new rebound.BouncyConversion(bounciness,speed); return this.fromOrigamiTensionAndFriction( bouncyConversion.bouncyTension, bouncyConversion.bouncyFriction); }, coastingConfigWithOrigamiFriction:function coastingConfigWithOrigamiFriction(friction){ return new SpringConfig( 0, OrigamiValueConverter.frictionFromOrigamiValue(friction)); }}); SpringConfig.DEFAULT_ORIGAMI_SPRING_CONFIG= SpringConfig.fromOrigamiTensionAndFriction(40,7); util.extend(SpringConfig.prototype,{friction:0,tension:0}); var colorCache={}; util.hexToRGB=function(color){ if(colorCache[color]){ return colorCache[color]; } color=color.replace('#',''); if(color.length===3){ color=color[0]+color[0]+color[1]+color[1]+color[2]+color[2]; } var parts=color.match(/.{2}/g); var ret={ r:parseInt(parts[0],16), g:parseInt(parts[1],16), b:parseInt(parts[2],16)}; colorCache[color]=ret; return ret; }; util.rgbToHex=function(r,g,b){ r=r.toString(16); g=g.toString(16); b=b.toString(16); r=r.length<2?'0'+r:r; g=g.length<2?'0'+g:g; b=b.length<2?'0'+b:b; return'#'+r+g+b; }; var MathUtil=rebound.MathUtil={ mapValueInRange:function mapValueInRange(value,fromLow,fromHigh,toLow,toHigh){ var fromRangeSize=fromHigh-fromLow; var toRangeSize=toHigh-toLow; var valueScale=(value-fromLow)/fromRangeSize; return toLow+valueScale*toRangeSize; }, interpolateColor: function interpolateColor(val,startColor,endColor,fromLow,fromHigh,asRGB){ fromLow=fromLow===undefined?0:fromLow; fromHigh=fromHigh===undefined?1:fromHigh; startColor=util.hexToRGB(startColor); endColor=util.hexToRGB(endColor); var r=Math.floor( util.mapValueInRange(val,fromLow,fromHigh,startColor.r,endColor.r)); var g=Math.floor( util.mapValueInRange(val,fromLow,fromHigh,startColor.g,endColor.g)); var b=Math.floor( util.mapValueInRange(val,fromLow,fromHigh,startColor.b,endColor.b)); if(asRGB){ return'rgb('+r+','+g+','+b+')'; }else{ return util.rgbToHex(r,g,b); } }, degreesToRadians:function degreesToRadians(deg){ return deg*Math.PI/180; }, radiansToDegrees:function radiansToDegrees(rad){ return rad*180/Math.PI; }}; util.extend(util,MathUtil); function removeFirst(array,item){ var idx=array.indexOf(item); idx!=-1&&array.splice(idx,1); } var _onFrame; if(typeof window!=='undefined'){ _onFrame=window.requestAnimationFrame|| window.webkitRequestAnimationFrame|| window.mozRequestAnimationFrame|| window.msRequestAnimationFrame|| window.oRequestAnimationFrame|| function(callback){ window.setTimeout(callback,1000/60); }; } if(!_onFrame&&typeof process!=='undefined'&&process.title==='node'){ _onFrame=setImmediate; } util.onFrame=function onFrame(func){ return _onFrame(func); }; if(typeof exports!='undefined'){ util.extend(exports,rebound); }else if(typeof window!='undefined'){ window.rebound=rebound; } })(); }, "rebound/rebound.js"); __d(428 /* NavigatorIOS */, function(global, require, module, exports) { 'use strict'; module.exports=require(131 /* UnimplementedView */); }, "NavigatorIOS"); __d(429 /* Picker */, function(global, require, module, exports) { 'use strict'; var ColorPropType=require(47 /* ColorPropType */); var PickerIOS=require(430 /* PickerIOS */); var PickerAndroid=require(431 /* PickerAndroid */); var Platform=require(59 /* Platform */); var React=require(103 /* React */); var StyleSheet=require(104 /* StyleSheet */); var StyleSheetPropType=require(129 /* StyleSheetPropType */); var TextStylePropTypes=require(114 /* TextStylePropTypes */); var UnimplementedView=require(131 /* UnimplementedView */); var View=require(116 /* View */); var ViewStylePropTypes=require(115 /* ViewStylePropTypes */); var itemStylePropType=StyleSheetPropType(TextStylePropTypes); var pickerStyleType=StyleSheetPropType(babelHelpers.extends({}, ViewStylePropTypes,{ color:ColorPropType})); var MODE_DIALOG='dialog'; var MODE_DROPDOWN='dropdown'; var Picker=React.createClass({displayName:'Picker', statics:{ MODE_DIALOG:MODE_DIALOG, MODE_DROPDOWN:MODE_DROPDOWN}, getDefaultProps:function getDefaultProps(){ return{ mode:MODE_DIALOG}; }, propTypes:babelHelpers.extends({}, View.propTypes,{ style:pickerStyleType, selectedValue:React.PropTypes.any, onValueChange:React.PropTypes.func, enabled:React.PropTypes.bool, mode:React.PropTypes.oneOf(['dialog','dropdown']), itemStyle:itemStylePropType, prompt:React.PropTypes.string, testID:React.PropTypes.string}), render:function render(){ if(Platform.OS==='ios'){ return React.createElement(PickerIOS,this.props,this.props.children); }else if(Platform.OS==='android'){ return React.createElement(PickerAndroid,this.props,this.props.children); }else{ return React.createElement(UnimplementedView,null); } }}); Picker.Item=React.createClass({displayName:'Item', propTypes:{ label:React.PropTypes.string.isRequired, value:React.PropTypes.any, color:ColorPropType, testID:React.PropTypes.string}, render:function render(){ throw null; }}); module.exports=Picker; }, "Picker"); __d(430 /* PickerIOS */, function(global, require, module, exports) { 'use strict'; module.exports=require(131 /* UnimplementedView */); }, "PickerIOS"); __d(431 /* PickerAndroid */, function(global, require, module, exports) { 'use strict'; var ColorPropType=require(47 /* ColorPropType */); var React=require(103 /* React */); var ReactChildren=require(15 /* react/lib/ReactChildren */); var ReactPropTypes=require(40 /* react/lib/ReactPropTypes */); var StyleSheet=require(104 /* StyleSheet */); var StyleSheetPropType=require(129 /* StyleSheetPropType */); var View=require(116 /* View */); var ViewStylePropTypes=require(115 /* ViewStylePropTypes */); var processColor=require(124 /* processColor */); var requireNativeComponent=require(130 /* requireNativeComponent */); var REF_PICKER='picker'; var MODE_DIALOG='dialog'; var MODE_DROPDOWN='dropdown'; var pickerStyleType=StyleSheetPropType(babelHelpers.extends({}, ViewStylePropTypes,{ color:ColorPropType})); var PickerAndroid=React.createClass({displayName:'PickerAndroid', propTypes:babelHelpers.extends({}, View.propTypes,{ style:pickerStyleType, selectedValue:React.PropTypes.any, enabled:ReactPropTypes.bool, mode:ReactPropTypes.oneOf(['dialog','dropdown']), onValueChange:ReactPropTypes.func, prompt:ReactPropTypes.string, testID:ReactPropTypes.string}), getInitialState:function getInitialState(){ var state=this._stateFromProps(this.props); return babelHelpers.extends({}, state,{ initialSelectedIndex:state.selectedIndex}); }, componentWillReceiveProps:function componentWillReceiveProps(nextProps){ this.setState(this._stateFromProps(nextProps)); }, _stateFromProps:function _stateFromProps(props){ var selectedIndex=0; var items=ReactChildren.map(props.children,function(child,index){ if(child.props.value===props.selectedValue){ selectedIndex=index; } var childProps={ value:child.props.value, label:child.props.label}; if(child.props.color){ childProps.color=processColor(child.props.color); } return childProps; }); return{selectedIndex:selectedIndex,items:items}; }, render:function render(){ var Picker=this.props.mode===MODE_DROPDOWN?DropdownPicker:DialogPicker; var nativeProps={ enabled:this.props.enabled, items:this.state.items, mode:this.props.mode, onSelect:this._onChange, prompt:this.props.prompt, selected:this.state.initialSelectedIndex, testID:this.props.testID, style:[styles.pickerAndroid,this.props.style]}; return React.createElement(Picker,babelHelpers.extends({ref:REF_PICKER},nativeProps)); }, _onChange:function _onChange(event){ if(this.props.onValueChange){ var position=event.nativeEvent.position; if(position>=0){ var value=this.props.children[position].props.value; this.props.onValueChange(value,position); }else{ this.props.onValueChange(null,position); } } this._lastNativePosition=event.nativeEvent.position; this.forceUpdate(); }, componentDidMount:function componentDidMount(){ this._lastNativePosition=this.state.initialSelectedIndex; }, componentDidUpdate:function componentDidUpdate(){ if(this.refs[REF_PICKER]&&this.state.selectedIndex!==this._lastNativePosition){ this.refs[REF_PICKER].setNativeProps({selected:this.state.selectedIndex}); this._lastNativePosition=this.state.selectedIndex; } }}); var styles=StyleSheet.create({ pickerAndroid:{ height:50}}); var cfg={ nativeOnly:{ items:true, selected:true}}; var DropdownPicker=requireNativeComponent('AndroidDropdownPicker',PickerAndroid,cfg); var DialogPicker=requireNativeComponent('AndroidDialogPicker',PickerAndroid,cfg); module.exports=PickerAndroid; }, "PickerAndroid"); __d(432 /* ProgressBarAndroid */, function(global, require, module, exports) { 'use strict'; var NativeMethodsMixin=require(49 /* react/lib/NativeMethodsMixin */); var React=require(103 /* React */); var ReactPropTypes=require(40 /* react/lib/ReactPropTypes */); var View=require(116 /* View */); var ColorPropType=require(47 /* ColorPropType */); var requireNativeComponent=require(130 /* requireNativeComponent */); var STYLE_ATTRIBUTES=[ 'Horizontal', 'Normal', 'Small', 'Large', 'Inverse', 'SmallInverse', 'LargeInverse']; var indeterminateType=function indeterminateType(props,propName,componentName){ var checker=function checker(){ var indeterminate=props[propName]; var styleAttr=props.styleAttr; if(!indeterminate&&styleAttr!=='Horizontal'){ return new Error('indeterminate=false is only valid for styleAttr=Horizontal'); } }; return ReactPropTypes.bool(props,propName,componentName)||checker(); }; var ProgressBarAndroid=React.createClass({displayName:'ProgressBarAndroid', propTypes:babelHelpers.extends({}, View.propTypes,{ styleAttr:ReactPropTypes.oneOf(STYLE_ATTRIBUTES), indeterminate:indeterminateType, progress:ReactPropTypes.number, color:ColorPropType, testID:ReactPropTypes.string}), getDefaultProps:function getDefaultProps(){ return{ styleAttr:'Normal', indeterminate:true}; }, mixins:[NativeMethodsMixin], componentDidMount:function componentDidMount(){ if(this.props.indeterminate&&this.props.styleAttr!=='Horizontal'){ console.warn( 'Circular indeterminate `ProgressBarAndroid`'+ 'is deprecated. Use `ActivityIndicator` instead.'); } }, render:function render(){ return React.createElement(AndroidProgressBar,this.props); }}); var AndroidProgressBar=requireNativeComponent( 'AndroidProgressBar', ProgressBarAndroid, {nativeOnly:{animating:true}}); module.exports=ProgressBarAndroid; }, "ProgressBarAndroid"); __d(433 /* ProgressViewIOS */, function(global, require, module, exports) { 'use strict'; var React=require(103 /* React */); var StyleSheet=require(104 /* StyleSheet */); var Text=require(181 /* Text */); var View=require(116 /* View */); var DummyProgressViewIOS=React.createClass({displayName:'DummyProgressViewIOS', render:function render(){ return( React.createElement(View,{style:[styles.dummy,this.props.style]}, React.createElement(Text,{style:styles.text},'ProgressViewIOS is not supported on this platform!'))); }}); var styles=StyleSheet.create({ dummy:{ width:120, height:20, backgroundColor:'#ffbcbc', borderWidth:1, borderColor:'red', alignItems:'center', justifyContent:'center'}, text:{ color:'#333333', margin:5, fontSize:10}}); module.exports=DummyProgressViewIOS; }, "ProgressViewIOS"); __d(434 /* SegmentedControlIOS */, function(global, require, module, exports) { 'use strict'; var React=require(103 /* React */); var StyleSheet=require(104 /* StyleSheet */); var Text=require(181 /* Text */); var View=require(116 /* View */); var DummySegmentedControlIOS=React.createClass({displayName:'DummySegmentedControlIOS', render:function render(){ return( React.createElement(View,{style:[styles.dummy,this.props.style]}, React.createElement(Text,{style:styles.text},'SegmentedControlIOS is not supported on this platform!'))); }}); var styles=StyleSheet.create({ dummy:{ width:120, height:50, backgroundColor:'#ffbcbc', borderWidth:1, borderColor:'red', alignItems:'center', justifyContent:'center'}, text:{ color:'#333333', margin:5, fontSize:10}}); module.exports=DummySegmentedControlIOS; }, "SegmentedControlIOS"); __d(435 /* Slider */, function(global, require, module, exports) { 'use strict'; var Image=require(385 /* Image */); var NativeMethodsMixin=require(49 /* react/lib/NativeMethodsMixin */); var Platform=require(59 /* Platform */); var PropTypes=require(40 /* react/lib/ReactPropTypes */); var React=require(103 /* React */); var StyleSheet=require(104 /* StyleSheet */); var View=require(116 /* View */); var requireNativeComponent=require(130 /* requireNativeComponent */); var Slider=React.createClass({displayName:'Slider', mixins:[NativeMethodsMixin], propTypes:babelHelpers.extends({}, View.propTypes,{ style:View.propTypes.style, value:PropTypes.number, step:PropTypes.number, minimumValue:PropTypes.number, maximumValue:PropTypes.number, minimumTrackTintColor:PropTypes.string, maximumTrackTintColor:PropTypes.string, disabled:PropTypes.bool, trackImage:Image.propTypes.source, minimumTrackImage:Image.propTypes.source, maximumTrackImage:Image.propTypes.source, thumbImage:Image.propTypes.source, onValueChange:PropTypes.func, onSlidingComplete:PropTypes.func, testID:PropTypes.string}), getDefaultProps:function getDefaultProps(){ return{ disabled:false, value:0, minimumValue:0, maximumValue:1, step:0}; }, render:function render(){var _props= this.props;var style=_props.style;var onValueChange=_props.onValueChange;var onSlidingComplete=_props.onSlidingComplete;var props=babelHelpers.objectWithoutProperties(_props,['style','onValueChange','onSlidingComplete']); props.style=[styles.slider,style]; props.onValueChange=onValueChange&&function(event){ var userEvent=true; if(Platform.OS==='android'){ userEvent=event.nativeEvent.fromUser; } onValueChange&&userEvent&&onValueChange(event.nativeEvent.value); }; props.onChange=props.onValueChange; props.onSlidingComplete=onSlidingComplete&&function(event){ onSlidingComplete&&onSlidingComplete(event.nativeEvent.value); }; return React.createElement(RCTSlider,babelHelpers.extends({}, props,{ enabled:!this.props.disabled, onStartShouldSetResponder:function onStartShouldSetResponder(){return true;}, onResponderTerminationRequest:function onResponderTerminationRequest(){return false;}})); }}); var styles=void 0; if(Platform.OS==='ios'){ styles=StyleSheet.create({ slider:{ height:40}}); }else{ styles=StyleSheet.create({ slider:{}}); } var options={}; if(Platform.OS==='android'){ options={ nativeOnly:{ enabled:true}}; } var RCTSlider=requireNativeComponent('RCTSlider',Slider,options); module.exports=Slider; }, "Slider"); __d(436 /* SliderIOS */, function(global, require, module, exports) { 'use strict'; module.exports=require(131 /* UnimplementedView */); }, "SliderIOS"); __d(437 /* SnapshotViewIOS */, function(global, require, module, exports) { 'use strict'; module.exports=require(131 /* UnimplementedView */); }, "SnapshotViewIOS"); __d(438 /* Switch */, function(global, require, module, exports) { 'use strict'; var ColorPropType=require(47 /* ColorPropType */); var NativeMethodsMixin=require(49 /* react/lib/NativeMethodsMixin */); var Platform=require(59 /* Platform */); var React=require(103 /* React */); var StyleSheet=require(104 /* StyleSheet */); var View=require(116 /* View */); var requireNativeComponent=require(130 /* requireNativeComponent */); var Switch=React.createClass({displayName:'Switch', propTypes:babelHelpers.extends({}, View.propTypes,{ value:React.PropTypes.bool, disabled:React.PropTypes.bool, onValueChange:React.PropTypes.func, testID:React.PropTypes.string, tintColor:ColorPropType, onTintColor:ColorPropType, thumbTintColor:ColorPropType}), getDefaultProps:function getDefaultProps(){ return{ value:false, disabled:false}; }, mixins:[NativeMethodsMixin], _rctSwitch:{}, _onChange:function _onChange(event){ if(Platform.OS==='android'){ this._rctSwitch.setNativeProps({on:this.props.value}); }else{ this._rctSwitch.setNativeProps({value:this.props.value}); } this.props.onChange&&this.props.onChange(event); this.props.onValueChange&&this.props.onValueChange(event.nativeEvent.value); }, render:function render(){var _this=this; var props=babelHelpers.extends({},this.props); props.onStartShouldSetResponder=function(){return true;}; props.onResponderTerminationRequest=function(){return false;}; if(Platform.OS==='android'){ props.enabled=!this.props.disabled; props.on=this.props.value; props.style=this.props.style; }else if(Platform.OS==='ios'){ props.style=[styles.rctSwitchIOS,this.props.style]; } return( React.createElement(RCTSwitch,babelHelpers.extends({}, props,{ ref:function ref(_ref){_this._rctSwitch=_ref;}, onChange:this._onChange}))); }}); var styles=StyleSheet.create({ rctSwitchIOS:{ height:31, width:51}}); if(Platform.OS==='android'){ var RCTSwitch=requireNativeComponent('AndroidSwitch',Switch,{ nativeOnly:{onChange:true,on:true,enabled:true}}); }else{ var RCTSwitch=requireNativeComponent('RCTSwitch',Switch,{ nativeOnly:{onChange:true}}); } module.exports=Switch; }, "Switch"); __d(439 /* RecyclerViewBackedScrollView */, function(global, require, module, exports) { 'use strict'; var React=require(103 /* React */); var ScrollResponder=require(397 /* ScrollResponder */); var ScrollView=require(395 /* ScrollView */); var View=require(116 /* View */); var StyleSheet=require(104 /* StyleSheet */); var requireNativeComponent=require(130 /* requireNativeComponent */); var INNERVIEW='InnerView'; var RecyclerViewBackedScrollView=React.createClass({displayName:'RecyclerViewBackedScrollView', propTypes:babelHelpers.extends({}, ScrollView.propTypes), mixins:[ScrollResponder.Mixin], getInitialState:function getInitialState(){ return this.scrollResponderMixinGetInitialState(); }, getScrollResponder:function getScrollResponder(){ return this; }, setNativeProps:function setNativeProps(props){ this.refs[INNERVIEW].setNativeProps(props); }, _handleContentSizeChange:function _handleContentSizeChange(event){var _event$nativeEvent= event.nativeEvent;var width=_event$nativeEvent.width;var height=_event$nativeEvent.height; this.props.onContentSizeChange(width,height); }, render:function render(){ var recyclerProps=babelHelpers.extends({}, this.props,{ onTouchStart:this.scrollResponderHandleTouchStart, onTouchMove:this.scrollResponderHandleTouchMove, onTouchEnd:this.scrollResponderHandleTouchEnd, onScrollBeginDrag:this.scrollResponderHandleScrollBeginDrag, onScrollEndDrag:this.scrollResponderHandleScrollEndDrag, onMomentumScrollBegin:this.scrollResponderHandleMomentumScrollBegin, onMomentumScrollEnd:this.scrollResponderHandleMomentumScrollEnd, onStartShouldSetResponder:this.scrollResponderHandleStartShouldSetResponder, onStartShouldSetResponderCapture:this.scrollResponderHandleStartShouldSetResponderCapture, onScrollShouldSetResponder:this.scrollResponderHandleScrollShouldSetResponder, onResponderGrant:this.scrollResponderHandleResponderGrant, onResponderRelease:this.scrollResponderHandleResponderRelease, onResponderReject:this.scrollResponderHandleResponderReject, onScroll:this.scrollResponderHandleScroll, ref:INNERVIEW}); if(this.props.onContentSizeChange){ recyclerProps.onContentSizeChange=this._handleContentSizeChange; } var wrappedChildren=React.Children.map(this.props.children,function(child){ if(!child){ return null; } return( React.createElement(View,{ collapsable:false, style:styles.absolute}, child)); }); var refreshControl=this.props.refreshControl; if(refreshControl){ return React.cloneElement( refreshControl, {style:[styles.base,this.props.style]}, React.createElement(NativeAndroidRecyclerView,babelHelpers.extends({},recyclerProps,{style:styles.base}), wrappedChildren)); } return( React.createElement(NativeAndroidRecyclerView,babelHelpers.extends({},recyclerProps,{style:[styles.base,this.props.style]}), wrappedChildren)); }}); var styles=StyleSheet.create({ absolute:{ position:'absolute', top:0, left:0, right:0}, base:{ flex:1}}); var NativeAndroidRecyclerView=requireNativeComponent( 'AndroidRecyclerViewBackedScrollView', RecyclerViewBackedScrollView); module.exports=RecyclerViewBackedScrollView; }, "RecyclerViewBackedScrollView"); __d(440 /* RefreshControl */, function(global, require, module, exports) { 'use strict'; var ColorPropType=require(47 /* ColorPropType */); var NativeMethodsMixin=require(49 /* react/lib/NativeMethodsMixin */); var Platform=require(59 /* Platform */); var React=require(103 /* React */); var View=require(116 /* View */); var requireNativeComponent=require(130 /* requireNativeComponent */); if(Platform.OS==='android'){ var RefreshLayoutConsts=require(99 /* UIManager */).AndroidSwipeRefreshLayout.Constants; }else{ var RefreshLayoutConsts={SIZE:{}}; } var RefreshControl=React.createClass({displayName:'RefreshControl', statics:{ SIZE:RefreshLayoutConsts.SIZE}, mixins:[NativeMethodsMixin], propTypes:babelHelpers.extends({}, View.propTypes,{ onRefresh:React.PropTypes.func, refreshing:React.PropTypes.bool.isRequired, tintColor:ColorPropType, titleColor:ColorPropType, title:React.PropTypes.string, enabled:React.PropTypes.bool, colors:React.PropTypes.arrayOf(ColorPropType), progressBackgroundColor:ColorPropType, size:React.PropTypes.oneOf([RefreshLayoutConsts.SIZE.DEFAULT,RefreshLayoutConsts.SIZE.LARGE]), progressViewOffset:React.PropTypes.number}), _nativeRef:null, _lastNativeRefreshing:false, componentDidMount:function componentDidMount(){ this._lastNativeRefreshing=this.props.refreshing; }, componentDidUpdate:function componentDidUpdate(prevProps){ if(this.props.refreshing!==prevProps.refreshing){ this._lastNativeRefreshing=this.props.refreshing; }else if(this.props.refreshing!==this._lastNativeRefreshing){ this._nativeRef.setNativeProps({refreshing:this.props.refreshing}); this._lastNativeRefreshing=this.props.refreshing; } }, render:function render(){var _this=this; return( React.createElement(NativeRefreshControl,babelHelpers.extends({}, this.props,{ ref:function ref(_ref){return _this._nativeRef=_ref;}, onRefresh:this._onRefresh}))); }, _onRefresh:function _onRefresh(){ this._lastNativeRefreshing=true; this.props.onRefresh&&this.props.onRefresh(); this.forceUpdate(); }}); if(Platform.OS==='ios'){ var NativeRefreshControl=requireNativeComponent( 'RCTRefreshControl', RefreshControl); }else if(Platform.OS==='android'){ var NativeRefreshControl=requireNativeComponent( 'AndroidSwipeRefreshLayout', RefreshControl); } module.exports=RefreshControl; }, "RefreshControl"); __d(441 /* SwipeableListView */, function(global, require, module, exports) { 'use strict'; var ListView=require(392 /* ListView */); var React=require(103 /* React */); var SwipeableListViewDataSource=require(442 /* SwipeableListViewDataSource */); var SwipeableRow=require(443 /* SwipeableRow */);var PropTypes=React.PropTypes; var SwipeableListView=React.createClass({displayName:'SwipeableListView', statics:{ getNewDataSource:function getNewDataSource(){ return new SwipeableListViewDataSource({ getRowData:function getRowData(data,sectionID,rowID){return data[sectionID][rowID];}, getSectionHeaderData:function getSectionHeaderData(data,sectionID){return data[sectionID];}, sectionHeaderHasChanged:function sectionHeaderHasChanged(s1,s2){return s1!==s2;}, rowHasChanged:function rowHasChanged(row1,row2){return row1!==row2;}}); }}, _listViewRef:null, _shouldBounceFirstRowOnMount:false, propTypes:{ bounceFirstRowOnMount:PropTypes.bool.isRequired, dataSource:PropTypes.instanceOf(SwipeableListViewDataSource).isRequired, maxSwipeDistance:PropTypes.number.isRequired, renderRow:PropTypes.func.isRequired, renderQuickActions:PropTypes.func.isRequired}, getDefaultProps:function getDefaultProps(){ return{ bounceFirstRowOnMount:false, renderQuickActions:function renderQuickActions(){return null;}}; }, getInitialState:function getInitialState(){ return{ dataSource:this.props.dataSource}; }, componentWillMount:function componentWillMount(){ this._shouldBounceFirstRowOnMount=this.props.bounceFirstRowOnMount; }, componentWillReceiveProps:function componentWillReceiveProps(nextProps){ if( this.state.dataSource.getDataSource()!==nextProps.dataSource.getDataSource()) { this.setState({ dataSource:nextProps.dataSource}); } }, render:function render(){var _this=this; return( React.createElement(ListView,babelHelpers.extends({}, this.props,{ ref:function ref(_ref){ _this._listViewRef=_ref; }, dataSource:this.state.dataSource.getDataSource(), renderRow:this._renderRow, scrollEnabled:this.state.scrollEnabled}))); }, _setListViewScrollable:function _setListViewScrollable(value){ if(this._listViewRef&&this._listViewRef.setNativeProps){ this._listViewRef.setNativeProps({ scrollEnabled:value}); } }, getScrollResponder:function getScrollResponder(){ if(this._listViewRef&&this._listViewRef.getScrollResponder){ return this._listViewRef.getScrollResponder(); } }, _renderRow:function _renderRow( rowData, sectionID, rowID) {var _this2=this; var slideoutView=this.props.renderQuickActions(rowData,sectionID,rowID); if(!slideoutView){ return this.props.renderRow(rowData,sectionID,rowID); } var shouldBounceOnMount=false; if(this._shouldBounceFirstRowOnMount){ this._shouldBounceFirstRowOnMount=false; shouldBounceOnMount=rowID===this.props.dataSource.getFirstRowID(); } return( React.createElement(SwipeableRow,{ slideoutView:slideoutView, isOpen:rowData.id===this.props.dataSource.getOpenRowID(), maxSwipeDistance:this.props.maxSwipeDistance, key:rowID, onOpen:function onOpen(){return _this2._onOpen(rowData.id);}, onSwipeEnd:function onSwipeEnd(){return _this2._setListViewScrollable(true);}, onSwipeStart:function onSwipeStart(){return _this2._setListViewScrollable(false);}, shouldBounceOnMount:shouldBounceOnMount}, this.props.renderRow(rowData,sectionID,rowID))); }, _onOpen:function _onOpen(rowID){ this.setState({ dataSource:this.state.dataSource.setOpenRowID(rowID)}); }}); module.exports=SwipeableListView; }, "SwipeableListView"); __d(442 /* SwipeableListViewDataSource */, function(global, require, module, exports) { 'use strict'; var ListViewDataSource=require(393 /* ListViewDataSource */);var SwipeableListViewDataSource=function(){ function SwipeableListViewDataSource(params){var _this=this;babelHelpers.classCallCheck(this,SwipeableListViewDataSource); this._dataSource=new ListViewDataSource({ getRowData:params.getRowData, getSectionHeaderData:params.getSectionHeaderData, rowHasChanged:function rowHasChanged(row1,row2){ return( row1.id!==_this._previousOpenRowID&&row2.id===_this._openRowID|| row1.id===_this._previousOpenRowID&&row2.id!==_this._openRowID|| params.rowHasChanged(row1,row2)); }, sectionHeaderHasChanged:params.sectionHeaderHasChanged}); }babelHelpers.createClass(SwipeableListViewDataSource,[{key:'cloneWithRowsAndSections',value:function cloneWithRowsAndSections( dataBlob, sectionIdentities, rowIdentities) { this._dataSource=this._dataSource.cloneWithRowsAndSections( dataBlob, sectionIdentities, rowIdentities); this._dataBlob=dataBlob; this.rowIdentities=this._dataSource.rowIdentities; this.sectionIdentities=this._dataSource.sectionIdentities; return this; }},{key:'getDataSource',value:function getDataSource() { return this._dataSource; }},{key:'getOpenRowID',value:function getOpenRowID() { return this._openRowID; }},{key:'getFirstRowID',value:function getFirstRowID() { if(this.rowIdentities){ return this.rowIdentities[0]&&this.rowIdentities[0][0]; } return Object.keys(this._dataBlob)[0]; }},{key:'setOpenRowID',value:function setOpenRowID( rowID){ this._previousOpenRowID=this._openRowID; this._openRowID=rowID; this._dataSource=this._dataSource.cloneWithRowsAndSections( this._dataBlob, this.sectionIdentities, this.rowIdentities); return this; }}]);return SwipeableListViewDataSource;}(); module.exports=SwipeableListViewDataSource; }, "SwipeableListViewDataSource"); __d(443 /* SwipeableRow */, function(global, require, module, exports) { 'use strict'; var Animated=require(444 /* Animated */); var PanResponder=require(424 /* PanResponder */); var I18nManager=require(404 /* I18nManager */); var React=require(103 /* React */); var StyleSheet=require(104 /* StyleSheet */); var TimerMixin=require(391 /* react-timer-mixin */); var View=require(116 /* View */);var PropTypes=React.PropTypes; var emptyFunction=require(45 /* fbjs/lib/emptyFunction */); var IS_RTL=I18nManager.isRTL; var CLOSED_LEFT_POSITION=0; var HORIZONTAL_SWIPE_DISTANCE_THRESHOLD=10; var HORIZONTAL_FULL_SWIPE_SPEED_THRESHOLD=0.3; var SLOW_SPEED_SWIPE_FACTOR=4; var SWIPE_DURATION=200; var ON_MOUNT_BOUNCE_DELAY=700; var ON_MOUNT_BOUNCE_DURATION=400; var RIGHT_SWIPE_BOUNCE_BACK_DISTANCE=50; var RIGHT_SWIPE_BOUNCE_BACK_DURATION=400; var RIGHT_SWIPE_THRESHOLD=30*SLOW_SPEED_SWIPE_FACTOR; var SwipeableRow=React.createClass({displayName:'SwipeableRow', _panResponder:{}, _previousLeft:CLOSED_LEFT_POSITION, mixins:[TimerMixin], propTypes:{ children:PropTypes.any, isOpen:PropTypes.bool, maxSwipeDistance:PropTypes.number.isRequired, onOpen:PropTypes.func.isRequired, onSwipeEnd:PropTypes.func.isRequired, onSwipeStart:PropTypes.func.isRequired, shouldBounceOnMount:PropTypes.bool, slideoutView:PropTypes.node.isRequired, swipeThreshold:PropTypes.number.isRequired}, getInitialState:function getInitialState(){ return{ currentLeft:new Animated.Value(this._previousLeft), isSwipeableViewRendered:false, rowHeight:null}; }, getDefaultProps:function getDefaultProps(){ return{ isOpen:false, maxSwipeDistance:0, onOpen:emptyFunction, onSwipeEnd:emptyFunction, onSwipeStart:emptyFunction, swipeThreshold:30}; }, componentWillMount:function componentWillMount(){ this._panResponder=PanResponder.create({ onMoveShouldSetPanResponderCapture:this._handleMoveShouldSetPanResponderCapture, onPanResponderGrant:this._handlePanResponderGrant, onPanResponderMove:this._handlePanResponderMove, onPanResponderRelease:this._handlePanResponderEnd, onPanResponderTerminationRequest:this._onPanResponderTerminationRequest, onPanResponderTerminate:this._handlePanResponderEnd}); }, componentDidMount:function componentDidMount(){var _this=this; if(this.props.shouldBounceOnMount){ this.setTimeout(function(){ _this._animateBounceBack(ON_MOUNT_BOUNCE_DURATION); },ON_MOUNT_BOUNCE_DELAY); } }, componentWillReceiveProps:function componentWillReceiveProps(nextProps){ if(this.props.isOpen&&!nextProps.isOpen){ this._animateToClosedPosition(); } }, shouldComponentUpdate:function shouldComponentUpdate(nextProps,nextState){ if(this.props.shouldBounceOnMount&&!nextProps.shouldBounceOnMount){ return false; } return true; }, render:function render(){ var slideOutView=void 0; if(this.state.isSwipeableViewRendered){ slideOutView= React.createElement(View,{style:[ styles.slideOutContainer, {height:this.state.rowHeight}]}, this.props.slideoutView); } var swipeableView= React.createElement(Animated.View,{ onLayout:this._onSwipeableViewLayout, style:[ styles.swipeableContainer, { transform:[{translateX:this.state.currentLeft}]}]}, this.props.children); return( React.createElement(View, this._panResponder.panHandlers, slideOutView, swipeableView)); }, _onSwipeableViewLayout:function _onSwipeableViewLayout(event){ this.setState({ isSwipeableViewRendered:true, rowHeight:event.nativeEvent.layout.height}); }, _handleMoveShouldSetPanResponderCapture:function _handleMoveShouldSetPanResponderCapture( event, gestureState) { return gestureState.dy<10&&this._isValidSwipe(gestureState); }, _handlePanResponderGrant:function _handlePanResponderGrant(event,gestureState){ }, _handlePanResponderMove:function _handlePanResponderMove(event,gestureState){ if(this._isSwipingExcessivelyRightFromClosedPosition(gestureState)){ return; } this.props.onSwipeStart(); if(this._isSwipingRightFromClosed(gestureState)){ this._swipeSlowSpeed(gestureState); }else{ this._swipeFullSpeed(gestureState); } }, _isSwipingRightFromClosed:function _isSwipingRightFromClosed(gestureState){ var gestureStateDx=IS_RTL?-gestureState.dx:gestureState.dx; return this._previousLeft===CLOSED_LEFT_POSITION&&gestureStateDx>0; }, _swipeFullSpeed:function _swipeFullSpeed(gestureState){ this.state.currentLeft.setValue(this._previousLeft+gestureState.dx); }, _swipeSlowSpeed:function _swipeSlowSpeed(gestureState){ this.state.currentLeft.setValue( this._previousLeft+gestureState.dx/SLOW_SPEED_SWIPE_FACTOR); }, _isSwipingExcessivelyRightFromClosedPosition:function _isSwipingExcessivelyRightFromClosedPosition(gestureState){ var gestureStateDx=IS_RTL?-gestureState.dx:gestureState.dx; return( this._isSwipingRightFromClosed(gestureState)&& gestureStateDx>RIGHT_SWIPE_THRESHOLD); }, _onPanResponderTerminationRequest:function _onPanResponderTerminationRequest( event, gestureState) { return false; }, _animateTo:function _animateTo( toValue) {var _this2=this;var duration=arguments.length<=1||arguments[1]===undefined?SWIPE_DURATION:arguments[1];var callback=arguments.length<=2||arguments[2]===undefined?emptyFunction:arguments[2]; Animated.timing( this.state.currentLeft, { duration:duration, toValue:toValue}). start(function(){ _this2._previousLeft=toValue; callback(); }); }, _animateToOpenPosition:function _animateToOpenPosition(){ var maxSwipeDistance=IS_RTL?-this.props.maxSwipeDistance:this.props.maxSwipeDistance; this._animateTo(-maxSwipeDistance); }, _animateToClosedPosition:function _animateToClosedPosition(){var duration=arguments.length<=0||arguments[0]===undefined?SWIPE_DURATION:arguments[0]; this._animateTo(CLOSED_LEFT_POSITION,duration); }, _animateToClosedPositionDuringBounce:function _animateToClosedPositionDuringBounce(){ this._animateToClosedPosition(RIGHT_SWIPE_BOUNCE_BACK_DURATION); }, _animateBounceBack:function _animateBounceBack(duration){ var swipeBounceBackDistance=IS_RTL? -RIGHT_SWIPE_BOUNCE_BACK_DISTANCE: RIGHT_SWIPE_BOUNCE_BACK_DISTANCE; this._animateTo( -swipeBounceBackDistance, duration, this._animateToClosedPositionDuringBounce); }, _isValidSwipe:function _isValidSwipe(gestureState){ return Math.abs(gestureState.dx)>HORIZONTAL_SWIPE_DISTANCE_THRESHOLD; }, _shouldAnimateRemainder:function _shouldAnimateRemainder(gestureState){ return( Math.abs(gestureState.dx)>this.props.swipeThreshold|| gestureState.vx>HORIZONTAL_FULL_SWIPE_SPEED_THRESHOLD); }, _handlePanResponderEnd:function _handlePanResponderEnd(event,gestureState){ var horizontalDistance=IS_RTL?-gestureState.dx:gestureState.dx; if(this._isSwipingRightFromClosed(gestureState)){ this.props.onOpen(); this._animateBounceBack(RIGHT_SWIPE_BOUNCE_BACK_DURATION); }else if(this._shouldAnimateRemainder(gestureState)){ if(horizontalDistance<0){ this.props.onOpen(); this._animateToOpenPosition(); }else{ this._animateToClosedPosition(); } }else{ if(this._previousLeft===CLOSED_LEFT_POSITION){ this._animateToClosedPosition(); }else{ this._animateToOpenPosition(); } } this.props.onSwipeEnd(); }}); var styles=StyleSheet.create({ slideOutContainer:{ bottom:0, left:0, position:'absolute', right:0, top:0}, swipeableContainer:{ flex:1}}); module.exports=SwipeableRow; }, "SwipeableRow"); __d(444 /* Animated */, function(global, require, module, exports) { 'use strict'; var AnimatedImplementation=require(445 /* AnimatedImplementation */); var Image=require(385 /* Image */); var Text=require(181 /* Text */); var View=require(116 /* View */); module.exports=babelHelpers.extends({}, AnimatedImplementation,{ View:AnimatedImplementation.createAnimatedComponent(View), Text:AnimatedImplementation.createAnimatedComponent(Text), Image:AnimatedImplementation.createAnimatedComponent(Image)}); }, "Animated"); __d(445 /* AnimatedImplementation */, function(global, require, module, exports) { 'use strict'; var InteractionManager=require(407 /* InteractionManager */); var Interpolation=require(446 /* Interpolation */); var React=require(103 /* React */); var Set=require(220 /* Set */); var SpringConfig=require(447 /* SpringConfig */); var ViewStylePropTypes=require(115 /* ViewStylePropTypes */); var NativeAnimatedHelper=require(448 /* NativeAnimatedHelper */); var findNodeHandle=require(100 /* react/lib/findNodeHandle */); var flattenStyle=require(55 /* flattenStyle */); var invariant=require(56 /* fbjs/lib/invariant */); var requestAnimationFrame=require(449 /* fbjs/lib/requestAnimationFrame */); var NativeAnimatedAPI=NativeAnimatedHelper.API;var Animated=function(){function Animated(){babelHelpers.classCallCheck(this,Animated);}babelHelpers.createClass(Animated,[{key:'__attach',value:function __attach() {}},{key:'__detach',value:function __detach() { if(this.__isNative&&this.__nativeTag!=null){ NativeAnimatedAPI.dropAnimatedNode(this.__nativeTag); this.__nativeTag=undefined; } }},{key:'__getValue',value:function __getValue() {}},{key:'__getAnimatedValue',value:function __getAnimatedValue() {return this.__getValue();}},{key:'__addChild',value:function __addChild( child){}},{key:'__removeChild',value:function __removeChild( child){}},{key:'__getChildren',value:function __getChildren() {return[];}},{key:'__makeNative',value:function __makeNative() { if(!this.__isNative){ throw new Error('This node cannot be made a "native" animated node'); } }},{key:'__getNativeTag',value:function __getNativeTag() { NativeAnimatedHelper.assertNativeAnimatedModule(); invariant(this.__isNative,'Attempt to get native tag from node not marked as "native"'); if(this.__nativeTag==null){ var nativeTag=NativeAnimatedHelper.generateNewNodeTag(); NativeAnimatedAPI.createAnimatedNode(nativeTag,this.__getNativeConfig()); this.__nativeTag=nativeTag; } return this.__nativeTag; }},{key:'__getNativeConfig',value:function __getNativeConfig() { throw new Error('This JS animated node type cannot be used as native animated node'); }},{key:'toJSON',value:function toJSON() {return this.__getValue();}}]);return Animated;}();var Animation=function(){function Animation(){babelHelpers.classCallCheck(this,Animation);}babelHelpers.createClass(Animation,[{key:'start',value:function start( fromValue, onUpdate, onEnd, previousAnimation, animatedValue) {}},{key:'stop',value:function stop() { if(this.__nativeId){ NativeAnimatedAPI.stopAnimation(this.__nativeId); } }},{key:'_getNativeAnimationConfig',value:function _getNativeAnimationConfig() { throw new Error('This animation type cannot be offloaded to native'); }},{key:'__debouncedOnEnd',value:function __debouncedOnEnd( result){ var onEnd=this.__onEnd; this.__onEnd=null; onEnd&&onEnd(result); }},{key:'__startNativeAnimation',value:function __startNativeAnimation( animatedValue){ animatedValue.__makeNative(); this.__nativeId=NativeAnimatedHelper.generateNewAnimationId(); NativeAnimatedAPI.startAnimatingNode( this.__nativeId, animatedValue.__getNativeTag(), this._getNativeAnimationConfig(), this.__debouncedOnEnd.bind(this)); }}]);return Animation;}();var AnimatedWithChildren=function(_Animated){babelHelpers.inherits(AnimatedWithChildren,_Animated); function AnimatedWithChildren(){babelHelpers.classCallCheck(this,AnimatedWithChildren);var _this=babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(AnimatedWithChildren).call(this)); _this._children=[];return _this; }babelHelpers.createClass(AnimatedWithChildren,[{key:'__makeNative',value:function __makeNative() { if(!this.__isNative){ this.__isNative=true; for(var _iterator=this._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; child.__makeNative(); NativeAnimatedAPI.connectAnimatedNodes(this.__getNativeTag(),child.__getNativeTag()); } } }},{key:'__addChild',value:function __addChild( child){ if(this._children.length===0){ this.__attach(); } this._children.push(child); if(this.__isNative){ child.__makeNative(); NativeAnimatedAPI.connectAnimatedNodes(this.__getNativeTag(),child.__getNativeTag()); } }},{key:'__removeChild',value:function __removeChild( child){ var index=this._children.indexOf(child); if(index===-1){ console.warn('Trying to remove a child that doesn\'t exist'); return; } if(this.__isNative&&child.__isNative){ NativeAnimatedAPI.disconnectAnimatedNodes(this.__getNativeTag(),child.__getNativeTag()); } this._children.splice(index,1); if(this._children.length===0){ this.__detach(); } }},{key:'__getChildren',value:function __getChildren() { return this._children; }}]);return AnimatedWithChildren;}(Animated); function _flush(rootNode){ var animatedStyles=new Set(); function findAnimatedStyles(node){ if(typeof node.update==='function'){ animatedStyles.add(node); }else{ node.__getChildren().forEach(findAnimatedStyles); } } findAnimatedStyles(rootNode); animatedStyles.forEach(function(animatedStyle){return animatedStyle.update();}); } var _easeInOut=void 0; function easeInOut(){ if(!_easeInOut){ var Easing=require(451 /* Easing */); _easeInOut=Easing.inOut(Easing.ease); } return _easeInOut; }var TimingAnimation=function(_Animation){babelHelpers.inherits(TimingAnimation,_Animation); function TimingAnimation( config) {babelHelpers.classCallCheck(this,TimingAnimation);var _this2=babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(TimingAnimation).call(this)); _this2._toValue=config.toValue; _this2._easing=config.easing!==undefined?config.easing:easeInOut(); _this2._duration=config.duration!==undefined?config.duration:500; _this2._delay=config.delay!==undefined?config.delay:0; _this2.__isInteraction=config.isInteraction!==undefined?config.isInteraction:true; _this2._useNativeDriver=config.useNativeDriver!==undefined?config.useNativeDriver:false;return _this2; }babelHelpers.createClass(TimingAnimation,[{key:'_getNativeAnimationConfig',value:function _getNativeAnimationConfig() { var frameDuration=1000.0/60.0; var frames=[]; for(var dt=0.0;dt=this._startTime+this._duration){ if(this._duration===0){ this._onUpdate(this._toValue); }else{ this._onUpdate( this._fromValue+this._easing(1)*(this._toValue-this._fromValue)); } this.__debouncedOnEnd({finished:true}); return; } this._onUpdate( this._fromValue+ this._easing((now-this._startTime)/this._duration)*( this._toValue-this._fromValue)); if(this.__active){ this._animationFrame=requestAnimationFrame(this.onUpdate.bind(this)); } }},{key:'stop',value:function stop() { babelHelpers.get(Object.getPrototypeOf(TimingAnimation.prototype),'stop',this).call(this); this.__active=false; clearTimeout(this._timeout); global.cancelAnimationFrame(this._animationFrame); this.__debouncedOnEnd({finished:false}); }}]);return TimingAnimation;}(Animation);var DecayAnimation=function(_Animation2){babelHelpers.inherits(DecayAnimation,_Animation2); function DecayAnimation( config) {babelHelpers.classCallCheck(this,DecayAnimation);var _this4=babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(DecayAnimation).call(this)); _this4._deceleration=config.deceleration!==undefined?config.deceleration:0.998; _this4._velocity=config.velocity; _this4.__isInteraction=config.isInteraction!==undefined?config.isInteraction:true;return _this4; }babelHelpers.createClass(DecayAnimation,[{key:'start',value:function start( fromValue, onUpdate, onEnd) { this.__active=true; this._lastValue=fromValue; this._fromValue=fromValue; this._onUpdate=onUpdate; this.__onEnd=onEnd; this._startTime=Date.now(); this._animationFrame=requestAnimationFrame(this.onUpdate.bind(this)); }},{key:'onUpdate',value:function onUpdate() { var now=Date.now(); var value=this._fromValue+ this._velocity/(1-this._deceleration)*( 1-Math.exp(-(1-this._deceleration)*(now-this._startTime))); this._onUpdate(value); if(Math.abs(this._lastValue-value)<0.1){ this.__debouncedOnEnd({finished:true}); return; } this._lastValue=value; if(this.__active){ this._animationFrame=requestAnimationFrame(this.onUpdate.bind(this)); } }},{key:'stop',value:function stop() { babelHelpers.get(Object.getPrototypeOf(DecayAnimation.prototype),'stop',this).call(this); this.__active=false; global.cancelAnimationFrame(this._animationFrame); this.__debouncedOnEnd({finished:false}); }}]);return DecayAnimation;}(Animation); function withDefault(value,defaultValue){ if(value===undefined||value===null){ return defaultValue; } return value; }var SpringAnimation=function(_Animation3){babelHelpers.inherits(SpringAnimation,_Animation3); function SpringAnimation( config) {babelHelpers.classCallCheck(this,SpringAnimation);var _this5=babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(SpringAnimation).call(this)); _this5._overshootClamping=withDefault(config.overshootClamping,false); _this5._restDisplacementThreshold=withDefault(config.restDisplacementThreshold,0.001); _this5._restSpeedThreshold=withDefault(config.restSpeedThreshold,0.001); _this5._initialVelocity=config.velocity; _this5._lastVelocity=withDefault(config.velocity,0); _this5._toValue=config.toValue; _this5.__isInteraction=config.isInteraction!==undefined?config.isInteraction:true; var springConfig; if(config.bounciness!==undefined||config.speed!==undefined){ invariant( config.tension===undefined&&config.friction===undefined, 'You can only define bounciness/speed or tension/friction but not both'); springConfig=SpringConfig.fromBouncinessAndSpeed( withDefault(config.bounciness,8), withDefault(config.speed,12)); }else{ springConfig=SpringConfig.fromOrigamiTensionAndFriction( withDefault(config.tension,40), withDefault(config.friction,7)); } _this5._tension=springConfig.tension; _this5._friction=springConfig.friction;return _this5; }babelHelpers.createClass(SpringAnimation,[{key:'start',value:function start( fromValue, onUpdate, onEnd, previousAnimation) { this.__active=true; this._startPosition=fromValue; this._lastPosition=this._startPosition; this._onUpdate=onUpdate; this.__onEnd=onEnd; this._lastTime=Date.now(); if(previousAnimation instanceof SpringAnimation){ var internalState=previousAnimation.getInternalState(); this._lastPosition=internalState.lastPosition; this._lastVelocity=internalState.lastVelocity; this._lastTime=internalState.lastTime; } if(this._initialVelocity!==undefined&& this._initialVelocity!==null){ this._lastVelocity=this._initialVelocity; } this.onUpdate(); }},{key:'getInternalState',value:function getInternalState() { return{ lastPosition:this._lastPosition, lastVelocity:this._lastVelocity, lastTime:this._lastTime}; }},{key:'onUpdate',value:function onUpdate() { var position=this._lastPosition; var velocity=this._lastVelocity; var tempPosition=this._lastPosition; var tempVelocity=this._lastVelocity; var MAX_STEPS=64; var now=Date.now(); if(now>this._lastTime+MAX_STEPS){ now=this._lastTime+MAX_STEPS; } var TIMESTEP_MSEC=1; var numSteps=Math.floor((now-this._lastTime)/TIMESTEP_MSEC); for(var i=0;ithis._toValue; }else{ isOvershooting=positioninputMax){ if(extrapolateRight==='identity'){ return result; }else if(extrapolateRight==='clamp'){ result=inputMax; }else if(extrapolateRight==='extend'){ } } if(outputMin===outputMax){ return outputMin; } if(inputMin===inputMax){ if(input<=inputMin){ return outputMin; } return outputMax; } if(inputMin===-Infinity){ result=-result; }else if(inputMax===Infinity){ result=result-inputMin; }else{ result=(result-inputMin)/(inputMax-inputMin); } result=easing(result); if(outputMin===-Infinity){ result=-result; }else if(outputMax===Infinity){ result=result+outputMin; }else{ result=result*(outputMax-outputMin)+outputMin; } return result; } function colorToRgba(input){ var int32Color=normalizeColor(input); if(int32Color===null){ return input; } int32Color=int32Color||0; var r=(int32Color&0xff000000)>>>24; var g=(int32Color&0x00ff0000)>>>16; var b=(int32Color&0x0000ff00)>>>8; var a=(int32Color&0x000000ff)/255; return'rgba('+r+', '+g+', '+b+', '+a+')'; } var stringShapeRegex=/[0-9\.-]+/g; function createInterpolationFromStringOutputRange( config) { var outputRange=config.outputRange; invariant(outputRange.length>=2,'Bad output range'); outputRange=outputRange.map(colorToRgba); checkPattern(outputRange); var outputRanges=outputRange[0].match(stringShapeRegex).map(function(){return[];}); outputRange.forEach(function(value){ value.match(stringShapeRegex).forEach(function(number,i){ outputRanges[i].push(+number); }); }); var interpolations=outputRange[0].match(stringShapeRegex).map(function(value,i){ return Interpolation.create(babelHelpers.extends({}, config,{ outputRange:outputRanges[i]})); }); var shouldRound=isRgbOrRgba(outputRange[0]); return function(input){ var i=0; return outputRange[0].replace(stringShapeRegex,function(){ var val=+interpolations[i++](input); var rounded=shouldRound&&i<4?Math.round(val):Math.round(val*1000)/1000; return String(rounded); }); }; } function isRgbOrRgba(range){ return typeof range==='string'&&range.startsWith('rgb'); } function checkPattern(arr){ var pattern=arr[0].replace(stringShapeRegex,''); for(var i=1;i=input){ break; } } return i-1; } function checkValidInputRange(arr){ invariant(arr.length>=2,'inputRange must have at least 2 elements'); for(var i=1;i=arr[i-1], 'inputRange must be monotonically increasing '+arr); } } function checkInfiniteRange(name,arr){ invariant(arr.length>=2,name+' must have at least 2 elements'); invariant( arr.length!==2||arr[0]!==-Infinity||arr[1]!==Infinity, name+'cannot be ]-infinity;+infinity[ '+arr); } module.exports=Interpolation; }, "Interpolation"); __d(447 /* SpringConfig */, function(global, require, module, exports) { 'use strict'; function tensionFromOrigamiValue(oValue){ return(oValue-30)*3.62+194; } function frictionFromOrigamiValue(oValue){ return(oValue-8)*3+25; } function fromOrigamiTensionAndFriction( tension, friction) { return{ tension:tensionFromOrigamiValue(tension), friction:frictionFromOrigamiValue(friction)}; } function fromBouncinessAndSpeed( bounciness, speed) { function normalize(value,startValue,endValue){ return(value-startValue)/(endValue-startValue); } function projectNormal(n,start,end){ return start+n*(end-start); } function linearInterpolation(t,start,end){ return t*end+(1-t)*start; } function quadraticOutInterpolation(t,start,end){ return linearInterpolation(2*t-t*t,start,end); } function b3Friction1(x){ return 0.0007*Math.pow(x,3)- 0.031*Math.pow(x,2)+0.64*x+1.28; } function b3Friction2(x){ return 0.000044*Math.pow(x,3)- 0.006*Math.pow(x,2)+0.36*x+2; } function b3Friction3(x){ return 0.00000045*Math.pow(x,3)- 0.000332*Math.pow(x,2)+0.1078*x+5.84; } function b3Nobounce(tension){ if(tension<=18){ return b3Friction1(tension); }else if(tension>18&&tension<=44){ return b3Friction2(tension); }else{ return b3Friction3(tension); } } var b=normalize(bounciness/1.7,0,20); b=projectNormal(b,0,0.8); var s=normalize(speed/1.7,0,20); var bouncyTension=projectNormal(s,0.5,200); var bouncyFriction=quadraticOutInterpolation( b, b3Nobounce(bouncyTension), 0.01); return{ tension:tensionFromOrigamiValue(bouncyTension), friction:frictionFromOrigamiValue(bouncyFriction)}; } module.exports={ fromOrigamiTensionAndFriction:fromOrigamiTensionAndFriction, fromBouncinessAndSpeed:fromBouncinessAndSpeed}; }, "SpringConfig"); __d(448 /* NativeAnimatedHelper */, function(global, require, module, exports) { 'use strict'; var NativeAnimatedModule=require(60 /* NativeModules */).NativeAnimatedModule; var invariant=require(56 /* fbjs/lib/invariant */); var __nativeAnimatedNodeTagCount=1; var __nativeAnimationIdCount=1; var API={ createAnimatedNode:function createAnimatedNode(tag,config){ assertNativeAnimatedModule(); NativeAnimatedModule.createAnimatedNode(tag,config); }, connectAnimatedNodes:function connectAnimatedNodes(parentTag,childTag){ assertNativeAnimatedModule(); NativeAnimatedModule.connectAnimatedNodes(parentTag,childTag); }, disconnectAnimatedNodes:function disconnectAnimatedNodes(parentTag,childTag){ assertNativeAnimatedModule(); NativeAnimatedModule.disconnectAnimatedNodes(parentTag,childTag); }, startAnimatingNode:function startAnimatingNode(animationId,nodeTag,config,endCallback){ assertNativeAnimatedModule(); NativeAnimatedModule.startAnimatingNode(animationId,nodeTag,config,endCallback); }, stopAnimation:function stopAnimation(animationId){ assertNativeAnimatedModule(); NativeAnimatedModule.stopAnimation(animationId); }, setAnimatedNodeValue:function setAnimatedNodeValue(nodeTag,value){ assertNativeAnimatedModule(); NativeAnimatedModule.setAnimatedNodeValue(nodeTag,value); }, connectAnimatedNodeToView:function connectAnimatedNodeToView(nodeTag,viewTag){ assertNativeAnimatedModule(); NativeAnimatedModule.connectAnimatedNodeToView(nodeTag,viewTag); }, disconnectAnimatedNodeFromView:function disconnectAnimatedNodeFromView(nodeTag,viewTag){ assertNativeAnimatedModule(); NativeAnimatedModule.disconnectAnimatedNodeFromView(nodeTag,viewTag); }, dropAnimatedNode:function dropAnimatedNode(tag){ assertNativeAnimatedModule(); NativeAnimatedModule.dropAnimatedNode(tag); }}; var PROPS_WHITELIST={ style:{ opacity:true, transform:true, scaleX:true, scaleY:true, translateX:true, translateY:true}}; var TRANSFORM_WHITELIST={ translateX:true, translateY:true, scale:true, rotate:true}; function validateProps(params){ for(var key in params){ if(!PROPS_WHITELIST.hasOwnProperty(key)){ throw new Error('Property \''+key+'\' is not supported by native animated module'); } } } function validateTransform(config){ for(var key in config){ if(!TRANSFORM_WHITELIST.hasOwnProperty(key)){ throw new Error('Property \''+key+'\' is not supported by native animated module'); } } } function validateStyles(styles){ var STYLES_WHITELIST=PROPS_WHITELIST.style||{}; for(var key in styles){ if(!STYLES_WHITELIST.hasOwnProperty(key)){ throw new Error('Style property \''+key+'\' is not supported by native animated module'); } } } function validateInterpolation(config){ var SUPPORTED_INTERPOLATION_PARAMS={ inputRange:true, outputRange:true}; for(var key in config){ if(!SUPPORTED_INTERPOLATION_PARAMS.hasOwnProperty(key)){ throw new Error('Interpolation property \''+key+'\' is not supported by native animated module'); } } } function generateNewNodeTag(){ return __nativeAnimatedNodeTagCount++; } function generateNewAnimationId(){ return __nativeAnimationIdCount++; } function assertNativeAnimatedModule(){ invariant(NativeAnimatedModule,'Native animated module is not available'); } module.exports={ API:API, validateProps:validateProps, validateStyles:validateStyles, validateTransform:validateTransform, validateInterpolation:validateInterpolation, generateNewNodeTag:generateNewNodeTag, generateNewAnimationId:generateNewAnimationId, assertNativeAnimatedModule:assertNativeAnimatedModule}; }, "NativeAnimatedHelper"); __d(449 /* fbjs/lib/requestAnimationFrame.js */, function(global, require, module, exports) {'use strict'; var emptyFunction=require(45 /* ./emptyFunction */); var nativeRequestAnimationFrame=require(450 /* ./nativeRequestAnimationFrame */); var lastTime=0; var requestAnimationFrame=nativeRequestAnimationFrame||function(callback){ var currTime=Date.now(); var timeDelay=Math.max(0,16-(currTime-lastTime)); lastTime=currTime+timeDelay; return global.setTimeout(function(){ callback(Date.now()); },timeDelay); }; requestAnimationFrame(emptyFunction); module.exports=requestAnimationFrame; }, "fbjs/lib/requestAnimationFrame.js"); __d(450 /* fbjs/lib/nativeRequestAnimationFrame.js */, function(global, require, module, exports) {"use strict"; var nativeRequestAnimationFrame=global.requestAnimationFrame||global.webkitRequestAnimationFrame||global.mozRequestAnimationFrame||global.oRequestAnimationFrame||global.msRequestAnimationFrame; module.exports=nativeRequestAnimationFrame; }, "fbjs/lib/nativeRequestAnimationFrame.js"); __d(451 /* Easing */, function(global, require, module, exports) { 'use strict'; var _ease=void 0;var Easing=function(){function Easing(){babelHelpers.classCallCheck(this,Easing);}babelHelpers.createClass(Easing,null,[{key:'step0',value:function step0( n){ return n>0?1:0; }},{key:'step1',value:function step1( n){ return n>=1?1:0; }},{key:'linear',value:function linear( t){ return t; }},{key:'ease',value:function ease( t){ if(!_ease){ _ease=Easing.bezier(0.42,0,1,1); } return _ease(t); }},{key:'quad',value:function quad( t){ return t*t; }},{key:'cubic',value:function cubic( t){ return t*t*t; }},{key:'poly',value:function poly( n){ return function(t){return Math.pow(t,n);}; }},{key:'sin',value:function sin( t){ return 1-Math.cos(t*Math.PI/2); }},{key:'circle',value:function circle( t){ return 1-Math.sqrt(1-t*t); }},{key:'exp',value:function exp( t){ return Math.pow(2,10*(t-1)); }},{key:'elastic',value:function elastic() {var bounciness=arguments.length<=0||arguments[0]===undefined?1:arguments[0]; var p=bounciness*Math.PI; return function(t){return 1-Math.pow(Math.cos(t*Math.PI/2),3)*Math.cos(t*p);}; }},{key:'back',value:function back( s){ if(s===undefined){ s=1.70158; } return function(t){return t*t*((s+1)*t-s);}; }},{key:'bounce',value:function bounce( t){ if(t<1/2.75){ return 7.5625*t*t; } if(t<2/2.75){ t-=1.5/2.75; return 7.5625*t*t+0.75; } if(t<2.5/2.75){ t-=2.25/2.75; return 7.5625*t*t+0.9375; } t-=2.625/2.75; return 7.5625*t*t+0.984375; }},{key:'bezier',value:function bezier( x1, y1, x2, y2) { var _bezier=require(452 /* bezier */); return _bezier(x1,y1,x2,y2); }},{key:'in',value:function _in( easing) { return easing; }},{key:'out',value:function out( easing) { return function(t){return 1-easing(1-t);}; }},{key:'inOut',value:function inOut( easing) { return function(t){ if(t<0.5){ return easing(t*2)/2; } return 1-easing((1-t)*2)/2; }; }}]);return Easing;}(); module.exports=Easing; }, "Easing"); __d(452 /* bezier */, function(global, require, module, exports) { var NEWTON_ITERATIONS=4; var NEWTON_MIN_SLOPE=0.001; var SUBDIVISION_PRECISION=0.0000001; var SUBDIVISION_MAX_ITERATIONS=10; var kSplineTableSize=11; var kSampleStepSize=1.0/(kSplineTableSize-1.0); var float32ArraySupported=typeof Float32Array==='function'; function A(aA1,aA2){return 1.0-3.0*aA2+3.0*aA1;} function B(aA1,aA2){return 3.0*aA2-6.0*aA1;} function C(aA1){return 3.0*aA1;} function calcBezier(aT,aA1,aA2){return((A(aA1,aA2)*aT+B(aA1,aA2))*aT+C(aA1))*aT;} function getSlope(aT,aA1,aA2){return 3.0*A(aA1,aA2)*aT*aT+2.0*B(aA1,aA2)*aT+C(aA1);} function binarySubdivide(aX,aA,aB,mX1,mX2){ var currentX,currentT,i=0; do{ currentT=aA+(aB-aA)/2.0; currentX=calcBezier(currentT,mX1,mX2)-aX; if(currentX>0.0){ aB=currentT; }else{ aA=currentT; } }while(Math.abs(currentX)>SUBDIVISION_PRECISION&&++i=NEWTON_MIN_SLOPE){ return newtonRaphsonIterate(aX,guessForT,mX1,mX2); }else if(initialSlope===0.0){ return guessForT; }else{ return binarySubdivide(aX,intervalStart,intervalStart+kSampleStepSize,mX1,mX2); } } return function BezierEasing(x){ if(mX1===mY1&&mX2===mY2){ return x; } if(x===0){ return 0; } if(x===1){ return 1; } return calcBezier(getTForX(x),mY1,mY2); }; }; }, "bezier"); __d(453 /* SwitchAndroid */, function(global, require, module, exports) { 'use strict'; var NativeMethodsMixin=require(49 /* react/lib/NativeMethodsMixin */); var PropTypes=require(40 /* react/lib/ReactPropTypes */); var React=require(103 /* React */); var View=require(116 /* View */); var requireNativeComponent=require(130 /* requireNativeComponent */); var SWITCH='switch'; var SwitchAndroid=React.createClass({displayName:'SwitchAndroid', mixins:[NativeMethodsMixin], propTypes:babelHelpers.extends({}, View.propTypes,{ value:PropTypes.bool, disabled:PropTypes.bool, onValueChange:PropTypes.func, testID:PropTypes.string}), getDefaultProps:function getDefaultProps(){ return{ value:false, disabled:false}; }, _onChange:function _onChange(event){ this.refs[SWITCH].setNativeProps({on:this.props.value}); if(this.props.value===event.nativeEvent.value||this.props.disabled){ return; } this.props.onChange&&this.props.onChange(event); this.props.onValueChange&&this.props.onValueChange(event.nativeEvent.value); }, render:function render(){ return( React.createElement(RKSwitch,{ ref:SWITCH, style:this.props.style, enabled:!this.props.disabled, on:this.props.value, onChange:this._onChange, testID:this.props.testID, onStartShouldSetResponder:function onStartShouldSetResponder(){return true;}, onResponderTerminationRequest:function onResponderTerminationRequest(){return false;}})); }}); var RKSwitch=requireNativeComponent('AndroidSwitch',SwitchAndroid,{ nativeOnly:{ on:true, enabled:true}}); module.exports=SwitchAndroid; }, "SwitchAndroid"); __d(454 /* SwitchIOS */, function(global, require, module, exports) { 'use strict'; var React=require(103 /* React */); var StyleSheet=require(104 /* StyleSheet */); var Text=require(181 /* Text */); var View=require(116 /* View */); var DummySwitchIOS=React.createClass({displayName:'DummySwitchIOS', render:function render(){ return( React.createElement(View,{style:[styles.dummySwitchIOS,this.props.style]}, React.createElement(Text,{style:styles.text},'SwitchIOS is not supported on this platform!'))); }}); var styles=StyleSheet.create({ dummySwitchIOS:{ width:120, height:50, backgroundColor:'#ffbcbc', borderWidth:1, borderColor:'red', alignItems:'center', justifyContent:'center'}, text:{ color:'#333333', margin:5, fontSize:10}}); module.exports=DummySwitchIOS; }, "SwitchIOS"); __d(455 /* TabBarIOS */, function(global, require, module, exports) { 'use strict'; var React=require(103 /* React */); var View=require(116 /* View */); var StyleSheet=require(104 /* StyleSheet */); var DummyTabBarIOS=React.createClass({displayName:'DummyTabBarIOS', render:function render(){ return( React.createElement(View,{style:[this.props.style,styles.tabGroup]}, this.props.children)); }}); var styles=StyleSheet.create({ tabGroup:{ flex:1}}); module.exports=DummyTabBarIOS; }, "TabBarIOS"); __d(456 /* TextInput */, function(global, require, module, exports) { 'use strict'; var ColorPropType=require(47 /* ColorPropType */); var DocumentSelectionState=require(457 /* DocumentSelectionState */); var EventEmitter=require(82 /* EventEmitter */); var NativeMethodsMixin=require(49 /* react/lib/NativeMethodsMixin */); var Platform=require(59 /* Platform */); var PropTypes=require(40 /* react/lib/ReactPropTypes */); var React=require(103 /* React */); var ReactNative=require(188 /* react/lib/ReactNative */); var ReactChildren=require(15 /* react/lib/ReactChildren */); var StyleSheet=require(104 /* StyleSheet */); var Text=require(181 /* Text */); var TextInputState=require(58 /* TextInputState */); var TimerMixin=require(391 /* react-timer-mixin */); var TouchableWithoutFeedback=require(463 /* TouchableWithoutFeedback */); var UIManager=require(99 /* UIManager */); var View=require(116 /* View */); var warning=require(44 /* fbjs/lib/warning */); var emptyFunction=require(45 /* fbjs/lib/emptyFunction */); var invariant=require(56 /* fbjs/lib/invariant */); var requireNativeComponent=require(130 /* requireNativeComponent */); var onlyMultiline={ onTextInput:true, children:true}; if(Platform.OS==='android'){ var AndroidTextInput=requireNativeComponent('AndroidTextInput',null); }else if(Platform.OS==='ios'){ var RCTTextView=requireNativeComponent('RCTTextView',null); var RCTTextField=requireNativeComponent('RCTTextField',null); } var TextInput=React.createClass({displayName:'TextInput', statics:{ State:TextInputState}, propTypes:babelHelpers.extends({}, View.propTypes,{ autoCapitalize:PropTypes.oneOf([ 'none', 'sentences', 'words', 'characters']), autoCorrect:PropTypes.bool, autoFocus:PropTypes.bool, editable:PropTypes.bool, keyboardType:PropTypes.oneOf([ 'default', 'email-address', 'numeric', 'phone-pad', 'ascii-capable', 'numbers-and-punctuation', 'url', 'number-pad', 'name-phone-pad', 'decimal-pad', 'twitter', 'web-search']), keyboardAppearance:PropTypes.oneOf([ 'default', 'light', 'dark']), returnKeyType:PropTypes.oneOf([ 'done', 'go', 'next', 'search', 'send', 'none', 'previous', 'default', 'emergency-call', 'google', 'join', 'route', 'yahoo']), returnKeyLabel:PropTypes.string, maxLength:PropTypes.number, numberOfLines:PropTypes.number, enablesReturnKeyAutomatically:PropTypes.bool, multiline:PropTypes.bool, onBlur:PropTypes.func, onFocus:PropTypes.func, onChange:PropTypes.func, onChangeText:PropTypes.func, onContentSizeChange:PropTypes.func, onEndEditing:PropTypes.func, onSelectionChange:PropTypes.func, onSubmitEditing:PropTypes.func, onKeyPress:PropTypes.func, onLayout:PropTypes.func, placeholder:PropTypes.string, placeholderTextColor:ColorPropType, secureTextEntry:PropTypes.bool, selectionColor:ColorPropType, selectionState:PropTypes.instanceOf(DocumentSelectionState), value:PropTypes.string, defaultValue:PropTypes.string, clearButtonMode:PropTypes.oneOf([ 'never', 'while-editing', 'unless-editing', 'always']), clearTextOnFocus:PropTypes.bool, selectTextOnFocus:PropTypes.bool, blurOnSubmit:PropTypes.bool, style:Text.propTypes.style, underlineColorAndroid:ColorPropType, inlineImageLeft:PropTypes.string, inlineImagePadding:PropTypes.number}), mixins:[NativeMethodsMixin,TimerMixin], viewConfig: Platform.OS==='ios'&&RCTTextField? RCTTextField.viewConfig: Platform.OS==='android'&&AndroidTextInput? AndroidTextInput.viewConfig: {}, isFocused:function isFocused(){ return TextInputState.currentlyFocusedField()=== ReactNative.findNodeHandle(this.refs.input); }, contextTypes:{ onFocusRequested:React.PropTypes.func, focusEmitter:React.PropTypes.instanceOf(EventEmitter)}, _focusSubscription:undefined, _lastNativeText:undefined, componentDidMount:function componentDidMount(){var _this=this; this._lastNativeText=this.props.value; if(!this.context.focusEmitter){ if(this.props.autoFocus){ this.requestAnimationFrame(this.focus); } return; } this._focusSubscription=this.context.focusEmitter.addListener( 'focus', function(el){ if(_this===el){ _this.requestAnimationFrame(_this.focus); }else if(_this.isFocused()){ _this.blur(); } }); if(this.props.autoFocus){ this.context.onFocusRequested(this); } }, componentWillUnmount:function componentWillUnmount(){ this._focusSubscription&&this._focusSubscription.remove(); if(this.isFocused()){ this.blur(); } }, getChildContext:function getChildContext(){ return{isInAParentText:true}; }, childContextTypes:{ isInAParentText:React.PropTypes.bool}, clear:function clear(){ this.setNativeProps({text:''}); }, render:function render(){ if(Platform.OS==='ios'){ return this._renderIOS(); }else if(Platform.OS==='android'){ return this._renderAndroid(); } }, _getText:function _getText(){ return typeof this.props.value==='string'? this.props.value: this.props.defaultValue; }, _renderIOS:function _renderIOS(){var _this2=this; var textContainer; var onSelectionChange; if(this.props.selectionState||this.props.onSelectionChange){ onSelectionChange=function onSelectionChange(event){ if(_this2.props.selectionState){ var selection=event.nativeEvent.selection; _this2.props.selectionState.update(selection.start,selection.end); } _this2.props.onSelectionChange&&_this2.props.onSelectionChange(event); }; } var props=babelHelpers.extends({},this.props); props.style=[styles.input,this.props.style]; if(!props.multiline){ if(__DEV__){ for(var propKey in onlyMultiline){ if(props[propKey]){ var error=new Error( 'TextInput prop `'+propKey+'` is only supported with multiline.'); warning(false,'%s',error.stack); } } } textContainer= React.createElement(RCTTextField,babelHelpers.extends({ ref:'input'}, props,{ onFocus:this._onFocus, onBlur:this._onBlur, onChange:this._onChange, onSelectionChange:onSelectionChange, onSelectionChangeShouldSetResponder:emptyFunction.thatReturnsTrue, text:this._getText()})); }else{ var children=props.children; var childCount=0; ReactChildren.forEach(children,function(){return++childCount;}); invariant( !(props.value&&childCount), 'Cannot specify both value and children.'); if(childCount>=1){ children=React.createElement(Text,{style:props.style},children); } if(props.inputView){ children=[children,props.inputView]; } textContainer= React.createElement(RCTTextView,babelHelpers.extends({ ref:'input'}, props,{ children:children, onFocus:this._onFocus, onBlur:this._onBlur, onChange:this._onChange, onContentSizeChange:this.props.onContentSizeChange, onSelectionChange:onSelectionChange, onTextInput:this._onTextInput, onSelectionChangeShouldSetResponder:emptyFunction.thatReturnsTrue, text:this._getText()})); } return( React.createElement(TouchableWithoutFeedback,{ onLayout:props.onLayout, onPress:this._onPress, rejectResponderTermination:true, accessible:props.accessible, accessibilityLabel:props.accessibilityLabel, accessibilityTraits:props.accessibilityTraits, testID:props.testID}, textContainer)); }, _renderAndroid:function _renderAndroid(){var _this3=this; var onSelectionChange; if(this.props.selectionState||this.props.onSelectionChange){ onSelectionChange=function onSelectionChange(event){ if(_this3.props.selectionState){ var selection=event.nativeEvent.selection; _this3.props.selectionState.update(selection.start,selection.end); } _this3.props.onSelectionChange&&_this3.props.onSelectionChange(event); }; } var autoCapitalize= UIManager.AndroidTextInput.Constants.AutoCapitalizationType[this.props.autoCapitalize]; var children=this.props.children; var childCount=0; ReactChildren.forEach(children,function(){return++childCount;}); invariant( !(this.props.value&&childCount), 'Cannot specify both value and children.'); if(childCount>1){ children=React.createElement(Text,null,children); } var textContainer= React.createElement(AndroidTextInput,{ ref:'input', style:[this.props.style], autoCapitalize:autoCapitalize, autoCorrect:this.props.autoCorrect, keyboardType:this.props.keyboardType, mostRecentEventCount:0, multiline:this.props.multiline, numberOfLines:this.props.numberOfLines, maxLength:this.props.maxLength, onFocus:this._onFocus, onBlur:this._onBlur, onChange:this._onChange, onContentSizeChange:this.props.onContentSizeChange, onSelectionChange:onSelectionChange, onTextInput:this._onTextInput, onEndEditing:this.props.onEndEditing, onSubmitEditing:this.props.onSubmitEditing, blurOnSubmit:this.props.blurOnSubmit, onLayout:this.props.onLayout, placeholder:this.props.placeholder, placeholderTextColor:this.props.placeholderTextColor, secureTextEntry:this.props.secureTextEntry, selectionColor:this.props.selectionColor, text:this._getText(), underlineColorAndroid:this.props.underlineColorAndroid, inlineImageLeft:this.props.inlineImageLeft, inlineImagePadding:this.props.inlineImagePadding, children:children, editable:this.props.editable, selectTextOnFocus:this.props.selectTextOnFocus, returnKeyType:this.props.returnKeyType, returnKeyLabel:this.props.returnKeyLabel}); return( React.createElement(TouchableWithoutFeedback,{ onPress:this._onPress, accessible:this.props.accessible, accessibilityLabel:this.props.accessibilityLabel, accessibilityComponentType:this.props.accessibilityComponentType, testID:this.props.testID}, textContainer)); }, _onFocus:function _onFocus(event){ if(this.props.onFocus){ this.props.onFocus(event); } if(this.props.selectionState){ this.props.selectionState.focus(); } }, _onPress:function _onPress(event){ if(this.props.editable||this.props.editable===undefined){ this.focus(); } }, _onChange:function _onChange(event){ this.refs.input.setNativeProps({ mostRecentEventCount:event.nativeEvent.eventCount}); var text=event.nativeEvent.text; this.props.onChange&&this.props.onChange(event); this.props.onChangeText&&this.props.onChangeText(text); if(!this.refs.input){ return; } this._lastNativeText=text; this.forceUpdate(); }, componentDidUpdate:function componentDidUpdate(){ if(this._lastNativeText!==this.props.value&&typeof this.props.value==='string'){ this.refs.input.setNativeProps({ text:this.props.value}); } }, _onBlur:function _onBlur(event){ this.blur(); if(this.props.onBlur){ this.props.onBlur(event); } if(this.props.selectionState){ this.props.selectionState.blur(); } }, _onTextInput:function _onTextInput(event){ this.props.onTextInput&&this.props.onTextInput(event); }}); var styles=StyleSheet.create({ input:{ alignSelf:'stretch'}}); module.exports=TextInput; }, "TextInput"); __d(457 /* DocumentSelectionState */, function(global, require, module, exports) { var mixInEventEmitter=require(458 /* mixInEventEmitter */);var DocumentSelectionState=function(){ function DocumentSelectionState(anchor,focus){babelHelpers.classCallCheck(this,DocumentSelectionState); this._anchorOffset=anchor; this._focusOffset=focus; this._hasFocus=false; }babelHelpers.createClass(DocumentSelectionState,[{key:'update',value:function update( anchor,focus){ if(this._anchorOffset!==anchor||this._focusOffset!==focus){ this._anchorOffset=anchor; this._focusOffset=focus; this.emit('update'); } }},{key:'constrainLength',value:function constrainLength( maxLength){ this.update( Math.min(this._anchorOffset,maxLength), Math.min(this._focusOffset,maxLength)); }},{key:'focus',value:function focus() { if(!this._hasFocus){ this._hasFocus=true; this.emit('focus'); } }},{key:'blur',value:function blur() { if(this._hasFocus){ this._hasFocus=false; this.emit('blur'); } }},{key:'hasFocus',value:function hasFocus() { return this._hasFocus; }},{key:'isCollapsed',value:function isCollapsed() { return this._anchorOffset===this._focusOffset; }},{key:'isBackward',value:function isBackward() { return this._anchorOffset>this._focusOffset; }},{key:'getAnchorOffset',value:function getAnchorOffset() { return this._hasFocus?this._anchorOffset:null; }},{key:'getFocusOffset',value:function getFocusOffset() { return this._hasFocus?this._focusOffset:null; }},{key:'getStartOffset',value:function getStartOffset() { return( this._hasFocus?Math.min(this._anchorOffset,this._focusOffset):null); }},{key:'getEndOffset',value:function getEndOffset() { return( this._hasFocus?Math.max(this._anchorOffset,this._focusOffset):null); }},{key:'overlaps',value:function overlaps( start,end){ return( this.hasFocus()&& this.getStartOffset()<=end&&start<=this.getEndOffset()); }}]);return DocumentSelectionState;}(); mixInEventEmitter(DocumentSelectionState,{ 'blur':true, 'focus':true, 'update':true}); module.exports=DocumentSelectionState; }, "DocumentSelectionState"); __d(458 /* mixInEventEmitter */, function(global, require, module, exports) { var EventEmitter=require(82 /* EventEmitter */); var EventEmitterWithHolding=require(459 /* EventEmitterWithHolding */); var EventHolder=require(460 /* EventHolder */); var EventValidator=require(461 /* EventValidator */); var copyProperties=require(462 /* copyProperties */); var invariant=require(56 /* fbjs/lib/invariant */); var keyOf=require(420 /* fbjs/lib/keyOf */); var TYPES_KEY=keyOf({__types:true}); function mixInEventEmitter(cls,types){ invariant(types,'Must supply set of valid event types'); var target=cls.prototype||cls; invariant(!target.__eventEmitter,'An active emitter is already mixed in'); var ctor=cls.constructor; if(ctor){ invariant( ctor===Object||ctor===Function, 'Mix EventEmitter into a class, not an instance'); } if(target.hasOwnProperty(TYPES_KEY)){ copyProperties(target.__types,types); }else if(target.__types){ target.__types=copyProperties({},target.__types,types); }else{ target.__types=types; } copyProperties(target,EventEmitterMixin); } var EventEmitterMixin={ emit:function emit(eventType,a,b,c,d,e,_){ return this.__getEventEmitter().emit(eventType,a,b,c,d,e,_); }, emitAndHold:function emitAndHold(eventType,a,b,c,d,e,_){ return this.__getEventEmitter().emitAndHold(eventType,a,b,c,d,e,_); }, addListener:function addListener(eventType,listener,context){ return this.__getEventEmitter().addListener(eventType,listener,context); }, once:function once(eventType,listener,context){ return this.__getEventEmitter().once(eventType,listener,context); }, addRetroactiveListener:function addRetroactiveListener(eventType,listener,context){ return this.__getEventEmitter().addRetroactiveListener( eventType, listener, context); }, addListenerMap:function addListenerMap(listenerMap,context){ return this.__getEventEmitter().addListenerMap(listenerMap,context); }, addRetroactiveListenerMap:function addRetroactiveListenerMap(listenerMap,context){ return this.__getEventEmitter().addListenerMap(listenerMap,context); }, removeAllListeners:function removeAllListeners(){ this.__getEventEmitter().removeAllListeners(); }, removeCurrentListener:function removeCurrentListener(){ this.__getEventEmitter().removeCurrentListener(); }, releaseHeldEventType:function releaseHeldEventType(eventType){ this.__getEventEmitter().releaseHeldEventType(eventType); }, __getEventEmitter:function __getEventEmitter(){ if(!this.__eventEmitter){ var emitter=new EventEmitter(); emitter=EventValidator.addValidation(emitter,this.__types); var holder=new EventHolder(); this.__eventEmitter=new EventEmitterWithHolding(emitter,holder); } return this.__eventEmitter; }}; module.exports=mixInEventEmitter; }, "mixInEventEmitter"); __d(459 /* EventEmitterWithHolding */, function(global, require, module, exports) { 'use strict';var EventEmitterWithHolding=function(){ function EventEmitterWithHolding(emitter,holder){babelHelpers.classCallCheck(this,EventEmitterWithHolding); this._emitter=emitter; this._eventHolder=holder; this._currentEventToken=null; this._emittingHeldEvents=false; }babelHelpers.createClass(EventEmitterWithHolding,[{key:'addListener',value:function addListener( eventType,listener,context){ return this._emitter.addListener(eventType,listener,context); }},{key:'once',value:function once( eventType,listener,context){ return this._emitter.once(eventType,listener,context); }},{key:'addRetroactiveListener',value:function addRetroactiveListener( eventType,listener,context){ var subscription=this._emitter.addListener(eventType,listener,context); this._emittingHeldEvents=true; this._eventHolder.emitToListener(eventType,listener,context); this._emittingHeldEvents=false; return subscription; }},{key:'removeAllListeners',value:function removeAllListeners( eventType){ this._emitter.removeAllListeners(eventType); }},{key:'removeCurrentListener',value:function removeCurrentListener() { this._emitter.removeCurrentListener(); }},{key:'listeners',value:function listeners( eventType){ return this._emitter.listeners(eventType); }},{key:'emit',value:function emit( eventType){var _emitter;for(var _len=arguments.length,args=Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){args[_key-1]=arguments[_key];} (_emitter=this._emitter).emit.apply(_emitter,[eventType].concat(babelHelpers.toConsumableArray(args))); }},{key:'emitAndHold',value:function emitAndHold( eventType){var _eventHolder,_emitter2;for(var _len2=arguments.length,args=Array(_len2>1?_len2-1:0),_key2=1;_key2<_len2;_key2++){args[_key2-1]=arguments[_key2];} this._currentEventToken=(_eventHolder=this._eventHolder).holdEvent.apply(_eventHolder,[eventType].concat(babelHelpers.toConsumableArray(args))); (_emitter2=this._emitter).emit.apply(_emitter2,[eventType].concat(babelHelpers.toConsumableArray(args))); this._currentEventToken=null; }},{key:'releaseCurrentEvent',value:function releaseCurrentEvent() { if(this._currentEventToken){ this._eventHolder.releaseEvent(this._currentEventToken); }else if(this._emittingHeldEvents){ this._eventHolder.releaseCurrentEvent(); } }},{key:'releaseHeldEventType',value:function releaseHeldEventType( eventType){ this._eventHolder.releaseEventType(eventType); }}]);return EventEmitterWithHolding;}(); module.exports=EventEmitterWithHolding; }, "EventEmitterWithHolding"); __d(460 /* EventHolder */, function(global, require, module, exports) { 'use strict'; var invariant=require(56 /* fbjs/lib/invariant */);var EventHolder=function(){ function EventHolder(){babelHelpers.classCallCheck(this,EventHolder); this._heldEvents={}; this._currentEventKey=null; }babelHelpers.createClass(EventHolder,[{key:'holdEvent',value:function holdEvent( eventType){ this._heldEvents[eventType]=this._heldEvents[eventType]||[]; var eventsOfType=this._heldEvents[eventType]; var key={ eventType:eventType, index:eventsOfType.length};for(var _len=arguments.length,args=Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){args[_key-1]=arguments[_key];} eventsOfType.push(args); return key; }},{key:'emitToListener',value:function emitToListener( eventType,listener,context){var _this=this; var eventsOfType=this._heldEvents[eventType]; if(!eventsOfType){ return; } var origEventKey=this._currentEventKey; eventsOfType.forEach(function(eventHeld,index){ if(!eventHeld){ return; } _this._currentEventKey={ eventType:eventType, index:index}; listener.apply(context,eventHeld); }); this._currentEventKey=origEventKey; }},{key:'releaseCurrentEvent',value:function releaseCurrentEvent() { invariant( this._currentEventKey!==null, 'Not in an emitting cycle; there is no current event'); this._currentEventKey&&this.releaseEvent(this._currentEventKey); }},{key:'releaseEvent',value:function releaseEvent( token){ delete this._heldEvents[token.eventType][token.index]; }},{key:'releaseEventType',value:function releaseEventType( type){ this._heldEvents[type]=[]; }}]);return EventHolder;}(); module.exports=EventHolder; }, "EventHolder"); __d(461 /* EventValidator */, function(global, require, module, exports) { 'use strict'; var copyProperties=require(462 /* copyProperties */); var EventValidator={ addValidation:function addValidation(emitter,types){ var eventTypes=Object.keys(types); var emitterWithValidation=Object.create(emitter); copyProperties(emitterWithValidation,{ emit:function emit(type,a,b,c,d,e,_){ assertAllowsEventType(type,eventTypes); return emitter.emit.call(this,type,a,b,c,d,e,_); }}); return emitterWithValidation; }}; function assertAllowsEventType(type,allowedTypes){ if(allowedTypes.indexOf(type)===-1){ throw new TypeError(errorMessageFor(type,allowedTypes)); } } function errorMessageFor(type,allowedTypes){ var message='Unknown event type "'+type+'". '; if(__DEV__){ message+=recommendationFor(type,allowedTypes); } message+='Known event types: '+allowedTypes.join(', ')+'.'; return message; } if(__DEV__){ var recommendationFor=function recommendationFor(type,allowedTypes){ var closestTypeRecommendation=closestTypeFor(type,allowedTypes); if(isCloseEnough(closestTypeRecommendation,type)){ return'Did you mean "'+closestTypeRecommendation.type+'"? '; }else{ return''; } }; var closestTypeFor=function closestTypeFor(type,allowedTypes){ var typeRecommendations=allowedTypes.map( typeRecommendationFor.bind(this,type)); return typeRecommendations.sort(recommendationSort)[0]; }; var typeRecommendationFor=function typeRecommendationFor(type,recomendedType){ return{ type:recomendedType, distance:damerauLevenshteinDistance(type,recomendedType)}; }; var recommendationSort=function recommendationSort(recommendationA,recommendationB){ if(recommendationA.distancerecommendationB.distance){ return 1; }else{ return 0; } }; var isCloseEnough=function isCloseEnough(closestType,actualType){ return closestType.distance/actualType.length<0.334; }; var damerauLevenshteinDistance=function damerauLevenshteinDistance(a,b){ var i=void 0,j=void 0; var d=[]; for(i=0;i<=a.length;i++){ d[i]=[i]; } for(j=1;j<=b.length;j++){ d[0][j]=j; } for(i=1;i<=a.length;i++){ for(j=1;j<=b.length;j++){ var cost=a.charAt(i-1)===b.charAt(j-1)?0:1; d[i][j]=Math.min( d[i-1][j]+1, d[i][j-1]+1, d[i-1][j-1]+cost); if(i>1&&j>1&& a.charAt(i-1)===b.charAt(j-2)&& a.charAt(i-2)===b.charAt(j-1)){ d[i][j]=Math.min(d[i][j],d[i-2][j-2]+cost); } } } return d[a.length][b.length]; }; } module.exports=EventValidator; }, "EventValidator"); __d(462 /* copyProperties */, function(global, require, module, exports) { function copyProperties(obj,a,b,c,d,e,f){ obj=obj||{}; if(__DEV__){ if(f){ throw new Error('Too many arguments passed to copyProperties'); } } var args=[a,b,c,d,e]; var ii=0,v; while(args[ii]){ v=args[ii++]; for(var k in v){ obj[k]=v[k]; } if(v.hasOwnProperty&&v.hasOwnProperty('toString')&& typeof v.toString!='undefined'&&obj.toString!==v.toString){ obj.toString=v.toString; } } return obj; } module.exports=copyProperties; }, "copyProperties"); __d(463 /* TouchableWithoutFeedback */, function(global, require, module, exports) { 'use strict'; var EdgeInsetsPropType=require(117 /* EdgeInsetsPropType */); var React=require(103 /* React */); var TimerMixin=require(391 /* react-timer-mixin */); var Touchable=require(182 /* Touchable */); var View=require(116 /* View */); var ensurePositiveDelayProps=require(464 /* ensurePositiveDelayProps */); var onlyChild=require(42 /* react/lib/onlyChild */); var warning=require(44 /* fbjs/lib/warning */); var PRESS_RETENTION_OFFSET={top:20,left:20,right:20,bottom:30}; var TouchableWithoutFeedback=React.createClass({displayName:'TouchableWithoutFeedback', mixins:[TimerMixin,Touchable.Mixin], propTypes:{ accessible:React.PropTypes.bool, accessibilityComponentType:React.PropTypes.oneOf(View.AccessibilityComponentType), accessibilityTraits:React.PropTypes.oneOfType([ React.PropTypes.oneOf(View.AccessibilityTraits), React.PropTypes.arrayOf(React.PropTypes.oneOf(View.AccessibilityTraits))]), disabled:React.PropTypes.bool, onPress:React.PropTypes.func, onPressIn:React.PropTypes.func, onPressOut:React.PropTypes.func, onLayout:React.PropTypes.func, onLongPress:React.PropTypes.func, delayPressIn:React.PropTypes.number, delayPressOut:React.PropTypes.number, delayLongPress:React.PropTypes.number, pressRetentionOffset:EdgeInsetsPropType, hitSlop:EdgeInsetsPropType}, getInitialState:function getInitialState(){ return this.touchableGetInitialState(); }, componentDidMount:function componentDidMount(){ ensurePositiveDelayProps(this.props); }, componentWillReceiveProps:function componentWillReceiveProps(nextProps){ ensurePositiveDelayProps(nextProps); }, touchableHandlePress:function touchableHandlePress(e){ this.props.onPress&&this.props.onPress(e); }, touchableHandleActivePressIn:function touchableHandleActivePressIn(e){ this.props.onPressIn&&this.props.onPressIn(e); }, touchableHandleActivePressOut:function touchableHandleActivePressOut(e){ this.props.onPressOut&&this.props.onPressOut(e); }, touchableHandleLongPress:function touchableHandleLongPress(e){ this.props.onLongPress&&this.props.onLongPress(e); }, touchableGetPressRectOffset:function touchableGetPressRectOffset(){ return this.props.pressRetentionOffset||PRESS_RETENTION_OFFSET; }, touchableGetHitSlop:function touchableGetHitSlop(){ return this.props.hitSlop; }, touchableGetHighlightDelayMS:function touchableGetHighlightDelayMS(){ return this.props.delayPressIn||0; }, touchableGetLongPressDelayMS:function touchableGetLongPressDelayMS(){ return this.props.delayLongPress===0?0: this.props.delayLongPress||500; }, touchableGetPressOutDelayMS:function touchableGetPressOutDelayMS(){ return this.props.delayPressOut||0; }, render:function render(){ var child=onlyChild(this.props.children); var children=child.props.children; warning( !child.type||child.type.displayName!=='Text', 'TouchableWithoutFeedback does not work well with Text children. Wrap children in a View instead. See '+( child._owner&&child._owner.getName&&child._owner.getName()||'')); if(Touchable.TOUCH_TARGET_DEBUG&&child.type&&child.type.displayName==='View'){ if(!Array.isArray(children)){ children=[children]; } children.push(Touchable.renderDebugView({color:'red',hitSlop:this.props.hitSlop})); } var style=Touchable.TOUCH_TARGET_DEBUG&&child.type&&child.type.displayName==='Text'? [child.props.style,{color:'red'}]: child.props.style; return React.cloneElement(child,{ accessible:this.props.accessible!==false, accessibilityLabel:this.props.accessibilityLabel, accessibilityComponentType:this.props.accessibilityComponentType, accessibilityTraits:this.props.accessibilityTraits, testID:this.props.testID, onLayout:this.props.onLayout, hitSlop:this.props.hitSlop, onStartShouldSetResponder:this.touchableHandleStartShouldSetResponder, onResponderTerminationRequest:this.touchableHandleResponderTerminationRequest, onResponderGrant:this.touchableHandleResponderGrant, onResponderMove:this.touchableHandleResponderMove, onResponderRelease:this.touchableHandleResponderRelease, onResponderTerminate:this.touchableHandleResponderTerminate, style:style, children:children}); }}); module.exports=TouchableWithoutFeedback; }, "TouchableWithoutFeedback"); __d(464 /* ensurePositiveDelayProps */, function(global, require, module, exports) { 'use strict'; var invariant=require(56 /* fbjs/lib/invariant */); var ensurePositiveDelayProps=function ensurePositiveDelayProps(props){ invariant( !(props.delayPressIn<0||props.delayPressOut<0|| props.delayLongPress<0), 'Touchable components cannot have negative delay properties'); }; module.exports=ensurePositiveDelayProps; }, "ensurePositiveDelayProps"); __d(465 /* ToolbarAndroid */, function(global, require, module, exports) { 'use strict'; var Image=require(385 /* Image */); var NativeMethodsMixin=require(49 /* react/lib/NativeMethodsMixin */); var React=require(103 /* React */); var ReactNativeViewAttributes=require(128 /* ReactNativeViewAttributes */); var ReactPropTypes=require(40 /* react/lib/ReactPropTypes */); var UIManager=require(99 /* UIManager */); var View=require(116 /* View */); var ColorPropType=require(47 /* ColorPropType */); var requireNativeComponent=require(130 /* requireNativeComponent */); var resolveAssetSource=require(168 /* resolveAssetSource */); var optionalImageSource=ReactPropTypes.oneOfType([ Image.propTypes.source, ReactPropTypes.oneOf([])]); var ToolbarAndroid=React.createClass({displayName:'ToolbarAndroid', mixins:[NativeMethodsMixin], propTypes:babelHelpers.extends({}, View.propTypes,{ actions:ReactPropTypes.arrayOf(ReactPropTypes.shape({ title:ReactPropTypes.string.isRequired, icon:optionalImageSource, show:ReactPropTypes.oneOf(['always','ifRoom','never']), showWithText:ReactPropTypes.bool})), logo:optionalImageSource, navIcon:optionalImageSource, onActionSelected:ReactPropTypes.func, onIconClicked:ReactPropTypes.func, overflowIcon:optionalImageSource, subtitle:ReactPropTypes.string, subtitleColor:ColorPropType, title:ReactPropTypes.string, titleColor:ColorPropType, contentInsetStart:ReactPropTypes.number, contentInsetEnd:ReactPropTypes.number, rtl:ReactPropTypes.bool, testID:ReactPropTypes.string}), render:function render(){ var nativeProps=babelHelpers.extends({}, this.props); if(this.props.logo){ nativeProps.logo=resolveAssetSource(this.props.logo); } if(this.props.navIcon){ nativeProps.navIcon=resolveAssetSource(this.props.navIcon); } if(this.props.overflowIcon){ nativeProps.overflowIcon=resolveAssetSource(this.props.overflowIcon); } if(this.props.actions){ var nativeActions=[]; for(var i=0;i. Was '+child.type.displayName); } return ReactElement.createElement(child.type,newProps); }); }, _onPageScroll:function _onPageScroll(e){ if(this.props.onPageScroll){ this.props.onPageScroll(e); } if(this.props.keyboardDismissMode==='on-drag'){ dismissKeyboard(); } }, _onPageScrollStateChanged:function _onPageScrollStateChanged(e){ if(this.props.onPageScrollStateChanged){ this.props.onPageScrollStateChanged(e.nativeEvent.pageScrollState); } }, _onPageSelected:function _onPageSelected(e){ if(this.props.onPageSelected){ this.props.onPageSelected(e); } }, setPage:function setPage(selectedPage){ UIManager.dispatchViewManagerCommand( ReactNative.findNodeHandle(this), UIManager.AndroidViewPager.Commands.setPage, [selectedPage]); }, setPageWithoutAnimation:function setPageWithoutAnimation(selectedPage){ UIManager.dispatchViewManagerCommand( ReactNative.findNodeHandle(this), UIManager.AndroidViewPager.Commands.setPageWithoutAnimation, [selectedPage]); }, render:function render(){ return( React.createElement(NativeAndroidViewPager,babelHelpers.extends({}, this.props,{ ref:VIEWPAGER_REF, style:this.props.style, onPageScroll:this._onPageScroll, onPageScrollStateChanged:this._onPageScrollStateChanged, onPageSelected:this._onPageSelected, children:this._childrenWithOverridenStyle()}))); }}); var NativeAndroidViewPager=requireNativeComponent('AndroidViewPager',ViewPagerAndroid); module.exports=ViewPagerAndroid; }, "ViewPagerAndroid"); __d(471 /* WebView */, function(global, require, module, exports) { 'use strict'; var EdgeInsetsPropType=require(117 /* EdgeInsetsPropType */); var ActivityIndicator=require(46 /* ActivityIndicator */); var React=require(103 /* React */); var ReactNative=require(188 /* react/lib/ReactNative */); var ReactNativeViewAttributes=require(128 /* ReactNativeViewAttributes */); var StyleSheet=require(104 /* StyleSheet */); var UIManager=require(99 /* UIManager */); var View=require(116 /* View */); var deprecatedPropType=require(113 /* deprecatedPropType */); var keyMirror=require(72 /* fbjs/lib/keyMirror */); var merge=require(119 /* merge */); var requireNativeComponent=require(130 /* requireNativeComponent */); var resolveAssetSource=require(168 /* resolveAssetSource */); var PropTypes=React.PropTypes; var RCT_WEBVIEW_REF='webview'; var WebViewState=keyMirror({ IDLE:null, LOADING:null, ERROR:null}); var defaultRenderLoading=function defaultRenderLoading(){return( React.createElement(View,{style:styles.loadingView}, React.createElement(ActivityIndicator,{ style:styles.loadingProgressBar})));}; var WebView=React.createClass({displayName:'WebView', propTypes:babelHelpers.extends({}, View.propTypes,{ renderError:PropTypes.func, renderLoading:PropTypes.func, onLoad:PropTypes.func, onLoadEnd:PropTypes.func, onLoadStart:PropTypes.func, onError:PropTypes.func, automaticallyAdjustContentInsets:PropTypes.bool, contentInset:EdgeInsetsPropType, onNavigationStateChange:PropTypes.func, startInLoadingState:PropTypes.bool, style:View.propTypes.style, html:deprecatedPropType( PropTypes.string, 'Use the `source` prop instead.'), url:deprecatedPropType( PropTypes.string, 'Use the `source` prop instead.'), source:PropTypes.oneOfType([ PropTypes.shape({ uri:PropTypes.string, method:PropTypes.oneOf(['GET','POST']), headers:PropTypes.object, body:PropTypes.string}), PropTypes.shape({ html:PropTypes.string, baseUrl:PropTypes.string}), PropTypes.number]), javaScriptEnabled:PropTypes.bool, domStorageEnabled:PropTypes.bool, injectedJavaScript:PropTypes.string, scalesPageToFit:PropTypes.bool, userAgent:PropTypes.string, testID:PropTypes.string, mediaPlaybackRequiresUserAction:PropTypes.bool}), getInitialState:function getInitialState(){ return{ viewState:WebViewState.IDLE, lastErrorEvent:null, startInLoadingState:true}; }, getDefaultProps:function getDefaultProps(){ return{ javaScriptEnabled:true, scalesPageToFit:true}; }, componentWillMount:function componentWillMount(){ if(this.props.startInLoadingState){ this.setState({viewState:WebViewState.LOADING}); } }, render:function render(){ var otherView=null; if(this.state.viewState===WebViewState.LOADING){ otherView=(this.props.renderLoading||defaultRenderLoading)(); }else if(this.state.viewState===WebViewState.ERROR){ var errorEvent=this.state.lastErrorEvent; otherView=this.props.renderError&&this.props.renderError( errorEvent.domain, errorEvent.code, errorEvent.description); }else if(this.state.viewState!==WebViewState.IDLE){ console.error('RCTWebView invalid state encountered: '+this.state.loading); } var webViewStyles=[styles.container,this.props.style]; if(this.state.viewState===WebViewState.LOADING|| this.state.viewState===WebViewState.ERROR){ webViewStyles.push(styles.hidden); } var source=this.props.source||{}; if(this.props.html){ source.html=this.props.html; }else if(this.props.url){ source.uri=this.props.url; } if(source.method==='POST'&&source.headers){ console.warn('WebView: `source.headers` is not supported when using POST.'); }else if(source.method==='GET'&&source.body){ console.warn('WebView: `source.body` is not supported when using GET.'); } var webView= React.createElement(RCTWebView,{ ref:RCT_WEBVIEW_REF, key:'webViewKey', style:webViewStyles, source:resolveAssetSource(source), scalesPageToFit:this.props.scalesPageToFit, injectedJavaScript:this.props.injectedJavaScript, userAgent:this.props.userAgent, javaScriptEnabled:this.props.javaScriptEnabled, domStorageEnabled:this.props.domStorageEnabled, contentInset:this.props.contentInset, automaticallyAdjustContentInsets:this.props.automaticallyAdjustContentInsets, onLoadingStart:this.onLoadingStart, onLoadingFinish:this.onLoadingFinish, onLoadingError:this.onLoadingError, testID:this.props.testID, mediaPlaybackRequiresUserAction:this.props.mediaPlaybackRequiresUserAction}); return( React.createElement(View,{style:styles.container}, webView, otherView)); }, goForward:function goForward(){ UIManager.dispatchViewManagerCommand( this.getWebViewHandle(), UIManager.RCTWebView.Commands.goForward, null); }, goBack:function goBack(){ UIManager.dispatchViewManagerCommand( this.getWebViewHandle(), UIManager.RCTWebView.Commands.goBack, null); }, reload:function reload(){ UIManager.dispatchViewManagerCommand( this.getWebViewHandle(), UIManager.RCTWebView.Commands.reload, null); }, stopLoading:function stopLoading(){ UIManager.dispatchViewManagerCommand( this.getWebViewHandle(), UIManager.RCTWebView.Commands.stopLoading, null); }, updateNavigationState:function updateNavigationState(event){ if(this.props.onNavigationStateChange){ this.props.onNavigationStateChange(event.nativeEvent); } }, getWebViewHandle:function getWebViewHandle(){ return ReactNative.findNodeHandle(this.refs[RCT_WEBVIEW_REF]); }, onLoadingStart:function onLoadingStart(event){ var onLoadStart=this.props.onLoadStart; onLoadStart&&onLoadStart(event); this.updateNavigationState(event); }, onLoadingError:function onLoadingError(event){ event.persist();var _props= this.props;var onError=_props.onError;var onLoadEnd=_props.onLoadEnd; onError&&onError(event); onLoadEnd&&onLoadEnd(event); console.error('Encountered an error loading page',event.nativeEvent); this.setState({ lastErrorEvent:event.nativeEvent, viewState:WebViewState.ERROR}); }, onLoadingFinish:function onLoadingFinish(event){var _props2= this.props;var onLoad=_props2.onLoad;var onLoadEnd=_props2.onLoadEnd; onLoad&&onLoad(event); onLoadEnd&&onLoadEnd(event); this.setState({ viewState:WebViewState.IDLE}); this.updateNavigationState(event); }}); var RCTWebView=requireNativeComponent('RCTWebView',WebView); var styles=StyleSheet.create({ container:{ flex:1}, hidden:{ height:0, flex:0}, loadingView:{ flex:1, justifyContent:'center', alignItems:'center'}, loadingProgressBar:{ height:20}}); module.exports=WebView; }, "WebView"); __d(472 /* ActionSheetIOS */, function(global, require, module, exports) { 'use strict'; var RCTActionSheetManager=require(60 /* NativeModules */).ActionSheetManager; var invariant=require(56 /* fbjs/lib/invariant */); var processColor=require(124 /* processColor */); var ActionSheetIOS={ showActionSheetWithOptions:function showActionSheetWithOptions(options,callback){ invariant( typeof options==='object'&&options!==null, 'Options must be a valid object'); invariant( typeof callback==='function', 'Must provide a valid callback'); RCTActionSheetManager.showActionSheetWithOptions(babelHelpers.extends({}, options,{tintColor:processColor(options.tintColor)}), callback); }, showShareActionSheetWithOptions:function showShareActionSheetWithOptions( options, failureCallback, successCallback) { invariant( typeof options==='object'&&options!==null, 'Options must be a valid object'); invariant( typeof failureCallback==='function', 'Must provide a valid failureCallback'); invariant( typeof successCallback==='function', 'Must provide a valid successCallback'); RCTActionSheetManager.showShareActionSheetWithOptions(babelHelpers.extends({}, options,{tintColor:processColor(options.tintColor)}), failureCallback, successCallback); }}; module.exports=ActionSheetIOS; }, "ActionSheetIOS"); __d(473 /* AdSupportIOS */, function(global, require, module, exports) { 'use strict'; var AdSupport=require(60 /* NativeModules */).AdSupport; module.exports={ getAdvertisingId:function getAdvertisingId(onSuccess,onFailure){ AdSupport.getAdvertisingId(onSuccess,onFailure); }, getAdvertisingTrackingEnabled:function getAdvertisingTrackingEnabled(onSuccess,onFailure){ AdSupport.getAdvertisingTrackingEnabled(onSuccess,onFailure); }}; }, "AdSupportIOS"); __d(474 /* AppRegistry */, function(global, require, module, exports) { 'use strict'; var BatchedBridge=require(61 /* BatchedBridge */); var BugReporting=require(475 /* BugReporting */); var ReactNative=require(188 /* react/lib/ReactNative */); var invariant=require(56 /* fbjs/lib/invariant */); var renderApplication=require(478 /* renderApplication */); var infoLog=require(409 /* infoLog */); if(__DEV__){ require(495 /* RCTRenderingPerf */); } var runnables={}; var runCount=1; var AppRegistry={ registerConfig:function registerConfig(config){ for(var i=0;i=_iterator.length)break;_ref3=_iterator[_i++];}else{_i=_iterator.next();if(_i.done)break;_ref3=_i.value;}var _ref=_ref3;var _ref2=babelHelpers.slicedToArray(_ref,2);var _key=_ref2[0];var callback=_ref2[1]; extraData[_key]=callback(); } var fileData={}; for(var _iterator2=BugReporting._fileSources,_isArray2=Array.isArray(_iterator2),_i2=0,_iterator2=_isArray2?_iterator2:_iterator2[typeof Symbol==='function'?Symbol.iterator:'@@iterator']();;){var _ref6;if(_isArray2){if(_i2>=_iterator2.length)break;_ref6=_iterator2[_i2++];}else{_i2=_iterator2.next();if(_i2.done)break;_ref6=_i2.value;}var _ref4=_ref6;var _ref5=babelHelpers.slicedToArray(_ref4,2);var _key2=_ref5[0];var _callback=_ref5[1]; fileData[_key2]=_callback(); } infoLog('BugReporting extraData:',extraData); var BugReportingNativeModule=require(60 /* NativeModules */).BugReporting; BugReportingNativeModule&& BugReportingNativeModule.setExtraData&& BugReportingNativeModule.setExtraData(extraData,fileData); return{extras:extraData,files:fileData}; }}]);return BugReporting;}();BugReporting._extraSources=new Map();BugReporting._fileSources=new Map();BugReporting._subscription=null; module.exports=BugReporting; }, "BugReporting"); __d(476 /* dumpReactTree */, function(global, require, module, exports) { 'use strict'; var ReactNativeMount=require(222 /* react/lib/ReactNativeMount */); var getReactData=require(477 /* getReactData */); var INDENTATION_SIZE=2; var MAX_DEPTH=2; var MAX_STRING_LENGTH=50; function dumpReactTree(){ try{ return getReactTree(); }catch(e){ return'Failed to dump react tree: '+e; } } function getReactTree(){ var output=''; var rootIds=Object.getOwnPropertyNames(ReactNativeMount._instancesByContainerID); for(var _iterator=rootIds,_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 rootId=_ref; var instance=ReactNativeMount._instancesByContainerID[rootId]; output+='============ Root ID: '+rootId+' ============\n'; output+=dumpNode(instance,0); output+='============ End root ID: '+rootId+' ============\n'; } return output; } function dumpNode(node,identation){ var data=getReactData(node); if(data.nodeType==='Text'){ return indent(identation)+data.text+'\n'; }else if(data.nodeType==='Empty'){ return''; } var output=indent(identation)+('<'+data.name); if(data.nodeType==='Composite'){ for(var _iterator2=Object.getOwnPropertyNames(data.props||{}),_isArray2=Array.isArray(_iterator2),_i2=0,_iterator2=_isArray2?_iterator2:_iterator2[typeof Symbol==='function'?Symbol.iterator:'@@iterator']();;){var _ref2;if(_isArray2){if(_i2>=_iterator2.length)break;_ref2=_iterator2[_i2++];}else{_i2=_iterator2.next();if(_i2.done)break;_ref2=_i2.value;}var propName=_ref2; if(isNormalProp(propName)){ try{ var value=convertValue(data.props[propName]); if(value){ output+=' '+propName+'='+value; } }catch(e){ var message='[Failed to get property: '+e+']'; output+=' '+propName+'='+message; } } } } var childOutput=''; for(var _iterator3=data.children||[],_isArray3=Array.isArray(_iterator3),_i3=0,_iterator3=_isArray3?_iterator3:_iterator3[typeof Symbol==='function'?Symbol.iterator:'@@iterator']();;){var _ref3;if(_isArray3){if(_i3>=_iterator3.length)break;_ref3=_iterator3[_i3++];}else{_i3=_iterator3.next();if(_i3.done)break;_ref3=_i3.value;}var child=_ref3; childOutput+=dumpNode(child,identation+1); } if(childOutput){ output+='>\n'+childOutput+indent(identation)+('\n'); }else{ output+=' />\n'; } return output; } function isNormalProp(name){ switch(name){ case'children': case'key': case'ref': return false; default: return true;} } function convertObject(object,depth){ if(depth>=MAX_DEPTH){ return'[...omitted]'; } var output='{'; var first=true; for(var _iterator4=Object.getOwnPropertyNames(object),_isArray4=Array.isArray(_iterator4),_i4=0,_iterator4=_isArray4?_iterator4:_iterator4[typeof Symbol==='function'?Symbol.iterator:'@@iterator']();;){var _ref4;if(_isArray4){if(_i4>=_iterator4.length)break;_ref4=_iterator4[_i4++];}else{_i4=_iterator4.next();if(_i4.done)break;_ref4=_i4.value;}var key=_ref4; if(!first){ output+=', '; } output+=key+': '+convertValue(object[key],depth+1); first=false; } return output+'}'; } function convertValue(value){var depth=arguments.length<=1||arguments[1]===undefined?0:arguments[1]; if(!value){ return null; } switch(typeof value){ case'string': return JSON.stringify(possiblyEllipsis(value).replace('\n','\\n')); case'boolean': case'number': return JSON.stringify(value); case'function': return'[function]'; case'object': return convertObject(value,depth); default: return null;} } function possiblyEllipsis(value){ if(value.length>MAX_STRING_LENGTH){ return value.slice(0,MAX_STRING_LENGTH)+'...'; }else{ return value; } } function indent(size){ return' '.repeat(size*INDENTATION_SIZE); } module.exports=dumpReactTree; }, "dumpReactTree"); __d(477 /* getReactData */, function(global, require, module, exports) { 'use strict'; function getData(element){ var children=null; var props=null; var state=null; var context=null; var updater=null; var name=null; var type=null; var text=null; var publicInstance=null; var nodeType='Native'; if(typeof element!=='object'){ nodeType='Text'; text=element+''; }else if(element._currentElement===null||element._currentElement===false){ nodeType='Empty'; }else if(element._renderedComponent){ nodeType='NativeWrapper'; children=[element._renderedComponent]; props=element._instance.props; state=element._instance.state; context=element._instance.context; if(context&&Object.keys(context).length===0){ context=null; } }else if(element._renderedChildren){ children=childrenList(element._renderedChildren); }else if(element._currentElement&&element._currentElement.props){ children=element._currentElement.props.children; } if(!props&&element._currentElement&&element._currentElement.props){ props=element._currentElement.props; } if(element._currentElement!=null){ type=element._currentElement.type; if(typeof type==='string'){ name=type; }else if(element.getName){ nodeType='Composite'; name=element.getName(); if(element._renderedComponent&&element._currentElement.props===element._renderedComponent._currentElement){ nodeType='Wrapper'; } if(name===null){ name='No display name'; } }else if(element._stringText){ nodeType='Text'; text=element._stringText; }else{ name=type.displayName||type.name||'Unknown'; } } if(element._instance){ var inst=element._instance; updater={ setState:inst.setState&&inst.setState.bind(inst), forceUpdate:inst.forceUpdate&&inst.forceUpdate.bind(inst), setInProps:inst.forceUpdate&&setInProps.bind(null,element), setInState:inst.forceUpdate&&setInState.bind(null,inst), setInContext:inst.forceUpdate&&setInContext.bind(null,inst)}; publicInstance=inst; if(inst._renderedChildren){ children=childrenList(inst._renderedChildren); } } return{ nodeType:nodeType, type:type, name:name, props:props, state:state, context:context, children:children, text:text, updater:updater, publicInstance:publicInstance}; } function setInProps(internalInst,path,value){ var element=internalInst._currentElement; internalInst._currentElement=babelHelpers.extends({}, element,{ props:copyWithSet(element.props,path,value)}); internalInst._instance.forceUpdate(); } function setInState(inst,path,value){ setIn(inst.state,path,value); inst.forceUpdate(); } function setInContext(inst,path,value){ setIn(inst.context,path,value); inst.forceUpdate(); } function setIn(obj,path,value){ var last=path.pop(); var parent=path.reduce(function(obj_,attr){return obj_?obj_[attr]:null;},obj); if(parent){ parent[last]=value; } } function childrenList(children){ var res=[]; for(var name in children){ res.push(children[name]); } return res; } function copyWithSetImpl(obj,path,idx,value){ if(idx>=path.length){ return value; } var key=path[idx]; var updated=Array.isArray(obj)?obj.slice():babelHelpers.extends({},obj); updated[key]=copyWithSetImpl(obj[key],path,idx+1,value); return updated; } function copyWithSet(obj,path,value){ return copyWithSetImpl(obj,path,0,value); } module.exports=getData; }, "getReactData"); __d(478 /* renderApplication */, function(global, require, module, exports) { 'use strict'; var AppContainer=require(479 /* AppContainer */); var React=require(103 /* React */); var ReactNative=require(188 /* react/lib/ReactNative */); var invariant=require(56 /* fbjs/lib/invariant */); require(494 /* BackAndroid */); function renderApplication( RootComponent, initialProps, rootTag) { invariant( rootTag, 'Expect to have a valid rootTag, instead got ',rootTag); ReactNative.render( React.createElement(AppContainer,null, React.createElement(RootComponent,babelHelpers.extends({}, initialProps,{ rootTag:rootTag}))), rootTag); } module.exports=renderApplication; }, "renderApplication"); __d(479 /* AppContainer */, function(global, require, module, exports) { 'use strict'; var RCTDeviceEventEmitter=require(86 /* RCTDeviceEventEmitter */); var React=require(103 /* React */); var ReactNative=require(188 /* react/lib/ReactNative */); var Subscribable=require(398 /* Subscribable */); var StyleSheet=require(104 /* StyleSheet */); var View=require(116 /* View */); var Inspector=__DEV__?require(480 /* Inspector */):null; var YellowBox=__DEV__?require(493 /* YellowBox */):null; var AppContainer=React.createClass({displayName:'AppContainer', mixins:[Subscribable.Mixin], getInitialState:function getInitialState(){ return{inspector:null,mainKey:1}; }, toggleElementInspector:function toggleElementInspector(){var _this=this; var inspector=!__DEV__||this.state.inspector? null: React.createElement(Inspector,{ inspectedViewTag:ReactNative.findNodeHandle(this.refs.main), onRequestRerenderApp:function onRequestRerenderApp(updateInspectedViewTag){ _this.setState( function(s){return{mainKey:s.mainKey+1};}, function(){return updateInspectedViewTag(ReactNative.findNodeHandle(_this.refs.main));}); }}); this.setState({inspector:inspector}); }, componentDidMount:function componentDidMount(){ this.addListenerOn( RCTDeviceEventEmitter, 'toggleElementInspector', this.toggleElementInspector); }, render:function render(){ var yellowBox=null; if(__DEV__){ yellowBox=React.createElement(YellowBox,null); } return( React.createElement(View,{style:styles.appContainer}, React.createElement(View,{ collapsable:!this.state.inspector, key:this.state.mainKey, style:styles.appContainer,ref:'main'}, this.props.children), yellowBox, this.state.inspector)); }}); var styles=StyleSheet.create({ appContainer:{ flex:1}}); module.exports=AppContainer; }, "AppContainer"); __d(480 /* Inspector */, function(global, require, module, exports) { 'use strict'; var Dimensions=require(106 /* Dimensions */); var InspectorOverlay=require(481 /* InspectorOverlay */); var InspectorPanel=require(486 /* InspectorPanel */); var InspectorUtils=require(482 /* InspectorUtils */); var React=require(103 /* React */); var StyleSheet=require(104 /* StyleSheet */); var Touchable=require(182 /* Touchable */); var UIManager=require(99 /* UIManager */); var View=require(116 /* View */); if(window.__REACT_DEVTOOLS_GLOBAL_HOOK__){ window.__REACT_DEVTOOLS_GLOBAL_HOOK__.resolveRNStyle=require(55 /* flattenStyle */); }var Inspector=function(_React$Component){babelHelpers.inherits(Inspector,_React$Component); function Inspector(props){babelHelpers.classCallCheck(this,Inspector);var _this=babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(Inspector).call(this, props)); _this.state={ devtoolsAgent:null, hierarchy:null, panelPos:'bottom', inspecting:true, perfing:false, inspected:null, selection:null, inspectedViewTag:_this.props.inspectedViewTag};return _this; }babelHelpers.createClass(Inspector,[{key:'componentDidMount',value:function componentDidMount() { if(window.__REACT_DEVTOOLS_GLOBAL_HOOK__){ this.attachToDevtools=this.attachToDevtools.bind(this); window.__REACT_DEVTOOLS_GLOBAL_HOOK__.on('react-devtools',this.attachToDevtools); if(window.__REACT_DEVTOOLS_GLOBAL_HOOK__.reactDevtoolsAgent){ this.attachToDevtools(window.__REACT_DEVTOOLS_GLOBAL_HOOK__.reactDevtoolsAgent); } } }},{key:'componentWillUnmount',value:function componentWillUnmount() { if(this._subs){ this._subs.map(function(fn){return fn();}); } if(window.__REACT_DEVTOOLS_GLOBAL_HOOK__){ window.__REACT_DEVTOOLS_GLOBAL_HOOK__.off('react-devtools',this.attachToDevtools); } }},{key:'componentWillReceiveProps',value:function componentWillReceiveProps( newProps){ this.setState({inspectedViewTag:newProps.inspectedViewTag}); }},{key:'attachToDevtools',value:function attachToDevtools( agent){var _this2=this; var _hideWait=null; var hlSub=agent.sub('highlight',function(_ref){var node=_ref.node;var name=_ref.name;var props=_ref.props; clearTimeout(_hideWait); UIManager.measure(node,function(x,y,width,height,left,top){ _this2.setState({ hierarchy:[], inspected:{ frame:{left:left,top:top,width:width,height:height}, style:props?props.style:{}}}); }); }); var hideSub=agent.sub('hideHighlight',function(){ if(_this2.state.inspected===null){ return; } _hideWait=setTimeout(function(){ _this2.setState({ inspected:null}); },100); }); this._subs=[hlSub,hideSub]; agent.on('shutdown',function(){ _this2.setState({devtoolsAgent:null}); _this2._subs=null; }); this.setState({ devtoolsAgent:agent}); }},{key:'setSelection',value:function setSelection( i){var _this3=this; var instance=this.state.hierarchy[i]; var publicInstance=instance['_instance']||{}; var source=instance['_currentElement']&&instance['_currentElement']['_source']; UIManager.measure(instance.getHostNode(),function(x,y,width,height,left,top){ _this3.setState({ inspected:{ frame:{left:left,top:top,width:width,height:height}, style:publicInstance.props?publicInstance.props.style:{}, source:source}, selection:i}); }); }},{key:'onTouchInstance',value:function onTouchInstance( touched,frame,pointerY){ var hierarchy=InspectorUtils.getOwnerHierarchy(touched); var instance=InspectorUtils.lastNotNativeInstance(hierarchy); if(this.state.devtoolsAgent){ this.state.devtoolsAgent.selectFromReactInstance(instance,true); } var publicInstance=instance['_instance']||{}; var props=publicInstance.props||{}; var source=instance['_currentElement']&&instance['_currentElement']['_source']; this.setState({ panelPos:pointerY>Dimensions.get('window').height/2?'top':'bottom', selection:hierarchy.indexOf(instance), hierarchy:hierarchy, inspected:{ style:props.style||{}, frame:frame, source:source}}); }},{key:'setPerfing',value:function setPerfing( val){ this.setState({ perfing:val, inspecting:false, inspected:null}); }},{key:'setInspecting',value:function setInspecting( val){ this.setState({ inspecting:val, inspected:null}); }},{key:'setTouchTargetting',value:function setTouchTargetting( val){var _this4=this; Touchable.TOUCH_TARGET_DEBUG=val; this.props.onRequestRerenderApp(function(inspectedViewTag){ _this4.setState({inspectedViewTag:inspectedViewTag}); }); }},{key:'render',value:function render() { var panelContainerStyle=this.state.panelPos==='bottom'?{bottom:0}:{top:0}; return( React.createElement(View,{style:styles.container,pointerEvents:'box-none'}, this.state.inspecting&& React.createElement(InspectorOverlay,{ inspected:this.state.inspected, inspectedViewTag:this.state.inspectedViewTag, onTouchInstance:this.onTouchInstance.bind(this)}), React.createElement(View,{style:[styles.panelContainer,panelContainerStyle]}, React.createElement(InspectorPanel,{ devtoolsIsOpen:!!this.state.devtoolsAgent, inspecting:this.state.inspecting, perfing:this.state.perfing, setPerfing:this.setPerfing.bind(this), setInspecting:this.setInspecting.bind(this), inspected:this.state.inspected, hierarchy:this.state.hierarchy, selection:this.state.selection, setSelection:this.setSelection.bind(this), touchTargetting:Touchable.TOUCH_TARGET_DEBUG, setTouchTargetting:this.setTouchTargetting.bind(this)})))); }}]);return Inspector;}(React.Component); var styles=StyleSheet.create({ container:{ position:'absolute', backgroundColor:'transparent', top:0, left:0, right:0, bottom:0}, panelContainer:{ position:'absolute', left:0, right:0}}); module.exports=Inspector; }, "Inspector"); __d(481 /* InspectorOverlay */, function(global, require, module, exports) { 'use strict'; var Dimensions=require(106 /* Dimensions */); var InspectorUtils=require(482 /* InspectorUtils */); var React=require(103 /* React */); var StyleSheet=require(104 /* StyleSheet */); var UIManager=require(99 /* UIManager */); var View=require(116 /* View */); var ElementBox=require(483 /* ElementBox */); var PropTypes=React.PropTypes; var InspectorOverlay=React.createClass({displayName:'InspectorOverlay', propTypes:{ inspected:PropTypes.shape({ frame:PropTypes.object, style:PropTypes.any}), inspectedViewTag:PropTypes.number, onTouchInstance:PropTypes.func.isRequired}, findViewForTouchEvent:function findViewForTouchEvent(e){var _this=this;var _e$nativeEvent$touche= e.nativeEvent.touches[0];var locationX=_e$nativeEvent$touche.locationX;var locationY=_e$nativeEvent$touche.locationY; UIManager.findSubviewIn( this.props.inspectedViewTag, [locationX,locationY], function(nativeViewTag,left,top,width,height){ var instance=InspectorUtils.findInstanceByNativeTag(nativeViewTag); if(!instance){ return; } _this.props.onTouchInstance(instance,{left:left,top:top,width:width,height:height},locationY); }); }, shouldSetResponser:function shouldSetResponser(e){ this.findViewForTouchEvent(e); return true; }, render:function render(){ var content=null; if(this.props.inspected){ content=React.createElement(ElementBox,{frame:this.props.inspected.frame,style:this.props.inspected.style}); } return( React.createElement(View,{ onStartShouldSetResponder:this.shouldSetResponser, onResponderMove:this.findViewForTouchEvent, style:[styles.inspector,{height:Dimensions.get('window').height}]}, content)); }}); var styles=StyleSheet.create({ inspector:{ backgroundColor:'transparent', position:'absolute', left:0, top:0, right:0}}); module.exports=InspectorOverlay; }, "InspectorOverlay"); __d(482 /* InspectorUtils */, function(global, require, module, exports) { 'use strict'; var ReactNativeComponentTree=require(134 /* react/lib/ReactNativeComponentTree */); function traverseOwnerTreeUp(hierarchy,instance){ if(instance){ hierarchy.unshift(instance); traverseOwnerTreeUp(hierarchy,instance._currentElement._owner); } } function findInstanceByNativeTag(nativeTag){ return ReactNativeComponentTree.getInstanceFromNode(nativeTag); } function getOwnerHierarchy(instance){ var hierarchy=[]; traverseOwnerTreeUp(hierarchy,instance); return hierarchy; } function lastNotNativeInstance(hierarchy){ for(var i=hierarchy.length-1;i>1;i--){ var instance=hierarchy[i]; if(!instance.viewConfig){ return instance; } } return hierarchy[0]; } module.exports={findInstanceByNativeTag:findInstanceByNativeTag,getOwnerHierarchy:getOwnerHierarchy,lastNotNativeInstance:lastNotNativeInstance}; }, "InspectorUtils"); __d(483 /* ElementBox */, function(global, require, module, exports) { 'use strict'; var React=require(103 /* React */); var View=require(116 /* View */); var StyleSheet=require(104 /* StyleSheet */); var BorderBox=require(484 /* BorderBox */); var resolveBoxStyle=require(485 /* resolveBoxStyle */); var flattenStyle=require(55 /* flattenStyle */);var ElementBox=function(_React$Component){babelHelpers.inherits(ElementBox,_React$Component);function ElementBox(){babelHelpers.classCallCheck(this,ElementBox);return babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(ElementBox).apply(this,arguments));}babelHelpers.createClass(ElementBox,[{key:'render',value:function render() { var style=flattenStyle(this.props.style)||{}; var margin=resolveBoxStyle('margin',style); var padding=resolveBoxStyle('padding',style); var frameStyle=this.props.frame; if(margin){ frameStyle={ top:frameStyle.top-margin.top, left:frameStyle.left-margin.left, height:frameStyle.height+margin.top+margin.bottom, width:frameStyle.width+margin.left+margin.right}; } var contentStyle={ width:this.props.frame.width, height:this.props.frame.height}; if(padding){ contentStyle={ width:contentStyle.width-padding.left-padding.right, height:contentStyle.height-padding.top-padding.bottom}; } return( React.createElement(View,{style:[styles.frame,frameStyle],pointerEvents:'none'}, React.createElement(BorderBox,{box:margin,style:styles.margin}, React.createElement(BorderBox,{box:padding,style:styles.padding}, React.createElement(View,{style:[styles.content,contentStyle]}))))); }}]);return ElementBox;}(React.Component); var styles=StyleSheet.create({ frame:{ position:'absolute'}, content:{ backgroundColor:'rgba(200, 230, 255, 0.8)'}, padding:{ borderColor:'rgba(77, 255, 0, 0.3)'}, margin:{ borderColor:'rgba(255, 132, 0, 0.3)'}}); module.exports=ElementBox; }, "ElementBox"); __d(484 /* BorderBox */, function(global, require, module, exports) { 'use strict'; var React=require(103 /* React */); var View=require(116 /* View */);var BorderBox=function(_React$Component){babelHelpers.inherits(BorderBox,_React$Component);function BorderBox(){babelHelpers.classCallCheck(this,BorderBox);return babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(BorderBox).apply(this,arguments));}babelHelpers.createClass(BorderBox,[{key:'render',value:function render() { var box=this.props.box; if(!box){ return this.props.children; } var style={ borderTopWidth:box.top, borderBottomWidth:box.bottom, borderLeftWidth:box.left, borderRightWidth:box.right}; return( React.createElement(View,{style:[style,this.props.style]}, this.props.children)); }}]);return BorderBox;}(React.Component); module.exports=BorderBox; }, "BorderBox"); __d(485 /* resolveBoxStyle */, function(global, require, module, exports) { 'use strict'; function resolveBoxStyle(prefix,style){ var res={}; var subs=['top','left','bottom','right']; var set=false; subs.forEach(function(sub){ res[sub]=style[prefix]||0; }); if(style[prefix]){ set=true; } if(style[prefix+'Vertical']){ res.top=res.bottom=style[prefix+'Vertical']; set=true; } if(style[prefix+'Horizontal']){ res.left=res.right=style[prefix+'Horizontal']; set=true; } subs.forEach(function(sub){ var val=style[prefix+capFirst(sub)]; if(val){ res[sub]=val; set=true; } }); if(!set){ return; } return res; } function capFirst(text){ return text[0].toUpperCase()+text.slice(1); } module.exports=resolveBoxStyle; }, "resolveBoxStyle"); __d(486 /* InspectorPanel */, function(global, require, module, exports) { 'use strict'; var React=require(103 /* React */); var StyleSheet=require(104 /* StyleSheet */); var Text=require(181 /* Text */); var View=require(116 /* View */); var ElementProperties=require(487 /* ElementProperties */); var PerformanceOverlay=require(492 /* PerformanceOverlay */); var Touchable=require(182 /* Touchable */); var TouchableHighlight=require(466 /* TouchableHighlight */); var PropTypes=React.PropTypes;var InspectorPanel=function(_React$Component){babelHelpers.inherits(InspectorPanel,_React$Component);function InspectorPanel(){babelHelpers.classCallCheck(this,InspectorPanel);return babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(InspectorPanel).apply(this,arguments));}babelHelpers.createClass(InspectorPanel,[{key:'renderWaiting',value:function renderWaiting() { if(this.props.inspecting){ return( React.createElement(Text,{style:styles.waitingText},'Tap something to inspect it')); } return React.createElement(Text,{style:styles.waitingText},'Nothing is inspected'); }},{key:'render',value:function render() { var contents; if(this.props.inspected){ contents= React.createElement(ElementProperties,{ style:this.props.inspected.style, frame:this.props.inspected.frame, source:this.props.inspected.source, hierarchy:this.props.hierarchy, selection:this.props.selection, setSelection:this.props.setSelection}); }else if(this.props.perfing){ contents= React.createElement(PerformanceOverlay,null); }else{ contents= React.createElement(View,{style:styles.waiting}, this.renderWaiting()); } return( React.createElement(View,{style:styles.container}, !this.props.devtoolsIsOpen&&contents, React.createElement(View,{style:styles.buttonRow}, React.createElement(Button,{ title:'Inspect', pressed:this.props.inspecting, onClick:this.props.setInspecting}), React.createElement(Button,{title:'Perf', pressed:this.props.perfing, onClick:this.props.setPerfing}), React.createElement(Button,{title:'Touchables', pressed:this.props.touchTargetting, onClick:this.props.setTouchTargetting})))); }}]);return InspectorPanel;}(React.Component); InspectorPanel.propTypes={ devtoolsIsOpen:PropTypes.bool, inspecting:PropTypes.bool, setInspecting:PropTypes.func, inspected:PropTypes.object, perfing:PropTypes.bool, setPerfing:PropTypes.func, touchTargetting:PropTypes.bool, setTouchTargetting:PropTypes.func};var Button=function(_React$Component2){babelHelpers.inherits(Button,_React$Component2);function Button(){babelHelpers.classCallCheck(this,Button);return babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(Button).apply(this,arguments));}babelHelpers.createClass(Button,[{key:'render',value:function render() {var _this3=this; return( React.createElement(TouchableHighlight,{onPress:function onPress(){return _this3.props.onClick(!_this3.props.pressed);},style:[ styles.button, this.props.pressed&&styles.buttonPressed]}, React.createElement(Text,{style:styles.buttonText},this.props.title))); }}]);return Button;}(React.Component); var styles=StyleSheet.create({ buttonRow:{ flexDirection:'row'}, button:{ backgroundColor:'rgba(0, 0, 0, 0.3)', margin:2, height:30, justifyContent:'center', alignItems:'center'}, buttonPressed:{ backgroundColor:'rgba(255, 255, 255, 0.3)'}, buttonText:{ textAlign:'center', color:'white', margin:5}, container:{ backgroundColor:'rgba(0, 0, 0, 0.7)'}, waiting:{ height:100}, waitingText:{ fontSize:20, textAlign:'center', marginVertical:20, color:'white'}}); module.exports=InspectorPanel; }, "InspectorPanel"); __d(487 /* ElementProperties */, function(global, require, module, exports) { 'use strict'; var BoxInspector=require(488 /* BoxInspector */); var PropTypes=require(40 /* react/lib/ReactPropTypes */); var React=require(103 /* React */); var StyleInspector=require(489 /* StyleInspector */); var StyleSheet=require(104 /* StyleSheet */); var Text=require(181 /* Text */); var TouchableHighlight=require(466 /* TouchableHighlight */); var TouchableWithoutFeedback=require(463 /* TouchableWithoutFeedback */); var View=require(116 /* View */);var _require= require(198 /* fetch */);var fetch=_require.fetch; var flattenStyle=require(55 /* flattenStyle */); var mapWithSeparator=require(490 /* mapWithSeparator */); var openFileInEditor=require(491 /* openFileInEditor */); var ElementProperties=React.createClass({displayName:'ElementProperties', propTypes:{ hierarchy:PropTypes.array.isRequired, style:PropTypes.oneOfType([ PropTypes.object, PropTypes.array, PropTypes.number]), source:PropTypes.shape({ fileName:PropTypes.string, lineNumber:PropTypes.number})}, render:function render(){var _this=this; var style=flattenStyle(this.props.style); var selection=this.props.selection; var openFileButton; var source=this.props.source;var _ref= source||{};var fileName=_ref.fileName;var lineNumber=_ref.lineNumber; if(fileName&&lineNumber){ var parts=fileName.split('/'); var fileNameShort=parts[parts.length-1]; openFileButton= React.createElement(TouchableHighlight,{ style:styles.openButton, onPress:openFileInEditor.bind(null,fileName,lineNumber)}, React.createElement(Text,{style:styles.openButtonTitle,numberOfLines:1}, fileNameShort,':',lineNumber)); } return( React.createElement(TouchableWithoutFeedback,null, React.createElement(View,{style:styles.info}, React.createElement(View,{style:styles.breadcrumb}, mapWithSeparator( this.props.hierarchy, function(item,i){return( React.createElement(TouchableHighlight,{ key:'item-'+i, style:[styles.breadItem,i===selection&&styles.selected], onPress:function onPress(){return _this.props.setSelection(i);}}, React.createElement(Text,{style:styles.breadItemText}, getInstanceName(item))));}, function(i){return( React.createElement(Text,{key:'sep-'+i,style:styles.breadSep},'▸'));})), React.createElement(View,{style:styles.row}, React.createElement(View,{style:styles.col}, React.createElement(StyleInspector,{style:style}), openFileButton), React.createElement(BoxInspector,{style:style,frame:this.props.frame}))))); }}); function getInstanceName(instance){ if(instance.getName){ return instance.getName(); } if(instance.constructor&&instance.constructor.displayName){ return instance.constructor.displayName; } return'Unknown'; } var styles=StyleSheet.create({ breadSep:{ fontSize:8, color:'white'}, breadcrumb:{ flexDirection:'row', flexWrap:'wrap', alignItems:'flex-start', marginBottom:5}, selected:{ borderColor:'white', borderRadius:5}, breadItem:{ borderWidth:1, borderColor:'transparent', marginHorizontal:2}, breadItemText:{ fontSize:10, color:'white', marginHorizontal:5}, row:{ flexDirection:'row', alignItems:'center', justifyContent:'space-between'}, col:{ flex:1}, info:{ padding:10}, path:{ color:'white', fontSize:9}, openButton:{ padding:10, backgroundColor:'#000', marginVertical:5, marginRight:5, borderRadius:2}, openButtonTitle:{ color:'white', fontSize:8}}); module.exports=ElementProperties; }, "ElementProperties"); __d(488 /* BoxInspector */, function(global, require, module, exports) { 'use strict'; var React=require(103 /* React */); var StyleSheet=require(104 /* StyleSheet */); var Text=require(181 /* Text */); var View=require(116 /* View */); var resolveBoxStyle=require(485 /* resolveBoxStyle */); var blank={ top:0, left:0, right:0, bottom:0};var BoxInspector=function(_React$Component){babelHelpers.inherits(BoxInspector,_React$Component);function BoxInspector(){babelHelpers.classCallCheck(this,BoxInspector);return babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(BoxInspector).apply(this,arguments));}babelHelpers.createClass(BoxInspector,[{key:'render',value:function render() { var frame=this.props.frame; var style=this.props.style; var margin=style&&resolveBoxStyle('margin',style)||blank; var padding=style&&resolveBoxStyle('padding',style)||blank; return( React.createElement(BoxContainer,{title:'margin',titleStyle:styles.marginLabel,box:margin}, React.createElement(BoxContainer,{title:'padding',box:padding}, React.createElement(View,null, React.createElement(Text,{style:styles.innerText},'(', frame.left,', ',frame.top,')'), React.createElement(Text,{style:styles.innerText}, frame.width,' × ',frame.height))))); }}]);return BoxInspector;}(React.Component);var BoxContainer=function(_React$Component2){babelHelpers.inherits(BoxContainer,_React$Component2);function BoxContainer(){babelHelpers.classCallCheck(this,BoxContainer);return babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(BoxContainer).apply(this,arguments));}babelHelpers.createClass(BoxContainer,[{key:'render',value:function render() { var box=this.props.box; return( React.createElement(View,{style:styles.box}, React.createElement(View,{style:styles.row}, React.createElement(Text,{style:[this.props.titleStyle,styles.label]},this.props.title), React.createElement(Text,{style:styles.boxText},box.top)), React.createElement(View,{style:styles.row}, React.createElement(Text,{style:styles.boxText},box.left), this.props.children, React.createElement(Text,{style:styles.boxText},box.right)), React.createElement(Text,{style:styles.boxText},box.bottom))); }}]);return BoxContainer;}(React.Component); var styles=StyleSheet.create({ row:{ flexDirection:'row', alignItems:'center', justifyContent:'space-around'}, marginLabel:{ width:60}, label:{ fontSize:10, color:'rgb(255,100,0)', marginLeft:5, flex:1, textAlign:'left', top:-3}, buffer:{ fontSize:10, color:'yellow', flex:1, textAlign:'center'}, innerText:{ color:'yellow', fontSize:12, textAlign:'center', width:70}, box:{ borderWidth:1, borderColor:'grey'}, boxText:{ color:'white', fontSize:12, marginHorizontal:3, marginVertical:2, textAlign:'center'}}); module.exports=BoxInspector; }, "BoxInspector"); __d(489 /* StyleInspector */, function(global, require, module, exports) { 'use strict'; var React=require(103 /* React */); var StyleSheet=require(104 /* StyleSheet */); var Text=require(181 /* Text */); var View=require(116 /* View */);var StyleInspector=function(_React$Component){babelHelpers.inherits(StyleInspector,_React$Component);function StyleInspector(){babelHelpers.classCallCheck(this,StyleInspector);return babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(StyleInspector).apply(this,arguments));}babelHelpers.createClass(StyleInspector,[{key:'render',value:function render() {var _this2=this; if(!this.props.style){ return React.createElement(Text,{style:styles.noStyle},'No style'); } var names=Object.keys(this.props.style); return( React.createElement(View,{style:styles.container}, React.createElement(View,null, names.map(function(name){return React.createElement(Text,{key:name,style:styles.attr},name,':');})), React.createElement(View,null, names.map(function(name){ var value=typeof _this2.props.style[name]==='object'?JSON.stringify(_this2.props.style[name]):_this2.props.style[name]; return React.createElement(Text,{key:name,style:styles.value},value); })))); }}]);return StyleInspector;}(React.Component); var styles=StyleSheet.create({ container:{ flexDirection:'row'}, row:{ flexDirection:'row', alignItems:'center', justifyContent:'space-around'}, attr:{ fontSize:10, color:'#ccc'}, value:{ fontSize:10, color:'white', marginLeft:10}, noStyle:{ color:'white', fontSize:10}}); module.exports=StyleInspector; }, "StyleInspector"); __d(490 /* mapWithSeparator */, function(global, require, module, exports) { 'use strict'; function mapWithSeparator( items, itemRenderer, spacerRenderer) { var mapped=[]; if(items.length>0){ mapped.push(itemRenderer(items[0],0,items)); for(var ii=1;ii1?_len-1:0),_key=1;_key<_len;_key++){args[_key-1]=arguments[_key];} var index=0; return format.replace(/%s/g,function(match){return args[index++];}); } function updateWarningMap(format){ var stringifySafe=require(77 /* stringifySafe */); format=String(format); var argCount=(format.match(/%s/g)||[]).length;for(var _len2=arguments.length,args=Array(_len2>1?_len2-1:0),_key2=1;_key2<_len2;_key2++){args[_key2-1]=arguments[_key2];} var warning=[ sprintf.apply(undefined,[format].concat(babelHelpers.toConsumableArray(args.slice(0,argCount))))].concat(babelHelpers.toConsumableArray( args.slice(argCount).map(stringifySafe))). join(' '); var warningInfo=_warningMap.get(warning); if(warningInfo){ warningInfo.count+=1; }else{ var _error=new Error(); _error.framesToPop=2; _warningMap.set(warning,{ count:1, stacktrace:parseErrorStack(_error), symbolicated:false}); } _warningEmitter.emit('warning',_warningMap); } function ensureSymbolicatedWarning(warning){ var prevWarningInfo=_warningMap.get(warning); if(!prevWarningInfo||prevWarningInfo.symbolicated){ return; } prevWarningInfo.symbolicated=true; symbolicateStackTrace(prevWarningInfo.stacktrace).then( function(stack){ var nextWarningInfo=_warningMap.get(warning); if(nextWarningInfo){ nextWarningInfo.stacktrace=stack; _warningEmitter.emit('warning',_warningMap); } }, function(error){ var nextWarningInfo=_warningMap.get(warning); if(nextWarningInfo){ infoLog('Failed to symbolicate warning, "%s":',warning,error); _warningEmitter.emit('warning',_warningMap); } }); } function isWarningIgnored(warning){ return( Array.isArray(console.ignoredYellowBox)&& console.ignoredYellowBox.some( function(ignorePrefix){return warning.startsWith(ignorePrefix);})); } var WarningRow=function WarningRow(_ref){var count=_ref.count;var warning=_ref.warning;var onPress=_ref.onPress; var Text=require(181 /* Text */); var TouchableHighlight=require(466 /* TouchableHighlight */); var View=require(116 /* View */); var countText=count>1? React.createElement(Text,{style:styles.listRowCount},'('+count+') '): null; return( React.createElement(View,{style:styles.listRow}, React.createElement(TouchableHighlight,{ activeOpacity:0.5, onPress:onPress, style:styles.listRowContent, underlayColor:'transparent'}, React.createElement(Text,{style:styles.listRowText,numberOfLines:2}, countText, warning)))); }; var StackRow=function StackRow(_ref2){var frame=_ref2.frame; var Text=require(181 /* Text */); var TouchableHighlight=require(466 /* TouchableHighlight */);var file=frame.file;var lineNumber=frame.lineNumber; var fileParts=file.split('/'); var fileName=fileParts[fileParts.length-1]; return( React.createElement(TouchableHighlight,{ activeOpacity:0.5, style:styles.openInEditorButton, underlayColor:'transparent', onPress:openFileInEditor.bind(null,file,lineNumber)}, React.createElement(Text,{style:styles.inspectorCountText}, fileName,':',lineNumber))); }; var WarningInspector=function WarningInspector(_ref3) {var warningInfo=_ref3.warningInfo;var warning=_ref3.warning;var stacktraceVisible=_ref3.stacktraceVisible;var onClose=_ref3.onClose;var onDismiss=_ref3.onDismiss;var onDismissAll=_ref3.onDismissAll;var toggleStacktrace=_ref3.toggleStacktrace; var ScrollView=require(395 /* ScrollView */); var Text=require(181 /* Text */); var TouchableHighlight=require(466 /* TouchableHighlight */); var View=require(116 /* View */);var _ref4= warningInfo||{};var count=_ref4.count;var stacktrace=_ref4.stacktrace; var countSentence= 'Warning encountered '+count+' time'+(count-1?'s':'')+'.'; var stacktraceList=void 0; if(stacktraceVisible&&stacktrace){ stacktraceList= React.createElement(View,{style:styles.stacktraceList}, stacktrace.map(function(frame,ii){return React.createElement(StackRow,{frame:frame,key:ii});})); } return( React.createElement(TouchableHighlight,{ activeOpacity:0.95, underlayColor:backgroundColor(0.8), onPress:onClose, style:styles.inspector}, React.createElement(View,{style:styles.inspectorContent}, React.createElement(View,{style:styles.inspectorCount}, React.createElement(Text,{style:styles.inspectorCountText},countSentence), React.createElement(TouchableHighlight,{ activeOpacity:0.5, onPress:toggleStacktrace, style:styles.toggleStacktraceButton, underlayColor:'transparent'}, React.createElement(Text,{style:styles.inspectorButtonText}, stacktraceVisible?'Hide':'Show',' Stacktrace'))), React.createElement(ScrollView,{style:styles.inspectorWarning}, stacktraceList, React.createElement(Text,{style:styles.inspectorWarningText},warning)), React.createElement(View,{style:styles.inspectorButtons}, React.createElement(TouchableHighlight,{ activeOpacity:0.5, onPress:onDismiss, style:styles.inspectorButton, underlayColor:'transparent'}, React.createElement(Text,{style:styles.inspectorButtonText},'Dismiss')), React.createElement(TouchableHighlight,{ activeOpacity:0.5, onPress:onDismissAll, style:styles.inspectorButton, underlayColor:'transparent'}, React.createElement(Text,{style:styles.inspectorButtonText},'Dismiss All')))))); };var YellowBox=function(_React$Component){babelHelpers.inherits(YellowBox,_React$Component); function YellowBox(props,context){babelHelpers.classCallCheck(this,YellowBox);var _this=babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(YellowBox).call(this, props,context)); _this.state={ inspecting:null, stacktraceVisible:false, warningMap:_warningMap}; _this.dismissWarning=function(warning){var _this$state= _this.state;var inspecting=_this$state.inspecting;var warningMap=_this$state.warningMap; if(warning){ warningMap.delete(warning); }else{ warningMap.clear(); } _this.setState({ inspecting:warning&&inspecting!==warning?inspecting:null, warningMap:warningMap}); };return _this; }babelHelpers.createClass(YellowBox,[{key:'componentDidMount',value:function componentDidMount() {var _this2=this; var scheduled=null; this._listener=_warningEmitter.addListener('warning',function(warningMap){ scheduled=scheduled||setImmediate(function(){ scheduled=null; _this2.setState({ warningMap:warningMap}); }); }); }},{key:'componentDidUpdate',value:function componentDidUpdate() {var inspecting=this.state.inspecting; if(inspecting!=null){ ensureSymbolicatedWarning(inspecting); } }},{key:'componentWillUnmount',value:function componentWillUnmount() { if(this._listener){ this._listener.remove(); } }},{key:'render',value:function render() {var _this3=this; if(console.disableYellowBox||this.state.warningMap.size===0){ return null; } var ScrollView=require(395 /* ScrollView */); var View=require(116 /* View */);var _state= this.state;var inspecting=_state.inspecting;var stacktraceVisible=_state.stacktraceVisible; var inspector=inspecting!==null? React.createElement(WarningInspector,{ warningInfo:this.state.warningMap.get(inspecting), warning:inspecting, stacktraceVisible:stacktraceVisible, onClose:function onClose(){return _this3.setState({inspecting:null});}, onDismiss:function onDismiss(){return _this3.dismissWarning(inspecting);}, onDismissAll:function onDismissAll(){return _this3.dismissWarning(null);}, toggleStacktrace:function toggleStacktrace(){return _this3.setState({stacktraceVisible:!stacktraceVisible});}}): null; var rows=[]; this.state.warningMap.forEach(function(warningInfo,warning){ if(!isWarningIgnored(warning)){ rows.push( React.createElement(WarningRow,{ key:warning, count:warningInfo.count, warning:warning, onPress:function onPress(){return _this3.setState({inspecting:warning});}, onDismiss:function onDismiss(){return _this3.dismissWarning(warning);}})); } }); var listStyle=[ styles.list, {height:Math.min(rows.length,4.4)*(rowGutter+rowHeight)}]; return( React.createElement(View,{style:inspector?styles.fullScreen:listStyle}, React.createElement(ScrollView,{style:listStyle,scrollsToTop:false}, rows), inspector)); }}]);return YellowBox;}(React.Component); var backgroundColor=function backgroundColor(opacity){return'rgba(250, 186, 48, '+opacity+')';}; var textColor='white'; var rowGutter=1; var rowHeight=46; var styles=StyleSheet.create({ fullScreen:{ backgroundColor:'transparent', position:'absolute', left:0, right:0, top:0, bottom:0}, inspector:{ backgroundColor:backgroundColor(0.95), flex:1}, inspectorButtons:{ flexDirection:'row', position:'absolute', left:0, right:0, bottom:0}, inspectorButton:{ flex:1, padding:22, backgroundColor:backgroundColor(1)}, toggleStacktraceButton:{ flex:1, padding:5}, stacktraceList:{ paddingBottom:5}, inspectorButtonText:{ color:textColor, fontSize:14, opacity:0.8, textAlign:'center'}, inspectorContent:{ flex:1, paddingTop:5}, openInEditorButton:{ paddingTop:5, paddingBottom:5}, inspectorCount:{ padding:15, paddingBottom:0}, inspectorCountText:{ color:textColor, fontSize:14}, inspectorWarning:{ paddingHorizontal:15}, inspectorWarningText:{ color:textColor, fontSize:16, fontWeight:'600'}, list:{ backgroundColor:'transparent', position:'absolute', left:0, right:0, bottom:0}, listRow:{ position:'relative', backgroundColor:backgroundColor(0.95), flex:1, height:rowHeight, marginTop:rowGutter}, listRowContent:{ flex:1}, listRowCount:{ color:'rgba(255, 255, 255, 0.5)'}, listRowText:{ color:textColor, position:'absolute', left:0, top:Platform.OS==='android'?5:7, marginLeft:15, marginRight:15}}); module.exports=YellowBox; }, "YellowBox"); __d(494 /* BackAndroid */, function(global, require, module, exports) { 'use strict'; var DeviceEventManager=require(60 /* NativeModules */).DeviceEventManager; var RCTDeviceEventEmitter=require(86 /* RCTDeviceEventEmitter */); var DEVICE_BACK_EVENT='hardwareBackPress'; var _backPressSubscriptions=new Set(); RCTDeviceEventEmitter.addListener(DEVICE_BACK_EVENT,function(){ var backPressSubscriptions=new Set(_backPressSubscriptions); var invokeDefault=true; backPressSubscriptions.forEach(function(subscription){ if(subscription()){ invokeDefault=false; } }); if(invokeDefault){ BackAndroid.exitApp(); } }); var BackAndroid={ exitApp:function exitApp(){ DeviceEventManager.invokeDefaultBackPressHandler(); }, addEventListener:function addEventListener( eventName, handler) { _backPressSubscriptions.add(handler); return{ remove:function remove(){return BackAndroid.removeEventListener(eventName,handler);}}; }, removeEventListener:function removeEventListener( eventName, handler) { _backPressSubscriptions.delete(handler); }}; module.exports=BackAndroid; }, "BackAndroid"); __d(495 /* RCTRenderingPerf */, function(global, require, module, exports) { 'use strict'; var ReactPerf=require(496 /* react/lib/ReactPerf */); var ReactDebugTool=require(64 /* react/lib/ReactDebugTool */); var invariant=require(56 /* fbjs/lib/invariant */); var performanceNow=require(73 /* fbjs/lib/performanceNow */); var perfModules=[]; var enabled=false; var lastRenderStartTime=0; var totalRenderDuration=0; var RCTRenderingPerfDevtool={ onBeginLifeCycleTimer:function onBeginLifeCycleTimer(debugID,timerType){ if(timerType==='render'){ lastRenderStartTime=performanceNow(); } }, onEndLifeCycleTimer:function onEndLifeCycleTimer(debugID,timerType){ if(timerType==='render'){ var lastRenderDuration=performanceNow()-lastRenderStartTime; totalRenderDuration+=lastRenderDuration; } }}; var RCTRenderingPerf={ toggle:function toggle(){ console.log('Render perfomance measurements enabled'); enabled=true; }, start:function start(){ if(!enabled){ return; } ReactPerf.start(); ReactDebugTool.addDevtool(RCTRenderingPerfDevtool); perfModules.forEach(function(module){return module.start();}); }, stop:function stop(){ if(!enabled){ return; } ReactPerf.stop(); ReactPerf.printInclusive(); ReactPerf.printWasted(); ReactDebugTool.removeDevtool(RCTRenderingPerfDevtool); console.log('Total time spent in render(): '+totalRenderDuration.toFixed(2)+' ms'); lastRenderStartTime=0; totalRenderDuration=0; perfModules.forEach(function(module){return module.stop();}); }, register:function register(module){ invariant( typeof module.start==='function', 'Perf module should have start() function'); invariant( typeof module.stop==='function', 'Perf module should have stop() function'); perfModules.push(module); }}; module.exports=RCTRenderingPerf; }, "RCTRenderingPerf"); __d(496 /* react/lib/ReactPerf.js */, function(global, require, module, exports) { 'use strict'; var _assign=require(14 /* object-assign */); var _extends=_assign||function(target){for(var i=1;i ':'')+displayName; var stats=aggregatedStats[key]; if(!stats){ affectedIDs[key]={}; stats=aggregatedStats[key]={ key:key, instanceCount:0, inclusiveRenderDuration:0, renderCount:0}; } affectedIDs[key][instanceID]=true; applyUpdate(stats); } var isCompositeByID={}; flushHistory.forEach(function(flush){ var measurements=flush.measurements; measurements.forEach(function(measurement){ var instanceID=measurement.instanceID; var timerType=measurement.timerType; if(timerType!=='render'){ return; } isCompositeByID[instanceID]=true; }); }); flushHistory.forEach(function(flush){ var measurements=flush.measurements; var treeSnapshot=flush.treeSnapshot; measurements.forEach(function(measurement){ var duration=measurement.duration; var instanceID=measurement.instanceID; var timerType=measurement.timerType; if(timerType!=='render'){ return; } updateAggregatedStats(treeSnapshot,instanceID,function(stats){ stats.renderCount++; }); var nextParentID=instanceID; while(nextParentID){ if(isCompositeByID[nextParentID]){ updateAggregatedStats(treeSnapshot,nextParentID,function(stats){ stats.inclusiveRenderDuration+=duration; }); } nextParentID=treeSnapshot[nextParentID].parentID; } }); }); return Object.keys(aggregatedStats).map(function(key){ return _extends({},aggregatedStats[key],{ instanceCount:Object.keys(affectedIDs[key]).length}); }).sort(function(a,b){ return b.inclusiveRenderDuration-a.inclusiveRenderDuration; }); } function getWasted(){ var flushHistory=arguments.length<=0||arguments[0]===undefined?getLastMeasurements():arguments[0]; if(!(process.env.NODE_ENV!=='production')){ warnInProduction(); return[]; } var aggregatedStats={}; var affectedIDs={}; function updateAggregatedStats(treeSnapshot,instanceID,applyUpdate){ var _treeSnapshot$instanc2=treeSnapshot[instanceID]; var displayName=_treeSnapshot$instanc2.displayName; var ownerID=_treeSnapshot$instanc2.ownerID; var owner=treeSnapshot[ownerID]; var key=(owner?owner.displayName+' > ':'')+displayName; var stats=aggregatedStats[key]; if(!stats){ affectedIDs[key]={}; stats=aggregatedStats[key]={ key:key, instanceCount:0, inclusiveRenderDuration:0, renderCount:0}; } affectedIDs[key][instanceID]=true; applyUpdate(stats); } flushHistory.forEach(function(flush){ var measurements=flush.measurements; var treeSnapshot=flush.treeSnapshot; var operations=flush.operations; var isDefinitelyNotWastedByID={}; operations.forEach(function(operation){ var instanceID=operation.instanceID; var nextParentID=instanceID; while(nextParentID){ isDefinitelyNotWastedByID[nextParentID]=true; nextParentID=treeSnapshot[nextParentID].parentID; } }); var renderedCompositeIDs={}; measurements.forEach(function(measurement){ var instanceID=measurement.instanceID; var timerType=measurement.timerType; if(timerType!=='render'){ return; } renderedCompositeIDs[instanceID]=true; }); measurements.forEach(function(measurement){ var duration=measurement.duration; var instanceID=measurement.instanceID; var timerType=measurement.timerType; if(timerType!=='render'){ return; } var updateCount=treeSnapshot[instanceID].updateCount; if(isDefinitelyNotWastedByID[instanceID]||updateCount===0){ return; } updateAggregatedStats(treeSnapshot,instanceID,function(stats){ stats.renderCount++; }); var nextParentID=instanceID; while(nextParentID){ var isWasted=renderedCompositeIDs[nextParentID]&&!isDefinitelyNotWastedByID[nextParentID]; if(isWasted){ updateAggregatedStats(treeSnapshot,nextParentID,function(stats){ stats.inclusiveRenderDuration+=duration; }); } nextParentID=treeSnapshot[nextParentID].parentID; } }); }); return Object.keys(aggregatedStats).map(function(key){ return _extends({},aggregatedStats[key],{ instanceCount:Object.keys(affectedIDs[key]).length}); }).sort(function(a,b){ return b.inclusiveRenderDuration-a.inclusiveRenderDuration; }); } function getOperations(){ var flushHistory=arguments.length<=0||arguments[0]===undefined?getLastMeasurements():arguments[0]; if(!(process.env.NODE_ENV!=='production')){ warnInProduction(); return[]; } var stats=[]; flushHistory.forEach(function(flush,flushIndex){ var operations=flush.operations; var treeSnapshot=flush.treeSnapshot; operations.forEach(function(operation){ var instanceID=operation.instanceID; var type=operation.type; var payload=operation.payload; var _treeSnapshot$instanc3=treeSnapshot[instanceID]; var displayName=_treeSnapshot$instanc3.displayName; var ownerID=_treeSnapshot$instanc3.ownerID; var owner=treeSnapshot[ownerID]; var key=(owner?owner.displayName+' > ':'')+displayName; stats.push({ flushIndex:flushIndex, instanceID:instanceID, key:key, type:type, ownerID:ownerID, payload:payload}); }); }); return stats; } function printExclusive(flushHistory){ if(!(process.env.NODE_ENV!=='production')){ warnInProduction(); return; } var stats=getExclusive(flushHistory); var table=stats.map(function(item){ var key=item.key; var instanceCount=item.instanceCount; var totalDuration=item.totalDuration; var renderCount=item.counts.render||0; var renderDuration=item.durations.render||0; return{ 'Component':key, 'Total time (ms)':roundFloat(totalDuration), 'Instance count':instanceCount, 'Total render time (ms)':roundFloat(renderDuration), 'Average render time (ms)':renderCount?roundFloat(renderDuration/renderCount):undefined, 'Render count':renderCount, 'Total lifecycle time (ms)':roundFloat(totalDuration-renderDuration)}; }); console.table(table); } function printInclusive(flushHistory){ if(!(process.env.NODE_ENV!=='production')){ warnInProduction(); return; } var stats=getInclusive(flushHistory); var table=stats.map(function(item){ var key=item.key; var instanceCount=item.instanceCount; var inclusiveRenderDuration=item.inclusiveRenderDuration; var renderCount=item.renderCount; return{ 'Owner > Component':key, 'Inclusive render time (ms)':roundFloat(inclusiveRenderDuration), 'Instance count':instanceCount, 'Render count':renderCount}; }); console.table(table); } function printWasted(flushHistory){ if(!(process.env.NODE_ENV!=='production')){ warnInProduction(); return; } var stats=getWasted(flushHistory); var table=stats.map(function(item){ var key=item.key; var instanceCount=item.instanceCount; var inclusiveRenderDuration=item.inclusiveRenderDuration; var renderCount=item.renderCount; return{ 'Owner > Component':key, 'Inclusive wasted time (ms)':roundFloat(inclusiveRenderDuration), 'Instance count':instanceCount, 'Render count':renderCount}; }); console.table(table); } function printOperations(flushHistory){ if(!(process.env.NODE_ENV!=='production')){ warnInProduction(); return; } var stats=getOperations(flushHistory); var table=stats.map(function(stat){ return{ 'Owner > Node':stat.key, 'Operation':stat.type, 'Payload':typeof stat.payload==='object'?JSON.stringify(stat.payload):stat.payload, 'Flush index':stat.flushIndex, 'Owner Component ID':stat.ownerID, 'DOM Component ID':stat.instanceID}; }); console.table(table); } var warnedAboutPrintDOM=false; function printDOM(measurements){ process.env.NODE_ENV!=='production'?warning(warnedAboutPrintDOM,'`ReactPerf.printDOM(...)` is deprecated. Use '+'`ReactPerf.printOperations(...)` instead.'):void 0; warnedAboutPrintDOM=true; return printOperations(measurements); } var warnedAboutGetMeasurementsSummaryMap=false; function getMeasurementsSummaryMap(measurements){ process.env.NODE_ENV!=='production'?warning(warnedAboutGetMeasurementsSummaryMap,'`ReactPerf.getMeasurementsSummaryMap(...)` is deprecated. Use '+'`ReactPerf.getWasted(...)` instead.'):void 0; warnedAboutGetMeasurementsSummaryMap=true; return getWasted(measurements); } function start(){ if(!(process.env.NODE_ENV!=='production')){ warnInProduction(); return; } ReactDebugTool.beginProfiling(); } function stop(){ if(!(process.env.NODE_ENV!=='production')){ warnInProduction(); return; } ReactDebugTool.endProfiling(); } function isRunning(){ if(!(process.env.NODE_ENV!=='production')){ warnInProduction(); return false; } return ReactDebugTool.isProfiling(); } var ReactPerfAnalysis={ getLastMeasurements:getLastMeasurements, getExclusive:getExclusive, getInclusive:getInclusive, getWasted:getWasted, getOperations:getOperations, printExclusive:printExclusive, printInclusive:printInclusive, printWasted:printWasted, printOperations:printOperations, start:start, stop:stop, isRunning:isRunning, printDOM:printDOM, getMeasurementsSummaryMap:getMeasurementsSummaryMap}; module.exports=ReactPerfAnalysis; }, "react/lib/ReactPerf.js"); __d(497 /* AppStateIOS */, function(global, require, module, exports) { 'use strict'; var AppState=require(89 /* AppState */); console.warn('AppStateIOS is deprecated. Use AppState instead'); module.exports=AppState; }, "AppStateIOS"); __d(498 /* AsyncStorage */, function(global, require, module, exports) { 'use strict'; var NativeModules=require(60 /* NativeModules */); var RCTAsyncSQLiteStorage=NativeModules.AsyncSQLiteDBStorage; var RCTAsyncRocksDBStorage=NativeModules.AsyncRocksDBStorage; var RCTAsyncFileStorage=NativeModules.AsyncLocalStorage; var RCTAsyncStorage=RCTAsyncRocksDBStorage||RCTAsyncSQLiteStorage||RCTAsyncFileStorage; var AsyncStorage={ _getRequests:[], _getKeys:[], _immediate:null, getItem:function getItem( key, callback) { return new Promise(function(resolve,reject){ RCTAsyncStorage.multiGet([key],function(errors,result){ var value=result&&result[0]&&result[0][1]?result[0][1]:null; var errs=convertErrors(errors); callback&&callback(errs&&errs[0],value); if(errs){ reject(errs[0]); }else{ resolve(value); } }); }); }, setItem:function setItem( key, value, callback) { return new Promise(function(resolve,reject){ RCTAsyncStorage.multiSet([[key,value]],function(errors){ var errs=convertErrors(errors); callback&&callback(errs&&errs[0]); if(errs){ reject(errs[0]); }else{ resolve(null); } }); }); }, removeItem:function removeItem( key, callback) { return new Promise(function(resolve,reject){ RCTAsyncStorage.multiRemove([key],function(errors){ var errs=convertErrors(errors); callback&&callback(errs&&errs[0]); if(errs){ reject(errs[0]); }else{ resolve(null); } }); }); }, mergeItem:function mergeItem( key, value, callback) { return new Promise(function(resolve,reject){ RCTAsyncStorage.multiMerge([[key,value]],function(errors){ var errs=convertErrors(errors); callback&&callback(errs&&errs[0]); if(errs){ reject(errs[0]); }else{ resolve(null); } }); }); }, clear:function clear(callback){ return new Promise(function(resolve,reject){ RCTAsyncStorage.clear(function(error){ callback&&callback(convertError(error)); if(error&&convertError(error)){ reject(convertError(error)); }else{ resolve(null); } }); }); }, getAllKeys:function getAllKeys(callback){ return new Promise(function(resolve,reject){ RCTAsyncStorage.getAllKeys(function(error,keys){ callback&&callback(convertError(error),keys); if(error){ reject(convertError(error)); }else{ resolve(keys); } }); }); }, flushGetRequests:function flushGetRequests(){ var getRequests=this._getRequests; var getKeys=this._getKeys; this._getRequests=[]; this._getKeys=[]; RCTAsyncStorage.multiGet(getKeys,function(errors,result){ var map={}; result.forEach(function(_ref){var _ref2=babelHelpers.slicedToArray(_ref,2);var key=_ref2[0];var value=_ref2[1];return map[key]=value;}); var reqLength=getRequests.length; for(var i=0;i=0){ mediaType='video'; } return RCTCameraRollManager.saveToCameraRoll(tag,mediaType); }},{key:'getPhotos',value:function getPhotos( params){var _arguments=arguments; if(__DEV__){ getPhotosParamChecker({params:params},'params','CameraRoll.getPhotos'); } if(arguments.length>1){ console.warn('CameraRoll.getPhotos(tag, success, error) is deprecated. Use the returned Promise instead'); var successCallback=arguments[1]; if(__DEV__){(function(){ var callback=_arguments[1]; successCallback=function successCallback(response){ getPhotosReturnChecker( {response:response}, 'response', 'CameraRoll.getPhotos callback'); callback(response); };})(); } var errorCallback=arguments[2]||function(){}; RCTCameraRollManager.getPhotos(params).then(successCallback,errorCallback); } return RCTCameraRollManager.getPhotos(params); }}]);return CameraRoll;}(); CameraRoll.GroupTypesOptions=GROUP_TYPES_OPTIONS; CameraRoll.AssetTypeOptions=ASSET_TYPE_OPTIONS; module.exports=CameraRoll; }, "CameraRoll"); __d(500 /* Clipboard */, function(global, require, module, exports) { 'use strict'; var Clipboard=require(60 /* NativeModules */).Clipboard; var deprecatedCallback=require(501 /* deprecatedCallback */); module.exports={ getString:function getString(){ return deprecatedCallback( Clipboard.getString(), Array.prototype.slice.call(arguments), 'success-first', 'Clipboard.getString(callback) is deprecated. Use the returned Promise instead'); }, setString:function setString(content){ Clipboard.setString(content); }}; }, "Clipboard"); __d(501 /* deprecatedCallback */, function(global, require, module, exports) { 'use strict'; module.exports=function(promise,callbacks,type,warning){ if(callbacks.length===0){ return promise; } var success=void 0,error=void 0,callback=void 0; console.warn(warning); switch(type){ case'success-first':var _callbacks=babelHelpers.slicedToArray( callbacks,2);success=_callbacks[0];error=_callbacks[1]; return promise.then( function(res){return success(res);}, function(err){return error&&error(err);}); case'error-first':var _callbacks2=babelHelpers.slicedToArray( callbacks,2);error=_callbacks2[0];success=_callbacks2[1]; return promise.then( function(res){return success(res);}, function(err){return error(err);}); case'single-callback-value-first':var _callbacks3=babelHelpers.slicedToArray( callbacks,1);callback=_callbacks3[0]; return promise.then( function(res){return callback(res);}, function(err){return callback(null,err);}); case'node':var _callbacks4=babelHelpers.slicedToArray( callbacks,1);callback=_callbacks4[0]; return promise.then( function(res){return callback(null,res);}, function(err){return callback(err);}); default: throw new Error('Type of callbacks not specified. Must be one of \'success-first\', \'error-first\', \'single-callback-value-first\', or \'node\'');} }; }, "deprecatedCallback"); __d(502 /* DatePickerAndroid */, function(global, require, module, exports) { 'use strict'; var DatePickerModule=require(60 /* NativeModules */).DatePickerAndroid; function _toMillis(options,key){ var dateVal=options[key]; if(typeof dateVal==='object'&&typeof dateVal.getMonth==='function'){ options[key]=dateVal.getTime(); } }var DatePickerAndroid=function(){function DatePickerAndroid(){babelHelpers.classCallCheck(this,DatePickerAndroid);}babelHelpers.createClass(DatePickerAndroid,null,[{key:'open',value:function open( options){var optionsMs;return regeneratorRuntime.async(function open$(_context){while(1){switch(_context.prev=_context.next){case 0: optionsMs=options; if(optionsMs){ _toMillis(options,'date'); _toMillis(options,'minDate'); _toMillis(options,'maxDate'); }return _context.abrupt('return', DatePickerModule.open(options));case 3:case'end':return _context.stop();}}},null,this);}},{key:'dateSetAction',get:function get() {return'dateSetAction';}},{key:'dismissedAction',get:function get() {return'dismissedAction';}}]);return DatePickerAndroid;}(); module.exports=DatePickerAndroid; }, "DatePickerAndroid"); __d(503 /* ImagePickerIOS */, function(global, require, module, exports) { 'use strict'; var RCTImagePicker=require(60 /* NativeModules */).ImagePickerIOS; var ImagePickerIOS={ canRecordVideos:function canRecordVideos(callback){ return RCTImagePicker.canRecordVideos(callback); }, canUseCamera:function canUseCamera(callback){ return RCTImagePicker.canUseCamera(callback); }, openCameraDialog:function openCameraDialog(config,successCallback,cancelCallback){ config=babelHelpers.extends({ videoMode:false}, config); return RCTImagePicker.openCameraDialog(config,successCallback,cancelCallback); }, openSelectDialog:function openSelectDialog(config,successCallback,cancelCallback){ config=babelHelpers.extends({ showImages:true, showVideos:false}, config); return RCTImagePicker.openSelectDialog(config,successCallback,cancelCallback); }}; module.exports=ImagePickerIOS; }, "ImagePickerIOS"); __d(504 /* IntentAndroid */, function(global, require, module, exports) { 'use strict'; var Linking=require(505 /* Linking */); var invariant=require(56 /* fbjs/lib/invariant */);var IntentAndroid=function(){function IntentAndroid(){babelHelpers.classCallCheck(this,IntentAndroid);}babelHelpers.createClass(IntentAndroid,null,[{key:'openURL',value:function openURL( url){ console.warn('"IntentAndroid.openURL" is deprecated. Use the promise based "Linking.openURL" instead.'); Linking.openURL(url); }},{key:'canOpenURL',value:function canOpenURL( url,callback){ console.warn('"IntentAndroid.canOpenURL" is deprecated. Use the promise based "Linking.canOpenURL" instead.'); invariant( typeof callback==='function', 'A valid callback function is required'); Linking.canOpenURL(url).then(callback); }},{key:'getInitialURL',value:function getInitialURL( callback){ console.warn('"IntentAndroid.getInitialURL" is deprecated. Use the promise based "Linking.getInitialURL" instead.'); invariant( typeof callback==='function', 'A valid callback function is required'); Linking.getInitialURL().then(callback); }}]);return IntentAndroid;}(); module.exports=IntentAndroid; }, "IntentAndroid"); __d(505 /* Linking */, function(global, require, module, exports) { 'use strict'; var NativeEventEmitter=require(81 /* NativeEventEmitter */); var NativeModules=require(60 /* NativeModules */); var Platform=require(59 /* Platform */); var invariant=require(56 /* fbjs/lib/invariant */); var LinkingManager=Platform.OS==='android'? NativeModules.IntentAndroid:NativeModules.LinkingManager;var Linking=function(_NativeEventEmitter){babelHelpers.inherits(Linking,_NativeEventEmitter); function Linking(){babelHelpers.classCallCheck(this,Linking);return babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(Linking).call(this, LinkingManager)); }babelHelpers.createClass(Linking,[{key:'addEventListener',value:function addEventListener( type,handler){ this.addListener(type,handler); }},{key:'removeEventListener',value:function removeEventListener( type,handler){ this.removeListener(type,handler); }},{key:'openURL',value:function openURL( url){ this._validateURL(url); return LinkingManager.openURL(url); }},{key:'canOpenURL',value:function canOpenURL( url){ this._validateURL(url); return LinkingManager.canOpenURL(url); }},{key:'getInitialURL',value:function getInitialURL() { return LinkingManager.getInitialURL(); }},{key:'_validateURL',value:function _validateURL( url){ invariant( typeof url==='string', 'Invalid URL: should be a string. Was: '+url); invariant( url, 'Invalid URL: cannot be empty'); }}]);return Linking;}(NativeEventEmitter); module.exports=new Linking(); }, "Linking"); __d(506 /* LinkingIOS */, function(global, require, module, exports) { 'use strict'; var Linking=require(505 /* Linking */); console.warn('LinkingIOS is deprecated. Use Linking instead'); module.exports=Linking; }, "LinkingIOS"); __d(507 /* NavigationExperimental */, function(global, require, module, exports) { 'use strict'; var NavigationCard=require(508 /* NavigationCard */); var NavigationCardStack=require(520 /* NavigationCardStack */); var NavigationHeader=require(524 /* NavigationHeader */); var NavigationPropTypes=require(516 /* NavigationPropTypes */); var NavigationStateUtils=require(529 /* NavigationStateUtils */); var NavigationTransitioner=require(521 /* NavigationTransitioner */); var NavigationExperimental={ StateUtils:NavigationStateUtils, Transitioner:NavigationTransitioner, Card:NavigationCard, CardStack:NavigationCardStack, Header:NavigationHeader, PropTypes:NavigationPropTypes}; module.exports=NavigationExperimental; }, "NavigationExperimental"); __d(508 /* NavigationCard */, function(global, require, module, exports) { 'use strict'; var Animated=require(444 /* Animated */); var NavigationCardStackPanResponder=require(509 /* NavigationCardStackPanResponder */); var NavigationCardStackStyleInterpolator=require(511 /* NavigationCardStackStyleInterpolator */); var NavigationPagerPanResponder=require(512 /* NavigationPagerPanResponder */); var NavigationPagerStyleInterpolator=require(513 /* NavigationPagerStyleInterpolator */); var NavigationPointerEventsContainer=require(514 /* NavigationPointerEventsContainer */); var NavigationPropTypes=require(516 /* NavigationPropTypes */); var React=require(103 /* React */); var ReactComponentWithPureRenderMixin=require(517 /* react/lib/ReactComponentWithPureRenderMixin */); var StyleSheet=require(104 /* StyleSheet */); var View=require(116 /* View */);var PropTypes=React.PropTypes;var SceneView=function(_React$Component){babelHelpers.inherits(SceneView,_React$Component);function SceneView(){babelHelpers.classCallCheck(this,SceneView);return babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(SceneView).apply(this,arguments));}babelHelpers.createClass(SceneView,[{key:'shouldComponentUpdate',value:function shouldComponentUpdate( nextProps,nextState){ return( nextProps.sceneRendererProps.scene.route!== this.props.sceneRendererProps.scene.route); }},{key:'render',value:function render() { return this.props.sceneRenderer(this.props.sceneRendererProps); }}]);return SceneView;}(React.Component);SceneView.propTypes={sceneRenderer:PropTypes.func.isRequired,sceneRendererProps:NavigationPropTypes.SceneRenderer};var NavigationCard=function(_React$Component2){babelHelpers.inherits(NavigationCard,_React$Component2);function NavigationCard(){babelHelpers.classCallCheck(this,NavigationCard);return babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(NavigationCard).apply(this,arguments));}babelHelpers.createClass(NavigationCard,[{key:'shouldComponentUpdate',value:function shouldComponentUpdate( nextProps,nextState){ return ReactComponentWithPureRenderMixin.shouldComponentUpdate.call( this, nextProps, nextState); }},{key:'render',value:function render() {var _props= this.props;var panHandlers=_props.panHandlers;var pointerEvents=_props.pointerEvents;var renderScene=_props.renderScene;var style=_props.style;var props=babelHelpers.objectWithoutProperties(_props,['panHandlers','pointerEvents','renderScene','style']); var viewStyle=style===undefined? NavigationCardStackStyleInterpolator.forHorizontal(props): style; var viewPanHandlers=panHandlers===undefined? NavigationCardStackPanResponder.forHorizontal(babelHelpers.extends({}, props,{ onNavigateBack:this.props.onNavigateBack})): panHandlers; return( React.createElement(Animated.View,babelHelpers.extends({}, viewPanHandlers,{ pointerEvents:pointerEvents, ref:this.props.onComponentRef, style:[styles.main,viewStyle]}), React.createElement(SceneView,{ sceneRenderer:renderScene, sceneRendererProps:props}))); }}]);return NavigationCard;}(React.Component);NavigationCard.propTypes=babelHelpers.extends({},NavigationPropTypes.SceneRendererProps,{onComponentRef:PropTypes.func.isRequired,onNavigateBack:PropTypes.func,panHandlers:NavigationPropTypes.panHandlers,pointerEvents:PropTypes.string.isRequired,renderScene:PropTypes.func.isRequired,style:PropTypes.any}); var styles=StyleSheet.create({ main:{ backgroundColor:'#E9E9EF', bottom:0, left:0, position:'absolute', right:0, shadowColor:'black', shadowOffset:{width:0,height:0}, shadowOpacity:0.4, shadowRadius:10, top:0}}); NavigationCard=NavigationPointerEventsContainer.create(NavigationCard); NavigationCard.CardStackPanResponder=NavigationCardStackPanResponder; NavigationCard.CardStackStyleInterpolator=NavigationCardStackStyleInterpolator; NavigationCard.PagerPanResponder=NavigationPagerPanResponder; NavigationCard.PagerStyleInterpolator=NavigationPagerStyleInterpolator; module.exports=NavigationCard; }, "NavigationCard"); __d(509 /* NavigationCardStackPanResponder */, function(global, require, module, exports) { 'use strict'; var Animated=require(444 /* Animated */); var NavigationAbstractPanResponder=require(510 /* NavigationAbstractPanResponder */); var clamp=require(426 /* clamp */); var ANIMATION_DURATION=250; var POSITION_THRESHOLD=1/3; var RESPOND_THRESHOLD=15; var RESPOND_POSITION_MAX_HORIZONTAL=30; var RESPOND_POSITION_MAX_VERTICAL=null; var DISTANCE_THRESHOLD=100; var Directions={ 'HORIZONTAL':'horizontal', 'VERTICAL':'vertical'};var NavigationCardStackPanResponder=function(_NavigationAbstractPa){babelHelpers.inherits(NavigationCardStackPanResponder,_NavigationAbstractPa); function NavigationCardStackPanResponder( direction, props) {babelHelpers.classCallCheck(this,NavigationCardStackPanResponder);var _this=babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(NavigationCardStackPanResponder).call(this)); _this._isResponding=false; _this._isVertical=direction===Directions.VERTICAL; _this._props=props; _this._startValue=0;return _this; }babelHelpers.createClass(NavigationCardStackPanResponder,[{key:'onMoveShouldSetPanResponder',value:function onMoveShouldSetPanResponder( event,gesture){ var props=this._props; if(props.navigationState.index!==props.scene.index){ return false; } var layout=props.layout; var isVertical=this._isVertical; var index=props.navigationState.index; var currentDragDistance=gesture[isVertical?'dy':'dx']; var currentDragPosition=gesture[isVertical?'moveY':'moveX']; var maxDragDistance=isVertical? layout.height.__getValue(): layout.width.__getValue(); var positionMax=isVertical? RESPOND_POSITION_MAX_VERTICAL: RESPOND_POSITION_MAX_HORIZONTAL; if(positionMax!=null&¤tDragPosition>positionMax){ return false; } return( Math.abs(currentDragDistance)>RESPOND_THRESHOLD&& maxDragDistance>0&& index>0); }},{key:'onPanResponderGrant',value:function onPanResponderGrant() {var _this2=this; this._isResponding=false; this._props.position.stopAnimation(function(value){ _this2._isResponding=true; _this2._startValue=value; }); }},{key:'onPanResponderMove',value:function onPanResponderMove( event,gesture){ if(!this._isResponding){ return; } var props=this._props; var layout=props.layout; var isVertical=this._isVertical; var axis=isVertical?'dy':'dx'; var index=props.navigationState.index; var distance=isVertical? layout.height.__getValue(): layout.width.__getValue(); var value=clamp( index-1, this._startValue-gesture[axis]/distance, index); props.position.setValue(value); }},{key:'onPanResponderRelease',value:function onPanResponderRelease( event,gesture){var _this3=this; if(!this._isResponding){ return; } this._isResponding=false; var props=this._props; var isVertical=this._isVertical; var axis=isVertical?'dy':'dx'; var index=props.navigationState.index; var distance=gesture[axis]; props.position.stopAnimation(function(value){ _this3._reset(); if(!props.onNavigateBack){ return; } if( distance>DISTANCE_THRESHOLD|| value<=index-POSITION_THRESHOLD) { props.onNavigateBack(); } }); }},{key:'onPanResponderTerminate',value:function onPanResponderTerminate() { this._isResponding=false; this._reset(); }},{key:'_reset',value:function _reset() { var props=this._props; Animated.timing( props.position, { toValue:props.navigationState.index, duration:ANIMATION_DURATION}). start(); }}]);return NavigationCardStackPanResponder;}(NavigationAbstractPanResponder); function createPanHandlers( direction, props) { var responder=new NavigationCardStackPanResponder(direction,props); return responder.panHandlers; } function forHorizontal( props) { return createPanHandlers(Directions.HORIZONTAL,props); } function forVertical( props) { return createPanHandlers(Directions.VERTICAL,props); } module.exports={ ANIMATION_DURATION:ANIMATION_DURATION, DISTANCE_THRESHOLD:DISTANCE_THRESHOLD, POSITION_THRESHOLD:POSITION_THRESHOLD, RESPOND_THRESHOLD:RESPOND_THRESHOLD, Directions:Directions, forHorizontal:forHorizontal, forVertical:forVertical}; }, "NavigationCardStackPanResponder"); __d(510 /* NavigationAbstractPanResponder */, function(global, require, module, exports) { 'use strict'; var PanResponder=require(424 /* PanResponder */); var invariant=require(56 /* fbjs/lib/invariant */); var EmptyPanHandlers={ onMoveShouldSetPanResponder:null, onPanResponderGrant:null, onPanResponderMove:null, onPanResponderRelease:null, onPanResponderTerminate:null};var NavigationAbstractPanResponder= function NavigationAbstractPanResponder(){var _this=this;babelHelpers.classCallCheck(this,NavigationAbstractPanResponder); var config={}; Object.keys(EmptyPanHandlers).forEach(function(name){ var fn=_this[name]; invariant( typeof fn==='function', 'subclass of `NavigationAbstractPanResponder` must implement method %s', name); config[name]=fn.bind(_this); },this); this.panHandlers=PanResponder.create(config).panHandlers; }; module.exports=NavigationAbstractPanResponder; }, "NavigationAbstractPanResponder"); __d(511 /* NavigationCardStackStyleInterpolator */, function(global, require, module, exports) { 'use strict'; function forInitial(props){var navigationState= props.navigationState;var scene=props.scene; var focused=navigationState.index===scene.index; var opacity=focused?1:0; var translate=focused?0:1000000; return{ opacity:opacity, transform:[ {translateX:translate}, {translateY:translate}]}; } function forHorizontal(props){var layout= props.layout;var position=props.position;var scene=props.scene; if(!layout.isMeasured){ return forInitial(props); } var index=scene.index; var inputRange=[index-1,index,index+1]; var width=layout.initWidth; var opacity=position.interpolate({ inputRange:inputRange, outputRange:[1,1,0.3]}); var scale=position.interpolate({ inputRange:inputRange, outputRange:[1,1,0.95]}); var translateY=0; var translateX=position.interpolate({ inputRange:inputRange, outputRange:[width,0,-10]}); return{ opacity:opacity, transform:[ {scale:scale}, {translateX:translateX}, {translateY:translateY}]}; } function forVertical(props){var layout= props.layout;var position=props.position;var scene=props.scene; if(!layout.isMeasured){ return forInitial(props); } var index=scene.index; var inputRange=[index-1,index,index+1]; var height=layout.initHeight; var opacity=position.interpolate({ inputRange:inputRange, outputRange:[1,1,0.3]}); var scale=position.interpolate({ inputRange:inputRange, outputRange:[1,1,0.95]}); var translateX=0; var translateY=position.interpolate({ inputRange:inputRange, outputRange:[height,0,-10]}); return{ opacity:opacity, transform:[ {scale:scale}, {translateX:translateX}, {translateY:translateY}]}; } module.exports={ forHorizontal:forHorizontal, forVertical:forVertical}; }, "NavigationCardStackStyleInterpolator"); __d(512 /* NavigationPagerPanResponder */, function(global, require, module, exports) { 'use strict'; var Animated=require(444 /* Animated */); var NavigationAbstractPanResponder=require(510 /* NavigationAbstractPanResponder */); var NavigationCardStackPanResponder=require(509 /* NavigationCardStackPanResponder */); var I18nManager=require(404 /* I18nManager */); var clamp=require(426 /* clamp */);var ANIMATION_DURATION= NavigationCardStackPanResponder.ANIMATION_DURATION;var POSITION_THRESHOLD=NavigationCardStackPanResponder.POSITION_THRESHOLD;var RESPOND_THRESHOLD=NavigationCardStackPanResponder.RESPOND_THRESHOLD;var Directions=NavigationCardStackPanResponder.Directions; var DISTANCE_THRESHOLD=50; var VELOCITY_THRESHOLD=1.5;var NavigationPagerPanResponder=function(_NavigationAbstractPa){babelHelpers.inherits(NavigationPagerPanResponder,_NavigationAbstractPa); function NavigationPagerPanResponder( direction, props) {babelHelpers.classCallCheck(this,NavigationPagerPanResponder);var _this=babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(NavigationPagerPanResponder).call(this)); _this._isResponding=false; _this._isVertical=direction===Directions.VERTICAL; _this._props=props; _this._startValue=0;return _this; }babelHelpers.createClass(NavigationPagerPanResponder,[{key:'onMoveShouldSetPanResponder',value:function onMoveShouldSetPanResponder( event,gesture){ var props=this._props; if(props.navigationState.index!==props.scene.index){ return false; } var layout=props.layout; var isVertical=this._isVertical; var axis=isVertical?'dy':'dx'; var index=props.navigationState.index; var distance=isVertical? layout.height.__getValue(): layout.width.__getValue(); return( Math.abs(gesture[axis])>RESPOND_THRESHOLD&& distance>0&& index>=0); }},{key:'onPanResponderGrant',value:function onPanResponderGrant() {var _this2=this; this._isResponding=false; this._props.position.stopAnimation(function(value){ _this2._isResponding=true; _this2._startValue=value; }); }},{key:'onPanResponderMove',value:function onPanResponderMove( event,gesture){ if(!this._isResponding){ return; }var _props= this._props;var layout=_props.layout;var navigationState=_props.navigationState;var position=_props.position;var scenes=_props.scenes; var isVertical=this._isVertical; var axis=isVertical?'dy':'dx'; var index=navigationState.index; var distance=isVertical? layout.height.__getValue(): layout.width.__getValue(); var currentValue=I18nManager.isRTL&&axis==='dx'? this._startValue+gesture[axis]/distance: this._startValue-gesture[axis]/distance; var prevIndex=Math.max( 0, index-1); var nextIndex=Math.min( index+1, scenes.length-1); var value=clamp( prevIndex, currentValue, nextIndex); position.setValue(value); }},{key:'onPanResponderRelease',value:function onPanResponderRelease( event,gesture){var _this3=this; if(!this._isResponding){ return; } this._isResponding=false;var _props2= this._props;var navigationState=_props2.navigationState;var onNavigateBack=_props2.onNavigateBack;var onNavigateForward=_props2.onNavigateForward;var position=_props2.position; var isVertical=this._isVertical; var axis=isVertical?'dy':'dx'; var velocityAxis=isVertical?'vy':'vx'; var index=navigationState.index; var distance=I18nManager.isRTL&&axis==='dx'? -gesture[axis]: gesture[axis]; var moveSpeed=I18nManager.isRTL&&velocityAxis==='vx'? -gesture[velocityAxis]: gesture[velocityAxis]; position.stopAnimation(function(value){ _this3._reset(); if( distance>DISTANCE_THRESHOLD|| value<=index-POSITION_THRESHOLD|| moveSpeed>VELOCITY_THRESHOLD) { onNavigateBack&&onNavigateBack(); return; } if( distance<-DISTANCE_THRESHOLD|| value>=index+POSITION_THRESHOLD|| moveSpeed<-VELOCITY_THRESHOLD) { onNavigateForward&&onNavigateForward(); } }); }},{key:'onPanResponderTerminate',value:function onPanResponderTerminate() { this._isResponding=false; this._reset(); }},{key:'_reset',value:function _reset() { var props=this._props; Animated.timing( props.position, { toValue:props.navigationState.index, duration:ANIMATION_DURATION}). start(); }}]);return NavigationPagerPanResponder;}(NavigationAbstractPanResponder); function createPanHandlers( direction, props) { var responder=new NavigationPagerPanResponder(direction,props); return responder.panHandlers; } function forHorizontal( props) { return createPanHandlers(Directions.HORIZONTAL,props); } module.exports={ forHorizontal:forHorizontal}; }, "NavigationPagerPanResponder"); __d(513 /* NavigationPagerStyleInterpolator */, function(global, require, module, exports) { 'use strict'; var I18nManager=require(404 /* I18nManager */); function forInitial(props){var navigationState= props.navigationState;var scene=props.scene; var focused=navigationState.index===scene.index; var opacity=focused?1:0; var dir=scene.index>navigationState.index?1:-1; var translate=focused?0:1000000*dir; return{ opacity:opacity, transform:[ {translateX:translate}, {translateY:translate}]}; } function forHorizontal(props){var layout= props.layout;var position=props.position;var scene=props.scene; if(!layout.isMeasured){ return forInitial(props); } var index=scene.index; var inputRange=[index-1,index,index+1]; var width=layout.initWidth; var outputRange=I18nManager.isRTL? [-width,0,width]: [width,0,-width]; var translateX=position.interpolate({ inputRange:inputRange, outputRange:outputRange}); return{ opacity:1, shadowColor:'transparent', shadowRadius:0, transform:[ {scale:1}, {translateX:translateX}, {translateY:0}]}; } module.exports={ forHorizontal:forHorizontal}; }, "NavigationPagerStyleInterpolator"); __d(514 /* NavigationPointerEventsContainer */, function(global, require, module, exports) { 'use strict'; var React=require(103 /* React */); var NavigationAnimatedValueSubscription=require(515 /* NavigationAnimatedValueSubscription */); var invariant=require(56 /* fbjs/lib/invariant */); var MIN_POSITION_OFFSET=0.01; function create( Component) {var Container=function(_React$Component){babelHelpers.inherits(Container,_React$Component); function Container(props,context){babelHelpers.classCallCheck(this,Container);var _this=babelHelpers.possibleConstructorReturn(this,Object.getPrototypeOf(Container).call(this, props,context)); _this._pointerEvents=_this._computePointerEvents();return _this; }babelHelpers.createClass(Container,[{key:'componentWillMount',value:function componentWillMount() { this._onPositionChange=this._onPositionChange.bind(this); this._onComponentRef=this._onComponentRef.bind(this); }},{key:'componentDidMount',value:function componentDidMount() { this._bindPosition(this.props); }},{key:'componentWillUnmount',value:function componentWillUnmount() { this._positionListener&&this._positionListener.remove(); }},{key:'componentWillReceiveProps',value:function componentWillReceiveProps( nextProps){ this._bindPosition(nextProps); }},{key:'render',value:function render() { this._pointerEvents=this._computePointerEvents(); return( React.createElement(Component,babelHelpers.extends({}, this.props,{ pointerEvents:this._pointerEvents, onComponentRef:this._onComponentRef}))); }},{key:'_onComponentRef',value:function _onComponentRef( component){ this._component=component; if(component){ invariant( typeof component.setNativeProps==='function', 'component must implement method `setNativeProps`'); } }},{key:'_bindPosition',value:function _bindPosition( props){ this._positionListener&&this._positionListener.remove(); this._positionListener=new NavigationAnimatedValueSubscription( props.position, this._onPositionChange); }},{key:'_onPositionChange',value:function _onPositionChange() { if(this._component){ var pointerEvents=this._computePointerEvents(); if(this._pointerEvents!==pointerEvents){ this._pointerEvents=pointerEvents; this._component.setNativeProps({pointerEvents:pointerEvents}); } } }},{key:'_computePointerEvents',value:function _computePointerEvents() {var _props= this.props;var navigationState=_props.navigationState;var position=_props.position;var scene=_props.scene; if(scene.isStale||navigationState.index!==scene.index){ return scene.index>navigationState.index? 'box-only': 'none'; } var offset=position.__getAnimatedValue()-navigationState.index; if(Math.abs(offset)>MIN_POSITION_OFFSET){ return'box-only'; } return'auto'; }}]);return Container;}(React.Component); return Container; } module.exports={ create:create}; }, "NavigationPointerEventsContainer"); __d(515 /* NavigationAnimatedValueSubscription */, function(global, require, module, exports) { 'use strict';var NavigationAnimatedValueSubscription=function(){ function NavigationAnimatedValueSubscription(value,callback){babelHelpers.classCallCheck(this,NavigationAnimatedValueSubscription); this._value=value; this._token=value.addListener(callback); }babelHelpers.createClass(NavigationAnimatedValueSubscription,[{key:'remove',value:function remove() { this._value.removeListener(this._token); }}]);return NavigationAnimatedValueSubscription;}(); module.exports=NavigationAnimatedValueSubscription; }, "NavigationAnimatedValueSubscription"); __d(516 /* NavigationPropTypes */, function(global, require, module, exports) { 'use strict'; var Animated=require(444 /* Animated */); var React=require(103 /* React */);var PropTypes=React.PropTypes; var action=PropTypes.shape({ type:PropTypes.string.isRequired}); var animatedValue=PropTypes.instanceOf(Animated.Value); var navigationRoute=PropTypes.shape({ key:PropTypes.string.isRequired}); var navigationState=PropTypes.shape({ index:PropTypes.number.isRequired, routes:PropTypes.arrayOf(navigationRoute)}); var layout=PropTypes.shape({ height:animatedValue, initHeight:PropTypes.number.isRequired, initWidth:PropTypes.number.isRequired, isMeasured:PropTypes.bool.isRequired, width:animatedValue}); var scene=PropTypes.shape({ index:PropTypes.number.isRequired, isActive:PropTypes.bool.isRequired, isStale:PropTypes.bool.isRequired, key:PropTypes.string.isRequired, route:navigationRoute.isRequired}); var SceneRendererProps={ layout:layout.isRequired, navigationState:navigationState.isRequired, position:animatedValue.isRequired, progress:animatedValue.isRequired, scene:scene.isRequired, scenes:PropTypes.arrayOf(scene).isRequired}; var SceneRenderer=PropTypes.shape(SceneRendererProps); var panHandlers=PropTypes.shape({ onMoveShouldSetResponder:PropTypes.func.isRequired, onMoveShouldSetResponderCapture:PropTypes.func.isRequired, onResponderEnd:PropTypes.func.isRequired, onResponderGrant:PropTypes.func.isRequired, onResponderMove:PropTypes.func.isRequired, onResponderReject:PropTypes.func.isRequired, onResponderRelease:PropTypes.func.isRequired, onResponderStart:PropTypes.func.isRequired, onResponderTerminate:PropTypes.func.isRequired, onResponderTerminationRequest:PropTypes.func.isRequired, onStartShouldSetResponder:PropTypes.func.isRequired, onStartShouldSetResponderCapture:PropTypes.func.isRequired}); function extractSceneRendererProps( props) { return{ layout:props.layout, navigationState:props.navigationState, position:props.position, progress:props.progress, scene:props.scene, scenes:props.scenes}; } module.exports={ extractSceneRendererProps:extractSceneRendererProps, SceneRendererProps:SceneRendererProps, SceneRenderer:SceneRenderer, action:action, navigationState:navigationState, navigationRoute:navigationRoute, panHandlers:panHandlers}; }, "NavigationPropTypes"); __d(517 /* react/lib/ReactComponentWithPureRenderMixin.js */, function(global, require, module, exports) { 'use strict'; var shallowCompare=require(518 /* ./shallowCompare */); var ReactComponentWithPureRenderMixin={ shouldComponentUpdate:function shouldComponentUpdate(nextProps,nextState){ return shallowCompare(this,nextProps,nextState); }}; module.exports=ReactComponentWithPureRenderMixin; }, "react/lib/ReactComponentWithPureRenderMixin.js"); __d(518 /* react/lib/shallowCompare.js */, function(global, require, module, exports) { 'use strict'; var shallowEqual=require(519 /* fbjs/lib/shallowEqual */); function shallowCompare(instance,nextProps,nextState){ return!shallowEqual(instance.props,nextProps)||!shallowEqual(instance.state,nextState); } module.exports=shallowCompare; }, "react/lib/shallowCompare.js"); __d(519 /* fbjs/lib/shallowEqual.js */, function(global, require, module, exports) { 'use strict'; var hasOwnProperty=Object.prototype.hasOwnProperty; function is(x,y){ if(x===y){ return x!==0||1/x===1/y; }else{ return x!==x&&y!==y; } } function shallowEqual(objA,objB){ if(is(objA,objB)){ return true; } if(typeof objA!=='object'||objA===null||typeof objB!=='object'||objB===null){ return false; } var keysA=Object.keys(objA); var keysB=Object.keys(objB); if(keysA.length!==keysB.length){ return false; } for(var i=0;i0){ return 1; } if(delta<0){ return-1; } return one>two?1:-1; } function compareScenes( one, two) { if(one.index>two.index){ return 1; } if(one.index2){ return null; } var subViewProps=babelHelpers.extends({},props,{onNavigateBack:this.props.onNavigateBack}); var subView=renderer(subViewProps); if(subView===null){ return null; } var pointerEvents=offset!==0||isStale?'none':'box-none'; return( React.createElement(Animated.View,{ pointerEvents:pointerEvents, key:name+'_'+key, style:[ styles[name], styleInterpolator(props)]}, subView)); }}]);return NavigationHeader;}(React.Component);NavigationHeader.defaultProps={renderTitleComponent:function renderTitleComponent(props){var title=String(props.scene.route.title||'');return React.createElement(NavigationHeaderTitle,null,title);},renderLeftComponent:function renderLeftComponent(props){if(props.scene.index===0||!props.onNavigateBack){return null;}return React.createElement(NavigationHeaderBackButton,{onPress:props.onNavigateBack});},renderRightComponent:function renderRightComponent(props){return null;}};NavigationHeader.propTypes=babelHelpers.extends({},NavigationPropTypes.SceneRendererProps,{onNavigateBack:PropTypes.func,renderLeftComponent:PropTypes.func,renderRightComponent:PropTypes.func,renderTitleComponent:PropTypes.func,style:View.propTypes.style,viewProps:PropTypes.shape(View.propTypes)});NavigationHeader. HEIGHT=APPBAR_HEIGHT+STATUSBAR_HEIGHT;NavigationHeader. Title=NavigationHeaderTitle;NavigationHeader. BackButton=NavigationHeaderBackButton; var styles=StyleSheet.create({ appbar:{ alignItems:'center', backgroundColor:Platform.OS==='ios'?'#EFEFF2':'#FFF', borderBottomColor:'rgba(0, 0, 0, .15)', borderBottomWidth:Platform.OS==='ios'?StyleSheet.hairlineWidth:0, elevation:4, flexDirection:'row', height:APPBAR_HEIGHT+STATUSBAR_HEIGHT, justifyContent:'flex-start', left:0, marginBottom:16, position:'absolute', right:0, top:0}, title:{ bottom:0, left:APPBAR_HEIGHT, marginTop:STATUSBAR_HEIGHT, position:'absolute', right:APPBAR_HEIGHT, top:0}, left:{ bottom:0, left:0, marginTop:STATUSBAR_HEIGHT, position:'absolute', top:0}, right:{ bottom:0, marginTop:STATUSBAR_HEIGHT, position:'absolute', right:0, top:0}}); module.exports=NavigationHeader; }, "NavigationHeader"); __d(525 /* NavigationHeaderTitle */, function(global, require, module, exports) { 'use strict'; var React=require(12 /* react */); var ReactNative=require(43 /* react-native */);var Platform= ReactNative.Platform;var StyleSheet=ReactNative.StyleSheet;var View=ReactNative.View;var Text=ReactNative.Text; var NavigationHeaderTitle=function NavigationHeaderTitle(_ref){var children=_ref.children;var style=_ref.style;var textStyle=_ref.textStyle;var viewProps=_ref.viewProps;return( React.createElement(View,babelHelpers.extends({style:[styles.title,style]},viewProps), React.createElement(Text,{style:[styles.titleText,textStyle]},children)));}; var styles=StyleSheet.create({ title:{ flex:1, flexDirection:'row', alignItems:'center', marginHorizontal:16}, titleText:{ flex:1, fontSize:18, fontWeight:'500', color:'rgba(0, 0, 0, .9)', textAlign:Platform.OS==='ios'?'center':'left'}}); NavigationHeaderTitle.propTypes={ children:React.PropTypes.string.isRequired, style:View.propTypes.style, textStyle:Text.propTypes.style}; module.exports=NavigationHeaderTitle; }, "NavigationHeaderTitle"); __d(526 /* NavigationHeaderBackButton */, function(global, require, module, exports) { 'use strict'; var React=require(12 /* react */); var ReactNative=require(43 /* react-native */);var Image= ReactNative.Image;var Platform=ReactNative.Platform;var StyleSheet=ReactNative.StyleSheet;var TouchableOpacity=ReactNative.TouchableOpacity; var NavigationHeaderBackButton=function NavigationHeaderBackButton(props){return( React.createElement(TouchableOpacity,{style:styles.buttonContainer,onPress:props.onPress}, React.createElement(Image,{style:styles.button,source:require(527 /* ./assets/back-icon.png */)})));}; NavigationHeaderBackButton.propTypes={ onPress:React.PropTypes.func.isRequired}; var styles=StyleSheet.create({ buttonContainer:{ flex:1, flexDirection:'row', alignItems:'center', justifyContent:'center'}, button:{ height:24, width:24, margin:Platform.OS==='ios'?10:16, resizeMode:'contain'}}); module.exports=NavigationHeaderBackButton; }, "NavigationHeaderBackButton"); __d(527 /* react-native/Libraries/CustomComponents/NavigationExperimental/assets/back-icon.png */, function(global, require, module, exports) {module.exports = require(169 /* react-native/Libraries/Image/AssetRegistry */).registerAsset({"__packager_asset":true,"fileSystemLocation":"/Users/sky/dev/react/native/SmartReactNativeApp/node_modules/react-native/Libraries/CustomComponents/NavigationExperimental/assets","httpServerLocation":"/assets/node_modules/react-native/Libraries/CustomComponents/NavigationExperimental/assets","width":24,"height":24,"scales":[1,1.5,2,3,4],"files":["/Users/sky/dev/react/native/SmartReactNativeApp/node_modules/react-native/Libraries/CustomComponents/NavigationExperimental/assets/back-icon@1x.android.png","/Users/sky/dev/react/native/SmartReactNativeApp/node_modules/react-native/Libraries/CustomComponents/NavigationExperimental/assets/back-icon@1.5x.android.png","/Users/sky/dev/react/native/SmartReactNativeApp/node_modules/react-native/Libraries/CustomComponents/NavigationExperimental/assets/back-icon@2x.android.png","/Users/sky/dev/react/native/SmartReactNativeApp/node_modules/react-native/Libraries/CustomComponents/NavigationExperimental/assets/back-icon@3x.android.png","/Users/sky/dev/react/native/SmartReactNativeApp/node_modules/react-native/Libraries/CustomComponents/NavigationExperimental/assets/back-icon@4x.android.png"],"hash":"d049eae53386f5bdf6b1eec17c66ac40","name":"back-icon","type":"png"}); }, "react-native/Libraries/CustomComponents/NavigationExperimental/assets/back-icon.png"); __d(528 /* NavigationHeaderStyleInterpolator */, function(global, require, module, exports) { 'use strict'; function forLeft(props){var position=props.position;var scene=props.scene;var index=scene.index; return{ opacity:position.interpolate({ inputRange:[index-1,index,index+1], outputRange:[0,1,0]})}; } function forCenter(props){var position=props.position;var scene=props.scene;var index=scene.index; return{ opacity:position.interpolate({ inputRange:[index-1,index,index+1], outputRange:[0,1,0]}), transform:[ { translateX:position.interpolate({ inputRange:[index-1,index+1], outputRange:[200,-200]})}]}; } function forRight(props){var position=props.position;var scene=props.scene;var index=scene.index; return{ opacity:position.interpolate({ inputRange:[index-1,index,index+1], outputRange:[0,1,0]})}; } module.exports={ forCenter:forCenter, forLeft:forLeft, forRight:forRight}; }, "NavigationHeaderStyleInterpolator"); __d(529 /* NavigationStateUtils */, function(global, require, module, exports) { 'use strict'; var invariant=require(56 /* fbjs/lib/invariant */); function get(state,key){ return state.routes.find(function(route){return route.key===key;})||null; } function indexOf(state,key){ return state.routes.map(function(route){return route.key;}).indexOf(key); } function has(state,key){ return!!state.routes.some(function(route){return route.key===key;}); } function push(state,route){ invariant( indexOf(state,route.key)===-1, 'should not push route with duplicated key %s', route.key); var routes=[].concat(babelHelpers.toConsumableArray( state.routes),[ route]); return babelHelpers.extends({}, state,{ index:routes.length-1, routes:routes}); } function pop(state){ if(state.index<=0){ return state; } var routes=state.routes.slice(0,-1); return babelHelpers.extends({}, state,{ index:routes.length-1, routes:routes}); } function jumpToIndex(state,index){ if(index===state.index){ return state; } invariant(!!state.routes[index],'invalid index %s to jump to',index); return babelHelpers.extends({}, state,{ index:index}); } function jumpTo(state,key){ var index=indexOf(state,key); return jumpToIndex(state,index); } function back(state){ var index=state.index-1; var route=state.routes[index]; return route?jumpToIndex(state,index):state; } function forward(state){ var index=state.index+1; var route=state.routes[index]; return route?jumpToIndex(state,index):state; } function replaceAt( state, key, route) { var index=indexOf(state,key); return replaceAtIndex(state,index,route); } function replaceAtIndex( state, index, route) { invariant( !!state.routes[index], 'invalid index %s for replacing route %s', index, route.key); if(state.routes[index]===route){ return state; } var routes=state.routes.slice(); routes[index]=route; return babelHelpers.extends({}, state,{ index:index, routes:routes}); } function reset( state, routes, index) { invariant( routes.length&&Array.isArray(routes), 'invalid routes to replace'); var nextIndex=index===undefined?routes.length-1:index; if(state.routes.length===routes.length&&state.index===nextIndex){ var compare=function compare(route,ii){return routes[ii]===route;}; if(state.routes.every(compare)){ return state; } } invariant(!!routes[nextIndex],'invalid index %s to reset',nextIndex); return babelHelpers.extends({}, state,{ index:nextIndex, routes:routes}); } var NavigationStateUtils={ back:back, forward:forward, get:get, has:has, indexOf:indexOf, jumpTo:jumpTo, jumpToIndex:jumpToIndex, pop:pop, push:push, replaceAt:replaceAt, replaceAtIndex:replaceAtIndex, reset:reset}; module.exports=NavigationStateUtils; }, "NavigationStateUtils"); __d(530 /* NetInfo */, function(global, require, module, exports) { 'use strict'; var Map=require(215 /* Map */); var NativeEventEmitter=require(81 /* NativeEventEmitter */); var NativeModules=require(60 /* NativeModules */); var Platform=require(59 /* Platform */); var RCTNetInfo=NativeModules.NetInfo; var deprecatedCallback=require(501 /* deprecatedCallback */); var NetInfoEventEmitter=new NativeEventEmitter(RCTNetInfo); var DEVICE_CONNECTIVITY_EVENT='networkStatusDidChange'; var _subscriptions=new Map(); var _isConnected=void 0; if(Platform.OS==='ios'){ _isConnected=function _isConnected( reachability) { return reachability!=='none'&&reachability!=='unknown'; }; }else if(Platform.OS==='android'){ _isConnected=function _isConnected( connectionType) { return connectionType!=='NONE'&&connectionType!=='UNKNOWN'; }; } var _isConnectedSubscriptions=new Map(); var NetInfo={ addEventListener:function addEventListener( eventName, handler) { var listener=NetInfoEventEmitter.addListener( DEVICE_CONNECTIVITY_EVENT, function(appStateData){ handler(appStateData.network_info); }); _subscriptions.set(handler,listener); return{ remove:function remove(){return NetInfo.removeEventListener(eventName,handler);}}; }, removeEventListener:function removeEventListener( eventName, handler) { var listener=_subscriptions.get(handler); if(!listener){ return; } listener.remove(); _subscriptions.delete(handler); }, fetch:function fetch(){ return RCTNetInfo.getCurrentConnectivity().then(function(resp){return resp.network_info;}); }, isConnected:{ addEventListener:function addEventListener( eventName, handler) { var listener=function listener(connection){ handler(_isConnected(connection)); }; _isConnectedSubscriptions.set(handler,listener); NetInfo.addEventListener( eventName, listener); return{ remove:function remove(){return NetInfo.isConnected.removeEventListener(eventName,handler);}}; }, removeEventListener:function removeEventListener( eventName, handler) { var listener=_isConnectedSubscriptions.get(handler); NetInfo.removeEventListener( eventName, listener); _isConnectedSubscriptions.delete(handler); }, fetch:function fetch(){ return NetInfo.fetch().then( function(connection){return _isConnected(connection);}); }}, isConnectionExpensive:function isConnectionExpensive(){ return deprecatedCallback( Platform.OS==='android'?RCTNetInfo.isConnectionMetered():Promise.reject(new Error('Currently not supported on iOS')), Array.prototype.slice.call(arguments), 'single-callback-value-first', 'NetInfo.isConnectionMetered(callback) is deprecated. Use the returned Promise instead.'); }}; module.exports=NetInfo; }, "NetInfo"); __d(531 /* PushNotificationIOS */, function(global, require, module, exports) { 'use strict'; var NativeEventEmitter=require(81 /* NativeEventEmitter */); var RCTPushNotificationManager=require(60 /* NativeModules */).PushNotificationManager; var invariant=require(56 /* fbjs/lib/invariant */); var PushNotificationEmitter=new NativeEventEmitter(RCTPushNotificationManager); var _notifHandlers=new Map(); var DEVICE_NOTIF_EVENT='remoteNotificationReceived'; var NOTIF_REGISTER_EVENT='remoteNotificationsRegistered'; var DEVICE_LOCAL_NOTIF_EVENT='localNotificationReceived';var PushNotificationIOS=function(){babelHelpers.createClass(PushNotificationIOS,null,[{key:'presentLocalNotification',value:function presentLocalNotification( details){ RCTPushNotificationManager.presentLocalNotification(details); }},{key:'scheduleLocalNotification',value:function scheduleLocalNotification( details){ RCTPushNotificationManager.scheduleLocalNotification(details); }},{key:'cancelAllLocalNotifications',value:function cancelAllLocalNotifications() { RCTPushNotificationManager.cancelAllLocalNotifications(); }},{key:'setApplicationIconBadgeNumber',value:function setApplicationIconBadgeNumber( number){ RCTPushNotificationManager.setApplicationIconBadgeNumber(number); }},{key:'getApplicationIconBadgeNumber',value:function getApplicationIconBadgeNumber( callback){ RCTPushNotificationManager.getApplicationIconBadgeNumber(callback); }},{key:'cancelLocalNotifications',value:function cancelLocalNotifications( userInfo){ RCTPushNotificationManager.cancelLocalNotifications(userInfo); }},{key:'getScheduledLocalNotifications',value:function getScheduledLocalNotifications( callback){ RCTPushNotificationManager.getScheduledLocalNotifications(callback); }},{key:'addEventListener',value:function addEventListener( type,handler){ invariant( type==='notification'||type==='register'||type==='localNotification', 'PushNotificationIOS only supports `notification`, `register` and `localNotification` events'); var listener; if(type==='notification'){ listener=PushNotificationEmitter.addListener( DEVICE_NOTIF_EVENT, function(notifData){ handler(new PushNotificationIOS(notifData)); }); }else if(type==='localNotification'){ listener=PushNotificationEmitter.addListener( DEVICE_LOCAL_NOTIF_EVENT, function(notifData){ handler(new PushNotificationIOS(notifData)); }); }else if(type==='register'){ listener=PushNotificationEmitter.addListener( NOTIF_REGISTER_EVENT, function(registrationInfo){ handler(registrationInfo.deviceToken); }); } _notifHandlers.set(handler,listener); }},{key:'removeEventListener',value:function removeEventListener( type,handler){ invariant( type==='notification'||type==='register'||type==='localNotification', 'PushNotificationIOS only supports `notification`, `register` and `localNotification` events'); var listener=_notifHandlers.get(handler); if(!listener){ return; } listener.remove(); _notifHandlers.delete(handler); }},{key:'requestPermissions',value:function requestPermissions( permissions) { var requestedPermissions={}; if(permissions){ requestedPermissions={ alert:!!permissions.alert, badge:!!permissions.badge, sound:!!permissions.sound}; }else{ requestedPermissions={ alert:true, badge:true, sound:true}; } return RCTPushNotificationManager.requestPermissions(requestedPermissions); }},{key:'abandonPermissions',value:function abandonPermissions() { RCTPushNotificationManager.abandonPermissions(); }},{key:'checkPermissions',value:function checkPermissions( callback){ invariant( typeof callback==='function', 'Must provide a valid callback'); RCTPushNotificationManager.checkPermissions(callback); }},{key:'getInitialNotification',value:function getInitialNotification() { return RCTPushNotificationManager.getInitialNotification().then(function(notification){ return notification&&new PushNotificationIOS(notification); }); }}]); function PushNotificationIOS(nativeNotif){var _this=this;babelHelpers.classCallCheck(this,PushNotificationIOS); this._data={}; if(nativeNotif.remote){ Object.keys(nativeNotif).forEach(function(notifKey){ var notifVal=nativeNotif[notifKey]; if(notifKey==='aps'){ _this._alert=notifVal.alert; _this._sound=notifVal.sound; _this._badgeCount=notifVal.badge; }else{ _this._data[notifKey]=notifVal; } }); }else{ this._badgeCount=nativeNotif.applicationIconBadgeNumber; this._sound=nativeNotif.soundName; this._alert=nativeNotif.alertBody; this._data=nativeNotif.userInfo; } }babelHelpers.createClass(PushNotificationIOS,[{key:'getMessage',value:function getMessage() { return this._alert; }},{key:'getSound',value:function getSound() { return this._sound; }},{key:'getAlert',value:function getAlert() { return this._alert; }},{key:'getBadgeCount',value:function getBadgeCount() { return this._badgeCount; }},{key:'getData',value:function getData() { return this._data; }}]);return PushNotificationIOS;}(); module.exports=PushNotificationIOS; }, "PushNotificationIOS"); __d(532 /* Settings */, function(global, require, module, exports) { 'use strict'; var Settings={ get:function get(key){ console.warn('Settings is not yet supported on Android'); return null; }, set:function set(settings){ console.warn('Settings is not yet supported on Android'); }, watchKeys:function watchKeys(keys,callback){ console.warn('Settings is not yet supported on Android'); return-1; }, clearWatch:function clearWatch(watchId){ console.warn('Settings is not yet supported on Android'); }}; module.exports=Settings; }, "Settings"); __d(533 /* TimePickerAndroid */, function(global, require, module, exports) { 'use strict'; var TimePickerModule=require(60 /* NativeModules */).TimePickerAndroid;var TimePickerAndroid=function(){function TimePickerAndroid(){babelHelpers.classCallCheck(this,TimePickerAndroid);}babelHelpers.createClass(TimePickerAndroid,null,[{key:'open',value:function open( options){return regeneratorRuntime.async(function open$(_context){while(1){switch(_context.prev=_context.next){case 0:return _context.abrupt('return', TimePickerModule.open(options));case 1:case'end':return _context.stop();}}},null,this);}},{key:'timeSetAction',get:function get() {return'timeSetAction';}},{key:'dismissedAction',get:function get() {return'dismissedAction';}}]);return TimePickerAndroid;}(); module.exports=TimePickerAndroid; }, "TimePickerAndroid"); __d(534 /* Vibration */, function(global, require, module, exports) { 'use strict'; var RCTVibration=require(60 /* NativeModules */).Vibration; var Platform=require(59 /* Platform */); var Vibration={ vibrate:function vibrate(){var pattern=arguments.length<=0||arguments[0]===undefined?400:arguments[0];var repeat=arguments.length<=1||arguments[1]===undefined?false:arguments[1]; if(Platform.OS==='android'){ if(typeof pattern==='number'){ RCTVibration.vibrate(pattern); }else if(Array.isArray(pattern)){ RCTVibration.vibrateByPattern(pattern,repeat?0:-1); }else{ throw new Error('Vibration pattern should be a number or array'); } }else{ if(typeof pattern==='number'){ RCTVibration.vibrate(); }else if(Array.isArray(pattern)){ console.warn('Vibration patterns are not supported on iOS'); }else{ throw new Error('Vibration pattern should be a number or array'); } } }, cancel:function cancel(){ if(Platform.OS==='ios'){ console.warn('Vibration.cancel is not supported on iOS'); }else{ RCTVibration.cancel(); } }}; module.exports=Vibration; }, "Vibration"); __d(535 /* VibrationIOS */, function(global, require, module, exports) { 'use strict'; var warning=require(44 /* fbjs/lib/warning */); var VibrationIOS={ vibrate:function vibrate(){ warning('VibrationIOS is not supported on this platform!'); }}; module.exports=VibrationIOS; }, "VibrationIOS"); __d(536 /* react/lib/LinkedStateMixin.js */, function(global, require, module, exports) { 'use strict'; var ReactLink=require(537 /* ./ReactLink */); var ReactStateSetters=require(538 /* ./ReactStateSetters */); var LinkedStateMixin={ linkState:function linkState(key){ return new ReactLink(this.state[key],ReactStateSetters.createStateKeySetter(this,key)); }}; module.exports=LinkedStateMixin; }, "react/lib/LinkedStateMixin.js"); __d(537 /* react/lib/ReactLink.js */, function(global, require, module, exports) { 'use strict'; var React=require(13 /* ./React */); function ReactLink(value,requestChange){ this.value=value; this.requestChange=requestChange; } function createLinkTypeChecker(linkType){ var shapes={ value:linkType===undefined?React.PropTypes.any.isRequired:linkType.isRequired, requestChange:React.PropTypes.func.isRequired}; return React.PropTypes.shape(shapes); } ReactLink.PropTypes={ link:createLinkTypeChecker}; module.exports=ReactLink; }, "react/lib/ReactLink.js"); __d(538 /* react/lib/ReactStateSetters.js */, function(global, require, module, exports) { 'use strict'; var ReactStateSetters={ createStateSetter:function createStateSetter(component,funcReturningState){ return function(a,b,c,d,e,f){ var partialState=funcReturningState.call(component,a,b,c,d,e,f); if(partialState){ component.setState(partialState); } }; }, createStateKeySetter:function createStateKeySetter(component,key){ var cache=component.__keySetters||(component.__keySetters={}); return cache[key]||(cache[key]=_createStateKeySetter(component,key)); }}; function _createStateKeySetter(component,key){ var partialState={}; return function stateKeySetter(value){ partialState[key]=value; component.setState(partialState); }; } ReactStateSetters.Mixin={ createStateSetter:function createStateSetter(funcReturningState){ return ReactStateSetters.createStateSetter(this,funcReturningState); }, createStateKeySetter:function createStateKeySetter(key){ return ReactStateSetters.createStateKeySetter(this,key); }}; module.exports=ReactStateSetters; }, "react/lib/ReactStateSetters.js"); __d(539 /* react/lib/ReactFragment.js */, function(global, require, module, exports) { 'use strict'; var _prodInvariant=require(17 /* ./reactProdInvariant */); var ReactChildren=require(15 /* ./ReactChildren */); var ReactElement=require(19 /* ./ReactElement */); var emptyFunction=require(22 /* fbjs/lib/emptyFunction */); var invariant=require(18 /* fbjs/lib/invariant */); var warning=require(21 /* fbjs/lib/warning */); var numericPropertyRegex=/^\d+$/; var warnedAboutNumeric=false; var ReactFragment={ create:function create(object){ if(typeof object!=='object'||!object||Array.isArray(object)){ process.env.NODE_ENV!=='production'?warning(false,'React.addons.createFragment only accepts a single object. Got: %s',object):void 0; return object; } if(ReactElement.isValidElement(object)){ process.env.NODE_ENV!=='production'?warning(false,'React.addons.createFragment does not accept a ReactElement '+'without a wrapper object.'):void 0; return object; } !(object.nodeType!==1)?process.env.NODE_ENV!=='production'?invariant(false,'React.addons.createFragment(...): Encountered an invalid child; DOM elements are not valid children of React components.'):_prodInvariant('0'):void 0; var result=[]; for(var key in object){ if(process.env.NODE_ENV!=='production'){ if(!warnedAboutNumeric&&numericPropertyRegex.test(key)){ process.env.NODE_ENV!=='production'?warning(false,'React.addons.createFragment(...): Child objects should have '+'non-numeric keys so ordering is preserved.'):void 0; warnedAboutNumeric=true; } } ReactChildren.mapIntoWithKeyPrefixInternal(object[key],result,key,emptyFunction.thatReturnsArgument); } return result; }}; module.exports=ReactFragment; }, "react/lib/ReactFragment.js"); __d(540 /* react/lib/update.js */, function(global, require, module, exports) { 'use strict'; var _prodInvariant=require(17 /* ./reactProdInvariant */), _assign=require(14 /* object-assign */); var keyOf=require(34 /* fbjs/lib/keyOf */); var invariant=require(18 /* fbjs/lib/invariant */); var hasOwnProperty={}.hasOwnProperty; function shallowCopy(x){ if(Array.isArray(x)){ return x.concat(); }else if(x&&typeof x==='object'){ return _assign(new x.constructor(),x); }else{ return x; } } var COMMAND_PUSH=keyOf({$push:null}); var COMMAND_UNSHIFT=keyOf({$unshift:null}); var COMMAND_SPLICE=keyOf({$splice:null}); var COMMAND_SET=keyOf({$set:null}); var COMMAND_MERGE=keyOf({$merge:null}); var COMMAND_APPLY=keyOf({$apply:null}); var ALL_COMMANDS_LIST=[COMMAND_PUSH,COMMAND_UNSHIFT,COMMAND_SPLICE,COMMAND_SET,COMMAND_MERGE,COMMAND_APPLY]; var ALL_COMMANDS_SET={}; ALL_COMMANDS_LIST.forEach(function(command){ ALL_COMMANDS_SET[command]=true; }); function invariantArrayCase(value,spec,command){ !Array.isArray(value)?process.env.NODE_ENV!=='production'?invariant(false,'update(): expected target of %s to be an array; got %s.',command,value):_prodInvariant('1',command,value):void 0; var specValue=spec[command]; !Array.isArray(specValue)?process.env.NODE_ENV!=='production'?invariant(false,'update(): expected spec of %s to be an array; got %s. Did you forget to wrap your parameter in an array?',command,specValue):_prodInvariant('2',command,specValue):void 0; } function update(value,spec){ !(typeof spec==='object')?process.env.NODE_ENV!=='production'?invariant(false,'update(): You provided a key path to update() that did not contain one of %s. Did you forget to include {%s: ...}?',ALL_COMMANDS_LIST.join(', '),COMMAND_SET):_prodInvariant('3',ALL_COMMANDS_LIST.join(', '),COMMAND_SET):void 0; if(hasOwnProperty.call(spec,COMMAND_SET)){ !(Object.keys(spec).length===1)?process.env.NODE_ENV!=='production'?invariant(false,'Cannot have more than one key in an object with %s',COMMAND_SET):_prodInvariant('4',COMMAND_SET):void 0; return spec[COMMAND_SET]; } var nextValue=shallowCopy(value); if(hasOwnProperty.call(spec,COMMAND_MERGE)){ var mergeObj=spec[COMMAND_MERGE]; !(mergeObj&&typeof mergeObj==='object')?process.env.NODE_ENV!=='production'?invariant(false,'update(): %s expects a spec of type \'object\'; got %s',COMMAND_MERGE,mergeObj):_prodInvariant('5',COMMAND_MERGE,mergeObj):void 0; !(nextValue&&typeof nextValue==='object')?process.env.NODE_ENV!=='production'?invariant(false,'update(): %s expects a target of type \'object\'; got %s',COMMAND_MERGE,nextValue):_prodInvariant('6',COMMAND_MERGE,nextValue):void 0; _assign(nextValue,spec[COMMAND_MERGE]); } if(hasOwnProperty.call(spec,COMMAND_PUSH)){ invariantArrayCase(value,spec,COMMAND_PUSH); spec[COMMAND_PUSH].forEach(function(item){ nextValue.push(item); }); } if(hasOwnProperty.call(spec,COMMAND_UNSHIFT)){ invariantArrayCase(value,spec,COMMAND_UNSHIFT); spec[COMMAND_UNSHIFT].forEach(function(item){ nextValue.unshift(item); }); } if(hasOwnProperty.call(spec,COMMAND_SPLICE)){ !Array.isArray(value)?process.env.NODE_ENV!=='production'?invariant(false,'Expected %s target to be an array; got %s',COMMAND_SPLICE,value):_prodInvariant('7',COMMAND_SPLICE,value):void 0; !Array.isArray(spec[COMMAND_SPLICE])?process.env.NODE_ENV!=='production'?invariant(false,'update(): expected spec of %s to be an array of arrays; got %s. Did you forget to wrap your parameters in an array?',COMMAND_SPLICE,spec[COMMAND_SPLICE]):_prodInvariant('8',COMMAND_SPLICE,spec[COMMAND_SPLICE]):void 0; spec[COMMAND_SPLICE].forEach(function(args){ !Array.isArray(args)?process.env.NODE_ENV!=='production'?invariant(false,'update(): expected spec of %s to be an array of arrays; got %s. Did you forget to wrap your parameters in an array?',COMMAND_SPLICE,spec[COMMAND_SPLICE]):_prodInvariant('8',COMMAND_SPLICE,spec[COMMAND_SPLICE]):void 0; nextValue.splice.apply(nextValue,args); }); } if(hasOwnProperty.call(spec,COMMAND_APPLY)){ !(typeof spec[COMMAND_APPLY]==='function')?process.env.NODE_ENV!=='production'?invariant(false,'update(): expected spec of %s to be a function; got %s.',COMMAND_APPLY,spec[COMMAND_APPLY]):_prodInvariant('9',COMMAND_APPLY,spec[COMMAND_APPLY]):void 0; nextValue=spec[COMMAND_APPLY](nextValue); } for(var k in spec){ if(!(ALL_COMMANDS_SET.hasOwnProperty(k)&&ALL_COMMANDS_SET[k])){ nextValue[k]=update(value[k],spec[k]); } } return nextValue; } module.exports=update; }, "react/lib/update.js"); __d(541 /* throwOnWrongReactAPI */, function(global, require, module, exports) { 'use strict'; function throwOnWrongReactAPI(key){ throw new Error('Seems you\'re trying to access \'ReactNative.'+ key+'\' from the \'react-native\' package. Perhaps you meant to access \'React.'+key+'\' from the \'react\' package instead?\n\nFor example, instead of:\n\n import React, { Component, View } from \'react-native\';\n\nYou should now do:\n\n import React, { Component } from \'react\';\n import { View } from \'react-native\';\n\nCheck the release notes on how to upgrade your code - https://github.com/facebook/react-native/releases/tag/v0.25.1\n'); } module.exports=throwOnWrongReactAPI; }, "throwOnWrongReactAPI"); __d(542 /* react/lib/ReactTestUtils.js */, function(global, require, module, exports) { 'use strict'; var _prodInvariant=require(17 /* ./reactProdInvariant */), _assign=require(14 /* object-assign */); var EventConstants=require(136 /* ./EventConstants */); var EventPluginHub=require(137 /* ./EventPluginHub */); var EventPluginRegistry=require(138 /* ./EventPluginRegistry */); var EventPropagators=require(368 /* ./EventPropagators */); var React=require(13 /* ./React */); var ReactDefaultInjection=require(543 /* ./ReactDefaultInjection */); var ReactDOM=require(633 /* ./ReactDOM */); var ReactDOMComponentTree=require(550 /* ./ReactDOMComponentTree */); var ReactElement=require(19 /* ./ReactElement */); var ReactBrowserEventEmitter=require(593 /* ./ReactBrowserEventEmitter */); var ReactCompositeComponent=require(158 /* ./ReactCompositeComponent */); var ReactInstanceMap=require(101 /* ./ReactInstanceMap */); var ReactInstrumentation=require(151 /* ./ReactInstrumentation */); var ReactReconciler=require(148 /* ./ReactReconciler */); var ReactUpdates=require(145 /* ./ReactUpdates */); var SyntheticEvent=require(369 /* ./SyntheticEvent */); var emptyObject=require(29 /* fbjs/lib/emptyObject */); var findDOMNode=require(639 /* ./findDOMNode */); var invariant=require(18 /* fbjs/lib/invariant */); var topLevelTypes=EventConstants.topLevelTypes; function Event(suffix){} function findAllInRenderedTreeInternal(inst,test){ if(!inst||!inst.getPublicInstance){ return[]; } var publicInst=inst.getPublicInstance(); var ret=test(publicInst)?[publicInst]:[]; var currentElement=inst._currentElement; if(ReactTestUtils.isDOMComponent(publicInst)){ var renderedChildren=inst._renderedChildren; var key; for(key in renderedChildren){ if(!renderedChildren.hasOwnProperty(key)){ continue; } ret=ret.concat(findAllInRenderedTreeInternal(renderedChildren[key],test)); } }else if(ReactElement.isValidElement(currentElement)&&typeof currentElement.type==='function'){ ret=ret.concat(findAllInRenderedTreeInternal(inst._renderedComponent,test)); } return ret; } var ReactTestUtils={ renderIntoDocument:function renderIntoDocument(instance){ var div=document.createElement('div'); return ReactDOM.render(instance,div); }, isElement:function isElement(element){ return ReactElement.isValidElement(element); }, isElementOfType:function isElementOfType(inst,convenienceConstructor){ return ReactElement.isValidElement(inst)&&inst.type===convenienceConstructor; }, isDOMComponent:function isDOMComponent(inst){ return!!(inst&&inst.nodeType===1&&inst.tagName); }, isDOMComponentElement:function isDOMComponentElement(inst){ return!!(inst&&ReactElement.isValidElement(inst)&&!!inst.tagName); }, isCompositeComponent:function isCompositeComponent(inst){ if(ReactTestUtils.isDOMComponent(inst)){ return false; } return inst!=null&&typeof inst.render==='function'&&typeof inst.setState==='function'; }, isCompositeComponentWithType:function isCompositeComponentWithType(inst,type){ if(!ReactTestUtils.isCompositeComponent(inst)){ return false; } var internalInstance=ReactInstanceMap.get(inst); var constructor=internalInstance._currentElement.type; return constructor===type; }, isCompositeComponentElement:function isCompositeComponentElement(inst){ if(!ReactElement.isValidElement(inst)){ return false; } var prototype=inst.type.prototype; return typeof prototype.render==='function'&&typeof prototype.setState==='function'; }, isCompositeComponentElementWithType:function isCompositeComponentElementWithType(inst,type){ var internalInstance=ReactInstanceMap.get(inst); var constructor=internalInstance._currentElement.type; return!!(ReactTestUtils.isCompositeComponentElement(inst)&&constructor===type); }, getRenderedChildOfCompositeComponent:function getRenderedChildOfCompositeComponent(inst){ if(!ReactTestUtils.isCompositeComponent(inst)){ return null; } var internalInstance=ReactInstanceMap.get(inst); return internalInstance._renderedComponent.getPublicInstance(); }, findAllInRenderedTree:function findAllInRenderedTree(inst,test){ if(!inst){ return[]; } !ReactTestUtils.isCompositeComponent(inst)?process.env.NODE_ENV!=='production'?invariant(false,'findAllInRenderedTree(...): instance must be a composite component'):_prodInvariant('10'):void 0; return findAllInRenderedTreeInternal(ReactInstanceMap.get(inst),test); }, scryRenderedDOMComponentsWithClass:function scryRenderedDOMComponentsWithClass(root,classNames){ return ReactTestUtils.findAllInRenderedTree(root,function(inst){ if(ReactTestUtils.isDOMComponent(inst)){ var className=inst.className; if(typeof className!=='string'){ className=inst.getAttribute('class')||''; } var classList=className.split(/\s+/); if(!Array.isArray(classNames)){ !(classNames!==undefined)?process.env.NODE_ENV!=='production'?invariant(false,'TestUtils.scryRenderedDOMComponentsWithClass expects a className as a second argument.'):_prodInvariant('11'):void 0; classNames=classNames.split(/\s+/); } return classNames.every(function(name){ return classList.indexOf(name)!==-1; }); } return false; }); }, findRenderedDOMComponentWithClass:function findRenderedDOMComponentWithClass(root,className){ var all=ReactTestUtils.scryRenderedDOMComponentsWithClass(root,className); if(all.length!==1){ throw new Error('Did not find exactly one match (found: '+all.length+') '+'for class:'+className); } return all[0]; }, scryRenderedDOMComponentsWithTag:function scryRenderedDOMComponentsWithTag(root,tagName){ return ReactTestUtils.findAllInRenderedTree(root,function(inst){ return ReactTestUtils.isDOMComponent(inst)&&inst.tagName.toUpperCase()===tagName.toUpperCase(); }); }, findRenderedDOMComponentWithTag:function findRenderedDOMComponentWithTag(root,tagName){ var all=ReactTestUtils.scryRenderedDOMComponentsWithTag(root,tagName); if(all.length!==1){ throw new Error('Did not find exactly one match (found: '+all.length+') '+'for tag:'+tagName); } return all[0]; }, scryRenderedComponentsWithType:function scryRenderedComponentsWithType(root,componentType){ return ReactTestUtils.findAllInRenderedTree(root,function(inst){ return ReactTestUtils.isCompositeComponentWithType(inst,componentType); }); }, findRenderedComponentWithType:function findRenderedComponentWithType(root,componentType){ var all=ReactTestUtils.scryRenderedComponentsWithType(root,componentType); if(all.length!==1){ throw new Error('Did not find exactly one match (found: '+all.length+') '+'for componentType:'+componentType); } return all[0]; }, mockComponent:function mockComponent(module,mockTagName){ mockTagName=mockTagName||module.mockTagName||'div'; module.prototype.render.mockImplementation(function(){ return React.createElement(mockTagName,null,this.props.children); }); return this; }, simulateNativeEventOnNode:function simulateNativeEventOnNode(topLevelType,node,fakeNativeEvent){ fakeNativeEvent.target=node; ReactBrowserEventEmitter.ReactEventListener.dispatchEvent(topLevelType,fakeNativeEvent); }, simulateNativeEventOnDOMComponent:function simulateNativeEventOnDOMComponent(topLevelType,comp,fakeNativeEvent){ ReactTestUtils.simulateNativeEventOnNode(topLevelType,findDOMNode(comp),fakeNativeEvent); }, nativeTouchData:function nativeTouchData(x,y){ return{ touches:[{pageX:x,pageY:y}]}; }, createRenderer:function createRenderer(){ return new ReactShallowRenderer(); }, Simulate:null, SimulateNative:{}}; var ReactShallowRenderer=function ReactShallowRenderer(){ this._instance=null; }; ReactShallowRenderer.prototype.getMountedInstance=function(){ return this._instance?this._instance._instance:null; }; var nextDebugID=1; var NoopInternalComponent=function NoopInternalComponent(element){ this._renderedOutput=element; this._currentElement=element; this._debugID=nextDebugID++; }; NoopInternalComponent.prototype={ mountComponent:function mountComponent(){}, receiveComponent:function receiveComponent(element){ this._renderedOutput=element; this._currentElement=element; }, getHostNode:function getHostNode(){ return undefined; }, unmountComponent:function unmountComponent(){}, getPublicInstance:function getPublicInstance(){ return null; }}; var ShallowComponentWrapper=function ShallowComponentWrapper(element){ this._debugID=nextDebugID++; var displayName=element.type.displayName||element.type.name||'Unknown'; ReactInstrumentation.debugTool.onSetDisplayName(this._debugID,displayName); this.construct(element); }; _assign(ShallowComponentWrapper.prototype,ReactCompositeComponent.Mixin,{ _constructComponent:ReactCompositeComponent.Mixin._constructComponentWithoutOwner, _instantiateReactComponent:function _instantiateReactComponent(element){ return new NoopInternalComponent(element); }, _replaceNodeWithMarkup:function _replaceNodeWithMarkup(){}, _renderValidatedComponent:ReactCompositeComponent.Mixin._renderValidatedComponentWithoutOwnerOrContext}); ReactShallowRenderer.prototype.render=function(element,context){ ReactDefaultInjection.inject(); !ReactElement.isValidElement(element)?process.env.NODE_ENV!=='production'?invariant(false,'ReactShallowRenderer render(): Invalid component element.%s',typeof element==='function'?' Instead of passing a component class, make sure to instantiate '+'it by passing it to React.createElement.':''):_prodInvariant('12',typeof element==='function'?' Instead of passing a component class, make sure to instantiate '+'it by passing it to React.createElement.':''):void 0; !(typeof element.type!=='string')?process.env.NODE_ENV!=='production'?invariant(false,'ReactShallowRenderer render(): Shallow rendering works only with custom components, not primitives (%s). Instead of calling `.render(el)` and inspecting the rendered output, look at `el.props` directly instead.',element.type):_prodInvariant('13',element.type):void 0; if(!context){ context=emptyObject; } ReactUpdates.batchedUpdates(_batchedRender,this,element,context); return this.getRenderOutput(); }; function _batchedRender(renderer,element,context){ var transaction=ReactUpdates.ReactReconcileTransaction.getPooled(true); renderer._render(element,transaction,context); ReactUpdates.ReactReconcileTransaction.release(transaction); } ReactShallowRenderer.prototype.getRenderOutput=function(){ return this._instance&&this._instance._renderedComponent&&this._instance._renderedComponent._renderedOutput||null; }; ReactShallowRenderer.prototype.unmount=function(){ if(this._instance){ ReactReconciler.unmountComponent(this._instance,false); } }; ReactShallowRenderer.prototype._render=function(element,transaction,context){ if(this._instance){ ReactReconciler.receiveComponent(this._instance,element,transaction,context); }else{ var instance=new ShallowComponentWrapper(element); ReactReconciler.mountComponent(instance,transaction,null,null,context); this._instance=instance; } }; function makeSimulator(eventType){ return function(domComponentOrNode,eventData){ var node; !!React.isValidElement(domComponentOrNode)?process.env.NODE_ENV!=='production'?invariant(false,'TestUtils.Simulate expects a component instance and not a ReactElement.TestUtils.Simulate will not work if you are using shallow rendering.'):_prodInvariant('14'):void 0; if(ReactTestUtils.isDOMComponent(domComponentOrNode)){ node=findDOMNode(domComponentOrNode); }else if(domComponentOrNode.tagName){ node=domComponentOrNode; } var dispatchConfig=EventPluginRegistry.eventNameDispatchConfigs[eventType]; var fakeNativeEvent=new Event(); fakeNativeEvent.target=node; var event=new SyntheticEvent(dispatchConfig,ReactDOMComponentTree.getInstanceFromNode(node),fakeNativeEvent,node); event.persist(); _assign(event,eventData); if(dispatchConfig.phasedRegistrationNames){ EventPropagators.accumulateTwoPhaseDispatches(event); }else{ EventPropagators.accumulateDirectDispatches(event); } ReactUpdates.batchedUpdates(function(){ EventPluginHub.enqueueEvents(event); EventPluginHub.processEventQueue(true); }); }; } function buildSimulators(){ ReactTestUtils.Simulate={}; var eventType; for(eventType in EventPluginRegistry.eventNameDispatchConfigs){ ReactTestUtils.Simulate[eventType]=makeSimulator(eventType); } } var oldInjectEventPluginOrder=EventPluginHub.injection.injectEventPluginOrder; EventPluginHub.injection.injectEventPluginOrder=function(){ oldInjectEventPluginOrder.apply(this,arguments); buildSimulators(); }; var oldInjectEventPlugins=EventPluginHub.injection.injectEventPluginsByName; EventPluginHub.injection.injectEventPluginsByName=function(){ oldInjectEventPlugins.apply(this,arguments); buildSimulators(); }; buildSimulators(); function makeNativeSimulator(eventType){ return function(domComponentOrNode,nativeEventData){ var fakeNativeEvent=new Event(eventType); _assign(fakeNativeEvent,nativeEventData); if(ReactTestUtils.isDOMComponent(domComponentOrNode)){ ReactTestUtils.simulateNativeEventOnDOMComponent(eventType,domComponentOrNode,fakeNativeEvent); }else if(domComponentOrNode.tagName){ ReactTestUtils.simulateNativeEventOnNode(eventType,domComponentOrNode,fakeNativeEvent); } }; } Object.keys(topLevelTypes).forEach(function(eventType){ var convenienceName=eventType.indexOf('top')===0?eventType.charAt(3).toLowerCase()+eventType.substr(4):eventType; ReactTestUtils.SimulateNative[convenienceName]=makeNativeSimulator(eventType); }); module.exports=ReactTestUtils; }, "react/lib/ReactTestUtils.js"); __d(543 /* react/lib/ReactDefaultInjection.js */, function(global, require, module, exports) { 'use strict'; var BeforeInputEventPlugin=require(544 /* ./BeforeInputEventPlugin */); var ChangeEventPlugin=require(549 /* ./ChangeEventPlugin */); var DefaultEventPluginOrder=require(556 /* ./DefaultEventPluginOrder */); var EnterLeaveEventPlugin=require(557 /* ./EnterLeaveEventPlugin */); var HTMLDOMPropertyConfig=require(562 /* ./HTMLDOMPropertyConfig */); var ReactComponentBrowserEnvironment=require(563 /* ./ReactComponentBrowserEnvironment */); var ReactDOMComponent=require(576 /* ./ReactDOMComponent */); var ReactDOMComponentTree=require(550 /* ./ReactDOMComponentTree */); var ReactDOMEmptyComponent=require(605 /* ./ReactDOMEmptyComponent */); var ReactDOMTreeTraversal=require(606 /* ./ReactDOMTreeTraversal */); var ReactDOMTextComponent=require(607 /* ./ReactDOMTextComponent */); var ReactDefaultBatchingStrategy=require(366 /* ./ReactDefaultBatchingStrategy */); var ReactEventListener=require(608 /* ./ReactEventListener */); var ReactInjection=require(611 /* ./ReactInjection */); var ReactReconcileTransaction=require(612 /* ./ReactReconcileTransaction */); var SVGDOMPropertyConfig=require(620 /* ./SVGDOMPropertyConfig */); var SelectEventPlugin=require(621 /* ./SelectEventPlugin */); var SimpleEventPlugin=require(622 /* ./SimpleEventPlugin */); var alreadyInjected=false; function inject(){ if(alreadyInjected){ return; } alreadyInjected=true; ReactInjection.EventEmitter.injectReactEventListener(ReactEventListener); ReactInjection.EventPluginHub.injectEventPluginOrder(DefaultEventPluginOrder); ReactInjection.EventPluginUtils.injectComponentTree(ReactDOMComponentTree); ReactInjection.EventPluginUtils.injectTreeTraversal(ReactDOMTreeTraversal); ReactInjection.EventPluginHub.injectEventPluginsByName({ SimpleEventPlugin:SimpleEventPlugin, EnterLeaveEventPlugin:EnterLeaveEventPlugin, ChangeEventPlugin:ChangeEventPlugin, SelectEventPlugin:SelectEventPlugin, BeforeInputEventPlugin:BeforeInputEventPlugin}); ReactInjection.HostComponent.injectGenericComponentClass(ReactDOMComponent); ReactInjection.HostComponent.injectTextComponentClass(ReactDOMTextComponent); ReactInjection.DOMProperty.injectDOMPropertyConfig(HTMLDOMPropertyConfig); ReactInjection.DOMProperty.injectDOMPropertyConfig(SVGDOMPropertyConfig); ReactInjection.EmptyComponent.injectEmptyComponentFactory(function(instantiate){ return new ReactDOMEmptyComponent(instantiate); }); ReactInjection.Updates.injectReconcileTransaction(ReactReconcileTransaction); ReactInjection.Updates.injectBatchingStrategy(ReactDefaultBatchingStrategy); ReactInjection.Component.injectEnvironment(ReactComponentBrowserEnvironment); } module.exports={ inject:inject}; }, "react/lib/ReactDefaultInjection.js"); __d(544 /* react/lib/BeforeInputEventPlugin.js */, function(global, require, module, exports) { 'use strict'; var EventConstants=require(136 /* ./EventConstants */); var EventPropagators=require(368 /* ./EventPropagators */); var ExecutionEnvironment=require(67 /* fbjs/lib/ExecutionEnvironment */); var FallbackCompositionState=require(545 /* ./FallbackCompositionState */); var SyntheticCompositionEvent=require(547 /* ./SyntheticCompositionEvent */); var SyntheticInputEvent=require(548 /* ./SyntheticInputEvent */); var keyOf=require(34 /* fbjs/lib/keyOf */); var END_KEYCODES=[9,13,27,32]; var START_KEYCODE=229; var canUseCompositionEvent=ExecutionEnvironment.canUseDOM&&'CompositionEvent'in window; var documentMode=null; if(ExecutionEnvironment.canUseDOM&&'documentMode'in document){ documentMode=document.documentMode; } var canUseTextInputEvent=ExecutionEnvironment.canUseDOM&&'TextEvent'in window&&!documentMode&&!isPresto(); var useFallbackCompositionData=ExecutionEnvironment.canUseDOM&&(!canUseCompositionEvent||documentMode&&documentMode>8&&documentMode<=11); function isPresto(){ var opera=window.opera; return typeof opera==='object'&&typeof opera.version==='function'&&parseInt(opera.version(),10)<=12; } var SPACEBAR_CODE=32; var SPACEBAR_CHAR=String.fromCharCode(SPACEBAR_CODE); var topLevelTypes=EventConstants.topLevelTypes; var eventTypes={ beforeInput:{ phasedRegistrationNames:{ bubbled:keyOf({onBeforeInput:null}), captured:keyOf({onBeforeInputCapture:null})}, dependencies:[topLevelTypes.topCompositionEnd,topLevelTypes.topKeyPress,topLevelTypes.topTextInput,topLevelTypes.topPaste]}, compositionEnd:{ phasedRegistrationNames:{ bubbled:keyOf({onCompositionEnd:null}), captured:keyOf({onCompositionEndCapture:null})}, dependencies:[topLevelTypes.topBlur,topLevelTypes.topCompositionEnd,topLevelTypes.topKeyDown,topLevelTypes.topKeyPress,topLevelTypes.topKeyUp,topLevelTypes.topMouseDown]}, compositionStart:{ phasedRegistrationNames:{ bubbled:keyOf({onCompositionStart:null}), captured:keyOf({onCompositionStartCapture:null})}, dependencies:[topLevelTypes.topBlur,topLevelTypes.topCompositionStart,topLevelTypes.topKeyDown,topLevelTypes.topKeyPress,topLevelTypes.topKeyUp,topLevelTypes.topMouseDown]}, compositionUpdate:{ phasedRegistrationNames:{ bubbled:keyOf({onCompositionUpdate:null}), captured:keyOf({onCompositionUpdateCapture:null})}, dependencies:[topLevelTypes.topBlur,topLevelTypes.topCompositionUpdate,topLevelTypes.topKeyDown,topLevelTypes.topKeyPress,topLevelTypes.topKeyUp,topLevelTypes.topMouseDown]}}; var hasSpaceKeypress=false; function isKeypressCommand(nativeEvent){ return(nativeEvent.ctrlKey||nativeEvent.altKey||nativeEvent.metaKey)&& !(nativeEvent.ctrlKey&&nativeEvent.altKey); } function getCompositionEventType(topLevelType){ switch(topLevelType){ case topLevelTypes.topCompositionStart: return eventTypes.compositionStart; case topLevelTypes.topCompositionEnd: return eventTypes.compositionEnd; case topLevelTypes.topCompositionUpdate: return eventTypes.compositionUpdate;} } function isFallbackCompositionStart(topLevelType,nativeEvent){ return topLevelType===topLevelTypes.topKeyDown&&nativeEvent.keyCode===START_KEYCODE; } function isFallbackCompositionEnd(topLevelType,nativeEvent){ switch(topLevelType){ case topLevelTypes.topKeyUp: return END_KEYCODES.indexOf(nativeEvent.keyCode)!==-1; case topLevelTypes.topKeyDown: return nativeEvent.keyCode!==START_KEYCODE; case topLevelTypes.topKeyPress: case topLevelTypes.topMouseDown: case topLevelTypes.topBlur: return true; default: return false;} } function getDataFromCustomEvent(nativeEvent){ var detail=nativeEvent.detail; if(typeof detail==='object'&&'data'in detail){ return detail.data; } return null; } var currentComposition=null; function extractCompositionEvent(topLevelType,targetInst,nativeEvent,nativeEventTarget){ var eventType; var fallbackData; if(canUseCompositionEvent){ eventType=getCompositionEventType(topLevelType); }else if(!currentComposition){ if(isFallbackCompositionStart(topLevelType,nativeEvent)){ eventType=eventTypes.compositionStart; } }else if(isFallbackCompositionEnd(topLevelType,nativeEvent)){ eventType=eventTypes.compositionEnd; } if(!eventType){ return null; } if(useFallbackCompositionData){ if(!currentComposition&&eventType===eventTypes.compositionStart){ currentComposition=FallbackCompositionState.getPooled(nativeEventTarget); }else if(eventType===eventTypes.compositionEnd){ if(currentComposition){ fallbackData=currentComposition.getData(); } } } var event=SyntheticCompositionEvent.getPooled(eventType,targetInst,nativeEvent,nativeEventTarget); if(fallbackData){ event.data=fallbackData; }else{ var customData=getDataFromCustomEvent(nativeEvent); if(customData!==null){ event.data=customData; } } EventPropagators.accumulateTwoPhaseDispatches(event); return event; } function getNativeBeforeInputChars(topLevelType,nativeEvent){ switch(topLevelType){ case topLevelTypes.topCompositionEnd: return getDataFromCustomEvent(nativeEvent); case topLevelTypes.topKeyPress: var which=nativeEvent.which; if(which!==SPACEBAR_CODE){ return null; } hasSpaceKeypress=true; return SPACEBAR_CHAR; case topLevelTypes.topTextInput: var chars=nativeEvent.data; if(chars===SPACEBAR_CHAR&&hasSpaceKeypress){ return null; } return chars; default: return null;} } function getFallbackBeforeInputChars(topLevelType,nativeEvent){ if(currentComposition){ if(topLevelType===topLevelTypes.topCompositionEnd||isFallbackCompositionEnd(topLevelType,nativeEvent)){ var chars=currentComposition.getData(); FallbackCompositionState.release(currentComposition); currentComposition=null; return chars; } return null; } switch(topLevelType){ case topLevelTypes.topPaste: return null; case topLevelTypes.topKeyPress: if(nativeEvent.which&&!isKeypressCommand(nativeEvent)){ return String.fromCharCode(nativeEvent.which); } return null; case topLevelTypes.topCompositionEnd: return useFallbackCompositionData?null:nativeEvent.data; default: return null;} } function extractBeforeInputEvent(topLevelType,targetInst,nativeEvent,nativeEventTarget){ var chars; if(canUseTextInputEvent){ chars=getNativeBeforeInputChars(topLevelType,nativeEvent); }else{ chars=getFallbackBeforeInputChars(topLevelType,nativeEvent); } if(!chars){ return null; } var event=SyntheticInputEvent.getPooled(eventTypes.beforeInput,targetInst,nativeEvent,nativeEventTarget); event.data=chars; EventPropagators.accumulateTwoPhaseDispatches(event); return event; } var BeforeInputEventPlugin={ eventTypes:eventTypes, extractEvents:function extractEvents(topLevelType,targetInst,nativeEvent,nativeEventTarget){ return[extractCompositionEvent(topLevelType,targetInst,nativeEvent,nativeEventTarget),extractBeforeInputEvent(topLevelType,targetInst,nativeEvent,nativeEventTarget)]; }}; module.exports=BeforeInputEventPlugin; }, "react/lib/BeforeInputEventPlugin.js"); __d(545 /* react/lib/FallbackCompositionState.js */, function(global, require, module, exports) { 'use strict'; var _assign=require(14 /* object-assign */); var PooledClass=require(16 /* ./PooledClass */); var getTextContentAccessor=require(546 /* ./getTextContentAccessor */); function FallbackCompositionState(root){ this._root=root; this._startText=this.getText(); this._fallbackText=null; } _assign(FallbackCompositionState.prototype,{ destructor:function destructor(){ this._root=null; this._startText=null; this._fallbackText=null; }, getText:function getText(){ if('value'in this._root){ return this._root.value; } return this._root[getTextContentAccessor()]; }, getData:function getData(){ if(this._fallbackText){ return this._fallbackText; } var start; var startValue=this._startText; var startLength=startValue.length; var end; var endValue=this.getText(); var endLength=endValue.length; for(start=0;start1?1-end:undefined; this._fallbackText=endValue.slice(start,sliceTail); return this._fallbackText; }}); PooledClass.addPoolingTo(FallbackCompositionState); module.exports=FallbackCompositionState; }, "react/lib/FallbackCompositionState.js"); __d(546 /* react/lib/getTextContentAccessor.js */, function(global, require, module, exports) { 'use strict'; var ExecutionEnvironment=require(67 /* fbjs/lib/ExecutionEnvironment */); var contentKey=null; function getTextContentAccessor(){ if(!contentKey&&ExecutionEnvironment.canUseDOM){ contentKey='textContent'in document.documentElement?'textContent':'innerText'; } return contentKey; } module.exports=getTextContentAccessor; }, "react/lib/getTextContentAccessor.js"); __d(547 /* react/lib/SyntheticCompositionEvent.js */, function(global, require, module, exports) { 'use strict'; var SyntheticEvent=require(369 /* ./SyntheticEvent */); var CompositionEventInterface={ data:null}; function SyntheticCompositionEvent(dispatchConfig,dispatchMarker,nativeEvent,nativeEventTarget){ return SyntheticEvent.call(this,dispatchConfig,dispatchMarker,nativeEvent,nativeEventTarget); } SyntheticEvent.augmentClass(SyntheticCompositionEvent,CompositionEventInterface); module.exports=SyntheticCompositionEvent; }, "react/lib/SyntheticCompositionEvent.js"); __d(548 /* react/lib/SyntheticInputEvent.js */, function(global, require, module, exports) { 'use strict'; var SyntheticEvent=require(369 /* ./SyntheticEvent */); var InputEventInterface={ data:null}; function SyntheticInputEvent(dispatchConfig,dispatchMarker,nativeEvent,nativeEventTarget){ return SyntheticEvent.call(this,dispatchConfig,dispatchMarker,nativeEvent,nativeEventTarget); } SyntheticEvent.augmentClass(SyntheticInputEvent,InputEventInterface); module.exports=SyntheticInputEvent; }, "react/lib/SyntheticInputEvent.js"); __d(549 /* react/lib/ChangeEventPlugin.js */, function(global, require, module, exports) { 'use strict'; var EventConstants=require(136 /* ./EventConstants */); var EventPluginHub=require(137 /* ./EventPluginHub */); var EventPropagators=require(368 /* ./EventPropagators */); var ExecutionEnvironment=require(67 /* fbjs/lib/ExecutionEnvironment */); var ReactDOMComponentTree=require(550 /* ./ReactDOMComponentTree */); var ReactUpdates=require(145 /* ./ReactUpdates */); var SyntheticEvent=require(369 /* ./SyntheticEvent */); var getEventTarget=require(553 /* ./getEventTarget */); var isEventSupported=require(554 /* ./isEventSupported */); var isTextInputElement=require(555 /* ./isTextInputElement */); var keyOf=require(34 /* fbjs/lib/keyOf */); var topLevelTypes=EventConstants.topLevelTypes; var eventTypes={ change:{ phasedRegistrationNames:{ bubbled:keyOf({onChange:null}), captured:keyOf({onChangeCapture:null})}, dependencies:[topLevelTypes.topBlur,topLevelTypes.topChange,topLevelTypes.topClick,topLevelTypes.topFocus,topLevelTypes.topInput,topLevelTypes.topKeyDown,topLevelTypes.topKeyUp,topLevelTypes.topSelectionChange]}}; var activeElement=null; var activeElementInst=null; var activeElementValue=null; var activeElementValueProp=null; function shouldUseChangeEvent(elem){ var nodeName=elem.nodeName&&elem.nodeName.toLowerCase(); return nodeName==='select'||nodeName==='input'&&elem.type==='file'; } var doesChangeEventBubble=false; if(ExecutionEnvironment.canUseDOM){ doesChangeEventBubble=isEventSupported('change')&&(!('documentMode'in document)||document.documentMode>8); } function manualDispatchChangeEvent(nativeEvent){ var event=SyntheticEvent.getPooled(eventTypes.change,activeElementInst,nativeEvent,getEventTarget(nativeEvent)); EventPropagators.accumulateTwoPhaseDispatches(event); ReactUpdates.batchedUpdates(runEventInBatch,event); } function runEventInBatch(event){ EventPluginHub.enqueueEvents(event); EventPluginHub.processEventQueue(false); } function startWatchingForChangeEventIE8(target,targetInst){ activeElement=target; activeElementInst=targetInst; activeElement.attachEvent('onchange',manualDispatchChangeEvent); } function stopWatchingForChangeEventIE8(){ if(!activeElement){ return; } activeElement.detachEvent('onchange',manualDispatchChangeEvent); activeElement=null; activeElementInst=null; } function getTargetInstForChangeEvent(topLevelType,targetInst){ if(topLevelType===topLevelTypes.topChange){ return targetInst; } } function handleEventsForChangeEventIE8(topLevelType,target,targetInst){ if(topLevelType===topLevelTypes.topFocus){ stopWatchingForChangeEventIE8(); startWatchingForChangeEventIE8(target,targetInst); }else if(topLevelType===topLevelTypes.topBlur){ stopWatchingForChangeEventIE8(); } } var isInputEventSupported=false; if(ExecutionEnvironment.canUseDOM){ isInputEventSupported=isEventSupported('input')&&(!('documentMode'in document)||document.documentMode>11); } var newValueProp={ get:function get(){ return activeElementValueProp.get.call(this); }, set:function set(val){ activeElementValue=''+val; activeElementValueProp.set.call(this,val); }}; function startWatchingForValueChange(target,targetInst){ activeElement=target; activeElementInst=targetInst; activeElementValue=target.value; activeElementValueProp=Object.getOwnPropertyDescriptor(target.constructor.prototype,'value'); Object.defineProperty(activeElement,'value',newValueProp); if(activeElement.attachEvent){ activeElement.attachEvent('onpropertychange',handlePropertyChange); }else{ activeElement.addEventListener('propertychange',handlePropertyChange,false); } } function stopWatchingForValueChange(){ if(!activeElement){ return; } delete activeElement.value; if(activeElement.detachEvent){ activeElement.detachEvent('onpropertychange',handlePropertyChange); }else{ activeElement.removeEventListener('propertychange',handlePropertyChange,false); } activeElement=null; activeElementInst=null; activeElementValue=null; activeElementValueProp=null; } function handlePropertyChange(nativeEvent){ if(nativeEvent.propertyName!=='value'){ return; } var value=nativeEvent.srcElement.value; if(value===activeElementValue){ return; } activeElementValue=value; manualDispatchChangeEvent(nativeEvent); } function getTargetInstForInputEvent(topLevelType,targetInst){ if(topLevelType===topLevelTypes.topInput){ return targetInst; } } function handleEventsForInputEventIE(topLevelType,target,targetInst){ if(topLevelType===topLevelTypes.topFocus){ stopWatchingForValueChange(); startWatchingForValueChange(target,targetInst); }else if(topLevelType===topLevelTypes.topBlur){ stopWatchingForValueChange(); } } function getTargetInstForInputEventIE(topLevelType,targetInst){ if(topLevelType===topLevelTypes.topSelectionChange||topLevelType===topLevelTypes.topKeyUp||topLevelType===topLevelTypes.topKeyDown){ if(activeElement&&activeElement.value!==activeElementValue){ activeElementValue=activeElement.value; return activeElementInst; } } } function shouldUseClickEvent(elem){ return elem.nodeName&&elem.nodeName.toLowerCase()==='input'&&(elem.type==='checkbox'||elem.type==='radio'); } function getTargetInstForClickEvent(topLevelType,targetInst){ if(topLevelType===topLevelTypes.topClick){ return targetInst; } } var ChangeEventPlugin={ eventTypes:eventTypes, extractEvents:function extractEvents(topLevelType,targetInst,nativeEvent,nativeEventTarget){ var targetNode=targetInst?ReactDOMComponentTree.getNodeFromInstance(targetInst):window; var getTargetInstFunc,handleEventFunc; if(shouldUseChangeEvent(targetNode)){ if(doesChangeEventBubble){ getTargetInstFunc=getTargetInstForChangeEvent; }else{ handleEventFunc=handleEventsForChangeEventIE8; } }else if(isTextInputElement(targetNode)){ if(isInputEventSupported){ getTargetInstFunc=getTargetInstForInputEvent; }else{ getTargetInstFunc=getTargetInstForInputEventIE; handleEventFunc=handleEventsForInputEventIE; } }else if(shouldUseClickEvent(targetNode)){ getTargetInstFunc=getTargetInstForClickEvent; } if(getTargetInstFunc){ var inst=getTargetInstFunc(topLevelType,targetInst); if(inst){ var event=SyntheticEvent.getPooled(eventTypes.change,inst,nativeEvent,nativeEventTarget); event.type='change'; EventPropagators.accumulateTwoPhaseDispatches(event); return event; } } if(handleEventFunc){ handleEventFunc(topLevelType,targetNode,targetInst); } }}; module.exports=ChangeEventPlugin; }, "react/lib/ChangeEventPlugin.js"); __d(550 /* react/lib/ReactDOMComponentTree.js */, function(global, require, module, exports) { 'use strict'; var _prodInvariant=require(17 /* ./reactProdInvariant */); var DOMProperty=require(551 /* ./DOMProperty */); var ReactDOMComponentFlags=require(552 /* ./ReactDOMComponentFlags */); var invariant=require(18 /* fbjs/lib/invariant */); var ATTR_NAME=DOMProperty.ID_ATTRIBUTE_NAME; var Flags=ReactDOMComponentFlags; var internalInstanceKey='__reactInternalInstance$'+Math.random().toString(36).slice(2); function getRenderedHostOrTextFromComponent(component){ var rendered; while(rendered=component._renderedComponent){ component=rendered; } return component; } function precacheNode(inst,node){ var hostInst=getRenderedHostOrTextFromComponent(inst); hostInst._hostNode=node; node[internalInstanceKey]=hostInst; } function uncacheNode(inst){ var node=inst._hostNode; if(node){ delete node[internalInstanceKey]; inst._hostNode=null; } } function precacheChildNodes(inst,node){ if(inst._flags&Flags.hasCachedChildNodes){ return; } var children=inst._renderedChildren; var childNode=node.firstChild; outer:for(var name in children){ if(!children.hasOwnProperty(name)){ continue; } var childInst=children[name]; var childID=getRenderedHostOrTextFromComponent(childInst)._domID; if(childID==null){ continue; } for(;childNode!==null;childNode=childNode.nextSibling){ if(childNode.nodeType===1&&childNode.getAttribute(ATTR_NAME)===String(childID)||childNode.nodeType===8&&childNode.nodeValue===' react-text: '+childID+' '||childNode.nodeType===8&&childNode.nodeValue===' react-empty: '+childID+' '){ precacheNode(childInst,childNode); continue outer; } } !false?process.env.NODE_ENV!=='production'?invariant(false,'Unable to find element with ID %s.',childID):_prodInvariant('32',childID):void 0; } inst._flags|=Flags.hasCachedChildNodes; } function getClosestInstanceFromNode(node){ if(node[internalInstanceKey]){ return node[internalInstanceKey]; } var parents=[]; while(!node[internalInstanceKey]){ parents.push(node); if(node.parentNode){ node=node.parentNode; }else{ return null; } } var closest; var inst; for(;node&&(inst=node[internalInstanceKey]);node=parents.pop()){ closest=inst; if(parents.length){ precacheChildNodes(inst,node); } } return closest; } function getInstanceFromNode(node){ var inst=getClosestInstanceFromNode(node); if(inst!=null&&inst._hostNode===node){ return inst; }else{ return null; } } function getNodeFromInstance(inst){ !(inst._hostNode!==undefined)?process.env.NODE_ENV!=='production'?invariant(false,'getNodeFromInstance: Invalid argument.'):_prodInvariant('33'):void 0; if(inst._hostNode){ return inst._hostNode; } var parents=[]; while(!inst._hostNode){ parents.push(inst); !inst._hostParent?process.env.NODE_ENV!=='production'?invariant(false,'React DOM tree root should always have a node reference.'):_prodInvariant('34'):void 0; inst=inst._hostParent; } for(;parents.length;inst=parents.pop()){ precacheChildNodes(inst,inst._hostNode); } return inst._hostNode; } var ReactDOMComponentTree={ getClosestInstanceFromNode:getClosestInstanceFromNode, getInstanceFromNode:getInstanceFromNode, getNodeFromInstance:getNodeFromInstance, precacheChildNodes:precacheChildNodes, precacheNode:precacheNode, uncacheNode:uncacheNode}; module.exports=ReactDOMComponentTree; }, "react/lib/ReactDOMComponentTree.js"); __d(551 /* react/lib/DOMProperty.js */, function(global, require, module, exports) { 'use strict'; var _prodInvariant=require(17 /* ./reactProdInvariant */); var invariant=require(18 /* fbjs/lib/invariant */); function checkMask(value,bitmask){ return(value&bitmask)===bitmask; } var DOMPropertyInjection={ MUST_USE_PROPERTY:0x1, HAS_BOOLEAN_VALUE:0x4, HAS_NUMERIC_VALUE:0x8, HAS_POSITIVE_NUMERIC_VALUE:0x10|0x8, HAS_OVERLOADED_BOOLEAN_VALUE:0x20, injectDOMPropertyConfig:function injectDOMPropertyConfig(domPropertyConfig){ var Injection=DOMPropertyInjection; var Properties=domPropertyConfig.Properties||{}; var DOMAttributeNamespaces=domPropertyConfig.DOMAttributeNamespaces||{}; var DOMAttributeNames=domPropertyConfig.DOMAttributeNames||{}; var DOMPropertyNames=domPropertyConfig.DOMPropertyNames||{}; var DOMMutationMethods=domPropertyConfig.DOMMutationMethods||{}; if(domPropertyConfig.isCustomAttribute){ DOMProperty._isCustomAttributeFunctions.push(domPropertyConfig.isCustomAttribute); } for(var propName in Properties){ !!DOMProperty.properties.hasOwnProperty(propName)?process.env.NODE_ENV!=='production'?invariant(false,'injectDOMPropertyConfig(...): You\'re trying to inject DOM property \'%s\' which has already been injected. You may be accidentally injecting the same DOM property config twice, or you may be injecting two configs that have conflicting property names.',propName):_prodInvariant('48',propName):void 0; var lowerCased=propName.toLowerCase(); var propConfig=Properties[propName]; var propertyInfo={ attributeName:lowerCased, attributeNamespace:null, propertyName:propName, mutationMethod:null, mustUseProperty:checkMask(propConfig,Injection.MUST_USE_PROPERTY), hasBooleanValue:checkMask(propConfig,Injection.HAS_BOOLEAN_VALUE), hasNumericValue:checkMask(propConfig,Injection.HAS_NUMERIC_VALUE), hasPositiveNumericValue:checkMask(propConfig,Injection.HAS_POSITIVE_NUMERIC_VALUE), hasOverloadedBooleanValue:checkMask(propConfig,Injection.HAS_OVERLOADED_BOOLEAN_VALUE)}; !(propertyInfo.hasBooleanValue+propertyInfo.hasNumericValue+propertyInfo.hasOverloadedBooleanValue<=1)?process.env.NODE_ENV!=='production'?invariant(false,'DOMProperty: Value can be one of boolean, overloaded boolean, or numeric value, but not a combination: %s',propName):_prodInvariant('50',propName):void 0; if(process.env.NODE_ENV!=='production'){ DOMProperty.getPossibleStandardName[lowerCased]=propName; } if(DOMAttributeNames.hasOwnProperty(propName)){ var attributeName=DOMAttributeNames[propName]; propertyInfo.attributeName=attributeName; if(process.env.NODE_ENV!=='production'){ DOMProperty.getPossibleStandardName[attributeName]=propName; } } if(DOMAttributeNamespaces.hasOwnProperty(propName)){ propertyInfo.attributeNamespace=DOMAttributeNamespaces[propName]; } if(DOMPropertyNames.hasOwnProperty(propName)){ propertyInfo.propertyName=DOMPropertyNames[propName]; } if(DOMMutationMethods.hasOwnProperty(propName)){ propertyInfo.mutationMethod=DOMMutationMethods[propName]; } DOMProperty.properties[propName]=propertyInfo; } }}; var ATTRIBUTE_NAME_START_CHAR=':A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD'; var DOMProperty={ ID_ATTRIBUTE_NAME:'data-reactid', ROOT_ATTRIBUTE_NAME:'data-reactroot', ATTRIBUTE_NAME_START_CHAR:ATTRIBUTE_NAME_START_CHAR, ATTRIBUTE_NAME_CHAR:ATTRIBUTE_NAME_START_CHAR+'\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040', properties:{}, getPossibleStandardName:process.env.NODE_ENV!=='production'?{}:null, _isCustomAttributeFunctions:[], isCustomAttribute:function isCustomAttribute(attributeName){ for(var i=0;i]/; var createMicrosoftUnsafeLocalFunction=require(568 /* ./createMicrosoftUnsafeLocalFunction */); var reusableSVGContainer; var setInnerHTML=createMicrosoftUnsafeLocalFunction(function(node,html){ if(node.namespaceURI===DOMNamespaces.svg&&!('innerHTML'in node)){ reusableSVGContainer=reusableSVGContainer||document.createElement('div'); reusableSVGContainer.innerHTML=''+html+''; var newNodes=reusableSVGContainer.firstChild.childNodes; for(var i=0;i]/; function escapeHtml(string){ var str=''+string; var match=matchHtmlRegExp.exec(str); if(!match){ return str; } var escape; var html=''; var index=0; var lastIndex=0; for(index=match.index;index node. This is because browser quirks make this unreliable and/or slow. If you want to render to the root you must use server rendering. See ReactDOMServer.renderToString().'):_prodInvariant('58'):void 0; if(typeof markup==='string'){ var newChild=createNodesFromMarkup(markup,emptyFunction)[0]; oldChild.parentNode.replaceChild(newChild,oldChild); }else{ DOMLazyTree.replaceChildWithTree(oldChild,markup); } }}; module.exports=Danger; }, "react/lib/Danger.js"); __d(572 /* fbjs/lib/createNodesFromMarkup.js */, function(global, require, module, exports) {'use strict'; var ExecutionEnvironment=require(67 /* ./ExecutionEnvironment */); var createArrayFromMixed=require(573 /* ./createArrayFromMixed */); var getMarkupWrap=require(574 /* ./getMarkupWrap */); var invariant=require(18 /* ./invariant */); var dummyNode=ExecutionEnvironment.canUseDOM?document.createElement('div'):null; var nodeNamePattern=/^\s*<(\w+)/; function getNodeName(markup){ var nodeNameMatch=markup.match(nodeNamePattern); return nodeNameMatch&&nodeNameMatch[1].toLowerCase(); } function createNodesFromMarkup(markup,handleScript){ var node=dummyNode; !!!dummyNode?process.env.NODE_ENV!=='production'?invariant(false,'createNodesFromMarkup dummy not initialized'):invariant(false):void 0; var nodeName=getNodeName(markup); var wrap=nodeName&&getMarkupWrap(nodeName); if(wrap){ node.innerHTML=wrap[1]+markup+wrap[2]; var wrapDepth=wrap[0]; while(wrapDepth--){ node=node.lastChild; } }else{ node.innerHTML=markup; } var scripts=node.getElementsByTagName('script'); if(scripts.length){ !handleScript?process.env.NODE_ENV!=='production'?invariant(false,'createNodesFromMarkup(...): Unexpected