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.5.0-alpha1 to 2.5.0-rc1

10

CHANGELOG.md

@@ -0,1 +1,11 @@

# 2.4.4
* Fixed #503: map.delete returns boolean
* Fix return type of `runInAction`, #499 by @Strate
* Fixed enumerability of observable array methods, see #496.
* Use TypeScript typeguards, #487 by @Strate
* Added overloads to `action` for better type inference, #500 by @Strate
* Fixed #502: `extendObservable` fails on objects created with `Object.create(null)`
* Implemented #480 / #488: better typings for `asMap`, by @Strate
# 2.4.3

@@ -2,0 +12,0 @@

49

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

@@ -29,3 +29,2 @@ export { IDerivation, untracked, IDerivationState };

export { Lambda };
export { SimpleSet, ISetEntry };
export { Iterator };

@@ -52,2 +51,10 @@ export { SimpleEventEmitter, ISimpleEventListener };

};
declare function action<A1, R, T extends (a1: A1) => R>(fn: T): T;
declare function action<A1, A2, R, T extends (a1: A1, a2: A2) => R>(fn: T): T;
declare function action<A1, A2, A3, R, T extends (a1: A1, a2: A2, a3: A3) => R>(fn: T): T;
declare function action<A1, A2, A3, A4, R, T extends (a1: A1, a2: A2, a3: A3, a4: A4) => R>(fn: T): T;
declare function action<A1, R, T extends (a1: A1) => R>(name: string, fn: T): T;
declare function action<A1, A2, R, T extends (a1: A1, a2: A2) => R>(name: string, fn: T): T;
declare function action<A1, A2, A3, R, T extends (a1: A1, a2: A2, a3: A3) => R>(name: string, fn: T): T;
declare function action<A1, A2, A3, A4, R, T extends (a1: A1, a2: A2, a3: A3, a4: A4) => R>(name: string, fn: T): T;
declare function action<T extends Function>(fn: T): T;

@@ -57,4 +64,4 @@ declare function action<T extends Function>(name: string, fn: T): T;

declare function action(target: Object, propertyKey: string, descriptor?: PropertyDescriptor): void;
declare function runInAction<T>(block: () => T, scope?: any): any;
declare function runInAction<T>(name: string, block: () => T, scope?: any): any;
declare function runInAction<T>(block: () => T, scope?: any): T;
declare function runInAction<T>(name: string, block: () => T, scope?: any): T;
declare function isAction(thing: any): boolean;

@@ -117,5 +124,4 @@ declare function autorun(view: (r: IReactionPublic) => void, scope?: any): any;

isPendingUnobservation: boolean;
isObserved: boolean;
_observers: any[];
_observersIndexes: {};
observers: any[];
observersIndexes: {};
diffValue: number;

@@ -126,3 +132,2 @@ lastAccessedBy: number;

onBecomeUnobserved(): void;
observers: any;
reportObserved(): void;

@@ -164,9 +169,4 @@ reportChanged(): void;

declare function untracked<T>(action: () => T): T;
interface ILegacyObservers {
asArray(): IDerivation[];
length: number;
}
interface IDepTreeNode {
name: string;
observers?: ILegacyObservers;
observing?: IObservable[];

@@ -179,5 +179,4 @@ }

isPendingUnobservation: boolean;
observers: ILegacyObservers;
_observers: IDerivation[];
_observersIndexes: {};
observers: IDerivation[];
observersIndexes: {};
onBecomeUnobserved(): any;

@@ -230,2 +229,3 @@ }

declare function asFlat<T>(value: T): T;
declare function asMap(): ObservableMap<any>;
declare function asMap<T>(): ObservableMap<T>;

@@ -274,3 +274,3 @@ declare function asMap<T>(entries: IMapEntries<T>, modifierFunc?: Function): ObservableMap<T>;

declare function fastArray<V>(initialValues?: V[]): IObservableArray<V>;
declare function isObservableArray(thing: any): boolean;
declare function isObservableArray(thing: any): thing is IObservableArray<any>;
interface IKeyValueMap<V> {

@@ -307,3 +307,3 @@ [key: string]: V;

set(key: string, value: V): void;
delete(key: string): void;
delete(key: string): boolean;
private _updateHasMapEntry(key, value);

@@ -330,3 +330,3 @@ private _updateValue(name, newValue);

declare function map<V>(initialValues?: IMapEntries<V> | IKeyValueMap<V>, valueModifier?: Function): ObservableMap<V>;
declare function isObservableMap(thing: any): boolean;
declare function isObservableMap(thing: any): thing is ObservableMap<any>;
interface IObjectChange {

@@ -363,13 +363,2 @@ name: string;

}
interface ISetEntry {
__mapid: string;
}
declare class SimpleSet<T extends ISetEntry> {
size: number;
data: {};
length: number;
asArray(): T[];
add(value: T): void;
remove(value: T): void;
}
declare type ISimpleEventListener = {

@@ -376,0 +365,0 @@ (...data: any[]): void;

/** MobX - (c) Michel Weststrate 2015, 2016 - MIT Licensed */
"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;
"use strict";function e(e,n,r,o){return 1===arguments.length&&"function"==typeof e?D(e.name||"<unnamed action>",e):2===arguments.length&&"function"==typeof n?D(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=D(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 pt("function"==typeof o,"`runInAction` expects a function"),pt(0===o.length,"`runInAction` expects a function without arguments"),pt("string"==typeof r&&r.length>0,"actions should have valid names, got: '"+r+"'"),V(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@"+lt(),i=e,s=t),Ve(i,"autorun methods cannot have modifiers"),pt("function"==typeof i,"autorun expects a function"),s&&(i=i.bind(s));var a=new Nt(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@"+lt(),s=e,a=t,u=n);var c=o(i,function(e){if(s.call(u)){e.dispose();var t=Y();a.call(u),X(t)}});return c}function s(e,t,n){return ft("`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@"+lt(),s=e,a=t,u=n),void 0===a&&(a=1),u&&(s=s.bind(u));var c=!1,l=new Nt(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=mt(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@"+lt(),c=t,l=n,p=r,f=o,h=i),void 0===p&&(p=!1),void 0===f&&(f=0);var d=Le(c,Ft.Reference),v=d[0],b=d[1],y=v===Ft.Structure;h&&(b=b.bind(h),l=e(u,l.bind(h)));var m=!0,g=!1,x=void 0,w=new Nt(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):(pt(!n||!n.set,"@observable properties cannot have a setter: "+t),Tt.apply(null,arguments))}function l(e,t){var n=Le(e,Ft.Recursive),r=n[0],o=n[1];return new Pt(o,t,r===Ft.Structure,o.name)}function p(){throw new Error("[ComputedValue] It is not allowed to assign new values to computed properties.")}function f(e,t){pt("function"==typeof e&&1===e.length,"createTransformer expects a function that accepts one argument");var n={},r=Mt.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 kt(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}(Pt);return function(e){r!==Mt.resetId&&(n={},r=Mt.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=lt(),wt(e,"$transformId",t)),t}function d(e,t){return z()||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 pt(arguments.length>=2,"extendObservable expected 2 or more arguments"),pt("object"==typeof e,"extendObservable expects an object as first argument"),pt(!(e instanceof en),"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"),b(e,t,Ft.Recursive,null)}),e}function b(e,t,n,r){var o=Ke(e,r,n);for(var i in t)if(gt(t,i)){if(e===t&&!St(e,i))continue;We(o,i,t[i])}return e}function y(e,t){return m(et(e,t))}function m(e){var t={name:e.name};return e.observing&&e.observing.length>0&&(t.dependencies=dt(e.observing).map(m)),t}function g(e,t){return x(et(e,t))}function x(e){var t={name:e.name};return ee(e)&&(t.observers=te(e).map(x)),t}function w(e,t,n){return"function"==typeof n?S(e,t,n):_(e,t)}function _(e,t){return bt(e)&&!Ze(e)?(ft("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),tt(R(e)).intercept(t)):tt(e).intercept(t)}function S(e,t,n){return bt(e)&&!Ze(e)?(ft("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),v(e,{property:e[t]}),S(e,t,n)):tt(e,t).intercept(n)}function O(e,t){if(null===e||void 0===e)return!1;if(void 0!==t){if(e instanceof en||e instanceof qt)throw new Error("[mobx.isObservable] isObservable(object, propertyName) is not supported for arrays and maps. Use map.has or array.length instead.");if(Ze(e)){var n=e.$mobx;return n.values&&!!n.values[t]}return!1}return!!e.$mobx||e instanceof Ct||e instanceof Nt||e instanceof Pt}function A(e,t,n){return pt(arguments.length>=2&&arguments.length<=3,"Illegal decorator config",t),Ot(e,t),pt(!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(pt(arguments.length<3,"observable expects zero, one or two arguments"),O(e))return e;var n=Le(e,Ft.Recursive),r=n[0],o=n[1],i=r===Ft.Reference?jt.Reference:k(o);switch(i){case jt.Array:case jt.PlainObject:return De(o,r);case jt.Reference:case jt.ComplexObject:return new sn(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 ft("Use `computed(expr)` instead of `observable(expr)`"),c(e,t)}pt(!1,"Illegal State")}function k(e){return null===e||void 0===e?jt.Reference:"function"==typeof e?e.length?jt.ComplexFunction:jt.ViewFunction:Array.isArray(e)||e instanceof qt?jt.Array:"object"==typeof e?bt(e)?jt.PlainObject:jt.ComplexObject:jt.Reference}function I(e,t,n,r){return"function"==typeof n?E(e,t,n,r):T(e,t,n)}function T(e,t,n){return bt(e)&&!Ze(e)?(ft("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),tt(R(e)).observe(t,n)):tt(e).observe(t,n)}function E(e,t,n,r){return bt(e)&&!Ze(e)?(ft("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)):tt(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 qt){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 en){var u=r({});return e.forEach(function(e,r){return u[r]=j(e,t,n)}),u}if(O(e)&&e.$mobx instanceof sn)return j(e(),t,n);if(e instanceof sn)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 C(e,t,n){return void 0===t&&(t=!0),void 0===n&&(n=null),ft("toJSON is deprecated. Use toJS instead"),j.apply(null,arguments)}function L(e){return console.log(e),e}function P(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=et(e,t)}return e=et(e),e instanceof Pt?L(e.whyRun()):e instanceof Nt?L(e.whyRun()):void pt(!1,"whyRun can only be used on reactions and computed values")}function D(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 V(e,t,this,arguments)};return n.isMobxAction=!0,n}function V(e,t,n,r){pt(!(Mt.trackingDerivation instanceof Pt),"Computed values or transformers should not invoke actions or trigger other side effects");var o,i=de();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];be({type:"action",name:e,fn:t,target:n,arguments:a})}var c=Y();we(e,n,!1);var l=N(!0);try{return t.apply(n,r)}finally{U(l),_e(!1),X(c),i&&ye({time:Date.now()-o})}}function $(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=N(e),r=t();return U(n),r}function N(e){var t=Mt.allowStateChanges;return Mt.allowStateChanges=e,t}function U(e){Mt.allowStateChanges=e}function B(e){switch(e.dependenciesState){case Dt.UP_TO_DATE:return!1;case Dt.NOT_TRACKING:case Dt.STALE:return!0;case Dt.POSSIBLY_STALE:var t=!0,n=Y();try{for(var r=e.observing,o=r.length,i=0;i<o;i++){var s=r[i];if(s instanceof Pt&&(s.get(),e.dependenciesState===Dt.STALE))return t=!1,X(n),!0}return t=!1,q(e),X(n),!1}finally{t&&q(e)}}}function z(){return null!==Mt.trackingDerivation}function F(){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 G(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,o=!0;try{r=t.call(e),o=!1}finally{o?J(e):(Mt.trackingDerivation=n,K(e))}return r}function J(e){var t="[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";de()&&ve({type:"error",message:t}),console.warn(t),q(e),e.newObserving=null,e.unboundDepsCount=0,e.recoverFromError(),ae(),Z()}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&&oe(s,e),s.diffValue=0}for(;r--;){var s=n[r];1===s.diffValue&&(s.diffValue=0,re(s,e))}}function W(e){for(var t=e.observing,n=t.length;n--;)oe(t[n],e);e.dependenciesState=Dt.NOT_TRACKING,t.length=0}function H(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!==Dt.UP_TO_DATE){e.dependenciesState=Dt.UP_TO_DATE;for(var t=e.observing,n=t.length;n--;)t[n].lowestObserverState=Dt.UP_TO_DATE}}function Q(){}function Z(){Mt.resetId++;var e=new $t;for(var t in e)Vt.indexOf(t)===-1&&(Mt[t]=e[t]);Mt.allowStateChanges=!Mt.strictMode}function ee(e){return e.observers&&e.observers.length>0}function te(e){return e.observers}function ne(e){for(var t=e.observers,n=e.observersIndexes,r=t.length,o=0;o<r;o++){var i=t[o].__mapid;o?pt(n[i]===o,"INTERNAL ERROR maps derivation.__mapid to index in list"):pt(!(i in n),"INTERNAL ERROR observer on index 0 shouldnt be held in map.")}pt(0===t.length||Object.keys(n).length===t.length-1,"INTERNAL ERROR there is no junk in map")}function re(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 oe(e,t){if(1===e.observers.length)e.observers.length=0,ie(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 ie(e){e.isPendingUnobservation||(e.isPendingUnobservation=!0,Mt.pendingUnobservations.push(e))}function se(){Mt.inBatch++}function ae(){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 ue(e){var t=Mt.trackingDerivation;null!==t?t.runId!==e.lastAccessedBy&&(e.lastAccessedBy=t.runId,t.newObserving[t.unboundDepsCount++]=e):0===e.observers.length&&ie(e)}function ce(e,t){var n=te(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 le(e){if(e.lowestObserverState!==Dt.STALE){e.lowestObserverState=Dt.STALE;for(var t=e.observers,n=t.length;n--;){var r=t[n];r.dependenciesState===Dt.UP_TO_DATE&&r.onBecomeStale(),r.dependenciesState=Dt.STALE}}}function pe(e){if(e.lowestObserverState!==Dt.STALE){e.lowestObserverState=Dt.STALE;for(var t=e.observers,n=t.length;n--;){var r=t[n];r.dependenciesState===Dt.POSSIBLY_STALE?r.dependenciesState=Dt.STALE:r.dependenciesState===Dt.UP_TO_DATE&&(e.lowestObserverState=Dt.UP_TO_DATE)}}}function fe(e){if(e.lowestObserverState===Dt.UP_TO_DATE){e.lowestObserverState=Dt.POSSIBLY_STALE;for(var t=e.observers,n=t.length;n--;){var r=t[n];r.dependenciesState===Dt.UP_TO_DATE&&(r.dependenciesState=Dt.POSSIBLY_STALE,r.onBecomeStale())}}}function he(){if(!(Mt.isRunningReactions===!0||Mt.inTransaction>0)){Mt.isRunningReactions=!0;for(var e=Mt.pendingReactions,t=0;e.length>0;){if(++t===Ut)throw Z(),new Error("Reaction doesn't converge to a stable state after "+Ut+" 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()}Mt.isRunningReactions=!1}}function de(){return Bt}function ve(e){if(!Bt)return!1;for(var t=Mt.spyListeners,n=0,r=t.length;n<r;n++)t[n](e)}function be(e){var t=yt({},e,{spyReportStart:!0});ve(t)}function ye(e){ve(e?yt({},e,zt):zt)}function me(e){return Mt.spyListeners.push(e),Bt=Mt.spyListeners.length>0,ht(function(){var t=Mt.spyListeners.indexOf(e);t!==-1&&Mt.spyListeners.splice(t,1),Bt=Mt.spyListeners.length>0})}function ge(e){return ft("trackTransitions is deprecated. Use mobx.spy instead"),"boolean"==typeof e&&(ft("trackTransitions only takes a single callback function. If you are using the mobx-react-devtools, please update them first"),e=arguments[1]),e?me(e):(ft("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 xe(e,t,n){void 0===t&&(t=void 0),void 0===n&&(n=!0),we(e.name||"anonymous transaction",t,n);var r=e.call(t);return _e(n),r}function we(e,t,n){void 0===t&&(t=void 0),void 0===n&&(n=!0),se(),Mt.inTransaction+=1,n&&de()&&be({type:"transaction",target:t,name:e})}function _e(e){void 0===e&&(e=!0),0===--Mt.inTransaction&&he(),e&&de()&&ye(),ae()}function Se(e){return e.interceptors&&e.interceptors.length>0}function Oe(e,t){var n=e.interceptors||(e.interceptors=[]);return n.push(t),ht(function(){var e=n.indexOf(t);e!==-1&&n.splice(e,1)})}function Ae(e,t){for(var n=Y(),r=e.interceptors,o=0,i=r.length;o<i;o++)if(t=r[o](t),pt(!t||t.type,"Intercept handlers should return nothing or a change object"),!t)return null;return X(n),t}function Re(e){return e.changeListeners&&e.changeListeners.length>0}function ke(e,t){var n=e.changeListeners||(e.changeListeners=[]);return n.push(t),ht(function(){var e=n.indexOf(t);e!==-1&&n.splice(e,1)})}function Ie(e,t){var n=Y(),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);X(n)}}function Te(e){return new Gt(e)}function Ee(e){return new Jt(e)}function je(e){return new Kt(e)}function Ce(e,t){return Ge(e,t)}function Le(e,t){return e instanceof Gt?[Ft.Reference,e.value]:e instanceof Jt?[Ft.Structure,e.value]:e instanceof Kt?[Ft.Flat,e.value]:[t,e]}function Pe(e){return e===Te?Ft.Reference:e===Ee?Ft.Structure:e===je?Ft.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),Ft.Recursive)}function De(e,t,n){var r;if(O(e))return e;switch(t){case Ft.Reference:return e;case Ft.Flat:Ve(e,"Items inside 'asFlat' cannot have modifiers"),r=Ft.Reference;break;case Ft.Structure:Ve(e,"Items inside 'asStructure' cannot have modifiers"),r=Ft.Structure;break;case Ft.Recursive:o=Le(e,Ft.Recursive),r=o[0],e=o[1];break;default:pt(!1,"Illegal State")}return Array.isArray(e)?Be(e,r,n):bt(e)&&Object.isExtensible(e)?b(e,e,r,n):e;var o}function Ve(e,t){if(e instanceof Gt||e instanceof Jt||e instanceof Kt)throw new Error("[mobx] asStructure / asReference / asFlat cannot be used here. "+t)}function $e(e){var t=Me(e),n=Ne(e);Object.defineProperty(qt.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){F();var o=r[e];if(Se(n)){var i=Ae(n,{type:"update",object:n.array,index:e,newValue:t});if(!i)return;t=i.newValue}t=n.makeReactiveArrayItem(t);var s=n.mode===Ft.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 Ne(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 Ue(e){for(var t=Ht;t<e;t++)$e(t);Ht=e}function Be(e,t,n){return new qt(e,t,n)}function ze(e){return ft("fastArray is deprecated. Please use `observable(asFlat([]))`"),Be(e,Ft.Flat,null)}function Fe(e){return e instanceof qt}function Ge(e,t){return new en(e,t)}function Je(e){return e instanceof en}function Ke(e,t,n){if(void 0===n&&(n=Ft.Recursive),Ze(e))return e.$mobx;bt(e)||(t=e.constructor.name+"@"+lt()),t||(t="ObservableObject@"+lt());var r=new tn(e,t,n);return _t(e,"$mobx",r),r}function We(e,t,n){e.values[t]?e.target[t]=n:He(e,t,n,!0)}function He(e,t,n,o){o&&Ot(e.target,t);var i,s=e.name+"."+t,a=!0;if("function"!=typeof n||0!==n.length||r(n))if(n instanceof Jt&&"function"==typeof n.value&&0===n.value.length)i=new Pt(n.value,e.target,(!0),s);else{if(a=!1,Se(e)){var u=Ae(e,{object:e.target,name:t,type:"add",newValue:n});if(!u)return;n=u.newValue}i=new sn(n,e.mode,s,(!1)),n=i.value}else i=new Pt(n,e.target,(!1),s);e.values[t]=i,o&&Object.defineProperty(e.target,t,a?Xe(t):Ye(t)),a||Qe(e,e.target,t,n)}function Ye(e){var t=nn[e];return t?t:nn[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=rn[e];return t?t:rn[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=Ae(r,{type:"update",object:e,name:t,newValue:n});if(!i)return;n=i.newValue}if(n=o.prepareNewValue(n),n!==on){var s=Re(r),a=de(),i=Ie||Re?{type:"update",object:e,oldValue:o.value,name:t,newValue:n}:null;a&&be(i),o.setNewValue(n),s&&Ie(r,i),a&&ye()}}function Qe(e,t,n,r){var o=Re(e),i=de(),s=o||i?{type:"add",object:t,name:n,newValue:r}:null;i&&be(s),o&&Ie(e,s),i&&ye()}function Ze(e){return"object"==typeof e&&null!==e&&(it(e),e.$mobx instanceof tn)}function et(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 et(e._keys);var n=e._data[t]||e._hasMap[t];return pt(!!n,"the entry '"+t+"' does not exist in the observable map '"+nt(e)+"'"),n}if(it(e),Ze(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 '"+nt(e)+"'"),r}if(e instanceof Ct||e instanceof Pt||e instanceof Nt)return e}else if("function"==typeof e&&e.$mobx instanceof Nt)return e.$mobx;pt(!1,"Cannot obtain atom from "+e)}function tt(e,t){return pt(e,"Expection some object"),void 0!==t?tt(et(e,t)):e instanceof Ct||e instanceof Pt||e instanceof Nt?e:Je(e)?e:(it(e),e.$mobx?e.$mobx:void pt(!1,"Cannot obtain administration from "+e))}function nt(e,t){var n;return n=void 0!==t?et(e,t):Ze(e)||Je(e)?tt(e):et(e),n.name}function rt(e,t,n,r,o){function i(i,s,a,u){if(pt(o||st(arguments),"This function is a decorator, but it wasn't invoked like a decorator"),a){gt(i,"__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&&it(this),t.call(this,s)},set:function(e){this.__mobxDidRunLazyInitializers!==!0&&it(this),n.call(this,s,e)}}}var p={enumerable:r,configurable:!0,get:function(){return this.__mobxInitializedProps&&this.__mobxInitializedProps[s]===!0||ot(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):ot(this,s,t,e,u,a)}};return arguments.length<3&&Object.defineProperty(i,s,p),p}return o?function(){if(st(arguments))return i.apply(null,arguments);var e=arguments;return function(t,n,r){return i(t,n,r,e)}}:i}function ot(e,t,n,r,o,i){gt(e,"__mobxInitializedProps")||wt(e,"__mobxInitializedProps",{}),e.__mobxInitializedProps[t]=!0,r(e,t,n,o,i)}function it(e){e.__mobxDidRunLazyInitializers!==!0&&e.__mobxLazyInitializers&&(wt(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 at(){return"function"==typeof Symbol&&Symbol.iterator||"@@iterator"}function ut(e){pt(e[an]!==!0,"Illegal state: cannot recycle array as iterator"),_t(e,an,!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 ct(e,t){_t(e,at(),t)}function lt(){return++Mt.mobxGuid}function pt(e,t,n){if(!e)throw new Error("[mobx] Invariant failed: "+t+(n?" in '"+n+"'":""))}function ft(e){ln.indexOf(e)===-1&&(ln.push(e),console.error("[mobx] Deprecated: "+e))}function ht(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}function dt(e){var t=[];return e.forEach(function(e){t.indexOf(e)===-1&&t.push(e)}),t}function vt(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 bt(e){if(null===e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}function yt(){for(var e=arguments[0],t=1,n=arguments.length;t<n;t++){var r=arguments[t];for(var o in r)gt(r,o)&&(e[o]=r[o])}return e}function mt(e,t,n){return e?!Rt(t,n):t!==n}function gt(e,t){return fn.call(e,t)}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 St(e,t){var n=Object.getOwnPropertyDescriptor(e,t);return!n||n.configurable!==!1&&n.writable!==!1}function Ot(e,t){pt(St(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 kt=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:M,getAtom:et,getDebugName:nt,getDependencyTree:y,getObserverTree:g,isComputingDerivation:z,isSpyEnabled:de,resetGlobalState:Z,spyReport:ve,spyReportEnd:ye,spyReportStart:be,trackTransitions:ge},exports._={getAdministration:tt,resetGlobalState:Z};var It=rt(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(){pt(!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 Tt=rt(function(e,t,n,r,o){pt("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;pt("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=Ke(e,void 0,Ft.Recursive);He(a,t,s?Ee(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=O;var Et=rt(function(e,t,n){var r=N(!0);"function"==typeof n&&(n=Te(n));var o=Ke(e,void 0,Ft.Recursive);He(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=C,exports.whyRun=P,exports.useStrict=$;var Ct=function(){function e(e){void 0===e&&(e="Atom@"+lt()),this.name=e,this.isPendingUnobservation=!0,this.observers=[],this.observersIndexes={},this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=Dt.NOT_TRACKING}return e.prototype.onBecomeUnobserved=function(){},e.prototype.reportObserved=function(){ue(this)},e.prototype.reportChanged=function(){we("propagatingAtomChange",null,!1),le(this),_e(!1)},e.prototype.toString=function(){return this.name},e}();exports.BaseAtom=Ct;var Lt=function(e){function t(t,n,r){void 0===t&&(t="Atom@"+lt()),void 0===n&&(n=pn),void 0===r&&(r=pn),e.call(this,t),this.name=t,this.onBecomeObservedHandler=n,this.onBecomeUnobservedHandler=r,this.isPendingUnobservation=!1,this.isBeingTracked=!1}return kt(t,e),t.prototype.reportObserved=function(){return se(),e.prototype.reportObserved.call(this),this.isBeingTracked||(this.isBeingTracked=!0,this.onBecomeObservedHandler()),ae(),!!Mt.trackingDerivation},t.prototype.onBecomeUnobserved=function(){this.isBeingTracked=!1,this.onBecomeUnobservedHandler()},t}(Ct);exports.Atom=Lt;var Pt=function(){function e(e,t,n,r){this.derivation=e,this.scope=t,this.compareStructural=n,this.dependenciesState=Dt.NOT_TRACKING,this.observing=[],this.newObserving=null,this.isPendingUnobservation=!1,this.observers=[],this.observersIndexes={},this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.lowestObserverState=Dt.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+lt(),this.value=void 0,this.isComputing=!1,this.name=r||"ComputedValue@"+lt()}return e.prototype.peek=function(){this.isComputing=!0;var e=N(!1),t=this.derivation.call(this.scope);return U(e),this.isComputing=!1,t},e.prototype.peekUntracked=function(){var e=!0;try{var t=this.peek();return e=!1,t}finally{e&&J(this)}},e.prototype.onBecomeStale=function(){fe(this)},e.prototype.onBecomeUnobserved=function(){pt(this.dependenciesState!==Dt.NOT_TRACKING,"INTERNAL ERROR only onBecomeUnobserved shouldn't be called twice in a row"),W(this),this.value=void 0},e.prototype.get=function(){pt(!this.isComputing,"Cycle detected in computation "+this.name,this.derivation),se(),1===Mt.inBatch?B(this)&&(this.value=this.peekUntracked()):(ue(this),B(this)&&this.trackAndCompute()&&pe(this));var e=this.value;return ae(),e},e.prototype.recoverFromError=function(){this.isComputing=!1},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(){de()&&ve({object:this,type:"compute",fn:this.derivation,target:this.scope});var e=this.value,t=this.value=G(this,this.peek);return mt(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=Y();e(o,i),X(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(Mt.trackingDerivation),t=dt(this.isComputing?this.newObserving:this.observing).map(function(e){return e.name}),n=dt(te(this).map(function(e){return e.name}));return"\nWhyRun? computation '"+this.name+"':\n * Running because: "+(e?"[active] the value of this computation is needed by a reaction":this.isComputing?"[get] The value of this computed was requested outside a reaction":"[idle] not running at the moment")+"\n"+(this.dependenciesState===Dt.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 "+vt(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 "+vt(n)+"\n")},e}(),Dt;!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"}(Dt||(Dt={})),exports.IDerivationState=Dt,exports.untracked=H;var Vt=["mobxGuid","resetId","spyListeners","strictMode","runId"],$t=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 e=new $t;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}(),Nt=function(){function e(e,t){void 0===e&&(e="Reaction@"+lt()),this.name=e,this.onInvalidate=t,this.observing=[],this.newObserving=[],this.dependenciesState=Dt.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+lt(),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),se(),he(),ae())},e.prototype.isScheduled=function(){return this._isScheduled},e.prototype.runReaction=function(){this.isDisposed||(this._isScheduled=!1,B(this)&&(this._isTrackPending=!0,this.onInvalidate(),this._isTrackPending&&de()&&ve({object:this,type:"scheduled-reaction"})))},e.prototype.track=function(e){se();var t,n=de();n&&(t=Date.now(),be({object:this,type:"reaction",fn:e})),this._isRunning=!0,G(this,e),this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&W(this),n&&ye({time:Date.now()-t}),ae()},e.prototype.recoverFromError=function(){this._isRunning=!1,this._isTrackPending=!1},e.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(se(),W(this),ae()))},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=dt(this._isRunning?this.newObserving: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 "+vt(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=Nt;var Ut=100,Bt=!1,zt={spyReportEnd:!0};exports.spy=me,exports.transaction=xe;var Ft;!function(e){e[e.Recursive=0]="Recursive",e[e.Reference=1]="Reference",e[e.Structure=2]="Structure",e[e.Flat=3]="Flat"}(Ft||(Ft={})),exports.asReference=Te,exports.asStructure=Ee,exports.asFlat=je;var Gt=function(){function e(e){this.value=e,Ve(e,"Modifiers are not allowed to be nested")}return e}(),Jt=function(){function e(e){this.value=e,Ve(e,"Modifiers are not allowed to be nested")}return e}(),Kt=function(){function e(e){this.value=e,Ve(e,"Modifiers are not allowed to be nested")}return e}();exports.asMap=Ce;var Wt=function(){var e=!1,t={};return Object.defineProperty(t,"0",{set:function(){e=!0}}),Object.create(t)[0]=1,e===!1}(),Ht=0,Yt=function(){function e(){}return e}();Yt.prototype=[];var Xt=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 Ct(e||"ObservableArray@"+lt())}return e.prototype.makeReactiveArrayItem=function(e){return Ve(e,"Array values cannot have modifiers"),this.mode===Ft.Flat||this.mode===Ft.Reference?e:De(e,this.mode,this.atom.name+"[..]")},e.prototype.intercept=function(e){return Oe(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}),ke(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>Ht&&Ue(e+t+1)},e.prototype.spliceWithArray=function(e,t,n){F();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=Ae(this,{object:this.array,type:"splice",index:e,removedCount:t,added:n});if(!o)return cn;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&&de(),o=Re(this),i=o||r?{object:this.array,type:"update",index:e,newValue:t,oldValue:n}:null;r&&be(i),this.atom.reportChanged(),o&&Ie(this,i),r&&ye()},e.prototype.notifyArraySplice=function(e,t,n){var r=!this.owned&&de(),o=Re(this),i=o||r?{object:this.array,type:"splice",index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;r&&be(i),this.atom.reportChanged(),o&&Ie(this,i),r&&ye()},e}(),qt=function(e){function t(t,n,r,o){void 0===o&&(o=!1),e.call(this);var i=new Xt(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(),cn)):i.values=[],Wt&&Object.defineProperty(i.array,"0",Qt)}return kt(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}(Yt);ct(qt.prototype,function(){return ut(this.slice())}),xt(qt.prototype,["constructor","intercept","observe","clear","concat","replace","toJS","toJSON","peek","find","splice","push","pop","shift","unshift","reverse","sort","remove","toString","toLocaleString"]),Object.defineProperty(qt.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(qt.prototype,e,function(){return this.$mobx.atom.reportObserved(),t.apply(this.$mobx.values,arguments)})});var Qt={configurable:!0,enumerable:!1,set:Me(0),get:Ne(0)};Ue(1e3),exports.fastArray=ze,exports.isObservableArray=Fe;var Zt={},en=function(){function e(e,t){var n=this;this.$mobx=Zt,this._data={},this._hasMap={},this.name="ObservableMap@"+lt(),this._keys=new qt(null,Ft.Reference,this.name+".keys()",(!0)),this.interceptors=null,this.changeListeners=null,this._valueMode=Pe(t),this._valueMode===Ft.Flat&&(this._valueMode=Ft.Reference),M(!0,function(){bt(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=Ae(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=Ae(this,{type:"delete",object:this,name:e});if(!n)return!1}if(this._has(e)){var r=de(),o=Re(this),n=o||r?{type:"delete",object:this,oldValue:this._data[e].value,name:e}:null;return r&&be(n),xe(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&&Ie(this,n),r&&ye(),!0}return!1},e.prototype._updateHasMapEntry=function(e,t){var n=this._hasMap[e];return n?n.setNewValue(t):n=this._hasMap[e]=new sn(t,Ft.Reference,this.name+"."+e+"?",(!1)),n},e.prototype._updateValue=function(e,t){var n=this._data[e];if(t=n.prepareNewValue(t),t!==on){var r=de(),o=Re(this),i=o||r?{type:"update",object:this,oldValue:n.value,name:e,newValue:t}:null;r&&be(i),n.setNewValue(t),o&&Ie(this,i),r&&ye()}},e.prototype._addValue=function(e,t){var n=this;xe(function(){var r=n._data[e]=new sn(t,n._valueMode,n.name+"."+e,(!1));t=r.value,n._updateHasMapEntry(e,!0),n._keys.push(e)},void 0,!1);var r=de(),o=Re(this),i=o||r?{type:"add",object:this,name:e,newValue:t}:null;r&&be(i),o&&Ie(this,i),r&&ye()},e.prototype.get=function(e){if(e=""+e,this.has(e))return this._data[e].get()},e.prototype.keys=function(){return ut(this._keys.slice())},e.prototype.values=function(){return ut(this._keys.map(this.get,this))},e.prototype.entries=function(){var e=this;return ut(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 xe(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;xe(function(){H(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 ft("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."),ke(this,e)},e.prototype.intercept=function(e){return Oe(this,e)},e}();exports.ObservableMap=en,ct(en.prototype,function(){return this.entries()}),exports.map=Ge,exports.isObservableMap=Je;var tn=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."),ke(this,e)},e.prototype.intercept=function(e){return Oe(this,e)},e}(),nn={},rn={};exports.isObservableObject=Ze;var on={},sn=function(e){function t(t,n,r,o){void 0===r&&(r="ObservableValue@"+lt()),void 0===o&&(o=!0),e.call(this,r),this.mode=n,this.hasUnreportedChange=!1,this.value=void 0;var i=Le(t,Ft.Recursive),s=i[0],a=i[1];this.mode===Ft.Recursive&&(this.mode=s),this.value=De(a,this.mode,this.name),o&&de()&&ve({type:"create",object:this,newValue:this.value})}return kt(t,e),t.prototype.set=function(e){var t=this.value;if(e=this.prepareNewValue(e),e!==on){var n=de();n&&be({type:"update",object:this,newValue:e,oldValue:t}),this.setNewValue(e),n&&ye()}},t.prototype.prepareNewValue=function(e){if(Ve(e,"Modifiers cannot be used on non-initial values."),F(),Se(this)){var t=Ae(this,{object:this,type:"update",newValue:e});if(!t)return on;e=t.newValue}var n=mt(this.mode===Ft.Structure,this.value,e);return n?De(e,this.mode,this.name):on},t.prototype.setNewValue=function(e){var t=this.value;this.value=e,this.reportChanged(),Re(this)&&Ie(this,[e,t])},t.prototype.get=function(){return this.reportObserved(),this.value},t.prototype.intercept=function(e){return Oe(this,e)},t.prototype.observe=function(e,t){return t&&e(this.value,void 0),ke(this,e)},t.prototype.toJSON=function(){return this.get()},t.prototype.toString=function(){return this.name+"["+this.value+"]"},t}(Ct),an="__$$iterating",un=function(){function e(){this.listeners=[],ft("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),ht(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=un;var cn=[];Object.freeze(cn);var ln=[],pn=function(){},fn=Object.prototype.hasOwnProperty;
//# 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?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)});
!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?$(e.name||"<unnamed action>",e):2===arguments.length&&"function"==typeof t?$(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=$(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 ft("function"==typeof i,"`runInAction` expects a function"),ft(0===i.length,"`runInAction` expects a function without arguments"),ft("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@"+lt(),o=e,a=t),Ve(o,"autorun methods cannot have modifiers"),ft("function"==typeof o,"autorun expects a function"),a&&(o=o.bind(a));var s=new Ut(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@"+lt(),o=e,s=t,u=n);var c=a(i,function(e){if(o.call(u)){e.dispose();var t=X();s.call(u),Q(t)}});return c}function u(e,t,n){return pt("`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@"+lt(),a=e,s=t,u=n),void 0===s&&(s=1),u&&(a=a.bind(u));var c=!1,l=new Ut(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=b(x);e=mt(y,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@"+lt(),c=e,l=n,f=r,p=i,h=o),void 0===f&&(f=!1),void 0===p&&(p=0);var d=Le(c,Ft.Reference),v=d[0],b=d[1],y=v===Ft.Structure;h&&(b=b.bind(h),l=t(u,l.bind(h)));var m=!0,g=!1,w=void 0,x=new Ut(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):(ft(!n||!n.set,"@observable properties cannot have a setter: "+t),Tt.apply(null,arguments))}function p(e,t){var n=Le(e,Ft.Recursive),r=n[0],i=n[1];return new Dt(i,t,r===Ft.Structure,i.name)}function h(){throw new Error("[ComputedValue] It is not allowed to assign new values to computed properties.")}function d(e,t){ft("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 kt(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}(Dt);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=lt(),xt(e,"$transformId",t)),t}function b(e,t){return G()||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 ft(arguments.length>=2,"extendObservable expected 2 or more arguments"),ft("object"==typeof e,"extendObservable expects an object as first argument"),ft(!(e instanceof en),"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"),m(e,t,Ft.Recursive,null)}),e}function m(e,t,n,r){var i=Ke(e,r,n);for(var o in t)if(gt(t,o)){if(e===t&&!St(e,o))continue;We(i,o,t[o])}return e}function g(e,t){return w(et(e,t))}function w(e){var t={name:e.name};return e.observing&&e.observing.length>0&&(t.dependencies=dt(e.observing).map(w)),t}function x(e,t){return _(et(e,t))}function _(e){var t={name:e.name};return ne(e)&&(t.observers=re(e).map(_)),t}function S(e,t,n){return"function"==typeof n?A(e,t,n):O(e,t)}function O(e,t){return bt(e)&&!Ze(e)?(pt("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),tt(I(e)).intercept(t)):tt(e).intercept(t)}function A(e,t,n){return bt(e)&&!Ze(e)?(pt("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),y(e,{property:e[t]}),A(e,t,n)):tt(e,t).intercept(n)}function R(e,t){if(null===e||void 0===e)return!1;if(void 0!==t){if(e instanceof en||e instanceof Xt)throw new Error("[mobx.isObservable] isObservable(object, propertyName) is not supported for arrays and maps. Use map.has or array.length instead.");if(Ze(e)){var n=e.$mobx;return n.values&&!!n.values[t]}return!1}return!!e.$mobx||e instanceof Ct||e instanceof Ut||e instanceof Dt}function k(e,t,n){return ft(arguments.length>=2&&arguments.length<=3,"Illegal decorator config",t),Ot(e,t),ft(!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 k.apply(null,arguments);if(ft(arguments.length<3,"observable expects zero, one or two arguments"),R(e))return e;var n=Le(e,Ft.Recursive),r=n[0],i=n[1],o=r===Ft.Reference?Et.Reference:T(i);switch(o){case Et.Array:case Et.PlainObject:return De(i,r);case Et.Reference:case Et.ComplexObject:return new an(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 pt("Use `computed(expr)` instead of `observable(expr)`"),f(e,t)}ft(!1,"Illegal State")}function T(e){return null===e||void 0===e?Et.Reference:"function"==typeof e?e.length?Et.ComplexFunction:Et.ViewFunction:Array.isArray(e)||e instanceof Xt?Et.Array:"object"==typeof e?bt(e)?Et.PlainObject:Et.ComplexObject:Et.Reference}function j(e,t,n,r){return"function"==typeof n?C(e,t,n,r):E(e,t,n)}function E(e,t,n){return bt(e)&&!Ze(e)?(pt("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),tt(I(e)).observe(t,n)):tt(e).observe(t,n)}function C(e,t,n,r){return bt(e)&&!Ze(e)?(pt("Passing plain objects to intercept / observe is deprecated and will be removed in 3.0"),y(e,{property:e[t]}),C(e,t,n,r)):tt(e,t).observe(n,r)}function L(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 Xt){var a=r([]),s=e.map(function(e){return L(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 en){var u=r({});return e.forEach(function(e,r){return u[r]=L(e,t,n)}),u}if(R(e)&&e.$mobx instanceof an)return L(e(),t,n);if(e instanceof an)return L(e.get(),t,n);if("object"==typeof e){var a=r({});for(var c in e)a[c]=L(e[c],t,n);return a}return e}function P(e,t,n){return void 0===t&&(t=!0),void 0===n&&(n=null),pt("toJSON is deprecated. Use toJS instead"),L.apply(null,arguments)}function D(e){return console.log(e),e}function V(e,t){switch(arguments.length){case 0:if(e=Mt.trackingDerivation,!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=et(e,t)}return e=et(e),e instanceof Dt?D(e.whyRun()):e instanceof Ut?D(e.whyRun()):void ft(!1,"whyRun can only be used on reactions and computed values")}function $(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 M(e,t,this,arguments)};return n.isMobxAction=!0,n}function M(e,t,n,r){ft(!(Mt.trackingDerivation instanceof Dt),"Computed values or transformers should not invoke actions or trigger other side effects");var i,o=de();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];be({type:"action",name:e,fn:t,target:n,arguments:s})}var c=X();xe(e,n,!1);var l=B(!0);try{return t.apply(n,r)}finally{z(l),_e(!1),Q(c),o&&ye({time:Date.now()-i})}}function U(e){return 0===arguments.length?Mt.strictMode:(ft(null===Mt.trackingDerivation,"It is not allowed to set `useStrict` when a derivation is running"),Mt.strictMode=e,Mt.allowStateChanges=!e,void 0)}function N(e,t){var n=B(e),r=t();return z(n),r}function B(e){var t=Mt.allowStateChanges;return Mt.allowStateChanges=e,t}function z(e){Mt.allowStateChanges=e}function F(e){switch(e.dependenciesState){case Pt.UP_TO_DATE:return!1;case Pt.NOT_TRACKING:case Pt.STALE:return!0;case Pt.POSSIBLY_STALE:var t=!0,n=X();try{for(var r=e.observing,i=r.length,o=0;o<i;o++){var a=r[o];if(a instanceof Dt&&(a.get(),e.dependenciesState===Pt.STALE))return t=!1,Q(n),!0}return t=!1,Z(e),Q(n),!1}finally{t&&Z(e)}}}function G(){return null!==Mt.trackingDerivation}function J(){Mt.allowStateChanges||ft(!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 K(e,t){Z(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{i?W(e):(Mt.trackingDerivation=n,H(e))}return r}function W(e){var t="[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";de()&&ve({type:"error",message:t}),console.warn(t),Z(e),e.newObserving=null,e.unboundDepsCount=0,e.recoverFromError(),ue(),te()}function H(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&&oe(a,e),a.diffValue=0}for(;r--;){var a=n[r];1===a.diffValue&&(a.diffValue=0,ie(a,e))}}function q(e){for(var t=e.observing,n=t.length;n--;)oe(t[n],e);e.dependenciesState=Pt.NOT_TRACKING,t.length=0}function Y(e){var t=X(),n=e();return Q(t),n}function X(){var e=Mt.trackingDerivation;return Mt.trackingDerivation=null,e}function Q(e){Mt.trackingDerivation=e}function Z(e){if(e.dependenciesState!==Pt.UP_TO_DATE){e.dependenciesState=Pt.UP_TO_DATE;for(var t=e.observing,n=t.length;n--;)t[n].lowestObserverState=Pt.UP_TO_DATE}}function ee(){}function te(){Mt.resetId++;var e=new $t;for(var t in e)Vt.indexOf(t)===-1&&(Mt[t]=e[t]);Mt.allowStateChanges=!Mt.strictMode}function ne(e){return e.observers&&e.observers.length>0}function re(e){return e.observers}function ie(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 oe(e,t){if(1===e.observers.length)e.observers.length=0,ae(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 ae(e){e.isPendingUnobservation||(e.isPendingUnobservation=!0,Mt.pendingUnobservations.push(e))}function se(){Mt.inBatch++}function ue(){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 ce(e){var t=Mt.trackingDerivation;null!==t?t.runId!==e.lastAccessedBy&&(e.lastAccessedBy=t.runId,t.newObserving[t.unboundDepsCount++]=e):0===e.observers.length&&ae(e)}function le(e){if(e.lowestObserverState!==Pt.STALE){e.lowestObserverState=Pt.STALE;for(var t=e.observers,n=t.length;n--;){var r=t[n];r.dependenciesState===Pt.UP_TO_DATE&&r.onBecomeStale(),r.dependenciesState=Pt.STALE}}}function fe(e){if(e.lowestObserverState!==Pt.STALE){e.lowestObserverState=Pt.STALE;for(var t=e.observers,n=t.length;n--;){var r=t[n];r.dependenciesState===Pt.POSSIBLY_STALE?r.dependenciesState=Pt.STALE:r.dependenciesState===Pt.UP_TO_DATE&&(e.lowestObserverState=Pt.UP_TO_DATE)}}}function pe(e){if(e.lowestObserverState===Pt.UP_TO_DATE){e.lowestObserverState=Pt.POSSIBLY_STALE;for(var t=e.observers,n=t.length;n--;){var r=t[n];r.dependenciesState===Pt.UP_TO_DATE&&(r.dependenciesState=Pt.POSSIBLY_STALE,r.onBecomeStale())}}}function he(){if(!(Mt.isRunningReactions===!0||Mt.inTransaction>0)){Mt.isRunningReactions=!0;for(var e=Mt.pendingReactions,t=0;e.length>0;){if(++t===Nt)throw te(),new Error("Reaction doesn't converge to a stable state after "+Nt+" 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 de(){return Bt}function ve(e){if(!Bt)return!1;for(var t=Mt.spyListeners,n=0,r=t.length;n<r;n++)t[n](e)}function be(e){var t=yt({},e,{spyReportStart:!0});ve(t)}function ye(e){ve(e?yt({},e,zt):zt)}function me(e){return Mt.spyListeners.push(e),Bt=Mt.spyListeners.length>0,ht(function(){var t=Mt.spyListeners.indexOf(e);t!==-1&&Mt.spyListeners.splice(t,1),Bt=Mt.spyListeners.length>0})}function ge(e){return pt("trackTransitions is deprecated. Use mobx.spy instead"),"boolean"==typeof e&&(pt("trackTransitions only takes a single callback function. If you are using the mobx-react-devtools, please update them first"),e=arguments[1]),e?me(e):(pt("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),xe(e.name||"anonymous transaction",t,n);var r=e.call(t);return _e(n),r}function xe(e,t,n){void 0===t&&(t=void 0),void 0===n&&(n=!0),se(),Mt.inTransaction+=1,n&&de()&&be({type:"transaction",target:t,name:e})}function _e(e){void 0===e&&(e=!0),0===--Mt.inTransaction&&he(),e&&de()&&ye(),ue()}function Se(e){return e.interceptors&&e.interceptors.length>0}function Oe(e,t){var n=e.interceptors||(e.interceptors=[]);return n.push(t),ht(function(){var e=n.indexOf(t);e!==-1&&n.splice(e,1)})}function Ae(e,t){for(var n=X(),r=e.interceptors,i=0,o=r.length;i<o;i++)if(t=r[i](t),ft(!t||t.type,"Intercept handlers should return nothing or a change object"),!t)return null;return Q(n),t}function Re(e){return e.changeListeners&&e.changeListeners.length>0}function ke(e,t){var n=e.changeListeners||(e.changeListeners=[]);return n.push(t),ht(function(){var e=n.indexOf(t);e!==-1&&n.splice(e,1)})}function Ie(e,t){var n=X(),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);Q(n)}}function Te(e){return new Gt(e)}function je(e){return new Jt(e)}function Ee(e){return new Kt(e)}function Ce(e,t){return Ge(e,t)}function Le(e,t){return e instanceof Gt?[Ft.Reference,e.value]:e instanceof Jt?[Ft.Structure,e.value]:e instanceof Kt?[Ft.Flat,e.value]:[t,e]}function Pe(e){return e===Te?Ft.Reference:e===je?Ft.Structure:e===Ee?Ft.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),Ft.Recursive)}function De(e,t,n){var r;if(R(e))return e;switch(t){case Ft.Reference:return e;case Ft.Flat:Ve(e,"Items inside 'asFlat' cannot have modifiers"),r=Ft.Reference;break;case Ft.Structure:Ve(e,"Items inside 'asStructure' cannot have modifiers"),r=Ft.Structure;break;case Ft.Recursive:i=Le(e,Ft.Recursive),r=i[0],e=i[1];break;default:ft(!1,"Illegal State")}return Array.isArray(e)?Be(e,r,n):bt(e)&&Object.isExtensible(e)?m(e,e,r,n):e;var i}function Ve(e,t){if(e instanceof Gt||e instanceof Jt||e instanceof Kt)throw new Error("[mobx] asStructure / asReference / asFlat cannot be used here. "+t)}function $e(e){var t=Me(e),n=Ue(e);Object.defineProperty(Xt.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){J();var i=r[e];if(Se(n)){var o=Ae(n,{type:"update",object:n.array,index:e,newValue:t});if(!o)return;t=o.newValue}t=n.makeReactiveArrayItem(t);var a=n.mode===Ft.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 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 Ne(e){for(var t=Ht;t<e;t++)$e(t);Ht=e}function Be(e,t,n){return new Xt(e,t,n)}function ze(e){return pt("fastArray is deprecated. Please use `observable(asFlat([]))`"),Be(e,Ft.Flat,null)}function Fe(e){return e instanceof Xt}function Ge(e,t){return new en(e,t)}function Je(e){return e instanceof en}function Ke(e,t,n){if(void 0===n&&(n=Ft.Recursive),Ze(e))return e.$mobx;bt(e)||(t=e.constructor.name+"@"+lt()),t||(t="ObservableObject@"+lt());var r=new tn(e,t,n);return _t(e,"$mobx",r),r}function We(e,t,n){e.values[t]?e.target[t]=n:He(e,t,n,!0)}function He(e,t,n,r){r&&Ot(e.target,t);var i,a=e.name+"."+t,s=!0;if("function"!=typeof n||0!==n.length||o(n))if(n instanceof Jt&&"function"==typeof n.value&&0===n.value.length)i=new Dt(n.value,e.target,(!0),a);else{if(s=!1,Se(e)){var u=Ae(e,{object:e.target,name:t,type:"add",newValue:n});if(!u)return;n=u.newValue}i=new an(n,e.mode,a,(!1)),n=i.value}else i=new Dt(n,e.target,(!1),a);e.values[t]=i,r&&Object.defineProperty(e.target,t,s?Ye(t):qe(t)),s||Qe(e,e.target,t,n)}function qe(e){var t=nn[e];return t?t:nn[e]={configurable:!0,enumerable:!0,get:function(){return this.$mobx.values[e].get()},set:function(t){Xe(this,e,t)}}}function Ye(e){var t=rn[e];return t?t:rn[e]={configurable:!0,enumerable:!1,get:function(){return this.$mobx.values[e].get()},set:h}}function Xe(e,t,n){var r=e.$mobx,i=r.values[t];if(Se(r)){var o=Ae(r,{type:"update",object:e,name:t,newValue:n});if(!o)return;n=o.newValue}if(n=i.prepareNewValue(n),n!==on){var a=Re(r),s=de(),o=Ie||Re?{type:"update",object:e,oldValue:i.value,name:t,newValue:n}:null;s&&be(o),i.setNewValue(n),a&&Ie(r,o),s&&ye()}}function Qe(e,t,n,r){var i=Re(e),o=de(),a=i||o?{type:"add",object:t,name:n,newValue:r}:null;o&&be(a),i&&Ie(e,a),o&&ye()}function Ze(e){return"object"==typeof e&&null!==e&&(ot(e),e.$mobx instanceof tn)}function et(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 et(e._keys);var n=e._data[t]||e._hasMap[t];return ft(!!n,"the entry '"+t+"' does not exist in the observable map '"+nt(e)+"'"),n}if(ot(e),Ze(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 '"+nt(e)+"'"),r}if(e instanceof Ct||e instanceof Dt||e instanceof Ut)return e}else if("function"==typeof e&&e.$mobx instanceof Ut)return e.$mobx;ft(!1,"Cannot obtain atom from "+e)}function tt(e,t){return ft(e,"Expection some object"),void 0!==t?tt(et(e,t)):e instanceof Ct||e instanceof Dt||e instanceof Ut?e:Je(e)?e:(ot(e),e.$mobx?e.$mobx:void ft(!1,"Cannot obtain administration from "+e))}function nt(e,t){var n;return n=void 0!==t?et(e,t):Ze(e)||Je(e)?tt(e):et(e),n.name}function rt(e,t,n,r,i){function o(o,a,s,u){if(ft(i||at(arguments),"This function is a decorator, but it wasn't invoked like a decorator"),s){gt(o,"__mobxLazyInitializers")||xt(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&&ot(this),t.call(this,a)},set:function(e){this.__mobxDidRunLazyInitializers!==!0&&ot(this),n.call(this,a,e)}}}var f={enumerable:r,configurable:!0,get:function(){return this.__mobxInitializedProps&&this.__mobxInitializedProps[a]===!0||it(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):it(this,a,t,e,u,s)}};return arguments.length<3&&Object.defineProperty(o,a,f),f}return i?function(){if(at(arguments))return o.apply(null,arguments);var e=arguments;return function(t,n,r){return o(t,n,r,e)}}:o}function it(e,t,n,r,i,o){gt(e,"__mobxInitializedProps")||xt(e,"__mobxInitializedProps",{}),e.__mobxInitializedProps[t]=!0,r(e,t,n,i,o)}function ot(e){e.__mobxDidRunLazyInitializers!==!0&&e.__mobxLazyInitializers&&(xt(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 st(){return"function"==typeof Symbol&&Symbol.iterator||"@@iterator"}function ut(e){ft(e[sn]!==!0,"Illegal state: cannot recycle array as iterator"),_t(e,sn,!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 ct(e,t){_t(e,st(),t)}function lt(){return++Mt.mobxGuid}function ft(e,t,n){if(!e)throw new Error("[mobx] Invariant failed: "+t+(n?" in '"+n+"'":""))}function pt(e){ln.indexOf(e)===-1&&(ln.push(e),console.error("[mobx] Deprecated: "+e))}function ht(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}function dt(e){var t=[];return e.forEach(function(e){t.indexOf(e)===-1&&t.push(e)}),t}function vt(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 bt(e){if(null===e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}function yt(){for(var e=arguments[0],t=1,n=arguments.length;t<n;t++){var r=arguments[t];for(var i in r)gt(r,i)&&(e[i]=r[i])}return e}function mt(e,t,n){return e?!Rt(t,n):t!==n}function gt(e,t){return pn.call(e,t)}function wt(e,t){for(var n=0;n<t.length;n++)xt(e,t[n],e[t[n]])}function xt(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 St(e,t){var n=Object.getOwnPropertyDescriptor(e,t);return!n||n.configurable!==!1&&n.writable!==!1}function Ot(e,t){ft(St(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 kt=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:et,getDebugName:nt,getDependencyTree:g,getObserverTree:x,isComputingDerivation:G,isSpyEnabled:de,resetGlobalState:te,spyReport:ve,spyReportEnd:ye,spyReportStart:be,trackTransitions:ge},n._={getAdministration:tt,resetGlobalState:te};var It=rt(function(e,n,r,i,o){var a=i&&1===i.length?i[0]:r.name||n||"<unnamed action>",s=t(a,r);xt(e,n,s)},function(e){return this[e]},function(){ft(!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 Tt=rt(function(e,t,n,r,i){ft("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;ft("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=Ke(e,void 0,Ft.Recursive);He(s,t,a?je(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=S,n.isObservable=R;var jt=rt(function(e,t,n){var r=B(!0);"function"==typeof n&&(n=Te(n));var i=Ke(e,void 0,Ft.Recursive);He(i,t,n,!0),z(r)},function(e){return this.$mobx.values[e].get()},function(e,t){Xe(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=L,n.toJSON=P,n.whyRun=V,n.useStrict=U;var Ct=function(){function e(e){void 0===e&&(e="Atom@"+lt()),this.name=e,this.isPendingUnobservation=!0,this.observers=[],this.observersIndexes={},this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=Pt.NOT_TRACKING}return e.prototype.onBecomeUnobserved=function(){},e.prototype.reportObserved=function(){ce(this)},e.prototype.reportChanged=function(){xe("propagatingAtomChange",null,!1),le(this),_e(!1)},e.prototype.toString=function(){return this.name},e}();n.BaseAtom=Ct;var Lt=function(e){function t(t,n,r){void 0===t&&(t="Atom@"+lt()),void 0===n&&(n=fn),void 0===r&&(r=fn),e.call(this,t),this.name=t,this.onBecomeObservedHandler=n,this.onBecomeUnobservedHandler=r,this.isPendingUnobservation=!1,this.isBeingTracked=!1}return kt(t,e),t.prototype.reportObserved=function(){return se(),e.prototype.reportObserved.call(this),this.isBeingTracked||(this.isBeingTracked=!0,this.onBecomeObservedHandler()),ue(),!!Mt.trackingDerivation},t.prototype.onBecomeUnobserved=function(){this.isBeingTracked=!1,this.onBecomeUnobservedHandler()},t}(Ct);n.Atom=Lt;var Pt,Dt=function(){function e(e,t,n,r){this.derivation=e,this.scope=t,this.compareStructural=n,this.dependenciesState=Pt.NOT_TRACKING,this.observing=[],this.newObserving=null,this.isPendingUnobservation=!1,this.observers=[],this.observersIndexes={},this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.lowestObserverState=Pt.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+lt(),this.value=void 0,this.isComputing=!1,this.name=r||"ComputedValue@"+lt()}return e.prototype.peek=function(){this.isComputing=!0;var e=B(!1),t=this.derivation.call(this.scope);return z(e),this.isComputing=!1,t},e.prototype.peekUntracked=function(){var e=!0;try{var t=this.peek();return e=!1,t}finally{e&&W(this)}},e.prototype.onBecomeStale=function(){pe(this)},e.prototype.onBecomeUnobserved=function(){ft(this.dependenciesState!==Pt.NOT_TRACKING,"INTERNAL ERROR only onBecomeUnobserved shouldn't be called twice in a row"),q(this),this.value=void 0},e.prototype.get=function(){ft(!this.isComputing,"Cycle detected in computation "+this.name,this.derivation),se(),1===Mt.inBatch?F(this)&&(this.value=this.peekUntracked()):(ce(this),F(this)&&this.trackAndCompute()&&fe(this));var e=this.value;return ue(),e},e.prototype.recoverFromError=function(){this.isComputing=!1},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(){de()&&ve({object:this,type:"compute",fn:this.derivation,target:this.scope});var e=this.value,t=this.value=K(this,this.peek);return mt(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=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=Boolean(Mt.trackingDerivation),t=dt(this.isComputing?this.newObserving:this.observing).map(function(e){return e.name}),n=dt(re(this).map(function(e){return e.name}));return"\nWhyRun? computation '"+this.name+"':\n * Running because: "+(e?"[active] the value of this computation is needed by a reaction":this.isComputing?"[get] The value of this computed was requested outside a reaction":"[idle] not running at the moment")+"\n"+(this.dependenciesState===Pt.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 "+vt(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 "+vt(n)+"\n")},e}();!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"}(Pt||(Pt={})),n.IDerivationState=Pt,n.untracked=Y;var Vt=["mobxGuid","resetId","spyListeners","strictMode","runId"],$t=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 $t;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}(),Ut=function(){function e(e,t){void 0===e&&(e="Reaction@"+lt()),this.name=e,this.onInvalidate=t,this.observing=[],this.newObserving=[],this.dependenciesState=Pt.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+lt(),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),se(),he(),ue())},e.prototype.isScheduled=function(){return this._isScheduled},e.prototype.runReaction=function(){this.isDisposed||(this._isScheduled=!1,F(this)&&(this._isTrackPending=!0,this.onInvalidate(),this._isTrackPending&&de()&&ve({object:this,type:"scheduled-reaction"})))},e.prototype.track=function(e){se();var t,n=de();n&&(t=Date.now(),be({object:this,type:"reaction",fn:e})),this._isRunning=!0,K(this,e),this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&q(this),n&&ye({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||(se(),q(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=dt(this._isRunning?this.newObserving: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 "+vt(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=Ut;var Nt=100,Bt=!1,zt={spyReportEnd:!0};n.spy=me,n.transaction=we;var Ft;!function(e){e[e.Recursive=0]="Recursive",e[e.Reference=1]="Reference",e[e.Structure=2]="Structure",e[e.Flat=3]="Flat"}(Ft||(Ft={})),n.asReference=Te,n.asStructure=je,n.asFlat=Ee;var Gt=function(){function e(e){this.value=e,Ve(e,"Modifiers are not allowed to be nested")}return e}(),Jt=function(){function e(e){this.value=e,Ve(e,"Modifiers are not allowed to be nested")}return e}(),Kt=function(){function e(e){this.value=e,Ve(e,"Modifiers are not allowed to be nested")}return e}();n.asMap=Ce;var Wt=function(){var e=!1,t={};return Object.defineProperty(t,"0",{set:function(){e=!0}}),Object.create(t)[0]=1,e===!1}(),Ht=0,qt=function(){function e(){}return e}();qt.prototype=[];var Yt=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 Ct(e||"ObservableArray@"+lt())}return e.prototype.makeReactiveArrayItem=function(e){return Ve(e,"Array values cannot have modifiers"),this.mode===Ft.Flat||this.mode===Ft.Reference?e:De(e,this.mode,this.atom.name+"[..]")},e.prototype.intercept=function(e){return Oe(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}),ke(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>Ht&&Ne(e+t+1)},e.prototype.spliceWithArray=function(e,t,n){J();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=Ae(this,{object:this.array,type:"splice",index:e,removedCount:t,added:n});if(!i)return cn;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&&de(),i=Re(this),o=i||r?{object:this.array,type:"update",index:e,newValue:t,oldValue:n}:null;r&&be(o),this.atom.reportChanged(),i&&Ie(this,o),r&&ye()},e.prototype.notifyArraySplice=function(e,t,n){var r=!this.owned&&de(),i=Re(this),o=i||r?{object:this.array,type:"splice",index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;r&&be(o),this.atom.reportChanged(),i&&Ie(this,o),r&&ye()},e}(),Xt=function(e){function t(t,n,r,i){void 0===i&&(i=!1),e.call(this);var o=new Yt(r,n,this,i);_t(this,"$mobx",o),t&&t.length?(o.updateArrayLength(0,t.length),o.values=t.map(o.makeReactiveArrayItem,o),o.notifyArraySplice(0,o.values.slice(),cn)):o.values=[],Wt&&Object.defineProperty(o.array,"0",Qt)}return kt(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}(qt);ct(Xt.prototype,function(){return ut(this.slice())}),wt(Xt.prototype,["constructor","intercept","observe","clear","concat","replace","toJS","toJSON","peek","find","splice","push","pop","shift","unshift","reverse","sort","remove","toString","toLocaleString"]),Object.defineProperty(Xt.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];xt(Xt.prototype,e,function(){return this.$mobx.atom.reportObserved(),t.apply(this.$mobx.values,arguments)})});var Qt={configurable:!0,enumerable:!1,set:Me(0),get:Ue(0)};Ne(1e3),n.fastArray=ze,n.isObservableArray=Fe;var Zt={},en=function(){function e(e,t){var n=this;this.$mobx=Zt,this._data={},this._hasMap={},this.name="ObservableMap@"+lt(),this._keys=new Xt(null,Ft.Reference,this.name+".keys()",(!0)),this.interceptors=null,this.changeListeners=null,this._valueMode=Pe(t),this._valueMode===Ft.Flat&&(this._valueMode=Ft.Reference),N(!0,function(){bt(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=Ae(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=Ae(this,{type:"delete",object:this,name:e});if(!n)return!1}if(this._has(e)){var r=de(),i=Re(this),n=i||r?{type:"delete",object:this,oldValue:this._data[e].value,name:e}:null;return r&&be(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),i&&Ie(this,n),r&&ye(),!0}return!1},e.prototype._updateHasMapEntry=function(e,t){var n=this._hasMap[e];return n?n.setNewValue(t):n=this._hasMap[e]=new an(t,Ft.Reference,this.name+"."+e+"?",(!1)),n},e.prototype._updateValue=function(e,t){var n=this._data[e];if(t=n.prepareNewValue(t),t!==on){var r=de(),i=Re(this),o=i||r?{type:"update",object:this,oldValue:n.value,name:e,newValue:t}:null;r&&be(o),n.setNewValue(t),i&&Ie(this,o),r&&ye()}},e.prototype._addValue=function(e,t){var n=this;we(function(){var r=n._data[e]=new an(t,n._valueMode,n.name+"."+e,(!1));t=r.value,n._updateHasMapEntry(e,!0),n._keys.push(e)},void 0,!1);var r=de(),i=Re(this),o=i||r?{type:"add",object:this,name:e,newValue:t}:null;r&&be(o),i&&Ie(this,o),r&&ye()},e.prototype.get=function(e){if(e=""+e,this.has(e))return this._data[e].get()},e.prototype.keys=function(){return ut(this._keys.slice())},e.prototype.values=function(){return ut(this._keys.map(this.get,this))},e.prototype.entries=function(){var e=this;return ut(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(){Y(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 pt("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."),ke(this,e)},e.prototype.intercept=function(e){return Oe(this,e)},e}();n.ObservableMap=en,ct(en.prototype,function(){return this.entries()}),n.map=Ge,n.isObservableMap=Je;var tn=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."),ke(this,e)},e.prototype.intercept=function(e){return Oe(this,e)},e}(),nn={},rn={};n.isObservableObject=Ze;var on={},an=function(e){function t(t,n,r,i){void 0===r&&(r="ObservableValue@"+lt()),void 0===i&&(i=!0),e.call(this,r),this.mode=n,this.hasUnreportedChange=!1,this.value=void 0;var o=Le(t,Ft.Recursive),a=o[0],s=o[1];this.mode===Ft.Recursive&&(this.mode=a),this.value=De(s,this.mode,this.name),i&&de()&&ve({type:"create",object:this,newValue:this.value})}return kt(t,e),t.prototype.set=function(e){var t=this.value;if(e=this.prepareNewValue(e),e!==on){var n=de();n&&be({type:"update",object:this,newValue:e,oldValue:t}),this.setNewValue(e),n&&ye()}},t.prototype.prepareNewValue=function(e){if(Ve(e,"Modifiers cannot be used on non-initial values."),J(),Se(this)){var t=Ae(this,{object:this,type:"update",newValue:e});if(!t)return on;e=t.newValue}var n=mt(this.mode===Ft.Structure,this.value,e);return n?De(e,this.mode,this.name):on},t.prototype.setNewValue=function(e){var t=this.value;this.value=e,this.reportChanged(),Re(this)&&Ie(this,[e,t])},t.prototype.get=function(){return this.reportObserved(),this.value},t.prototype.intercept=function(e){return Oe(this,e)},t.prototype.observe=function(e,t){return t&&e(this.value,void 0),ke(this,e)},t.prototype.toJSON=function(){return this.get()},t.prototype.toString=function(){return this.name+"["+this.value+"]"},t}(Ct),sn="__$$iterating",un=function(){function e(){this.listeners=[],pt("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),ht(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=un;var cn=[];Object.freeze(cn);var ln=[],fn=function(){},pn=Object.prototype.hasOwnProperty}).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.5.0-alpha1",
"version": "2.5.0-rc1",
"description": "Simple, scalable state management.",

@@ -19,4 +19,4 @@ "main": "lib/mobx.js",

"test-browser-firefox": "npm run small-build && ( browserify test/*.js | tape-run --browser firefox )",
"test-travis": "npm run small-build && tape test/*.js test/perf/index.js && tsc && istanbul cover tape test/*.js",
"coverage": "npm run small-build && npm run build-tests && istanbul cover tape test/*.js test/perf/index.js && cat ./coverage/lcov.info|coveralls",
"test-travis": "npm run small-build && npm run build-tests && tape test/*.js test/perf/index.js && tsc && istanbul cover tape test/*.js",
"coverage": "npm run quick-build && npm run build-tests && istanbul cover tape test/*.js",
"build-tests": "npm run build-typescript-tests && npm run build-babel-tests",

@@ -77,2 +77,2 @@ "build-typescript-tests": "tsc -m commonjs -t es5 --experimentalDecorators --noImplicitAny --outDir test test/typescript-tests.ts",

]
}
}

@@ -14,5 +14,6 @@ <img src="docs/mobx.png" alt="logo" height="120" align="right" />

* Videos:
* [Egghead.io course: Manage Complex State in React Apps with MobX](https://egghead.io/courses/manage-complex-state-in-react-apps-with-mobx)
* [Practical React with MobX](https://www.youtube.com/watch?v=XGwuM_u7UeQ). In depth introduction and explanation to MobX and React by Matt Ruby on OpenSourceNorth.
* [Screencast: intro to MobX](https://www.youtube.com/watch?v=K8dr8BMU7-8)
* [Egghead.io course: Manage Complex State in React Apps with MobX](https://egghead.io/courses/manage-complex-state-in-react-apps-with-mobx) - 30m.
* [Practical React with MobX](https://www.youtube.com/watch?v=XGwuM_u7UeQ). In depth introduction and explanation to MobX and React by Matt Ruby on OpenSourceNorth (ES5 only) - 42m.
* LearnCode.academy MobX tutorial [Part I: MobX + React is AWESOME (7m)](https://www.youtube.com/watch?v=_q50BXqkAfI) [Part II: Computed Values and Nested/Referenced Observables (12m.)](https://www.youtube.com/watch?v=nYvNqKrl69s)
* [Screencast: intro to MobX](https://www.youtube.com/watch?v=K8dr8BMU7-8) - 8m
* [State Management Is Easy, React Amsterdam 2016 conf](https://www.youtube.com/watch?v=ApmSsu3qnf0&feature=youtu.be) ([slides](https://speakerdeck.com/mweststrate/state-management-is-easy-introduction-to-mobx))

@@ -49,3 +50,3 @@ * [Magix MobX, RuhrJS 2016](https://www.youtube.com/watch?v=TfxfRkNCnmk)

```javascript
// ESNext class example:
// ESNext class example with decorators:
class Todo {

@@ -57,2 +58,13 @@ id = Math.random();

// ES6 class without decorators:
class Todo {
constructor() {
this.id = Math.random()
extendObservable(this, {
title: "",
finished: false
})
}
}
// ES5 constructor function example:

@@ -247,3 +259,3 @@ function Todo() {

And finally kudo's for all the people that believed in, tried and validated MobX.
And finally kudo's for all the people that believed in, tried, validated and even [sponsored](https://github.com/mobxjs/mobx/blob/master/sponsors.md) MobX.

@@ -312,2 +324,2 @@ ## Further resources and documentation

MobX is developed largely in free time, so any ROI is appreciated :-).
If you leave a name it will be added to the sponsors list.
If you leave a name you will be added to the [sponsors](https://github.com/mobxjs/mobx/blob/master/sponsors.md) list :).

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