UNPKG

mobx

Version:

Simple, scalable state management.

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