mobx 5.15.1 → 5.15.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -1
- package/lib/mobx.es6.js +12 -7
- package/lib/mobx.js +12 -7
- package/lib/mobx.min.js +1 -1
- package/lib/mobx.module.js +12 -7
- package/lib/mobx.umd.js +12 -7
- package/lib/mobx.umd.min.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
# 5.15.2 / 4.15.2
|
|
2
|
+
|
|
3
|
+
- Fixed [#2230](https://github.com/mobxjs/mobx/issue/2230) computedvalue: throw error object instead of string when options is empty [#2243](https://github.com/mobxjs/mobx/pull/2243) by [@ramkumarvenkat](https://github.com/ramkumarvenkat)
|
|
4
|
+
- supports ES6 Sets and Maps in shallow comparer. [#2238](https://github.com/mobxjs/mobx/pull/2238) by [@hearnden](https://github.com/hearnden)
|
|
5
|
+
- `extendObservable`: can be used existing properties again. Fixes [#2250](https://github.com/mobxjs/mobx/issue/2250) through [#2252](https://github.com/mobxjs/mobx/pull/2252) by [@davefeucht](https://github.com/davefeucht)
|
|
6
|
+
|
|
1
7
|
# 5.15.1 / 4.15.1
|
|
2
8
|
|
|
3
9
|
- Make initial values of observable set accept readonly array [#2202](https://github.com/mobxjs/mobx/pull/2202)
|
|
@@ -378,7 +384,7 @@ The changes mentioned here are discussed in detail in the [migration notes](http
|
|
|
378
384
|
- `observable.shallowObject(values)` has been removed, instead use `observable.object(values, {}, { deep: false })`
|
|
379
385
|
- `extendShallowObservable(target, props)`, instead use `extendObservable(target, props, {}, { deep: false })`
|
|
380
386
|
- The decorators `observable.ref`, `observable.shallow`, `observable.deep`, `observable.struct` can no longer be used as functions. Instead, they should be passed as part of the `decorators` param to resp. `observable.object` and `extendObservable`
|
|
381
|
-
- The new signature of `extendObservable` is `extendObservable(target, props, decorators?, options?)`. This also means it is no longer possible to pass multiple bags of properties to `extendObservable`.
|
|
387
|
+
- The new signature of `extendObservable` is `extendObservable(target, props, decorators?, options?)`. This also means it is no longer possible to pass multiple bags of properties to `extendObservable`. ~~`extendObservable` can no longer be used to re-declare properties. Use `set` instead to update existing properties (or introduce new ones).~~ Update 13-01-2020: the latter limitation has been reverted in MobX 4.15.2 / 5.15.2
|
|
382
388
|
- Iterating maps now follows the spec, that is, `map.values()`, `map.entries()`, `map.keys()`, `map[@@iterator]()` and `array[@@iterator]()` no longer return an array, but an iterator. Use `mobx.values(map)` or `Array.from(map)` to convert the iterators to arrays.
|
|
383
389
|
- dropped `@computed.equals`, instead, you can now use `@computed({ equals: ... })`
|
|
384
390
|
- `useStrict(boolean)` was dropped, use `configure({ enforceActions: boolean })` instead
|
package/lib/mobx.es6.js
CHANGED
|
@@ -1049,8 +1049,7 @@ class ComputedValue {
|
|
|
1049
1049
|
this.isComputing = false; // to check for cycles
|
|
1050
1050
|
this.isRunningSetter = false;
|
|
1051
1051
|
this.isTracing = TraceMode.NONE;
|
|
1052
|
-
|
|
1053
|
-
throw "[mobx] missing option for computed: get";
|
|
1052
|
+
invariant(options.get, "missing option for computed: get");
|
|
1054
1053
|
this.derivation = options.get;
|
|
1055
1054
|
this.name = options.name || "ComputedValue@" + getNextId();
|
|
1056
1055
|
if (options.set)
|
|
@@ -2206,8 +2205,6 @@ function extendObservableObjectWithProperties(target, properties, decorators, de
|
|
|
2206
2205
|
if (process.env.NODE_ENV !== "production") {
|
|
2207
2206
|
if (!isPlainObject(properties))
|
|
2208
2207
|
fail(`'extendObservabe' only accepts plain objects as second argument`);
|
|
2209
|
-
if (Object.getOwnPropertyDescriptor(target, key))
|
|
2210
|
-
fail(`'extendObservable' can only be used to introduce new properties. Use 'set' or 'decorate' instead. The property '${stringifyKey(key)}' already exists on '${target}'`);
|
|
2211
2208
|
if (isComputed(descriptor.value))
|
|
2212
2209
|
fail(`Passing a 'computed' as initial property value is no longer supported by extendObservable. Use a getter or decorator instead`);
|
|
2213
2210
|
}
|
|
@@ -4116,9 +4113,6 @@ function eq(a, b, depth, aStack, bStack) {
|
|
|
4116
4113
|
const type = typeof a;
|
|
4117
4114
|
if (type !== "function" && type !== "object" && typeof b != "object")
|
|
4118
4115
|
return false;
|
|
4119
|
-
// Unwrap any wrapped objects.
|
|
4120
|
-
a = unwrap(a);
|
|
4121
|
-
b = unwrap(b);
|
|
4122
4116
|
// Compare `[[Class]]` names.
|
|
4123
4117
|
const className = toString.call(a);
|
|
4124
4118
|
if (className !== toString.call(b))
|
|
@@ -4146,7 +4140,18 @@ function eq(a, b, depth, aStack, bStack) {
|
|
|
4146
4140
|
return +a === +b;
|
|
4147
4141
|
case "[object Symbol]":
|
|
4148
4142
|
return (typeof Symbol !== "undefined" && Symbol.valueOf.call(a) === Symbol.valueOf.call(b));
|
|
4143
|
+
case "[object Map]":
|
|
4144
|
+
case "[object Set]":
|
|
4145
|
+
// Maps and Sets are unwrapped to arrays of entry-pairs, adding an incidental level.
|
|
4146
|
+
// Hide this extra level by increasing the depth.
|
|
4147
|
+
if (depth >= 0) {
|
|
4148
|
+
depth++;
|
|
4149
|
+
}
|
|
4150
|
+
break;
|
|
4149
4151
|
}
|
|
4152
|
+
// Unwrap any wrapped objects.
|
|
4153
|
+
a = unwrap(a);
|
|
4154
|
+
b = unwrap(b);
|
|
4150
4155
|
const areArrays = className === "[object Array]";
|
|
4151
4156
|
if (!areArrays) {
|
|
4152
4157
|
if (typeof a != "object" || typeof b != "object")
|
package/lib/mobx.js
CHANGED
|
@@ -1151,8 +1151,7 @@ var ComputedValue = /** @class */ (function () {
|
|
|
1151
1151
|
this.isComputing = false; // to check for cycles
|
|
1152
1152
|
this.isRunningSetter = false;
|
|
1153
1153
|
this.isTracing = TraceMode.NONE;
|
|
1154
|
-
|
|
1155
|
-
throw "[mobx] missing option for computed: get";
|
|
1154
|
+
invariant(options.get, "missing option for computed: get");
|
|
1156
1155
|
this.derivation = options.get;
|
|
1157
1156
|
this.name = options.name || "ComputedValue@" + getNextId();
|
|
1158
1157
|
if (options.set)
|
|
@@ -2320,8 +2319,6 @@ function extendObservableObjectWithProperties(target, properties, decorators, de
|
|
|
2320
2319
|
if (process.env.NODE_ENV !== "production") {
|
|
2321
2320
|
if (!isPlainObject(properties))
|
|
2322
2321
|
fail("'extendObservabe' only accepts plain objects as second argument");
|
|
2323
|
-
if (Object.getOwnPropertyDescriptor(target, key))
|
|
2324
|
-
fail("'extendObservable' can only be used to introduce new properties. Use 'set' or 'decorate' instead. The property '" + stringifyKey(key) + "' already exists on '" + target + "'");
|
|
2325
2322
|
if (isComputed(descriptor.value))
|
|
2326
2323
|
fail("Passing a 'computed' as initial property value is no longer supported by extendObservable. Use a getter or decorator instead");
|
|
2327
2324
|
}
|
|
@@ -4366,9 +4363,6 @@ function eq(a, b, depth, aStack, bStack) {
|
|
|
4366
4363
|
var type = typeof a;
|
|
4367
4364
|
if (type !== "function" && type !== "object" && typeof b != "object")
|
|
4368
4365
|
return false;
|
|
4369
|
-
// Unwrap any wrapped objects.
|
|
4370
|
-
a = unwrap(a);
|
|
4371
|
-
b = unwrap(b);
|
|
4372
4366
|
// Compare `[[Class]]` names.
|
|
4373
4367
|
var className = toString.call(a);
|
|
4374
4368
|
if (className !== toString.call(b))
|
|
@@ -4396,7 +4390,18 @@ function eq(a, b, depth, aStack, bStack) {
|
|
|
4396
4390
|
return +a === +b;
|
|
4397
4391
|
case "[object Symbol]":
|
|
4398
4392
|
return (typeof Symbol !== "undefined" && Symbol.valueOf.call(a) === Symbol.valueOf.call(b));
|
|
4393
|
+
case "[object Map]":
|
|
4394
|
+
case "[object Set]":
|
|
4395
|
+
// Maps and Sets are unwrapped to arrays of entry-pairs, adding an incidental level.
|
|
4396
|
+
// Hide this extra level by increasing the depth.
|
|
4397
|
+
if (depth >= 0) {
|
|
4398
|
+
depth++;
|
|
4399
|
+
}
|
|
4400
|
+
break;
|
|
4399
4401
|
}
|
|
4402
|
+
// Unwrap any wrapped objects.
|
|
4403
|
+
a = unwrap(a);
|
|
4404
|
+
b = unwrap(b);
|
|
4400
4405
|
var areArrays = className === "[object Array]";
|
|
4401
4406
|
if (!areArrays) {
|
|
4402
4407
|
if (typeof a != "object" || typeof b != "object")
|
package/lib/mobx.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var extendStatics=function(e,t){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};function __extends(e,t){function r(){this.constructor=e}extendStatics(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var __assign=function(){return(__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function __values(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}function __read(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,a=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)i.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(o)throw o.error}}return i}function __spread(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read(arguments[t]));return e}var OBFUSCATED_ERROR="An invariant failed, however the error is obfuscated because this is a production build.",EMPTY_ARRAY=[];Object.freeze(EMPTY_ARRAY);var EMPTY_OBJECT={};function getNextId(){return++globalState.mobxGuid}function fail(e){throw invariant(!1,e),"X"}function invariant(e,t){if(!e)throw new Error("[mobx] "+(t||OBFUSCATED_ERROR))}Object.freeze(EMPTY_OBJECT);var deprecatedMessages=[];function deprecated(e,t){return!1}function once(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var noop=function(){};function unique(e){var t=[];return e.forEach(function(e){-1===t.indexOf(e)&&t.push(e)}),t}function isObject(e){return null!==e&&"object"==typeof e}function isPlainObject(e){if(null===e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}function addHiddenProp(e,t,r){Object.defineProperty(e,t,{enumerable:!1,writable:!0,configurable:!0,value:r})}function addHiddenFinalProp(e,t,r){Object.defineProperty(e,t,{enumerable:!1,writable:!1,configurable:!0,value:r})}function isPropertyConfigurable(e,t){var r=Object.getOwnPropertyDescriptor(e,t);return!r||!1!==r.configurable&&!1!==r.writable}function createInstanceofPredicate(e,t){var r="isMobX"+e;return t.prototype[r]=!0,function(e){return isObject(e)&&!0===e[r]}}function isArrayLike(e){return Array.isArray(e)||isObservableArray(e)}function isES6Map(e){return e instanceof Map}function isES6Set(e){return e instanceof Set}function getPlainObjectKeys(e){var t=new Set;for(var r in e)t.add(r);return Object.getOwnPropertySymbols(e).forEach(function(r){Object.getOwnPropertyDescriptor(e,r).enumerable&&t.add(r)}),Array.from(t)}function stringifyKey(e){return e&&e.toString?e.toString():new String(e).toString()}function getMapLikeKeys(e){return isPlainObject(e)?Object.keys(e):Array.isArray(e)?e.map(function(e){return __read(e,1)[0]}):isES6Map(e)||isObservableMap(e)?Array.from(e.keys()):fail("Cannot get keys from '"+e+"'")}function toPrimitive(e){return null===e?null:"object"==typeof e?""+e:e}var $mobx=Symbol("mobx administration"),Atom=function(){function e(e){void 0===e&&(e="Atom@"+getNextId()),this.name=e,this.isPendingUnobservation=!1,this.isBeingObserved=!1,this.observers=new Set,this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=exports.IDerivationState.NOT_TRACKING}return e.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach(function(e){return e()})},e.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach(function(e){return e()})},e.prototype.reportObserved=function(){return reportObserved(this)},e.prototype.reportChanged=function(){startBatch(),propagateChanged(this),endBatch()},e.prototype.toString=function(){return this.name},e}(),isAtom=createInstanceofPredicate("Atom",Atom);function createAtom(e,t,r){void 0===t&&(t=noop),void 0===r&&(r=noop);var n=new Atom(e);return t!==noop&&onBecomeObserved(n,t),r!==noop&&onBecomeUnobserved(n,r),n}function identityComparer(e,t){return e===t}function structuralComparer(e,t){return deepEqual(e,t)}function shallowComparer(e,t){return deepEqual(e,t,1)}function defaultComparer(e,t){return Object.is(e,t)}var comparer={identity:identityComparer,structural:structuralComparer,default:defaultComparer,shallow:shallowComparer},mobxDidRunLazyInitializersSymbol=Symbol("mobx did run lazy initializers"),mobxPendingDecorators=Symbol("mobx pending decorators"),enumerableDescriptorCache={},nonEnumerableDescriptorCache={};function createPropertyInitializerDescriptor(e,t){var r=t?enumerableDescriptorCache:nonEnumerableDescriptorCache;return r[e]||(r[e]={configurable:!0,enumerable:t,get:function(){return initializeInstance(this),this[e]},set:function(t){initializeInstance(this),this[e]=t}})}function initializeInstance(e){var t,r;if(!0!==e[mobxDidRunLazyInitializersSymbol]){var n=e[mobxPendingDecorators];if(n){addHiddenProp(e,mobxDidRunLazyInitializersSymbol,!0);var o=__spread(Object.getOwnPropertySymbols(n),Object.keys(n));try{for(var a=__values(o),i=a.next();!i.done;i=a.next()){var s=n[i.value];s.propertyCreator(e,s.prop,s.descriptor,s.decoratorTarget,s.decoratorArguments)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}}}}function createPropDecorator(e,t){return function(){var r,n=function(n,o,a,i){if(!0===i)return t(n,o,a,n,r),null;if(!Object.prototype.hasOwnProperty.call(n,mobxPendingDecorators)){var s=n[mobxPendingDecorators];addHiddenProp(n,mobxPendingDecorators,__assign({},s))}return n[mobxPendingDecorators][o]={prop:o,propertyCreator:t,descriptor:a,decoratorTarget:n,decoratorArguments:r},createPropertyInitializerDescriptor(o,e)};return quacksLikeADecorator(arguments)?(r=EMPTY_ARRAY,n.apply(null,arguments)):(r=Array.prototype.slice.call(arguments),n)}}function quacksLikeADecorator(e){return(2===e.length||3===e.length)&&("string"==typeof e[1]||"symbol"==typeof e[1])||4===e.length&&!0===e[3]}function deepEnhancer(e,t,r){return isObservable(e)?e:Array.isArray(e)?observable.array(e,{name:r}):isPlainObject(e)?observable.object(e,void 0,{name:r}):isES6Map(e)?observable.map(e,{name:r}):isES6Set(e)?observable.set(e,{name:r}):e}function shallowEnhancer(e,t,r){return null==e?e:isObservableObject(e)||isObservableArray(e)||isObservableMap(e)||isObservableSet(e)?e:Array.isArray(e)?observable.array(e,{name:r,deep:!1}):isPlainObject(e)?observable.object(e,void 0,{name:r,deep:!1}):isES6Map(e)?observable.map(e,{name:r,deep:!1}):isES6Set(e)?observable.set(e,{name:r,deep:!1}):fail(!1)}function referenceEnhancer(e){return e}function refStructEnhancer(e,t,r){return deepEqual(e,t)?t:e}function createDecoratorForEnhancer(e){invariant(e);var t=createPropDecorator(!0,function(t,r,n,o,a){var i=n?n.initializer?n.initializer.call(t):n.value:void 0;asObservableObject(t).addObservableProp(r,i,e)}),r=("undefined"!=typeof process&&process.env,t);return r.enhancer=e,r}var defaultCreateObservableOptions={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function asCreateObservableOptions(e){return null==e?defaultCreateObservableOptions:"string"==typeof e?{name:e,deep:!0,proxy:!0}:e}Object.freeze(defaultCreateObservableOptions);var deepDecorator=createDecoratorForEnhancer(deepEnhancer),shallowDecorator=createDecoratorForEnhancer(shallowEnhancer),refDecorator=createDecoratorForEnhancer(referenceEnhancer),refStructDecorator=createDecoratorForEnhancer(refStructEnhancer);function getEnhancerFromOptions(e){return e.defaultDecorator?e.defaultDecorator.enhancer:!1===e.deep?referenceEnhancer:deepEnhancer}function createObservable(e,t,r){if("string"==typeof arguments[1]||"symbol"==typeof arguments[1])return deepDecorator.apply(null,arguments);if(isObservable(e))return e;var n=isPlainObject(e)?observable.object(e,t,r):Array.isArray(e)?observable.array(e,t):isES6Map(e)?observable.map(e,t):isES6Set(e)?observable.set(e,t):e;if(n!==e)return n;fail(!1)}var observableFactories={box:function(e,t){arguments.length>2&&incorrectlyUsedAsDecorator("box");var r=asCreateObservableOptions(t);return new ObservableValue(e,getEnhancerFromOptions(r),r.name,!0,r.equals)},array:function(e,t){arguments.length>2&&incorrectlyUsedAsDecorator("array");var r=asCreateObservableOptions(t);return createObservableArray(e,getEnhancerFromOptions(r),r.name)},map:function(e,t){arguments.length>2&&incorrectlyUsedAsDecorator("map");var r=asCreateObservableOptions(t);return new ObservableMap(e,getEnhancerFromOptions(r),r.name)},set:function(e,t){arguments.length>2&&incorrectlyUsedAsDecorator("set");var r=asCreateObservableOptions(t);return new ObservableSet(e,getEnhancerFromOptions(r),r.name)},object:function(e,t,r){"string"==typeof arguments[1]&&incorrectlyUsedAsDecorator("object");var n=asCreateObservableOptions(r);if(!1===n.proxy)return extendObservable({},e,t,n);var o=getDefaultDecoratorFromObjectOptions(n),a=createDynamicObservableObject(extendObservable({},void 0,void 0,n));return extendObservableObjectWithProperties(a,e,t,o),a},ref:refDecorator,shallow:shallowDecorator,deep:deepDecorator,struct:refStructDecorator},observable=createObservable;function incorrectlyUsedAsDecorator(e){fail("Expected one or two arguments to observable."+e+". Did you accidentally try to use observable."+e+" as decorator?")}Object.keys(observableFactories).forEach(function(e){return observable[e]=observableFactories[e]});var TraceMode,computedDecorator=createPropDecorator(!1,function(e,t,r,n,o){var a=r.get,i=r.set,s=o[0]||{};asObservableObject(e).addComputedProp(e,t,__assign({get:a,set:i,context:e},s))}),computedStructDecorator=computedDecorator({equals:comparer.structural}),computed=function(e,t,r){if("string"==typeof t)return computedDecorator.apply(null,arguments);if(null!==e&&"object"==typeof e&&1===arguments.length)return computedDecorator.apply(null,arguments);var n="object"==typeof t?t:{};return n.get=e,n.set="function"==typeof t?t:n.set,n.name=n.name||e.name||"",new ComputedValue(n)};computed.struct=computedStructDecorator,function(e){e[e.NOT_TRACKING=-1]="NOT_TRACKING",e[e.UP_TO_DATE=0]="UP_TO_DATE",e[e.POSSIBLY_STALE=1]="POSSIBLY_STALE",e[e.STALE=2]="STALE"}(exports.IDerivationState||(exports.IDerivationState={})),function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"}(TraceMode||(TraceMode={}));var CaughtException=function(){return function(e){this.cause=e}}();function isCaughtException(e){return e instanceof CaughtException}function shouldCompute(e){switch(e.dependenciesState){case exports.IDerivationState.UP_TO_DATE:return!1;case exports.IDerivationState.NOT_TRACKING:case exports.IDerivationState.STALE:return!0;case exports.IDerivationState.POSSIBLY_STALE:for(var t=allowStateReadsStart(!0),r=untrackedStart(),n=e.observing,o=n.length,a=0;a<o;a++){var i=n[a];if(isComputedValue(i)){if(globalState.disableErrorBoundaries)i.get();else try{i.get()}catch(e){return untrackedEnd(r),allowStateReadsEnd(t),!0}if(e.dependenciesState===exports.IDerivationState.STALE)return untrackedEnd(r),allowStateReadsEnd(t),!0}}return changeDependenciesStateTo0(e),untrackedEnd(r),allowStateReadsEnd(t),!1}}function isComputingDerivation(){return null!==globalState.trackingDerivation}function checkIfStateModificationsAreAllowed(e){var t=e.observers.size>0;globalState.computationDepth>0&&t&&fail(!1),globalState.allowStateChanges||!t&&"strict"!==globalState.enforceActions||fail(!1)}function trackDerivedFunction(e,t,r){var n=allowStateReadsStart(!0);changeDependenciesStateTo0(e),e.newObserving=new Array(e.observing.length+100),e.unboundDepsCount=0,e.runId=++globalState.runId;var o,a=globalState.trackingDerivation;if(globalState.trackingDerivation=e,!0===globalState.disableErrorBoundaries)o=t.call(r);else try{o=t.call(r)}catch(e){o=new CaughtException(e)}return globalState.trackingDerivation=a,bindDependencies(e),warnAboutDerivationWithoutDependencies(e),allowStateReadsEnd(n),o}function warnAboutDerivationWithoutDependencies(e){}function bindDependencies(e){for(var t=e.observing,r=e.observing=e.newObserving,n=exports.IDerivationState.UP_TO_DATE,o=0,a=e.unboundDepsCount,i=0;i<a;i++){0===(s=r[i]).diffValue&&(s.diffValue=1,o!==i&&(r[o]=s),o++),s.dependenciesState>n&&(n=s.dependenciesState)}for(r.length=o,e.newObserving=null,a=t.length;a--;){0===(s=t[a]).diffValue&&removeObserver(s,e),s.diffValue=0}for(;o--;){var s;1===(s=r[o]).diffValue&&(s.diffValue=0,addObserver(s,e))}n!==exports.IDerivationState.UP_TO_DATE&&(e.dependenciesState=n,e.onBecomeStale())}function clearObserving(e){var t=e.observing;e.observing=[];for(var r=t.length;r--;)removeObserver(t[r],e);e.dependenciesState=exports.IDerivationState.NOT_TRACKING}function untracked(e){var t=untrackedStart();try{return e()}finally{untrackedEnd(t)}}function untrackedStart(){var e=globalState.trackingDerivation;return globalState.trackingDerivation=null,e}function untrackedEnd(e){globalState.trackingDerivation=e}function allowStateReadsStart(e){var t=globalState.allowStateReads;return globalState.allowStateReads=e,t}function allowStateReadsEnd(e){globalState.allowStateReads=e}function changeDependenciesStateTo0(e){if(e.dependenciesState!==exports.IDerivationState.UP_TO_DATE){e.dependenciesState=exports.IDerivationState.UP_TO_DATE;for(var t=e.observing,r=t.length;r--;)t[r].lowestObserverState=exports.IDerivationState.UP_TO_DATE}}var currentActionId=0,nextActionId=1;function createAction(e,t,r){var n=function(){return executeAction(e,t,r||this,arguments)};return n.isMobxAction=!0,n}function executeAction(e,t,r,n){var o=_startAction(e,r,n);try{return t.apply(r,n)}catch(e){throw o.error=e,e}finally{_endAction(o)}}function _startAction(e,t,r){var n=isSpyEnabled(),o=untrackedStart();startBatch();var a={prevDerivation:o,prevAllowStateChanges:allowStateChangesStart(!0),prevAllowStateReads:allowStateReadsStart(!0),notifySpy:n,startTime:0,actionId:nextActionId++,parentActionId:currentActionId};return currentActionId=a.actionId,a}function _endAction(e){currentActionId!==e.actionId&&fail("invalid action stack. did you forget to finish an action?"),currentActionId=e.parentActionId,void 0!==e.error&&(globalState.suppressReactionErrors=!0),allowStateChangesEnd(e.prevAllowStateChanges),allowStateReadsEnd(e.prevAllowStateReads),endBatch(),untrackedEnd(e.prevDerivation),e.notifySpy,globalState.suppressReactionErrors=!1}function allowStateChanges(e,t){var r,n=allowStateChangesStart(e);try{r=t()}finally{allowStateChangesEnd(n)}return r}function allowStateChangesStart(e){var t=globalState.allowStateChanges;return globalState.allowStateChanges=e,t}function allowStateChangesEnd(e){globalState.allowStateChanges=e}function allowStateChangesInsideComputed(e){var t,r=globalState.computationDepth;globalState.computationDepth=0;try{t=e()}finally{globalState.computationDepth=r}return t}var ObservableValue=function(e){function t(t,r,n,o,a){void 0===n&&(n="ObservableValue@"+getNextId()),void 0===o&&(o=!0),void 0===a&&(a=comparer.default);var i=e.call(this,n)||this;return i.enhancer=r,i.name=n,i.equals=a,i.hasUnreportedChange=!1,i.value=r(t,void 0,n),o&&isSpyEnabled(),i}return __extends(t,e),t.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.prototype.set=function(e){this.value;if((e=this.prepareNewValue(e))!==globalState.UNCHANGED){isSpyEnabled();0,this.setNewValue(e)}},t.prototype.prepareNewValue=function(e){if(checkIfStateModificationsAreAllowed(this),hasInterceptors(this)){var t=interceptChange(this,{object:this,type:"update",newValue:e});if(!t)return globalState.UNCHANGED;e=t.newValue}return e=this.enhancer(e,this.value,this.name),this.equals(this.value,e)?globalState.UNCHANGED:e},t.prototype.setNewValue=function(e){var t=this.value;this.value=e,this.reportChanged(),hasListeners(this)&¬ifyListeners(this,{type:"update",object:this,newValue:e,oldValue:t})},t.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},t.prototype.intercept=function(e){return registerInterceptor(this,e)},t.prototype.observe=function(e,t){return t&&e({object:this,type:"update",newValue:this.value,oldValue:void 0}),registerListener(this,e)},t.prototype.toJSON=function(){return this.get()},t.prototype.toString=function(){return this.name+"["+this.value+"]"},t.prototype.valueOf=function(){return toPrimitive(this.get())},t.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},t}(Atom),isObservableValue=createInstanceofPredicate("ObservableValue",ObservableValue),ComputedValue=function(){function e(e){this.dependenciesState=exports.IDerivationState.NOT_TRACKING,this.observing=[],this.newObserving=null,this.isBeingObserved=!1,this.isPendingUnobservation=!1,this.observers=new Set,this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.lowestObserverState=exports.IDerivationState.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+getNextId(),this.value=new CaughtException(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=TraceMode.NONE,this.derivation=e.get,this.name=e.name||"ComputedValue@"+getNextId(),e.set&&(this.setter=createAction(this.name+"-setter",e.set)),this.equals=e.equals||(e.compareStructural||e.struct?comparer.structural:comparer.default),this.scope=e.context,this.requiresReaction=!!e.requiresReaction,this.keepAlive=!!e.keepAlive}return e.prototype.onBecomeStale=function(){propagateMaybeChanged(this)},e.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach(function(e){return e()})},e.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach(function(e){return e()})},e.prototype.get=function(){this.isComputing&&fail("Cycle detected in computation "+this.name+": "+this.derivation),0!==globalState.inBatch||0!==this.observers.size||this.keepAlive?(reportObserved(this),shouldCompute(this)&&this.trackAndCompute()&&propagateChangeConfirmed(this)):shouldCompute(this)&&(this.warnAboutUntrackedRead(),startBatch(),this.value=this.computeValue(!1),endBatch());var e=this.value;if(isCaughtException(e))throw e.cause;return e},e.prototype.peek=function(){var e=this.computeValue(!1);if(isCaughtException(e))throw e.cause;return e},e.prototype.set=function(e){if(this.setter){invariant(!this.isRunningSetter,"The setter of computed value '"+this.name+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"),this.isRunningSetter=!0;try{this.setter.call(this.scope,e)}finally{this.isRunningSetter=!1}}else invariant(!1,!1)},e.prototype.trackAndCompute=function(){var e=this.value,t=this.dependenciesState===exports.IDerivationState.NOT_TRACKING,r=this.computeValue(!0),n=t||isCaughtException(e)||isCaughtException(r)||!this.equals(e,r);return n&&(this.value=r),n},e.prototype.computeValue=function(e){var t;if(this.isComputing=!0,globalState.computationDepth++,e)t=trackDerivedFunction(this,this.derivation,this.scope);else if(!0===globalState.disableErrorBoundaries)t=this.derivation.call(this.scope);else try{t=this.derivation.call(this.scope)}catch(e){t=new CaughtException(e)}return globalState.computationDepth--,this.isComputing=!1,t},e.prototype.suspend=function(){this.keepAlive||(clearObserving(this),this.value=void 0)},e.prototype.observe=function(e,t){var r=this,n=!0,o=void 0;return autorun(function(){var a=r.get();if(!n||t){var i=untrackedStart();e({type:"update",object:r,newValue:a,oldValue:o}),untrackedEnd(i)}n=!1,o=a})},e.prototype.warnAboutUntrackedRead=function(){},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},e.prototype.valueOf=function(){return toPrimitive(this.get())},e.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},e}(),isComputedValue=createInstanceofPredicate("ComputedValue",ComputedValue),persistentKeys=["mobxGuid","spyListeners","enforceActions","computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","allowStateReads","disableErrorBoundaries","runId","UNCHANGED"],MobXGlobals=function(){return function(){this.version=5,this.UNCHANGED={},this.trackingDerivation=null,this.computationDepth=0,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!0,this.allowStateReads=!0,this.enforceActions=!1,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.computedConfigurable=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1}}(),mockGlobal={};function getGlobal(){return"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:mockGlobal}var canMergeGlobalState=!0,isolateCalled=!1,globalState=function(){var e=getGlobal();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(canMergeGlobalState=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==(new MobXGlobals).version&&(canMergeGlobalState=!1),canMergeGlobalState?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new MobXGlobals):(setTimeout(function(){isolateCalled||fail("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")},1),new MobXGlobals)}();function isolateGlobalState(){(globalState.pendingReactions.length||globalState.inBatch||globalState.isRunningReactions)&&fail("isolateGlobalState should be called before MobX is running any reactions"),isolateCalled=!0,canMergeGlobalState&&(0==--getGlobal().__mobxInstanceCount&&(getGlobal().__mobxGlobals=void 0),globalState=new MobXGlobals)}function getGlobalState(){return globalState}function resetGlobalState(){var e=new MobXGlobals;for(var t in e)-1===persistentKeys.indexOf(t)&&(globalState[t]=e[t]);globalState.allowStateChanges=!globalState.enforceActions}function hasObservers(e){return e.observers&&e.observers.size>0}function getObservers(e){return e.observers}function addObserver(e,t){e.observers.add(t),e.lowestObserverState>t.dependenciesState&&(e.lowestObserverState=t.dependenciesState)}function removeObserver(e,t){e.observers.delete(t),0===e.observers.size&&queueForUnobservation(e)}function queueForUnobservation(e){!1===e.isPendingUnobservation&&(e.isPendingUnobservation=!0,globalState.pendingUnobservations.push(e))}function startBatch(){globalState.inBatch++}function endBatch(){if(0==--globalState.inBatch){runReactions();for(var e=globalState.pendingUnobservations,t=0;t<e.length;t++){var r=e[t];r.isPendingUnobservation=!1,0===r.observers.size&&(r.isBeingObserved&&(r.isBeingObserved=!1,r.onBecomeUnobserved()),r instanceof ComputedValue&&r.suspend())}globalState.pendingUnobservations=[]}}function reportObserved(e){var t=globalState.trackingDerivation;return null!==t?(t.runId!==e.lastAccessedBy&&(e.lastAccessedBy=t.runId,t.newObserving[t.unboundDepsCount++]=e,e.isBeingObserved||(e.isBeingObserved=!0,e.onBecomeObserved())),!0):(0===e.observers.size&&globalState.inBatch>0&&queueForUnobservation(e),!1)}function propagateChanged(e){e.lowestObserverState!==exports.IDerivationState.STALE&&(e.lowestObserverState=exports.IDerivationState.STALE,e.observers.forEach(function(t){t.dependenciesState===exports.IDerivationState.UP_TO_DATE&&(t.isTracing!==TraceMode.NONE&&logTraceInfo(t,e),t.onBecomeStale()),t.dependenciesState=exports.IDerivationState.STALE}))}function propagateChangeConfirmed(e){e.lowestObserverState!==exports.IDerivationState.STALE&&(e.lowestObserverState=exports.IDerivationState.STALE,e.observers.forEach(function(t){t.dependenciesState===exports.IDerivationState.POSSIBLY_STALE?t.dependenciesState=exports.IDerivationState.STALE:t.dependenciesState===exports.IDerivationState.UP_TO_DATE&&(e.lowestObserverState=exports.IDerivationState.UP_TO_DATE)}))}function propagateMaybeChanged(e){e.lowestObserverState===exports.IDerivationState.UP_TO_DATE&&(e.lowestObserverState=exports.IDerivationState.POSSIBLY_STALE,e.observers.forEach(function(t){t.dependenciesState===exports.IDerivationState.UP_TO_DATE&&(t.dependenciesState=exports.IDerivationState.POSSIBLY_STALE,t.isTracing!==TraceMode.NONE&&logTraceInfo(t,e),t.onBecomeStale())}))}function logTraceInfo(e,t){if(console.log("[mobx.trace] '"+e.name+"' is invalidated due to a change in: '"+t.name+"'"),e.isTracing===TraceMode.BREAK){var r=[];printDepTree(getDependencyTree(e),r,1),new Function("debugger;\n/*\nTracing '"+e.name+"'\n\nYou are entering this break point because derivation '"+e.name+"' is being traced and '"+t.name+"' is now forcing it to update.\nJust follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update\nThe stackframe you are looking for is at least ~6-8 stack-frames up.\n\n"+(e instanceof ComputedValue?e.derivation.toString().replace(/[*]\//g,"/"):"")+"\n\nThe dependencies for this derivation are:\n\n"+r.join("\n")+"\n*/\n ")()}}function printDepTree(e,t,r){t.length>=1e3?t.push("(and many more)"):(t.push(""+new Array(r).join("\t")+e.name),e.dependencies&&e.dependencies.forEach(function(e){return printDepTree(e,t,r+1)}))}var Reaction=function(){function e(e,t,r,n){void 0===e&&(e="Reaction@"+getNextId()),void 0===n&&(n=!1),this.name=e,this.onInvalidate=t,this.errorHandler=r,this.requiresObservable=n,this.observing=[],this.newObserving=[],this.dependenciesState=exports.IDerivationState.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+getNextId(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=TraceMode.NONE}return e.prototype.onBecomeStale=function(){this.schedule()},e.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,globalState.pendingReactions.push(this),runReactions())},e.prototype.isScheduled=function(){return this._isScheduled},e.prototype.runReaction=function(){if(!this.isDisposed){if(startBatch(),this._isScheduled=!1,shouldCompute(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending&&isSpyEnabled()}catch(e){this.reportExceptionInDerivation(e)}}endBatch()}},e.prototype.track=function(e){if(!this.isDisposed){startBatch(),this._isRunning=!0;var t=trackDerivedFunction(this,e,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&clearObserving(this),isCaughtException(t)&&this.reportExceptionInDerivation(t.cause),endBatch()}},e.prototype.reportExceptionInDerivation=function(e){var t=this;if(this.errorHandler)this.errorHandler(e,this);else{if(globalState.disableErrorBoundaries)throw e;var r="[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this+"'";globalState.suppressReactionErrors?console.warn("[mobx] (error in reaction '"+this.name+"' suppressed, fix error of causing action below)"):console.error(r,e),globalState.globalReactionErrorHandlers.forEach(function(r){return r(e,t)})}},e.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(startBatch(),clearObserving(this),endBatch()))},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.trace=function(e){void 0===e&&(e=!1),trace(this,e)},e}();function onReactionError(e){return globalState.globalReactionErrorHandlers.push(e),function(){var t=globalState.globalReactionErrorHandlers.indexOf(e);t>=0&&globalState.globalReactionErrorHandlers.splice(t,1)}}var MAX_REACTION_ITERATIONS=100,reactionScheduler=function(e){return e()};function runReactions(){globalState.inBatch>0||globalState.isRunningReactions||reactionScheduler(runReactionsHelper)}function runReactionsHelper(){globalState.isRunningReactions=!0;for(var e=globalState.pendingReactions,t=0;e.length>0;){++t===MAX_REACTION_ITERATIONS&&(console.error("Reaction doesn't converge to a stable state after "+MAX_REACTION_ITERATIONS+" iterations. Probably there is a cycle in the reactive function: "+e[0]),e.splice(0));for(var r=e.splice(0),n=0,o=r.length;n<o;n++)r[n].runReaction()}globalState.isRunningReactions=!1}var isReaction=createInstanceofPredicate("Reaction",Reaction);function setReactionScheduler(e){var t=reactionScheduler;reactionScheduler=function(r){return e(function(){return t(r)})}}function isSpyEnabled(){return!1}function spyReport(e){}function spyReportStart(e){}var END_EVENT={spyReportEnd:!0};function spyReportEnd(e){}function spy(e){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}function dontReassignFields(){fail(!1)}function namedActionDecorator(e){return function(t,r,n){if(n){if(n.value)return{value:createAction(e,n.value),enumerable:!1,configurable:!0,writable:!0};var o=n.initializer;return{enumerable:!1,configurable:!0,writable:!0,initializer:function(){return createAction(e,o.call(this))}}}return actionFieldDecorator(e).apply(this,arguments)}}function actionFieldDecorator(e){return function(t,r,n){Object.defineProperty(t,r,{configurable:!0,enumerable:!1,get:function(){},set:function(t){addHiddenProp(this,r,action(e,t))}})}}function boundActionDecorator(e,t,r,n){return!0===n?(defineBoundAction(e,t,r.value),null):r?{configurable:!0,enumerable:!1,get:function(){return defineBoundAction(this,t,r.value||r.initializer.call(this)),this[t]},set:dontReassignFields}:{enumerable:!1,configurable:!0,set:function(e){defineBoundAction(this,t,e)},get:function(){}}}var action=function(e,t,r,n){return 1===arguments.length&&"function"==typeof e?createAction(e.name||"<unnamed action>",e):2===arguments.length&&"function"==typeof t?createAction(e,t):1===arguments.length&&"string"==typeof e?namedActionDecorator(e):!0!==n?namedActionDecorator(t).apply(null,arguments):void addHiddenProp(e,t,createAction(e.name||t,r.value,this))};function runInAction(e,t){return executeAction("string"==typeof e?e:e.name||"<unnamed action>","function"==typeof e?e:t,this,void 0)}function isAction(e){return"function"==typeof e&&!0===e.isMobxAction}function defineBoundAction(e,t,r){addHiddenProp(e,t,createAction(t,r.bind(e)))}function autorun(e,t){void 0===t&&(t=EMPTY_OBJECT);var r,n=t&&t.name||e.name||"Autorun@"+getNextId();if(!t.scheduler&&!t.delay)r=new Reaction(n,function(){this.track(i)},t.onError,t.requiresObservable);else{var o=createSchedulerFromOptions(t),a=!1;r=new Reaction(n,function(){a||(a=!0,o(function(){a=!1,r.isDisposed||r.track(i)}))},t.onError,t.requiresObservable)}function i(){e(r)}return r.schedule(),r.getDisposer()}action.bound=boundActionDecorator;var run=function(e){return e()};function createSchedulerFromOptions(e){return e.scheduler?e.scheduler:e.delay?function(t){return setTimeout(t,e.delay)}:run}function reaction(e,t,r){void 0===r&&(r=EMPTY_OBJECT);var n,o=r.name||"Reaction@"+getNextId(),a=action(o,r.onError?wrapErrorHandler(r.onError,t):t),i=!r.scheduler&&!r.delay,s=createSchedulerFromOptions(r),c=!0,l=!1,u=r.compareStructural?comparer.structural:r.equals||comparer.default,p=new Reaction(o,function(){c||i?d():l||(l=!0,s(d))},r.onError,r.requiresObservable);function d(){if(l=!1,!p.isDisposed){var t=!1;p.track(function(){var r=e(p);t=c||!u(n,r),n=r}),c&&r.fireImmediately&&a(n,p),c||!0!==t||a(n,p),c&&(c=!1)}}return p.schedule(),p.getDisposer()}function wrapErrorHandler(e,t){return function(){try{return t.apply(this,arguments)}catch(t){e.call(this,t)}}}function onBecomeObserved(e,t,r){return interceptHook("onBecomeObserved",e,t,r)}function onBecomeUnobserved(e,t,r){return interceptHook("onBecomeUnobserved",e,t,r)}function interceptHook(e,t,r,n){var o="function"==typeof n?getAtom(t,r):getAtom(t),a="function"==typeof n?n:r,i=e+"Listeners";return o[i]?o[i].add(a):o[i]=new Set([a]),"function"!=typeof o[e]?fail(!1):function(){var e=o[i];e&&(e.delete(a),0===e.size&&delete o[i])}}function configure(e){var t=e.enforceActions,r=e.computedRequiresReaction,n=e.computedConfigurable,o=e.disableErrorBoundaries,a=e.reactionScheduler,i=e.reactionRequiresObservable,s=e.observableRequiresReaction;if(!0===e.isolateGlobalState&&isolateGlobalState(),void 0!==t){"boolean"!=typeof t&&"strict"!==t||deprecated("Deprecated value for 'enforceActions', use 'false' => '\"never\"', 'true' => '\"observed\"', '\"strict\"' => \"'always'\" instead");var c=void 0;switch(t){case!0:case"observed":c=!0;break;case!1:case"never":c=!1;break;case"strict":case"always":c="strict";break;default:fail("Invalid value for 'enforceActions': '"+t+"', expected 'never', 'always' or 'observed'")}globalState.enforceActions=c,globalState.allowStateChanges=!0!==c&&"strict"!==c}void 0!==r&&(globalState.computedRequiresReaction=!!r),void 0!==i&&(globalState.reactionRequiresObservable=!!i),void 0!==s&&(globalState.observableRequiresReaction=!!s,globalState.allowStateReads=!globalState.observableRequiresReaction),void 0!==n&&(globalState.computedConfigurable=!!n),void 0!==o&&(!0===o&&console.warn("WARNING: Debug feature only. MobX will NOT recover from errors when `disableErrorBoundaries` is enabled."),globalState.disableErrorBoundaries=!!o),a&&setReactionScheduler(a)}function decorate(e,t){var r="function"==typeof e?e.prototype:e,n=function(e){var n=t[e];Array.isArray(n)||(n=[n]);var o=Object.getOwnPropertyDescriptor(r,e),a=n.reduce(function(t,n){return n(r,e,t)},o);a&&Object.defineProperty(r,e,a)};for(var o in t)n(o);return e}function extendObservable(e,t,r,n){var o=getDefaultDecoratorFromObjectOptions(n=asCreateObservableOptions(n));return initializeInstance(e),asObservableObject(e,n.name,o.enhancer),t&&extendObservableObjectWithProperties(e,t,r,o),e}function getDefaultDecoratorFromObjectOptions(e){return e.defaultDecorator||(!1===e.deep?refDecorator:deepDecorator)}function extendObservableObjectWithProperties(e,t,r,n){var o,a;startBatch();try{var i=getPlainObjectKeys(t);try{for(var s=__values(i),c=s.next();!c.done;c=s.next()){var l=c.value,u=Object.getOwnPropertyDescriptor(t,l),p=(r&&l in r?r[l]:u.get?computedDecorator:n)(e,l,u,!0);p&&Object.defineProperty(e,l,p)}}catch(e){o={error:e}}finally{try{c&&!c.done&&(a=s.return)&&a.call(s)}finally{if(o)throw o.error}}}finally{endBatch()}}function getDependencyTree(e,t){return nodeToDependencyTree(getAtom(e,t))}function nodeToDependencyTree(e){var t={name:e.name};return e.observing&&e.observing.length>0&&(t.dependencies=unique(e.observing).map(nodeToDependencyTree)),t}function getObserverTree(e,t){return nodeToObserverTree(getAtom(e,t))}function nodeToObserverTree(e){var t={name:e.name};return hasObservers(e)&&(t.observers=Array.from(getObservers(e)).map(nodeToObserverTree)),t}var generatorId=0;function FlowCancellationError(){this.message="FLOW_CANCELLED"}function isFlowCancellationError(e){return e instanceof FlowCancellationError}function flow(e){1!==arguments.length&&fail("Flow expects 1 argument and cannot be used as decorator");var t=e.name||"<unnamed flow>";return function(){var r,n=arguments,o=++generatorId,a=action(t+" - runid: "+o+" - init",e).apply(this,n),i=void 0,s=new Promise(function(e,n){var s=0;function c(e){var r;i=void 0;try{r=action(t+" - runid: "+o+" - yield "+s++,a.next).call(a,e)}catch(e){return n(e)}u(r)}function l(e){var r;i=void 0;try{r=action(t+" - runid: "+o+" - yield "+s++,a.throw).call(a,e)}catch(e){return n(e)}u(r)}function u(t){if(!t||"function"!=typeof t.then)return t.done?e(t.value):(i=Promise.resolve(t.value)).then(c,l);t.then(u,n)}r=n,c(void 0)});return s.cancel=action(t+" - runid: "+o+" - cancel",function(){try{i&&cancelPromise(i);var e=a.return(void 0),t=Promise.resolve(e.value);t.then(noop,noop),cancelPromise(t),r(new FlowCancellationError)}catch(e){r(e)}}),s}}function cancelPromise(e){"function"==typeof e.cancel&&e.cancel()}function interceptReads(e,t,r){var n;if(isObservableMap(e)||isObservableArray(e)||isObservableValue(e))n=getAdministration(e);else{if(!isObservableObject(e))return fail(!1);if("string"!=typeof t)return fail(!1);n=getAdministration(e,t)}return void 0!==n.dehancer?fail(!1):(n.dehancer="function"==typeof t?t:r,function(){n.dehancer=void 0})}function intercept(e,t,r){return"function"==typeof r?interceptProperty(e,t,r):interceptInterceptable(e,t)}function interceptInterceptable(e,t){return getAdministration(e).intercept(t)}function interceptProperty(e,t,r){return getAdministration(e,t).intercept(r)}function _isComputed(e,t){if(null==e)return!1;if(void 0!==t){if(!1===isObservableObject(e))return!1;if(!e[$mobx].values.has(t))return!1;var r=getAtom(e,t);return isComputedValue(r)}return isComputedValue(e)}function isComputed(e){return arguments.length>1?fail(!1):_isComputed(e)}function isComputedProp(e,t){return"string"!=typeof t?fail(!1):_isComputed(e,t)}function _isObservable(e,t){return null!=e&&(void 0!==t?!!isObservableObject(e)&&e[$mobx].values.has(t):isObservableObject(e)||!!e[$mobx]||isAtom(e)||isReaction(e)||isComputedValue(e))}function isObservable(e){return 1!==arguments.length&&fail(!1),_isObservable(e)}function isObservableProp(e,t){return"string"!=typeof t?fail(!1):_isObservable(e,t)}function keys(e){return isObservableObject(e)?e[$mobx].getKeys():isObservableMap(e)?Array.from(e.keys()):isObservableSet(e)?Array.from(e.keys()):isObservableArray(e)?e.map(function(e,t){return t}):fail(!1)}function values(e){return isObservableObject(e)?keys(e).map(function(t){return e[t]}):isObservableMap(e)?keys(e).map(function(t){return e.get(t)}):isObservableSet(e)?Array.from(e.values()):isObservableArray(e)?e.slice():fail(!1)}function entries(e){return isObservableObject(e)?keys(e).map(function(t){return[t,e[t]]}):isObservableMap(e)?keys(e).map(function(t){return[t,e.get(t)]}):isObservableSet(e)?Array.from(e.entries()):isObservableArray(e)?e.map(function(e,t){return[t,e]}):fail(!1)}function set(e,t,r){if(2!==arguments.length||isObservableSet(e))if(isObservableObject(e)){var n=e[$mobx];n.values.get(t)?n.write(t,r):n.addObservableProp(t,r,n.defaultEnhancer)}else if(isObservableMap(e))e.set(t,r);else if(isObservableSet(e))e.add(t);else{if(!isObservableArray(e))return fail(!1);"number"!=typeof t&&(t=parseInt(t,10)),invariant(t>=0,"Not a valid index: '"+t+"'"),startBatch(),t>=e.length&&(e.length=t+1),e[t]=r,endBatch()}else{startBatch();var o=t;try{for(var a in o)set(e,a,o[a])}finally{endBatch()}}}function remove(e,t){if(isObservableObject(e))e[$mobx].remove(t);else if(isObservableMap(e))e.delete(t);else if(isObservableSet(e))e.delete(t);else{if(!isObservableArray(e))return fail(!1);"number"!=typeof t&&(t=parseInt(t,10)),invariant(t>=0,"Not a valid index: '"+t+"'"),e.splice(t,1)}}function has(e,t){return isObservableObject(e)?getAdministration(e).has(t):isObservableMap(e)?e.has(t):isObservableSet(e)?e.has(t):isObservableArray(e)?t>=0&&t<e.length:fail(!1)}function get(e,t){if(has(e,t))return isObservableObject(e)?e[t]:isObservableMap(e)?e.get(t):isObservableArray(e)?e[t]:fail(!1)}function observe(e,t,r,n){return"function"==typeof r?observeObservableProperty(e,t,r,n):observeObservable(e,t,r)}function observeObservable(e,t,r){return getAdministration(e).observe(t,r)}function observeObservableProperty(e,t,r,n){return getAdministration(e,t).observe(r,n)}FlowCancellationError.prototype=Object.create(Error.prototype);var defaultOptions={detectCycles:!0,exportMapsAsObjects:!0,recurseEverything:!1};function cache(e,t,r,n){return n.detectCycles&&e.set(t,r),r}function toJSHelper(e,t,r){if(!t.recurseEverything&&!isObservable(e))return e;if("object"!=typeof e)return e;if(null===e)return null;if(e instanceof Date)return e;if(isObservableValue(e))return toJSHelper(e.get(),t,r);if(isObservable(e)&&keys(e),!0===t.detectCycles&&null!==e&&r.has(e))return r.get(e);if(isObservableArray(e)||Array.isArray(e)){var n=cache(r,e,[],t),o=e.map(function(e){return toJSHelper(e,t,r)});n.length=o.length;for(var a=0,i=o.length;a<i;a++)n[a]=o[a];return n}if(isObservableSet(e)||Object.getPrototypeOf(e)===Set.prototype){if(!1===t.exportMapsAsObjects){var s=cache(r,e,new Set,t);return e.forEach(function(e){s.add(toJSHelper(e,t,r))}),s}var c=cache(r,e,[],t);return e.forEach(function(e){c.push(toJSHelper(e,t,r))}),c}if(isObservableMap(e)||Object.getPrototypeOf(e)===Map.prototype){if(!1===t.exportMapsAsObjects){var l=cache(r,e,new Map,t);return e.forEach(function(e,n){l.set(n,toJSHelper(e,t,r))}),l}var u=cache(r,e,{},t);return e.forEach(function(e,n){u[n]=toJSHelper(e,t,r)}),u}var p=cache(r,e,{},t);return getPlainObjectKeys(e).forEach(function(n){p[n]=toJSHelper(e[n],t,r)}),p}function toJS(e,t){var r;return"boolean"==typeof t&&(t={detectCycles:t}),t||(t=defaultOptions),t.detectCycles=void 0===t.detectCycles?!0===t.recurseEverything:!0===t.detectCycles,t.detectCycles&&(r=new Map),toJSHelper(e,t,r)}function trace(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=!1;"boolean"==typeof e[e.length-1]&&(r=e.pop());var n=getAtomFromArgs(e);if(!n)return fail(!1);n.isTracing===TraceMode.NONE&&console.log("[mobx.trace] '"+n.name+"' tracing enabled"),n.isTracing=r?TraceMode.BREAK:TraceMode.LOG}function getAtomFromArgs(e){switch(e.length){case 0:return globalState.trackingDerivation;case 1:return getAtom(e[0]);case 2:return getAtom(e[0],e[1])}}function transaction(e,t){void 0===t&&(t=void 0),startBatch();try{return e.apply(t)}finally{endBatch()}}function when(e,t,r){return 1===arguments.length||t&&"object"==typeof t?whenPromise(e,t):_when(e,t,r||{})}function _when(e,t,r){var n;"number"==typeof r.timeout&&(n=setTimeout(function(){if(!a[$mobx].isDisposed){a();var e=new Error("WHEN_TIMEOUT");if(!r.onError)throw e;r.onError(e)}},r.timeout)),r.name=r.name||"When@"+getNextId();var o=createAction(r.name+"-effect",t),a=autorun(function(t){e()&&(t.dispose(),n&&clearTimeout(n),o())},r);return a}function whenPromise(e,t){var r,n=new Promise(function(n,o){var a=_when(e,n,__assign(__assign({},t),{onError:o}));r=function(){a(),o("WHEN_CANCELLED")}});return n.cancel=r,n}function getAdm(e){return e[$mobx]}function isPropertyKey(e){return"string"==typeof e||"number"==typeof e||"symbol"==typeof e}var objectProxyTraps={has:function(e,t){if(t===$mobx||"constructor"===t||t===mobxDidRunLazyInitializersSymbol)return!0;var r=getAdm(e);return isPropertyKey(t)?r.has(t):t in e},get:function(e,t){if(t===$mobx||"constructor"===t||t===mobxDidRunLazyInitializersSymbol)return e[t];var r=getAdm(e),n=r.values.get(t);if(n instanceof Atom){var o=n.get();return void 0===o&&r.has(t),o}return isPropertyKey(t)&&r.has(t),e[t]},set:function(e,t,r){return!!isPropertyKey(t)&&(set(e,t,r),!0)},deleteProperty:function(e,t){return!!isPropertyKey(t)&&(getAdm(e).remove(t),!0)},ownKeys:function(e){return getAdm(e).keysAtom.reportObserved(),Reflect.ownKeys(e)},preventExtensions:function(e){return fail("Dynamic observable objects cannot be frozen"),!1}};function createDynamicObservableObject(e){var t=new Proxy(e,objectProxyTraps);return e[$mobx].proxy=t,t}function hasInterceptors(e){return void 0!==e.interceptors&&e.interceptors.length>0}function registerInterceptor(e,t){var r=e.interceptors||(e.interceptors=[]);return r.push(t),once(function(){var e=r.indexOf(t);-1!==e&&r.splice(e,1)})}function interceptChange(e,t){var r=untrackedStart();try{for(var n=__spread(e.interceptors||[]),o=0,a=n.length;o<a&&(invariant(!(t=n[o](t))||t.type,"Intercept handlers should return nothing or a change object"),t);o++);return t}finally{untrackedEnd(r)}}function hasListeners(e){return void 0!==e.changeListeners&&e.changeListeners.length>0}function registerListener(e,t){var r=e.changeListeners||(e.changeListeners=[]);return r.push(t),once(function(){var e=r.indexOf(t);-1!==e&&r.splice(e,1)})}function notifyListeners(e,t){var r=untrackedStart(),n=e.changeListeners;if(n){for(var o=0,a=(n=n.slice()).length;o<a;o++)n[o](t);untrackedEnd(r)}}var MAX_SPLICE_SIZE=1e4,arrayTraps={get:function(e,t){return t===$mobx?e[$mobx]:"length"===t?e[$mobx].getArrayLength():"number"==typeof t?arrayExtensions.get.call(e,t):"string"!=typeof t||isNaN(t)?arrayExtensions.hasOwnProperty(t)?arrayExtensions[t]:e[t]:arrayExtensions.get.call(e,parseInt(t))},set:function(e,t,r){return"length"===t&&e[$mobx].setArrayLength(r),"number"==typeof t&&arrayExtensions.set.call(e,t,r),"symbol"==typeof t||isNaN(t)?e[t]=r:arrayExtensions.set.call(e,parseInt(t),r),!0},preventExtensions:function(e){return fail("Observable arrays cannot be frozen"),!1}};function createObservableArray(e,t,r,n){void 0===r&&(r="ObservableArray@"+getNextId()),void 0===n&&(n=!1);var o=new ObservableArrayAdministration(r,t,n);addHiddenFinalProp(o.values,$mobx,o);var a=new Proxy(o.values,arrayTraps);if(o.proxy=a,e&&e.length){var i=allowStateChangesStart(!0);o.spliceWithArray(0,0,e),allowStateChangesEnd(i)}return a}var ObservableArrayAdministration=function(){function e(e,t,r){this.owned=r,this.values=[],this.proxy=void 0,this.lastKnownLength=0,this.atom=new Atom(e||"ObservableArray@"+getNextId()),this.enhancer=function(r,n){return t(r,n,e+"[..]")}}return e.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},e.prototype.dehanceValues=function(e){return void 0!==this.dehancer&&e.length>0?e.map(this.dehancer):e},e.prototype.intercept=function(e){return registerInterceptor(this,e)},e.prototype.observe=function(e,t){return void 0===t&&(t=!1),t&&e({object:this.proxy,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),registerListener(this,e)},e.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},e.prototype.setArrayLength=function(e){if("number"!=typeof e||e<0)throw new Error("[mobx.array] Out of range: "+e);var t=this.values.length;if(e!==t)if(e>t){for(var r=new Array(e-t),n=0;n<e-t;n++)r[n]=void 0;this.spliceWithArray(t,0,r)}else this.spliceWithArray(e,t-e)},e.prototype.updateArrayLength=function(e,t){if(e!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed.");this.lastKnownLength+=t},e.prototype.spliceWithArray=function(e,t,r){var n=this;checkIfStateModificationsAreAllowed(this.atom);var o=this.values.length;if(void 0===e?e=0:e>o?e=o:e<0&&(e=Math.max(0,o+e)),t=1===arguments.length?o-e:null==t?0:Math.max(0,Math.min(t,o-e)),void 0===r&&(r=EMPTY_ARRAY),hasInterceptors(this)){var a=interceptChange(this,{object:this.proxy,type:"splice",index:e,removedCount:t,added:r});if(!a)return EMPTY_ARRAY;t=a.removedCount,r=a.added}r=0===r.length?r:r.map(function(e){return n.enhancer(e,void 0)});var i=this.spliceItemsIntoValues(e,t,r);return 0===t&&0===r.length||this.notifyArraySplice(e,r,i),this.dehanceValues(i)},e.prototype.spliceItemsIntoValues=function(e,t,r){var n;if(r.length<MAX_SPLICE_SIZE)return(n=this.values).splice.apply(n,__spread([e,t],r));var o=this.values.slice(e,e+t);return this.values=this.values.slice(0,e).concat(r,this.values.slice(e+t)),o},e.prototype.notifyArrayChildUpdate=function(e,t,r){var n=!this.owned&&isSpyEnabled(),o=hasListeners(this),a=o||n?{object:this.proxy,type:"update",index:e,newValue:t,oldValue:r}:null;this.atom.reportChanged(),o&¬ifyListeners(this,a)},e.prototype.notifyArraySplice=function(e,t,r){var n=!this.owned&&isSpyEnabled(),o=hasListeners(this),a=o||n?{object:this.proxy,type:"splice",index:e,removed:r,added:t,removedCount:r.length,addedCount:t.length}:null;this.atom.reportChanged(),o&¬ifyListeners(this,a)},e}(),arrayExtensions={intercept:function(e){return this[$mobx].intercept(e)},observe:function(e,t){return void 0===t&&(t=!1),this[$mobx].observe(e,t)},clear:function(){return this.splice(0)},replace:function(e){var t=this[$mobx];return t.spliceWithArray(0,t.values.length,e)},toJS:function(){return this.slice()},toJSON:function(){return this.toJS()},splice:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=this[$mobx];switch(arguments.length){case 0:return[];case 1:return o.spliceWithArray(e);case 2:return o.spliceWithArray(e,t)}return o.spliceWithArray(e,t,r)},spliceWithArray:function(e,t,r){return this[$mobx].spliceWithArray(e,t,r)},push:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=this[$mobx];return r.spliceWithArray(r.values.length,0,e),r.values.length},pop:function(){return this.splice(Math.max(this[$mobx].values.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=this[$mobx];return r.spliceWithArray(0,0,e),r.values.length},reverse:function(){var e=this.slice();return e.reverse.apply(e,arguments)},sort:function(e){var t=this.slice();return t.sort.apply(t,arguments)},remove:function(e){var t=this[$mobx],r=t.dehanceValues(t.values).indexOf(e);return r>-1&&(this.splice(r,1),!0)},get:function(e){var t=this[$mobx];if(t){if(e<t.values.length)return t.atom.reportObserved(),t.dehanceValue(t.values[e]);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")}},set:function(e,t){var r=this[$mobx],n=r.values;if(e<n.length){checkIfStateModificationsAreAllowed(r.atom);var o=n[e];if(hasInterceptors(r)){var a=interceptChange(r,{type:"update",object:r.proxy,index:e,newValue:t});if(!a)return;t=a.newValue}(t=r.enhancer(t,o))!==o&&(n[e]=t,r.notifyArrayChildUpdate(e,t,o))}else{if(e!==n.length)throw new Error("[mobx.array] Index out of bounds, "+e+" is larger than "+n.length);r.spliceWithArray(e,0,[t])}}};["concat","every","filter","forEach","indexOf","join","lastIndexOf","map","reduce","reduceRight","slice","some","toString","toLocaleString"].forEach(function(e){arrayExtensions[e]=function(){var t=this[$mobx];t.atom.reportObserved();var r=t.dehanceValues(t.values);return r[e].apply(r,arguments)}});var _a,isObservableArrayAdministration=createInstanceofPredicate("ObservableArrayAdministration",ObservableArrayAdministration);function isObservableArray(e){return isObject(e)&&isObservableArrayAdministration(e[$mobx])}var _a$1,ObservableMapMarker={},ObservableMap=function(){function e(e,t,r){if(void 0===t&&(t=deepEnhancer),void 0===r&&(r="ObservableMap@"+getNextId()),this.enhancer=t,this.name=r,this[_a]=ObservableMapMarker,this._keysAtom=createAtom(this.name+".keys()"),this[Symbol.toStringTag]="Map","function"!=typeof Map)throw new Error("mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js");this._data=new Map,this._hasMap=new Map,this.merge(e)}return e.prototype._has=function(e){return this._data.has(e)},e.prototype.has=function(e){var t=this;if(!globalState.trackingDerivation)return this._has(e);var r=this._hasMap.get(e);if(!r){var n=r=new ObservableValue(this._has(e),referenceEnhancer,this.name+"."+stringifyKey(e)+"?",!1);this._hasMap.set(e,n),onBecomeUnobserved(n,function(){return t._hasMap.delete(e)})}return r.get()},e.prototype.set=function(e,t){var r=this._has(e);if(hasInterceptors(this)){var n=interceptChange(this,{type:r?"update":"add",object:this,newValue:t,name:e});if(!n)return this;t=n.newValue}return r?this._updateValue(e,t):this._addValue(e,t),this},e.prototype.delete=function(e){var t=this;if(hasInterceptors(this)&&!(o=interceptChange(this,{type:"delete",object:this,name:e})))return!1;if(this._has(e)){var r=isSpyEnabled(),n=hasListeners(this),o=n||r?{type:"delete",object:this,oldValue:this._data.get(e).value,name:e}:null;return transaction(function(){t._keysAtom.reportChanged(),t._updateHasMapEntry(e,!1),t._data.get(e).setNewValue(void 0),t._data.delete(e)}),n&¬ifyListeners(this,o),!0}return!1},e.prototype._updateHasMapEntry=function(e,t){var r=this._hasMap.get(e);r&&r.setNewValue(t)},e.prototype._updateValue=function(e,t){var r=this._data.get(e);if((t=r.prepareNewValue(t))!==globalState.UNCHANGED){var n=isSpyEnabled(),o=hasListeners(this),a=o||n?{type:"update",object:this,oldValue:r.value,name:e,newValue:t}:null;0,r.setNewValue(t),o&¬ifyListeners(this,a)}},e.prototype._addValue=function(e,t){var r=this;checkIfStateModificationsAreAllowed(this._keysAtom),transaction(function(){var n=new ObservableValue(t,r.enhancer,r.name+"."+stringifyKey(e),!1);r._data.set(e,n),t=n.value,r._updateHasMapEntry(e,!0),r._keysAtom.reportChanged()});var n=isSpyEnabled(),o=hasListeners(this);o&¬ifyListeners(this,o||n?{type:"add",object:this,name:e,newValue:t}:null)},e.prototype.get=function(e){return this.has(e)?this.dehanceValue(this._data.get(e).get()):this.dehanceValue(void 0)},e.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},e.prototype.keys=function(){return this._keysAtom.reportObserved(),this._data.keys()},e.prototype.values=function(){var e=this,t=0,r=Array.from(this.keys());return makeIterable({next:function(){return t<r.length?{value:e.get(r[t++]),done:!1}:{done:!0}}})},e.prototype.entries=function(){var e=this,t=0,r=Array.from(this.keys());return makeIterable({next:function(){if(t<r.length){var n=r[t++];return{value:[n,e.get(n)],done:!1}}return{done:!0}}})},e.prototype[(_a=$mobx,Symbol.iterator)]=function(){return this.entries()},e.prototype.forEach=function(e,t){var r,n;try{for(var o=__values(this),a=o.next();!a.done;a=o.next()){var i=__read(a.value,2),s=i[0],c=i[1];e.call(t,c,s,this)}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}},e.prototype.merge=function(e){var t=this;return isObservableMap(e)&&(e=e.toJS()),transaction(function(){isPlainObject(e)?getPlainObjectKeys(e).forEach(function(r){return t.set(r,e[r])}):Array.isArray(e)?e.forEach(function(e){var r=__read(e,2),n=r[0],o=r[1];return t.set(n,o)}):isES6Map(e)?(e.constructor!==Map&&fail("Cannot initialize from classes that inherit from Map: "+e.constructor.name),e.forEach(function(e,r){return t.set(r,e)})):null!=e&&fail("Cannot initialize map from "+e)}),this},e.prototype.clear=function(){var e=this;transaction(function(){untracked(function(){var t,r;try{for(var n=__values(e.keys()),o=n.next();!o.done;o=n.next()){var a=o.value;e.delete(a)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}})})},e.prototype.replace=function(e){var t=this;return transaction(function(){var r=getMapLikeKeys(e);Array.from(t.keys()).filter(function(e){return-1===r.indexOf(e)}).forEach(function(e){return t.delete(e)}),t.merge(e)}),this},Object.defineProperty(e.prototype,"size",{get:function(){return this._keysAtom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),e.prototype.toPOJO=function(){var e,t,r={};try{for(var n=__values(this),o=n.next();!o.done;o=n.next()){var a=__read(o.value,2),i=a[0],s=a[1];r["symbol"==typeof i?i:stringifyKey(i)]=s}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}return r},e.prototype.toJS=function(){return new Map(this)},e.prototype.toJSON=function(){return this.toPOJO()},e.prototype.toString=function(){var e=this;return this.name+"[{ "+Array.from(this.keys()).map(function(t){return stringifyKey(t)+": "+e.get(t)}).join(", ")+" }]"},e.prototype.observe=function(e,t){return registerListener(this,e)},e.prototype.intercept=function(e){return registerInterceptor(this,e)},e}(),isObservableMap=createInstanceofPredicate("ObservableMap",ObservableMap),ObservableSetMarker={},ObservableSet=function(){function e(e,t,r){if(void 0===t&&(t=deepEnhancer),void 0===r&&(r="ObservableSet@"+getNextId()),this.name=r,this[_a$1]=ObservableSetMarker,this._data=new Set,this._atom=createAtom(this.name),this[Symbol.toStringTag]="Set","function"!=typeof Set)throw new Error("mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js");this.enhancer=function(e,n){return t(e,n,r)},e&&this.replace(e)}return e.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},e.prototype.clear=function(){var e=this;transaction(function(){untracked(function(){var t,r;try{for(var n=__values(e._data.values()),o=n.next();!o.done;o=n.next()){var a=o.value;e.delete(a)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}})})},e.prototype.forEach=function(e,t){var r,n;try{for(var o=__values(this),a=o.next();!a.done;a=o.next()){var i=a.value;e.call(t,i,i,this)}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}},Object.defineProperty(e.prototype,"size",{get:function(){return this._atom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),e.prototype.add=function(e){var t=this;if((checkIfStateModificationsAreAllowed(this._atom),hasInterceptors(this))&&!(o=interceptChange(this,{type:"add",object:this,newValue:e})))return this;if(!this.has(e)){transaction(function(){t._data.add(t.enhancer(e,void 0)),t._atom.reportChanged()});var r=isSpyEnabled(),n=hasListeners(this),o=n||r?{type:"add",object:this,newValue:e}:null;0,n&¬ifyListeners(this,o)}return this},e.prototype.delete=function(e){var t=this;if(hasInterceptors(this)&&!(o=interceptChange(this,{type:"delete",object:this,oldValue:e})))return!1;if(this.has(e)){var r=isSpyEnabled(),n=hasListeners(this),o=n||r?{type:"delete",object:this,oldValue:e}:null;return transaction(function(){t._atom.reportChanged(),t._data.delete(e)}),n&¬ifyListeners(this,o),!0}return!1},e.prototype.has=function(e){return this._atom.reportObserved(),this._data.has(this.dehanceValue(e))},e.prototype.entries=function(){var e=0,t=Array.from(this.keys()),r=Array.from(this.values());return makeIterable({next:function(){var n=e;return e+=1,n<r.length?{value:[t[n],r[n]],done:!1}:{done:!0}}})},e.prototype.keys=function(){return this.values()},e.prototype.values=function(){this._atom.reportObserved();var e=this,t=0,r=Array.from(this._data.values());return makeIterable({next:function(){return t<r.length?{value:e.dehanceValue(r[t++]),done:!1}:{done:!0}}})},e.prototype.replace=function(e){var t=this;return isObservableSet(e)&&(e=e.toJS()),transaction(function(){Array.isArray(e)?(t.clear(),e.forEach(function(e){return t.add(e)})):isES6Set(e)?(t.clear(),e.forEach(function(e){return t.add(e)})):null!=e&&fail("Cannot initialize set from "+e)}),this},e.prototype.observe=function(e,t){return registerListener(this,e)},e.prototype.intercept=function(e){return registerInterceptor(this,e)},e.prototype.toJS=function(){return new Set(this)},e.prototype.toString=function(){return this.name+"[ "+Array.from(this).join(", ")+" ]"},e.prototype[(_a$1=$mobx,Symbol.iterator)]=function(){return this.values()},e}(),isObservableSet=createInstanceofPredicate("ObservableSet",ObservableSet),ObservableObjectAdministration=function(){function e(e,t,r,n){void 0===t&&(t=new Map),this.target=e,this.values=t,this.name=r,this.defaultEnhancer=n,this.keysAtom=new Atom(r+".keys")}return e.prototype.read=function(e){return this.values.get(e).get()},e.prototype.write=function(e,t){var r=this.target,n=this.values.get(e);if(n instanceof ComputedValue)n.set(t);else{if(hasInterceptors(this)){if(!(i=interceptChange(this,{type:"update",object:this.proxy||r,name:e,newValue:t})))return;t=i.newValue}if((t=n.prepareNewValue(t))!==globalState.UNCHANGED){var o=hasListeners(this),a=isSpyEnabled(),i=o||a?{type:"update",object:this.proxy||r,oldValue:n.value,name:e,newValue:t}:null;0,n.setNewValue(t),o&¬ifyListeners(this,i)}}},e.prototype.has=function(e){var t=this.pendingKeys||(this.pendingKeys=new Map),r=t.get(e);if(r)return r.get();var n=!!this.values.get(e);return r=new ObservableValue(n,referenceEnhancer,this.name+"."+stringifyKey(e)+"?",!1),t.set(e,r),r.get()},e.prototype.addObservableProp=function(e,t,r){void 0===r&&(r=this.defaultEnhancer);var n=this.target;if(hasInterceptors(this)){var o=interceptChange(this,{object:this.proxy||n,name:e,type:"add",newValue:t});if(!o)return;t=o.newValue}var a=new ObservableValue(t,r,this.name+"."+stringifyKey(e),!1);this.values.set(e,a),t=a.value,Object.defineProperty(n,e,generateObservablePropConfig(e)),this.notifyPropertyAddition(e,t)},e.prototype.addComputedProp=function(e,t,r){var n=this.target;r.name=r.name||this.name+"."+stringifyKey(t),this.values.set(t,new ComputedValue(r)),(e===n||isPropertyConfigurable(e,t))&&Object.defineProperty(e,t,generateComputedPropConfig(t))},e.prototype.remove=function(e){if(this.values.has(e)){var t=this.target;if(hasInterceptors(this))if(!(s=interceptChange(this,{object:this.proxy||t,name:e,type:"remove"})))return;try{startBatch();var r=hasListeners(this),n=isSpyEnabled(),o=this.values.get(e),a=o&&o.get();if(o&&o.set(void 0),this.keysAtom.reportChanged(),this.values.delete(e),this.pendingKeys){var i=this.pendingKeys.get(e);i&&i.set(!1)}delete this.target[e];var s=r||n?{type:"remove",object:this.proxy||t,oldValue:a,name:e}:null;0,r&¬ifyListeners(this,s)}finally{endBatch()}}},e.prototype.illegalAccess=function(e,t){console.warn("Property '"+t+"' of '"+e+"' was accessed through the prototype chain. Use 'decorate' instead to declare the prop or access it statically through it's owner")},e.prototype.observe=function(e,t){return registerListener(this,e)},e.prototype.intercept=function(e){return registerInterceptor(this,e)},e.prototype.notifyPropertyAddition=function(e,t){var r=hasListeners(this),n=isSpyEnabled(),o=r||n?{type:"add",object:this.proxy||this.target,name:e,newValue:t}:null;if(r&¬ifyListeners(this,o),this.pendingKeys){var a=this.pendingKeys.get(e);a&&a.set(!0)}this.keysAtom.reportChanged()},e.prototype.getKeys=function(){var e,t;this.keysAtom.reportObserved();var r=[];try{for(var n=__values(this.values),o=n.next();!o.done;o=n.next()){var a=__read(o.value,2),i=a[0];a[1]instanceof ObservableValue&&r.push(i)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}return r},e}();function asObservableObject(e,t,r){if(void 0===t&&(t=""),void 0===r&&(r=deepEnhancer),Object.prototype.hasOwnProperty.call(e,$mobx))return e[$mobx];isPlainObject(e)||(t=(e.constructor.name||"ObservableObject")+"@"+getNextId()),t||(t="ObservableObject@"+getNextId());var n=new ObservableObjectAdministration(e,new Map,stringifyKey(t),r);return addHiddenProp(e,$mobx,n),n}var observablePropertyConfigs=Object.create(null),computedPropertyConfigs=Object.create(null);function generateObservablePropConfig(e){return observablePropertyConfigs[e]||(observablePropertyConfigs[e]={configurable:!0,enumerable:!0,get:function(){return this[$mobx].read(e)},set:function(t){this[$mobx].write(e,t)}})}function getAdministrationForComputedPropOwner(e){var t=e[$mobx];return t||(initializeInstance(e),e[$mobx])}function generateComputedPropConfig(e){return computedPropertyConfigs[e]||(computedPropertyConfigs[e]={configurable:globalState.computedConfigurable,enumerable:!1,get:function(){return getAdministrationForComputedPropOwner(this).read(e)},set:function(t){getAdministrationForComputedPropOwner(this).write(e,t)}})}var isObservableObjectAdministration=createInstanceofPredicate("ObservableObjectAdministration",ObservableObjectAdministration);function isObservableObject(e){return!!isObject(e)&&(initializeInstance(e),isObservableObjectAdministration(e[$mobx]))}function getAtom(e,t){if("object"==typeof e&&null!==e){if(isObservableArray(e))return void 0!==t&&fail(!1),e[$mobx].atom;if(isObservableSet(e))return e[$mobx];if(isObservableMap(e)){var r=e;return void 0===t?r._keysAtom:((n=r._data.get(t)||r._hasMap.get(t))||fail(!1),n)}var n;if(initializeInstance(e),t&&!e[$mobx]&&e[t],isObservableObject(e))return t?((n=e[$mobx].values.get(t))||fail(!1),n):fail(!1);if(isAtom(e)||isComputedValue(e)||isReaction(e))return e}else if("function"==typeof e&&isReaction(e[$mobx]))return e[$mobx];return fail(!1)}function getAdministration(e,t){return e||fail("Expecting some object"),void 0!==t?getAdministration(getAtom(e,t)):isAtom(e)||isComputedValue(e)||isReaction(e)?e:isObservableMap(e)||isObservableSet(e)?e:(initializeInstance(e),e[$mobx]?e[$mobx]:void fail(!1))}function getDebugName(e,t){return(void 0!==t?getAtom(e,t):isObservableObject(e)||isObservableMap(e)||isObservableSet(e)?getAdministration(e):getAtom(e)).name}var g,toString=Object.prototype.toString;function deepEqual(e,t,r){return void 0===r&&(r=-1),eq(e,t,r)}function eq(e,t,r,n,o){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return!1;if(e!=e)return t!=t;var a=typeof e;if("function"!==a&&"object"!==a&&"object"!=typeof t)return!1;e=unwrap(e),t=unwrap(t);var i=toString.call(e);if(i!==toString.call(t))return!1;switch(i){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0==+e?1/+e==1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(e)===Symbol.valueOf.call(t)}var s="[object Array]"===i;if(!s){if("object"!=typeof e||"object"!=typeof t)return!1;var c=e.constructor,l=t.constructor;if(c!==l&&!("function"==typeof c&&c instanceof c&&"function"==typeof l&&l instanceof l)&&"constructor"in e&&"constructor"in t)return!1}if(0===r)return!1;r<0&&(r=-1),o=o||[];for(var u=(n=n||[]).length;u--;)if(n[u]===e)return o[u]===t;if(n.push(e),o.push(t),s){if((u=e.length)!==t.length)return!1;for(;u--;)if(!eq(e[u],t[u],r-1,n,o))return!1}else{var p=Object.keys(e),d=void 0;if(u=p.length,Object.keys(t).length!==u)return!1;for(;u--;)if(!has$1(t,d=p[u])||!eq(e[d],t[d],r-1,n,o))return!1}return n.pop(),o.pop(),!0}function unwrap(e){return isObservableArray(e)?e.slice():isES6Map(e)||isObservableMap(e)?Array.from(e.entries()):isES6Set(e)||isObservableSet(e)?Array.from(e.entries()):e}function has$1(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function makeIterable(e){return e[Symbol.iterator]=getSelf,e}function getSelf(){return this}if("undefined"==typeof Proxy||"undefined"==typeof Symbol)throw new Error("[mobx] MobX 5+ requires Proxy and Symbol objects. If your environment doesn't support Symbol or Proxy objects, please downgrade to MobX 4. For React Native Android, consider upgrading JSCore.");"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:spy,extras:{getDebugName:getDebugName},$mobx:$mobx}),exports.$mobx=$mobx,exports.FlowCancellationError=FlowCancellationError,exports.ObservableMap=ObservableMap,exports.ObservableSet=ObservableSet,exports.Reaction=Reaction,exports._allowStateChanges=allowStateChanges,exports._allowStateChangesInsideComputed=allowStateChangesInsideComputed,exports._allowStateReadsEnd=allowStateReadsEnd,exports._allowStateReadsStart=allowStateReadsStart,exports._endAction=_endAction,exports._getAdministration=getAdministration,exports._getGlobalState=getGlobalState,exports._interceptReads=interceptReads,exports._isComputingDerivation=isComputingDerivation,exports._resetGlobalState=resetGlobalState,exports._startAction=_startAction,exports.action=action,exports.autorun=autorun,exports.comparer=comparer,exports.computed=computed,exports.configure=configure,exports.createAtom=createAtom,exports.decorate=decorate,exports.entries=entries,exports.extendObservable=extendObservable,exports.flow=flow,exports.get=get,exports.getAtom=getAtom,exports.getDebugName=getDebugName,exports.getDependencyTree=getDependencyTree,exports.getObserverTree=getObserverTree,exports.has=has,exports.intercept=intercept,exports.isAction=isAction,exports.isArrayLike=isArrayLike,exports.isBoxedObservable=isObservableValue,exports.isComputed=isComputed,exports.isComputedProp=isComputedProp,exports.isFlowCancellationError=isFlowCancellationError,exports.isObservable=isObservable,exports.isObservableArray=isObservableArray,exports.isObservableMap=isObservableMap,exports.isObservableObject=isObservableObject,exports.isObservableProp=isObservableProp,exports.isObservableSet=isObservableSet,exports.keys=keys,exports.observable=observable,exports.observe=observe,exports.onBecomeObserved=onBecomeObserved,exports.onBecomeUnobserved=onBecomeUnobserved,exports.onReactionError=onReactionError,exports.reaction=reaction,exports.remove=remove,exports.runInAction=runInAction,exports.set=set,exports.spy=spy,exports.toJS=toJS,exports.trace=trace,exports.transaction=transaction,exports.untracked=untracked,exports.values=values,exports.when=when;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var extendStatics=function(e,t){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};function __extends(e,t){function r(){this.constructor=e}extendStatics(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var __assign=function(){return(__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function __values(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}function __read(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,a=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)i.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(o)throw o.error}}return i}function __spread(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(__read(arguments[t]));return e}var OBFUSCATED_ERROR="An invariant failed, however the error is obfuscated because this is a production build.",EMPTY_ARRAY=[];Object.freeze(EMPTY_ARRAY);var EMPTY_OBJECT={};function getNextId(){return++globalState.mobxGuid}function fail(e){throw invariant(!1,e),"X"}function invariant(e,t){if(!e)throw new Error("[mobx] "+(t||OBFUSCATED_ERROR))}Object.freeze(EMPTY_OBJECT);var deprecatedMessages=[];function deprecated(e,t){return!1}function once(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var noop=function(){};function unique(e){var t=[];return e.forEach(function(e){-1===t.indexOf(e)&&t.push(e)}),t}function isObject(e){return null!==e&&"object"==typeof e}function isPlainObject(e){if(null===e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}function addHiddenProp(e,t,r){Object.defineProperty(e,t,{enumerable:!1,writable:!0,configurable:!0,value:r})}function addHiddenFinalProp(e,t,r){Object.defineProperty(e,t,{enumerable:!1,writable:!1,configurable:!0,value:r})}function isPropertyConfigurable(e,t){var r=Object.getOwnPropertyDescriptor(e,t);return!r||!1!==r.configurable&&!1!==r.writable}function createInstanceofPredicate(e,t){var r="isMobX"+e;return t.prototype[r]=!0,function(e){return isObject(e)&&!0===e[r]}}function isArrayLike(e){return Array.isArray(e)||isObservableArray(e)}function isES6Map(e){return e instanceof Map}function isES6Set(e){return e instanceof Set}function getPlainObjectKeys(e){var t=new Set;for(var r in e)t.add(r);return Object.getOwnPropertySymbols(e).forEach(function(r){Object.getOwnPropertyDescriptor(e,r).enumerable&&t.add(r)}),Array.from(t)}function stringifyKey(e){return e&&e.toString?e.toString():new String(e).toString()}function getMapLikeKeys(e){return isPlainObject(e)?Object.keys(e):Array.isArray(e)?e.map(function(e){return __read(e,1)[0]}):isES6Map(e)||isObservableMap(e)?Array.from(e.keys()):fail("Cannot get keys from '"+e+"'")}function toPrimitive(e){return null===e?null:"object"==typeof e?""+e:e}var $mobx=Symbol("mobx administration"),Atom=function(){function e(e){void 0===e&&(e="Atom@"+getNextId()),this.name=e,this.isPendingUnobservation=!1,this.isBeingObserved=!1,this.observers=new Set,this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=exports.IDerivationState.NOT_TRACKING}return e.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach(function(e){return e()})},e.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach(function(e){return e()})},e.prototype.reportObserved=function(){return reportObserved(this)},e.prototype.reportChanged=function(){startBatch(),propagateChanged(this),endBatch()},e.prototype.toString=function(){return this.name},e}(),isAtom=createInstanceofPredicate("Atom",Atom);function createAtom(e,t,r){void 0===t&&(t=noop),void 0===r&&(r=noop);var n=new Atom(e);return t!==noop&&onBecomeObserved(n,t),r!==noop&&onBecomeUnobserved(n,r),n}function identityComparer(e,t){return e===t}function structuralComparer(e,t){return deepEqual(e,t)}function shallowComparer(e,t){return deepEqual(e,t,1)}function defaultComparer(e,t){return Object.is(e,t)}var comparer={identity:identityComparer,structural:structuralComparer,default:defaultComparer,shallow:shallowComparer},mobxDidRunLazyInitializersSymbol=Symbol("mobx did run lazy initializers"),mobxPendingDecorators=Symbol("mobx pending decorators"),enumerableDescriptorCache={},nonEnumerableDescriptorCache={};function createPropertyInitializerDescriptor(e,t){var r=t?enumerableDescriptorCache:nonEnumerableDescriptorCache;return r[e]||(r[e]={configurable:!0,enumerable:t,get:function(){return initializeInstance(this),this[e]},set:function(t){initializeInstance(this),this[e]=t}})}function initializeInstance(e){var t,r;if(!0!==e[mobxDidRunLazyInitializersSymbol]){var n=e[mobxPendingDecorators];if(n){addHiddenProp(e,mobxDidRunLazyInitializersSymbol,!0);var o=__spread(Object.getOwnPropertySymbols(n),Object.keys(n));try{for(var a=__values(o),i=a.next();!i.done;i=a.next()){var s=n[i.value];s.propertyCreator(e,s.prop,s.descriptor,s.decoratorTarget,s.decoratorArguments)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}}}}function createPropDecorator(e,t){return function(){var r,n=function(n,o,a,i){if(!0===i)return t(n,o,a,n,r),null;if(!Object.prototype.hasOwnProperty.call(n,mobxPendingDecorators)){var s=n[mobxPendingDecorators];addHiddenProp(n,mobxPendingDecorators,__assign({},s))}return n[mobxPendingDecorators][o]={prop:o,propertyCreator:t,descriptor:a,decoratorTarget:n,decoratorArguments:r},createPropertyInitializerDescriptor(o,e)};return quacksLikeADecorator(arguments)?(r=EMPTY_ARRAY,n.apply(null,arguments)):(r=Array.prototype.slice.call(arguments),n)}}function quacksLikeADecorator(e){return(2===e.length||3===e.length)&&("string"==typeof e[1]||"symbol"==typeof e[1])||4===e.length&&!0===e[3]}function deepEnhancer(e,t,r){return isObservable(e)?e:Array.isArray(e)?observable.array(e,{name:r}):isPlainObject(e)?observable.object(e,void 0,{name:r}):isES6Map(e)?observable.map(e,{name:r}):isES6Set(e)?observable.set(e,{name:r}):e}function shallowEnhancer(e,t,r){return null==e?e:isObservableObject(e)||isObservableArray(e)||isObservableMap(e)||isObservableSet(e)?e:Array.isArray(e)?observable.array(e,{name:r,deep:!1}):isPlainObject(e)?observable.object(e,void 0,{name:r,deep:!1}):isES6Map(e)?observable.map(e,{name:r,deep:!1}):isES6Set(e)?observable.set(e,{name:r,deep:!1}):fail(!1)}function referenceEnhancer(e){return e}function refStructEnhancer(e,t,r){return deepEqual(e,t)?t:e}function createDecoratorForEnhancer(e){invariant(e);var t=createPropDecorator(!0,function(t,r,n,o,a){var i=n?n.initializer?n.initializer.call(t):n.value:void 0;asObservableObject(t).addObservableProp(r,i,e)}),r=("undefined"!=typeof process&&process.env,t);return r.enhancer=e,r}var defaultCreateObservableOptions={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function asCreateObservableOptions(e){return null==e?defaultCreateObservableOptions:"string"==typeof e?{name:e,deep:!0,proxy:!0}:e}Object.freeze(defaultCreateObservableOptions);var deepDecorator=createDecoratorForEnhancer(deepEnhancer),shallowDecorator=createDecoratorForEnhancer(shallowEnhancer),refDecorator=createDecoratorForEnhancer(referenceEnhancer),refStructDecorator=createDecoratorForEnhancer(refStructEnhancer);function getEnhancerFromOptions(e){return e.defaultDecorator?e.defaultDecorator.enhancer:!1===e.deep?referenceEnhancer:deepEnhancer}function createObservable(e,t,r){if("string"==typeof arguments[1]||"symbol"==typeof arguments[1])return deepDecorator.apply(null,arguments);if(isObservable(e))return e;var n=isPlainObject(e)?observable.object(e,t,r):Array.isArray(e)?observable.array(e,t):isES6Map(e)?observable.map(e,t):isES6Set(e)?observable.set(e,t):e;if(n!==e)return n;fail(!1)}var observableFactories={box:function(e,t){arguments.length>2&&incorrectlyUsedAsDecorator("box");var r=asCreateObservableOptions(t);return new ObservableValue(e,getEnhancerFromOptions(r),r.name,!0,r.equals)},array:function(e,t){arguments.length>2&&incorrectlyUsedAsDecorator("array");var r=asCreateObservableOptions(t);return createObservableArray(e,getEnhancerFromOptions(r),r.name)},map:function(e,t){arguments.length>2&&incorrectlyUsedAsDecorator("map");var r=asCreateObservableOptions(t);return new ObservableMap(e,getEnhancerFromOptions(r),r.name)},set:function(e,t){arguments.length>2&&incorrectlyUsedAsDecorator("set");var r=asCreateObservableOptions(t);return new ObservableSet(e,getEnhancerFromOptions(r),r.name)},object:function(e,t,r){"string"==typeof arguments[1]&&incorrectlyUsedAsDecorator("object");var n=asCreateObservableOptions(r);if(!1===n.proxy)return extendObservable({},e,t,n);var o=getDefaultDecoratorFromObjectOptions(n),a=createDynamicObservableObject(extendObservable({},void 0,void 0,n));return extendObservableObjectWithProperties(a,e,t,o),a},ref:refDecorator,shallow:shallowDecorator,deep:deepDecorator,struct:refStructDecorator},observable=createObservable;function incorrectlyUsedAsDecorator(e){fail("Expected one or two arguments to observable."+e+". Did you accidentally try to use observable."+e+" as decorator?")}Object.keys(observableFactories).forEach(function(e){return observable[e]=observableFactories[e]});var TraceMode,computedDecorator=createPropDecorator(!1,function(e,t,r,n,o){var a=r.get,i=r.set,s=o[0]||{};asObservableObject(e).addComputedProp(e,t,__assign({get:a,set:i,context:e},s))}),computedStructDecorator=computedDecorator({equals:comparer.structural}),computed=function(e,t,r){if("string"==typeof t)return computedDecorator.apply(null,arguments);if(null!==e&&"object"==typeof e&&1===arguments.length)return computedDecorator.apply(null,arguments);var n="object"==typeof t?t:{};return n.get=e,n.set="function"==typeof t?t:n.set,n.name=n.name||e.name||"",new ComputedValue(n)};computed.struct=computedStructDecorator,function(e){e[e.NOT_TRACKING=-1]="NOT_TRACKING",e[e.UP_TO_DATE=0]="UP_TO_DATE",e[e.POSSIBLY_STALE=1]="POSSIBLY_STALE",e[e.STALE=2]="STALE"}(exports.IDerivationState||(exports.IDerivationState={})),function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"}(TraceMode||(TraceMode={}));var CaughtException=function(){return function(e){this.cause=e}}();function isCaughtException(e){return e instanceof CaughtException}function shouldCompute(e){switch(e.dependenciesState){case exports.IDerivationState.UP_TO_DATE:return!1;case exports.IDerivationState.NOT_TRACKING:case exports.IDerivationState.STALE:return!0;case exports.IDerivationState.POSSIBLY_STALE:for(var t=allowStateReadsStart(!0),r=untrackedStart(),n=e.observing,o=n.length,a=0;a<o;a++){var i=n[a];if(isComputedValue(i)){if(globalState.disableErrorBoundaries)i.get();else try{i.get()}catch(e){return untrackedEnd(r),allowStateReadsEnd(t),!0}if(e.dependenciesState===exports.IDerivationState.STALE)return untrackedEnd(r),allowStateReadsEnd(t),!0}}return changeDependenciesStateTo0(e),untrackedEnd(r),allowStateReadsEnd(t),!1}}function isComputingDerivation(){return null!==globalState.trackingDerivation}function checkIfStateModificationsAreAllowed(e){var t=e.observers.size>0;globalState.computationDepth>0&&t&&fail(!1),globalState.allowStateChanges||!t&&"strict"!==globalState.enforceActions||fail(!1)}function trackDerivedFunction(e,t,r){var n=allowStateReadsStart(!0);changeDependenciesStateTo0(e),e.newObserving=new Array(e.observing.length+100),e.unboundDepsCount=0,e.runId=++globalState.runId;var o,a=globalState.trackingDerivation;if(globalState.trackingDerivation=e,!0===globalState.disableErrorBoundaries)o=t.call(r);else try{o=t.call(r)}catch(e){o=new CaughtException(e)}return globalState.trackingDerivation=a,bindDependencies(e),warnAboutDerivationWithoutDependencies(e),allowStateReadsEnd(n),o}function warnAboutDerivationWithoutDependencies(e){}function bindDependencies(e){for(var t=e.observing,r=e.observing=e.newObserving,n=exports.IDerivationState.UP_TO_DATE,o=0,a=e.unboundDepsCount,i=0;i<a;i++){0===(s=r[i]).diffValue&&(s.diffValue=1,o!==i&&(r[o]=s),o++),s.dependenciesState>n&&(n=s.dependenciesState)}for(r.length=o,e.newObserving=null,a=t.length;a--;){0===(s=t[a]).diffValue&&removeObserver(s,e),s.diffValue=0}for(;o--;){var s;1===(s=r[o]).diffValue&&(s.diffValue=0,addObserver(s,e))}n!==exports.IDerivationState.UP_TO_DATE&&(e.dependenciesState=n,e.onBecomeStale())}function clearObserving(e){var t=e.observing;e.observing=[];for(var r=t.length;r--;)removeObserver(t[r],e);e.dependenciesState=exports.IDerivationState.NOT_TRACKING}function untracked(e){var t=untrackedStart();try{return e()}finally{untrackedEnd(t)}}function untrackedStart(){var e=globalState.trackingDerivation;return globalState.trackingDerivation=null,e}function untrackedEnd(e){globalState.trackingDerivation=e}function allowStateReadsStart(e){var t=globalState.allowStateReads;return globalState.allowStateReads=e,t}function allowStateReadsEnd(e){globalState.allowStateReads=e}function changeDependenciesStateTo0(e){if(e.dependenciesState!==exports.IDerivationState.UP_TO_DATE){e.dependenciesState=exports.IDerivationState.UP_TO_DATE;for(var t=e.observing,r=t.length;r--;)t[r].lowestObserverState=exports.IDerivationState.UP_TO_DATE}}var currentActionId=0,nextActionId=1;function createAction(e,t,r){var n=function(){return executeAction(e,t,r||this,arguments)};return n.isMobxAction=!0,n}function executeAction(e,t,r,n){var o=_startAction(e,r,n);try{return t.apply(r,n)}catch(e){throw o.error=e,e}finally{_endAction(o)}}function _startAction(e,t,r){var n=isSpyEnabled(),o=untrackedStart();startBatch();var a={prevDerivation:o,prevAllowStateChanges:allowStateChangesStart(!0),prevAllowStateReads:allowStateReadsStart(!0),notifySpy:n,startTime:0,actionId:nextActionId++,parentActionId:currentActionId};return currentActionId=a.actionId,a}function _endAction(e){currentActionId!==e.actionId&&fail("invalid action stack. did you forget to finish an action?"),currentActionId=e.parentActionId,void 0!==e.error&&(globalState.suppressReactionErrors=!0),allowStateChangesEnd(e.prevAllowStateChanges),allowStateReadsEnd(e.prevAllowStateReads),endBatch(),untrackedEnd(e.prevDerivation),e.notifySpy,globalState.suppressReactionErrors=!1}function allowStateChanges(e,t){var r,n=allowStateChangesStart(e);try{r=t()}finally{allowStateChangesEnd(n)}return r}function allowStateChangesStart(e){var t=globalState.allowStateChanges;return globalState.allowStateChanges=e,t}function allowStateChangesEnd(e){globalState.allowStateChanges=e}function allowStateChangesInsideComputed(e){var t,r=globalState.computationDepth;globalState.computationDepth=0;try{t=e()}finally{globalState.computationDepth=r}return t}var ObservableValue=function(e){function t(t,r,n,o,a){void 0===n&&(n="ObservableValue@"+getNextId()),void 0===o&&(o=!0),void 0===a&&(a=comparer.default);var i=e.call(this,n)||this;return i.enhancer=r,i.name=n,i.equals=a,i.hasUnreportedChange=!1,i.value=r(t,void 0,n),o&&isSpyEnabled(),i}return __extends(t,e),t.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},t.prototype.set=function(e){this.value;if((e=this.prepareNewValue(e))!==globalState.UNCHANGED){isSpyEnabled();0,this.setNewValue(e)}},t.prototype.prepareNewValue=function(e){if(checkIfStateModificationsAreAllowed(this),hasInterceptors(this)){var t=interceptChange(this,{object:this,type:"update",newValue:e});if(!t)return globalState.UNCHANGED;e=t.newValue}return e=this.enhancer(e,this.value,this.name),this.equals(this.value,e)?globalState.UNCHANGED:e},t.prototype.setNewValue=function(e){var t=this.value;this.value=e,this.reportChanged(),hasListeners(this)&¬ifyListeners(this,{type:"update",object:this,newValue:e,oldValue:t})},t.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},t.prototype.intercept=function(e){return registerInterceptor(this,e)},t.prototype.observe=function(e,t){return t&&e({object:this,type:"update",newValue:this.value,oldValue:void 0}),registerListener(this,e)},t.prototype.toJSON=function(){return this.get()},t.prototype.toString=function(){return this.name+"["+this.value+"]"},t.prototype.valueOf=function(){return toPrimitive(this.get())},t.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},t}(Atom),isObservableValue=createInstanceofPredicate("ObservableValue",ObservableValue),ComputedValue=function(){function e(e){this.dependenciesState=exports.IDerivationState.NOT_TRACKING,this.observing=[],this.newObserving=null,this.isBeingObserved=!1,this.isPendingUnobservation=!1,this.observers=new Set,this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.lowestObserverState=exports.IDerivationState.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+getNextId(),this.value=new CaughtException(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=TraceMode.NONE,invariant(e.get,"missing option for computed: get"),this.derivation=e.get,this.name=e.name||"ComputedValue@"+getNextId(),e.set&&(this.setter=createAction(this.name+"-setter",e.set)),this.equals=e.equals||(e.compareStructural||e.struct?comparer.structural:comparer.default),this.scope=e.context,this.requiresReaction=!!e.requiresReaction,this.keepAlive=!!e.keepAlive}return e.prototype.onBecomeStale=function(){propagateMaybeChanged(this)},e.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach(function(e){return e()})},e.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach(function(e){return e()})},e.prototype.get=function(){this.isComputing&&fail("Cycle detected in computation "+this.name+": "+this.derivation),0!==globalState.inBatch||0!==this.observers.size||this.keepAlive?(reportObserved(this),shouldCompute(this)&&this.trackAndCompute()&&propagateChangeConfirmed(this)):shouldCompute(this)&&(this.warnAboutUntrackedRead(),startBatch(),this.value=this.computeValue(!1),endBatch());var e=this.value;if(isCaughtException(e))throw e.cause;return e},e.prototype.peek=function(){var e=this.computeValue(!1);if(isCaughtException(e))throw e.cause;return e},e.prototype.set=function(e){if(this.setter){invariant(!this.isRunningSetter,"The setter of computed value '"+this.name+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"),this.isRunningSetter=!0;try{this.setter.call(this.scope,e)}finally{this.isRunningSetter=!1}}else invariant(!1,!1)},e.prototype.trackAndCompute=function(){var e=this.value,t=this.dependenciesState===exports.IDerivationState.NOT_TRACKING,r=this.computeValue(!0),n=t||isCaughtException(e)||isCaughtException(r)||!this.equals(e,r);return n&&(this.value=r),n},e.prototype.computeValue=function(e){var t;if(this.isComputing=!0,globalState.computationDepth++,e)t=trackDerivedFunction(this,this.derivation,this.scope);else if(!0===globalState.disableErrorBoundaries)t=this.derivation.call(this.scope);else try{t=this.derivation.call(this.scope)}catch(e){t=new CaughtException(e)}return globalState.computationDepth--,this.isComputing=!1,t},e.prototype.suspend=function(){this.keepAlive||(clearObserving(this),this.value=void 0)},e.prototype.observe=function(e,t){var r=this,n=!0,o=void 0;return autorun(function(){var a=r.get();if(!n||t){var i=untrackedStart();e({type:"update",object:r,newValue:a,oldValue:o}),untrackedEnd(i)}n=!1,o=a})},e.prototype.warnAboutUntrackedRead=function(){},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},e.prototype.valueOf=function(){return toPrimitive(this.get())},e.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},e}(),isComputedValue=createInstanceofPredicate("ComputedValue",ComputedValue),persistentKeys=["mobxGuid","spyListeners","enforceActions","computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","allowStateReads","disableErrorBoundaries","runId","UNCHANGED"],MobXGlobals=function(){return function(){this.version=5,this.UNCHANGED={},this.trackingDerivation=null,this.computationDepth=0,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!0,this.allowStateReads=!0,this.enforceActions=!1,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.computedConfigurable=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1}}(),mockGlobal={};function getGlobal(){return"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:mockGlobal}var canMergeGlobalState=!0,isolateCalled=!1,globalState=function(){var e=getGlobal();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(canMergeGlobalState=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==(new MobXGlobals).version&&(canMergeGlobalState=!1),canMergeGlobalState?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new MobXGlobals):(setTimeout(function(){isolateCalled||fail("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")},1),new MobXGlobals)}();function isolateGlobalState(){(globalState.pendingReactions.length||globalState.inBatch||globalState.isRunningReactions)&&fail("isolateGlobalState should be called before MobX is running any reactions"),isolateCalled=!0,canMergeGlobalState&&(0==--getGlobal().__mobxInstanceCount&&(getGlobal().__mobxGlobals=void 0),globalState=new MobXGlobals)}function getGlobalState(){return globalState}function resetGlobalState(){var e=new MobXGlobals;for(var t in e)-1===persistentKeys.indexOf(t)&&(globalState[t]=e[t]);globalState.allowStateChanges=!globalState.enforceActions}function hasObservers(e){return e.observers&&e.observers.size>0}function getObservers(e){return e.observers}function addObserver(e,t){e.observers.add(t),e.lowestObserverState>t.dependenciesState&&(e.lowestObserverState=t.dependenciesState)}function removeObserver(e,t){e.observers.delete(t),0===e.observers.size&&queueForUnobservation(e)}function queueForUnobservation(e){!1===e.isPendingUnobservation&&(e.isPendingUnobservation=!0,globalState.pendingUnobservations.push(e))}function startBatch(){globalState.inBatch++}function endBatch(){if(0==--globalState.inBatch){runReactions();for(var e=globalState.pendingUnobservations,t=0;t<e.length;t++){var r=e[t];r.isPendingUnobservation=!1,0===r.observers.size&&(r.isBeingObserved&&(r.isBeingObserved=!1,r.onBecomeUnobserved()),r instanceof ComputedValue&&r.suspend())}globalState.pendingUnobservations=[]}}function reportObserved(e){var t=globalState.trackingDerivation;return null!==t?(t.runId!==e.lastAccessedBy&&(e.lastAccessedBy=t.runId,t.newObserving[t.unboundDepsCount++]=e,e.isBeingObserved||(e.isBeingObserved=!0,e.onBecomeObserved())),!0):(0===e.observers.size&&globalState.inBatch>0&&queueForUnobservation(e),!1)}function propagateChanged(e){e.lowestObserverState!==exports.IDerivationState.STALE&&(e.lowestObserverState=exports.IDerivationState.STALE,e.observers.forEach(function(t){t.dependenciesState===exports.IDerivationState.UP_TO_DATE&&(t.isTracing!==TraceMode.NONE&&logTraceInfo(t,e),t.onBecomeStale()),t.dependenciesState=exports.IDerivationState.STALE}))}function propagateChangeConfirmed(e){e.lowestObserverState!==exports.IDerivationState.STALE&&(e.lowestObserverState=exports.IDerivationState.STALE,e.observers.forEach(function(t){t.dependenciesState===exports.IDerivationState.POSSIBLY_STALE?t.dependenciesState=exports.IDerivationState.STALE:t.dependenciesState===exports.IDerivationState.UP_TO_DATE&&(e.lowestObserverState=exports.IDerivationState.UP_TO_DATE)}))}function propagateMaybeChanged(e){e.lowestObserverState===exports.IDerivationState.UP_TO_DATE&&(e.lowestObserverState=exports.IDerivationState.POSSIBLY_STALE,e.observers.forEach(function(t){t.dependenciesState===exports.IDerivationState.UP_TO_DATE&&(t.dependenciesState=exports.IDerivationState.POSSIBLY_STALE,t.isTracing!==TraceMode.NONE&&logTraceInfo(t,e),t.onBecomeStale())}))}function logTraceInfo(e,t){if(console.log("[mobx.trace] '"+e.name+"' is invalidated due to a change in: '"+t.name+"'"),e.isTracing===TraceMode.BREAK){var r=[];printDepTree(getDependencyTree(e),r,1),new Function("debugger;\n/*\nTracing '"+e.name+"'\n\nYou are entering this break point because derivation '"+e.name+"' is being traced and '"+t.name+"' is now forcing it to update.\nJust follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update\nThe stackframe you are looking for is at least ~6-8 stack-frames up.\n\n"+(e instanceof ComputedValue?e.derivation.toString().replace(/[*]\//g,"/"):"")+"\n\nThe dependencies for this derivation are:\n\n"+r.join("\n")+"\n*/\n ")()}}function printDepTree(e,t,r){t.length>=1e3?t.push("(and many more)"):(t.push(""+new Array(r).join("\t")+e.name),e.dependencies&&e.dependencies.forEach(function(e){return printDepTree(e,t,r+1)}))}var Reaction=function(){function e(e,t,r,n){void 0===e&&(e="Reaction@"+getNextId()),void 0===n&&(n=!1),this.name=e,this.onInvalidate=t,this.errorHandler=r,this.requiresObservable=n,this.observing=[],this.newObserving=[],this.dependenciesState=exports.IDerivationState.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+getNextId(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=TraceMode.NONE}return e.prototype.onBecomeStale=function(){this.schedule()},e.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,globalState.pendingReactions.push(this),runReactions())},e.prototype.isScheduled=function(){return this._isScheduled},e.prototype.runReaction=function(){if(!this.isDisposed){if(startBatch(),this._isScheduled=!1,shouldCompute(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending&&isSpyEnabled()}catch(e){this.reportExceptionInDerivation(e)}}endBatch()}},e.prototype.track=function(e){if(!this.isDisposed){startBatch(),this._isRunning=!0;var t=trackDerivedFunction(this,e,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&clearObserving(this),isCaughtException(t)&&this.reportExceptionInDerivation(t.cause),endBatch()}},e.prototype.reportExceptionInDerivation=function(e){var t=this;if(this.errorHandler)this.errorHandler(e,this);else{if(globalState.disableErrorBoundaries)throw e;var r="[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this+"'";globalState.suppressReactionErrors?console.warn("[mobx] (error in reaction '"+this.name+"' suppressed, fix error of causing action below)"):console.error(r,e),globalState.globalReactionErrorHandlers.forEach(function(r){return r(e,t)})}},e.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(startBatch(),clearObserving(this),endBatch()))},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.trace=function(e){void 0===e&&(e=!1),trace(this,e)},e}();function onReactionError(e){return globalState.globalReactionErrorHandlers.push(e),function(){var t=globalState.globalReactionErrorHandlers.indexOf(e);t>=0&&globalState.globalReactionErrorHandlers.splice(t,1)}}var MAX_REACTION_ITERATIONS=100,reactionScheduler=function(e){return e()};function runReactions(){globalState.inBatch>0||globalState.isRunningReactions||reactionScheduler(runReactionsHelper)}function runReactionsHelper(){globalState.isRunningReactions=!0;for(var e=globalState.pendingReactions,t=0;e.length>0;){++t===MAX_REACTION_ITERATIONS&&(console.error("Reaction doesn't converge to a stable state after "+MAX_REACTION_ITERATIONS+" iterations. Probably there is a cycle in the reactive function: "+e[0]),e.splice(0));for(var r=e.splice(0),n=0,o=r.length;n<o;n++)r[n].runReaction()}globalState.isRunningReactions=!1}var isReaction=createInstanceofPredicate("Reaction",Reaction);function setReactionScheduler(e){var t=reactionScheduler;reactionScheduler=function(r){return e(function(){return t(r)})}}function isSpyEnabled(){return!1}function spyReport(e){}function spyReportStart(e){}var END_EVENT={spyReportEnd:!0};function spyReportEnd(e){}function spy(e){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}function dontReassignFields(){fail(!1)}function namedActionDecorator(e){return function(t,r,n){if(n){if(n.value)return{value:createAction(e,n.value),enumerable:!1,configurable:!0,writable:!0};var o=n.initializer;return{enumerable:!1,configurable:!0,writable:!0,initializer:function(){return createAction(e,o.call(this))}}}return actionFieldDecorator(e).apply(this,arguments)}}function actionFieldDecorator(e){return function(t,r,n){Object.defineProperty(t,r,{configurable:!0,enumerable:!1,get:function(){},set:function(t){addHiddenProp(this,r,action(e,t))}})}}function boundActionDecorator(e,t,r,n){return!0===n?(defineBoundAction(e,t,r.value),null):r?{configurable:!0,enumerable:!1,get:function(){return defineBoundAction(this,t,r.value||r.initializer.call(this)),this[t]},set:dontReassignFields}:{enumerable:!1,configurable:!0,set:function(e){defineBoundAction(this,t,e)},get:function(){}}}var action=function(e,t,r,n){return 1===arguments.length&&"function"==typeof e?createAction(e.name||"<unnamed action>",e):2===arguments.length&&"function"==typeof t?createAction(e,t):1===arguments.length&&"string"==typeof e?namedActionDecorator(e):!0!==n?namedActionDecorator(t).apply(null,arguments):void addHiddenProp(e,t,createAction(e.name||t,r.value,this))};function runInAction(e,t){return executeAction("string"==typeof e?e:e.name||"<unnamed action>","function"==typeof e?e:t,this,void 0)}function isAction(e){return"function"==typeof e&&!0===e.isMobxAction}function defineBoundAction(e,t,r){addHiddenProp(e,t,createAction(t,r.bind(e)))}function autorun(e,t){void 0===t&&(t=EMPTY_OBJECT);var r,n=t&&t.name||e.name||"Autorun@"+getNextId();if(!t.scheduler&&!t.delay)r=new Reaction(n,function(){this.track(i)},t.onError,t.requiresObservable);else{var o=createSchedulerFromOptions(t),a=!1;r=new Reaction(n,function(){a||(a=!0,o(function(){a=!1,r.isDisposed||r.track(i)}))},t.onError,t.requiresObservable)}function i(){e(r)}return r.schedule(),r.getDisposer()}action.bound=boundActionDecorator;var run=function(e){return e()};function createSchedulerFromOptions(e){return e.scheduler?e.scheduler:e.delay?function(t){return setTimeout(t,e.delay)}:run}function reaction(e,t,r){void 0===r&&(r=EMPTY_OBJECT);var n,o=r.name||"Reaction@"+getNextId(),a=action(o,r.onError?wrapErrorHandler(r.onError,t):t),i=!r.scheduler&&!r.delay,s=createSchedulerFromOptions(r),c=!0,l=!1,u=r.compareStructural?comparer.structural:r.equals||comparer.default,p=new Reaction(o,function(){c||i?d():l||(l=!0,s(d))},r.onError,r.requiresObservable);function d(){if(l=!1,!p.isDisposed){var t=!1;p.track(function(){var r=e(p);t=c||!u(n,r),n=r}),c&&r.fireImmediately&&a(n,p),c||!0!==t||a(n,p),c&&(c=!1)}}return p.schedule(),p.getDisposer()}function wrapErrorHandler(e,t){return function(){try{return t.apply(this,arguments)}catch(t){e.call(this,t)}}}function onBecomeObserved(e,t,r){return interceptHook("onBecomeObserved",e,t,r)}function onBecomeUnobserved(e,t,r){return interceptHook("onBecomeUnobserved",e,t,r)}function interceptHook(e,t,r,n){var o="function"==typeof n?getAtom(t,r):getAtom(t),a="function"==typeof n?n:r,i=e+"Listeners";return o[i]?o[i].add(a):o[i]=new Set([a]),"function"!=typeof o[e]?fail(!1):function(){var e=o[i];e&&(e.delete(a),0===e.size&&delete o[i])}}function configure(e){var t=e.enforceActions,r=e.computedRequiresReaction,n=e.computedConfigurable,o=e.disableErrorBoundaries,a=e.reactionScheduler,i=e.reactionRequiresObservable,s=e.observableRequiresReaction;if(!0===e.isolateGlobalState&&isolateGlobalState(),void 0!==t){"boolean"!=typeof t&&"strict"!==t||deprecated("Deprecated value for 'enforceActions', use 'false' => '\"never\"', 'true' => '\"observed\"', '\"strict\"' => \"'always'\" instead");var c=void 0;switch(t){case!0:case"observed":c=!0;break;case!1:case"never":c=!1;break;case"strict":case"always":c="strict";break;default:fail("Invalid value for 'enforceActions': '"+t+"', expected 'never', 'always' or 'observed'")}globalState.enforceActions=c,globalState.allowStateChanges=!0!==c&&"strict"!==c}void 0!==r&&(globalState.computedRequiresReaction=!!r),void 0!==i&&(globalState.reactionRequiresObservable=!!i),void 0!==s&&(globalState.observableRequiresReaction=!!s,globalState.allowStateReads=!globalState.observableRequiresReaction),void 0!==n&&(globalState.computedConfigurable=!!n),void 0!==o&&(!0===o&&console.warn("WARNING: Debug feature only. MobX will NOT recover from errors when `disableErrorBoundaries` is enabled."),globalState.disableErrorBoundaries=!!o),a&&setReactionScheduler(a)}function decorate(e,t){var r="function"==typeof e?e.prototype:e,n=function(e){var n=t[e];Array.isArray(n)||(n=[n]);var o=Object.getOwnPropertyDescriptor(r,e),a=n.reduce(function(t,n){return n(r,e,t)},o);a&&Object.defineProperty(r,e,a)};for(var o in t)n(o);return e}function extendObservable(e,t,r,n){var o=getDefaultDecoratorFromObjectOptions(n=asCreateObservableOptions(n));return initializeInstance(e),asObservableObject(e,n.name,o.enhancer),t&&extendObservableObjectWithProperties(e,t,r,o),e}function getDefaultDecoratorFromObjectOptions(e){return e.defaultDecorator||(!1===e.deep?refDecorator:deepDecorator)}function extendObservableObjectWithProperties(e,t,r,n){var o,a;startBatch();try{var i=getPlainObjectKeys(t);try{for(var s=__values(i),c=s.next();!c.done;c=s.next()){var l=c.value,u=Object.getOwnPropertyDescriptor(t,l),p=(r&&l in r?r[l]:u.get?computedDecorator:n)(e,l,u,!0);p&&Object.defineProperty(e,l,p)}}catch(e){o={error:e}}finally{try{c&&!c.done&&(a=s.return)&&a.call(s)}finally{if(o)throw o.error}}}finally{endBatch()}}function getDependencyTree(e,t){return nodeToDependencyTree(getAtom(e,t))}function nodeToDependencyTree(e){var t={name:e.name};return e.observing&&e.observing.length>0&&(t.dependencies=unique(e.observing).map(nodeToDependencyTree)),t}function getObserverTree(e,t){return nodeToObserverTree(getAtom(e,t))}function nodeToObserverTree(e){var t={name:e.name};return hasObservers(e)&&(t.observers=Array.from(getObservers(e)).map(nodeToObserverTree)),t}var generatorId=0;function FlowCancellationError(){this.message="FLOW_CANCELLED"}function isFlowCancellationError(e){return e instanceof FlowCancellationError}function flow(e){1!==arguments.length&&fail("Flow expects 1 argument and cannot be used as decorator");var t=e.name||"<unnamed flow>";return function(){var r,n=arguments,o=++generatorId,a=action(t+" - runid: "+o+" - init",e).apply(this,n),i=void 0,s=new Promise(function(e,n){var s=0;function c(e){var r;i=void 0;try{r=action(t+" - runid: "+o+" - yield "+s++,a.next).call(a,e)}catch(e){return n(e)}u(r)}function l(e){var r;i=void 0;try{r=action(t+" - runid: "+o+" - yield "+s++,a.throw).call(a,e)}catch(e){return n(e)}u(r)}function u(t){if(!t||"function"!=typeof t.then)return t.done?e(t.value):(i=Promise.resolve(t.value)).then(c,l);t.then(u,n)}r=n,c(void 0)});return s.cancel=action(t+" - runid: "+o+" - cancel",function(){try{i&&cancelPromise(i);var e=a.return(void 0),t=Promise.resolve(e.value);t.then(noop,noop),cancelPromise(t),r(new FlowCancellationError)}catch(e){r(e)}}),s}}function cancelPromise(e){"function"==typeof e.cancel&&e.cancel()}function interceptReads(e,t,r){var n;if(isObservableMap(e)||isObservableArray(e)||isObservableValue(e))n=getAdministration(e);else{if(!isObservableObject(e))return fail(!1);if("string"!=typeof t)return fail(!1);n=getAdministration(e,t)}return void 0!==n.dehancer?fail(!1):(n.dehancer="function"==typeof t?t:r,function(){n.dehancer=void 0})}function intercept(e,t,r){return"function"==typeof r?interceptProperty(e,t,r):interceptInterceptable(e,t)}function interceptInterceptable(e,t){return getAdministration(e).intercept(t)}function interceptProperty(e,t,r){return getAdministration(e,t).intercept(r)}function _isComputed(e,t){if(null==e)return!1;if(void 0!==t){if(!1===isObservableObject(e))return!1;if(!e[$mobx].values.has(t))return!1;var r=getAtom(e,t);return isComputedValue(r)}return isComputedValue(e)}function isComputed(e){return arguments.length>1?fail(!1):_isComputed(e)}function isComputedProp(e,t){return"string"!=typeof t?fail(!1):_isComputed(e,t)}function _isObservable(e,t){return null!=e&&(void 0!==t?!!isObservableObject(e)&&e[$mobx].values.has(t):isObservableObject(e)||!!e[$mobx]||isAtom(e)||isReaction(e)||isComputedValue(e))}function isObservable(e){return 1!==arguments.length&&fail(!1),_isObservable(e)}function isObservableProp(e,t){return"string"!=typeof t?fail(!1):_isObservable(e,t)}function keys(e){return isObservableObject(e)?e[$mobx].getKeys():isObservableMap(e)?Array.from(e.keys()):isObservableSet(e)?Array.from(e.keys()):isObservableArray(e)?e.map(function(e,t){return t}):fail(!1)}function values(e){return isObservableObject(e)?keys(e).map(function(t){return e[t]}):isObservableMap(e)?keys(e).map(function(t){return e.get(t)}):isObservableSet(e)?Array.from(e.values()):isObservableArray(e)?e.slice():fail(!1)}function entries(e){return isObservableObject(e)?keys(e).map(function(t){return[t,e[t]]}):isObservableMap(e)?keys(e).map(function(t){return[t,e.get(t)]}):isObservableSet(e)?Array.from(e.entries()):isObservableArray(e)?e.map(function(e,t){return[t,e]}):fail(!1)}function set(e,t,r){if(2!==arguments.length||isObservableSet(e))if(isObservableObject(e)){var n=e[$mobx];n.values.get(t)?n.write(t,r):n.addObservableProp(t,r,n.defaultEnhancer)}else if(isObservableMap(e))e.set(t,r);else if(isObservableSet(e))e.add(t);else{if(!isObservableArray(e))return fail(!1);"number"!=typeof t&&(t=parseInt(t,10)),invariant(t>=0,"Not a valid index: '"+t+"'"),startBatch(),t>=e.length&&(e.length=t+1),e[t]=r,endBatch()}else{startBatch();var o=t;try{for(var a in o)set(e,a,o[a])}finally{endBatch()}}}function remove(e,t){if(isObservableObject(e))e[$mobx].remove(t);else if(isObservableMap(e))e.delete(t);else if(isObservableSet(e))e.delete(t);else{if(!isObservableArray(e))return fail(!1);"number"!=typeof t&&(t=parseInt(t,10)),invariant(t>=0,"Not a valid index: '"+t+"'"),e.splice(t,1)}}function has(e,t){return isObservableObject(e)?getAdministration(e).has(t):isObservableMap(e)?e.has(t):isObservableSet(e)?e.has(t):isObservableArray(e)?t>=0&&t<e.length:fail(!1)}function get(e,t){if(has(e,t))return isObservableObject(e)?e[t]:isObservableMap(e)?e.get(t):isObservableArray(e)?e[t]:fail(!1)}function observe(e,t,r,n){return"function"==typeof r?observeObservableProperty(e,t,r,n):observeObservable(e,t,r)}function observeObservable(e,t,r){return getAdministration(e).observe(t,r)}function observeObservableProperty(e,t,r,n){return getAdministration(e,t).observe(r,n)}FlowCancellationError.prototype=Object.create(Error.prototype);var defaultOptions={detectCycles:!0,exportMapsAsObjects:!0,recurseEverything:!1};function cache(e,t,r,n){return n.detectCycles&&e.set(t,r),r}function toJSHelper(e,t,r){if(!t.recurseEverything&&!isObservable(e))return e;if("object"!=typeof e)return e;if(null===e)return null;if(e instanceof Date)return e;if(isObservableValue(e))return toJSHelper(e.get(),t,r);if(isObservable(e)&&keys(e),!0===t.detectCycles&&null!==e&&r.has(e))return r.get(e);if(isObservableArray(e)||Array.isArray(e)){var n=cache(r,e,[],t),o=e.map(function(e){return toJSHelper(e,t,r)});n.length=o.length;for(var a=0,i=o.length;a<i;a++)n[a]=o[a];return n}if(isObservableSet(e)||Object.getPrototypeOf(e)===Set.prototype){if(!1===t.exportMapsAsObjects){var s=cache(r,e,new Set,t);return e.forEach(function(e){s.add(toJSHelper(e,t,r))}),s}var c=cache(r,e,[],t);return e.forEach(function(e){c.push(toJSHelper(e,t,r))}),c}if(isObservableMap(e)||Object.getPrototypeOf(e)===Map.prototype){if(!1===t.exportMapsAsObjects){var l=cache(r,e,new Map,t);return e.forEach(function(e,n){l.set(n,toJSHelper(e,t,r))}),l}var u=cache(r,e,{},t);return e.forEach(function(e,n){u[n]=toJSHelper(e,t,r)}),u}var p=cache(r,e,{},t);return getPlainObjectKeys(e).forEach(function(n){p[n]=toJSHelper(e[n],t,r)}),p}function toJS(e,t){var r;return"boolean"==typeof t&&(t={detectCycles:t}),t||(t=defaultOptions),t.detectCycles=void 0===t.detectCycles?!0===t.recurseEverything:!0===t.detectCycles,t.detectCycles&&(r=new Map),toJSHelper(e,t,r)}function trace(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=!1;"boolean"==typeof e[e.length-1]&&(r=e.pop());var n=getAtomFromArgs(e);if(!n)return fail(!1);n.isTracing===TraceMode.NONE&&console.log("[mobx.trace] '"+n.name+"' tracing enabled"),n.isTracing=r?TraceMode.BREAK:TraceMode.LOG}function getAtomFromArgs(e){switch(e.length){case 0:return globalState.trackingDerivation;case 1:return getAtom(e[0]);case 2:return getAtom(e[0],e[1])}}function transaction(e,t){void 0===t&&(t=void 0),startBatch();try{return e.apply(t)}finally{endBatch()}}function when(e,t,r){return 1===arguments.length||t&&"object"==typeof t?whenPromise(e,t):_when(e,t,r||{})}function _when(e,t,r){var n;"number"==typeof r.timeout&&(n=setTimeout(function(){if(!a[$mobx].isDisposed){a();var e=new Error("WHEN_TIMEOUT");if(!r.onError)throw e;r.onError(e)}},r.timeout)),r.name=r.name||"When@"+getNextId();var o=createAction(r.name+"-effect",t),a=autorun(function(t){e()&&(t.dispose(),n&&clearTimeout(n),o())},r);return a}function whenPromise(e,t){var r,n=new Promise(function(n,o){var a=_when(e,n,__assign(__assign({},t),{onError:o}));r=function(){a(),o("WHEN_CANCELLED")}});return n.cancel=r,n}function getAdm(e){return e[$mobx]}function isPropertyKey(e){return"string"==typeof e||"number"==typeof e||"symbol"==typeof e}var objectProxyTraps={has:function(e,t){if(t===$mobx||"constructor"===t||t===mobxDidRunLazyInitializersSymbol)return!0;var r=getAdm(e);return isPropertyKey(t)?r.has(t):t in e},get:function(e,t){if(t===$mobx||"constructor"===t||t===mobxDidRunLazyInitializersSymbol)return e[t];var r=getAdm(e),n=r.values.get(t);if(n instanceof Atom){var o=n.get();return void 0===o&&r.has(t),o}return isPropertyKey(t)&&r.has(t),e[t]},set:function(e,t,r){return!!isPropertyKey(t)&&(set(e,t,r),!0)},deleteProperty:function(e,t){return!!isPropertyKey(t)&&(getAdm(e).remove(t),!0)},ownKeys:function(e){return getAdm(e).keysAtom.reportObserved(),Reflect.ownKeys(e)},preventExtensions:function(e){return fail("Dynamic observable objects cannot be frozen"),!1}};function createDynamicObservableObject(e){var t=new Proxy(e,objectProxyTraps);return e[$mobx].proxy=t,t}function hasInterceptors(e){return void 0!==e.interceptors&&e.interceptors.length>0}function registerInterceptor(e,t){var r=e.interceptors||(e.interceptors=[]);return r.push(t),once(function(){var e=r.indexOf(t);-1!==e&&r.splice(e,1)})}function interceptChange(e,t){var r=untrackedStart();try{for(var n=__spread(e.interceptors||[]),o=0,a=n.length;o<a&&(invariant(!(t=n[o](t))||t.type,"Intercept handlers should return nothing or a change object"),t);o++);return t}finally{untrackedEnd(r)}}function hasListeners(e){return void 0!==e.changeListeners&&e.changeListeners.length>0}function registerListener(e,t){var r=e.changeListeners||(e.changeListeners=[]);return r.push(t),once(function(){var e=r.indexOf(t);-1!==e&&r.splice(e,1)})}function notifyListeners(e,t){var r=untrackedStart(),n=e.changeListeners;if(n){for(var o=0,a=(n=n.slice()).length;o<a;o++)n[o](t);untrackedEnd(r)}}var MAX_SPLICE_SIZE=1e4,arrayTraps={get:function(e,t){return t===$mobx?e[$mobx]:"length"===t?e[$mobx].getArrayLength():"number"==typeof t?arrayExtensions.get.call(e,t):"string"!=typeof t||isNaN(t)?arrayExtensions.hasOwnProperty(t)?arrayExtensions[t]:e[t]:arrayExtensions.get.call(e,parseInt(t))},set:function(e,t,r){return"length"===t&&e[$mobx].setArrayLength(r),"number"==typeof t&&arrayExtensions.set.call(e,t,r),"symbol"==typeof t||isNaN(t)?e[t]=r:arrayExtensions.set.call(e,parseInt(t),r),!0},preventExtensions:function(e){return fail("Observable arrays cannot be frozen"),!1}};function createObservableArray(e,t,r,n){void 0===r&&(r="ObservableArray@"+getNextId()),void 0===n&&(n=!1);var o=new ObservableArrayAdministration(r,t,n);addHiddenFinalProp(o.values,$mobx,o);var a=new Proxy(o.values,arrayTraps);if(o.proxy=a,e&&e.length){var i=allowStateChangesStart(!0);o.spliceWithArray(0,0,e),allowStateChangesEnd(i)}return a}var ObservableArrayAdministration=function(){function e(e,t,r){this.owned=r,this.values=[],this.proxy=void 0,this.lastKnownLength=0,this.atom=new Atom(e||"ObservableArray@"+getNextId()),this.enhancer=function(r,n){return t(r,n,e+"[..]")}}return e.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},e.prototype.dehanceValues=function(e){return void 0!==this.dehancer&&e.length>0?e.map(this.dehancer):e},e.prototype.intercept=function(e){return registerInterceptor(this,e)},e.prototype.observe=function(e,t){return void 0===t&&(t=!1),t&&e({object:this.proxy,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),registerListener(this,e)},e.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},e.prototype.setArrayLength=function(e){if("number"!=typeof e||e<0)throw new Error("[mobx.array] Out of range: "+e);var t=this.values.length;if(e!==t)if(e>t){for(var r=new Array(e-t),n=0;n<e-t;n++)r[n]=void 0;this.spliceWithArray(t,0,r)}else this.spliceWithArray(e,t-e)},e.prototype.updateArrayLength=function(e,t){if(e!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed.");this.lastKnownLength+=t},e.prototype.spliceWithArray=function(e,t,r){var n=this;checkIfStateModificationsAreAllowed(this.atom);var o=this.values.length;if(void 0===e?e=0:e>o?e=o:e<0&&(e=Math.max(0,o+e)),t=1===arguments.length?o-e:null==t?0:Math.max(0,Math.min(t,o-e)),void 0===r&&(r=EMPTY_ARRAY),hasInterceptors(this)){var a=interceptChange(this,{object:this.proxy,type:"splice",index:e,removedCount:t,added:r});if(!a)return EMPTY_ARRAY;t=a.removedCount,r=a.added}r=0===r.length?r:r.map(function(e){return n.enhancer(e,void 0)});var i=this.spliceItemsIntoValues(e,t,r);return 0===t&&0===r.length||this.notifyArraySplice(e,r,i),this.dehanceValues(i)},e.prototype.spliceItemsIntoValues=function(e,t,r){var n;if(r.length<MAX_SPLICE_SIZE)return(n=this.values).splice.apply(n,__spread([e,t],r));var o=this.values.slice(e,e+t);return this.values=this.values.slice(0,e).concat(r,this.values.slice(e+t)),o},e.prototype.notifyArrayChildUpdate=function(e,t,r){var n=!this.owned&&isSpyEnabled(),o=hasListeners(this),a=o||n?{object:this.proxy,type:"update",index:e,newValue:t,oldValue:r}:null;this.atom.reportChanged(),o&¬ifyListeners(this,a)},e.prototype.notifyArraySplice=function(e,t,r){var n=!this.owned&&isSpyEnabled(),o=hasListeners(this),a=o||n?{object:this.proxy,type:"splice",index:e,removed:r,added:t,removedCount:r.length,addedCount:t.length}:null;this.atom.reportChanged(),o&¬ifyListeners(this,a)},e}(),arrayExtensions={intercept:function(e){return this[$mobx].intercept(e)},observe:function(e,t){return void 0===t&&(t=!1),this[$mobx].observe(e,t)},clear:function(){return this.splice(0)},replace:function(e){var t=this[$mobx];return t.spliceWithArray(0,t.values.length,e)},toJS:function(){return this.slice()},toJSON:function(){return this.toJS()},splice:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var o=this[$mobx];switch(arguments.length){case 0:return[];case 1:return o.spliceWithArray(e);case 2:return o.spliceWithArray(e,t)}return o.spliceWithArray(e,t,r)},spliceWithArray:function(e,t,r){return this[$mobx].spliceWithArray(e,t,r)},push:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=this[$mobx];return r.spliceWithArray(r.values.length,0,e),r.values.length},pop:function(){return this.splice(Math.max(this[$mobx].values.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=this[$mobx];return r.spliceWithArray(0,0,e),r.values.length},reverse:function(){var e=this.slice();return e.reverse.apply(e,arguments)},sort:function(e){var t=this.slice();return t.sort.apply(t,arguments)},remove:function(e){var t=this[$mobx],r=t.dehanceValues(t.values).indexOf(e);return r>-1&&(this.splice(r,1),!0)},get:function(e){var t=this[$mobx];if(t){if(e<t.values.length)return t.atom.reportObserved(),t.dehanceValue(t.values[e]);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")}},set:function(e,t){var r=this[$mobx],n=r.values;if(e<n.length){checkIfStateModificationsAreAllowed(r.atom);var o=n[e];if(hasInterceptors(r)){var a=interceptChange(r,{type:"update",object:r.proxy,index:e,newValue:t});if(!a)return;t=a.newValue}(t=r.enhancer(t,o))!==o&&(n[e]=t,r.notifyArrayChildUpdate(e,t,o))}else{if(e!==n.length)throw new Error("[mobx.array] Index out of bounds, "+e+" is larger than "+n.length);r.spliceWithArray(e,0,[t])}}};["concat","every","filter","forEach","indexOf","join","lastIndexOf","map","reduce","reduceRight","slice","some","toString","toLocaleString"].forEach(function(e){arrayExtensions[e]=function(){var t=this[$mobx];t.atom.reportObserved();var r=t.dehanceValues(t.values);return r[e].apply(r,arguments)}});var _a,isObservableArrayAdministration=createInstanceofPredicate("ObservableArrayAdministration",ObservableArrayAdministration);function isObservableArray(e){return isObject(e)&&isObservableArrayAdministration(e[$mobx])}var _a$1,ObservableMapMarker={},ObservableMap=function(){function e(e,t,r){if(void 0===t&&(t=deepEnhancer),void 0===r&&(r="ObservableMap@"+getNextId()),this.enhancer=t,this.name=r,this[_a]=ObservableMapMarker,this._keysAtom=createAtom(this.name+".keys()"),this[Symbol.toStringTag]="Map","function"!=typeof Map)throw new Error("mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js");this._data=new Map,this._hasMap=new Map,this.merge(e)}return e.prototype._has=function(e){return this._data.has(e)},e.prototype.has=function(e){var t=this;if(!globalState.trackingDerivation)return this._has(e);var r=this._hasMap.get(e);if(!r){var n=r=new ObservableValue(this._has(e),referenceEnhancer,this.name+"."+stringifyKey(e)+"?",!1);this._hasMap.set(e,n),onBecomeUnobserved(n,function(){return t._hasMap.delete(e)})}return r.get()},e.prototype.set=function(e,t){var r=this._has(e);if(hasInterceptors(this)){var n=interceptChange(this,{type:r?"update":"add",object:this,newValue:t,name:e});if(!n)return this;t=n.newValue}return r?this._updateValue(e,t):this._addValue(e,t),this},e.prototype.delete=function(e){var t=this;if(hasInterceptors(this)&&!(o=interceptChange(this,{type:"delete",object:this,name:e})))return!1;if(this._has(e)){var r=isSpyEnabled(),n=hasListeners(this),o=n||r?{type:"delete",object:this,oldValue:this._data.get(e).value,name:e}:null;return transaction(function(){t._keysAtom.reportChanged(),t._updateHasMapEntry(e,!1),t._data.get(e).setNewValue(void 0),t._data.delete(e)}),n&¬ifyListeners(this,o),!0}return!1},e.prototype._updateHasMapEntry=function(e,t){var r=this._hasMap.get(e);r&&r.setNewValue(t)},e.prototype._updateValue=function(e,t){var r=this._data.get(e);if((t=r.prepareNewValue(t))!==globalState.UNCHANGED){var n=isSpyEnabled(),o=hasListeners(this),a=o||n?{type:"update",object:this,oldValue:r.value,name:e,newValue:t}:null;0,r.setNewValue(t),o&¬ifyListeners(this,a)}},e.prototype._addValue=function(e,t){var r=this;checkIfStateModificationsAreAllowed(this._keysAtom),transaction(function(){var n=new ObservableValue(t,r.enhancer,r.name+"."+stringifyKey(e),!1);r._data.set(e,n),t=n.value,r._updateHasMapEntry(e,!0),r._keysAtom.reportChanged()});var n=isSpyEnabled(),o=hasListeners(this);o&¬ifyListeners(this,o||n?{type:"add",object:this,name:e,newValue:t}:null)},e.prototype.get=function(e){return this.has(e)?this.dehanceValue(this._data.get(e).get()):this.dehanceValue(void 0)},e.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},e.prototype.keys=function(){return this._keysAtom.reportObserved(),this._data.keys()},e.prototype.values=function(){var e=this,t=0,r=Array.from(this.keys());return makeIterable({next:function(){return t<r.length?{value:e.get(r[t++]),done:!1}:{done:!0}}})},e.prototype.entries=function(){var e=this,t=0,r=Array.from(this.keys());return makeIterable({next:function(){if(t<r.length){var n=r[t++];return{value:[n,e.get(n)],done:!1}}return{done:!0}}})},e.prototype[(_a=$mobx,Symbol.iterator)]=function(){return this.entries()},e.prototype.forEach=function(e,t){var r,n;try{for(var o=__values(this),a=o.next();!a.done;a=o.next()){var i=__read(a.value,2),s=i[0],c=i[1];e.call(t,c,s,this)}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}},e.prototype.merge=function(e){var t=this;return isObservableMap(e)&&(e=e.toJS()),transaction(function(){isPlainObject(e)?getPlainObjectKeys(e).forEach(function(r){return t.set(r,e[r])}):Array.isArray(e)?e.forEach(function(e){var r=__read(e,2),n=r[0],o=r[1];return t.set(n,o)}):isES6Map(e)?(e.constructor!==Map&&fail("Cannot initialize from classes that inherit from Map: "+e.constructor.name),e.forEach(function(e,r){return t.set(r,e)})):null!=e&&fail("Cannot initialize map from "+e)}),this},e.prototype.clear=function(){var e=this;transaction(function(){untracked(function(){var t,r;try{for(var n=__values(e.keys()),o=n.next();!o.done;o=n.next()){var a=o.value;e.delete(a)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}})})},e.prototype.replace=function(e){var t=this;return transaction(function(){var r=getMapLikeKeys(e);Array.from(t.keys()).filter(function(e){return-1===r.indexOf(e)}).forEach(function(e){return t.delete(e)}),t.merge(e)}),this},Object.defineProperty(e.prototype,"size",{get:function(){return this._keysAtom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),e.prototype.toPOJO=function(){var e,t,r={};try{for(var n=__values(this),o=n.next();!o.done;o=n.next()){var a=__read(o.value,2),i=a[0],s=a[1];r["symbol"==typeof i?i:stringifyKey(i)]=s}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}return r},e.prototype.toJS=function(){return new Map(this)},e.prototype.toJSON=function(){return this.toPOJO()},e.prototype.toString=function(){var e=this;return this.name+"[{ "+Array.from(this.keys()).map(function(t){return stringifyKey(t)+": "+e.get(t)}).join(", ")+" }]"},e.prototype.observe=function(e,t){return registerListener(this,e)},e.prototype.intercept=function(e){return registerInterceptor(this,e)},e}(),isObservableMap=createInstanceofPredicate("ObservableMap",ObservableMap),ObservableSetMarker={},ObservableSet=function(){function e(e,t,r){if(void 0===t&&(t=deepEnhancer),void 0===r&&(r="ObservableSet@"+getNextId()),this.name=r,this[_a$1]=ObservableSetMarker,this._data=new Set,this._atom=createAtom(this.name),this[Symbol.toStringTag]="Set","function"!=typeof Set)throw new Error("mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js");this.enhancer=function(e,n){return t(e,n,r)},e&&this.replace(e)}return e.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},e.prototype.clear=function(){var e=this;transaction(function(){untracked(function(){var t,r;try{for(var n=__values(e._data.values()),o=n.next();!o.done;o=n.next()){var a=o.value;e.delete(a)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}})})},e.prototype.forEach=function(e,t){var r,n;try{for(var o=__values(this),a=o.next();!a.done;a=o.next()){var i=a.value;e.call(t,i,i,this)}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}},Object.defineProperty(e.prototype,"size",{get:function(){return this._atom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),e.prototype.add=function(e){var t=this;if((checkIfStateModificationsAreAllowed(this._atom),hasInterceptors(this))&&!(o=interceptChange(this,{type:"add",object:this,newValue:e})))return this;if(!this.has(e)){transaction(function(){t._data.add(t.enhancer(e,void 0)),t._atom.reportChanged()});var r=isSpyEnabled(),n=hasListeners(this),o=n||r?{type:"add",object:this,newValue:e}:null;0,n&¬ifyListeners(this,o)}return this},e.prototype.delete=function(e){var t=this;if(hasInterceptors(this)&&!(o=interceptChange(this,{type:"delete",object:this,oldValue:e})))return!1;if(this.has(e)){var r=isSpyEnabled(),n=hasListeners(this),o=n||r?{type:"delete",object:this,oldValue:e}:null;return transaction(function(){t._atom.reportChanged(),t._data.delete(e)}),n&¬ifyListeners(this,o),!0}return!1},e.prototype.has=function(e){return this._atom.reportObserved(),this._data.has(this.dehanceValue(e))},e.prototype.entries=function(){var e=0,t=Array.from(this.keys()),r=Array.from(this.values());return makeIterable({next:function(){var n=e;return e+=1,n<r.length?{value:[t[n],r[n]],done:!1}:{done:!0}}})},e.prototype.keys=function(){return this.values()},e.prototype.values=function(){this._atom.reportObserved();var e=this,t=0,r=Array.from(this._data.values());return makeIterable({next:function(){return t<r.length?{value:e.dehanceValue(r[t++]),done:!1}:{done:!0}}})},e.prototype.replace=function(e){var t=this;return isObservableSet(e)&&(e=e.toJS()),transaction(function(){Array.isArray(e)?(t.clear(),e.forEach(function(e){return t.add(e)})):isES6Set(e)?(t.clear(),e.forEach(function(e){return t.add(e)})):null!=e&&fail("Cannot initialize set from "+e)}),this},e.prototype.observe=function(e,t){return registerListener(this,e)},e.prototype.intercept=function(e){return registerInterceptor(this,e)},e.prototype.toJS=function(){return new Set(this)},e.prototype.toString=function(){return this.name+"[ "+Array.from(this).join(", ")+" ]"},e.prototype[(_a$1=$mobx,Symbol.iterator)]=function(){return this.values()},e}(),isObservableSet=createInstanceofPredicate("ObservableSet",ObservableSet),ObservableObjectAdministration=function(){function e(e,t,r,n){void 0===t&&(t=new Map),this.target=e,this.values=t,this.name=r,this.defaultEnhancer=n,this.keysAtom=new Atom(r+".keys")}return e.prototype.read=function(e){return this.values.get(e).get()},e.prototype.write=function(e,t){var r=this.target,n=this.values.get(e);if(n instanceof ComputedValue)n.set(t);else{if(hasInterceptors(this)){if(!(i=interceptChange(this,{type:"update",object:this.proxy||r,name:e,newValue:t})))return;t=i.newValue}if((t=n.prepareNewValue(t))!==globalState.UNCHANGED){var o=hasListeners(this),a=isSpyEnabled(),i=o||a?{type:"update",object:this.proxy||r,oldValue:n.value,name:e,newValue:t}:null;0,n.setNewValue(t),o&¬ifyListeners(this,i)}}},e.prototype.has=function(e){var t=this.pendingKeys||(this.pendingKeys=new Map),r=t.get(e);if(r)return r.get();var n=!!this.values.get(e);return r=new ObservableValue(n,referenceEnhancer,this.name+"."+stringifyKey(e)+"?",!1),t.set(e,r),r.get()},e.prototype.addObservableProp=function(e,t,r){void 0===r&&(r=this.defaultEnhancer);var n=this.target;if(hasInterceptors(this)){var o=interceptChange(this,{object:this.proxy||n,name:e,type:"add",newValue:t});if(!o)return;t=o.newValue}var a=new ObservableValue(t,r,this.name+"."+stringifyKey(e),!1);this.values.set(e,a),t=a.value,Object.defineProperty(n,e,generateObservablePropConfig(e)),this.notifyPropertyAddition(e,t)},e.prototype.addComputedProp=function(e,t,r){var n=this.target;r.name=r.name||this.name+"."+stringifyKey(t),this.values.set(t,new ComputedValue(r)),(e===n||isPropertyConfigurable(e,t))&&Object.defineProperty(e,t,generateComputedPropConfig(t))},e.prototype.remove=function(e){if(this.values.has(e)){var t=this.target;if(hasInterceptors(this))if(!(s=interceptChange(this,{object:this.proxy||t,name:e,type:"remove"})))return;try{startBatch();var r=hasListeners(this),n=isSpyEnabled(),o=this.values.get(e),a=o&&o.get();if(o&&o.set(void 0),this.keysAtom.reportChanged(),this.values.delete(e),this.pendingKeys){var i=this.pendingKeys.get(e);i&&i.set(!1)}delete this.target[e];var s=r||n?{type:"remove",object:this.proxy||t,oldValue:a,name:e}:null;0,r&¬ifyListeners(this,s)}finally{endBatch()}}},e.prototype.illegalAccess=function(e,t){console.warn("Property '"+t+"' of '"+e+"' was accessed through the prototype chain. Use 'decorate' instead to declare the prop or access it statically through it's owner")},e.prototype.observe=function(e,t){return registerListener(this,e)},e.prototype.intercept=function(e){return registerInterceptor(this,e)},e.prototype.notifyPropertyAddition=function(e,t){var r=hasListeners(this),n=isSpyEnabled(),o=r||n?{type:"add",object:this.proxy||this.target,name:e,newValue:t}:null;if(r&¬ifyListeners(this,o),this.pendingKeys){var a=this.pendingKeys.get(e);a&&a.set(!0)}this.keysAtom.reportChanged()},e.prototype.getKeys=function(){var e,t;this.keysAtom.reportObserved();var r=[];try{for(var n=__values(this.values),o=n.next();!o.done;o=n.next()){var a=__read(o.value,2),i=a[0];a[1]instanceof ObservableValue&&r.push(i)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}return r},e}();function asObservableObject(e,t,r){if(void 0===t&&(t=""),void 0===r&&(r=deepEnhancer),Object.prototype.hasOwnProperty.call(e,$mobx))return e[$mobx];isPlainObject(e)||(t=(e.constructor.name||"ObservableObject")+"@"+getNextId()),t||(t="ObservableObject@"+getNextId());var n=new ObservableObjectAdministration(e,new Map,stringifyKey(t),r);return addHiddenProp(e,$mobx,n),n}var observablePropertyConfigs=Object.create(null),computedPropertyConfigs=Object.create(null);function generateObservablePropConfig(e){return observablePropertyConfigs[e]||(observablePropertyConfigs[e]={configurable:!0,enumerable:!0,get:function(){return this[$mobx].read(e)},set:function(t){this[$mobx].write(e,t)}})}function getAdministrationForComputedPropOwner(e){var t=e[$mobx];return t||(initializeInstance(e),e[$mobx])}function generateComputedPropConfig(e){return computedPropertyConfigs[e]||(computedPropertyConfigs[e]={configurable:globalState.computedConfigurable,enumerable:!1,get:function(){return getAdministrationForComputedPropOwner(this).read(e)},set:function(t){getAdministrationForComputedPropOwner(this).write(e,t)}})}var isObservableObjectAdministration=createInstanceofPredicate("ObservableObjectAdministration",ObservableObjectAdministration);function isObservableObject(e){return!!isObject(e)&&(initializeInstance(e),isObservableObjectAdministration(e[$mobx]))}function getAtom(e,t){if("object"==typeof e&&null!==e){if(isObservableArray(e))return void 0!==t&&fail(!1),e[$mobx].atom;if(isObservableSet(e))return e[$mobx];if(isObservableMap(e)){var r=e;return void 0===t?r._keysAtom:((n=r._data.get(t)||r._hasMap.get(t))||fail(!1),n)}var n;if(initializeInstance(e),t&&!e[$mobx]&&e[t],isObservableObject(e))return t?((n=e[$mobx].values.get(t))||fail(!1),n):fail(!1);if(isAtom(e)||isComputedValue(e)||isReaction(e))return e}else if("function"==typeof e&&isReaction(e[$mobx]))return e[$mobx];return fail(!1)}function getAdministration(e,t){return e||fail("Expecting some object"),void 0!==t?getAdministration(getAtom(e,t)):isAtom(e)||isComputedValue(e)||isReaction(e)?e:isObservableMap(e)||isObservableSet(e)?e:(initializeInstance(e),e[$mobx]?e[$mobx]:void fail(!1))}function getDebugName(e,t){return(void 0!==t?getAtom(e,t):isObservableObject(e)||isObservableMap(e)||isObservableSet(e)?getAdministration(e):getAtom(e)).name}var g,toString=Object.prototype.toString;function deepEqual(e,t,r){return void 0===r&&(r=-1),eq(e,t,r)}function eq(e,t,r,n,o){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return!1;if(e!=e)return t!=t;var a=typeof e;if("function"!==a&&"object"!==a&&"object"!=typeof t)return!1;var i=toString.call(e);if(i!==toString.call(t))return!1;switch(i){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0==+e?1/+e==1/t:+e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(e)===Symbol.valueOf.call(t);case"[object Map]":case"[object Set]":r>=0&&r++}e=unwrap(e),t=unwrap(t);var s="[object Array]"===i;if(!s){if("object"!=typeof e||"object"!=typeof t)return!1;var c=e.constructor,l=t.constructor;if(c!==l&&!("function"==typeof c&&c instanceof c&&"function"==typeof l&&l instanceof l)&&"constructor"in e&&"constructor"in t)return!1}if(0===r)return!1;r<0&&(r=-1),o=o||[];for(var u=(n=n||[]).length;u--;)if(n[u]===e)return o[u]===t;if(n.push(e),o.push(t),s){if((u=e.length)!==t.length)return!1;for(;u--;)if(!eq(e[u],t[u],r-1,n,o))return!1}else{var p=Object.keys(e),d=void 0;if(u=p.length,Object.keys(t).length!==u)return!1;for(;u--;)if(!has$1(t,d=p[u])||!eq(e[d],t[d],r-1,n,o))return!1}return n.pop(),o.pop(),!0}function unwrap(e){return isObservableArray(e)?e.slice():isES6Map(e)||isObservableMap(e)?Array.from(e.entries()):isES6Set(e)||isObservableSet(e)?Array.from(e.entries()):e}function has$1(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function makeIterable(e){return e[Symbol.iterator]=getSelf,e}function getSelf(){return this}if("undefined"==typeof Proxy||"undefined"==typeof Symbol)throw new Error("[mobx] MobX 5+ requires Proxy and Symbol objects. If your environment doesn't support Symbol or Proxy objects, please downgrade to MobX 4. For React Native Android, consider upgrading JSCore.");"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:spy,extras:{getDebugName:getDebugName},$mobx:$mobx}),exports.$mobx=$mobx,exports.FlowCancellationError=FlowCancellationError,exports.ObservableMap=ObservableMap,exports.ObservableSet=ObservableSet,exports.Reaction=Reaction,exports._allowStateChanges=allowStateChanges,exports._allowStateChangesInsideComputed=allowStateChangesInsideComputed,exports._allowStateReadsEnd=allowStateReadsEnd,exports._allowStateReadsStart=allowStateReadsStart,exports._endAction=_endAction,exports._getAdministration=getAdministration,exports._getGlobalState=getGlobalState,exports._interceptReads=interceptReads,exports._isComputingDerivation=isComputingDerivation,exports._resetGlobalState=resetGlobalState,exports._startAction=_startAction,exports.action=action,exports.autorun=autorun,exports.comparer=comparer,exports.computed=computed,exports.configure=configure,exports.createAtom=createAtom,exports.decorate=decorate,exports.entries=entries,exports.extendObservable=extendObservable,exports.flow=flow,exports.get=get,exports.getAtom=getAtom,exports.getDebugName=getDebugName,exports.getDependencyTree=getDependencyTree,exports.getObserverTree=getObserverTree,exports.has=has,exports.intercept=intercept,exports.isAction=isAction,exports.isArrayLike=isArrayLike,exports.isBoxedObservable=isObservableValue,exports.isComputed=isComputed,exports.isComputedProp=isComputedProp,exports.isFlowCancellationError=isFlowCancellationError,exports.isObservable=isObservable,exports.isObservableArray=isObservableArray,exports.isObservableMap=isObservableMap,exports.isObservableObject=isObservableObject,exports.isObservableProp=isObservableProp,exports.isObservableSet=isObservableSet,exports.keys=keys,exports.observable=observable,exports.observe=observe,exports.onBecomeObserved=onBecomeObserved,exports.onBecomeUnobserved=onBecomeUnobserved,exports.onReactionError=onReactionError,exports.reaction=reaction,exports.remove=remove,exports.runInAction=runInAction,exports.set=set,exports.spy=spy,exports.toJS=toJS,exports.trace=trace,exports.transaction=transaction,exports.untracked=untracked,exports.values=values,exports.when=when;
|
package/lib/mobx.module.js
CHANGED
|
@@ -1148,8 +1148,7 @@ var ComputedValue = /** @class */ (function () {
|
|
|
1148
1148
|
this.isComputing = false; // to check for cycles
|
|
1149
1149
|
this.isRunningSetter = false;
|
|
1150
1150
|
this.isTracing = TraceMode.NONE;
|
|
1151
|
-
|
|
1152
|
-
throw "[mobx] missing option for computed: get";
|
|
1151
|
+
invariant(options.get, "missing option for computed: get");
|
|
1153
1152
|
this.derivation = options.get;
|
|
1154
1153
|
this.name = options.name || "ComputedValue@" + getNextId();
|
|
1155
1154
|
if (options.set)
|
|
@@ -2317,8 +2316,6 @@ function extendObservableObjectWithProperties(target, properties, decorators, de
|
|
|
2317
2316
|
if (process.env.NODE_ENV !== "production") {
|
|
2318
2317
|
if (!isPlainObject(properties))
|
|
2319
2318
|
fail("'extendObservabe' only accepts plain objects as second argument");
|
|
2320
|
-
if (Object.getOwnPropertyDescriptor(target, key))
|
|
2321
|
-
fail("'extendObservable' can only be used to introduce new properties. Use 'set' or 'decorate' instead. The property '" + stringifyKey(key) + "' already exists on '" + target + "'");
|
|
2322
2319
|
if (isComputed(descriptor.value))
|
|
2323
2320
|
fail("Passing a 'computed' as initial property value is no longer supported by extendObservable. Use a getter or decorator instead");
|
|
2324
2321
|
}
|
|
@@ -4363,9 +4360,6 @@ function eq(a, b, depth, aStack, bStack) {
|
|
|
4363
4360
|
var type = typeof a;
|
|
4364
4361
|
if (type !== "function" && type !== "object" && typeof b != "object")
|
|
4365
4362
|
return false;
|
|
4366
|
-
// Unwrap any wrapped objects.
|
|
4367
|
-
a = unwrap(a);
|
|
4368
|
-
b = unwrap(b);
|
|
4369
4363
|
// Compare `[[Class]]` names.
|
|
4370
4364
|
var className = toString.call(a);
|
|
4371
4365
|
if (className !== toString.call(b))
|
|
@@ -4393,7 +4387,18 @@ function eq(a, b, depth, aStack, bStack) {
|
|
|
4393
4387
|
return +a === +b;
|
|
4394
4388
|
case "[object Symbol]":
|
|
4395
4389
|
return (typeof Symbol !== "undefined" && Symbol.valueOf.call(a) === Symbol.valueOf.call(b));
|
|
4390
|
+
case "[object Map]":
|
|
4391
|
+
case "[object Set]":
|
|
4392
|
+
// Maps and Sets are unwrapped to arrays of entry-pairs, adding an incidental level.
|
|
4393
|
+
// Hide this extra level by increasing the depth.
|
|
4394
|
+
if (depth >= 0) {
|
|
4395
|
+
depth++;
|
|
4396
|
+
}
|
|
4397
|
+
break;
|
|
4396
4398
|
}
|
|
4399
|
+
// Unwrap any wrapped objects.
|
|
4400
|
+
a = unwrap(a);
|
|
4401
|
+
b = unwrap(b);
|
|
4397
4402
|
var areArrays = className === "[object Array]";
|
|
4398
4403
|
if (!areArrays) {
|
|
4399
4404
|
if (typeof a != "object" || typeof b != "object")
|
package/lib/mobx.umd.js
CHANGED
|
@@ -1153,8 +1153,7 @@
|
|
|
1153
1153
|
this.isComputing = false; // to check for cycles
|
|
1154
1154
|
this.isRunningSetter = false;
|
|
1155
1155
|
this.isTracing = TraceMode.NONE;
|
|
1156
|
-
|
|
1157
|
-
throw "[mobx] missing option for computed: get";
|
|
1156
|
+
invariant(options.get, "missing option for computed: get");
|
|
1158
1157
|
this.derivation = options.get;
|
|
1159
1158
|
this.name = options.name || "ComputedValue@" + getNextId();
|
|
1160
1159
|
if (options.set)
|
|
@@ -2322,8 +2321,6 @@
|
|
|
2322
2321
|
if (process.env.NODE_ENV !== "production") {
|
|
2323
2322
|
if (!isPlainObject(properties))
|
|
2324
2323
|
fail("'extendObservabe' only accepts plain objects as second argument");
|
|
2325
|
-
if (Object.getOwnPropertyDescriptor(target, key))
|
|
2326
|
-
fail("'extendObservable' can only be used to introduce new properties. Use 'set' or 'decorate' instead. The property '" + stringifyKey(key) + "' already exists on '" + target + "'");
|
|
2327
2324
|
if (isComputed(descriptor.value))
|
|
2328
2325
|
fail("Passing a 'computed' as initial property value is no longer supported by extendObservable. Use a getter or decorator instead");
|
|
2329
2326
|
}
|
|
@@ -4368,9 +4365,6 @@
|
|
|
4368
4365
|
var type = typeof a;
|
|
4369
4366
|
if (type !== "function" && type !== "object" && typeof b != "object")
|
|
4370
4367
|
return false;
|
|
4371
|
-
// Unwrap any wrapped objects.
|
|
4372
|
-
a = unwrap(a);
|
|
4373
|
-
b = unwrap(b);
|
|
4374
4368
|
// Compare `[[Class]]` names.
|
|
4375
4369
|
var className = toString.call(a);
|
|
4376
4370
|
if (className !== toString.call(b))
|
|
@@ -4398,7 +4392,18 @@
|
|
|
4398
4392
|
return +a === +b;
|
|
4399
4393
|
case "[object Symbol]":
|
|
4400
4394
|
return (typeof Symbol !== "undefined" && Symbol.valueOf.call(a) === Symbol.valueOf.call(b));
|
|
4395
|
+
case "[object Map]":
|
|
4396
|
+
case "[object Set]":
|
|
4397
|
+
// Maps and Sets are unwrapped to arrays of entry-pairs, adding an incidental level.
|
|
4398
|
+
// Hide this extra level by increasing the depth.
|
|
4399
|
+
if (depth >= 0) {
|
|
4400
|
+
depth++;
|
|
4401
|
+
}
|
|
4402
|
+
break;
|
|
4401
4403
|
}
|
|
4404
|
+
// Unwrap any wrapped objects.
|
|
4405
|
+
a = unwrap(a);
|
|
4406
|
+
b = unwrap(b);
|
|
4402
4407
|
var areArrays = className === "[object Array]";
|
|
4403
4408
|
if (!areArrays) {
|
|
4404
4409
|
if (typeof a != "object" || typeof b != "object")
|
package/lib/mobx.umd.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).mobx={})}(this,function(e){"use strict";var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,n)};var n=function(){return(n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function r(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function i(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function o(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(i(arguments[t]));return e}var a="An invariant failed, however the error is obfuscated because this is a production build.",s=[];Object.freeze(s);var u={};function c(){return++je.mobxGuid}function l(e){throw f(!1,e),"X"}function f(e,t){if(!e)throw new Error("[mobx] "+(t||a))}Object.freeze(u);function h(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var p=function(){};function d(e){return null!==e&&"object"==typeof e}function v(e){if(null===e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}function y(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function b(e,t){var n="isMobX"+e;return t.prototype[n]=!0,function(e){return d(e)&&!0===e[n]}}function g(e){return e instanceof Map}function m(e){return e instanceof Set}function w(e){var t=new Set;for(var n in e)t.add(n);return Object.getOwnPropertySymbols(e).forEach(function(n){Object.getOwnPropertyDescriptor(e,n).enumerable&&t.add(n)}),Array.from(t)}function O(e){return e&&e.toString?e.toString():new String(e).toString()}function S(e){return null===e?null:"object"==typeof e?""+e:e}var A=Symbol("mobx administration"),_=function(){function t(t){void 0===t&&(t="Atom@"+c()),this.name=t,this.isPendingUnobservation=!1,this.isBeingObserved=!1,this.observers=new Set,this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=e.IDerivationState.NOT_TRACKING}return t.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach(function(e){return e()})},t.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach(function(e){return e()})},t.prototype.reportObserved=function(){return Ne(this)},t.prototype.reportChanged=function(){Ie(),function(t){if(t.lowestObserverState===e.IDerivationState.STALE)return;t.lowestObserverState=e.IDerivationState.STALE,t.observers.forEach(function(n){n.dependenciesState===e.IDerivationState.UP_TO_DATE&&(n.isTracing!==X.NONE&&Ve(n,t),n.onBecomeStale()),n.dependenciesState=e.IDerivationState.STALE})}(this),Pe()},t.prototype.toString=function(){return this.name},t}(),E=b("Atom",_);function x(e,t,n){void 0===t&&(t=p),void 0===n&&(n=p);var r=new _(e);return t!==p&&Qe(r,t),n!==p&&Ze(r,n),r}var D={identity:function(e,t){return e===t},structural:function(e,t){return en(e,t)},default:function(e,t){return Object.is(e,t)},shallow:function(e,t){return en(e,t,1)}},j=Symbol("mobx did run lazy initializers"),C=Symbol("mobx pending decorators"),R={},T={};function I(e){var t,n;if(!0!==e[j]){var i=e[C];if(i){y(e,j,!0);var a=o(Object.getOwnPropertySymbols(i),Object.keys(i));try{for(var s=r(a),u=s.next();!u.done;u=s.next()){var c=i[u.value];c.propertyCreator(e,c.prop,c.descriptor,c.decoratorTarget,c.decoratorArguments)}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}}}}function P(e,t){return function(){var r,i,o=function(i,o,a,s){if(!0===s)return t(i,o,a,i,r),null;if(!Object.prototype.hasOwnProperty.call(i,C)){var u=i[C];y(i,C,n({},u))}return i[C][o]={prop:o,propertyCreator:t,descriptor:a,decoratorTarget:i,decoratorArguments:r},function(e,t){var n=t?R:T;return n[e]||(n[e]={configurable:!0,enumerable:t,get:function(){return I(this),this[e]},set:function(t){I(this),this[e]=t}})}(o,e)};return(2===(i=arguments).length||3===i.length)&&("string"==typeof i[1]||"symbol"==typeof i[1])||4===i.length&&!0===i[3]?(r=s,o.apply(null,arguments)):(r=Array.prototype.slice.call(arguments),o)}}function N(e,t,n){return ht(e)?e:Array.isArray(e)?H.array(e,{name:n}):v(e)?H.object(e,void 0,{name:n}):g(e)?H.map(e,{name:n}):m(e)?H.set(e,{name:n}):e}function V(e){return e}function k(e){f(e);var t=P(!0,function(t,n,r,i,o){var a=r?r.initializer?r.initializer.call(t):r.value:void 0;zt(t).addObservableProp(n,a,e)}),n=("undefined"!=typeof process&&process.env,t);return n.enhancer=e,n}var B={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function L(e){return null==e?B:"string"==typeof e?{name:e,deep:!0,proxy:!0}:e}Object.freeze(B);var M=k(N),U=k(function(e,t,n){return null==e?e:Yt(e)||Vt(e)||Mt(e)||qt(e)?e:Array.isArray(e)?H.array(e,{name:n,deep:!1}):v(e)?H.object(e,void 0,{name:n,deep:!1}):g(e)?H.map(e,{name:n,deep:!1}):m(e)?H.set(e,{name:n,deep:!1}):l(!1)}),G=k(V),q=k(function(e,t,n){return en(e,t)?t:e});function K(e){return e.defaultDecorator?e.defaultDecorator.enhancer:!1===e.deep?V:N}var z={box:function(e,t){arguments.length>2&&W("box");var n=L(t);return new ge(e,K(n),n.name,!0,n.equals)},array:function(e,t){arguments.length>2&&W("array");var n=L(t);return function(e,t,n,r){void 0===n&&(n="ObservableArray@"+c());void 0===r&&(r=!1);var i=new Tt(n,t,r);o=i.values,a=A,s=i,Object.defineProperty(o,a,{enumerable:!1,writable:!1,configurable:!0,value:s});var o,a,s;var u=new Proxy(i.values,Rt);if(i.proxy=u,e&&e.length){var l=ye(!0);i.spliceWithArray(0,0,e),be(l)}return u}(e,K(n),n.name)},map:function(e,t){arguments.length>2&&W("map");var n=L(t);return new Lt(e,K(n),n.name)},set:function(e,t){arguments.length>2&&W("set");var n=L(t);return new Gt(e,K(n),n.name)},object:function(e,t,n){"string"==typeof arguments[1]&&W("object");var r=L(n);if(!1===r.proxy)return tt({},e,t,r);var i=nt(r),o=function(e){var t=new Proxy(e,At);return e[A].proxy=t,t}(tt({},void 0,void 0,r));return rt(o,e,t,i),o},ref:G,shallow:U,deep:M,struct:q},H=function(e,t,n){if("string"==typeof arguments[1]||"symbol"==typeof arguments[1])return M.apply(null,arguments);if(ht(e))return e;var r=v(e)?H.object(e,t,n):Array.isArray(e)?H.array(e,t):g(e)?H.map(e,t):m(e)?H.set(e,t):e;if(r!==e)return r;l(!1)};function W(e){l("Expected one or two arguments to observable."+e+". Did you accidentally try to use observable."+e+" as decorator?")}Object.keys(z).forEach(function(e){return H[e]=z[e]});var J,X,Y=P(!1,function(e,t,r,i,o){var a=r.get,s=r.set,u=o[0]||{};zt(e).addComputedProp(e,t,n({get:a,set:s,context:e},u))}),F=Y({equals:D.structural}),$=function(e,t,n){if("string"==typeof t)return Y.apply(null,arguments);if(null!==e&&"object"==typeof e&&1===arguments.length)return Y.apply(null,arguments);var r="object"==typeof t?t:{};return r.get=e,r.set="function"==typeof t?t:r.set,r.name=r.name||e.name||"",new we(r)};$.struct=F,(J=e.IDerivationState||(e.IDerivationState={}))[J.NOT_TRACKING=-1]="NOT_TRACKING",J[J.UP_TO_DATE=0]="UP_TO_DATE",J[J.POSSIBLY_STALE=1]="POSSIBLY_STALE",J[J.STALE=2]="STALE",function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"}(X||(X={}));var Q=function(){return function(e){this.cause=e}}();function Z(e){return e instanceof Q}function ee(t){switch(t.dependenciesState){case e.IDerivationState.UP_TO_DATE:return!1;case e.IDerivationState.NOT_TRACKING:case e.IDerivationState.STALE:return!0;case e.IDerivationState.POSSIBLY_STALE:for(var n=se(!0),r=oe(),i=t.observing,o=i.length,a=0;a<o;a++){var s=i[a];if(Oe(s)){if(je.disableErrorBoundaries)s.get();else try{s.get()}catch(e){return ae(r),ue(n),!0}if(t.dependenciesState===e.IDerivationState.STALE)return ae(r),ue(n),!0}}return ce(t),ae(r),ue(n),!1}}function te(e){var t=e.observers.size>0;je.computationDepth>0&&t&&l(!1),je.allowStateChanges||!t&&"strict"!==je.enforceActions||l(!1)}function ne(t,n,r){var i=se(!0);ce(t),t.newObserving=new Array(t.observing.length+100),t.unboundDepsCount=0,t.runId=++je.runId;var o,a=je.trackingDerivation;if(je.trackingDerivation=t,!0===je.disableErrorBoundaries)o=n.call(r);else try{o=n.call(r)}catch(e){o=new Q(e)}return je.trackingDerivation=a,function(t){for(var n=t.observing,r=t.observing=t.newObserving,i=e.IDerivationState.UP_TO_DATE,o=0,a=t.unboundDepsCount,s=0;s<a;s++){var u=r[s];0===u.diffValue&&(u.diffValue=1,o!==s&&(r[o]=u),o++),u.dependenciesState>i&&(i=u.dependenciesState)}r.length=o,t.newObserving=null,a=n.length;for(;a--;){var u=n[a];0===u.diffValue&&Re(u,t),u.diffValue=0}for(;o--;){var u=r[o];1===u.diffValue&&(u.diffValue=0,Ce(u,t))}i!==e.IDerivationState.UP_TO_DATE&&(t.dependenciesState=i,t.onBecomeStale())}(t),ue(i),o}function re(t){var n=t.observing;t.observing=[];for(var r=n.length;r--;)Re(n[r],t);t.dependenciesState=e.IDerivationState.NOT_TRACKING}function ie(e){var t=oe();try{return e()}finally{ae(t)}}function oe(){var e=je.trackingDerivation;return je.trackingDerivation=null,e}function ae(e){je.trackingDerivation=e}function se(e){var t=je.allowStateReads;return je.allowStateReads=e,t}function ue(e){je.allowStateReads=e}function ce(t){if(t.dependenciesState!==e.IDerivationState.UP_TO_DATE){t.dependenciesState=e.IDerivationState.UP_TO_DATE;for(var n=t.observing,r=n.length;r--;)n[r].lowestObserverState=e.IDerivationState.UP_TO_DATE}}var le=0,fe=1;function he(e,t,n){var r=function(){return pe(e,t,n||this,arguments)};return r.isMobxAction=!0,r}function pe(e,t,n,r){var i=de(e,n,r);try{return t.apply(n,r)}catch(e){throw i.error=e,e}finally{ve(i)}}function de(e,t,n){var r=Ke(),i=oe();Ie();var o={prevDerivation:i,prevAllowStateChanges:ye(!0),prevAllowStateReads:se(!0),notifySpy:r,startTime:0,actionId:fe++,parentActionId:le};return le=o.actionId,o}function ve(e){le!==e.actionId&&l("invalid action stack. did you forget to finish an action?"),le=e.parentActionId,void 0!==e.error&&(je.suppressReactionErrors=!0),be(e.prevAllowStateChanges),ue(e.prevAllowStateReads),Pe(),ae(e.prevDerivation),e.notifySpy,je.suppressReactionErrors=!1}function ye(e){var t=je.allowStateChanges;return je.allowStateChanges=e,t}function be(e){je.allowStateChanges=e}var ge=function(e){function n(t,n,r,i,o){void 0===r&&(r="ObservableValue@"+c()),void 0===i&&(i=!0),void 0===o&&(o=D.default);var a=e.call(this,r)||this;return a.enhancer=n,a.name=r,a.equals=o,a.hasUnreportedChange=!1,a.value=n(t,void 0,r),i&&Ke(),a}return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}(n,e),n.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},n.prototype.set=function(e){this.value;if((e=this.prepareNewValue(e))!==je.UNCHANGED){Ke();0,this.setNewValue(e)}},n.prototype.prepareNewValue=function(e){if(te(this),_t(this)){var t=xt(this,{object:this,type:"update",newValue:e});if(!t)return je.UNCHANGED;e=t.newValue}return e=this.enhancer(e,this.value,this.name),this.equals(this.value,e)?je.UNCHANGED:e},n.prototype.setNewValue=function(e){var t=this.value;this.value=e,this.reportChanged(),Dt(this)&&Ct(this,{type:"update",object:this,newValue:e,oldValue:t})},n.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},n.prototype.intercept=function(e){return Et(this,e)},n.prototype.observe=function(e,t){return t&&e({object:this,type:"update",newValue:this.value,oldValue:void 0}),jt(this,e)},n.prototype.toJSON=function(){return this.get()},n.prototype.toString=function(){return this.name+"["+this.value+"]"},n.prototype.valueOf=function(){return S(this.get())},n.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},n}(_),me=b("ObservableValue",ge),we=function(){function t(t){this.dependenciesState=e.IDerivationState.NOT_TRACKING,this.observing=[],this.newObserving=null,this.isBeingObserved=!1,this.isPendingUnobservation=!1,this.observers=new Set,this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.lowestObserverState=e.IDerivationState.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+c(),this.value=new Q(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=X.NONE,this.derivation=t.get,this.name=t.name||"ComputedValue@"+c(),t.set&&(this.setter=he(this.name+"-setter",t.set)),this.equals=t.equals||(t.compareStructural||t.struct?D.structural:D.default),this.scope=t.context,this.requiresReaction=!!t.requiresReaction,this.keepAlive=!!t.keepAlive}return t.prototype.onBecomeStale=function(){!function(t){if(t.lowestObserverState!==e.IDerivationState.UP_TO_DATE)return;t.lowestObserverState=e.IDerivationState.POSSIBLY_STALE,t.observers.forEach(function(n){n.dependenciesState===e.IDerivationState.UP_TO_DATE&&(n.dependenciesState=e.IDerivationState.POSSIBLY_STALE,n.isTracing!==X.NONE&&Ve(n,t),n.onBecomeStale())})}(this)},t.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach(function(e){return e()})},t.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach(function(e){return e()})},t.prototype.get=function(){this.isComputing&&l("Cycle detected in computation "+this.name+": "+this.derivation),0!==je.inBatch||0!==this.observers.size||this.keepAlive?(Ne(this),ee(this)&&this.trackAndCompute()&&function(t){if(t.lowestObserverState===e.IDerivationState.STALE)return;t.lowestObserverState=e.IDerivationState.STALE,t.observers.forEach(function(n){n.dependenciesState===e.IDerivationState.POSSIBLY_STALE?n.dependenciesState=e.IDerivationState.STALE:n.dependenciesState===e.IDerivationState.UP_TO_DATE&&(t.lowestObserverState=e.IDerivationState.UP_TO_DATE)})}(this)):ee(this)&&(this.warnAboutUntrackedRead(),Ie(),this.value=this.computeValue(!1),Pe());var t=this.value;if(Z(t))throw t.cause;return t},t.prototype.peek=function(){var e=this.computeValue(!1);if(Z(e))throw e.cause;return e},t.prototype.set=function(e){if(this.setter){f(!this.isRunningSetter,"The setter of computed value '"+this.name+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"),this.isRunningSetter=!0;try{this.setter.call(this.scope,e)}finally{this.isRunningSetter=!1}}else f(!1,!1)},t.prototype.trackAndCompute=function(){var t=this.value,n=this.dependenciesState===e.IDerivationState.NOT_TRACKING,r=this.computeValue(!0),i=n||Z(t)||Z(r)||!this.equals(t,r);return i&&(this.value=r),i},t.prototype.computeValue=function(e){var t;if(this.isComputing=!0,je.computationDepth++,e)t=ne(this,this.derivation,this.scope);else if(!0===je.disableErrorBoundaries)t=this.derivation.call(this.scope);else try{t=this.derivation.call(this.scope)}catch(e){t=new Q(e)}return je.computationDepth--,this.isComputing=!1,t},t.prototype.suspend=function(){this.keepAlive||(re(this),this.value=void 0)},t.prototype.observe=function(e,t){var n=this,r=!0,i=void 0;return Ye(function(){var o=n.get();if(!r||t){var a=oe();e({type:"update",object:n,newValue:o,oldValue:i}),ae(a)}r=!1,i=o})},t.prototype.warnAboutUntrackedRead=function(){},t.prototype.toJSON=function(){return this.get()},t.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},t.prototype.valueOf=function(){return S(this.get())},t.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},t}(),Oe=b("ComputedValue",we),Se=["mobxGuid","spyListeners","enforceActions","computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","allowStateReads","disableErrorBoundaries","runId","UNCHANGED"],Ae=function(){return function(){this.version=5,this.UNCHANGED={},this.trackingDerivation=null,this.computationDepth=0,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!0,this.allowStateReads=!0,this.enforceActions=!1,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.computedConfigurable=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1}}(),_e={};function Ee(){return"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:_e}var xe=!0,De=!1,je=function(){var e=Ee();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(xe=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==(new Ae).version&&(xe=!1),xe?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new Ae):(setTimeout(function(){De||l("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")},1),new Ae)}();function Ce(e,t){e.observers.add(t),e.lowestObserverState>t.dependenciesState&&(e.lowestObserverState=t.dependenciesState)}function Re(e,t){e.observers.delete(t),0===e.observers.size&&Te(e)}function Te(e){!1===e.isPendingUnobservation&&(e.isPendingUnobservation=!0,je.pendingUnobservations.push(e))}function Ie(){je.inBatch++}function Pe(){if(0==--je.inBatch){Me();for(var e=je.pendingUnobservations,t=0;t<e.length;t++){var n=e[t];n.isPendingUnobservation=!1,0===n.observers.size&&(n.isBeingObserved&&(n.isBeingObserved=!1,n.onBecomeUnobserved()),n instanceof we&&n.suspend())}je.pendingUnobservations=[]}}function Ne(e){var t=je.trackingDerivation;return null!==t?(t.runId!==e.lastAccessedBy&&(e.lastAccessedBy=t.runId,t.newObserving[t.unboundDepsCount++]=e,e.isBeingObserved||(e.isBeingObserved=!0,e.onBecomeObserved())),!0):(0===e.observers.size&&je.inBatch>0&&Te(e),!1)}function Ve(e,t){if(console.log("[mobx.trace] '"+e.name+"' is invalidated due to a change in: '"+t.name+"'"),e.isTracing===X.BREAK){var n=[];!function e(t,n,r){if(n.length>=1e3)return void n.push("(and many more)");n.push(""+new Array(r).join("\t")+t.name);t.dependencies&&t.dependencies.forEach(function(t){return e(t,n,r+1)})}(it(e),n,1),new Function("debugger;\n/*\nTracing '"+e.name+"'\n\nYou are entering this break point because derivation '"+e.name+"' is being traced and '"+t.name+"' is now forcing it to update.\nJust follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update\nThe stackframe you are looking for is at least ~6-8 stack-frames up.\n\n"+(e instanceof we?e.derivation.toString().replace(/[*]\//g,"/"):"")+"\n\nThe dependencies for this derivation are:\n\n"+n.join("\n")+"\n*/\n ")()}}var ke=function(){function t(t,n,r,i){void 0===t&&(t="Reaction@"+c()),void 0===i&&(i=!1),this.name=t,this.onInvalidate=n,this.errorHandler=r,this.requiresObservable=i,this.observing=[],this.newObserving=[],this.dependenciesState=e.IDerivationState.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+c(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=X.NONE}return t.prototype.onBecomeStale=function(){this.schedule()},t.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,je.pendingReactions.push(this),Me())},t.prototype.isScheduled=function(){return this._isScheduled},t.prototype.runReaction=function(){if(!this.isDisposed){if(Ie(),this._isScheduled=!1,ee(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending&&Ke()}catch(e){this.reportExceptionInDerivation(e)}}Pe()}},t.prototype.track=function(e){if(!this.isDisposed){Ie(),this._isRunning=!0;var t=ne(this,e,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&re(this),Z(t)&&this.reportExceptionInDerivation(t.cause),Pe()}},t.prototype.reportExceptionInDerivation=function(e){var t=this;if(this.errorHandler)this.errorHandler(e,this);else{if(je.disableErrorBoundaries)throw e;var n="[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this+"'";je.suppressReactionErrors?console.warn("[mobx] (error in reaction '"+this.name+"' suppressed, fix error of causing action below)"):console.error(n,e),je.globalReactionErrorHandlers.forEach(function(n){return n(e,t)})}},t.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(Ie(),re(this),Pe()))},t.prototype.getDisposer=function(){var e=this.dispose.bind(this);return e[A]=this,e},t.prototype.toString=function(){return"Reaction["+this.name+"]"},t.prototype.trace=function(e){void 0===e&&(e=!1),gt(this,e)},t}();var Be=100,Le=function(e){return e()};function Me(){je.inBatch>0||je.isRunningReactions||Le(Ue)}function Ue(){je.isRunningReactions=!0;for(var e=je.pendingReactions,t=0;e.length>0;){++t===Be&&(console.error("Reaction doesn't converge to a stable state after "+Be+" iterations. Probably there is a cycle in the reactive function: "+e[0]),e.splice(0));for(var n=e.splice(0),r=0,i=n.length;r<i;r++)n[r].runReaction()}je.isRunningReactions=!1}var Ge=b("Reaction",ke);function qe(e){var t=Le;Le=function(n){return e(function(){return t(n)})}}function Ke(){return!1}function ze(e){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}function He(){l(!1)}function We(e){return function(t,n,r){if(r){if(r.value)return{value:he(e,r.value),enumerable:!1,configurable:!0,writable:!0};var i=r.initializer;return{enumerable:!1,configurable:!0,writable:!0,initializer:function(){return he(e,i.call(this))}}}return function(e){return function(t,n,r){Object.defineProperty(t,n,{configurable:!0,enumerable:!1,get:function(){},set:function(t){y(this,n,Je(e,t))}})}}(e).apply(this,arguments)}}var Je=function(e,t,n,r){return 1===arguments.length&&"function"==typeof e?he(e.name||"<unnamed action>",e):2===arguments.length&&"function"==typeof t?he(e,t):1===arguments.length&&"string"==typeof e?We(e):!0!==r?We(t).apply(null,arguments):void y(e,t,he(e.name||t,n.value,this))};function Xe(e,t,n){y(e,t,he(t,n.bind(e)))}function Ye(e,t){void 0===t&&(t=u);var n,r=t&&t.name||e.name||"Autorun@"+c();if(!t.scheduler&&!t.delay)n=new ke(r,function(){this.track(a)},t.onError,t.requiresObservable);else{var i=$e(t),o=!1;n=new ke(r,function(){o||(o=!0,i(function(){o=!1,n.isDisposed||n.track(a)}))},t.onError,t.requiresObservable)}function a(){e(n)}return n.schedule(),n.getDisposer()}Je.bound=function(e,t,n,r){return!0===r?(Xe(e,t,n.value),null):n?{configurable:!0,enumerable:!1,get:function(){return Xe(this,t,n.value||n.initializer.call(this)),this[t]},set:He}:{enumerable:!1,configurable:!0,set:function(e){Xe(this,t,e)},get:function(){}}};var Fe=function(e){return e()};function $e(e){return e.scheduler?e.scheduler:e.delay?function(t){return setTimeout(t,e.delay)}:Fe}function Qe(e,t,n){return et("onBecomeObserved",e,t,n)}function Ze(e,t,n){return et("onBecomeUnobserved",e,t,n)}function et(e,t,n,r){var i="function"==typeof r?Ft(t,n):Ft(t),o="function"==typeof r?r:n,a=e+"Listeners";return i[a]?i[a].add(o):i[a]=new Set([o]),"function"!=typeof i[e]?l(!1):function(){var e=i[a];e&&(e.delete(o),0===e.size&&delete i[a])}}function tt(e,t,n,r){var i=nt(r=L(r));return I(e),zt(e,r.name,i.enhancer),t&&rt(e,t,n,i),e}function nt(e){return e.defaultDecorator||(!1===e.deep?G:M)}function rt(e,t,n,i){var o,a;Ie();try{var s=w(t);try{for(var u=r(s),c=u.next();!c.done;c=u.next()){var l=c.value,f=Object.getOwnPropertyDescriptor(t,l),h=(n&&l in n?n[l]:f.get?Y:i)(e,l,f,!0);h&&Object.defineProperty(e,l,h)}}catch(e){o={error:e}}finally{try{c&&!c.done&&(a=u.return)&&a.call(u)}finally{if(o)throw o.error}}}finally{Pe()}}function it(e,t){return ot(Ft(e,t))}function ot(e){var t,n,r={name:e.name};return e.observing&&e.observing.length>0&&(r.dependencies=(t=e.observing,n=[],t.forEach(function(e){-1===n.indexOf(e)&&n.push(e)}),n).map(ot)),r}function at(e){var t,n={name:e.name};return(t=e).observers&&t.observers.size>0&&(n.observers=Array.from(function(e){return e.observers}(e)).map(at)),n}var st=0;function ut(){this.message="FLOW_CANCELLED"}function ct(e){"function"==typeof e.cancel&&e.cancel()}function lt(e,t){if(null==e)return!1;if(void 0!==t){if(!1===Yt(e))return!1;if(!e[A].values.has(t))return!1;var n=Ft(e,t);return Oe(n)}return Oe(e)}function ft(e,t){return null!=e&&(void 0!==t?!!Yt(e)&&e[A].values.has(t):Yt(e)||!!e[A]||E(e)||Ge(e)||Oe(e))}function ht(e){return 1!==arguments.length&&l(!1),ft(e)}function pt(e){return Yt(e)?e[A].getKeys():Mt(e)?Array.from(e.keys()):qt(e)?Array.from(e.keys()):Vt(e)?e.map(function(e,t){return t}):l(!1)}function dt(e,t,n){if(2!==arguments.length||qt(e))if(Yt(e)){var r=e[A];r.values.get(t)?r.write(t,n):r.addObservableProp(t,n,r.defaultEnhancer)}else if(Mt(e))e.set(t,n);else if(qt(e))e.add(t);else{if(!Vt(e))return l(!1);"number"!=typeof t&&(t=parseInt(t,10)),f(t>=0,"Not a valid index: '"+t+"'"),Ie(),t>=e.length&&(e.length=t+1),e[t]=n,Pe()}else{Ie();var i=t;try{for(var o in i)dt(e,o,i[o])}finally{Pe()}}}function vt(e,t){return Yt(e)?$t(e).has(t):Mt(e)?e.has(t):qt(e)?e.has(t):Vt(e)?t>=0&&t<e.length:l(!1)}ut.prototype=Object.create(Error.prototype);var yt={detectCycles:!0,exportMapsAsObjects:!0,recurseEverything:!1};function bt(e,t,n,r){return r.detectCycles&&e.set(t,n),n}function gt(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=!1;"boolean"==typeof e[e.length-1]&&(n=e.pop());var r=function(e){switch(e.length){case 0:return je.trackingDerivation;case 1:return Ft(e[0]);case 2:return Ft(e[0],e[1])}}(e);if(!r)return l(!1);r.isTracing===X.NONE&&console.log("[mobx.trace] '"+r.name+"' tracing enabled"),r.isTracing=n?X.BREAK:X.LOG}function mt(e,t){void 0===t&&(t=void 0),Ie();try{return e.apply(t)}finally{Pe()}}function wt(e,t,n){var r;"number"==typeof n.timeout&&(r=setTimeout(function(){if(!o[A].isDisposed){o();var e=new Error("WHEN_TIMEOUT");if(!n.onError)throw e;n.onError(e)}},n.timeout)),n.name=n.name||"When@"+c();var i=he(n.name+"-effect",t),o=Ye(function(t){e()&&(t.dispose(),r&&clearTimeout(r),i())},n);return o}function Ot(e){return e[A]}function St(e){return"string"==typeof e||"number"==typeof e||"symbol"==typeof e}var At={has:function(e,t){if(t===A||"constructor"===t||t===j)return!0;var n=Ot(e);return St(t)?n.has(t):t in e},get:function(e,t){if(t===A||"constructor"===t||t===j)return e[t];var n=Ot(e),r=n.values.get(t);if(r instanceof _){var i=r.get();return void 0===i&&n.has(t),i}return St(t)&&n.has(t),e[t]},set:function(e,t,n){return!!St(t)&&(dt(e,t,n),!0)},deleteProperty:function(e,t){return!!St(t)&&(Ot(e).remove(t),!0)},ownKeys:function(e){return Ot(e).keysAtom.reportObserved(),Reflect.ownKeys(e)},preventExtensions:function(e){return l("Dynamic observable objects cannot be frozen"),!1}};function _t(e){return void 0!==e.interceptors&&e.interceptors.length>0}function Et(e,t){var n=e.interceptors||(e.interceptors=[]);return n.push(t),h(function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function xt(e,t){var n=oe();try{for(var r=o(e.interceptors||[]),i=0,a=r.length;i<a&&(f(!(t=r[i](t))||t.type,"Intercept handlers should return nothing or a change object"),t);i++);return t}finally{ae(n)}}function Dt(e){return void 0!==e.changeListeners&&e.changeListeners.length>0}function jt(e,t){var n=e.changeListeners||(e.changeListeners=[]);return n.push(t),h(function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function Ct(e,t){var n=oe(),r=e.changeListeners;if(r){for(var i=0,o=(r=r.slice()).length;i<o;i++)r[i](t);ae(n)}}var Rt={get:function(e,t){return t===A?e[A]:"length"===t?e[A].getArrayLength():"number"==typeof t?It.get.call(e,t):"string"!=typeof t||isNaN(t)?It.hasOwnProperty(t)?It[t]:e[t]:It.get.call(e,parseInt(t))},set:function(e,t,n){return"length"===t&&e[A].setArrayLength(n),"number"==typeof t&&It.set.call(e,t,n),"symbol"==typeof t||isNaN(t)?e[t]=n:It.set.call(e,parseInt(t),n),!0},preventExtensions:function(e){return l("Observable arrays cannot be frozen"),!1}};var Tt=function(){function e(e,t,n){this.owned=n,this.values=[],this.proxy=void 0,this.lastKnownLength=0,this.atom=new _(e||"ObservableArray@"+c()),this.enhancer=function(n,r){return t(n,r,e+"[..]")}}return e.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},e.prototype.dehanceValues=function(e){return void 0!==this.dehancer&&e.length>0?e.map(this.dehancer):e},e.prototype.intercept=function(e){return Et(this,e)},e.prototype.observe=function(e,t){return void 0===t&&(t=!1),t&&e({object:this.proxy,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),jt(this,e)},e.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},e.prototype.setArrayLength=function(e){if("number"!=typeof e||e<0)throw new Error("[mobx.array] Out of range: "+e);var t=this.values.length;if(e!==t)if(e>t){for(var n=new Array(e-t),r=0;r<e-t;r++)n[r]=void 0;this.spliceWithArray(t,0,n)}else this.spliceWithArray(e,t-e)},e.prototype.updateArrayLength=function(e,t){if(e!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed.");this.lastKnownLength+=t},e.prototype.spliceWithArray=function(e,t,n){var r=this;te(this.atom);var i=this.values.length;if(void 0===e?e=0:e>i?e=i:e<0&&(e=Math.max(0,i+e)),t=1===arguments.length?i-e:null==t?0:Math.max(0,Math.min(t,i-e)),void 0===n&&(n=s),_t(this)){var o=xt(this,{object:this.proxy,type:"splice",index:e,removedCount:t,added:n});if(!o)return s;t=o.removedCount,n=o.added}n=0===n.length?n:n.map(function(e){return r.enhancer(e,void 0)});var a=this.spliceItemsIntoValues(e,t,n);return 0===t&&0===n.length||this.notifyArraySplice(e,n,a),this.dehanceValues(a)},e.prototype.spliceItemsIntoValues=function(e,t,n){var r;if(n.length<1e4)return(r=this.values).splice.apply(r,o([e,t],n));var i=this.values.slice(e,e+t);return this.values=this.values.slice(0,e).concat(n,this.values.slice(e+t)),i},e.prototype.notifyArrayChildUpdate=function(e,t,n){var r=!this.owned&&!1,i=Dt(this),o=i||r?{object:this.proxy,type:"update",index:e,newValue:t,oldValue:n}:null;this.atom.reportChanged(),i&&Ct(this,o)},e.prototype.notifyArraySplice=function(e,t,n){var r=!this.owned&&!1,i=Dt(this),o=i||r?{object:this.proxy,type:"splice",index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;this.atom.reportChanged(),i&&Ct(this,o)},e}(),It={intercept:function(e){return this[A].intercept(e)},observe:function(e,t){return void 0===t&&(t=!1),this[A].observe(e,t)},clear:function(){return this.splice(0)},replace:function(e){var t=this[A];return t.spliceWithArray(0,t.values.length,e)},toJS:function(){return this.slice()},toJSON:function(){return this.toJS()},splice:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=this[A];switch(arguments.length){case 0:return[];case 1:return i.spliceWithArray(e);case 2:return i.spliceWithArray(e,t)}return i.spliceWithArray(e,t,n)},spliceWithArray:function(e,t,n){return this[A].spliceWithArray(e,t,n)},push:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this[A];return n.spliceWithArray(n.values.length,0,e),n.values.length},pop:function(){return this.splice(Math.max(this[A].values.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this[A];return n.spliceWithArray(0,0,e),n.values.length},reverse:function(){var e=this.slice();return e.reverse.apply(e,arguments)},sort:function(e){var t=this.slice();return t.sort.apply(t,arguments)},remove:function(e){var t=this[A],n=t.dehanceValues(t.values).indexOf(e);return n>-1&&(this.splice(n,1),!0)},get:function(e){var t=this[A];if(t){if(e<t.values.length)return t.atom.reportObserved(),t.dehanceValue(t.values[e]);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")}},set:function(e,t){var n=this[A],r=n.values;if(e<r.length){te(n.atom);var i=r[e];if(_t(n)){var o=xt(n,{type:"update",object:n.proxy,index:e,newValue:t});if(!o)return;t=o.newValue}(t=n.enhancer(t,i))!==i&&(r[e]=t,n.notifyArrayChildUpdate(e,t,i))}else{if(e!==r.length)throw new Error("[mobx.array] Index out of bounds, "+e+" is larger than "+r.length);n.spliceWithArray(e,0,[t])}}};["concat","every","filter","forEach","indexOf","join","lastIndexOf","map","reduce","reduceRight","slice","some","toString","toLocaleString"].forEach(function(e){It[e]=function(){var t=this[A];t.atom.reportObserved();var n=t.dehanceValues(t.values);return n[e].apply(n,arguments)}});var Pt,Nt=b("ObservableArrayAdministration",Tt);function Vt(e){return d(e)&&Nt(e[A])}var kt,Bt={},Lt=function(){function e(e,t,n){if(void 0===t&&(t=N),void 0===n&&(n="ObservableMap@"+c()),this.enhancer=t,this.name=n,this[Pt]=Bt,this._keysAtom=x(this.name+".keys()"),this[Symbol.toStringTag]="Map","function"!=typeof Map)throw new Error("mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js");this._data=new Map,this._hasMap=new Map,this.merge(e)}return e.prototype._has=function(e){return this._data.has(e)},e.prototype.has=function(e){var t=this;if(!je.trackingDerivation)return this._has(e);var n=this._hasMap.get(e);if(!n){var r=n=new ge(this._has(e),V,this.name+"."+O(e)+"?",!1);this._hasMap.set(e,r),Ze(r,function(){return t._hasMap.delete(e)})}return n.get()},e.prototype.set=function(e,t){var n=this._has(e);if(_t(this)){var r=xt(this,{type:n?"update":"add",object:this,newValue:t,name:e});if(!r)return this;t=r.newValue}return n?this._updateValue(e,t):this._addValue(e,t),this},e.prototype.delete=function(e){var t=this;if(_t(this)&&!(r=xt(this,{type:"delete",object:this,name:e})))return!1;if(this._has(e)){var n=Dt(this),r=n?{type:"delete",object:this,oldValue:this._data.get(e).value,name:e}:null;return mt(function(){t._keysAtom.reportChanged(),t._updateHasMapEntry(e,!1),t._data.get(e).setNewValue(void 0),t._data.delete(e)}),n&&Ct(this,r),!0}return!1},e.prototype._updateHasMapEntry=function(e,t){var n=this._hasMap.get(e);n&&n.setNewValue(t)},e.prototype._updateValue=function(e,t){var n=this._data.get(e);if((t=n.prepareNewValue(t))!==je.UNCHANGED){var r=Dt(this),i=r?{type:"update",object:this,oldValue:n.value,name:e,newValue:t}:null;0,n.setNewValue(t),r&&Ct(this,i)}},e.prototype._addValue=function(e,t){var n=this;te(this._keysAtom),mt(function(){var r=new ge(t,n.enhancer,n.name+"."+O(e),!1);n._data.set(e,r),t=r.value,n._updateHasMapEntry(e,!0),n._keysAtom.reportChanged()});var r=Dt(this);r&&Ct(this,r?{type:"add",object:this,name:e,newValue:t}:null)},e.prototype.get=function(e){return this.has(e)?this.dehanceValue(this._data.get(e).get()):this.dehanceValue(void 0)},e.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},e.prototype.keys=function(){return this._keysAtom.reportObserved(),this._data.keys()},e.prototype.values=function(){var e=this,t=0,n=Array.from(this.keys());return rn({next:function(){return t<n.length?{value:e.get(n[t++]),done:!1}:{done:!0}}})},e.prototype.entries=function(){var e=this,t=0,n=Array.from(this.keys());return rn({next:function(){if(t<n.length){var r=n[t++];return{value:[r,e.get(r)],done:!1}}return{done:!0}}})},e.prototype[(Pt=A,Symbol.iterator)]=function(){return this.entries()},e.prototype.forEach=function(e,t){var n,o;try{for(var a=r(this),s=a.next();!s.done;s=a.next()){var u=i(s.value,2),c=u[0],l=u[1];e.call(t,l,c,this)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(n)throw n.error}}},e.prototype.merge=function(e){var t=this;return Mt(e)&&(e=e.toJS()),mt(function(){v(e)?w(e).forEach(function(n){return t.set(n,e[n])}):Array.isArray(e)?e.forEach(function(e){var n=i(e,2),r=n[0],o=n[1];return t.set(r,o)}):g(e)?(e.constructor!==Map&&l("Cannot initialize from classes that inherit from Map: "+e.constructor.name),e.forEach(function(e,n){return t.set(n,e)})):null!=e&&l("Cannot initialize map from "+e)}),this},e.prototype.clear=function(){var e=this;mt(function(){ie(function(){var t,n;try{for(var i=r(e.keys()),o=i.next();!o.done;o=i.next()){var a=o.value;e.delete(a)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}})})},e.prototype.replace=function(e){var t=this;return mt(function(){var n,r=v(n=e)?Object.keys(n):Array.isArray(n)?n.map(function(e){return i(e,1)[0]}):g(n)||Mt(n)?Array.from(n.keys()):l("Cannot get keys from '"+n+"'");Array.from(t.keys()).filter(function(e){return-1===r.indexOf(e)}).forEach(function(e){return t.delete(e)}),t.merge(e)}),this},Object.defineProperty(e.prototype,"size",{get:function(){return this._keysAtom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),e.prototype.toPOJO=function(){var e,t,n={};try{for(var o=r(this),a=o.next();!a.done;a=o.next()){var s=i(a.value,2),u=s[0],c=s[1];n["symbol"==typeof u?u:O(u)]=c}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}return n},e.prototype.toJS=function(){return new Map(this)},e.prototype.toJSON=function(){return this.toPOJO()},e.prototype.toString=function(){var e=this;return this.name+"[{ "+Array.from(this.keys()).map(function(t){return O(t)+": "+e.get(t)}).join(", ")+" }]"},e.prototype.observe=function(e,t){return jt(this,e)},e.prototype.intercept=function(e){return Et(this,e)},e}(),Mt=b("ObservableMap",Lt),Ut={},Gt=function(){function e(e,t,n){if(void 0===t&&(t=N),void 0===n&&(n="ObservableSet@"+c()),this.name=n,this[kt]=Ut,this._data=new Set,this._atom=x(this.name),this[Symbol.toStringTag]="Set","function"!=typeof Set)throw new Error("mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js");this.enhancer=function(e,r){return t(e,r,n)},e&&this.replace(e)}return e.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},e.prototype.clear=function(){var e=this;mt(function(){ie(function(){var t,n;try{for(var i=r(e._data.values()),o=i.next();!o.done;o=i.next()){var a=o.value;e.delete(a)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}})})},e.prototype.forEach=function(e,t){var n,i;try{for(var o=r(this),a=o.next();!a.done;a=o.next()){var s=a.value;e.call(t,s,s,this)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}},Object.defineProperty(e.prototype,"size",{get:function(){return this._atom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),e.prototype.add=function(e){var t=this;if((te(this._atom),_t(this))&&!(r=xt(this,{type:"add",object:this,newValue:e})))return this;if(!this.has(e)){mt(function(){t._data.add(t.enhancer(e,void 0)),t._atom.reportChanged()});var n=Dt(this),r=n?{type:"add",object:this,newValue:e}:null;0,n&&Ct(this,r)}return this},e.prototype.delete=function(e){var t=this;if(_t(this)&&!(r=xt(this,{type:"delete",object:this,oldValue:e})))return!1;if(this.has(e)){var n=Dt(this),r=n?{type:"delete",object:this,oldValue:e}:null;return mt(function(){t._atom.reportChanged(),t._data.delete(e)}),n&&Ct(this,r),!0}return!1},e.prototype.has=function(e){return this._atom.reportObserved(),this._data.has(this.dehanceValue(e))},e.prototype.entries=function(){var e=0,t=Array.from(this.keys()),n=Array.from(this.values());return rn({next:function(){var r=e;return e+=1,r<n.length?{value:[t[r],n[r]],done:!1}:{done:!0}}})},e.prototype.keys=function(){return this.values()},e.prototype.values=function(){this._atom.reportObserved();var e=this,t=0,n=Array.from(this._data.values());return rn({next:function(){return t<n.length?{value:e.dehanceValue(n[t++]),done:!1}:{done:!0}}})},e.prototype.replace=function(e){var t=this;return qt(e)&&(e=e.toJS()),mt(function(){Array.isArray(e)?(t.clear(),e.forEach(function(e){return t.add(e)})):m(e)?(t.clear(),e.forEach(function(e){return t.add(e)})):null!=e&&l("Cannot initialize set from "+e)}),this},e.prototype.observe=function(e,t){return jt(this,e)},e.prototype.intercept=function(e){return Et(this,e)},e.prototype.toJS=function(){return new Set(this)},e.prototype.toString=function(){return this.name+"[ "+Array.from(this).join(", ")+" ]"},e.prototype[(kt=A,Symbol.iterator)]=function(){return this.values()},e}(),qt=b("ObservableSet",Gt),Kt=function(){function e(e,t,n,r){void 0===t&&(t=new Map),this.target=e,this.values=t,this.name=n,this.defaultEnhancer=r,this.keysAtom=new _(n+".keys")}return e.prototype.read=function(e){return this.values.get(e).get()},e.prototype.write=function(e,t){var n=this.target,r=this.values.get(e);if(r instanceof we)r.set(t);else{if(_t(this)){if(!(o=xt(this,{type:"update",object:this.proxy||n,name:e,newValue:t})))return;t=o.newValue}if((t=r.prepareNewValue(t))!==je.UNCHANGED){var i=Dt(this),o=i?{type:"update",object:this.proxy||n,oldValue:r.value,name:e,newValue:t}:null;0,r.setNewValue(t),i&&Ct(this,o)}}},e.prototype.has=function(e){var t=this.pendingKeys||(this.pendingKeys=new Map),n=t.get(e);if(n)return n.get();var r=!!this.values.get(e);return n=new ge(r,V,this.name+"."+O(e)+"?",!1),t.set(e,n),n.get()},e.prototype.addObservableProp=function(e,t,n){void 0===n&&(n=this.defaultEnhancer);var r=this.target;if(_t(this)){var i=xt(this,{object:this.proxy||r,name:e,type:"add",newValue:t});if(!i)return;t=i.newValue}var o=new ge(t,n,this.name+"."+O(e),!1);this.values.set(e,o),t=o.value,Object.defineProperty(r,e,function(e){return Ht[e]||(Ht[e]={configurable:!0,enumerable:!0,get:function(){return this[A].read(e)},set:function(t){this[A].write(e,t)}})}(e)),this.notifyPropertyAddition(e,t)},e.prototype.addComputedProp=function(e,t,n){var r,i,o,a=this.target;n.name=n.name||this.name+"."+O(t),this.values.set(t,new we(n)),(e===a||(r=e,i=t,!(o=Object.getOwnPropertyDescriptor(r,i))||!1!==o.configurable&&!1!==o.writable))&&Object.defineProperty(e,t,function(e){return Wt[e]||(Wt[e]={configurable:je.computedConfigurable,enumerable:!1,get:function(){return Jt(this).read(e)},set:function(t){Jt(this).write(e,t)}})}(t))},e.prototype.remove=function(e){if(this.values.has(e)){var t=this.target;if(_t(this))if(!(a=xt(this,{object:this.proxy||t,name:e,type:"remove"})))return;try{Ie();var n=Dt(this),r=this.values.get(e),i=r&&r.get();if(r&&r.set(void 0),this.keysAtom.reportChanged(),this.values.delete(e),this.pendingKeys){var o=this.pendingKeys.get(e);o&&o.set(!1)}delete this.target[e];var a=n?{type:"remove",object:this.proxy||t,oldValue:i,name:e}:null;0,n&&Ct(this,a)}finally{Pe()}}},e.prototype.illegalAccess=function(e,t){console.warn("Property '"+t+"' of '"+e+"' was accessed through the prototype chain. Use 'decorate' instead to declare the prop or access it statically through it's owner")},e.prototype.observe=function(e,t){return jt(this,e)},e.prototype.intercept=function(e){return Et(this,e)},e.prototype.notifyPropertyAddition=function(e,t){var n=Dt(this),r=n?{type:"add",object:this.proxy||this.target,name:e,newValue:t}:null;if(n&&Ct(this,r),this.pendingKeys){var i=this.pendingKeys.get(e);i&&i.set(!0)}this.keysAtom.reportChanged()},e.prototype.getKeys=function(){var e,t;this.keysAtom.reportObserved();var n=[];try{for(var o=r(this.values),a=o.next();!a.done;a=o.next()){var s=i(a.value,2),u=s[0];s[1]instanceof ge&&n.push(u)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}return n},e}();function zt(e,t,n){if(void 0===t&&(t=""),void 0===n&&(n=N),Object.prototype.hasOwnProperty.call(e,A))return e[A];v(e)||(t=(e.constructor.name||"ObservableObject")+"@"+c()),t||(t="ObservableObject@"+c());var r=new Kt(e,new Map,O(t),n);return y(e,A,r),r}var Ht=Object.create(null),Wt=Object.create(null);function Jt(e){var t=e[A];return t||(I(e),e[A])}var Xt=b("ObservableObjectAdministration",Kt);function Yt(e){return!!d(e)&&(I(e),Xt(e[A]))}function Ft(e,t){if("object"==typeof e&&null!==e){if(Vt(e))return void 0!==t&&l(!1),e[A].atom;if(qt(e))return e[A];if(Mt(e)){var n=e;return void 0===t?n._keysAtom:((r=n._data.get(t)||n._hasMap.get(t))||l(!1),r)}var r;if(I(e),t&&!e[A]&&e[t],Yt(e))return t?((r=e[A].values.get(t))||l(!1),r):l(!1);if(E(e)||Oe(e)||Ge(e))return e}else if("function"==typeof e&&Ge(e[A]))return e[A];return l(!1)}function $t(e,t){return e||l("Expecting some object"),void 0!==t?$t(Ft(e,t)):E(e)||Oe(e)||Ge(e)?e:Mt(e)||qt(e)?e:(I(e),e[A]?e[A]:void l(!1))}function Qt(e,t){return(void 0!==t?Ft(e,t):Yt(e)||Mt(e)||qt(e)?$t(e):Ft(e)).name}var Zt=Object.prototype.toString;function en(e,t,n){return void 0===n&&(n=-1),function e(t,n,r,i,o){if(t===n)return 0!==t||1/t==1/n;if(null==t||null==n)return!1;if(t!=t)return n!=n;var a=typeof t;if("function"!==a&&"object"!==a&&"object"!=typeof n)return!1;t=tn(t);n=tn(n);var s=Zt.call(t);if(s!==Zt.call(n))return!1;switch(s){case"[object RegExp]":case"[object String]":return""+t==""+n;case"[object Number]":return+t!=+t?+n!=+n:0==+t?1/+t==1/n:+t==+n;case"[object Date]":case"[object Boolean]":return+t==+n;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(t)===Symbol.valueOf.call(n)}var u="[object Array]"===s;if(!u){if("object"!=typeof t||"object"!=typeof n)return!1;var c=t.constructor,l=n.constructor;if(c!==l&&!("function"==typeof c&&c instanceof c&&"function"==typeof l&&l instanceof l)&&"constructor"in t&&"constructor"in n)return!1}if(0===r)return!1;r<0&&(r=-1);i=i||[];o=o||[];var f=i.length;for(;f--;)if(i[f]===t)return o[f]===n;i.push(t);o.push(n);if(u){if((f=t.length)!==n.length)return!1;for(;f--;)if(!e(t[f],n[f],r-1,i,o))return!1}else{var h=Object.keys(t),p=void 0;if(f=h.length,Object.keys(n).length!==f)return!1;for(;f--;)if(p=h[f],!nn(n,p)||!e(t[p],n[p],r-1,i,o))return!1}i.pop();o.pop();return!0}(e,t,n)}function tn(e){return Vt(e)?e.slice():g(e)||Mt(e)?Array.from(e.entries()):m(e)||qt(e)?Array.from(e.entries()):e}function nn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function rn(e){return e[Symbol.iterator]=on,e}function on(){return this}if("undefined"==typeof Proxy||"undefined"==typeof Symbol)throw new Error("[mobx] MobX 5+ requires Proxy and Symbol objects. If your environment doesn't support Symbol or Proxy objects, please downgrade to MobX 4. For React Native Android, consider upgrading JSCore.");"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:ze,extras:{getDebugName:Qt},$mobx:A}),e.$mobx=A,e.FlowCancellationError=ut,e.ObservableMap=Lt,e.ObservableSet=Gt,e.Reaction=ke,e._allowStateChanges=function(e,t){var n,r=ye(e);try{n=t()}finally{be(r)}return n},e._allowStateChangesInsideComputed=function(e){var t,n=je.computationDepth;je.computationDepth=0;try{t=e()}finally{je.computationDepth=n}return t},e._allowStateReadsEnd=ue,e._allowStateReadsStart=se,e._endAction=ve,e._getAdministration=$t,e._getGlobalState=function(){return je},e._interceptReads=function(e,t,n){var r;if(Mt(e)||Vt(e)||me(e))r=$t(e);else{if(!Yt(e))return l(!1);if("string"!=typeof t)return l(!1);r=$t(e,t)}return void 0!==r.dehancer?l(!1):(r.dehancer="function"==typeof t?t:n,function(){r.dehancer=void 0})},e._isComputingDerivation=function(){return null!==je.trackingDerivation},e._resetGlobalState=function(){var e=new Ae;for(var t in e)-1===Se.indexOf(t)&&(je[t]=e[t]);je.allowStateChanges=!je.enforceActions},e._startAction=de,e.action=Je,e.autorun=Ye,e.comparer=D,e.computed=$,e.configure=function(e){var t=e.enforceActions,n=e.computedRequiresReaction,r=e.computedConfigurable,i=e.disableErrorBoundaries,o=e.reactionScheduler,a=e.reactionRequiresObservable,s=e.observableRequiresReaction;if(!0===e.isolateGlobalState&&((je.pendingReactions.length||je.inBatch||je.isRunningReactions)&&l("isolateGlobalState should be called before MobX is running any reactions"),De=!0,xe&&(0==--Ee().__mobxInstanceCount&&(Ee().__mobxGlobals=void 0),je=new Ae)),void 0!==t){var u=void 0;switch(t){case!0:case"observed":u=!0;break;case!1:case"never":u=!1;break;case"strict":case"always":u="strict";break;default:l("Invalid value for 'enforceActions': '"+t+"', expected 'never', 'always' or 'observed'")}je.enforceActions=u,je.allowStateChanges=!0!==u&&"strict"!==u}void 0!==n&&(je.computedRequiresReaction=!!n),void 0!==a&&(je.reactionRequiresObservable=!!a),void 0!==s&&(je.observableRequiresReaction=!!s,je.allowStateReads=!je.observableRequiresReaction),void 0!==r&&(je.computedConfigurable=!!r),void 0!==i&&(!0===i&&console.warn("WARNING: Debug feature only. MobX will NOT recover from errors when `disableErrorBoundaries` is enabled."),je.disableErrorBoundaries=!!i),o&&qe(o)},e.createAtom=x,e.decorate=function(e,t){var n="function"==typeof e?e.prototype:e,r=function(e){var r=t[e];Array.isArray(r)||(r=[r]);var i=Object.getOwnPropertyDescriptor(n,e),o=r.reduce(function(t,r){return r(n,e,t)},i);o&&Object.defineProperty(n,e,o)};for(var i in t)r(i);return e},e.entries=function(e){return Yt(e)?pt(e).map(function(t){return[t,e[t]]}):Mt(e)?pt(e).map(function(t){return[t,e.get(t)]}):qt(e)?Array.from(e.entries()):Vt(e)?e.map(function(e,t){return[t,e]}):l(!1)},e.extendObservable=tt,e.flow=function(e){1!==arguments.length&&l("Flow expects 1 argument and cannot be used as decorator");var t=e.name||"<unnamed flow>";return function(){var n,r=arguments,i=++st,o=Je(t+" - runid: "+i+" - init",e).apply(this,r),a=void 0,s=new Promise(function(e,r){var s=0;function u(e){var n;a=void 0;try{n=Je(t+" - runid: "+i+" - yield "+s++,o.next).call(o,e)}catch(e){return r(e)}l(n)}function c(e){var n;a=void 0;try{n=Je(t+" - runid: "+i+" - yield "+s++,o.throw).call(o,e)}catch(e){return r(e)}l(n)}function l(t){if(!t||"function"!=typeof t.then)return t.done?e(t.value):(a=Promise.resolve(t.value)).then(u,c);t.then(l,r)}n=r,u(void 0)});return s.cancel=Je(t+" - runid: "+i+" - cancel",function(){try{a&&ct(a);var e=o.return(void 0),t=Promise.resolve(e.value);t.then(p,p),ct(t),n(new ut)}catch(e){n(e)}}),s}},e.get=function(e,t){if(vt(e,t))return Yt(e)?e[t]:Mt(e)?e.get(t):Vt(e)?e[t]:l(!1)},e.getAtom=Ft,e.getDebugName=Qt,e.getDependencyTree=it,e.getObserverTree=function(e,t){return at(Ft(e,t))},e.has=vt,e.intercept=function(e,t,n){return"function"==typeof n?function(e,t,n){return $t(e,t).intercept(n)}(e,t,n):function(e,t){return $t(e).intercept(t)}(e,t)},e.isAction=function(e){return"function"==typeof e&&!0===e.isMobxAction},e.isArrayLike=function(e){return Array.isArray(e)||Vt(e)},e.isBoxedObservable=me,e.isComputed=function(e){return arguments.length>1?l(!1):lt(e)},e.isComputedProp=function(e,t){return"string"!=typeof t?l(!1):lt(e,t)},e.isFlowCancellationError=function(e){return e instanceof ut},e.isObservable=ht,e.isObservableArray=Vt,e.isObservableMap=Mt,e.isObservableObject=Yt,e.isObservableProp=function(e,t){return"string"!=typeof t?l(!1):ft(e,t)},e.isObservableSet=qt,e.keys=pt,e.observable=H,e.observe=function(e,t,n,r){return"function"==typeof n?function(e,t,n,r){return $t(e,t).observe(n,r)}(e,t,n,r):function(e,t,n){return $t(e).observe(t,n)}(e,t,n)},e.onBecomeObserved=Qe,e.onBecomeUnobserved=Ze,e.onReactionError=function(e){return je.globalReactionErrorHandlers.push(e),function(){var t=je.globalReactionErrorHandlers.indexOf(e);t>=0&&je.globalReactionErrorHandlers.splice(t,1)}},e.reaction=function(e,t,n){void 0===n&&(n=u);var r,i,o,a=n.name||"Reaction@"+c(),s=Je(a,n.onError?(r=n.onError,i=t,function(){try{return i.apply(this,arguments)}catch(e){r.call(this,e)}}):t),l=!n.scheduler&&!n.delay,f=$e(n),h=!0,p=!1,d=n.compareStructural?D.structural:n.equals||D.default,v=new ke(a,function(){h||l?y():p||(p=!0,f(y))},n.onError,n.requiresObservable);function y(){if(p=!1,!v.isDisposed){var t=!1;v.track(function(){var n=e(v);t=h||!d(o,n),o=n}),h&&n.fireImmediately&&s(o,v),h||!0!==t||s(o,v),h&&(h=!1)}}return v.schedule(),v.getDisposer()},e.remove=function(e,t){if(Yt(e))e[A].remove(t);else if(Mt(e))e.delete(t);else if(qt(e))e.delete(t);else{if(!Vt(e))return l(!1);"number"!=typeof t&&(t=parseInt(t,10)),f(t>=0,"Not a valid index: '"+t+"'"),e.splice(t,1)}},e.runInAction=function(e,t){return pe("string"==typeof e?e:e.name||"<unnamed action>","function"==typeof e?e:t,this,void 0)},e.set=dt,e.spy=ze,e.toJS=function(e,t){var n;return"boolean"==typeof t&&(t={detectCycles:t}),t||(t=yt),t.detectCycles=void 0===t.detectCycles?!0===t.recurseEverything:!0===t.detectCycles,t.detectCycles&&(n=new Map),function e(t,n,r){if(!n.recurseEverything&&!ht(t))return t;if("object"!=typeof t)return t;if(null===t)return null;if(t instanceof Date)return t;if(me(t))return e(t.get(),n,r);if(ht(t)&&pt(t),!0===n.detectCycles&&null!==t&&r.has(t))return r.get(t);if(Vt(t)||Array.isArray(t)){var i=bt(r,t,[],n),o=t.map(function(t){return e(t,n,r)});i.length=o.length;for(var a=0,s=o.length;a<s;a++)i[a]=o[a];return i}if(qt(t)||Object.getPrototypeOf(t)===Set.prototype){if(!1===n.exportMapsAsObjects){var u=bt(r,t,new Set,n);return t.forEach(function(t){u.add(e(t,n,r))}),u}var c=bt(r,t,[],n);return t.forEach(function(t){c.push(e(t,n,r))}),c}if(Mt(t)||Object.getPrototypeOf(t)===Map.prototype){if(!1===n.exportMapsAsObjects){var l=bt(r,t,new Map,n);return t.forEach(function(t,i){l.set(i,e(t,n,r))}),l}var f=bt(r,t,{},n);return t.forEach(function(t,i){f[i]=e(t,n,r)}),f}var h=bt(r,t,{},n);return w(t).forEach(function(i){h[i]=e(t[i],n,r)}),h}(e,t,n)},e.trace=gt,e.transaction=mt,e.untracked=ie,e.values=function(e){return Yt(e)?pt(e).map(function(t){return e[t]}):Mt(e)?pt(e).map(function(t){return e.get(t)}):qt(e)?Array.from(e.values()):Vt(e)?e.slice():l(!1)},e.when=function(e,t,r){return 1===arguments.length||t&&"object"==typeof t?function(e,t){var r,i=new Promise(function(i,o){var a=wt(e,i,n(n({},t),{onError:o}));r=function(){a(),o("WHEN_CANCELLED")}});return i.cancel=r,i}(e,t):wt(e,t,r||{})},Object.defineProperty(e,"__esModule",{value:!0})});
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).mobx={})}(this,function(e){"use strict";var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,n)};var n=function(){return(n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)};function r(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}function o(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function i(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(o(arguments[t]));return e}var a="An invariant failed, however the error is obfuscated because this is a production build.",s=[];Object.freeze(s);var u={};function c(){return++je.mobxGuid}function l(e){throw f(!1,e),"X"}function f(e,t){if(!e)throw new Error("[mobx] "+(t||a))}Object.freeze(u);function h(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var p=function(){};function d(e){return null!==e&&"object"==typeof e}function v(e){if(null===e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}function y(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function b(e,t){var n="isMobX"+e;return t.prototype[n]=!0,function(e){return d(e)&&!0===e[n]}}function g(e){return e instanceof Map}function m(e){return e instanceof Set}function w(e){var t=new Set;for(var n in e)t.add(n);return Object.getOwnPropertySymbols(e).forEach(function(n){Object.getOwnPropertyDescriptor(e,n).enumerable&&t.add(n)}),Array.from(t)}function O(e){return e&&e.toString?e.toString():new String(e).toString()}function S(e){return null===e?null:"object"==typeof e?""+e:e}var A=Symbol("mobx administration"),_=function(){function t(t){void 0===t&&(t="Atom@"+c()),this.name=t,this.isPendingUnobservation=!1,this.isBeingObserved=!1,this.observers=new Set,this.diffValue=0,this.lastAccessedBy=0,this.lowestObserverState=e.IDerivationState.NOT_TRACKING}return t.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach(function(e){return e()})},t.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach(function(e){return e()})},t.prototype.reportObserved=function(){return Ne(this)},t.prototype.reportChanged=function(){Ie(),function(t){if(t.lowestObserverState===e.IDerivationState.STALE)return;t.lowestObserverState=e.IDerivationState.STALE,t.observers.forEach(function(n){n.dependenciesState===e.IDerivationState.UP_TO_DATE&&(n.isTracing!==X.NONE&&Ve(n,t),n.onBecomeStale()),n.dependenciesState=e.IDerivationState.STALE})}(this),Pe()},t.prototype.toString=function(){return this.name},t}(),E=b("Atom",_);function x(e,t,n){void 0===t&&(t=p),void 0===n&&(n=p);var r=new _(e);return t!==p&&Qe(r,t),n!==p&&Ze(r,n),r}var D={identity:function(e,t){return e===t},structural:function(e,t){return en(e,t)},default:function(e,t){return Object.is(e,t)},shallow:function(e,t){return en(e,t,1)}},j=Symbol("mobx did run lazy initializers"),C=Symbol("mobx pending decorators"),R={},T={};function I(e){var t,n;if(!0!==e[j]){var o=e[C];if(o){y(e,j,!0);var a=i(Object.getOwnPropertySymbols(o),Object.keys(o));try{for(var s=r(a),u=s.next();!u.done;u=s.next()){var c=o[u.value];c.propertyCreator(e,c.prop,c.descriptor,c.decoratorTarget,c.decoratorArguments)}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}}}}function P(e,t){return function(){var r,o,i=function(o,i,a,s){if(!0===s)return t(o,i,a,o,r),null;if(!Object.prototype.hasOwnProperty.call(o,C)){var u=o[C];y(o,C,n({},u))}return o[C][i]={prop:i,propertyCreator:t,descriptor:a,decoratorTarget:o,decoratorArguments:r},function(e,t){var n=t?R:T;return n[e]||(n[e]={configurable:!0,enumerable:t,get:function(){return I(this),this[e]},set:function(t){I(this),this[e]=t}})}(i,e)};return(2===(o=arguments).length||3===o.length)&&("string"==typeof o[1]||"symbol"==typeof o[1])||4===o.length&&!0===o[3]?(r=s,i.apply(null,arguments)):(r=Array.prototype.slice.call(arguments),i)}}function N(e,t,n){return ht(e)?e:Array.isArray(e)?H.array(e,{name:n}):v(e)?H.object(e,void 0,{name:n}):g(e)?H.map(e,{name:n}):m(e)?H.set(e,{name:n}):e}function V(e){return e}function k(e){f(e);var t=P(!0,function(t,n,r,o,i){var a=r?r.initializer?r.initializer.call(t):r.value:void 0;zt(t).addObservableProp(n,a,e)}),n=("undefined"!=typeof process&&process.env,t);return n.enhancer=e,n}var B={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function L(e){return null==e?B:"string"==typeof e?{name:e,deep:!0,proxy:!0}:e}Object.freeze(B);var M=k(N),U=k(function(e,t,n){return null==e?e:Yt(e)||Vt(e)||Mt(e)||qt(e)?e:Array.isArray(e)?H.array(e,{name:n,deep:!1}):v(e)?H.object(e,void 0,{name:n,deep:!1}):g(e)?H.map(e,{name:n,deep:!1}):m(e)?H.set(e,{name:n,deep:!1}):l(!1)}),G=k(V),q=k(function(e,t,n){return en(e,t)?t:e});function K(e){return e.defaultDecorator?e.defaultDecorator.enhancer:!1===e.deep?V:N}var z={box:function(e,t){arguments.length>2&&W("box");var n=L(t);return new ge(e,K(n),n.name,!0,n.equals)},array:function(e,t){arguments.length>2&&W("array");var n=L(t);return function(e,t,n,r){void 0===n&&(n="ObservableArray@"+c());void 0===r&&(r=!1);var o=new Tt(n,t,r);i=o.values,a=A,s=o,Object.defineProperty(i,a,{enumerable:!1,writable:!1,configurable:!0,value:s});var i,a,s;var u=new Proxy(o.values,Rt);if(o.proxy=u,e&&e.length){var l=ye(!0);o.spliceWithArray(0,0,e),be(l)}return u}(e,K(n),n.name)},map:function(e,t){arguments.length>2&&W("map");var n=L(t);return new Lt(e,K(n),n.name)},set:function(e,t){arguments.length>2&&W("set");var n=L(t);return new Gt(e,K(n),n.name)},object:function(e,t,n){"string"==typeof arguments[1]&&W("object");var r=L(n);if(!1===r.proxy)return tt({},e,t,r);var o=nt(r),i=function(e){var t=new Proxy(e,At);return e[A].proxy=t,t}(tt({},void 0,void 0,r));return rt(i,e,t,o),i},ref:G,shallow:U,deep:M,struct:q},H=function(e,t,n){if("string"==typeof arguments[1]||"symbol"==typeof arguments[1])return M.apply(null,arguments);if(ht(e))return e;var r=v(e)?H.object(e,t,n):Array.isArray(e)?H.array(e,t):g(e)?H.map(e,t):m(e)?H.set(e,t):e;if(r!==e)return r;l(!1)};function W(e){l("Expected one or two arguments to observable."+e+". Did you accidentally try to use observable."+e+" as decorator?")}Object.keys(z).forEach(function(e){return H[e]=z[e]});var J,X,Y=P(!1,function(e,t,r,o,i){var a=r.get,s=r.set,u=i[0]||{};zt(e).addComputedProp(e,t,n({get:a,set:s,context:e},u))}),F=Y({equals:D.structural}),$=function(e,t,n){if("string"==typeof t)return Y.apply(null,arguments);if(null!==e&&"object"==typeof e&&1===arguments.length)return Y.apply(null,arguments);var r="object"==typeof t?t:{};return r.get=e,r.set="function"==typeof t?t:r.set,r.name=r.name||e.name||"",new we(r)};$.struct=F,(J=e.IDerivationState||(e.IDerivationState={}))[J.NOT_TRACKING=-1]="NOT_TRACKING",J[J.UP_TO_DATE=0]="UP_TO_DATE",J[J.POSSIBLY_STALE=1]="POSSIBLY_STALE",J[J.STALE=2]="STALE",function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"}(X||(X={}));var Q=function(){return function(e){this.cause=e}}();function Z(e){return e instanceof Q}function ee(t){switch(t.dependenciesState){case e.IDerivationState.UP_TO_DATE:return!1;case e.IDerivationState.NOT_TRACKING:case e.IDerivationState.STALE:return!0;case e.IDerivationState.POSSIBLY_STALE:for(var n=se(!0),r=ie(),o=t.observing,i=o.length,a=0;a<i;a++){var s=o[a];if(Oe(s)){if(je.disableErrorBoundaries)s.get();else try{s.get()}catch(e){return ae(r),ue(n),!0}if(t.dependenciesState===e.IDerivationState.STALE)return ae(r),ue(n),!0}}return ce(t),ae(r),ue(n),!1}}function te(e){var t=e.observers.size>0;je.computationDepth>0&&t&&l(!1),je.allowStateChanges||!t&&"strict"!==je.enforceActions||l(!1)}function ne(t,n,r){var o=se(!0);ce(t),t.newObserving=new Array(t.observing.length+100),t.unboundDepsCount=0,t.runId=++je.runId;var i,a=je.trackingDerivation;if(je.trackingDerivation=t,!0===je.disableErrorBoundaries)i=n.call(r);else try{i=n.call(r)}catch(e){i=new Q(e)}return je.trackingDerivation=a,function(t){for(var n=t.observing,r=t.observing=t.newObserving,o=e.IDerivationState.UP_TO_DATE,i=0,a=t.unboundDepsCount,s=0;s<a;s++){var u=r[s];0===u.diffValue&&(u.diffValue=1,i!==s&&(r[i]=u),i++),u.dependenciesState>o&&(o=u.dependenciesState)}r.length=i,t.newObserving=null,a=n.length;for(;a--;){var u=n[a];0===u.diffValue&&Re(u,t),u.diffValue=0}for(;i--;){var u=r[i];1===u.diffValue&&(u.diffValue=0,Ce(u,t))}o!==e.IDerivationState.UP_TO_DATE&&(t.dependenciesState=o,t.onBecomeStale())}(t),ue(o),i}function re(t){var n=t.observing;t.observing=[];for(var r=n.length;r--;)Re(n[r],t);t.dependenciesState=e.IDerivationState.NOT_TRACKING}function oe(e){var t=ie();try{return e()}finally{ae(t)}}function ie(){var e=je.trackingDerivation;return je.trackingDerivation=null,e}function ae(e){je.trackingDerivation=e}function se(e){var t=je.allowStateReads;return je.allowStateReads=e,t}function ue(e){je.allowStateReads=e}function ce(t){if(t.dependenciesState!==e.IDerivationState.UP_TO_DATE){t.dependenciesState=e.IDerivationState.UP_TO_DATE;for(var n=t.observing,r=n.length;r--;)n[r].lowestObserverState=e.IDerivationState.UP_TO_DATE}}var le=0,fe=1;function he(e,t,n){var r=function(){return pe(e,t,n||this,arguments)};return r.isMobxAction=!0,r}function pe(e,t,n,r){var o=de(e,n,r);try{return t.apply(n,r)}catch(e){throw o.error=e,e}finally{ve(o)}}function de(e,t,n){var r=Ke(),o=ie();Ie();var i={prevDerivation:o,prevAllowStateChanges:ye(!0),prevAllowStateReads:se(!0),notifySpy:r,startTime:0,actionId:fe++,parentActionId:le};return le=i.actionId,i}function ve(e){le!==e.actionId&&l("invalid action stack. did you forget to finish an action?"),le=e.parentActionId,void 0!==e.error&&(je.suppressReactionErrors=!0),be(e.prevAllowStateChanges),ue(e.prevAllowStateReads),Pe(),ae(e.prevDerivation),e.notifySpy,je.suppressReactionErrors=!1}function ye(e){var t=je.allowStateChanges;return je.allowStateChanges=e,t}function be(e){je.allowStateChanges=e}var ge=function(e){function n(t,n,r,o,i){void 0===r&&(r="ObservableValue@"+c()),void 0===o&&(o=!0),void 0===i&&(i=D.default);var a=e.call(this,r)||this;return a.enhancer=n,a.name=r,a.equals=i,a.hasUnreportedChange=!1,a.value=n(t,void 0,r),o&&Ke(),a}return function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}(n,e),n.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},n.prototype.set=function(e){this.value;if((e=this.prepareNewValue(e))!==je.UNCHANGED){Ke();0,this.setNewValue(e)}},n.prototype.prepareNewValue=function(e){if(te(this),_t(this)){var t=xt(this,{object:this,type:"update",newValue:e});if(!t)return je.UNCHANGED;e=t.newValue}return e=this.enhancer(e,this.value,this.name),this.equals(this.value,e)?je.UNCHANGED:e},n.prototype.setNewValue=function(e){var t=this.value;this.value=e,this.reportChanged(),Dt(this)&&Ct(this,{type:"update",object:this,newValue:e,oldValue:t})},n.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},n.prototype.intercept=function(e){return Et(this,e)},n.prototype.observe=function(e,t){return t&&e({object:this,type:"update",newValue:this.value,oldValue:void 0}),jt(this,e)},n.prototype.toJSON=function(){return this.get()},n.prototype.toString=function(){return this.name+"["+this.value+"]"},n.prototype.valueOf=function(){return S(this.get())},n.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},n}(_),me=b("ObservableValue",ge),we=function(){function t(t){this.dependenciesState=e.IDerivationState.NOT_TRACKING,this.observing=[],this.newObserving=null,this.isBeingObserved=!1,this.isPendingUnobservation=!1,this.observers=new Set,this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.lowestObserverState=e.IDerivationState.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+c(),this.value=new Q(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=X.NONE,f(t.get,"missing option for computed: get"),this.derivation=t.get,this.name=t.name||"ComputedValue@"+c(),t.set&&(this.setter=he(this.name+"-setter",t.set)),this.equals=t.equals||(t.compareStructural||t.struct?D.structural:D.default),this.scope=t.context,this.requiresReaction=!!t.requiresReaction,this.keepAlive=!!t.keepAlive}return t.prototype.onBecomeStale=function(){!function(t){if(t.lowestObserverState!==e.IDerivationState.UP_TO_DATE)return;t.lowestObserverState=e.IDerivationState.POSSIBLY_STALE,t.observers.forEach(function(n){n.dependenciesState===e.IDerivationState.UP_TO_DATE&&(n.dependenciesState=e.IDerivationState.POSSIBLY_STALE,n.isTracing!==X.NONE&&Ve(n,t),n.onBecomeStale())})}(this)},t.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach(function(e){return e()})},t.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach(function(e){return e()})},t.prototype.get=function(){this.isComputing&&l("Cycle detected in computation "+this.name+": "+this.derivation),0!==je.inBatch||0!==this.observers.size||this.keepAlive?(Ne(this),ee(this)&&this.trackAndCompute()&&function(t){if(t.lowestObserverState===e.IDerivationState.STALE)return;t.lowestObserverState=e.IDerivationState.STALE,t.observers.forEach(function(n){n.dependenciesState===e.IDerivationState.POSSIBLY_STALE?n.dependenciesState=e.IDerivationState.STALE:n.dependenciesState===e.IDerivationState.UP_TO_DATE&&(t.lowestObserverState=e.IDerivationState.UP_TO_DATE)})}(this)):ee(this)&&(this.warnAboutUntrackedRead(),Ie(),this.value=this.computeValue(!1),Pe());var t=this.value;if(Z(t))throw t.cause;return t},t.prototype.peek=function(){var e=this.computeValue(!1);if(Z(e))throw e.cause;return e},t.prototype.set=function(e){if(this.setter){f(!this.isRunningSetter,"The setter of computed value '"+this.name+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"),this.isRunningSetter=!0;try{this.setter.call(this.scope,e)}finally{this.isRunningSetter=!1}}else f(!1,!1)},t.prototype.trackAndCompute=function(){var t=this.value,n=this.dependenciesState===e.IDerivationState.NOT_TRACKING,r=this.computeValue(!0),o=n||Z(t)||Z(r)||!this.equals(t,r);return o&&(this.value=r),o},t.prototype.computeValue=function(e){var t;if(this.isComputing=!0,je.computationDepth++,e)t=ne(this,this.derivation,this.scope);else if(!0===je.disableErrorBoundaries)t=this.derivation.call(this.scope);else try{t=this.derivation.call(this.scope)}catch(e){t=new Q(e)}return je.computationDepth--,this.isComputing=!1,t},t.prototype.suspend=function(){this.keepAlive||(re(this),this.value=void 0)},t.prototype.observe=function(e,t){var n=this,r=!0,o=void 0;return Ye(function(){var i=n.get();if(!r||t){var a=ie();e({type:"update",object:n,newValue:i,oldValue:o}),ae(a)}r=!1,o=i})},t.prototype.warnAboutUntrackedRead=function(){},t.prototype.toJSON=function(){return this.get()},t.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},t.prototype.valueOf=function(){return S(this.get())},t.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},t}(),Oe=b("ComputedValue",we),Se=["mobxGuid","spyListeners","enforceActions","computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","allowStateReads","disableErrorBoundaries","runId","UNCHANGED"],Ae=function(){return function(){this.version=5,this.UNCHANGED={},this.trackingDerivation=null,this.computationDepth=0,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!0,this.allowStateReads=!0,this.enforceActions=!1,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.computedConfigurable=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1}}(),_e={};function Ee(){return"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:_e}var xe=!0,De=!1,je=function(){var e=Ee();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(xe=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==(new Ae).version&&(xe=!1),xe?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new Ae):(setTimeout(function(){De||l("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")},1),new Ae)}();function Ce(e,t){e.observers.add(t),e.lowestObserverState>t.dependenciesState&&(e.lowestObserverState=t.dependenciesState)}function Re(e,t){e.observers.delete(t),0===e.observers.size&&Te(e)}function Te(e){!1===e.isPendingUnobservation&&(e.isPendingUnobservation=!0,je.pendingUnobservations.push(e))}function Ie(){je.inBatch++}function Pe(){if(0==--je.inBatch){Me();for(var e=je.pendingUnobservations,t=0;t<e.length;t++){var n=e[t];n.isPendingUnobservation=!1,0===n.observers.size&&(n.isBeingObserved&&(n.isBeingObserved=!1,n.onBecomeUnobserved()),n instanceof we&&n.suspend())}je.pendingUnobservations=[]}}function Ne(e){var t=je.trackingDerivation;return null!==t?(t.runId!==e.lastAccessedBy&&(e.lastAccessedBy=t.runId,t.newObserving[t.unboundDepsCount++]=e,e.isBeingObserved||(e.isBeingObserved=!0,e.onBecomeObserved())),!0):(0===e.observers.size&&je.inBatch>0&&Te(e),!1)}function Ve(e,t){if(console.log("[mobx.trace] '"+e.name+"' is invalidated due to a change in: '"+t.name+"'"),e.isTracing===X.BREAK){var n=[];!function e(t,n,r){if(n.length>=1e3)return void n.push("(and many more)");n.push(""+new Array(r).join("\t")+t.name);t.dependencies&&t.dependencies.forEach(function(t){return e(t,n,r+1)})}(ot(e),n,1),new Function("debugger;\n/*\nTracing '"+e.name+"'\n\nYou are entering this break point because derivation '"+e.name+"' is being traced and '"+t.name+"' is now forcing it to update.\nJust follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update\nThe stackframe you are looking for is at least ~6-8 stack-frames up.\n\n"+(e instanceof we?e.derivation.toString().replace(/[*]\//g,"/"):"")+"\n\nThe dependencies for this derivation are:\n\n"+n.join("\n")+"\n*/\n ")()}}var ke=function(){function t(t,n,r,o){void 0===t&&(t="Reaction@"+c()),void 0===o&&(o=!1),this.name=t,this.onInvalidate=n,this.errorHandler=r,this.requiresObservable=o,this.observing=[],this.newObserving=[],this.dependenciesState=e.IDerivationState.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+c(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=X.NONE}return t.prototype.onBecomeStale=function(){this.schedule()},t.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,je.pendingReactions.push(this),Me())},t.prototype.isScheduled=function(){return this._isScheduled},t.prototype.runReaction=function(){if(!this.isDisposed){if(Ie(),this._isScheduled=!1,ee(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending&&Ke()}catch(e){this.reportExceptionInDerivation(e)}}Pe()}},t.prototype.track=function(e){if(!this.isDisposed){Ie(),this._isRunning=!0;var t=ne(this,e,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&re(this),Z(t)&&this.reportExceptionInDerivation(t.cause),Pe()}},t.prototype.reportExceptionInDerivation=function(e){var t=this;if(this.errorHandler)this.errorHandler(e,this);else{if(je.disableErrorBoundaries)throw e;var n="[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this+"'";je.suppressReactionErrors?console.warn("[mobx] (error in reaction '"+this.name+"' suppressed, fix error of causing action below)"):console.error(n,e),je.globalReactionErrorHandlers.forEach(function(n){return n(e,t)})}},t.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(Ie(),re(this),Pe()))},t.prototype.getDisposer=function(){var e=this.dispose.bind(this);return e[A]=this,e},t.prototype.toString=function(){return"Reaction["+this.name+"]"},t.prototype.trace=function(e){void 0===e&&(e=!1),gt(this,e)},t}();var Be=100,Le=function(e){return e()};function Me(){je.inBatch>0||je.isRunningReactions||Le(Ue)}function Ue(){je.isRunningReactions=!0;for(var e=je.pendingReactions,t=0;e.length>0;){++t===Be&&(console.error("Reaction doesn't converge to a stable state after "+Be+" iterations. Probably there is a cycle in the reactive function: "+e[0]),e.splice(0));for(var n=e.splice(0),r=0,o=n.length;r<o;r++)n[r].runReaction()}je.isRunningReactions=!1}var Ge=b("Reaction",ke);function qe(e){var t=Le;Le=function(n){return e(function(){return t(n)})}}function Ke(){return!1}function ze(e){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}function He(){l(!1)}function We(e){return function(t,n,r){if(r){if(r.value)return{value:he(e,r.value),enumerable:!1,configurable:!0,writable:!0};var o=r.initializer;return{enumerable:!1,configurable:!0,writable:!0,initializer:function(){return he(e,o.call(this))}}}return function(e){return function(t,n,r){Object.defineProperty(t,n,{configurable:!0,enumerable:!1,get:function(){},set:function(t){y(this,n,Je(e,t))}})}}(e).apply(this,arguments)}}var Je=function(e,t,n,r){return 1===arguments.length&&"function"==typeof e?he(e.name||"<unnamed action>",e):2===arguments.length&&"function"==typeof t?he(e,t):1===arguments.length&&"string"==typeof e?We(e):!0!==r?We(t).apply(null,arguments):void y(e,t,he(e.name||t,n.value,this))};function Xe(e,t,n){y(e,t,he(t,n.bind(e)))}function Ye(e,t){void 0===t&&(t=u);var n,r=t&&t.name||e.name||"Autorun@"+c();if(!t.scheduler&&!t.delay)n=new ke(r,function(){this.track(a)},t.onError,t.requiresObservable);else{var o=$e(t),i=!1;n=new ke(r,function(){i||(i=!0,o(function(){i=!1,n.isDisposed||n.track(a)}))},t.onError,t.requiresObservable)}function a(){e(n)}return n.schedule(),n.getDisposer()}Je.bound=function(e,t,n,r){return!0===r?(Xe(e,t,n.value),null):n?{configurable:!0,enumerable:!1,get:function(){return Xe(this,t,n.value||n.initializer.call(this)),this[t]},set:He}:{enumerable:!1,configurable:!0,set:function(e){Xe(this,t,e)},get:function(){}}};var Fe=function(e){return e()};function $e(e){return e.scheduler?e.scheduler:e.delay?function(t){return setTimeout(t,e.delay)}:Fe}function Qe(e,t,n){return et("onBecomeObserved",e,t,n)}function Ze(e,t,n){return et("onBecomeUnobserved",e,t,n)}function et(e,t,n,r){var o="function"==typeof r?Ft(t,n):Ft(t),i="function"==typeof r?r:n,a=e+"Listeners";return o[a]?o[a].add(i):o[a]=new Set([i]),"function"!=typeof o[e]?l(!1):function(){var e=o[a];e&&(e.delete(i),0===e.size&&delete o[a])}}function tt(e,t,n,r){var o=nt(r=L(r));return I(e),zt(e,r.name,o.enhancer),t&&rt(e,t,n,o),e}function nt(e){return e.defaultDecorator||(!1===e.deep?G:M)}function rt(e,t,n,o){var i,a;Ie();try{var s=w(t);try{for(var u=r(s),c=u.next();!c.done;c=u.next()){var l=c.value,f=Object.getOwnPropertyDescriptor(t,l),h=(n&&l in n?n[l]:f.get?Y:o)(e,l,f,!0);h&&Object.defineProperty(e,l,h)}}catch(e){i={error:e}}finally{try{c&&!c.done&&(a=u.return)&&a.call(u)}finally{if(i)throw i.error}}}finally{Pe()}}function ot(e,t){return it(Ft(e,t))}function it(e){var t,n,r={name:e.name};return e.observing&&e.observing.length>0&&(r.dependencies=(t=e.observing,n=[],t.forEach(function(e){-1===n.indexOf(e)&&n.push(e)}),n).map(it)),r}function at(e){var t,n={name:e.name};return(t=e).observers&&t.observers.size>0&&(n.observers=Array.from(function(e){return e.observers}(e)).map(at)),n}var st=0;function ut(){this.message="FLOW_CANCELLED"}function ct(e){"function"==typeof e.cancel&&e.cancel()}function lt(e,t){if(null==e)return!1;if(void 0!==t){if(!1===Yt(e))return!1;if(!e[A].values.has(t))return!1;var n=Ft(e,t);return Oe(n)}return Oe(e)}function ft(e,t){return null!=e&&(void 0!==t?!!Yt(e)&&e[A].values.has(t):Yt(e)||!!e[A]||E(e)||Ge(e)||Oe(e))}function ht(e){return 1!==arguments.length&&l(!1),ft(e)}function pt(e){return Yt(e)?e[A].getKeys():Mt(e)?Array.from(e.keys()):qt(e)?Array.from(e.keys()):Vt(e)?e.map(function(e,t){return t}):l(!1)}function dt(e,t,n){if(2!==arguments.length||qt(e))if(Yt(e)){var r=e[A];r.values.get(t)?r.write(t,n):r.addObservableProp(t,n,r.defaultEnhancer)}else if(Mt(e))e.set(t,n);else if(qt(e))e.add(t);else{if(!Vt(e))return l(!1);"number"!=typeof t&&(t=parseInt(t,10)),f(t>=0,"Not a valid index: '"+t+"'"),Ie(),t>=e.length&&(e.length=t+1),e[t]=n,Pe()}else{Ie();var o=t;try{for(var i in o)dt(e,i,o[i])}finally{Pe()}}}function vt(e,t){return Yt(e)?$t(e).has(t):Mt(e)?e.has(t):qt(e)?e.has(t):Vt(e)?t>=0&&t<e.length:l(!1)}ut.prototype=Object.create(Error.prototype);var yt={detectCycles:!0,exportMapsAsObjects:!0,recurseEverything:!1};function bt(e,t,n,r){return r.detectCycles&&e.set(t,n),n}function gt(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=!1;"boolean"==typeof e[e.length-1]&&(n=e.pop());var r=function(e){switch(e.length){case 0:return je.trackingDerivation;case 1:return Ft(e[0]);case 2:return Ft(e[0],e[1])}}(e);if(!r)return l(!1);r.isTracing===X.NONE&&console.log("[mobx.trace] '"+r.name+"' tracing enabled"),r.isTracing=n?X.BREAK:X.LOG}function mt(e,t){void 0===t&&(t=void 0),Ie();try{return e.apply(t)}finally{Pe()}}function wt(e,t,n){var r;"number"==typeof n.timeout&&(r=setTimeout(function(){if(!i[A].isDisposed){i();var e=new Error("WHEN_TIMEOUT");if(!n.onError)throw e;n.onError(e)}},n.timeout)),n.name=n.name||"When@"+c();var o=he(n.name+"-effect",t),i=Ye(function(t){e()&&(t.dispose(),r&&clearTimeout(r),o())},n);return i}function Ot(e){return e[A]}function St(e){return"string"==typeof e||"number"==typeof e||"symbol"==typeof e}var At={has:function(e,t){if(t===A||"constructor"===t||t===j)return!0;var n=Ot(e);return St(t)?n.has(t):t in e},get:function(e,t){if(t===A||"constructor"===t||t===j)return e[t];var n=Ot(e),r=n.values.get(t);if(r instanceof _){var o=r.get();return void 0===o&&n.has(t),o}return St(t)&&n.has(t),e[t]},set:function(e,t,n){return!!St(t)&&(dt(e,t,n),!0)},deleteProperty:function(e,t){return!!St(t)&&(Ot(e).remove(t),!0)},ownKeys:function(e){return Ot(e).keysAtom.reportObserved(),Reflect.ownKeys(e)},preventExtensions:function(e){return l("Dynamic observable objects cannot be frozen"),!1}};function _t(e){return void 0!==e.interceptors&&e.interceptors.length>0}function Et(e,t){var n=e.interceptors||(e.interceptors=[]);return n.push(t),h(function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function xt(e,t){var n=ie();try{for(var r=i(e.interceptors||[]),o=0,a=r.length;o<a&&(f(!(t=r[o](t))||t.type,"Intercept handlers should return nothing or a change object"),t);o++);return t}finally{ae(n)}}function Dt(e){return void 0!==e.changeListeners&&e.changeListeners.length>0}function jt(e,t){var n=e.changeListeners||(e.changeListeners=[]);return n.push(t),h(function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function Ct(e,t){var n=ie(),r=e.changeListeners;if(r){for(var o=0,i=(r=r.slice()).length;o<i;o++)r[o](t);ae(n)}}var Rt={get:function(e,t){return t===A?e[A]:"length"===t?e[A].getArrayLength():"number"==typeof t?It.get.call(e,t):"string"!=typeof t||isNaN(t)?It.hasOwnProperty(t)?It[t]:e[t]:It.get.call(e,parseInt(t))},set:function(e,t,n){return"length"===t&&e[A].setArrayLength(n),"number"==typeof t&&It.set.call(e,t,n),"symbol"==typeof t||isNaN(t)?e[t]=n:It.set.call(e,parseInt(t),n),!0},preventExtensions:function(e){return l("Observable arrays cannot be frozen"),!1}};var Tt=function(){function e(e,t,n){this.owned=n,this.values=[],this.proxy=void 0,this.lastKnownLength=0,this.atom=new _(e||"ObservableArray@"+c()),this.enhancer=function(n,r){return t(n,r,e+"[..]")}}return e.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},e.prototype.dehanceValues=function(e){return void 0!==this.dehancer&&e.length>0?e.map(this.dehancer):e},e.prototype.intercept=function(e){return Et(this,e)},e.prototype.observe=function(e,t){return void 0===t&&(t=!1),t&&e({object:this.proxy,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),jt(this,e)},e.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},e.prototype.setArrayLength=function(e){if("number"!=typeof e||e<0)throw new Error("[mobx.array] Out of range: "+e);var t=this.values.length;if(e!==t)if(e>t){for(var n=new Array(e-t),r=0;r<e-t;r++)n[r]=void 0;this.spliceWithArray(t,0,n)}else this.spliceWithArray(e,t-e)},e.prototype.updateArrayLength=function(e,t){if(e!==this.lastKnownLength)throw new Error("[mobx] Modification exception: the internal structure of an observable array was changed.");this.lastKnownLength+=t},e.prototype.spliceWithArray=function(e,t,n){var r=this;te(this.atom);var o=this.values.length;if(void 0===e?e=0:e>o?e=o:e<0&&(e=Math.max(0,o+e)),t=1===arguments.length?o-e:null==t?0:Math.max(0,Math.min(t,o-e)),void 0===n&&(n=s),_t(this)){var i=xt(this,{object:this.proxy,type:"splice",index:e,removedCount:t,added:n});if(!i)return s;t=i.removedCount,n=i.added}n=0===n.length?n:n.map(function(e){return r.enhancer(e,void 0)});var a=this.spliceItemsIntoValues(e,t,n);return 0===t&&0===n.length||this.notifyArraySplice(e,n,a),this.dehanceValues(a)},e.prototype.spliceItemsIntoValues=function(e,t,n){var r;if(n.length<1e4)return(r=this.values).splice.apply(r,i([e,t],n));var o=this.values.slice(e,e+t);return this.values=this.values.slice(0,e).concat(n,this.values.slice(e+t)),o},e.prototype.notifyArrayChildUpdate=function(e,t,n){var r=!this.owned&&!1,o=Dt(this),i=o||r?{object:this.proxy,type:"update",index:e,newValue:t,oldValue:n}:null;this.atom.reportChanged(),o&&Ct(this,i)},e.prototype.notifyArraySplice=function(e,t,n){var r=!this.owned&&!1,o=Dt(this),i=o||r?{object:this.proxy,type:"splice",index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;this.atom.reportChanged(),o&&Ct(this,i)},e}(),It={intercept:function(e){return this[A].intercept(e)},observe:function(e,t){return void 0===t&&(t=!1),this[A].observe(e,t)},clear:function(){return this.splice(0)},replace:function(e){var t=this[A];return t.spliceWithArray(0,t.values.length,e)},toJS:function(){return this.slice()},toJSON:function(){return this.toJS()},splice:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var o=this[A];switch(arguments.length){case 0:return[];case 1:return o.spliceWithArray(e);case 2:return o.spliceWithArray(e,t)}return o.spliceWithArray(e,t,n)},spliceWithArray:function(e,t,n){return this[A].spliceWithArray(e,t,n)},push:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this[A];return n.spliceWithArray(n.values.length,0,e),n.values.length},pop:function(){return this.splice(Math.max(this[A].values.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this[A];return n.spliceWithArray(0,0,e),n.values.length},reverse:function(){var e=this.slice();return e.reverse.apply(e,arguments)},sort:function(e){var t=this.slice();return t.sort.apply(t,arguments)},remove:function(e){var t=this[A],n=t.dehanceValues(t.values).indexOf(e);return n>-1&&(this.splice(n,1),!0)},get:function(e){var t=this[A];if(t){if(e<t.values.length)return t.atom.reportObserved(),t.dehanceValue(t.values[e]);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")}},set:function(e,t){var n=this[A],r=n.values;if(e<r.length){te(n.atom);var o=r[e];if(_t(n)){var i=xt(n,{type:"update",object:n.proxy,index:e,newValue:t});if(!i)return;t=i.newValue}(t=n.enhancer(t,o))!==o&&(r[e]=t,n.notifyArrayChildUpdate(e,t,o))}else{if(e!==r.length)throw new Error("[mobx.array] Index out of bounds, "+e+" is larger than "+r.length);n.spliceWithArray(e,0,[t])}}};["concat","every","filter","forEach","indexOf","join","lastIndexOf","map","reduce","reduceRight","slice","some","toString","toLocaleString"].forEach(function(e){It[e]=function(){var t=this[A];t.atom.reportObserved();var n=t.dehanceValues(t.values);return n[e].apply(n,arguments)}});var Pt,Nt=b("ObservableArrayAdministration",Tt);function Vt(e){return d(e)&&Nt(e[A])}var kt,Bt={},Lt=function(){function e(e,t,n){if(void 0===t&&(t=N),void 0===n&&(n="ObservableMap@"+c()),this.enhancer=t,this.name=n,this[Pt]=Bt,this._keysAtom=x(this.name+".keys()"),this[Symbol.toStringTag]="Map","function"!=typeof Map)throw new Error("mobx.map requires Map polyfill for the current browser. Check babel-polyfill or core-js/es6/map.js");this._data=new Map,this._hasMap=new Map,this.merge(e)}return e.prototype._has=function(e){return this._data.has(e)},e.prototype.has=function(e){var t=this;if(!je.trackingDerivation)return this._has(e);var n=this._hasMap.get(e);if(!n){var r=n=new ge(this._has(e),V,this.name+"."+O(e)+"?",!1);this._hasMap.set(e,r),Ze(r,function(){return t._hasMap.delete(e)})}return n.get()},e.prototype.set=function(e,t){var n=this._has(e);if(_t(this)){var r=xt(this,{type:n?"update":"add",object:this,newValue:t,name:e});if(!r)return this;t=r.newValue}return n?this._updateValue(e,t):this._addValue(e,t),this},e.prototype.delete=function(e){var t=this;if(_t(this)&&!(r=xt(this,{type:"delete",object:this,name:e})))return!1;if(this._has(e)){var n=Dt(this),r=n?{type:"delete",object:this,oldValue:this._data.get(e).value,name:e}:null;return mt(function(){t._keysAtom.reportChanged(),t._updateHasMapEntry(e,!1),t._data.get(e).setNewValue(void 0),t._data.delete(e)}),n&&Ct(this,r),!0}return!1},e.prototype._updateHasMapEntry=function(e,t){var n=this._hasMap.get(e);n&&n.setNewValue(t)},e.prototype._updateValue=function(e,t){var n=this._data.get(e);if((t=n.prepareNewValue(t))!==je.UNCHANGED){var r=Dt(this),o=r?{type:"update",object:this,oldValue:n.value,name:e,newValue:t}:null;0,n.setNewValue(t),r&&Ct(this,o)}},e.prototype._addValue=function(e,t){var n=this;te(this._keysAtom),mt(function(){var r=new ge(t,n.enhancer,n.name+"."+O(e),!1);n._data.set(e,r),t=r.value,n._updateHasMapEntry(e,!0),n._keysAtom.reportChanged()});var r=Dt(this);r&&Ct(this,r?{type:"add",object:this,name:e,newValue:t}:null)},e.prototype.get=function(e){return this.has(e)?this.dehanceValue(this._data.get(e).get()):this.dehanceValue(void 0)},e.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},e.prototype.keys=function(){return this._keysAtom.reportObserved(),this._data.keys()},e.prototype.values=function(){var e=this,t=0,n=Array.from(this.keys());return rn({next:function(){return t<n.length?{value:e.get(n[t++]),done:!1}:{done:!0}}})},e.prototype.entries=function(){var e=this,t=0,n=Array.from(this.keys());return rn({next:function(){if(t<n.length){var r=n[t++];return{value:[r,e.get(r)],done:!1}}return{done:!0}}})},e.prototype[(Pt=A,Symbol.iterator)]=function(){return this.entries()},e.prototype.forEach=function(e,t){var n,i;try{for(var a=r(this),s=a.next();!s.done;s=a.next()){var u=o(s.value,2),c=u[0],l=u[1];e.call(t,l,c,this)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}},e.prototype.merge=function(e){var t=this;return Mt(e)&&(e=e.toJS()),mt(function(){v(e)?w(e).forEach(function(n){return t.set(n,e[n])}):Array.isArray(e)?e.forEach(function(e){var n=o(e,2),r=n[0],i=n[1];return t.set(r,i)}):g(e)?(e.constructor!==Map&&l("Cannot initialize from classes that inherit from Map: "+e.constructor.name),e.forEach(function(e,n){return t.set(n,e)})):null!=e&&l("Cannot initialize map from "+e)}),this},e.prototype.clear=function(){var e=this;mt(function(){oe(function(){var t,n;try{for(var o=r(e.keys()),i=o.next();!i.done;i=o.next()){var a=i.value;e.delete(a)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}})})},e.prototype.replace=function(e){var t=this;return mt(function(){var n,r=v(n=e)?Object.keys(n):Array.isArray(n)?n.map(function(e){return o(e,1)[0]}):g(n)||Mt(n)?Array.from(n.keys()):l("Cannot get keys from '"+n+"'");Array.from(t.keys()).filter(function(e){return-1===r.indexOf(e)}).forEach(function(e){return t.delete(e)}),t.merge(e)}),this},Object.defineProperty(e.prototype,"size",{get:function(){return this._keysAtom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),e.prototype.toPOJO=function(){var e,t,n={};try{for(var i=r(this),a=i.next();!a.done;a=i.next()){var s=o(a.value,2),u=s[0],c=s[1];n["symbol"==typeof u?u:O(u)]=c}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}return n},e.prototype.toJS=function(){return new Map(this)},e.prototype.toJSON=function(){return this.toPOJO()},e.prototype.toString=function(){var e=this;return this.name+"[{ "+Array.from(this.keys()).map(function(t){return O(t)+": "+e.get(t)}).join(", ")+" }]"},e.prototype.observe=function(e,t){return jt(this,e)},e.prototype.intercept=function(e){return Et(this,e)},e}(),Mt=b("ObservableMap",Lt),Ut={},Gt=function(){function e(e,t,n){if(void 0===t&&(t=N),void 0===n&&(n="ObservableSet@"+c()),this.name=n,this[kt]=Ut,this._data=new Set,this._atom=x(this.name),this[Symbol.toStringTag]="Set","function"!=typeof Set)throw new Error("mobx.set requires Set polyfill for the current browser. Check babel-polyfill or core-js/es6/set.js");this.enhancer=function(e,r){return t(e,r,n)},e&&this.replace(e)}return e.prototype.dehanceValue=function(e){return void 0!==this.dehancer?this.dehancer(e):e},e.prototype.clear=function(){var e=this;mt(function(){oe(function(){var t,n;try{for(var o=r(e._data.values()),i=o.next();!i.done;i=o.next()){var a=i.value;e.delete(a)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}})})},e.prototype.forEach=function(e,t){var n,o;try{for(var i=r(this),a=i.next();!a.done;a=i.next()){var s=a.value;e.call(t,s,s,this)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}},Object.defineProperty(e.prototype,"size",{get:function(){return this._atom.reportObserved(),this._data.size},enumerable:!0,configurable:!0}),e.prototype.add=function(e){var t=this;if((te(this._atom),_t(this))&&!(r=xt(this,{type:"add",object:this,newValue:e})))return this;if(!this.has(e)){mt(function(){t._data.add(t.enhancer(e,void 0)),t._atom.reportChanged()});var n=Dt(this),r=n?{type:"add",object:this,newValue:e}:null;0,n&&Ct(this,r)}return this},e.prototype.delete=function(e){var t=this;if(_t(this)&&!(r=xt(this,{type:"delete",object:this,oldValue:e})))return!1;if(this.has(e)){var n=Dt(this),r=n?{type:"delete",object:this,oldValue:e}:null;return mt(function(){t._atom.reportChanged(),t._data.delete(e)}),n&&Ct(this,r),!0}return!1},e.prototype.has=function(e){return this._atom.reportObserved(),this._data.has(this.dehanceValue(e))},e.prototype.entries=function(){var e=0,t=Array.from(this.keys()),n=Array.from(this.values());return rn({next:function(){var r=e;return e+=1,r<n.length?{value:[t[r],n[r]],done:!1}:{done:!0}}})},e.prototype.keys=function(){return this.values()},e.prototype.values=function(){this._atom.reportObserved();var e=this,t=0,n=Array.from(this._data.values());return rn({next:function(){return t<n.length?{value:e.dehanceValue(n[t++]),done:!1}:{done:!0}}})},e.prototype.replace=function(e){var t=this;return qt(e)&&(e=e.toJS()),mt(function(){Array.isArray(e)?(t.clear(),e.forEach(function(e){return t.add(e)})):m(e)?(t.clear(),e.forEach(function(e){return t.add(e)})):null!=e&&l("Cannot initialize set from "+e)}),this},e.prototype.observe=function(e,t){return jt(this,e)},e.prototype.intercept=function(e){return Et(this,e)},e.prototype.toJS=function(){return new Set(this)},e.prototype.toString=function(){return this.name+"[ "+Array.from(this).join(", ")+" ]"},e.prototype[(kt=A,Symbol.iterator)]=function(){return this.values()},e}(),qt=b("ObservableSet",Gt),Kt=function(){function e(e,t,n,r){void 0===t&&(t=new Map),this.target=e,this.values=t,this.name=n,this.defaultEnhancer=r,this.keysAtom=new _(n+".keys")}return e.prototype.read=function(e){return this.values.get(e).get()},e.prototype.write=function(e,t){var n=this.target,r=this.values.get(e);if(r instanceof we)r.set(t);else{if(_t(this)){if(!(i=xt(this,{type:"update",object:this.proxy||n,name:e,newValue:t})))return;t=i.newValue}if((t=r.prepareNewValue(t))!==je.UNCHANGED){var o=Dt(this),i=o?{type:"update",object:this.proxy||n,oldValue:r.value,name:e,newValue:t}:null;0,r.setNewValue(t),o&&Ct(this,i)}}},e.prototype.has=function(e){var t=this.pendingKeys||(this.pendingKeys=new Map),n=t.get(e);if(n)return n.get();var r=!!this.values.get(e);return n=new ge(r,V,this.name+"."+O(e)+"?",!1),t.set(e,n),n.get()},e.prototype.addObservableProp=function(e,t,n){void 0===n&&(n=this.defaultEnhancer);var r=this.target;if(_t(this)){var o=xt(this,{object:this.proxy||r,name:e,type:"add",newValue:t});if(!o)return;t=o.newValue}var i=new ge(t,n,this.name+"."+O(e),!1);this.values.set(e,i),t=i.value,Object.defineProperty(r,e,function(e){return Ht[e]||(Ht[e]={configurable:!0,enumerable:!0,get:function(){return this[A].read(e)},set:function(t){this[A].write(e,t)}})}(e)),this.notifyPropertyAddition(e,t)},e.prototype.addComputedProp=function(e,t,n){var r,o,i,a=this.target;n.name=n.name||this.name+"."+O(t),this.values.set(t,new we(n)),(e===a||(r=e,o=t,!(i=Object.getOwnPropertyDescriptor(r,o))||!1!==i.configurable&&!1!==i.writable))&&Object.defineProperty(e,t,function(e){return Wt[e]||(Wt[e]={configurable:je.computedConfigurable,enumerable:!1,get:function(){return Jt(this).read(e)},set:function(t){Jt(this).write(e,t)}})}(t))},e.prototype.remove=function(e){if(this.values.has(e)){var t=this.target;if(_t(this))if(!(a=xt(this,{object:this.proxy||t,name:e,type:"remove"})))return;try{Ie();var n=Dt(this),r=this.values.get(e),o=r&&r.get();if(r&&r.set(void 0),this.keysAtom.reportChanged(),this.values.delete(e),this.pendingKeys){var i=this.pendingKeys.get(e);i&&i.set(!1)}delete this.target[e];var a=n?{type:"remove",object:this.proxy||t,oldValue:o,name:e}:null;0,n&&Ct(this,a)}finally{Pe()}}},e.prototype.illegalAccess=function(e,t){console.warn("Property '"+t+"' of '"+e+"' was accessed through the prototype chain. Use 'decorate' instead to declare the prop or access it statically through it's owner")},e.prototype.observe=function(e,t){return jt(this,e)},e.prototype.intercept=function(e){return Et(this,e)},e.prototype.notifyPropertyAddition=function(e,t){var n=Dt(this),r=n?{type:"add",object:this.proxy||this.target,name:e,newValue:t}:null;if(n&&Ct(this,r),this.pendingKeys){var o=this.pendingKeys.get(e);o&&o.set(!0)}this.keysAtom.reportChanged()},e.prototype.getKeys=function(){var e,t;this.keysAtom.reportObserved();var n=[];try{for(var i=r(this.values),a=i.next();!a.done;a=i.next()){var s=o(a.value,2),u=s[0];s[1]instanceof ge&&n.push(u)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}return n},e}();function zt(e,t,n){if(void 0===t&&(t=""),void 0===n&&(n=N),Object.prototype.hasOwnProperty.call(e,A))return e[A];v(e)||(t=(e.constructor.name||"ObservableObject")+"@"+c()),t||(t="ObservableObject@"+c());var r=new Kt(e,new Map,O(t),n);return y(e,A,r),r}var Ht=Object.create(null),Wt=Object.create(null);function Jt(e){var t=e[A];return t||(I(e),e[A])}var Xt=b("ObservableObjectAdministration",Kt);function Yt(e){return!!d(e)&&(I(e),Xt(e[A]))}function Ft(e,t){if("object"==typeof e&&null!==e){if(Vt(e))return void 0!==t&&l(!1),e[A].atom;if(qt(e))return e[A];if(Mt(e)){var n=e;return void 0===t?n._keysAtom:((r=n._data.get(t)||n._hasMap.get(t))||l(!1),r)}var r;if(I(e),t&&!e[A]&&e[t],Yt(e))return t?((r=e[A].values.get(t))||l(!1),r):l(!1);if(E(e)||Oe(e)||Ge(e))return e}else if("function"==typeof e&&Ge(e[A]))return e[A];return l(!1)}function $t(e,t){return e||l("Expecting some object"),void 0!==t?$t(Ft(e,t)):E(e)||Oe(e)||Ge(e)?e:Mt(e)||qt(e)?e:(I(e),e[A]?e[A]:void l(!1))}function Qt(e,t){return(void 0!==t?Ft(e,t):Yt(e)||Mt(e)||qt(e)?$t(e):Ft(e)).name}var Zt=Object.prototype.toString;function en(e,t,n){return void 0===n&&(n=-1),function e(t,n,r,o,i){if(t===n)return 0!==t||1/t==1/n;if(null==t||null==n)return!1;if(t!=t)return n!=n;var a=typeof t;if("function"!==a&&"object"!==a&&"object"!=typeof n)return!1;var s=Zt.call(t);if(s!==Zt.call(n))return!1;switch(s){case"[object RegExp]":case"[object String]":return""+t==""+n;case"[object Number]":return+t!=+t?+n!=+n:0==+t?1/+t==1/n:+t==+n;case"[object Date]":case"[object Boolean]":return+t==+n;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(t)===Symbol.valueOf.call(n);case"[object Map]":case"[object Set]":r>=0&&r++}t=tn(t);n=tn(n);var u="[object Array]"===s;if(!u){if("object"!=typeof t||"object"!=typeof n)return!1;var c=t.constructor,l=n.constructor;if(c!==l&&!("function"==typeof c&&c instanceof c&&"function"==typeof l&&l instanceof l)&&"constructor"in t&&"constructor"in n)return!1}if(0===r)return!1;r<0&&(r=-1);o=o||[];i=i||[];var f=o.length;for(;f--;)if(o[f]===t)return i[f]===n;o.push(t);i.push(n);if(u){if((f=t.length)!==n.length)return!1;for(;f--;)if(!e(t[f],n[f],r-1,o,i))return!1}else{var h=Object.keys(t),p=void 0;if(f=h.length,Object.keys(n).length!==f)return!1;for(;f--;)if(p=h[f],!nn(n,p)||!e(t[p],n[p],r-1,o,i))return!1}o.pop();i.pop();return!0}(e,t,n)}function tn(e){return Vt(e)?e.slice():g(e)||Mt(e)?Array.from(e.entries()):m(e)||qt(e)?Array.from(e.entries()):e}function nn(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function rn(e){return e[Symbol.iterator]=on,e}function on(){return this}if("undefined"==typeof Proxy||"undefined"==typeof Symbol)throw new Error("[mobx] MobX 5+ requires Proxy and Symbol objects. If your environment doesn't support Symbol or Proxy objects, please downgrade to MobX 4. For React Native Android, consider upgrading JSCore.");"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:ze,extras:{getDebugName:Qt},$mobx:A}),e.$mobx=A,e.FlowCancellationError=ut,e.ObservableMap=Lt,e.ObservableSet=Gt,e.Reaction=ke,e._allowStateChanges=function(e,t){var n,r=ye(e);try{n=t()}finally{be(r)}return n},e._allowStateChangesInsideComputed=function(e){var t,n=je.computationDepth;je.computationDepth=0;try{t=e()}finally{je.computationDepth=n}return t},e._allowStateReadsEnd=ue,e._allowStateReadsStart=se,e._endAction=ve,e._getAdministration=$t,e._getGlobalState=function(){return je},e._interceptReads=function(e,t,n){var r;if(Mt(e)||Vt(e)||me(e))r=$t(e);else{if(!Yt(e))return l(!1);if("string"!=typeof t)return l(!1);r=$t(e,t)}return void 0!==r.dehancer?l(!1):(r.dehancer="function"==typeof t?t:n,function(){r.dehancer=void 0})},e._isComputingDerivation=function(){return null!==je.trackingDerivation},e._resetGlobalState=function(){var e=new Ae;for(var t in e)-1===Se.indexOf(t)&&(je[t]=e[t]);je.allowStateChanges=!je.enforceActions},e._startAction=de,e.action=Je,e.autorun=Ye,e.comparer=D,e.computed=$,e.configure=function(e){var t=e.enforceActions,n=e.computedRequiresReaction,r=e.computedConfigurable,o=e.disableErrorBoundaries,i=e.reactionScheduler,a=e.reactionRequiresObservable,s=e.observableRequiresReaction;if(!0===e.isolateGlobalState&&((je.pendingReactions.length||je.inBatch||je.isRunningReactions)&&l("isolateGlobalState should be called before MobX is running any reactions"),De=!0,xe&&(0==--Ee().__mobxInstanceCount&&(Ee().__mobxGlobals=void 0),je=new Ae)),void 0!==t){var u=void 0;switch(t){case!0:case"observed":u=!0;break;case!1:case"never":u=!1;break;case"strict":case"always":u="strict";break;default:l("Invalid value for 'enforceActions': '"+t+"', expected 'never', 'always' or 'observed'")}je.enforceActions=u,je.allowStateChanges=!0!==u&&"strict"!==u}void 0!==n&&(je.computedRequiresReaction=!!n),void 0!==a&&(je.reactionRequiresObservable=!!a),void 0!==s&&(je.observableRequiresReaction=!!s,je.allowStateReads=!je.observableRequiresReaction),void 0!==r&&(je.computedConfigurable=!!r),void 0!==o&&(!0===o&&console.warn("WARNING: Debug feature only. MobX will NOT recover from errors when `disableErrorBoundaries` is enabled."),je.disableErrorBoundaries=!!o),i&&qe(i)},e.createAtom=x,e.decorate=function(e,t){var n="function"==typeof e?e.prototype:e,r=function(e){var r=t[e];Array.isArray(r)||(r=[r]);var o=Object.getOwnPropertyDescriptor(n,e),i=r.reduce(function(t,r){return r(n,e,t)},o);i&&Object.defineProperty(n,e,i)};for(var o in t)r(o);return e},e.entries=function(e){return Yt(e)?pt(e).map(function(t){return[t,e[t]]}):Mt(e)?pt(e).map(function(t){return[t,e.get(t)]}):qt(e)?Array.from(e.entries()):Vt(e)?e.map(function(e,t){return[t,e]}):l(!1)},e.extendObservable=tt,e.flow=function(e){1!==arguments.length&&l("Flow expects 1 argument and cannot be used as decorator");var t=e.name||"<unnamed flow>";return function(){var n,r=arguments,o=++st,i=Je(t+" - runid: "+o+" - init",e).apply(this,r),a=void 0,s=new Promise(function(e,r){var s=0;function u(e){var n;a=void 0;try{n=Je(t+" - runid: "+o+" - yield "+s++,i.next).call(i,e)}catch(e){return r(e)}l(n)}function c(e){var n;a=void 0;try{n=Je(t+" - runid: "+o+" - yield "+s++,i.throw).call(i,e)}catch(e){return r(e)}l(n)}function l(t){if(!t||"function"!=typeof t.then)return t.done?e(t.value):(a=Promise.resolve(t.value)).then(u,c);t.then(l,r)}n=r,u(void 0)});return s.cancel=Je(t+" - runid: "+o+" - cancel",function(){try{a&&ct(a);var e=i.return(void 0),t=Promise.resolve(e.value);t.then(p,p),ct(t),n(new ut)}catch(e){n(e)}}),s}},e.get=function(e,t){if(vt(e,t))return Yt(e)?e[t]:Mt(e)?e.get(t):Vt(e)?e[t]:l(!1)},e.getAtom=Ft,e.getDebugName=Qt,e.getDependencyTree=ot,e.getObserverTree=function(e,t){return at(Ft(e,t))},e.has=vt,e.intercept=function(e,t,n){return"function"==typeof n?function(e,t,n){return $t(e,t).intercept(n)}(e,t,n):function(e,t){return $t(e).intercept(t)}(e,t)},e.isAction=function(e){return"function"==typeof e&&!0===e.isMobxAction},e.isArrayLike=function(e){return Array.isArray(e)||Vt(e)},e.isBoxedObservable=me,e.isComputed=function(e){return arguments.length>1?l(!1):lt(e)},e.isComputedProp=function(e,t){return"string"!=typeof t?l(!1):lt(e,t)},e.isFlowCancellationError=function(e){return e instanceof ut},e.isObservable=ht,e.isObservableArray=Vt,e.isObservableMap=Mt,e.isObservableObject=Yt,e.isObservableProp=function(e,t){return"string"!=typeof t?l(!1):ft(e,t)},e.isObservableSet=qt,e.keys=pt,e.observable=H,e.observe=function(e,t,n,r){return"function"==typeof n?function(e,t,n,r){return $t(e,t).observe(n,r)}(e,t,n,r):function(e,t,n){return $t(e).observe(t,n)}(e,t,n)},e.onBecomeObserved=Qe,e.onBecomeUnobserved=Ze,e.onReactionError=function(e){return je.globalReactionErrorHandlers.push(e),function(){var t=je.globalReactionErrorHandlers.indexOf(e);t>=0&&je.globalReactionErrorHandlers.splice(t,1)}},e.reaction=function(e,t,n){void 0===n&&(n=u);var r,o,i,a=n.name||"Reaction@"+c(),s=Je(a,n.onError?(r=n.onError,o=t,function(){try{return o.apply(this,arguments)}catch(e){r.call(this,e)}}):t),l=!n.scheduler&&!n.delay,f=$e(n),h=!0,p=!1,d=n.compareStructural?D.structural:n.equals||D.default,v=new ke(a,function(){h||l?y():p||(p=!0,f(y))},n.onError,n.requiresObservable);function y(){if(p=!1,!v.isDisposed){var t=!1;v.track(function(){var n=e(v);t=h||!d(i,n),i=n}),h&&n.fireImmediately&&s(i,v),h||!0!==t||s(i,v),h&&(h=!1)}}return v.schedule(),v.getDisposer()},e.remove=function(e,t){if(Yt(e))e[A].remove(t);else if(Mt(e))e.delete(t);else if(qt(e))e.delete(t);else{if(!Vt(e))return l(!1);"number"!=typeof t&&(t=parseInt(t,10)),f(t>=0,"Not a valid index: '"+t+"'"),e.splice(t,1)}},e.runInAction=function(e,t){return pe("string"==typeof e?e:e.name||"<unnamed action>","function"==typeof e?e:t,this,void 0)},e.set=dt,e.spy=ze,e.toJS=function(e,t){var n;return"boolean"==typeof t&&(t={detectCycles:t}),t||(t=yt),t.detectCycles=void 0===t.detectCycles?!0===t.recurseEverything:!0===t.detectCycles,t.detectCycles&&(n=new Map),function e(t,n,r){if(!n.recurseEverything&&!ht(t))return t;if("object"!=typeof t)return t;if(null===t)return null;if(t instanceof Date)return t;if(me(t))return e(t.get(),n,r);if(ht(t)&&pt(t),!0===n.detectCycles&&null!==t&&r.has(t))return r.get(t);if(Vt(t)||Array.isArray(t)){var o=bt(r,t,[],n),i=t.map(function(t){return e(t,n,r)});o.length=i.length;for(var a=0,s=i.length;a<s;a++)o[a]=i[a];return o}if(qt(t)||Object.getPrototypeOf(t)===Set.prototype){if(!1===n.exportMapsAsObjects){var u=bt(r,t,new Set,n);return t.forEach(function(t){u.add(e(t,n,r))}),u}var c=bt(r,t,[],n);return t.forEach(function(t){c.push(e(t,n,r))}),c}if(Mt(t)||Object.getPrototypeOf(t)===Map.prototype){if(!1===n.exportMapsAsObjects){var l=bt(r,t,new Map,n);return t.forEach(function(t,o){l.set(o,e(t,n,r))}),l}var f=bt(r,t,{},n);return t.forEach(function(t,o){f[o]=e(t,n,r)}),f}var h=bt(r,t,{},n);return w(t).forEach(function(o){h[o]=e(t[o],n,r)}),h}(e,t,n)},e.trace=gt,e.transaction=mt,e.untracked=oe,e.values=function(e){return Yt(e)?pt(e).map(function(t){return e[t]}):Mt(e)?pt(e).map(function(t){return e.get(t)}):qt(e)?Array.from(e.values()):Vt(e)?e.slice():l(!1)},e.when=function(e,t,r){return 1===arguments.length||t&&"object"==typeof t?function(e,t){var r,o=new Promise(function(o,i){var a=wt(e,o,n(n({},t),{onError:i}));r=function(){a(),i("WHEN_CANCELLED")}});return o.cancel=r,o}(e,t):wt(e,t,r||{})},Object.defineProperty(e,"__esModule",{value:!0})});
|