mobx
Version:
Simple, scalable state management.
1 lines • 55.4 kB
JavaScript
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t=t||self).mobx={})}(this,(function(t){function n(t){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];throw new Error("number"==typeof t?"[MobX] minified error nr: "+t+(i.length?" "+i.map(String).join(","):"")+". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts":"[MobX] "+t)}function i(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:Rn}function r(){Bn||n("Proxy not available")}function e(t){var n=!1;return function(){if(!n)return n=!0,t.apply(this,arguments)}}function u(t){return"function"==typeof t}function o(t){switch(typeof t){case"string":case"symbol":case"number":return!0}return!1}function s(t){return null!==t&&"object"==typeof t}function f(t){if(!s(t))return!1;var n=Object.getPrototypeOf(t);if(null==n)return!0;var i=Object.hasOwnProperty.call(n,"constructor")&&n.constructor;return"function"==typeof i&&i.toString()===Dn}function c(t){var n=null==t?void 0:t.constructor;return!!n&&("GeneratorFunction"===n.name||"GeneratorFunction"===n.displayName)}function a(t,n,i){Ln(t,n,{enumerable:!1,writable:!0,configurable:!0,value:i})}function h(t,n,i){Ln(t,n,{enumerable:!1,writable:!1,configurable:!0,value:i})}function v(t,n){var i="isMobX"+t;return n.prototype[i]=!0,function(t){return s(t)&&!0===t[i]}}function l(t){return null!=t&&"[object Map]"===Object.prototype.toString.call(t)}function d(t){return null!=t&&"[object Set]"===Object.prototype.toString.call(t)}function b(t){return null===t?null:"object"==typeof t?""+t:t}function y(t,n){return Cn.hasOwnProperty.call(t,n)}function p(t,n){return!!(t&n)}function m(t,n,i){return i?t|=n:t&=~n,t}function j(t,n){(null==n||n>t.length)&&(n=t.length);for(var i=0,r=Array(n);i<n;i++)r[i]=t[i];return r}function w(t,n){for(var i=0;i<n.length;i++){var r=n[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,A(r.key),r)}}function O(t,n,i){return n&&w(t.prototype,n),i&&w(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function g(t,n){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(i)return(i=i.call(t)).next.bind(i);if(Array.isArray(t)||(i=function(t,n){if(t){if("string"==typeof t)return j(t,n);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?j(t,n):void 0}}(t))||n&&t&&"number"==typeof t.length){i&&(t=i);var r=0;return function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _(){return(_=Object.assign?Object.assign.bind():function(t){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var r in i)({}).hasOwnProperty.call(i,r)&&(t[r]=i[r])}return t}).apply(null,arguments)}function S(t,n){t.prototype=Object.create(n.prototype),t.prototype.constructor=t,function(t,n){(Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t})(t,n)}(t,n)}function A(t){var n=function(t){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof n?n:n+""}function x(t){return Object.assign((function(n,i){if(M(i))return t.t(n,i);k(n,i,t)}),t)}function k(t,n,i){y(t,Un)||a(t,Un,_({},t[Un])),function(t){return"override"===t.i}(i)||(t[Un][n]=i)}function M(t){return"object"==typeof t&&"string"==typeof t.kind}function V(t,n,i){void 0===n&&(n=Wn),void 0===i&&(i=Wn);var r=new Fn(t);return n!==Wn&&Lt(r,n),i!==Wn&&Ct(r,i),r}function E(t,n,i){return Xt(t)?t:Array.isArray(t)?oi.array(t,{name:i}):f(t)?oi.object(t,void 0,{name:i}):l(t)?oi.map(t,{name:i}):d(t)?oi.set(t,{name:i}):"function"!=typeof t||Rt(t)||Gt(t)?t:c(t)?Bi(t):Ii(i,t)}function N(t){return t}function R(t,n){return{i:t,u:n,o:T,s:I,t:L}}function T(t,n,i,r){var e;if(null!=(e=this.u)&&e.bound)return null===this.s(t,n,i,!1)?0:1;if(r===t.h)return null===this.s(t,n,i,!1)?0:2;if(Rt(i.value))return 1;var u=C(t,this,n,i,!1);return Ln(r,n,u),2}function I(t,n,i,r){var e=C(t,this,n,i);return t.v(n,e,r)}function L(t,i){var r,e=i.kind,u=i.name,o=i.addInitializer,s=this,f=function(t){var n,i,r,e;return rt(null!=(n=null==(i=s.u)?void 0:i.name)?n:u.toString(),t,null!=(r=null==(e=s.u)?void 0:e.autoAction)&&r)};return"field"==e?function(t){var n,i=t;return Rt(i)||(i=f(i)),null!=(n=s.u)&&n.bound&&((i=i.bind(this)).isMobxAction=!0),i}:"method"==e?(Rt(t)||(t=f(t)),null!=(r=this.u)&&r.bound&&o((function(){var t=this[u].bind(this);t.isMobxAction=!0,this[u]=t})),t):void n("Cannot apply '"+s.i+"' to '"+String(u)+"' (kind: "+e+"):\n'"+s.i+"' can only be used on properties with a function value.")}function C(t,n,i,r,e){var u,o,s,f,c,a,h;void 0===e&&(e=Ai.safeDescriptors);var v,l=r.value;return null!=(u=n.u)&&u.bound&&(l=l.bind(null!=(v=t.l)?v:t.h)),{value:rt(null!=(o=null==(s=n.u)?void 0:s.name)?o:i.toString(),l,null!=(f=null==(c=n.u)?void 0:c.autoAction)&&f,null!=(a=n.u)&&a.bound?null!=(h=t.l)?h:t.h:void 0),configurable:!e||t.p,enumerable:!1,writable:!e}}function P(t,n){return{i:t,u:n,o:K,s:B,t:D}}function K(t,n,i,r){var e;if(r===t.h)return null===this.s(t,n,i,!1)?0:2;if(null!=(e=this.u)&&e.bound&&(!y(t.h,n)||!Gt(t.h[n]))&&null===this.s(t,n,i,!1))return 0;if(Gt(i.value))return 1;var u=W(t,0,0,i,!1,!1);return Ln(r,n,u),2}function B(t,n,i,r){var e,u=W(t,0,0,i,null==(e=this.u)?void 0:e.bound);return t.v(n,u,r)}function D(t,n){var i,r=n.name,e=n.addInitializer;return Gt(t)||(t=Bi(t)),null!=(i=this.u)&&i.bound&&e((function(){var t=this[r].bind(this);t.isMobXFlow=!0,this[r]=t})),t}function W(t,n,i,r,e,u){void 0===u&&(u=Ai.safeDescriptors);var o,s=r.value;return Gt(s)||(s=Bi(s)),e&&((s=s.bind(null!=(o=t.l)?o:t.h)).isMobXFlow=!0),{value:s,configurable:!u||t.p,enumerable:!1,writable:!u}}function q(t,n){return{i:t,u:n,o:G,s:H,t:U}}function G(t,n,i){return null===this.s(t,n,i,!1)?0:1}function H(t,n,i,r){return t.m(n,_({},this.u,{get:i.get,set:i.set}),r)}function U(t,n){var i=this,r=n.name;return(0,n.addInitializer)((function(){var n=yn(this)[Xn],e=_({},i.u,{get:t,context:this});e.name||(e.name="ObservableObject."+r.toString()),n.j.set(r,new yi(e))})),function(){return this[Xn].O(r)}}function X(t,n){return{i:t,u:n,o:F,s:z,t:$}}function F(t,n,i){return null===this.s(t,n,i,!1)?0:1}function z(t,n,i,r){var e,u;return t.g(n,i.value,null!=(e=null==(u=this.u)?void 0:u.enhancer)?e:E,r)}function $(t,n){function i(t,n){var i,e,s=yn(t)[Xn],f=new di(n,null!=(i=null==(e=r.u)?void 0:e.enhancer)?i:E,"ObservableObject."+u.toString(),!1);s.j.set(u,f),o.add(t)}var r=this,e=n.kind,u=n.name,o=new WeakSet;if("accessor"==e)return{get:function(){return o.has(this)||i(this,t.get.call(this)),this[Xn].O(u)},set:function(t){return o.has(this)||i(this,t),this[Xn]._(u,t)},init:function(t){return o.has(this)||i(this,t),t}}}function J(t){return{i:"true",u:t,o:Y,s:Q,t:Z}}function Y(t,n,i,r){var e,u,o,s;if(i.get)return ci.o(t,n,i,r);if(i.set){var f=rt(n.toString(),i.set);return r===t.h?null===t.v(n,{configurable:!Ai.safeDescriptors||t.p,set:f})?0:2:(Ln(r,n,{configurable:!0,set:f}),2)}if(r!==t.h&&"function"==typeof i.value)return c(i.value)?(null!=(s=this.u)&&s.autoBind?Bi.bound:Bi).o(t,n,i,r):(null!=(o=this.u)&&o.autoBind?Ii.bound:Ii).o(t,n,i,r);var a,h=!1===(null==(e=this.u)?void 0:e.deep)?oi.ref:oi;return"function"==typeof i.value&&null!=(u=this.u)&&u.autoBind&&(i.value=i.value.bind(null!=(a=t.l)?a:t.h)),h.o(t,n,i,r)}function Q(t,n,i,r){var e,u,o;return i.get?ci.s(t,n,i,r):i.set?t.v(n,{configurable:!Ai.safeDescriptors||t.p,set:rt(n.toString(),i.set)},r):("function"==typeof i.value&&null!=(e=this.u)&&e.autoBind&&(i.value=i.value.bind(null!=(o=t.l)?o:t.h)),(!1===(null==(u=this.u)?void 0:u.deep)?oi.ref:oi).s(t,n,i,r))}function Z(){n("'"+this.i+"' cannot be used as a decorator")}function tt(t){return t||Qn}function nt(t){return!0===t.deep?E:!1===t.deep?N:(n=t.defaultDecorator)&&null!=(i=null==(r=n.u)?void 0:r.enhancer)?i:E;var n,i,r}function it(t,n,i){return M(n)?Zn.t(t,n):o(n)?void k(t,n,Zn):Xt(t)?t:f(t)?oi.object(t,n,i):Array.isArray(t)?oi.array(t,n):l(t)?oi.map(t,n):d(t)?oi.set(t,n):"object"==typeof t&&null!==t?t:oi.box(t,n)}function rt(t,n,i,r){function e(){return et(0,i,n,r||this,arguments)}return void 0===i&&(i=!1),e.isMobxAction=!0,e.toString=function(){return n.toString()},vi&&(li.value=t,Ln(e,"name",li)),e}function et(t,n,i,r,e){var u=ut(0,n);try{return i.apply(r,e)}catch(t){throw u.S=t,t}finally{ot(u)}}function ut(t,n){var i=Ai.trackingDerivation,r=!n||!i;_t();var e=Ai.allowStateChanges;r&&(bt(),e=ft(!0));var u={A:r,k:i,M:e,V:pt(!0),N:!1,R:0,T:hi++,I:ai};return ai=u.T,u}function ot(t){ai!==t.T&&n(30),ai=t.I,void 0!==t.S&&(Ai.suppressReactionErrors=!0),ct(t.M),mt(t.V),St(),t.A&&yt(t.k),Ai.suppressReactionErrors=!1}function st(t,n){var i=ft(t);try{return n()}finally{ct(i)}}function ft(t){var n=Ai.allowStateChanges;return Ai.allowStateChanges=t,n}function ct(t){Ai.allowStateChanges=t}function at(t){return t instanceof wi}function ht(t){switch(t.L){case pi.C:return!1;case pi.P:case pi.K:return!0;case pi.B:for(var n=pt(!0),i=bt(),r=t.D,e=r.length,u=0;u<e;u++){var o=r[u];if(ji(o)){if(Ai.disableErrorBoundaries)o.get();else try{o.get()}catch(t){return yt(i),mt(n),!0}if(t.L===pi.K)return yt(i),mt(n),!0}}return jt(t),yt(i),mt(n),!1}}function vt(t,n,i){var r=pt(!0);jt(t),t.W=new Array(0===t.q?100:t.D.length),t.G=0,t.q=++Ai.runId;var e,u=Ai.trackingDerivation;if(Ai.trackingDerivation=t,Ai.inBatch++,!0===Ai.disableErrorBoundaries)e=n.call(i);else try{e=n.call(i)}catch(t){e=new wi(t)}return Ai.inBatch--,Ai.trackingDerivation=u,function(t){for(var n=t.D,i=t.D=t.W,r=pi.C,e=0,u=t.G,o=0;o<u;o++){var s=i[o];0===s.diffValue&&(s.diffValue=1,e!==o&&(i[e]=s),e++),s.L>r&&(r=s.L)}for(i.length=e,t.W=null,u=n.length;u--;){var f=n[u];0===f.diffValue&&Ot(f,t),f.diffValue=0}for(;e--;){var c=i[e];1===c.diffValue&&(c.diffValue=0,wt(c,t))}r!==pi.C&&(t.L=r,t.H())}(t),mt(r),e}function lt(t){var n=t.D;t.D=[];for(var i=n.length;i--;)Ot(n[i],t);t.L=pi.P}function dt(t){var n=bt();try{return t()}finally{yt(n)}}function bt(){var t=Ai.trackingDerivation;return Ai.trackingDerivation=null,t}function yt(t){Ai.trackingDerivation=t}function pt(t){var n=Ai.allowStateReads;return Ai.allowStateReads=t,n}function mt(t){Ai.allowStateReads=t}function jt(t){if(t.L!==pi.C){t.L=pi.C;for(var n=t.D,i=n.length;i--;)n[i].U=pi.C}}function wt(t,n){t.X.add(n),t.U>n.L&&(t.U=n.L)}function Ot(t,n){t.X.delete(n),0===t.X.size&>(t)}function gt(t){!1===t.isPendingUnobservation&&(t.isPendingUnobservation=!0,Ai.pendingUnobservations.push(t))}function _t(){Ai.inBatch++}function St(){if(0==--Ai.inBatch){kt();for(var t=Ai.pendingUnobservations,n=0;n<t.length;n++){var i=t[n];i.isPendingUnobservation=!1,0===i.X.size&&(i.isBeingObserved&&(i.isBeingObserved=!1,i.onBUO()),i instanceof yi&&i.F())}Ai.pendingUnobservations=[]}}function At(t){var n=Ai.trackingDerivation;return null!==n?(n.q!==t.$&&(t.$=n.q,n.W[n.G++]=t,!t.isBeingObserved&&Ai.trackingContext&&(t.isBeingObserved=!0,t.onBO())),t.isBeingObserved):(0===t.X.size&&Ai.inBatch>0&>(t),!1)}function xt(t){t.U!==pi.K&&(t.U=pi.K,t.X.forEach((function(t){t.L===pi.C&&t.H(),t.L=pi.K})))}function kt(){Ai.inBatch>0||Ai.isRunningReactions||ki(Mt)}function Mt(){Ai.isRunningReactions=!0;for(var t=Ai.pendingReactions,n=0;t.length>0;){100==++n&&(console.error("[mobx] cycle in reaction: "+t[0]),t.splice(0));for(var i=t.splice(0),r=0,e=i.length;r<e;r++)i[r].J()}Ai.isRunningReactions=!1}function Vt(){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}function Et(t){return function(n,i){return u(n)?rt(n.name||"<unnamed action>",n,t):u(i)?rt(n,i,t):M(i)?(t?Ni:Vi).t(n,i):o(i)?k(n,i,t?Ni:Vi):o(n)?x(R(t?"autoAction":"action",{name:n,autoAction:t})):void 0}}function Nt(t){return et(0,!1,t,this,void 0)}function Rt(t){return u(t)&&!0===t.isMobxAction}function Tt(t,n){function i(){t(s)}var r,e,u,o;void 0===n&&(n=Kn);var s,f=null!=(r=null==(e=n)?void 0:e.name)?r:"Autorun";if(n.scheduler||n.delay){var c=It(n),a=!1;s=new xi(f,(function(){a||(a=!0,c((function(){a=!1,s.isDisposed||s.track(i)})))}),n.onError,n.requiresObservable)}else s=new xi(f,(function(){this.track(i)}),n.onError,n.requiresObservable);return null!=(u=n)&&null!=(u=u.signal)&&u.aborted||s.Y(),s.Z(null==(o=n)?void 0:o.signal)}function It(t){return t.scheduler?t.scheduler:t.delay?function(n){return setTimeout(n,t.delay)}:Li}function Lt(t,n,i){return Pt("onBO",t,n,i)}function Ct(t,n,i){return Pt("onBUO",t,n,i)}function Pt(t,n,i,r){var e="function"==typeof r?Sn(n,i):Sn(n),o=u(r)?r:i,s=t+"L";return e[s]?e[s].add(o):e[s]=new Set([o]),function(){var t=e[s];t&&(t.delete(o),0===t.size&&delete e[s])}}function Kt(t,n,i,r){var e=Hn(n);return kn((function(){var n=yn(t,r)[Xn];Gn(e).forEach((function(t){n.s(t,e[t],!i||!(t in i)||i[t])}))})),t}function Bt(t){var n,i={name:t.tt};return t.D&&t.D.length>0&&(i.dependencies=(n=t.D,Array.from(new Set(n))).map(Bt)),i}function Dt(t){var n={name:t.tt};return function(t){return t.X&&t.X.size>0}(t)&&(n.observers=Array.from(function(t){return t.X}(t)).map(Dt)),n}function Wt(){this.message="FLOW_CANCELLED"}function qt(t){u(t.cancel)&&t.cancel()}function Gt(t){return!0===(null==t?void 0:t.isMobXFlow)}function Ht(t,n){if(void 0===n)return ji(t);if(!1===mn(t))return!1;if(!t[Xn].j.has(n))return!1;var i=Sn(t,n);return ji(i)}function Ut(t,n){return!!t&&(void 0!==n?!!mn(t)&&t[Xn].j.has(n):mn(t)||!!t[Xn]||zn(t)||Mi(t)||ji(t))}function Xt(t){return Ut(t)}function Ft(t){return mn(t)?t[Xn].nt():Qi(t)||nr(t)?Array.from(t.keys()):ln(t)?t.map((function(t,n){return n})):void n(5)}function zt(t,i){return mn(t)?t[Xn].it(i):Qi(t)||nr(t)?t.has(i):ln(t)?i>=0&&i<t.length:void n(10)}function $t(t){if(mn(t))return t[Xn].rt();n(38)}function Jt(t,n,i){return t.set(n,i),i}function Yt(t,n){void 0===n&&(n=void 0),_t();try{return t.apply(n)}finally{St()}}function Qt(t,n,i){var r;if("number"==typeof i.timeout){var e=new Error("WHEN_TIMEOUT");r=setTimeout((function(){if(!o[Xn].isDisposed){if(o(),!i.onError)throw e;i.onError(e)}}),i.timeout)}i.name="When";var u=rt("When-effect",n),o=Tt((function(n){st(!1,t)&&(n.dispose(),r&&clearTimeout(r),u())}),i);return o}function Zt(t,n){var i,r,e;if(null!=n&&null!=(i=n.signal)&&i.aborted)return Object.assign(Promise.reject(new Error("WHEN_ABORTED")),{cancel:function(){return null}});var u=new Promise((function(i,u){var o,s=Qt(t,i,_({},n,{onError:u}));r=function(){s(),u(new Error("WHEN_CANCELLED"))},e=function(){s(),u(new Error("WHEN_ABORTED"))},null==n||null==(o=n.signal)||null==o.addEventListener||o.addEventListener("abort",e)})).finally((function(){var t;return null==n||null==(t=n.signal)||null==t.removeEventListener?void 0:t.removeEventListener("abort",e)}));return u.cancel=r,u}function tn(t){return t[Xn]}function nn(t){return void 0!==t.et&&t.et.length>0}function rn(t,n){var i=t.et||(t.et=[]);return i.push(n),e((function(){var t=i.indexOf(n);-1!==t&&i.splice(t,1)}))}function en(t,i){var r=bt();try{for(var e=[].concat(t.et||[]),u=0,o=e.length;u<o&&((i=e[u](i))&&!i.type&&n(14),i);u++);return i}finally{yt(r)}}function un(t){return void 0!==t.ut&&t.ut.length>0}function on(t,n){var i=t.ut||(t.ut=[]);return i.push(n),e((function(){var t=i.indexOf(n);-1!==t&&i.splice(t,1)}))}function sn(t,n){var i=bt(),r=t.ut;if(r){for(var e=0,u=(r=r.slice()).length;e<u;e++)r[e](n);yt(i)}}function fn(t,n,i,e){return void 0===i&&(i="ObservableArray"),void 0===e&&(e=!1),r(),kn((function(){var r=new Hi(i,n,e,!1);h(r.j,Xn,r);var u=new Proxy(r.j,Gi);return r.l=u,t&&t.length&&r.ot(0,0,t),u}))}function cn(t,n){"function"==typeof Array.prototype[t]&&(Ui[t]=n(t))}function an(t){return function(){var n=this[Xn];n.st.reportObserved();var i=n.ft(n.j);return i[t].apply(i,arguments)}}function hn(t){return function(n,i){var r=this,e=this[Xn];return e.st.reportObserved(),e.ft(e.j)[t]((function(t,e){return n.call(i,t,e,r)}))}}function vn(t){return function(){var n=this,i=this[Xn];i.st.reportObserved();var r=i.ft(i.j),e=arguments[0];return arguments[0]=function(t,i,r){return e(t,i,r,n)},r[t].apply(r,arguments)}}function ln(t){return s(t)&&zi(t[Xn])}function dn(t){return t[Symbol.toStringTag]="MapIterator",En(t)}function bn(t){return t[Symbol.toStringTag]="SetIterator",En(t)}function yn(t,n){var i;if(y(t,Xn))return t;var r=null!=(i=null==n?void 0:n.name)?i:"ObservableObject",e=new rr(t,new Map,String(r),function(t){var n;return t?null!=(n=t.defaultDecorator)?n:J(t):void 0}(n));return a(t,Xn,e),t}function pn(t){return ir[t]||(ir[t]={get:function(){return this[Xn].O(t)},set:function(n){return this[Xn]._(t,n)}})}function mn(t){return!!s(t)&&er(t[Xn])}function jn(t,n,i){var r;null==(r=t.h[Un])||delete r[i]}function wn(t){return{enumerable:!1,configurable:!0,get:function(){return this[Xn].ct(t)},set:function(n){this[Xn].ht(t,n)}}}function On(t){Ln(cr.prototype,""+t,wn(t))}function gn(t){if(t>sr){for(var n=sr;n<t+100;n++)On(n);sr=t}}function _n(t,n,i){return new cr(t,n,i)}function Sn(t,i){if("object"==typeof t&&null!==t){if(ln(t))return void 0!==i&&n(23),t[Xn].st;if(nr(t))return t.st;if(Qi(t)){if(void 0===i)return t.vt;var r=t.lt.get(i)||t.dt.get(i);return r||n(25,i,xn(t)),r}if(mn(t)){if(!i)return n(26);var e=t[Xn].j.get(i);return e||n(27,i,xn(t)),e}if(zn(t)||ji(t)||Mi(t))return t}else if(u(t)&&Mi(t[Xn]))return t[Xn];n(28)}function An(t,i){return t||n(29),void 0!==i?An(Sn(t,i)):zn(t)||ji(t)||Mi(t)||Qi(t)||nr(t)?t:t[Xn]?t[Xn]:void n(24,t)}function xn(t,n){var i;if(void 0!==n)i=Sn(t,n);else{if(Rt(t))return t.name;i=mn(t)||Qi(t)||nr(t)?An(t):Sn(t)}return i.tt}function kn(t){var n=bt(),i=ft(!0);_t();try{return t()}finally{St(),ct(i),yt(n)}}function Mn(t,n,i){return void 0===i&&(i=-1),function t(n,i,r,e,o){if(n===i)return 0!==n||1/n==1/i;if(null==n||null==i)return!1;if(n!=n)return i!=i;var s=typeof n;if("function"!==s&&"object"!==s&&"object"!=typeof i)return!1;var f=hr.call(n);if(f!==hr.call(i))return!1;switch(f){case"[object RegExp]":case"[object String]":return""+n==""+i;case"[object Number]":return+n!=+n?+i!=+i:0==+n?1/+n==1/i:+n==+i;case"[object Date]":case"[object Boolean]":return+n==+i;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(n)===Symbol.valueOf.call(i);case"[object Map]":case"[object Set]":r>=0&&r++}n=Vn(n),i=Vn(i);var c="[object Array]"===f;if(!c){if("object"!=typeof n||"object"!=typeof i)return!1;var a=n.constructor,h=i.constructor;if(a!==h&&!(u(a)&&a instanceof a&&u(h)&&h instanceof h)&&"constructor"in n&&"constructor"in i)return!1}if(0===r)return!1;r<0&&(r=-1),o=o||[];for(var v=(e=e||[]).length;v--;)if(e[v]===n)return o[v]===i;if(e.push(n),o.push(i),c){if((v=n.length)!==i.length)return!1;for(;v--;)if(!t(n[v],i[v],r-1,e,o))return!1}else{var l=Object.keys(n),d=l.length;if(Object.keys(i).length!==d)return!1;for(var b=0;b<d;b++){var p=l[b];if(!y(i,p)||!t(n[p],i[p],r-1,e,o))return!1}}return e.pop(),o.pop(),!0}(t,n,i)}function Vn(t){return ln(t)?t.slice():l(t)||Qi(t)||d(t)||nr(t)?Array.from(t.entries()):t}function En(t){return t[Symbol.iterator]=Nn,Object.assign(Object.create(vr),t)}function Nn(){return this}var Rn={},Tn=Object.assign,In=Object.getOwnPropertyDescriptor,Ln=Object.defineProperty,Cn=Object.prototype,Pn=[];Object.freeze(Pn);var Kn={};Object.freeze(Kn);var Bn="undefined"!=typeof Proxy,Dn=Object.toString(),Wn=function(){},qn=void 0!==Object.getOwnPropertySymbols,Gn="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:qn?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Hn=Object.getOwnPropertyDescriptors||function(t){var n={};return Gn(t).forEach((function(i){n[i]=In(t,i)})),n},Un=Symbol("mobx-stored-annotations"),Xn=Symbol("mobx administration"),Fn=function(){function t(t){void 0===t&&(t="Atom"),this.tt=void 0,this.bt=0,this.X=new Set,this.$=0,this.U=pi.P,this.onBOL=void 0,this.onBUOL=void 0,this.tt=t}var n=t.prototype;return n.onBO=function(){this.onBOL&&this.onBOL.forEach((function(t){return t()}))},n.onBUO=function(){this.onBUOL&&this.onBUOL.forEach((function(t){return t()}))},n.reportObserved=function(){return At(this)},n.reportChanged=function(){_t(),xt(this),St()},n.toString=function(){return this.tt},O(t,[{key:"isBeingObserved",get:function(){return p(this.bt,t.yt)},set:function(n){this.bt=m(this.bt,t.yt,n)}},{key:"isPendingUnobservation",get:function(){return p(this.bt,t.pt)},set:function(n){this.bt=m(this.bt,t.pt,n)}},{key:"diffValue",get:function(){return p(this.bt,t.jt)?1:0},set:function(n){this.bt=m(this.bt,t.jt,1===n)}}])}();Fn.yt=1,Fn.pt=2,Fn.jt=4;var zn=v("Atom",Fn),$n={identity:function(t,n){return t===n},structural:function(t,n){return Mn(t,n)},default:function(t,n){return Object.is?Object.is(t,n):t===n?0!==t||1/t==1/n:t!=t&&n!=n},shallow:function(t,n){return Mn(t,n,1)}},Jn=x({i:"override",o:function(){return 0},s:function(){n("'"+this.i+"' can only be used with 'makeObservable'")},t:function(){console.warn("'"+this.i+"' cannot be used with decorators - this is a no-op")}}),Yn=J(),Qn={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};Object.freeze(Qn);var Zn=X("observable"),ti=X("observable.ref",{enhancer:N}),ni=X("observable.shallow",{enhancer:function(t,n,i){return null==t||mn(t)||ln(t)||Qi(t)||nr(t)?t:Array.isArray(t)?oi.array(t,{name:i,deep:!1}):f(t)?oi.object(t,void 0,{name:i,deep:!1}):l(t)?oi.map(t,{name:i,deep:!1}):d(t)?oi.set(t,{name:i,deep:!1}):void 0}}),ii=X("observable.struct",{enhancer:function(t,n){return Mn(t,n)?n:t}}),ri=x(Zn);Tn(it,ri);var ei,ui,oi=Tn(it,{box:function(t,n){var i=tt(n);return new di(t,nt(i),i.name,!0,i.equals)},array:function(t,n){var i=tt(n);return(!1===Ai.useProxies||!1===i.proxy?_n:fn)(t,nt(i),i.name)},map:function(t,n){var i=tt(n);return new Yi(t,nt(i),i.name)},set:function(t,n){var i=tt(n);return new tr(t,nt(i),i.name)},object:function(t,n,i){return kn((function(){return Kt(!1===Ai.useProxies||!1===(null==i?void 0:i.proxy)?yn({},i):function(t,n){var i,e;return r(),null!=(e=(i=(t=yn(t,n))[Xn]).l)?e:i.l=new Proxy(t,Di)}({},i),t,n)}))},ref:x(ti),shallow:x(ni),deep:ri,struct:x(ii)}),si=q("computed"),fi=q("computed.struct",{equals:$n.structural}),ci=function(t,n){if(M(n))return si.t(t,n);if(o(n))return k(t,n,si);if(f(t))return x(q("computed",t));var i=f(n)?n:{};return i.get=t,i.name||(i.name=t.name||""),new yi(i)};Object.assign(ci,si),ci.struct=x(fi);var ai=0,hi=1,vi=null!=(ei=null==(ui=In((function(){}),"name"))?void 0:ui.configurable)&&ei,li={value:"action",configurable:!0,writable:!1,enumerable:!1},di=function(t){function n(n,i,r,e,u){var o;return void 0===r&&(r="ObservableValue"),void 0===u&&(u=$n.default),(o=t.call(this,r)||this).enhancer=void 0,o.tt=void 0,o.equals=void 0,o.wt=!1,o.et=void 0,o.ut=void 0,o.Ot=void 0,o.dehancer=void 0,o.enhancer=i,o.tt=r,o.equals=u,o.Ot=i(n,void 0,r),o}S(n,t);var i=n.prototype;return i.dehanceValue=function(t){return void 0!==this.dehancer?this.dehancer(t):t},i.set=function(t){(t=this.gt(t))!==Ai.UNCHANGED&&this._t(t)},i.gt=function(t){if(nn(this)){var n=en(this,{object:this,type:qi,newValue:t});if(!n)return Ai.UNCHANGED;t=n.newValue}return t=this.enhancer(t,this.Ot,this.tt),this.equals(this.Ot,t)?Ai.UNCHANGED:t},i._t=function(t){var n=this.Ot;this.Ot=t,this.reportChanged(),un(this)&&sn(this,{type:qi,object:this,newValue:t,oldValue:n})},i.get=function(){return this.reportObserved(),this.dehanceValue(this.Ot)},i.St=function(t){return rn(this,t)},i.At=function(t,n){return n&&t({observableKind:"value",debugObjectName:this.tt,object:this,type:qi,newValue:this.Ot,oldValue:void 0}),on(this,t)},i.raw=function(){return this.Ot},i.toJSON=function(){return this.get()},i.toString=function(){return this.tt+"["+this.Ot+"]"},i.valueOf=function(){return b(this.get())},i[Symbol.toPrimitive]=function(){return this.valueOf()},n}(Fn),bi=v("ObservableValue",di),yi=function(){function t(t){this.L=pi.P,this.D=[],this.W=null,this.X=new Set,this.q=0,this.$=0,this.U=pi.C,this.G=0,this.Ot=new wi(null),this.tt=void 0,this.xt=void 0,this.bt=0,this.derivation=void 0,this.kt=void 0,this.Mt=mi.NONE,this.Vt=void 0,this.Et=void 0,this.Nt=void 0,this.Rt=void 0,this.onBOL=void 0,this.onBUOL=void 0,t.get||n(31),this.derivation=t.get,this.tt=t.name||"ComputedValue",t.set&&(this.kt=rt("ComputedValue-setter",t.set)),this.Et=t.equals||(t.compareStructural||t.struct?$n.structural:$n.default),this.Vt=t.context,this.Nt=t.requiresReaction,this.Rt=!!t.keepAlive}var i=t.prototype;return i.H=function(){!function(t){t.U===pi.C&&(t.U=pi.B,t.X.forEach((function(t){t.L===pi.C&&(t.L=pi.B,t.H())})))}(this)},i.onBO=function(){this.onBOL&&this.onBOL.forEach((function(t){return t()}))},i.onBUO=function(){this.onBUOL&&this.onBUOL.forEach((function(t){return t()}))},i.get=function(){if(this.isComputing&&n(32,this.tt,this.derivation),0!==Ai.inBatch||0!==this.X.size||this.Rt){if(At(this),ht(this)){var t=Ai.trackingContext;this.Rt&&!t&&(Ai.trackingContext=this),this.trackAndCompute()&&function(t){t.U!==pi.K&&(t.U=pi.K,t.X.forEach((function(n){n.L===pi.B?n.L=pi.K:n.L===pi.C&&(t.U=pi.C)})))}(this),Ai.trackingContext=t}}else ht(this)&&(this.Tt(),_t(),this.Ot=this.It(!1),St());var i=this.Ot;if(at(i))throw i.cause;return i},i.set=function(t){if(this.kt){this.isRunningSetter&&n(33,this.tt),this.isRunningSetter=!0;try{this.kt.call(this.Vt,t)}finally{this.isRunningSetter=!1}}else n(34,this.tt)},i.trackAndCompute=function(){var t=this.Ot,n=this.L===pi.P,i=this.It(!0),r=n||at(t)||at(i)||!this.Et(t,i);return r&&(this.Ot=i),r},i.It=function(t){this.isComputing=!0;var n,i=ft(!1);if(t)n=vt(this,this.derivation,this.Vt);else if(!0===Ai.disableErrorBoundaries)n=this.derivation.call(this.Vt);else try{n=this.derivation.call(this.Vt)}catch(t){n=new wi(t)}return ct(i),this.isComputing=!1,n},i.F=function(){this.Rt||(lt(this),this.Ot=void 0)},i.At=function(t,n){var i=this,r=!0,e=void 0;return Tt((function(){var u=i.get();if(!r||n){var o=bt();t({observableKind:"computed",debugObjectName:i.tt,type:qi,object:i,newValue:u,oldValue:e}),yt(o)}r=!1,e=u}))},i.Tt=function(){},i.toString=function(){return this.tt+"["+this.derivation.toString()+"]"},i.valueOf=function(){return b(this.get())},i[Symbol.toPrimitive]=function(){return this.valueOf()},O(t,[{key:"isComputing",get:function(){return p(this.bt,t.Lt)},set:function(n){this.bt=m(this.bt,t.Lt,n)}},{key:"isRunningSetter",get:function(){return p(this.bt,t.Ct)},set:function(n){this.bt=m(this.bt,t.Ct,n)}},{key:"isBeingObserved",get:function(){return p(this.bt,t.yt)},set:function(n){this.bt=m(this.bt,t.yt,n)}},{key:"isPendingUnobservation",get:function(){return p(this.bt,t.pt)},set:function(n){this.bt=m(this.bt,t.pt,n)}},{key:"diffValue",get:function(){return p(this.bt,t.jt)?1:0},set:function(n){this.bt=m(this.bt,t.jt,1===n)}}])}();yi.Lt=1,yi.Ct=2,yi.yt=4,yi.pt=8,yi.jt=16;var pi,mi,ji=v("ComputedValue",yi);!function(t){t[t.P=-1]="NOT_TRACKING_",t[t.C=0]="UP_TO_DATE_",t[t.B=1]="POSSIBLY_STALE_",t[t.K=2]="STALE_"}(pi||(pi={})),function(t){t[t.NONE=0]="NONE",t[t.LOG=1]="LOG",t[t.BREAK=2]="BREAK"}(mi||(mi={}));var wi=function(t){this.cause=void 0,this.cause=t},Oi=["mobxGuid","spyListeners","enforceActions","computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","allowStateReads","disableErrorBoundaries","runId","UNCHANGED","useProxies"],gi=function(){this.version=6,this.UNCHANGED={},this.trackingDerivation=null,this.trackingContext=null,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!1,this.allowStateReads=!0,this.enforceActions=!0,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1,this.useProxies=!0,this.verifyProxies=!1,this.safeDescriptors=!0},_i=!0,Si=!1,Ai=function(){var t=i();return t.__mobxInstanceCount>0&&!t.__mobxGlobals&&(_i=!1),t.__mobxGlobals&&t.__mobxGlobals.version!==(new gi).version&&(_i=!1),_i?t.__mobxGlobals?(t.__mobxInstanceCount+=1,t.__mobxGlobals.UNCHANGED||(t.__mobxGlobals.UNCHANGED={}),t.__mobxGlobals):(t.__mobxInstanceCount=1,t.__mobxGlobals=new gi):(setTimeout((function(){Si||n(35)}),1),new gi)}(),xi=function(){function t(t,n,i,r){void 0===t&&(t="Reaction"),this.tt=void 0,this.Pt=void 0,this.Kt=void 0,this.Bt=void 0,this.D=[],this.W=[],this.L=pi.P,this.q=0,this.G=0,this.bt=0,this.Mt=mi.NONE,this.tt=t,this.Pt=n,this.Kt=i,this.Bt=r}var n=t.prototype;return n.H=function(){this.Y()},n.Y=function(){this.isScheduled||(this.isScheduled=!0,Ai.pendingReactions.push(this),kt())},n.J=function(){if(!this.isDisposed){_t(),this.isScheduled=!1;var t=Ai.trackingContext;if(Ai.trackingContext=this,ht(this)){this.isTrackPending=!0;try{this.Pt()}catch(t){this.Dt(t)}}Ai.trackingContext=t,St()}},n.track=function(t){if(!this.isDisposed){_t(),this.isRunning=!0;var n=Ai.trackingContext;Ai.trackingContext=this;var i=vt(this,t,void 0);Ai.trackingContext=n,this.isRunning=!1,this.isTrackPending=!1,this.isDisposed&<(this),at(i)&&this.Dt(i.cause),St()}},n.Dt=function(t){var n=this;if(this.Kt)this.Kt(t,this);else{if(Ai.disableErrorBoundaries)throw t;Ai.suppressReactionErrors||console.error("[mobx] uncaught error in '"+this+"'",t),Ai.globalReactionErrorHandlers.forEach((function(i){return i(t,n)}))}},n.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.isRunning||(_t(),lt(this),St()))},n.Z=function(t){var n=this,i=function i(){n.dispose(),null==t||null==t.removeEventListener||t.removeEventListener("abort",i)};return null==t||null==t.addEventListener||t.addEventListener("abort",i),i[Xn]=this,i},n.toString=function(){return"Reaction["+this.tt+"]"},n.trace=function(){},O(t,[{key:"isDisposed",get:function(){return p(this.bt,t.Wt)},set:function(n){this.bt=m(this.bt,t.Wt,n)}},{key:"isScheduled",get:function(){return p(this.bt,t.qt)},set:function(n){this.bt=m(this.bt,t.qt,n)}},{key:"isTrackPending",get:function(){return p(this.bt,t.Gt)},set:function(n){this.bt=m(this.bt,t.Gt,n)}},{key:"isRunning",get:function(){return p(this.bt,t.Ht)},set:function(n){this.bt=m(this.bt,t.Ht,n)}},{key:"diffValue",get:function(){return p(this.bt,t.jt)?1:0},set:function(n){this.bt=m(this.bt,t.jt,1===n)}}])}();xi.Wt=1,xi.qt=2,xi.Gt=4,xi.Ht=8,xi.jt=16;var ki=function(t){return t()},Mi=v("Reaction",xi),Vi=R("action"),Ei=R("action.bound",{bound:!0}),Ni=R("autoAction",{autoAction:!0}),Ri=R("autoAction.bound",{autoAction:!0,bound:!0}),Ti=Et(!1);Object.assign(Ti,Vi);var Ii=Et(!0);Object.assign(Ii,Ni),Ti.bound=x(Ei),Ii.bound=x(Ri);var Li=function(t){return t()},Ci=0;Wt.prototype=Object.create(Error.prototype);var Pi=P("flow"),Ki=P("flow.bound",{bound:!0}),Bi=Object.assign((function(t,n){if(M(n))return Pi.t(t,n);if(o(n))return k(t,n,Pi);var i=t,r=i.name||"<unnamed flow>",e=function(){var t,n=this,e=arguments,o=++Ci,s=Ti(r+" - runid: "+o+" - init",i).apply(n,e),f=void 0,c=new Promise((function(n,i){function e(t){var n;f=void 0;try{n=Ti(r+" - runid: "+o+" - yield "+h++,s.next).call(s,t)}catch(t){return i(t)}a(n)}function c(t){var n;f=void 0;try{n=Ti(r+" - runid: "+o+" - yield "+h++,s.throw).call(s,t)}catch(t){return i(t)}a(n)}function a(t){if(!u(null==t?void 0:t.then))return t.done?n(t.value):(f=Promise.resolve(t.value)).then(e,c);t.then(a,i)}var h=0;t=i,e(void 0)}));return c.cancel=Ti(r+" - runid: "+o+" - cancel",(function(){try{f&&qt(f);var n=s.return(void 0),i=Promise.resolve(n.value);i.then(Wn,Wn),qt(i),t(new Wt)}catch(n){t(n)}})),c};return e.isMobXFlow=!0,e}),Pi);Bi.bound=x(Ki);var Di={has:function(t,n){return tn(t).it(n)},get:function(t,n){return tn(t).ct(n)},set:function(t,n,i){var r;return!!o(n)&&(null==(r=tn(t).ht(n,i,!0))||r)},deleteProperty:function(t,n){var i;return!!o(n)&&(null==(i=tn(t).Ut(n,!0))||i)},defineProperty:function(t,n,i){var r;return null==(r=tn(t).v(n,i))||r},ownKeys:function(t){return tn(t).rt()},preventExtensions:function(){n(13)}},Wi=Symbol("mobx-keys"),qi="update",Gi={get:function(t,n){var i=t[Xn];return n===Xn?i:"length"===n?i.Xt():"string"!=typeof n||isNaN(n)?y(Ui,n)?Ui[n]:t[n]:i.ct(parseInt(n))},set:function(t,n,i){var r=t[Xn];return"length"===n&&r.Ft(i),"symbol"==typeof n||isNaN(n)?t[n]=i:r.ht(parseInt(n),i),!0},preventExtensions:function(){n(15)}},Hi=function(){function t(t,n,i,r){void 0===t&&(t="ObservableArray"),this.zt=void 0,this.$t=void 0,this.st=void 0,this.j=[],this.et=void 0,this.ut=void 0,this.Jt=void 0,this.dehancer=void 0,this.l=void 0,this.Yt=0,this.zt=i,this.$t=r,this.st=new Fn(t),this.Jt=function(t,i){return n(t,i,"ObservableArray[..]")}}var i=t.prototype;return i.Qt=function(t){return void 0!==this.dehancer?this.dehancer(t):t},i.ft=function(t){return void 0!==this.dehancer&&t.length>0?t.map(this.dehancer):t},i.St=function(t){return rn(this,t)},i.At=function(t,n){return void 0===n&&(n=!1),n&&t({observableKind:"array",object:this.l,debugObjectName:this.st.tt,type:"splice",index:0,added:this.j.slice(),addedCount:this.j.length,removed:[],removedCount:0}),on(this,t)},i.Xt=function(){return this.st.reportObserved(),this.j.length},i.Ft=function(t){("number"!=typeof t||isNaN(t)||t<0)&&n("Out of range: "+t);var i=this.j.length;if(t!==i)if(t>i){for(var r=new Array(t-i),e=0;e<t-i;e++)r[e]=void 0;this.ot(i,0,r)}else this.ot(t,i-t)},i.Zt=function(t,i){t!==this.Yt&&n(16),this.Yt+=i,this.$t&&i>0&&gn(t+i+1)},i.ot=function(t,n,i){var r=this,e=this.j.length;if(void 0===t?t=0:t>e?t=e:t<0&&(t=Math.max(0,e+t)),n=1===arguments.length?e-t:null==n?0:Math.max(0,Math.min(n,e-t)),void 0===i&&(i=Pn),nn(this)){var u=en(this,{object:this.l,type:"splice",index:t,removedCount:n,added:i});if(!u)return Pn;n=u.removedCount,i=u.added}if(i=0===i.length?i:i.map((function(t){return r.Jt(t,void 0)})),this.$t){var o=i.length-n;this.Zt(e,o)}var s=this.tn(t,n,i);return 0===n&&0===i.length||this.nn(t,i,s),this.ft(s)},i.tn=function(t,n,i){var r;if(i.length<1e4)return(r=this.j).splice.apply(r,[t,n].concat(i));var e=this.j.slice(t,t+n),u=this.j.slice(t+n);this.j.length+=i.length-n;for(var o=0;o<i.length;o++)this.j[t+o]=i[o];for(var s=0;s<u.length;s++)this.j[t+i.length+s]=u[s];return e},i.in=function(t,n,i){var r=!this.zt&&!1,e=un(this),u=e||r?{observableKind:"array",object:this.l,type:qi,debugObjectName:this.st.tt,index:t,newValue:n,oldValue:i}:null;this.st.reportChanged(),e&&sn(this,u)},i.nn=function(t,n,i){var r=!this.zt&&!1,e=un(this),u=e||r?{observableKind:"array",object:this.l,debugObjectName:this.st.tt,type:"splice",index:t,removed:i,added:n,removedCount:i.length,addedCount:n.length}:null;this.st.reportChanged(),e&&sn(this,u)},i.ct=function(t){if(!(this.$t&&t>=this.j.length))return this.st.reportObserved(),this.Qt(this.j[t]);console.warn("[mobx] Out of bounds read: "+t)},i.ht=function(t,i){var r=this.j;if(this.$t&&t>r.length&&n(17,t,r.length),t<r.length){var e=r[t];if(nn(this)){var u=en(this,{type:qi,object:this.l,index:t,newValue:i});if(!u)return;i=u.newValue}(i=this.Jt(i,e))!==e&&(r[t]=i,this.in(t,i,e))}else{for(var o=new Array(t+1-r.length),s=0;s<o.length-1;s++)o[s]=void 0;o[o.length-1]=i,this.ot(r.length,0,o)}},t}(),Ui={clear:function(){return this.splice(0)},replace:function(t){var n=this[Xn];return n.ot(0,n.j.length,t)},toJSON:function(){return this.slice()},splice:function(t,n){for(var i=arguments.length,r=new Array(i>2?i-2:0),e=2;e<i;e++)r[e-2]=arguments[e];var u=this[Xn];switch(arguments.length){case 0:return[];case 1:return u.ot(t);case 2:return u.ot(t,n)}return u.ot(t,n,r)},spliceWithArray:function(t,n,i){return this[Xn].ot(t,n,i)},push:function(){for(var t=this[Xn],n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return t.ot(t.j.length,0,i),t.j.length},pop:function(){return this.splice(Math.max(this[Xn].j.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var t=this[Xn],n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return t.ot(0,0,i),t.j.length},reverse:function(){return Ai.trackingDerivation&&n(37,"reverse"),this.replace(this.slice().reverse()),this},sort:function(){Ai.trackingDerivation&&n(37,"sort");var t=this.slice();return t.sort.apply(t,arguments),this.replace(t),this},remove:function(t){var n=this[Xn],i=n.ft(n.j).indexOf(t);return i>-1&&(this.splice(i,1),!0)}};cn("at",an),cn("concat",an),cn("flat",an),cn("includes",an),cn("indexOf",an),cn("join",an),cn("lastIndexOf",an),cn("slice",an),cn("toString",an),cn("toLocaleString",an),cn("toSorted",an),cn("toSpliced",an),cn("with",an),cn("every",hn),cn("filter",hn),cn("find",hn),cn("findIndex",hn),cn("findLast",hn),cn("findLastIndex",hn),cn("flatMap",hn),cn("forEach",hn),cn("map",hn),cn("some",hn),cn("toReversed",hn),cn("reduce",vn),cn("reduceRight",vn);var Xi,Fi,zi=v("ObservableArrayAdministration",Hi),$i={},Ji="add",Yi=function(){function t(t,i,r){var e=this;void 0===i&&(i=E),void 0===r&&(r="ObservableMap"),this.Jt=void 0,this.tt=void 0,this[Xn]=$i,this.lt=void 0,this.dt=void 0,this.vt=void 0,this.et=void 0,this.ut=void 0,this.dehancer=void 0,this.Jt=i,this.tt=r,u(Map)||n(18),kn((function(){e.vt=V("ObservableMap.keys()"),e.lt=new Map,e.dt=new Map,t&&e.merge(t)}))}var i=t.prototype;return i.it=function(t){return this.lt.has(t)},i.has=function(t){var n=this;if(!Ai.trackingDerivation)return this.it(t);var i=this.dt.get(t);if(!i){var r=i=new di(this.it(t),N,"ObservableMap.key?",!1);this.dt.set(t,r),Ct(r,(function(){return n.dt.delete(t)}))}return i.get()},i.set=function(t,n){var i=this.it(t);if(nn(this)){var r=en(this,{type:i?qi:Ji,object:this,newValue:n,name:t});if(!r)return this;n=r.newValue}return i?this.rn(t,n):this.en(t,n),this},i.delete=function(t){var n=this;if(nn(this)&&!en(this,{type:"delete",object:this,name:t}))return!1;if(this.it(t)){var i=un(this),r=i?{observableKind:"map",debugObjectName:this.tt,type:"delete",object:this,oldValue:this.lt.get(t).Ot,name:t}:null;return Yt((function(){var i;n.vt.reportChanged(),null==(i=n.dt.get(t))||i._t(!1),n.lt.get(t)._t(void 0),n.lt.delete(t)})),i&&sn(this,r),!0}return!1},i.rn=function(t,n){var i=this.lt.get(t);if((n=i.gt(n))!==Ai.UNCHANGED){var r=un(this),e=r?{observableKind:"map",debugObjectName:this.tt,type:qi,object:this,oldValue:i.Ot,name:t,newValue:n}:null;i._t(n),r&&sn(this,e)}},i.en=function(t,n){var i=this;Yt((function(){var r,e=new di(n,i.Jt,"ObservableMap.key",!1);i.lt.set(t,e),n=e.Ot,null==(r=i.dt.get(t))||r._t(!0),i.vt.reportChanged()}));var r=un(this);r&&sn(this,r?{observableKind:"map",debugObjectName:this.tt,type:Ji,object:this,name:t,newValue:n}:null)},i.get=function(t){return this.has(t)?this.Qt(this.lt.get(t).get()):this.Qt(void 0)},i.Qt=function(t){return void 0!==this.dehancer?this.dehancer(t):t},i.keys=function(){return this.vt.reportObserved(),this.lt.keys()},i.values=function(){var t=this,n=this.keys();return dn({next:function(){var i=n.next(),r=i.done;return{done:r,value:r?void 0:t.get(i.value)}}})},i.entries=function(){var t=this,n=this.keys();return dn({next:function(){var i=n.next(),r=i.done,e=i.value;return{done:r,value:r?void 0:[e,t.get(e)]}}})},i[Symbol.iterator]=function(){return this.entries()},i.forEach=function(t,n){for(var i,r=g(this);!(i=r()).done;){var e=i.value;t.call(n,e[1],e[0],this)}},i.merge=function(t){var i=this;return Qi(t)&&(t=new Map(t)),Yt((function(){var r,e;f(t)?function(t){var n=Object.keys(t);if(!qn)return n;var i=Object.getOwnPropertySymbols(t);return i.length?[].concat(n,i.filter((function(n){return Cn.propertyIsEnumerable.call(t,n)}))):n}(t).forEach((function(n){return i.set(n,t[n])})):Array.isArray(t)?t.forEach((function(t){return i.set(t[0],t[1])})):l(t)?(r=Object.getPrototypeOf(t),e=Object.getPrototypeOf(r),null!==Object.getPrototypeOf(e)&&n(19,t),t.forEach((function(t,n){return i.set(n,t)}))):null!=t&&n(20,t)})),this},i.clear=function(){var t=this;Yt((function(){dt((function(){for(var n,i=g(t.keys());!(n=i()).done;)t.delete(n.value)}))}))},i.replace=function(t){var i=this;return Yt((function(){for(var r,e=function(t){if(l(t)||Qi(t))return t;if(Array.isArray(t))return new Map(t);if(f(t)){var i=new Map;for(var r in t)i.set(r,t[r]);return i}return n(21,t)}(t),u=new Map,o=!1,s=g(i.lt.keys());!(r=s()).done;){var c=r.value;if(!e.has(c))if(i.delete(c))o=!0;else{var a=i.lt.get(c);u.set(c,a)}}for(var h,v=g(e.entries());!(h=v()).done;){var d=h.value,b=d[0],y=d[1],p=i.lt.has(b);if(i.set(b,y),i.lt.has(b)){var m=i.lt.get(b);u.set(b,m),p||(o=!0)}}if(!o)if(i.lt.size!==u.size)i.vt.reportChanged();else for(var j=i.lt.keys(),w=u.keys(),O=j.next(),_=w.next();!O.done;){if(O.value!==_.value){i.vt.reportChanged();break}O=j.next(),_=w.next()}i.lt=u})),this},i.toString=function(){return"[object ObservableMap]"},i.toJSON=function(){return Array.from(this)},i.At=function(t){return on(this,t)},i.St=function(t){return rn(this,t)},O(t,[{key:"size",get:function(){return this.vt.reportObserved(),this.lt.size}},{key:Symbol.toStringTag,get:function(){return"Map"}}])}(),Qi=v("ObservableMap",Yi),Zi={},tr=function(){function t(t,i,r){var e=this;void 0===i&&(i=E),void 0===r&&(r="ObservableSet"),this.tt=void 0,this[Xn]=Zi,this.lt=new Set,this.st=void 0,this.ut=void 0,this.et=void 0,this.dehancer=void 0,this.Jt=void 0,this.tt=r,u(Set)||n(22),this.Jt=function(t,n){return i(t,n,r)},kn((function(){e.st=V(e.tt),t&&e.replace(t)}))}var i=t.prototype;return i.Qt=function(t){return void 0!==this.dehancer?this.dehancer(t):t},i.clear=function(){var t=this;Yt((function(){dt((function(){for(var n,i=g(t.lt.values());!(n=i()).done;)t.delete(n.value)}))}))},i.forEach=function(t,n){for(var i,r=g(this);!(i=r()).done;){var e=i.value;t.call(n,e,e,this)}},i.add=function(t){var n=this;if(nn(this)){var i=en(this,{type:Ji,object:this,newValue:t});if(!i)return this;t=i.newValue}if(!this.has(t)){Yt((function(){n.lt.add(n.Jt(t,void 0)),n.st.reportChanged()}));var r=un(this);r&&sn(this,r?{observableKind:"set",debugObjectName:this.tt,type:Ji,object:this,newValue:t}:null)}return this},i.delete=function(t){var n=this;if(nn(this)&&!en(this,{type:"delete",object:this,oldValue:t}))return!1;if(this.has(t)){var i=un(this),r=i?{observableKind:"set",debugObjectName:this.tt,type:"delete",object:this,oldValue:t}:null;return Yt((function(){n.st.reportChanged(),n.lt.delete(t)})),i&&sn(this,r),!0}return!1},i.has=function(t){return this.st.reportObserved(),this.lt.has(this.Qt(t))},i.entries=function(){var t=this.values();return bn({next:function(){var n=t.next(),i=n.value,r=n.done;return r?{value:void 0,done:r}:{value:[i,i],done:r}}})},i.keys=function(){return this.values()},i.values=function(){this.st.reportObserved();var t=this,n=this.lt.values();return bn({next:function(){var i=n.next(),r=i.done;return r?{value:void 0,done:r}:{value:t.Qt(i.value),done:r}}})},i.intersection=function(t){return d(t)&&!nr(t)?t.intersection(this):new Set(this).intersection(t)},i.union=function(t){return d(t)&&!nr(t)?t.union(this):new Set(this).union(t)},i.difference=function(t){return new Set(this).difference(t)},i.symmetricDifference=function(t){return d(t)&&!nr(t)?t.symmetricDifference(this):new Set(this).symmetricDifference(t)},i.isSubsetOf=function(t){return new Set(this).isSubsetOf(t)},i.isSupersetOf=function(t){return new Set(this).isSupersetOf(t)},i.isDisjointFrom=function(t){return d(t)&&!nr(t)?t.isDisjointFrom(this):new Set(this).isDisjointFrom(t)},i.replace=function(t){var i=this;return nr(t)&&(t=new Set(t)),Yt((function(){Array.isArray(t)||d(t)?(i.clear(),t.forEach((function(t){return i.add(t)}))):null!=t&&n("Cannot initialize set from "+t)})),this},i.At=function(t){return on(this,t)},i.St=function(t){return rn(this,t)},i.toJSON=function(){return Array.from(this)},i.toString=function(){return"[object ObservableSet]"},i[Symbol.iterator]=function(){return this.values()},O(t,[{key:"size",get:function(){return this.st.reportObserved(),this.lt.size}},{key:Symbol.toStringTag,get:function(){return"Set"}}])}(),nr=v("ObservableSet",tr),ir=Object.create(null),rr=function(){function t(t,n,i,r){void 0===n&&(n=new Map),void 0===r&&(r=Yn),this.h=void 0,this.j=void 0,this.tt=void 0,this.un=void 0,this.vt=void 0,this.ut=void 0,this.et=void 0,this.l=void 0,this.p=void 0,this.on=void 0,this.sn=void 0,this.h=t,this.j=n,this.tt=i,this.un=r,this.vt=new Fn("ObservableObject.keys"),this.p=f(this.h)}var i=t.prototype;return i.O=function(t){return this.j.get(t).get()},i._=function(t,n){var i=this.j.get(t);if(i instanceof yi)return i.set(n),!0;if(nn(this)){var r=en(this,{type:qi,object:this.l||this.h,name:t,newValue:n});if(!r)return null;n=r.newValue}if((n=i.gt(n))!==Ai.UNCHANGED){var e=un(this),u=e?{type:qi,observableKind:"object",debugObjectName:this.tt,object:this.l||this.h,oldValue:i.Ot,name:t,newValue:n}:null;i._t(n),e&&sn(this,u)}return!0},i.ct=function(t){return Ai.trackingDerivation&&!y(this.h,t)&&this.it(t),this.h[t]},i.ht=function(t,n,i){return void 0===i&&(i=!1),y(this.h,t)?this.j.has(t)?this._(t,n):i?Reflect.set(this.h,t,n):(this.h[t]=n,!0):this.s(t,{value:n,enumerable:!0,writable:!0,configurable:!0},this.un,i)},i.it=function(t){if(!Ai.trackingDerivation)return t in this.h;this.sn||(this.sn=new Map);var n=this.sn.get(t);return n||(n=new di(t in this.h,N,"ObservableObject.key?",!1),this.sn.set(t,n)),n.get()},i.o=function(t,i){if(!0===i&&(i=this.un),!1!==i){if(!(t in this.h)){var r;if(null!=(r=this.h[Un])&&r[t])return;n(1,i.i,this.tt+"."+t.toString())}for(var e=this.h;e&&e!==Cn;){var u=In(e,t);if(u){var o=i.o(this,t,u,e);if(0===o)return;if(1===o)break}e=Object.getPrototypeOf(e)}jn(this,0,t)}},i.s=function(t,n,i,r){if(void 0===r&&(r=!1),!0===i&&(i=this.un),!1===i)return this.v(t,n,r);var e=i.s(this,t,n,r);return e&&jn(this,0,t),e},i.v=function(t,n,i){void 0===i&&(i=!1);try{_t();var r=this.Ut(t);if(!r)return r;if(nn(this)){var e=en(this,{object:this.l||this.h,name:t,type:Ji,newValue:n.value});if(!e)return null;var u=e.newValue;n.value!==u&&(n=_({},n,{value:u}))}if(i){if(!Reflect.defineProperty(this.h,t,n))return!1}else Ln(this.h,t,n);this.fn(t,n.value)}finally{St()}return!0},i.g=function(t,n,i,r){void 0===r&&(r=!1);try{_t();var e=this.Ut(t);if(!e)return e;if(nn(this)){var u=en(this,{object:this.l||this.h,name:t,type:Ji,newValue:n});if(!u)return null;n=u.newValue}var o=pn(t),s={configurable:!Ai.safeDescriptors||this.p,enumerable:!0,get:o.get,set:o.set};if(r){if(!Reflect.defineProperty(this.h,t,s))return!1}else Ln(this.h,t,s);var f=new di(n,i,"ObservableObject.key",!1);this.j.set(t,f),this.fn(t,f.Ot)}finally{St()}return!0},i.m=function(t,n,i){void 0===i&&(i=!1);try{_t();var r=this.Ut(t);if(!r)return r;if(nn(this)&&!en(this,{object:this.l||this.h,name:t,type:Ji,newValue:void 0}))return null;n.name||(n.name="ObservableObject.key"),n.context=this.l||this.h;var e=pn(t),u={configurable:!Ai.safeDescriptors||this.p,enumerable:!1,get:e.get,set:e.set};if(i){if(!Reflect.defineProperty(this.h,t,u))return!1}else Ln(this.h,t,u);this.j.set(t,new yi(n)),this.fn(t,void 0)}finally{St()}return!0},i.Ut=function(t,n){if(void 0===n&&(n=!1),!y(this.h,t))return!0;if(nn(this)&&!en(this,{object:this.l||this.h,name:t,type:"remove"}))return null;try{var i;_t();var r,e=un(this),u=this.j.get(t),o=void 0;if(!u&&e&&(o=null==(r=In(this.h,t))?void 0:r.value),n){if(!Reflect.deleteProperty(this.h,t))return!1}else delete this.h[t];u&&(this.j.delete(t),u instanceof di&&(o=u.Ot),xt(u)),this.vt.reportChanged(),null==(i=this.sn)||null==(i=i.get(t))||i.set(t in this.h),e&&e&&sn(this,{type:"remove",observableKind:"object",object:this.l||this.h,debugObjectName:this.tt,oldValue:o,name:t})}finally{St()}return!0},i.At=function(t){return on(this,t)},i.St=function(t){return rn(this,t)},i.fn=function(t,n){var i,r=un(this);r&&r&&sn(this,r?{type:Ji,observableKind:"object",debugObjectName:this.tt,object:this.l||this.h,name:t,newValue:n}:null),null==(i=this.sn)||null==(i=i.get(t))||i.set(!0),this.vt.reportChanged()},i.rt=function(){return this.vt.reportObserved(),Gn(this.h)},i.nt=function(){return this.vt.reportObserved(),Object.keys(this.h)},t}(),er=v("ObservableObjectAdministration",rr),ur=wn(0),or=function(){var t=!1,n={};return Object.defineProperty(n,"0",{set:function(){t=!0}}),Object.create(n)[0]=1,!1===t}(),sr=0,fr=function(){};Xi=fr,Fi=Array.prototype,Object.setPrototypeOf?Object.setPrototypeOf(Xi.prototype,Fi):void 0!==Xi.prototype.__proto__?Xi.prototype.__proto__=Fi:Xi.prototype=Fi;var cr=function(t){function n(n,i,r,e){var u;return void 0===r&&(r="ObservableArray"),void 0===e&&(e=!1),u=t.call(this)||this,kn((function(){var t=new Hi(r,i,e,!0);t.l=u,h(u,Xn,t),n&&n.length&&u.spliceWithArray(0,0,n),or&&Object.defineProperty(u,"0",ur)})),u}S(n,t);var i=n.prototype;return i.concat=function(){this[Xn].st.reportObserved();for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return Array.prototype.concat.apply(this.slice(),n.map((function(t){return ln(t)?t.slice():t})))},i[Symbol.iterator]=function(){var t=this,n=0;return En({next:function(){return n<t.length?{value:t[n++],done:!1}:{done:!0,value:void 0}}})},O(n,[{key:"length",get:function(){return this[Xn].Xt()},set:function(t){this[Xn].Ft(t)}},{key:Symbol.toStringTag,get:function(){return"Array"}}])}(fr);Object.entries(Ui).forEach((function(t){var n=t[0];"concat"!==n&&a(cr.prototype,n,t[1])})),gn(1e3);var ar,hr=Cn.toString,vr=(null==(ar=i().Iterator)?void 0:ar.prototype)||{};["Symbol","Map","Set"].forEach((function(t){void 0===i()[t]&&n("MobX requires global '"+t+"' to be available or polyfilled")})),"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:Vt,extras:{getDebugName:xn},$mobx:Xn}),t.$mobx=Xn,t.FlowCancellationError=Wt,t.ObservableMap=Yi,t.ObservableSet=tr,t.Reaction=xi,t._allowStateChanges=st,t._allowStateChangesInsideComputed=Nt,t._allowStateReadsEnd=mt,t._allowStateReadsStart=pt,t._autoAction=Ii,t._endAction=ot,t._getAdministration=An,t._getGlobalSta