mobx 7.0.5 → 7.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- var t,n;t=this,n=function(t){function n(t,...n){throw new Error(`[MobX] minified error nr: ${t}${n.length?" "+n.map(String).join(","):""}. See mobx.js.org/errors`)}function e(t){let n=!1;return function(){if(!n)return n=!0,t.apply(this,arguments)}}function i(t){return"function"==typeof t}function r(t){switch(typeof t){case"string":case"symbol":case"number":return!0}return!1}function s(t){return null!==t&&"object"==typeof t}function o(t){if(!s(t))return!1;const n=Object.getPrototypeOf(t);if(null==n)return!0;const e=d(n,"constructor")&&n.constructor;return"function"==typeof e&&e.toString()===mn}function u(t){const n=null==t?void 0:t.constructor;return!!n&&("GeneratorFunction"===n.name||"GeneratorFunction"===n.displayName)}function c(t,n,e){bn(t,n,{enumerable:!1,writable:!0,configurable:!0,value:e})}function h(t,n){const e="isMobX"+t;return n.prototype[e]=!0,function(t){return s(t)&&!0===t[e]}}function l(t){return null!=t&&"[object Map]"===Object.prototype.toString.call(t)}function a(t){return null!=t&&"[object Set]"===Object.prototype.toString.call(t)}function f(t){return null===t?null:"object"==typeof t?""+t:t}function d(t,n){return vn.hasOwnProperty.call(t,n)}function b(t,n){return!!(t&n)}function v(t,n,e){return e?t|=n:t&=~n,t}function y(t,n=wn,e=wn){const i=new _n(t);return n!==wn&&(i.onBOL=new Set([n])),e!==wn&&(i.onBUOL=new Set([e])),i}function p(t,n){return un(t,n)}function m(t,n,e){return null===t||"object"!=typeof t&&"function"!=typeof t||Mt(t)?t:Array.isArray(t)?Ln.array(t,{name:e}):o(t)?Ln.object(t,void 0,{name:e}):l(t)?Ln.map(t,{name:e}):a(t)?Ln.set(t,{name:e}):"function"!=typeof t||mt(t)||Vt(t)?t:u(t)?Ve(t):me(e,t)}function w(t){return t}function g(t,n){return{t:t,i:n,o:j,u:O}}function j(t,n,e,i){var r;if(null!=(r=this.i)&&r.bound)return null===this.u(t,n,e,!1)?0:1;if(i===t.h)return null===this.u(t,n,e,!1)?0:2;if(mt(e.value))return 1;const s=S(t,this,n,e,!1);return bn(i,n,s),2}function O(t,n,e,i){const r=S(t,this,n,e);return t.l(n,r,i)}function _(t,e,i){const{kind:r,name:s,addInitializer:o}=i,u=t,c=t=>{var n,e,i,r;return F(null!=(n=null==(e=u.i)?void 0:e.name)?n:s.toString(),t,null!=(i=null==(r=u.i)?void 0:r.autoAction)&&i)};return"field"==r?function(t){var n;let e=t;return mt(e)||(e=c(e)),null!=(n=u.i)&&n.bound&&(e=e.bind(this),e.isMobxAction=!0),e}:"method"==r?(mt(e)||(e=c(e)),null!=(h=u.i)&&h.bound&&o(function(){const t=this,n=t[s].bind(t);n.isMobxAction=!0,t[s]=n}),e):void n(43,u.t,String(s),r);var h}function S(t,n,e,i,r=oe.safeDescriptors){var s,o,u,c,h,l,a;let{value:f}=i;var d;return null!=(s=n.i)&&s.bound&&(f=f.bind(null!=(d=t.v)?d:t.h)),{value:F(null!=(o=null==(u=n.i)?void 0:u.name)?o:e.toString(),f,null!=(c=null==(h=n.i)?void 0:h.autoAction)&&c,null!=(l=n.i)&&l.bound?null!=(a=t.v)?a:t.h:void 0),configurable:!r||t.p,enumerable:!1,writable:!r}}function A(t,n){return{t:t,i:n,o:V,u:x}}function V(t,n,e,i){var r;if(i===t.h)return null===this.u(t,n,e,!1)?0:2;if(null!=(r=this.i)&&r.bound&&(!d(t.h,n)||!Vt(t.h[n]))&&null===this.u(t,n,e,!1))return 0;if(Vt(e.value))return 1;const s=M(t,0,0,e,!1,!1);return bn(i,n,s),2}function x(t,n,e,i){var r;const s=M(t,0,0,e,null==(r=this.i)?void 0:r.bound);return t.l(n,s,i)}function N(t,n,e){var i;const{name:r,addInitializer:s}=e;return Vt(n)||(n=Ve(n)),null!=(i=t.i)&&i.bound&&s(function(){const t=this,n=t[r].bind(t);n.isMobXFlow=!0,t[r]=n}),n}function M(t,n,e,i,r,s=oe.safeDescriptors){let{value:o}=i;var u;return Vt(o)||(o=Ve(o)),r&&(o=o.bind(null!=(u=t.v)?u:t.h),o.isMobXFlow=!0),{value:o,configurable:!s||t.p,enumerable:!1,writable:!s}}function R(t,n){return{t:t,i:n,o:E,u:k}}function E(t,n,e){return null===this.u(t,n,e,!1)?0:1}function k(t,n,e,i){return t.m(n,fn({},this.i,{get:e.get,set:e.set}),i)}function C(t,n,e){function i(t){const e=fn({},r.i,{get:n,context:t});return e.name||(e.name=`ObservableObject.${s.toString()}`),new Zn(e)}const r=t,{name:s,addInitializer:o}=e;let u;return o(function(){var t;const e=Zt(this)[On],r=this,o=e.j.get(s);o instanceof Zn&&o.derivation!==n&&e.j.delete(s),(null!=(t=e.O)?t:e.O=new Map).set(s,()=>i(r))}),function(){const t=this[On],e=t.j.get(s);if(e instanceof Zn&&e.derivation!==n){var r;let t=null==(r=u)?void 0:r.get(this);var o;return t||(t=i(this),(null!=(o=u)?o:u=new WeakMap).set(this,t)),t.get()}return t._(s)}}function I(t,n){return{t:t,i:n,o:T,u:P}}function T(t,n,e){return null===this.u(t,n,e,!1)?0:1}function P(t,n,e,i){var r,s;return t.S(n,e.value,null!=(r=null==(s=this.i)?void 0:s.A)?r:m,i)}function B(t,n,e){function i(t,n){var e;const i=Zt(t)[On];return(null!=(e=i.V)?e:i.V=new Map).set(o,()=>{var t,e;return new Qn(n,null!=(t=null==(e=r.i)?void 0:e.A)?t:m,`ObservableObject.${o.toString()}`,!1)}),i}const r=t,{kind:s,name:o}=e;if("accessor"===s)return{get(){var t;return(null!=(t=this[On])?t:i(this,n.get.call(this)))._(o)},set(t){var n;return(null!=(n=this[On])?n:i(this,t)).N(o,t)},init(t){return i(this,t),t}}}function D(t){return{t:xn,i:t,o:K,u:L}}function K(t,n,e,i){var r,s,o,c;if(e.get)return zn.o(t,n,e,i);if(e.set){const r=mt(e.set)?e.set:F(n.toString(),e.set);return i===t.h?null===t.l(n,{configurable:!oe.safeDescriptors||t.p,set:r})?0:2:(bn(i,n,{configurable:!0,set:r}),2)}if(i!==t.h&&"function"==typeof e.value)return u(e.value)?(null!=(c=this.i)&&c.autoBind?xe:Ve).o(t,n,e,i):(null!=(o=this.i)&&o.autoBind?ge:me).o(t,n,e,i);let h=!1===(null==(r=this.i)?void 0:r.deep)?Pn:Ln;var l;return"function"==typeof e.value&&null!=(s=this.i)&&s.autoBind&&(e.value=e.value.bind(null!=(l=t.v)?l:t.h)),h.o(t,n,e,i)}function L(t,n,e,i){var r,s,o;return e.get?zn.u(t,n,e,i):e.set?t.l(n,{configurable:!oe.safeDescriptors||t.p,set:F(n.toString(),e.set)},i):("function"==typeof e.value&&null!=(r=this.i)&&r.autoBind&&(e.value=e.value.bind(null!=(o=t.v)?o:t.h)),(!1===(null==(s=this.i)?void 0:s.deep)?Pn:Ln).u(t,n,e,i))}function $(t,n){return fn(function(e,i){if(i&&"string"==typeof i.kind)return n(t,e,i)},t)}function U(t){return t||Rn}function W(t){return $(t,B)}function z(t){return!0===t.deep?m:!1===t.deep?w:(n=t.defaultDecorator)&&null!=(e=null==(i=n.i)?void 0:i.A)?e:m;var n,e,i}function q(t){return $(t,C)}function F(t,n,e=!1,i){function r(){return H(0,e,n,i||this,arguments)}return r.isMobxAction=!0,r.toString=()=>n.toString(),Jn&&(Xn.value=t,bn(r,"name",Xn)),r}function H(t,n,e,i,r){const s=G(0,n);try{return e.apply(i,r)}catch(t){throw s.M=t,t}finally{J(s)}}function G(t,n){const e=oe.trackingDerivation,i=!n||!e;ct();let r=oe.allowStateChanges;i&&et();const s={R:i,k:e,C:r,I:oe.allowStateReads,T:!1,P:0,B:Gn++,D:Hn};return Hn=s.B,s}function J(t){Hn!==t.B&&n(30),Hn=t.D,void 0!==t.M&&(oe.suppressReactionErrors=!0),ht(),t.R&&it(t.k),oe.suppressReactionErrors=!1}function X(t,n){const e=function(t){const n=oe.allowStateChanges;return oe.allowStateChanges=t,n}(t);try{return n()}finally{!function(t){oe.allowStateChanges=t}(e)}}function Q(t){return t instanceof ne}function Y(t){switch(t.K){case 0:return!1;case-1:case 2:return!0;case 1:{const n=et(),e=t.L,i=e.length;for(let r=0;r<i;r++){const i=e[r];if(te(i)){if(oe.disableErrorBoundaries)i.get();else try{i.get()}catch(t){return it(n),!0}if(2===t.K)return it(n),!0}}return rt(t),it(n),!1}}}function Z(t,n,e){rt(t),t.$=new Array(0===t.U?100:t.L.length),t.W=0,t.U=++oe.runId;const i=oe.trackingDerivation;let r;if(oe.trackingDerivation=t,oe.inBatch++,!0===oe.disableErrorBoundaries)r=n.call(e);else try{r=n.call(e)}catch(t){r=new ne(t)}return oe.inBatch--,oe.trackingDerivation=i,function(t){const n=t.L,e=t.L=t.$;let i=0,r=0,s=t.W;for(let t=0;t<s;t++){const n=e[t];0===n.diffValue&&(n.diffValue=1,r!==t&&(e[r]=n),r++),n.K>i&&(i=n.K)}for(e.length=r,t.$=null,s=n.length;s--;){const e=n[s];0===e.diffValue&&ot(e,t),e.diffValue=0}for(;r--;){const n=e[r];1===n.diffValue&&(n.diffValue=0,st(n,t))}0!==i&&(t.K=i,t.q())}(t),r}function tt(t){const n=t.L;t.L=[];let e=n.length;for(;e--;)ot(n[e],t);t.K=-1}function nt(t){const n=et();try{return t()}finally{it(n)}}function et(){const t=oe.trackingDerivation;return oe.trackingDerivation=null,t}function it(t){oe.trackingDerivation=t}function rt(t){if(0===t.K)return;t.K=0;const n=t.L;let e=n.length;for(;e--;)n[e].F=0}function st(t,n){var e;(null!=(e=t.H)?e:t.H=new Set).add(n),t.F>n.K&&(t.F=n.K)}function ot(t,n){const e=t.H;e&&(e.delete(n),0===e.size&&ut(t))}function ut(t){!1===t.isPendingUnobservation&&(t.isPendingUnobservation=!0,oe.pendingUnobservations.push(t))}function ct(){oe.inBatch++}function ht(){0===--oe.inBatch&&(dt(),!oe.isRunningUnobservations&&oe.pendingUnobservations.length>0&&function(){oe.isRunningUnobservations=!0;try{const t=oe.pendingUnobservations;for(let n=0;n<t.length;n++){const e=t[n];e.isPendingUnobservation=!1,e.H&&0!==e.H.size||(e.H=null,e.isBeingObserved&&(e.isBeingObserved=!1,e.onBUO()),e instanceof Zn&&e.G())}oe.pendingUnobservations=[]}finally{oe.isRunningUnobservations=!1}}())}function lt(t){var n;t.isBeingObserved||(t.isBeingObserved=!0,t.onBO(),null==(n=t.L)||n.forEach(lt))}function at(t){const n=oe.trackingDerivation;return null!==n?(n.U!==t.J&&(t.J=n.U,n.$[n.W++]=t,!t.isBeingObserved&&oe.trackingContext&&(t.isBeingObserved=!0,t.onBO())),t.isBeingObserved):((!t.H||0===t.H.size)&&oe.inBatch>0&&ut(t),!1)}function ft(t){var n;2!==t.F&&(t.F=2,null==(n=t.H)||n.forEach(t=>{0===t.K&&t.q(),t.K=2}))}function dt(){oe.inBatch>0||oe.isRunningReactions||he(bt)}function bt(){oe.isRunningReactions=!0;const t=oe.pendingReactions;let n=0;for(;t.length>0;){++n===ce&&(console.error(`[mobx] cycle in reaction: ${t[0]}`),t.splice(0));let e=t.splice(0);for(let t=0,n=e.length;t<n;t++)e[t].X()}oe.isRunningReactions=!1}function vt(t){return $(t,_)}function yt(t){return function(n,e){return e&&"string"==typeof e.kind?_(t?ve:de,n,e):i(n)?F(n.name||"<unnamed action>",n,t):i(e)?F(n,e,t):r(n)?vt(g(t?fe:ae,{name:n,autoAction:t})):void 0}}function pt(t){return H(0,!1,t,this,void 0)}function mt(t){return i(t)&&!0===t.isMobxAction}function wt(t,n=pn){function e(){t(o)}var i,r;const s=null!=(i=null==n?void 0:n.name)?i:"Autorun";let o;if(n.scheduler||n.delay){const t=gt(n);let i=!1;o=new ue(s,()=>{i||(i=!0,t(()=>{i=!1,o.isDisposed||o.track(e)}))},n.onError,n.requiresObservable)}else o=new ue(s,function(){this.track(e)},n.onError,n.requiresObservable);return null!=n&&null!=(r=n.signal)&&r.aborted||o.Y(),o.Z(null==n?void 0:n.signal)}function gt(t){return t.scheduler?t.scheduler:t.delay?n=>setTimeout(n,t.delay):je}function jt(t,n,e,r){const s="function"==typeof r?en(n,e):en(n),o=i(r)?r:e,u=`${t}L`;return s[u]?s[u].add(o):s[u]=new Set([o]),function(){const t=s[u];t&&(t.delete(o),0===t.size&&delete s[u])}}function Ot(t,n,e,i){const r=jn(n);return on(()=>{const n=Zt(t,i)[On];gn(r).forEach(t=>{n.u(t,r[t],!e||!(t in e)||e[t])})}),t}function _t(t){const n={name:t.tt};var e;return t.L&&t.L.length>0&&(n.dependencies=(e=t.L,Array.from(new Set(e))).map(_t)),n}function St(t){const n={name:t.tt};return function(t){return!!t.H&&t.H.size>0}(t)&&(n.observers=Array.from(function(t){var n;return null!=(n=t.H)?n:new Set}(t),St)),n}function At(t){i(t.cancel)&&t.cancel()}function Vt(t){return!0===(null==t?void 0:t.isMobXFlow)}function xt(t,n){var e;if(void 0===n)return te(t);if(!1===nn(t))return!1;const i=t[On];if(null!=(e=i.O)&&e.has(n))return!0;if(!i.j.has(n))return!1;const r=en(t,n);return te(r)}function Nt(t,n){if(!t)return!1;if(void 0!==n){if(nn(t)){var e,i;const r=t[On];return r.j.has(n)||!(null==(e=r.O)||!e.has(n))||!(null==(i=r.V)||!i.has(n))}return!1}return nn(t)||!!t[On]||Sn(t)||le(t)||te(t)}function Mt(t){return Nt(t)}function Rt(t){return nn(t)?t[On].nt():Le(t)||We(t)?Array.from(t.keys()):Xt(t)?t.map((t,n)=>n):void n(5)}function Et(t,e){return nn(t)?t[On].et(e):Le(t)||We(t)?t.has(e):Xt(t)?e>=0&&e<t.length:void n(10)}function kt(t){if(nn(t))return t[On].it();n(38)}function Ct(t,n,e){if(te(t)){let i,r=!0;return wt(()=>{const s=t.get();if(!r||e){const e=et();n({observableKind:"computed",debugObjectName:t.tt,type:Ee,object:t,newValue:s,oldValue:i}),it(e)}r=!1,i=s})}return e&&n({observableKind:"value",debugObjectName:t.tt,object:t,type:Ee,newValue:t.rt,oldValue:void 0}),Wt(t,n)}function It(t,n,e){return t.set(n,e),e}function Tt(t,n){if(null==t||"object"!=typeof t||t instanceof Date||!Mt(t))return t;if(Yn(t)||te(t))return Tt(t.get(),n);if(n.has(t))return n.get(t);if(Xt(t)){const e=It(n,t,new Array(t.length));return t.forEach((t,i)=>{e[i]=Tt(t,n)}),e}if(We(t)){const e=It(n,t,new Set);return t.forEach(t=>{e.add(Tt(t,n))}),e}if(Le(t)){const e=It(n,t,new Map);return t.forEach((t,i)=>{e.set(i,Tt(t,n))}),e}{const e=It(n,t,{});return kt(t).forEach(i=>{vn.propertyIsEnumerable.call(t,i)&&(e[i]=Tt(t[i],n))}),e}}function Pt(t,n){ct();try{return t.apply(n)}finally{ht()}}function Bt(t,n,e){let i;if("number"==typeof e.timeout){const t=new Error("WHEN_TIMEOUT");i=setTimeout(()=>{if(!s[On].isDisposed){if(s(),!e.onError)throw t;e.onError(t)}},e.timeout)}e.name="When";const r=F("When-effect",n);var s=wt(n=>{X(!1,t)&&(n.dispose(),i&&clearTimeout(i),r())},e);return s}function Dt(t){return t[On]}function Kt(t){return void 0!==t.st&&t.st.length>0}function Lt(t,n){let i=t.st;return i?i.push(n):i=t.st=[n],e(()=>{const t=i.indexOf(n);-1!==t&&i.splice(t,1)})}function $t(t,e){const i=et();try{const i=[...t.st||[]];for(let t=0,r=i.length;t<r&&((e=i[t](e))&&!e.type&&n(14),e);t++);return e}finally{it(i)}}function Ut(t){return void 0!==t.ot&&t.ot.length>0}function Wt(t,n){let i=t.ot;return i?i.push(n):i=t.ot=[n],e(()=>{const t=i.indexOf(n);-1!==t&&i.splice(t,1)})}function zt(t,n){const e=et();let i=t.ot;if(i){i=i.slice();for(let t=0,e=i.length;t<e;t++)i[t](n);it(e)}}function qt(t,e,i){if(!0===i&&(i=t.ut),!1===i)return;e in t.h||n(1,i.t,`${t.tt}.${e.toString()}`);let r=t.h;for(;r&&r!==vn;){const n=dn(r,e);if(n){const s=i.o(t,e,n,r);if(0===s)return;if(1===s)break}r=Object.getPrototypeOf(r)}}function Ft(t,n){"function"==typeof Array.prototype[t]&&(Ie[t]=n(t))}function Ht(t){return function(){const n=this[On];n.ct.reportObserved();const e=n.ht(n.j);return e[t].apply(e,arguments)}}function Gt(t){return function(n,e){const i=this[On];return i.ct.reportObserved(),i.ht(i.j)[t]((t,i)=>n.call(e,t,i,this))}}function Jt(t){return function(){const n=this[On];n.ct.reportObserved();const e=n.ht(n.j),i=arguments[0];return arguments[0]=(t,n,e)=>i(t,n,e,this),e[t].apply(e,arguments)}}function Xt(t){return s(t)&&Te(t[On])}function Qt(t){return t[Symbol.toStringTag]="MapIterator",ln(t)}function Yt(t){return t[Symbol.toStringTag]="SetIterator",ln(t)}function Zt(t,n){var e;if(d(t,On))return t;const i=null!=(e=null==n?void 0:n.name)?e:"ObservableObject",r=new Fe(t,new Map,String(i),function(t){var n;return t?null!=(n=t.defaultDecorator)?n:function(t){var n;const e=!1!==t.deep,i=!!t.autoBind,r=(e?0:1)|(i?2:0);return null!=(n=Mn[r])?n:Mn[r]=D({deep:e,autoBind:i})}(t):void 0}(n));return c(t,On,r),t}function tn(t){return ze[t]||(ze[t]={get(){return this[On]._(t)},set(n){return this[On].N(t,n)}})}function nn(t){return!!s(t)&&He(t[On])}function en(t,e){if("object"==typeof t&&null!==t){if(Xt(t))return void 0!==e&&n(23),t[On].ct;if(We(t))return t.ct;if(Le(t)){if(void 0===e)return t.lt;const i=t.ft.get(e)||t.dt.get(e);return i||n(25,e,sn(t)),i}if(nn(t)){var r,s;if(!e)return n(26);const i=t[On],o=null!=(r=null!=(s=i.j.get(e))?s:i.bt(e))?r:i.vt(e);return o||n(27,e,sn(t)),o}if(Sn(t)||te(t)||le(t))return t}else if(i(t)&&le(t[On]))return t[On];n(28)}function rn(t,e){return t||n(29),void 0!==e?rn(en(t,e)):Sn(t)||te(t)||le(t)||Le(t)||We(t)?t:t[On]?t[On]:void n(24,t)}function sn(t,n){let e;if(void 0!==n)e=en(t,n);else{if(mt(t))return t.name;e=nn(t)||Le(t)||We(t)?rn(t):en(t)}return e.tt}function on(t){const n=et();ct();try{return t()}finally{ht(),it(n)}}function un(t,n,e=-1){return cn(t,n,e)}function cn(t,n,e,r,s){if(t===n)return 0!==t||1/t==1/n;if(null==t||null==n)return!1;if(t!=t)return n!=n;const o=typeof t;if("function"!==o&&"object"!==o&&"object"!=typeof n)return!1;const u=Ge.call(t);if(u!==Ge.call(n))return!1;switch(u){case"[object RegExp]":case"[object String]":return""+t==""+n;case"[object Number]":return+t!=+t?+n!=+n:0===+t?1/+t==1/n:+t===+n;case"[object Date]":case"[object Boolean]":return+t===+n;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(t)===Symbol.valueOf.call(n);case"[object Map]":case"[object Set]":e>=0&&e++}t=hn(t),n=hn(n);const c="[object Array]"===u;if(!c){if("object"!=typeof t||"object"!=typeof n)return!1;const e=t.constructor,r=n.constructor;if(e!==r&&!(i(e)&&e instanceof e&&i(r)&&r instanceof r)&&"constructor"in t&&"constructor"in n)return!1}if(0===e)return!1;e<0&&(e=-1),s=s||[];let h=(r=r||[]).length;for(;h--;)if(r[h]===t)return s[h]===n;if(r.push(t),s.push(n),c){if(h=t.length,h!==n.length)return!1;for(;h--;)if(!cn(t[h],n[h],e-1,r,s))return!1}else{const i=Object.keys(t),o=i.length;if(Object.keys(n).length!==o)return!1;for(let u=0;u<o;u++){const o=i[u];if(!d(n,o)||!cn(t[o],n[o],e-1,r,s))return!1}}return r.pop(),s.pop(),!0}function hn(t){return Xt(t)?t.slice():l(t)||Le(t)||a(t)||We(t)?Array.from(t.entries()):t}function ln(t){return t[Symbol.iterator]=an,fn(Object.create(Xe),t)}function an(){return this}const fn=Object.assign,dn=Object.getOwnPropertyDescriptor,bn=Object.defineProperty,vn=Object.prototype,yn=[];Object.freeze(yn);const pn={};Object.freeze(pn);const mn=Object.toString(),wn=()=>{},gn=Reflect.ownKeys,jn=Object.getOwnPropertyDescriptors,On=Symbol("mobx administration");class _n{constructor(t="Atom"){this.tt=void 0,this.yt=0,this.H=null,this.J=0,this.F=-1,this.onBOL=void 0,this.onBUOL=void 0,this.tt=t}get isBeingObserved(){return b(this.yt,1)}set isBeingObserved(t){this.yt=v(this.yt,1,t)}get isPendingUnobservation(){return b(this.yt,2)}set isPendingUnobservation(t){this.yt=v(this.yt,2,t)}get diffValue(){return b(this.yt,4)?1:0}set diffValue(t){this.yt=v(this.yt,4,1===t)}onBO(){this.onBOL&&this.onBOL.forEach(t=>t())}onBUO(){this.onBUOL&&this.onBUOL.forEach(t=>t())}reportObserved(){return at(this)}reportChanged(){ct(),ft(this),ht()}toString(){return this.tt}}const Sn=h("Atom",_n),An=Object.is,Vn={t:"override",o:function(){return 0},u:function(){n(44,this.t)}},xn="true",Nn=D(),Mn=[Nn],Rn={deep:!0,name:void 0,defaultDecorator:void 0};Object.freeze(Rn);const En=I("observable"),kn=I("observable.ref",{A:w}),Cn=I("observable.shallow",{A:function(t,n,e){return null==t||nn(t)||Xt(t)||Le(t)||We(t)?t:Array.isArray(t)?Ln.array(t,{name:e,deep:!1}):o(t)?Ln.object(t,void 0,{name:e,deep:!1}):l(t)?Ln.map(t,{name:e,deep:!1}):a(t)?Ln.set(t,{name:e,deep:!1}):void 0}}),In=I("observable.struct",{A:function(t,n){return un(t,n)?n:t}}),Tn={box(t,n){const e=U(n);return new Qn(t,z(e),e.name,!0,e.equals)},array(t,n){const e=U(n);return function(t,n,e="ObservableArray",i=!1){return on(()=>{const r=new Ce(e,n,i);bn(r.j,On,{enumerable:!1,writable:!1,configurable:!0,value:r});const s=new Proxy(r.j,ke);return r.v=s,t&&t.length&&r.wt(0,0,t),s})}(t,z(e),e.name)},map(t,n){const e=U(n);return new Ke(t,z(e),e.name)},set(t,n){const e=U(n);return new Ue(t,z(e),e.name)},object:(t,n,e)=>on(()=>Ot(function(t,n){var e,i;return null!=(i=(e=(t=Zt(t,n))[On]).v)?i:e.v=new Proxy(t,Ne)}({},e),t,n))},Pn=W(kn),Bn=W(Cn),Dn=W(En),Kn=W(In);var Ln=fn(function(t,n,e){return n&&"string"==typeof n.kind?B(En,t,n):Mt(t)?t:o(t)?Ln.object(t,n,e):Array.isArray(t)?Ln.array(t,n):l(t)?Ln.map(t,n):a(t)?Ln.set(t,n):"object"==typeof t&&null!==t?t:Ln.box(t,n)},En,Tn);const $n="computed",Un=R($n),Wn=q(R("computed.struct",{equals:p})),zn=function(t,n){if(n&&"string"==typeof n.kind)return C(Un,t,n);if(o(t))return q(R($n,t));const e=o(n)?n:{};return e.get=t,e.name||(e.name=t.name||""),new Zn(e)};var qn,Fn;fn(zn,Un);let Hn=0,Gn=1;const Jn=null!=(qn=null==(Fn=dn(()=>{},"name"))?void 0:Fn.configurable)&&qn,Xn={value:"action",configurable:!0,writable:!1,enumerable:!1};class Qn extends _n{constructor(t,n,e="ObservableValue",i=!0,r=An){super(e),this.A=void 0,this.tt=void 0,this.gt=void 0,this.jt=!1,this.st=void 0,this.ot=void 0,this.rt=void 0,this.dehancer=void 0,this.A=n,this.tt=e,this.gt=r,this.rt=n(t,void 0,e)}dehanceValue(t){return void 0!==this.dehancer?this.dehancer(t):t}set(t){(t=this.Ot(t))!==oe.UNCHANGED&&this._t(t)}Ot(t){if(Kt(this)){const n=$t(this,{object:this,type:Ee,newValue:t});if(!n)return oe.UNCHANGED;t=n.newValue}return t=this.A(t,this.rt,this.tt),this.gt(this.rt,t)?oe.UNCHANGED:t}_t(t){const n=this.rt;this.rt=t,this.reportChanged(),Ut(this)&&zt(this,{type:Ee,object:this,newValue:t,oldValue:n})}get(){return this.reportObserved(),this.dehanceValue(this.rt)}raw(){return this.rt}toJSON(){return this.get()}toString(){return`${this.tt}[${this.rt}]`}valueOf(){return f(this.get())}[Symbol.toPrimitive](){return this.valueOf()}}const Yn=h("ObservableValue",Qn);class Zn{constructor(t){this.K=-1,this.L=[],this.$=null,this.H=null,this.U=0,this.J=0,this.F=0,this.W=0,this.rt=new ne(null),this.tt=void 0,this.St=void 0,this.yt=0,this.derivation=void 0,this.At=void 0,this.Vt=void 0,this.gt=void 0,this.xt=void 0,this.Nt=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.At=F("ComputedValue-setter",t.set)),this.gt=t.equals||An,this.Vt=t.context,this.xt=t.requiresReaction,this.Nt=!!t.keepAlive}q(){!function(t){var n;0===t.F&&(t.F=1,null==(n=t.H)||n.forEach(t=>{0===t.K&&(t.K=1,t.q())}))}(this)}onBO(){this.onBOL&&this.onBOL.forEach(t=>t())}onBUO(){this.onBUOL&&this.onBUOL.forEach(t=>t())}get isComputing(){return b(this.yt,1)}set isComputing(t){this.yt=v(this.yt,1,t)}get isRunningSetter(){return b(this.yt,2)}set isRunningSetter(t){this.yt=v(this.yt,2,t)}get isBeingObserved(){return b(this.yt,4)}set isBeingObserved(t){this.yt=v(this.yt,4,t)}get isPendingUnobservation(){return b(this.yt,8)}set isPendingUnobservation(t){this.yt=v(this.yt,8,t)}get diffValue(){return b(this.yt,16)?1:0}set diffValue(t){this.yt=v(this.yt,16,1===t)}get(){if(this.isComputing&&n(32,this.tt,this.derivation),0!==oe.inBatch||this.H&&0!==this.H.size||this.Nt){const t=this.isBeingObserved;if(at(this),Y(this)){let t=oe.trackingContext;t||!this.Nt&&!this.isBeingObserved||(oe.trackingContext=this),this.trackAndCompute()&&function(t){var n;2!==t.F&&(t.F=2,null==(n=t.H)||n.forEach(n=>{1===n.K?n.K=2:0===n.K&&(t.F=0)}))}(this),oe.trackingContext=t}else!t&&this.isBeingObserved&&this.L.forEach(lt)}else Y(this)&&(this.Mt(),ct(),this.rt=this.Rt(!1),ht());const t=this.rt;if(Q(t))throw t.cause;return t}set(t){if(this.At){this.isRunningSetter&&n(33,this.tt),this.isRunningSetter=!0;try{this.At.call(this.Vt,t)}finally{this.isRunningSetter=!1}}else n(34,this.tt)}trackAndCompute(){const t=this.rt,n=-1===this.K,e=this.Rt(!0),i=n||Q(t)||Q(e)||!this.gt(t,e);return i&&(this.rt=e),i}Rt(t){let n;if(this.isComputing=!0,t)n=Z(this,this.derivation,this.Vt);else if(!0===oe.disableErrorBoundaries)n=this.derivation.call(this.Vt);else try{n=this.derivation.call(this.Vt)}catch(t){n=new ne(t)}return this.isComputing=!1,n}G(){this.Nt||(tt(this),this.rt=void 0)}Mt(){}toString(){return`${this.tt}[${this.derivation.toString()}]`}valueOf(){return f(this.get())}[Symbol.toPrimitive](){return this.valueOf()}}const te=h("ComputedValue",Zn);class ne{constructor(t){this.cause=void 0,this.cause=t}}const ee=["mobxGuid","spyListeners","enforceActions","computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","allowStateReads","disableErrorBoundaries","runId","UNCHANGED"];class ie{constructor(){this.version=7,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.isRunningUnobservations=!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.safeDescriptors=!0}}let re=!0,se=!1,oe=function(){let t=globalThis;return t.__mobxInstanceCount>0&&!t.__mobxGlobals&&(re=!1),t.__mobxGlobals&&7!==t.__mobxGlobals.version&&(re=!1),re?t.__mobxGlobals?(t.__mobxInstanceCount+=1,t.__mobxGlobals.UNCHANGED||(t.__mobxGlobals.UNCHANGED={}),t.__mobxGlobals):(t.__mobxInstanceCount=1,t.__mobxGlobals=new ie):(setTimeout(()=>{se||n(35)},1),new ie)}();class ue{constructor(t="Reaction",n,e,i){this.tt=void 0,this.Et=void 0,this.kt=void 0,this.Ct=void 0,this.L=[],this.$=[],this.K=-1,this.U=0,this.W=0,this.yt=0,this.tt=t,this.Et=n,this.kt=e,this.Ct=i}get isDisposed(){return b(this.yt,1)}set isDisposed(t){this.yt=v(this.yt,1,t)}get isScheduled(){return b(this.yt,2)}set isScheduled(t){this.yt=v(this.yt,2,t)}get isTrackPending(){return b(this.yt,4)}set isTrackPending(t){this.yt=v(this.yt,4,t)}get isRunning(){return b(this.yt,8)}set isRunning(t){this.yt=v(this.yt,8,t)}get diffValue(){return b(this.yt,16)?1:0}set diffValue(t){this.yt=v(this.yt,16,1===t)}q(){this.Y()}Y(){this.isScheduled||(this.isScheduled=!0,oe.pendingReactions.push(this),dt())}X(){if(!this.isDisposed){ct(),this.isScheduled=!1;const t=oe.trackingContext;if(oe.trackingContext=this,Y(this)){this.isTrackPending=!0;try{this.Et()}catch(t){this.It(t)}}oe.trackingContext=t,ht()}}track(t){if(this.isDisposed)return;ct(),this.isRunning=!0;const n=oe.trackingContext;oe.trackingContext=this;const e=Z(this,t,void 0);oe.trackingContext=n,this.isRunning=!1,this.isTrackPending=!1,this.isDisposed&&tt(this),Q(e)&&this.It(e.cause),ht()}It(t){if(this.kt)this.kt(t,this);else{if(oe.disableErrorBoundaries)throw t;oe.suppressReactionErrors||console.error(`[mobx] uncaught error in '${this}'`,t),oe.globalReactionErrorHandlers.forEach(n=>n(t,this))}}dispose(){this.isDisposed||(this.isDisposed=!0,this.isRunning||(ct(),tt(this),ht()))}Z(t){const n=()=>{this.dispose(),null==t||null==t.removeEventListener||t.removeEventListener("abort",n)};return null==t||null==t.addEventListener||t.addEventListener("abort",n),n[On]=this,"dispose"in Symbol&&"symbol"==typeof Symbol.dispose&&(n[Symbol.dispose]=n),n}toString(){return`Reaction[${this.tt}]`}}const ce=100;let he=t=>t();const le=h("Reaction",ue),ae="action",fe="autoAction",de=g(ae),be=g("action.bound",{bound:!0}),ve=g(fe,{autoAction:!0}),ye=g("autoAction.bound",{autoAction:!0,bound:!0}),pe=yt(!1);fn(pe,de);const me=yt(!0);fn(me,ve);const we=vt(be),ge=vt(ye),je=t=>t(),Oe="always";class _e extends Error{constructor(){super("FLOW_CANCELLED"),Object.setPrototypeOf(this,new.target.prototype),this.name="FlowCancellationError"}toString(){return`Error: ${this.message}`}}const Se=A("flow"),Ae=A("flow.bound",{bound:!0}),Ve=fn(function(t,n){if(n&&"string"==typeof n.kind)return N(Se,t,n);const e=t,r=e.name||"flow",s=function(){const t=arguments,n=pe(r,e).apply(this,t);let s,o;const u=new Promise(function(t,e){function u(t){let i;o=void 0;try{i=pe(r,n.next).call(n,t)}catch(t){return e(t)}h(i)}function c(t){let i;o=void 0;try{i=pe(r,n.throw).call(n,t)}catch(t){return e(t)}h(i)}function h(n){if(!i(null==n?void 0:n.then))return n.done?t(n.value):(o=Promise.resolve(n.value),o.then(u,c));n.then(h,e)}s=e,u(void 0)});return u.cancel=pe(r,function(){try{o&&At(o);const t=n.return(void 0),e=Promise.resolve(t.value);e.then(wn,wn),At(e),s(new _e)}catch(t){s(t)}}),u};return s.isMobXFlow=!0,s},Se),xe=function(t){return $(t,N)}(Ae),Ne={has:(t,n)=>Dt(t).et(n),get:(t,n)=>Dt(t).Tt(n),set(t,n,e){var i;return!!r(n)&&(null==(i=Dt(t).Pt(n,e,!0))||i)},deleteProperty(t,n){var e;return!!r(n)&&(null==(e=Dt(t).Bt(n,!0))||e)},defineProperty(t,n,e){var i;return null==(i=Dt(t).l(n,e))||i},ownKeys:t=>Dt(t).it(),preventExtensions(t){n(13)}},Me=Symbol("mobx-keys"),Re="splice",Ee="update",ke={get(t,n){const e=t[On];return n===On?e:"length"===n?e.Dt():"string"!=typeof n||isNaN(n)?d(Ie,n)?Ie[n]:t[n]:e.Tt(parseInt(n))},set(t,n,e){const i=t[On];return"length"===n&&i.Kt(e),"symbol"==typeof n||isNaN(n)?t[n]=e:i.Pt(parseInt(n),e),!0},preventExtensions(){n(15)}};class Ce{constructor(t="ObservableArray",n,e){this.Lt=void 0,this.ct=void 0,this.j=[],this.st=void 0,this.ot=void 0,this.A=void 0,this.dehancer=void 0,this.v=void 0,this.$t=0,this.Lt=e,this.ct=new _n(t),this.A=(t,e)=>n(t,e,"ObservableArray[..]")}Ut(t){return void 0!==this.dehancer?this.dehancer(t):t}ht(t){return void 0!==this.dehancer&&t.length>0?t.map(this.dehancer):t}Dt(){return this.ct.reportObserved(),this.j.length}Kt(t){("number"!=typeof t||isNaN(t)||t<0)&&n(40,t);let e=this.j.length;if(t!==e)if(t>e){const n=Array.from({length:t-e});this.wt(e,0,n)}else this.wt(t,e-t)}Wt(t,e){t!==this.$t&&n(16),this.$t+=e}wt(t,n,e){const i=this.j.length;if(void 0===t?t=0:t>i?t=i:t<0&&(t=Math.max(0,i+t)),n=1===arguments.length?i-t:null==n?0:Math.max(0,Math.min(n,i-t)),void 0===e&&(e=yn),Kt(this)){const i=$t(this,{object:this.v,type:Re,index:t,removedCount:n,added:e});if(!i)return yn;n=i.removedCount,e=i.added}e=0===e.length?e:e.map(t=>this.A(t,void 0));const r=this.zt(t,n,e);return 0===n&&0===e.length||this.qt(t,e,r),this.ht(r)}zt(t,n,e){if(e.length<1e4)return this.j.splice(t,n,...e);{const i=this.j.slice(t,t+n);let r=this.j.slice(t+n);this.j.length+=e.length-n;for(let n=0;n<e.length;n++)this.j[t+n]=e[n];for(let n=0;n<r.length;n++)this.j[t+e.length+n]=r[n];return i}}Ft(t,n,e){const i=Ut(this),r=i?{observableKind:"array",object:this.v,type:Ee,debugObjectName:this.ct.tt,index:t,newValue:n,oldValue:e}:null;this.ct.reportChanged(),i&&zt(this,r)}qt(t,n,e){const i=Ut(this),r=i?{observableKind:"array",object:this.v,debugObjectName:this.ct.tt,type:Re,index:t,removed:e,added:n,removedCount:e.length,addedCount:n.length}:null;this.ct.reportChanged(),i&&zt(this,r)}Tt(t){return this.ct.reportObserved(),this.Ut(this.j[t])}Pt(t,n){const e=this.j;if(t<e.length){const i=e[t];if(Kt(this)){const e=$t(this,{type:Ee,object:this.v,index:t,newValue:n});if(!e)return;n=e.newValue}(n=this.A(n,i))!==i&&(e[t]=n,this.Ft(t,n,i))}else{const i=Array.from({length:t+1-e.length});i[i.length-1]=n,this.wt(e.length,0,i)}}}var Ie={clear(){return this.splice(0)},replace(t){const n=this[On];return n.wt(0,n.j.length,t)},toJSON(){return this.slice()},splice(t,n,...e){const i=this[On];switch(arguments.length){case 0:return[];case 1:return i.wt(t);case 2:return i.wt(t,n)}return i.wt(t,n,e)},spliceWithArray(t,n,e){return this[On].wt(t,n,e)},push(...t){const n=this[On];return n.wt(n.j.length,0,t),n.j.length},pop(){return this.splice(Math.max(this[On].j.length-1,0),1)[0]},shift(){return this.splice(0,1)[0]},unshift(...t){const n=this[On];return n.wt(0,0,t),n.j.length},reverse(){return oe.trackingDerivation&&n(37,"reverse"),this.replace(this.slice().reverse()),this},sort(){oe.trackingDerivation&&n(37,"sort");const t=this.slice();return t.sort.apply(t,arguments),this.replace(t),this},remove(t){const n=this[On],e=n.ht(n.j).indexOf(t);return e>-1&&(this.splice(e,1),!0)}};Ft("at",Ht),Ft("concat",Ht),Ft("flat",Ht),Ft("includes",Ht),Ft("indexOf",Ht),Ft("join",Ht),Ft("lastIndexOf",Ht),Ft("slice",Ht),Ft("toString",Ht),Ft("toLocaleString",Ht),Ft("toSorted",Ht),Ft("toSpliced",Ht),Ft("with",Ht),Ft("every",Gt),Ft("filter",Gt),Ft("find",Gt),Ft("findIndex",Gt),Ft("findLast",Gt),Ft("findLastIndex",Gt),Ft("flatMap",Gt),Ft("forEach",Gt),Ft("map",Gt),Ft("some",Gt),Ft("toReversed",Gt),Ft("reduce",Jt),Ft("reduceRight",Jt);const Te=h("ObservableArrayAdministration",Ce),Pe={},Be="add",De="delete";class Ke{constructor(t,n=m,e="ObservableMap"){this.A=void 0,this.tt=void 0,this[On]=Pe,this.ft=void 0,this.dt=void 0,this.lt=void 0,this.st=void 0,this.ot=void 0,this.dehancer=void 0,this.A=n,this.tt=e,on(()=>{this.lt=y("ObservableMap.keys()"),this.ft=new Map,this.dt=new Map,t&&this.merge(t)})}et(t){return this.ft.has(t)}has(t){if(!oe.trackingDerivation)return this.et(t);let n=this.dt.get(t);if(!n){const e=n=new Qn(this.et(t),w,"ObservableMap.key?",!1);this.dt.set(t,e),e.onBUOL=new Set([()=>this.dt.delete(t)])}return n.get()}set(t,n){const e=this.et(t);if(Kt(this)){const i=$t(this,{type:e?Ee:Be,object:this,newValue:n,name:t});if(!i)return this;n=i.newValue}return e?this.Ht(t,n):this.Gt(t,n),this}delete(t){if(Kt(this)&&!$t(this,{type:De,object:this,name:t}))return!1;if(this.et(t)){const n=!1,e=Ut(this),i=e||n?{observableKind:"map",debugObjectName:this.tt,type:De,object:this,oldValue:this.ft.get(t).rt,name:t}:null;return Pt(()=>{var n;this.lt.reportChanged(),null==(n=this.dt.get(t))||n._t(!1),this.ft.get(t)._t(void 0),this.ft.delete(t)}),e&&zt(this,i),!0}return!1}Ht(t,n){const e=this.ft.get(t);if((n=e.Ot(n))!==oe.UNCHANGED){const i=!1,r=Ut(this),s=r||i?{observableKind:"map",debugObjectName:this.tt,type:Ee,object:this,oldValue:e.rt,name:t,newValue:n}:null;e._t(n),r&&zt(this,s)}}Gt(t,n){Pt(()=>{var e;const i=new Qn(n,this.A,"ObservableMap.key",!1);this.ft.set(t,i),n=i.rt,null==(e=this.dt.get(t))||e._t(!0),this.lt.reportChanged()});const e=Ut(this);e&&zt(this,e?{observableKind:"map",debugObjectName:this.tt,type:Be,object:this,name:t,newValue:n}:null)}get(t){return this.has(t)?this.Ut(this.ft.get(t).get()):this.Ut(void 0)}getOrInsert(t,n){return this.has(t)||this.set(t,n),this.get(t)}getOrInsertComputed(t,n){return this.has(t)||this.set(t,n(t)),this.get(t)}Ut(t){return void 0!==this.dehancer?this.dehancer(t):t}keys(){return this.lt.reportObserved(),this.ft.keys()}values(){const t=this,n=this.keys();return Qt({next(){const{done:e,value:i}=n.next();return{done:e,value:e?void 0:t.get(i)}}})}entries(){const t=this,n=this.keys();return Qt({next(){const{done:e,value:i}=n.next();return{done:e,value:e?void 0:[i,t.get(i)]}}})}[Symbol.iterator](){return this.entries()}forEach(t,n){for(const[e,i]of this)t.call(n,i,e,this)}merge(t){return Le(t)&&(t=new Map(t)),Pt(()=>{o(t)?function(t){const n=Object.keys(t),e=Object.getOwnPropertySymbols(t);return e.length?[...n,...e.filter(n=>vn.propertyIsEnumerable.call(t,n))]:n}(t).forEach(n=>this.set(n,t[n])):Array.isArray(t)?t.forEach(([t,n])=>this.set(t,n)):l(t)?(function(t){const n=Object.getPrototypeOf(t),e=Object.getPrototypeOf(n);return null===Object.getPrototypeOf(e)}(t)||n(19,t),t.forEach((t,n)=>this.set(n,t))):null!=t&&n(20,t)}),this}clear(){Pt(()=>{nt(()=>{for(const t of this.keys())this.delete(t)})})}replace(t){return Pt(()=>{const e=function(t){if(l(t)||Le(t))return t;if(Array.isArray(t))return new Map(t);if(o(t)){const n=new Map;for(const e in t)n.set(e,t[e]);return n}return n(21,t)}(t),i=new Map;let r=!1;for(const t of this.ft.keys())if(!e.has(t))if(this.delete(t))r=!0;else{const n=this.ft.get(t);i.set(t,n)}for(const[t,n]of e.entries()){const e=this.ft.has(t);if(this.set(t,n),this.ft.has(t)){const n=this.ft.get(t);i.set(t,n),e||(r=!0)}}if(!r)if(this.ft.size!==i.size)this.lt.reportChanged();else{const t=this.ft.keys(),n=i.keys();let e=t.next(),r=n.next();for(;!e.done;){if(e.value!==r.value){this.lt.reportChanged();break}e=t.next(),r=n.next()}}this.ft=i}),this}get size(){return this.lt.reportObserved(),this.ft.size}toString(){return"[object ObservableMap]"}toJSON(){return Array.from(this)}get[Symbol.toStringTag](){return"Map"}}var Le=h("ObservableMap",Ke);const $e={};class Ue{constructor(t,n=m,e="ObservableSet"){this.tt=void 0,this[On]=$e,this.ft=new Set,this.ct=void 0,this.ot=void 0,this.st=void 0,this.dehancer=void 0,this.A=void 0,this.tt=e,this.A=(t,i)=>n(t,i,e),on(()=>{this.ct=y(this.tt),t&&this.replace(t)})}Ut(t){return void 0!==this.dehancer?this.dehancer(t):t}clear(){Pt(()=>{nt(()=>{for(const t of this.ft.values())this.delete(t)})})}forEach(t,n){for(const e of this)t.call(n,e,e,this)}get size(){return this.ct.reportObserved(),this.ft.size}add(t){if(Kt(this)){const n=$t(this,{type:Be,object:this,newValue:t});if(!n)return this;t=n.newValue}if(!this.has(t)){Pt(()=>{this.ft.add(this.A(t,void 0)),this.ct.reportChanged()});const n=!1,e=Ut(this);e&&zt(this,e||n?{observableKind:"set",debugObjectName:this.tt,type:Be,object:this,newValue:t}:null)}return this}delete(t){if(Kt(this)&&!$t(this,{type:De,object:this,oldValue:t}))return!1;if(this.has(t)){const n=!1,e=Ut(this),i=e||n?{observableKind:"set",debugObjectName:this.tt,type:De,object:this,oldValue:t}:null;return Pt(()=>{this.ct.reportChanged(),this.ft.delete(t)}),e&&zt(this,i),!0}return!1}has(t){return this.ct.reportObserved(),this.ft.has(this.Ut(t))}entries(){const t=this.values();return Yt({next(){const{value:n,done:e}=t.next();return e?{value:void 0,done:e}:{value:[n,n],done:e}}})}keys(){return this.values()}values(){this.ct.reportObserved();const t=this,n=this.ft.values();return Yt({next(){const{value:e,done:i}=n.next();return i?{value:void 0,done:i}:{value:t.Ut(e),done:i}}})}intersection(t){return new Set(this).intersection(t)}union(t){return new Set(this).union(t)}difference(t){return new Set(this).difference(t)}symmetricDifference(t){return new Set(this).symmetricDifference(t)}isSubsetOf(t){return new Set(this).isSubsetOf(t)}isSupersetOf(t){return new Set(this).isSupersetOf(t)}isDisjointFrom(t){return new Set(this).isDisjointFrom(t)}replace(t){return We(t)&&(t=new Set(t)),Array.isArray(t)||a(t)?Pt(()=>{const n=a(t)?t:new Set(t);if(0!==n.size)if(0!==this.ft.size){for(const t of this.ft.values())n.has(this.Ut(t))||this.delete(t);n.forEach(t=>this.add(t))}else n.forEach(t=>this.add(t));else this.clear()}):null!=t&&n(41,t),this}toJSON(){return Array.from(this)}toString(){return"[object ObservableSet]"}[Symbol.iterator](){return this.values()}get[Symbol.toStringTag](){return"Set"}}var We=h("ObservableSet",Ue);const ze=Object.create(null),qe="remove";class Fe{constructor(t,n=new Map,e,i=Nn){this.h=void 0,this.j=void 0,this.tt=void 0,this.ut=void 0,this.lt=void 0,this.ot=void 0,this.st=void 0,this.v=void 0,this.p=void 0,this.Jt=void 0,this.Xt=void 0,this.O=void 0,this.V=void 0,this.h=t,this.j=n,this.tt=e,this.ut=i,this.lt=new _n("ObservableObject.keys"),this.p=o(this.h)}_(t){var n,e;return(null!=(n=null!=(e=this.j.get(t))?e:this.bt(t))?n:this.vt(t)).get()}bt(t){var n;const e=null==(n=this.O)?void 0:n.get(t);if(!e)return;this.O.delete(t),0===this.O.size&&(this.O=void 0);const i=e();return this.j.set(t,i),i}vt(t){var n;const e=null==(n=this.V)?void 0:n.get(t);if(!e)return;this.V.delete(t),0===this.V.size&&(this.V=void 0);const i=e();return this.j.set(t,i),i}N(t,n){var e,i;const r=null!=(e=null!=(i=this.j.get(t))?i:this.bt(t))?e:this.vt(t);if(r instanceof Zn)return r.set(n),!0;if(Kt(this)){const e=$t(this,{type:Ee,object:this.v||this.h,name:t,newValue:n});if(!e)return null;n=e.newValue}if((n=r.Ot(n))!==oe.UNCHANGED){const e=Ut(this),i=e?{type:Ee,observableKind:"object",debugObjectName:this.tt,object:this.v||this.h,oldValue:r.rt,name:t,newValue:n}:null;r._t(n),e&&zt(this,i)}return!0}Tt(t){return oe.trackingDerivation&&!d(this.h,t)&&this.et(t),this.h[t]}Pt(t,n,e=!1){return d(this.h,t)?this.j.has(t)?this.N(t,n):e?Reflect.set(this.h,t,n):(this.h[t]=n,!0):this.u(t,{value:n,enumerable:!0,writable:!0,configurable:!0},this.ut,e)}et(t){if(!oe.trackingDerivation)return t in this.h;this.Xt||(this.Xt=new Map);let n=this.Xt.get(t);return n||(n=new Qn(t in this.h,w,"ObservableObject.key?",!1),this.Xt.set(t,n)),n.get()}u(t,n,e,i=!1){return!0===e&&(e=this.ut),!1===e?this.l(t,n,i):e.u(this,t,n,i)}l(t,n,e=!1){try{ct();const i=this.Bt(t);if(!i)return i;if(Kt(this)){const e=$t(this,{object:this.v||this.h,name:t,type:Be,newValue:n.value});if(!e)return null;const{newValue:i}=e;n.value!==i&&(n=fn({},n,{value:i}))}if(e){if(!Reflect.defineProperty(this.h,t,n))return!1}else bn(this.h,t,n);this.Qt(t,n.value)}finally{ht()}return!0}S(t,n,e,i=!1){try{ct();const r=this.Bt(t);if(!r)return r;if(Kt(this)){const e=$t(this,{object:this.v||this.h,name:t,type:Be,newValue:n});if(!e)return null;n=e.newValue}const s=tn(t),o={configurable:!oe.safeDescriptors||this.p,enumerable:!0,get:s.get,set:s.set};if(i){if(!Reflect.defineProperty(this.h,t,o))return!1}else bn(this.h,t,o);const u=new Qn(n,e,"ObservableObject.key",!1);this.j.set(t,u),this.Qt(t,u.rt)}finally{ht()}return!0}m(t,n,e=!1){try{ct();const i=this.Bt(t);if(!i)return i;if(Kt(this)&&!$t(this,{object:this.v||this.h,name:t,type:Be,newValue:void 0}))return null;n.name||(n.name="ObservableObject.key"),n.context=this.v||this.h;const r=tn(t),s={configurable:!oe.safeDescriptors||this.p,enumerable:!1,get:r.get,set:r.set};if(e){if(!Reflect.defineProperty(this.h,t,s))return!1}else bn(this.h,t,s);this.j.set(t,new Zn(n)),this.Qt(t,void 0)}finally{ht()}return!0}Bt(t,n=!1){if(!d(this.h,t))return!0;if(Kt(this)&&!$t(this,{object:this.v||this.h,name:t,type:qe}))return null;try{var e;ct();const r=Ut(this),s=!1,o=this.j.get(t);let u;var i;if(o||!r&&!s||(u=null==(i=dn(this.h,t))?void 0:i.value),n){if(!Reflect.deleteProperty(this.h,t))return!1}else delete this.h[t];o&&(this.j.delete(t),o instanceof Qn&&(u=o.rt),ft(o)),this.lt.reportChanged(),null==(e=this.Xt)||null==(e=e.get(t))||e.set(t in this.h),(r||s)&&r&&zt(this,{type:qe,observableKind:"object",object:this.v||this.h,debugObjectName:this.tt,oldValue:u,name:t})}finally{ht()}return!0}Qt(t,n){var e;const i=Ut(this);i&&i&&zt(this,i?{type:Be,observableKind:"object",debugObjectName:this.tt,object:this.v||this.h,name:t,newValue:n}:null),null==(e=this.Xt)||null==(e=e.get(t))||e.set(!0),this.lt.reportChanged()}it(){return this.lt.reportObserved(),gn(this.h)}nt(){return this.lt.reportObserved(),Object.keys(this.h)}}const He=h("ObservableObjectAdministration",Fe),Ge=vn.toString;var Je;const Xe=(null==(Je=globalThis.Iterator)?void 0:Je.prototype)||{};t.$mobx=On,t.FlowCancellationError=_e,t.ObservableMap=Ke,t.ObservableSet=Ue,t.Reaction=ue,t._allowStateChanges=X,t._allowStateChangesInsideComputed=pt,t._allowStateReadsEnd=function(t){oe.allowStateReads=t},t._allowStateReadsStart=function(t){const n=oe.allowStateReads;return oe.allowStateReads=t,n},t._autoAction=me,t._autoActionBound=ge,t._endAction=J,t._getAdministration=rn,t._getGlobalState=function(){return oe},t._interceptReads=function(t,n,e){let i;return Le(t)||Xt(t)||Yn(t)?i=rn(t):nn(t)&&(i=rn(t,n)),i.dehancer="function"==typeof n?n:e,()=>{i.dehancer=void 0}},t._isComputingDerivation=function(){return null!==oe.trackingDerivation},t._resetGlobalState=function(){const t=new ie;for(let n in t)-1===ee.indexOf(n)&&(oe[n]=t[n]);oe.allowStateChanges=!oe.enforceActions},t._startAction=G,t.action=pe,t.actionBound=we,t.autorun=wt,t.compareDefault=An,t.compareIdentity=function(t,n){return t===n},t.compareShallow=function(t,n){return un(t,n,1)},t.compareStructural=p,t.computed=zn,t.computedStruct=Wn,t.configure=function(t){!0===t.isolateGlobalState&&function(){if((oe.pendingReactions.length||oe.inBatch||oe.isRunningReactions)&&n(36),se=!0,re){let t=globalThis;0===--t.__mobxInstanceCount&&(t.__mobxGlobals=void 0),oe=new ie}}();const{enforceActions:e}=t;if(void 0!==e){const t=e===Oe?Oe:"observed"===e;oe.enforceActions=t,oe.allowStateChanges=!0!==t&&t!==Oe}["computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","disableErrorBoundaries","safeDescriptors"].forEach(n=>{n in t&&(oe[n]=!!t[n])}),oe.allowStateReads=!oe.observableRequiresReaction,t.reactionScheduler&&function(t){const n=he;he=e=>t(()=>n(e))}(t.reactionScheduler)},t.createAtom=y,t.defineProperty=function(t,e,i){if(nn(t))return t[On].l(e,i);n(39)},t.entries=function(t){return nn(t)?Rt(t).map(n=>[n,t[n]]):Le(t)?Rt(t).map(n=>[n,t.get(n)]):We(t)?Array.from(t.entries()):Xt(t)?t.map((t,n)=>[n,t]):void n(7)},t.extendObservable=Ot,t.flow=Ve,t.flowBound=xe,t.flowResult=function(t){return t},t.get=function(t,e){if(Et(t,e))return nn(t)?t[On].Tt(e):Le(t)?t.get(e):Xt(t)?t[e]:void n(11)},t.getAtom=en,t.getDebugName=sn,t.getDependencyTree=function(t,n){return _t(en(t,n))},t.getObserverTree=function(t,n){return St(en(t,n))},t.has=Et,t.intercept=function(t,n,e){return i(e)?function(t,n,e){return Lt(rn(t,n),e)}(t,n,e):function(t,n){return Lt(rn(t),n)}(t,n)},t.isAction=mt,t.isBoxedObservable=Yn,t.isComputed=function(t){return xt(t)},t.isComputedProp=function(t,n){return xt(t,n)},t.isFlow=Vt,t.isFlowCancellationError=function(t){return t instanceof _e},t.isObservable=Mt,t.isObservableArray=Xt,t.isObservableMap=Le,t.isObservableObject=nn,t.isObservableProp=function(t,n){return Nt(t,n)},t.isObservableSet=We,t.keys=Rt,t.makeAutoObservable=function(t,n,e){return o(t)?Ot(t,t,n,e):(on(()=>{const i=Zt(t,e)[On];if(!t[Me]){const n=Object.getPrototypeOf(t),e=new Set([...gn(t),...gn(n)]);e.delete("constructor"),e.delete(On),c(n,Me,e)}t[Me].forEach(t=>qt(i,t,!n||!(t in n)||n[t]))}),t)},t.makeObservable=function(t,n,e){return on(()=>{const i=Zt(t,e)[On];gn(n).forEach(t=>qt(i,t,n[t]))}),t},t.observable=Ln,t.observableDeep=Dn,t.observableRef=Pn,t.observableShallow=Bn,t.observableStruct=Kn,t.observe=function(t,n,e,r){return i(e)?function(t,n,e,i){return Ct(rn(t,n),e,i)}(t,n,e,r):function(t,n,e){const i=rn(t);if(Xt(t))e&&n({observableKind:"array",object:i.v,debugObjectName:i.ct.tt,type:"splice",index:0,added:i.j.slice(),addedCount:i.j.length,removed:[],removedCount:0});else if(Le(t));else if(We(t));else if(!nn(t))return Ct(i,n,e);return Wt(i,n)}(t,n,e)},t.onBecomeObserved=function(t,n,e){return jt("onBO",t,n,e)},t.onBecomeUnobserved=function(t,n,e){return jt("onBUO",t,n,e)},t.onReactionError=function(t){return oe.globalReactionErrorHandlers.push(t),()=>{const n=oe.globalReactionErrorHandlers.indexOf(t);n>=0&&oe.globalReactionErrorHandlers.splice(n,1)}},t.override=Vn,t.ownKeys=kt,t.reaction=function(t,n,e=pn){function i(){if(b=!1,y.isDisposed)return;let n=!1;const i=f;y.track(()=>{const e=X(!1,()=>t(y));n=d||!v(f,e),f=e}),(d&&e.fireImmediately||!d&&n)&&u(f,i,y),d=!1}var r,s;const o=null!=(r=e.name)?r:"Reaction",u=pe(o,e.onError?(c=e.onError,h=n,function(){try{return h.apply(this,arguments)}catch(t){c.call(this,t)}}):n);var c,h;const l=!e.scheduler&&!e.delay,a=gt(e);let f,d=!0,b=!1;const v=e.equals||An,y=new ue(o,()=>{d||l?i():b||(b=!0,a(i))},e.onError,e.requiresObservable);return null!=e&&null!=(s=e.signal)&&s.aborted||y.Y(),y.Z(null==e?void 0:e.signal)},t.remove=function(t,e){nn(t)?t[On].Bt(e):Le(t)||We(t)?t.delete(e):Xt(t)?("number"!=typeof e&&(e=parseInt(e,10)),t.splice(e,1)):n(9)},t.runInAction=pt,t.set=function t(e,i,r){if(2===arguments.length&&!We(e)){ct();const n=i;try{for(let i in n)t(e,i,n[i])}finally{ht()}return}nn(e)?e[On].Pt(i,r):Le(e)?e.set(i,r):We(e)?e.add(i):Xt(e)?("number"!=typeof i&&(i=parseInt(i,10)),i<0&&n(42,i),ct(),i>=e.length&&(e.length=i+1),e[i]=r,ht()):n(8)},t.spy=function(){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}},t.toJS=function(t){return Tt(t,new Map)},t.transaction=Pt,t.untracked=nt,t.values=function(t){return nn(t)?Rt(t).map(n=>t[n]):Le(t)?Rt(t).map(n=>t.get(n)):We(t)?Array.from(t.values()):Xt(t)?t.slice():void n(6)},t.when=function(t,n,e){return 1===arguments.length||n&&"object"==typeof n?function(t,n){var e;if(null!=n&&null!=(e=n.signal)&&e.aborted)return fn(Promise.reject(new Error("WHEN_ABORTED")),{cancel:()=>null});let i,r;const s=new Promise((e,s)=>{var o;let u=Bt(t,e,fn({},n,{onError:s}));i=()=>{u(),s(new Error("WHEN_CANCELLED"))},r=()=>{u(),s(new Error("WHEN_ABORTED"))},null==n||null==(o=n.signal)||null==o.addEventListener||o.addEventListener("abort",r)}).finally(()=>{var t;return null==n||null==(t=n.signal)||null==t.removeEventListener?void 0:t.removeEventListener("abort",r)});return s.cancel=i,s}(t,n):Bt(t,n,e||{})},Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).mobx={});
1
+ var t,n;t=this,n=function(t){function n(t,...n){throw new Error(`[MobX] minified error nr: ${t}${n.length?" "+n.map(String).join(","):""}. See mobx.js.org/errors`)}function e(t){let n=!1;return function(){if(!n)return n=!0,t.apply(this,arguments)}}function i(t){return"function"==typeof t}function r(t){switch(typeof t){case"string":case"symbol":case"number":return!0}return!1}function s(t){return null!==t&&"object"==typeof t}function o(t){if(!s(t))return!1;const n=Object.getPrototypeOf(t);if(null==n)return!0;const e=d(n,"constructor")&&n.constructor;return"function"==typeof e&&e.toString()===mn}function u(t){const n=null==t?void 0:t.constructor;return!!n&&("GeneratorFunction"===n.name||"GeneratorFunction"===n.displayName)}function c(t,n,e){bn(t,n,{enumerable:!1,writable:!0,configurable:!0,value:e})}function h(t,n){const e="isMobX"+t;return n.prototype[e]=!0,function(t){return s(t)&&!0===t[e]}}function l(t){return null!=t&&"[object Map]"===Object.prototype.toString.call(t)}function a(t){return null!=t&&"[object Set]"===Object.prototype.toString.call(t)}function f(t){return null===t?null:"object"==typeof t?""+t:t}function d(t,n){return vn.hasOwnProperty.call(t,n)}function b(t,n){return!!(t&n)}function v(t,n,e){return e?t|=n:t&=~n,t}function y(t,n=wn,e=wn){const i=new _n(t);return n!==wn&&(i.onBOL=new Set([n])),e!==wn&&(i.onBUOL=new Set([e])),i}function p(t,n){return un(t,n)}function m(t,n,e){return null===t||"object"!=typeof t&&"function"!=typeof t||Nt(t)?t:Array.isArray(t)?Ln.array(t,{name:e}):o(t)?Ln.object(t,void 0,{name:e}):l(t)?Ln.map(t,{name:e}):a(t)?Ln.set(t,{name:e}):"function"!=typeof t||mt(t)||Vt(t)?t:u(t)?Ve(t):me(e,t)}function w(t){return t}function g(t,n){return{t:t,i:n,o:j,u:O}}function j(t,n,e,i){var r;if(null!=(r=this.i)&&r.bound)return null===this.u(t,n,e,!1)?0:1;if(i===t.h)return null===this.u(t,n,e,!1)?0:2;if(mt(e.value))return 1;const s=S(t,this,n,e,!1);return bn(i,n,s),2}function O(t,n,e,i){const r=S(t,this,n,e);return t.l(n,r,i)}function _(t,e,i){const{kind:r,name:s,addInitializer:o}=i,u=t,c=t=>{var n,e,i,r;return F(null!=(n=null==(e=u.i)?void 0:e.name)?n:s.toString(),t,null!=(i=null==(r=u.i)?void 0:r.autoAction)&&i)};return"field"==r?function(t){var n;let e=t;return mt(e)||(e=c(e)),null!=(n=u.i)&&n.bound&&(e=e.bind(this),e.isMobxAction=!0),e}:"method"==r?(mt(e)||(e=c(e)),null!=(h=u.i)&&h.bound&&o(function(){const t=this,n=t[s].bind(t);n.isMobxAction=!0,t[s]=n}),e):void n(43,u.t,String(s),r);var h}function S(t,n,e,i,r=oe.safeDescriptors){var s,o,u,c,h,l,a;let{value:f}=i;var d;return null!=(s=n.i)&&s.bound&&(f=f.bind(null!=(d=t.v)?d:t.h)),{value:F(null!=(o=null==(u=n.i)?void 0:u.name)?o:e.toString(),f,null!=(c=null==(h=n.i)?void 0:h.autoAction)&&c,null!=(l=n.i)&&l.bound?null!=(a=t.v)?a:t.h:void 0),configurable:!r||t.p,enumerable:!1,writable:!r}}function A(t,n){return{t:t,i:n,o:V,u:x}}function V(t,n,e,i){var r;if(i===t.h)return null===this.u(t,n,e,!1)?0:2;if(null!=(r=this.i)&&r.bound&&(!d(t.h,n)||!Vt(t.h[n]))&&null===this.u(t,n,e,!1))return 0;if(Vt(e.value))return 1;const s=N(t,0,0,e,!1,!1);return bn(i,n,s),2}function x(t,n,e,i){var r;const s=N(t,0,0,e,null==(r=this.i)?void 0:r.bound);return t.l(n,s,i)}function M(t,n,e){var i;const{name:r,addInitializer:s}=e;return Vt(n)||(n=Ve(n)),null!=(i=t.i)&&i.bound&&s(function(){const t=this,n=t[r].bind(t);n.isMobXFlow=!0,t[r]=n}),n}function N(t,n,e,i,r,s=oe.safeDescriptors){let{value:o}=i;var u;return Vt(o)||(o=Ve(o)),r&&(o=o.bind(null!=(u=t.v)?u:t.h),o.isMobXFlow=!0),{value:o,configurable:!s||t.p,enumerable:!1,writable:!s}}function R(t,n){return{t:t,i:n,o:E,u:k}}function E(t,n,e){return null===this.u(t,n,e,!1)?0:1}function k(t,n,e,i){return t.m(n,fn({},this.i,{get:e.get,set:e.set}),i)}function C(t,n,e){function i(t){const e=fn({},r.i,{get:n,context:t});return e.name||(e.name=`ObservableObject.${s.toString()}`),new Zn(e)}const r=t,{name:s,addInitializer:o}=e;let u;return o(function(){var t;const e=Zt(this)[On],r=this,o=e.j.get(s);o instanceof Zn&&o.derivation!==n&&e.j.delete(s),(null!=(t=e.O)?t:e.O=new Map).set(s,()=>i(r))}),function(){const t=this[On],e=t.j.get(s);if(e instanceof Zn&&e.derivation!==n){var r;let t=null==(r=u)?void 0:r.get(this);var o;return t||(t=i(this),(null!=(o=u)?o:u=new WeakMap).set(this,t)),t.get()}return t._(s)}}function I(t,n){return{t:t,i:n,o:T,u:P}}function T(t,n,e){return null===this.u(t,n,e,!1)?0:1}function P(t,n,e,i){var r,s;return t.S(n,e.value,null!=(r=null==(s=this.i)?void 0:s.A)?r:m,i)}function B(t,n,e){function i(t,n){var e;const i=Zt(t)[On];return(null!=(e=i.V)?e:i.V=new Map).set(o,()=>{var t,e;return new Qn(n,null!=(t=null==(e=r.i)?void 0:e.A)?t:m,`ObservableObject.${o.toString()}`,!1)}),i}const r=t,{kind:s,name:o}=e;if("accessor"===s)return{get(){var t;return(null!=(t=this[On])?t:i(this,n.get.call(this)))._(o)},set(t){var n;return(null!=(n=this[On])?n:i(this,t)).M(o,t)},init(t){return i(this,t),t}}}function D(t){return{t:xn,i:t,o:K,u:L}}function K(t,n,e,i){var r,s,o,c;if(e.get)return zn.o(t,n,e,i);if(e.set){const r=mt(e.set)?e.set:F(n.toString(),e.set);return i===t.h?null===t.l(n,{configurable:!oe.safeDescriptors||t.p,set:r})?0:2:(bn(i,n,{configurable:!0,set:r}),2)}if(i!==t.h&&"function"==typeof e.value)return u(e.value)?(null!=(c=this.i)&&c.autoBind?xe:Ve).o(t,n,e,i):(null!=(o=this.i)&&o.autoBind?ge:me).o(t,n,e,i);let h=!1===(null==(r=this.i)?void 0:r.deep)?Pn:Ln;var l;return"function"==typeof e.value&&null!=(s=this.i)&&s.autoBind&&(e.value=e.value.bind(null!=(l=t.v)?l:t.h)),h.o(t,n,e,i)}function L(t,n,e,i){var r,s,o;return e.get?zn.u(t,n,e,i):e.set?t.l(n,{configurable:!oe.safeDescriptors||t.p,set:F(n.toString(),e.set)},i):("function"==typeof e.value&&null!=(r=this.i)&&r.autoBind&&(e.value=e.value.bind(null!=(o=t.v)?o:t.h)),(!1===(null==(s=this.i)?void 0:s.deep)?Pn:Ln).u(t,n,e,i))}function $(t,n){return fn(function(e,i){if(i&&"string"==typeof i.kind)return n(t,e,i)},t)}function U(t){return t||Rn}function W(t){return $(t,B)}function z(t){return!0===t.deep?m:!1===t.deep?w:(n=t.defaultDecorator)&&null!=(e=null==(i=n.i)?void 0:i.A)?e:m;var n,e,i}function q(t){return $(t,C)}function F(t,n,e=!1,i){function r(){return H(0,e,n,i||this,arguments)}return r.isMobxAction=!0,r.toString=()=>n.toString(),Jn&&(Xn.value=t,bn(r,"name",Xn)),r}function H(t,n,e,i,r){const s=G(0,n);try{return e.apply(i,r)}catch(t){throw s.N=t,t}finally{J(s)}}function G(t,n){const e=oe.trackingDerivation,i=!n||!e;ct();let r=oe.allowStateChanges;i&&et();const s={R:i,k:e,C:r,I:oe.allowStateReads,T:!1,P:0,B:Gn++,D:Hn};return Hn=s.B,s}function J(t){Hn!==t.B&&n(30),Hn=t.D,void 0!==t.N&&(oe.suppressReactionErrors=!0),ht(),t.R&&it(t.k),oe.suppressReactionErrors=!1}function X(t,n){const e=function(t){const n=oe.allowStateChanges;return oe.allowStateChanges=t,n}(t);try{return n()}finally{!function(t){oe.allowStateChanges=t}(e)}}function Q(t){return t instanceof ne}function Y(t){switch(t.K){case 0:return!1;case-1:case 2:return!0;case 1:{const n=et(),e=t.L,i=e.length;for(let r=0;r<i;r++){const i=e[r];if(te(i)){if(oe.disableErrorBoundaries)i.get();else try{i.get()}catch(t){return it(n),!0}if(2===t.K)return it(n),!0}}return rt(t),it(n),!1}}}function Z(t,n,e){rt(t),t.$=new Array(0===t.U?100:t.L.length),t.W=0,t.U=++oe.runId;const i=oe.trackingDerivation;let r;if(oe.trackingDerivation=t,oe.inBatch++,!0===oe.disableErrorBoundaries)r=n.call(e);else try{r=n.call(e)}catch(t){r=new ne(t)}return oe.inBatch--,oe.trackingDerivation=i,function(t){const n=t.L,e=t.L=t.$;let i=0,r=0,s=t.W;for(let t=0;t<s;t++){const n=e[t];0===n.diffValue&&(n.diffValue=1,r!==t&&(e[r]=n),r++),n.K>i&&(i=n.K)}for(e.length=r,t.$=null,s=n.length;s--;){const e=n[s];0===e.diffValue&&ot(e,t),e.diffValue=0}for(;r--;){const n=e[r];1===n.diffValue&&(n.diffValue=0,st(n,t))}0!==i&&(t.K=i,t.q())}(t),r}function tt(t){const n=t.L;t.L=[];let e=n.length;for(;e--;)ot(n[e],t);t.K=-1}function nt(t){const n=et();try{return t()}finally{it(n)}}function et(){const t=oe.trackingDerivation;return oe.trackingDerivation=null,t}function it(t){oe.trackingDerivation=t}function rt(t){if(0===t.K)return;t.K=0;const n=t.L;let e=n.length;for(;e--;)n[e].F=0}function st(t,n){var e;(null!=(e=t.H)?e:t.H=new Set).add(n),t.F>n.K&&(t.F=n.K)}function ot(t,n){const e=t.H;e&&(e.delete(n),0===e.size&&ut(t))}function ut(t){!1===t.isPendingUnobservation&&(t.isPendingUnobservation=!0,oe.pendingUnobservations.push(t))}function ct(){oe.inBatch++}function ht(){0===--oe.inBatch&&(dt(),!oe.isRunningUnobservations&&oe.pendingUnobservations.length>0&&function(){oe.isRunningUnobservations=!0;try{const t=oe.pendingUnobservations;for(let n=0;n<t.length;n++){const e=t[n];e.isPendingUnobservation=!1,e.H&&0!==e.H.size||(e.H=null,e.isBeingObserved&&(e.isBeingObserved=!1,e.onBUO()),e instanceof Zn&&e.G())}oe.pendingUnobservations=[]}finally{oe.isRunningUnobservations=!1}}())}function lt(t){var n;t.isBeingObserved||(t.isBeingObserved=!0,t.onBO(),null==(n=t.L)||n.forEach(lt))}function at(t){const n=oe.trackingDerivation;return null!==n?(n.U!==t.J&&(t.J=n.U,n.$[n.W++]=t,!t.isBeingObserved&&oe.trackingContext&&(t.isBeingObserved=!0,t.onBO())),t.isBeingObserved):((!t.H||0===t.H.size)&&oe.inBatch>0&&ut(t),!1)}function ft(t){var n;2!==t.F&&(t.F=2,null==(n=t.H)||n.forEach(t=>{0===t.K&&t.q(),t.K=2}))}function dt(){oe.inBatch>0||oe.isRunningReactions||he(bt)}function bt(){oe.isRunningReactions=!0;const t=oe.pendingReactions;let n=0;for(;t.length>0;){++n===ce&&(console.error(`[mobx] cycle in reaction: ${t[0]}`),t.splice(0));let e=t.splice(0);for(let t=0,n=e.length;t<n;t++)e[t].X()}oe.isRunningReactions=!1}function vt(t){return $(t,_)}function yt(t){return function(n,e){return e&&"string"==typeof e.kind?_(t?ve:de,n,e):i(n)?F(n.name||"<unnamed action>",n,t):i(e)?F(n,e,t):r(n)?vt(g(t?fe:ae,{name:n,autoAction:t})):void 0}}function pt(t){return H(0,!1,t,this,void 0)}function mt(t){return i(t)&&!0===t.isMobxAction}function wt(t,n=pn){function e(){t(o)}var i,r;const s=null!=(i=null==n?void 0:n.name)?i:"Autorun";let o;if(n.scheduler||n.delay){const t=gt(n);let i=!1;o=new ue(s,()=>{i||(i=!0,t(()=>{i=!1,o.isDisposed||o.track(e)}))},n.onError,n.requiresObservable)}else o=new ue(s,function(){this.track(e)},n.onError,n.requiresObservable);return null!=n&&null!=(r=n.signal)&&r.aborted||o.Y(),o.Z(null==n?void 0:n.signal)}function gt(t){return t.scheduler?t.scheduler:t.delay?n=>setTimeout(n,t.delay):je}function jt(t,n,e,r){const s="function"==typeof r?en(n,e):en(n),o=i(r)?r:e,u=`${t}L`;return s[u]?s[u].add(o):s[u]=new Set([o]),function(){const t=s[u];t&&(t.delete(o),0===t.size&&delete s[u])}}function Ot(t,n,e,i){const r=jn(n);return on(()=>{const n=Zt(t,i)[On];gn(r).forEach(t=>{n.u(t,r[t],!e||!(t in e)||e[t])})}),t}function _t(t){const n={name:t.tt};var e;return t.L&&t.L.length>0&&(n.dependencies=(e=t.L,Array.from(new Set(e))).map(_t)),n}function St(t){const n={name:t.tt};return function(t){return!!t.H&&t.H.size>0}(t)&&(n.observers=Array.from(function(t){var n;return null!=(n=t.H)?n:new Set}(t),St)),n}function At(t){i(t.cancel)&&t.cancel()}function Vt(t){return!0===(null==t?void 0:t.isMobXFlow)}function xt(t,n){var e;if(void 0===n)return te(t);if(!1===nn(t))return!1;const i=t[On];if(null!=(e=i.O)&&e.has(n))return!0;if(!i.j.has(n))return!1;const r=en(t,n);return te(r)}function Mt(t,n){if(!t)return!1;if(void 0!==n){if(nn(t)){var e,i;const r=t[On];return r.j.has(n)||!(null==(e=r.O)||!e.has(n))||!(null==(i=r.V)||!i.has(n))}return!1}return nn(t)||!!t[On]||Sn(t)||le(t)||te(t)}function Nt(t){return Mt(t)}function Rt(t){return nn(t)?t[On].nt():Le(t)||We(t)?Array.from(t.keys()):Xt(t)?t.map((t,n)=>n):void n(5)}function Et(t,e){return nn(t)?t[On].et(e):Le(t)||We(t)?t.has(e):Xt(t)?e>=0&&e<t.length:void n(10)}function kt(t){if(nn(t))return t[On].it();n(38)}function Ct(t,n,e){if(te(t)){let i,r=!0;return wt(()=>{const s=t.get();if(!r||e){const e=et();n({observableKind:"computed",debugObjectName:t.tt,type:Ee,object:t,newValue:s,oldValue:i}),it(e)}r=!1,i=s})}return e&&n({observableKind:"value",debugObjectName:t.tt,object:t,type:Ee,newValue:t.rt,oldValue:void 0}),Wt(t,n)}function It(t,n,e){return t.set(n,e),e}function Tt(t,n){if(null==t||"object"!=typeof t||t instanceof Date||!Nt(t))return t;if(Yn(t)||te(t))return Tt(t.get(),n);if(n.has(t))return n.get(t);if(Xt(t)){const e=It(n,t,new Array(t.length));return t.forEach((t,i)=>{e[i]=Tt(t,n)}),e}if(We(t)){const e=It(n,t,new Set);return t.forEach(t=>{e.add(Tt(t,n))}),e}if(Le(t)){const e=It(n,t,new Map);return t.forEach((t,i)=>{e.set(i,Tt(t,n))}),e}{const e=It(n,t,{});return kt(t).forEach(i=>{vn.propertyIsEnumerable.call(t,i)&&(e[i]=Tt(t[i],n))}),e}}function Pt(t,n){ct();try{return t.apply(n)}finally{ht()}}function Bt(t,n,e){let i;if("number"==typeof e.timeout){const t=new Error("WHEN_TIMEOUT");i=setTimeout(()=>{if(!s[On].isDisposed){if(s(),!e.onError)throw t;e.onError(t)}},e.timeout)}e.name="When";const r=F("When-effect",n);var s=wt(n=>{X(!1,t)&&(n.dispose(),i&&clearTimeout(i),r())},e);return s}function Dt(t){return t[On]}function Kt(t){return void 0!==t.st&&t.st.length>0}function Lt(t,n){let i=t.st;return i?i.push(n):i=t.st=[n],e(()=>{const t=i.indexOf(n);-1!==t&&i.splice(t,1)})}function $t(t,e){const i=et();try{const i=[...t.st||[]];for(let t=0,r=i.length;t<r&&((e=i[t](e))&&!e.type&&n(14),e);t++);return e}finally{it(i)}}function Ut(t){return void 0!==t.ot&&t.ot.length>0}function Wt(t,n){let i=t.ot;return i?i.push(n):i=t.ot=[n],e(()=>{const t=i.indexOf(n);-1!==t&&i.splice(t,1)})}function zt(t,n){const e=et();let i=t.ot;if(i){i=i.slice();for(let t=0,e=i.length;t<e;t++)i[t](n);it(e)}}function qt(t,e,i){if(!0===i&&(i=t.ut),!1===i)return;e in t.h||n(1,i.t,`${t.tt}.${e.toString()}`);let r=t.h;for(;r&&r!==vn;){const n=dn(r,e);if(n){const s=i.o(t,e,n,r);if(0===s)return;if(1===s)break}r=Object.getPrototypeOf(r)}}function Ft(t,n){"function"==typeof Array.prototype[t]&&(Ie[t]=n(t))}function Ht(t){return function(){const n=this[On];n.ct.reportObserved();const e=n.ht(n.j);return e[t].apply(e,arguments)}}function Gt(t){return function(n,e){const i=this[On];return i.ct.reportObserved(),i.ht(i.j)[t]((t,i)=>n.call(e,t,i,this))}}function Jt(t){return function(){const n=this[On];n.ct.reportObserved();const e=n.ht(n.j),i=arguments[0];return arguments[0]=(t,n,e)=>i(t,n,e,this),e[t].apply(e,arguments)}}function Xt(t){return s(t)&&Te(t[On])}function Qt(t){return t[Symbol.toStringTag]="MapIterator",ln(t)}function Yt(t){return t[Symbol.toStringTag]="SetIterator",ln(t)}function Zt(t,n){var e;if(d(t,On))return t;const i=null!=(e=null==n?void 0:n.name)?e:"ObservableObject",r=new Fe(t,new Map,String(i),function(t){var n;return t?null!=(n=t.defaultDecorator)?n:function(t){var n;const e=!1!==t.deep,i=!!t.autoBind,r=(e?0:1)|(i?2:0);return null!=(n=Nn[r])?n:Nn[r]=D({deep:e,autoBind:i})}(t):void 0}(n));return c(t,On,r),t}function tn(t){return ze[t]||(ze[t]={get(){return this[On]._(t)},set(n){return this[On].M(t,n)}})}function nn(t){return!!s(t)&&He(t[On])}function en(t,e){if("object"==typeof t&&null!==t){if(Xt(t))return void 0!==e&&n(23),t[On].ct;if(We(t))return t.ct;if(Le(t)){if(void 0===e)return t.lt;const i=t.ft.get(e)||t.dt.get(e);return i||n(25,e,sn(t)),i}if(nn(t)){var r,s;if(!e)return n(26);const i=t[On],o=null!=(r=null!=(s=i.j.get(e))?s:i.bt(e))?r:i.vt(e);return o||n(27,e,sn(t)),o}if(Sn(t)||te(t)||le(t))return t}else if(i(t)&&le(t[On]))return t[On];n(28)}function rn(t,e){return t||n(29),void 0!==e?rn(en(t,e)):Sn(t)||te(t)||le(t)||Le(t)||We(t)?t:t[On]?t[On]:void n(24,t)}function sn(t,n){let e;if(void 0!==n)e=en(t,n);else{if(mt(t))return t.name;e=nn(t)||Le(t)||We(t)?rn(t):en(t)}return e.tt}function on(t){const n=et();ct();try{return t()}finally{ht(),it(n)}}function un(t,n,e=-1){return cn(t,n,e)}function cn(t,n,e,r,s){if(t===n)return 0!==t||1/t==1/n;if(null==t||null==n)return!1;if(t!=t)return n!=n;const o=typeof t;if("function"!==o&&"object"!==o&&"object"!=typeof n)return!1;const u=Ge.call(t);if(u!==Ge.call(n))return!1;switch(u){case"[object RegExp]":case"[object String]":return""+t==""+n;case"[object Number]":return+t!=+t?+n!=+n:0===+t?1/+t==1/n:+t===+n;case"[object Date]":case"[object Boolean]":return+t===+n;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(t)===Symbol.valueOf.call(n);case"[object Map]":case"[object Set]":e>=0&&e++}t=hn(t),n=hn(n);const c="[object Array]"===u;if(!c){if("object"!=typeof t||"object"!=typeof n)return!1;const e=t.constructor,r=n.constructor;if(e!==r&&!(i(e)&&e instanceof e&&i(r)&&r instanceof r)&&"constructor"in t&&"constructor"in n)return!1}if(0===e)return!1;e<0&&(e=-1),s=s||[];let h=(r=r||[]).length;for(;h--;)if(r[h]===t)return s[h]===n;if(r.push(t),s.push(n),c){if(h=t.length,h!==n.length)return!1;for(;h--;)if(!cn(t[h],n[h],e-1,r,s))return!1}else{const i=Object.keys(t),o=i.length;if(Object.keys(n).length!==o)return!1;for(let u=0;u<o;u++){const o=i[u];if(!d(n,o)||!cn(t[o],n[o],e-1,r,s))return!1}}return r.pop(),s.pop(),!0}function hn(t){return Xt(t)?t.slice():l(t)||Le(t)||a(t)||We(t)?Array.from(t.entries()):t}function ln(t){return t[Symbol.iterator]=an,fn(Object.create(Xe),t)}function an(){return this}const fn=Object.assign,dn=Object.getOwnPropertyDescriptor,bn=Object.defineProperty,vn=Object.prototype,yn=[];Object.freeze(yn);const pn={};Object.freeze(pn);const mn=Object.toString(),wn=()=>{},gn=Reflect.ownKeys,jn=Object.getOwnPropertyDescriptors,On=Symbol("mobx administration");class _n{constructor(t="Atom"){this.tt=void 0,this.yt=0,this.H=null,this.J=0,this.F=-1,this.onBOL=void 0,this.onBUOL=void 0,this.tt=t}get isBeingObserved(){return b(this.yt,1)}set isBeingObserved(t){this.yt=v(this.yt,1,t)}get isPendingUnobservation(){return b(this.yt,2)}set isPendingUnobservation(t){this.yt=v(this.yt,2,t)}get diffValue(){return b(this.yt,4)?1:0}set diffValue(t){this.yt=v(this.yt,4,1===t)}onBO(){this.onBOL&&this.onBOL.forEach(t=>t())}onBUO(){this.onBUOL&&this.onBUOL.forEach(t=>t())}reportObserved(){return at(this)}reportChanged(){ct(),ft(this),ht()}toString(){return this.tt}}const Sn=h("Atom",_n),An=Object.is,Vn={t:"override",o:function(){return 0},u:function(){n(44,this.t)}},xn="true",Mn=D(),Nn=[Mn],Rn={deep:!0,name:void 0,defaultDecorator:void 0};Object.freeze(Rn);const En=I("observable"),kn=I("observable.ref",{A:w}),Cn=I("observable.shallow",{A:function(t,n,e){return null==t||nn(t)||Xt(t)||Le(t)||We(t)?t:Array.isArray(t)?Ln.array(t,{name:e,deep:!1}):o(t)?Ln.object(t,void 0,{name:e,deep:!1}):l(t)?Ln.map(t,{name:e,deep:!1}):a(t)?Ln.set(t,{name:e,deep:!1}):void 0}}),In=I("observable.struct",{A:function(t,n){return un(t,n)?n:t}}),Tn={box(t,n){const e=U(n);return new Qn(t,z(e),e.name,!0,e.equals)},array(t,n){const e=U(n);return function(t,n,e="ObservableArray",i=!1){return on(()=>{const r=new Ce(e,n,i);bn(r.j,On,{enumerable:!1,writable:!1,configurable:!0,value:r});const s=new Proxy(r.j,ke);return r.v=s,t&&t.length&&r.wt(0,0,t),s})}(t,z(e),e.name)},map(t,n){const e=U(n);return new Ke(t,z(e),e.name)},set(t,n){const e=U(n);return new Ue(t,z(e),e.name)},object:(t,n,e)=>on(()=>Ot(function(t,n){var e,i;return null!=(i=(e=(t=Zt(t,n))[On]).v)?i:e.v=new Proxy(t,Me)}({},e),t,n))},Pn=W(kn),Bn=W(Cn),Dn=W(En),Kn=W(In);var Ln=fn(function(t,n,e){return n&&"string"==typeof n.kind?B(En,t,n):Nt(t)?t:o(t)?Ln.object(t,n,e):Array.isArray(t)?Ln.array(t,n):l(t)?Ln.map(t,n):a(t)?Ln.set(t,n):"object"==typeof t&&null!==t?t:Ln.box(t,n)},En,Tn);const $n="computed",Un=R($n),Wn=q(R("computed.struct",{equals:p})),zn=function(t,n){if(n&&"string"==typeof n.kind)return C(Un,t,n);if(o(t))return q(R($n,t));const e=o(n)?n:{};return e.get=t,e.name||(e.name=t.name||""),new Zn(e)};var qn,Fn;fn(zn,Un);let Hn=0,Gn=1;const Jn=null!=(qn=null==(Fn=dn(()=>{},"name"))?void 0:Fn.configurable)&&qn,Xn={value:"action",configurable:!0,writable:!1,enumerable:!1};class Qn extends _n{constructor(t,n,e="ObservableValue",i=!0,r=An){super(e),this.A=void 0,this.tt=void 0,this.gt=void 0,this.jt=!1,this.st=void 0,this.ot=void 0,this.rt=void 0,this.dehancer=void 0,this.A=n,this.tt=e,this.gt=r,this.rt=n(t,void 0,e)}dehanceValue(t){return void 0!==this.dehancer?this.dehancer(t):t}set(t){(t=this.Ot(t))!==oe.UNCHANGED&&this._t(t)}Ot(t){if(Kt(this)){const n=$t(this,{object:this,type:Ee,newValue:t});if(!n)return oe.UNCHANGED;t=n.newValue}return t=this.A(t,this.rt,this.tt),this.gt(this.rt,t)?oe.UNCHANGED:t}_t(t){const n=this.rt;this.rt=t,this.reportChanged(),Ut(this)&&zt(this,{type:Ee,object:this,newValue:t,oldValue:n})}get(){return this.reportObserved(),this.dehanceValue(this.rt)}raw(){return this.rt}toJSON(){return this.get()}toString(){return`${this.tt}[${this.rt}]`}valueOf(){return f(this.get())}[Symbol.toPrimitive](){return this.valueOf()}}const Yn=h("ObservableValue",Qn);class Zn{constructor(t){this.K=-1,this.L=[],this.$=null,this.H=null,this.U=0,this.J=0,this.F=0,this.W=0,this.rt=new ne(null),this.tt=void 0,this.St=void 0,this.yt=0,this.derivation=void 0,this.At=void 0,this.Vt=void 0,this.gt=void 0,this.xt=void 0,this.Mt=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.At=F("ComputedValue-setter",t.set)),this.gt=t.equals||An,this.Vt=t.context,this.xt=t.requiresReaction,this.Mt=!!t.keepAlive}q(){!function(t){var n;0===t.F&&(t.F=1,null==(n=t.H)||n.forEach(t=>{0===t.K&&(t.K=1,t.q())}))}(this)}onBO(){this.onBOL&&this.onBOL.forEach(t=>t())}onBUO(){this.onBUOL&&this.onBUOL.forEach(t=>t())}get isComputing(){return b(this.yt,1)}set isComputing(t){this.yt=v(this.yt,1,t)}get isRunningSetter(){return b(this.yt,2)}set isRunningSetter(t){this.yt=v(this.yt,2,t)}get isBeingObserved(){return b(this.yt,4)}set isBeingObserved(t){this.yt=v(this.yt,4,t)}get isPendingUnobservation(){return b(this.yt,8)}set isPendingUnobservation(t){this.yt=v(this.yt,8,t)}get diffValue(){return b(this.yt,16)?1:0}set diffValue(t){this.yt=v(this.yt,16,1===t)}get(){if(this.isComputing&&n(32,this.tt,this.derivation),0!==oe.inBatch||this.H&&0!==this.H.size||this.Mt){const t=this.isBeingObserved;if(at(this),Y(this)){let t=oe.trackingContext;t||!this.Mt&&!this.isBeingObserved||(oe.trackingContext=this),this.trackAndCompute()&&function(t){var n;2!==t.F&&(t.F=2,null==(n=t.H)||n.forEach(n=>{1===n.K?n.K=2:0===n.K&&(t.F=0)}))}(this),oe.trackingContext=t}else!t&&this.isBeingObserved&&this.L.forEach(lt)}else Y(this)&&(this.Nt(),ct(),this.rt=this.Rt(!1),ht());const t=this.rt;if(Q(t))throw t.cause;return t}set(t){if(this.At){this.isRunningSetter&&n(33,this.tt),this.isRunningSetter=!0;try{this.At.call(this.Vt,t)}finally{this.isRunningSetter=!1}}else n(34,this.tt)}trackAndCompute(){const t=this.rt,n=-1===this.K,e=this.Rt(!0),i=n||Q(t)||Q(e)||!this.gt(t,e);return i&&(this.rt=e),i}Rt(t){let n;if(this.isComputing=!0,t)n=Z(this,this.derivation,this.Vt);else if(!0===oe.disableErrorBoundaries)n=this.derivation.call(this.Vt);else try{n=this.derivation.call(this.Vt)}catch(t){n=new ne(t)}return this.isComputing=!1,n}G(){this.Mt||(tt(this),this.rt=void 0)}Nt(){}toString(){return`${this.tt}[${this.derivation.toString()}]`}valueOf(){return f(this.get())}[Symbol.toPrimitive](){return this.valueOf()}}const te=h("ComputedValue",Zn);class ne{constructor(t){this.cause=void 0,this.cause=t}}const ee=["mobxGuid","spyListeners","enforceActions","computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","allowStateReads","disableErrorBoundaries","runId","UNCHANGED"];class ie{constructor(){this.version=7,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.isRunningUnobservations=!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.safeDescriptors=!0}}let re=!0,se=!1,oe=function(){let t=globalThis;return t.__mobxInstanceCount>0&&!t.__mobxGlobals&&(re=!1),t.__mobxGlobals&&7!==t.__mobxGlobals.version&&(re=!1),re?t.__mobxGlobals?(t.__mobxInstanceCount+=1,t.__mobxGlobals.UNCHANGED||(t.__mobxGlobals.UNCHANGED={}),t.__mobxGlobals):(t.__mobxInstanceCount=1,t.__mobxGlobals=new ie):(setTimeout(()=>{se||n(35)},1),new ie)}();class ue{constructor(t="Reaction",n,e,i){this.tt=void 0,this.Et=void 0,this.kt=void 0,this.Ct=void 0,this.L=[],this.$=[],this.K=-1,this.U=0,this.W=0,this.yt=0,this.It=void 0,this.tt=t,this.Et=n,this.kt=e,this.Ct=i}get isDisposed(){return b(this.yt,1)}set isDisposed(t){this.yt=v(this.yt,1,t)}get isScheduled(){return b(this.yt,2)}set isScheduled(t){this.yt=v(this.yt,2,t)}get isTrackPending(){return b(this.yt,4)}set isTrackPending(t){this.yt=v(this.yt,4,t)}get isRunning(){return b(this.yt,8)}set isRunning(t){this.yt=v(this.yt,8,t)}get diffValue(){return b(this.yt,16)?1:0}set diffValue(t){this.yt=v(this.yt,16,1===t)}q(){this.Y()}Y(){this.isScheduled||(this.isScheduled=!0,oe.pendingReactions.push(this),dt())}X(){if(!this.isDisposed){ct(),this.isScheduled=!1;const t=oe.trackingContext;if(oe.trackingContext=this,Y(this)){this.isTrackPending=!0;try{this.Et()}catch(t){this.Tt(t)}}oe.trackingContext=t,ht()}}track(t){if(this.isDisposed)return;ct(),this.isRunning=!0;const n=oe.trackingContext;oe.trackingContext=this;const e=Z(this,t,void 0);oe.trackingContext=n,this.isRunning=!1,this.isTrackPending=!1,this.isDisposed&&tt(this),Q(e)&&this.Tt(e.cause),ht()}Tt(t){if(this.kt)this.kt(t,this);else{if(oe.disableErrorBoundaries)throw t;oe.suppressReactionErrors||console.error(`[mobx] uncaught error in '${this}'`,t),oe.globalReactionErrorHandlers.forEach(n=>n(t,this))}}dispose(){var t;this.isDisposed||(this.isDisposed=!0,null==(t=this.It)||t.call(this),this.isRunning||(ct(),tt(this),ht()))}Z(t){const n=()=>this.dispose();return null!=t&&t.addEventListener&&!this.isDisposed&&(t.addEventListener("abort",n),this.It=()=>null==t.removeEventListener?void 0:t.removeEventListener("abort",n)),n[On]=this,"dispose"in Symbol&&"symbol"==typeof Symbol.dispose&&(n[Symbol.dispose]=n),n}toString(){return`Reaction[${this.tt}]`}}const ce=100;let he=t=>t();const le=h("Reaction",ue),ae="action",fe="autoAction",de=g(ae),be=g("action.bound",{bound:!0}),ve=g(fe,{autoAction:!0}),ye=g("autoAction.bound",{autoAction:!0,bound:!0}),pe=yt(!1);fn(pe,de);const me=yt(!0);fn(me,ve);const we=vt(be),ge=vt(ye),je=t=>t(),Oe="always";class _e extends Error{constructor(){super("FLOW_CANCELLED"),Object.setPrototypeOf(this,new.target.prototype),this.name="FlowCancellationError"}toString(){return`Error: ${this.message}`}}const Se=A("flow"),Ae=A("flow.bound",{bound:!0}),Ve=fn(function(t,n){if(n&&"string"==typeof n.kind)return M(Se,t,n);const e=t,r=e.name||"flow",s=function(){const t=arguments,n=pe(r,e).apply(this,t);let s,o;const u=new Promise(function(t,e){function u(t){let i;o=void 0;try{i=pe(r,n.next).call(n,t)}catch(t){return e(t)}h(i)}function c(t){let i;o=void 0;try{i=pe(r,n.throw).call(n,t)}catch(t){return e(t)}h(i)}function h(n){if(!i(null==n?void 0:n.then))return n.done?t(n.value):(o=Promise.resolve(n.value),o.then(u,c));n.then(h,e)}s=e,u(void 0)});return u.cancel=pe(r,function(){try{o&&At(o);const t=n.return(void 0),e=Promise.resolve(t.value);e.then(wn,wn),At(e),s(new _e)}catch(t){s(t)}}),u};return s.isMobXFlow=!0,s},Se),xe=function(t){return $(t,M)}(Ae),Me={has:(t,n)=>Dt(t).et(n),get:(t,n)=>Dt(t).Pt(n),set(t,n,e){var i;return!!r(n)&&(null==(i=Dt(t).Bt(n,e,!0))||i)},deleteProperty(t,n){var e;return!!r(n)&&(null==(e=Dt(t).Dt(n,!0))||e)},defineProperty(t,n,e){var i;return null==(i=Dt(t).l(n,e))||i},ownKeys:t=>Dt(t).it(),preventExtensions(t){n(13)}},Ne=Symbol("mobx-keys"),Re="splice",Ee="update",ke={get(t,n){const e=t[On];return n===On?e:"length"===n?e.Kt():"string"!=typeof n||isNaN(n)?d(Ie,n)?Ie[n]:t[n]:e.Pt(parseInt(n))},set(t,n,e){const i=t[On];return"length"===n?i.Lt(e):"symbol"==typeof n||isNaN(n)?t[n]=e:i.Bt(parseInt(n),e),!0},preventExtensions(){n(15)}};class Ce{constructor(t="ObservableArray",n,e){this.$t=void 0,this.ct=void 0,this.j=[],this.st=void 0,this.ot=void 0,this.A=void 0,this.dehancer=void 0,this.v=void 0,this.Ut=0,this.$t=e,this.ct=new _n(t),this.A=(t,e)=>n(t,e,"ObservableArray[..]")}Wt(t){return void 0!==this.dehancer?this.dehancer(t):t}ht(t){return void 0!==this.dehancer&&t.length>0?t.map(this.dehancer):t}Kt(){return this.ct.reportObserved(),this.j.length}Lt(t){(!Number.isInteger(t)||t<0)&&n(40,t);let e=this.j.length;if(t!==e)if(t>e){const n=Array.from({length:t-e});this.wt(e,0,n)}else this.wt(t,e-t)}zt(t,e){t!==this.Ut&&n(16),this.Ut+=e}wt(t,n,e){const i=this.j.length;if(void 0===t?t=0:t>i?t=i:t<0&&(t=Math.max(0,i+t)),n=1===arguments.length?i-t:null==n?0:Math.max(0,Math.min(n,i-t)),void 0===e&&(e=yn),Kt(this)){const i=$t(this,{object:this.v,type:Re,index:t,removedCount:n,added:e});if(!i)return yn;n=i.removedCount,e=i.added}e=0===e.length?e:e.map(t=>this.A(t,void 0));const r=this.qt(t,n,e);return 0===n&&0===e.length||this.Ft(t,e,r),this.ht(r)}qt(t,n,e){if(e.length<1e4)return this.j.splice(t,n,...e);{const i=this.j.slice(t,t+n);let r=this.j.slice(t+n);this.j.length+=e.length-n;for(let n=0;n<e.length;n++)this.j[t+n]=e[n];for(let n=0;n<r.length;n++)this.j[t+e.length+n]=r[n];return i}}Ht(t,n,e){const i=Ut(this),r=i?{observableKind:"array",object:this.v,type:Ee,debugObjectName:this.ct.tt,index:t,newValue:n,oldValue:e}:null;this.ct.reportChanged(),i&&zt(this,r)}Ft(t,n,e){const i=Ut(this),r=i?{observableKind:"array",object:this.v,debugObjectName:this.ct.tt,type:Re,index:t,removed:e,added:n,removedCount:e.length,addedCount:n.length}:null;this.ct.reportChanged(),i&&zt(this,r)}Pt(t){return this.ct.reportObserved(),this.Wt(this.j[t])}Bt(t,n){const e=this.j;if(t<e.length){const i=e[t];if(Kt(this)){const e=$t(this,{type:Ee,object:this.v,index:t,newValue:n});if(!e)return;n=e.newValue}(n=this.A(n,i))!==i&&(e[t]=n,this.Ht(t,n,i))}else{const i=Array.from({length:t+1-e.length});i[i.length-1]=n,this.wt(e.length,0,i)}}}var Ie={clear(){return this.splice(0)},replace(t){const n=this[On];return n.wt(0,n.j.length,t)},toJSON(){return this.slice()},splice(t,n,...e){const i=this[On];switch(arguments.length){case 0:return[];case 1:return i.wt(t);case 2:return i.wt(t,n)}return i.wt(t,n,e)},spliceWithArray(t,n,e){return this[On].wt(t,n,e)},push(...t){const n=this[On];return n.wt(n.j.length,0,t),n.j.length},pop(){return this.splice(Math.max(this[On].j.length-1,0),1)[0]},shift(){return this.splice(0,1)[0]},unshift(...t){const n=this[On];return n.wt(0,0,t),n.j.length},reverse(){return oe.trackingDerivation&&n(37,"reverse"),this.replace(this.slice().reverse()),this},sort(){oe.trackingDerivation&&n(37,"sort");const t=this.slice();return t.sort.apply(t,arguments),this.replace(t),this},remove(t){const n=this[On],e=n.ht(n.j).indexOf(t);return e>-1&&(this.splice(e,1),!0)}};Ft("at",Ht),Ft("concat",Ht),Ft("flat",Ht),Ft("includes",Ht),Ft("indexOf",Ht),Ft("join",Ht),Ft("lastIndexOf",Ht),Ft("slice",Ht),Ft("toString",Ht),Ft("toLocaleString",Ht),Ft("toSorted",Ht),Ft("toSpliced",Ht),Ft("with",Ht),Ft("every",Gt),Ft("filter",Gt),Ft("find",Gt),Ft("findIndex",Gt),Ft("findLast",Gt),Ft("findLastIndex",Gt),Ft("flatMap",Gt),Ft("forEach",Gt),Ft("map",Gt),Ft("some",Gt),Ft("toReversed",Gt),Ft("reduce",Jt),Ft("reduceRight",Jt);const Te=h("ObservableArrayAdministration",Ce),Pe={},Be="add",De="delete";class Ke{constructor(t,n=m,e="ObservableMap"){this.A=void 0,this.tt=void 0,this[On]=Pe,this.ft=void 0,this.dt=void 0,this.lt=void 0,this.st=void 0,this.ot=void 0,this.dehancer=void 0,this.A=n,this.tt=e,on(()=>{this.lt=y("ObservableMap.keys()"),this.ft=new Map,this.dt=new Map,t&&this.merge(t)})}et(t){return this.ft.has(t)}has(t){if(!oe.trackingDerivation)return this.et(t);let n=this.dt.get(t);if(!n){const e=n=new Qn(this.et(t),w,"ObservableMap.key?",!1);this.dt.set(t,e),e.onBUOL=new Set([()=>this.dt.delete(t)])}return n.get()}set(t,n){const e=this.et(t);if(Kt(this)){const i=$t(this,{type:e?Ee:Be,object:this,newValue:n,name:t});if(!i)return this;n=i.newValue}return e?this.Gt(t,n):this.Jt(t,n),this}delete(t){if(Kt(this)&&!$t(this,{type:De,object:this,name:t}))return!1;if(this.et(t)){const n=!1,e=Ut(this),i=e||n?{observableKind:"map",debugObjectName:this.tt,type:De,object:this,oldValue:this.ft.get(t).rt,name:t}:null;return Pt(()=>{var n;this.lt.reportChanged(),null==(n=this.dt.get(t))||n._t(!1),this.ft.get(t)._t(void 0),this.ft.delete(t)}),e&&zt(this,i),!0}return!1}Gt(t,n){const e=this.ft.get(t);if((n=e.Ot(n))!==oe.UNCHANGED){const i=!1,r=Ut(this),s=r||i?{observableKind:"map",debugObjectName:this.tt,type:Ee,object:this,oldValue:e.rt,name:t,newValue:n}:null;e._t(n),r&&zt(this,s)}}Jt(t,n){Pt(()=>{var e;const i=new Qn(n,this.A,"ObservableMap.key",!1);this.ft.set(t,i),n=i.rt,null==(e=this.dt.get(t))||e._t(!0),this.lt.reportChanged()});const e=Ut(this);e&&zt(this,e?{observableKind:"map",debugObjectName:this.tt,type:Be,object:this,name:t,newValue:n}:null)}get(t){return this.has(t)?this.Wt(this.ft.get(t).get()):this.Wt(void 0)}getOrInsert(t,n){return this.has(t)||this.set(t,n),this.get(t)}getOrInsertComputed(t,n){return this.has(t)||this.set(t,n(t)),this.get(t)}Wt(t){return void 0!==this.dehancer?this.dehancer(t):t}keys(){return this.lt.reportObserved(),this.ft.keys()}values(){const t=this,n=this.keys();return Qt({next(){const{done:e,value:i}=n.next();return{done:e,value:e?void 0:t.get(i)}}})}entries(){const t=this,n=this.keys();return Qt({next(){const{done:e,value:i}=n.next();return{done:e,value:e?void 0:[i,t.get(i)]}}})}[Symbol.iterator](){return this.entries()}forEach(t,n){for(const[e,i]of this)t.call(n,i,e,this)}merge(t){return Le(t)&&(t=new Map(t)),Pt(()=>{o(t)?function(t){const n=Object.keys(t),e=Object.getOwnPropertySymbols(t);return e.length?[...n,...e.filter(n=>vn.propertyIsEnumerable.call(t,n))]:n}(t).forEach(n=>this.set(n,t[n])):Array.isArray(t)?t.forEach(([t,n])=>this.set(t,n)):l(t)?(function(t){const n=Object.getPrototypeOf(t),e=Object.getPrototypeOf(n);return null===Object.getPrototypeOf(e)}(t)||n(19,t),t.forEach((t,n)=>this.set(n,t))):null!=t&&n(20,t)}),this}clear(){Pt(()=>{nt(()=>{for(const t of this.keys())this.delete(t)})})}replace(t){return Pt(()=>{const e=function(t){if(l(t)||Le(t))return t;if(Array.isArray(t))return new Map(t);if(o(t)){const n=new Map;for(const e in t)n.set(e,t[e]);return n}return n(21,t)}(t),i=new Map;let r=!1;for(const t of this.ft.keys())if(!e.has(t))if(this.delete(t))r=!0;else{const n=this.ft.get(t);i.set(t,n)}for(const[t,n]of e.entries()){const e=this.ft.has(t);if(this.set(t,n),this.ft.has(t)){const n=this.ft.get(t);i.set(t,n),e||(r=!0)}}if(!r)if(this.ft.size!==i.size)this.lt.reportChanged();else{const t=this.ft.keys(),n=i.keys();let e=t.next(),r=n.next();for(;!e.done;){if(e.value!==r.value){this.lt.reportChanged();break}e=t.next(),r=n.next()}}this.ft=i}),this}get size(){return this.lt.reportObserved(),this.ft.size}toString(){return"[object ObservableMap]"}toJSON(){return Array.from(this)}get[Symbol.toStringTag](){return"Map"}}var Le=h("ObservableMap",Ke);const $e={};class Ue{constructor(t,n=m,e="ObservableSet"){this.tt=void 0,this[On]=$e,this.ft=new Set,this.ct=void 0,this.ot=void 0,this.st=void 0,this.dehancer=void 0,this.A=void 0,this.tt=e,this.A=(t,i)=>n(t,i,e),on(()=>{this.ct=y(this.tt),t&&this.replace(t)})}Wt(t){return void 0!==this.dehancer?this.dehancer(t):t}clear(){Pt(()=>{nt(()=>{for(const t of this.ft.values())this.delete(t)})})}forEach(t,n){for(const e of this)t.call(n,e,e,this)}get size(){return this.ct.reportObserved(),this.ft.size}add(t){if(Kt(this)){const n=$t(this,{type:Be,object:this,newValue:t});if(!n)return this;t=n.newValue}if(!this.has(t)){Pt(()=>{t=this.A(t,void 0),this.ft.add(t),this.ct.reportChanged()});const n=!1,e=Ut(this);e&&zt(this,e||n?{observableKind:"set",debugObjectName:this.tt,type:Be,object:this,newValue:t}:null)}return this}delete(t){if(Kt(this)&&!$t(this,{type:De,object:this,oldValue:t}))return!1;if(this.has(t)){const n=!1,e=Ut(this),i=e||n?{observableKind:"set",debugObjectName:this.tt,type:De,object:this,oldValue:t}:null;return Pt(()=>{this.ct.reportChanged(),this.ft.delete(t)}),e&&zt(this,i),!0}return!1}has(t){return this.ct.reportObserved(),this.ft.has(this.Wt(t))}entries(){const t=this.values();return Yt({next(){const{value:n,done:e}=t.next();return e?{value:void 0,done:e}:{value:[n,n],done:e}}})}keys(){return this.values()}values(){this.ct.reportObserved();const t=this,n=this.ft.values();return Yt({next(){const{value:e,done:i}=n.next();return i?{value:void 0,done:i}:{value:t.Wt(e),done:i}}})}intersection(t){return new Set(this).intersection(t)}union(t){return new Set(this).union(t)}difference(t){return new Set(this).difference(t)}symmetricDifference(t){return new Set(this).symmetricDifference(t)}isSubsetOf(t){return new Set(this).isSubsetOf(t)}isSupersetOf(t){return new Set(this).isSupersetOf(t)}isDisjointFrom(t){return new Set(this).isDisjointFrom(t)}replace(t){return We(t)&&(t=new Set(t)),Array.isArray(t)||a(t)?Pt(()=>{const n=a(t)?t:new Set(t);if(0!==n.size)if(0!==this.ft.size){for(const t of this.ft.values())n.has(this.Wt(t))||this.delete(t);n.forEach(t=>this.add(t))}else n.forEach(t=>this.add(t));else this.clear()}):null!=t&&n(41,t),this}toJSON(){return Array.from(this)}toString(){return"[object ObservableSet]"}[Symbol.iterator](){return this.values()}get[Symbol.toStringTag](){return"Set"}}var We=h("ObservableSet",Ue);const ze=Object.create(null),qe="remove";class Fe{constructor(t,n=new Map,e,i=Mn){this.h=void 0,this.j=void 0,this.tt=void 0,this.ut=void 0,this.lt=void 0,this.ot=void 0,this.st=void 0,this.v=void 0,this.p=void 0,this.Xt=void 0,this.Qt=void 0,this.O=void 0,this.V=void 0,this.h=t,this.j=n,this.tt=e,this.ut=i,this.lt=new _n("ObservableObject.keys"),this.p=o(this.h)}_(t){var n,e;return(null!=(n=null!=(e=this.j.get(t))?e:this.bt(t))?n:this.vt(t)).get()}bt(t){var n;const e=null==(n=this.O)?void 0:n.get(t);if(!e)return;this.O.delete(t),0===this.O.size&&(this.O=void 0);const i=e();return this.j.set(t,i),i}vt(t){var n;const e=null==(n=this.V)?void 0:n.get(t);if(!e)return;this.V.delete(t),0===this.V.size&&(this.V=void 0);const i=e();return this.j.set(t,i),i}M(t,n){var e,i;const r=null!=(e=null!=(i=this.j.get(t))?i:this.bt(t))?e:this.vt(t);if(r instanceof Zn)return r.set(n),!0;if(Kt(this)){const e=$t(this,{type:Ee,object:this.v||this.h,name:t,newValue:n});if(!e)return null;n=e.newValue}if((n=r.Ot(n))!==oe.UNCHANGED){const e=Ut(this),i=e?{type:Ee,observableKind:"object",debugObjectName:this.tt,object:this.v||this.h,oldValue:r.rt,name:t,newValue:n}:null;r._t(n),e&&zt(this,i)}return!0}Pt(t){return oe.trackingDerivation&&!d(this.h,t)&&this.et(t),this.h[t]}Bt(t,n,e=!1){return d(this.h,t)?this.j.has(t)?this.M(t,n):e?Reflect.set(this.h,t,n):(this.h[t]=n,!0):this.u(t,{value:n,enumerable:!0,writable:!0,configurable:!0},this.ut,e)}et(t){if(!oe.trackingDerivation)return t in this.h;this.Qt||(this.Qt=new Map);let n=this.Qt.get(t);return n||(n=new Qn(t in this.h,w,"ObservableObject.key?",!1),this.Qt.set(t,n)),n.get()}u(t,n,e,i=!1){return!0===e&&(e=this.ut),!1===e?this.l(t,n,i):e.u(this,t,n,i)}l(t,n,e=!1){try{ct();const i=this.Dt(t);if(!i)return i;if(Kt(this)){const e=$t(this,{object:this.v||this.h,name:t,type:Be,newValue:n.value});if(!e)return null;const{newValue:i}=e;n.value!==i&&(n=fn({},n,{value:i}))}if(e){if(!Reflect.defineProperty(this.h,t,n))return!1}else bn(this.h,t,n);this.Yt(t,n.value)}finally{ht()}return!0}S(t,n,e,i=!1){try{ct();const r=this.Dt(t);if(!r)return r;if(Kt(this)){const e=$t(this,{object:this.v||this.h,name:t,type:Be,newValue:n});if(!e)return null;n=e.newValue}const s=tn(t),o={configurable:!oe.safeDescriptors||this.p,enumerable:!0,get:s.get,set:s.set};if(i){if(!Reflect.defineProperty(this.h,t,o))return!1}else bn(this.h,t,o);const u=new Qn(n,e,"ObservableObject.key",!1);this.j.set(t,u),this.Yt(t,u.rt)}finally{ht()}return!0}m(t,n,e=!1){try{ct();const i=this.Dt(t);if(!i)return i;if(Kt(this)&&!$t(this,{object:this.v||this.h,name:t,type:Be,newValue:void 0}))return null;n.name||(n.name="ObservableObject.key"),n.context=this.v||this.h;const r=tn(t),s={configurable:!oe.safeDescriptors||this.p,enumerable:!1,get:r.get,set:r.set};if(e){if(!Reflect.defineProperty(this.h,t,s))return!1}else bn(this.h,t,s);this.j.set(t,new Zn(n)),this.Yt(t,void 0)}finally{ht()}return!0}Dt(t,n=!1){if(!d(this.h,t))return!0;if(Kt(this)&&!$t(this,{object:this.v||this.h,name:t,type:qe}))return null;try{var e;ct();const r=Ut(this),s=!1,o=this.j.get(t);let u;var i;if(o||!r&&!s||(u=null==(i=dn(this.h,t))?void 0:i.value),n){if(!Reflect.deleteProperty(this.h,t))return!1}else delete this.h[t];o&&(this.j.delete(t),o instanceof Qn&&(u=o.rt),ft(o)),this.lt.reportChanged(),null==(e=this.Qt)||null==(e=e.get(t))||e.set(t in this.h),(r||s)&&r&&zt(this,{type:qe,observableKind:"object",object:this.v||this.h,debugObjectName:this.tt,oldValue:u,name:t})}finally{ht()}return!0}Yt(t,n){var e;const i=Ut(this);i&&i&&zt(this,i?{type:Be,observableKind:"object",debugObjectName:this.tt,object:this.v||this.h,name:t,newValue:n}:null),null==(e=this.Qt)||null==(e=e.get(t))||e.set(!0),this.lt.reportChanged()}it(){return this.lt.reportObserved(),gn(this.h)}nt(){return this.lt.reportObserved(),Object.keys(this.h)}}const He=h("ObservableObjectAdministration",Fe),Ge=vn.toString;var Je;const Xe=(null==(Je=globalThis.Iterator)?void 0:Je.prototype)||{};t.$mobx=On,t.FlowCancellationError=_e,t.ObservableMap=Ke,t.ObservableSet=Ue,t.Reaction=ue,t._allowStateChanges=X,t._allowStateChangesInsideComputed=pt,t._allowStateReadsEnd=function(t){oe.allowStateReads=t},t._allowStateReadsStart=function(t){const n=oe.allowStateReads;return oe.allowStateReads=t,n},t._autoAction=me,t._autoActionBound=ge,t._endAction=J,t._getAdministration=rn,t._getGlobalState=function(){return oe},t._interceptReads=function(t,n,e){let i;return Le(t)||Xt(t)||Yn(t)?i=rn(t):nn(t)&&(i=rn(t,n)),i.dehancer="function"==typeof n?n:e,()=>{i.dehancer=void 0}},t._isComputingDerivation=function(){return null!==oe.trackingDerivation},t._resetGlobalState=function(){const t=new ie;for(let n in t)-1===ee.indexOf(n)&&(oe[n]=t[n]);oe.allowStateChanges=!oe.enforceActions},t._startAction=G,t.action=pe,t.actionBound=we,t.autorun=wt,t.compareDefault=An,t.compareIdentity=function(t,n){return t===n},t.compareShallow=function(t,n){return un(t,n,1)},t.compareStructural=p,t.computed=zn,t.computedStruct=Wn,t.configure=function(t){!0===t.isolateGlobalState&&function(){if((oe.pendingReactions.length||oe.inBatch||oe.isRunningReactions)&&n(36),se=!0,re){let t=globalThis;0===--t.__mobxInstanceCount&&(t.__mobxGlobals=void 0),oe=new ie}}();const{enforceActions:e}=t;if(void 0!==e){const t=e===Oe?Oe:"observed"===e;oe.enforceActions=t,oe.allowStateChanges=!0!==t&&t!==Oe}["computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","disableErrorBoundaries","safeDescriptors"].forEach(n=>{n in t&&(oe[n]=!!t[n])}),oe.allowStateReads=!oe.observableRequiresReaction,t.reactionScheduler&&function(t){const n=he;he=e=>t(()=>n(e))}(t.reactionScheduler)},t.createAtom=y,t.defineProperty=function(t,e,i){if(nn(t))return t[On].l(e,i);n(39)},t.entries=function(t){return nn(t)?Rt(t).map(n=>[n,t[n]]):Le(t)?Rt(t).map(n=>[n,t.get(n)]):We(t)?Array.from(t.entries()):Xt(t)?t.map((t,n)=>[n,t]):void n(7)},t.extendObservable=Ot,t.flow=Ve,t.flowBound=xe,t.flowResult=function(t){return t},t.get=function(t,e){if(Et(t,e))return nn(t)?t[On].Pt(e):Le(t)?t.get(e):Xt(t)?t[e]:void n(11)},t.getAtom=en,t.getDebugName=sn,t.getDependencyTree=function(t,n){return _t(en(t,n))},t.getObserverTree=function(t,n){return St(en(t,n))},t.has=Et,t.intercept=function(t,n,e){return i(e)?function(t,n,e){return Lt(rn(t,n),e)}(t,n,e):function(t,n){return Lt(rn(t),n)}(t,n)},t.isAction=mt,t.isBoxedObservable=Yn,t.isComputed=function(t){return xt(t)},t.isComputedProp=function(t,n){return xt(t,n)},t.isFlow=Vt,t.isFlowCancellationError=function(t){return t instanceof _e},t.isObservable=Nt,t.isObservableArray=Xt,t.isObservableMap=Le,t.isObservableObject=nn,t.isObservableProp=function(t,n){return Mt(t,n)},t.isObservableSet=We,t.keys=Rt,t.makeAutoObservable=function(t,n,e){return o(t)?Ot(t,t,n,e):(on(()=>{const i=Zt(t,e)[On];if(!t[Ne]){const n=Object.getPrototypeOf(t),e=new Set([...gn(t),...gn(n)]);e.delete("constructor"),e.delete(On),c(n,Ne,e)}t[Ne].forEach(t=>qt(i,t,!n||!(t in n)||n[t]))}),t)},t.makeObservable=function(t,n,e){return on(()=>{const i=Zt(t,e)[On];gn(n).forEach(t=>qt(i,t,n[t]))}),t},t.observable=Ln,t.observableDeep=Dn,t.observableRef=Pn,t.observableShallow=Bn,t.observableStruct=Kn,t.observe=function(t,n,e,r){return i(e)?function(t,n,e,i){return Ct(rn(t,n),e,i)}(t,n,e,r):function(t,n,e){const i=rn(t);if(Xt(t))e&&n({observableKind:"array",object:i.v,debugObjectName:i.ct.tt,type:"splice",index:0,added:i.j.slice(),addedCount:i.j.length,removed:[],removedCount:0});else if(Le(t));else if(We(t));else if(!nn(t))return Ct(i,n,e);return Wt(i,n)}(t,n,e)},t.onBecomeObserved=function(t,n,e){return jt("onBO",t,n,e)},t.onBecomeUnobserved=function(t,n,e){return jt("onBUO",t,n,e)},t.onReactionError=function(t){return oe.globalReactionErrorHandlers.push(t),()=>{const n=oe.globalReactionErrorHandlers.indexOf(t);n>=0&&oe.globalReactionErrorHandlers.splice(n,1)}},t.override=Vn,t.ownKeys=kt,t.reaction=function(t,n,e=pn){function i(){if(b=!1,y.isDisposed)return;let n=!1;const i=f;y.track(()=>{const e=X(!1,()=>t(y));n=d||!v(f,e),f=e}),(d&&e.fireImmediately||!d&&n)&&u(f,i,y),d=!1}var r,s;const o=null!=(r=e.name)?r:"Reaction",u=pe(o,e.onError?(c=e.onError,h=n,function(){try{return h.apply(this,arguments)}catch(t){c.call(this,t)}}):n);var c,h;const l=!e.scheduler&&!e.delay,a=gt(e);let f,d=!0,b=!1;const v=e.equals||An,y=new ue(o,()=>{d||l?i():b||(b=!0,a(i))},e.onError,e.requiresObservable);return null!=e&&null!=(s=e.signal)&&s.aborted||y.Y(),y.Z(null==e?void 0:e.signal)},t.remove=function(t,e){nn(t)?t[On].Dt(e):Le(t)||We(t)?t.delete(e):Xt(t)?("number"!=typeof e&&(e=parseInt(e,10)),t.splice(e,1)):n(9)},t.runInAction=pt,t.set=function t(e,i,r){if(2===arguments.length&&!We(e)){ct();const n=i;try{for(let i in n)t(e,i,n[i])}finally{ht()}return}nn(e)?e[On].Bt(i,r):Le(e)?e.set(i,r):We(e)?e.add(i):Xt(e)?("number"!=typeof i&&(i=parseInt(i,10)),i<0&&n(42,i),ct(),i>=e.length&&(e.length=i+1),e[i]=r,ht()):n(8)},t.spy=function(){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}},t.toJS=function(t){return Tt(t,new Map)},t.transaction=Pt,t.untracked=nt,t.values=function(t){return nn(t)?Rt(t).map(n=>t[n]):Le(t)?Rt(t).map(n=>t.get(n)):We(t)?Array.from(t.values()):Xt(t)?t.slice():void n(6)},t.when=function(t,n,e){return 1===arguments.length||n&&"object"==typeof n?function(t,n){var e;if(null!=n&&null!=(e=n.signal)&&e.aborted)return fn(Promise.reject(new Error("WHEN_ABORTED")),{cancel:()=>null});let i,r;const s=new Promise((e,s)=>{var o;let u=Bt(t,e,fn({},n,{onError:s}));i=()=>{u(),s(new Error("WHEN_CANCELLED"))},r=()=>{u(),s(new Error("WHEN_ABORTED"))},null==n||null==(o=n.signal)||null==o.addEventListener||o.addEventListener("abort",r)}).finally(()=>{var t;return null==n||null==(t=n.signal)||null==t.removeEventListener?void 0:t.removeEventListener("abort",r)});return s.cancel=i,s}(t,n):Bt(t,n,e||{})},Object.defineProperty(t,"__esModule",{value:!0})},"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).mobx={});
2
2
  //# sourceMappingURL=mobx.umd.production.min.js.map