Socket
Socket
Sign inDemoInstall

mobx

Package Overview
Dependencies
Maintainers
2
Versions
251
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mobx - npm Package Compare versions

Comparing version 2.5.2 to 2.6.0-fix621

9

CHANGELOG.md

@@ -0,1 +1,10 @@

# 2.6.0
_Marked as minor release as the behavior of `toJS` has been changed, which might be interpreted both as bug-fix or as breaking change, depending of how you interpreted the docs_
* Fixed [#566](https://github.com/mobxjs/mobx/pull/566): Fixed incorrect behavior of `toJS`: `toJS` will now only recurse into observable object, not all objects. The new behavior is now aligned with what is suggested in the docs, but as a result the semantics changed a bit. `toJSlegacy` will be around for a while implementing the old behavior. See [#589](See https://github.com/mobxjs/mobx/pull/589) for more details.
* Fixed [#571](https://github.com/mobxjs/mobx/pull/571): Don't use `instanceof` operator. Should fix issues if MobX is included multiple times in the same bundle.
* Fixed [#576](https://github.com/mobxjs/mobx/pull/576): disallow passing actions directly to `autorun`; as they won't be tracked by @jeffijoe
* Extending observable objects with other observable (objects) is now explicitly forbidden, fixes [#540](https://github.com/mobxjs/mobx/pull/540).
# 2.5.2

@@ -2,0 +11,0 @@

4

lib/mobx.d.ts

@@ -38,2 +38,3 @@ export { IAtom, Atom, BaseAtom };

getDependencyTree: (thing: any, property?: string) => IDependencyTree;
getGlobalState: () => any;
getObserverTree: (thing: any, property?: string) => IObserverTree;

@@ -43,2 +44,3 @@ isComputingDerivation: () => boolean;

resetGlobalState: () => void;
shareGlobalState: () => void;
spyReport: (event: any) => boolean;

@@ -326,3 +328,3 @@ spyReportEnd: (change?: any) => void;

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

@@ -329,0 +331,0 @@ "observable-object": IObservableObject;

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

@@ -76,2 +76,2 @@ "main": "lib/mobx.js",

]
}
}

@@ -9,2 +9,4 @@ <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)
[![Discuss MobX on Hashnode](https://hashnode.github.io/badges/mobx.svg)](https://hashnode.com/n/mobx)
[![Donate](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://mobxjs.github.io/mobx/donate.html)

@@ -14,5 +16,5 @@ ![npm install mobx](https://nodei.co/npm/mobx.png?downloadRank=true&downloads=true)

* Installation: `npm install mobx --save`. React bindings: `npm install mobx-react --save`. To enable ESNext decorators (optional), see below.
* CDN:
* CDN:
- https://unpkg.com/mobx/lib/mobx.umd.js
- https://cdnjs.com/libraries/mobx
- https://unpkg.com/mobx/lib/mobx.umd.js

@@ -25,2 +27,3 @@ ## Getting started

* [Egghead.io course: Manage Complex State in React Apps with MobX](https://egghead.io/courses/manage-complex-state-in-react-apps-with-mobx) - 30m.
* [ReactNext 2016: Real World MobX](https://www.youtube.com/watch?v=Aws40KOx90U) - 40m [slides](https://docs.google.com/presentation/d/1DrI6Hc2xIPTLBkfNH8YczOcPXQTOaCIcDESdyVfG_bE/edit?usp=sharing)
* [Practical React with MobX](https://www.youtube.com/watch?v=XGwuM_u7UeQ). In depth introduction and explanation to MobX and React by Matt Ruby on OpenSourceNorth (ES5 only) - 42m.

@@ -104,3 +107,3 @@ * LearnCode.academy MobX tutorial [Part I: MobX + React is AWESOME (7m)](https://www.youtube.com/watch?v=_q50BXqkAfI) [Part II: Computed Values and Nested/Referenced Observables (12m.)](https://www.youtube.com/watch?v=nYvNqKrl69s)

MobX will ensure that `unfinishedTodoCount` is updated automatically when a todo is added or when one of the `finished` properties is modified.
Computations like these can very well be compared with formulas in spreadsheet programs like MS Excel. They update automatically whenever, and only when, needed.
Computations like these can very well be compared with formulas in spreadsheet programs like MS Excel. They update automatically only when required.

@@ -107,0 +110,0 @@ ### Reactions

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