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.3.5 to 2.3.6

18

lib/mobx.d.ts

@@ -15,3 +15,3 @@ export { IAtom, Atom };

export { IObservableArray, IArrayWillChange, IArrayWillSplice, IArrayChange, IArraySplice, isObservableArray, fastArray };
export { IKeyValueMap, ObservableMap, IMapEntries, IMapWillChange, IMapChange, isObservableMap, map };
export { IKeyValueMap, ObservableMap, IMapEntries, IMapEntry, IMapWillChange, IMapChange, isObservableMap, map };
export { observable };

@@ -29,2 +29,3 @@ export { computed, IComputedValueOptions };

export { Lambda };
export { Iterator };
export { SimpleEventEmitter, ISimpleEventListener };

@@ -238,3 +239,4 @@ export { IObserverTree, IDependencyTree };

}
declare type IMapEntries<V> = [string, V][];
declare type IMapEntry<V> = [string, V];
declare type IMapEntries<V> = IMapEntry<V>[];
interface IMapChange<T> {

@@ -271,5 +273,5 @@ object: ObservableMap<T>;

get(key: string): V;
keys(): string[];
values(): V[];
entries(): IMapEntries<V>;
keys(): string[] & Iterator<string>;
values(): V[] & Iterator<V>;
entries(): IMapEntries<V> & Iterator<IMapEntry<V>>;
forEach(callback: (value: V, key: string, object: IKeyValueMap<V>) => void, thisArg?: any): void;

@@ -315,2 +317,8 @@ merge(other: ObservableMap<V> | IKeyValueMap<V>): ObservableMap<V>;

}
interface Iterator<T> {
next(): {
done: boolean;
value?: T;
};
}
declare type ISimpleEventListener = {

@@ -317,0 +325,0 @@ (...data: any[]): void;

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

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

"istanbul": "^0.3.21",
"iterall": "^1.0.2",
"lodash.intersection": "^3.2.0",

@@ -76,2 +77,2 @@ "tape": "^4.2.2",

]
}
}

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