__d(function(g,r,i,a,m,e,d){var t=r(d[0]);Object.defineProperty(e,"__esModule",{value:!0}),e._TESTING_ONLY_reset_container_count=function(){0},e.default=function(t){var A=(function(A){(0,l.default)(R,A);var L,x,E=(L=R,x=y(),function(){var t,n=(0,v.default)(L);if(x){var o=(0,v.default)(this).constructor;t=Reflect.construct(n,arguments,o)}else t=n.apply(this,arguments);return(0,p.default)(this,t)});function R(n){var o;return(0,u.default)(this,R),(o=E.call(this,n)).subs=null,o._actionEventSubscribers=new Set,o._handleOpenURL=function(n){var s=n.url,u=o.props,c=u.enableURLHandling,l=u.uriPrefix;if(!1!==c){var p=N(s,l);if(p){var v=p.path,f=p.params,h=t.router.getActionForPathAndParams(v,f);h&&o.dispatch(h)}}},o._persistNavigationState=function(t){var n;return s.default.async(function(u){for(;;)switch(u.prev=u.next){case 0:if(!(n=o.props.persistNavigationState)){u.next=10;break}return u.prev=2,u.next=5,s.default.awrap(n(t));case 5:u.next=10;break;case 7:u.prev=7,u.t0=u.catch(2),console.warn('Uncaught exception while calling persistNavigationState()! You should handle exceptions thrown from persistNavigationState(), ignoring them may result in undefined behavior.');case 10:case"end":return u.stop()}},null,null,[[2,7]],Promise)},o.dispatch=function(n){if(o.props.navigation)return o.props.navigation.dispatch(n);o._navState=o._navState||o.state.nav;var s=o._navState;(0,b.default)(s,'should be set in constructor if stateful');var u=t.router.getStateForAction(n,s),c=null===u?s:u,l=function(){o._actionEventSubscribers.forEach(function(t){return t({type:'action',action:n,state:c,lastState:s})})};return null===u?(l(),!0):c!==s?(o._navState=c,o.setState({nav:c},function(){o._onNavigationStateChange(s,c,n),l(),o._persistNavigationState(c)}),!0):(l(),!1)},o._getScreenProps=function(){return o.props.screenProps},P(n),o._initialAction=_.NavigationActions.init(),o._isStateful()&&S.BackHandler&&'function'==typeof S.BackHandler.addEventListener&&(o.subs=S.BackHandler.addEventListener('hardwareBackPress',function(){if(o._isMounted)return o.dispatch(_.NavigationActions.back());o.subs&&o.subs.remove()})),o.state={nav:o._isStateful()&&!n.loadNavigationState?t.router.getStateForAction(o._initialAction):null},o}return(0,c.default)(R,null,[{key:"getDerivedStateFromProps",value:function(t){return P(t),null}}]),(0,c.default)(R,[{key:"_renderLoading",value:function(){return this.props.renderLoadingExperimental?this.props.renderLoadingExperimental():null}},{key:"_isStateful",value:function(){return w(this.props)}},{key:"_validateProps",value:function(t){if(!this._isStateful()){t.navigation,t.screenProps;var n=(0,f.default)(t,["navigation","screenProps"]),o=Object.keys(n);if(0!==o.length)throw new Error("This navigator has both navigation and container props, so it is unclear if it should own its own state. Remove props: \""+o.join(', ')+"\" if the navigator should get its state from the navigation prop. If the navigator should maintain its own state, do not pass a navigation prop.")}}},{key:"_onNavigationStateChange",value:function(t,n,o){void 0===this.props.onNavigationStateChange&&this._isStateful()&&process.env.REACT_NAV_LOGGING?console.group?(console.group('Navigation Dispatch: '),console.log('Action: ',o),console.log('New State: ',n),console.log('Last State: ',t),console.groupEnd()):console.log('Navigation Dispatch: ',{action:o,newState:n,lastState:t}):'function'==typeof this.props.onNavigationStateChange&&this.props.onNavigationStateChange(t,n,o)}},{key:"componentDidUpdate",value:function(){this._navState===this.state.nav&&(this._navState=null)}},{key:"componentDidMount",value:function(){var n,o,u,c,l,p,v,f,h,_,b=this;return s.default.async(function(y){for(;;)switch(y.prev=y.next){case 0:if(this._isMounted=!0,this._isStateful()){y.next=3;break}return y.abrupt("return");case 3:if(0,S.Linking.addEventListener('url',this._handleOpenURL),n=null,o=null,!1===this.props.enableURLHandling){y.next=14;break}return y.next=11,s.default.awrap(this.getStartupParams());case 11:u=y.sent,n=u.parsedUrl,o=u.userProvidedStartupState;case 14:if(c=this._initialAction,(l=this.state.nav)||o||(process.env.REACT_NAV_LOGGING&&console.log('Init new Navigation State'),l=t.router.getStateForAction(c)),o&&(l=o,k=!0),n&&(v=(p=n).path,f=p.params,(h=t.router.getActionForPathAndParams(v,f))&&(process.env.REACT_NAV_LOGGING&&console.log('Applying Navigation Action for Initial URL:',n),c=h,l=t.router.getStateForAction(h,l))),_=function(){return b._actionEventSubscribers.forEach(function(t){return t({type:'action',action:c,state:b.state.nav,lastState:null})})},l!==this.state.nav){y.next=23;break}return _(),y.abrupt("return");case 23:this.setState({nav:l},function(){k=!1,_()});case 24:case"end":return y.stop()}},null,this,null,Promise)}},{key:"getStartupParams",value:function(){var t,n,u,c,l,p,v;return s.default.async(function(f){for(;;)switch(f.prev=f.next){case 0:return t=this.props,n=t.uriPrefix,u=t.loadNavigationState,f.prev=1,f.next=4,s.default.awrap(Promise.all([S.Linking.getInitialURL(),u&&u()]));case 4:p=f.sent,v=(0,o.default)(p,2),c=v[0],l=v[1],f.next=12;break;case 10:f.prev=10,f.t0=f.catch(1);case 12:return f.abrupt("return",{parsedUrl:c&&N(c,n),userProvidedStartupState:l});case 13:case"end":return f.stop()}},null,this,[[1,10]],Promise)}},{key:"componentDidCatch",value:function(t){if(!k)throw t;k=!1,console.warn('Uncaught exception while starting app from persisted navigation state! Trying to render again with a fresh navigation state...'),this.dispatch(_.NavigationActions.init())}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,S.Linking.removeEventListener('url',this._handleOpenURL),this.subs&&this.subs.remove(),this._isStateful()&&0}},{key:"render",value:function(){var o=this,s=this.props.navigation;if(this._isStateful()){var u=this.state.nav;if(!u)return this._renderLoading();this._navigation&&this._navigation.state===u||(this._navigation=(0,_.getNavigation)(t.router,u,this.dispatch,this._actionEventSubscribers,this._getScreenProps,function(){return o._navigation})),s=this._navigation}return(0,b.default)(s,'failed to get navigation'),h.default.createElement(_.NavigationProvider,{value:s},h.default.createElement(t,(0,n.default)({},this.props,{navigation:s})))}}]),R})(h.default.Component);return A.router=t.router,A.navigationOptions=null,A};var n=t(r(d[1])),o=t(r(d[2])),s=t(r(d[3])),u=t(r(d[4])),c=t(r(d[5])),l=t(r(d[6])),p=t(r(d[7])),v=t(r(d[8])),f=t(r(d[9])),h=t(r(d[10])),S=r(d[11]),_=r(d[12]),b=t(r(d[13]));t(r(d[14]));function y(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}var N=_.pathUtils.urlToPathAndParams;function w(t){return!t.navigation}function P(t){if(t.persistenceKey&&console.warn("You passed persistenceKey prop to a navigator. The persistenceKey prop was replaced by a more flexible persistence mechanism, please see the navigation state persistence docs for more information. Passing the persistenceKey prop is a no-op."),!w(t)){t.navigation,t.screenProps;var n=t.persistNavigationState,o=t.loadNavigationState,s=(0,f.default)(t,["navigation","screenProps","persistNavigationState","loadNavigationState"]),u=Object.keys(s);if(0!==u.length)throw new Error("This navigator has both navigation and container props, so it is unclear if it should own its own state. Remove props: \""+u.join(', ')+"\" if the navigator should get its state from the navigation prop. If the navigator should maintain its own state, do not pass a navigation prop.");(0,b.default)(void 0===n&&void 0===o||'function'==typeof n&&'function'==typeof o,'both persistNavigationState and loadNavigationState must either be undefined, or be functions')}}var k=!1},411,[1,11,12,137,24,25,35,37,34,9,50,2,412,451,452]);