UNPKG

troy-flow-engine

Version:

<!-- * @Descripttion: * @version: * @Author: wangmin * @Date: 2025-04-27 15:03:16 * @LastEditors: wangmin * @LastEditTime: 2025-05-14 16:43:12 -->

1,216 lines (1,209 loc) 1.18 MB
var Q0 = Object.defineProperty; var eb = (t, e, n) => e in t ? Q0(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n; var sn = (t, e, n) => eb(t, typeof e != "symbol" ? e + "" : e, n); import * as ei from "vue"; import { ref as Gn, watch as Pd, onMounted as Ag, createElementBlock as Xs, openBlock as _o, createElementVNode as pa, toDisplayString as tb, createBlock as Sg, createCommentVNode as yc, resolveDynamicComponent as nb, resolveComponent as Ys, createVNode as ji, withCtx as po, unref as rb, Fragment as ib, normalizeStyle as ob, createSlots as ab, createTextVNode as Qf } from "vue"; import { ElMessage as eh } from "element-plus"; var Vl, Ge, Cg, Ri, th, Og, Ng, Tg, Dd, mc, _c, Da = {}, Mg = [], sb = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, Ka = Array.isArray; function Gr(t, e) { for (var n in e) t[n] = e[n]; return t; } function Rd(t) { t && t.parentNode && t.parentNode.removeChild(t); } function J(t, e, n) { var r, i, o, a = {}; for (o in e) o == "key" ? r = e[o] : o == "ref" ? i = e[o] : a[o] = e[o]; if (arguments.length > 2 && (a.children = arguments.length > 3 ? Vl.call(arguments, 2) : n), typeof t == "function" && t.defaultProps != null) for (o in t.defaultProps) a[o] == null && (a[o] = t.defaultProps[o]); return Is(t, a, r, i, null); } function Is(t, e, n, r, i) { var o = { type: t, props: e, key: n, ref: r, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: i ?? ++Cg, __i: -1, __u: 0 }; return i == null && Ge.vnode != null && Ge.vnode(o), o; } function Kl() { return { current: null }; } function wo(t) { return t.children; } function Ve(t, e) { this.props = t, this.context = e; } function Ao(t, e) { if (e == null) return t.__ ? Ao(t.__, t.__i + 1) : null; for (var n; e < t.__k.length; e++) if ((n = t.__k[e]) != null && n.__e != null) return n.__e; return typeof t.type == "function" ? Ao(t) : null; } function Pg(t) { var e, n; if ((t = t.__) != null && t.__c != null) { for (t.__e = t.__c.base = null, e = 0; e < t.__k.length; e++) if ((n = t.__k[e]) != null && n.__e != null) { t.__e = t.__c.base = n.__e; break; } return Pg(t); } } function nh(t) { (!t.__d && (t.__d = !0) && Ri.push(t) && !Vs.__r++ || th != Ge.debounceRendering) && ((th = Ge.debounceRendering) || Og)(Vs); } function Vs() { for (var t, e, n, r, i, o, a, s = 1; Ri.length; ) Ri.length > s && Ri.sort(Ng), t = Ri.shift(), s = Ri.length, t.__d && (n = void 0, i = (r = (e = t).__v).__e, o = [], a = [], e.__P && ((n = Gr({}, r)).__v = r.__v + 1, Ge.vnode && Ge.vnode(n), Ld(e.__P, n, r, e.__n, e.__P.namespaceURI, 32 & r.__u ? [i] : null, o, i ?? Ao(r), !!(32 & r.__u), a), n.__v = r.__v, n.__.__k[n.__i] = n, Lg(o, n, a), n.__e != i && Pg(n))); Vs.__r = 0; } function Dg(t, e, n, r, i, o, a, s, l, u, c) { var d, f, h, v, p, g, y = r && r.__k || Mg, m = e.length; for (l = lb(n, e, y, l, m), d = 0; d < m; d++) (h = n.__k[d]) != null && (f = h.__i == -1 ? Da : y[h.__i] || Da, h.__i = d, g = Ld(t, h, f, i, o, a, s, l, u, c), v = h.__e, h.ref && f.ref != h.ref && (f.ref && Id(f.ref, null, h), c.push(h.ref, h.__c || v, h)), p == null && v != null && (p = v), 4 & h.__u || f.__k === h.__k ? l = Rg(h, l, t) : typeof h.type == "function" && g !== void 0 ? l = g : v && (l = v.nextSibling), h.__u &= -7); return n.__e = p, l; } function lb(t, e, n, r, i) { var o, a, s, l, u, c = n.length, d = c, f = 0; for (t.__k = new Array(i), o = 0; o < i; o++) (a = e[o]) != null && typeof a != "boolean" && typeof a != "function" ? (l = o + f, (a = t.__k[o] = typeof a == "string" || typeof a == "number" || typeof a == "bigint" || a.constructor == String ? Is(null, a, null, null, null) : Ka(a) ? Is(wo, { children: a }, null, null, null) : a.constructor == null && a.__b > 0 ? Is(a.type, a.props, a.key, a.ref ? a.ref : null, a.__v) : a).__ = t, a.__b = t.__b + 1, s = null, (u = a.__i = ub(a, n, l, d)) != -1 && (d--, (s = n[u]) && (s.__u |= 2)), s == null || s.__v == null ? (u == -1 && (i > c ? f-- : i < c && f++), typeof a.type != "function" && (a.__u |= 4)) : u != l && (u == l - 1 ? f-- : u == l + 1 ? f++ : (u > l ? f-- : f++, a.__u |= 4))) : t.__k[o] = null; if (d) for (o = 0; o < c; o++) (s = n[o]) != null && (2 & s.__u) == 0 && (s.__e == r && (r = Ao(s)), kg(s, s)); return r; } function Rg(t, e, n) { var r, i; if (typeof t.type == "function") { for (r = t.__k, i = 0; r && i < r.length; i++) r[i] && (r[i].__ = t, e = Rg(r[i], e, n)); return e; } t.__e != e && (e && t.type && !n.contains(e) && (e = Ao(t)), n.insertBefore(t.__e, e || null), e = t.__e); do e = e && e.nextSibling; while (e != null && e.nodeType == 8); return e; } function Ks(t, e) { return e = e || [], t == null || typeof t == "boolean" || (Ka(t) ? t.some(function(n) { Ks(n, e); }) : e.push(t)), e; } function ub(t, e, n, r) { var i, o, a = t.key, s = t.type, l = e[n]; if (l === null && t.key == null || l && a == l.key && s == l.type && (2 & l.__u) == 0) return n; if (r > (l != null && (2 & l.__u) == 0 ? 1 : 0)) for (i = n - 1, o = n + 1; i >= 0 || o < e.length; ) { if (i >= 0) { if ((l = e[i]) && (2 & l.__u) == 0 && a == l.key && s == l.type) return i; i--; } if (o < e.length) { if ((l = e[o]) && (2 & l.__u) == 0 && a == l.key && s == l.type) return o; o++; } } return -1; } function rh(t, e, n) { e[0] == "-" ? t.setProperty(e, n ?? "") : t[e] = n == null ? "" : typeof n != "number" || sb.test(e) ? n : n + "px"; } function us(t, e, n, r, i) { var o; e: if (e == "style") if (typeof n == "string") t.style.cssText = n; else { if (typeof r == "string" && (t.style.cssText = r = ""), r) for (e in r) n && e in n || rh(t.style, e, ""); if (n) for (e in n) r && n[e] == r[e] || rh(t.style, e, n[e]); } else if (e[0] == "o" && e[1] == "n") o = e != (e = e.replace(Tg, "$1")), e = e.toLowerCase() in t || e == "onFocusOut" || e == "onFocusIn" ? e.toLowerCase().slice(2) : e.slice(2), t.l || (t.l = {}), t.l[e + o] = n, n ? r ? n.u = r.u : (n.u = Dd, t.addEventListener(e, o ? _c : mc, o)) : t.removeEventListener(e, o ? _c : mc, o); else { if (i == "http://www.w3.org/2000/svg") e = e.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s"); else if (e != "width" && e != "height" && e != "href" && e != "list" && e != "form" && e != "tabIndex" && e != "download" && e != "rowSpan" && e != "colSpan" && e != "role" && e != "popover" && e in t) try { t[e] = n ?? ""; break e; } catch { } typeof n == "function" || (n == null || n === !1 && e[4] != "-" ? t.removeAttribute(e) : t.setAttribute(e, e == "popover" && n == 1 ? "" : n)); } } function ih(t) { return function(e) { if (this.l) { var n = this.l[e.type + t]; if (e.t == null) e.t = Dd++; else if (e.t < n.u) return; return n(Ge.event ? Ge.event(e) : e); } }; } function Ld(t, e, n, r, i, o, a, s, l, u) { var c, d, f, h, v, p, g, y, m, A, C, M, O, w, T, j, q, te = e.type; if (e.constructor != null) return null; 128 & n.__u && (l = !!(32 & n.__u), o = [s = e.__e = n.__e]), (c = Ge.__b) && c(e); e: if (typeof te == "function") try { if (y = e.props, m = "prototype" in te && te.prototype.render, A = (c = te.contextType) && r[c.__c], C = c ? A ? A.props.value : c.__ : r, n.__c ? g = (d = e.__c = n.__c).__ = d.__E : (m ? e.__c = d = new te(y, C) : (e.__c = d = new Ve(y, C), d.constructor = te, d.render = db), A && A.sub(d), d.props = y, d.state || (d.state = {}), d.context = C, d.__n = r, f = d.__d = !0, d.__h = [], d._sb = []), m && d.__s == null && (d.__s = d.state), m && te.getDerivedStateFromProps != null && (d.__s == d.state && (d.__s = Gr({}, d.__s)), Gr(d.__s, te.getDerivedStateFromProps(y, d.__s))), h = d.props, v = d.state, d.__v = e, f) m && te.getDerivedStateFromProps == null && d.componentWillMount != null && d.componentWillMount(), m && d.componentDidMount != null && d.__h.push(d.componentDidMount); else { if (m && te.getDerivedStateFromProps == null && y !== h && d.componentWillReceiveProps != null && d.componentWillReceiveProps(y, C), !d.__e && d.shouldComponentUpdate != null && d.shouldComponentUpdate(y, d.__s, C) === !1 || e.__v == n.__v) { for (e.__v != n.__v && (d.props = y, d.state = d.__s, d.__d = !1), e.__e = n.__e, e.__k = n.__k, e.__k.some(function(oe) { oe && (oe.__ = e); }), M = 0; M < d._sb.length; M++) d.__h.push(d._sb[M]); d._sb = [], d.__h.length && a.push(d); break e; } d.componentWillUpdate != null && d.componentWillUpdate(y, d.__s, C), m && d.componentDidUpdate != null && d.__h.push(function() { d.componentDidUpdate(h, v, p); }); } if (d.context = C, d.props = y, d.__P = t, d.__e = !1, O = Ge.__r, w = 0, m) { for (d.state = d.__s, d.__d = !1, O && O(e), c = d.render(d.props, d.state, d.context), T = 0; T < d._sb.length; T++) d.__h.push(d._sb[T]); d._sb = []; } else do d.__d = !1, O && O(e), c = d.render(d.props, d.state, d.context), d.state = d.__s; while (d.__d && ++w < 25); d.state = d.__s, d.getChildContext != null && (r = Gr(Gr({}, r), d.getChildContext())), m && !f && d.getSnapshotBeforeUpdate != null && (p = d.getSnapshotBeforeUpdate(h, v)), j = c, c != null && c.type === wo && c.key == null && (j = Ig(c.props.children)), s = Dg(t, Ka(j) ? j : [j], e, n, r, i, o, a, s, l, u), d.base = e.__e, e.__u &= -161, d.__h.length && a.push(d), g && (d.__E = d.__ = null); } catch (oe) { if (e.__v = null, l || o != null) if (oe.then) { for (e.__u |= l ? 160 : 128; s && s.nodeType == 8 && s.nextSibling; ) s = s.nextSibling; o[o.indexOf(s)] = null, e.__e = s; } else for (q = o.length; q--; ) Rd(o[q]); else e.__e = n.__e, e.__k = n.__k; Ge.__e(oe, e, n); } else o == null && e.__v == n.__v ? (e.__k = n.__k, e.__e = n.__e) : s = e.__e = cb(n.__e, e, n, r, i, o, a, l, u); return (c = Ge.diffed) && c(e), 128 & e.__u ? void 0 : s; } function Lg(t, e, n) { for (var r = 0; r < n.length; r++) Id(n[r], n[++r], n[++r]); Ge.__c && Ge.__c(e, t), t.some(function(i) { try { t = i.__h, i.__h = [], t.some(function(o) { o.call(i); }); } catch (o) { Ge.__e(o, i.__v); } }); } function Ig(t) { return typeof t != "object" || t == null || t.__b && t.__b > 0 ? t : Ka(t) ? t.map(Ig) : Gr({}, t); } function cb(t, e, n, r, i, o, a, s, l) { var u, c, d, f, h, v, p, g = n.props, y = e.props, m = e.type; if (m == "svg" ? i = "http://www.w3.org/2000/svg" : m == "math" ? i = "http://www.w3.org/1998/Math/MathML" : i || (i = "http://www.w3.org/1999/xhtml"), o != null) { for (u = 0; u < o.length; u++) if ((h = o[u]) && "setAttribute" in h == !!m && (m ? h.localName == m : h.nodeType == 3)) { t = h, o[u] = null; break; } } if (t == null) { if (m == null) return document.createTextNode(y); t = document.createElementNS(i, m, y.is && y), s && (Ge.__m && Ge.__m(e, o), s = !1), o = null; } if (m == null) g === y || s && t.data == y || (t.data = y); else { if (o = o && Vl.call(t.childNodes), g = n.props || Da, !s && o != null) for (g = {}, u = 0; u < t.attributes.length; u++) g[(h = t.attributes[u]).name] = h.value; for (u in g) if (h = g[u], u != "children") { if (u == "dangerouslySetInnerHTML") d = h; else if (!(u in y)) { if (u == "value" && "defaultValue" in y || u == "checked" && "defaultChecked" in y) continue; us(t, u, null, h, i); } } for (u in y) h = y[u], u == "children" ? f = h : u == "dangerouslySetInnerHTML" ? c = h : u == "value" ? v = h : u == "checked" ? p = h : s && typeof h != "function" || g[u] === h || us(t, u, h, g[u], i); if (c) s || d && (c.__html == d.__html || c.__html == t.innerHTML) || (t.innerHTML = c.__html), e.__k = []; else if (d && (t.innerHTML = ""), Dg(e.type == "template" ? t.content : t, Ka(f) ? f : [f], e, n, r, m == "foreignObject" ? "http://www.w3.org/1999/xhtml" : i, o, a, o ? o[0] : n.__k && Ao(n, 0), s, l), o != null) for (u = o.length; u--; ) Rd(o[u]); s || (u = "value", m == "progress" && v == null ? t.removeAttribute("value") : v != null && (v !== t[u] || m == "progress" && !v || m == "option" && v != g[u]) && us(t, u, v, g[u], i), u = "checked", p != null && p != t[u] && us(t, u, p, g[u], i)); } return t; } function Id(t, e, n) { try { if (typeof t == "function") { var r = typeof t.__u == "function"; r && t.__u(), r && e == null || (t.__u = t(e)); } else t.current = e; } catch (i) { Ge.__e(i, n); } } function kg(t, e, n) { var r, i; if (Ge.unmount && Ge.unmount(t), (r = t.ref) && (r.current && r.current != t.__e || Id(r, null, e)), (r = t.__c) != null) { if (r.componentWillUnmount) try { r.componentWillUnmount(); } catch (o) { Ge.__e(o, e); } r.base = r.__P = null; } if (r = t.__k) for (i = 0; i < r.length; i++) r[i] && kg(r[i], e, n || typeof t.type != "function"); n || Rd(t.__e), t.__c = t.__ = t.__e = void 0; } function db(t, e, n) { return this.constructor(t, n); } function fb(t, e, n) { var r, i, o, a; e == document && (e = document.documentElement), Ge.__ && Ge.__(t, e), i = (r = !1) ? null : e.__k, o = [], a = [], Ld(e, t = e.__k = J(wo, null, [t]), i || Da, Da, e.namespaceURI, i ? null : e.firstChild ? Vl.call(e.childNodes) : null, o, i ? i.__e : e.firstChild, r, a), Lg(o, t, a); } Vl = Mg.slice, Ge = { __e: function(t, e, n, r) { for (var i, o, a; e = e.__; ) if ((i = e.__c) && !i.__) try { if ((o = i.constructor) && o.getDerivedStateFromError != null && (i.setState(o.getDerivedStateFromError(t)), a = i.__d), i.componentDidCatch != null && (i.componentDidCatch(t, r || {}), a = i.__d), a) return i.__E = i; } catch (s) { t = s; } throw t; } }, Cg = 0, Ve.prototype.setState = function(t, e) { var n; n = this.__s != null && this.__s != this.state ? this.__s : this.__s = Gr({}, this.state), typeof t == "function" && (t = t(Gr({}, n), this.props)), t && Gr(n, t), t != null && this.__v && (e && this._sb.push(e), nh(this)); }, Ve.prototype.forceUpdate = function(t) { this.__v && (this.__e = !0, t && this.__h.push(t), nh(this)); }, Ve.prototype.render = wo, Ri = [], Og = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, Ng = function(t, e) { return t.__v.__b - e.__v.__b; }, Vs.__r = 0, Tg = /(PointerCapture)$|Capture$/i, Dd = 0, mc = ih(!1), _c = ih(!0); var hb = "An invariant failed, however the error is obfuscated because this is a production build.", qs = []; Object.freeze(qs); var kd = {}; Object.freeze(kd); function _n() { return ++se.mobxGuid; } function Le(t) { throw St(!1, t), "X"; } function St(t, e) { if (!t) throw new Error("[mobx] " + (e || hb)); } var oh = []; function pb(t, e) { return process.env.NODE_ENV === "production" || oh.indexOf(t) !== -1 ? !1 : (oh.push(t), console.error("[mobx] Deprecated: " + t), !0); } function Bd(t) { var e = !1; return function() { if (!e) return e = !0, t.apply(this, arguments); }; } var cs = function() { }; function vb(t) { var e = []; return t.forEach(function(n) { e.indexOf(n) === -1 && e.push(n); }), e; } function jd(t) { return t !== null && typeof t == "object"; } function Ki(t) { if (t === null || typeof t != "object") return !1; var e = Object.getPrototypeOf(t); return e === Object.prototype || e === null; } function gb(t) { if (Io(t) || dn(t)) return t; if (Array.isArray(t)) return new Map(t); if (Ki(t)) { var e = /* @__PURE__ */ new Map(); for (var n in t) e.set(n, t[n]); return e; } else return Le("Cannot convert to map from '" + t + "'"); } function Lo(t, e, n) { Object.defineProperty(t, e, { enumerable: !1, writable: !0, configurable: !0, value: n }); } function yb(t, e, n) { Object.defineProperty(t, e, { enumerable: !1, writable: !1, configurable: !0, value: n }); } function Bg(t, e) { var n = Object.getOwnPropertyDescriptor(t, e); return !n || n.configurable !== !1 && n.writable !== !1; } function mb(t, e) { process.env.NODE_ENV !== "production" && !Bg(t, e) && Le("Cannot make property '" + e.toString() + "' observable, it is not configurable and writable in the target object"); } function vi(t, e) { var n = "isMobX" + t; return e.prototype[n] = !0, function(r) { return jd(r) && r[n] === !0; }; } function Io(t) { return t instanceof Map; } function qa(t) { return t instanceof Set; } function Fd(t) { var e = /* @__PURE__ */ new Set(); for (var n in t) e.add(n); return Object.getOwnPropertySymbols(t).forEach(function(r) { Object.getOwnPropertyDescriptor(t, r).enumerable && e.add(r); }), Array.from(e); } function Un(t) { return t && t.toString ? t.toString() : new String(t).toString(); } function jg(t) { return t === null ? null : typeof t == "object" ? "" + t : t; } var _b = typeof Reflect < "u" && Reflect.ownKeys ? Reflect.ownKeys : Object.getOwnPropertySymbols ? function(t) { return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t)); } : ( /* istanbul ignore next */ Object.getOwnPropertyNames ), Pe = Symbol("mobx administration"), ko = ( /** @class */ function() { function t(e) { e === void 0 && (e = "Atom@" + _n()), this.name = e, this.isPendingUnobservation = !1, this.isBeingObserved = !1, this.observers = /* @__PURE__ */ new Set(), this.diffValue = 0, this.lastAccessedBy = 0, this.lowestObserverState = lt.NOT_TRACKING; } return t.prototype.onBecomeObserved = function() { this.onBecomeObservedListeners && this.onBecomeObservedListeners.forEach(function(e) { return e(); }); }, t.prototype.onBecomeUnobserved = function() { this.onBecomeUnobservedListeners && this.onBecomeUnobservedListeners.forEach(function(e) { return e(); }); }, t.prototype.reportObserved = function() { return Kg(this); }, t.prototype.reportChanged = function() { pr(), Ub(this), vr(); }, t.prototype.toString = function() { return this.name; }, t; }() ), Hd = vi("Atom", ko); function $d(t, e, n) { e === void 0 && (e = cs), n === void 0 && (n = cs); var r = new ko(t); return e !== cs && ox(r, e), n !== cs && ty(r, n), r; } function bb(t, e) { return fy(t, e); } function xb(t, e) { return Object.is(t, e); } var So = { structural: bb, default: xb }; /*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ var bc = function(t, e) { return bc = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, r) { n.__proto__ = r; } || function(n, r) { for (var i in r) r.hasOwnProperty(i) && (n[i] = r[i]); }, bc(t, e); }; function Eb(t, e) { bc(t, e); function n() { this.constructor = t; } t.prototype = e === null ? Object.create(e) : (n.prototype = e.prototype, new n()); } var Et = function() { return Et = Object.assign || function(e) { for (var n, r = 1, i = arguments.length; r < i; r++) { n = arguments[r]; for (var o in n) Object.prototype.hasOwnProperty.call(n, o) && (e[o] = n[o]); } return e; }, Et.apply(this, arguments); }; function ur(t) { var e = typeof Symbol == "function" && t[Symbol.iterator], n = 0; return e ? e.call(t) : { next: function() { return t && n >= t.length && (t = void 0), { value: t && t[n++], done: !t }; } }; } function vo(t, e) { var n = typeof Symbol == "function" && t[Symbol.iterator]; if (!n) return t; var r = n.call(t), i, o = [], a; try { for (; (e === void 0 || e-- > 0) && !(i = r.next()).done; ) o.push(i.value); } catch (s) { a = { error: s }; } finally { try { i && !i.done && (n = r.return) && n.call(r); } finally { if (a) throw a.error; } } return o; } function Gd() { for (var t = [], e = 0; e < arguments.length; e++) t = t.concat(vo(arguments[e])); return t; } var Zs = Symbol("mobx did run lazy initializers"), ca = Symbol("mobx pending decorators"), wb = {}, Ab = {}; function Sb(t, e) { var n = e ? wb : Ab; return n[t] || (n[t] = { configurable: !0, enumerable: e, get: function() { return Gi(this), this[t]; }, set: function(r) { Gi(this), this[t] = r; } }); } function Gi(t) { var e, n; if (t[Zs] !== !0) { var r = t[ca]; if (r) { Lo(t, Zs, !0); var i = Gd(Object.getOwnPropertySymbols(r), Object.keys(r)); try { for (var o = ur(i), a = o.next(); !a.done; a = o.next()) { var s = a.value, l = r[s]; l.propertyCreator(t, l.prop, l.descriptor, l.decoratorTarget, l.decoratorArguments); } } catch (u) { e = { error: u }; } finally { try { a && !a.done && (n = o.return) && n.call(o); } finally { if (e) throw e.error; } } } } } function Fg(t, e) { return function() { var r, i = function(a, s, l, u) { if (u === !0) return e(a, s, l, a, r), null; if (process.env.NODE_ENV !== "production" && !ah(arguments) && Le("This function is a decorator, but it wasn't invoked like a decorator"), !Object.prototype.hasOwnProperty.call(a, ca)) { var c = a[ca]; Lo(a, ca, Et({}, c)); } return a[ca][s] = { prop: s, propertyCreator: e, descriptor: l, decoratorTarget: a, decoratorArguments: r }, Sb(s, t); }; return ah(arguments) ? (r = qs, i.apply(null, arguments)) : (r = Array.prototype.slice.call(arguments), i); }; } function ah(t) { return (t.length === 2 || t.length === 3) && (typeof t[1] == "string" || typeof t[1] == "symbol") || t.length === 4 && t[3] === !0; } function Za(t, e, n) { return ui(t) ? t : Array.isArray(t) ? $.array(t, { name: n }) : Ki(t) ? $.object(t, void 0, { name: n }) : Io(t) ? $.map(t, { name: n }) : qa(t) ? $.set(t, { name: n }) : t; } function Cb(t, e, n) { return t == null || br(t) || Pr(t) || dn(t) || Zn(t) ? t : Array.isArray(t) ? $.array(t, { name: n, deep: !1 }) : Ki(t) ? $.object(t, void 0, { name: n, deep: !1 }) : Io(t) ? $.map(t, { name: n, deep: !1 }) : qa(t) ? $.set(t, { name: n, deep: !1 }) : Le(process.env.NODE_ENV !== "production" && "The shallow modifier / decorator can only used in combination with arrays, objects, maps and sets"); } function ql(t) { return t; } function Ob(t, e, n) { if (process.env.NODE_ENV !== "production" && ui(t)) throw "observable.struct should not be used with observable values"; return fy(t, e) ? e : t; } function Zl(t) { St(t); var e = Fg(!0, function(r, i, o, a, s) { process.env.NODE_ENV !== "production" && St(!o || !o.get, '@observable cannot be used on getter (property "' + Un(i) + '"), use @computed instead.'); var l = o ? o.initializer ? o.initializer.call(r) : o.value : void 0; Yd(r).addObservableProp(i, l, t); }), n = ( // Extra process checks, as this happens during module initialization typeof process < "u" && process.env && process.env.NODE_ENV !== "production" ? function() { return arguments.length < 2 ? Le("Incorrect decorator invocation. @observable decorator doesn't expect any arguments") : e.apply(null, arguments); } : e ); return n.enhancer = t, n; } var Hg = { deep: !0, name: void 0, defaultDecorator: void 0, proxy: !0 }; Object.freeze(Hg); function Nb(t) { /^(deep|name|equals|defaultDecorator|proxy)$/.test(t) || Le("invalid option for (extend)observable: " + t); } function fo(t) { if (t == null) return Hg; if (typeof t == "string") return { name: t, deep: !0, proxy: !0 }; if (process.env.NODE_ENV !== "production") { if (typeof t != "object") return Le("expected options object"); Object.keys(t).forEach(Nb); } return t; } var Wd = Zl(Za), Tb = Zl(Cb), $g = Zl(ql), Mb = Zl(Ob); function ds(t) { return t.defaultDecorator ? t.defaultDecorator.enhancer : t.deep === !1 ? ql : Za; } function Pb(t, e, n) { if (typeof arguments[1] == "string" || typeof arguments[1] == "symbol") return Wd.apply(null, arguments); if (ui(t)) return t; var r = Ki(t) ? $.object(t, e, n) : Array.isArray(t) ? $.array(t, e) : Io(t) ? $.map(t, e) : qa(t) ? $.set(t, e) : t; if (r !== t) return r; Le(process.env.NODE_ENV !== "production" && "The provided value could not be converted into an observable. If you want just create an observable reference to the object use 'observable.box(value)'"); } var sh = { box: function(t, e) { arguments.length > 2 && Qo("box"); var n = fo(e); return new $i(t, ds(n), n.name, !0, n.equals); }, array: function(t, e) { arguments.length > 2 && Qo("array"); var n = fo(e); return _x(t, ds(n), n.name); }, map: function(t, e) { arguments.length > 2 && Qo("map"); var n = fo(e); return new Xd(t, ds(n), n.name); }, set: function(t, e) { arguments.length > 2 && Qo("set"); var n = fo(e); return new cy(t, ds(n), n.name); }, object: function(t, e, n) { typeof arguments[1] == "string" && Qo("object"); var r = fo(n); if (r.proxy === !1) return Sc({}, t, e, r); var i = ry(r), o = Sc({}, void 0, void 0, r), a = gx(o); return iy(a, t, e, i), a; }, ref: $g, shallow: Tb, deep: Wd, struct: Mb }, $ = Pb; Object.keys(sh).forEach(function(t) { return $[t] = sh[t]; }); function Qo(t) { Le( // process.env.NODE_ENV !== "production" && "Expected one or two arguments to observable." + t + ". Did you accidentally try to use observable." + t + " as decorator?" ); } var Js = Fg(!1, function(t, e, n, r, i) { process.env.NODE_ENV !== "production" && St(n && n.get, "Trying to declare a computed value for unspecified getter '" + Un(e) + "'"); var o = n.get, a = n.set, s = i[0] || {}; Yd(t).addComputedProp(t, e, Et({ get: o, set: a, context: t }, s)); }), Db = Js({ equals: So.structural }), mt = function(e, n, r) { if (typeof n == "string" || e !== null && typeof e == "object" && arguments.length === 1) return Js.apply(null, arguments); process.env.NODE_ENV !== "production" && (St(typeof e == "function", "First argument to `computed` should be an expression."), St(arguments.length < 3, "Computed takes one or two arguments if used as function")); var i = typeof n == "object" ? n : {}; return i.get = e, i.set = typeof n == "function" ? n : i.set, i.name = i.name || e.name || "", new Oo(i); }; mt.struct = Db; var lt; (function(t) { t[t.NOT_TRACKING = -1] = "NOT_TRACKING", t[t.UP_TO_DATE = 0] = "UP_TO_DATE", t[t.POSSIBLY_STALE = 1] = "POSSIBLY_STALE", t[t.STALE = 2] = "STALE"; })(lt || (lt = {})); var hr; (function(t) { t[t.NONE = 0] = "NONE", t[t.LOG = 1] = "LOG", t[t.BREAK = 2] = "BREAK"; })(hr || (hr = {})); var Qs = ( /** @class */ /* @__PURE__ */ function() { function t(e) { this.cause = e; } return t; }() ); function da(t) { return t instanceof Qs; } function xc(t) { switch (t.dependenciesState) { case lt.UP_TO_DATE: return !1; case lt.NOT_TRACKING: case lt.STALE: return !0; case lt.POSSIBLY_STALE: { for (var e = Ud(!0), n = Bo(), r = t.observing, i = r.length, o = 0; o < i; o++) { var a = r[o]; if (No(a)) { if (se.disableErrorBoundaries) a.get(); else try { a.get(); } catch { return si(n), va(e), !0; } if (t.dependenciesState === lt.STALE) return si(n), va(e), !0; } } return Ug(t), si(n), va(e), !1; } } } function Co(t) { var e = t.observers.size > 0; se.computationDepth > 0 && e && Le(process.env.NODE_ENV !== "production" && "Computed values are not allowed to cause side effects by changing observables that are already being observed. Tried to modify: " + t.name), !se.allowStateChanges && (e || se.enforceActions === "strict") && Le(process.env.NODE_ENV !== "production" && (se.enforceActions ? "Since strict-mode is enabled, changing observed observable values outside actions is not allowed. Please wrap the code in an `action` if this change is intended. Tried to modify: " : "Side effects like changing state are not allowed at this point. Are you trying to modify state from, for example, the render function of a React component? Tried to modify: ") + t.name); } function Rb(t) { process.env.NODE_ENV !== "production" && !se.allowStateReads && se.observableRequiresReaction && console.warn("[mobx] Observable " + t.name + " being read outside a reactive context"); } function Gg(t, e, n) { var r = Ud(!0); Ug(t), t.newObserving = new Array(t.observing.length + 100), t.unboundDepsCount = 0, t.runId = ++se.runId; var i = se.trackingDerivation; se.trackingDerivation = t; var o; if (se.disableErrorBoundaries === !0) o = e.call(n); else try { o = e.call(n); } catch (a) { o = new Qs(a); } return se.trackingDerivation = i, Ib(t), Lb(t), va(r), o; } function Lb(t) { process.env.NODE_ENV !== "production" && t.observing.length === 0 && (se.reactionRequiresObservable || t.requiresObservable) && console.warn("[mobx] Derivation " + t.name + " is created/updated without reading any observable value"); } function Ib(t) { for (var e = t.observing, n = t.observing = t.newObserving, r = lt.UP_TO_DATE, i = 0, o = t.unboundDepsCount, a = 0; a < o; a++) { var s = n[a]; s.diffValue === 0 && (s.diffValue = 1, i !== a && (n[i] = s), i++), s.dependenciesState > r && (r = s.dependenciesState); } for (n.length = i, t.newObserving = null, o = e.length; o--; ) { var s = e[o]; s.diffValue === 0 && Yg(s, t), s.diffValue = 0; } for (; i--; ) { var s = n[i]; s.diffValue === 1 && (s.diffValue = 0, Wb(s, t)); } r !== lt.UP_TO_DATE && (t.dependenciesState = r, t.onBecomeStale()); } function Ec(t) { var e = t.observing; t.observing = []; for (var n = e.length; n--; ) Yg(e[n], t); t.dependenciesState = lt.NOT_TRACKING; } function Wg(t) { var e = Bo(); try { return t(); } finally { si(e); } } function Bo() { var t = se.trackingDerivation; return se.trackingDerivation = null, t; } function si(t) { se.trackingDerivation = t; } function Ud(t) { var e = se.allowStateReads; return se.allowStateReads = t, e; } function va(t) { se.allowStateReads = t; } function Ug(t) { if (t.dependenciesState !== lt.UP_TO_DATE) { t.dependenciesState = lt.UP_TO_DATE; for (var e = t.observing, n = e.length; n--; ) e[n].lowestObserverState = lt.UP_TO_DATE; } } var el = 0, kb = 1, lh = Object.getOwnPropertyDescriptor(function() { }, "name"), Bb = lh && lh.configurable; function Hi(t, e, n) { process.env.NODE_ENV !== "production" && (St(typeof e == "function", "`action` can only be invoked on functions"), (typeof t != "string" || !t) && Le("actions should have valid names, got: '" + t + "'")); var r = function() { return zg(t, e, n || this, arguments); }; return r.isMobxAction = !0, process.env.NODE_ENV !== "production" && Bb && Object.defineProperty(r, "name", { value: t }), r; } function zg(t, e, n, r) { var i = jb(t, n, r); try { return e.apply(n, r); } catch (o) { throw i.error = o, o; } finally { Fb(i); } } function jb(t, e, n) { var r = Kt() && !!t, i = 0; if (r && process.env.NODE_ENV !== "production") { i = Date.now(); var o = n && n.length || 0, a = new Array(o); if (o > 0) for (var s = 0; s < o; s++) a[s] = n[s]; Tn({ type: "action", name: t, object: e, arguments: a }); } var l = Bo(); pr(); var u = Jl(!0), c = Ud(!0), d = { prevDerivation: l, prevAllowStateChanges: u, prevAllowStateReads: c, notifySpy: r, startTime: i, actionId: kb++, parentActionId: el }; return el = d.actionId, d; } function Fb(t) { el !== t.actionId && Le("invalid action stack. did you forget to finish an action?"), el = t.parentActionId, t.error !== void 0 && (se.suppressReactionErrors = !0), Ql(t.prevAllowStateChanges), va(t.prevAllowStateReads), vr(), si(t.prevDerivation), t.notifySpy && process.env.NODE_ENV !== "production" && Mn({ time: Date.now() - t.startTime }), se.suppressReactionErrors = !1; } function Jl(t) { var e = se.allowStateChanges; return se.allowStateChanges = t, e; } function Ql(t) { se.allowStateChanges = t; } var $i = ( /** @class */ function(t) { Eb(e, t); function e(n, r, i, o, a) { i === void 0 && (i = "ObservableValue@" + _n()), o === void 0 && (o = !0), a === void 0 && (a = So.default); var s = t.call(this, i) || this; return s.enhancer = r, s.name = i, s.equals = a, s.hasUnreportedChange = !1, s.value = r(n, void 0, i), o && Kt() && process.env.NODE_ENV !== "production" && Wi({ type: "create", name: s.name, newValue: "" + s.value }), s; } return e.prototype.dehanceValue = function(n) { return this.dehancer !== void 0 ? this.dehancer(n) : n; }, e.prototype.set = function(n) { var r = this.value; if (n = this.prepareNewValue(n), n !== se.UNCHANGED) { var i = Kt(); i && process.env.NODE_ENV !== "production" && Tn({ type: "update", name: this.name, newValue: n, oldValue: r }), this.setNewValue(n), i && process.env.NODE_ENV !== "production" && Mn(); } }, e.prototype.prepareNewValue = function(n) { if (Co(this), Nr(this)) { var r = Tr(this, { object: this, type: "update", newValue: n }); if (!r) return se.UNCHANGED; n = r.newValue; } return n = this.enhancer(n, this.value, this.name), this.equals(this.value, n) ? se.UNCHANGED : n; }, e.prototype.setNewValue = function(n) { var r = this.value; this.value = n, this.reportChanged(), gr(this) && yr(this, { type: "update", object: this, newValue: n, oldValue: r }); }, e.prototype.get = function() { return this.reportObserved(), this.dehanceValue(this.value); }, e.prototype.intercept = function(n) { return Ja(this, n); }, e.prototype.observe = function(n, r) { return r && n({ object: this, type: "update", newValue: this.value, oldValue: void 0 }), Qa(this, n); }, e.prototype.toJSON = function() { return this.get(); }, e.prototype.toString = function() { return this.name + "[" + this.value + "]"; }, e.prototype.valueOf = function() { return jg(this.get()); }, e.prototype[Symbol.toPrimitive] = function() { return this.valueOf(); }, e; }(ko) ), Hb = vi("ObservableValue", $i), Oo = ( /** @class */ function() { function t(e) { this.dependenciesState = lt.NOT_TRACKING, this.observing = [], this.newObserving = null, this.isBeingObserved = !1, this.isPendingUnobservation = !1, this.observers = /* @__PURE__ */ new Set(), this.diffValue = 0, this.runId = 0, this.lastAccessedBy = 0, this.lowestObserverState = lt.UP_TO_DATE, this.unboundDepsCount = 0, this.__mapid = "#" + _n(), this.value = new Qs(null), this.isComputing = !1, this.isRunningSetter = !1, this.isTracing = hr.NONE, St(e.get, "missing option for computed: get"), this.derivation = e.get, this.name = e.name || "ComputedValue@" + _n(), e.set && (this.setter = Hi(this.name + "-setter", e.set)), this.equals = e.equals || (e.compareStructural || e.struct ? So.structural : So.default), this.scope = e.context, this.requiresReaction = !!e.requiresReaction, this.keepAlive = !!e.keepAlive; } return t.prototype.onBecomeStale = function() { Xb(this); }, t.prototype.onBecomeObserved = function() { this.onBecomeObservedListeners && this.onBecomeObservedListeners.forEach(function(e) { return e(); }); }, t.prototype.onBecomeUnobserved = function() { this.onBecomeUnobservedListeners && this.onBecomeUnobservedListeners.forEach(function(e) { return e(); }); }, t.prototype.get = function() { this.isComputing && Le("Cycle detected in computation " + this.name + ": " + this.derivation), se.inBatch === 0 && this.observers.size === 0 && !this.keepAlive ? xc(this) && (this.warnAboutUntrackedRead(), pr(), this.value = this.computeValue(!1), vr()) : (Kg(this), xc(this) && this.trackAndCompute() && zb(this)); var e = this.value; if (da(e)) throw e.cause; return e; }, t.prototype.peek = function() { var e = this.computeValue(!1); if (da(e)) throw e.cause; return e; }, t.prototype.set = function(e) { if (this.setter) { St(!this.isRunningSetter, "The setter of computed value '" + this.name + "' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"), this.isRunningSetter = !0; try { this.setter.call(this.scope, e); } finally { this.isRunningSetter = !1; } } else St(!1, process.env.NODE_ENV !== "production" && "[ComputedValue '" + this.name + "'] It is not possible to assign a new value to a computed value."); }, t.prototype.trackAndCompute = function() { Kt() && process.env.NODE_ENV !== "production" && Wi({ object: this.scope, type: "compute", name: this.name }); var e = this.value, n = ( /* see #1208 */ this.dependenciesState === lt.NOT_TRACKING ), r = this.computeValue(!0), i = n || da(e) || da(r) || !this.equals(e, r); return i && (this.value = r), i; }, t.prototype.computeValue = function(e) { this.isComputing = !0, se.computationDepth++; var n; if (e) n = Gg(this, this.derivation, this.scope); else if (se.disableErrorBoundaries === !0) n = this.derivation.call(this.scope); else try { n = this.derivation.call(this.scope); } catch (r) { n = new Qs(r); } return se.computationDepth--, this.isComputing = !1, n; }, t.prototype.suspend = function() { this.keepAlive || (Ec(this), this.value = void 0); }, t.prototype.observe = function(e, n) { var r = this, i = !0, o = void 0; return nx(function() { var a = r.get(); if (!i || n) { var s = Bo(); e({ type: "update", object: r, newValue: a, oldValue: o }), si(s); } i = !1, o = a; }); }, t.prototype.warnAboutUntrackedRead = function() { process.env.NODE_ENV !== "production" && (this.requiresReaction === !0 && Le("[mobx] Computed value " + this.name + " is read outside a reactive context"), this.isTracing !== hr.NONE && console.log("[mobx.trace] '" + this.name + "' is being read outside a reactive context. Doing a full recompute"), se.computedRequiresReaction && console.warn("[mobx] Computed value " + this.name + " is being read outside a reactive context. Doing a full recompute")); }, t.prototype.toJSON = function() { return this.get(); }, t.prototype.toString = function() { return this.name + "[" + this.derivation.toString() + "]"; }, t.prototype.valueOf = function() { return jg(this.get()); }, t.prototype[Symbol.toPrimitive] = function() { return this.valueOf(); }, t; }() ), No = vi("ComputedValue", Oo), ks = ( /** @class */ /* @__PURE__ */ function() { function t() { this.version = 5, this.UNCHANGED = {}, this.trackingDerivation = null, this.computationDepth = 0, this.runId = 0, this.mobxGuid = 0, this.inBatch = 0, this.pendingUnobservations = [], this.pendingReactions = [], this.isRunningReactions = !1, this.allowStateChanges = !0, this.allowStateReads = !0, this.enforceActions = !1, this.spyListeners = [], this.globalReactionErrorHandlers = [], this.computedRequiresReaction = !1, this.reactionRequiresObservable = !1, this.observableRequiresReaction = !1, this.computedConfigurable = !1, this.disableErrorBoundaries = !1, this.suppressReactionErrors = !1; } return t; }() ), $b = {}; function tl() { return typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : $b; } var Bs = !0, Xg = !1, se = function() { var t = tl(); return t.__mobxInstanceCount > 0 && !t.__mobxGlobals && (Bs = !1), t.__mobxGlobals && t.__mobxGlobals.version !== new ks().version && (Bs = !1), Bs ? t.__mobxGlobals ? (t.__mobxInstanceCount += 1, t.__mobxGlobals.UNCHANGED || (t.__mobxGlobals.UNCHANGED = {}), t.__mobxGlobals) : (t.__mobxInstanceCount = 1, t.__mobxGlobals = new ks()) : (setTimeout(function() { Xg || Le("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`"); }, 1), new ks()); }(); function Gb() { (se.pendingReactions.length || se.inBatch || se.isRunningReactions) && Le("isolateGlobalState should be called before MobX is running any reactions"), Xg = !0, Bs && (--tl().__mobxInstanceCount === 0 && (tl().__mobxGlobals = void 0), se = new ks()); } function wc() { return se; } function Wb(t, e) { t.observers.add(e), t.lowestObserverState > e.dependenciesState && (t.lowestObserverState = e.dependenciesState); } function Yg(t, e) { t.observers.delete(e), t.observers.size === 0 && Vg(t); } function Vg(t) { t.isPendingUnobservation === !1 && (t.isPendingUnobservation = !0, se.pendingUnobservations.push(t)); } function pr() { se.inBatch++; } function vr() { if (--se.inBatch === 0) { Jg(); for (var t = se.pendingUnobservations, e = 0; e < t.length; e++) { var n = t[e]; n.isPendingUnobservation = !1, n.observers.size === 0 && (n.isBeingObserved && (n.isBeingObserved = !1, n.onBecomeUnobserved()), n instanceof Oo && n.suspend()); } se.pendingUnobservations = []; } } function Kg(t) { Rb(t); var e = se.trackingDerivation; return e !== null ? (e.runId !== t.lastAccessedBy && (t.lastAccessedBy = e.runId, e.newObserving[e.unboundDepsCount++] = t, t.isBeingObserved || (t.isBeingObserved = !0, t.onBecomeObserved())), !0) : (t.observers.size === 0 && se.inBatch > 0 && Vg(t), !1); } function Ub(t) { t.lowestObserverState !== lt.STALE && (t.lowestObserverState = lt.STALE, t.observers.forEach(function(e) { e.dependenciesState === lt.UP_TO_DATE && (e.isTracing !== hr.NONE && qg(e, t), e.onBecomeStale()), e.dependenciesState = lt.STALE; })); } function zb(t) { t.lowestObserverState !== lt.STALE && (t.lowestObserverState = lt.STALE, t.observers.forEach(function(e) { e.dependenciesState === lt.POSSIBLY_STALE ? e.dependenciesState = lt.STALE : e.dependenciesState === lt.UP_TO_DATE && (t.lowestObserverState = lt.UP_TO_DATE); })); } function Xb(t) { t.lowestObserverState === lt.UP_TO_DATE && (t.lowestObserverState = lt.POSSIBLY_STALE, t.observers.forEach(function(e) { e.dependenciesState === lt.UP_TO_DATE && (e.dependenciesState = lt.POSSIBLY_STALE, e.isTracing !== hr.NONE && qg(e, t), e.onBecomeStale()); })); } function qg(t, e) { if (console.log("[mobx.trace] '" + t.name + "' is invalidated due to a change in: '" + e.name + "'"), t.isTracing === hr.BREAK) { var n = []; Zg(sx(t), n, 1), new Function(`debugger; /* Tracing '` + t.name + `' You are entering this break point because derivation '` + t.name + "' is being traced and '" + e.name + `' is now forcing it to update. Just follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update The stackframe you are looking for is at least ~6-8 stack-frames up. ` + (t instanceof Oo ? t.derivation.toString().replace(/[*]\//g, "/") : "") + ` The dependencies for this derivation are: ` + n.join(` `) + ` */ `)(); } } function Zg(t, e, n) { if (e.length >= 1e3) { e.push("(and many more)"); return; } e.push("" + new Array(n).join(" ") + t.name), t.dependencies && t.dependencies.forEach(function(r) { return Zg(r, e, n + 1); }); } var Ra = ( /** @class */ function() { function t(e, n, r, i) { e === void 0 && (e = "Reaction@" + _n()), i === void 0 && (i = !1), this.name = e, this.onInvalidate = n, this.errorHandler = r, this.requiresObservable = i, this.observing = [], this.newObserving = [], this.dependenciesState = lt.NOT_TRACKING, this.diffValue = 0, this.runId = 0, this.unboundDepsCount = 0, this.__mapid = "#" + _n(), this.isDisposed = !1, this._isScheduled = !1, this._isTrackPending = !1, this._isRunning = !1, this.isTracing = hr.NONE; } return t.prototype.onBecomeStale = function() { this.schedule(); }, t.prototype.schedule = function() { this._isScheduled || (this._isScheduled = !0, se.pendingReactions.push(this), Jg()); }, t.prototype.isScheduled = function() { return this._isScheduled; }, t.prototype.runReaction = function() { if (!this.isDisposed) { if (pr(), this._isScheduled = !1, xc(this)) { this._isTrackPending = !0; try { this.onInvalidate(), this._isTrackPending && Kt() && process.env.NODE_ENV !== "production" && Wi({ name: this.name, type: "scheduled-reaction" }); } catch (e) { this.reportExceptionInDerivation(e); } } vr(); } }, t.prototype.track = function(e) { if (!this.isDisposed) { pr(); var n = Kt(), r; n && process.env.NODE_ENV !== "production" && (r = Date.now(), Tn({ name: this.name, type: "reaction" })), this._isRunning = !0; var i = Gg(this, e, void 0); this._isRunning = !1, this._isTrackPending = !1, this.isDisposed && Ec(this), da(i) && this.reportExceptionInDerivation(i.cause), n && process.env.NODE_ENV !== "production" && Mn({ time: Date.now() - r }), vr(); } }, t.prototype.reportExceptionInDerivation = function(e) { var n = this; if (this.errorHandler) { this.errorHandler(e, this); return; } if (se.disableErrorBoundaries) throw e; var r = "[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '" + this + "'"; se.suppressReactionErrors ? console.warn("[mobx] (error in reaction '" + this.name + "' suppressed, fix error of causing action below)") : console.error(r, e), Kt() && Wi({ type: "error", name: this.name, message: r, error: "" + e }), se.globalReactionErrorHandlers.forEach(function(i) { return i(e, n); }); }, t.prototype.dispose = function() { this.isDisposed || (this.isDisposed = !0, this._isRunning || (pr(), Ec(this), vr())); }, t.prototype.getDisposer = function() { var e = this.dispose.bind(this); return e[Pe] = this, e; }, t.prototype.toString = function() { return "Reaction[" + this.name + "]"; }, t.prototype.trace = function(e) { e === void 0 && (e = !1), hx(this, e); }, t; }() ), uh = 100, Ac = function(t) { return t(); }; function Jg() { se.inBatch > 0 || se.isRunningReactions || Ac(Yb); } function Yb() { se.isRunningReactions = !0; for (var t = se.pendingReactions, e = 0; t.length > 0; ) { ++e === uh && (console.error("Reaction doesn't converge to a stable state after " + uh + " iterations." + (" Probably there is a cycle in the reactive function: " + t[0])), t.splice(0)); for (var n = t.splice(0), r = 0, i = n.length; r < i; r++) n[r].runReaction(); } se.isRunningReactions = !1; } var nl = vi("Reaction", Ra); function Vb(t) { var e = Ac; Ac = function(n) { return t(function() { return e(n); }); }; } function Kt() { return process.env.NODE_ENV !== "production" && !!se.spyListeners.length; } function Wi(t) { if (process.env.NODE_ENV !== "production" && se.spyListeners.length) for (var e = se.spyListeners, n = 0, r = e.length; n < r; n++) e[n](t); } function Tn(t) { if (process.env.NODE_ENV !== "production") { var e = Et(Et({}, t), { spyReportStart: !0 }); Wi(e); } } var Kb = { spyReportEnd: !0 }; function Mn(t) { process.env.NODE_ENV !== "production" && Wi(t ? Et(Et({}, t), { spyReportEnd: !0 }) : Kb); } function qb(t) { return process.env.NODE_ENV === "production" ? (console.warn("[mobx.spy] Is a no-op in production builds"), function() { }) : (se.spyListeners.push(t), Bd(function() { se.spyListeners = se.spyListeners.filter(function(e) { return e !== t; }); })); } function Zb() { Le(process.env.NODE_ENV !== "production" && "@action fields are not reassignable"); } function ch(t) { return function(e, n, r) { if (r) { if (process.env.NODE_ENV !== "production" && r.get !== void 0) return Le("@action cannot be used with getters"); if (r.value) return { value: Hi(t, r.value), enumerable: !1, configurable: !0, writable: !0