mobx 5.10.1 → 5.14.0

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.
Files changed (58) hide show
  1. package/CHANGELOG.md +29 -1
  2. package/LICENSE +0 -0
  3. package/README.md +66 -52
  4. package/lib/api/action.d.ts +0 -0
  5. package/lib/api/actiondecorator.d.ts +0 -0
  6. package/lib/api/autorun.d.ts +5 -0
  7. package/lib/api/become-observed.d.ts +0 -0
  8. package/lib/api/computed.d.ts +0 -0
  9. package/lib/api/configure.d.ts +11 -0
  10. package/lib/api/decorate.d.ts +0 -0
  11. package/lib/api/extendobservable.d.ts +0 -0
  12. package/lib/api/extras.d.ts +0 -0
  13. package/lib/api/flow.d.ts +0 -0
  14. package/lib/api/intercept-read.d.ts +0 -0
  15. package/lib/api/intercept.d.ts +0 -0
  16. package/lib/api/iscomputed.d.ts +0 -0
  17. package/lib/api/isobservable.d.ts +0 -0
  18. package/lib/api/object-api.d.ts +2 -2
  19. package/lib/api/observable.d.ts +0 -0
  20. package/lib/api/observabledecorator.d.ts +0 -0
  21. package/lib/api/observe.d.ts +0 -0
  22. package/lib/api/tojs.d.ts +0 -0
  23. package/lib/api/trace.d.ts +0 -0
  24. package/lib/api/transaction.d.ts +0 -0
  25. package/lib/api/when.d.ts +5 -0
  26. package/lib/core/action.d.ts +13 -0
  27. package/lib/core/atom.d.ts +2 -2
  28. package/lib/core/computedvalue.d.ts +0 -0
  29. package/lib/core/derivation.d.ts +7 -0
  30. package/lib/core/globalstate.d.ts +22 -0
  31. package/lib/core/observable.d.ts +0 -0
  32. package/lib/core/reaction.d.ts +2 -1
  33. package/lib/core/spy.d.ts +0 -0
  34. package/lib/internal.d.ts +0 -0
  35. package/lib/mobx.d.ts +1 -1
  36. package/lib/mobx.es6.js +471 -382
  37. package/lib/mobx.js +485 -371
  38. package/lib/mobx.js.flow +20 -2
  39. package/lib/mobx.min.js +1 -1
  40. package/lib/mobx.module.js +485 -373
  41. package/lib/mobx.umd.js +485 -371
  42. package/lib/mobx.umd.min.js +1 -1
  43. package/lib/types/dynamicobject.d.ts +0 -0
  44. package/lib/types/intercept-utils.d.ts +0 -0
  45. package/lib/types/listen-utils.d.ts +0 -0
  46. package/lib/types/modifiers.d.ts +0 -0
  47. package/lib/types/observablearray.d.ts +0 -0
  48. package/lib/types/observablemap.d.ts +0 -0
  49. package/lib/types/observableobject.d.ts +0 -0
  50. package/lib/types/observableset.d.ts +0 -0
  51. package/lib/types/observablevalue.d.ts +0 -0
  52. package/lib/types/type-utils.d.ts +0 -0
  53. package/lib/utils/comparer.d.ts +0 -0
  54. package/lib/utils/decorators.d.ts +0 -0
  55. package/lib/utils/eq.d.ts +0 -0
  56. package/lib/utils/iterable.d.ts +0 -0
  57. package/lib/utils/utils.d.ts +0 -0
  58. package/package.json +7 -6
@@ -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}var o="An invariant failed, however the error is obfuscated because this is an production build.",a=[];Object.freeze(a);var s={};function u(){return++Oe.mobxGuid}function c(e){throw l(!1,e),"X"}function l(e,t){if(!e)throw new Error("[mobx] "+(t||o))}Object.freeze(s);function f(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var h=function(){};function p(e){return null!==e&&"object"==typeof e}function d(e){if(null===e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}function v(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function y(e,t){var n="isMobX"+e;return t.prototype[n]=!0,function(e){return p(e)&&!0===e[n]}}function b(e){return e instanceof Map}function g(e){return e instanceof Set}function m(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 w(e){return null===e?null:"object"==typeof e?""+e:e}var S=Symbol("mobx administration"),A=function(){function t(t){void 0===t&&(t="Atom@"+u()),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 De(this)},t.prototype.reportChanged=function(){Ee(),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!==te.NONE&&je(n,t),n.onBecomeStale()),n.dependenciesState=e.IDerivationState.STALE})}(this),xe()},t.prototype.toString=function(){return this.name},t}(),_=y("Atom",A);function E(e,t,n){void 0===t&&(t=h),void 0===n&&(n=h);var r=new A(e);return t!==h&&We(r,t),n!==h&&qe(r,n),r}var x={identity:function(e,t){return e===t},structural:function(e,t){return qt(e,t)},default:function(e,t){return Object.is(e,t)}},D=Symbol("mobx did run lazy initializers"),j=Symbol("mobx pending decorators"),C={},T={};function I(e){if(!0!==e[D]){var t=e[j];if(t)for(var n in v(e,D,!0),t){var r=t[n];r.propertyCreator(e,r.prop,r.descriptor,r.decoratorTarget,r.decoratorArguments)}}}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,j)){var u=i[j];v(i,j,n({},u))}return i[j][o]={prop:o,propertyCreator:t,descriptor:a,decoratorTarget:i,decoratorArguments:r},function(e,t){var n=t?C: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]||4===i.length&&!0===i[3]?(r=a,o.apply(null,arguments)):(r=Array.prototype.slice.call(arguments),o)}}function N(e,t,n){return it(e)?e:Array.isArray(e)?H.array(e,{name:n}):d(e)?H.object(e,void 0,{name:n}):b(e)?H.map(e,{name:n}):g(e)?H.set(e,{name:n}):e}function V(e){return e}function k(e){l(e);var t=P(!0,function(t,n,r,i,o){var a=r?r.initializer?r.initializer.call(t):r.value:void 0;Rt(t).addObservableProp(n,a,e)}),n=("undefined"!=typeof process&&process.env,t);return n.enhancer=e,n}var R={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function B(e){return null==e?R:"string"==typeof e?{name:e,deep:!0,proxy:!0}:e}Object.freeze(R);var L=k(N),M=k(function(e,t,n){return null==e?e:Gt(e)||Dt(e)||It(e)||Vt(e)?e:Array.isArray(e)?H.array(e,{name:n,deep:!1}):d(e)?H.object(e,void 0,{name:n,deep:!1}):b(e)?H.map(e,{name:n,deep:!1}):g(e)?H.set(e,{name:n,deep:!1}):c(!1)}),U=k(V),G=k(function(e,t,n){return qt(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=B(t);return new ne(e,K(n),n.name,!0,n.equals)},array:function(e,t){arguments.length>2&&W("array");var n=B(t);return function(e,t,n,r){void 0===n&&(n="ObservableArray@"+u());void 0===r&&(r=!1);var i=new At(n,t,r);o=i.values,a=S,s=i,Object.defineProperty(o,a,{enumerable:!1,writable:!1,configurable:!0,value:s});var o,a,s;var c=new Proxy(i.values,St);if(i.proxy=c,e&&e.length){var l=Q(!0);i.spliceWithArray(0,0,e),Z(l)}return c}(e,K(n),n.name)},map:function(e,t){arguments.length>2&&W("map");var n=B(t);return new Tt(e,K(n),n.name)},set:function(e,t){arguments.length>2&&W("set");var n=B(t);return new Nt(e,K(n),n.name)},object:function(e,t,n){"string"==typeof arguments[1]&&W("object");var r=B(n);if(!1===r.proxy)return Xe({},e,t,r);var i=Ye(r),o=function(e){var t=new Proxy(e,vt);return e[S].proxy=t,t}(Xe({},void 0,void 0,r));return Fe(o,e,t,i),o},ref:U,shallow:M,deep:L,struct:G},H=function(e,t,n){if("string"==typeof arguments[1])return L.apply(null,arguments);if(it(e))return e;var r=d(e)?H.object(e,t,n):Array.isArray(e)?H.array(e,t):b(e)?H.map(e,t):g(e)?H.set(e,t):e;if(r!==e)return r;c(!1)};function W(e){c("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 q=P(!1,function(e,t,r,i,o){var a=r.get,s=r.set,u=o[0]||{};Rt(e).addComputedProp(e,t,n({get:a,set:s,context:e},u))}),J=q({equals:x.structural}),X=function(e,t,n){if("string"==typeof t)return q.apply(null,arguments);if(null!==e&&"object"==typeof e&&1===arguments.length)return q.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 ie(r)};function Y(e,t,n){var r=function(){return F(e,t,n||this,arguments)};return r.isMobxAction=!0,r}function F(e,t,n,r){var i=function(e,t,n,r){var i=Re(),o=pe();Ee();var a=Q(!0);return{prevDerivation:o,prevAllowStateChanges:a,notifySpy:i,startTime:0}}(),o=!0;try{var a=t.apply(n,r);return o=!1,a}finally{o?(Oe.suppressReactionErrors=o,$(i),Oe.suppressReactionErrors=!1):$(i)}}function $(e){Z(e.prevAllowStateChanges),xe(),de(e.prevDerivation),e.notifySpy}function Q(e){var t=Oe.allowStateChanges;return Oe.allowStateChanges=e,t}function Z(e){Oe.allowStateChanges=e}X.struct=J;var ee,te,ne=function(e){function n(t,n,r,i,o){void 0===r&&(r="ObservableValue@"+u()),void 0===i&&(i=!0),void 0===o&&(o=x.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&&Re(),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))!==Oe.UNCHANGED){Re();0,this.setNewValue(e)}},n.prototype.prepareNewValue=function(e){if(ce(this),yt(this)){var t=gt(this,{object:this,type:"update",newValue:e});if(!t)return Oe.UNCHANGED;e=t.newValue}return e=this.enhancer(e,this.value,this.name),this.equals(this.value,e)?Oe.UNCHANGED:e},n.prototype.setNewValue=function(e){var t=this.value;this.value=e,this.reportChanged(),mt(this)&&wt(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 bt(this,e)},n.prototype.observe=function(e,t){return t&&e({object:this,type:"update",newValue:this.value,oldValue:void 0}),Ot(this,e)},n.prototype.toJSON=function(){return this.get()},n.prototype.toString=function(){return this.name+"["+this.value+"]"},n.prototype.valueOf=function(){return w(this.get())},n.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},n}(A),re=y("ObservableValue",ne),ie=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="#"+u(),this.value=new ae(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=te.NONE,this.derivation=t.get,this.name=t.name||"ComputedValue@"+u(),t.set&&(this.setter=Y(this.name+"-setter",t.set)),this.equals=t.equals||(t.compareStructural||t.struct?x.structural:x.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!==te.NONE&&je(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&&c("Cycle detected in computation "+this.name+": "+this.derivation),0!==Oe.inBatch||0!==this.observers.size||this.keepAlive?(De(this),ue(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)):ue(this)&&(this.warnAboutUntrackedRead(),Ee(),this.value=this.computeValue(!1),xe());var t=this.value;if(se(t))throw t.cause;return t},t.prototype.peek=function(){var e=this.computeValue(!1);if(se(e))throw e.cause;return e},t.prototype.set=function(e){if(this.setter){l(!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 l(!1,!1)},t.prototype.trackAndCompute=function(){var t=this.value,n=this.dependenciesState===e.IDerivationState.NOT_TRACKING,r=this.computeValue(!0),i=n||se(t)||se(r)||!this.equals(t,r);return i&&(this.value=r),i},t.prototype.computeValue=function(e){var t;if(this.isComputing=!0,Oe.computationDepth++,e)t=le(this,this.derivation,this.scope);else if(!0===Oe.disableErrorBoundaries)t=this.derivation.call(this.scope);else try{t=this.derivation.call(this.scope)}catch(e){t=new ae(e)}return Oe.computationDepth--,this.isComputing=!1,t},t.prototype.suspend=function(){this.keepAlive||(fe(this),this.value=void 0)},t.prototype.observe=function(e,t){var n=this,r=!0,i=void 0;return Ke(function(){var o=n.get();if(!r||t){var a=pe();e({type:"update",object:n,newValue:o,oldValue:i}),de(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 w(this.get())},t.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},t}(),oe=y("ComputedValue",ie);(ee=e.IDerivationState||(e.IDerivationState={}))[ee.NOT_TRACKING=-1]="NOT_TRACKING",ee[ee.UP_TO_DATE=0]="UP_TO_DATE",ee[ee.POSSIBLY_STALE=1]="POSSIBLY_STALE",ee[ee.STALE=2]="STALE",function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"}(te||(te={}));var ae=function(){return function(e){this.cause=e}}();function se(e){return e instanceof ae}function ue(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=pe(),r=t.observing,i=r.length,o=0;o<i;o++){var a=r[o];if(oe(a)){if(Oe.disableErrorBoundaries)a.get();else try{a.get()}catch(e){return de(n),!0}if(t.dependenciesState===e.IDerivationState.STALE)return de(n),!0}}return ve(t),de(n),!1}}function ce(e){var t=e.observers.size>0;Oe.computationDepth>0&&t&&c(!1),Oe.allowStateChanges||!t&&"strict"!==Oe.enforceActions||c(!1)}function le(t,n,r){ve(t),t.newObserving=new Array(t.observing.length+100),t.unboundDepsCount=0,t.runId=++Oe.runId;var i,o=Oe.trackingDerivation;if(Oe.trackingDerivation=t,!0===Oe.disableErrorBoundaries)i=n.call(r);else try{i=n.call(r)}catch(e){i=new ae(e)}return Oe.trackingDerivation=o,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&&Ae(u,t),u.diffValue=0}for(;o--;){var u=r[o];1===u.diffValue&&(u.diffValue=0,Se(u,t))}i!==e.IDerivationState.UP_TO_DATE&&(t.dependenciesState=i,t.onBecomeStale())}(t),i}function fe(t){var n=t.observing;t.observing=[];for(var r=n.length;r--;)Ae(n[r],t);t.dependenciesState=e.IDerivationState.NOT_TRACKING}function he(e){var t=pe();try{return e()}finally{de(t)}}function pe(){var e=Oe.trackingDerivation;return Oe.trackingDerivation=null,e}function de(e){Oe.trackingDerivation=e}function ve(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 ye=["mobxGuid","spyListeners","enforceActions","computedRequiresReaction","disableErrorBoundaries","runId","UNCHANGED"],be=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.enforceActions=!1,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1}}(),ge=!0,me=!1,Oe=function(){var e=we();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(ge=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==(new be).version&&(ge=!1),ge?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new be):(setTimeout(function(){me||c("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")},1),new be)}();function we(){return"undefined"!=typeof window?window:global}function Se(e,t){e.observers.add(t),e.lowestObserverState>t.dependenciesState&&(e.lowestObserverState=t.dependenciesState)}function Ae(e,t){e.observers.delete(t),0===e.observers.size&&_e(e)}function _e(e){!1===e.isPendingUnobservation&&(e.isPendingUnobservation=!0,Oe.pendingUnobservations.push(e))}function Ee(){Oe.inBatch++}function xe(){if(0==--Oe.inBatch){Pe();for(var e=Oe.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 ie&&n.suspend())}Oe.pendingUnobservations=[]}}function De(e){var t=Oe.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&&Oe.inBatch>0&&_e(e),!1)}function je(e,t){if(console.log("[mobx.trace] '"+e.name+"' is invalidated due to a change in: '"+t.name+"'"),e.isTracing===te.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)})}($e(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 ie?e.derivation.toString().replace(/[*]\//g,"/"):"")+"\n\nThe dependencies for this derivation are:\n\n"+n.join("\n")+"\n*/\n ")()}}var Ce=function(){function t(t,n,r){void 0===t&&(t="Reaction@"+u()),this.name=t,this.onInvalidate=n,this.errorHandler=r,this.observing=[],this.newObserving=[],this.dependenciesState=e.IDerivationState.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+u(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=te.NONE}return t.prototype.onBecomeStale=function(){this.schedule()},t.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,Oe.pendingReactions.push(this),Pe())},t.prototype.isScheduled=function(){return this._isScheduled},t.prototype.runReaction=function(){if(!this.isDisposed){if(Ee(),this._isScheduled=!1,ue(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending&&Re()}catch(e){this.reportExceptionInDerivation(e)}}xe()}},t.prototype.track=function(e){if(!this.isDisposed){Ee(),this._isRunning=!0;var t=le(this,e,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&fe(this),se(t)&&this.reportExceptionInDerivation(t.cause),xe()}},t.prototype.reportExceptionInDerivation=function(e){var t=this;if(this.errorHandler)this.errorHandler(e,this);else{if(Oe.disableErrorBoundaries)throw e;var n="[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this+"'";Oe.suppressReactionErrors?console.warn("[mobx] (error in reaction '"+this.name+"' suppressed, fix error of causing action below)"):console.error(n,e),Oe.globalReactionErrorHandlers.forEach(function(n){return n(e,t)})}},t.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(Ee(),fe(this),xe()))},t.prototype.getDisposer=function(){var e=this.dispose.bind(this);return e[S]=this,e},t.prototype.toString=function(){return"Reaction["+this.name+"]"},t.prototype.trace=function(e){void 0===e&&(e=!1),lt(this,e)},t}();var Te=100,Ie=function(e){return e()};function Pe(){Oe.inBatch>0||Oe.isRunningReactions||Ie(Ne)}function Ne(){Oe.isRunningReactions=!0;for(var e=Oe.pendingReactions,t=0;e.length>0;){++t===Te&&(console.error("Reaction doesn't converge to a stable state after "+Te+" 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()}Oe.isRunningReactions=!1}var Ve=y("Reaction",Ce);function ke(e){var t=Ie;Ie=function(n){return e(function(){return t(n)})}}function Re(){return!1}function Be(e){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}function Le(){c(!1)}function Me(e){return function(t,n,r){if(r){if(r.value)return{value:Y(e,r.value),enumerable:!1,configurable:!0,writable:!0};var i=r.initializer;return{enumerable:!1,configurable:!0,writable:!0,initializer:function(){return Y(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){v(this,n,Ue(e,t))}})}}(e).apply(this,arguments)}}var Ue=function(e,t,n,r){return 1===arguments.length&&"function"==typeof e?Y(e.name||"<unnamed action>",e):2===arguments.length&&"function"==typeof t?Y(e,t):1===arguments.length&&"string"==typeof e?Me(e):!0!==r?Me(t).apply(null,arguments):void v(e,t,Y(e.name||t,n.value,this))};function Ge(e,t,n){v(e,t,Y(t,n.bind(e)))}function Ke(e,t){void 0===t&&(t=s);var n,r=t&&t.name||e.name||"Autorun@"+u();if(!t.scheduler&&!t.delay)n=new Ce(r,function(){this.track(a)},t.onError);else{var i=He(t),o=!1;n=new Ce(r,function(){o||(o=!0,i(function(){o=!1,n.isDisposed||n.track(a)}))},t.onError)}function a(){e(n)}return n.schedule(),n.getDisposer()}Ue.bound=function(e,t,n,r){return!0===r?(Ge(e,t,n.value),null):n?{configurable:!0,enumerable:!1,get:function(){return Ge(this,t,n.value||n.initializer.call(this)),this[t]},set:Le}:{enumerable:!1,configurable:!0,set:function(e){Ge(this,t,e)},get:function(){}}};var ze=function(e){return e()};function He(e){return e.scheduler?e.scheduler:e.delay?function(t){return setTimeout(t,e.delay)}:ze}function We(e,t,n){return Je("onBecomeObserved",e,t,n)}function qe(e,t,n){return Je("onBecomeUnobserved",e,t,n)}function Je(e,t,n,r){var i="string"==typeof n?Kt(t,n):Kt(t),o="string"==typeof n?r:n,a=e+"Listeners";return i[a]?i[a].add(o):i[a]=new Set([o]),"function"!=typeof i[e]?c(!1):function(){var e=i[a];e&&(e.delete(o),0===e.size&&delete i[a])}}function Xe(e,t,n,r){var i=Ye(r=B(r));return I(e),Rt(e,r.name,i.enhancer),t&&Fe(e,t,n,i),e}function Ye(e){return e.defaultDecorator||(!1===e.deep?U:L)}function Fe(e,t,n,r){Ee();try{var i=m(t);for(var o in i){var a=i[o],s=Object.getOwnPropertyDescriptor(t,a),u=(n&&a in n?n[a]:s.get?q:r)(e,a,s,!0);u&&Object.defineProperty(e,a,u)}}finally{xe()}}function $e(e,t){return Qe(Kt(e,t))}function Qe(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(Qe)),r}function Ze(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(Ze)),n}var et=0;function tt(e){"function"==typeof e.cancel&&e.cancel()}function nt(e,t){if(null==e)return!1;if(void 0!==t){if(!1===Gt(e))return!1;if(!e[S].values.has(t))return!1;var n=Kt(e,t);return oe(n)}return oe(e)}function rt(e,t){return null!=e&&(void 0!==t?!!Gt(e)&&e[S].values.has(t):Gt(e)||!!e[S]||_(e)||Ve(e)||oe(e))}function it(e){return 1!==arguments.length&&c(!1),rt(e)}function ot(e){return Gt(e)?e[S].getKeys():It(e)?Array.from(e.keys()):Vt(e)?Array.from(e.keys()):Dt(e)?e.map(function(e,t){return t}):c(!1)}function at(e,t,n){if(2!==arguments.length||Vt(e))if(Gt(e)){var r=e[S];r.values.get(t)?r.write(t,n):r.addObservableProp(t,n,r.defaultEnhancer)}else if(It(e))e.set(t,n);else if(Vt(e))e.add(t);else{if(!Dt(e))return c(!1);"number"!=typeof t&&(t=parseInt(t,10)),l(t>=0,"Not a valid index: '"+t+"'"),Ee(),t>=e.length&&(e.length=t+1),e[t]=n,xe()}else{Ee();var i=t;try{for(var o in i)at(e,o,i[o])}finally{xe()}}}function st(e,t){return Gt(e)?zt(e).has(t):It(e)?e.has(t):Vt(e)?e.has(t):Dt(e)?t>=0&&t<e.length:c(!1)}var ut={detectCycles:!0,exportMapsAsObjects:!0,recurseEverything:!1};function ct(e,t,n,r){return r.detectCycles&&e.set(t,n),n}function lt(){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 Oe.trackingDerivation;case 1:return Kt(e[0]);case 2:return Kt(e[0],e[1])}}(e);if(!r)return c(!1);r.isTracing===te.NONE&&console.log("[mobx.trace] '"+r.name+"' tracing enabled"),r.isTracing=n?te.BREAK:te.LOG}function ft(e,t){void 0===t&&(t=void 0),Ee();try{return e.apply(t)}finally{xe()}}function ht(e,t,n){var r;"number"==typeof n.timeout&&(r=setTimeout(function(){if(!o[S].isDisposed){o();var e=new Error("WHEN_TIMEOUT");if(!n.onError)throw e;n.onError(e)}},n.timeout)),n.name=n.name||"When@"+u();var i=Y(n.name+"-effect",t),o=Ke(function(t){e()&&(t.dispose(),r&&clearTimeout(r),i())},n);return o}function pt(e){return e[S]}function dt(e){return"string"==typeof e||"number"==typeof e||"symbol"==typeof e}var vt={has:function(e,t){if(t===S||"constructor"===t||t===D)return!0;var n=pt(e);return dt(t)?n.has(t):t in e},get:function(e,t){if(t===S||"constructor"===t||t===D)return e[t];var n=pt(e),r=n.values.get(t);if(r instanceof A){var i=r.get();return void 0===i&&n.has(t),i}return dt(t)&&n.has(t),e[t]},set:function(e,t,n){return!!dt(t)&&(at(e,t,n),!0)},deleteProperty:function(e,t){return!!dt(t)&&(pt(e).remove(t),!0)},ownKeys:function(e){return pt(e).keysAtom.reportObserved(),Reflect.ownKeys(e)},preventExtensions:function(e){return c("Dynamic observable objects cannot be frozen"),!1}};function yt(e){return void 0!==e.interceptors&&e.interceptors.length>0}function bt(e,t){var n=e.interceptors||(e.interceptors=[]);return n.push(t),f(function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function gt(e,t){var n=pe();try{var r=e.interceptors;if(r)for(var i=0,o=r.length;i<o&&(l(!(t=r[i](t))||t.type,"Intercept handlers should return nothing or a change object"),t);i++);return t}finally{de(n)}}function mt(e){return void 0!==e.changeListeners&&e.changeListeners.length>0}function Ot(e,t){var n=e.changeListeners||(e.changeListeners=[]);return n.push(t),f(function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function wt(e,t){var n=pe(),r=e.changeListeners;if(r){for(var i=0,o=(r=r.slice()).length;i<o;i++)r[i](t);de(n)}}var St={get:function(e,t){return t===S?e[S]:"length"===t?e[S].getArrayLength():"number"==typeof t?_t.get.call(e,t):"string"!=typeof t||isNaN(t)?_t.hasOwnProperty(t)?_t[t]:e[t]:_t.get.call(e,parseInt(t))},set:function(e,t,n){return"length"===t?(e[S].setArrayLength(n),!0):"number"==typeof t?(_t.set.call(e,t,n),!0):!isNaN(t)&&(_t.set.call(e,parseInt(t),n),!0)},preventExtensions:function(e){return c("Observable arrays cannot be frozen"),!1}};var At=function(){function e(e,t,n){this.owned=n,this.values=[],this.proxy=void 0,this.lastKnownLength=0,this.atom=new A(e||"ObservableArray@"+u()),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 bt(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}),Ot(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;ce(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=a),yt(this)){var o=gt(this,{object:this.proxy,type:"splice",index:e,removedCount:t,added:n});if(!o)return a;t=o.removedCount,n=o.added}n=0===n.length?n:n.map(function(e){return r.enhancer(e,void 0)});var s=this.spliceItemsIntoValues(e,t,n);return 0===t&&0===n.length||this.notifyArraySplice(e,n,s),this.dehanceValues(s)},e.prototype.spliceItemsIntoValues=function(e,t,n){var r;if(n.length<1e4)return(r=this.values).splice.apply(r,function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(i(arguments[t]));return e}([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,i=mt(this),o=i||r?{object:this.proxy,type:"update",index:e,newValue:t,oldValue:n}:null;this.atom.reportChanged(),i&&wt(this,o)},e.prototype.notifyArraySplice=function(e,t,n){var r=!this.owned&&!1,i=mt(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&&wt(this,o)},e}(),_t={intercept:function(e){return this[S].intercept(e)},observe:function(e,t){return void 0===t&&(t=!1),this[S].observe(e,t)},clear:function(){return this.splice(0)},replace:function(e){var t=this[S];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[S];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[S].spliceWithArray(e,t,n)},push:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this[S];return n.spliceWithArray(n.values.length,0,e),n.values.length},pop:function(){return this.splice(Math.max(this[S].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[S];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[S],n=t.dehanceValues(t.values).indexOf(e);return n>-1&&(this.splice(n,1),!0)},get:function(e){var t=this[S];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[S],r=n.values;if(e<r.length){ce(n.atom);var i=r[e];if(yt(n)){var o=gt(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){_t[e]=function(){var t=this[S];t.atom.reportObserved();var n=t.dehanceValues(t.values);return n[e].apply(n,arguments)}});var Et,xt=y("ObservableArrayAdministration",At);function Dt(e){return p(e)&&xt(e[S])}var jt,Ct={},Tt=function(){function e(e,t,n){if(void 0===t&&(t=N),void 0===n&&(n="ObservableMap@"+u()),this.enhancer=t,this.name=n,this[Et]=Ct,this._keysAtom=E(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){return this._hasMap.has(e)?this._hasMap.get(e).get():this._updateHasMapEntry(e,!1).get()},e.prototype.set=function(e,t){var n=this._has(e);if(yt(this)){var r=gt(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(yt(this)&&!(r=gt(this,{type:"delete",object:this,name:e})))return!1;if(this._has(e)){var n=mt(this),r=n?{type:"delete",object:this,oldValue:this._data.get(e).value,name:e}:null;return ft(function(){t._keysAtom.reportChanged(),t._updateHasMapEntry(e,!1),t._data.get(e).setNewValue(void 0),t._data.delete(e)}),n&&wt(this,r),!0}return!1},e.prototype._updateHasMapEntry=function(e,t){var n=this._hasMap.get(e);return n?n.setNewValue(t):(n=new ne(t,V,this.name+"."+O(e)+"?",!1),this._hasMap.set(e,n)),n},e.prototype._updateValue=function(e,t){var n=this._data.get(e);if((t=n.prepareNewValue(t))!==Oe.UNCHANGED){var r=mt(this),i=r?{type:"update",object:this,oldValue:n.value,name:e,newValue:t}:null;0,n.setNewValue(t),r&&wt(this,i)}},e.prototype._addValue=function(e,t){var n=this;ce(this._keysAtom),ft(function(){var r=new ne(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=mt(this);r&&wt(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 Ft({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 Ft({next:function(){if(t<n.length){var r=n[t++];return{value:[r,e.get(r)],done:!1}}return{done:!0}}})},e.prototype[(Et=S,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 It(e)&&(e=e.toJS()),ft(function(){d(e)?m(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)}):b(e)?(e.constructor!==Map&&c("Cannot initialize from classes that inherit from Map: "+e.constructor.name),e.forEach(function(e,n){return t.set(n,e)})):null!=e&&c("Cannot initialize map from "+e)}),this},e.prototype.clear=function(){var e=this;ft(function(){he(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 ft(function(){var n,r=d(n=e)?Object.keys(n):Array.isArray(n)?n.map(function(e){return i(e,1)[0]}):b(n)||It(n)?Array.from(n.keys()):c("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 Ot(this,e)},e.prototype.intercept=function(e){return bt(this,e)},e}(),It=y("ObservableMap",Tt),Pt={},Nt=function(){function e(e,t,n){if(void 0===t&&(t=N),void 0===n&&(n="ObservableSet@"+u()),this.name=n,this[jt]=Pt,this._data=new Set,this._atom=E(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;ft(function(){he(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((ce(this._atom),yt(this))&&!(r=gt(this,{type:"add",object:this,newValue:e})))return this;if(!this.has(e)){ft(function(){t._data.add(t.enhancer(e,void 0)),t._atom.reportChanged()});var n=mt(this),r=n?{type:"add",object:this,newValue:e}:null;0,n&&wt(this,r)}return this},e.prototype.delete=function(e){var t=this;if(yt(this)&&!(r=gt(this,{type:"delete",object:this,oldValue:e})))return!1;if(this.has(e)){var n=mt(this),r=n?{type:"delete",object:this,oldValue:e}:null;return ft(function(){t._atom.reportChanged(),t._data.delete(e)}),n&&wt(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 Ft({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 Ft({next:function(){return t<n.length?{value:e.dehanceValue(n[t++]),done:!1}:{done:!0}}})},e.prototype.replace=function(e){var t=this;return Vt(e)&&(e=e.toJS()),ft(function(){Array.isArray(e)?(t.clear(),e.forEach(function(e){return t.add(e)})):g(e)?(t.clear(),e.forEach(function(e){return t.add(e)})):null!=e&&c("Cannot initialize set from "+e)}),this},e.prototype.observe=function(e,t){return Ot(this,e)},e.prototype.intercept=function(e){return bt(this,e)},e.prototype.toJS=function(){return new Set(this)},e.prototype.toString=function(){return this.name+"[ "+Array.from(this).join(", ")+" ]"},e.prototype[(jt=S,Symbol.iterator)]=function(){return this.values()},e}(),Vt=y("ObservableSet",Nt),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 A(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 ie)r.set(t);else{if(yt(this)){if(!(o=gt(this,{type:"update",object:this.proxy||n,name:e,newValue:t})))return;t=o.newValue}if((t=r.prepareNewValue(t))!==Oe.UNCHANGED){var i=mt(this),o=i?{type:"update",object:this.proxy||n,oldValue:r.value,name:e,newValue:t}:null;0,r.setNewValue(t),i&&wt(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 ne(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(yt(this)){var i=gt(this,{object:this.proxy||r,name:e,type:"add",newValue:t});if(!i)return;t=i.newValue}var o=new ne(t,n,this.name+"."+O(e),!1);this.values.set(e,o),t=o.value,Object.defineProperty(r,e,function(e){return Bt[e]||(Bt[e]={configurable:!0,enumerable:!0,get:function(){return this[S].read(e)},set:function(t){this[S].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 ie(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 Lt[e]||(Lt[e]={configurable:!1,enumerable:!1,get:function(){return Mt(this).read(e)},set:function(t){Mt(this).write(e,t)}})}(t))},e.prototype.remove=function(e){if(this.values.has(e)){var t=this.target;if(yt(this))if(!(a=gt(this,{object:this.proxy||t,name:e,type:"remove"})))return;try{Ee();var n=mt(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&&wt(this,a)}finally{xe()}}},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 Ot(this,e)},e.prototype.intercept=function(e){return bt(this,e)},e.prototype.notifyPropertyAddition=function(e,t){var n=mt(this),r=n?{type:"add",object:this.proxy||this.target,name:e,newValue:t}:null;if(n&&wt(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 ne&&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 Rt(e,t,n){if(void 0===t&&(t=""),void 0===n&&(n=N),Object.prototype.hasOwnProperty.call(e,S))return e[S];d(e)||(t=(e.constructor.name||"ObservableObject")+"@"+u()),t||(t="ObservableObject@"+u());var r=new kt(e,new Map,O(t),n);return v(e,S,r),r}var Bt=Object.create(null),Lt=Object.create(null);function Mt(e){var t=e[S];return t||(I(e),e[S])}var Ut=y("ObservableObjectAdministration",kt);function Gt(e){return!!p(e)&&(I(e),Ut(e[S]))}function Kt(e,t){if("object"==typeof e&&null!==e){if(Dt(e))return void 0!==t&&c(!1),e[S].atom;if(Vt(e))return e[S];if(It(e)){var n=e;return void 0===t?n._keysAtom:((r=n._data.get(t)||n._hasMap.get(t))||c(!1),r)}var r;if(I(e),t&&!e[S]&&e[t],Gt(e))return t?((r=e[S].values.get(t))||c(!1),r):c(!1);if(_(e)||oe(e)||Ve(e))return e}else if("function"==typeof e&&Ve(e[S]))return e[S];return c(!1)}function zt(e,t){return e||c("Expecting some object"),void 0!==t?zt(Kt(e,t)):_(e)||oe(e)||Ve(e)?e:It(e)||Vt(e)?e:(I(e),e[S]?e[S]:void c(!1))}function Ht(e,t){return(void 0!==t?Kt(e,t):Gt(e)||It(e)||Vt(e)?zt(e):Kt(e)).name}var Wt=Object.prototype.toString;function qt(e,t){return Jt(e,t)}function Jt(e,t,n,r){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return!1;if(e!=e)return t!=t;var i=typeof e;return("function"===i||"object"===i||"object"==typeof t)&&function(e,t,n,r){e=Xt(e),t=Xt(t);var i=Wt.call(e);if(i!==Wt.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 o="[object Array]"===i;if(!o){if("object"!=typeof e||"object"!=typeof t)return!1;var a=e.constructor,s=t.constructor;if(a!==s&&!("function"==typeof a&&a instanceof a&&"function"==typeof s&&s instanceof s)&&"constructor"in e&&"constructor"in t)return!1}r=r||[];var u=(n=n||[]).length;for(;u--;)if(n[u]===e)return r[u]===t;if(n.push(e),r.push(t),o){if((u=e.length)!==t.length)return!1;for(;u--;)if(!Jt(e[u],t[u],n,r))return!1}else{var c=Object.keys(e),l=void 0;if(u=c.length,Object.keys(t).length!==u)return!1;for(;u--;)if(l=c[u],!Yt(t,l)||!Jt(e[l],t[l],n,r))return!1}return n.pop(),r.pop(),!0}(e,t,n,r)}function Xt(e){return Dt(e)?e.slice():b(e)||It(e)?Array.from(e.entries()):g(e)||Vt(e)?Array.from(e.entries()):e}function Yt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Ft(e){return e[Symbol.iterator]=$t,e}function $t(){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:Be,extras:{getDebugName:Ht},$mobx:S}),e.$mobx=S,e.ObservableMap=Tt,e.ObservableSet=Nt,e.Reaction=Ce,e._allowStateChanges=function(e,t){var n,r=Q(e);try{n=t()}finally{Z(r)}return n},e._allowStateChangesInsideComputed=function(e){var t,n=Oe.computationDepth;Oe.computationDepth=0;try{t=e()}finally{Oe.computationDepth=n}return t},e._getAdministration=zt,e._getGlobalState=function(){return Oe},e._interceptReads=function(e,t,n){var r;if(It(e)||Dt(e)||re(e))r=zt(e);else{if(!Gt(e))return c(!1);if("string"!=typeof t)return c(!1);r=zt(e,t)}return void 0!==r.dehancer?c(!1):(r.dehancer="function"==typeof t?t:n,function(){r.dehancer=void 0})},e._isComputingDerivation=function(){return null!==Oe.trackingDerivation},e._resetGlobalState=function(){var e=new be;for(var t in e)-1===ye.indexOf(t)&&(Oe[t]=e[t]);Oe.allowStateChanges=!Oe.enforceActions},e.action=Ue,e.autorun=Ke,e.comparer=x,e.computed=X,e.configure=function(e){var t=e.enforceActions,n=e.computedRequiresReaction,r=e.disableErrorBoundaries,i=e.reactionScheduler;if(!0===e.isolateGlobalState&&((Oe.pendingReactions.length||Oe.inBatch||Oe.isRunningReactions)&&c("isolateGlobalState should be called before MobX is running any reactions"),me=!0,ge&&(0==--we().__mobxInstanceCount&&(we().__mobxGlobals=void 0),Oe=new be)),void 0!==t){var o=void 0;switch(t){case!0:case"observed":o=!0;break;case!1:case"never":o=!1;break;case"strict":case"always":o="strict";break;default:c("Invalid value for 'enforceActions': '"+t+"', expected 'never', 'always' or 'observed'")}Oe.enforceActions=o,Oe.allowStateChanges=!0!==o&&"strict"!==o}void 0!==n&&(Oe.computedRequiresReaction=!!n),void 0!==r&&(!0===r&&console.warn("WARNING: Debug feature only. MobX will NOT recover from errors when `disableErrorBoundaries` is enabled."),Oe.disableErrorBoundaries=!!r),i&&ke(i)},e.createAtom=E,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 Gt(e)?ot(e).map(function(t){return[t,e[t]]}):It(e)?ot(e).map(function(t){return[t,e.get(t)]}):Vt(e)?Array.from(e.entries()):Dt(e)?e.map(function(e,t){return[t,e]}):c(!1)},e.extendObservable=Xe,e.flow=function(e){1!==arguments.length&&c("Flow expects one 1 argument and cannot be used as decorator");var t=e.name||"<unnamed flow>";return function(){var n,r=arguments,i=++et,o=Ue(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=Ue(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=Ue(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=Ue(t+" - runid: "+i+" - cancel",function(){try{a&&tt(a);var e=o.return(),t=Promise.resolve(e.value);t.then(h,h),tt(t),n(new Error("FLOW_CANCELLED"))}catch(e){n(e)}}),s}},e.get=function(e,t){if(st(e,t))return Gt(e)?e[t]:It(e)?e.get(t):Dt(e)?e[t]:c(!1)},e.getAtom=Kt,e.getDebugName=Ht,e.getDependencyTree=$e,e.getObserverTree=function(e,t){return Ze(Kt(e,t))},e.has=st,e.intercept=function(e,t,n){return"function"==typeof n?function(e,t,n){return zt(e,t).intercept(n)}(e,t,n):function(e,t){return zt(e).intercept(t)}(e,t)},e.isAction=function(e){return"function"==typeof e&&!0===e.isMobxAction},e.isArrayLike=function(e){return Array.isArray(e)||Dt(e)},e.isBoxedObservable=re,e.isComputed=function(e){return arguments.length>1?c(!1):nt(e)},e.isComputedProp=function(e,t){return"string"!=typeof t?c(!1):nt(e,t)},e.isObservable=it,e.isObservableArray=Dt,e.isObservableMap=It,e.isObservableObject=Gt,e.isObservableProp=function(e,t){return"string"!=typeof t?c(!1):rt(e,t)},e.isObservableSet=Vt,e.keys=ot,e.observable=H,e.observe=function(e,t,n,r){return"function"==typeof n?function(e,t,n,r){return zt(e,t).observe(n,r)}(e,t,n,r):function(e,t,n){return zt(e).observe(t,n)}(e,t,n)},e.onBecomeObserved=We,e.onBecomeUnobserved=qe,e.onReactionError=function(e){return Oe.globalReactionErrorHandlers.push(e),function(){var t=Oe.globalReactionErrorHandlers.indexOf(e);t>=0&&Oe.globalReactionErrorHandlers.splice(t,1)}},e.reaction=function(e,t,n){void 0===n&&(n=s);var r,i,o,a=n.name||"Reaction@"+u(),c=Ue(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=He(n),h=!0,p=!1,d=n.compareStructural?x.structural:n.equals||x.default,v=new Ce(a,function(){h||l?y():p||(p=!0,f(y))},n.onError);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&&c(o,v),h||!0!==t||c(o,v),h&&(h=!1)}}return v.schedule(),v.getDisposer()},e.remove=function(e,t){if(Gt(e))e[S].remove(t);else if(It(e))e.delete(t);else if(Vt(e))e.delete(t);else{if(!Dt(e))return c(!1);"number"!=typeof t&&(t=parseInt(t,10)),l(t>=0,"Not a valid index: '"+t+"'"),e.splice(t,1)}},e.runInAction=function(e,t){return"string"==typeof e||e.name,F(0,"function"==typeof e?e:t,this,void 0)},e.set=at,e.spy=Be,e.toJS=function(e,t){var n;return"boolean"==typeof t&&(t={detectCycles:t}),t||(t=ut),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&&!it(t))return t;if("object"!=typeof t)return t;if(null===t)return null;if(t instanceof Date)return t;if(re(t))return e(t.get(),n,r);if(it(t)&&ot(t),!0===n.detectCycles&&null!==t&&r.has(t))return r.get(t);if(Dt(t)||Array.isArray(t)){var i=ct(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(Vt(t)||Object.getPrototypeOf(t)===Set.prototype){if(!1===n.exportMapsAsObjects){var u=ct(r,t,new Set,n);return t.forEach(function(t){u.add(e(t,n,r))}),u}var c=ct(r,t,[],n);return t.forEach(function(t){c.push(e(t,n,r))}),c}if(It(t)||Object.getPrototypeOf(t)===Map.prototype){if(!1===n.exportMapsAsObjects){var l=ct(r,t,new Map,n);return t.forEach(function(t,i){l.set(i,e(t,n,r))}),l}var f=ct(r,t,{},n);return t.forEach(function(t,i){f[i]=e(t,n,r)}),f}var h=ct(r,t,{},n);return m(t).forEach(function(i){h[i]=e(t[i],n,r)}),h}(e,t,n)},e.trace=lt,e.transaction=ft,e.untracked=he,e.values=function(e){return Gt(e)?ot(e).map(function(t){return e[t]}):It(e)?ot(e).map(function(t){return e.get(t)}):Vt(e)?Array.from(e.values()):Dt(e)?e.slice():c(!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=ht(e,i,n({},t,{onError:o}));r=function(){a(),o("WHEN_CANCELLED")}});return i.cancel=r,i}(e,t):ht(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 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}var o="An invariant failed, however the error is obfuscated because this is an production build.",a=[];Object.freeze(a);var s={};function u(){return++Ae.mobxGuid}function c(e){throw l(!1,e),"X"}function l(e,t){if(!e)throw new Error("[mobx] "+(t||o))}Object.freeze(s);function f(e){var t=!1;return function(){if(!t)return t=!0,e.apply(this,arguments)}}var h=function(){};function p(e){return null!==e&&"object"==typeof e}function d(e){if(null===e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);return t===Object.prototype||null===t}function v(e,t,n){Object.defineProperty(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function y(e,t){var n="isMobX"+e;return t.prototype[n]=!0,function(e){return p(e)&&!0===e[n]}}function b(e){return e instanceof Map}function g(e){return e instanceof Set}function m(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 w(e){return e&&e.toString?e.toString():new String(e).toString()}function O(e){return null===e?null:"object"==typeof e?""+e:e}var S=Symbol("mobx administration"),A=function(){function t(t){void 0===t&&(t="Atom@"+u()),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 Re(this)},t.prototype.reportChanged=function(){Ce(),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!==J.NONE&&Te(n,t),n.onBecomeStale()),n.dependenciesState=e.IDerivationState.STALE})}(this),Ie()},t.prototype.toString=function(){return this.name},t}(),_=y("Atom",A);function E(e,t,n){void 0===t&&(t=h),void 0===n&&(n=h);var r=new A(e);return t!==h&&Ye(r,t),n!==h&&Fe(r,n),r}var x={identity:function(e,t){return e===t},structural:function(e,t){return Ft(e,t)},default:function(e,t){return Object.is(e,t)}},D=Symbol("mobx did run lazy initializers"),j=Symbol("mobx pending decorators"),C={},I={};function R(e){if(!0!==e[D]){var t=e[j];if(t)for(var n in v(e,D,!0),t){var r=t[n];r.propertyCreator(e,r.prop,r.descriptor,r.decoratorTarget,r.decoratorArguments)}}}function T(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,j)){var u=i[j];v(i,j,n({},u))}return i[j][o]={prop:o,propertyCreator:t,descriptor:a,decoratorTarget:i,decoratorArguments:r},function(e,t){var n=t?C:I;return n[e]||(n[e]={configurable:!0,enumerable:t,get:function(){return R(this),this[e]},set:function(t){R(this),this[e]=t}})}(o,e)};return(2===(i=arguments).length||3===i.length)&&"string"==typeof i[1]||4===i.length&&!0===i[3]?(r=a,o.apply(null,arguments)):(r=Array.prototype.slice.call(arguments),o)}}function P(e,t,n){return ut(e)?e:Array.isArray(e)?z.array(e,{name:n}):d(e)?z.object(e,void 0,{name:n}):b(e)?z.map(e,{name:n}):g(e)?z.set(e,{name:n}):e}function N(e){return e}function V(e){l(e);var t=T(!0,function(t,n,r,i,o){var a=r?r.initializer?r.initializer.call(t):r.value:void 0;Ut(t).addObservableProp(n,a,e)}),n=("undefined"!=typeof process&&process.env,t);return n.enhancer=e,n}var k={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function B(e){return null==e?k:"string"==typeof e?{name:e,deep:!0,proxy:!0}:e}Object.freeze(k);var L=V(P),M=V(function(e,t,n){return null==e?e:Ht(e)||Rt(e)||Vt(e)||Lt(e)?e:Array.isArray(e)?z.array(e,{name:n,deep:!1}):d(e)?z.object(e,void 0,{name:n,deep:!1}):b(e)?z.map(e,{name:n,deep:!1}):g(e)?z.set(e,{name:n,deep:!1}):c(!1)}),U=V(N),G=V(function(e,t,n){return Ft(e,t)?t:e});function q(e){return e.defaultDecorator?e.defaultDecorator.enhancer:!1===e.deep?N:P}var K={box:function(e,t){arguments.length>2&&H("box");var n=B(t);return new ve(e,q(n),n.name,!0,n.equals)},array:function(e,t){arguments.length>2&&H("array");var n=B(t);return function(e,t,n,r){void 0===n&&(n="ObservableArray@"+u());void 0===r&&(r=!1);var i=new Dt(n,t,r);o=i.values,a=S,s=i,Object.defineProperty(o,a,{enumerable:!1,writable:!1,configurable:!0,value:s});var o,a,s;var c=new Proxy(i.values,xt);if(i.proxy=c,e&&e.length){var l=pe(!0);i.spliceWithArray(0,0,e),de(l)}return c}(e,q(n),n.name)},map:function(e,t){arguments.length>2&&H("map");var n=B(t);return new Nt(e,q(n),n.name)},set:function(e,t){arguments.length>2&&H("set");var n=B(t);return new Bt(e,q(n),n.name)},object:function(e,t,n){"string"==typeof arguments[1]&&H("object");var r=B(n);if(!1===r.proxy)return Qe({},e,t,r);var i=Ze(r),o=function(e){var t=new Proxy(e,mt);return e[S].proxy=t,t}(Qe({},void 0,void 0,r));return et(o,e,t,i),o},ref:U,shallow:M,deep:L,struct:G},z=function(e,t,n){if("string"==typeof arguments[1])return L.apply(null,arguments);if(ut(e))return e;var r=d(e)?z.object(e,t,n):Array.isArray(e)?z.array(e,t):b(e)?z.map(e,t):g(e)?z.set(e,t):e;if(r!==e)return r;c(!1)};function H(e){c("Expected one or two arguments to observable."+e+". Did you accidentally try to use observable."+e+" as decorator?")}Object.keys(K).forEach(function(e){return z[e]=K[e]});var W,J,X=T(!1,function(e,t,r,i,o){var a=r.get,s=r.set,u=o[0]||{};Ut(e).addComputedProp(e,t,n({get:a,set:s,context:e},u))}),Y=X({equals:x.structural}),F=function(e,t,n){if("string"==typeof t)return X.apply(null,arguments);if(null!==e&&"object"==typeof e&&1===arguments.length)return X.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 be(r)};F.struct=Y,(W=e.IDerivationState||(e.IDerivationState={}))[W.NOT_TRACKING=-1]="NOT_TRACKING",W[W.UP_TO_DATE=0]="UP_TO_DATE",W[W.POSSIBLY_STALE=1]="POSSIBLY_STALE",W[W.STALE=2]="STALE",function(e){e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"}(J||(J={}));var $=function(){return function(e){this.cause=e}}();function Q(e){return e instanceof $}function Z(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=ie(),r=t.observing,i=r.length,o=0;o<i;o++){var a=r[o];if(ge(a)){if(Ae.disableErrorBoundaries)a.get();else try{a.get()}catch(e){return oe(n),!0}if(t.dependenciesState===e.IDerivationState.STALE)return oe(n),!0}}return ue(t),oe(n),!1}}function ee(e){var t=e.observers.size>0;Ae.computationDepth>0&&t&&c(!1),Ae.allowStateChanges||!t&&"strict"!==Ae.enforceActions||c(!1)}function te(t,n,r){var i=ae(!0);ue(t),t.newObserving=new Array(t.observing.length+100),t.unboundDepsCount=0,t.runId=++Ae.runId;var o,a=Ae.trackingDerivation;if(Ae.trackingDerivation=t,!0===Ae.disableErrorBoundaries)o=n.call(r);else try{o=n.call(r)}catch(e){o=new $(e)}return Ae.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&&De(u,t),u.diffValue=0}for(;o--;){var u=r[o];1===u.diffValue&&(u.diffValue=0,xe(u,t))}i!==e.IDerivationState.UP_TO_DATE&&(t.dependenciesState=i,t.onBecomeStale())}(t),se(i),o}function ne(t){var n=t.observing;t.observing=[];for(var r=n.length;r--;)De(n[r],t);t.dependenciesState=e.IDerivationState.NOT_TRACKING}function re(e){var t=ie();try{return e()}finally{oe(t)}}function ie(){var e=Ae.trackingDerivation;return Ae.trackingDerivation=null,e}function oe(e){Ae.trackingDerivation=e}function ae(e){var t=Ae.allowStateReads;return Ae.allowStateReads=e,t}function se(e){Ae.allowStateReads=e}function ue(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}}function ce(e,t,n){var r=function(){return le(e,t,n||this,arguments)};return r.isMobxAction=!0,r}function le(e,t,n,r){var i=fe(e,n,r);try{return t.apply(n,r)}catch(e){throw i.error=e,e}finally{he(i)}}function fe(e,t,n){var r=Ue(),i=ie();Ce();var o={prevDerivation:i,prevAllowStateChanges:pe(!0),prevAllowStateReads:ae(!0),notifySpy:r,startTime:0,actionId:Ae.nextActionId++,parentActionId:Ae.currentActionId};return Ae.currentActionId=o.actionId,o}function he(e){Ae.currentActionId!==e.actionId&&c("invalid action stack. did you forget to finish an action?"),Ae.currentActionId=e.parentActionId,void 0!==e.error&&(Ae.suppressReactionErrors=!0),de(e.prevAllowStateChanges),se(e.prevAllowStateReads),Ie(),oe(e.prevDerivation),e.notifySpy,Ae.suppressReactionErrors=!1}function pe(e){var t=Ae.allowStateChanges;return Ae.allowStateChanges=e,t}function de(e){Ae.allowStateChanges=e}var ve=function(e){function n(t,n,r,i,o){void 0===r&&(r="ObservableValue@"+u()),void 0===i&&(i=!0),void 0===o&&(o=x.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&&Ue(),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))!==Ae.UNCHANGED){Ue();0,this.setNewValue(e)}},n.prototype.prepareNewValue=function(e){if(ee(this),wt(this)){var t=St(this,{object:this,type:"update",newValue:e});if(!t)return Ae.UNCHANGED;e=t.newValue}return e=this.enhancer(e,this.value,this.name),this.equals(this.value,e)?Ae.UNCHANGED:e},n.prototype.setNewValue=function(e){var t=this.value;this.value=e,this.reportChanged(),At(this)&&Et(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 Ot(this,e)},n.prototype.observe=function(e,t){return t&&e({object:this,type:"update",newValue:this.value,oldValue:void 0}),_t(this,e)},n.prototype.toJSON=function(){return this.get()},n.prototype.toString=function(){return this.name+"["+this.value+"]"},n.prototype.valueOf=function(){return O(this.get())},n.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},n}(A),ye=y("ObservableValue",ve),be=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="#"+u(),this.value=new $(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=J.NONE,this.derivation=t.get,this.name=t.name||"ComputedValue@"+u(),t.set&&(this.setter=ce(this.name+"-setter",t.set)),this.equals=t.equals||(t.compareStructural||t.struct?x.structural:x.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!==J.NONE&&Te(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&&c("Cycle detected in computation "+this.name+": "+this.derivation),0!==Ae.inBatch||0!==this.observers.size||this.keepAlive?(Re(this),Z(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)):Z(this)&&(this.warnAboutUntrackedRead(),Ce(),this.value=this.computeValue(!1),Ie());var t=this.value;if(Q(t))throw t.cause;return t},t.prototype.peek=function(){var e=this.computeValue(!1);if(Q(e))throw e.cause;return e},t.prototype.set=function(e){if(this.setter){l(!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 l(!1,!1)},t.prototype.trackAndCompute=function(){var t=this.value,n=this.dependenciesState===e.IDerivationState.NOT_TRACKING,r=this.computeValue(!0),i=n||Q(t)||Q(r)||!this.equals(t,r);return i&&(this.value=r),i},t.prototype.computeValue=function(e){var t;if(this.isComputing=!0,Ae.computationDepth++,e)t=te(this,this.derivation,this.scope);else if(!0===Ae.disableErrorBoundaries)t=this.derivation.call(this.scope);else try{t=this.derivation.call(this.scope)}catch(e){t=new $(e)}return Ae.computationDepth--,this.isComputing=!1,t},t.prototype.suspend=function(){this.keepAlive||(ne(this),this.value=void 0)},t.prototype.observe=function(e,t){var n=this,r=!0,i=void 0;return We(function(){var o=n.get();if(!r||t){var a=ie();e({type:"update",object:n,newValue:o,oldValue:i}),oe(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 O(this.get())},t.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},t}(),ge=y("ComputedValue",be),me=["mobxGuid","spyListeners","enforceActions","computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","allowStateReads","disableErrorBoundaries","runId","UNCHANGED"],we=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,this.currentActionId=0,this.nextActionId=1}}(),Oe=!0,Se=!1,Ae=function(){var e=Ee();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(Oe=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==(new we).version&&(Oe=!1),Oe?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new we):(setTimeout(function(){Se||c("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")},1),new we)}();var _e={};function Ee(){return"undefined"!=typeof window?window:"undefined"!=typeof global?global:_e}function xe(e,t){e.observers.add(t),e.lowestObserverState>t.dependenciesState&&(e.lowestObserverState=t.dependenciesState)}function De(e,t){e.observers.delete(t),0===e.observers.size&&je(e)}function je(e){!1===e.isPendingUnobservation&&(e.isPendingUnobservation=!0,Ae.pendingUnobservations.push(e))}function Ce(){Ae.inBatch++}function Ie(){if(0==--Ae.inBatch){ke();for(var e=Ae.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 be&&n.suspend())}Ae.pendingUnobservations=[]}}function Re(e){var t=Ae.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&&Ae.inBatch>0&&je(e),!1)}function Te(e,t){if(console.log("[mobx.trace] '"+e.name+"' is invalidated due to a change in: '"+t.name+"'"),e.isTracing===J.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)})}(tt(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 be?e.derivation.toString().replace(/[*]\//g,"/"):"")+"\n\nThe dependencies for this derivation are:\n\n"+n.join("\n")+"\n*/\n ")()}}var Pe=function(){function t(t,n,r,i){void 0===t&&(t="Reaction@"+u()),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="#"+u(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=J.NONE}return t.prototype.onBecomeStale=function(){this.schedule()},t.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,Ae.pendingReactions.push(this),ke())},t.prototype.isScheduled=function(){return this._isScheduled},t.prototype.runReaction=function(){if(!this.isDisposed){if(Ce(),this._isScheduled=!1,Z(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending&&Ue()}catch(e){this.reportExceptionInDerivation(e)}}Ie()}},t.prototype.track=function(e){if(!this.isDisposed){Ce(),this._isRunning=!0;var t=te(this,e,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&ne(this),Q(t)&&this.reportExceptionInDerivation(t.cause),Ie()}},t.prototype.reportExceptionInDerivation=function(e){var t=this;if(this.errorHandler)this.errorHandler(e,this);else{if(Ae.disableErrorBoundaries)throw e;var n="[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this+"'";Ae.suppressReactionErrors?console.warn("[mobx] (error in reaction '"+this.name+"' suppressed, fix error of causing action below)"):console.error(n,e),Ae.globalReactionErrorHandlers.forEach(function(n){return n(e,t)})}},t.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(Ce(),ne(this),Ie()))},t.prototype.getDisposer=function(){var e=this.dispose.bind(this);return e[S]=this,e},t.prototype.toString=function(){return"Reaction["+this.name+"]"},t.prototype.trace=function(e){void 0===e&&(e=!1),dt(this,e)},t}();var Ne=100,Ve=function(e){return e()};function ke(){Ae.inBatch>0||Ae.isRunningReactions||Ve(Be)}function Be(){Ae.isRunningReactions=!0;for(var e=Ae.pendingReactions,t=0;e.length>0;){++t===Ne&&(console.error("Reaction doesn't converge to a stable state after "+Ne+" 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()}Ae.isRunningReactions=!1}var Le=y("Reaction",Pe);function Me(e){var t=Ve;Ve=function(n){return e(function(){return t(n)})}}function Ue(){return!1}function Ge(e){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}function qe(){c(!1)}function Ke(e){return function(t,n,r){if(r){if(r.value)return{value:ce(e,r.value),enumerable:!1,configurable:!0,writable:!0};var i=r.initializer;return{enumerable:!1,configurable:!0,writable:!0,initializer:function(){return ce(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){v(this,n,ze(e,t))}})}}(e).apply(this,arguments)}}var ze=function(e,t,n,r){return 1===arguments.length&&"function"==typeof e?ce(e.name||"<unnamed action>",e):2===arguments.length&&"function"==typeof t?ce(e,t):1===arguments.length&&"string"==typeof e?Ke(e):!0!==r?Ke(t).apply(null,arguments):void v(e,t,ce(e.name||t,n.value,this))};function He(e,t,n){v(e,t,ce(t,n.bind(e)))}function We(e,t){void 0===t&&(t=s);var n,r=t&&t.name||e.name||"Autorun@"+u();if(!t.scheduler&&!t.delay)n=new Pe(r,function(){this.track(a)},t.onError,t.requiresObservable);else{var i=Xe(t),o=!1;n=new Pe(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()}ze.bound=function(e,t,n,r){return!0===r?(He(e,t,n.value),null):n?{configurable:!0,enumerable:!1,get:function(){return He(this,t,n.value||n.initializer.call(this)),this[t]},set:qe}:{enumerable:!1,configurable:!0,set:function(e){He(this,t,e)},get:function(){}}};var Je=function(e){return e()};function Xe(e){return e.scheduler?e.scheduler:e.delay?function(t){return setTimeout(t,e.delay)}:Je}function Ye(e,t,n){return $e("onBecomeObserved",e,t,n)}function Fe(e,t,n){return $e("onBecomeUnobserved",e,t,n)}function $e(e,t,n,r){var i="function"==typeof r?Wt(t,n):Wt(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]?c(!1):function(){var e=i[a];e&&(e.delete(o),0===e.size&&delete i[a])}}function Qe(e,t,n,r){var i=Ze(r=B(r));return R(e),Ut(e,r.name,i.enhancer),t&&et(e,t,n,i),e}function Ze(e){return e.defaultDecorator||(!1===e.deep?U:L)}function et(e,t,n,i){var o,a;Ce();try{var s=m(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?X: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{Ie()}}function tt(e,t){return nt(Wt(e,t))}function nt(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(nt)),r}function rt(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(rt)),n}var it=0;function ot(e){"function"==typeof e.cancel&&e.cancel()}function at(e,t){if(null==e)return!1;if(void 0!==t){if(!1===Ht(e))return!1;if(!e[S].values.has(t))return!1;var n=Wt(e,t);return ge(n)}return ge(e)}function st(e,t){return null!=e&&(void 0!==t?!!Ht(e)&&e[S].values.has(t):Ht(e)||!!e[S]||_(e)||Le(e)||ge(e))}function ut(e){return 1!==arguments.length&&c(!1),st(e)}function ct(e){return Ht(e)?e[S].getKeys():Vt(e)?Array.from(e.keys()):Lt(e)?Array.from(e.keys()):Rt(e)?e.map(function(e,t){return t}):c(!1)}function lt(e,t,n){if(2!==arguments.length||Lt(e))if(Ht(e)){var r=e[S];r.values.get(t)?r.write(t,n):r.addObservableProp(t,n,r.defaultEnhancer)}else if(Vt(e))e.set(t,n);else if(Lt(e))e.add(t);else{if(!Rt(e))return c(!1);"number"!=typeof t&&(t=parseInt(t,10)),l(t>=0,"Not a valid index: '"+t+"'"),Ce(),t>=e.length&&(e.length=t+1),e[t]=n,Ie()}else{Ce();var i=t;try{for(var o in i)lt(e,o,i[o])}finally{Ie()}}}function ft(e,t){return Ht(e)?Jt(e).has(t):Vt(e)?e.has(t):Lt(e)?e.has(t):Rt(e)?t>=0&&t<e.length:c(!1)}var ht={detectCycles:!0,exportMapsAsObjects:!0,recurseEverything:!1};function pt(e,t,n,r){return r.detectCycles&&e.set(t,n),n}function dt(){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 Ae.trackingDerivation;case 1:return Wt(e[0]);case 2:return Wt(e[0],e[1])}}(e);if(!r)return c(!1);r.isTracing===J.NONE&&console.log("[mobx.trace] '"+r.name+"' tracing enabled"),r.isTracing=n?J.BREAK:J.LOG}function vt(e,t){void 0===t&&(t=void 0),Ce();try{return e.apply(t)}finally{Ie()}}function yt(e,t,n){var r;"number"==typeof n.timeout&&(r=setTimeout(function(){if(!o[S].isDisposed){o();var e=new Error("WHEN_TIMEOUT");if(!n.onError)throw e;n.onError(e)}},n.timeout)),n.name=n.name||"When@"+u();var i=ce(n.name+"-effect",t),o=We(function(t){e()&&(t.dispose(),r&&clearTimeout(r),i())},n);return o}function bt(e){return e[S]}function gt(e){return"string"==typeof e||"number"==typeof e||"symbol"==typeof e}var mt={has:function(e,t){if(t===S||"constructor"===t||t===D)return!0;var n=bt(e);return gt(t)?n.has(t):t in e},get:function(e,t){if(t===S||"constructor"===t||t===D)return e[t];var n=bt(e),r=n.values.get(t);if(r instanceof A){var i=r.get();return void 0===i&&n.has(t),i}return gt(t)&&n.has(t),e[t]},set:function(e,t,n){return!!gt(t)&&(lt(e,t,n),!0)},deleteProperty:function(e,t){return!!gt(t)&&(bt(e).remove(t),!0)},ownKeys:function(e){return bt(e).keysAtom.reportObserved(),Reflect.ownKeys(e)},preventExtensions:function(e){return c("Dynamic observable objects cannot be frozen"),!1}};function wt(e){return void 0!==e.interceptors&&e.interceptors.length>0}function Ot(e,t){var n=e.interceptors||(e.interceptors=[]);return n.push(t),f(function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function St(e,t){var n=ie();try{var r=e.interceptors;if(r)for(var i=0,o=r.length;i<o&&(l(!(t=r[i](t))||t.type,"Intercept handlers should return nothing or a change object"),t);i++);return t}finally{oe(n)}}function At(e){return void 0!==e.changeListeners&&e.changeListeners.length>0}function _t(e,t){var n=e.changeListeners||(e.changeListeners=[]);return n.push(t),f(function(){var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function Et(e,t){var n=ie(),r=e.changeListeners;if(r){for(var i=0,o=(r=r.slice()).length;i<o;i++)r[i](t);oe(n)}}var xt={get:function(e,t){return t===S?e[S]:"length"===t?e[S].getArrayLength():"number"==typeof t?jt.get.call(e,t):"string"!=typeof t||isNaN(t)?jt.hasOwnProperty(t)?jt[t]:e[t]:jt.get.call(e,parseInt(t))},set:function(e,t,n){return"length"===t&&e[S].setArrayLength(n),"number"==typeof t&&jt.set.call(e,t,n),"symbol"==typeof t||isNaN(t)?e[t]=n:jt.set.call(e,parseInt(t),n),!0},preventExtensions:function(e){return c("Observable arrays cannot be frozen"),!1}};var Dt=function(){function e(e,t,n){this.owned=n,this.values=[],this.proxy=void 0,this.lastKnownLength=0,this.atom=new A(e||"ObservableArray@"+u()),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 Ot(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}),_t(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;ee(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=a),wt(this)){var o=St(this,{object:this.proxy,type:"splice",index:e,removedCount:t,added:n});if(!o)return a;t=o.removedCount,n=o.added}n=0===n.length?n:n.map(function(e){return r.enhancer(e,void 0)});var s=this.spliceItemsIntoValues(e,t,n);return 0===t&&0===n.length||this.notifyArraySplice(e,n,s),this.dehanceValues(s)},e.prototype.spliceItemsIntoValues=function(e,t,n){var r;if(n.length<1e4)return(r=this.values).splice.apply(r,function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(i(arguments[t]));return e}([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,i=At(this),o=i||r?{object:this.proxy,type:"update",index:e,newValue:t,oldValue:n}:null;this.atom.reportChanged(),i&&Et(this,o)},e.prototype.notifyArraySplice=function(e,t,n){var r=!this.owned&&!1,i=At(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&&Et(this,o)},e}(),jt={intercept:function(e){return this[S].intercept(e)},observe:function(e,t){return void 0===t&&(t=!1),this[S].observe(e,t)},clear:function(){return this.splice(0)},replace:function(e){var t=this[S];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[S];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[S].spliceWithArray(e,t,n)},push:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this[S];return n.spliceWithArray(n.values.length,0,e),n.values.length},pop:function(){return this.splice(Math.max(this[S].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[S];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[S],n=t.dehanceValues(t.values).indexOf(e);return n>-1&&(this.splice(n,1),!0)},get:function(e){var t=this[S];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[S],r=n.values;if(e<r.length){ee(n.atom);var i=r[e];if(wt(n)){var o=St(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){jt[e]=function(){var t=this[S];t.atom.reportObserved();var n=t.dehanceValues(t.values);return n[e].apply(n,arguments)}});var Ct,It=y("ObservableArrayAdministration",Dt);function Rt(e){return p(e)&&It(e[S])}var Tt,Pt={},Nt=function(){function e(e,t,n){if(void 0===t&&(t=P),void 0===n&&(n="ObservableMap@"+u()),this.enhancer=t,this.name=n,this[Ct]=Pt,this._keysAtom=E(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(!Ae.trackingDerivation)return this._has(e);var n=this._hasMap.get(e);if(!n){var r=n=new ve(this._has(e),N,this.name+"."+w(e)+"?",!1);this._hasMap.set(e,r),Fe(r,function(){return t._hasMap.delete(e)})}return n.get()},e.prototype.set=function(e,t){var n=this._has(e);if(wt(this)){var r=St(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(wt(this)&&!(r=St(this,{type:"delete",object:this,name:e})))return!1;if(this._has(e)){var n=At(this),r=n?{type:"delete",object:this,oldValue:this._data.get(e).value,name:e}:null;return vt(function(){t._keysAtom.reportChanged(),t._updateHasMapEntry(e,!1),t._data.get(e).setNewValue(void 0),t._data.delete(e)}),n&&Et(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))!==Ae.UNCHANGED){var r=At(this),i=r?{type:"update",object:this,oldValue:n.value,name:e,newValue:t}:null;0,n.setNewValue(t),r&&Et(this,i)}},e.prototype._addValue=function(e,t){var n=this;ee(this._keysAtom),vt(function(){var r=new ve(t,n.enhancer,n.name+"."+w(e),!1);n._data.set(e,r),t=r.value,n._updateHasMapEntry(e,!0),n._keysAtom.reportChanged()});var r=At(this);r&&Et(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 en({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 en({next:function(){if(t<n.length){var r=n[t++];return{value:[r,e.get(r)],done:!1}}return{done:!0}}})},e.prototype[(Ct=S,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 Vt(e)&&(e=e.toJS()),vt(function(){d(e)?m(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)}):b(e)?(e.constructor!==Map&&c("Cannot initialize from classes that inherit from Map: "+e.constructor.name),e.forEach(function(e,n){return t.set(n,e)})):null!=e&&c("Cannot initialize map from "+e)}),this},e.prototype.clear=function(){var e=this;vt(function(){re(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 vt(function(){var n,r=d(n=e)?Object.keys(n):Array.isArray(n)?n.map(function(e){return i(e,1)[0]}):b(n)||Vt(n)?Array.from(n.keys()):c("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:w(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 w(t)+": "+e.get(t)}).join(", ")+" }]"},e.prototype.observe=function(e,t){return _t(this,e)},e.prototype.intercept=function(e){return Ot(this,e)},e}(),Vt=y("ObservableMap",Nt),kt={},Bt=function(){function e(e,t,n){if(void 0===t&&(t=P),void 0===n&&(n="ObservableSet@"+u()),this.name=n,this[Tt]=kt,this._data=new Set,this._atom=E(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;vt(function(){re(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((ee(this._atom),wt(this))&&!(r=St(this,{type:"add",object:this,newValue:e})))return this;if(!this.has(e)){vt(function(){t._data.add(t.enhancer(e,void 0)),t._atom.reportChanged()});var n=At(this),r=n?{type:"add",object:this,newValue:e}:null;0,n&&Et(this,r)}return this},e.prototype.delete=function(e){var t=this;if(wt(this)&&!(r=St(this,{type:"delete",object:this,oldValue:e})))return!1;if(this.has(e)){var n=At(this),r=n?{type:"delete",object:this,oldValue:e}:null;return vt(function(){t._atom.reportChanged(),t._data.delete(e)}),n&&Et(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 en({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 en({next:function(){return t<n.length?{value:e.dehanceValue(n[t++]),done:!1}:{done:!0}}})},e.prototype.replace=function(e){var t=this;return Lt(e)&&(e=e.toJS()),vt(function(){Array.isArray(e)?(t.clear(),e.forEach(function(e){return t.add(e)})):g(e)?(t.clear(),e.forEach(function(e){return t.add(e)})):null!=e&&c("Cannot initialize set from "+e)}),this},e.prototype.observe=function(e,t){return _t(this,e)},e.prototype.intercept=function(e){return Ot(this,e)},e.prototype.toJS=function(){return new Set(this)},e.prototype.toString=function(){return this.name+"[ "+Array.from(this).join(", ")+" ]"},e.prototype[(Tt=S,Symbol.iterator)]=function(){return this.values()},e}(),Lt=y("ObservableSet",Bt),Mt=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 A(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 be)r.set(t);else{if(wt(this)){if(!(o=St(this,{type:"update",object:this.proxy||n,name:e,newValue:t})))return;t=o.newValue}if((t=r.prepareNewValue(t))!==Ae.UNCHANGED){var i=At(this),o=i?{type:"update",object:this.proxy||n,oldValue:r.value,name:e,newValue:t}:null;0,r.setNewValue(t),i&&Et(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 ve(r,N,this.name+"."+w(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(wt(this)){var i=St(this,{object:this.proxy||r,name:e,type:"add",newValue:t});if(!i)return;t=i.newValue}var o=new ve(t,n,this.name+"."+w(e),!1);this.values.set(e,o),t=o.value,Object.defineProperty(r,e,function(e){return Gt[e]||(Gt[e]={configurable:!0,enumerable:!0,get:function(){return this[S].read(e)},set:function(t){this[S].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+"."+w(t),this.values.set(t,new be(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 qt[e]||(qt[e]={configurable:Ae.computedConfigurable,enumerable:!1,get:function(){return Kt(this).read(e)},set:function(t){Kt(this).write(e,t)}})}(t))},e.prototype.remove=function(e){if(this.values.has(e)){var t=this.target;if(wt(this))if(!(a=St(this,{object:this.proxy||t,name:e,type:"remove"})))return;try{Ce();var n=At(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&&Et(this,a)}finally{Ie()}}},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 _t(this,e)},e.prototype.intercept=function(e){return Ot(this,e)},e.prototype.notifyPropertyAddition=function(e,t){var n=At(this),r=n?{type:"add",object:this.proxy||this.target,name:e,newValue:t}:null;if(n&&Et(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 ve&&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 Ut(e,t,n){if(void 0===t&&(t=""),void 0===n&&(n=P),Object.prototype.hasOwnProperty.call(e,S))return e[S];d(e)||(t=(e.constructor.name||"ObservableObject")+"@"+u()),t||(t="ObservableObject@"+u());var r=new Mt(e,new Map,w(t),n);return v(e,S,r),r}var Gt=Object.create(null),qt=Object.create(null);function Kt(e){var t=e[S];return t||(R(e),e[S])}var zt=y("ObservableObjectAdministration",Mt);function Ht(e){return!!p(e)&&(R(e),zt(e[S]))}function Wt(e,t){if("object"==typeof e&&null!==e){if(Rt(e))return void 0!==t&&c(!1),e[S].atom;if(Lt(e))return e[S];if(Vt(e)){var n=e;return void 0===t?n._keysAtom:((r=n._data.get(t)||n._hasMap.get(t))||c(!1),r)}var r;if(R(e),t&&!e[S]&&e[t],Ht(e))return t?((r=e[S].values.get(t))||c(!1),r):c(!1);if(_(e)||ge(e)||Le(e))return e}else if("function"==typeof e&&Le(e[S]))return e[S];return c(!1)}function Jt(e,t){return e||c("Expecting some object"),void 0!==t?Jt(Wt(e,t)):_(e)||ge(e)||Le(e)?e:Vt(e)||Lt(e)?e:(R(e),e[S]?e[S]:void c(!1))}function Xt(e,t){return(void 0!==t?Wt(e,t):Ht(e)||Vt(e)||Lt(e)?Jt(e):Wt(e)).name}var Yt=Object.prototype.toString;function Ft(e,t){return $t(e,t)}function $t(e,t,n,r){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return!1;if(e!=e)return t!=t;var i=typeof e;return("function"===i||"object"===i||"object"==typeof t)&&function(e,t,n,r){e=Qt(e),t=Qt(t);var i=Yt.call(e);if(i!==Yt.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 o="[object Array]"===i;if(!o){if("object"!=typeof e||"object"!=typeof t)return!1;var a=e.constructor,s=t.constructor;if(a!==s&&!("function"==typeof a&&a instanceof a&&"function"==typeof s&&s instanceof s)&&"constructor"in e&&"constructor"in t)return!1}r=r||[];var u=(n=n||[]).length;for(;u--;)if(n[u]===e)return r[u]===t;if(n.push(e),r.push(t),o){if((u=e.length)!==t.length)return!1;for(;u--;)if(!$t(e[u],t[u],n,r))return!1}else{var c=Object.keys(e),l=void 0;if(u=c.length,Object.keys(t).length!==u)return!1;for(;u--;)if(l=c[u],!Zt(t,l)||!$t(e[l],t[l],n,r))return!1}return n.pop(),r.pop(),!0}(e,t,n,r)}function Qt(e){return Rt(e)?e.slice():b(e)||Vt(e)?Array.from(e.entries()):g(e)||Lt(e)?Array.from(e.entries()):e}function Zt(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function en(e){return e[Symbol.iterator]=tn,e}function tn(){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:Ge,extras:{getDebugName:Xt},$mobx:S}),e.$mobx=S,e.ObservableMap=Nt,e.ObservableSet=Bt,e.Reaction=Pe,e._allowStateChanges=function(e,t){var n,r=pe(e);try{n=t()}finally{de(r)}return n},e._allowStateChangesInsideComputed=function(e){var t,n=Ae.computationDepth;Ae.computationDepth=0;try{t=e()}finally{Ae.computationDepth=n}return t},e._endAction=he,e._getAdministration=Jt,e._getGlobalState=function(){return Ae},e._interceptReads=function(e,t,n){var r;if(Vt(e)||Rt(e)||ye(e))r=Jt(e);else{if(!Ht(e))return c(!1);if("string"!=typeof t)return c(!1);r=Jt(e,t)}return void 0!==r.dehancer?c(!1):(r.dehancer="function"==typeof t?t:n,function(){r.dehancer=void 0})},e._isComputingDerivation=function(){return null!==Ae.trackingDerivation},e._resetGlobalState=function(){var e=new we;for(var t in e)-1===me.indexOf(t)&&(Ae[t]=e[t]);Ae.allowStateChanges=!Ae.enforceActions},e._startAction=fe,e.action=ze,e.autorun=We,e.comparer=x,e.computed=F,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&&((Ae.pendingReactions.length||Ae.inBatch||Ae.isRunningReactions)&&c("isolateGlobalState should be called before MobX is running any reactions"),Se=!0,Oe&&(0==--Ee().__mobxInstanceCount&&(Ee().__mobxGlobals=void 0),Ae=new we)),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:c("Invalid value for 'enforceActions': '"+t+"', expected 'never', 'always' or 'observed'")}Ae.enforceActions=u,Ae.allowStateChanges=!0!==u&&"strict"!==u}void 0!==n&&(Ae.computedRequiresReaction=!!n),void 0!==a&&(Ae.reactionRequiresObservable=!!a),void 0!==s&&(Ae.observableRequiresReaction=!!s,Ae.allowStateReads=!Ae.observableRequiresReaction),void 0!==r&&(Ae.computedConfigurable=!!r),void 0!==i&&(!0===i&&console.warn("WARNING: Debug feature only. MobX will NOT recover from errors when `disableErrorBoundaries` is enabled."),Ae.disableErrorBoundaries=!!i),o&&Me(o)},e.createAtom=E,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 Ht(e)?ct(e).map(function(t){return[t,e[t]]}):Vt(e)?ct(e).map(function(t){return[t,e.get(t)]}):Lt(e)?Array.from(e.entries()):Rt(e)?e.map(function(e,t){return[t,e]}):c(!1)},e.extendObservable=Qe,e.flow=function(e){1!==arguments.length&&c("Flow expects one 1 argument and cannot be used as decorator");var t=e.name||"<unnamed flow>";return function(){var n,r=arguments,i=++it,o=ze(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=ze(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=ze(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=ze(t+" - runid: "+i+" - cancel",function(){try{a&&ot(a);var e=o.return(),t=Promise.resolve(e.value);t.then(h,h),ot(t),n(new Error("FLOW_CANCELLED"))}catch(e){n(e)}}),s}},e.get=function(e,t){if(ft(e,t))return Ht(e)?e[t]:Vt(e)?e.get(t):Rt(e)?e[t]:c(!1)},e.getAtom=Wt,e.getDebugName=Xt,e.getDependencyTree=tt,e.getObserverTree=function(e,t){return rt(Wt(e,t))},e.has=ft,e.intercept=function(e,t,n){return"function"==typeof n?function(e,t,n){return Jt(e,t).intercept(n)}(e,t,n):function(e,t){return Jt(e).intercept(t)}(e,t)},e.isAction=function(e){return"function"==typeof e&&!0===e.isMobxAction},e.isArrayLike=function(e){return Array.isArray(e)||Rt(e)},e.isBoxedObservable=ye,e.isComputed=function(e){return arguments.length>1?c(!1):at(e)},e.isComputedProp=function(e,t){return"string"!=typeof t?c(!1):at(e,t)},e.isObservable=ut,e.isObservableArray=Rt,e.isObservableMap=Vt,e.isObservableObject=Ht,e.isObservableProp=function(e,t){return"string"!=typeof t?c(!1):st(e,t)},e.isObservableSet=Lt,e.keys=ct,e.observable=z,e.observe=function(e,t,n,r){return"function"==typeof n?function(e,t,n,r){return Jt(e,t).observe(n,r)}(e,t,n,r):function(e,t,n){return Jt(e).observe(t,n)}(e,t,n)},e.onBecomeObserved=Ye,e.onBecomeUnobserved=Fe,e.onReactionError=function(e){return Ae.globalReactionErrorHandlers.push(e),function(){var t=Ae.globalReactionErrorHandlers.indexOf(e);t>=0&&Ae.globalReactionErrorHandlers.splice(t,1)}},e.reaction=function(e,t,n){void 0===n&&(n=s);var r,i,o,a=n.name||"Reaction@"+u(),c=ze(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=Xe(n),h=!0,p=!1,d=n.compareStructural?x.structural:n.equals||x.default,v=new Pe(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&&c(o,v),h||!0!==t||c(o,v),h&&(h=!1)}}return v.schedule(),v.getDisposer()},e.remove=function(e,t){if(Ht(e))e[S].remove(t);else if(Vt(e))e.delete(t);else if(Lt(e))e.delete(t);else{if(!Rt(e))return c(!1);"number"!=typeof t&&(t=parseInt(t,10)),l(t>=0,"Not a valid index: '"+t+"'"),e.splice(t,1)}},e.runInAction=function(e,t){return le("string"==typeof e?e:e.name||"<unnamed action>","function"==typeof e?e:t,this,void 0)},e.set=lt,e.spy=Ge,e.toJS=function(e,t){var n;return"boolean"==typeof t&&(t={detectCycles:t}),t||(t=ht),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&&!ut(t))return t;if("object"!=typeof t)return t;if(null===t)return null;if(t instanceof Date)return t;if(ye(t))return e(t.get(),n,r);if(ut(t)&&ct(t),!0===n.detectCycles&&null!==t&&r.has(t))return r.get(t);if(Rt(t)||Array.isArray(t)){var i=pt(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(Lt(t)||Object.getPrototypeOf(t)===Set.prototype){if(!1===n.exportMapsAsObjects){var u=pt(r,t,new Set,n);return t.forEach(function(t){u.add(e(t,n,r))}),u}var c=pt(r,t,[],n);return t.forEach(function(t){c.push(e(t,n,r))}),c}if(Vt(t)||Object.getPrototypeOf(t)===Map.prototype){if(!1===n.exportMapsAsObjects){var l=pt(r,t,new Map,n);return t.forEach(function(t,i){l.set(i,e(t,n,r))}),l}var f=pt(r,t,{},n);return t.forEach(function(t,i){f[i]=e(t,n,r)}),f}var h=pt(r,t,{},n);return m(t).forEach(function(i){h[i]=e(t[i],n,r)}),h}(e,t,n)},e.trace=dt,e.transaction=vt,e.untracked=re,e.values=function(e){return Ht(e)?ct(e).map(function(t){return e[t]}):Vt(e)?ct(e).map(function(t){return e.get(t)}):Lt(e)?Array.from(e.values()):Rt(e)?e.slice():c(!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=yt(e,i,n({},t,{onError:o}));r=function(){a(),o("WHEN_CANCELLED")}});return i.cancel=r,i}(e,t):yt(e,t,r||{})},Object.defineProperty(e,"__esModule",{value:!0})});
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/lib/utils/eq.d.ts CHANGED
File without changes
File without changes
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mobx",
3
- "version": "5.10.1",
3
+ "version": "5.14.0",
4
4
  "description": "Simple, scalable state management.",
5
5
  "main": "lib/mobx.js",
6
6
  "umd:main": "lib/mobx.umd.js",
@@ -17,18 +17,19 @@
17
17
  "test": "jest",
18
18
  "watch": "jest --watch",
19
19
  "test:mixed-versions": "jest --testRegex mixed-versions",
20
- "test:all": "yarn lint && yarn small-build && yarn jest -i && yarn test:flow && yarn test:mixed-versions",
20
+ "test:all": "yarn tsc --noEmit && yarn lint && yarn jest -i && yarn test:flow && yarn test:mixed-versions",
21
21
  "test:webpack": "node scripts/webpack-regression-tests.js",
22
22
  "test:flow": "node_modules/.bin/flow check",
23
- "test:performance": "npm run small-build && PERSIST=true time node --expose-gc test/perf/index.js",
24
- "test:travis": "yarn test:all && yarn test:performance && yarn test -i --coverage && yarn test:webpack && yarn size",
23
+ "test:performance": "PERSIST=true time node --expose-gc test/perf/index.js",
24
+ "test:ci": "yarn test:all && yarn test:performance && yarn test -i --coverage && yarn test:webpack && yarn size",
25
25
  "prettier": "prettier \"**/*.js\" \"**/*.jsx\" \"**/*.tsx\" \"**/*.ts\"",
26
- "_prepublish": "npm run small-build",
26
+ "_prepublish": "yarn small-build",
27
27
  "quick-build": "tsc --pretty",
28
28
  "small-build": "node scripts/build.js",
29
29
  "lint": "eslint src/**/*.ts",
30
30
  "size": "size-limit",
31
- "publish-script": "node scripts/publish.js"
31
+ "publish-script": "node scripts/publish.js",
32
+ "dedup": "npx yarn-deduplicate -s fewer yarn.lock"
32
33
  },
33
34
  "repository": {
34
35
  "type": "git",