Socket
Socket
Sign inDemoInstall

mobx

Package Overview
Dependencies
Maintainers
2
Versions
251
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mobx - npm Package Compare versions

Comparing version 2.4.3 to 2.5.0-alpha1

59

lib/mobx.d.ts
export { IAtom, Atom, BaseAtom };
export { IObservable, IDepTreeNode };
export { IObservable, IDepTreeNode, ILegacyObservers };
export { Reaction, IReactionPublic };
export { IDerivation, untracked };
export { IDerivation, untracked, IDerivationState };
export { useStrict };

@@ -110,17 +110,17 @@ export { spy };

interface IAtom extends IObservable {
isDirty: boolean;
}
declare class BaseAtom implements IAtom {
name: string;
isDirty: boolean;
staleObservers: any[];
observers: SimpleSet<IDerivation>;
isPendingUnobservation: boolean;
isObserved: boolean;
_observers: any[];
_observersIndexes: {};
diffValue: number;
lastAccessedBy: number;
lowestObserverState: IDerivationState;
constructor(name?: string);
onBecomeUnobserved(): void;
observers: any;
reportObserved(): void;
reportChanged(): void;
private reportStale();
private reportReady();
toString(): string;

@@ -132,2 +132,3 @@ }

onBecomeUnobservedHandler: () => void;
isPendingUnobservation: boolean;
isBeingTracked: boolean;

@@ -143,16 +144,26 @@ constructor(name?: string, onBecomeObservedHandler?: () => void, onBecomeUnobservedHandler?: () => void);

}
interface IDerivation extends IDepTreeNode, IObservable, ISetEntry {
declare enum IDerivationState {
NOT_TRACKING = -1,
UP_TO_DATE = 0,
POSSIBLY_STALE = 1,
STALE = 2,
}
interface IDerivation extends IDepTreeNode {
observing: IObservable[];
staleObservers: IDerivation[];
observers: SimpleSet<IDerivation>;
dependencyStaleCount: number;
dependencyChangeCount: number;
onDependenciesReady(): boolean;
newObserving: IObservable[];
dependenciesState: IDerivationState;
runId: number;
unboundDepsCount: number;
__mapid: string;
onBecomeStale(): any;
recoverFromError(): any;
}
declare function untracked<T>(action: () => T): T;
interface ILegacyObservers {
asArray(): IDerivation[];
length: number;
}
interface IDepTreeNode {
name: string;
observers?: SimpleSet<IDerivation>;
observers?: ILegacyObservers;
observing?: IObservable[];

@@ -163,4 +174,7 @@ }

lastAccessedBy: number;
staleObservers: IDerivation[];
observers: SimpleSet<IDerivation>;
lowestObserverState: IDerivationState;
isPendingUnobservation: boolean;
observers: ILegacyObservers;
_observers: IDerivation[];
_observersIndexes: {};
onBecomeUnobserved(): any;

@@ -174,12 +188,9 @@ }

private onInvalidate;
staleObservers: IDerivation[];
observers: SimpleSet<IDerivation>;
observing: any[];
newObserving: any[];
dependenciesState: IDerivationState;
diffValue: number;
runId: number;
lastAccessedBy: number;
unboundDepsCount: number;
__mapid: string;
dependencyChangeCount: number;
dependencyStaleCount: number;
isDisposed: boolean;

@@ -190,4 +201,3 @@ _isScheduled: boolean;

constructor(name: string, onInvalidate: () => void);
onBecomeUnobserved(): void;
onDependenciesReady(): boolean;
onBecomeStale(): void;
schedule(): void;

@@ -197,2 +207,3 @@ isScheduled(): boolean;

track(fn: () => void): void;
recoverFromError(): void;
dispose(): void;

@@ -199,0 +210,0 @@ getDisposer(): Lambda & {

/** MobX - (c) Michel Weststrate 2015, 2016 - MIT Licensed */
"use strict";function e(e,n,r,o){return 1===arguments.length&&"function"==typeof e?L(e.name||"<unnamed action>",e):2===arguments.length&&"function"==typeof n?L(e,n):1===arguments.length&&"string"==typeof e?t(e):t(n).apply(null,arguments)}function t(e){return function(t,n,r){return r&&"function"==typeof r.value?(r.value=L(e,r.value),r.enumerable=!1,r.configurable=!0,r):gt(e).apply(this,arguments)}}function n(e,t,n){var r="string"==typeof e?e:e.name||"<unnamed action>",o="function"==typeof e?e:t,i="function"==typeof e?t:n;return rt("function"==typeof o,"`runInAction` expects a function"),rt(0===o.length,"`runInAction` expects a function without arguments"),rt("string"==typeof r&&r.length>0,"actions should have valid names, got: '"+r+"'"),$(r,o,i,void 0)}function r(e){return"function"==typeof e&&e.isMobxAction===!0}function o(e,t,n){function r(){i(s)}var o,i,a;"string"==typeof e?(o=e,i=t,a=n):"function"==typeof e&&(o=e.name||"Autorun@"+nt(),i=e,a=t),Ie(i,"autorun methods cannot have modifiers"),rt("function"==typeof i,"autorun expects a function"),a&&(i=i.bind(a));var s=new Vt(o,function(){this.track(r)});return s.schedule(),s.getDisposer()}function i(e,t,n,r){var i,a,s,u;"string"==typeof e?(i=e,a=t,s=n,u=r):"function"==typeof e&&(i="When@"+nt(),a=e,s=t,u=n);var c=o(i,function(e){if(a.call(u)){e.dispose();var t=X();s.call(u),q(t)}});return c}function a(e,t,n){return ot("`autorunUntil` is deprecated, please use `when`."),i.apply(null,arguments)}function s(e,t,n,r){function o(){a(l)}var i,a,s,u;"string"==typeof e?(i=e,a=t,s=n,u=r):"function"==typeof e&&(i=e.name||"AutorunAsync@"+nt(),a=e,s=t,u=n),void 0===s&&(s=1),u&&(a=a.bind(u));var c=!1,l=new Vt(i,function(){c||(c=!0,setTimeout(function(){c=!1,l.isDisposed||l.track(o)},s))});return l.schedule(),l.getDisposer()}function u(t,n,r,o,i,a){function s(){if(!w.isDisposed){var e=!1;w.track(function(){var t=y(w);e=lt(b,x,t),x=t}),m&&p&&l(x,w),m||e!==!0||l(x,w),m&&(m=!1)}}var u,c,l,p,f,h;"string"==typeof t?(u=t,c=n,l=r,p=o,f=i,h=a):(u=t.name||n.name||"Reaction@"+nt(),c=t,l=n,p=r,f=o,h=i),void 0===p&&(p=!1),void 0===f&&(f=0);var d=Se(c,$t.Reference),v=d[0],y=d[1],b=v===$t.Structure;h&&(y=y.bind(h),l=e(u,l.bind(h)));var m=!0,g=!1,x=void 0,w=new Vt(u,function(){f<1?s():g||(g=!0,setTimeout(function(){g=!1,s()},f))});return w.schedule(),w.getDisposer()}function c(e,t,n,r){return arguments.length<3&&"function"==typeof e?l(e,t):(rt(!n||!n.set,"@observable properties cannot have a setter: "+t),xt.apply(null,arguments))}function l(e,t){var n=Se(e,$t.Recursive),r=n[0],o=n[1];return new St(o,t,r===$t.Structure,o.name)}function p(){throw new Error("[ComputedValue] It is not allowed to assign new values to computed properties.")}function f(e,t){rt("function"==typeof e&&1===e.length,"createTransformer expects a function that accepts one argument");var n={},r=Ct.resetId,o=function(r){function o(t,n){r.call(this,function(){return e(n)},null,!1,"Transformer-"+e.name+"-"+t),this.sourceIdentifier=t,this.sourceObject=n}return mt(o,r),o.prototype.onBecomeUnobserved=function(){var e=this.value;r.prototype.onBecomeUnobserved.call(this),delete n[this.sourceIdentifier],t&&t(e,this.sourceObject)},o}(St);return function(e){r!==Ct.resetId&&(n={},r=Ct.resetId);var t=h(e),i=n[t];return i?i.get():(i=n[t]=new o(t,e),i.get())}}function h(e){if(null===e||"object"!=typeof e)throw new Error("[mobx] transform expected some kind of object, got: "+e);var t=e.$transformId;return void 0===t&&(t=nt(),ft(e,"$transformId",t)),t}function d(e,t){return F()||console.warn("[mobx.expr] 'expr' should only be used inside other reactive functions."),c(e,t).get()}function v(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return rt(arguments.length>=2,"extendObservable expected 2 or more arguments"),rt("object"==typeof e,"extendObservable expects an object as first argument"),rt(!(e instanceof Kt),"extendObservable should not be used on maps, use map.merge instead"),t.forEach(function(t){rt("object"==typeof t,"all arguments of extendObservable should be objects"),y(e,t,$t.Recursive,null)}),e}function y(e,t,n,r){var o=Me(e,r,n);for(var i in t)if(t.hasOwnProperty(i)){if(e===t&&!dt(e,i))continue;ze(o,i,t[i])}return e}function b(e,t){return m(We(e,t))}function m(e){var t={name:e.name};return e.observing&&e.observing.length>0&&(t.dependencies=at(e.observing).map(m)),t}function g(e,t){return x(We(e,t))}function x(e){var t={name:e.name};return e.observers&&e.observers.length>0&&(t.observers=e.observers.asArray().map(x)),t}function w(e,t,n){return"function"==typeof n?R(e,t,n):_(e,t)}function _(e,t){return ut(e)&&!Ge(e)?(ot("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),Ke(A(e)).intercept(t)):Ke(e).intercept(t)}function R(e,t,n){return ut(e)&&!Ge(e)?(ot("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),v(e,{property:e[t]}),R(e,t,n)):Ke(e,t).intercept(n)}function k(e,t){if(null===e||void 0===e)return!1;if(void 0!==t){if(e instanceof Kt||e instanceof Jt)throw new Error("[mobx.isObservable] isObservable(object, propertyName) is not supported for arrays and maps. Use map.has or array.length instead.");if(Ge(e)){var n=e.$mobx;return n.values&&!!n.values[t]}return!1}return!!e.$mobx||e instanceof Rt||e instanceof Vt||e instanceof St}function S(e,t,n){return rt(arguments.length>=2&&arguments.length<=3,"Illegal decorator config",t),vt(e,t),rt(!n||!n.get,"@observable can not be used on getters, use @computed instead"),wt.apply(null,arguments)}function A(e,t){if(void 0===e&&(e=void 0),"string"==typeof arguments[1])return S.apply(null,arguments);if(rt(arguments.length<3,"observable expects zero, one or two arguments"),k(e))return e;var n=Se(e,$t.Recursive),r=n[0],o=n[1],i=r===$t.Reference?_t.Reference:O(o);switch(i){case _t.Array:case _t.PlainObject:return Oe(o,r);case _t.Reference:case _t.ComplexObject:return new Yt(o,r);case _t.ComplexFunction:throw new Error("[mobx.observable] To be able to make a function reactive it should not have arguments. If you need an observable reference to a function, use `observable(asReference(f))`");case _t.ViewFunction:return ot("Use `computed(expr)` instead of `observable(expr)`"),c(e,t)}rt(!1,"Illegal State")}function O(e){return null===e||void 0===e?_t.Reference:"function"==typeof e?e.length?_t.ComplexFunction:_t.ViewFunction:Array.isArray(e)||e instanceof Jt?_t.Array:"object"==typeof e?ut(e)?_t.PlainObject:_t.ComplexObject:_t.Reference}function I(e,t,n,r){return"function"==typeof n?C(e,t,n,r):j(e,t,n)}function j(e,t,n){return ut(e)&&!Ge(e)?(ot("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),Ke(A(e)).observe(t,n)):Ke(e).observe(t,n)}function C(e,t,n,r){return ut(e)&&!Ge(e)?(ot("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),v(e,{property:e[t]}),C(e,t,n,r)):Ke(e,t).observe(n,r)}function E(e,t,n){function r(r){return t&&n.push([e,r]),r}if(void 0===t&&(t=!0),void 0===n&&(n=null),e instanceof Date||e instanceof RegExp)return e;if(t&&null===n&&(n=[]),t&&null!==e&&"object"==typeof e)for(var o=0,i=n.length;o<i;o++)if(n[o][0]===e)return n[o][1];if(!e)return e;if(Array.isArray(e)||e instanceof Jt){var a=r([]),s=e.map(function(e){return E(e,t,n)});a.length=s.length;for(var o=0,i=s.length;o<i;o++)a[o]=s[o];return a}if(e instanceof Kt){var u=r({});return e.forEach(function(e,r){return u[r]=E(e,t,n)}),u}if(k(e)&&e.$mobx instanceof Yt)return E(e(),t,n);if(e instanceof Yt)return E(e.get(),t,n);if("object"==typeof e){var a=r({});for(var c in e)a[c]=E(e[c],t,n);return a}return e}function V(e,t,n){return void 0===t&&(t=!0),void 0===n&&(n=null),ot("toJSON is deprecated. Use toJS instead"),E.apply(null,arguments)}function D(e){return console.log(e),e}function T(e,t){switch(arguments.length){case 0:if(e=Ct.derivationStack[Ct.derivationStack.length-1],!e)return D("whyRun() can only be used if a derivation is active, or by passing an computed value / reaction explicitly. If you invoked whyRun from inside a computation; the computation is currently suspended but re-evaluating because somebody requested it's value.");break;case 2:e=We(e,t)}return e=We(e),e instanceof St?D(e.whyRun()):e instanceof Vt?D(e.whyRun()):void rt(!1,"whyRun can only be used on reactions and computed values")}function L(e,t){rt("function"==typeof t,"`action` can only be invoked on functions"),rt("string"==typeof e&&e.length>0,"actions should have valid names, got: '"+e+"'");var n=function(){return $(e,t,this,arguments)};return n.isMobxAction=!0,n}function $(e,t,n,r){var o=Ct.derivationStack;rt(!(o[o.length-1]instanceof St),"Computed values or transformers should not invoke actions or trigger other side effects");var i,a=ae();if(a){i=Date.now();var s=r&&r.length||0,u=new Array(s);if(s>0)for(var c=0;c<s;c++)u[c]=r[c];ue({type:"action",name:e,fn:t,target:n,arguments:u})}var l=X();he(e,n,!1);var p=z(!0);try{return t.apply(n,r)}finally{N(p),de(!1),q(l),a&&ce({time:Date.now()-i})}}function P(e){return 0===arguments.length?Ct.strictMode:(rt(0===Ct.derivationStack.length,"It is not allowed to set `useStrict` when a derivation is running"),Ct.strictMode=e,Ct.allowStateChanges=!e,void 0)}function M(e,t){var n=z(e),r=t();return N(n),r}function z(e){var t=Ct.allowStateChanges;return Ct.allowStateChanges=e,t}function N(e){Ct.allowStateChanges=e}function U(e){rt(e.isDirty,"atom not dirty"),e.isDirty=!1,oe(e,!0)}function F(){return Ct.derivationStack.length>0&&Ct.isTracking}function B(){Ct.allowStateChanges||rt(!1,Ct.strictMode?"It is not allowed to create or change state outside an `action` when MobX is in strict mode. Wrap the current method in `action` if this state change is intended":"It is not allowed to change the state when a computed value or transformer is being evaluated. Use 'autorun' to create reactive functions with side-effects.")}function J(e){1===++e.dependencyStaleCount&&re(e)}function G(e,t){if(rt(e.dependencyStaleCount>0,"unexpected ready notification"),t&&(e.dependencyChangeCount+=1),0===--e.dependencyStaleCount)if(e.dependencyChangeCount>0){e.dependencyChangeCount=0;var n=e.onDependenciesReady();oe(e,n)}else oe(e,!1)}function W(e,t){var n=e.observing;e.observing=new Array(n.length+100),e.unboundDepsCount=0,e.runId=++Ct.runId,Ct.derivationStack.push(e);var r=Ct.isTracking;Ct.isTracking=!0;var o,i=!0;try{o=t.call(e),i=!1}finally{if(i){var a="[mobx] An uncaught exception occurred while calculating your computed value, autorun or transformer. Or inside the render() method of an observer based React component. These functions should never throw exceptions as MobX will not always be able to recover from them. "+("Please fix the error reported after this message or enable 'Pause on (caught) exceptions' in your debugger to find the root cause. In: '"+e.name+"'. ")+"For more details see https://github.com/mobxjs/mobx/issues/462";ae()&&se({type:"error",object:this,message:a}),console.warn(a),e.unboundDepsCount=0,e.observing=n,Z()}else Ct.isTracking=r,Ct.derivationStack.length-=1,K(e,n)}return o}function K(e,t){for(var n=t.length,r=e.observing,o=r.length=e.unboundDepsCount,i=0;i<n;i++)t[i].diffValue=-1;for(var i=0;i<o;i++){var a=r[i];++a.diffValue>0&&(a.diffValue=0,ee(a,e))}for(var i=0;i<n;i++){var a=t[i];a.diffValue<0&&(a.diffValue=0,te(a,e))}}function H(e){for(var t=e.observing,n=t.length,r=0;r<n;r++)te(t[r],e);t.length=0}function Q(e){var t=X(),n=e();return q(t),n}function X(){var e=Ct.isTracking;return Ct.isTracking=!1,e}function q(e){Ct.isTracking=e}function Y(){}function Z(){Ct.resetId++;var e=new jt;for(var t in e)It.indexOf(t)===-1&&(Ct[t]=e[t]);Ct.allowStateChanges=!Ct.strictMode}function ee(e,t){e.observers.add(t)}function te(e,t){e.observers.remove(t),0===e.observers.length&&e.onBecomeUnobserved()}function ne(e){if(Ct.isTracking!==!1){var t=Ct.derivationStack[Ct.derivationStack.length-1];t.runId!==e.lastAccessedBy&&(e.lastAccessedBy=t.runId,t.observing[t.unboundDepsCount++]=e)}}function re(e){for(var t=e.observers.asArray(),n=t.length,r=0;r<n;r++)J(t[r]);e.staleObservers=e.staleObservers.concat(t)}function oe(e,t){e.staleObservers.splice(0).forEach(function(e){return G(e,t)})}function ie(){if(!(Ct.isRunningReactions===!0||Ct.inTransaction>0)){Ct.isRunningReactions=!0;for(var e=Ct.pendingReactions,t=0;e.length>0;){if(++t===Dt)throw new Error("Reaction doesn't converge to a stable state after "+Dt+" iterations. Probably there is a cycle in the reactive function: "+e[0]);for(var n=e.splice(0),r=0,o=n.length;r<o;r++)n[r].runReaction()}Ct.isRunningReactions=!1}}function ae(){return Tt}function se(e){if(!Tt)return!1;for(var t=Ct.spyListeners,n=0,r=t.length;n<r;n++)t[n](e)}function ue(e){var t=ct({},e,{spyReportStart:!0});se(t)}function ce(e){se(e?ct({},e,Lt):Lt)}function le(e){return Ct.spyListeners.push(e),Tt=Ct.spyListeners.length>0,it(function(){var t=Ct.spyListeners.indexOf(e);t!==-1&&Ct.spyListeners.splice(t,1),Tt=Ct.spyListeners.length>0})}function pe(e){return ot("trackTransitions is deprecated. Use mobx.spy instead"),"boolean"==typeof e&&(ot("trackTransitions only takes a single callback function. If you are using the mobx-react-devtools, please update them first"),e=arguments[1]),e?le(e):(ot("trackTransitions without callback has been deprecated and is a no-op now. If you are using the mobx-react-devtools, please update them first"),function(){})}function fe(e,t,n){void 0===t&&(t=void 0),void 0===n&&(n=!0),he(e.name||"anonymous transaction",t,n);var r=e.call(t);return de(n),r}function he(e,t,n){void 0===t&&(t=void 0),void 0===n&&(n=!0),Ct.inTransaction+=1,n&&ae()&&ue({type:"transaction",target:t,name:e})}function de(e){if(void 0===e&&(e=!0),0===--Ct.inTransaction){for(var t=Ct.changedAtoms.splice(0),n=0,r=t.length;n<r;n++)U(t[n]);ie()}e&&ae()&&ce()}function ve(e){return e.interceptors&&e.interceptors.length>0}function ye(e,t){var n=e.interceptors||(e.interceptors=[]);return n.push(t),it(function(){var e=n.indexOf(t);e!==-1&&n.splice(e,1)})}function be(e,t){for(var n=X(),r=e.interceptors,o=0,i=r.length;o<i;o++)if(t=r[o](t),rt(!t||t.type,"Intercept handlers should return nothing or a change object"),!t)return null;return q(n),t}function me(e){return e.changeListeners&&e.changeListeners.length>0}function ge(e,t){var n=e.changeListeners||(e.changeListeners=[]);return n.push(t),it(function(){var e=n.indexOf(t);e!==-1&&n.splice(e,1)})}function xe(e,t){var n=X(),r=e.changeListeners;if(r){r=r.slice();for(var o=0,i=r.length;o<i;o++)Array.isArray(t)?r[o].apply(null,t):r[o](t);q(n)}}function we(e){return new Pt(e)}function _e(e){return new Mt(e)}function Re(e){return new zt(e)}function ke(e,t){return $e(e,t)}function Se(e,t){return e instanceof Pt?[$t.Reference,e.value]:e instanceof Mt?[$t.Structure,e.value]:e instanceof zt?[$t.Flat,e.value]:[t,e]}function Ae(e){return e===we?$t.Reference:e===_e?$t.Structure:e===Re?$t.Flat:(rt(void 0===e,"Cannot determine value mode from function. Please pass in one of these: mobx.asReference, mobx.asStructure or mobx.asFlat, got: "+e),$t.Recursive)}function Oe(e,t,n){var r;if(k(e))return e;switch(t){case $t.Reference:return e;case $t.Flat:Ie(e,"Items inside 'asFlat' cannot have modifiers"),r=$t.Reference;break;case $t.Structure:Ie(e,"Items inside 'asStructure' cannot have modifiers"),r=$t.Structure;break;case $t.Recursive:o=Se(e,$t.Recursive),r=o[0],e=o[1];break;default:rt(!1,"Illegal State")}return Array.isArray(e)?De(e,r,n):ut(e)&&Object.isExtensible(e)?y(e,e,r,n):e;var o}function Ie(e,t){if(e instanceof Pt||e instanceof Mt||e instanceof zt)throw new Error("[mobx] asStructure / asReference / asFlat cannot be used here. "+t)}function je(e){var t=Ce(e),n=Ee(e);Object.defineProperty(Jt.prototype,""+e,{enumerable:!1,configurable:!0,set:t,get:n})}function Ce(e){return function(t){var n=this.$mobx,r=n.values;if(Ie(t,"Modifiers cannot be used on array values. For non-reactive array values use makeReactive(asFlat(array))."),e<r.length){B();var o=r[e];if(ve(n)){var i=be(n,{type:"update",object:n.array,index:e,newValue:t});if(!i)return;t=i.newValue}t=n.makeReactiveArrayItem(t);var a=n.mode===$t.Structure?!bt(o,t):o!==t;a&&(r[e]=t,n.notifyArrayChildUpdate(e,t,o))}else{if(e!==r.length)throw new Error("[mobx.array] Index out of bounds, "+e+" is larger than "+r.length);n.spliceWithArray(e,0,[t])}}}function Ee(e){return function(){var t=this.$mobx;return t&&e<t.values.length?(t.atom.reportObserved(),t.values[e]):void 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")}}function Ve(e){for(var t=Ut;t<e;t++)je(t);Ut=e}function De(e,t,n){return new Jt(e,t,n)}function Te(e){return ot("fastArray is deprecated. Please use `observable(asFlat([]))`"),De(e,$t.Flat,null)}function Le(e){return e instanceof Jt}function $e(e,t){return new Kt(e,t)}function Pe(e){return e instanceof Kt}function Me(e,t,n){if(void 0===n&&(n=$t.Recursive),Ge(e))return e.$mobx;ut(e)||(t=e.constructor.name+"@"+nt()),t||(t="ObservableObject@"+nt());var r=new Ht(e,t,n);return ht(e,"$mobx",r),r}function ze(e,t,n){e.values[t]?e.target[t]=n:Ne(e,t,n,!0)}function Ne(e,t,n,o){o&&vt(e.target,t);var i,a=e.name+"."+t,s=!0;if("function"!=typeof n||0!==n.length||r(n))if(n instanceof Mt&&"function"==typeof n.value&&0===n.value.length)i=new St(n.value,e.target,(!0),a);else{if(s=!1,ve(e)){var u=be(e,{object:e.target,name:t,type:"add",newValue:n});if(!u)return;n=u.newValue}i=new Yt(n,e.mode,a,(!1)),n=i.value}else i=new St(n,e.target,(!1),a);e.values[t]=i,o&&Object.defineProperty(e.target,t,s?Fe(t):Ue(t)),s||Je(e,e.target,t,n)}function Ue(e){var t=Qt[e];return t?t:Qt[e]={configurable:!0,enumerable:!0,get:function(){return this.$mobx.values[e].get()},set:function(t){Be(this,e,t)}}}function Fe(e){var t=Xt[e];return t?t:Xt[e]={configurable:!0,enumerable:!1,get:function(){return this.$mobx.values[e].get()},set:p}}function Be(e,t,n){var r=e.$mobx,o=r.values[t];if(ve(r)){var i=be(r,{type:"update",object:e,name:t,newValue:n});if(!i)return;n=i.newValue}if(n=o.prepareNewValue(n),n!==qt){var a=me(r),s=ae(),i=xe||me?{type:"update",object:e,oldValue:o.value,name:t,newValue:n}:null;s&&ue(i),o.setNewValue(n),a&&xe(r,i),s&&ce()}}function Je(e,t,n,r){var o=me(e),i=ae(),a=o||i?{type:"add",object:t,name:n,newValue:r}:null;i&&ue(a),o&&xe(e,a),i&&ce()}function Ge(e){return"object"==typeof e&&null!==e&&(qe(e),e.$mobx instanceof Ht)}function We(e,t){if("object"==typeof e&&null!==e){if(Le(e))return rt(void 0===t,"It is not possible to get index atoms from arrays"),e.$mobx.atom;if(Pe(e)){if(void 0===t)return We(e._keys);var n=e._data[t]||e._hasMap[t];return rt(!!n,"the entry '"+t+"' does not exist in the observable map '"+He(e)+"'"),n}if(qe(e),Ge(e)){rt(!!t,"please specify a property");var r=e.$mobx.values[t];return rt(!!r,"no observable property '"+t+"' found on the observable object '"+He(e)+"'"),r}if(e instanceof Rt||e instanceof St||e instanceof Vt)return e}else if("function"==typeof e&&e.$mobx instanceof Vt)return e.$mobx;rt(!1,"Cannot obtain atom from "+e)}function Ke(e,t){return rt(e,"Expection some object"),void 0!==t?Ke(We(e,t)):e instanceof Rt||e instanceof St||e instanceof Vt?e:Pe(e)?e:(qe(e),e.$mobx?e.$mobx:void rt(!1,"Cannot obtain administration from "+e))}function He(e,t){var n;return n=void 0!==t?We(e,t):Ge(e)||Pe(e)?Ke(e):We(e),n.name}function Qe(e,t,n,r,o){function i(i,a,s,u){if(rt(o||Ye(arguments),"This function is a decorator, but it wasn't invoked like a decorator"),s){i.hasOwnProperty("__mobxLazyInitializers")||ft(i,"__mobxLazyInitializers",i.__mobxLazyInitializers&&i.__mobxLazyInitializers.slice()||[]);var c=s.value,l=s.initializer;return i.__mobxLazyInitializers.push(function(t){e(t,a,l?l.call(t):c,u,s)}),{enumerable:r,configurable:!0,get:function(){return this.__mobxDidRunLazyInitializers!==!0&&qe(this),t.call(this,a)},set:function(e){this.__mobxDidRunLazyInitializers!==!0&&qe(this),n.call(this,a,e)}}}var p={enumerable:r,configurable:!0,get:function(){return this.__mobxInitializedProps&&this.__mobxInitializedProps[a]===!0||Xe(this,a,void 0,e,u,s),t.call(this,a)},set:function(t){this.__mobxInitializedProps&&this.__mobxInitializedProps[a]===!0?n.call(this,a,t):Xe(this,a,t,e,u,s)}};return arguments.length<3&&Object.defineProperty(i,a,p),p}return o?function(){if(Ye(arguments))return i.apply(null,arguments);var e=arguments;return function(t,n,r){return i(t,n,r,e)}}:i}function Xe(e,t,n,r,o,i){e.hasOwnProperty("__mobxInitializedProps")||ft(e,"__mobxInitializedProps",{}),e.__mobxInitializedProps[t]=!0,r(e,t,n,o,i)}function qe(e){e.__mobxDidRunLazyInitializers!==!0&&e.__mobxLazyInitializers&&(ft(e,"__mobxDidRunLazyInitializers",!0),e.__mobxDidRunLazyInitializers&&e.__mobxLazyInitializers.forEach(function(t){return t(e)}))}function Ye(e){return(2===e.length||3===e.length)&&"string"==typeof e[1]}function Ze(){return"function"==typeof Symbol&&Symbol.iterator||"@@iterator"}function et(e){rt(e[Zt]!==!0,"Illegal state: cannot recycle array as iterator"),ht(e,Zt,!0);var t=-1;return ht(e,"next",function(){return t++,{done:t>=this.length,value:t<this.length?this[t]:void 0}}),e}function tt(e,t){ht(e,Ze(),t)}function nt(){return++Ct.mobxGuid}function rt(e,t,n){if(!e)throw new Error("[mobx] Invariant failed: "+t+(n?" in '"+n+"'":""))}function ot(e){rn.indexOf(e)===-1&&(rn.push(e),console.error("[mobx] Deprecated: "+e))}function it(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}function at(e){var t=[];return e.forEach(function(e){t.indexOf(e)===-1&&t.push(e)}),t}function st(e,t,n){if(void 0===t&&(t=100),void 0===n&&(n=" - "),!e)return"";var r=e.slice(0,t);return""+r.join(n)+(e.length>t?" (... and "+(e.length-t)+"more)":"")}function ut(e){if(null===e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}function ct(){for(var e=arguments[0],t=1,n=arguments.length;t<n;t++){var r=arguments[t];for(var o in r)r.hasOwnProperty(o)&&(e[o]=r[o])}return e}function lt(e,t,n){return e?!bt(t,n):t!==n}function pt(e,t){for(var n=0;n<t.length;n++)ft(e,t[n],e[t[n]])}function ft(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function ht(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!1,configurable:!0,value:n})}function dt(e,t){var n=Object.getOwnPropertyDescriptor(e,t);return!n||n.configurable!==!1&&n.writable!==!1}function vt(e,t){rt(dt(e,t),"Cannot make property '"+t+"' observable, it is not configurable and writable in the target object")}function yt(e){var t=[];for(var n in e)t.push(n);return t}function bt(e,t){if(null===e&&null===t)return!0;if(void 0===e&&void 0===t)return!0;var n=Array.isArray(e)||Le(e);if(n!==(Array.isArray(t)||Le(t)))return!1;if(n){if(e.length!==t.length)return!1;for(var r=e.length-1;r>=0;r--)if(!bt(e[r],t[r]))return!1;return!0}if("object"==typeof e&&"object"==typeof t){if(null===e||null===t)return!1;if(yt(e).length!==yt(t).length)return!1;for(var o in e){if(!(o in t))return!1;if(!bt(e[o],t[o]))return!1}return!0}return e===t}var mt=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)};Y(),exports.extras={allowStateChanges:M,getAtom:We,getDebugName:He,getDependencyTree:b,getObserverTree:g,isComputingDerivation:F,isSpyEnabled:ae,resetGlobalState:Z,spyReport:se,spyReportEnd:ce,spyReportStart:ue,trackTransitions:pe},exports._={getAdministration:Ke,resetGlobalState:Z};var gt=Qe(function(t,n,r,o,i){var a=o&&1===o.length?o[0]:r.name||n||"<unnamed action>",s=e(a,r);ft(t,n,s)},function(e){return this[e]},function(){rt(!1,"It is not allowed to assign new values to @action fields")},!1,!0);exports.action=e,exports.runInAction=n,exports.isAction=r,exports.autorun=o,exports.when=i,exports.autorunUntil=a,exports.autorunAsync=s,exports.reaction=u;var xt=Qe(function(e,t,n,r,o){rt("undefined"!=typeof o,"@computed can only be used on getter functions, like: '@computed get myProps() { return ...; }'. It looks like it was used on a property.");var i=o.get;rt("function"==typeof i,"@computed can only be used on getter functions, like: '@computed get myProps() { return ...; }'");var a=!1;r&&1===r.length&&r[0].asStructure===!0&&(a=!0);var s=Me(e,void 0,$t.Recursive);Ne(s,t,a?_e(i):i,!1)},function(e){return this.$mobx.values[e].get()},p,!1,!0);exports.computed=c,exports.createTransformer=f,exports.expr=d,exports.extendObservable=v,exports.intercept=w,exports.isObservable=k;var wt=Qe(function(e,t,n){var r=z(!0);"function"==typeof n&&(n=we(n));var o=Me(e,void 0,$t.Recursive);Ne(o,t,n,!0),N(r)},function(e){return this.$mobx.values[e].get()},function(e,t){Be(this,e,t)},!0,!1);exports.observable=A;var _t;!function(e){e[e.Reference=0]="Reference",e[e.PlainObject=1]="PlainObject",e[e.ComplexObject=2]="ComplexObject",e[e.Array=3]="Array",e[e.ViewFunction=4]="ViewFunction",e[e.ComplexFunction=5]="ComplexFunction"}(_t||(_t={})),exports.observe=I,exports.toJS=E,exports.toJSON=V,exports.whyRun=T,exports.useStrict=P;var Rt=function(){function e(e){void 0===e&&(e="Atom@"+nt()),this.name=e,this.isDirty=!1,this.staleObservers=[],this.observers=new en,this.diffValue=0,this.lastAccessedBy=0}return e.prototype.onBecomeUnobserved=function(){},e.prototype.reportObserved=function(){ne(this)},e.prototype.reportChanged=function(){this.isDirty||(this.reportStale(),this.reportReady())},e.prototype.reportStale=function(){this.isDirty||(this.isDirty=!0,re(this))},e.prototype.reportReady=function(){rt(this.isDirty,"atom not dirty"),Ct.inTransaction>0?Ct.changedAtoms.push(this):(U(this),ie())},e.prototype.toString=function(){return this.name},e}();exports.BaseAtom=Rt;var kt=function(e){function t(t,n,r){void 0===t&&(t="Atom@"+nt()),void 0===n&&(n=on),void 0===r&&(r=on),e.call(this,t),this.name=t,this.onBecomeObservedHandler=n,this.onBecomeUnobservedHandler=r,this.isBeingTracked=!1}return mt(t,e),t.prototype.reportObserved=function(){e.prototype.reportObserved.call(this);var t=Ct.isTracking;return t&&!this.isBeingTracked&&(this.isBeingTracked=!0,this.onBecomeObservedHandler()),t},t.prototype.onBecomeUnobserved=function(){this.isBeingTracked=!1,this.onBecomeUnobservedHandler()},t}(Rt);exports.Atom=kt;var St=function(){function e(e,t,n,r){this.derivation=e,this.scope=t,this.compareStructural=n,this.isLazy=!0,this.isComputing=!1,this.staleObservers=[],this.observers=new en,this.observing=[],this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.unboundDepsCount=0,this.__mapid="#"+nt(),this.dependencyChangeCount=0,this.dependencyStaleCount=0,this.value=void 0,this.name=r||"ComputedValue@"+nt()}return e.prototype.peek=function(){this.isComputing=!0;var e=z(!1),t=this.derivation.call(this.scope);return N(e),this.isComputing=!1,t},e.prototype.onBecomeUnobserved=function(){H(this),this.isLazy=!0,this.value=void 0},e.prototype.onDependenciesReady=function(){var e=this.trackAndCompute();return e},e.prototype.get=function(){if(rt(!this.isComputing,"Cycle detected in computation "+this.name,this.derivation),ne(this),this.dependencyStaleCount>0)return this.peek();if(this.isLazy){if(!F())return this.peek();this.isLazy=!1,this.trackAndCompute()}return this.value},e.prototype.set=function(e){throw new Error("[ComputedValue '"+name+"'] It is not possible to assign a new value to a computed value.")},e.prototype.trackAndCompute=function(){ae()&&se({object:this,type:"compute",fn:this.derivation,target:this.scope});var e=this.value,t=this.value=W(this,this.peek);return lt(this.compareStructural,t,e)},e.prototype.observe=function(e,t){var n=this,r=!0,i=void 0;return o(function(){var o=n.get();if(!r||t){var a=X();e(o,i),q(a)}r=!1,i=o})},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},e.prototype.whyRun=function(){var e=Ct.derivationStack.length>0,t=at(this.observing).map(function(e){return e.name}),n=at(this.observers.asArray()).map(function(e){return e.name}),r=this.isComputing?e?this.observers.length>0?At.INVALIDATED:At.REQUIRED:At.PEEK:At.NOT_RUNNING;if(r===At.REQUIRED){var o=Ct.derivationStack[Ct.derivationStack.length-2];o&&n.push(o.name)}return"\nWhyRun? computation '"+this.name+"':\n * Running because: "+Ot[r]+" "+(r===At.NOT_RUNNING&&this.dependencyStaleCount>0?"(a next run is scheduled)":"")+"\n"+(this.isLazy?" * This computation is suspended (not in use by any reaction) and won't run automatically.\n\tDidn't expect this computation to be suspended at this point?\n\t 1. Make sure this computation is used by a reaction (reaction, autorun, observer).\n\t 2. Check whether you are using this computation synchronously (in the same stack as they reaction that needs it).\n":" * This computation will re-run if any of the following observables changes:\n "+st(t)+"\n "+(this.isComputing&&e?" (... or any observable accessed during the remainder of the current run)":"")+"\n\tMissing items in this list?\n\t 1. Check whether all used values are properly marked as observable (use isObservable to verify)\n\t 2. Make sure you didn't dereference values too early. MobX observes props, not primitives. E.g: use 'person.name' instead of 'name' in your computation.\n * If the outcome of this computation changes, the following observers will be re-run:\n "+st(n)+"\n")},e}(),At;!function(e){e[e.PEEK=0]="PEEK",e[e.INVALIDATED=1]="INVALIDATED",e[e.REQUIRED=2]="REQUIRED",e[e.NOT_RUNNING=3]="NOT_RUNNING"}(At||(At={}));var Ot=(an={},an[At.PEEK]="[peek] The value of this computed value was requested outside an reaction",an[At.INVALIDATED]="[invalidated] Some observables used by this computation did change",an[At.REQUIRED]="[started] This computation is required by another computed value / reaction",an[At.NOT_RUNNING]="[idle] This compution is currently not running",an);exports.untracked=Q;var It=["mobxGuid","resetId","spyListeners","strictMode","runId"],jt=function(){function e(){this.version=3,this.derivationStack=[],this.runId=0,this.mobxGuid=0,this.inTransaction=0,this.isTracking=!1,this.isRunningReactions=!1,this.changedAtoms=[],this.pendingReactions=[],this.allowStateChanges=!0,this.strictMode=!1,this.resetId=0,this.spyListeners=[]}return e}(),Ct=function(){var e=new jt;if(global.__mobservableTrackingStack||global.__mobservableViewStack)throw new Error("[mobx] An incompatible version of mobservable is already loaded.");if(global.__mobxGlobal&&global.__mobxGlobal.version!==e.version)throw new Error("[mobx] An incompatible version of mobx is already loaded.");return global.__mobxGlobal?global.__mobxGlobal:global.__mobxGlobal=e}(),Et,Vt=function(){function e(e,t){void 0===e&&(e="Reaction@"+nt()),this.name=e,this.onInvalidate=t,this.staleObservers=nn,this.observers=Et||(Et=new en),this.observing=[],this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.unboundDepsCount=0,this.__mapid="#"+nt(),this.dependencyChangeCount=0,this.dependencyStaleCount=0,this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1}return e.prototype.onBecomeUnobserved=function(){},e.prototype.onDependenciesReady=function(){return this.schedule(),!1},e.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,Ct.pendingReactions.push(this),ie())},e.prototype.isScheduled=function(){return this.dependencyStaleCount>0||this._isScheduled},e.prototype.runReaction=function(){this.isDisposed||(this._isScheduled=!1,this._isTrackPending=!0,this.onInvalidate(),this._isTrackPending&&ae()&&se({object:this,type:"scheduled-reaction"}))},e.prototype.track=function(e){var t,n=ae();n&&(t=Date.now(),ue({object:this,type:"reaction",fn:e})),this._isRunning=!0,W(this,e),this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&H(this),n&&ce({time:Date.now()-t})},e.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||H(this))},e.prototype.getDisposer=function(){var e=this.dispose.bind(this);return e.$mobx=this,e},e.prototype.toString=function(){return"Reaction["+this.name+"]"},e.prototype.whyRun=function(){
var e=at(this.observing).map(function(e){return e.name});return"\nWhyRun? reaction '"+this.name+"':\n * Status: ["+(this.isDisposed?"stopped":this._isRunning?"running":this.isScheduled()?"scheduled":"idle")+"]\n * This reaction will re-run if any of the following observables changes:\n "+st(e)+"\n "+(this._isRunning?" (... or any observable accessed during the remainder of the current run)":"")+"\n\tMissing items in this list?\n\t 1. Check whether all used values are properly marked as observable (use isObservable to verify)\n\t 2. Make sure you didn't dereference values too early. MobX observes props, not primitives. E.g: use 'person.name' instead of 'name' in your computation.\n"},e}();exports.Reaction=Vt;var Dt=100,Tt=!1,Lt={spyReportEnd:!0};exports.spy=le,exports.transaction=fe;var $t;!function(e){e[e.Recursive=0]="Recursive",e[e.Reference=1]="Reference",e[e.Structure=2]="Structure",e[e.Flat=3]="Flat"}($t||($t={})),exports.asReference=we,exports.asStructure=_e,exports.asFlat=Re;var Pt=function(){function e(e){this.value=e,Ie(e,"Modifiers are not allowed to be nested")}return e}(),Mt=function(){function e(e){this.value=e,Ie(e,"Modifiers are not allowed to be nested")}return e}(),zt=function(){function e(e){this.value=e,Ie(e,"Modifiers are not allowed to be nested")}return e}();exports.asMap=ke;var Nt=function(){var e=!1,t={};return Object.defineProperty(t,"0",{set:function(){e=!0}}),Object.create(t)[0]=1,e===!1}(),Ut=0,Ft=function(){function e(){}return e}();Ft.prototype=[];var Bt=function(){function e(e,t,n,r){this.mode=t,this.array=n,this.owned=r,this.lastKnownLength=0,this.interceptors=null,this.changeListeners=null,this.atom=new Rt(e||"ObservableArray@"+nt())}return e.prototype.makeReactiveArrayItem=function(e){return Ie(e,"Array values cannot have modifiers"),this.mode===$t.Flat||this.mode===$t.Reference?e:Oe(e,this.mode,this.atom.name+"[..]")},e.prototype.intercept=function(e){return ye(this,e)},e.prototype.observe=function(e,t){return void 0===t&&(t=!1),t&&e({object:this.array,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),ge(this,e)},e.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},e.prototype.setArrayLength=function(e){if("number"!=typeof e||e<0)throw new Error("[mobx.array] Out of range: "+e);var t=this.values.length;e!==t&&(e>t?this.spliceWithArray(t,0,new Array(e-t)):this.spliceWithArray(e,t-e))},e.prototype.updateArrayLength=function(e,t){if(e!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed. Did you use peek() to change it?");this.lastKnownLength+=t,t>0&&e+t+1>Ut&&Ve(e+t+1)},e.prototype.spliceWithArray=function(e,t,n){B();var r=this.values.length;if(void 0===e?e=0:e>r?e=r:e<0&&(e=Math.max(0,r+e)),t=1===arguments.length?r-e:void 0===t||null===t?0:Math.max(0,Math.min(t,r-e)),void 0===n&&(n=[]),ve(this)){var o=be(this,{object:this.array,type:"splice",index:e,removedCount:t,added:n});if(!o)return nn;t=o.removedCount,n=o.added}n=n.map(this.makeReactiveArrayItem,this);var i=n.length-t;this.updateArrayLength(r,i);var a=(s=this.values).splice.apply(s,[e,t].concat(n));return 0===t&&0===n.length||this.notifyArraySplice(e,n,a),a;var s},e.prototype.notifyArrayChildUpdate=function(e,t,n){var r=!this.owned&&ae(),o=me(this),i=o||r?{object:this.array,type:"update",index:e,newValue:t,oldValue:n}:null;r&&ue(i),this.atom.reportChanged(),o&&xe(this,i),r&&ce()},e.prototype.notifyArraySplice=function(e,t,n){var r=!this.owned&&ae(),o=me(this),i=o||r?{object:this.array,type:"splice",index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;r&&ue(i),this.atom.reportChanged(),o&&xe(this,i),r&&ce()},e}(),Jt=function(e){function t(t,n,r,o){void 0===o&&(o=!1),e.call(this);var i=new Bt(r,n,this,o);ht(this,"$mobx",i),t&&t.length?(i.updateArrayLength(0,t.length),i.values=t.map(i.makeReactiveArrayItem,i),i.notifyArraySplice(0,i.values.slice(),nn)):i.values=[],Nt&&Object.defineProperty(i.array,"0",Gt)}return mt(t,e),t.prototype.intercept=function(e){return this.$mobx.intercept(e)},t.prototype.observe=function(e,t){return void 0===t&&(t=!1),this.$mobx.observe(e,t)},t.prototype.clear=function(){return this.splice(0)},t.prototype.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];return this.$mobx.atom.reportObserved(),Array.prototype.concat.apply(this.slice(),e.map(function(e){return Le(e)?e.slice():e}))},t.prototype.replace=function(e){return this.$mobx.spliceWithArray(0,this.$mobx.values.length,e)},t.prototype.toJS=function(){return this.slice()},t.prototype.toJSON=function(){return this.toJS()},t.prototype.peek=function(){return this.$mobx.values},t.prototype.find=function(e,t,n){void 0===n&&(n=0),this.$mobx.atom.reportObserved();for(var r=this.$mobx.values,o=r.length,i=n;i<o;i++)if(e.call(t,r[i],i,this))return r[i]},t.prototype.splice=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];switch(arguments.length){case 0:return[];case 1:return this.$mobx.spliceWithArray(e);case 2:return this.$mobx.spliceWithArray(e,t)}return this.$mobx.spliceWithArray(e,t,n)},t.prototype.push=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];var n=this.$mobx;return n.spliceWithArray(n.values.length,0,e),n.values.length},t.prototype.pop=function(){return this.splice(Math.max(this.$mobx.values.length-1,0),1)[0]},t.prototype.shift=function(){return this.splice(0,1)[0]},t.prototype.unshift=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];var n=this.$mobx;return n.spliceWithArray(0,0,e),n.values.length},t.prototype.reverse=function(){this.$mobx.atom.reportObserved();var e=this.slice();return e.reverse.apply(e,arguments)},t.prototype.sort=function(e){this.$mobx.atom.reportObserved();var t=this.slice();return t.sort.apply(t,arguments)},t.prototype.remove=function(e){var t=this.$mobx.values.indexOf(e);return t>-1&&(this.splice(t,1),!0)},t.prototype.toString=function(){return"[mobx.array] "+Array.prototype.toString.apply(this.$mobx.values,arguments)},t.prototype.toLocaleString=function(){return"[mobx.array] "+Array.prototype.toLocaleString.apply(this.$mobx.values,arguments)},t}(Ft);tt(Jt.prototype,function(){return et(this.slice())}),pt(Jt.prototype,["constructor","observe","clear","concat","replace","toJSON","peek","find","splice","push","pop","shift","unshift","reverse","sort","remove","toString","toLocaleString"]),Object.defineProperty(Jt.prototype,"length",{enumerable:!1,configurable:!0,get:function(){return this.$mobx.getArrayLength()},set:function(e){this.$mobx.setArrayLength(e)}}),["every","filter","forEach","indexOf","join","lastIndexOf","map","reduce","reduceRight","slice","some"].forEach(function(e){var t=Array.prototype[e];ft(Jt.prototype,e,function(){return this.$mobx.atom.reportObserved(),t.apply(this.$mobx.values,arguments)})});var Gt={configurable:!0,enumerable:!1,set:Ce(0),get:Ee(0)};Ve(1e3),exports.fastArray=Te,exports.isObservableArray=Le;var Wt={},Kt=function(){function e(e,t){var n=this;this.$mobx=Wt,this._data={},this._hasMap={},this.name="ObservableMap@"+nt(),this._keys=new Jt(null,$t.Reference,this.name+".keys()",(!0)),this.interceptors=null,this.changeListeners=null,this._valueMode=Ae(t),this._valueMode===$t.Flat&&(this._valueMode=$t.Reference),M(!0,function(){ut(e)?n.merge(e):Array.isArray(e)&&e.forEach(function(e){var t=e[0],r=e[1];return n.set(t,r)})})}return e.prototype._has=function(e){return"undefined"!=typeof this._data[e]},e.prototype.has=function(e){return!!this.isValidKey(e)&&(e=""+e,this._hasMap[e]?this._hasMap[e].get():this._updateHasMapEntry(e,!1).get())},e.prototype.set=function(e,t){this.assertValidKey(e),e=""+e;var n=this._has(e);if(Ie(t,"[mobx.map.set] Expected unwrapped value to be inserted to key '"+e+"'. If you need to use modifiers pass them as second argument to the constructor"),ve(this)){var r=be(this,{type:n?"update":"add",object:this,newValue:t,name:e});if(!r)return;t=r.newValue}n?this._updateValue(e,t):this._addValue(e,t)},e.prototype.delete=function(e){var t=this;if(this.assertValidKey(e),e=""+e,ve(this)){var n=be(this,{type:"delete",object:this,name:e});if(!n)return}if(this._has(e)){var r=ae(),o=me(this),n=o||r?{type:"delete",object:this,oldValue:this._data[e].value,name:e}:null;r&&ue(n),fe(function(){t._keys.remove(e),t._updateHasMapEntry(e,!1);var n=t._data[e];n.setNewValue(void 0),t._data[e]=void 0},void 0,!1),o&&xe(this,n),r&&ce()}},e.prototype._updateHasMapEntry=function(e,t){var n=this._hasMap[e];return n?n.setNewValue(t):n=this._hasMap[e]=new Yt(t,$t.Reference,this.name+"."+e+"?",(!1)),n},e.prototype._updateValue=function(e,t){var n=this._data[e];if(t=n.prepareNewValue(t),t!==qt){var r=ae(),o=me(this),i=o||r?{type:"update",object:this,oldValue:n.value,name:e,newValue:t}:null;r&&ue(i),n.setNewValue(t),o&&xe(this,i),r&&ce()}},e.prototype._addValue=function(e,t){var n=this;fe(function(){var r=n._data[e]=new Yt(t,n._valueMode,n.name+"."+e,(!1));t=r.value,n._updateHasMapEntry(e,!0),n._keys.push(e)},void 0,!1);var r=ae(),o=me(this),i=o||r?{type:"add",object:this,name:e,newValue:t}:null;r&&ue(i),o&&xe(this,i),r&&ce()},e.prototype.get=function(e){if(e=""+e,this.has(e))return this._data[e].get()},e.prototype.keys=function(){return et(this._keys.slice())},e.prototype.values=function(){return et(this._keys.map(this.get,this))},e.prototype.entries=function(){var e=this;return et(this._keys.map(function(t){return[t,e.get(t)]}))},e.prototype.forEach=function(e,t){var n=this;this.keys().forEach(function(r){return e.call(t,n.get(r),r)})},e.prototype.merge=function(t){var n=this;return fe(function(){t instanceof e?t.keys().forEach(function(e){return n.set(e,t.get(e))}):Object.keys(t).forEach(function(e){return n.set(e,t[e])})},void 0,!1),this},e.prototype.clear=function(){var e=this;fe(function(){Q(function(){e.keys().forEach(e.delete,e)})},void 0,!1)},Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),e.prototype.toJS=function(){var e=this,t={};return this.keys().forEach(function(n){return t[n]=e.get(n)}),t},e.prototype.toJs=function(){return ot("toJs is deprecated, use toJS instead"),this.toJS()},e.prototype.toJSON=function(){return this.toJS()},e.prototype.isValidKey=function(e){return null!==e&&void 0!==e&&("string"==typeof e||"number"==typeof e||"boolean"==typeof e)},e.prototype.assertValidKey=function(e){if(!this.isValidKey(e))throw new Error("[mobx.map] Invalid key: '"+e+"'")},e.prototype.toString=function(){var e=this;return this.name+"[{ "+this.keys().map(function(t){return t+": "+e.get(t)}).join(", ")+" }]"},e.prototype.observe=function(e,t){return rt(t!==!0,"`observe` doesn't support the fire immediately property for observable maps."),ge(this,e)},e.prototype.intercept=function(e){return ye(this,e)},e}();exports.ObservableMap=Kt,tt(Kt.prototype,function(){return this.entries()}),exports.map=$e,exports.isObservableMap=Pe;var Ht=function(){function e(e,t,n){this.target=e,this.name=t,this.mode=n,this.values={},this.changeListeners=null,this.interceptors=null}return e.prototype.observe=function(e,t){return rt(t!==!0,"`observe` doesn't support the fire immediately property for observable objects."),ge(this,e)},e.prototype.intercept=function(e){return ye(this,e)},e}(),Qt={},Xt={};exports.isObservableObject=Ge;var qt={},Yt=function(e){function t(t,n,r,o){void 0===r&&(r="ObservableValue@"+nt()),void 0===o&&(o=!0),e.call(this,r),this.mode=n,this.hasUnreportedChange=!1,this.value=void 0;var i=Se(t,$t.Recursive),a=i[0],s=i[1];this.mode===$t.Recursive&&(this.mode=a),this.value=Oe(s,this.mode,this.name),o&&ae()&&se({type:"create",object:this,newValue:this.value})}return mt(t,e),t.prototype.set=function(e){var t=this.value;if(e=this.prepareNewValue(e),e!==qt){var n=ae();n&&ue({type:"update",object:this,newValue:e,oldValue:t}),this.setNewValue(e),n&&ce()}},t.prototype.prepareNewValue=function(e){if(Ie(e,"Modifiers cannot be used on non-initial values."),B(),ve(this)){var t=be(this,{object:this,type:"update",newValue:e});if(!t)return qt;e=t.newValue}var n=lt(this.mode===$t.Structure,this.value,e);return n?Oe(e,this.mode,this.name):qt},t.prototype.setNewValue=function(e){var t=this.value;this.value=e,this.reportChanged(),me(this)&&xe(this,[e,t])},t.prototype.get=function(){return this.reportObserved(),this.value},t.prototype.intercept=function(e){return ye(this,e)},t.prototype.observe=function(e,t){return t&&e(this.value,void 0),ge(this,e)},t.prototype.toJSON=function(){return this.get()},t.prototype.toString=function(){return this.name+"["+this.value+"]"},t}(Rt),Zt="__$$iterating",en=function(){function e(){this.size=0,this.data={}}return Object.defineProperty(e.prototype,"length",{get:function(){return this.size},enumerable:!0,configurable:!0}),e.prototype.asArray=function(){var e=new Array(this.size),t=0;for(var n in this.data)e[t]=this.data[n],t++;return e},e.prototype.add=function(e){var t=e.__mapid;t in this.data||(this.data[t]=e,this.size++)},e.prototype.remove=function(e){e.__mapid in this.data&&(delete this.data[e.__mapid],this.size--)},e}();exports.SimpleSet=en;var tn=function(){function e(){this.listeners=[],ot("extras.SimpleEventEmitter is deprecated and will be removed in the next major release")}return e.prototype.emit=function(){for(var e=this.listeners.slice(),t=0,n=e.length;t<n;t++)e[t].apply(null,arguments)},e.prototype.on=function(e){var t=this;return this.listeners.push(e),it(function(){var n=t.listeners.indexOf(e);n!==-1&&t.listeners.splice(n,1)})},e.prototype.once=function(e){var t=this.on(function(){t(),e.apply(this,arguments)});return t},e}();exports.SimpleEventEmitter=tn;var nn=[];Object.freeze(nn);var rn=[],on=function(){},an;
"use strict";function e(e,n,r,o){return 1===arguments.length&&"function"==typeof e?N(e.name||"<unnamed action>",e):2===arguments.length&&"function"==typeof n?N(e,n):1===arguments.length&&"string"==typeof e?t(e):t(n).apply(null,arguments)}function t(e){return function(t,n,r){return r&&"function"==typeof r.value?(r.value=N(e,r.value),r.enumerable=!1,r.configurable=!0,r):It(e).apply(this,arguments)}}function n(e,t,n){var r="string"==typeof e?e:e.name||"<unnamed action>",o="function"==typeof e?e:t,i="function"==typeof e?t:n;return ft("function"==typeof o,"`runInAction` expects a function"),ft(0===o.length,"`runInAction` expects a function without arguments"),ft("string"==typeof r&&r.length>0,"actions should have valid names, got: '"+r+"'"),D(r,o,i,void 0)}function r(e){return"function"==typeof e&&e.isMobxAction===!0}function o(e,t,n){function r(){i(a)}var o,i,s;"string"==typeof e?(o=e,i=t,s=n):"function"==typeof e&&(o=e.name||"Autorun@"+pt(),i=e,s=t),Ve(i,"autorun methods cannot have modifiers"),ft("function"==typeof i,"autorun expects a function"),s&&(i=i.bind(s));var a=new zt(o,function(){this.track(r)});return a.schedule(),a.getDisposer()}function i(e,t,n,r){var i,s,a,u;"string"==typeof e?(i=e,s=t,a=n,u=r):"function"==typeof e&&(i="When@"+pt(),s=e,a=t,u=n);var c=o(i,function(e){if(s.call(u)){e.dispose();var t=H();a.call(u),Y(t)}});return c}function s(e,t,n){return ht("`autorunUntil` is deprecated, please use `when`."),i.apply(null,arguments)}function a(e,t,n,r){function o(){s(l)}var i,s,a,u;"string"==typeof e?(i=e,s=t,a=n,u=r):"function"==typeof e&&(i=e.name||"AutorunAsync@"+pt(),s=e,a=t,u=n),void 0===a&&(a=1),u&&(s=s.bind(u));var c=!1,l=new zt(i,function(){c||(c=!0,setTimeout(function(){c=!1,l.isDisposed||l.track(o)},a))});return l.schedule(),l.getDisposer()}function u(t,n,r,o,i,s){function a(){if(!w.isDisposed){var e=!1;w.track(function(){var t=b(w);e=gt(y,x,t),x=t}),m&&p&&l(x,w),m||e!==!0||l(x,w),m&&(m=!1)}}var u,c,l,p,f,h;"string"==typeof t?(u=t,c=n,l=r,p=o,f=i,h=s):(u=t.name||n.name||"Reaction@"+pt(),c=t,l=n,p=r,f=o,h=i),void 0===p&&(p=!1),void 0===f&&(f=0);var d=Le(c,Kt.Reference),v=d[0],b=d[1],y=v===Kt.Structure;h&&(b=b.bind(h),l=e(u,l.bind(h)));var m=!0,g=!1,x=void 0,w=new zt(u,function(){f<1?a():g||(g=!0,setTimeout(function(){g=!1,a()},f))});return w.schedule(),w.getDisposer()}function c(e,t,n,r){return arguments.length<3&&"function"==typeof e?l(e,t):(ft(!n||!n.set,"@observable properties cannot have a setter: "+t),kt.apply(null,arguments))}function l(e,t){var n=Le(e,Kt.Recursive),r=n[0],o=n[1];return new Lt(o,t,r===Kt.Structure,o.name)}function p(){throw new Error("[ComputedValue] It is not allowed to assign new values to computed properties.")}function f(e,t){ft("function"==typeof e&&1===e.length,"createTransformer expects a function that accepts one argument");var n={},r=Ut.resetId,o=function(r){function o(t,n){r.call(this,function(){return e(n)},null,!1,"Transformer-"+e.name+"-"+t),this.sourceIdentifier=t,this.sourceObject=n}return Tt(o,r),o.prototype.onBecomeUnobserved=function(){var e=this.value;r.prototype.onBecomeUnobserved.call(this),delete n[this.sourceIdentifier],t&&t(e,this.sourceObject)},o}(Lt);return function(e){r!==Ut.resetId&&(n={},r=Ut.resetId);var t=h(e),i=n[t];return i?i.get():(i=n[t]=new o(t,e),i.get())}}function h(e){if(null===e||"object"!=typeof e)throw new Error("[mobx] transform expected some kind of object, got: "+e);var t=e.$transformId;return void 0===t&&(t=pt(),wt(e,"$transformId",t)),t}function d(e,t){return B()||console.warn("[mobx.expr] 'expr' should only be used inside other reactive functions."),c(e,t).get()}function v(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return ft(arguments.length>=2,"extendObservable expected 2 or more arguments"),ft("object"==typeof e,"extendObservable expects an object as first argument"),ft(!(e instanceof nn),"extendObservable should not be used on maps, use map.merge instead"),t.forEach(function(t){ft("object"==typeof t,"all arguments of extendObservable should be objects"),b(e,t,Kt.Recursive,null)}),e}function b(e,t,n,r){var o=We(e,r,n);for(var i in t)if(t.hasOwnProperty(i)){if(e===t&&!Ot(e,i))continue;He(o,i,t[i])}return e}function y(e,t){return m(tt(e,t))}function m(e){var t={name:e.name};return e.observing&&e.observing.length>0&&(t.dependencies=vt(e.observing).map(m)),t}function g(e,t){return x(tt(e,t))}function x(e){var t={name:e.name};return ee(e)&&te(e)&&(t.observers=ne(e).map(x)),t}function w(e,t,n){return"function"==typeof n?O(e,t,n):_(e,t)}function _(e,t){return yt(e)&&!et(e)?(ht("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),nt(R(e)).intercept(t)):nt(e).intercept(t)}function O(e,t,n){return yt(e)&&!et(e)?(ht("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),v(e,{property:e[t]}),O(e,t,n)):nt(e,t).intercept(n)}function S(e,t){if(null===e||void 0===e)return!1;if(void 0!==t){if(e instanceof nn||e instanceof Zt)throw new Error("[mobx.isObservable] isObservable(object, propertyName) is not supported for arrays and maps. Use map.has or array.length instead.");if(et(e)){var n=e.$mobx;return n.values&&!!n.values[t]}return!1}return!!e.$mobx||e instanceof Pt||e instanceof zt||e instanceof Lt}function A(e,t,n){return ft(arguments.length>=2&&arguments.length<=3,"Illegal decorator config",t),St(e,t),ft(!n||!n.get,"@observable can not be used on getters, use @computed instead"),Et.apply(null,arguments)}function R(e,t){if(void 0===e&&(e=void 0),"string"==typeof arguments[1])return A.apply(null,arguments);if(ft(arguments.length<3,"observable expects zero, one or two arguments"),S(e))return e;var n=Le(e,Kt.Recursive),r=n[0],o=n[1],i=r===Kt.Reference?jt.Reference:T(o);switch(i){case jt.Array:case jt.PlainObject:return De(o,r);case jt.Reference:case jt.ComplexObject:return new un(o,r);case jt.ComplexFunction:throw new Error("[mobx.observable] To be able to make a function reactive it should not have arguments. If you need an observable reference to a function, use `observable(asReference(f))`");case jt.ViewFunction:return ht("Use `computed(expr)` instead of `observable(expr)`"),c(e,t)}ft(!1,"Illegal State")}function T(e){return null===e||void 0===e?jt.Reference:"function"==typeof e?e.length?jt.ComplexFunction:jt.ViewFunction:Array.isArray(e)||e instanceof Zt?jt.Array:"object"==typeof e?yt(e)?jt.PlainObject:jt.ComplexObject:jt.Reference}function I(e,t,n,r){return"function"==typeof n?E(e,t,n,r):k(e,t,n)}function k(e,t,n){return yt(e)&&!et(e)?(ht("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),nt(R(e)).observe(t,n)):nt(e).observe(t,n)}function E(e,t,n,r){return yt(e)&&!et(e)?(ht("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),v(e,{property:e[t]}),E(e,t,n,r)):nt(e,t).observe(n,r)}function j(e,t,n){function r(r){return t&&n.push([e,r]),r}if(void 0===t&&(t=!0),void 0===n&&(n=null),e instanceof Date||e instanceof RegExp)return e;if(t&&null===n&&(n=[]),t&&null!==e&&"object"==typeof e)for(var o=0,i=n.length;o<i;o++)if(n[o][0]===e)return n[o][1];if(!e)return e;if(Array.isArray(e)||e instanceof Zt){var s=r([]),a=e.map(function(e){return j(e,t,n)});s.length=a.length;for(var o=0,i=a.length;o<i;o++)s[o]=a[o];return s}if(e instanceof nn){var u=r({});return e.forEach(function(e,r){return u[r]=j(e,t,n)}),u}if(S(e)&&e.$mobx instanceof un)return j(e(),t,n);if(e instanceof un)return j(e.get(),t,n);if("object"==typeof e){var s=r({});for(var c in e)s[c]=j(e[c],t,n);return s}return e}function P(e,t,n){return void 0===t&&(t=!0),void 0===n&&(n=null),ht("toJSON is deprecated. Use toJS instead"),j.apply(null,arguments)}function C(e){return console.log(e),e}function L(e,t){switch(arguments.length){case 0:if(e=Ut.trackingDerivation,!e)return C("whyRun() can only be used if a derivation is active, or by passing an computed value / reaction explicitly. If you invoked whyRun from inside a computation; the computation is currently suspended but re-evaluating because somebody requested it's value.");break;case 2:e=tt(e,t)}return e=tt(e),e instanceof Lt?C(e.whyRun()):e instanceof zt?C(e.whyRun()):void ft(!1,"whyRun can only be used on reactions and computed values")}function N(e,t){ft("function"==typeof t,"`action` can only be invoked on functions"),ft("string"==typeof e&&e.length>0,"actions should have valid names, got: '"+e+"'");var n=function(){return D(e,t,this,arguments)};return n.isMobxAction=!0,n}function D(e,t,n,r){ft(!(Ut.trackingDerivation instanceof Lt),"Computed values or transformers should not invoke actions or trigger other side effects");var o,i=ve();if(i){o=Date.now();var s=r&&r.length||0,a=new Array(s);if(s>0)for(var u=0;u<s;u++)a[u]=r[u];ye({type:"action",name:e,fn:t,target:n,arguments:a})}var c=H();_e(e,n,!1);var l=M(!0);try{return t.apply(n,r)}finally{U(l),Oe(!1),Y(c),i&&me({time:Date.now()-o})}}function V(e){return 0===arguments.length?Ut.strictMode:(ft(null===Ut.trackingDerivation,"It is not allowed to set `useStrict` when a derivation is running"),Ut.strictMode=e,Ut.allowStateChanges=!e,void 0)}function $(e,t){var n=M(e),r=t();return U(n),r}function M(e){var t=Ut.allowStateChanges;return Ut.allowStateChanges=e,t}function U(e){Ut.allowStateChanges=e}function z(e){switch(e.dependenciesState){case Vt.UP_TO_DATE:return!1;case Vt.NOT_TRACKING:case Vt.STALE:return!0;case Vt.POSSIBLY_STALE:var t=!0,n=H();try{for(var r=e.observing,o=r.length,i=0;i<o;i++){var s=r[i];if(s instanceof Lt&&(s.get(),e.dependenciesState===Vt.STALE))return t=!1,Y(n),!0}return t=!1,X(e),Y(n),!1}finally{t&&X(e)}}}function B(){return null!==Ut.trackingDerivation}function G(){Ut.allowStateChanges||ft(!1,Ut.strictMode?"It is not allowed to create or change state outside an `action` when MobX is in strict mode. Wrap the current method in `action` if this state change is intended":"It is not allowed to change the state when a computed value or transformer is being evaluated. Use 'autorun' to create reactive functions with side-effects.")}function F(e,t){X(e),e.newObserving=new Array(e.observing.length+100),e.unboundDepsCount=0,e.runId=++Ut.runId;var n=Ut.trackingDerivation;Ut.trackingDerivation=e;var r,o=!0;try{r=t.call(e),o=!1}finally{if(o){var i="[mobx] An uncaught exception occurred while calculating your computed value, autorun or transformer. Or inside the render() method of an observer based React component. These functions should never throw exceptions as MobX will not always be able to recover from them. "+("Please fix the error reported after this message or enable 'Pause on (caught) exceptions' in your debugger to find the root cause. In: '"+e.name+"'. ")+"For more details see https://github.com/mobxjs/mobx/issues/462";ve()&&be({type:"error",object:this,message:i}),console.warn(i),X(e),e.newObserving=null,e.unboundDepsCount=0,e.recoverFromError(),Q()}else Ut.trackingDerivation=n,K(e)}return r}function K(e){var t=e.observing,n=e.observing=e.newObserving;e.newObserving=null;for(var r=0,o=e.unboundDepsCount,i=0;i<o;i++){var s=n[i];0===s.diffValue&&(s.diffValue=1,r!==i&&(n[r]=s),r++)}for(n.length=r,o=t.length;o--;){var s=t[o];0===s.diffValue&&ie(s,e),s.diffValue=0}for(;r--;){var s=n[r];1===s.diffValue&&(s.diffValue=0,oe(s,e))}}function J(e){for(var t=e.observing,n=t.length;n--;)ie(t[n],e);e.dependenciesState=Vt.NOT_TRACKING,t.length=0}function W(e){var t=H(),n=e();return Y(t),n}function H(){var e=Ut.trackingDerivation;return Ut.trackingDerivation=null,e}function Y(e){Ut.trackingDerivation=e}function X(e){if(e.dependenciesState!==Vt.UP_TO_DATE){e.dependenciesState=Vt.UP_TO_DATE;for(var t=e.observing,n=t.length;n--;)t[n].lowestObserverState=Vt.UP_TO_DATE}}function q(){}function Q(){Ut.resetId++;var e=new Mt;for(var t in e)$t.indexOf(t)===-1&&(Ut[t]=e[t]);Ut.allowStateChanges=!Ut.strictMode}function Z(e){return{get length(){return e._observers.length},asArray:function(){return ne(e)}}}function ee(e){return!!e&&void 0!==e.lastAccessedBy}function te(e){return e._observers.length>0}function ne(e){return e._observers}function re(e){for(var t=e._observers,n=e._observersIndexes,r=t.length,o=0;o<r;o++){var i=t[o].__mapid;o?ft(n[i]===o,"INTERNAL ERROR maps derivation.__mapid to index in list"):ft(!(i in n),"INTERNAL ERROR observer on index 0 shouldnt be held in map.")}ft(0===t.length||Object.keys(n).length===t.length-1,"INTERNAL ERROR there is no junk in map")}function oe(e,t){var n=e._observers.length;n&&(e._observersIndexes[t.__mapid]=n),e._observers[n]=t,e.lowestObserverState>t.dependenciesState&&(e.lowestObserverState=t.dependenciesState)}function ie(e,t){if(1===e._observers.length)e._observers.length=0,se(e);else{var n=e._observers,r=e._observersIndexes,o=n.pop();if(o!==t){var i=r[t.__mapid]||0;i?r[o.__mapid]=i:delete r[o.__mapid],n[i]=o}delete r[t.__mapid]}}function se(e){e.isPendingUnobservation||(e.isPendingUnobservation=!0,Ut.pendingUnobservations.push(e))}function ae(){Ut.inBatch++}function ue(){if(1===Ut.inBatch){for(var e=Ut.pendingUnobservations,t=0;t<e.length;t++){var n=e[t];n.isPendingUnobservation=!1,0===n._observers.length&&n.onBecomeUnobserved()}Ut.pendingUnobservations=[]}Ut.inBatch--}function ce(e){var t=Ut.trackingDerivation;null!==t?t.runId!==e.lastAccessedBy&&(e.lastAccessedBy=t.runId,t.newObserving[t.unboundDepsCount++]=e):0===e._observers.length&&se(e)}function le(e,t){var n=ne(e).reduce(function(e,t){return Math.min(e,t.dependenciesState)},2);if(!(n>=e.lowestObserverState))throw new Error("lowestObserverState is wrong for "+t+" because "+n+" < "+e.lowestObserverState)}function pe(e){if(e.lowestObserverState!==Vt.STALE){e.lowestObserverState=Vt.STALE;for(var t=e._observers,n=t.length;n--;){var r=t[n];r.dependenciesState===Vt.UP_TO_DATE&&r.onBecomeStale(),r.dependenciesState=Vt.STALE}}}function fe(e){if(e.lowestObserverState!==Vt.STALE){e.lowestObserverState=Vt.STALE;for(var t=e._observers,n=t.length;n--;){var r=t[n];r.dependenciesState===Vt.POSSIBLY_STALE?r.dependenciesState=Vt.STALE:r.dependenciesState===Vt.UP_TO_DATE&&(e.lowestObserverState=Vt.UP_TO_DATE)}}}function he(e){if(e.lowestObserverState===Vt.UP_TO_DATE){e.lowestObserverState=Vt.POSSIBLY_STALE;for(var t=e._observers,n=t.length;n--;){var r=t[n];r.dependenciesState===Vt.UP_TO_DATE&&(r.dependenciesState=Vt.POSSIBLY_STALE,r.onBecomeStale())}}}function de(){if(!(Ut.isRunningReactions===!0||Ut.inTransaction>0)){Ut.isRunningReactions=!0;for(var e=Ut.pendingReactions,t=0;e.length>0;){if(++t===Bt)throw new Error("Reaction doesn't converge to a stable state after "+Bt+" iterations. Probably there is a cycle in the reactive function: "+e[0]);for(var n=e.splice(0),r=0,o=n.length;r<o;r++)n[r].runReaction()}Ut.isRunningReactions=!1}}function ve(){return Gt}function be(e){if(!Gt)return!1;for(var t=Ut.spyListeners,n=0,r=t.length;n<r;n++)t[n](e)}function ye(e){var t=mt({},e,{spyReportStart:!0});be(t)}function me(e){be(e?mt({},e,Ft):Ft)}function ge(e){return Ut.spyListeners.push(e),Gt=Ut.spyListeners.length>0,dt(function(){var t=Ut.spyListeners.indexOf(e);t!==-1&&Ut.spyListeners.splice(t,1),Gt=Ut.spyListeners.length>0})}function xe(e){return ht("trackTransitions is deprecated. Use mobx.spy instead"),"boolean"==typeof e&&(ht("trackTransitions only takes a single callback function. If you are using the mobx-react-devtools, please update them first"),e=arguments[1]),e?ge(e):(ht("trackTransitions without callback has been deprecated and is a no-op now. If you are using the mobx-react-devtools, please update them first"),function(){})}function we(e,t,n){void 0===t&&(t=void 0),void 0===n&&(n=!0),_e(e.name||"anonymous transaction",t,n);var r=e.call(t);return Oe(n),r}function _e(e,t,n){void 0===t&&(t=void 0),void 0===n&&(n=!0),ae(),Ut.inTransaction+=1,n&&ve()&&ye({type:"transaction",target:t,name:e})}function Oe(e){void 0===e&&(e=!0),0===--Ut.inTransaction&&de(),e&&ve()&&me(),ue()}function Se(e){return e.interceptors&&e.interceptors.length>0}function Ae(e,t){var n=e.interceptors||(e.interceptors=[]);return n.push(t),dt(function(){var e=n.indexOf(t);e!==-1&&n.splice(e,1)})}function Re(e,t){for(var n=H(),r=e.interceptors,o=0,i=r.length;o<i;o++)if(t=r[o](t),ft(!t||t.type,"Intercept handlers should return nothing or a change object"),!t)return null;return Y(n),t}function Te(e){return e.changeListeners&&e.changeListeners.length>0}function Ie(e,t){var n=e.changeListeners||(e.changeListeners=[]);return n.push(t),dt(function(){var e=n.indexOf(t);e!==-1&&n.splice(e,1)})}function ke(e,t){var n=H(),r=e.changeListeners;if(r){r=r.slice();for(var o=0,i=r.length;o<i;o++)Array.isArray(t)?r[o].apply(null,t):r[o](t);Y(n)}}function Ee(e){return new Jt(e)}function je(e){return new Wt(e)}function Pe(e){return new Ht(e)}function Ce(e,t){return Ke(e,t)}function Le(e,t){return e instanceof Jt?[Kt.Reference,e.value]:e instanceof Wt?[Kt.Structure,e.value]:e instanceof Ht?[Kt.Flat,e.value]:[t,e]}function Ne(e){return e===Ee?Kt.Reference:e===je?Kt.Structure:e===Pe?Kt.Flat:(ft(void 0===e,"Cannot determine value mode from function. Please pass in one of these: mobx.asReference, mobx.asStructure or mobx.asFlat, got: "+e),Kt.Recursive)}function De(e,t,n){var r;if(S(e))return e;switch(t){case Kt.Reference:return e;case Kt.Flat:Ve(e,"Items inside 'asFlat' cannot have modifiers"),r=Kt.Reference;break;case Kt.Structure:Ve(e,"Items inside 'asStructure' cannot have modifiers"),r=Kt.Structure;break;case Kt.Recursive:o=Le(e,Kt.Recursive),r=o[0],e=o[1];break;default:ft(!1,"Illegal State")}return Array.isArray(e)?Be(e,r,n):yt(e)&&Object.isExtensible(e)?b(e,e,r,n):e;var o}function Ve(e,t){if(e instanceof Jt||e instanceof Wt||e instanceof Ht)throw new Error("[mobx] asStructure / asReference / asFlat cannot be used here. "+t)}function $e(e){var t=Me(e),n=Ue(e);Object.defineProperty(Zt.prototype,""+e,{enumerable:!1,configurable:!0,set:t,get:n})}function Me(e){return function(t){var n=this.$mobx,r=n.values;if(Ve(t,"Modifiers cannot be used on array values. For non-reactive array values use makeReactive(asFlat(array))."),e<r.length){G();var o=r[e];if(Se(n)){var i=Re(n,{type:"update",object:n.array,index:e,newValue:t});if(!i)return;t=i.newValue}t=n.makeReactiveArrayItem(t);var s=n.mode===Kt.Structure?!Rt(o,t):o!==t;s&&(r[e]=t,n.notifyArrayChildUpdate(e,t,o))}else{if(e!==r.length)throw new Error("[mobx.array] Index out of bounds, "+e+" is larger than "+r.length);n.spliceWithArray(e,0,[t])}}}function Ue(e){return function(){var t=this.$mobx;return t&&e<t.values.length?(t.atom.reportObserved(),t.values[e]):void 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")}}function ze(e){for(var t=Xt;t<e;t++)$e(t);Xt=e}function Be(e,t,n){return new Zt(e,t,n)}function Ge(e){return ht("fastArray is deprecated. Please use `observable(asFlat([]))`"),Be(e,Kt.Flat,null)}function Fe(e){return e instanceof Zt}function Ke(e,t){return new nn(e,t)}function Je(e){return e instanceof nn}function We(e,t,n){if(void 0===n&&(n=Kt.Recursive),et(e))return e.$mobx;yt(e)||(t=e.constructor.name+"@"+pt()),t||(t="ObservableObject@"+pt());var r=new rn(e,t,n);return _t(e,"$mobx",r),r}function He(e,t,n){e.values[t]?e.target[t]=n:Ye(e,t,n,!0)}function Ye(e,t,n,o){o&&St(e.target,t);var i,s=e.name+"."+t,a=!0;if("function"!=typeof n||0!==n.length||r(n))if(n instanceof Wt&&"function"==typeof n.value&&0===n.value.length)i=new Lt(n.value,e.target,(!0),s);else{if(a=!1,Se(e)){var u=Re(e,{object:e.target,name:t,type:"add",newValue:n});if(!u)return;n=u.newValue}i=new un(n,e.mode,s,(!1)),n=i.value}else i=new Lt(n,e.target,(!1),s);e.values[t]=i,o&&Object.defineProperty(e.target,t,a?qe(t):Xe(t)),a||Ze(e,e.target,t,n)}function Xe(e){var t=on[e];return t?t:on[e]={configurable:!0,enumerable:!0,get:function(){return this.$mobx.values[e].get()},set:function(t){Qe(this,e,t)}}}function qe(e){var t=sn[e];return t?t:sn[e]={configurable:!0,enumerable:!1,get:function(){return this.$mobx.values[e].get()},set:p}}function Qe(e,t,n){var r=e.$mobx,o=r.values[t];if(Se(r)){var i=Re(r,{type:"update",object:e,name:t,newValue:n});if(!i)return;n=i.newValue}if(n=o.prepareNewValue(n),n!==an){var s=Te(r),a=ve(),i=ke||Te?{type:"update",object:e,oldValue:o.value,name:t,newValue:n}:null;a&&ye(i),o.setNewValue(n),s&&ke(r,i),a&&me()}}function Ze(e,t,n,r){var o=Te(e),i=ve(),s=o||i?{type:"add",object:t,name:n,newValue:r}:null;i&&ye(s),o&&ke(e,s),i&&me()}function et(e){return"object"==typeof e&&null!==e&&(st(e),e.$mobx instanceof rn)}function tt(e,t){if("object"==typeof e&&null!==e){if(Fe(e))return ft(void 0===t,"It is not possible to get index atoms from arrays"),e.$mobx.atom;if(Je(e)){if(void 0===t)return tt(e._keys);var n=e._data[t]||e._hasMap[t];return ft(!!n,"the entry '"+t+"' does not exist in the observable map '"+rt(e)+"'"),n}if(st(e),et(e)){ft(!!t,"please specify a property");var r=e.$mobx.values[t];return ft(!!r,"no observable property '"+t+"' found on the observable object '"+rt(e)+"'"),r}if(e instanceof Pt||e instanceof Lt||e instanceof zt)return e}else if("function"==typeof e&&e.$mobx instanceof zt)return e.$mobx;ft(!1,"Cannot obtain atom from "+e)}function nt(e,t){return ft(e,"Expection some object"),void 0!==t?nt(tt(e,t)):e instanceof Pt||e instanceof Lt||e instanceof zt?e:Je(e)?e:(st(e),e.$mobx?e.$mobx:void ft(!1,"Cannot obtain administration from "+e))}function rt(e,t){var n;return n=void 0!==t?tt(e,t):et(e)||Je(e)?nt(e):tt(e),n.name}function ot(e,t,n,r,o){function i(i,s,a,u){if(ft(o||at(arguments),"This function is a decorator, but it wasn't invoked like a decorator"),a){i.hasOwnProperty("__mobxLazyInitializers")||wt(i,"__mobxLazyInitializers",i.__mobxLazyInitializers&&i.__mobxLazyInitializers.slice()||[]);var c=a.value,l=a.initializer;return i.__mobxLazyInitializers.push(function(t){e(t,s,l?l.call(t):c,u,a)}),{enumerable:r,configurable:!0,get:function(){return this.__mobxDidRunLazyInitializers!==!0&&st(this),t.call(this,s)},set:function(e){this.__mobxDidRunLazyInitializers!==!0&&st(this),n.call(this,s,e)}}}var p={enumerable:r,configurable:!0,get:function(){return this.__mobxInitializedProps&&this.__mobxInitializedProps[s]===!0||it(this,s,void 0,e,u,a),t.call(this,s)},set:function(t){this.__mobxInitializedProps&&this.__mobxInitializedProps[s]===!0?n.call(this,s,t):it(this,s,t,e,u,a)}};return arguments.length<3&&Object.defineProperty(i,s,p),p}return o?function(){if(at(arguments))return i.apply(null,arguments);var e=arguments;return function(t,n,r){return i(t,n,r,e)}}:i}function it(e,t,n,r,o,i){e.hasOwnProperty("__mobxInitializedProps")||wt(e,"__mobxInitializedProps",{}),e.__mobxInitializedProps[t]=!0,r(e,t,n,o,i)}function st(e){e.__mobxDidRunLazyInitializers!==!0&&e.__mobxLazyInitializers&&(wt(e,"__mobxDidRunLazyInitializers",!0),e.__mobxDidRunLazyInitializers&&e.__mobxLazyInitializers.forEach(function(t){return t(e)}))}function at(e){return(2===e.length||3===e.length)&&"string"==typeof e[1]}function ut(){return"function"==typeof Symbol&&Symbol.iterator||"@@iterator"}function ct(e){ft(e[cn]!==!0,"Illegal state: cannot recycle array as iterator"),_t(e,cn,!0);var t=-1;return _t(e,"next",function(){return t++,{done:t>=this.length,value:t<this.length?this[t]:void 0}}),e}function lt(e,t){_t(e,ut(),t)}function pt(){return++Ut.mobxGuid}function ft(e,t,n){if(!e)throw new Error("[mobx] Invariant failed: "+t+(n?" in '"+n+"'":""))}function ht(e){hn.indexOf(e)===-1&&(hn.push(e),console.error("[mobx] Deprecated: "+e))}function dt(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}function vt(e){var t=[];return e.forEach(function(e){t.indexOf(e)===-1&&t.push(e)}),t}function bt(e,t,n){if(void 0===t&&(t=100),void 0===n&&(n=" - "),!e)return"";var r=e.slice(0,t);return""+r.join(n)+(e.length>t?" (... and "+(e.length-t)+"more)":"")}function yt(e){if(null===e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}function mt(){for(var e=arguments[0],t=1,n=arguments.length;t<n;t++){var r=arguments[t];for(var o in r)r.hasOwnProperty(o)&&(e[o]=r[o])}return e}function gt(e,t,n){return e?!Rt(t,n):t!==n}function xt(e,t){for(var n=0;n<t.length;n++)wt(e,t[n],e[t[n]])}function wt(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function _t(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!1,configurable:!0,value:n})}function Ot(e,t){var n=Object.getOwnPropertyDescriptor(e,t);return!n||n.configurable!==!1&&n.writable!==!1}function St(e,t){ft(Ot(e,t),"Cannot make property '"+t+"' observable, it is not configurable and writable in the target object")}function At(e){var t=[];for(var n in e)t.push(n);return t}function Rt(e,t){if(null===e&&null===t)return!0;if(void 0===e&&void 0===t)return!0;var n=Array.isArray(e)||Fe(e);if(n!==(Array.isArray(t)||Fe(t)))return!1;if(n){if(e.length!==t.length)return!1;for(var r=e.length-1;r>=0;r--)if(!Rt(e[r],t[r]))return!1;return!0}if("object"==typeof e&&"object"==typeof t){if(null===e||null===t)return!1;if(At(e).length!==At(t).length)return!1;for(var o in e){if(!(o in t))return!1;if(!Rt(e[o],t[o]))return!1}return!0}return e===t}var Tt=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)};q(),exports.extras={allowStateChanges:$,getAtom:tt,getDebugName:rt,getDependencyTree:y,getObserverTree:g,isComputingDerivation:B,isSpyEnabled:ve,resetGlobalState:Q,spyReport:be,spyReportEnd:me,spyReportStart:ye,trackTransitions:xe},exports._={getAdministration:nt,resetGlobalState:Q};var It=ot(function(t,n,r,o,i){var s=o&&1===o.length?o[0]:r.name||n||"<unnamed action>",a=e(s,r);wt(t,n,a)},function(e){return this[e]},function(){ft(!1,"It is not allowed to assign new values to @action fields")},!1,!0);exports.action=e,exports.runInAction=n,exports.isAction=r,exports.autorun=o,exports.when=i,exports.autorunUntil=s,exports.autorunAsync=a,exports.reaction=u;var kt=ot(function(e,t,n,r,o){ft("undefined"!=typeof o,"@computed can only be used on getter functions, like: '@computed get myProps() { return ...; }'. It looks like it was used on a property.");var i=o.get;ft("function"==typeof i,"@computed can only be used on getter functions, like: '@computed get myProps() { return ...; }'");var s=!1;r&&1===r.length&&r[0].asStructure===!0&&(s=!0);var a=We(e,void 0,Kt.Recursive);Ye(a,t,s?je(i):i,!1)},function(e){return this.$mobx.values[e].get()},p,!1,!0);exports.computed=c,exports.createTransformer=f,exports.expr=d,exports.extendObservable=v,exports.intercept=w,exports.isObservable=S;var Et=ot(function(e,t,n){var r=M(!0);"function"==typeof n&&(n=Ee(n));var o=We(e,void 0,Kt.Recursive);Ye(o,t,n,!0),U(r)},function(e){return this.$mobx.values[e].get()},function(e,t){Qe(this,e,t)},!0,!1);exports.observable=R;var jt;!function(e){e[e.Reference=0]="Reference",e[e.PlainObject=1]="PlainObject",e[e.ComplexObject=2]="ComplexObject",e[e.Array=3]="Array",e[e.ViewFunction=4]="ViewFunction",e[e.ComplexFunction=5]="ComplexFunction"}(jt||(jt={})),exports.observe=I,exports.toJS=j,exports.toJSON=P,exports.whyRun=L,exports.useStrict=V;var Pt=function(){function e(e){void 0===e&&(e="Atom@"+pt()),this.name=e,this.isPendingUnobservation=!0,this.isObserved=!1,this._observers=[],this._observersIndexes={},this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=Vt.NOT_TRACKING}return e.prototype.onBecomeUnobserved=function(){},Object.defineProperty(e.prototype,"observers",{get:function(){return Z(this)},enumerable:!0,configurable:!0}),e.prototype.reportObserved=function(){ce(this)},e.prototype.reportChanged=function(){_e("propagatingAtomChange",null,!1),pe(this),Oe(!1)},e.prototype.toString=function(){return this.name},e}();exports.BaseAtom=Pt;var Ct=function(e){function t(t,n,r){void 0===t&&(t="Atom@"+pt()),void 0===n&&(n=dn),void 0===r&&(r=dn),e.call(this,t),this.name=t,this.onBecomeObservedHandler=n,this.onBecomeUnobservedHandler=r,this.isPendingUnobservation=!1,this.isBeingTracked=!1}return Tt(t,e),t.prototype.reportObserved=function(){return ae(),e.prototype.reportObserved.call(this),this.isBeingTracked||(this.isBeingTracked=!0,this.onBecomeObservedHandler()),ue(),!!Ut.trackingDerivation},t.prototype.onBecomeUnobserved=function(){this.isBeingTracked=!1,this.onBecomeUnobservedHandler()},t}(Pt);exports.Atom=Ct;var Lt=function(){function e(e,t,n,r){this.derivation=e,this.scope=t,this.compareStructural=n,this.dependenciesState=Vt.NOT_TRACKING,this.observing=[],this.newObserving=null,this.isObserved=!1,this._observers=[],this._observersIndexes={},this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.lowestObserverState=Vt.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+pt(),this.value=void 0,this.isComputing=!1,this.name=r||"ComputedValue@"+pt()}return Object.defineProperty(e.prototype,"observers",{get:function(){return Z(this)},enumerable:!0,configurable:!0}),e.prototype.peek=function(){this.isComputing=!0;var e=M(!1),t=this.derivation.call(this.scope);return U(e),this.isComputing=!1,t},e.prototype.onBecomeStale=function(){he(this)},e.prototype.onBecomeUnobserved=function(){ft(this.dependenciesState!==Vt.NOT_TRACKING,"INTERNAL ERROR only onBecomeUnobserved shouldn't be called twice in a row"),J(this),this.value=void 0},e.prototype.get=function(){ft(!this.isComputing,"Cycle detected in computation "+this.name,this.derivation),ae(),1===Ut.inBatch?z(this)&&(this.value=this.peek()):(ce(this),z(this)&&this.trackAndCompute()&&fe(this));var e=this.value;return ue(),e},e.prototype.recoverFromError=function(){this.isComputing=!1,ue()},e.prototype.set=function(e){throw new Error("[ComputedValue '"+name+"'] It is not possible to assign a new value to a computed value.")},e.prototype.trackAndCompute=function(){ve()&&be({object:this,type:"compute",fn:this.derivation,target:this.scope});var e=this.value,t=this.value=F(this,this.peek);return gt(this.compareStructural,t,e)},e.prototype.observe=function(e,t){var n=this,r=!0,i=void 0;return o(function(){var o=n.get();if(!r||t){var s=H();e(o,i),Y(s)}r=!1,i=o})},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},e.prototype.whyRun=function(){var e=Boolean(Ut.trackingDerivation),t=vt(this.observing).map(function(e){return e.name}),n=vt(ne(this).map(function(e){return e.name})),r=this.isComputing?Nt.GET:Nt.NOT_RUNNING;if(r===Nt.GET){var o=Ut.trackingDerivation;o&&n.push(o.name)}return"\nWhyRun? computation '"+this.name+"':\n * Running because: "+Dt[r]+" "+(r===Nt.NOT_RUNNING&&this.dependenciesState>Vt.UP_TO_DATE?"(a next run is scheduled)":"")+"\n"+(this.dependenciesState===Vt.NOT_TRACKING?" * This computation is suspended (not in use by any reaction) and won't run automatically.\n\tDidn't expect this computation to be suspended at this point?\n\t 1. Make sure this computation is used by a reaction (reaction, autorun, observer).\n\t 2. Check whether you are using this computation synchronously (in the same stack as they reaction that needs it).\n":" * This computation will re-run if any of the following observables changes:\n "+bt(t)+"\n "+(this.isComputing&&e?" (... or any observable accessed during the remainder of the current run)":"")+"\n\tMissing items in this list?\n\t 1. Check whether all used values are properly marked as observable (use isObservable to verify)\n\t 2. Make sure you didn't dereference values too early. MobX observes props, not primitives. E.g: use 'person.name' instead of 'name' in your computation.\n * If the outcome of this computation changes, the following observers will be re-run:\n "+bt(n)+"\n")},e}(),Nt;!function(e){e[e.GET=0]="GET",e[e.NOT_RUNNING=1]="NOT_RUNNING"}(Nt||(Nt={}));var Dt=(vn={},vn[Nt.GET]="[get] The value of this computed value was requested",vn[Nt.NOT_RUNNING]="[idle] This compution is currently not running",vn),Vt;!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"}(Vt||(Vt={})),
exports.IDerivationState=Vt,exports.untracked=W;var $t=["mobxGuid","resetId","spyListeners","strictMode","runId"],Mt=function(){function e(){this.version=4,this.trackingDerivation=null,this.runId=0,this.mobxGuid=0,this.inTransaction=0,this.isRunningReactions=!1,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.allowStateChanges=!0,this.strictMode=!1,this.resetId=0,this.spyListeners=[]}return e}(),Ut=function(){var e=new Mt;if(global.__mobservableTrackingStack||global.__mobservableViewStack)throw new Error("[mobx] An incompatible version of mobservable is already loaded.");if(global.__mobxGlobal&&global.__mobxGlobal.version!==e.version)throw new Error("[mobx] An incompatible version of mobx is already loaded.");return global.__mobxGlobal?global.__mobxGlobal:global.__mobxGlobal=e}(),zt=function(){function e(e,t){void 0===e&&(e="Reaction@"+pt()),this.name=e,this.onInvalidate=t,this.observing=[],this.newObserving=[],this.dependenciesState=Vt.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+pt(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1}return e.prototype.onBecomeStale=function(){this.schedule()},e.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,Ut.pendingReactions.push(this),ae(),de(),ue())},e.prototype.isScheduled=function(){return this._isScheduled},e.prototype.runReaction=function(){this.isDisposed||(this._isScheduled=!1,z(this)&&(this._isTrackPending=!0,this.onInvalidate(),this._isTrackPending&&ve()&&be({object:this,type:"scheduled-reaction"})))},e.prototype.track=function(e){ae();var t,n=ve();n&&(t=Date.now(),ye({object:this,type:"reaction",fn:e})),this._isRunning=!0,F(this,e),this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&J(this),n&&me({time:Date.now()-t}),ue()},e.prototype.recoverFromError=function(){this._isRunning=!1,this._isTrackPending=!1},e.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(ae(),J(this),ue()))},e.prototype.getDisposer=function(){var e=this.dispose.bind(this);return e.$mobx=this,e},e.prototype.toString=function(){return"Reaction["+this.name+"]"},e.prototype.whyRun=function(){var e=vt(this.observing).map(function(e){return e.name});return"\nWhyRun? reaction '"+this.name+"':\n * Status: ["+(this.isDisposed?"stopped":this._isRunning?"running":this.isScheduled()?"scheduled":"idle")+"]\n * This reaction will re-run if any of the following observables changes:\n "+bt(e)+"\n "+(this._isRunning?" (... or any observable accessed during the remainder of the current run)":"")+"\n\tMissing items in this list?\n\t 1. Check whether all used values are properly marked as observable (use isObservable to verify)\n\t 2. Make sure you didn't dereference values too early. MobX observes props, not primitives. E.g: use 'person.name' instead of 'name' in your computation.\n"},e}();exports.Reaction=zt;var Bt=100,Gt=!1,Ft={spyReportEnd:!0};exports.spy=ge,exports.transaction=we;var Kt;!function(e){e[e.Recursive=0]="Recursive",e[e.Reference=1]="Reference",e[e.Structure=2]="Structure",e[e.Flat=3]="Flat"}(Kt||(Kt={})),exports.asReference=Ee,exports.asStructure=je,exports.asFlat=Pe;var Jt=function(){function e(e){this.value=e,Ve(e,"Modifiers are not allowed to be nested")}return e}(),Wt=function(){function e(e){this.value=e,Ve(e,"Modifiers are not allowed to be nested")}return e}(),Ht=function(){function e(e){this.value=e,Ve(e,"Modifiers are not allowed to be nested")}return e}();exports.asMap=Ce;var Yt=function(){var e=!1,t={};return Object.defineProperty(t,"0",{set:function(){e=!0}}),Object.create(t)[0]=1,e===!1}(),Xt=0,qt=function(){function e(){}return e}();qt.prototype=[];var Qt=function(){function e(e,t,n,r){this.mode=t,this.array=n,this.owned=r,this.lastKnownLength=0,this.interceptors=null,this.changeListeners=null,this.atom=new Pt(e||"ObservableArray@"+pt())}return e.prototype.makeReactiveArrayItem=function(e){return Ve(e,"Array values cannot have modifiers"),this.mode===Kt.Flat||this.mode===Kt.Reference?e:De(e,this.mode,this.atom.name+"[..]")},e.prototype.intercept=function(e){return Ae(this,e)},e.prototype.observe=function(e,t){return void 0===t&&(t=!1),t&&e({object:this.array,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),Ie(this,e)},e.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},e.prototype.setArrayLength=function(e){if("number"!=typeof e||e<0)throw new Error("[mobx.array] Out of range: "+e);var t=this.values.length;e!==t&&(e>t?this.spliceWithArray(t,0,new Array(e-t)):this.spliceWithArray(e,t-e))},e.prototype.updateArrayLength=function(e,t){if(e!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed. Did you use peek() to change it?");this.lastKnownLength+=t,t>0&&e+t+1>Xt&&ze(e+t+1)},e.prototype.spliceWithArray=function(e,t,n){G();var r=this.values.length;if(void 0===e?e=0:e>r?e=r:e<0&&(e=Math.max(0,r+e)),t=1===arguments.length?r-e:void 0===t||null===t?0:Math.max(0,Math.min(t,r-e)),void 0===n&&(n=[]),Se(this)){var o=Re(this,{object:this.array,type:"splice",index:e,removedCount:t,added:n});if(!o)return fn;t=o.removedCount,n=o.added}n=n.map(this.makeReactiveArrayItem,this);var i=n.length-t;this.updateArrayLength(r,i);var s=(a=this.values).splice.apply(a,[e,t].concat(n));return 0===t&&0===n.length||this.notifyArraySplice(e,n,s),s;var a},e.prototype.notifyArrayChildUpdate=function(e,t,n){var r=!this.owned&&ve(),o=Te(this),i=o||r?{object:this.array,type:"update",index:e,newValue:t,oldValue:n}:null;r&&ye(i),this.atom.reportChanged(),o&&ke(this,i),r&&me()},e.prototype.notifyArraySplice=function(e,t,n){var r=!this.owned&&ve(),o=Te(this),i=o||r?{object:this.array,type:"splice",index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;r&&ye(i),this.atom.reportChanged(),o&&ke(this,i),r&&me()},e}(),Zt=function(e){function t(t,n,r,o){void 0===o&&(o=!1),e.call(this);var i=new Qt(r,n,this,o);_t(this,"$mobx",i),t&&t.length?(i.updateArrayLength(0,t.length),i.values=t.map(i.makeReactiveArrayItem,i),i.notifyArraySplice(0,i.values.slice(),fn)):i.values=[],Yt&&Object.defineProperty(i.array,"0",en)}return Tt(t,e),t.prototype.intercept=function(e){return this.$mobx.intercept(e)},t.prototype.observe=function(e,t){return void 0===t&&(t=!1),this.$mobx.observe(e,t)},t.prototype.clear=function(){return this.splice(0)},t.prototype.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];return this.$mobx.atom.reportObserved(),Array.prototype.concat.apply(this.slice(),e.map(function(e){return Fe(e)?e.slice():e}))},t.prototype.replace=function(e){return this.$mobx.spliceWithArray(0,this.$mobx.values.length,e)},t.prototype.toJS=function(){return this.slice()},t.prototype.toJSON=function(){return this.toJS()},t.prototype.peek=function(){return this.$mobx.values},t.prototype.find=function(e,t,n){void 0===n&&(n=0),this.$mobx.atom.reportObserved();for(var r=this.$mobx.values,o=r.length,i=n;i<o;i++)if(e.call(t,r[i],i,this))return r[i]},t.prototype.splice=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];switch(arguments.length){case 0:return[];case 1:return this.$mobx.spliceWithArray(e);case 2:return this.$mobx.spliceWithArray(e,t)}return this.$mobx.spliceWithArray(e,t,n)},t.prototype.push=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];var n=this.$mobx;return n.spliceWithArray(n.values.length,0,e),n.values.length},t.prototype.pop=function(){return this.splice(Math.max(this.$mobx.values.length-1,0),1)[0]},t.prototype.shift=function(){return this.splice(0,1)[0]},t.prototype.unshift=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];var n=this.$mobx;return n.spliceWithArray(0,0,e),n.values.length},t.prototype.reverse=function(){this.$mobx.atom.reportObserved();var e=this.slice();return e.reverse.apply(e,arguments)},t.prototype.sort=function(e){this.$mobx.atom.reportObserved();var t=this.slice();return t.sort.apply(t,arguments)},t.prototype.remove=function(e){var t=this.$mobx.values.indexOf(e);return t>-1&&(this.splice(t,1),!0)},t.prototype.toString=function(){return"[mobx.array] "+Array.prototype.toString.apply(this.$mobx.values,arguments)},t.prototype.toLocaleString=function(){return"[mobx.array] "+Array.prototype.toLocaleString.apply(this.$mobx.values,arguments)},t}(qt);lt(Zt.prototype,function(){return ct(this.slice())}),xt(Zt.prototype,["constructor","observe","clear","concat","replace","toJSON","peek","find","splice","push","pop","shift","unshift","reverse","sort","remove","toString","toLocaleString"]),Object.defineProperty(Zt.prototype,"length",{enumerable:!1,configurable:!0,get:function(){return this.$mobx.getArrayLength()},set:function(e){this.$mobx.setArrayLength(e)}}),["every","filter","forEach","indexOf","join","lastIndexOf","map","reduce","reduceRight","slice","some"].forEach(function(e){var t=Array.prototype[e];wt(Zt.prototype,e,function(){return this.$mobx.atom.reportObserved(),t.apply(this.$mobx.values,arguments)})});var en={configurable:!0,enumerable:!1,set:Me(0),get:Ue(0)};ze(1e3),exports.fastArray=Ge,exports.isObservableArray=Fe;var tn={},nn=function(){function e(e,t){var n=this;this.$mobx=tn,this._data={},this._hasMap={},this.name="ObservableMap@"+pt(),this._keys=new Zt(null,Kt.Reference,this.name+".keys()",(!0)),this.interceptors=null,this.changeListeners=null,this._valueMode=Ne(t),this._valueMode===Kt.Flat&&(this._valueMode=Kt.Reference),$(!0,function(){yt(e)?n.merge(e):Array.isArray(e)&&e.forEach(function(e){var t=e[0],r=e[1];return n.set(t,r)})})}return e.prototype._has=function(e){return"undefined"!=typeof this._data[e]},e.prototype.has=function(e){return!!this.isValidKey(e)&&(e=""+e,this._hasMap[e]?this._hasMap[e].get():this._updateHasMapEntry(e,!1).get())},e.prototype.set=function(e,t){this.assertValidKey(e),e=""+e;var n=this._has(e);if(Ve(t,"[mobx.map.set] Expected unwrapped value to be inserted to key '"+e+"'. If you need to use modifiers pass them as second argument to the constructor"),Se(this)){var r=Re(this,{type:n?"update":"add",object:this,newValue:t,name:e});if(!r)return;t=r.newValue}n?this._updateValue(e,t):this._addValue(e,t)},e.prototype.delete=function(e){var t=this;if(this.assertValidKey(e),e=""+e,Se(this)){var n=Re(this,{type:"delete",object:this,name:e});if(!n)return}if(this._has(e)){var r=ve(),o=Te(this),n=o||r?{type:"delete",object:this,oldValue:this._data[e].value,name:e}:null;r&&ye(n),we(function(){t._keys.remove(e),t._updateHasMapEntry(e,!1);var n=t._data[e];n.setNewValue(void 0),t._data[e]=void 0},void 0,!1),o&&ke(this,n),r&&me()}},e.prototype._updateHasMapEntry=function(e,t){var n=this._hasMap[e];return n?n.setNewValue(t):n=this._hasMap[e]=new un(t,Kt.Reference,this.name+"."+e+"?",(!1)),n},e.prototype._updateValue=function(e,t){var n=this._data[e];if(t=n.prepareNewValue(t),t!==an){var r=ve(),o=Te(this),i=o||r?{type:"update",object:this,oldValue:n.value,name:e,newValue:t}:null;r&&ye(i),n.setNewValue(t),o&&ke(this,i),r&&me()}},e.prototype._addValue=function(e,t){var n=this;we(function(){var r=n._data[e]=new un(t,n._valueMode,n.name+"."+e,(!1));t=r.value,n._updateHasMapEntry(e,!0),n._keys.push(e)},void 0,!1);var r=ve(),o=Te(this),i=o||r?{type:"add",object:this,name:e,newValue:t}:null;r&&ye(i),o&&ke(this,i),r&&me()},e.prototype.get=function(e){if(e=""+e,this.has(e))return this._data[e].get()},e.prototype.keys=function(){return ct(this._keys.slice())},e.prototype.values=function(){return ct(this._keys.map(this.get,this))},e.prototype.entries=function(){var e=this;return ct(this._keys.map(function(t){return[t,e.get(t)]}))},e.prototype.forEach=function(e,t){var n=this;this.keys().forEach(function(r){return e.call(t,n.get(r),r)})},e.prototype.merge=function(t){var n=this;return we(function(){t instanceof e?t.keys().forEach(function(e){return n.set(e,t.get(e))}):Object.keys(t).forEach(function(e){return n.set(e,t[e])})},void 0,!1),this},e.prototype.clear=function(){var e=this;we(function(){W(function(){e.keys().forEach(e.delete,e)})},void 0,!1)},Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),e.prototype.toJS=function(){var e=this,t={};return this.keys().forEach(function(n){return t[n]=e.get(n)}),t},e.prototype.toJs=function(){return ht("toJs is deprecated, use toJS instead"),this.toJS()},e.prototype.toJSON=function(){return this.toJS()},e.prototype.isValidKey=function(e){return null!==e&&void 0!==e&&("string"==typeof e||"number"==typeof e||"boolean"==typeof e)},e.prototype.assertValidKey=function(e){if(!this.isValidKey(e))throw new Error("[mobx.map] Invalid key: '"+e+"'")},e.prototype.toString=function(){var e=this;return this.name+"[{ "+this.keys().map(function(t){return t+": "+e.get(t)}).join(", ")+" }]"},e.prototype.observe=function(e,t){return ft(t!==!0,"`observe` doesn't support the fire immediately property for observable maps."),Ie(this,e)},e.prototype.intercept=function(e){return Ae(this,e)},e}();exports.ObservableMap=nn,lt(nn.prototype,function(){return this.entries()}),exports.map=Ke,exports.isObservableMap=Je;var rn=function(){function e(e,t,n){this.target=e,this.name=t,this.mode=n,this.values={},this.changeListeners=null,this.interceptors=null}return e.prototype.observe=function(e,t){return ft(t!==!0,"`observe` doesn't support the fire immediately property for observable objects."),Ie(this,e)},e.prototype.intercept=function(e){return Ae(this,e)},e}(),on={},sn={};exports.isObservableObject=et;var an={},un=function(e){function t(t,n,r,o){void 0===r&&(r="ObservableValue@"+pt()),void 0===o&&(o=!0),e.call(this,r),this.mode=n,this.hasUnreportedChange=!1,this.value=void 0;var i=Le(t,Kt.Recursive),s=i[0],a=i[1];this.mode===Kt.Recursive&&(this.mode=s),this.value=De(a,this.mode,this.name),o&&ve()&&be({type:"create",object:this,newValue:this.value})}return Tt(t,e),t.prototype.set=function(e){var t=this.value;if(e=this.prepareNewValue(e),e!==an){var n=ve();n&&ye({type:"update",object:this,newValue:e,oldValue:t}),this.setNewValue(e),n&&me()}},t.prototype.prepareNewValue=function(e){if(Ve(e,"Modifiers cannot be used on non-initial values."),G(),Se(this)){var t=Re(this,{object:this,type:"update",newValue:e});if(!t)return an;e=t.newValue}var n=gt(this.mode===Kt.Structure,this.value,e);return n?De(e,this.mode,this.name):an},t.prototype.setNewValue=function(e){var t=this.value;this.value=e,this.reportChanged(),Te(this)&&ke(this,[e,t])},t.prototype.get=function(){return this.reportObserved(),this.value},t.prototype.intercept=function(e){return Ae(this,e)},t.prototype.observe=function(e,t){return t&&e(this.value,void 0),Ie(this,e)},t.prototype.toJSON=function(){return this.get()},t.prototype.toString=function(){return this.name+"["+this.value+"]"},t}(Pt),cn="__$$iterating",ln=function(){function e(){this.size=0,this.data={}}return Object.defineProperty(e.prototype,"length",{get:function(){return this.size},enumerable:!0,configurable:!0}),e.prototype.asArray=function(){var e=new Array(this.size),t=0;for(var n in this.data)e[t]=this.data[n],t++;return e},e.prototype.add=function(e){var t=e.__mapid;t in this.data||(this.data[t]=e,this.size++)},e.prototype.remove=function(e){e.__mapid in this.data&&(delete this.data[e.__mapid],this.size--)},e}();exports.SimpleSet=ln;var pn=function(){function e(){this.listeners=[],ht("extras.SimpleEventEmitter is deprecated and will be removed in the next major release")}return e.prototype.emit=function(){for(var e=this.listeners.slice(),t=0,n=e.length;t<n;t++)e[t].apply(null,arguments)},e.prototype.on=function(e){var t=this;return this.listeners.push(e),dt(function(){var n=t.listeners.indexOf(e);n!==-1&&t.listeners.splice(n,1)})},e.prototype.once=function(e){var t=this.on(function(){t(),e.apply(this,arguments)});return t},e}();exports.SimpleEventEmitter=pn;var fn=[];Object.freeze(fn);var hn=[],dn=function(){},vn;
//# sourceMappingURL=lib/mobx.min.js.map
/** MobX - (c) Michel Weststrate 2015, 2016 - MIT Licensed */
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.mobx=e()}}(function(){return function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(o)return o(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[a]={exports:{}};t[a][0].call(l.exports,function(e){var n=t[a][1][e];return i(n?n:e)},l,l.exports,e,t,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(e,t,n){(function(e){"use strict";function t(e,t,n,i){return 1===arguments.length&&"function"==typeof e?P(e.name||"<unnamed action>",e):2===arguments.length&&"function"==typeof t?P(e,t):1===arguments.length&&"string"==typeof e?r(e):r(t).apply(null,arguments)}function r(e){return function(t,n,r){return r&&"function"==typeof r.value?(r.value=P(e,r.value),r.enumerable=!1,r.configurable=!0,r):xt(e).apply(this,arguments)}}function i(e,t,n){var r="string"==typeof e?e:e.name||"<unnamed action>",i="function"==typeof e?e:t,o="function"==typeof e?t:n;return ot("function"==typeof i,"`runInAction` expects a function"),ot(0===i.length,"`runInAction` expects a function without arguments"),ot("string"==typeof r&&r.length>0,"actions should have valid names, got: '"+r+"'"),M(r,i,o,void 0)}function o(e){return"function"==typeof e&&e.isMobxAction===!0}function a(e,t,n){function r(){o(s)}var i,o,a;"string"==typeof e?(i=e,o=t,a=n):"function"==typeof e&&(i=e.name||"Autorun@"+it(),o=e,a=t),Ce(o,"autorun methods cannot have modifiers"),ot("function"==typeof o,"autorun expects a function"),a&&(o=o.bind(a));var s=new Tt(i,function(){this.track(r)});return s.schedule(),s.getDisposer()}function s(e,t,n,r){var i,o,s,u;"string"==typeof e?(i=e,o=t,s=n,u=r):"function"==typeof e&&(i="When@"+it(),o=e,s=t,u=n);var c=a(i,function(e){if(o.call(u)){e.dispose();var t=Y();s.call(u),Z(t)}});return c}function u(e,t,n){return at("`autorunUntil` is deprecated, please use `when`."),s.apply(null,arguments)}function c(e,t,n,r){function i(){a(l)}var o,a,s,u;"string"==typeof e?(o=e,a=t,s=n,u=r):"function"==typeof e&&(o=e.name||"AutorunAsync@"+it(),a=e,s=t,u=n),void 0===s&&(s=1),u&&(a=a.bind(u));var c=!1,l=new Tt(o,function(){c||(c=!0,setTimeout(function(){c=!1,l.isDisposed||l.track(i)},s))});return l.schedule(),l.getDisposer()}function l(e,n,r,i,o,a){function s(){if(!x.isDisposed){var e=!1;x.track(function(){var t=y(x);e=pt(b,w,t),w=t}),m&&f&&l(w,x),m||e!==!0||l(w,x),m&&(m=!1)}}var u,c,l,f,p,h;"string"==typeof e?(u=e,c=n,l=r,f=i,p=o,h=a):(u=e.name||n.name||"Reaction@"+it(),c=e,l=n,f=r,p=i,h=o),void 0===f&&(f=!1),void 0===p&&(p=0);var d=Ae(c,Mt.Reference),v=d[0],y=d[1],b=v===Mt.Structure;h&&(y=y.bind(h),l=t(u,l.bind(h)));var m=!0,g=!1,w=void 0,x=new Tt(u,function(){p<1?s():g||(g=!0,setTimeout(function(){g=!1,s()},p))});return x.schedule(),x.getDisposer()}function f(e,t,n,r){return arguments.length<3&&"function"==typeof e?p(e,t):(ot(!n||!n.set,"@observable properties cannot have a setter: "+t),_t.apply(null,arguments))}function p(e,t){var n=Ae(e,Mt.Recursive),r=n[0],i=n[1];return new It(i,t,r===Mt.Structure,i.name)}function h(){throw new Error("[ComputedValue] It is not allowed to assign new values to computed properties.")}function d(e,t){ot("function"==typeof e&&1===e.length,"createTransformer expects a function that accepts one argument");var n={},r=Dt.resetId,i=function(r){function i(t,n){r.call(this,function(){return e(n)},null,!1,"Transformer-"+e.name+"-"+t),this.sourceIdentifier=t,this.sourceObject=n}return wt(i,r),i.prototype.onBecomeUnobserved=function(){var e=this.value;r.prototype.onBecomeUnobserved.call(this),delete n[this.sourceIdentifier],t&&t(e,this.sourceObject)},i}(It);return function(e){r!==Dt.resetId&&(n={},r=Dt.resetId);var t=v(e),o=n[t];return o?o.get():(o=n[t]=new i(t,e),o.get())}}function v(e){if(null===e||"object"!=typeof e)throw new Error("[mobx] transform expected some kind of object, got: "+e);var t=e.$transformId;return void 0===t&&(t=it(),dt(e,"$transformId",t)),t}function y(e,t){return J()||console.warn("[mobx.expr] 'expr' should only be used inside other reactive functions."),f(e,t).get()}function b(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return ot(arguments.length>=2,"extendObservable expected 2 or more arguments"),ot("object"==typeof e,"extendObservable expects an object as first argument"),ot(!(e instanceof qt),"extendObservable should not be used on maps, use map.merge instead"),t.forEach(function(t){ot("object"==typeof t,"all arguments of extendObservable should be objects"),m(e,t,Mt.Recursive,null)}),e}function m(e,t,n,r){var i=Ne(e,r,n);for(var o in t)if(t.hasOwnProperty(o)){if(e===t&&!yt(e,o))continue;Ue(i,o,t[o])}return e}function g(e,t){return w(He(e,t))}function w(e){var t={name:e.name};return e.observing&&e.observing.length>0&&(t.dependencies=ut(e.observing).map(w)),t}function x(e,t){return _(He(e,t))}function _(e){var t={name:e.name};return e.observers&&e.observers.length>0&&(t.observers=e.observers.asArray().map(_)),t}function R(e,t,n){return"function"==typeof n?S(e,t,n):k(e,t)}function k(e,t){return lt(e)&&!Ke(e)?(at("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),qe(I(e)).intercept(t)):qe(e).intercept(t)}function S(e,t,n){return lt(e)&&!Ke(e)?(at("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),b(e,{property:e[t]}),S(e,t,n)):qe(e,t).intercept(n)}function O(e,t){if(null===e||void 0===e)return!1;if(void 0!==t){if(e instanceof qt||e instanceof Wt)throw new Error("[mobx.isObservable] isObservable(object, propertyName) is not supported for arrays and maps. Use map.has or array.length instead.");if(Ke(e)){var n=e.$mobx;return n.values&&!!n.values[t]}return!1}return!!e.$mobx||e instanceof St||e instanceof Tt||e instanceof It}function A(e,t,n){return ot(arguments.length>=2&&arguments.length<=3,"Illegal decorator config",t),bt(e,t),ot(!n||!n.get,"@observable can not be used on getters, use @computed instead"),Rt.apply(null,arguments)}function I(e,t){if(void 0===e&&(e=void 0),"string"==typeof arguments[1])return A.apply(null,arguments);if(ot(arguments.length<3,"observable expects zero, one or two arguments"),O(e))return e;var n=Ae(e,Mt.Recursive),r=n[0],i=n[1],o=r===Mt.Reference?kt.Reference:j(i);switch(o){case kt.Array:case kt.PlainObject:return je(i,r);case kt.Reference:case kt.ComplexObject:return new en(i,r);case kt.ComplexFunction:throw new Error("[mobx.observable] To be able to make a function reactive it should not have arguments. If you need an observable reference to a function, use `observable(asReference(f))`");case kt.ViewFunction:return at("Use `computed(expr)` instead of `observable(expr)`"),f(e,t)}ot(!1,"Illegal State")}function j(e){return null===e||void 0===e?kt.Reference:"function"==typeof e?e.length?kt.ComplexFunction:kt.ViewFunction:Array.isArray(e)||e instanceof Wt?kt.Array:"object"==typeof e?lt(e)?kt.PlainObject:kt.ComplexObject:kt.Reference}function C(e,t,n,r){return"function"==typeof n?V(e,t,n,r):E(e,t,n)}function E(e,t,n){return lt(e)&&!Ke(e)?(at("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),qe(I(e)).observe(t,n)):qe(e).observe(t,n)}function V(e,t,n,r){return lt(e)&&!Ke(e)?(at("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),b(e,{property:e[t]}),V(e,t,n,r)):qe(e,t).observe(n,r)}function D(e,t,n){function r(r){return t&&n.push([e,r]),r}if(void 0===t&&(t=!0),void 0===n&&(n=null),e instanceof Date||e instanceof RegExp)return e;if(t&&null===n&&(n=[]),t&&null!==e&&"object"==typeof e)for(var i=0,o=n.length;i<o;i++)if(n[i][0]===e)return n[i][1];if(!e)return e;if(Array.isArray(e)||e instanceof Wt){var a=r([]),s=e.map(function(e){return D(e,t,n)});a.length=s.length;for(var i=0,o=s.length;i<o;i++)a[i]=s[i];return a}if(e instanceof qt){var u=r({});return e.forEach(function(e,r){return u[r]=D(e,t,n)}),u}if(O(e)&&e.$mobx instanceof en)return D(e(),t,n);if(e instanceof en)return D(e.get(),t,n);if("object"==typeof e){var a=r({});for(var c in e)a[c]=D(e[c],t,n);return a}return e}function T(e,t,n){return void 0===t&&(t=!0),void 0===n&&(n=null),at("toJSON is deprecated. Use toJS instead"),D.apply(null,arguments)}function L(e){return console.log(e),e}function $(e,t){switch(arguments.length){case 0:if(e=Dt.derivationStack[Dt.derivationStack.length-1],!e)return L("whyRun() can only be used if a derivation is active, or by passing an computed value / reaction explicitly. If you invoked whyRun from inside a computation; the computation is currently suspended but re-evaluating because somebody requested it's value.");break;case 2:e=He(e,t)}return e=He(e),e instanceof It?L(e.whyRun()):e instanceof Tt?L(e.whyRun()):void ot(!1,"whyRun can only be used on reactions and computed values")}function P(e,t){ot("function"==typeof t,"`action` can only be invoked on functions"),ot("string"==typeof e&&e.length>0,"actions should have valid names, got: '"+e+"'");var n=function(){return M(e,t,this,arguments)};return n.isMobxAction=!0,n}function M(e,t,n,r){var i=Dt.derivationStack;ot(!(i[i.length-1]instanceof It),"Computed values or transformers should not invoke actions or trigger other side effects");var o,a=ue();if(a){o=Date.now();var s=r&&r.length||0,u=new Array(s);if(s>0)for(var c=0;c<s;c++)u[c]=r[c];le({type:"action",name:e,fn:t,target:n,arguments:u})}var l=Y();ve(e,n,!1);var f=U(!0);try{return t.apply(n,r)}finally{F(f),ye(!1),Z(l),a&&fe({time:Date.now()-o})}}function z(e){return 0===arguments.length?Dt.strictMode:(ot(0===Dt.derivationStack.length,"It is not allowed to set `useStrict` when a derivation is running"),Dt.strictMode=e,Dt.allowStateChanges=!e,void 0)}function N(e,t){var n=U(e),r=t();return F(n),r}function U(e){var t=Dt.allowStateChanges;return Dt.allowStateChanges=e,t}function F(e){Dt.allowStateChanges=e}function B(e){ot(e.isDirty,"atom not dirty"),e.isDirty=!1,ae(e,!0)}function J(){return Dt.derivationStack.length>0&&Dt.isTracking}function G(){Dt.allowStateChanges||ot(!1,Dt.strictMode?"It is not allowed to create or change state outside an `action` when MobX is in strict mode. Wrap the current method in `action` if this state change is intended":"It is not allowed to change the state when a computed value or transformer is being evaluated. Use 'autorun' to create reactive functions with side-effects.")}function W(e){1===++e.dependencyStaleCount&&oe(e)}function K(e,t){if(ot(e.dependencyStaleCount>0,"unexpected ready notification"),t&&(e.dependencyChangeCount+=1),0===--e.dependencyStaleCount)if(e.dependencyChangeCount>0){e.dependencyChangeCount=0;var n=e.onDependenciesReady();ae(e,n)}else ae(e,!1)}function H(e,t){var n=e.observing;e.observing=new Array(n.length+100),e.unboundDepsCount=0,e.runId=++Dt.runId,Dt.derivationStack.push(e);var r=Dt.isTracking;Dt.isTracking=!0;var i,o=!0;try{i=t.call(e),o=!1}finally{if(o){var a="[mobx] An uncaught exception occurred while calculating your computed value, autorun or transformer. Or inside the render() method of an observer based React component. These functions should never throw exceptions as MobX will not always be able to recover from them. "+("Please fix the error reported after this message or enable 'Pause on (caught) exceptions' in your debugger to find the root cause. In: '"+e.name+"'. ")+"For more details see https://github.com/mobxjs/mobx/issues/462";ue()&&ce({type:"error",object:this,message:a}),console.warn(a),e.unboundDepsCount=0,e.observing=n,te()}else Dt.isTracking=r,Dt.derivationStack.length-=1,q(e,n)}return i}function q(e,t){for(var n=t.length,r=e.observing,i=r.length=e.unboundDepsCount,o=0;o<n;o++)t[o].diffValue=-1;for(var o=0;o<i;o++){var a=r[o];++a.diffValue>0&&(a.diffValue=0,ne(a,e))}for(var o=0;o<n;o++){var a=t[o];a.diffValue<0&&(a.diffValue=0,re(a,e))}}function Q(e){for(var t=e.observing,n=t.length,r=0;r<n;r++)re(t[r],e);t.length=0}function X(e){var t=Y(),n=e();return Z(t),n}function Y(){var e=Dt.isTracking;return Dt.isTracking=!1,e}function Z(e){Dt.isTracking=e}function ee(){}function te(){Dt.resetId++;var e=new Vt;for(var t in e)Et.indexOf(t)===-1&&(Dt[t]=e[t]);Dt.allowStateChanges=!Dt.strictMode}function ne(e,t){e.observers.add(t)}function re(e,t){e.observers.remove(t),0===e.observers.length&&e.onBecomeUnobserved()}function ie(e){if(Dt.isTracking!==!1){var t=Dt.derivationStack[Dt.derivationStack.length-1];t.runId!==e.lastAccessedBy&&(e.lastAccessedBy=t.runId,t.observing[t.unboundDepsCount++]=e)}}function oe(e){for(var t=e.observers.asArray(),n=t.length,r=0;r<n;r++)W(t[r]);e.staleObservers=e.staleObservers.concat(t)}function ae(e,t){e.staleObservers.splice(0).forEach(function(e){return K(e,t)})}function se(){if(!(Dt.isRunningReactions===!0||Dt.inTransaction>0)){Dt.isRunningReactions=!0;for(var e=Dt.pendingReactions,t=0;e.length>0;){if(++t===Lt)throw new Error("Reaction doesn't converge to a stable state after "+Lt+" iterations. Probably there is a cycle in the reactive function: "+e[0]);for(var n=e.splice(0),r=0,i=n.length;r<i;r++)n[r].runReaction()}Dt.isRunningReactions=!1}}function ue(){return $t}function ce(e){if(!$t)return!1;for(var t=Dt.spyListeners,n=0,r=t.length;n<r;n++)t[n](e)}function le(e){var t=ft({},e,{spyReportStart:!0});ce(t)}function fe(e){ce(e?ft({},e,Pt):Pt)}function pe(e){return Dt.spyListeners.push(e),$t=Dt.spyListeners.length>0,st(function(){var t=Dt.spyListeners.indexOf(e);t!==-1&&Dt.spyListeners.splice(t,1),$t=Dt.spyListeners.length>0})}function he(e){return at("trackTransitions is deprecated. Use mobx.spy instead"),"boolean"==typeof e&&(at("trackTransitions only takes a single callback function. If you are using the mobx-react-devtools, please update them first"),e=arguments[1]),e?pe(e):(at("trackTransitions without callback has been deprecated and is a no-op now. If you are using the mobx-react-devtools, please update them first"),function(){})}function de(e,t,n){void 0===t&&(t=void 0),void 0===n&&(n=!0),ve(e.name||"anonymous transaction",t,n);var r=e.call(t);return ye(n),r}function ve(e,t,n){void 0===t&&(t=void 0),void 0===n&&(n=!0),Dt.inTransaction+=1,n&&ue()&&le({type:"transaction",target:t,name:e})}function ye(e){if(void 0===e&&(e=!0),0===--Dt.inTransaction){for(var t=Dt.changedAtoms.splice(0),n=0,r=t.length;n<r;n++)B(t[n]);se()}e&&ue()&&fe()}function be(e){return e.interceptors&&e.interceptors.length>0}function me(e,t){var n=e.interceptors||(e.interceptors=[]);return n.push(t),st(function(){var e=n.indexOf(t);e!==-1&&n.splice(e,1)})}function ge(e,t){for(var n=Y(),r=e.interceptors,i=0,o=r.length;i<o;i++)if(t=r[i](t),ot(!t||t.type,"Intercept handlers should return nothing or a change object"),!t)return null;return Z(n),t}function we(e){return e.changeListeners&&e.changeListeners.length>0}function xe(e,t){var n=e.changeListeners||(e.changeListeners=[]);return n.push(t),st(function(){var e=n.indexOf(t);e!==-1&&n.splice(e,1)})}function _e(e,t){var n=Y(),r=e.changeListeners;if(r){r=r.slice();for(var i=0,o=r.length;i<o;i++)Array.isArray(t)?r[i].apply(null,t):r[i](t);Z(n)}}function Re(e){return new zt(e)}function ke(e){return new Nt(e)}function Se(e){return new Ut(e)}function Oe(e,t){return Me(e,t)}function Ae(e,t){return e instanceof zt?[Mt.Reference,e.value]:e instanceof Nt?[Mt.Structure,e.value]:e instanceof Ut?[Mt.Flat,e.value]:[t,e]}function Ie(e){return e===Re?Mt.Reference:e===ke?Mt.Structure:e===Se?Mt.Flat:(ot(void 0===e,"Cannot determine value mode from function. Please pass in one of these: mobx.asReference, mobx.asStructure or mobx.asFlat, got: "+e),Mt.Recursive)}function je(e,t,n){var r;if(O(e))return e;switch(t){case Mt.Reference:return e;case Mt.Flat:Ce(e,"Items inside 'asFlat' cannot have modifiers"),r=Mt.Reference;break;case Mt.Structure:Ce(e,"Items inside 'asStructure' cannot have modifiers"),r=Mt.Structure;break;case Mt.Recursive:i=Ae(e,Mt.Recursive),r=i[0],e=i[1];break;default:ot(!1,"Illegal State")}return Array.isArray(e)?Le(e,r,n):lt(e)&&Object.isExtensible(e)?m(e,e,r,n):e;var i}function Ce(e,t){if(e instanceof zt||e instanceof Nt||e instanceof Ut)throw new Error("[mobx] asStructure / asReference / asFlat cannot be used here. "+t)}function Ee(e){var t=Ve(e),n=De(e);Object.defineProperty(Wt.prototype,""+e,{enumerable:!1,configurable:!0,set:t,get:n})}function Ve(e){return function(t){var n=this.$mobx,r=n.values;if(Ce(t,"Modifiers cannot be used on array values. For non-reactive array values use makeReactive(asFlat(array))."),e<r.length){G();var i=r[e];if(be(n)){var o=ge(n,{type:"update",object:n.array,index:e,newValue:t});if(!o)return;t=o.newValue}t=n.makeReactiveArrayItem(t);var a=n.mode===Mt.Structure?!gt(i,t):i!==t;a&&(r[e]=t,n.notifyArrayChildUpdate(e,t,i))}else{if(e!==r.length)throw new Error("[mobx.array] Index out of bounds, "+e+" is larger than "+r.length);n.spliceWithArray(e,0,[t])}}}function De(e){return function(){var t=this.$mobx;return t&&e<t.values.length?(t.atom.reportObserved(),t.values[e]):void 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")}}function Te(e){for(var t=Bt;t<e;t++)Ee(t);Bt=e}function Le(e,t,n){return new Wt(e,t,n)}function $e(e){return at("fastArray is deprecated. Please use `observable(asFlat([]))`"),Le(e,Mt.Flat,null)}function Pe(e){return e instanceof Wt}function Me(e,t){return new qt(e,t)}function ze(e){return e instanceof qt}function Ne(e,t,n){if(void 0===n&&(n=Mt.Recursive),Ke(e))return e.$mobx;lt(e)||(t=e.constructor.name+"@"+it()),t||(t="ObservableObject@"+it());var r=new Qt(e,t,n);return vt(e,"$mobx",r),r}function Ue(e,t,n){e.values[t]?e.target[t]=n:Fe(e,t,n,!0)}function Fe(e,t,n,r){r&&bt(e.target,t);var i,a=e.name+"."+t,s=!0;if("function"!=typeof n||0!==n.length||o(n))if(n instanceof Nt&&"function"==typeof n.value&&0===n.value.length)i=new It(n.value,e.target,(!0),a);else{if(s=!1,be(e)){var u=ge(e,{object:e.target,name:t,type:"add",newValue:n});if(!u)return;n=u.newValue}i=new en(n,e.mode,a,(!1)),n=i.value}else i=new It(n,e.target,(!1),a);e.values[t]=i,r&&Object.defineProperty(e.target,t,s?Je(t):Be(t)),s||We(e,e.target,t,n)}function Be(e){var t=Xt[e];return t?t:Xt[e]={configurable:!0,enumerable:!0,get:function(){return this.$mobx.values[e].get()},set:function(t){Ge(this,e,t)}}}function Je(e){var t=Yt[e];return t?t:Yt[e]={configurable:!0,enumerable:!1,get:function(){return this.$mobx.values[e].get()},set:h}}function Ge(e,t,n){var r=e.$mobx,i=r.values[t];if(be(r)){var o=ge(r,{type:"update",object:e,name:t,newValue:n});if(!o)return;n=o.newValue}if(n=i.prepareNewValue(n),n!==Zt){var a=we(r),s=ue(),o=_e||we?{type:"update",object:e,oldValue:i.value,name:t,newValue:n}:null;s&&le(o),i.setNewValue(n),a&&_e(r,o),s&&fe()}}function We(e,t,n,r){var i=we(e),o=ue(),a=i||o?{type:"add",object:t,name:n,newValue:r}:null;o&&le(a),i&&_e(e,a),o&&fe()}function Ke(e){return"object"==typeof e&&null!==e&&(Ze(e),e.$mobx instanceof Qt)}function He(e,t){if("object"==typeof e&&null!==e){if(Pe(e))return ot(void 0===t,"It is not possible to get index atoms from arrays"),e.$mobx.atom;if(ze(e)){if(void 0===t)return He(e._keys);var n=e._data[t]||e._hasMap[t];return ot(!!n,"the entry '"+t+"' does not exist in the observable map '"+Qe(e)+"'"),n}if(Ze(e),Ke(e)){ot(!!t,"please specify a property");var r=e.$mobx.values[t];return ot(!!r,"no observable property '"+t+"' found on the observable object '"+Qe(e)+"'"),r}if(e instanceof St||e instanceof It||e instanceof Tt)return e}else if("function"==typeof e&&e.$mobx instanceof Tt)return e.$mobx;ot(!1,"Cannot obtain atom from "+e)}function qe(e,t){return ot(e,"Expection some object"),void 0!==t?qe(He(e,t)):e instanceof St||e instanceof It||e instanceof Tt?e:ze(e)?e:(Ze(e),e.$mobx?e.$mobx:void ot(!1,"Cannot obtain administration from "+e))}function Qe(e,t){var n;return n=void 0!==t?He(e,t):Ke(e)||ze(e)?qe(e):He(e),n.name}function Xe(e,t,n,r,i){function o(o,a,s,u){if(ot(i||et(arguments),"This function is a decorator, but it wasn't invoked like a decorator"),s){o.hasOwnProperty("__mobxLazyInitializers")||dt(o,"__mobxLazyInitializers",o.__mobxLazyInitializers&&o.__mobxLazyInitializers.slice()||[]);var c=s.value,l=s.initializer;return o.__mobxLazyInitializers.push(function(t){e(t,a,l?l.call(t):c,u,s)}),{enumerable:r,configurable:!0,get:function(){return this.__mobxDidRunLazyInitializers!==!0&&Ze(this),t.call(this,a)},set:function(e){this.__mobxDidRunLazyInitializers!==!0&&Ze(this),n.call(this,a,e)}}}var f={enumerable:r,configurable:!0,get:function(){return this.__mobxInitializedProps&&this.__mobxInitializedProps[a]===!0||Ye(this,a,void 0,e,u,s),t.call(this,a)},set:function(t){this.__mobxInitializedProps&&this.__mobxInitializedProps[a]===!0?n.call(this,a,t):Ye(this,a,t,e,u,s)}};return arguments.length<3&&Object.defineProperty(o,a,f),f}return i?function(){if(et(arguments))return o.apply(null,arguments);var e=arguments;return function(t,n,r){return o(t,n,r,e)}}:o}function Ye(e,t,n,r,i,o){e.hasOwnProperty("__mobxInitializedProps")||dt(e,"__mobxInitializedProps",{}),e.__mobxInitializedProps[t]=!0,r(e,t,n,i,o)}function Ze(e){e.__mobxDidRunLazyInitializers!==!0&&e.__mobxLazyInitializers&&(dt(e,"__mobxDidRunLazyInitializers",!0),e.__mobxDidRunLazyInitializers&&e.__mobxLazyInitializers.forEach(function(t){return t(e)}))}function et(e){return(2===e.length||3===e.length)&&"string"==typeof e[1]}function tt(){return"function"==typeof Symbol&&Symbol.iterator||"@@iterator"}function nt(e){ot(e[tn]!==!0,"Illegal state: cannot recycle array as iterator"),vt(e,tn,!0);var t=-1;return vt(e,"next",function(){return t++,{done:t>=this.length,value:t<this.length?this[t]:void 0}}),e}function rt(e,t){vt(e,tt(),t)}function it(){return++Dt.mobxGuid}function ot(e,t,n){if(!e)throw new Error("[mobx] Invariant failed: "+t+(n?" in '"+n+"'":""))}function at(e){sn.indexOf(e)===-1&&(sn.push(e),console.error("[mobx] Deprecated: "+e))}function st(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}function ut(e){var t=[];return e.forEach(function(e){t.indexOf(e)===-1&&t.push(e)}),t}function ct(e,t,n){if(void 0===t&&(t=100),void 0===n&&(n=" - "),!e)return"";var r=e.slice(0,t);return""+r.join(n)+(e.length>t?" (... and "+(e.length-t)+"more)":"")}function lt(e){if(null===e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}function ft(){for(var e=arguments[0],t=1,n=arguments.length;t<n;t++){var r=arguments[t];for(var i in r)r.hasOwnProperty(i)&&(e[i]=r[i])}return e}function pt(e,t,n){return e?!gt(t,n):t!==n}function ht(e,t){for(var n=0;n<t.length;n++)dt(e,t[n],e[t[n]])}function dt(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function vt(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!1,configurable:!0,value:n})}function yt(e,t){var n=Object.getOwnPropertyDescriptor(e,t);return!n||n.configurable!==!1&&n.writable!==!1}function bt(e,t){ot(yt(e,t),"Cannot make property '"+t+"' observable, it is not configurable and writable in the target object")}function mt(e){var t=[];for(var n in e)t.push(n);return t}function gt(e,t){if(null===e&&null===t)return!0;if(void 0===e&&void 0===t)return!0;var n=Array.isArray(e)||Pe(e);if(n!==(Array.isArray(t)||Pe(t)))return!1;if(n){if(e.length!==t.length)return!1;for(var r=e.length-1;r>=0;r--)if(!gt(e[r],t[r]))return!1;return!0}if("object"==typeof e&&"object"==typeof t){if(null===e||null===t)return!1;if(mt(e).length!==mt(t).length)return!1;for(var i in e){if(!(i in t))return!1;if(!gt(e[i],t[i]))return!1}return!0}return e===t}var wt=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)};ee(),n.extras={allowStateChanges:N,getAtom:He,getDebugName:Qe,getDependencyTree:g,getObserverTree:x,isComputingDerivation:J,isSpyEnabled:ue,resetGlobalState:te,spyReport:ce,spyReportEnd:fe,spyReportStart:le,trackTransitions:he},n._={getAdministration:qe,resetGlobalState:te};var xt=Xe(function(e,n,r,i,o){var a=i&&1===i.length?i[0]:r.name||n||"<unnamed action>",s=t(a,r);dt(e,n,s)},function(e){return this[e]},function(){ot(!1,"It is not allowed to assign new values to @action fields")},!1,!0);n.action=t,n.runInAction=i,n.isAction=o,n.autorun=a,n.when=s,n.autorunUntil=u,n.autorunAsync=c,n.reaction=l;var _t=Xe(function(e,t,n,r,i){ot("undefined"!=typeof i,"@computed can only be used on getter functions, like: '@computed get myProps() { return ...; }'. It looks like it was used on a property.");var o=i.get;ot("function"==typeof o,"@computed can only be used on getter functions, like: '@computed get myProps() { return ...; }'");var a=!1;r&&1===r.length&&r[0].asStructure===!0&&(a=!0);var s=Ne(e,void 0,Mt.Recursive);Fe(s,t,a?ke(o):o,!1)},function(e){return this.$mobx.values[e].get()},h,!1,!0);n.computed=f,n.createTransformer=d,n.expr=y,n.extendObservable=b,n.intercept=R,n.isObservable=O;var Rt=Xe(function(e,t,n){var r=U(!0);"function"==typeof n&&(n=Re(n));var i=Ne(e,void 0,Mt.Recursive);Fe(i,t,n,!0),F(r)},function(e){return this.$mobx.values[e].get()},function(e,t){Ge(this,e,t)},!0,!1);n.observable=I;var kt;!function(e){e[e.Reference=0]="Reference",e[e.PlainObject=1]="PlainObject",e[e.ComplexObject=2]="ComplexObject",e[e.Array=3]="Array",e[e.ViewFunction=4]="ViewFunction",e[e.ComplexFunction=5]="ComplexFunction"}(kt||(kt={})),n.observe=C,n.toJS=D,n.toJSON=T,n.whyRun=$,n.useStrict=z;var St=function(){function e(e){void 0===e&&(e="Atom@"+it()),this.name=e,this.isDirty=!1,this.staleObservers=[],this.observers=new nn,this.diffValue=0,this.lastAccessedBy=0}return e.prototype.onBecomeUnobserved=function(){},e.prototype.reportObserved=function(){ie(this)},e.prototype.reportChanged=function(){this.isDirty||(this.reportStale(),this.reportReady())},e.prototype.reportStale=function(){this.isDirty||(this.isDirty=!0,oe(this))},e.prototype.reportReady=function(){ot(this.isDirty,"atom not dirty"),Dt.inTransaction>0?Dt.changedAtoms.push(this):(B(this),se())},e.prototype.toString=function(){return this.name},e}();n.BaseAtom=St;var Ot=function(e){function t(t,n,r){void 0===t&&(t="Atom@"+it()),void 0===n&&(n=un),void 0===r&&(r=un),e.call(this,t),this.name=t,this.onBecomeObservedHandler=n,this.onBecomeUnobservedHandler=r,this.isBeingTracked=!1}return wt(t,e),t.prototype.reportObserved=function(){e.prototype.reportObserved.call(this);var t=Dt.isTracking;return t&&!this.isBeingTracked&&(this.isBeingTracked=!0,this.onBecomeObservedHandler()),t},t.prototype.onBecomeUnobserved=function(){this.isBeingTracked=!1,this.onBecomeUnobservedHandler()},t}(St);n.Atom=Ot;var At,It=function(){function e(e,t,n,r){this.derivation=e,this.scope=t,this.compareStructural=n,this.isLazy=!0,this.isComputing=!1,this.staleObservers=[],this.observers=new nn,this.observing=[],this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.unboundDepsCount=0,this.__mapid="#"+it(),this.dependencyChangeCount=0,this.dependencyStaleCount=0,this.value=void 0,this.name=r||"ComputedValue@"+it()}return e.prototype.peek=function(){this.isComputing=!0;var e=U(!1),t=this.derivation.call(this.scope);return F(e),this.isComputing=!1,t},e.prototype.onBecomeUnobserved=function(){Q(this),this.isLazy=!0,this.value=void 0},e.prototype.onDependenciesReady=function(){var e=this.trackAndCompute();return e},e.prototype.get=function(){if(ot(!this.isComputing,"Cycle detected in computation "+this.name,this.derivation),ie(this),this.dependencyStaleCount>0)return this.peek();if(this.isLazy){if(!J())return this.peek();this.isLazy=!1,this.trackAndCompute()}return this.value},e.prototype.set=function(e){throw new Error("[ComputedValue '"+name+"'] It is not possible to assign a new value to a computed value.")},e.prototype.trackAndCompute=function(){ue()&&ce({object:this,type:"compute",fn:this.derivation,target:this.scope});var e=this.value,t=this.value=H(this,this.peek);return pt(this.compareStructural,t,e)},e.prototype.observe=function(e,t){var n=this,r=!0,i=void 0;return a(function(){var o=n.get();if(!r||t){var a=Y();e(o,i),Z(a)}r=!1,i=o})},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},e.prototype.whyRun=function(){var e=Dt.derivationStack.length>0,t=ut(this.observing).map(function(e){return e.name}),n=ut(this.observers.asArray()).map(function(e){return e.name}),r=this.isComputing?e?this.observers.length>0?At.INVALIDATED:At.REQUIRED:At.PEEK:At.NOT_RUNNING;if(r===At.REQUIRED){var i=Dt.derivationStack[Dt.derivationStack.length-2];i&&n.push(i.name)}return"\nWhyRun? computation '"+this.name+"':\n * Running because: "+jt[r]+" "+(r===At.NOT_RUNNING&&this.dependencyStaleCount>0?"(a next run is scheduled)":"")+"\n"+(this.isLazy?" * This computation is suspended (not in use by any reaction) and won't run automatically.\n\tDidn't expect this computation to be suspended at this point?\n\t 1. Make sure this computation is used by a reaction (reaction, autorun, observer).\n\t 2. Check whether you are using this computation synchronously (in the same stack as they reaction that needs it).\n":" * This computation will re-run if any of the following observables changes:\n "+ct(t)+"\n "+(this.isComputing&&e?" (... or any observable accessed during the remainder of the current run)":"")+"\n\tMissing items in this list?\n\t 1. Check whether all used values are properly marked as observable (use isObservable to verify)\n\t 2. Make sure you didn't dereference values too early. MobX observes props, not primitives. E.g: use 'person.name' instead of 'name' in your computation.\n * If the outcome of this computation changes, the following observers will be re-run:\n "+ct(n)+"\n")},e}();!function(e){e[e.PEEK=0]="PEEK",e[e.INVALIDATED=1]="INVALIDATED",e[e.REQUIRED=2]="REQUIRED",e[e.NOT_RUNNING=3]="NOT_RUNNING"}(At||(At={}));var jt=(an={},an[At.PEEK]="[peek] The value of this computed value was requested outside an reaction",an[At.INVALIDATED]="[invalidated] Some observables used by this computation did change",an[At.REQUIRED]="[started] This computation is required by another computed value / reaction",an[At.NOT_RUNNING]="[idle] This compution is currently not running",an);n.untracked=X;var Ct,Et=["mobxGuid","resetId","spyListeners","strictMode","runId"],Vt=function(){function e(){this.version=3,this.derivationStack=[],this.runId=0,this.mobxGuid=0,this.inTransaction=0,this.isTracking=!1,this.isRunningReactions=!1,this.changedAtoms=[],this.pendingReactions=[],this.allowStateChanges=!0,this.strictMode=!1,this.resetId=0,this.spyListeners=[]}return e}(),Dt=function(){var t=new Vt;if(e.__mobservableTrackingStack||e.__mobservableViewStack)throw new Error("[mobx] An incompatible version of mobservable is already loaded.");if(e.__mobxGlobal&&e.__mobxGlobal.version!==t.version)throw new Error("[mobx] An incompatible version of mobx is already loaded.");return e.__mobxGlobal?e.__mobxGlobal:e.__mobxGlobal=t}(),Tt=function(){function e(e,t){void 0===e&&(e="Reaction@"+it()),this.name=e,this.onInvalidate=t,this.staleObservers=on,this.observers=Ct||(Ct=new nn),this.observing=[],this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.unboundDepsCount=0,this.__mapid="#"+it(),this.dependencyChangeCount=0,this.dependencyStaleCount=0,this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1}return e.prototype.onBecomeUnobserved=function(){},e.prototype.onDependenciesReady=function(){return this.schedule(),!1},e.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,Dt.pendingReactions.push(this),se())},e.prototype.isScheduled=function(){return this.dependencyStaleCount>0||this._isScheduled},e.prototype.runReaction=function(){this.isDisposed||(this._isScheduled=!1,this._isTrackPending=!0,
this.onInvalidate(),this._isTrackPending&&ue()&&ce({object:this,type:"scheduled-reaction"}))},e.prototype.track=function(e){var t,n=ue();n&&(t=Date.now(),le({object:this,type:"reaction",fn:e})),this._isRunning=!0,H(this,e),this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&Q(this),n&&fe({time:Date.now()-t})},e.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||Q(this))},e.prototype.getDisposer=function(){var e=this.dispose.bind(this);return e.$mobx=this,e},e.prototype.toString=function(){return"Reaction["+this.name+"]"},e.prototype.whyRun=function(){var e=ut(this.observing).map(function(e){return e.name});return"\nWhyRun? reaction '"+this.name+"':\n * Status: ["+(this.isDisposed?"stopped":this._isRunning?"running":this.isScheduled()?"scheduled":"idle")+"]\n * This reaction will re-run if any of the following observables changes:\n "+ct(e)+"\n "+(this._isRunning?" (... or any observable accessed during the remainder of the current run)":"")+"\n\tMissing items in this list?\n\t 1. Check whether all used values are properly marked as observable (use isObservable to verify)\n\t 2. Make sure you didn't dereference values too early. MobX observes props, not primitives. E.g: use 'person.name' instead of 'name' in your computation.\n"},e}();n.Reaction=Tt;var Lt=100,$t=!1,Pt={spyReportEnd:!0};n.spy=pe,n.transaction=de;var Mt;!function(e){e[e.Recursive=0]="Recursive",e[e.Reference=1]="Reference",e[e.Structure=2]="Structure",e[e.Flat=3]="Flat"}(Mt||(Mt={})),n.asReference=Re,n.asStructure=ke,n.asFlat=Se;var zt=function(){function e(e){this.value=e,Ce(e,"Modifiers are not allowed to be nested")}return e}(),Nt=function(){function e(e){this.value=e,Ce(e,"Modifiers are not allowed to be nested")}return e}(),Ut=function(){function e(e){this.value=e,Ce(e,"Modifiers are not allowed to be nested")}return e}();n.asMap=Oe;var Ft=function(){var e=!1,t={};return Object.defineProperty(t,"0",{set:function(){e=!0}}),Object.create(t)[0]=1,e===!1}(),Bt=0,Jt=function(){function e(){}return e}();Jt.prototype=[];var Gt=function(){function e(e,t,n,r){this.mode=t,this.array=n,this.owned=r,this.lastKnownLength=0,this.interceptors=null,this.changeListeners=null,this.atom=new St(e||"ObservableArray@"+it())}return e.prototype.makeReactiveArrayItem=function(e){return Ce(e,"Array values cannot have modifiers"),this.mode===Mt.Flat||this.mode===Mt.Reference?e:je(e,this.mode,this.atom.name+"[..]")},e.prototype.intercept=function(e){return me(this,e)},e.prototype.observe=function(e,t){return void 0===t&&(t=!1),t&&e({object:this.array,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),xe(this,e)},e.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},e.prototype.setArrayLength=function(e){if("number"!=typeof e||e<0)throw new Error("[mobx.array] Out of range: "+e);var t=this.values.length;e!==t&&(e>t?this.spliceWithArray(t,0,new Array(e-t)):this.spliceWithArray(e,t-e))},e.prototype.updateArrayLength=function(e,t){if(e!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed. Did you use peek() to change it?");this.lastKnownLength+=t,t>0&&e+t+1>Bt&&Te(e+t+1)},e.prototype.spliceWithArray=function(e,t,n){G();var r=this.values.length;if(void 0===e?e=0:e>r?e=r:e<0&&(e=Math.max(0,r+e)),t=1===arguments.length?r-e:void 0===t||null===t?0:Math.max(0,Math.min(t,r-e)),void 0===n&&(n=[]),be(this)){var i=ge(this,{object:this.array,type:"splice",index:e,removedCount:t,added:n});if(!i)return on;t=i.removedCount,n=i.added}n=n.map(this.makeReactiveArrayItem,this);var o=n.length-t;this.updateArrayLength(r,o);var a=(s=this.values).splice.apply(s,[e,t].concat(n));return 0===t&&0===n.length||this.notifyArraySplice(e,n,a),a;var s},e.prototype.notifyArrayChildUpdate=function(e,t,n){var r=!this.owned&&ue(),i=we(this),o=i||r?{object:this.array,type:"update",index:e,newValue:t,oldValue:n}:null;r&&le(o),this.atom.reportChanged(),i&&_e(this,o),r&&fe()},e.prototype.notifyArraySplice=function(e,t,n){var r=!this.owned&&ue(),i=we(this),o=i||r?{object:this.array,type:"splice",index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;r&&le(o),this.atom.reportChanged(),i&&_e(this,o),r&&fe()},e}(),Wt=function(e){function t(t,n,r,i){void 0===i&&(i=!1),e.call(this);var o=new Gt(r,n,this,i);vt(this,"$mobx",o),t&&t.length?(o.updateArrayLength(0,t.length),o.values=t.map(o.makeReactiveArrayItem,o),o.notifyArraySplice(0,o.values.slice(),on)):o.values=[],Ft&&Object.defineProperty(o.array,"0",Kt)}return wt(t,e),t.prototype.intercept=function(e){return this.$mobx.intercept(e)},t.prototype.observe=function(e,t){return void 0===t&&(t=!1),this.$mobx.observe(e,t)},t.prototype.clear=function(){return this.splice(0)},t.prototype.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];return this.$mobx.atom.reportObserved(),Array.prototype.concat.apply(this.slice(),e.map(function(e){return Pe(e)?e.slice():e}))},t.prototype.replace=function(e){return this.$mobx.spliceWithArray(0,this.$mobx.values.length,e)},t.prototype.toJS=function(){return this.slice()},t.prototype.toJSON=function(){return this.toJS()},t.prototype.peek=function(){return this.$mobx.values},t.prototype.find=function(e,t,n){void 0===n&&(n=0),this.$mobx.atom.reportObserved();for(var r=this.$mobx.values,i=r.length,o=n;o<i;o++)if(e.call(t,r[o],o,this))return r[o]},t.prototype.splice=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];switch(arguments.length){case 0:return[];case 1:return this.$mobx.spliceWithArray(e);case 2:return this.$mobx.spliceWithArray(e,t)}return this.$mobx.spliceWithArray(e,t,n)},t.prototype.push=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];var n=this.$mobx;return n.spliceWithArray(n.values.length,0,e),n.values.length},t.prototype.pop=function(){return this.splice(Math.max(this.$mobx.values.length-1,0),1)[0]},t.prototype.shift=function(){return this.splice(0,1)[0]},t.prototype.unshift=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];var n=this.$mobx;return n.spliceWithArray(0,0,e),n.values.length},t.prototype.reverse=function(){this.$mobx.atom.reportObserved();var e=this.slice();return e.reverse.apply(e,arguments)},t.prototype.sort=function(e){this.$mobx.atom.reportObserved();var t=this.slice();return t.sort.apply(t,arguments)},t.prototype.remove=function(e){var t=this.$mobx.values.indexOf(e);return t>-1&&(this.splice(t,1),!0)},t.prototype.toString=function(){return"[mobx.array] "+Array.prototype.toString.apply(this.$mobx.values,arguments)},t.prototype.toLocaleString=function(){return"[mobx.array] "+Array.prototype.toLocaleString.apply(this.$mobx.values,arguments)},t}(Jt);rt(Wt.prototype,function(){return nt(this.slice())}),ht(Wt.prototype,["constructor","observe","clear","concat","replace","toJSON","peek","find","splice","push","pop","shift","unshift","reverse","sort","remove","toString","toLocaleString"]),Object.defineProperty(Wt.prototype,"length",{enumerable:!1,configurable:!0,get:function(){return this.$mobx.getArrayLength()},set:function(e){this.$mobx.setArrayLength(e)}}),["every","filter","forEach","indexOf","join","lastIndexOf","map","reduce","reduceRight","slice","some"].forEach(function(e){var t=Array.prototype[e];dt(Wt.prototype,e,function(){return this.$mobx.atom.reportObserved(),t.apply(this.$mobx.values,arguments)})});var Kt={configurable:!0,enumerable:!1,set:Ve(0),get:De(0)};Te(1e3),n.fastArray=$e,n.isObservableArray=Pe;var Ht={},qt=function(){function e(e,t){var n=this;this.$mobx=Ht,this._data={},this._hasMap={},this.name="ObservableMap@"+it(),this._keys=new Wt(null,Mt.Reference,this.name+".keys()",(!0)),this.interceptors=null,this.changeListeners=null,this._valueMode=Ie(t),this._valueMode===Mt.Flat&&(this._valueMode=Mt.Reference),N(!0,function(){lt(e)?n.merge(e):Array.isArray(e)&&e.forEach(function(e){var t=e[0],r=e[1];return n.set(t,r)})})}return e.prototype._has=function(e){return"undefined"!=typeof this._data[e]},e.prototype.has=function(e){return!!this.isValidKey(e)&&(e=""+e,this._hasMap[e]?this._hasMap[e].get():this._updateHasMapEntry(e,!1).get())},e.prototype.set=function(e,t){this.assertValidKey(e),e=""+e;var n=this._has(e);if(Ce(t,"[mobx.map.set] Expected unwrapped value to be inserted to key '"+e+"'. If you need to use modifiers pass them as second argument to the constructor"),be(this)){var r=ge(this,{type:n?"update":"add",object:this,newValue:t,name:e});if(!r)return;t=r.newValue}n?this._updateValue(e,t):this._addValue(e,t)},e.prototype.delete=function(e){var t=this;if(this.assertValidKey(e),e=""+e,be(this)){var n=ge(this,{type:"delete",object:this,name:e});if(!n)return}if(this._has(e)){var r=ue(),i=we(this),n=i||r?{type:"delete",object:this,oldValue:this._data[e].value,name:e}:null;r&&le(n),de(function(){t._keys.remove(e),t._updateHasMapEntry(e,!1);var n=t._data[e];n.setNewValue(void 0),t._data[e]=void 0},void 0,!1),i&&_e(this,n),r&&fe()}},e.prototype._updateHasMapEntry=function(e,t){var n=this._hasMap[e];return n?n.setNewValue(t):n=this._hasMap[e]=new en(t,Mt.Reference,this.name+"."+e+"?",(!1)),n},e.prototype._updateValue=function(e,t){var n=this._data[e];if(t=n.prepareNewValue(t),t!==Zt){var r=ue(),i=we(this),o=i||r?{type:"update",object:this,oldValue:n.value,name:e,newValue:t}:null;r&&le(o),n.setNewValue(t),i&&_e(this,o),r&&fe()}},e.prototype._addValue=function(e,t){var n=this;de(function(){var r=n._data[e]=new en(t,n._valueMode,n.name+"."+e,(!1));t=r.value,n._updateHasMapEntry(e,!0),n._keys.push(e)},void 0,!1);var r=ue(),i=we(this),o=i||r?{type:"add",object:this,name:e,newValue:t}:null;r&&le(o),i&&_e(this,o),r&&fe()},e.prototype.get=function(e){if(e=""+e,this.has(e))return this._data[e].get()},e.prototype.keys=function(){return nt(this._keys.slice())},e.prototype.values=function(){return nt(this._keys.map(this.get,this))},e.prototype.entries=function(){var e=this;return nt(this._keys.map(function(t){return[t,e.get(t)]}))},e.prototype.forEach=function(e,t){var n=this;this.keys().forEach(function(r){return e.call(t,n.get(r),r)})},e.prototype.merge=function(t){var n=this;return de(function(){t instanceof e?t.keys().forEach(function(e){return n.set(e,t.get(e))}):Object.keys(t).forEach(function(e){return n.set(e,t[e])})},void 0,!1),this},e.prototype.clear=function(){var e=this;de(function(){X(function(){e.keys().forEach(e.delete,e)})},void 0,!1)},Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),e.prototype.toJS=function(){var e=this,t={};return this.keys().forEach(function(n){return t[n]=e.get(n)}),t},e.prototype.toJs=function(){return at("toJs is deprecated, use toJS instead"),this.toJS()},e.prototype.toJSON=function(){return this.toJS()},e.prototype.isValidKey=function(e){return null!==e&&void 0!==e&&("string"==typeof e||"number"==typeof e||"boolean"==typeof e)},e.prototype.assertValidKey=function(e){if(!this.isValidKey(e))throw new Error("[mobx.map] Invalid key: '"+e+"'")},e.prototype.toString=function(){var e=this;return this.name+"[{ "+this.keys().map(function(t){return t+": "+e.get(t)}).join(", ")+" }]"},e.prototype.observe=function(e,t){return ot(t!==!0,"`observe` doesn't support the fire immediately property for observable maps."),xe(this,e)},e.prototype.intercept=function(e){return me(this,e)},e}();n.ObservableMap=qt,rt(qt.prototype,function(){return this.entries()}),n.map=Me,n.isObservableMap=ze;var Qt=function(){function e(e,t,n){this.target=e,this.name=t,this.mode=n,this.values={},this.changeListeners=null,this.interceptors=null}return e.prototype.observe=function(e,t){return ot(t!==!0,"`observe` doesn't support the fire immediately property for observable objects."),xe(this,e)},e.prototype.intercept=function(e){return me(this,e)},e}(),Xt={},Yt={};n.isObservableObject=Ke;var Zt={},en=function(e){function t(t,n,r,i){void 0===r&&(r="ObservableValue@"+it()),void 0===i&&(i=!0),e.call(this,r),this.mode=n,this.hasUnreportedChange=!1,this.value=void 0;var o=Ae(t,Mt.Recursive),a=o[0],s=o[1];this.mode===Mt.Recursive&&(this.mode=a),this.value=je(s,this.mode,this.name),i&&ue()&&ce({type:"create",object:this,newValue:this.value})}return wt(t,e),t.prototype.set=function(e){var t=this.value;if(e=this.prepareNewValue(e),e!==Zt){var n=ue();n&&le({type:"update",object:this,newValue:e,oldValue:t}),this.setNewValue(e),n&&fe()}},t.prototype.prepareNewValue=function(e){if(Ce(e,"Modifiers cannot be used on non-initial values."),G(),be(this)){var t=ge(this,{object:this,type:"update",newValue:e});if(!t)return Zt;e=t.newValue}var n=pt(this.mode===Mt.Structure,this.value,e);return n?je(e,this.mode,this.name):Zt},t.prototype.setNewValue=function(e){var t=this.value;this.value=e,this.reportChanged(),we(this)&&_e(this,[e,t])},t.prototype.get=function(){return this.reportObserved(),this.value},t.prototype.intercept=function(e){return me(this,e)},t.prototype.observe=function(e,t){return t&&e(this.value,void 0),xe(this,e)},t.prototype.toJSON=function(){return this.get()},t.prototype.toString=function(){return this.name+"["+this.value+"]"},t}(St),tn="__$$iterating",nn=function(){function e(){this.size=0,this.data={}}return Object.defineProperty(e.prototype,"length",{get:function(){return this.size},enumerable:!0,configurable:!0}),e.prototype.asArray=function(){var e=new Array(this.size),t=0;for(var n in this.data)e[t]=this.data[n],t++;return e},e.prototype.add=function(e){var t=e.__mapid;t in this.data||(this.data[t]=e,this.size++)},e.prototype.remove=function(e){e.__mapid in this.data&&(delete this.data[e.__mapid],this.size--)},e}();n.SimpleSet=nn;var rn=function(){function e(){this.listeners=[],at("extras.SimpleEventEmitter is deprecated and will be removed in the next major release")}return e.prototype.emit=function(){for(var e=this.listeners.slice(),t=0,n=e.length;t<n;t++)e[t].apply(null,arguments)},e.prototype.on=function(e){var t=this;return this.listeners.push(e),st(function(){var n=t.listeners.indexOf(e);n!==-1&&t.listeners.splice(n,1)})},e.prototype.once=function(e){var t=this.on(function(){t(),e.apply(this,arguments)});return t},e}();n.SimpleEventEmitter=rn;var on=[];Object.freeze(on);var an,sn=[],un=function(){}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)});
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.mobx=e()}}(function(){return function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(o)return o(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[a]={exports:{}};t[a][0].call(l.exports,function(e){var n=t[a][1][e];return i(n?n:e)},l,l.exports,e,t,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(e,t,n){(function(e){"use strict";function t(e,t,n,i){return 1===arguments.length&&"function"==typeof e?V(e.name||"<unnamed action>",e):2===arguments.length&&"function"==typeof t?V(e,t):1===arguments.length&&"string"==typeof e?r(e):r(t).apply(null,arguments)}function r(e){return function(t,n,r){return r&&"function"==typeof r.value?(r.value=V(e,r.value),r.enumerable=!1,r.configurable=!0,r):It(e).apply(this,arguments)}}function i(e,t,n){var r="string"==typeof e?e:e.name||"<unnamed action>",i="function"==typeof e?e:t,o="function"==typeof e?t:n;return pt("function"==typeof i,"`runInAction` expects a function"),pt(0===i.length,"`runInAction` expects a function without arguments"),pt("string"==typeof r&&r.length>0,"actions should have valid names, got: '"+r+"'"),$(r,i,o,void 0)}function o(e){return"function"==typeof e&&e.isMobxAction===!0}function a(e,t,n){function r(){o(s)}var i,o,a;"string"==typeof e?(i=e,o=t,a=n):"function"==typeof e&&(i=e.name||"Autorun@"+ft(),o=e,a=t),Ve(o,"autorun methods cannot have modifiers"),pt("function"==typeof o,"autorun expects a function"),a&&(o=o.bind(a));var s=new zt(i,function(){this.track(r)});return s.schedule(),s.getDisposer()}function s(e,t,n,r){var i,o,s,u;"string"==typeof e?(i=e,o=t,s=n,u=r):"function"==typeof e&&(i="When@"+ft(),o=e,s=t,u=n);var c=a(i,function(e){if(o.call(u)){e.dispose();var t=Y();s.call(u),X(t)}});return c}function u(e,t,n){return ht("`autorunUntil` is deprecated, please use `when`."),s.apply(null,arguments)}function c(e,t,n,r){function i(){a(l)}var o,a,s,u;"string"==typeof e?(o=e,a=t,s=n,u=r):"function"==typeof e&&(o=e.name||"AutorunAsync@"+ft(),a=e,s=t,u=n),void 0===s&&(s=1),u&&(a=a.bind(u));var c=!1,l=new zt(o,function(){c||(c=!0,setTimeout(function(){c=!1,l.isDisposed||l.track(i)},s))});return l.schedule(),l.getDisposer()}function l(e,n,r,i,o,a){function s(){if(!_.isDisposed){var e=!1;_.track(function(){var t=b(_);e=gt(y,w,t),w=t}),m&&f&&l(w,_),m||e!==!0||l(w,_),m&&(m=!1)}}var u,c,l,f,p,h;"string"==typeof e?(u=e,c=n,l=r,f=i,p=o,h=a):(u=e.name||n.name||"Reaction@"+ft(),c=e,l=n,f=r,p=i,h=o),void 0===f&&(f=!1),void 0===p&&(p=0);var d=De(c,Kt.Reference),v=d[0],b=d[1],y=v===Kt.Structure;h&&(b=b.bind(h),l=t(u,l.bind(h)));var m=!0,g=!1,w=void 0,_=new zt(u,function(){p<1?s():g||(g=!0,setTimeout(function(){g=!1,s()},p))});return _.schedule(),_.getDisposer()}function f(e,t,n,r){return arguments.length<3&&"function"==typeof e?p(e,t):(pt(!n||!n.set,"@observable properties cannot have a setter: "+t),kt.apply(null,arguments))}function p(e,t){var n=De(e,Kt.Recursive),r=n[0],i=n[1];return new Lt(i,t,r===Kt.Structure,i.name)}function h(){throw new Error("[ComputedValue] It is not allowed to assign new values to computed properties.")}function d(e,t){pt("function"==typeof e&&1===e.length,"createTransformer expects a function that accepts one argument");var n={},r=Mt.resetId,i=function(r){function i(t,n){r.call(this,function(){return e(n)},null,!1,"Transformer-"+e.name+"-"+t),this.sourceIdentifier=t,this.sourceObject=n}return Tt(i,r),i.prototype.onBecomeUnobserved=function(){var e=this.value;r.prototype.onBecomeUnobserved.call(this),delete n[this.sourceIdentifier],t&&t(e,this.sourceObject)},i}(Lt);return function(e){r!==Mt.resetId&&(n={},r=Mt.resetId);var t=v(e),o=n[t];return o?o.get():(o=n[t]=new i(t,e),o.get())}}function v(e){if(null===e||"object"!=typeof e)throw new Error("[mobx] transform expected some kind of object, got: "+e);var t=e.$transformId;return void 0===t&&(t=ft(),_t(e,"$transformId",t)),t}function b(e,t){return F()||console.warn("[mobx.expr] 'expr' should only be used inside other reactive functions."),f(e,t).get()}function y(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return pt(arguments.length>=2,"extendObservable expected 2 or more arguments"),pt("object"==typeof e,"extendObservable expects an object as first argument"),pt(!(e instanceof nn),"extendObservable should not be used on maps, use map.merge instead"),t.forEach(function(t){pt("object"==typeof t,"all arguments of extendObservable should be objects"),m(e,t,Kt.Recursive,null)}),e}function m(e,t,n,r){var i=We(e,r,n);for(var o in t)if(t.hasOwnProperty(o)){if(e===t&&!Ot(e,o))continue;He(i,o,t[o])}return e}function g(e,t){return w(tt(e,t))}function w(e){var t={name:e.name};return e.observing&&e.observing.length>0&&(t.dependencies=vt(e.observing).map(w)),t}function _(e,t){return x(tt(e,t))}function x(e){var t={name:e.name};return ne(e)&&re(e)&&(t.observers=ie(e).map(x)),t}function O(e,t,n){return"function"==typeof n?A(e,t,n):S(e,t)}function S(e,t){return yt(e)&&!et(e)?(ht("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),nt(I(e)).intercept(t)):nt(e).intercept(t)}function A(e,t,n){return yt(e)&&!et(e)?(ht("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),y(e,{property:e[t]}),A(e,t,n)):nt(e,t).intercept(n)}function R(e,t){if(null===e||void 0===e)return!1;if(void 0!==t){if(e instanceof nn||e instanceof Zt)throw new Error("[mobx.isObservable] isObservable(object, propertyName) is not supported for arrays and maps. Use map.has or array.length instead.");if(et(e)){var n=e.$mobx;return n.values&&!!n.values[t]}return!1}return!!e.$mobx||e instanceof Pt||e instanceof zt||e instanceof Lt}function T(e,t,n){return pt(arguments.length>=2&&arguments.length<=3,"Illegal decorator config",t),St(e,t),pt(!n||!n.get,"@observable can not be used on getters, use @computed instead"),jt.apply(null,arguments)}function I(e,t){if(void 0===e&&(e=void 0),"string"==typeof arguments[1])return T.apply(null,arguments);if(pt(arguments.length<3,"observable expects zero, one or two arguments"),R(e))return e;var n=De(e,Kt.Recursive),r=n[0],i=n[1],o=r===Kt.Reference?Et.Reference:k(i);switch(o){case Et.Array:case Et.PlainObject:return Ne(i,r);case Et.Reference:case Et.ComplexObject:return new un(i,r);case Et.ComplexFunction:throw new Error("[mobx.observable] To be able to make a function reactive it should not have arguments. If you need an observable reference to a function, use `observable(asReference(f))`");case Et.ViewFunction:return ht("Use `computed(expr)` instead of `observable(expr)`"),f(e,t)}pt(!1,"Illegal State")}function k(e){return null===e||void 0===e?Et.Reference:"function"==typeof e?e.length?Et.ComplexFunction:Et.ViewFunction:Array.isArray(e)||e instanceof Zt?Et.Array:"object"==typeof e?yt(e)?Et.PlainObject:Et.ComplexObject:Et.Reference}function j(e,t,n,r){return"function"==typeof n?P(e,t,n,r):E(e,t,n)}function E(e,t,n){return yt(e)&&!et(e)?(ht("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),nt(I(e)).observe(t,n)):nt(e).observe(t,n)}function P(e,t,n,r){return yt(e)&&!et(e)?(ht("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),y(e,{property:e[t]}),P(e,t,n,r)):nt(e,t).observe(n,r)}function C(e,t,n){function r(r){return t&&n.push([e,r]),r}if(void 0===t&&(t=!0),void 0===n&&(n=null),e instanceof Date||e instanceof RegExp)return e;if(t&&null===n&&(n=[]),t&&null!==e&&"object"==typeof e)for(var i=0,o=n.length;i<o;i++)if(n[i][0]===e)return n[i][1];if(!e)return e;if(Array.isArray(e)||e instanceof Zt){var a=r([]),s=e.map(function(e){return C(e,t,n)});a.length=s.length;for(var i=0,o=s.length;i<o;i++)a[i]=s[i];return a}if(e instanceof nn){var u=r({});return e.forEach(function(e,r){return u[r]=C(e,t,n)}),u}if(R(e)&&e.$mobx instanceof un)return C(e(),t,n);if(e instanceof un)return C(e.get(),t,n);if("object"==typeof e){var a=r({});for(var c in e)a[c]=C(e[c],t,n);return a}return e}function D(e,t,n){return void 0===t&&(t=!0),void 0===n&&(n=null),ht("toJSON is deprecated. Use toJS instead"),C.apply(null,arguments)}function L(e){return console.log(e),e}function N(e,t){switch(arguments.length){case 0:if(e=Mt.trackingDerivation,!e)return L("whyRun() can only be used if a derivation is active, or by passing an computed value / reaction explicitly. If you invoked whyRun from inside a computation; the computation is currently suspended but re-evaluating because somebody requested it's value.");break;case 2:e=tt(e,t)}return e=tt(e),e instanceof Lt?L(e.whyRun()):e instanceof zt?L(e.whyRun()):void pt(!1,"whyRun can only be used on reactions and computed values")}function V(e,t){pt("function"==typeof t,"`action` can only be invoked on functions"),pt("string"==typeof e&&e.length>0,"actions should have valid names, got: '"+e+"'");var n=function(){return $(e,t,this,arguments)};return n.isMobxAction=!0,n}function $(e,t,n,r){pt(!(Mt.trackingDerivation instanceof Lt),"Computed values or transformers should not invoke actions or trigger other side effects");var i,o=ve();if(o){i=Date.now();var a=r&&r.length||0,s=new Array(a);if(a>0)for(var u=0;u<a;u++)s[u]=r[u];ye({type:"action",name:e,fn:t,target:n,arguments:s})}var c=Y();xe(e,n,!1);var l=z(!0);try{return t.apply(n,r)}finally{B(l),Oe(!1),X(c),o&&me({time:Date.now()-i})}}function U(e){return 0===arguments.length?Mt.strictMode:(pt(null===Mt.trackingDerivation,"It is not allowed to set `useStrict` when a derivation is running"),Mt.strictMode=e,Mt.allowStateChanges=!e,void 0)}function M(e,t){var n=z(e),r=t();return B(n),r}function z(e){var t=Mt.allowStateChanges;return Mt.allowStateChanges=e,t}function B(e){Mt.allowStateChanges=e}function G(e){switch(e.dependenciesState){case Nt.UP_TO_DATE:return!1;case Nt.NOT_TRACKING:case Nt.STALE:return!0;case Nt.POSSIBLY_STALE:var t=!0,n=Y();try{for(var r=e.observing,i=r.length,o=0;o<i;o++){var a=r[o];if(a instanceof Lt&&(a.get(),e.dependenciesState===Nt.STALE))return t=!1,X(n),!0}return t=!1,Q(e),X(n),!1}finally{t&&Q(e)}}}function F(){return null!==Mt.trackingDerivation}function K(){Mt.allowStateChanges||pt(!1,Mt.strictMode?"It is not allowed to create or change state outside an `action` when MobX is in strict mode. Wrap the current method in `action` if this state change is intended":"It is not allowed to change the state when a computed value or transformer is being evaluated. Use 'autorun' to create reactive functions with side-effects.")}function J(e,t){Q(e),e.newObserving=new Array(e.observing.length+100),e.unboundDepsCount=0,e.runId=++Mt.runId;var n=Mt.trackingDerivation;Mt.trackingDerivation=e;var r,i=!0;try{r=t.call(e),i=!1}finally{if(i){var o="[mobx] An uncaught exception occurred while calculating your computed value, autorun or transformer. Or inside the render() method of an observer based React component. These functions should never throw exceptions as MobX will not always be able to recover from them. "+("Please fix the error reported after this message or enable 'Pause on (caught) exceptions' in your debugger to find the root cause. In: '"+e.name+"'. ")+"For more details see https://github.com/mobxjs/mobx/issues/462";ve()&&be({type:"error",object:this,message:o}),console.warn(o),Q(e),e.newObserving=null,e.unboundDepsCount=0,e.recoverFromError(),ee()}else Mt.trackingDerivation=n,W(e)}return r}function W(e){var t=e.observing,n=e.observing=e.newObserving;e.newObserving=null;for(var r=0,i=e.unboundDepsCount,o=0;o<i;o++){var a=n[o];0===a.diffValue&&(a.diffValue=1,r!==o&&(n[r]=a),r++)}for(n.length=r,i=t.length;i--;){var a=t[i];0===a.diffValue&&ae(a,e),a.diffValue=0}for(;r--;){var a=n[r];1===a.diffValue&&(a.diffValue=0,oe(a,e))}}function H(e){for(var t=e.observing,n=t.length;n--;)ae(t[n],e);e.dependenciesState=Nt.NOT_TRACKING,t.length=0}function q(e){var t=Y(),n=e();return X(t),n}function Y(){var e=Mt.trackingDerivation;return Mt.trackingDerivation=null,e}function X(e){Mt.trackingDerivation=e}function Q(e){if(e.dependenciesState!==Nt.UP_TO_DATE){e.dependenciesState=Nt.UP_TO_DATE;for(var t=e.observing,n=t.length;n--;)t[n].lowestObserverState=Nt.UP_TO_DATE}}function Z(){}function ee(){Mt.resetId++;var e=new Ut;for(var t in e)$t.indexOf(t)===-1&&(Mt[t]=e[t]);Mt.allowStateChanges=!Mt.strictMode}function te(e){return{get length(){return e._observers.length},asArray:function(){return ie(e)}}}function ne(e){return!!e&&void 0!==e.lastAccessedBy}function re(e){return e._observers.length>0}function ie(e){return e._observers}function oe(e,t){var n=e._observers.length;n&&(e._observersIndexes[t.__mapid]=n),e._observers[n]=t,e.lowestObserverState>t.dependenciesState&&(e.lowestObserverState=t.dependenciesState)}function ae(e,t){if(1===e._observers.length)e._observers.length=0,se(e);else{var n=e._observers,r=e._observersIndexes,i=n.pop();if(i!==t){var o=r[t.__mapid]||0;o?r[i.__mapid]=o:delete r[i.__mapid],n[o]=i}delete r[t.__mapid]}}function se(e){e.isPendingUnobservation||(e.isPendingUnobservation=!0,Mt.pendingUnobservations.push(e))}function ue(){Mt.inBatch++}function ce(){if(1===Mt.inBatch){for(var e=Mt.pendingUnobservations,t=0;t<e.length;t++){var n=e[t];n.isPendingUnobservation=!1,0===n._observers.length&&n.onBecomeUnobserved()}Mt.pendingUnobservations=[]}Mt.inBatch--}function le(e){var t=Mt.trackingDerivation;null!==t?t.runId!==e.lastAccessedBy&&(e.lastAccessedBy=t.runId,t.newObserving[t.unboundDepsCount++]=e):0===e._observers.length&&se(e)}function fe(e){if(e.lowestObserverState!==Nt.STALE){e.lowestObserverState=Nt.STALE;for(var t=e._observers,n=t.length;n--;){var r=t[n];r.dependenciesState===Nt.UP_TO_DATE&&r.onBecomeStale(),r.dependenciesState=Nt.STALE}}}function pe(e){if(e.lowestObserverState!==Nt.STALE){e.lowestObserverState=Nt.STALE;for(var t=e._observers,n=t.length;n--;){var r=t[n];r.dependenciesState===Nt.POSSIBLY_STALE?r.dependenciesState=Nt.STALE:r.dependenciesState===Nt.UP_TO_DATE&&(e.lowestObserverState=Nt.UP_TO_DATE)}}}function he(e){if(e.lowestObserverState===Nt.UP_TO_DATE){e.lowestObserverState=Nt.POSSIBLY_STALE;for(var t=e._observers,n=t.length;n--;){var r=t[n];r.dependenciesState===Nt.UP_TO_DATE&&(r.dependenciesState=Nt.POSSIBLY_STALE,r.onBecomeStale())}}}function de(){if(!(Mt.isRunningReactions===!0||Mt.inTransaction>0)){Mt.isRunningReactions=!0;for(var e=Mt.pendingReactions,t=0;e.length>0;){if(++t===Bt)throw new Error("Reaction doesn't converge to a stable state after "+Bt+" iterations. Probably there is a cycle in the reactive function: "+e[0]);for(var n=e.splice(0),r=0,i=n.length;r<i;r++)n[r].runReaction()}Mt.isRunningReactions=!1}}function ve(){return Gt}function be(e){if(!Gt)return!1;for(var t=Mt.spyListeners,n=0,r=t.length;n<r;n++)t[n](e)}function ye(e){var t=mt({},e,{spyReportStart:!0});be(t)}function me(e){be(e?mt({},e,Ft):Ft)}function ge(e){return Mt.spyListeners.push(e),Gt=Mt.spyListeners.length>0,dt(function(){var t=Mt.spyListeners.indexOf(e);t!==-1&&Mt.spyListeners.splice(t,1),Gt=Mt.spyListeners.length>0})}function we(e){return ht("trackTransitions is deprecated. Use mobx.spy instead"),"boolean"==typeof e&&(ht("trackTransitions only takes a single callback function. If you are using the mobx-react-devtools, please update them first"),e=arguments[1]),e?ge(e):(ht("trackTransitions without callback has been deprecated and is a no-op now. If you are using the mobx-react-devtools, please update them first"),function(){})}function _e(e,t,n){void 0===t&&(t=void 0),void 0===n&&(n=!0),xe(e.name||"anonymous transaction",t,n);var r=e.call(t);return Oe(n),r}function xe(e,t,n){void 0===t&&(t=void 0),void 0===n&&(n=!0),ue(),Mt.inTransaction+=1,n&&ve()&&ye({type:"transaction",target:t,name:e})}function Oe(e){void 0===e&&(e=!0),0===--Mt.inTransaction&&de(),e&&ve()&&me(),ce()}function Se(e){return e.interceptors&&e.interceptors.length>0}function Ae(e,t){var n=e.interceptors||(e.interceptors=[]);return n.push(t),dt(function(){var e=n.indexOf(t);e!==-1&&n.splice(e,1)})}function Re(e,t){for(var n=Y(),r=e.interceptors,i=0,o=r.length;i<o;i++)if(t=r[i](t),pt(!t||t.type,"Intercept handlers should return nothing or a change object"),!t)return null;return X(n),t}function Te(e){return e.changeListeners&&e.changeListeners.length>0}function Ie(e,t){var n=e.changeListeners||(e.changeListeners=[]);return n.push(t),dt(function(){var e=n.indexOf(t);e!==-1&&n.splice(e,1)})}function ke(e,t){var n=Y(),r=e.changeListeners;if(r){r=r.slice();for(var i=0,o=r.length;i<o;i++)Array.isArray(t)?r[i].apply(null,t):r[i](t);X(n)}}function je(e){return new Jt(e)}function Ee(e){return new Wt(e)}function Pe(e){return new Ht(e)}function Ce(e,t){return Ke(e,t)}function De(e,t){return e instanceof Jt?[Kt.Reference,e.value]:e instanceof Wt?[Kt.Structure,e.value]:e instanceof Ht?[Kt.Flat,e.value]:[t,e]}function Le(e){return e===je?Kt.Reference:e===Ee?Kt.Structure:e===Pe?Kt.Flat:(pt(void 0===e,"Cannot determine value mode from function. Please pass in one of these: mobx.asReference, mobx.asStructure or mobx.asFlat, got: "+e),Kt.Recursive)}function Ne(e,t,n){var r;if(R(e))return e;switch(t){case Kt.Reference:return e;case Kt.Flat:Ve(e,"Items inside 'asFlat' cannot have modifiers"),r=Kt.Reference;break;case Kt.Structure:Ve(e,"Items inside 'asStructure' cannot have modifiers"),r=Kt.Structure;break;case Kt.Recursive:i=De(e,Kt.Recursive),r=i[0],e=i[1];break;default:pt(!1,"Illegal State")}return Array.isArray(e)?Be(e,r,n):yt(e)&&Object.isExtensible(e)?m(e,e,r,n):e;var i}function Ve(e,t){if(e instanceof Jt||e instanceof Wt||e instanceof Ht)throw new Error("[mobx] asStructure / asReference / asFlat cannot be used here. "+t)}function $e(e){var t=Ue(e),n=Me(e);Object.defineProperty(Zt.prototype,""+e,{enumerable:!1,configurable:!0,set:t,get:n})}function Ue(e){return function(t){var n=this.$mobx,r=n.values;if(Ve(t,"Modifiers cannot be used on array values. For non-reactive array values use makeReactive(asFlat(array))."),e<r.length){K();var i=r[e];if(Se(n)){var o=Re(n,{type:"update",object:n.array,index:e,newValue:t});if(!o)return;t=o.newValue}t=n.makeReactiveArrayItem(t);var a=n.mode===Kt.Structure?!Rt(i,t):i!==t;a&&(r[e]=t,n.notifyArrayChildUpdate(e,t,i))}else{if(e!==r.length)throw new Error("[mobx.array] Index out of bounds, "+e+" is larger than "+r.length);n.spliceWithArray(e,0,[t])}}}function Me(e){return function(){var t=this.$mobx;return t&&e<t.values.length?(t.atom.reportObserved(),t.values[e]):void 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")}}function ze(e){for(var t=Yt;t<e;t++)$e(t);Yt=e}function Be(e,t,n){return new Zt(e,t,n)}function Ge(e){return ht("fastArray is deprecated. Please use `observable(asFlat([]))`"),Be(e,Kt.Flat,null)}function Fe(e){return e instanceof Zt}function Ke(e,t){return new nn(e,t)}function Je(e){return e instanceof nn}function We(e,t,n){if(void 0===n&&(n=Kt.Recursive),et(e))return e.$mobx;yt(e)||(t=e.constructor.name+"@"+ft()),t||(t="ObservableObject@"+ft());var r=new rn(e,t,n);return xt(e,"$mobx",r),r}function He(e,t,n){e.values[t]?e.target[t]=n:qe(e,t,n,!0)}function qe(e,t,n,r){r&&St(e.target,t);var i,a=e.name+"."+t,s=!0;if("function"!=typeof n||0!==n.length||o(n))if(n instanceof Wt&&"function"==typeof n.value&&0===n.value.length)i=new Lt(n.value,e.target,(!0),a);else{if(s=!1,Se(e)){var u=Re(e,{object:e.target,name:t,type:"add",newValue:n});if(!u)return;n=u.newValue}i=new un(n,e.mode,a,(!1)),n=i.value}else i=new Lt(n,e.target,(!1),a);e.values[t]=i,r&&Object.defineProperty(e.target,t,s?Xe(t):Ye(t)),s||Ze(e,e.target,t,n)}function Ye(e){var t=on[e];return t?t:on[e]={configurable:!0,enumerable:!0,get:function(){return this.$mobx.values[e].get()},set:function(t){Qe(this,e,t)}}}function Xe(e){var t=an[e];return t?t:an[e]={configurable:!0,enumerable:!1,get:function(){return this.$mobx.values[e].get()},set:h}}function Qe(e,t,n){var r=e.$mobx,i=r.values[t];if(Se(r)){var o=Re(r,{type:"update",object:e,name:t,newValue:n});if(!o)return;n=o.newValue}if(n=i.prepareNewValue(n),n!==sn){var a=Te(r),s=ve(),o=ke||Te?{type:"update",object:e,oldValue:i.value,name:t,newValue:n}:null;s&&ye(o),i.setNewValue(n),a&&ke(r,o),s&&me()}}function Ze(e,t,n,r){var i=Te(e),o=ve(),a=i||o?{type:"add",object:t,name:n,newValue:r}:null;o&&ye(a),i&&ke(e,a),o&&me()}function et(e){return"object"==typeof e&&null!==e&&(at(e),e.$mobx instanceof rn)}function tt(e,t){if("object"==typeof e&&null!==e){if(Fe(e))return pt(void 0===t,"It is not possible to get index atoms from arrays"),e.$mobx.atom;if(Je(e)){if(void 0===t)return tt(e._keys);var n=e._data[t]||e._hasMap[t];return pt(!!n,"the entry '"+t+"' does not exist in the observable map '"+rt(e)+"'"),n}if(at(e),et(e)){pt(!!t,"please specify a property");var r=e.$mobx.values[t];return pt(!!r,"no observable property '"+t+"' found on the observable object '"+rt(e)+"'"),r}if(e instanceof Pt||e instanceof Lt||e instanceof zt)return e}else if("function"==typeof e&&e.$mobx instanceof zt)return e.$mobx;pt(!1,"Cannot obtain atom from "+e)}function nt(e,t){return pt(e,"Expection some object"),void 0!==t?nt(tt(e,t)):e instanceof Pt||e instanceof Lt||e instanceof zt?e:Je(e)?e:(at(e),e.$mobx?e.$mobx:void pt(!1,"Cannot obtain administration from "+e))}function rt(e,t){var n;return n=void 0!==t?tt(e,t):et(e)||Je(e)?nt(e):tt(e),n.name}function it(e,t,n,r,i){function o(o,a,s,u){if(pt(i||st(arguments),"This function is a decorator, but it wasn't invoked like a decorator"),s){o.hasOwnProperty("__mobxLazyInitializers")||_t(o,"__mobxLazyInitializers",o.__mobxLazyInitializers&&o.__mobxLazyInitializers.slice()||[]);var c=s.value,l=s.initializer;return o.__mobxLazyInitializers.push(function(t){e(t,a,l?l.call(t):c,u,s)}),{enumerable:r,configurable:!0,get:function(){return this.__mobxDidRunLazyInitializers!==!0&&at(this),t.call(this,a)},set:function(e){this.__mobxDidRunLazyInitializers!==!0&&at(this),n.call(this,a,e)}}}var f={enumerable:r,configurable:!0,get:function(){return this.__mobxInitializedProps&&this.__mobxInitializedProps[a]===!0||ot(this,a,void 0,e,u,s),t.call(this,a)},set:function(t){this.__mobxInitializedProps&&this.__mobxInitializedProps[a]===!0?n.call(this,a,t):ot(this,a,t,e,u,s)}};return arguments.length<3&&Object.defineProperty(o,a,f),f}return i?function(){if(st(arguments))return o.apply(null,arguments);var e=arguments;return function(t,n,r){return o(t,n,r,e)}}:o}function ot(e,t,n,r,i,o){e.hasOwnProperty("__mobxInitializedProps")||_t(e,"__mobxInitializedProps",{}),e.__mobxInitializedProps[t]=!0,r(e,t,n,i,o)}function at(e){e.__mobxDidRunLazyInitializers!==!0&&e.__mobxLazyInitializers&&(_t(e,"__mobxDidRunLazyInitializers",!0),e.__mobxDidRunLazyInitializers&&e.__mobxLazyInitializers.forEach(function(t){return t(e)}))}function st(e){return(2===e.length||3===e.length)&&"string"==typeof e[1]}function ut(){return"function"==typeof Symbol&&Symbol.iterator||"@@iterator"}function ct(e){pt(e[cn]!==!0,"Illegal state: cannot recycle array as iterator"),xt(e,cn,!0);var t=-1;return xt(e,"next",function(){return t++,{done:t>=this.length,value:t<this.length?this[t]:void 0}}),e}function lt(e,t){xt(e,ut(),t)}function ft(){return++Mt.mobxGuid}function pt(e,t,n){if(!e)throw new Error("[mobx] Invariant failed: "+t+(n?" in '"+n+"'":""))}function ht(e){dn.indexOf(e)===-1&&(dn.push(e),console.error("[mobx] Deprecated: "+e))}function dt(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}function vt(e){var t=[];return e.forEach(function(e){t.indexOf(e)===-1&&t.push(e)}),t}function bt(e,t,n){if(void 0===t&&(t=100),void 0===n&&(n=" - "),!e)return"";var r=e.slice(0,t);return""+r.join(n)+(e.length>t?" (... and "+(e.length-t)+"more)":"")}function yt(e){if(null===e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}function mt(){for(var e=arguments[0],t=1,n=arguments.length;t<n;t++){var r=arguments[t];for(var i in r)r.hasOwnProperty(i)&&(e[i]=r[i])}return e}function gt(e,t,n){return e?!Rt(t,n):t!==n}function wt(e,t){for(var n=0;n<t.length;n++)_t(e,t[n],e[t[n]])}function _t(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function xt(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!1,configurable:!0,value:n})}function Ot(e,t){var n=Object.getOwnPropertyDescriptor(e,t);return!n||n.configurable!==!1&&n.writable!==!1}function St(e,t){pt(Ot(e,t),"Cannot make property '"+t+"' observable, it is not configurable and writable in the target object")}function At(e){var t=[];for(var n in e)t.push(n);return t}function Rt(e,t){if(null===e&&null===t)return!0;if(void 0===e&&void 0===t)return!0;var n=Array.isArray(e)||Fe(e);if(n!==(Array.isArray(t)||Fe(t)))return!1;if(n){if(e.length!==t.length)return!1;for(var r=e.length-1;r>=0;r--)if(!Rt(e[r],t[r]))return!1;return!0}if("object"==typeof e&&"object"==typeof t){if(null===e||null===t)return!1;if(At(e).length!==At(t).length)return!1;for(var i in e){if(!(i in t))return!1;if(!Rt(e[i],t[i]))return!1}return!0}return e===t}var Tt=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)};Z(),n.extras={allowStateChanges:M,getAtom:tt,getDebugName:rt,getDependencyTree:g,getObserverTree:_,isComputingDerivation:F,isSpyEnabled:ve,resetGlobalState:ee,spyReport:be,spyReportEnd:me,spyReportStart:ye,trackTransitions:we},n._={getAdministration:nt,resetGlobalState:ee};var It=it(function(e,n,r,i,o){var a=i&&1===i.length?i[0]:r.name||n||"<unnamed action>",s=t(a,r);_t(e,n,s)},function(e){return this[e]},function(){pt(!1,"It is not allowed to assign new values to @action fields")},!1,!0);n.action=t,n.runInAction=i,n.isAction=o,n.autorun=a,n.when=s,n.autorunUntil=u,n.autorunAsync=c,n.reaction=l;var kt=it(function(e,t,n,r,i){pt("undefined"!=typeof i,"@computed can only be used on getter functions, like: '@computed get myProps() { return ...; }'. It looks like it was used on a property.");var o=i.get;pt("function"==typeof o,"@computed can only be used on getter functions, like: '@computed get myProps() { return ...; }'");var a=!1;r&&1===r.length&&r[0].asStructure===!0&&(a=!0);var s=We(e,void 0,Kt.Recursive);qe(s,t,a?Ee(o):o,!1)},function(e){return this.$mobx.values[e].get()},h,!1,!0);n.computed=f,n.createTransformer=d,n.expr=b,n.extendObservable=y,n.intercept=O,n.isObservable=R;var jt=it(function(e,t,n){var r=z(!0);"function"==typeof n&&(n=je(n));var i=We(e,void 0,Kt.Recursive);qe(i,t,n,!0),B(r)},function(e){return this.$mobx.values[e].get()},function(e,t){Qe(this,e,t)},!0,!1);n.observable=I;var Et;!function(e){e[e.Reference=0]="Reference",e[e.PlainObject=1]="PlainObject",e[e.ComplexObject=2]="ComplexObject",e[e.Array=3]="Array",e[e.ViewFunction=4]="ViewFunction",e[e.ComplexFunction=5]="ComplexFunction"}(Et||(Et={})),n.observe=j,n.toJS=C,n.toJSON=D,n.whyRun=N,n.useStrict=U;var Pt=function(){function e(e){void 0===e&&(e="Atom@"+ft()),this.name=e,this.isPendingUnobservation=!0,this.isObserved=!1,this._observers=[],this._observersIndexes={},this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=Nt.NOT_TRACKING}return e.prototype.onBecomeUnobserved=function(){},Object.defineProperty(e.prototype,"observers",{get:function(){return te(this)},enumerable:!0,configurable:!0}),e.prototype.reportObserved=function(){le(this)},e.prototype.reportChanged=function(){xe("propagatingAtomChange",null,!1),fe(this),Oe(!1)},e.prototype.toString=function(){return this.name},e}();n.BaseAtom=Pt;var Ct=function(e){function t(t,n,r){void 0===t&&(t="Atom@"+ft()),void 0===n&&(n=vn),void 0===r&&(r=vn),e.call(this,t),this.name=t,this.onBecomeObservedHandler=n,this.onBecomeUnobservedHandler=r,this.isPendingUnobservation=!1,this.isBeingTracked=!1}return Tt(t,e),t.prototype.reportObserved=function(){return ue(),e.prototype.reportObserved.call(this),this.isBeingTracked||(this.isBeingTracked=!0,this.onBecomeObservedHandler()),ce(),!!Mt.trackingDerivation},t.prototype.onBecomeUnobserved=function(){this.isBeingTracked=!1,this.onBecomeUnobservedHandler()},t}(Pt);n.Atom=Ct;var Dt,Lt=function(){function e(e,t,n,r){this.derivation=e,this.scope=t,this.compareStructural=n,this.dependenciesState=Nt.NOT_TRACKING,this.observing=[],this.newObserving=null,this.isObserved=!1,this._observers=[],this._observersIndexes={},this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.lowestObserverState=Nt.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+ft(),this.value=void 0,this.isComputing=!1,this.name=r||"ComputedValue@"+ft()}return Object.defineProperty(e.prototype,"observers",{get:function(){return te(this)},enumerable:!0,configurable:!0}),e.prototype.peek=function(){this.isComputing=!0;var e=z(!1),t=this.derivation.call(this.scope);return B(e),this.isComputing=!1,t},e.prototype.onBecomeStale=function(){he(this)},e.prototype.onBecomeUnobserved=function(){pt(this.dependenciesState!==Nt.NOT_TRACKING,"INTERNAL ERROR only onBecomeUnobserved shouldn't be called twice in a row"),H(this),this.value=void 0},e.prototype.get=function(){pt(!this.isComputing,"Cycle detected in computation "+this.name,this.derivation),ue(),1===Mt.inBatch?G(this)&&(this.value=this.peek()):(le(this),G(this)&&this.trackAndCompute()&&pe(this));var e=this.value;return ce(),e},e.prototype.recoverFromError=function(){this.isComputing=!1,ce()},e.prototype.set=function(e){throw new Error("[ComputedValue '"+name+"'] It is not possible to assign a new value to a computed value.")},e.prototype.trackAndCompute=function(){ve()&&be({object:this,type:"compute",fn:this.derivation,target:this.scope});var e=this.value,t=this.value=J(this,this.peek);return gt(this.compareStructural,t,e)},e.prototype.observe=function(e,t){var n=this,r=!0,i=void 0;return a(function(){var o=n.get();if(!r||t){var a=Y();e(o,i),X(a)}r=!1,i=o})},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},e.prototype.whyRun=function(){var e=Boolean(Mt.trackingDerivation),t=vt(this.observing).map(function(e){return e.name}),n=vt(ie(this).map(function(e){return e.name})),r=this.isComputing?Dt.GET:Dt.NOT_RUNNING;if(r===Dt.GET){var i=Mt.trackingDerivation;i&&n.push(i.name)}return"\nWhyRun? computation '"+this.name+"':\n * Running because: "+Vt[r]+" "+(r===Dt.NOT_RUNNING&&this.dependenciesState>Nt.UP_TO_DATE?"(a next run is scheduled)":"")+"\n"+(this.dependenciesState===Nt.NOT_TRACKING?" * This computation is suspended (not in use by any reaction) and won't run automatically.\n\tDidn't expect this computation to be suspended at this point?\n\t 1. Make sure this computation is used by a reaction (reaction, autorun, observer).\n\t 2. Check whether you are using this computation synchronously (in the same stack as they reaction that needs it).\n":" * This computation will re-run if any of the following observables changes:\n "+bt(t)+"\n "+(this.isComputing&&e?" (... or any observable accessed during the remainder of the current run)":"")+"\n\tMissing items in this list?\n\t 1. Check whether all used values are properly marked as observable (use isObservable to verify)\n\t 2. Make sure you didn't dereference values too early. MobX observes props, not primitives. E.g: use 'person.name' instead of 'name' in your computation.\n * If the outcome of this computation changes, the following observers will be re-run:\n "+bt(n)+"\n")},e}();!function(e){e[e.GET=0]="GET",e[e.NOT_RUNNING=1]="NOT_RUNNING"}(Dt||(Dt={}));var Nt,Vt=(hn={},hn[Dt.GET]="[get] The value of this computed value was requested",hn[Dt.NOT_RUNNING]="[idle] This compution is currently not running",hn);!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"}(Nt||(Nt={})),n.IDerivationState=Nt,n.untracked=q;var $t=["mobxGuid","resetId","spyListeners","strictMode","runId"],Ut=function(){function e(){this.version=4,this.trackingDerivation=null,this.runId=0,this.mobxGuid=0,this.inTransaction=0,this.isRunningReactions=!1,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.allowStateChanges=!0,this.strictMode=!1,this.resetId=0,this.spyListeners=[]}return e}(),Mt=function(){var t=new Ut;if(e.__mobservableTrackingStack||e.__mobservableViewStack)throw new Error("[mobx] An incompatible version of mobservable is already loaded.");if(e.__mobxGlobal&&e.__mobxGlobal.version!==t.version)throw new Error("[mobx] An incompatible version of mobx is already loaded.");return e.__mobxGlobal?e.__mobxGlobal:e.__mobxGlobal=t}(),zt=function(){function e(e,t){void 0===e&&(e="Reaction@"+ft()),this.name=e,this.onInvalidate=t,this.observing=[],this.newObserving=[],this.dependenciesState=Nt.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+ft(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1}return e.prototype.onBecomeStale=function(){this.schedule()},e.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,Mt.pendingReactions.push(this),ue(),de(),ce())},e.prototype.isScheduled=function(){return this._isScheduled},e.prototype.runReaction=function(){this.isDisposed||(this._isScheduled=!1,G(this)&&(this._isTrackPending=!0,this.onInvalidate(),this._isTrackPending&&ve()&&be({object:this,type:"scheduled-reaction"})))},e.prototype.track=function(e){ue();var t,n=ve();n&&(t=Date.now(),ye({object:this,type:"reaction",fn:e})),this._isRunning=!0,J(this,e),this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&H(this),n&&me({time:Date.now()-t}),ce()},e.prototype.recoverFromError=function(){this._isRunning=!1,this._isTrackPending=!1},e.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(ue(),H(this),ce()))},e.prototype.getDisposer=function(){var e=this.dispose.bind(this);return e.$mobx=this,e},e.prototype.toString=function(){return"Reaction["+this.name+"]"},e.prototype.whyRun=function(){var e=vt(this.observing).map(function(e){return e.name});return"\nWhyRun? reaction '"+this.name+"':\n * Status: ["+(this.isDisposed?"stopped":this._isRunning?"running":this.isScheduled()?"scheduled":"idle")+"]\n * This reaction will re-run if any of the following observables changes:\n "+bt(e)+"\n "+(this._isRunning?" (... or any observable accessed during the remainder of the current run)":"")+"\n\tMissing items in this list?\n\t 1. Check whether all used values are properly marked as observable (use isObservable to verify)\n\t 2. Make sure you didn't dereference values too early. MobX observes props, not primitives. E.g: use 'person.name' instead of 'name' in your computation.\n"},e}();n.Reaction=zt;var Bt=100,Gt=!1,Ft={spyReportEnd:!0};n.spy=ge,n.transaction=_e;var Kt;!function(e){e[e.Recursive=0]="Recursive",e[e.Reference=1]="Reference",e[e.Structure=2]="Structure",e[e.Flat=3]="Flat"}(Kt||(Kt={})),n.asReference=je,n.asStructure=Ee,n.asFlat=Pe;var Jt=function(){function e(e){this.value=e,Ve(e,"Modifiers are not allowed to be nested")}return e}(),Wt=function(){function e(e){this.value=e,Ve(e,"Modifiers are not allowed to be nested")}return e}(),Ht=function(){function e(e){this.value=e,Ve(e,"Modifiers are not allowed to be nested")}return e}();n.asMap=Ce;var qt=function(){var e=!1,t={};return Object.defineProperty(t,"0",{set:function(){e=!0}}),Object.create(t)[0]=1,e===!1}(),Yt=0,Xt=function(){function e(){}return e}();Xt.prototype=[];var Qt=function(){function e(e,t,n,r){this.mode=t,this.array=n,this.owned=r,this.lastKnownLength=0,this.interceptors=null,this.changeListeners=null,this.atom=new Pt(e||"ObservableArray@"+ft())}return e.prototype.makeReactiveArrayItem=function(e){return Ve(e,"Array values cannot have modifiers"),this.mode===Kt.Flat||this.mode===Kt.Reference?e:Ne(e,this.mode,this.atom.name+"[..]")},e.prototype.intercept=function(e){return Ae(this,e)},e.prototype.observe=function(e,t){return void 0===t&&(t=!1),t&&e({object:this.array,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),Ie(this,e)},e.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},e.prototype.setArrayLength=function(e){if("number"!=typeof e||e<0)throw new Error("[mobx.array] Out of range: "+e);var t=this.values.length;e!==t&&(e>t?this.spliceWithArray(t,0,new Array(e-t)):this.spliceWithArray(e,t-e))},e.prototype.updateArrayLength=function(e,t){if(e!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed. Did you use peek() to change it?");this.lastKnownLength+=t,t>0&&e+t+1>Yt&&ze(e+t+1)},e.prototype.spliceWithArray=function(e,t,n){K();var r=this.values.length;if(void 0===e?e=0:e>r?e=r:e<0&&(e=Math.max(0,r+e)),t=1===arguments.length?r-e:void 0===t||null===t?0:Math.max(0,Math.min(t,r-e)),void 0===n&&(n=[]),Se(this)){var i=Re(this,{object:this.array,type:"splice",index:e,removedCount:t,added:n});if(!i)return pn;t=i.removedCount,n=i.added}n=n.map(this.makeReactiveArrayItem,this);var o=n.length-t;this.updateArrayLength(r,o);var a=(s=this.values).splice.apply(s,[e,t].concat(n));return 0===t&&0===n.length||this.notifyArraySplice(e,n,a),a;var s},e.prototype.notifyArrayChildUpdate=function(e,t,n){var r=!this.owned&&ve(),i=Te(this),o=i||r?{object:this.array,type:"update",index:e,newValue:t,oldValue:n}:null;r&&ye(o),this.atom.reportChanged(),i&&ke(this,o),r&&me()},e.prototype.notifyArraySplice=function(e,t,n){var r=!this.owned&&ve(),i=Te(this),o=i||r?{object:this.array,type:"splice",index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;r&&ye(o),this.atom.reportChanged(),i&&ke(this,o),r&&me()},e}(),Zt=function(e){function t(t,n,r,i){void 0===i&&(i=!1),e.call(this);var o=new Qt(r,n,this,i);xt(this,"$mobx",o),t&&t.length?(o.updateArrayLength(0,t.length),o.values=t.map(o.makeReactiveArrayItem,o),o.notifyArraySplice(0,o.values.slice(),pn)):o.values=[],qt&&Object.defineProperty(o.array,"0",en)}return Tt(t,e),t.prototype.intercept=function(e){return this.$mobx.intercept(e)},t.prototype.observe=function(e,t){return void 0===t&&(t=!1),this.$mobx.observe(e,t)},t.prototype.clear=function(){return this.splice(0)},t.prototype.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];return this.$mobx.atom.reportObserved(),Array.prototype.concat.apply(this.slice(),e.map(function(e){return Fe(e)?e.slice():e}))},t.prototype.replace=function(e){return this.$mobx.spliceWithArray(0,this.$mobx.values.length,e)},t.prototype.toJS=function(){return this.slice()},t.prototype.toJSON=function(){return this.toJS()},t.prototype.peek=function(){return this.$mobx.values},t.prototype.find=function(e,t,n){void 0===n&&(n=0),this.$mobx.atom.reportObserved();for(var r=this.$mobx.values,i=r.length,o=n;o<i;o++)if(e.call(t,r[o],o,this))return r[o]},t.prototype.splice=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];switch(arguments.length){case 0:return[];case 1:return this.$mobx.spliceWithArray(e);case 2:return this.$mobx.spliceWithArray(e,t)}return this.$mobx.spliceWithArray(e,t,n)},t.prototype.push=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];var n=this.$mobx;return n.spliceWithArray(n.values.length,0,e),n.values.length},t.prototype.pop=function(){return this.splice(Math.max(this.$mobx.values.length-1,0),1)[0]},t.prototype.shift=function(){return this.splice(0,1)[0]},t.prototype.unshift=function(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];var n=this.$mobx;return n.spliceWithArray(0,0,e),n.values.length},t.prototype.reverse=function(){this.$mobx.atom.reportObserved();var e=this.slice();return e.reverse.apply(e,arguments)},t.prototype.sort=function(e){this.$mobx.atom.reportObserved();var t=this.slice();return t.sort.apply(t,arguments)},t.prototype.remove=function(e){var t=this.$mobx.values.indexOf(e);return t>-1&&(this.splice(t,1),!0)},t.prototype.toString=function(){return"[mobx.array] "+Array.prototype.toString.apply(this.$mobx.values,arguments)},t.prototype.toLocaleString=function(){return"[mobx.array] "+Array.prototype.toLocaleString.apply(this.$mobx.values,arguments)},t}(Xt);lt(Zt.prototype,function(){return ct(this.slice())}),wt(Zt.prototype,["constructor","observe","clear","concat","replace","toJSON","peek","find","splice","push","pop","shift","unshift","reverse","sort","remove","toString","toLocaleString"]),Object.defineProperty(Zt.prototype,"length",{enumerable:!1,configurable:!0,get:function(){return this.$mobx.getArrayLength()},set:function(e){this.$mobx.setArrayLength(e)}}),["every","filter","forEach","indexOf","join","lastIndexOf","map","reduce","reduceRight","slice","some"].forEach(function(e){var t=Array.prototype[e];_t(Zt.prototype,e,function(){return this.$mobx.atom.reportObserved(),t.apply(this.$mobx.values,arguments)})});var en={configurable:!0,enumerable:!1,set:Ue(0),get:Me(0)};ze(1e3),n.fastArray=Ge,n.isObservableArray=Fe;var tn={},nn=function(){function e(e,t){var n=this;this.$mobx=tn,this._data={},this._hasMap={},this.name="ObservableMap@"+ft(),this._keys=new Zt(null,Kt.Reference,this.name+".keys()",(!0)),this.interceptors=null,this.changeListeners=null,this._valueMode=Le(t),this._valueMode===Kt.Flat&&(this._valueMode=Kt.Reference),M(!0,function(){yt(e)?n.merge(e):Array.isArray(e)&&e.forEach(function(e){var t=e[0],r=e[1];return n.set(t,r)})})}return e.prototype._has=function(e){return"undefined"!=typeof this._data[e]},e.prototype.has=function(e){return!!this.isValidKey(e)&&(e=""+e,this._hasMap[e]?this._hasMap[e].get():this._updateHasMapEntry(e,!1).get())},e.prototype.set=function(e,t){this.assertValidKey(e),e=""+e;var n=this._has(e);if(Ve(t,"[mobx.map.set] Expected unwrapped value to be inserted to key '"+e+"'. If you need to use modifiers pass them as second argument to the constructor"),Se(this)){var r=Re(this,{type:n?"update":"add",object:this,newValue:t,name:e});if(!r)return;t=r.newValue}n?this._updateValue(e,t):this._addValue(e,t)},e.prototype.delete=function(e){var t=this;if(this.assertValidKey(e),e=""+e,Se(this)){var n=Re(this,{type:"delete",object:this,name:e});if(!n)return}if(this._has(e)){var r=ve(),i=Te(this),n=i||r?{type:"delete",object:this,oldValue:this._data[e].value,name:e}:null;r&&ye(n),_e(function(){t._keys.remove(e),t._updateHasMapEntry(e,!1);var n=t._data[e];n.setNewValue(void 0),t._data[e]=void 0},void 0,!1),i&&ke(this,n),r&&me()}},e.prototype._updateHasMapEntry=function(e,t){var n=this._hasMap[e];return n?n.setNewValue(t):n=this._hasMap[e]=new un(t,Kt.Reference,this.name+"."+e+"?",(!1)),n},e.prototype._updateValue=function(e,t){var n=this._data[e];if(t=n.prepareNewValue(t),t!==sn){var r=ve(),i=Te(this),o=i||r?{type:"update",object:this,oldValue:n.value,name:e,newValue:t}:null;r&&ye(o),n.setNewValue(t),i&&ke(this,o),r&&me()}},e.prototype._addValue=function(e,t){var n=this;_e(function(){var r=n._data[e]=new un(t,n._valueMode,n.name+"."+e,(!1));t=r.value,n._updateHasMapEntry(e,!0),n._keys.push(e)},void 0,!1);var r=ve(),i=Te(this),o=i||r?{type:"add",object:this,name:e,newValue:t}:null;r&&ye(o),i&&ke(this,o),r&&me()},e.prototype.get=function(e){if(e=""+e,this.has(e))return this._data[e].get()},e.prototype.keys=function(){return ct(this._keys.slice())},e.prototype.values=function(){return ct(this._keys.map(this.get,this))},e.prototype.entries=function(){var e=this;return ct(this._keys.map(function(t){return[t,e.get(t)]}))},e.prototype.forEach=function(e,t){var n=this;this.keys().forEach(function(r){return e.call(t,n.get(r),r)})},e.prototype.merge=function(t){var n=this;return _e(function(){t instanceof e?t.keys().forEach(function(e){return n.set(e,t.get(e))}):Object.keys(t).forEach(function(e){return n.set(e,t[e])})},void 0,!1),this},e.prototype.clear=function(){var e=this;_e(function(){q(function(){e.keys().forEach(e.delete,e)})},void 0,!1)},Object.defineProperty(e.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),e.prototype.toJS=function(){var e=this,t={};return this.keys().forEach(function(n){return t[n]=e.get(n)}),t},e.prototype.toJs=function(){return ht("toJs is deprecated, use toJS instead"),this.toJS()},e.prototype.toJSON=function(){return this.toJS()},e.prototype.isValidKey=function(e){return null!==e&&void 0!==e&&("string"==typeof e||"number"==typeof e||"boolean"==typeof e)},e.prototype.assertValidKey=function(e){if(!this.isValidKey(e))throw new Error("[mobx.map] Invalid key: '"+e+"'")},e.prototype.toString=function(){var e=this;return this.name+"[{ "+this.keys().map(function(t){return t+": "+e.get(t)}).join(", ")+" }]"},e.prototype.observe=function(e,t){return pt(t!==!0,"`observe` doesn't support the fire immediately property for observable maps."),Ie(this,e)},e.prototype.intercept=function(e){return Ae(this,e)},e}();n.ObservableMap=nn,lt(nn.prototype,function(){return this.entries()}),n.map=Ke,n.isObservableMap=Je;var rn=function(){function e(e,t,n){this.target=e,this.name=t,this.mode=n,this.values={},this.changeListeners=null,this.interceptors=null}return e.prototype.observe=function(e,t){return pt(t!==!0,"`observe` doesn't support the fire immediately property for observable objects."),Ie(this,e)},e.prototype.intercept=function(e){return Ae(this,e)},e}(),on={},an={};n.isObservableObject=et;var sn={},un=function(e){function t(t,n,r,i){void 0===r&&(r="ObservableValue@"+ft()),void 0===i&&(i=!0),e.call(this,r),this.mode=n,this.hasUnreportedChange=!1,this.value=void 0;var o=De(t,Kt.Recursive),a=o[0],s=o[1];this.mode===Kt.Recursive&&(this.mode=a),this.value=Ne(s,this.mode,this.name),i&&ve()&&be({type:"create",object:this,newValue:this.value})}return Tt(t,e),t.prototype.set=function(e){var t=this.value;if(e=this.prepareNewValue(e),e!==sn){var n=ve();n&&ye({type:"update",object:this,newValue:e,oldValue:t}),this.setNewValue(e),n&&me()}},t.prototype.prepareNewValue=function(e){if(Ve(e,"Modifiers cannot be used on non-initial values."),K(),Se(this)){var t=Re(this,{object:this,type:"update",newValue:e});if(!t)return sn;e=t.newValue}var n=gt(this.mode===Kt.Structure,this.value,e);return n?Ne(e,this.mode,this.name):sn},t.prototype.setNewValue=function(e){var t=this.value;this.value=e,this.reportChanged(),Te(this)&&ke(this,[e,t])},t.prototype.get=function(){return this.reportObserved(),this.value},t.prototype.intercept=function(e){return Ae(this,e)},t.prototype.observe=function(e,t){return t&&e(this.value,void 0),Ie(this,e)},t.prototype.toJSON=function(){return this.get()},t.prototype.toString=function(){return this.name+"["+this.value+"]"},t}(Pt),cn="__$$iterating",ln=function(){function e(){this.size=0,this.data={}}return Object.defineProperty(e.prototype,"length",{get:function(){return this.size},enumerable:!0,configurable:!0}),e.prototype.asArray=function(){var e=new Array(this.size),t=0;for(var n in this.data)e[t]=this.data[n],t++;return e},e.prototype.add=function(e){var t=e.__mapid;t in this.data||(this.data[t]=e,this.size++)},e.prototype.remove=function(e){e.__mapid in this.data&&(delete this.data[e.__mapid],this.size--)},e}();n.SimpleSet=ln;var fn=function(){function e(){this.listeners=[],ht("extras.SimpleEventEmitter is deprecated and will be removed in the next major release")}return e.prototype.emit=function(){for(var e=this.listeners.slice(),t=0,n=e.length;t<n;t++)e[t].apply(null,arguments)},e.prototype.on=function(e){var t=this;return this.listeners.push(e),dt(function(){var n=t.listeners.indexOf(e);n!==-1&&t.listeners.splice(n,1)})},e.prototype.once=function(e){var t=this.on(function(){t(),e.apply(this,arguments)});return t},e}();n.SimpleEventEmitter=fn;var pn=[];Object.freeze(pn);var hn,dn=[],vn=function(){}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)});
//# sourceMappingURL=lib/mobx.umd.min.js.map
{
"name": "mobx",
"version": "2.4.3",
"version": "2.5.0-alpha1",
"description": "Simple, scalable state management.",

@@ -5,0 +5,0 @@ "main": "lib/mobx.js",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc