var Jt="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 h(e){throw q(!1,e),"X"}function q(e,t){if(!e)throw new Error("[mobx] "+(t||Jt))}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 Q(e){if(e===null||typeof e!="object")return!1;var t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function Wt(e){if(te(e)||w(e))return e;if(Array.isArray(e))return new Map(e);if(Q(e)){var t=new Map;for(var r in e)t.set(r,e[r]);return t}else return h("Cannot convert to map from '"+e+"'")}function ee(e,t,r){Object.defineProperty(e,t,{enumerable:!1,writable:!0,configurable:!0,value:r})}function kt(e,t,r){Object.defineProperty(e,t,{enumerable:!1,writable:!1,configurable:!0,value:r})}function Yt(e,t){var r=Object.getOwnPropertyDescriptor(e,t);return!r||r.configurable!==!1&&r.writable!==!1}function V(e,t){var r="isMobX"+e;return t.prototype[r]=!0,function(n){return He(n)&&n[r]===!0}}function te(e){return e instanceof Map}function fe(e){return e instanceof Set}function pt(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 dt(e){return e===null?null:typeof e=="object"?""+e:e}var $t=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"),re=(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=v.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 Rt(this)},e.prototype.reportChanged=function(){E(),Or(this),_()},e.prototype.toString=function(){return this.name},e})(),Fe=V("Atom",re);function yt(e,t,r){t===void 0&&(t=pe),r===void 0&&(r=pe);var n=new re(e);return t!==pe&&Mr(n,t),r!==pe&&jt(n,r),n}function Zt(e,t){return zt(e,t)}function Qt(e,t){return Object.is(e,t)}var k={structural:Zt,default:Qt};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 er(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=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=[],o;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)a.push(i.value)}catch(s){o={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return a}function Je(){for(var e=[],t=0;t2&&ie("box");var r=X(t);return new H(e,de(r),r.name,!0,r.equals)},array:function(e,t){arguments.length>2&&ie("array");var r=X(t);return Hr(e,de(r),r.name)},map:function(e,t){arguments.length>2&&ie("map");var r=X(t);return new Gt(e,de(r),r.name)},set:function(e,t){arguments.length>2&&ie("set");var r=X(t);return new Kt(e,de(r),r.name)},object:function(e,t,r){typeof arguments[1]=="string"&&ie("object");var n=X(r);if(n.proxy===!1)return at({},e,t,n);var i=Bt(n),a=at({},void 0,void 0,n),o=Kr(a);return Nt(o,e,t,i),o},ref:mt,shallow:sr,deep:Xe,struct:ur},O=fr;Object.keys(rt).forEach(function(e){return O[e]=rt[e]});function ie(e){h("Expected one or two arguments to observable."+e+". Did you accidentally try to use observable."+e+" as decorator?")}var we=bt(!1,function(e,t,r,n,i){var a=r.get,o=r.set,s=i[0]||{};Ye(e).addComputedProp(e,t,Ae({get:a,set:o,context:e},s))}),cr=we({equals:k.structural}),lr=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 $(i)};lr.struct=cr;var v;(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"})(v||(v={}));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 oe(e){return e instanceof Ee}function Ue(e){switch(e.dependenciesState){case v.UP_TO_DATE:return!1;case v.NOT_TRACKING:case v.STALE:return!0;case v.POSSIBLY_STALE:{for(var t=We(!0),r=ne(),n=e.observing,i=n.length,a=0;a0;u.computationDepth>0&&t&&h(!1),!u.allowStateChanges&&(t||u.enforceActions==="strict")&&h(!1)}function Ot(e,t,r){var n=We(!0);St(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(o){a=new Ee(o)}return u.trackingDerivation=i,hr(e),se(n),a}function hr(e){for(var t=e.observing,r=e.observing=e.newObserving,n=v.UP_TO_DATE,i=0,a=e.unboundDepsCount,o=0;on&&(n=s.dependenciesState)}for(r.length=i,e.newObserving=null,a=t.length;a--;){var s=t[a];s.diffValue===0&&_t(s,e),s.diffValue=0}for(;i--;){var s=r[i];s.diffValue===1&&(s.diffValue=0,mr(s,e))}n!==v.UP_TO_DATE&&(e.dependenciesState=n,e.onBecomeStale())}function Ve(e){var t=e.observing;e.observing=[];for(var r=t.length;r--;)_t(t[r],e);e.dependenciesState=v.NOT_TRACKING}function At(e){var t=ne();try{return e()}finally{I(t)}}function ne(){var e=u.trackingDerivation;return u.trackingDerivation=null,e}function I(e){u.trackingDerivation=e}function We(e){var t=u.allowStateReads;return u.allowStateReads=e,t}function se(e){u.allowStateReads=e}function St(e){if(e.dependenciesState!==v.UP_TO_DATE){e.dependenciesState=v.UP_TO_DATE;for(var t=e.observing,r=t.length;r--;)t[r].lowestObserverState=v.UP_TO_DATE}}var _e=0,vr=1,nt=Object.getOwnPropertyDescriptor(function(){},"name");nt&&nt.configurable;function z(e,t,r){var n=function(){return wt(e,t,r||this,arguments)};return n.isMobxAction=!0,n}function wt(e,t,r,n){var i=pr();try{return t.apply(r,n)}catch(a){throw i.error=a,a}finally{dr(i)}}function pr(e,t,r){var n=A(),i=0,a=ne();E();var o=je(!0),s=We(!0),f={prevDerivation:a,prevAllowStateChanges:o,prevAllowStateReads:s,notifySpy:n,startTime:i,actionId:vr++,parentActionId:_e};return _e=f.actionId,f}function dr(e){_e!==e.actionId&&h("invalid action stack. did you forget to finish an action?"),_e=e.parentActionId,e.error!==void 0&&(u.suppressReactionErrors=!0),Me(e.prevAllowStateChanges),se(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 H=(function(e){er(t,e);function t(r,n,i,a,o){i===void 0&&(i="ObservableValue@"+g()),o===void 0&&(o=k.default);var s=e.call(this,i)||this;return s.enhancer=n,s.name=i,s.equals=o,s.hasUnreportedChange=!1,s.value=n(r,void 0,i),s}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(Y(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 dt(this.get())},t.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},t})(re),yr=V("ObservableValue",H),$=(function(){function e(t){this.dependenciesState=v.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=v.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+g(),this.value=new Ee(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=T.NONE,q(t.get,"missing option for computed: get"),this.derivation=t.get,this.name=t.name||"ComputedValue@"+g(),t.set&&(this.setter=z(this.name+"-setter",t.set)),this.equals=t.equals||(t.compareStructural||t.struct?k.structural:k.default),this.scope=t.context,this.requiresReaction=!!t.requiresReaction,this.keepAlive=!!t.keepAlive}return e.prototype.onBecomeStale=function(){Sr(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&&h("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),_()):(Rt(this),Ue(this)&&this.trackAndCompute()&&Ar(this));var t=this.value;if(oe(t))throw t.cause;return t},e.prototype.peek=function(){var t=this.computeValue(!1);if(oe(t))throw t.cause;return t},e.prototype.set=function(t){if(this.setter){q(!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 q(!1,!1)},e.prototype.trackAndCompute=function(){var t=this.value,r=this.dependenciesState===v.NOT_TRACKING,n=this.computeValue(!0),i=r||oe(t)||oe(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=Ot(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||(Ve(this),this.value=void 0)},e.prototype.observe=function(t,r){var n=this,i=!0,a=void 0;return Dr(function(){var o=n.get();if(!i||r){var s=ne();t({type:"update",object:n,newValue:o,oldValue:a}),I(s)}i=!1,a=o})},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 dt(this.get())},e.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},e})(),Z=V("ComputedValue",$),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})(),br={};function Ge(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:br}var me=!0,Et=!1,u=(function(){var e=Ge();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(){Et||h("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")},1),new ge)})();function gr(){(u.pendingReactions.length||u.inBatch||u.isRunningReactions)&&h("isolateGlobalState should be called before MobX is running any reactions"),Et=!0,me&&(--Ge().__mobxInstanceCount===0&&(Ge().__mobxGlobals=void 0),u=new ge)}function en(){return u}function mr(e,t){e.observers.add(t),e.lowestObserverState>t.dependenciesState&&(e.lowestObserverState=t.dependenciesState)}function _t(e,t){e.observers.delete(t),e.observers.size===0&&xt(e)}function xt(e){e.isPendingUnobservation===!1&&(e.isPendingUnobservation=!0,u.pendingUnobservations.push(e))}function E(){u.inBatch++}function _(){if(--u.inBatch===0){Dt();for(var e=u.pendingUnobservations,t=0;t0&&xt(e),!1)}function Or(e){e.lowestObserverState!==v.STALE&&(e.lowestObserverState=v.STALE,e.observers.forEach(function(t){t.dependenciesState===v.UP_TO_DATE&&(t.isTracing!==T.NONE&&Ct(t,e),t.onBecomeStale()),t.dependenciesState=v.STALE}))}function Ar(e){e.lowestObserverState!==v.STALE&&(e.lowestObserverState=v.STALE,e.observers.forEach(function(t){t.dependenciesState===v.POSSIBLY_STALE?t.dependenciesState=v.STALE:t.dependenciesState===v.UP_TO_DATE&&(e.lowestObserverState=v.UP_TO_DATE)}))}function Sr(e){e.lowestObserverState===v.UP_TO_DATE&&(e.lowestObserverState=v.POSSIBLY_STALE,e.observers.forEach(function(t){t.dependenciesState===v.UP_TO_DATE&&(t.dependenciesState=v.POSSIBLY_STALE,t.isTracing!==T.NONE&&Ct(t,e),t.onBecomeStale())}))}function Ct(e,t){if(e.isTracing===T.BREAK){var r=[];Tt(Br(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 $?e.derivation.toString().replace(/[*]\//g,"/"):"")+` The dependencies for this derivation are: `+r.join(` `)+` */ `)()}}function Tt(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 Tt(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=v.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),Dt())},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=Ot(this,t,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&Ve(this),oe(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,u.globalReactionErrorHandlers.forEach(function(i){return i(t,r)})},e.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(E(),Ve(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),Ur(this,t)},e})(),wr=100,Ke=function(e){return e()};function Dt(){u.inBatch>0||u.isRunningReactions||Ke(Er)}function Er(){u.isRunningReactions=!0;for(var e=u.pendingReactions,t=0;e.length>0;){++t===wr&&e.splice(0);for(var r=e.splice(0),n=0,i=r.length;n",t);if(arguments.length===2&&typeof r=="function")return z(t,r);if(arguments.length===1&&typeof t=="string")return it(t);if(i===!0)ee(t,r,z(t.name||r,n.value,this));else return it(r).apply(null,arguments)};ke.bound=Tr;function tn(e,t){var r=typeof e=="string"?e:e.name||"",n=typeof e=="function"?e:t;return wt(r,n,this,void 0)}function Le(e,t,r){ee(e,t,z(t,r.bind(e)))}function Dr(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(s)},t.onError,t.requiresObservable);else{var a=Pt(t),o=!1;i=new xe(r,function(){o||(o=!0,a(function(){o=!1,i.isDisposed||i.track(s)}))},t.onError,t.requiresObservable)}function s(){e(i)}return i.schedule(),i.getDisposer()}var Pr=function(e){return e()};function Pt(e){return e.scheduler?e.scheduler:e.delay?function(t){return setTimeout(t,e.delay)}:Pr}function rn(e,t,r){r===void 0&&(r=ze);var n=r.name||"Reaction@"+g(),i=ke(n,r.onError?jr(r.onError,t):t),a=!r.scheduler&&!r.delay,o=Pt(r),s=!0,f=!1,l,p=r.compareStructural?k.structural:r.equals||k.default,d=new xe(n,function(){s||a?y():f||(f=!0,o(y))},r.onError,r.requiresObservable);function y(){if(f=!1,!d.isDisposed){var b=!1;d.track(function(){var m=e(d);b=s||!p(l,m),l=m}),s&&r.fireImmediately&&i(l,d),!s&&b===!0&&i(l,d),s&&(s=!1)}}return d.schedule(),d.getDisposer()}function jr(e,t){return function(){try{return t.apply(this,arguments)}catch(r){e.call(this,r)}}}function Mr(e,t,r){return Mt("onBecomeObserved",e,t)}function jt(e,t,r){return Mt("onBecomeUnobserved",e,t)}function Mt(e,t,r,n){var i=U(t),a=r,o=e+"Listeners";i[o]?i[o].add(a):i[o]=new Set([a]);var s=i[e];return typeof s!="function"?h(!1):function(){var f=i[o];f&&(f.delete(a),f.size===0&&delete i[o])}}function nn(e){var t=e.enforceActions,r=e.computedRequiresReaction,n=e.computedConfigurable,i=e.disableErrorBoundaries,a=e.reactionScheduler,o=e.reactionRequiresObservable,s=e.observableRequiresReaction;if(gr(),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:h("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),o!==void 0&&(u.reactionRequiresObservable=!!o),s!==void 0&&(u.observableRequiresReaction=!!s,u.allowStateReads=!u.observableRequiresReaction),n!==void 0&&(u.computedConfigurable=!!n),i!==void 0&&(u.disableErrorBoundaries=!!i),a&&_r(a)}function at(e,t,r,n){n=X(n);var i=Bt(n);return F(e),Ye(e,n.name,i.enhancer),t&&Nt(e,t,r,i),e}function Bt(e){return e.defaultDecorator||(e.deep===!1?mt:Xe)}function Nt(e,t,r,n){var i,a,o,s,f,l;E();try{var o=$t(t);try{for(var p=C(o),d=p.next();!d.done;d=p.next()){var l=d.value,y=Object.getOwnPropertyDescriptor(t,l),b=r&&l in r?r[l]:y.get?we:n,m=b(e,l,y,!0);m&&Object.defineProperty(e,l,m)}}catch(K){i={error:K}}finally{try{d&&!d.done&&(a=p.return)&&a.call(p)}finally{if(i)throw i.error}}}finally{_()}}function Br(e,t){return Lt(U(e,t))}function Lt(e){var t={name:e.name};return e.observing&&e.observing.length>0&&(t.dependencies=Xt(e.observing).map(Lt)),t}function It(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 Z(r)}return Z(e)}function an(e){return arguments.length>1?h(!1):It(e)}function on(e,t){return typeof t!="string"?h(!1):It(e,t)}function Nr(e,t){return e==null?!1:B(e)||!!e[c]||Fe(e)||Re(e)||Z(e)}function Ce(e){return arguments.length!==1&&h(!1),Nr(e)}function ue(e){return B(e)?e[c].getKeys():w(e)||S(e)?Array.from(e.keys()):G(e)?e.map(function(t,r){return r}):h(!1)}function sn(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()):G(e)?e.slice():h(!1)}function un(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()):G(e)?e.map(function(t,r){return[r,t]}):h(!1)}function Ut(e,t,r){if(arguments.length===2&&!S(e)){E();var n=t;try{for(var i in n)Ut(e,i,n[i])}finally{_()}return}if(B(e)){var a=e[c],o=a.values.get(t);o?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(G(e))typeof t!="number"&&(t=parseInt(t,10)),q(t>=0,"Not a valid index: '"+t+"'"),E(),t>=e.length&&(e.length=t+1),e[t]=r,_();else return h(!1)}function fn(e,t,r,n){return Lr(e,t,r)}function Lr(e,t,r){return $e(e).observe(t,r)}var Ir={detectCycles:!0,exportMapsAsObjects:!0,recurseEverything:!1};function J(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(yr(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(G(e)||Array.isArray(e)){var i=J(r,e,[],t),a=e.map(function(b){return N(b,t,r)});i.length=a.length;for(var o=0,s=a.length;o0}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=ne();try{for(var n=Je(e.interceptors||[]),i=0,a=n.length;i0}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=ne(),n=e.changeListeners;if(n){n=n.slice();for(var i=0,a=n.length;i0?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;ia?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 o=P(this,{object:this.proxy,type:"splice",index:t,removedCount:r,added:n});if(!o)return Oe;r=o.removedCount,n=o.added}n=n.length===0?n:n.map(function(f){return i.enhancer(f,void 0)});var s=this.spliceItemsIntoValues(t,r,n);return(r!==0||n.length!==0)&&this.notifyArraySplice(t,n,s),this.dehanceValues(s)},e.prototype.spliceItemsIntoValues=function(t,r,n){var i;if(n.length-1?(this.splice(r,1),!0):!1},get:function(e){var t=this[c];if(t&&e=0&&r++;break}e=ht(e),t=ht(t);var s=o==="[object Array]";if(!s){if(typeof e!="object"||typeof t!="object")return!1;var f=e.constructor,l=t.constructor;if(f!==l&&!(typeof f=="function"&&f instanceof f&&typeof l=="function"&&l instanceof l)&&"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),s){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 d=Object.keys(e),y=void 0;if(p=d.length,Object.keys(t).length!==p)return!1;for(;p--;)if(y=d[p],!(Zr(t,y)&&qe(e[y],t[y],r-1,n,i)))return!1}return n.pop(),i.pop(),!0}function ht(e){return G(e)?e.slice():te(e)||w(e)||fe(e)||S(e)?Array.from(e.entries()):e}function Zr(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Te(e){return e[Symbol.iterator]=Qr,e}function Qr(){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:xr,extras:{getDebugName:$r},$mobx:c});export{c as $,Gt as O,xe as R,lr as a,ke as b,nn as c,yt as d,fn as e,un as f,en as g,B as h,Ce as i,G as j,w as k,ue as l,an as m,M as n,O as o,at as p,tn as q,rn as r,Ut as s,cn as t,on as u,sn as v,$e as w};