js-web-screen-shot
Version:
web端自定义截屏插件(原生JS版)
1 lines • 409 kB
JavaScript
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var A=function(){return A=Object.assign||function(A){for(var e,t=1,n=arguments.length;t<n;t++)for(var r in e=arguments[t])Object.prototype.hasOwnProperty.call(e,r)&&(A[r]=e[r]);return A},A.apply(this,arguments)};function e(A,e,t,n){return new(t||(t=Promise))(function(r,o){function i(A){try{a(n.next(A))}catch(A){o(A)}}function s(A){try{a(n.throw(A))}catch(A){o(A)}}function a(A){var e;A.done?r(A.value):(e=A.value,e instanceof t?e:new t(function(A){A(e)})).then(i,s)}a((n=n.apply(A,e||[])).next())})}function t(A,e){var t,n,r,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=s(0),i.throw=s(1),i.return=s(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(a){return function(s){if(t)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(o=0)),o;)try{if(t=1,n&&(r=2&s[0]?n.return:s[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,s[1])).done)return r;switch(n=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,n=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(r=o.trys,(r=r.length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){o.label=s[1];break}if(6===s[0]&&o.label<r[1]){o.label=r[1],r=s;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(s);break}r[2]&&o.ops.pop(),o.trys.pop();continue}s=e.call(A,o)}catch(A){s=[6,A],n=0}finally{t=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}}function n(A,e,t){if(t||2===arguments.length)for(var n,r=0,o=e.length;r<o;r++)!n&&r in e||(n||(n=Array.prototype.slice.call(e,0,r)),n[r]=e[r]);return A.concat(n||Array.prototype.slice.call(e))}"function"==typeof SuppressedError&&SuppressedError;var r=function(){};function o(A,e,t){var n=l(e);t&&(n=c(e));for(var r=(A.path||A.composedPath&&A.composedPath())[1].children,o=0;o<r.length;o++){var i=r[o];if(Number(i.getAttribute("data-id"))>100&&e!==Number.MAX_VALUE){var s=i.getAttribute("data-icon");i.style.backgroundImage="url(".concat(s,")")}i.className.includes("active")&&i.classList.remove(i.classList[2])}n&&(A.target.className+=" "+n)}function i(A,e){if(null!=A&&null!=e){var t=l(e);if(t)for(var r=new Set(n(n([],Object.values(s),!0),Object.values(a),!0)),o=A.children,i=function(A){var n=o[A];n.classList.forEach(function(A){r.has(A)&&n.classList.remove(A)});var i=Number(n.getAttribute("data-id"));Number.isNaN(i)||i!==e||n.classList.add(t)},c=0;c<o.length;c++)i(c)}}var s={1:"square-active",2:"round-active",3:"right-top-active",4:"brush-active",5:"mosaicPen-active",6:"text-active"},a={1:"brush-small-active",2:"brush-medium-active",3:"brush-big-active"},l=function(A){var e;return null!==(e=s[A])&&void 0!==e?e:""},c=function(A){var e;return null!==(e=a[A])&&void 0!==e?e:""};function u(A,e,t){var n=window.devicePixelRatio||1;A.width=Math.round(e*n),A.height=Math.round(t*n),A.style.width=e+"px",A.style.height=t+"px";var r=A.getContext("2d");return r&&r.scale(n,n),r}function B(A){for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];throw new Error("number"==typeof A?"[MobX] minified error nr: "+A+(t.length?" "+t.map(String).join(","):"")+". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts":"[MobX] "+A)}var h={};function g(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:h}var d=Object.assign,w=Object.getOwnPropertyDescriptor,f=Object.defineProperty,p=Object.prototype,C=[];Object.freeze(C);var Q={};Object.freeze(Q);var v="undefined"!=typeof Proxy,U=Object.toString();function m(){v||B("Proxy not available")}function F(A){var e=!1;return function(){if(!e)return e=!0,A.apply(this,arguments)}}var y=function(){};function E(A){return"function"==typeof A}function b(A){switch(typeof A){case"string":case"symbol":case"number":return!0}return!1}function I(A){return null!==A&&"object"==typeof A}function H(A){if(!I(A))return!1;var e=Object.getPrototypeOf(A);if(null==e)return!0;var t=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return"function"==typeof t&&t.toString()===U}function S(A){var e=null==A?void 0:A.constructor;return!!e&&("GeneratorFunction"===e.name||"GeneratorFunction"===e.displayName)}function x(A,e,t){f(A,e,{enumerable:!1,writable:!0,configurable:!0,value:t})}function K(A,e,t){f(A,e,{enumerable:!1,writable:!1,configurable:!0,value:t})}function D(A,e){var t="isMobX"+A;return e.prototype[t]=!0,function(A){return I(A)&&!0===A[t]}}function L(A){return null!=A&&"[object Map]"===Object.prototype.toString.call(A)}function O(A){return null!=A&&"[object Set]"===Object.prototype.toString.call(A)}var k=void 0!==Object.getOwnPropertySymbols;var M="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:k?function(A){return Object.getOwnPropertyNames(A).concat(Object.getOwnPropertySymbols(A))}:Object.getOwnPropertyNames;function P(A){return null===A?null:"object"==typeof A?""+A:A}function T(A,e){return p.hasOwnProperty.call(A,e)}var R=Object.getOwnPropertyDescriptors||function(A){var e={};return M(A).forEach(function(t){e[t]=w(A,t)}),e};function G(A,e){return!!(A&e)}function V(A,e,t){return t?A|=e:A&=~e,A}function N(A,e){(null==e||e>A.length)&&(e=A.length);for(var t=0,n=Array(e);t<e;t++)n[t]=A[t];return n}function X(A,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(A,Z(n.key),n)}}function _(A,e,t){return e&&X(A.prototype,e),t&&X(A,t),Object.defineProperty(A,"prototype",{writable:!1}),A}function Y(A,e){var t="undefined"!=typeof Symbol&&A[Symbol.iterator]||A["@@iterator"];if(t)return(t=t.call(A)).next.bind(t);if(Array.isArray(A)||(t=function(A,e){if(A){if("string"==typeof A)return N(A,e);var t={}.toString.call(A).slice(8,-1);return"Object"===t&&A.constructor&&(t=A.constructor.name),"Map"===t||"Set"===t?Array.from(A):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?N(A,e):void 0}}(A))||e&&A&&"number"==typeof A.length){t&&(A=t);var n=0;return function(){return n>=A.length?{done:!0}:{done:!1,value:A[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function J(){return J=Object.assign?Object.assign.bind():function(A){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)({}).hasOwnProperty.call(t,n)&&(A[n]=t[n])}return A},J.apply(null,arguments)}function W(A,e){A.prototype=Object.create(e.prototype),A.prototype.constructor=A,z(A,e)}function z(A,e){return z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(A,e){return A.__proto__=e,A},z(A,e)}function Z(A){var e=function(A,e){if("object"!=typeof A||!A)return A;var t=A[Symbol.toPrimitive];if(void 0!==t){var n=t.call(A,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(A)}(A,"string");return"symbol"==typeof e?e:e+""}var j=Symbol("mobx-stored-annotations");function q(A){return Object.assign(function(e,t){if(AA(t))return A.decorate_20223_(e,t);$(e,t,A)},A)}function $(A,e,t){T(A,j)||x(A,j,J({},A[j])),function(A){return A.annotationType_===aA}(t)||(A[j][e]=t)}function AA(A){return"object"==typeof A&&"string"==typeof A.kind}var eA=Symbol("mobx administration"),tA=function(){function A(A){void 0===A&&(A="Atom"),this.name_=void 0,this.flags_=0,this.observers_=new Set,this.lastAccessedBy_=0,this.lowestObserverState_=oe.NOT_TRACKING_,this.onBOL=void 0,this.onBUOL=void 0,this.name_=A}var e=A.prototype;return e.onBO=function(){this.onBOL&&this.onBOL.forEach(function(A){return A()})},e.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(A){return A()})},e.reportObserved=function(){return be(this)},e.reportChanged=function(){ye(),Ie(this),Ee()},e.toString=function(){return this.name_},_(A,[{key:"isBeingObserved",get:function(){return G(this.flags_,A.isBeingObservedMask_)},set:function(e){this.flags_=V(this.flags_,A.isBeingObservedMask_,e)}},{key:"isPendingUnobservation",get:function(){return G(this.flags_,A.isPendingUnobservationMask_)},set:function(e){this.flags_=V(this.flags_,A.isPendingUnobservationMask_,e)}},{key:"diffValue",get:function(){return G(this.flags_,A.diffValueMask_)?1:0},set:function(e){this.flags_=V(this.flags_,A.diffValueMask_,1===e)}}])}();tA.isBeingObservedMask_=1,tA.isPendingUnobservationMask_=2,tA.diffValueMask_=4;var nA=D("Atom",tA);function rA(A,e,t){void 0===e&&(e=y),void 0===t&&(t=y);var n,r=new tA(A);return e!==y&&qe(ze,r,e,n),t!==y&&je(r,t),r}var oA={identity:function(A,e){return A===e},structural:function(A,e){return hn(A,e)},default:function(A,e){return Object.is?Object.is(A,e):A===e?0!==A||1/A==1/e:A!=A&&e!=e},shallow:function(A,e){return hn(A,e,1)}};function iA(A,e,t){return st(A)?A:Array.isArray(A)?XA.array(A,{name:t}):H(A)?XA.object(A,void 0,{name:t}):L(A)?XA.map(A,{name:t}):O(A)?XA.set(A,{name:t}):"function"!=typeof A||_e(A)||it(A)?A:S(A)?rt(A):Xe(t,A)}function sA(A){return A}var aA="override";function lA(A,e){return{annotationType_:A,options_:e,make_:cA,extend_:uA,decorate_20223_:BA}}function cA(A,e,t,n){var r;if(null!=(r=this.options_)&&r.bound)return null===this.extend_(A,e,t,!1)?0:1;if(n===A.target_)return null===this.extend_(A,e,t,!1)?0:2;if(_e(t.value))return 1;var o=hA(A,this,e,t,!1);return f(n,e,o),2}function uA(A,e,t,n){var r=hA(A,this,e,t);return A.defineProperty_(e,r,n)}function BA(A,e){var t,n=e.kind,r=e.name,o=e.addInitializer,i=this,s=function(A){var e,t,n,o;return $A(null!=(e=null==(t=i.options_)?void 0:t.name)?e:r.toString(),A,null!=(n=null==(o=i.options_)?void 0:o.autoAction)&&n)};return"field"==n?function(A){var e,t=A;return _e(t)||(t=s(t)),null!=(e=i.options_)&&e.bound&&((t=t.bind(this)).isMobxAction=!0),t}:"method"==n?(_e(A)||(A=s(A)),null!=(t=this.options_)&&t.bound&&o(function(){var A=this,e=A[r].bind(A);e.isMobxAction=!0,A[r]=e}),A):void B("Cannot apply '"+i.annotationType_+"' to '"+String(r)+"' (kind: "+n+"):\n'"+i.annotationType_+"' can only be used on properties with a function value.")}function hA(A,e,t,n,r){var o,i,s,a,l,c,u,B;void 0===r&&(r=ve.safeDescriptors),B=n,e.annotationType_,B.value;var h,g=n.value;null!=(o=e.options_)&&o.bound&&(g=g.bind(null!=(h=A.proxy_)?h:A.target_));return{value:$A(null!=(i=null==(s=e.options_)?void 0:s.name)?i:t.toString(),g,null!=(a=null==(l=e.options_)?void 0:l.autoAction)&&a,null!=(c=e.options_)&&c.bound?null!=(u=A.proxy_)?u:A.target_:void 0),configurable:!r||A.isPlainObject_,enumerable:!1,writable:!r}}function gA(A,e){return{annotationType_:A,options_:e,make_:dA,extend_:wA,decorate_20223_:fA}}function dA(A,e,t,n){var r;if(n===A.target_)return null===this.extend_(A,e,t,!1)?0:2;if(null!=(r=this.options_)&&r.bound&&(!T(A.target_,e)||!it(A.target_[e]))&&null===this.extend_(A,e,t,!1))return 0;if(it(t.value))return 1;var o=pA(A,this,e,t,!1,!1);return f(n,e,o),2}function wA(A,e,t,n){var r,o=pA(A,this,e,t,null==(r=this.options_)?void 0:r.bound);return A.defineProperty_(e,o,n)}function fA(A,e){var t,n=e.name,r=e.addInitializer;return it(A)||(A=rt(A)),null!=(t=this.options_)&&t.bound&&r(function(){var A=this,e=A[n].bind(A);e.isMobXFlow=!0,A[n]=e}),A}function pA(A,e,t,n,r,o){var i;void 0===o&&(o=ve.safeDescriptors),i=n,e.annotationType_,i.value;var s,a=n.value;(it(a)||(a=rt(a)),r)&&((a=a.bind(null!=(s=A.proxy_)?s:A.target_)).isMobXFlow=!0);return{value:a,configurable:!o||A.isPlainObject_,enumerable:!1,writable:!o}}function CA(A,e){return{annotationType_:A,options_:e,make_:QA,extend_:vA,decorate_20223_:UA}}function QA(A,e,t){return null===this.extend_(A,e,t,!1)?0:1}function vA(A,e,t,n){var r;return r=t,this.annotationType_,r.get,A.defineComputedProperty_(e,J({},this.options_,{get:t.get,set:t.set}),n)}function UA(A,e){var t=this,n=e.name;return(0,e.addInitializer)(function(){var e=Xt(this)[eA],r=J({},t.options_,{get:A,context:this});r.name||(r.name="ObservableObject."+n.toString()),e.values_.set(n,new re(r))}),function(){return this[eA].getObservablePropValue_(n)}}function mA(A,e){return{annotationType_:A,options_:e,make_:FA,extend_:yA,decorate_20223_:EA}}function FA(A,e,t){return null===this.extend_(A,e,t,!1)?0:1}function yA(A,e,t,n){var r,o;return this.annotationType_,A.defineObservableProperty_(e,t.value,null!=(r=null==(o=this.options_)?void 0:o.enhancer)?r:iA,n)}function EA(A,e){var t=this,n=e.kind,r=e.name,o=new WeakSet;function i(A,e){var n,i,s=Xt(A)[eA],a=new ne(e,null!=(n=null==(i=t.options_)?void 0:i.enhancer)?n:iA,"ObservableObject."+r.toString(),!1);s.values_.set(r,a),o.add(A)}if("accessor"==n)return{get:function(){return o.has(this)||i(this,A.get.call(this)),this[eA].getObservablePropValue_(r)},set:function(A){return o.has(this)||i(this,A),this[eA].setObservablePropValue_(r,A)},init:function(A){return o.has(this)||i(this,A),A}}}var bA="true",IA=HA();function HA(A){return{annotationType_:bA,options_:A,make_:SA,extend_:xA,decorate_20223_:KA}}function SA(A,e,t,n){var r,o,i,s;if(t.get)return WA.make_(A,e,t,n);if(t.set){var a=_e(t.set)?t.set:$A(e.toString(),t.set);return n===A.target_?null===A.defineProperty_(e,{configurable:!ve.safeDescriptors||A.isPlainObject_,set:a})?0:2:(f(n,e,{configurable:!0,set:a}),2)}if(n!==A.target_&&"function"==typeof t.value)return S(t.value)?(null!=(s=this.options_)&&s.autoBind?rt.bound:rt).make_(A,e,t,n):(null!=(i=this.options_)&&i.autoBind?Xe.bound:Xe).make_(A,e,t,n);var l,c=!1===(null==(r=this.options_)?void 0:r.deep)?XA.ref:XA;"function"==typeof t.value&&null!=(o=this.options_)&&o.autoBind&&(t.value=t.value.bind(null!=(l=A.proxy_)?l:A.target_));return c.make_(A,e,t,n)}function xA(A,e,t,n){var r,o,i;if(t.get)return WA.extend_(A,e,t,n);if(t.set)return A.defineProperty_(e,{configurable:!ve.safeDescriptors||A.isPlainObject_,set:$A(e.toString(),t.set)},n);"function"==typeof t.value&&null!=(r=this.options_)&&r.autoBind&&(t.value=t.value.bind(null!=(i=A.proxy_)?i:A.target_));return(!1===(null==(o=this.options_)?void 0:o.deep)?XA.ref:XA).extend_(A,e,t,n)}function KA(A,e){B("'"+this.annotationType_+"' cannot be used as a decorator")}var DA={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function LA(A){return A||DA}Object.freeze(DA);var OA=mA("observable"),kA=mA("observable.ref",{enhancer:sA}),MA=mA("observable.shallow",{enhancer:function(A,e,t){return null==A||Jt(A)||St(A)||Ot(A)||Tt(A)?A:Array.isArray(A)?XA.array(A,{name:t,deep:!1}):H(A)?XA.object(A,void 0,{name:t,deep:!1}):L(A)?XA.map(A,{name:t,deep:!1}):O(A)?XA.set(A,{name:t,deep:!1}):void 0}}),PA=mA("observable.struct",{enhancer:function(A,e){return hn(A,e)?e:A}}),TA=q(OA);function RA(A){return!0===A.deep?iA:!1===A.deep?sA:(e=A.defaultDecorator)&&null!=(t=null==(n=e.options_)?void 0:n.enhancer)?t:iA;var e,t,n}function GA(A,e,t){return AA(e)?OA.decorate_20223_(A,e):b(e)?void $(A,e,OA):st(A)?A:H(A)?XA.object(A,e,t):Array.isArray(A)?XA.array(A,e):L(A)?XA.map(A,e):O(A)?XA.set(A,e):"object"==typeof A&&null!==A?A:XA.box(A,e)}d(GA,TA);var VA,NA,XA=d(GA,{box:function(A,e){var t=LA(e);return new ne(A,RA(t),t.name,!0,t.equals)},array:function(A,e){var t=LA(e);return(!1===ve.useProxies||!1===t.proxy?on:mt)(A,RA(t),t.name)},map:function(A,e){var t=LA(e);return new Lt(A,RA(t),t.name)},set:function(A,e){var t=LA(e);return new Pt(A,RA(t),t.name)},object:function(A,e,t){return cn(function(){return $e(!1===ve.useProxies||!1===(null==t?void 0:t.proxy)?Xt({},t):function(A,e){var t,n;return m(),A=Xt(A,e),null!=(n=(t=A[eA]).proxy_)?n:t.proxy_=new Proxy(A,ct)}({},t),A,e)})},ref:q(kA),shallow:q(MA),deep:TA,struct:q(PA)}),_A="computed",YA=CA(_A),JA=CA("computed.struct",{equals:oA.structural}),WA=function(A,e){if(AA(e))return YA.decorate_20223_(A,e);if(b(e))return $(A,e,YA);if(H(A))return q(CA(_A,A));var t=H(e)?e:{};return t.get=A,t.name||(t.name=A.name||""),new re(t)};Object.assign(WA,YA),WA.struct=q(JA);var zA=0,ZA=1,jA=null!=(VA=null==(NA=w(function(){},"name"))?void 0:NA.configurable)&&VA,qA={value:"action",configurable:!0,writable:!1,enumerable:!1};function $A(A,e,t,n){function r(){return Ae(A,t,e,n||this,arguments)}return void 0===t&&(t=!1),r.isMobxAction=!0,r.toString=function(){return e.toString()},jA&&(qA.value=A,f(r,"name",qA)),r}function Ae(A,e,t,n,r){var o=function(A,e){var t=!1,n=0,r=ve.trackingDerivation,o=!e||!r;ye();var i=ve.allowStateChanges;o&&(ge(),i=ee(!0));var s=we(!0),a={runAsAction_:o,prevDerivation_:r,prevAllowStateChanges_:i,prevAllowStateReads_:s,notifySpy_:t,startTime_:n,actionId_:ZA++,parentActionId_:zA};return zA=a.actionId_,a}(0,e);try{return t.apply(n,r)}catch(A){throw o.error_=A,A}finally{!function(A){zA!==A.actionId_&&B(30);zA=A.parentActionId_,void 0!==A.error_&&(ve.suppressReactionErrors=!0);te(A.prevAllowStateChanges_),fe(A.prevAllowStateReads_),Ee(),A.runAsAction_&&de(A.prevDerivation_);ve.suppressReactionErrors=!1}(o)}}function ee(A){var e=ve.allowStateChanges;return ve.allowStateChanges=A,e}function te(A){ve.allowStateChanges=A}var ne=function(A){function e(e,t,n,r,o){var i;return void 0===n&&(n="ObservableValue"),void 0===o&&(o=oA.default),(i=A.call(this,n)||this).enhancer=void 0,i.name_=void 0,i.equals=void 0,i.hasUnreportedChange_=!1,i.interceptors_=void 0,i.changeListeners_=void 0,i.value_=void 0,i.dehancer=void 0,i.enhancer=t,i.name_=n,i.equals=o,i.value_=t(e,void 0,n),i}W(e,A);var t=e.prototype;return t.dehanceValue=function(A){return void 0!==this.dehancer?this.dehancer(A):A},t.set=function(A){this.value_,(A=this.prepareNewValue_(A))!==ve.UNCHANGED&&this.setNewValue_(A)},t.prepareNewValue_=function(A){if(ut(this)){var e=ht(this,{object:this,type:Qt,newValue:A});if(!e)return ve.UNCHANGED;A=e.newValue}return A=this.enhancer(A,this.value_,this.name_),this.equals(this.value_,A)?ve.UNCHANGED:A},t.setNewValue_=function(A){var e=this.value_;this.value_=A,this.reportChanged(),gt(this)&&wt(this,{type:Qt,object:this,newValue:A,oldValue:e})},t.get=function(){return this.reportObserved(),this.dehanceValue(this.value_)},t.intercept_=function(A){return Bt(this,A)},t.observe_=function(A,e){return e&&A({observableKind:"value",debugObjectName:this.name_,object:this,type:Qt,newValue:this.value_,oldValue:void 0}),dt(this,A)},t.raw=function(){return this.value_},t.toJSON=function(){return this.get()},t.toString=function(){return this.name_+"["+this.value_+"]"},t.valueOf=function(){return P(this.get())},t[Symbol.toPrimitive]=function(){return this.valueOf()},e}(tA),re=function(){function A(A){this.dependenciesState_=oe.NOT_TRACKING_,this.observing_=[],this.newObserving_=null,this.observers_=new Set,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=oe.UP_TO_DATE_,this.unboundDepsCount_=0,this.value_=new ae(null),this.name_=void 0,this.triggeredBy_=void 0,this.flags_=0,this.derivation=void 0,this.setter_=void 0,this.isTracing_=ie.NONE,this.scope_=void 0,this.equals_=void 0,this.requiresReaction_=void 0,this.keepAlive_=void 0,this.onBOL=void 0,this.onBUOL=void 0,A.get||B(31),this.derivation=A.get,this.name_=A.name||"ComputedValue",A.set&&(this.setter_=$A("ComputedValue-setter",A.set)),this.equals_=A.equals||(A.compareStructural||A.struct?oA.structural:oA.default),this.scope_=A.context,this.requiresReaction_=A.requiresReaction,this.keepAlive_=!!A.keepAlive}var e=A.prototype;return e.onBecomeStale_=function(){!function(A){if(A.lowestObserverState_!==oe.UP_TO_DATE_)return;A.lowestObserverState_=oe.POSSIBLY_STALE_,A.observers_.forEach(function(A){A.dependenciesState_===oe.UP_TO_DATE_&&(A.dependenciesState_=oe.POSSIBLY_STALE_,A.onBecomeStale_())})}(this)},e.onBO=function(){this.onBOL&&this.onBOL.forEach(function(A){return A()})},e.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(A){return A()})},e.get=function(){if(this.isComputing&&B(32,this.name_,this.derivation),0!==ve.inBatch||0!==this.observers_.size||this.keepAlive_){if(be(this),ce(this)){var A=ve.trackingContext;this.keepAlive_&&!A&&(ve.trackingContext=this),this.trackAndCompute()&&function(A){if(A.lowestObserverState_===oe.STALE_)return;A.lowestObserverState_=oe.STALE_,A.observers_.forEach(function(e){e.dependenciesState_===oe.POSSIBLY_STALE_?e.dependenciesState_=oe.STALE_:e.dependenciesState_===oe.UP_TO_DATE_&&(A.lowestObserverState_=oe.UP_TO_DATE_)})}(this),ve.trackingContext=A}}else ce(this)&&(this.warnAboutUntrackedRead_(),ye(),this.value_=this.computeValue_(!1),Ee());var e=this.value_;if(le(e))throw e.cause;return e},e.set=function(A){if(this.setter_){this.isRunningSetter&&B(33,this.name_),this.isRunningSetter=!0;try{this.setter_.call(this.scope_,A)}finally{this.isRunningSetter=!1}}else B(34,this.name_)},e.trackAndCompute=function(){var A=this.value_,e=this.dependenciesState_===oe.NOT_TRACKING_,t=this.computeValue_(!0),n=e||le(A)||le(t)||!this.equals_(A,t);return n&&(this.value_=t),n},e.computeValue_=function(A){this.isComputing=!0;var e,t=ee(!1);if(A)e=ue(this,this.derivation,this.scope_);else if(!0===ve.disableErrorBoundaries)e=this.derivation.call(this.scope_);else try{e=this.derivation.call(this.scope_)}catch(A){e=new ae(A)}return te(t),this.isComputing=!1,e},e.suspend_=function(){this.keepAlive_||(Be(this),this.value_=void 0)},e.observe_=function(A,e){var t=this,n=!0,r=void 0;return function(A,e){var t,n,r,o;void 0===e&&(e=Q);var i,s=null!=(t=null==(n=e)?void 0:n.name)?t:"Autorun";if(e.scheduler||e.delay){var a=Je(e),l=!1;i=new He(s,function(){l||(l=!0,a(function(){l=!1,i.isDisposed||i.track(c)}))},e.onError,e.requiresObservable)}else i=new He(s,function(){this.track(c)},e.onError,e.requiresObservable);function c(){A(i)}null!=(r=e)&&null!=(r=r.signal)&&r.aborted||i.schedule_();return i.getDisposer_(null==(o=e)?void 0:o.signal)}(function(){var o=t.get();if(!n||e){var i=ge();A({observableKind:"computed",debugObjectName:t.name_,type:Qt,object:t,newValue:o,oldValue:r}),de(i)}n=!1,r=o})},e.warnAboutUntrackedRead_=function(){},e.toString=function(){return this.name_+"["+this.derivation.toString()+"]"},e.valueOf=function(){return P(this.get())},e[Symbol.toPrimitive]=function(){return this.valueOf()},_(A,[{key:"isComputing",get:function(){return G(this.flags_,A.isComputingMask_)},set:function(e){this.flags_=V(this.flags_,A.isComputingMask_,e)}},{key:"isRunningSetter",get:function(){return G(this.flags_,A.isRunningSetterMask_)},set:function(e){this.flags_=V(this.flags_,A.isRunningSetterMask_,e)}},{key:"isBeingObserved",get:function(){return G(this.flags_,A.isBeingObservedMask_)},set:function(e){this.flags_=V(this.flags_,A.isBeingObservedMask_,e)}},{key:"isPendingUnobservation",get:function(){return G(this.flags_,A.isPendingUnobservationMask_)},set:function(e){this.flags_=V(this.flags_,A.isPendingUnobservationMask_,e)}},{key:"diffValue",get:function(){return G(this.flags_,A.diffValueMask_)?1:0},set:function(e){this.flags_=V(this.flags_,A.diffValueMask_,1===e)}}])}();re.isComputingMask_=1,re.isRunningSetterMask_=2,re.isBeingObservedMask_=4,re.isPendingUnobservationMask_=8,re.diffValueMask_=16;var oe,ie,se=D("ComputedValue",re);!function(A){A[A.NOT_TRACKING_=-1]="NOT_TRACKING_",A[A.UP_TO_DATE_=0]="UP_TO_DATE_",A[A.POSSIBLY_STALE_=1]="POSSIBLY_STALE_",A[A.STALE_=2]="STALE_"}(oe||(oe={})),function(A){A[A.NONE=0]="NONE",A[A.LOG=1]="LOG",A[A.BREAK=2]="BREAK"}(ie||(ie={}));var ae=function(A){this.cause=void 0,this.cause=A};function le(A){return A instanceof ae}function ce(A){switch(A.dependenciesState_){case oe.UP_TO_DATE_:return!1;case oe.NOT_TRACKING_:case oe.STALE_:return!0;case oe.POSSIBLY_STALE_:for(var e=we(!0),t=ge(),n=A.observing_,r=n.length,o=0;o<r;o++){var i=n[o];if(se(i)){if(ve.disableErrorBoundaries)i.get();else try{i.get()}catch(A){return de(t),fe(e),!0}if(A.dependenciesState_===oe.STALE_)return de(t),fe(e),!0}}return pe(A),de(t),fe(e),!1}}function ue(A,e,t){var n=we(!0);pe(A),A.newObserving_=new Array(0===A.runId_?100:A.observing_.length),A.unboundDepsCount_=0,A.runId_=++ve.runId;var r,o=ve.trackingDerivation;if(ve.trackingDerivation=A,ve.inBatch++,!0===ve.disableErrorBoundaries)r=e.call(t);else try{r=e.call(t)}catch(A){r=new ae(A)}return ve.inBatch--,ve.trackingDerivation=o,function(A){for(var e=A.observing_,t=A.observing_=A.newObserving_,n=oe.UP_TO_DATE_,r=0,o=A.unboundDepsCount_,i=0;i<o;i++){var s=t[i];0===s.diffValue&&(s.diffValue=1,r!==i&&(t[r]=s),r++),s.dependenciesState_>n&&(n=s.dependenciesState_)}t.length=r,A.newObserving_=null,o=e.length;for(;o--;){var a=e[o];0===a.diffValue&&me(a,A),a.diffValue=0}for(;r--;){var l=t[r];1===l.diffValue&&(l.diffValue=0,Ue(l,A))}n!==oe.UP_TO_DATE_&&(A.dependenciesState_=n,A.onBecomeStale_())}(A),fe(n),r}function Be(A){var e=A.observing_;A.observing_=[];for(var t=e.length;t--;)me(e[t],A);A.dependenciesState_=oe.NOT_TRACKING_}function he(A){var e=ge();try{return A()}finally{de(e)}}function ge(){var A=ve.trackingDerivation;return ve.trackingDerivation=null,A}function de(A){ve.trackingDerivation=A}function we(A){var e=ve.allowStateReads;return ve.allowStateReads=A,e}function fe(A){ve.allowStateReads=A}function pe(A){if(A.dependenciesState_!==oe.UP_TO_DATE_){A.dependenciesState_=oe.UP_TO_DATE_;for(var e=A.observing_,t=e.length;t--;)e[t].lowestObserverState_=oe.UP_TO_DATE_}}var Ce=function(){this.version=6,this.UNCHANGED={},this.trackingDerivation=null,this.trackingContext=null,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!1,this.allowStateReads=!0,this.enforceActions=!0,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1,this.useProxies=!0,this.verifyProxies=!1,this.safeDescriptors=!0},Qe=!0,ve=function(){var A=g();return A.__mobxInstanceCount>0&&!A.__mobxGlobals&&(Qe=!1),A.__mobxGlobals&&A.__mobxGlobals.version!==(new Ce).version&&(Qe=!1),Qe?A.__mobxGlobals?(A.__mobxInstanceCount+=1,A.__mobxGlobals.UNCHANGED||(A.__mobxGlobals.UNCHANGED={}),A.__mobxGlobals):(A.__mobxInstanceCount=1,A.__mobxGlobals=new Ce):(setTimeout(function(){B(35)},1),new Ce)}();function Ue(A,e){A.observers_.add(e),A.lowestObserverState_>e.dependenciesState_&&(A.lowestObserverState_=e.dependenciesState_)}function me(A,e){A.observers_.delete(e),0===A.observers_.size&&Fe(A)}function Fe(A){!1===A.isPendingUnobservation&&(A.isPendingUnobservation=!0,ve.pendingUnobservations.push(A))}function ye(){ve.inBatch++}function Ee(){if(0===--ve.inBatch){Ke();for(var A=ve.pendingUnobservations,e=0;e<A.length;e++){var t=A[e];t.isPendingUnobservation=!1,0===t.observers_.size&&(t.isBeingObserved&&(t.isBeingObserved=!1,t.onBUO()),t instanceof re&&t.suspend_())}ve.pendingUnobservations=[]}}function be(A){var e=ve.trackingDerivation;return null!==e?(e.runId_!==A.lastAccessedBy_&&(A.lastAccessedBy_=e.runId_,e.newObserving_[e.unboundDepsCount_++]=A,!A.isBeingObserved&&ve.trackingContext&&(A.isBeingObserved=!0,A.onBO())),A.isBeingObserved):(0===A.observers_.size&&ve.inBatch>0&&Fe(A),!1)}function Ie(A){A.lowestObserverState_!==oe.STALE_&&(A.lowestObserverState_=oe.STALE_,A.observers_.forEach(function(A){A.dependenciesState_===oe.UP_TO_DATE_&&A.onBecomeStale_(),A.dependenciesState_=oe.STALE_}))}var He=function(){function A(A,e,t,n){void 0===A&&(A="Reaction"),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=oe.NOT_TRACKING_,this.runId_=0,this.unboundDepsCount_=0,this.flags_=0,this.isTracing_=ie.NONE,this.name_=A,this.onInvalidate_=e,this.errorHandler_=t,this.requiresObservable_=n}var e=A.prototype;return e.onBecomeStale_=function(){this.schedule_()},e.schedule_=function(){this.isScheduled||(this.isScheduled=!0,ve.pendingReactions.push(this),Ke())},e.runReaction_=function(){if(!this.isDisposed){ye(),this.isScheduled=!1;var A=ve.trackingContext;if(ve.trackingContext=this,ce(this)){this.isTrackPending=!0;try{this.onInvalidate_()}catch(A){this.reportExceptionInDerivation_(A)}}ve.trackingContext=A,Ee()}},e.track=function(A){if(!this.isDisposed){ye(),this.isRunning=!0;var e=ve.trackingContext;ve.trackingContext=this;var t=ue(this,A,void 0);ve.trackingContext=e,this.isRunning=!1,this.isTrackPending=!1,this.isDisposed&&Be(this),le(t)&&this.reportExceptionInDerivation_(t.cause),Ee()}},e.reportExceptionInDerivation_=function(A){var e=this;if(this.errorHandler_)this.errorHandler_(A,this);else{if(ve.disableErrorBoundaries)throw A;var t="[mobx] uncaught error in '"+this+"'";ve.suppressReactionErrors||console.error(t,A),ve.globalReactionErrorHandlers.forEach(function(t){return t(A,e)})}},e.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.isRunning||(ye(),Be(this),Ee()))},e.getDisposer_=function(A){var e=this,t=function t(){e.dispose(),null==A||null==A.removeEventListener||A.removeEventListener("abort",t)};return null==A||null==A.addEventListener||A.addEventListener("abort",t),t[eA]=this,"dispose"in Symbol&&"symbol"==typeof Symbol.dispose&&(t[Symbol.dispose]=t),t},e.toString=function(){return"Reaction["+this.name_+"]"},e.trace=function(A){},_(A,[{key:"isDisposed",get:function(){return G(this.flags_,A.isDisposedMask_)},set:function(e){this.flags_=V(this.flags_,A.isDisposedMask_,e)}},{key:"isScheduled",get:function(){return G(this.flags_,A.isScheduledMask_)},set:function(e){this.flags_=V(this.flags_,A.isScheduledMask_,e)}},{key:"isTrackPending",get:function(){return G(this.flags_,A.isTrackPendingMask_)},set:function(e){this.flags_=V(this.flags_,A.isTrackPendingMask_,e)}},{key:"isRunning",get:function(){return G(this.flags_,A.isRunningMask_)},set:function(e){this.flags_=V(this.flags_,A.isRunningMask_,e)}},{key:"diffValue",get:function(){return G(this.flags_,A.diffValueMask_)?1:0},set:function(e){this.flags_=V(this.flags_,A.diffValueMask_,1===e)}}])}();He.isDisposedMask_=1,He.isScheduledMask_=2,He.isTrackPendingMask_=4,He.isRunningMask_=8,He.diffValueMask_=16;var Se=100,xe=function(A){return A()};function Ke(){ve.inBatch>0||ve.isRunningReactions||xe(De)}function De(){ve.isRunningReactions=!0;for(var A=ve.pendingReactions,e=0;A.length>0;){++e===Se&&(console.error("[mobx] cycle in reaction: "+A[0]),A.splice(0));for(var t=A.splice(0),n=0,r=t.length;n<r;n++)t[n].runReaction_()}ve.isRunningReactions=!1}var Le=D("Reaction",He);var Oe="action",ke="autoAction",Me="<unnamed action>",Pe=lA(Oe),Te=lA("action.bound",{bound:!0}),Re=lA(ke,{autoAction:!0}),Ge=lA("autoAction.bound",{autoAction:!0,bound:!0});function Ve(A){return function(e,t){return E(e)?$A(e.name||Me,e,A):E(t)?$A(e,t,A):AA(t)?(A?Re:Pe).decorate_20223_(e,t):b(t)?$(e,t,A?Re:Pe):b(e)?q(lA(A?ke:Oe,{name:e,autoAction:A})):void 0}}var Ne=Ve(!1);Object.assign(Ne,Pe);var Xe=Ve(!0);function _e(A){return E(A)&&!0===A.isMobxAction}Object.assign(Xe,Re),Ne.bound=q(Te),Xe.bound=q(Ge);var Ye=function(A){return A()};function Je(A){return A.scheduler?A.scheduler:A.delay?function(e){return setTimeout(e,A.delay)}:Ye}function We(A,e,t){var n,r,o;void 0===t&&(t=Q);var i,s,a,l=null!=(n=t.name)?n:"Reaction",c=Ne(l,t.onError?(i=t.onError,s=e,function(){try{return s.apply(this,arguments)}catch(A){i.call(this,A)}}):e),u=!t.scheduler&&!t.delay,B=Je(t),h=!0,g=!1,d=t.compareStructural?oA.structural:t.equals||oA.default,w=new He(l,function(){h||u?f():g||(g=!0,B(f))},t.onError,t.requiresObservable);function f(){if(g=!1,!w.isDisposed){var e=!1,n=a;w.track(function(){var t=function(A,e){var t=ee(A);try{return e()}finally{te(t)}}(!1,function(){return A(w)});e=h||!d(a,t),a=t}),(h&&t.fireImmediately||!h&&e)&&c(a,n,w),h=!1}}return null!=(r=t)&&null!=(r=r.signal)&&r.aborted||w.schedule_(),w.getDisposer_(null==(o=t)?void 0:o.signal)}var ze="onBO",Ze="onBUO";function je(A,e,t){return qe(Ze,A,e,t)}function qe(A,e,t,n){var r="function"==typeof n?sn(e,t):sn(e),o=E(n)?n:t,i=A+"L";return r[i]?r[i].add(o):r[i]=new Set([o]),function(){var A=r[i];A&&(A.delete(o),0===A.size&&delete r[i])}}function $e(A,e,t,n){var r=R(e);return cn(function(){var e=Xt(A,n)[eA];M(r).forEach(function(A){e.extend_(A,r[A],!t||(!(A in t)||t[A]))})}),A}var At=0;function et(){this.message="FLOW_CANCELLED"}et.prototype=Object.create(Error.prototype);var tt=gA("flow"),nt=gA("flow.bound",{bound:!0}),rt=Object.assign(function(A,e){if(AA(e))return tt.decorate_20223_(A,e);if(b(e))return $(A,e,tt);var t=A,n=t.name||"<unnamed flow>",r=function(){var A,e=arguments,r=++At,o=Ne(n+" - runid: "+r+" - init",t).apply(this,e),i=void 0,s=new Promise(function(e,t){var s=0;function a(A){var e;i=void 0;try{e=Ne(n+" - runid: "+r+" - yield "+s++,o.next).call(o,A)}catch(A){return t(A)}c(e)}function l(A){var e;i=void 0;try{e=Ne(n+" - runid: "+r+" - yield "+s++,o.throw).call(o,A)}catch(A){return t(A)}c(e)}function c(A){if(!E(null==A?void 0:A.then))return A.done?e(A.value):(i=Promise.resolve(A.value)).then(a,l);A.then(c,t)}A=t,a(void 0)});return s.cancel=Ne(n+" - runid: "+r+" - cancel",function(){try{i&&ot(i);var e=o.return(void 0),t=Promise.resolve(e.value);t.then(y,y),ot(t),A(new et)}catch(e){A(e)}}),s};return r.isMobXFlow=!0,r},tt);function ot(A){E(A.cancel)&&A.cancel()}function it(A){return!0===(null==A?void 0:A.isMobXFlow)}function st(A){return function(A,e){return!!A&&(void 0!==e?!!Jt(A)&&A[eA].values_.has(e):Jt(A)||!!A[eA]||nA(A)||Le(A)||se(A))}(A)}function at(A,e){void 0===e&&(e=void 0),ye();try{return A.apply(e)}finally{Ee()}}function lt(A){return A[eA]}rt.bound=q(nt);var ct={has:function(A,e){return lt(A).has_(e)},get:function(A,e){return lt(A).get_(e)},set:function(A,e,t){var n;return!!b(e)&&(null==(n=lt(A).set_(e,t,!0))||n)},deleteProperty:function(A,e){var t;return!!b(e)&&(null==(t=lt(A).delete_(e,!0))||t)},defineProperty:function(A,e,t){var n;return null==(n=lt(A).defineProperty_(e,t))||n},ownKeys:function(A){return lt(A).ownKeys_()},preventExtensions:function(A){B(13)}};function ut(A){return void 0!==A.interceptors_&&A.interceptors_.length>0}function Bt(A,e){var t=A.interceptors_||(A.interceptors_=[]);return t.push(e),F(function(){var A=t.indexOf(e);-1!==A&&t.splice(A,1)})}function ht(A,e){var t=ge();try{for(var n=[].concat(A.interceptors_||[]),r=0,o=n.length;r<o&&((e=n[r](e))&&!e.type&&B(14),e);r++);return e}finally{de(t)}}function gt(A){return void 0!==A.changeListeners_&&A.changeListeners_.length>0}function dt(A,e){var t=A.changeListeners_||(A.changeListeners_=[]);return t.push(e),F(function(){var A=t.indexOf(e);-1!==A&&t.splice(A,1)})}function wt(A,e){var t=ge(),n=A.changeListeners_;if(n){for(var r=0,o=(n=n.slice()).length;r<o;r++)n[r](e);de(t)}}var ft=Symbol("mobx-keys");function pt(A,e,t){return H(A)?$e(A,A,e,t):(cn(function(){var n=Xt(A,t)[eA];if(!A[ft]){var r=Object.getPrototypeOf(A),o=new Set([].concat(M(A),M(r)));o.delete("constructor"),o.delete(eA),x(r,ft,o)}A[ft].forEach(function(A){return n.make_(A,!e||(!(A in e)||e[A]))})}),A)}var Ct="splice",Qt="update",vt={get:function(A,e){var t=A[eA];return e===eA?t:"length"===e?t.getArrayLength_():"string"!=typeof e||isNaN(e)?T(Ft,e)?Ft[e]:A[e]:t.get_(parseInt(e))},set:function(A,e,t){var n=A[eA];return"length"===e&&n.setArrayLength_(t),"symbol"==typeof e||isNaN(e)?A[e]=t:n.set_(parseInt(e),t),!0},preventExtensions:function(){B(15)}},Ut=function(){function A(A,e,t,n){void 0===A&&(A="ObservableArray"),this.owned_=void 0,this.legacyMode_=void 0,this.atom_=void 0,this.values_=[],this.interceptors_=void 0,this.changeListeners_=void 0,this.enhancer_=void 0,this.dehancer=void 0,this.proxy_=void 0,this.lastKnownLength_=0,this.owned_=t,this.legacyMode_=n,this.atom_=new tA(A),this.enhancer_=function(A,t){return e(A,t,"ObservableArray[..]")}}var e=A.prototype;return e.dehanceValue_=function(A){return void 0!==this.dehancer?this.dehancer(A):A},e.dehanceValues_=function(A){return void 0!==this.dehancer&&A.length>0?A.map(this.dehancer):A},e.intercept_=function(A){return Bt(this,A)},e.observe_=function(A,e){return void 0===e&&(e=!1),e&&A({observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:0,added:this.values_.slice(),addedCount:this.values_.length,removed:[],removedCount:0}),dt(this,A)},e.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},e.setArrayLength_=function(A){("number"!=typeof A||isNaN(A)||A<0)&&B("Out of range: "+A);var e=this.values_.length;if(A!==e)if(A>e){for(var t=new Array(A-e),n=0;n<A-e;n++)t[n]=void 0;this.spliceWithArray_(e,0,t)}else this.spliceWithArray_(A,e-A)},e.updateArrayLength_=function(A,e){A!==this.lastKnownLength_&&B(16),this.lastKnownLength_+=e,this.legacyMode_&&e>0&&rn(A+e+1)},e.spliceWithArray_=function(A,e,t){var n=this;this.atom_;var r=this.values_.length;if(void 0===A?A=0:A>r?A=r:A<0&&(A=Math.max(0,r+A)),e=1===arguments.length?r-A:null==e?0:Math.max(0,Math.min(e,r-A)),void 0===t&&(t=C),ut(this)){var o=ht(this,{object:this.proxy_,type:Ct,index:A,removedCount:e,added:t});if(!o)return C;e=o.removedCount,t=o.added}if(t=0===t.length?t:t.map(function(A){return n.enhancer_(A,void 0)}),this.legacyMode_){var i=t.length-e;this.updateArrayLength_(r,i)}var s=this.spliceItemsIntoValues_(A,e,t);return 0===e&&0===t.length||this.notifyArraySplice_(A,t,s),this.dehanceValues_(s)},e.spliceItemsIntoValues_=function(A,e,t){var n;if(t.length<1e4)return(n=this.values_).splice.apply(n,[A,e].concat(t));var r=this.values_.slice(A,A+e),o=this.values_.slice(A+e);this.values_.length+=t.length-e;for(var i=0;i<t.length;i++)this.values_[A+i]=t[i];for(var s=0;s<o.length;s++)this.values_[A+t.length+s]=o[s];return r},e.notifyArrayChildUpdate_=function(A,e,t){var n=!this.owned_&&!1,r=gt(this),o=r||n?{observableKind:"array",object:this.proxy_,type:Qt,debugObjectName:this.atom_.name_,index:A,newValue:e,oldValue:t}:null;this.atom_.reportChanged(),r&&wt(this,o)},e.notifyArraySplice_=function(A,e,t){var n=!this.owned_&&!1,r=gt(this),o=r||n?{observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:Ct,index:A,removed:t,added:e,removedCount:t.length,addedCount:e.length}:null;this.atom_.reportChanged(),r&&wt(this,o)},e.get_=function(A){if(!(this.legacyMode_&&A>=this.values_.length))return this.atom_.reportObserved(),this.dehanceValue_(this.values_[A]);console.warn("[mobx] Out of bounds read: "+A)},e.set_=function(A,e){var t=this.values_;if(this.legacyMode_&&A>t.length&&B(17,A,t.length),A<t.length){this.atom_;var n=t[A];if(ut(this)){var r=ht(this,{type:Qt,object:this.proxy_,index:A,newValue:e});if(!r)return;e=r.newValue}(e=this.enhancer_(e,n))!==n&&(t[A]=e,this.notifyArrayChildUpdate_(A,e,n))}else{for(var o=new Array(A+1-t.length),i=0;i<o.length-1;i++)o[i]=void 0;o[o.length-1]=e,this.spliceWithArray_(t.length,0,o)}},A}();function mt(A,e,t,n){return void 0===t&&(t="ObservableArray"),void 0===n&&(n=!1),m(),cn(function(){var r=new Ut(t,e,n,!1);K(r.values_,eA,r);var o=new Proxy(r.values_,vt);return r.proxy_=o,A&&A.length&&r.spliceWithArray_(0,0,A),o})}var Ft={clear:function(){return this.splice(0)},replace:function(A){var e=this[eA];return e.spliceWithArray_(0,e.values_.length,A)},toJSON:function(){return this.slice()},splice:function(A,e){for(var t=arguments.length,n=new Array(t>2?t-2:0),r=2;r<t;r++)n[r-2]=arguments[r];var o=this[eA];switch(arguments.length){case 0:return[];case 1:return o.spliceWithArray_(A);case 2:return o.spliceWithArray_(A,e)}return o.spliceWithArray_(A,e,n)},spliceWithArray:function(A,e,t){return this[eA].spliceWithArray_(A,e,t)},push:function(){for(var A=this[eA],e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return A.spliceWithArray_(A.values_.length,0,t),A.values_.length},pop:function(){return this.splice(Math.max(this[eA].values_.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var A=this[eA],e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return A.spliceWithArray_(0,0,t),A.values_.length},reverse:function(){return ve.trackingDerivation&&B(37,"reverse"),this.replace(this.slice().reverse()),this},sort:function(){ve.trackingDerivation&&B(37,"sort");var A=this.slice();return A.sort.apply(A,arguments),this.replace(A),this},remove:function(A){var e=this[eA],t=e.dehanceValues_(e.values_).indexOf(A);return t>-1&&(this.splice(t,1),!0)}};function yt(A,e){"function"==typeof Array.prototype[A]&&(Ft[A]=e(A))}function Et(A){return function(){var e=this[eA];e.atom_.reportObserved();var t=e.dehanceValues_(e.values_);return t[A].apply(t,arguments)}}function bt(A){return function(e,t){var n=this,r=this[eA];return r.atom_.reportObserved(),r.dehanceValues_(r.values_)[A](function(A,r){return e.call(t,A,r,n)})}}function It(A){return function(){var e=this,t=this[eA];t.atom_.reportObserved();var n=t.dehanceValues_(t.values_),r=arguments[0];return arguments[0]=function(A,t,n){return r(A,t,n,e)},n[A].apply(n,arguments)}}yt("at",Et),yt("concat",Et),yt("flat",Et),yt("includes",Et),yt("indexOf",Et),yt("join",Et),yt("lastIndexOf",Et),yt("slice",Et),yt("toString",Et),yt("toLocaleString",Et),yt("toSorted",Et),yt("toSpliced",Et),yt("with",Et),yt("every",bt),yt("filter",bt),yt("find",bt),yt("findIndex",bt),yt("findLast",bt),yt("findLastIndex",bt),yt("flatMap",bt),yt("forEach",bt),yt("map",bt),yt("some",bt),yt("toReversed",bt),yt("reduce",It),yt("reduceRight",It);var Ht=D("ObservableArrayAdministration",Ut);function St(A){return I(A)&&Ht(A[eA])}var xt={},Kt="add",Dt="delete",Lt=function(){function A(A,e,t){var n=this;void 0===e&&(e=iA),void 0===t&&(t="ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[eA]=xt,this.data_=void 0,this.hasMap_=void 0,this.keysAtom_=void 0,this.interceptors_=void 0,this.changeListeners_=void 0,this.dehancer=void 0,this.enhancer_=e,this.name_=t,E(Map)||B(18),cn(function(){n.keysAtom_=rA("ObservableMap.keys()"),n.data_=new Map,n.hasMap_=new Map,A&&n.merge(A)})}var e=A.prototype;return e.has_=function(A){return this.data_.has(A)},e.has=function(A){var e=this;if(!ve.trackingDerivation)return this.has_(A);var t=this.hasMap_.get(A);if(!t){var n=t=new ne(this.has_(A),sA,"ObservableMap.key?",!1);this.hasMap_.set(A,n),je(n,function(){return e.hasMap_.delete(A)})}return t.get()},e.set=function(A,e){var t=this.has_(A);if(ut(this)){var n=ht(this,{type:t?Qt:Kt,object:this,newValue:e,name:A});if(!n)return this;e=n.newValue}return t?this.updateValue_(A,e):this.addValue_(A,e),this},e.delete=function(A){var e=this;if((this.keysAtom_,ut(this))&&!ht(this,{type:Dt,object:this,name:A}))return!1;if(this.has_(A)){var t=gt(this),n=t?{observableKind:"map",debugObjectName:this.name_,type:Dt,object:this,oldValue:this.data_.get(A).value_,name:A}:null;return at(function(){var t;e.keysAtom_.reportChanged(),null==(t=e.hasMap_.get(A))||t.setNewValue_(!1),e.data_.get(A).setNewValue_(void 0),e.data_.delete(A)}),t&&wt(this,n),!0}return!1},e.updateValue_=function(A,e){var t=this.data_.get(A);if((e=t.prepareNewValue_(e))!==ve.UNCHANGED){var n=gt(this),r=n?{observableKind:"map",debugObjectName:this.name_,type:Qt,object:this,oldValue:t.value_,name:A,newValue:e}:null;t.setNewValue_(e),n&&wt(this,r)}},e.addValue_=function(A,e){var t=this;this.keysAtom_,at(function(){var n,r=new ne(e,t.enhancer_,"ObservableMap.key",!1);t.data_.set(A,r),e=r.value_,null==(n=t.hasMap_.get(A))||n.setNewValue_(!0),t.keysAtom_.reportChanged()});var n=gt(this),r=n?{observableKind:"map",debugObjectName:this.name_,type:Kt,object:this,name:A,newValue:e}:null;n&&wt(this,r)},e.get=function(A){return this.has(A)?this.dehanceValue_(this.data_.get(A).get()):this.dehanceValue_(void 0)},e.dehanceValue_=function(A){return void 0!==this.dehancer?this.dehancer(A):A},e.keys=function(){return this.keysAtom_.reportObserved(),this.data_.keys()},e.values=function(){var A=this,e=this.keys();return kt({next:function(){var t=e.next(),n=t.done,r=t.value;return{done:n,value:n?void 0:A.get(r)}}})},e.entries=function(){var A=this,e=this.keys();return kt({next:function(){var t=e.next(),n=t.done,r=t.value;return{done:n,value:n?void 0:[r,A.get(r)]}}})},e[Symbol.iterator]=function(){return this.entries()},e.forEach=function(A,e){for(var t,n=Y(this);!(t=n()).done;){var r=t.value,o=r[0],i=r[1];A.call(e,i,o,this)}},e.merge=function(A){var e=this;return Ot(A)&&(A=new Map(A)),at(function(){var t,n,r;H(A)?function(A){var e=Object.keys(A);if(!k)return e;var t=Object.getOwnPropertySymbols(A);return t.length?[].concat(e,t.filter(function(e){return p.propertyIsEnumerable.call(A,e)})):e}(A).forEach(function(t){return e.set(t,A[t])}):Array.isArray(A)?A.forEach(function(A){var t=A[0],n=A[1];return e.set(t,n)}):L(A)?(t=A,n=Object.getPrototypeOf(t),r=Object.getPrototypeOf(n),null!==Object.getPrototypeOf(r)&&B(19,A),A.forEach(function(A,t){return e.set(t,A)})):null!=A&&B(20,A)}),this},e.clear=function(){var A=this;at(function(){he(function(){for(var e,t=Y(A.keys());!(e=t()).done;){var n=e.value;A.delete(n)}})})},e.replace=function(A){var e=this;return at(function(){for(var t,n=function(A){if(L(A)||Ot(A))return A;if(Array.isArray(A))return new Map(A);if(H(A)){var e=new Map;for(var t in A)e.set(t,A[t]);return e}return B(21,A)}(A),r=new Map,o=!1,i=Y(e.data_.keys());!(t=i()).done;){var s=t.value;if(!n.has(s))if(e.delete(s))o=!0;else{var a=e.data_.get(s);r.set(s,a)}}for(var l,c=Y(n.entries());!(l=c()).done;){var u=l.value,h=u[0],g=u[1],d=e.data_.has(h);if(e.set(h,g),e.data_.has(h)){var w=e.data_.get(h);r.set(h,w),d||(o=!0)}}if(!o)if(e.data_.size!==r.size)e.keysAtom_.reportChanged();else for(var f=e.data_.keys(),p=r.keys(),C=f.next(),Q=p.next();!C.done;){if(C.value!==Q.value){e.keysAtom_.reportChanged();break}C=f.next(),Q=p.next()}e.data_=r}),this},e.toString=function(){return"[object ObservableMap]"},e.toJSON=function(){return Array.from(this)},e.observe_=function(A,e){return dt(this,A)},e.intercept_=function(A){return Bt(this,A)},_(A,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return"Map"}}])}(),Ot=D("ObservableMap",Lt);function kt(A){return A[Symbol.toStringTag]="MapIterator",fn(A)}var Mt={},Pt=function(){function A(A,e,t){var n=this;void 0===e&&(e=iA),void 0===t&&(t="ObservableSet"),this.name_=void 0,this[eA]=Mt,this.data_=new Set,this.atom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.dehancer=void 0,this.enhancer_=void 0,this.name_=t,E(Set)||B(22),this.enhancer_=function(A,n){return e(A,n,t)},cn(function(){n.atom_=rA(n.name_),A&&n.replace(A)})}var e=A.prototype;return e.dehanceValue_=function(A){return void 0!==this.dehancer?this.dehancer(A):A},e.clear=function(){var A=this;at(function(){he(function(){for(var e,t=Y(A.data_.values());!(e=t()).done;){var n=e.value;A.delete(n)}})})},e.forEach=function(A,e){for(var t,n=Y(this);!(t=n()).done;){var r=t.value;A.call(e,r,r,this)}},e.add=function(A){var e=this;if(this.atom_,ut(this)){var t=ht(this,{type:Kt,object:this,newValue:A});if(!t)return this;A=t.newValue}if(!this.has(A)){at(function(){e.data_.add(e.enhancer_(A,void 0)),e.atom_.reportChanged()});var n=gt(this),r=n?{observableKind:"set",debugObjectName:this.name_,type:Kt,object:this,newValue:A}:null;n&&wt(this,r)}return this},e.delete=function(A){var e=this;if(ut(this)&&!ht(this,{type:Dt,object:this,oldValue:A}))return!1;if(this.has(A)){var t=gt(this),n=t?{observableKind:"set",debugObjectName:this.name_,type:Dt,object:this,oldValue:A}:null;return at(function(){e.atom_.reportChanged(),e.data_.delete(A)}),t&&wt(this,n),!0}return!1},e.has=function(A){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(A))},e.entries=function(){var A=this.values();return Rt({next:function(){var e=A.next(),t=e.value,n=e.done;return n?{value:void 0,done:n}:{value:[t,t],done:n}}})},e.keys=function(){return this.values()},e.values=function(){this.atom_.reportObserved();var A=this,e=this.data_.values();return Rt({next:function(){var t=e.next(),n=t.value,r=t.done;return r?{value:void 0,done:r}:{value:A.dehanceValue_(n),done:r}}})},e.intersection=function(A){return O(A)&&!Tt(A)?A.intersection(this):new Set(this).intersection(A)},e.union=function(A){return O(A)&&!Tt(A)?A.union(this):new Set(this).union(A)},e.difference=function(A){return new Set(this).difference(A)},e.symmetricDifference=function(A){return O(A)&&!Tt(A)?A.symmetricDifference(this):new Set(this).symmetricDifference(A)},e.isSubsetOf=function(A){return new Set(this).isSubsetOf(A)},e.isSupersetOf=function(A){return new Set(this).isSupersetOf(A)},e.isDisjointFrom=function(A){return O(A)&&!Tt(A)?A.isDisjointFrom(this):new Set(this).isDisjointFrom(A)},e.replace=function(A){var e=this;return Tt(A)&&(A=new Set(A)),at(function(){Array.isArray(A)||O(A)?(e.clear(),A.forEach(function(A){return e.add(A)})):null!=A&&B("Cannot initialize set from "+A)}),this},e.observe_=function(A,e){return dt(this,A)},e.intercept_=function(A){return Bt(this,A)},e.toJSON=function(){return Array.from(this)},e.toString=function(){return"[object ObservableSet]"},e[Symbol.iterator]=function(){return this.values()},_(A,[{key:"size",get:function(){return this.atom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return"Set"}}])}(),Tt=D("ObservableSet",Pt);function Rt(A){return A[Symbol.toStringTag]="SetIterator",fn(A)}var Gt=Object.create(null),Vt="remove",Nt=function(){function A(A,e,t,n){void 0===e&&(e=new Map),void 0===n&&(n=IA),this.target_=void 0,this.values_=void 0,this.name_=void 0,this.defaultAnnotation_=void 0,this.keysAtom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.proxy_=void 0,this.isPlainObject_=void 0,this.appliedAnnotations_=void 0,this.pendingKeys_=void 0,this.target_=A,this.values_=e,this.name_=t,this.defaultAnnotation_=n,this.keysAtom_=new tA("ObservableObject.keys"),this.isPlainObject_=H(this.target_)}var e=A.prototype;return e.getObservablePropValue_=function(A){return this.values_.get(A).get()},e.setObservablePropValue_=function(A,e){var t=this.values_.get(A);if(t instanceof re)return t.set(e),!0;if(ut(this)){var n=ht(this,{type:Qt,object:this.proxy_||this.target_,name:A,newValue:e});if(!n)return null;e=n.newValue}if((e=t.pr