mirror of
https://github.com/XiaoDaiGua-Ray/ray-template.git
synced 2025-04-05 19:42:07 +08:00
30 lines
50 KiB
JavaScript
30 lines
50 KiB
JavaScript
var Wt="An invariant failed, however the error is obfuscated because this is a production build.",Oe=[];Object.freeze(Oe);var ze={};Object.freeze(ze);function g(){return++u.mobxGuid}function l(e){throw K(!1,e),"X"}function K(e,t){if(!e)throw new Error("[mobx] "+(t||Wt))}function vt(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var pe=function(){};function Xt(e){var t=[];return e.forEach(function(r){t.indexOf(r)===-1&&t.push(r)}),t}function He(e){return e!==null&&typeof e=="object"}function Z(e){if(e===null||typeof e!="object")return!1;var t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function kt(e){if(ee(e)||w(e))return e;if(Array.isArray(e))return new Map(e);if(Z(e)){var t=new Map;for(var r in e)t.set(r,e[r]);return t}else return l("Cannot convert to map from '"+e+"'")}function Q(e,t,r){Object.defineProperty(e,t,{enumerable:!1,writable:!0,configurable:!0,value:r})}function Yt(e,t,r){Object.defineProperty(e,t,{enumerable:!1,writable:!1,configurable:!0,value:r})}function $t(e,t){var r=Object.getOwnPropertyDescriptor(e,t);return!r||r.configurable!==!1&&r.writable!==!1}function G(e,t){var r="isMobX"+e;return t.prototype[r]=!0,function(n){return He(n)&&n[r]===!0}}function ee(e){return e instanceof Map}function fe(e){return e instanceof Set}function yt(e){var t=new Set;for(var r in e)t.add(r);return Object.getOwnPropertySymbols(e).forEach(function(n){Object.getOwnPropertyDescriptor(e,n).enumerable&&t.add(n)}),Array.from(t)}function L(e){return e&&e.toString?e.toString():new String(e).toString()}function bt(e){return e===null?null:typeof e=="object"?""+e:e}var Zt=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,c=Symbol("mobx administration"),te=function(){function e(t){t===void 0&&(t="Atom@"+g()),this.name=t,this.isPendingUnobservation=!1,this.isBeingObserved=!1,this.observers=new Set,this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=d.NOT_TRACKING}return e.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach(function(t){return t()})},e.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach(function(t){return t()})},e.prototype.reportObserved=function(){return Tt(this)},e.prototype.reportChanged=function(){E(),wr(this),_()},e.prototype.toString=function(){return this.name},e}(),Fe=G("Atom",te);function gt(e,t,r){t===void 0&&(t=pe),r===void 0&&(r=pe);var n=new te(e);return t!==pe&&Nr(n,t),r!==pe&&Bt(n,r),n}function Qt(e,t){return e===t}function er(e,t){return Ze(e,t)}function tr(e,t){return Ze(e,t,1)}function rr(e,t){return Object.is(e,t)}var X={identity:Qt,structural:er,default:rr,shallow:tr};/*! *****************************************************************************
|
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
this file except in compliance with the License. You may obtain a copy of the
|
|
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
|
|
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
|
|
See the Apache Version 2.0 License for specific language governing permissions
|
|
and limitations under the License.
|
|
***************************************************************************** */var Ie=function(e,t){return Ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])},Ie(e,t)};function nr(e,t){Ie(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var Ae=function(){return Ae=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Ae.apply(this,arguments)};function C(e){var t=typeof Symbol=="function"&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}function W(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,a=[],s;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(o){s={error:o}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return a}function Je(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(W(arguments[t]));return e}var Se=Symbol("mobx did run lazy initializers"),ae=Symbol("mobx pending decorators"),ir={},ar={};function sr(e,t){var r=t?ir:ar;return r[e]||(r[e]={configurable:!0,enumerable:t,get:function(){return H(this),this[e]},set:function(n){H(this),this[e]=n}})}function H(e){var t,r;if(e[Se]!==!0){var n=e[ae];if(n){Q(e,Se,!0);var i=Je(Object.getOwnPropertySymbols(n),Object.keys(n));try{for(var a=C(i),s=a.next();!s.done;s=a.next()){var o=s.value,f=n[o];f.propertyCreator(e,f.prop,f.descriptor,f.decoratorTarget,f.decoratorArguments)}}catch(h){t={error:h}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}}}}function mt(e,t){return function(){var n,i=function(s,o,f,h){if(h===!0)return t(s,o,f,s,n),null;if(!Object.prototype.hasOwnProperty.call(s,ae)){var p=s[ae];Q(s,ae,Ae({},p))}return s[ae][o]={prop:o,propertyCreator:t,descriptor:f,decoratorTarget:s,decoratorArguments:n},sr(o,e)};return or(arguments)?(n=Oe,i.apply(null,arguments)):(n=Array.prototype.slice.call(arguments),i)}}function or(e){return(e.length===2||e.length===3)&&(typeof e[1]=="string"||typeof e[1]=="symbol")||e.length===4&&e[3]===!0}function ce(e,t,r){return Ce(e)?e:Array.isArray(e)?m.array(e,{name:r}):Z(e)?m.object(e,void 0,{name:r}):ee(e)?m.map(e,{name:r}):fe(e)?m.set(e,{name:r}):e}function ur(e,t,r){return e==null||B(e)||V(e)||w(e)||S(e)?e:Array.isArray(e)?m.array(e,{name:r,deep:!1}):Z(e)?m.object(e,void 0,{name:r,deep:!1}):ee(e)?m.map(e,{name:r,deep:!1}):fe(e)?m.set(e,{name:r,deep:!1}):l(!1)}function De(e){return e}function fr(e,t,r){return Ze(e,t)?t:e}function Pe(e){K(e);var t=mt(!0,function(n,i,a,s,o){var f=a?a.initializer?a.initializer.call(n):a.value:void 0;Ye(n).addObservableProp(i,f,e)}),r=t;return r.enhancer=e,r}var Ot={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};Object.freeze(Ot);function J(e){return e==null?Ot:typeof e=="string"?{name:e,deep:!0,proxy:!0}:e}var We=Pe(ce),cr=Pe(ur),At=Pe(De),lr=Pe(fr);function ve(e){return e.defaultDecorator?e.defaultDecorator.enhancer:e.deep===!1?De:ce}function hr(e,t,r){if(typeof arguments[1]=="string"||typeof arguments[1]=="symbol")return We.apply(null,arguments);if(Ce(e))return e;var n=Z(e)?m.object(e,t,r):Array.isArray(e)?m.array(e,t):ee(e)?m.map(e,t):fe(e)?m.set(e,t):e;if(n!==e)return n;l(!1)}var nt={box:function(e,t){arguments.length>2&&ie("box");var r=J(t);return new z(e,ve(r),r.name,!0,r.equals)},array:function(e,t){arguments.length>2&&ie("array");var r=J(t);return Jr(e,ve(r),r.name)},map:function(e,t){arguments.length>2&&ie("map");var r=J(t);return new qt(e,ve(r),r.name)},set:function(e,t){arguments.length>2&&ie("set");var r=J(t);return new zt(e,ve(r),r.name)},object:function(e,t,r){typeof arguments[1]=="string"&&ie("object");var n=J(r);if(n.proxy===!1)return ot({},e,t,n);var i=Lt(n),a=ot({},void 0,void 0,n),s=zr(a);return It(s,e,t,i),s},ref:At,shallow:cr,deep:We,struct:lr},m=hr;Object.keys(nt).forEach(function(e){return m[e]=nt[e]});function ie(e){l("Expected one or two arguments to observable."+e+". Did you accidentally try to use observable."+e+" as decorator?")}var we=mt(!1,function(e,t,r,n,i){var a=r.get,s=r.set,o=i[0]||{};Ye(e).addComputedProp(e,t,Ae({get:a,set:s,context:e},o))}),dr=we({equals:X.structural}),pr=function(t,r,n){if(typeof r=="string"||t!==null&&typeof t=="object"&&arguments.length===1)return we.apply(null,arguments);var i=typeof r=="object"?r:{};return i.get=t,i.set=typeof r=="function"?r:i.set,i.name=i.name||t.name||"",new Y(i)};pr.struct=dr;var d;(function(e){e[e.NOT_TRACKING=-1]="NOT_TRACKING",e[e.UP_TO_DATE=0]="UP_TO_DATE",e[e.POSSIBLY_STALE=1]="POSSIBLY_STALE",e[e.STALE=2]="STALE"})(d||(d={}));var T;(function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"})(T||(T={}));var Ee=function(){function e(t){this.cause=t}return e}();function se(e){return e instanceof Ee}function Ue(e){switch(e.dependenciesState){case d.UP_TO_DATE:return!1;case d.NOT_TRACKING:case d.STALE:return!0;case d.POSSIBLY_STALE:{for(var t=Xe(!0),r=re(),n=e.observing,i=n.length,a=0;a<i;a++){var s=n[a];if($(s)){if(u.disableErrorBoundaries)s.get();else try{s.get()}catch{return I(r),oe(t),!0}if(e.dependenciesState===d.STALE)return I(r),oe(t),!0}}return Et(e),I(r),oe(t),!1}}}function k(e){var t=e.observers.size>0;u.computationDepth>0&&t&&l(!1),!u.allowStateChanges&&(t||u.enforceActions==="strict")&&l(!1)}function St(e,t,r){var n=Xe(!0);Et(e),e.newObserving=new Array(e.observing.length+100),e.unboundDepsCount=0,e.runId=++u.runId;var i=u.trackingDerivation;u.trackingDerivation=e;var a;if(u.disableErrorBoundaries===!0)a=t.call(r);else try{a=t.call(r)}catch(s){a=new Ee(s)}return u.trackingDerivation=i,vr(e),oe(n),a}function vr(e){for(var t=e.observing,r=e.observing=e.newObserving,n=d.UP_TO_DATE,i=0,a=e.unboundDepsCount,s=0;s<a;s++){var o=r[s];o.diffValue===0&&(o.diffValue=1,i!==s&&(r[i]=o),i++),o.dependenciesState>n&&(n=o.dependenciesState)}for(r.length=i,e.newObserving=null,a=t.length;a--;){var o=t[a];o.diffValue===0&&Rt(o,e),o.diffValue=0}for(;i--;){var o=r[i];o.diffValue===1&&(o.diffValue=0,Sr(o,e))}n!==d.UP_TO_DATE&&(e.dependenciesState=n,e.onBecomeStale())}function Ge(e){var t=e.observing;e.observing=[];for(var r=t.length;r--;)Rt(t[r],e);e.dependenciesState=d.NOT_TRACKING}function wt(e){var t=re();try{return e()}finally{I(t)}}function re(){var e=u.trackingDerivation;return u.trackingDerivation=null,e}function I(e){u.trackingDerivation=e}function Xe(e){var t=u.allowStateReads;return u.allowStateReads=e,t}function oe(e){u.allowStateReads=e}function Et(e){if(e.dependenciesState!==d.UP_TO_DATE){e.dependenciesState=d.UP_TO_DATE;for(var t=e.observing,r=t.length;r--;)t[r].lowestObserverState=d.UP_TO_DATE}}var _e=0,yr=1,it=Object.getOwnPropertyDescriptor(function(){},"name");it&&it.configurable;function q(e,t,r){var n=function(){return _t(e,t,r||this,arguments)};return n.isMobxAction=!0,n}function _t(e,t,r,n){var i=br();try{return t.apply(r,n)}catch(a){throw i.error=a,a}finally{gr(i)}}function br(e,t,r){var n=A(),i=0,a=re();E();var s=je(!0),o=Xe(!0),f={prevDerivation:a,prevAllowStateChanges:s,prevAllowStateReads:o,notifySpy:n,startTime:i,actionId:yr++,parentActionId:_e};return _e=f.actionId,f}function gr(e){_e!==e.actionId&&l("invalid action stack. did you forget to finish an action?"),_e=e.parentActionId,e.error!==void 0&&(u.suppressReactionErrors=!0),Me(e.prevAllowStateChanges),oe(e.prevAllowStateReads),_(),I(e.prevDerivation),e.notifySpy,u.suppressReactionErrors=!1}function je(e){var t=u.allowStateChanges;return u.allowStateChanges=e,t}function Me(e){u.allowStateChanges=e}var z=function(e){nr(t,e);function t(r,n,i,a,s){i===void 0&&(i="ObservableValue@"+g()),s===void 0&&(s=X.default);var o=e.call(this,i)||this;return o.enhancer=n,o.name=i,o.equals=s,o.hasUnreportedChange=!1,o.value=n(r,void 0,i),o}return t.prototype.dehanceValue=function(r){return this.dehancer!==void 0?this.dehancer(r):r},t.prototype.set=function(r){this.value,r=this.prepareNewValue(r),r!==u.UNCHANGED&&this.setNewValue(r)},t.prototype.prepareNewValue=function(r){if(k(this),D(this)){var n=P(this,{object:this,type:"update",newValue:r});if(!n)return u.UNCHANGED;r=n.newValue}return r=this.enhancer(r,this.value,this.name),this.equals(this.value,r)?u.UNCHANGED:r},t.prototype.setNewValue=function(r){var n=this.value;this.value=r,this.reportChanged(),x(this)&&R(this,{type:"update",object:this,newValue:r,oldValue:n})},t.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},t.prototype.intercept=function(r){return le(this,r)},t.prototype.observe=function(r,n){return n&&r({object:this,type:"update",newValue:this.value,oldValue:void 0}),he(this,r)},t.prototype.toJSON=function(){return this.get()},t.prototype.toString=function(){return this.name+"["+this.value+"]"},t.prototype.valueOf=function(){return bt(this.get())},t.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},t}(te),mr=G("ObservableValue",z),Y=function(){function e(t){this.dependenciesState=d.NOT_TRACKING,this.observing=[],this.newObserving=null,this.isBeingObserved=!1,this.isPendingUnobservation=!1,this.observers=new Set,this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.lowestObserverState=d.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+g(),this.value=new Ee(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=T.NONE,K(t.get,"missing option for computed: get"),this.derivation=t.get,this.name=t.name||"ComputedValue@"+g(),t.set&&(this.setter=q(this.name+"-setter",t.set)),this.equals=t.equals||(t.compareStructural||t.struct?X.structural:X.default),this.scope=t.context,this.requiresReaction=!!t.requiresReaction,this.keepAlive=!!t.keepAlive}return e.prototype.onBecomeStale=function(){_r(this)},e.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach(function(t){return t()})},e.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach(function(t){return t()})},e.prototype.get=function(){this.isComputing&&l("Cycle detected in computation "+this.name+": "+this.derivation),u.inBatch===0&&this.observers.size===0&&!this.keepAlive?Ue(this)&&(this.warnAboutUntrackedRead(),E(),this.value=this.computeValue(!1),_()):(Tt(this),Ue(this)&&this.trackAndCompute()&&Er(this));var t=this.value;if(se(t))throw t.cause;return t},e.prototype.peek=function(){var t=this.computeValue(!1);if(se(t))throw t.cause;return t},e.prototype.set=function(t){if(this.setter){K(!this.isRunningSetter,"The setter of computed value '"+this.name+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"),this.isRunningSetter=!0;try{this.setter.call(this.scope,t)}finally{this.isRunningSetter=!1}}else K(!1,!1)},e.prototype.trackAndCompute=function(){var t=this.value,r=this.dependenciesState===d.NOT_TRACKING,n=this.computeValue(!0),i=r||se(t)||se(n)||!this.equals(t,n);return i&&(this.value=n),i},e.prototype.computeValue=function(t){this.isComputing=!0,u.computationDepth++;var r;if(t)r=St(this,this.derivation,this.scope);else if(u.disableErrorBoundaries===!0)r=this.derivation.call(this.scope);else try{r=this.derivation.call(this.scope)}catch(n){r=new Ee(n)}return u.computationDepth--,this.isComputing=!1,r},e.prototype.suspend=function(){this.keepAlive||(Ge(this),this.value=void 0)},e.prototype.observe=function(t,r){var n=this,i=!0,a=void 0;return jr(function(){var s=n.get();if(!i||r){var o=re();t({type:"update",object:n,newValue:s,oldValue:a}),I(o)}i=!1,a=s})},e.prototype.warnAboutUntrackedRead=function(){},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},e.prototype.valueOf=function(){return bt(this.get())},e.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},e}(),$=G("ComputedValue",Y),ge=function(){function e(){this.version=5,this.UNCHANGED={},this.trackingDerivation=null,this.computationDepth=0,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!0,this.allowStateReads=!0,this.enforceActions=!1,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.computedConfigurable=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1}return e}(),Or={};function Ve(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:Or}var me=!0,xt=!1,u=function(){var e=Ve();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(me=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==new ge().version&&(me=!1),me?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new ge):(setTimeout(function(){xt||l("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")},1),new ge)}();function Ar(){(u.pendingReactions.length||u.inBatch||u.isRunningReactions)&&l("isolateGlobalState should be called before MobX is running any reactions"),xt=!0,me&&(--Ve().__mobxInstanceCount===0&&(Ve().__mobxGlobals=void 0),u=new ge)}function rn(){return u}function Sr(e,t){e.observers.add(t),e.lowestObserverState>t.dependenciesState&&(e.lowestObserverState=t.dependenciesState)}function Rt(e,t){e.observers.delete(t),e.observers.size===0&&Ct(e)}function Ct(e){e.isPendingUnobservation===!1&&(e.isPendingUnobservation=!0,u.pendingUnobservations.push(e))}function E(){u.inBatch++}function _(){if(--u.inBatch===0){jt();for(var e=u.pendingUnobservations,t=0;t<e.length;t++){var r=e[t];r.isPendingUnobservation=!1,r.observers.size===0&&(r.isBeingObserved&&(r.isBeingObserved=!1,r.onBecomeUnobserved()),r instanceof Y&&r.suspend())}u.pendingUnobservations=[]}}function Tt(e){var t=u.trackingDerivation;return t!==null?(t.runId!==e.lastAccessedBy&&(e.lastAccessedBy=t.runId,t.newObserving[t.unboundDepsCount++]=e,e.isBeingObserved||(e.isBeingObserved=!0,e.onBecomeObserved())),!0):(e.observers.size===0&&u.inBatch>0&&Ct(e),!1)}function wr(e){e.lowestObserverState!==d.STALE&&(e.lowestObserverState=d.STALE,e.observers.forEach(function(t){t.dependenciesState===d.UP_TO_DATE&&(t.isTracing!==T.NONE&&Dt(t,e),t.onBecomeStale()),t.dependenciesState=d.STALE}))}function Er(e){e.lowestObserverState!==d.STALE&&(e.lowestObserverState=d.STALE,e.observers.forEach(function(t){t.dependenciesState===d.POSSIBLY_STALE?t.dependenciesState=d.STALE:t.dependenciesState===d.UP_TO_DATE&&(e.lowestObserverState=d.UP_TO_DATE)}))}function _r(e){e.lowestObserverState===d.UP_TO_DATE&&(e.lowestObserverState=d.POSSIBLY_STALE,e.observers.forEach(function(t){t.dependenciesState===d.UP_TO_DATE&&(t.dependenciesState=d.POSSIBLY_STALE,t.isTracing!==T.NONE&&Dt(t,e),t.onBecomeStale())}))}function Dt(e,t){if(""+e.name+t.name,e.isTracing===T.BREAK){var r=[];Pt(Lr(e),r,1),new Function(`debugger;
|
|
/*
|
|
Tracing '`+e.name+`'
|
|
|
|
You are entering this break point because derivation '`+e.name+"' is being traced and '"+t.name+`' is now forcing it to update.
|
|
Just follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update
|
|
The stackframe you are looking for is at least ~6-8 stack-frames up.
|
|
|
|
`+(e instanceof Y?e.derivation.toString().replace(/[*]\//g,"/"):"")+`
|
|
|
|
The dependencies for this derivation are:
|
|
|
|
`+r.join(`
|
|
`)+`
|
|
*/
|
|
`)()}}function Pt(e,t,r){if(t.length>=1e3){t.push("(and many more)");return}t.push(""+new Array(r).join(" ")+e.name),e.dependencies&&e.dependencies.forEach(function(n){return Pt(n,t,r+1)})}var xe=function(){function e(t,r,n,i){t===void 0&&(t="Reaction@"+g()),i===void 0&&(i=!1),this.name=t,this.onInvalidate=r,this.errorHandler=n,this.requiresObservable=i,this.observing=[],this.newObserving=[],this.dependenciesState=d.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+g(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=T.NONE}return e.prototype.onBecomeStale=function(){this.schedule()},e.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,u.pendingReactions.push(this),jt())},e.prototype.isScheduled=function(){return this._isScheduled},e.prototype.runReaction=function(){if(!this.isDisposed){if(E(),this._isScheduled=!1,Ue(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending&&A()}catch(t){this.reportExceptionInDerivation(t)}}_()}},e.prototype.track=function(t){if(!this.isDisposed){E(),this._isRunning=!0;var r=St(this,t,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&Ge(this),se(r)&&this.reportExceptionInDerivation(r.cause),_()}},e.prototype.reportExceptionInDerivation=function(t){var r=this;if(this.errorHandler){this.errorHandler(t,this);return}if(u.disableErrorBoundaries)throw t;var n="[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this+"'";u.suppressReactionErrors?console.warn("[mobx] (error in reaction '"+this.name+"' suppressed, fix error of causing action below)"):console.error(n,t),u.globalReactionErrorHandlers.forEach(function(i){return i(t,r)})},e.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(E(),Ge(this),_()))},e.prototype.getDisposer=function(){var t=this.dispose.bind(this);return t[c]=this,t},e.prototype.toString=function(){return"Reaction["+this.name+"]"},e.prototype.trace=function(t){t===void 0&&(t=!1),Vr(this,t)},e}(),at=100,Ke=function(e){return e()};function jt(){u.inBatch>0||u.isRunningReactions||Ke(xr)}function xr(){u.isRunningReactions=!0;for(var e=u.pendingReactions,t=0;e.length>0;){++t===at&&(console.error("Reaction doesn't converge to a stable state after "+at+" iterations."+(" Probably there is a cycle in the reactive function: "+e[0])),e.splice(0));for(var r=e.splice(0),n=0,i=r.length;n<i;n++)r[n].runReaction()}u.isRunningReactions=!1}var Re=G("Reaction",xe);function Rr(e){var t=Ke;Ke=function(r){return e(function(){return t(r)})}}function A(){return!1}function Cr(e){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}function Tr(){l(!1)}function st(e){return function(t,r,n){if(n){if(n.value)return{value:q(e,n.value),enumerable:!1,configurable:!0,writable:!0};var i=n.initializer;return{enumerable:!1,configurable:!0,writable:!0,initializer:function(){return q(e,i.call(this))}}}return Dr(e).apply(this,arguments)}}function Dr(e){return function(t,r,n){Object.defineProperty(t,r,{configurable:!0,enumerable:!1,get:function(){},set:function(i){Q(this,r,ke(e,i))}})}}function Pr(e,t,r,n){return n===!0?(Le(e,t,r.value),null):r?{configurable:!0,enumerable:!1,get:function(){return Le(this,t,r.value||r.initializer.call(this)),this[t]},set:Tr}:{enumerable:!1,configurable:!0,set:function(i){Le(this,t,i)},get:function(){}}}var ke=function(t,r,n,i){if(arguments.length===1&&typeof t=="function")return q(t.name||"<unnamed action>",t);if(arguments.length===2&&typeof r=="function")return q(t,r);if(arguments.length===1&&typeof t=="string")return st(t);if(i===!0)Q(t,r,q(t.name||r,n.value,this));else return st(r).apply(null,arguments)};ke.bound=Pr;function nn(e,t){var r=typeof e=="string"?e:e.name||"<unnamed action>",n=typeof e=="function"?e:t;return _t(r,n,this,void 0)}function Le(e,t,r){Q(e,t,q(t,r.bind(e)))}function jr(e,t){t===void 0&&(t=ze);var r=t&&t.name||e.name||"Autorun@"+g(),n=!t.scheduler&&!t.delay,i;if(n)i=new xe(r,function(){this.track(o)},t.onError,t.requiresObservable);else{var a=Mt(t),s=!1;i=new xe(r,function(){s||(s=!0,a(function(){s=!1,i.isDisposed||i.track(o)}))},t.onError,t.requiresObservable)}function o(){e(i)}return i.schedule(),i.getDisposer()}var Mr=function(e){return e()};function Mt(e){return e.scheduler?e.scheduler:e.delay?function(t){return setTimeout(t,e.delay)}:Mr}function an(e,t,r){r===void 0&&(r=ze);var n=r.name||"Reaction@"+g(),i=ke(n,r.onError?Br(r.onError,t):t),a=!r.scheduler&&!r.delay,s=Mt(r),o=!0,f=!1,h,p=r.compareStructural?X.structural:r.equals||X.default,y=new xe(n,function(){o||a?v():f||(f=!0,s(v))},r.onError,r.requiresObservable);function v(){if(f=!1,!y.isDisposed){var b=!1;y.track(function(){var O=e(y);b=o||!p(h,O),h=O}),o&&r.fireImmediately&&i(h,y),!o&&b===!0&&i(h,y),o&&(o=!1)}}return y.schedule(),y.getDisposer()}function Br(e,t){return function(){try{return t.apply(this,arguments)}catch(r){e.call(this,r)}}}function Nr(e,t,r){return Nt("onBecomeObserved",e,t)}function Bt(e,t,r){return Nt("onBecomeUnobserved",e,t)}function Nt(e,t,r,n){var i=U(t),a=r,s=e+"Listeners";i[s]?i[s].add(a):i[s]=new Set([a]);var o=i[e];return typeof o!="function"?l(!1):function(){var f=i[s];f&&(f.delete(a),f.size===0&&delete i[s])}}function sn(e){var t=e.enforceActions,r=e.computedRequiresReaction,n=e.computedConfigurable,i=e.disableErrorBoundaries,a=e.reactionScheduler,s=e.reactionRequiresObservable,o=e.observableRequiresReaction;if(e.isolateGlobalState===!0&&Ar(),t!==void 0){var f=void 0;switch(t){case!0:case"observed":f=!0;break;case!1:case"never":f=!1;break;case"strict":case"always":f="strict";break;default:l("Invalid value for 'enforceActions': '"+t+"', expected 'never', 'always' or 'observed'")}u.enforceActions=f,u.allowStateChanges=!(f===!0||f==="strict")}r!==void 0&&(u.computedRequiresReaction=!!r),s!==void 0&&(u.reactionRequiresObservable=!!s),o!==void 0&&(u.observableRequiresReaction=!!o,u.allowStateReads=!u.observableRequiresReaction),n!==void 0&&(u.computedConfigurable=!!n),i!==void 0&&(i===!0&&console.warn("WARNING: Debug feature only. MobX will NOT recover from errors when `disableErrorBoundaries` is enabled."),u.disableErrorBoundaries=!!i),a&&Rr(a)}function ot(e,t,r,n){n=J(n);var i=Lt(n);return H(e),Ye(e,n.name,i.enhancer),t&&It(e,t,r,i),e}function Lt(e){return e.defaultDecorator||(e.deep===!1?At:We)}function It(e,t,r,n){var i,a,s,o;E();try{var s=Zt(t);try{for(var f=C(s),h=f.next();!h.done;h=f.next()){var o=h.value,p=Object.getOwnPropertyDescriptor(t,o),y=r&&o in r?r[o]:p.get?we:n,v=y(e,o,p,!0);v&&Object.defineProperty(e,o,v)}}catch(O){i={error:O}}finally{try{h&&!h.done&&(a=f.return)&&a.call(f)}finally{if(i)throw i.error}}}finally{_()}}function Lr(e,t){return Ut(U(e,t))}function Ut(e){var t={name:e.name};return e.observing&&e.observing.length>0&&(t.dependencies=Xt(e.observing).map(Ut)),t}function Gt(e,t){if(e==null)return!1;if(t!==void 0){if(B(e)===!1||!e[c].values.has(t))return!1;var r=U(e,t);return $(r)}return $(e)}function on(e){return arguments.length>1?l(!1):Gt(e)}function un(e,t){return typeof t!="string"?l(!1):Gt(e,t)}function Ir(e,t){return e==null?!1:B(e)||!!e[c]||Fe(e)||Re(e)||$(e)}function Ce(e){return arguments.length!==1&&l(!1),Ir(e)}function ue(e){return B(e)?e[c].getKeys():w(e)||S(e)?Array.from(e.keys()):V(e)?e.map(function(t,r){return r}):l(!1)}function fn(e){return B(e)?ue(e).map(function(t){return e[t]}):w(e)?ue(e).map(function(t){return e.get(t)}):S(e)?Array.from(e.values()):V(e)?e.slice():l(!1)}function cn(e){return B(e)?ue(e).map(function(t){return[t,e[t]]}):w(e)?ue(e).map(function(t){return[t,e.get(t)]}):S(e)?Array.from(e.entries()):V(e)?e.map(function(t,r){return[r,t]}):l(!1)}function Vt(e,t,r){if(arguments.length===2&&!S(e)){E();var n=t;try{for(var i in n)Vt(e,i,n[i])}finally{_()}return}if(B(e)){var a=e[c],s=a.values.get(t);s?a.write(t,r):a.addObservableProp(t,r,a.defaultEnhancer)}else if(w(e))e.set(t,r);else if(S(e))e.add(t);else if(V(e))typeof t!="number"&&(t=parseInt(t,10)),K(t>=0,"Not a valid index: '"+t+"'"),E(),t>=e.length&&(e.length=t+1),e[t]=r,_();else return l(!1)}function ln(e,t,r,n){return Ur(e,t,r)}function Ur(e,t,r){return $e(e).observe(t,r)}var Gr={detectCycles:!0,exportMapsAsObjects:!0,recurseEverything:!1};function F(e,t,r,n){return n.detectCycles&&e.set(t,r),r}function N(e,t,r){if(!t.recurseEverything&&!Ce(e)||typeof e!="object")return e;if(e===null)return null;if(e instanceof Date)return e;if(mr(e))return N(e.get(),t,r);Ce(e)&&ue(e);var n=t.detectCycles===!0;if(n&&e!==null&&r.has(e))return r.get(e);if(V(e)||Array.isArray(e)){var i=F(r,e,[],t),a=e.map(function(b){return N(b,t,r)});i.length=a.length;for(var s=0,o=a.length;s<o;s++)i[s]=a[s];return i}if(S(e)||Object.getPrototypeOf(e)===Set.prototype)if(t.exportMapsAsObjects===!1){var f=F(r,e,new Set,t);return e.forEach(function(b){f.add(N(b,t,r))}),f}else{var h=F(r,e,[],t);return e.forEach(function(b){h.push(N(b,t,r))}),h}if(w(e)||Object.getPrototypeOf(e)===Map.prototype)if(t.exportMapsAsObjects===!1){var p=F(r,e,new Map,t);return e.forEach(function(b,O){p.set(O,N(b,t,r))}),p}else{var y=F(r,e,{},t);return e.forEach(function(b,O){y[O]=N(b,t,r)}),y}var v=F(r,e,{},t);return yt(e).forEach(function(b){v[b]=N(e[b],t,r)}),v}function hn(e,t){typeof t=="boolean"&&(t={detectCycles:t}),t||(t=Gr),t.detectCycles=t.detectCycles===void 0?t.recurseEverything===!0:t.detectCycles===!0;var r;return t.detectCycles&&(r=new Map),N(e,t,r)}function Vr(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=!1;typeof e[e.length-1]=="boolean"&&(r=e.pop());var n=Kr(e);if(!n)return l(!1);n.isTracing===T.NONE&&""+n.name,n.isTracing=r?T.BREAK:T.LOG}function Kr(e){switch(e.length){case 0:return u.trackingDerivation;case 1:return U(e[0]);case 2:return U(e[0],e[1])}}function M(e,t){t===void 0&&(t=void 0),E();try{return e.apply(t)}finally{_()}}function ye(e){return e[c]}function be(e){return typeof e=="string"||typeof e=="number"||typeof e=="symbol"}var qr={has:function(e,t){if(t===c||t==="constructor"||t===Se)return!0;var r=ye(e);return be(t)?r.has(t):t in e},get:function(e,t){if(t===c||t==="constructor"||t===Se)return e[t];var r=ye(e),n=r.values.get(t);if(n instanceof te){var i=n.get();return i===void 0&&r.has(t),i}return be(t)&&r.has(t),e[t]},set:function(e,t,r){return be(t)?(Vt(e,t,r),!0):!1},deleteProperty:function(e,t){if(!be(t))return!1;var r=ye(e);return r.remove(t),!0},ownKeys:function(e){var t=ye(e);return t.keysAtom.reportObserved(),Reflect.ownKeys(e)},preventExtensions:function(e){return l("Dynamic observable objects cannot be frozen"),!1}};function zr(e){var t=new Proxy(e,qr);return e[c].proxy=t,t}function D(e){return e.interceptors!==void 0&&e.interceptors.length>0}function le(e,t){var r=e.interceptors||(e.interceptors=[]);return r.push(t),vt(function(){var n=r.indexOf(t);n!==-1&&r.splice(n,1)})}function P(e,t){var r=re();try{for(var n=Je(e.interceptors||[]),i=0,a=n.length;i<a&&(t=n[i](t),K(!t||t.type,"Intercept handlers should return nothing or a change object"),!!t);i++);return t}finally{I(r)}}function x(e){return e.changeListeners!==void 0&&e.changeListeners.length>0}function he(e,t){var r=e.changeListeners||(e.changeListeners=[]);return r.push(t),vt(function(){var n=r.indexOf(t);n!==-1&&r.splice(n,1)})}function R(e,t){var r=re(),n=e.changeListeners;if(n){n=n.slice();for(var i=0,a=n.length;i<a;i++)n[i](t);I(r)}}var Hr=1e4,Fr={get:function(e,t){return t===c?e[c]:t==="length"?e[c].getArrayLength():typeof t=="number"?j.get.call(e,t):typeof t=="string"&&!isNaN(t)?j.get.call(e,parseInt(t)):j.hasOwnProperty(t)?j[t]:e[t]},set:function(e,t,r){return t==="length"&&e[c].setArrayLength(r),typeof t=="number"&&j.set.call(e,t,r),typeof t=="symbol"||isNaN(t)?e[t]=r:j.set.call(e,parseInt(t),r),!0},preventExtensions:function(e){return l("Observable arrays cannot be frozen"),!1}};function Jr(e,t,r,n){r===void 0&&(r="ObservableArray@"+g()),n===void 0&&(n=!1);var i=new Kt(r,t,n);Yt(i.values,c,i);var a=new Proxy(i.values,Fr);if(i.proxy=a,e&&e.length){var s=je(!0);i.spliceWithArray(0,0,e),Me(s)}return a}var Kt=function(){function e(t,r,n){this.owned=n,this.values=[],this.proxy=void 0,this.lastKnownLength=0,this.atom=new te(t||"ObservableArray@"+g()),this.enhancer=function(i,a){return r(i,a,t+"[..]")}}return e.prototype.dehanceValue=function(t){return this.dehancer!==void 0?this.dehancer(t):t},e.prototype.dehanceValues=function(t){return this.dehancer!==void 0&&t.length>0?t.map(this.dehancer):t},e.prototype.intercept=function(t){return le(this,t)},e.prototype.observe=function(t,r){return r===void 0&&(r=!1),r&&t({object:this.proxy,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),he(this,t)},e.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},e.prototype.setArrayLength=function(t){if(typeof t!="number"||t<0)throw new Error("[mobx.array] Out of range: "+t);var r=this.values.length;if(t!==r)if(t>r){for(var n=new Array(t-r),i=0;i<t-r;i++)n[i]=void 0;this.spliceWithArray(r,0,n)}else this.spliceWithArray(t,r-t)},e.prototype.updateArrayLength=function(t,r){if(t!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed.");this.lastKnownLength+=r},e.prototype.spliceWithArray=function(t,r,n){var i=this;k(this.atom);var a=this.values.length;if(t===void 0?t=0:t>a?t=a:t<0&&(t=Math.max(0,a+t)),arguments.length===1?r=a-t:r==null?r=0:r=Math.max(0,Math.min(r,a-t)),n===void 0&&(n=Oe),D(this)){var s=P(this,{object:this.proxy,type:"splice",index:t,removedCount:r,added:n});if(!s)return Oe;r=s.removedCount,n=s.added}n=n.length===0?n:n.map(function(f){return i.enhancer(f,void 0)});var o=this.spliceItemsIntoValues(t,r,n);return(r!==0||n.length!==0)&&this.notifyArraySplice(t,n,o),this.dehanceValues(o)},e.prototype.spliceItemsIntoValues=function(t,r,n){var i;if(n.length<Hr)return(i=this.values).splice.apply(i,Je([t,r],n));var a=this.values.slice(t,t+r);return this.values=this.values.slice(0,t).concat(n,this.values.slice(t+r)),a},e.prototype.notifyArrayChildUpdate=function(t,r,n){var i=!this.owned&&A(),a=x(this),s=a||i?{object:this.proxy,type:"update",index:t,newValue:r,oldValue:n}:null;this.atom.reportChanged(),a&&R(this,s)},e.prototype.notifyArraySplice=function(t,r,n){var i=!this.owned&&A(),a=x(this),s=a||i?{object:this.proxy,type:"splice",index:t,removed:n,added:r,removedCount:n.length,addedCount:r.length}:null;this.atom.reportChanged(),a&&R(this,s)},e}(),j={intercept:function(e){return this[c].intercept(e)},observe:function(e,t){t===void 0&&(t=!1);var r=this[c];return r.observe(e,t)},clear:function(){return this.splice(0)},replace:function(e){var t=this[c];return t.spliceWithArray(0,t.values.length,e)},toJS:function(){return this.slice()},toJSON:function(){return this.toJS()},splice:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=this[c];switch(arguments.length){case 0:return[];case 1:return i.spliceWithArray(e);case 2:return i.spliceWithArray(e,t)}return i.spliceWithArray(e,t,r)},spliceWithArray:function(e,t,r){var n=this[c];return n.spliceWithArray(e,t,r)},push:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=this[c];return r.spliceWithArray(r.values.length,0,e),r.values.length},pop:function(){return this.splice(Math.max(this[c].values.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=this[c];return r.spliceWithArray(0,0,e),r.values.length},reverse:function(){var e=this.slice();return e.reverse.apply(e,arguments)},sort:function(e){var t=this.slice();return t.sort.apply(t,arguments)},remove:function(e){var t=this[c],r=t.dehanceValues(t.values).indexOf(e);return r>-1?(this.splice(r,1),!0):!1},get:function(e){var t=this[c];if(t){if(e<t.values.length)return t.atom.reportObserved(),t.dehanceValue(t.values[e]);console.warn("[mobx.array] Attempt to read an array index ("+e+") that is out of bounds ("+t.values.length+"). Please check length first. Out of bound indices will not be tracked by MobX")}},set:function(e,t){var r=this[c],n=r.values;if(e<n.length){k(r.atom);var i=n[e];if(D(r)){var a=P(r,{type:"update",object:r.proxy,index:e,newValue:t});if(!a)return;t=a.newValue}t=r.enhancer(t,i);var s=t!==i;s&&(n[e]=t,r.notifyArrayChildUpdate(e,t,i))}else if(e===n.length)r.spliceWithArray(e,0,[t]);else throw new Error("[mobx.array] Index out of bounds, "+e+" is larger than "+n.length)}};["concat","flat","includes","indexOf","join","lastIndexOf","slice","toString","toLocaleString"].forEach(function(e){typeof Array.prototype[e]=="function"&&(j[e]=function(){var t=this[c];t.atom.reportObserved();var r=t.dehanceValues(t.values);return r[e].apply(r,arguments)})});["every","filter","find","findIndex","flatMap","forEach","map","some"].forEach(function(e){typeof Array.prototype[e]=="function"&&(j[e]=function(t,r){var n=this,i=this[c];i.atom.reportObserved();var a=i.dehanceValues(i.values);return a[e](function(s,o){return t.call(r,s,o,n)},r)})});["reduce","reduceRight"].forEach(function(e){j[e]=function(){var t=this,r=this[c];r.atom.reportObserved();var n=arguments[0];return arguments[0]=function(i,a,s){return a=r.dehanceValue(a),n(i,a,s,t)},r.values[e].apply(r.values,arguments)}});var Wr=G("ObservableArrayAdministration",Kt);function V(e){return He(e)&&Wr(e[c])}var ut,Xr={},qt=function(){function e(t,r,n){if(r===void 0&&(r=ce),n===void 0&&(n="ObservableMap@"+g()),this.enhancer=r,this.name=n,this[ut]=Xr,this._keysAtom=gt(this.name+".keys()"),this[Symbol.toStringTag]="Map",typeof Map!="function")throw new Error("mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js");this._data=new Map,this._hasMap=new Map,this.merge(t)}return e.prototype._has=function(t){return this._data.has(t)},e.prototype.has=function(t){var r=this;if(!u.trackingDerivation)return this._has(t);var n=this._hasMap.get(t);if(!n){var i=n=new z(this._has(t),De,this.name+"."+L(t)+"?",!1);this._hasMap.set(t,i),Bt(i,function(){return r._hasMap.delete(t)})}return n.get()},e.prototype.set=function(t,r){var n=this._has(t);if(D(this)){var i=P(this,{type:n?"update":"add",object:this,newValue:r,name:t});if(!i)return this;r=i.newValue}return n?this._updateValue(t,r):this._addValue(t,r),this},e.prototype.delete=function(t){var r=this;if(k(this._keysAtom),D(this)){var n=P(this,{type:"delete",object:this,name:t});if(!n)return!1}if(this._has(t)){var i=A(),a=x(this),n=a||i?{type:"delete",object:this,oldValue:this._data.get(t).value,name:t}:null;return M(function(){r._keysAtom.reportChanged(),r._updateHasMapEntry(t,!1);var o=r._data.get(t);o.setNewValue(void 0),r._data.delete(t)}),a&&R(this,n),!0}return!1},e.prototype._updateHasMapEntry=function(t,r){var n=this._hasMap.get(t);n&&n.setNewValue(r)},e.prototype._updateValue=function(t,r){var n=this._data.get(t);if(r=n.prepareNewValue(r),r!==u.UNCHANGED){var i=A(),a=x(this),s=a||i?{type:"update",object:this,oldValue:n.value,name:t,newValue:r}:null;n.setNewValue(r),a&&R(this,s)}},e.prototype._addValue=function(t,r){var n=this;k(this._keysAtom),M(function(){var o=new z(r,n.enhancer,n.name+"."+L(t),!1);n._data.set(t,o),r=o.value,n._updateHasMapEntry(t,!0),n._keysAtom.reportChanged()});var i=A(),a=x(this),s=a||i?{type:"add",object:this,name:t,newValue:r}:null;a&&R(this,s)},e.prototype.get=function(t){return this.has(t)?this.dehanceValue(this._data.get(t).get()):this.dehanceValue(void 0)},e.prototype.dehanceValue=function(t){return this.dehancer!==void 0?this.dehancer(t):t},e.prototype.keys=function(){return this._keysAtom.reportObserved(),this._data.keys()},e.prototype.values=function(){var t=this,r=this.keys();return Te({next:function(){var n=r.next(),i=n.done,a=n.value;return{done:i,value:i?void 0:t.get(a)}}})},e.prototype.entries=function(){var t=this,r=this.keys();return Te({next:function(){var n=r.next(),i=n.done,a=n.value;return{done:i,value:i?void 0:[a,t.get(a)]}}})},e.prototype[ut=c,Symbol.iterator]=function(){return this.entries()},e.prototype.forEach=function(t,r){var n,i;try{for(var a=C(this),s=a.next();!s.done;s=a.next()){var o=W(s.value,2),f=o[0],h=o[1];t.call(r,h,f,this)}}catch(p){n={error:p}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}},e.prototype.merge=function(t){var r=this;return w(t)&&(t=t.toJS()),M(function(){var n=je(!0);try{Z(t)?yt(t).forEach(function(i){return r.set(i,t[i])}):Array.isArray(t)?t.forEach(function(i){var a=W(i,2),s=a[0],o=a[1];return r.set(s,o)}):ee(t)?(t.constructor!==Map&&l("Cannot initialize from classes that inherit from Map: "+t.constructor.name),t.forEach(function(i,a){return r.set(a,i)})):t!=null&&l("Cannot initialize map from "+t)}finally{Me(n)}}),this},e.prototype.clear=function(){var t=this;M(function(){wt(function(){var r,n;try{for(var i=C(t.keys()),a=i.next();!a.done;a=i.next()){var s=a.value;t.delete(s)}}catch(o){r={error:o}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}})})},e.prototype.replace=function(t){var r=this;return M(function(){var n,i,a,s,o=kt(t),f=new Map,h=!1;try{for(var p=C(r._data.keys()),y=p.next();!y.done;y=p.next()){var v=y.value;if(!o.has(v)){var b=r.delete(v);if(b)h=!0;else{var O=r._data.get(v);f.set(v,O)}}}}catch(Ne){n={error:Ne}}finally{try{y&&!y.done&&(i=p.return)&&i.call(p)}finally{if(n)throw n.error}}try{for(var de=C(o.entries()),ne=de.next();!ne.done;ne=de.next()){var Qe=W(ne.value,2),v=Qe[0],O=Qe[1],Ft=r._data.has(v);if(r.set(v,O),r._data.has(v)){var Jt=r._data.get(v);f.set(v,Jt),Ft||(h=!0)}}}catch(Ne){a={error:Ne}}finally{try{ne&&!ne.done&&(s=de.return)&&s.call(de)}finally{if(a)throw a.error}}if(!h)if(r._data.size!==f.size)r._keysAtom.reportChanged();else for(var et=r._data.keys(),tt=f.keys(),Be=et.next(),rt=tt.next();!Be.done;){if(Be.value!==rt.value){r._keysAtom.reportChanged();break}Be=et.next(),rt=tt.next()}r._data=f}),this},Object.defineProperty(e.prototype,"size",{get:function(){return this._keysAtom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),e.prototype.toPOJO=function(){var t,r,n={};try{for(var i=C(this),a=i.next();!a.done;a=i.next()){var s=W(a.value,2),o=s[0],f=s[1];n[typeof o=="symbol"?o:L(o)]=f}}catch(h){t={error:h}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n},e.prototype.toJS=function(){return new Map(this)},e.prototype.toJSON=function(){return this.toPOJO()},e.prototype.toString=function(){var t=this;return this.name+"[{ "+Array.from(this.keys()).map(function(r){return L(r)+": "+(""+t.get(r))}).join(", ")+" }]"},e.prototype.observe=function(t,r){return he(this,t)},e.prototype.intercept=function(t){return le(this,t)},e}(),w=G("ObservableMap",qt),ft,kr={},zt=function(){function e(t,r,n){if(r===void 0&&(r=ce),n===void 0&&(n="ObservableSet@"+g()),this.name=n,this[ft]=kr,this._data=new Set,this._atom=gt(this.name),this[Symbol.toStringTag]="Set",typeof Set!="function")throw new Error("mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js");this.enhancer=function(i,a){return r(i,a,n)},t&&this.replace(t)}return e.prototype.dehanceValue=function(t){return this.dehancer!==void 0?this.dehancer(t):t},e.prototype.clear=function(){var t=this;M(function(){wt(function(){var r,n;try{for(var i=C(t._data.values()),a=i.next();!a.done;a=i.next()){var s=a.value;t.delete(s)}}catch(o){r={error:o}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}})})},e.prototype.forEach=function(t,r){var n,i;try{for(var a=C(this),s=a.next();!s.done;s=a.next()){var o=s.value;t.call(r,o,o,this)}}catch(f){n={error:f}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}},Object.defineProperty(e.prototype,"size",{get:function(){return this._atom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),e.prototype.add=function(t){var r=this;if(k(this._atom),D(this)){var n=P(this,{type:"add",object:this,newValue:t});if(!n)return this}if(!this.has(t)){M(function(){r._data.add(r.enhancer(t,void 0)),r._atom.reportChanged()});var i=A(),a=x(this),n=a||i?{type:"add",object:this,newValue:t}:null;a&&R(this,n)}return this},e.prototype.delete=function(t){var r=this;if(D(this)){var n=P(this,{type:"delete",object:this,oldValue:t});if(!n)return!1}if(this.has(t)){var i=A(),a=x(this),n=a||i?{type:"delete",object:this,oldValue:t}:null;return M(function(){r._atom.reportChanged(),r._data.delete(t)}),a&&R(this,n),!0}return!1},e.prototype.has=function(t){return this._atom.reportObserved(),this._data.has(this.dehanceValue(t))},e.prototype.entries=function(){var t=0,r=Array.from(this.keys()),n=Array.from(this.values());return Te({next:function(){var i=t;return t+=1,i<n.length?{value:[r[i],n[i]],done:!1}:{done:!0}}})},e.prototype.keys=function(){return this.values()},e.prototype.values=function(){this._atom.reportObserved();var t=this,r=0,n=Array.from(this._data.values());return Te({next:function(){return r<n.length?{value:t.dehanceValue(n[r++]),done:!1}:{done:!0}}})},e.prototype.replace=function(t){var r=this;return S(t)&&(t=t.toJS()),M(function(){var n=je(!0);try{Array.isArray(t)?(r.clear(),t.forEach(function(i){return r.add(i)})):fe(t)?(r.clear(),t.forEach(function(i){return r.add(i)})):t!=null&&l("Cannot initialize set from "+t)}finally{Me(n)}}),this},e.prototype.observe=function(t,r){return he(this,t)},e.prototype.intercept=function(t){return le(this,t)},e.prototype.toJS=function(){return new Set(this)},e.prototype.toString=function(){return this.name+"[ "+Array.from(this).join(", ")+" ]"},e.prototype[ft=c,Symbol.iterator]=function(){return this.values()},e}(),S=G("ObservableSet",zt),Ht=function(){function e(t,r,n,i){r===void 0&&(r=new Map),this.target=t,this.values=r,this.name=n,this.defaultEnhancer=i,this.keysAtom=new te(n+".keys")}return e.prototype.read=function(t){return this.values.get(t).get()},e.prototype.write=function(t,r){var n=this.target,i=this.values.get(t);if(i instanceof Y){i.set(r);return}if(D(this)){var a=P(this,{type:"update",object:this.proxy||n,name:t,newValue:r});if(!a)return;r=a.newValue}if(r=i.prepareNewValue(r),r!==u.UNCHANGED){var s=x(this),o=A(),a=s||o?{type:"update",object:this.proxy||n,oldValue:i.value,name:t,newValue:r}:null;i.setNewValue(r),s&&R(this,a)}},e.prototype.has=function(t){var r=this.pendingKeys||(this.pendingKeys=new Map),n=r.get(t);if(n)return n.get();var i=!!this.values.get(t);return n=new z(i,De,this.name+"."+L(t)+"?",!1),r.set(t,n),n.get()},e.prototype.addObservableProp=function(t,r,n){n===void 0&&(n=this.defaultEnhancer);var i=this.target;if(D(this)){var a=P(this,{object:this.proxy||i,name:t,type:"add",newValue:r});if(!a)return;r=a.newValue}var s=new z(r,n,this.name+"."+L(t),!1);this.values.set(t,s),r=s.value,Object.defineProperty(i,t,Yr(t)),this.notifyPropertyAddition(t,r)},e.prototype.addComputedProp=function(t,r,n){var i=this.target;n.name=n.name||this.name+"."+L(r),this.values.set(r,new Y(n)),(t===i||$t(t,r))&&Object.defineProperty(t,r,$r(r))},e.prototype.remove=function(t){if(this.values.has(t)){var r=this.target;if(D(this)){var n=P(this,{object:this.proxy||r,name:t,type:"remove"});if(!n)return}try{E();var i=x(this),a=A(),s=this.values.get(t),o=s&&s.get();if(s&&s.set(void 0),this.keysAtom.reportChanged(),this.values.delete(t),this.pendingKeys){var f=this.pendingKeys.get(t);f&&f.set(!1)}delete this.target[t];var n=i||a?{type:"remove",object:this.proxy||r,oldValue:o,name:t}:null;i&&R(this,n)}finally{_()}}},e.prototype.illegalAccess=function(t,r){console.warn("Property '"+r+"' of '"+t+"' was accessed through the prototype chain. Use 'decorate' instead to declare the prop or access it statically through it's owner")},e.prototype.observe=function(t,r){return he(this,t)},e.prototype.intercept=function(t){return le(this,t)},e.prototype.notifyPropertyAddition=function(t,r){var n=x(this),i=A(),a=n||i?{type:"add",object:this.proxy||this.target,name:t,newValue:r}:null;if(n&&R(this,a),this.pendingKeys){var s=this.pendingKeys.get(t);s&&s.set(!0)}this.keysAtom.reportChanged()},e.prototype.getKeys=function(){var t,r;this.keysAtom.reportObserved();var n=[];try{for(var i=C(this.values),a=i.next();!a.done;a=i.next()){var s=W(a.value,2),o=s[0],f=s[1];f instanceof z&&n.push(o)}}catch(h){t={error:h}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n},e}();function Ye(e,t,r){if(t===void 0&&(t=""),r===void 0&&(r=ce),Object.prototype.hasOwnProperty.call(e,c))return e[c];Z(e)||(t=(e.constructor.name||"ObservableObject")+"@"+g()),t||(t="ObservableObject@"+g());var n=new Ht(e,new Map,L(t),r);return Q(e,c,n),n}var ct=Object.create(null),lt=Object.create(null);function Yr(e){return ct[e]||(ct[e]={configurable:!0,enumerable:!0,get:function(){return this[c].read(e)},set:function(t){this[c].write(e,t)}})}function ht(e){var t=e[c];return t||(H(e),e[c])}function $r(e){return lt[e]||(lt[e]={configurable:u.computedConfigurable,enumerable:!1,get:function(){return ht(this).read(e)},set:function(t){ht(this).write(e,t)}})}var Zr=G("ObservableObjectAdministration",Ht);function B(e){return He(e)?(H(e),Zr(e[c])):!1}function U(e,t){if(typeof e=="object"&&e!==null){if(V(e))return t!==void 0&&l(!1),e[c].atom;if(S(e))return e[c];if(w(e)){var r=e;if(t===void 0)return r._keysAtom;var n=r._data.get(t)||r._hasMap.get(t);return n||l(!1),n}if(H(e),t&&!e[c]&&e[t],B(e)){if(!t)return l(!1);var n=e[c].values.get(t);return n||l(!1),n}if(Fe(e)||$(e)||Re(e))return e}else if(typeof e=="function"&&Re(e[c]))return e[c];return l(!1)}function $e(e,t){if(e||l("Expecting some object"),t!==void 0)return $e(U(e,t));if(Fe(e)||$(e)||Re(e)||w(e)||S(e))return e;if(H(e),e[c])return e[c];l(!1)}function Qr(e,t){var r;return t!==void 0?r=U(e,t):B(e)||w(e)||S(e)?r=$e(e):r=U(e),r.name}var dt=Object.prototype.toString;function Ze(e,t,r){return r===void 0&&(r=-1),qe(e,t,r)}function qe(e,t,r,n,i){if(e===t)return e!==0||1/e===1/t;if(e==null||t==null)return!1;if(e!==e)return t!==t;var a=typeof e;if(a!=="function"&&a!=="object"&&typeof t!="object")return!1;var s=dt.call(e);if(s!==dt.call(t))return!1;switch(s){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:+e==0?1/+e===1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object Symbol]":return typeof Symbol<"u"&&Symbol.valueOf.call(e)===Symbol.valueOf.call(t);case"[object Map]":case"[object Set]":r>=0&&r++;break}e=pt(e),t=pt(t);var o=s==="[object Array]";if(!o){if(typeof e!="object"||typeof t!="object")return!1;var f=e.constructor,h=t.constructor;if(f!==h&&!(typeof f=="function"&&f instanceof f&&typeof h=="function"&&h instanceof h)&&"constructor"in e&&"constructor"in t)return!1}if(r===0)return!1;r<0&&(r=-1),n=n||[],i=i||[];for(var p=n.length;p--;)if(n[p]===e)return i[p]===t;if(n.push(e),i.push(t),o){if(p=e.length,p!==t.length)return!1;for(;p--;)if(!qe(e[p],t[p],r-1,n,i))return!1}else{var y=Object.keys(e),v=void 0;if(p=y.length,Object.keys(t).length!==p)return!1;for(;p--;)if(v=y[p],!(en(t,v)&&qe(e[v],t[v],r-1,n,i)))return!1}return n.pop(),i.pop(),!0}function pt(e){return V(e)?e.slice():ee(e)||w(e)||fe(e)||S(e)?Array.from(e.entries()):e}function en(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Te(e){return e[Symbol.iterator]=tn,e}function tn(){return this}if(typeof Proxy>"u"||typeof Symbol>"u")throw new Error("[mobx] MobX 5+ requires Proxy and Symbol objects. If your environment doesn't support Symbol or Proxy objects, please downgrade to MobX 4. For React Native Android, consider upgrading JSCore.");typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__=="object"&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:Cr,extras:{getDebugName:Qr},$mobx:c});export{c as $,qt as O,xe as R,pr as a,ke as b,sn as c,gt as d,V as e,w as f,rn as g,on as h,Ce as i,ln as j,ue as k,ot as l,nn as m,B as n,m as o,un as p,$e as q,an as r,Vt as s,hn as t,cn as u,fn as v,M as w};
|