Socket
Socket
Sign inDemoInstall

mobx

Package Overview
Dependencies
Maintainers
1
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.2.2 to 2.3.0

31

CHANGELOG.md

@@ -1,3 +0,32 @@

# Next:
# 2.3.0
### Introduced `whyRun`:
Usage:
* `whyRun()`
* `whyRun(Reaction object / ComputedValue object / disposer function)`
* `whyRun(object, "computed property name")`
`whyRun` is a small utility that can be used inside computed value or reaction (`autorun`, `reaction` or the `render` method of an `observer` React component)
and prints why the derivation is currently running, and under which circumstances it will run again.
This should help to get a deeper understanding when and why MobX runs stuff, and prevent some beginner mistakes.
This feature can probably be improved based on your feedback, so feel free to file issues with suggestions!
### Semantic changes:
* `@observable` is now always defined on the class prototypes and not in the instances. This means that `@observable` properties are enumerable, but won't appear if `Object.keys` or `hasOwnProperty` is used on a class _instance_.
* Updated semantics of `reaction` as discussed in `#278`. The expression now needs to return a value and the side effect won't be triggered if the result didn't change. `asStructure` is supported in these cases. In contrast to MobX 2.2, effects will no longer be run if the output of the expression didn't change.
### Enhancements
* Introduces `isAction(fn)` #290
* If an (argumentless) action is passed to `observable` / `extendObservable`, it will not be converted into a computed property.
* Fixed #285: class instances are now also supported by `toJS`. Also members defined on prototypes which are enumerable are converted.
* Map keys are now always coerced to strings. Fixes #308
* `when`, `autorun` and `autorunAsync` now accept custom debug names (see #293, by @jamiewinder)
* Fixed #286: autorun's no longer stop working if an action throws an exception
* Implemented `runInAction`, can be used to create on the fly actions (especially useful in combination with `async/await`, see #299
* Updated logo as per #244. Tnx @osenvosem!
# 2.2.2:
* Fixed issue #267: exception when `useStrict(true)` was invoked in combination with `@observable` attributes when using Babel

@@ -4,0 +33,0 @@ * Fixed issue #269: @action in combination with typescript targeting ES6 and reflect.ts

41

lib/mobx.d.ts

@@ -1,8 +0,8 @@

export { Lambda };
export { SimpleEventEmitter, ISimpleEventListener };
export { IObserverTree, IDependencyTree };
export { IAtom, Atom };
export { IObservable, IDepTreeNode };
export { Reaction };
export { IDerivation, untracked };
export { action, useStrict };
export { action, useStrict, isAction, runInAction };
export { spy };
export { transaction };
export { asReference, asFlat, asStructure, asMap };

@@ -25,5 +25,6 @@ export { IInterceptable, IInterceptor };

export { ITransformer, createTransformer };
export { transaction };
export { Reaction };
export { IAtom, Atom };
export { whyRun };
export { Lambda };
export { SimpleEventEmitter, ISimpleEventListener };
export { IObserverTree, IDependencyTree };
export declare const extras: {

@@ -48,15 +49,11 @@ allowStateChanges: <T>(allowStateChanges: boolean, func: () => T) => T;

};
declare function autorun(view: Lambda, scope?: any): Lambda & {
$mosbservable: Reaction;
};
declare function when(predicate: () => boolean, effect: Lambda, scope?: any): Lambda & {
$mosbservable: Reaction;
};
declare function autorun(view: Lambda, scope?: any): any;
declare function autorun(name: string, view: Lambda, scope?: any): any;
declare function when(name: string, predicate: () => boolean, effect: Lambda, scope?: any): any;
declare function when(predicate: () => boolean, effect: Lambda, scope?: any): any;
declare function autorunUntil(predicate: () => boolean, effect: Lambda, scope?: any): any;
declare function autorunAsync(func: Lambda, delay?: number, scope?: any): Lambda & {
$mosbservable: Reaction;
};
declare function reaction<T>(expression: () => T, effect: (arg: T) => void, fireImmediately?: boolean, delay?: number, scope?: any): Lambda & {
$mosbservable: Reaction;
};
declare function autorunAsync(name: string, func: Lambda, delay?: number, scope?: any): any;
declare function autorunAsync(func: Lambda, delay?: number, scope?: any): any;
declare function reaction<T>(name: string, expression: () => T, effect: (arg: T) => void, fireImmediately?: boolean, delay?: number, scope?: any): any;
declare function reaction<T>(expression: () => T, effect: (arg: T) => void, fireImmediately?: boolean, delay?: number, scope?: any): any;
interface IComputedValueOptions {

@@ -105,2 +102,3 @@ asStructure: boolean;

declare function toJSON(source: any, detectCycles?: boolean, __alreadySeen?: [any, any][]): any;
declare function whyRun(thing?: any, prop?: string): string;
declare function action<T extends Function>(fn: T): T;

@@ -110,2 +108,5 @@ declare function action<T extends Function>(name: string, fn: T): T;

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

@@ -160,2 +161,3 @@ interface IAtom extends IObservable {

_isTrackPending: boolean;
_isRunning: boolean;
constructor(name: string, onInvalidate: () => void);

@@ -174,2 +176,3 @@ onBecomeObserved(): void;

toString(): string;
whyRun(): string;
}

@@ -176,0 +179,0 @@ declare function spy(listener: (change: any) => void): Lambda;

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

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

@@ -9,3 +9,2 @@ <img src="docs/mobx.png" alt="logo" height="120" align="right" />

[![Join the chat at https://gitter.im/mobxjs/mobx](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/mobxjs/mobx?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![#mobx channel on reactiflux discord](https://img.shields.io/badge/discord-%23mobx%20%40reactiflux-blue.svg)](https://discord.gg/0ZcbPKXt5bYAa2J1)

@@ -17,2 +16,3 @@ * Installation: `npm install mobx --save`. React bindings: `npm install mobx-react --save`

* [Egghead.io lesson 1: syncing the UI with the app state using observable and observer](https://egghead.io/lessons/javascript-mobx-and-react-intro-syncing-the-ui-with-the-app-state-using-observable-and-observer)
* [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)

@@ -27,7 +27,7 @@ * [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))

_Everything that can be derived from the application state, should be derived. Automatically._
_Anything that can be derived from the application state, should be derived. Automatically._
which includes the UI, data serialization, server communication, etc.
<img alt="MobX unidirectional flow" src="docs/flow.png" height="200" align="center" />
<img alt="MobX unidirectional flow" src="docs/flow.png" align="center" />

@@ -80,2 +80,3 @@ React and MobX together are a powerful combination. React renders the application state by providing mechanisms to translate it into a tree of renderable components. MobX provides the mechanism to store and update the application state that React then uses.

import React, {Component} from 'react';
import ReactDOM from 'react-dom';
import {observer} from "mobx-react";

@@ -108,3 +109,3 @@

const store = new TodoList();
React.render(<TodoListView todoList={store} />, document.getElementById('mount'));
ReactDOM.render(<TodoListView todoList={store} />, document.getElementById('mount'));
```

@@ -233,2 +234,3 @@

* [Smalldots MobX Store](https://github.com/smalldots/mobx-store) Store API for MobX
* [mobx-roof](https://github.com/mobx-roof/mobx-roof) Simple, React MVVM framework based on mobx

@@ -247,2 +249,3 @@ _Feel free to create a PR to add your own!_

* [Google Play Music Desktop Remote](https://github.com/GPMDP/google-play-music-desktop-remote) A React-Native app for remote controlling Google Play Music Desktop: MobX + WebSocket.
* [React Portal](https://github.com/vinej/react-portal) A Dashboard example created with React/Mobx with a Flux pattern inspired by Redux.

@@ -249,0 +252,0 @@ ## What others are saying...

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