var GS = Object.defineProperty; var WS = (e, t, n) => t in e ? GS(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n; var O = (e, t, n) => WS(e, typeof t != "symbol" ? t + "" : t, n); function qS(e, t) { for (var n = 0; n < t.length; n++) { const r = t[n]; if (typeof r != "string" && !Array.isArray(r)) { for (const i in r) if (i !== "default" && !(i in e)) { const s = Object.getOwnPropertyDescriptor(r, i); s && Object.defineProperty(e, i, s.get ? s : { enumerable: !0, get: () => r[i] }); } } } return Object.freeze(Object.defineProperty(e, Symbol.toStringTag, { value: "Module" })); } const Ot = { BASE_URL: "/", DEV: !1, MODE: "production", NZ_AWS_REGION: "us-east-1", PROD: !0, SSR: !1, STAGE: "prod" }; let QS = 0; function Xt(e, t) { const n = `atom${++QS}`, r = { toString() { return (Ot ? "production" : void 0) !== "production" && this.debugLabel ? n + ":" + this.debugLabel : n; } }; return typeof e == "function" ? r.read = e : (r.init = e, r.read = KS, r.write = JS), t && (r.write = t), r; } function KS(e) { return e(this); } function JS(e, t, n) { return t( this, typeof n == "function" ? n(e(this)) : n ); } const oh = (e, t) => e.unstable_is ? e.unstable_is(t) : t === e, zl = (e) => "init" in e, Hl = (e) => !!e.write, ea = /* @__PURE__ */ new WeakMap(), zu = (e) => { var t; return Hu(e) && !((t = ea.get(e)) != null && t[1]); }, YS = (e, t) => { const n = ea.get(e); if (n) n[1] = !0, n[0].forEach((r) => r(t)); else if ((Ot ? "production" : void 0) !== "production") throw new Error("[Bug] cancelable promise not found"); }, XS = (e) => { if (ea.has(e)) return; const t = [/* @__PURE__ */ new Set(), !1]; ea.set(e, t); const n = () => { t[1] = !0; }; e.then(n, n), e.onCancel = (r) => { t[0].add(r); }; }, Hu = (e) => typeof (e == null ? void 0 : e.then) == "function", ah = (e) => "v" in e || "e" in e, so = (e) => { if ("e" in e) throw e.e; if ((Ot ? "production" : void 0) !== "production" && !("v" in e)) throw new Error("[Bug] atom state is not initialized"); return e.v; }, og = (e, t, n) => { n.p.has(e) || (n.p.add(e), t.then( () => { n.p.delete(e); }, () => { n.p.delete(e); } )); }, lh = (e, t, n, r, i) => { var s; if ((Ot ? "production" : void 0) !== "production" && r === t) throw new Error("[Bug] atom cannot depend on itself"); n.d.set(r, i.n), zu(n.v) && og(t, n.v, i), (s = i.m) == null || s.t.add(t), e && ZS(e, r, t); }, Tr = () => [/* @__PURE__ */ new Map(), /* @__PURE__ */ new Map(), /* @__PURE__ */ new Set()], Gl = (e, t, n) => { e[0].has(t) || e[0].set(t, /* @__PURE__ */ new Set()), e[1].set(t, n); }, ZS = (e, t, n) => { const r = e[0].get(t); r && r.add(n); }, e_ = (e, t) => e[0].get(t), uh = (e, t) => { e[2].add(t); }, Jn = (e) => { for (; e[1].size || e[2].size; ) { e[0].clear(); const t = new Set(e[1].values()); e[1].clear(); const n = new Set(e[2]); e[2].clear(), t.forEach((r) => { var i; return (i = r.m) == null ? void 0 : i.l.forEach((s) => s()); }), n.forEach((r) => r()); } }, ag = (e) => { let t; (Ot ? "production" : void 0) !== "production" && (t = /* @__PURE__ */ new Set()); const n = (m, k, h) => { const p = "v" in k, v = k.v, S = zu(k.v) ? k.v : null; if (Hu(h)) { XS(h); for (const _ of k.d.keys()) og( m, h, e(_, k) ); k.v = h, delete k.e; } else k.v = h, delete k.e; (!p || !Object.is(v, k.v)) && (++k.n, S && YS(S, h)); }, r = (m, k, h, p) => { var v; if (!(p != null && p(k)) && ah(h) && (h.m || Array.from(h.d).every( ([I, F]) => ( // Recursively, read the atom state of the dependency, and // check if the atom epoch number is unchanged r(m, I, e(I, h), p).n === F ) ))) return h; h.d.clear(); let S = !0; const _ = (I) => { if (oh(k, I)) { const P = e(I, h); if (!ah(P)) if (zl(I)) n(I, P, I.init); else throw new Error("no atom init"); return so(P); } const F = r( m, I, e(I, h), p ); if (S) lh(m, k, h, I, F); else { const P = Tr(); lh(P, k, h, I, F), u(P, k, h), Jn(P); } return so(F); }; let w, A; const b = { get signal() { return w || (w = new AbortController()), w.signal; }, get setSelf() { return (Ot ? "production" : void 0) !== "production" && !Hl(k) && console.warn("setSelf function cannot be used with read-only atom"), !A && Hl(k) && (A = (...I) => { if ((Ot ? "production" : void 0) !== "production" && S && console.warn("setSelf function cannot be called in sync"), !S) return l(k, ...I); }), A; } }; try { const I = k.read(_, b); if (n(k, h, I), Hu(I)) { (v = I.onCancel) == null || v.call(I, () => w == null ? void 0 : w.abort()); const F = () => { if (h.m) { const P = Tr(); u(P, k, h), Jn(P); } }; I.then(F, F); } return h; } catch (I) { return delete h.v, h.e = I, ++h.n, h; } finally { S = !1; } }, i = (m) => so(r(void 0, m, e(m))), s = (m, k, h) => { var p, v; const S = /* @__PURE__ */ new Map(); for (const _ of ((p = h.m) == null ? void 0 : p.t) || []) S.set(_, e(_, h)); for (const _ of h.p) S.set( _, e(_, h) ); return (v = e_(m, k)) == null || v.forEach((_) => { S.set(_, e(_, h)); }), S; }, o = (m, k, h) => { const p = [], v = /* @__PURE__ */ new Set(), S = (A, b) => { if (!v.has(A)) { v.add(A); for (const [I, F] of s(m, A, b)) A !== I && S(I, F); p.push([A, b, b.n]); } }; S(k, h); const _ = /* @__PURE__ */ new Set([k]), w = (A) => v.has(A); for (let A = p.length - 1; A >= 0; --A) { const [b, I, F] = p[A]; let P = !1; for (const W of I.d.keys()) if (W !== b && _.has(W)) { P = !0; break; } P && (r(m, b, I, w), u(m, b, I), F !== I.n && (Gl(m, b, I), _.add(b))), v.delete(b); } }, a = (m, k, h, ...p) => { const v = (w) => so(r(m, w, e(w, h))), S = (w, ...A) => { const b = e(w, h); let I; if (oh(k, w)) { if (!zl(w)) throw new Error("atom not writable"); const F = "v" in b, P = b.v, W = A[0]; n(w, b, W), u(m, w, b), (!F || !Object.is(P, b.v)) && (Gl(m, w, b), o(m, w, b)); } else I = a(m, w, b, ...A); return Jn(m), I; }; return k.write(v, S, ...p); }, l = (m, ...k) => { const h = Tr(), p = a(h, m, e(m), ...k); return Jn(h), p; }, u = (m, k, h) => { if (h.m && !zu(h.v)) { for (const p of h.d.keys()) h.m.d.has(p) || (c(m, p, e(p, h)).t.add(k), h.m.d.add(p)); for (const p of h.m.d || []) if (!h.d.has(p)) { h.m.d.delete(p); const v = d(m, p, e(p, h)); v == null || v.t.delete(k); } } }, c = (m, k, h) => { if (!h.m) { r(m, k, h); for (const p of h.d.keys()) c(m, p, e(p, h)).t.add(k); if (h.m = { l: /* @__PURE__ */ new Set(), d: new Set(h.d.keys()), t: /* @__PURE__ */ new Set() }, (Ot ? "production" : void 0) !== "production" && t.add(k), Hl(k) && k.onMount) { const p = h.m, { onMount: v } = k; uh(m, () => { const S = v( (..._) => a(m, k, h, ..._) ); S && (p.u = S); }); } } return h.m; }, d = (m, k, h) => { if (h.m && !h.m.l.size && !Array.from(h.m.t).some( (p) => { var v; return (v = e(p, h).m) == null ? void 0 : v.d.has(k); } )) { const p = h.m.u; p && uh(m, p), delete h.m, (Ot ? "production" : void 0) !== "production" && t.delete(k); for (const v of h.d.keys()) { const S = d(m, v, e(v, h)); S == null || S.t.delete(k); } return; } return h.m; }, g = { get: i, set: l, sub: (m, k) => { const h = Tr(), p = e(m), v = c(h, m, p); Jn(h); const S = v.l; return S.add(k), () => { S.delete(k); const _ = Tr(); d(_, m, p), Jn(_); }; }, unstable_derive: (m) => ag(...m(e)) }; return (Ot ? "production" : void 0) !== "production" && Object.assign(g, { // store dev methods (these are tentative and subject to change without notice) dev4_get_internal_weak_map: () => ({ get: (k) => { const h = e(k); if (h.n !== 0) return h; } }), dev4_get_mounted_atoms: () => t, dev4_restore_atoms: (k) => { const h = Tr(); for (const [p, v] of k) if (zl(p)) { const S = e(p), _ = "v" in S, w = S.v; n(p, S, v), u(h, p, S), (!_ || !Object.is(w, S.v)) && (Gl(h, p, S), o(h, p, S)); } Jn(h); } }), g; }, t_ = () => { const e = /* @__PURE__ */ new WeakMap(); return ag((n) => { let r = e.get(n); return r || (r = { d: /* @__PURE__ */ new Map(), p: /* @__PURE__ */ new Set(), n: 0 }, e.set(n, r)), r; }); }; let Ri; const n_ = () => (Ri || (Ri = t_(), (Ot ? "production" : void 0) !== "production" && (globalThis.__JOTAI_DEFAULT_STORE__ || (globalThis.__JOTAI_DEFAULT_STORE__ = Ri), globalThis.__JOTAI_DEFAULT_STORE__ !== Ri && console.warn( "Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044" ))), Ri); var bd = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; function qa(e) { return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e; } var lg = { exports: {} }, q = {}; /** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var Hs = Symbol.for("react.element"), r_ = Symbol.for("react.portal"), i_ = Symbol.for("react.fragment"), s_ = Symbol.for("react.strict_mode"), o_ = Symbol.for("react.profiler"), a_ = Symbol.for("react.provider"), l_ = Symbol.for("react.context"), u_ = Symbol.for("react.forward_ref"), c_ = Symbol.for("react.suspense"), d_ = Symbol.for("react.memo"), f_ = Symbol.for("react.lazy"), ch = Symbol.iterator; function h_(e) { return e === null || typeof e != "object" ? null : (e = ch && e[ch] || e["@@iterator"], typeof e == "function" ? e : null); } var ug = { isMounted: function() { return !1; }, enqueueForceUpdate: function() { }, enqueueReplaceState: function() { }, enqueueSetState: function() { } }, cg = Object.assign, dg = {}; function ki(e, t, n) { this.props = e, this.context = t, this.refs = dg, this.updater = n || ug; } ki.prototype.isReactComponent = {}; ki.prototype.setState = function(e, t) { if (typeof e != "object" && typeof e != "function" && e != null) throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables."); this.updater.enqueueSetState(this, e, t, "setState"); }; ki.prototype.forceUpdate = function(e) { this.updater.enqueueForceUpdate(this, e, "forceUpdate"); }; function fg() { } fg.prototype = ki.prototype; function Cd(e, t, n) { this.props = e, this.context = t, this.refs = dg, this.updater = n || ug; } var Od = Cd.prototype = new fg(); Od.constructor = Cd; cg(Od, ki.prototype); Od.isPureReactComponent = !0; var dh = Array.isArray, hg = Object.prototype.hasOwnProperty, Td = { current: null }, pg = { key: !0, ref: !0, __self: !0, __source: !0 }; function mg(e, t, n) { var r, i = {}, s = null, o = null; if (t != null) for (r in t.ref !== void 0 && (o = t.ref), t.key !== void 0 && (s = "" + t.key), t) hg.call(t, r) && !pg.hasOwnProperty(r) && (i[r] = t[r]); var a = arguments.length - 2; if (a === 1) i.children = n; else if (1 < a) { for (var l = Array(a), u = 0; u < a; u++) l[u] = arguments[u + 2]; i.children = l; } if (e && e.defaultProps) for (r in a = e.defaultProps, a) i[r] === void 0 && (i[r] = a[r]); return { $$typeof: Hs, type: e, key: s, ref: o, props: i, _owner: Td.current }; } function p_(e, t) { return { $$typeof: Hs, type: e.type, key: t, ref: e.ref, props: e.props, _owner: e._owner }; } function xd(e) { return typeof e == "object" && e !== null && e.$$typeof === Hs; } function m_(e) { var t = { "=": "=0", ":": "=2" }; return "$" + e.replace(/[=:]/g, function(n) { return t[n]; }); } var fh = /\/+/g; function Wl(e, t) { return typeof e == "object" && e !== null && e.key != null ? m_("" + e.key) : t.toString(36); } function Fo(e, t, n, r, i) { var s = typeof e; (s === "undefined" || s === "boolean") && (e = null); var o = !1; if (e === null) o = !0; else switch (s) { case "string": case "number": o = !0; break; case "object": switch (e.$$typeof) { case Hs: case r_: o = !0; } } if (o) return o = e, i = i(o), e = r === "" ? "." + Wl(o, 0) : r, dh(i) ? (n = "", e != null && (n = e.replace(fh, "$&/") + "/"), Fo(i, t, n, "", function(u) { return u; })) : i != null && (xd(i) && (i = p_(i, n + (!i.key || o && o.key === i.key ? "" : ("" + i.key).replace(fh, "$&/") + "/") + e)), t.push(i)), 1; if (o = 0, r = r === "" ? "." : r + ":", dh(e)) for (var a = 0; a < e.length; a++) { s = e[a]; var l = r + Wl(s, a); o += Fo(s, t, n, l, i); } else if (l = h_(e), typeof l == "function") for (e = l.call(e), a = 0; !(s = e.next()).done; ) s = s.value, l = r + Wl(s, a++), o += Fo(s, t, n, l, i); else if (s === "object") throw t = String(e), Error("Objects are not valid as a React child (found: " + (t === "[object Object]" ? "object with keys {" + Object.keys(e).join(", ") + "}" : t) + "). If you meant to render a collection of children, use an array instead."); return o; } function oo(e, t, n) { if (e == null) return e; var r = [], i = 0; return Fo(e, r, "", "", function(s) { return t.call(n, s, i++); }), r; } function g_(e) { if (e._status === -1) { var t = e._result; t = t(), t.then(function(n) { (e._status === 0 || e._status === -1) && (e._status = 1, e._result = n); }, function(n) { (e._status === 0 || e._status === -1) && (e._status = 2, e._result = n); }), e._status === -1 && (e._status = 0, e._result = t); } if (e._status === 1) return e._result.default; throw e._result; } var $e = { current: null }, Do = { transition: null }, v_ = { ReactCurrentDispatcher: $e, ReactCurrentBatchConfig: Do, ReactCurrentOwner: Td }; function gg() { throw Error("act(...) is not supported in production builds of React."); } q.Children = { map: oo, forEach: function(e, t, n) { oo(e, function() { t.apply(this, arguments); }, n); }, count: function(e) { var t = 0; return oo(e, function() { t++; }), t; }, toArray: function(e) { return oo(e, function(t) { return t; }) || []; }, only: function(e) { if (!xd(e)) throw Error("React.Children.only expected to receive a single React element child."); return e; } }; q.Component = ki; q.Fragment = i_; q.Profiler = o_; q.PureComponent = Cd; q.StrictMode = s_; q.Suspense = c_; q.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = v_; q.act = gg; q.cloneElement = function(e, t, n) { if (e == null) throw Error("React.cloneElement(...): The argument must be a React element, but you passed " + e + "."); var r = cg({}, e.props), i = e.key, s = e.ref, o = e._owner; if (t != null) { if (t.ref !== void 0 && (s = t.ref, o = Td.current), t.key !== void 0 && (i = "" + t.key), e.type && e.type.defaultProps) var a = e.type.defaultProps; for (l in t) hg.call(t, l) && !pg.hasOwnProperty(l) && (r[l] = t[l] === void 0 && a !== void 0 ? a[l] : t[l]); } var l = arguments.length - 2; if (l === 1) r.children = n; else if (1 < l) { a = Array(l); for (var u = 0; u < l; u++) a[u] = arguments[u + 2]; r.children = a; } return { $$typeof: Hs, type: e.type, key: i, ref: s, props: r, _owner: o }; }; q.createContext = function(e) { return e = { $$typeof: l_, _currentValue: e, _currentValue2: e, _threadCount: 0, Provider: null, Consumer: null, _defaultValue: null, _globalName: null }, e.Provider = { $$typeof: a_, _context: e }, e.Consumer = e; }; q.createElement = mg; q.createFactory = function(e) { var t = mg.bind(null, e); return t.type = e, t; }; q.createRef = function() { return { current: null }; }; q.forwardRef = function(e) { return { $$typeof: u_, render: e }; }; q.isValidElement = xd; q.lazy = function(e) { return { $$typeof: f_, _payload: { _status: -1, _result: e }, _init: g_ }; }; q.memo = function(e, t) { return { $$typeof: d_, type: e, compare: t === void 0 ? null : t }; }; q.startTransition = function(e) { var t = Do.transition; Do.transition = {}; try { e(); } finally { Do.transition = t; } }; q.unstable_act = gg; q.useCallback = function(e, t) { return $e.current.useCallback(e, t); }; q.useContext = function(e) { return $e.current.useContext(e); }; q.useDebugValue = function() { }; q.useDeferredValue = function(e) { return $e.current.useDeferredValue(e); }; q.useEffect = function(e, t) { return $e.current.useEffect(e, t); }; q.useId = function() { return $e.current.useId(); }; q.useImperativeHandle = function(e, t, n) { return $e.current.useImperativeHandle(e, t, n); }; q.useInsertionEffect = function(e, t) { return $e.current.useInsertionEffect(e, t); }; q.useLayoutEffect = function(e, t) { return $e.current.useLayoutEffect(e, t); }; q.useMemo = function(e, t) { return $e.current.useMemo(e, t); }; q.useReducer = function(e, t, n) { return $e.current.useReducer(e, t, n); }; q.useRef = function(e) { return $e.current.useRef(e); }; q.useState = function(e) { return $e.current.useState(e); }; q.useSyncExternalStore = function(e, t, n) { return $e.current.useSyncExternalStore(e, t, n); }; q.useTransition = function() { return $e.current.useTransition(); }; q.version = "18.3.1"; lg.exports = q; var D = lg.exports; const Gu = /* @__PURE__ */ qa(D), vg = { BASE_URL: "/", DEV: !1, MODE: "production", NZ_AWS_REGION: "us-east-1", PROD: !0, SSR: !1, STAGE: "prod" }, y_ = D.createContext( void 0 ), yg = (e) => D.useContext(y_) || n_(), kg = (e) => typeof (e == null ? void 0 : e.then) == "function", k_ = (e) => { e.status = "pending", e.then( (t) => { e.status = "fulfilled", e.value = t; }, (t) => { e.status = "rejected", e.reason = t; } ); }, S_ = Gu.use || ((e) => { if (e.status === "pending") throw e; if (e.status === "fulfilled") return e.value; throw e.status === "rejected" ? e.reason : (k_(e), e); }), ql = /* @__PURE__ */ new WeakMap(), __ = (e) => { let t = ql.get(e); return t || (t = new Promise((n, r) => { let i = e; const s = (l) => (u) => { i === l && n(u); }, o = (l) => (u) => { i === l && r(u); }, a = (l) => { "onCancel" in l && typeof l.onCancel == "function" && l.onCancel((u) => { if ((vg ? "production" : void 0) !== "production" && u === l) throw new Error("[Bug] p is not updated even after cancelation"); kg(u) ? (ql.set(u, t), i = u, u.then(s(u), o(u)), a(u)) : n(u); }); }; e.then(s(e), o(e)), a(e); }), ql.set(e, t)), t; }; function ta(e, t) { const n = yg(), [[r, i, s], o] = D.useReducer( (u) => { const c = n.get(e); return Object.is(u[0], c) && u[1] === n && u[2] === e ? u : [c, n, e]; }, void 0, () => [n.get(e), n, e] ); let a = r; if ((i !== n || s !== e) && (o(), a = n.get(e)), D.useEffect(() => { const u = n.sub(e, () => { o(); }); return o(), u; }, [n, e, void 0]), D.useDebugValue(a), kg(a)) { const u = __(a); return S_(u); } return a; } function Rd(e, t) { const n = yg(); return D.useCallback( (...i) => { if ((vg ? "production" : void 0) !== "production" && !("write" in e)) throw new Error("not writable atom"); return n.set(e, ...i); }, [n, e] ); } function Ql(e, t) { return [ ta(e), // We do wrong type assertion here, which results in throwing an error. Rd(e) ]; } const Sg = Xt(null); Sg.debugLabel = "accountAtom"; const E_ = { BASE_URL: "/", DEV: !1, MODE: "production", NZ_AWS_REGION: "us-east-1", PROD: !0, SSR: !1, STAGE: "prod" }, { NZ_AWS_REGION: w_, NZ_BACKOFFICE_BACK_URL: N_, NZ_CORE_SERVICES_GRAPHQL_URL: A_, NZ_CORE_SERVICES_REST_URL: b_ } = E_, Bn = { AWS: { region: w_, cognito: { userPoolId: "us-east-1_EZ7wuZ4ig", userPoolWebClientId: "2jok7cst8ebf6ppscrhji57gvr" } }, // Back services apiUrls: { restV1: N_ || "https://b133h34s56.execute-api.us-east-1.amazonaws.com", restV2: b_ || "https://core-services-prod.nizza.com/api", graphql: A_ || "https://core-services-prod.nizza.com/graphql", corsProxy: "https://3hvqfl2xcg.execute-api.us-east-1.amazonaws.com" }, publicUrls: { // Public app url platformSite: "https://platform.nizza.com", // Nizza CDN nizzaCdn: "https://cdn.nizza.com", // Bundle bundleSite: "https://bundle.nizza.com", // WSS IVS CHAT wssIVSChat: "wss://edge.ivschat.us-east-1.amazonaws.com", // Global Page globalPage: "https://live.nizza.com" } }; function Id(e, t) { let n = null; const r = () => { n || (n = t().log.createLogger(e)); }, i = (o, a) => typeof o[a] == "function", s = { get(o, a, l) { r(); const u = (c) => (...d) => { if (!n) return; const f = n[c]; if (typeof f == "function") return f.apply(n, d); }; return n && i(n, a) ? u(a) : n ? n[a] : void 0; } }; return new Proxy({}, s); } function re(e) { return e != null && typeof e == "object" && e["@@functional/placeholder"] === !0; } function nt(e) { return function t(n) { return arguments.length === 0 || re(n) ? t : e.apply(this, arguments); }; } function Je(e) { return function t(n, r) { switch (arguments.length) { case 0: return t; case 1: return re(n) ? t : nt(function(i) { return e(n, i); }); default: return re(n) && re(r) ? t : re(n) ? nt(function(i) { return e(i, r); }) : re(r) ? nt(function(i) { return e(n, i); }) : e(n, r); } }; } function Qa(e, t) { switch (e) { case 0: return function() { return t.apply(this, arguments); }; case 1: return function(n) { return t.apply(this, arguments); }; case 2: return function(n, r) { return t.apply(this, arguments); }; case 3: return function(n, r, i) { return t.apply(this, arguments); }; case 4: return function(n, r, i, s) { return t.apply(this, arguments); }; case 5: return function(n, r, i, s, o) { return t.apply(this, arguments); }; case 6: return function(n, r, i, s, o, a) { return t.apply(this, arguments); }; case 7: return function(n, r, i, s, o, a, l) { return t.apply(this, arguments); }; case 8: return function(n, r, i, s, o, a, l, u) { return t.apply(this, arguments); }; case 9: return function(n, r, i, s, o, a, l, u, c) { return t.apply(this, arguments); }; case 10: return function(n, r, i, s, o, a, l, u, c, d) { return t.apply(this, arguments); }; default: throw new Error("First argument to _arity must be a non-negative integer no greater than ten"); } } function _g(e, t, n) { return function() { for (var r = [], i = 0, s = e, o = 0, a = !1; o < t.length || i < arguments.length; ) { var l; o < t.length && (!re(t[o]) || i >= arguments.length) ? l = t[o] : (l = arguments[i], i += 1), r[o] = l, re(l) ? a = !0 : s -= 1, o += 1; } return !a && s <= 0 ? n.apply(this, r) : Qa(Math.max(0, s), _g(e, r, n)); }; } var Eg = /* @__PURE__ */ Je(function(t, n) { return t === 1 ? nt(n) : Qa(t, _g(t, [], n)); }); function Pd(e) { return function t(n, r, i) { switch (arguments.length) { case 0: return t; case 1: return re(n) ? t : Je(function(s, o) { return e(n, s, o); }); case 2: return re(n) && re(r) ? t : re(n) ? Je(function(s, o) { return e(s, r, o); }) : re(r) ? Je(function(s, o) { return e(n, s, o); }) : nt(function(s) { return e(n, r, s); }); default: return re(n) && re(r) && re(i) ? t : re(n) && re(r) ? Je(function(s, o) { return e(s, o, i); }) : re(n) && re(i) ? Je(function(s, o) { return e(s, r, o); }) : re(r) && re(i) ? Je(function(s, o) { return e(n, s, o); }) : re(n) ? nt(function(s) { return e(s, r, i); }) : re(r) ? nt(function(s) { return e(n, s, i); }) : re(i) ? nt(function(s) { return e(n, r, s); }) : e(n, r, i); } }; } const wg = Array.isArray || function(t) { return t != null && t.length >= 0 && Object.prototype.toString.call(t) === "[object Array]"; }, Ng = Number.isInteger || function(t) { return t << 0 === t; }; function Ag(e) { return Object.prototype.toString.call(e) === "[object String]"; } function bg(e, t) { var n = e < 0 ? t.length + e : e; return Ag(t) ? t.charAt(n) : t[n]; } var C_ = /* @__PURE__ */ Je(function(t, n) { if (n != null) return Ng(t) ? bg(t, n) : n[t]; }), O_ = /* @__PURE__ */ nt(function(t) { return wg(t) ? !0 : !t || typeof t != "object" || Ag(t) ? !1 : t.length === 0 ? !0 : t.length > 0 ? t.hasOwnProperty(0) && t.hasOwnProperty(t.length - 1) : !1; }), hh = typeof Symbol < "u" ? Symbol.iterator : "@@iterator"; function T_(e, t, n) { return function(i, s, o) { if (O_(o)) return e(i, s, o); if (o == null) return s; if (typeof o["fantasy-land/reduce"] == "function") return t(i, s, o, "fantasy-land/reduce"); if (o[hh] != null) return n(i, s, o[hh]()); if (typeof o.next == "function") return n(i, s, o); if (typeof o.reduce == "function") return t(i, s, o, "reduce"); throw new TypeError("reduce: list must be array or iterable"); }; } function x_(e, t, n) { for (var r = 0, i = n.length; r < i; ) { if (t = e["@@transducer/step"](t, n[r]), t && t["@@transducer/reduced"]) { t = t["@@transducer/value"]; break; } r += 1; } return e["@@transducer/result"](t); } var R_ = /* @__PURE__ */ Je(function(t, n) { return Qa(t.length, function() { return t.apply(n, arguments); }); }); function I_(e, t, n) { for (var r = n.next(); !r.done; ) { if (t = e["@@transducer/step"](t, r.value), t && t["@@transducer/reduced"]) { t = t["@@transducer/value"]; break; } r = n.next(); } return e["@@transducer/result"](t); } function P_(e, t, n, r) { return e["@@transducer/result"](n[r](R_(e["@@transducer/step"], e), t)); } var L_ = /* @__PURE__ */ T_(x_, P_, I_), F_ = /* @__PURE__ */ function() { function e(t) { this.f = t; } return e.prototype["@@transducer/init"] = function() { throw new Error("init not implemented on XWrap"); }, e.prototype["@@transducer/result"] = function(t) { return t; }, e.prototype["@@transducer/step"] = function(t, n) { return this.f(t, n); }, e; }(); function D_(e) { return new F_(e); } var $_ = /* @__PURE__ */ Pd(function(e, t, n) { return L_(typeof e == "function" ? D_(e) : e, t, n); }), M_ = /* @__PURE__ */ nt(function(t) { return function() { return t; }; }), U_ = /* @__PURE__ */ nt(function(t) { return Eg(t.length, t); }), j_ = /* @__PURE__ */ nt(function(t) { return t == null; }), V_ = /* @__PURE__ */ Je(function(t, n) { switch (t) { case 0: return function() { return n.call(this); }; case 1: return function(r) { return n.call(this, r); }; case 2: return function(r, i) { return n.call(this, r, i); }; case 3: return function(r, i, s) { return n.call(this, r, i, s); }; case 4: return function(r, i, s, o) { return n.call(this, r, i, s, o); }; case 5: return function(r, i, s, o, a) { return n.call(this, r, i, s, o, a); }; case 6: return function(r, i, s, o, a, l) { return n.call(this, r, i, s, o, a, l); }; case 7: return function(r, i, s, o, a, l, u) { return n.call(this, r, i, s, o, a, l, u); }; case 8: return function(r, i, s, o, a, l, u, c) { return n.call(this, r, i, s, o, a, l, u, c); }; case 9: return function(r, i, s, o, a, l, u, c, d) { return n.call(this, r, i, s, o, a, l, u, c, d); }; case 10: return function(r, i, s, o, a, l, u, c, d, f) { return n.call(this, r, i, s, o, a, l, u, c, d, f); }; default: throw new Error("First argument to nAry must be a non-negative integer no greater than ten"); } }); function B_(e, t) { return function() { return t.call(this, e.apply(this, arguments)); }; } function Cg(e, t) { return function() { var n = arguments.length; if (n === 0) return t(); var r = arguments[n - 1]; return wg(r) || typeof r[e] != "function" ? t.apply(this, arguments) : r[e].apply(r, Array.prototype.slice.call(arguments, 0, n - 1)); }; } var z_ = /* @__PURE__ */ Pd(/* @__PURE__ */ Cg("slice", function(t, n, r) { return Array.prototype.slice.call(r, t, n); })), H_ = /* @__PURE__ */ nt(/* @__PURE__ */ Cg("tail", /* @__PURE__ */ z_(1, 1 / 0))); function ph() { if (arguments.length === 0) throw new Error("pipe requires at least one argument"); return Qa(arguments[0].length, $_(B_, arguments[0], H_(arguments))); } var G_ = /* @__PURE__ */ Je(function(t, n) { if (t > 10) throw new Error("Constructor with greater than ten arguments"); return t === 0 ? function() { return new n(); } : U_(V_(t, function(r, i, s, o, a, l, u, c, d, f) { switch (t) { case 1: return new n(r); case 2: return new n(r, i); case 3: return new n(r, i, s); case 4: return new n(r, i, s, o); case 5: return new n(r, i, s, o, a); case 6: return new n(r, i, s, o, a, l); case 7: return new n(r, i, s, o, a, l, u); case 8: return new n(r, i, s, o, a, l, u, c); case 9: return new n(r, i, s, o, a, l, u, c, d); case 10: return new n(r, i, s, o, a, l, u, c, d, f); } })); }), W_ = /* @__PURE__ */ Pd(function(t, n, r) { return Eg(Math.max(t.length, n.length, r.length), function() { return t.apply(this, arguments) ? n.apply(this, arguments) : r.apply(this, arguments); }); }); function q_(e, t) { for (var n = t, r = 0; r < e.length; r += 1) { if (n == null) return; var i = e[r]; Ng(i) ? n = bg(i, n) : n = n[i]; } return n; } var mh = /* @__PURE__ */ Je(function(t, n) { for (var r = {}, i = {}, s = 0, o = t.length; s < o; ) i[t[s]] = 1, s += 1; for (var a in n) i.hasOwnProperty(a) || (r[a] = n[a]); return r; }), Q_ = /* @__PURE__ */ Je(q_); class Er extends Error { /** * Creates a new instance of DomainError. * @param name - The name of the error. * @param message - A detailed message describing the error. * @param value - Optional value that provides additional context about the error. */ constructor(t, n, r) { super(n), this.value = r, this.name = t, Error.captureStackTrace && Error.captureStackTrace(this, this.constructor); } /** * Converts the DomainError to a plain object for transfer or logging. * @returns An object representing the error in a more readable format. */ toDTO() { return { name: this.name, message: this.message, ...this.value && { value: this.value }, // Include a human-readable stack trace if available. ...this.stack && { stack: this.formatStack() } }; } /** * Formats the error stack trace into a human-readable string. * @returns A formatted stack trace string. */ formatStack() { return this.stack ? this.stack.split(` `).map((t) => t.trim()).join(" | ") : ""; } } class ps extends Er { constructor(t) { super( "RESOURCE_NOT_FOUND_ERROR", `Resource with id '${t}' not found.`, t ); } } class je extends Er { constructor(t) { super( "APP_UNEXPECTED_ERROR", t.message ?? "An unexpected error occurred.", t ); } } class Ka extends Er { constructor() { super("APP_ACCOUNT_INVALID_ERROR", "Account not defined"); } } class Og extends Er { constructor(t) { super( "INVALID_NIZZA_GLOBAL_OBJECT_ERROR", ` Configuration property invalid: "${t}". It looks like you are trying to use a configuration property that is required but is "undefined", make sure you have initialized the global object "nizza". * If you are using the @nizza/core library: import { getNizza } from '@nizza/core'; const nizza = getNizza(); nizza.configure({ account: env.account, ... }); * If you are using the window: window.nizza.configure({ account: env.account, ... }); ` ); } } function K_(e, t) { t.forEach((n) => { if (j_(Q_(n.split("."), e))) throw new Og(n); }); } function Y(e) { for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), r = 1; r < t; r++) n[r - 1] = arguments[r]; throw new Error(typeof e == "number" ? "[MobX] minified error nr: " + e + (n.length ? " " + n.map(String).join(",") : "") + ". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts" : "[MobX] " + e); } var J_ = {}; function Tg() { return typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : J_; } var xg = Object.assign, na = Object.getOwnPropertyDescriptor, Gt = Object.defineProperty, Ja = Object.prototype, Wu = []; Object.freeze(Wu); var Ld = {}; Object.freeze(Ld); var Y_ = typeof Proxy < "u", X_ = /* @__PURE__ */ Object.toString(); function Rg() { Y_ || Y("Proxy not available"); } function Ig(e) { var t = !1; return function() { if (!t) return t = !0, e.apply(this, arguments); }; } var Mr = function() { }; function Lt(e) { return typeof e == "function"; } function fr(e) { var t = typeof e; switch (t) { case "string": case "symbol": case "number": return !0; } return !1; } function Ya(e) { return e !== null && typeof e == "object"; } function Dn(e) { if (!Ya(e)) return !1; var t = Object.getPrototypeOf(e); if (t == null) return !0; var n = Object.hasOwnProperty.call(t, "constructor") && t.constructor; return typeof n == "function" && n.toString() === X_; } function Pg(e) { var t = e == null ? void 0 : e.constructor; return t ? t.name === "GeneratorFunction" || t.displayName === "GeneratorFunction" : !1; } function Xa(e, t, n) { Gt(e, t, { enumerable: !1, writable: !0, configurable: !0, value: n }); } function Lg(e, t, n) { Gt(e, t, { enumerable: !1, writable: !1, configurable: !0, value: n }); } function wr(e, t) { var n = "isMobX" + e; return t.prototype[n] = !0, function(r) { return Ya(r) && r[n] === !0; }; } function Si(e) { return e != null && Object.prototype.toString.call(e) === "[object Map]"; } function Z_(e) { var t = Object.getPrototypeOf(e), n = Object.getPrototypeOf(t), r = Object.getPrototypeOf(n); return r === null; } function Zt(e) { return e != null && Object.prototype.toString.call(e) === "[object Set]"; } var Fg = typeof Object.getOwnPropertySymbols < "u"; function eE(e) { var t = Object.keys(e); if (!Fg) return t; var n = Object.getOwnPropertySymbols(e); return n.length ? [].concat(t, n.filter(function(r) { return Ja.propertyIsEnumerable.call(e, r); })) : t; } var Za = typeof Reflect < "u" && Reflect.ownKeys ? Reflect.ownKeys : Fg ? function(e) { return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e)); } : ( /* istanbul ignore next */ Object.getOwnPropertyNames ); function Dg(e) { return e === null ? null : typeof e == "object" ? "" + e : e; } function rn(e, t) { return Ja.hasOwnProperty.call(e, t); } var tE = Object.getOwnPropertyDescriptors || function(t) { var n = {}; return Za(t).forEach(function(r) { n[r] = na(t, r); }), n; }; function Ze(e, t) { return !!(e & t); } function et(e, t, n) { return n ? e |= t : e &= ~t, e; } function gh(e, t) { (t == null || t > e.length) && (t = e.length); for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n]; return r; } function nE(e, t) { for (var n = 0; n < t.length; n++) { var r = t[n]; r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, iE(r.key), r); } } function _i(e, t, n) { return t && nE(e.prototype, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } function Ur(e, t) { var n = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"]; if (n) return (n = n.call(e)).next.bind(n); if (Array.isArray(e) || (n = sE(e)) || t) { n && (e = n); var r = 0; return function() { return r >= e.length ? { done: !0 } : { done: !1, value: e[r++] }; }; } throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`); } function $n() { return $n = Object.assign ? Object.assign.bind() : function(e) { for (var t = 1; t < arguments.length; t++) { var n = arguments[t]; for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]); } return e; }, $n.apply(null, arguments); } function $g(e, t) { e.prototype = Object.create(t.prototype), e.prototype.constructor = e, qu(e, t); } function qu(e, t) { return qu = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, r) { return n.__proto__ = r, n; }, qu(e, t); } function rE(e, t) { if (typeof e != "object" || !e) return e; var n = e[Symbol.toPrimitive]; if (n !== void 0) { var r = n.call(e, t); if (typeof r != "object") return r; throw new TypeError("@@toPrimitive must return a primitive value."); } return String(e); } function iE(e) { var t = rE(e, "string"); return typeof t == "symbol" ? t : t + ""; } function sE(e, t) { if (e) { if (typeof e == "string") return gh(e, t); var n = {}.toString.call(e).slice(8, -1); return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? gh(e, t) : void 0; } } var Bt = /* @__PURE__ */ Symbol("mobx-stored-annotations"); function Wt(e) { function t(n, r) { if (Gs(r)) return e.decorate_20223_(n, r); Ei(n, r, e); } return Object.assign(t, e); } function Ei(e, t, n) { rn(e, Bt) || Xa(e, Bt, $n({}, e[Bt])), pE(n) || (e[Bt][t] = n); } function oE(e) { return rn(e, Bt) || Xa(e, Bt, $n({}, e[Bt])), e[Bt]; } function Gs(e) { return typeof e == "object" && typeof e.kind == "string"; } var z = /* @__PURE__ */ Symbol("mobx administration"), zn = /* @__PURE__ */ function() { function e(n) { n === void 0 && (n = "Atom"), this.name_ = void 0, this.flags_ = 0, this.observers_ = /* @__PURE__ */ new Set(), this.lastAccessedBy_ = 0, this.lowestObserverState_ = J.NOT_TRACKING_, this.onBOL = void 0, this.onBUOL = void 0, this.name_ = n; } var t = e.prototype; return t.onBO = function() { this.onBOL && this.onBOL.forEach(function(r) { return r(); }); }, t.onBUO = function() { this.onBUOL && this.onBUOL.forEach(function(r) { return r(); }); }, t.reportObserved = function() { return Zg(this); }, t.reportChanged = function() { gt(), ev(this), vt(); }, t.toString = function() { return this.name_; }, _i(e, [{ key: "isBeingObserved", get: function() { return Ze(this.flags_, e.isBeingObservedMask_); }, set: function(r) { this.flags_ = et(this.flags_, e.isBeingObservedMask_, r); } }, { key: "isPendingUnobservation", get: function() { return Ze(this.flags_, e.isPendingUnobservationMask_); }, set: function(r) { this.flags_ = et(this.flags_, e.isPendingUnobservationMask_, r); } }, { key: "diffValue", get: function() { return Ze(this.flags_, e.diffValueMask_) ? 1 : 0; }, set: function(r) { this.flags_ = et(this.flags_, e.diffValueMask_, r === 1); } }]); }(); zn.isBeingObservedMask_ = 1; zn.isPendingUnobservationMask_ = 2; zn.diffValueMask_ = 4; var Fd = /* @__PURE__ */ wr("Atom", zn); function Mg(e, t, n) { t === void 0 && (t = Mr), n === void 0 && (n = Mr); var r = new zn(e); return t !== Mr && vw(r, t), n !== Mr && ov(r, n), r; } function aE(e, t) { return e === t; } function lE(e, t) { return jd(e, t); } function uE(e, t) { return jd(e, t, 1); } function cE(e, t) { return Object.is ? Object.is(e, t) : e === t ? e !== 0 || 1 / e === 1 / t : e !== e && t !== t; } var ai = { identity: aE, structural: lE, default: cE, shallow: uE }; function hr(e, t, n) { return uv(e) ? e : Array.isArray(e) ? pe.array(e, { name: n }) : Dn(e) ? pe.object(e, void 0, { name: n }) : Si(e) ? pe.map(e, { name: n }) : Zt(e) ? pe.set(e, { name: n }) : typeof e == "function" && !sl(e) && !gs(e) ? Pg(e) ? li(e) : ms(n, e) : e; } function dE(e, t, n) { if (e == null || ll(e) || al(e) || Ar(e) || wi(e)) return e; if (Array.isArray(e)) return pe.array(e, { name: n, deep: !1 }); if (Dn(e)) return pe.object(e, void 0, { name: n, deep: !1 }); if (Si(e)) return pe.map(e, { name: n, deep: !1 }); if (Zt(e)) return pe.set(e, { name: n, deep: !1 }); } function el(e) { return e; } function fE(e, t) { return jd(e, t) ? t : e; } var hE = "override"; function pE(e) { return e.annotationType_ === hE; } function Ws(e, t) { return { annotationType_: e, options_: t, make_: mE, extend_: gE, decorate_20223_: vE }; } function mE(e, t, n, r) { var i; if ((i = this.options_) != null && i.bound) return this.extend_(e, t, n, !1) === null ? 0 : 1; if (r === e.target_) return this.extend_(e, t, n, !1) === null ? 0 : 2; if (sl(n.value)) return 1; var s = Ug(e, this, t, n, !1); return Gt(r, t, s), 2; } function gE(e, t, n, r) { var i = Ug(e, this, t, n); return e.defineProperty_(t, i, r); } function vE(e, t) { var n = t.kind, r = t.name, i = t.addInitializer, s = this, o = function(u) { var c, d, f, y; return Mn((c = (d = s.options_) == null ? void 0 : d.name) != null ? c : r.toString(), u, (f = (y = s.options_) == null ? void 0 : y.autoAction) != null ? f : !1); }; if (n == "field") { i(function() { Ei(this, r, s); }); return; } if (n == "method") { var a; return sl(e) || (e = o(e)), (a = this.options_) != null && a.bound && i(function() { var l = this, u = l[r].bind(l); u.isMobxAction = !0, l[r] = u; }), e; } Y("Cannot apply '" + s.annotationType_ + "' to '" + String(r) + "' (kind: " + n + "):" + (` '` + s.annotationType_ + "' can only be used on properties with a function value.")); } function yE(e, t, n, r) { t.annotationType_, r.value; } function Ug(e, t, n, r, i) { var s, o, a, l, u, c, d; i === void 0 && (i = $.safeDescriptors), yE(e, t, n, r); var f = r.value; if ((s = t.options_) != null && s.bound) { var y; f = f.bind((y = e.proxy_) != null ? y : e.target_); } return { value: Mn( (o = (a = t.options_) == null ? void 0 : a.name) != null ? o : n.toString(), f, (l = (u = t.options_) == null ? void 0 : u.autoAction) != null ? l : !1, // https://github.com/mobxjs/mobx/discussions/3140 (c = t.options_) != null && c.bound ? (d = e.proxy_) != null ? d : e.target_ : void 0 ), // Non-configurable for classes // prevents accidental field redefinition in subclass configurable: i ? e.isPlainObject_ : !0, // https://github.com/mobxjs/mobx/pull/2641#issuecomment-737292058 enumerable: !1, // Non-obsevable, therefore non-writable // Also prevents rewriting in subclass constructor writable: !i }; } function jg(e, t) { return { annotationType_: e, options_: t, make_: kE, extend_: SE, decorate_20223_: _E }; } function kE(e, t, n, r) { var i; if (r === e.target_) return this.extend_(e, t, n, !1) === null ? 0 : 2; if ((i = this.options_) != null && i.bound && (!rn(e.target_, t) || !gs(e.target_[t])) && this.extend_(e, t, n, !1) === null) return 0; if (gs(n.value)) return 1; var s = Vg(e, this, t, n, !1, !1); return Gt(r, t, s), 2; } function SE(e, t, n, r) { var i, s = Vg(e, this, t, n, (i = this.options_) == null ? void 0 : i.bound); return e.defineProperty_(t, s, r); } function _E(e, t) { var n, r = t.name, i = t.addInitializer; return gs(e) || (e = li(e)), (n = this.options_) != null && n.bound && i(function() { var s = this, o = s[r].bind(s); o.isMobXFlow = !0, s[r] = o; }), e; } function EE(e, t, n, r) { t.annotationType_, r.value; } function Vg(e, t, n, r, i, s) { s === void 0 && (s = $.safeDescriptors), EE(e, t, n, r); var o = r.value; if (gs(o) || (o = li(o)), i) { var a; o = o.bind((a = e.proxy_) != null ? a : e.target_), o.isMobXFlow = !0; } return { value: o, // Non-configurable for classes // prevents accidental field redefinition in subclass configurable: s ? e.isPlainObject_ : !0, // https://github.com/mobxjs/mobx/pull/2641#issuecomment-737292058 enumerable: !1, // Non-obsevable, therefore non-writable // Also prevents rewriting in subclass constructor writable: !s }; } function Dd(e, t) { return { annotationType_: e, options_: t, make_: wE, extend_: NE, decorate_20223_: AE }; } function wE(e, t, n) { return this.extend_(e, t, n, !1) === null ? 0 : 1; } function NE(e, t, n, r) { return bE(e, this, t, n), e.defineComputedProperty_(t, $n({}, this.options_, { get: n.get, set: n.set }), r); } function AE(e, t) { var n = this, r = t.name, i = t.addInitializer; return i(function() { var s = Ni(this)[z], o = $n({}, n.options_, { get: e, context: this }); o.name || (o.name = "ObservableObject." + r.toString()), s.values_.set(r, new Ft(o)); }), function() { return this[z].getObservablePropValue_(r); }; } function bE(e, t, n, r) { t.annotationType_, r.get; } function tl(e, t) { return { annotationType_: e, options_: t, make_: CE, extend_: OE, decorate_20223_: TE }; } function CE(e, t, n) { return this.extend_(e, t, n, !1) === null ? 0 : 1; } function OE(e, t, n, r) { var i, s; return xE(e, this), e.defineObservableProperty_(t, n.value, (i = (s = this.options_) == null ? void 0 : s.enhancer) != null ? i : hr, r); } function TE(e, t) { var n = this, r = t.kind, i = t.name, s = /* @__PURE__ */ new WeakSet(); function o(a, l) { var u, c, d = Ni(a)[z], f = new ar(l, (u = (c = n.options_) == null ? void 0 : c.enhancer) != null ? u : hr, "ObservableObject." + i.toString(), !1); d.values_.set(i, f), s.add(a); } if (r == "accessor") return { get: function() { return s.has(this) || o(this, e.get.call(this)), this[z].getObservablePropValue_(i); }, set: function(l) { return s.has(this) || o(this, l), this[z].setObservablePropValue_(i, l); }, init: function(l) { return s.has(this) || o(this, l), l; } }; } function xE(e, t, n, r) { t.annotationType_; } var RE = "true", IE = /* @__PURE__ */ Bg(); function Bg(e) { return { annotationType_: RE, options_: e, make_: PE, extend_: LE, decorate_20223_: FE }; } function PE(e, t, n, r) { var i, s; if (n.get) return _n.make_(e, t, n, r); if (n.set) { var o = Mn(t.toString(), n.set); return r === e.target_ ? e.defineProperty_(t, { configurable: $.safeDescriptors ? e.isPlainObject_ : !0, set: o }) === null ? 0 : 2 : (Gt(r, t, { configurable: !0, set: o }), 2); } if (r !== e.target_ && typeof n.value == "function") { var a; if (Pg(n.value)) { var l, u = (l = this.options_) != null && l.autoBind ? li.bound : li; return u.make_(e, t, n, r); } var c = (a = this.options_) != null && a.autoBind ? ms.bound : ms; return c.make_(e, t, n, r); } var d = ((i = this.options_) == null ? void 0 : i.deep) === !1 ? pe.ref : pe; if (typeof n.value == "function" && (s = this.options_) != null && s.autoBind) { var f; n.value = n.value.bind((f = e.proxy_) != null ? f : e.target_); } return d.make_(e, t, n, r); } function LE(e, t, n, r) { var i, s; if (n.get) return _n.extend_(e, t, n, r); if (n.set) return e.defineProperty_(t, { configurable: $.safeDescriptors ? e.isPlainObject_ : !0, set: Mn(t.toString(), n.set) }, r); if (typeof n.value == "function" && (i = this.options_) != null && i.autoBind) { var o; n.value = n.value.bind((o = e.proxy_) != null ? o : e.target_); } var a = ((s = this.options_) == null ? void 0 : s.deep) === !1 ? pe.ref : pe; return a.extend_(e, t, n, r); } function FE(e, t) { Y("'" + this.annotationType_ + "' cannot be used as a decorator"); } var DE = "observable", $E = "observable.ref", ME = "observable.shallow", UE = "observable.struct", zg = { deep: !0, name: void 0, defaultDecorator: void 0, proxy: !0 }; Object.freeze(zg); function ao(e) { return e || zg; } var Qu = /* @__PURE__ */ tl(DE), jE = /* @__PURE__ */ tl($E, { enhancer: el }), VE = /* @__PURE__ */ tl(ME, { enhancer: dE }), BE = /* @__PURE__ */ tl(UE, { enhancer: fE }), Hg = /* @__PURE__ */ Wt(Qu); function lo(e) { return e.deep === !0 ? hr : e.deep === !1 ? el : HE(e.defaultDecorator); } function zE(e) { var t; return e ? (t = e.defaultDecorator) != null ? t : Bg(e) : void 0; } function HE(e) { var t, n; return e && (t = (n = e.options_) == null ? void 0 : n.enhancer) != null ? t : hr; } function Gg(e, t, n) { if (Gs(t)) return Qu.decorate_20223_(e, t); if (fr(t)) { Ei(e, t, Qu); return; } return uv(e) ? e : Dn(e) ? pe.object(e, t, n) : Array.isArray(e) ? pe.array(e, t) : Si(e) ? pe.map(e, t) : Zt(e) ? pe.set(e, t) : typeof e == "object" && e !== null ? e : pe.box(e, t); } xg(Gg, Hg); var GE = { box: function(t, n) { var r = ao(n); return new ar(t, lo(r), r.name, !0, r.equals); }, array: function(t, n) { var r = ao(n); return ($.useProxies === !1 || r.proxy === !1 ? Mw : Ow)(t, lo(r), r.name); }, map: function(t, n) { var r = ao(n); return new hv(t, lo(r), r.name); }, set: function(t, n) { var r = ao(n); return new pv(t, lo(r), r.name); }, object: function(t, n, r) { return br(function() { return yw($.useProxies === !1 || (r == null ? void 0 : r.proxy) === !1 ? Ni({}, r) : Nw({}, r), t, n); }); }, ref: /* @__PURE__ */ Wt(jE), shallow: /* @__PURE__ */ Wt(VE), deep: Hg, struct: /* @__PURE__ */ Wt(BE) }, pe = /* @__PURE__ */ xg(Gg, GE), Wg = "computed", WE = "computed.struct", Ku = /* @__PURE__ */ Dd(Wg), qE = /* @__PURE__ */ Dd(WE, { equals: ai.structural }), _n = function(t, n) { if (Gs(n)) return Ku.decorate_20223_(t, n); if (fr(n)) return Ei(t, n, Ku); if (Dn(t)) return Wt(Dd(Wg, t)); var r = Dn(n) ? n : {}; return r.get = t, r.name || (r.name = t.name || ""), new Ft(r); }; Object.assign(_n, Ku); _n.struct = /* @__PURE__ */ Wt(qE); var vh, yh, ra = 0, QE = 1, KE = (vh = (yh = /* @__PURE__ */ na(function() { }, "name")) == null ? void 0 : yh.configurable) != null ? vh : !1, kh = { value: "action", configurable: !0, writable: !1, enumerable: !1 }; function Mn(e, t, n, r) { n === void 0 && (n = !1); function i() { return JE(e, n, t, r || this, arguments); } return i.isMobxAction = !0, i.toString = function() { return t.toString(); }, KE && (kh.value = e, Gt(i, "name", kh)), i; } function JE(e, t, n, r, i) { var s = YE(e, t); try { return n.apply(r, i); } catch (o) { throw s.error_ = o, o; } finally { XE(s); } } function YE(e, t, n, r) { var i = !1, s = 0, o = $.trackingDerivation, a = !t || !o; gt(); var l = $.allowStateChanges; a && (Nr(), l = nl(!0)); var u = $d(!0), c = { runAsAction_: a, prevDerivation_: o, prevAllowStateChanges_: l, prevAllowStateReads_: u, notifySpy_: i, startTime_: s, actionId_: QE++, parentActionId_: ra }; return ra = c.actionId_, c; } function XE(e) { ra !== e.actionId_ && Y(30), ra = e.parentActionId_, e.error_ !== void 0 && ($.suppressReactionErrors = !0), rl(e.prevAllowStateChanges_), Yi(e.prevAllowStateReads_), vt(), e.runAsAction_ && sn(e.prevDerivation_), $.suppressReactionErrors = !1; } function qg(e, t) { var n = nl(e); try { return t(); } finally { rl(n); } } function nl(e) { var t = $.allowStateChanges; return $.allowStateChanges = e, t; } function rl(e) { $.allowStateChanges = e; } var ar = /* @__PURE__ */ function(e) { function t(r, i, s, o, a) { var l; return s === void 0 && (s = "ObservableValue"), a === void 0 && (a = ai.default), l = e.call(this, s) || this, l.enhancer = void 0, l.name_ = void 0, l.equals = void 0, l.hasUnreportedChange_ = !1, l.interceptors_ = void 0, l.changeListeners_ = void 0, l.value_ = void 0, l.dehancer = void 0, l.enhancer = i, l.name_ = s, l.equals = a, l.value_ = i(r, void 0, s), l; } $g(t, e); var n = t.prototype; return n.dehanceValue = function(i) { return this.dehancer !== void 0 ? this.dehancer(i) : i; }, n.set = function(i) { this.value_, i = this.prepareNewValue_(i), i !== $.UNCHANGED && this.setNewValue_(i); }, n.prepareNewValue_ = function(i) { if (pt(this)) { var s = mt(this, { object: this, type: qt, newValue: i }); if (!s) return $.UNCHANGED; i = s.newValue; } return i = this.enhancer(i, this.value_, this.name_), this.equals(this.value_, i) ? $.UNCHANGED : i; }, n.setNewValue_ = function(i) { var s = this.value_; this.value_ = i, this.reportChanged(), xt(this) && Rt(this, { type: qt, object: this, newValue: i, oldValue: s }); }, n.get = function() { return this.reportObserved(), this.dehanceValue(this.value_); }, n.intercept_ = function(i) { return qs(this, i); }, n.observe_ = function(i, s) { return s && i({ observableKind: "value", debugObjectName: this.name_, object: this, type: qt, newValue: this.value_, oldValue: void 0 }), Qs(this, i); }, n.raw = function() { return this.value_; }, n.toJSON = function() { return this.get(); }, n.toString = function() { return this.name_ + "[" + this.value_ + "]"; }, n.valueOf = function() { return Dg(this.get()); }, n[Symbol.toPrimitive] = function() { return this.valueOf(); }, t; }(zn), Ft = /* @__PURE__ */ function() { function e(n) { this.dependenciesState_ = J.NOT_TRACKING_, this.observing_ = [], this.newObserving_ = null, this.observers_ = /* @__PURE__ */ new Set(), this.runId_ = 0, this.lastAccessedBy_ = 0, this.lowestObserverState_ = J.UP_TO_DATE_, this.unboundDepsCount_ = 0, this.value_ = new sa(null), this.name_ = void 0, this.triggeredBy_ = void 0, this.flags_ = 0, this.derivation = void 0, this.setter_ = void 0, this.isTracing_ = ia.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, n.get || Y(31), this.derivation = n.get, this.name_ = n.name || "ComputedValue", n.set && (this.setter_ = Mn("ComputedValue-setter", n.set)), this.equals_ = n.equals || (n.compareStructural || n.struct ? ai.structural : ai.default), this.scope_ = n.context, this.requiresReaction_ = n.requiresReaction, this.keepAlive_ = !!n.keepAlive; } var t = e.prototype; return t.onBecomeStale_ = function() { nw(this); }, t.onBO = function() { this.onBOL && this.onBOL.forEach(function(r) { return r(); }); }, t.onBUO = function() { this.onBUOL && this.onBUOL.forEach(function(r) { return r(); }); }, t.get = function() { if (this.isComputing && Y(32, this.name_, this.derivation), $.inBatch === 0 && // !globalState.trackingDerivatpion && this.observers_.size === 0 && !this.keepAlive_) Ju(this) && (this.warnAboutUntrackedRead_(), gt(), this.value_ = this.computeValue_(!1), vt()); else if (Zg(this), Ju(this)) { var r = $.trackingContext; this.keepAlive_ && !r && ($.trackingContext = this), this.trackAndCompute() && tw(this), $.trackingContext = r; } var i = this.value_; if ($o(i)) throw i.cause; return i; }, t.set = function(r) { if (this.setter_) { this.isRunningSetter && Y(33, this.name_), this.isRunningSetter = !0; try { this.setter_.call(this.scope_, r); } finally { this.isRunningSetter = !1; } } else Y(34, this.name_); }, t.trackAndCompute = function() { var r = this.value_, i = ( /* see #1208 */ this.dependenciesState_ === J.NOT_TRACKING_ ), s = this.computeValue_(!0), o = i || $o(r) || $o(s) || !this.equals_(r, s); return o && (this.value_ = s), o; }, t.computeValue_ = function(r) { this.isComputing = !0; var i = nl(!1), s; if (r) s = Qg(this, this.derivation, this.scope_); else if ($.disableErrorBoundaries === !0) s = this.derivation.call(this.scope_); else try { s = this.derivation.call(this.scope_); } catch (o) { s = new sa(o); } return rl(i), this.isComputing = !1, s; }, t.suspend_ = function() { this.keepAlive_ || (Yu(this), this.value_ = void 0); }, t.observe_ = function(r, i) { var s = this, o = !0, a = void 0; return ol(function() { var l = s.get(); if (!o || i) { var u = Nr(); r({ observableKind: "computed", debugObjectName: s.name_, type: qt, object: s, newValue: l, oldValue: a }), sn(u); } o = !1, a = l; }); }, t.warnAboutUntrackedRead_ = function() { }, t.toString = function() { return this.name_ + "[" + this.derivation.toString() + "]"; }, t.valueOf = function() { return Dg(this.get()); }, t[Symbol.toPrimitive] = function() { return this.valueOf(); }, _i(e, [{ key: "isComputing", get: function() { return Ze(this.flags_, e.isComputingMask_); }, set: function(r) { this.flags_ = et(this.flags_, e.isComputingMask_, r); } }, { key: "isRunningSetter", get: function() { return Ze(this.flags_, e.isRunningSetterMask_); }, set: function(r) { this.flags_ = et(this.flags_, e.isRunningSetterMask_, r); } }, { key: "isBeingObserved", get: function() { return Ze(this.flags_, e.isBeingObservedMask_); }, set: function(r) { this.flags_ = et(this.flags_, e.isBeingObservedMask_, r); } }, { key: "isPendingUnobservation", get: function() { return Ze(this.flags_, e.isPendingUnobservationMask_); }, set: function(r) { this.flags_ = et(this.flags_, e.isPendingUnobservationMask_, r); } }, { key: "diffValue", get: function() { return Ze(this.flags_, e.diffValueMask_) ? 1 : 0; }, set: function(r) { this.flags_ = et(this.flags_, e.diffValueMask_, r === 1); } }]); }(); Ft.isComputingMask_ = 1; Ft.isRunningSetterMask_ = 2; Ft.isBeingObservedMask_ = 4; Ft.isPendingUnobservationMask_ = 8; Ft.diffValueMask_ = 16; var il = /* @__PURE__ */ wr("ComputedValue", Ft), J; (function(e) { e[e.NOT_TRACKING_ = -1] = "NOT_TRACKING_", e[e.UP_TO_DATE_ = 0] = "UP_TO_DATE_", e[e.POSSIBLY_STALE_ = 1] = "POSSIBLY_STALE_", e[e.STALE_ = 2] = "STALE_"; })(J || (J = {})); var ia; (function(e) { e[e.NONE = 0] = "NONE", e[e.LOG = 1] = "LOG", e[e.BREAK = 2] = "BREAK"; })(ia || (ia = {})); var sa = function(t) { this.cause = void 0, this.cause = t; }; function $o(e) { return e instanceof sa; } function Ju(e) { switch (e.dependenciesState_) { case J.UP_TO_DATE_: return !1; case J.NOT_TRACKING_: case J.STALE_: return !0; case J.POSSIBLY_STALE_: { for (var t = $d(!0), n = Nr(), r = e.observing_, i = r.length, s = 0; s < i; s++) { var o = r[s]; if (il(o)) { if ($.disableErrorBoundaries) o.get(); else try { o.get(); } catch { return sn(n), Yi(t), !0; } if (e.dependenciesState_ === J.STALE_) return sn(n), Yi(t), !0; } } return Jg(e), sn(n), Yi(t), !1; } } } function Qg(e, t, n) { var r = $d(!0); Jg(e), e.newObserving_ = new Array( // Reserve constant space for initial dependencies, dynamic space otherwise. // See https://github.com/mobxjs/mobx/pull/3833 e.runId_ === 0 ? 100 : e.observing_.length ), e.unboundDepsCount_ = 0, e.runId_ = ++$.runId; var i = $.trackingDerivation; $.trackingDerivation = e, $.inBatch++; var s; if ($.disableErrorBoundaries === !0) s = t.call(n); else try { s = t.call(n); } catch (o) { s = new sa(o); } return $.inBatch--, $.trackingDerivation = i, ZE(e), Yi(r), s; } function ZE(e) { for (var t = e.observing_, n = e.observing_ = e.newObserving_, r = J.UP_TO_DATE_, i = 0, s = e.unboundDepsCount_, o = 0; o < s; o++) { var a = n[o]; a.diffValue === 0 && (a.diffValue = 1, i !== o && (n[i] = a), i++), a.dependenciesState_ > r && (r = a.dependenciesState_); } for (n.length = i, e.newObserving_ = null, s = t.length; s--; ) { var l = t[s]; l.diffValue === 0 && Yg(l, e), l.diffValue = 0; } for (; i--; ) { var u = n[i]; u.diffValue === 1 && (u.diffValue = 0, ew(u, e)); } r !== J.UP_TO_DATE_ && (e.dependenciesState_ = r, e.onBecomeStale_()); } function Yu(e) { var t = e.observing_; e.observing_ = []; for (var n = t.length; n--; ) Yg(t[n], e); e.dependenciesState_ = J.NOT_TRACKING_; } function Kg(e) { var t = Nr(); try { return e(); } finally { sn(t); } } function Nr() { var e = $.trackingDerivation; return $.trackingDerivation = null, e; } function sn(e) { $.trackingDerivation = e; } function $d(e) { var t = $.allowStateReads; return $.allowStateReads = e, t; } function Yi(e) { $.allowStateReads = e; } function Jg(e) { if (e.dependenciesState_ !== J.UP_TO_DATE_) { e.dependenciesState_ = J.UP_TO_DATE_; for (var t = e.observing_, n = t.length; n--; ) t[n].lowestObserverState_ = J.UP_TO_DATE_; } } var Kl = 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; }, Jl = !0, $ = /* @__PURE__ */ function() { var e = /* @__PURE__ */ Tg(); return e.__mobxInstanceCount > 0 && !e.__mobxGlobals && (Jl = !1), e.__mobxGlobals && e.__mobxGlobals.version !== new Kl().version && (Jl = !1), Jl ? e.__mobxGlobals ? (e.__mobxInstanceCount += 1, e.__mobxGlobals.UNCHANGED || (e.__mobxGlobals.UNCHANGED = {}), e.__mobxGlobals) : (e.__mobxInstanceCount = 1, e.__mobxGlobals = /* @__PURE__ */ new Kl()) : (setTimeout(function() { Y(35); }, 1), new Kl()); }(); function ew(e, t) { e.observers_.add(t), e.lowestObserverState_ > t.dependenciesState_ && (e.lowestObserverState_ = t.dependenciesState_); } function Yg(e, t) { e.observers_.delete(t), e.observers_.size === 0 && Xg(e); } function Xg(e) { e.isPendingUnobservation === !1 && (e.isPendingUnobservation = !0, $.pendingUnobservations.push(e)); } function gt() { $.inBatch++; } function vt() { if (--$.inBatch === 0) { tv(); for (var e = $.pendingUnobservations, t = 0; t < e.length; t++) { var n = e[t]; n.isPendingUnobservation = !1, n.observers_.size === 0 && (n.isBeingObserved && (n.isBeingObserved = !1, n.onBUO()), n instanceof Ft && n.suspend_()); } $.pendingUnobservations = []; } } function Zg(e) { var t = $.trackingDerivation; return t !== null ? (t.runId_ !== e.lastAccessedBy_ && (e.lastAccessedBy_ = t.runId_, t.newObserving_[t.unboundDepsCount_++] = e, !e.isBeingObserved && $.trackingContext && (e.isBeingObserved = !0, e.onBO())), e.isBeingObserved) : (e.observers_.size === 0 && $.inBatch > 0 && Xg(e), !1); } function ev(e) { e.lowestObserverState_ !== J.STALE_ && (e.lowestObserverState_ = J.STALE_, e.observers_.forEach(function(t) { t.dependenciesState_ === J.UP_TO_DATE_ && t.onBecomeStale_(), t.dependenciesState_ = J.STALE_; })); } function tw(e) { e.lowestObserverState_ !== J.STALE_ && (e.lowestObserverState_ = J.STALE_, e.observers_.forEach(function(t) { t.dependenciesState_ === J.POSSIBLY_STALE_ ? t.dependenciesState_ = J.STALE_ : t.dependenciesState_ === J.UP_TO_DATE_ && (e.lowestObserverState_ = J.UP_TO_DATE_); })); } function nw(e) { e.lowestObserverState_ === J.UP_TO_DATE_ && (e.lowestObserverState_ = J.POSSIBLY_STALE_, e.observers_.forEach(function(t) { t.dependenciesState_ === J.UP_TO_DATE_ && (t.dependenciesState_ = J.POSSIBLY_STALE_, t.onBecomeStale_()); })); } var an = /* @__PURE__ */ function() { function e(n, r, i, s) { n === void 0 && (n = "Reaction"), this.name_ = void 0, this.onInvalidate_ = void 0, this.errorHandler_ = void 0, this.requiresObservable_ = void 0, this.observing_ = [], this.newObserving_ = [], this.dependenciesState_ = J.NOT_TRACKING_, this.runId_ = 0, this.unboundDepsCount_ = 0, this.flags_ = 0, this.isTracing_ = ia.NONE, this.name_ = n, this.onInvalidate_ = r, this.errorHandler_ = i, this.requiresObservable_ = s; } var t = e.prototype; return t.onBecomeStale_ = function() { this.schedule_(); }, t.schedule_ = function() { this.isScheduled || (this.isScheduled = !0, $.pendingReactions.push(this), tv()); }, t.runReaction_ = function() { if (!this.isDisposed) { gt(), this.isScheduled = !1; var r = $.trackingContext; if ($.trackingContext = this, Ju(this)) { this.isTrackPending = !0; try { this.onInvalidate_(); } catch (i) { this.reportExceptionInDerivation_(i); } } $.trackingContext = r, vt(); } }, t.track = function(r) { if (!this.isDisposed) { gt(), this.isRunning = !0; var i = $.trackingContext; $.trackingContext = this; var s = Qg(this, r, void 0); $.trackingContext = i, this.isRunning = !1, this.isTrackPending = !1, this.isDisposed && Yu(this), $o(s) && this.reportExceptionInDerivation_(s.cause), vt(); } }, t.reportExceptionInDerivation_ = function(r) { var i = this; if (this.errorHandler_) { this.errorHandler_(r, this); return; } if ($.disableErrorBoundaries) throw r; var s = "[mobx] uncaught error in '" + this + "'"; $.suppressReactionErrors || console.error(s, r), $.globalReactionErrorHandlers.forEach(function(o) { return o(r, i); }); }, t.dispose = function() { this.isDisposed || (this.isDisposed = !0, this.isRunning || (gt(), Yu(this), vt())); }, t.getDisposer_ = function(r) { var i = this, s = function o() { i.dispose(), r == null || r.removeEventListener == null || r.removeEventListener("abort", o); }; return r == null || r.addEventListener == null || r.addEventListener("abort", s), s[z] = this, s; }, t.toString = function() { return "Reaction[" + this.name_ + "]"; }, t.trace = function(r) { }, _i(e, [{ key: "isDisposed", get: function() { return Ze(this.flags_, e.isDisposedMask_); }, set: function(r) { this.flags_ = et(this.flags_, e.isDisposedMask_, r); } }, { key: "isScheduled", get: function() { return Ze(this.flags_, e.isScheduledMask_); }, set: function(r) { this.flags_ = et(this.flags_, e.isScheduledMask_, r); } }, { key: "isTrackPending", get: function() { return Ze(this.flags_, e.isTrackPendingMask_); }, set: function(r) { this.flags_ = et(this.flags_, e.isTrackPendingMask_, r); } }, { key: "isRunning", get: function() { return Ze(this.flags_, e.isRunningMask_); }, set: function(r) { this.flags_ = et(this.flags_, e.isRunningMask_, r); } }, { key: "diffValue", get: function() { return Ze(this.flags_, e.diffValueMask_) ? 1 : 0; }, set: function(r) { this.flags_ = et(this.flags_, e.diffValueMask_, r === 1); } }]); }(); an.isDisposedMask_ = 1; an.isScheduledMask_ = 2; an.isTrackPendingMask_ = 4; an.isRunningMask_ = 8; an.diffValueMask_ = 16; var rw = 100, iw = function(t) { return t(); }; function tv() { $.inBatch > 0 || $.isRunningReactions || iw(sw); } function sw() { $.isRunningReactions = !0; for (var e = $.pendingReactions, t = 0; e.length > 0; ) { ++t === rw && (console.error("[mobx] cycle in reaction: " + e[0]), e.splice(0)); for (var n = e.splice(0), r = 0, i = n.length; r < i; r++) n[r].runReaction_(); } $.isRunningReactions = !1; } var oa = /* @__PURE__ */ wr("Reaction", an); function Xi() { return !1; } function ow(e) { return console.warn("[mobx.spy] Is a no-op in production builds"), function() { }; } var nv = "action", aw = "action.bound", rv = "autoAction", lw = "autoAction.bound", uw = "", Xu = /* @__PURE__ */ Ws(nv), cw = /* @__PURE__ */ Ws(aw, { bound: !0 }), Zu = /* @__PURE__ */ Ws(rv, { autoAction: !0 }), dw = /* @__PURE__ */ Ws(lw, { autoAction: !0, bound: !0 }); function iv(e) { var t = function(r, i) { if (Lt(r)) return Mn(r.name || uw, r, e); if (Lt(i)) return Mn(r, i, e); if (Gs(i)) return (e ? Zu : Xu).decorate_20223_(r, i); if (fr(i)) return Ei(r, i, e ? Zu : Xu); if (fr(r)) return Wt(Ws(e ? rv : nv, { name: r, autoAction: e })); }; return t; } var Ye = /* @__PURE__ */ iv(!1); Object.assign(Ye, Xu); var ms = /* @__PURE__ */ iv(!0); Object.assign(ms, Zu); Ye.bound = /* @__PURE__ */ Wt(cw); ms.bound = /* @__PURE__ */ Wt(dw); function sl(e) { return Lt(e) && e.isMobxAction === !0; } function ol(e, t) { var n, r, i, s; t === void 0 && (t = Ld); var o = (n = (r = t) == null ? void 0 : r.name) != null ? n : "Autorun", a = !t.scheduler && !t.delay, l; if (a) l = new an(o, function() { this.track(d); }, t.onError, t.requiresObservable); else { var u = sv(t), c = !1; l = new an(o, function() { c || (c = !0, u(function() { c = !1, l.isDisposed || l.track(d); })); }, t.onError, t.requiresObservable); } function d() { e(l); } return (i = t) != null && (i = i.signal) != null && i.aborted || l.schedule_(), l.getDisposer_((s = t) == null ? void 0 : s.signal); } var fw = function(t) { return t(); }; function sv(e) { return e.scheduler ? e.scheduler : e.delay ? function(t) { return setTimeout(t, e.delay); } : fw; } function hw(e, t, n) { var r, i, s; n === void 0 && (n = Ld); var o = (r = n.name) != null ? r : "Reaction", a = Ye(o, n.onError ? pw(n.onError, t) : t), l = !n.scheduler && !n.delay, u = sv(n), c = !0, d = !1, f, y = n.compareStructural ? ai.structural : n.equals || ai.default, g = new an(o, function() { c || l ? m() : d || (d = !0, u(m)); }, n.onError, n.requiresObservable); function m() { if (d = !1, !g.isDisposed) { var k = !1, h = f; g.track(function() { var p = qg(!1, function() { return e(g); }); k = c || !y(f, p), f = p; }), (c && n.fireImmediately || !c && k) && a(f, h, g), c = !1; } } return (i = n) != null && (i = i.signal) != null && i.aborted || g.schedule_(), g.getDisposer_((s = n) == null ? void 0 : s.signal); } function pw(e, t) { return function() { try { return t.apply(this, arguments); } catch (n) { e.call(this, n); } }; } var mw = "onBO", gw = "onBUO"; function vw(e, t, n) { return av(mw, e, t, n); } function ov(e, t, n) { return av(gw, e, t, n); } function av(e, t, n, r) { var i = ec(t), s = Lt(r) ? r : n, o = e + "L"; return i[o] ? i[o].add(s) : i[o] = /* @__PURE__ */ new Set([s]), function() { var a = i[o]; a && (a.delete(s), a.size === 0 && delete i[o]); }; } function yw(e, t, n, r) { var i = tE(t); return br(function() { var s = Ni(e, r)[z]; Za(i).forEach(function(o) { s.extend_( o, i[o], // must pass "undefined" for { key: undefined } n && o in n ? n[o] : !0 ); }); }), e; } var kw = 0; function lv() { this.message = "FLOW_CANCELLED"; } lv.prototype = /* @__PURE__ */ Object.create(Error.prototype); var Yl = /* @__PURE__ */ jg("flow"), Sw = /* @__PURE__ */ jg("flow.bound", { bound: !0 }), li = /* @__PURE__ */ Object.assign(function(t, n) { if (Gs(n)) return Yl.decorate_20223_(t, n); if (fr(n)) return Ei(t, n, Yl); var r = t, i = r.name || "", s = function() { var a = this, l = arguments, u = ++kw, c = Ye(i + " - runid: " + u + " - init", r).apply(a, l), d, f = void 0, y = new Promise(function(g, m) { var k = 0; d = m; function h(S) { f = void 0; var _; try { _ = Ye(i + " - runid: " + u + " - yield " + k++, c.next).call(c, S); } catch (w) { return m(w); } v(_); } function p(S) { f = void 0; var _; try { _ = Ye(i + " - runid: " + u + " - yield " + k++, c.throw).call(c, S); } catch (w) { return m(w); } v(_); } function v(S) { if (Lt(S == null ? void 0 : S.then)) { S.then(v, m); return; } return S.done ? g(S.value) : (f = Promise.resolve(S.value), f.then(h, p)); } h(void 0); }); return y.cancel = Ye(i + " - runid: " + u + " - cancel", function() { try { f && Sh(f); var g = c.return(void 0), m = Promise.resolve(g.value); m.then(Mr, Mr), Sh(m), d(new lv()); } catch (k) { d(k); } }), y; }; return s.isMobXFlow = !0, s; }, Yl); li.bound = /* @__PURE__ */ Wt(Sw); function Sh(e) { Lt(e.cancel) && e.cancel(); } function gs(e) { return (e == null ? void 0 : e.isMobXFlow) === !0; } function _w(e, t) { return e ? ll(e) || !!e[z] || Fd(e) || oa(e) || il(e) : !1; } function uv(e) { return _w(e); } function en(e, t) { t === void 0 && (t = void 0), gt(); try { return e.apply(t); } finally { vt(); } } function cv(e, t, n) { return arguments.length === 1 || t && typeof t == "object" ? Ew(e, t) : dv(e, t, {}); } function dv(e, t, n) { var r; if (typeof n.timeout == "number") { var i = new Error("WHEN_TIMEOUT"); r = setTimeout(function() { if (!o[z].isDisposed) if (o(), n.onError) n.onError(i); else throw i; }, n.timeout); } n.name = "When"; var s = Mn("When-effect", t), o = ol(function(a) { var l = qg(!1, e); l && (a.dispose(), r && clearTimeout(r), s()); }, n); return o; } function Ew(e, t) { var n; if (t != null && (n = t.signal) != null && n.aborted) return Object.assign(Promise.reject(new Error("WHEN_ABORTED")), { cancel: function() { return null; } }); var r, i, s = new Promise(function(o, a) { var l, u = dv(e, o, $n({}, t, { onError: a })); r = function() { u(), a(new Error("WHEN_CANCELLED")); }, i = function() { u(), a(new Error("WHEN_ABORTED")); }, t == null || (l = t.signal) == null || l.addEventListener == null || l.addEventListener("abort", i); }).finally(function() { var o; return t == null || (o = t.signal) == null || o.removeEventListener == null ? void 0 : o.removeEventListener("abort", i); }); return s.cancel = r, s; } function xr(e) { return e[z]; } var ww = { has: function(t, n) { return xr(t).has_(n); }, get: function(t, n) { return xr(t).get_(n); }, set: function(t, n, r) { var i; return fr(n) ? (i = xr(t).set_(n, r, !0)) != null ? i : !0 : !1; }, deleteProperty: function(t, n) { var r; return fr(n) ? (r = xr(t).delete_(n, !0)) != null ? r : !0 : !1; }, defineProperty: function(t, n, r) { var i; return (i = xr(t).defineProperty_(n, r)) != null ? i : !0; }, ownKeys: function(t) { return xr(t).ownKeys_(); }, preventExtensions: function(t) { Y(13); } }; function Nw(e, t) { var n, r; return Rg(), e = Ni(e, t), (r = (n = e[z]).proxy_) != null ? r : n.proxy_ = new Proxy(e, ww); } function pt(e) { return e.interceptors_ !== void 0 && e.interceptors_.length > 0; } function qs(e, t) { var n = e.interceptors_ || (e.interceptors_ = []); return n.push(t), Ig(function() { var r = n.indexOf(t); r !== -1 && n.splice(r, 1); }); } function mt(e, t) { var n = Nr(); try { for (var r = [].concat(e.interceptors_ || []), i = 0, s = r.length; i < s && (t = r[i](t), t && !t.type && Y(14), !!t); i++) ; return t; } finally { sn(n); } } function xt(e) { return e.changeListeners_ !== void 0 && e.changeListeners_.length > 0; } function Qs(e, t) { var n = e.changeListeners_ || (e.changeListeners_ = []); return n.push(t), Ig(function() { var r = n.indexOf(t); r !== -1 && n.splice(r, 1); }); } function Rt(e, t) { var n = Nr(), r = e.changeListeners_; if (r) { r = r.slice(); for (var i = 0, s = r.length; i < s; i++) r[i](t); sn(n); } } function Aw(e, t, n) { return br(function() { var r, i = Ni(e, n)[z]; (r = t) != null || (t = oE(e)), Za(t).forEach(function(s) { return i.make_(s, t[s]); }); }), e; } var _h = "splice", qt = "update", bw = 1e4, Cw = { get: function(t, n) { var r = t[z]; return n === z ? r : n === "length" ? r.getArrayLength_() : typeof n == "string" && !isNaN(n) ? r.get_(parseInt(n)) : rn(aa, n) ? aa[n] : t[n]; }, set: function(t, n, r) { var i = t[z]; return n === "length" && i.setArrayLength_(r), typeof n == "symbol" || isNaN(n) ? t[n] = r : i.set_(parseInt(n), r), !0; }, preventExtensions: function() { Y(15); } }, Md = /* @__PURE__ */ function() { function e(n, r, i, s) { n === void 0 && (n = "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_ = i, this.legacyMode_ = s, this.atom_ = new zn(n), this.enhancer_ = function(o, a) { return r(o, a, "ObservableArray[..]"); }; } var t = e.prototype; return t.dehanceValue_ = function(r) { return this.dehancer !== void 0 ? this.dehancer(r) : r; }, t.dehanceValues_ = function(r) { return this.dehancer !== void 0 && r.length > 0 ? r.map(this.dehancer) : r; }, t.intercept_ = function(r) { return qs(this, r); }, t.observe_ = function(r, i) { return i === void 0 && (i = !1), i && r({ observableKind: "array", object: this.proxy_, debugObjectName: this.atom_.name_, type: "splice", index: 0, added: this.values_.slice(), addedCount: this.values_.length, removed: [], removedCount: 0 }), Qs(this, r); }, t.getArrayLength_ = function() { return this.atom_.reportObserved(), this.values_.length; }, t.setArrayLength_ = function(r) { (typeof r != "number" || isNaN(r) || r < 0) && Y("Out of range: " + r); var i = this.values_.length; if (r !== i) if (r > i) { for (var s = new Array(r - i), o = 0; o < r - i; o++) s[o] = void 0; this.spliceWithArray_(i, 0, s); } else this.spliceWithArray_(r, i - r); }, t.updateArrayLength_ = function(r, i) { r !== this.lastKnownLength_ && Y(16), this.lastKnownLength_ += i, this.legacyMode_ && i > 0 && yv(r + i + 1); }, t.spliceWithArray_ = function(r, i, s) { var o = this; this.atom_; var a = this.values_.length; if (r === void 0 ? r = 0 : r > a ? r = a : r < 0 && (r = Math.max(0, a + r)), arguments.length === 1 ? i = a - r : i == null ? i = 0 : i = Math.max(0, Math.min(i, a - r)), s === void 0 && (s = Wu), pt(this)) { var l = mt(this, { object: this.proxy_, type: _h, index: r, removedCount: i, added: s }); if (!l) return Wu; i = l.removedCount, s = l.added; } if (s = s.length === 0 ? s : s.map(function(d) { return o.enhancer_(d, void 0); }), this.legacyMode_) { var u = s.length - i; this.updateArrayLength_(a, u); } var c = this.spliceItemsIntoValues_(r, i, s); return (i !== 0 || s.length !== 0) && this.notifyArraySplice_(r, s, c), this.dehanceValues_(c); }, t.spliceItemsIntoValues_ = function(r, i, s) { if (s.length < bw) { var o; return (o = this.values_).splice.apply(o, [r, i].concat(s)); } else { var a = this.values_.slice(r, r + i), l = this.values_.slice(r + i); this.values_.length += s.length - i; for (var u = 0; u < s.length; u++) this.values_[r + u] = s[u]; for (var c = 0; c < l.length; c++) this.values_[r + s.length + c] = l[c]; return a; } }, t.notifyArrayChildUpdate_ = function(r, i, s) { var o = !this.owned_ && Xi(), a = xt(this), l = a || o ? { observableKind: "array", object: this.proxy_, type: qt, debugObjectName: this.atom_.name_, index: r, newValue: i, oldValue: s } : null; this.atom_.reportChanged(), a && Rt(this, l); }, t.notifyArraySplice_ = function(r, i, s) { var o = !this.owned_ && Xi(), a = xt(this), l = a || o ? { observableKind: "array", object: this.proxy_, debugObjectName: this.atom_.name_, type: _h, index: r, removed: s, added: i, removedCount: s.length, addedCount: i.length } : null; this.atom_.reportChanged(), a && Rt(this, l); }, t.get_ = function(r) { if (this.legacyMode_ && r >= this.values_.length) { console.warn("[mobx] Out of bounds read: " + r); return; } return this.atom_.reportObserved(), this.dehanceValue_(this.values_[r]); }, t.set_ = function(r, i) { var s = this.values_; if (this.legacyMode_ && r > s.length && Y(17, r, s.length), r < s.length) { this.atom_; var o = s[r]; if (pt(this)) { var a = mt(this, { type: qt, object: this.proxy_, // since "this" is the real array we need to pass its proxy index: r, newValue: i }); if (!a) return; i = a.newValue; } i = this.enhancer_(i, o); var l = i !== o; l && (s[r] = i, this.notifyArrayChildUpdate_(r, i, o)); } else { for (var u = new Array(r + 1 - s.length), c = 0; c < u.length - 1; c++) u[c] = void 0; u[u.length - 1] = i, this.spliceWithArray_(s.length, 0, u); } }, e; }(); function Ow(e, t, n, r) { return n === void 0 && (n = "ObservableArray"), r === void 0 && (r = !1), Rg(), br(function() { var i = new Md(n, t, r, !1); Lg(i.values_, z, i); var s = new Proxy(i.values_, Cw); return i.proxy_ = s, e && e.length && i.spliceWithArray_(0, 0, e), s; }); } var aa = { clear: function() { return this.splice(0); }, replace: function(t) { var n = this[z]; return n.spliceWithArray_(0, n.values_.length, t); }, // Used by JSON.stringify toJSON: function() { return this.slice(); }, /* * functions that do alter the internal structure of the array, (based on lib.es6.d.ts) * since these functions alter the inner structure of the array, the have side effects. * Because the have side effects, they should not be used in computed function, * and for that reason the do not call dependencyState.notifyObserved */ splice: function(t, n) { for (var r = arguments.length, i = new Array(r > 2 ? r - 2 : 0), s = 2; s < r; s++) i[s - 2] = arguments[s]; var o = this[z]; switch (arguments.length) { case 0: return []; case 1: return o.spliceWithArray_(t); case 2: return o.spliceWithArray_(t, n); } return o.spliceWithArray_(t, n, i); }, spliceWithArray: function(t, n, r) { return this[z].spliceWithArray_(t, n, r); }, push: function() { for (var t = this[z], n = arguments.length, r = new Array(n), i = 0; i < n; i++) r[i] = arguments[i]; return t.spliceWithArray_(t.values_.length, 0, r), t.values_.length; }, pop: function() { return this.splice(Math.max(this[z].values_.length - 1, 0), 1)[0]; }, shift: function() { return this.splice(0, 1)[0]; }, unshift: function() { for (var t = this[z], n = arguments.length, r = new Array(n), i = 0; i < n; i++) r[i] = arguments[i]; return t.spliceWithArray_(0, 0, r), t.values_.length; }, reverse: function() { return $.trackingDerivation && Y(37, "reverse"), this.replace(this.slice().reverse()), this; }, sort: function() { $.trackingDerivation && Y(37, "sort"); var t = this.slice(); return t.sort.apply(t, arguments), this.replace(t), this; }, remove: function(t) { var n = this[z], r = n.dehanceValues_(n.values_).indexOf(t); return r > -1 ? (this.splice(r, 1), !0) : !1; } }; te("at", lt); te("concat", lt); te("flat", lt); te("includes", lt); te("indexOf", lt); te("join", lt); te("lastIndexOf", lt); te("slice", lt); te("toString", lt); te("toLocaleString", lt); te("toSorted", lt); te("toSpliced", lt); te("with", lt); te("every", $t); te("filter", $t); te("find", $t); te("findIndex", $t); te("findLast", $t); te("findLastIndex", $t); te("flatMap", $t); te("forEach", $t); te("map", $t); te("some", $t); te("toReversed", $t); te("reduce", fv); te("reduceRight", fv); function te(e, t) { typeof Array.prototype[e] == "function" && (aa[e] = t(e)); } function lt(e) { return function() { var t = this[z]; t.atom_.reportObserved(); var n = t.dehanceValues_(t.values_); return n[e].apply(n, arguments); }; } function $t(e) { return function(t, n) { var r = this, i = this[z]; i.atom_.reportObserved(); var s = i.dehanceValues_(i.values_); return s[e](function(o, a) { return t.call(n, o, a, r); }); }; } function fv(e) { return function() { var t = this, n = this[z]; n.atom_.reportObserved(); var r = n.dehanceValues_(n.values_), i = arguments[0]; return arguments[0] = function(s, o, a) { return i(s, o, a, t); }, r[e].apply(r, arguments); }; } var Tw = /* @__PURE__ */ wr("ObservableArrayAdministration", Md); function al(e) { return Ya(e) && Tw(e[z]); } var xw = {}, En = "add", la = "delete", hv = /* @__PURE__ */ function() { function e(n, r, i) { var s = this; r === void 0 && (r = hr), i === void 0 && (i = "ObservableMap"), this.enhancer_ = void 0, this.name_ = void 0, this[z] = xw, 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_ = r, this.name_ = i, Lt(Map) || Y(18), br(function() { s.keysAtom_ = Mg("ObservableMap.keys()"), s.data_ = /* @__PURE__ */ new Map(), s.hasMap_ = /* @__PURE__ */ new Map(), n && s.merge(n); }); } var t = e.prototype; return t.has_ = function(r) { return this.data_.has(r); }, t.has = function(r) { var i = this; if (!$.trackingDerivation) return this.has_(r); var s = this.hasMap_.get(r); if (!s) { var o = s = new ar(this.has_(r), el, "ObservableMap.key?", !1); this.hasMap_.set(r, o), ov(o, function() { return i.hasMap_.delete(r); }); } return s.get(); }, t.set = function(r, i) { var s = this.has_(r); if (pt(this)) { var o = mt(this, { type: s ? qt : En, object: this, newValue: i, name: r }); if (!o) return this; i = o.newValue; } return s ? this.updateValue_(r, i) : this.addValue_(r, i), this; }, t.delete = function(r) { var i = this; if (this.keysAtom_, pt(this)) { var s = mt(this, { type: la, object: this, name: r }); if (!s) return !1; } if (this.has_(r)) { var o = Xi(), a = xt(this), l = a || o ? { observableKind: "map", debugObjectName: this.name_, type: la, object: this, oldValue: this.data_.get(r).value_, name: r } : null; return en(function() { var u; i.keysAtom_.reportChanged(), (u = i.hasMap_.get(r)) == null || u.setNewValue_(!1); var c = i.data_.get(r); c.setNewValue_(void 0), i.data_.delete(r); }), a && Rt(this, l), !0; } return !1; }, t.updateValue_ = function(r, i) { var s = this.data_.get(r); if (i = s.prepareNewValue_(i), i !== $.UNCHANGED) { var o = Xi(), a = xt(this), l = a || o ? { observableKind: "map", debugObjectName: this.name_, type: qt, object: this, oldValue: s.value_, name: r, newValue: i } : null; s.setNewValue_(i), a && Rt(this, l); } }, t.addValue_ = function(r, i) { var s = this; this.keysAtom_, en(function() { var u, c = new ar(i, s.enhancer_, "ObservableMap.key", !1); s.data_.set(r, c), i = c.value_, (u = s.hasMap_.get(r)) == null || u.setNewValue_(!0), s.keysAtom_.reportChanged(); }); var o = Xi(), a = xt(this), l = a || o ? { observableKind: "map", debugObjectName: this.name_, type: En, object: this, name: r, newValue: i } : null; a && Rt(this, l); }, t.get = function(r) { return this.has(r) ? this.dehanceValue_(this.data_.get(r).get()) : this.dehanceValue_(void 0); }, t.dehanceValue_ = function(r) { return this.dehancer !== void 0 ? this.dehancer(r) : r; }, t.keys = function() { return this.keysAtom_.reportObserved(), this.data_.keys(); }, t.values = function() { var r = this, i = this.keys(); return vs({ next: function() { var o = i.next(), a = o.done, l = o.value; return { done: a, value: a ? void 0 : r.get(l) }; } }); }, t.entries = function() { var r = this, i = this.keys(); return vs({ next: function() { var o = i.next(), a = o.done, l = o.value; return { done: a, value: a ? void 0 : [l, r.get(l)] }; } }); }, t[Symbol.iterator] = function() { return this.entries(); }, t.forEach = function(r, i) { for (var s = Ur(this), o; !(o = s()).done; ) { var a = o.value, l = a[0], u = a[1]; r.call(i, u, l, this); } }, t.merge = function(r) { var i = this; return Ar(r) && (r = new Map(r)), en(function() { Dn(r) ? eE(r).forEach(function(s) { return i.set(s, r[s]); }) : Array.isArray(r) ? r.forEach(function(s) { var o = s[0], a = s[1]; return i.set(o, a); }) : Si(r) ? (Z_(r) || Y(19, r), r.forEach(function(s, o) { return i.set(o, s); })) : r != null && Y(20, r); }), this; }, t.clear = function() { var r = this; en(function() { Kg(function() { for (var i = Ur(r.keys()), s; !(s = i()).done; ) { var o = s.value; r.delete(o); } }); }); }, t.replace = function(r) { var i = this; return en(function() { for (var s = Rw(r), o = /* @__PURE__ */ new Map(), a = !1, l = Ur(i.data_.keys()), u; !(u = l()).done; ) { var c = u.value; if (!s.has(c)) { var d = i.delete(c); if (d) a = !0; else { var f = i.data_.get(c); o.set(c, f); } } } for (var y = Ur(s.entries()), g; !(g = y()).done; ) { var m = g.value, k = m[0], h = m[1], p = i.data_.has(k); if (i.set(k, h), i.data_.has(k)) { var v = i.data_.get(k); o.set(k, v), p || (a = !0); } } if (!a) if (i.data_.size !== o.size) i.keysAtom_.reportChanged(); else for (var S = i.data_.keys(), _ = o.keys(), w = S.next(), A = _.next(); !w.done; ) { if (w.value !== A.value) { i.keysAtom_.reportChanged(); break; } w = S.next(), A = _.next(); } i.data_ = o; }), this; }, t.toString = function() { return "[object ObservableMap]"; }, t.toJSON = function() { return Array.from(this); }, t.observe_ = function(r, i) { return Qs(this, r); }, t.intercept_ = function(r) { return qs(this, r); }, _i(e, [{ key: "size", get: function() { return this.keysAtom_.reportObserved(), this.data_.size; } }, { key: Symbol.toStringTag, get: function() { return "Map"; } }]); }(), Ar = /* @__PURE__ */ wr("ObservableMap", hv); function Rw(e) { if (Si(e) || Ar(e)) return e; if (Array.isArray(e)) return new Map(e); if (Dn(e)) { var t = /* @__PURE__ */ new Map(); for (var n in e) t.set(n, e[n]); return t; } else return Y(21, e); } var Iw = {}, pv = /* @__PURE__ */ function() { function e(n, r, i) { var s = this; r === void 0 && (r = hr), i === void 0 && (i = "ObservableSet"), this.name_ = void 0, this[z] = Iw, this.data_ = /* @__PURE__ */ new Set(), this.atom_ = void 0, this.changeListeners_ = void 0, this.interceptors_ = void 0, this.dehancer = void 0, this.enhancer_ = void 0, this.name_ = i, Lt(Set) || Y(22), this.enhancer_ = function(o, a) { return r(o, a, i); }, br(function() { s.atom_ = Mg(s.name_), n && s.replace(n); }); } var t = e.prototype; return t.dehanceValue_ = function(r) { return this.dehancer !== void 0 ? this.dehancer(r) : r; }, t.clear = function() { var r = this; en(function() { Kg(function() { for (var i = Ur(r.data_.values()), s; !(s = i()).done; ) { var o = s.value; r.delete(o); } }); }); }, t.forEach = function(r, i) { for (var s = Ur(this), o; !(o = s()).done; ) { var a = o.value; r.call(i, a, a, this); } }, t.add = function(r) { var i = this; if (this.atom_, pt(this)) { var s = mt(this, { type: En, object: this, newValue: r }); if (!s) return this; } if (!this.has(r)) { en(function() { i.data_.add(i.enhancer_(r, void 0)), i.atom_.reportChanged(); }); var o = !1, a = xt(this), l = a || o ? { observableKind: "set", debugObjectName: this.name_, type: En, object: this, newValue: r } : null; a && Rt(this, l); } return this; }, t.delete = function(r) { var i = this; if (pt(this)) { var s = mt(this, { type: la, object: this, oldValue: r }); if (!s) return !1; } if (this.has(r)) { var o = !1, a = xt(this), l = a || o ? { observableKind: "set", debugObjectName: this.name_, type: la, object: this, oldValue: r } : null; return en(function() { i.atom_.reportChanged(), i.data_.delete(r); }), a && Rt(this, l), !0; } return !1; }, t.has = function(r) { return this.atom_.reportObserved(), this.data_.has(this.dehanceValue_(r)); }, t.entries = function() { var r = 0, i = Array.from(this.keys()), s = Array.from(this.values()); return vs({ next: function() { var a = r; return r += 1, a < s.length ? { value: [i[a], s[a]], done: !1 } : { done: !0 }; } }); }, t.keys = function() { return this.values(); }, t.values = function() { this.atom_.reportObserved(); var r = this, i = 0, s = Array.from(this.data_.values()); return vs({ next: function() { return i < s.length ? { value: r.dehanceValue_(s[i++]), done: !1 } : { done: !0 }; } }); }, t.intersection = function(r) { if (Zt(r)) return r.intersection(this); var i = new Set(this); return i.intersection(r); }, t.union = function(r) { if (Zt(r)) return r.union(this); var i = new Set(this); return i.union(r); }, t.difference = function(r) { return new Set(this).difference(r); }, t.symmetricDifference = function(r) { if (Zt(r)) return r.symmetricDifference(this); var i = new Set(this); return i.symmetricDifference(r); }, t.isSubsetOf = function(r) { return new Set(this).isSubsetOf(r); }, t.isSupersetOf = function(r) { return new Set(this).isSupersetOf(r); }, t.isDisjointFrom = function(r) { if (Zt(r)) return r.isDisjointFrom(this); var i = new Set(this); return i.isDisjointFrom(r); }, t.replace = function(r) { var i = this; return wi(r) && (r = new Set(r)), en(function() { Array.isArray(r) ? (i.clear(), r.forEach(function(s) { return i.add(s); })) : Zt(r) ? (i.clear(), r.forEach(function(s) { return i.add(s); })) : r != null && Y("Cannot initialize set from " + r); }), this; }, t.observe_ = function(r, i) { return Qs(this, r); }, t.intercept_ = function(r) { return qs(this, r); }, t.toJSON = function() { return Array.from(this); }, t.toString = function() { return "[object ObservableSet]"; }, t[Symbol.iterator] = function() { return this.values(); }, _i(e, [{ key: "size", get: function() { return this.atom_.reportObserved(), this.data_.size; } }, { key: Symbol.toStringTag, get: function() { return "Set"; } }]); }(), wi = /* @__PURE__ */ wr("ObservableSet", pv), Eh = /* @__PURE__ */ Object.create(null), wh = "remove", mv = /* @__PURE__ */ function() { function e(n, r, i, s) { r === void 0 && (r = /* @__PURE__ */ new Map()), s === void 0 && (s = IE), 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_ = n, this.values_ = r, this.name_ = i, this.defaultAnnotation_ = s, this.keysAtom_ = new zn("ObservableObject.keys"), this.isPlainObject_ = Dn(this.target_); } var t = e.prototype; return t.getObservablePropValue_ = function(r) { return this.values_.get(r).get(); }, t.setObservablePropValue_ = function(r, i) { var s = this.values_.get(r); if (s instanceof Ft) return s.set(i), !0; if (pt(this)) { var o = mt(this, { type: qt, object: this.proxy_ || this.target_, name: r, newValue: i }); if (!o) return null; i = o.newValue; } if (i = s.prepareNewValue_(i), i !== $.UNCHANGED) { var a = xt(this), l = !1, u = a || l ? { type: qt, observableKind: "object", debugObjectName: this.name_, object: this.proxy_ || this.target_, oldValue: s.value_, name: r, newValue: i } : null; s.setNewValue_(i), a && Rt(this, u); } return !0; }, t.get_ = function(r) { return $.trackingDerivation && !rn(this.target_, r) && this.has_(r), this.target_[r]; }, t.set_ = function(r, i, s) { return s === void 0 && (s = !1), rn(this.target_, r) ? this.values_.has(r) ? this.setObservablePropValue_(r, i) : s ? Reflect.set(this.target_, r, i) : (this.target_[r] = i, !0) : this.extend_(r, { value: i, enumerable: !0, writable: !0, configurable: !0 }, this.defaultAnnotation_, s); }, t.has_ = function(r) { if (!$.trackingDerivation) return r in this.target_; this.pendingKeys_ || (this.pendingKeys_ = /* @__PURE__ */ new Map()); var i = this.pendingKeys_.get(r); return i || (i = new ar(r in this.target_, el, "ObservableObject.key?", !1), this.pendingKeys_.set(r, i)), i.get(); }, t.make_ = function(r, i) { if (i === !0 && (i = this.defaultAnnotation_), i !== !1) { if (!(r in this.target_)) { var s; if ((s = this.target_[Bt]) != null && s[r]) return; Y(1, i.annotationType_, this.name_ + "." + r.toString()); } for (var o = this.target_; o && o !== Ja; ) { var a = na(o, r); if (a) { var l = i.make_(this, r, a, o); if (l === 0) return; if (l === 1) break; } o = Object.getPrototypeOf(o); } Ah(this, i, r); } }, t.extend_ = function(r, i, s, o) { if (o === void 0 && (o = !1), s === !0 && (s = this.defaultAnnotation_), s === !1) return this.defineProperty_(r, i, o); var a = s.extend_(this, r, i, o); return a && Ah(this, s, r), a; }, t.defineProperty_ = function(r, i, s) { s === void 0 && (s = !1), this.keysAtom_; try { gt(); var o = this.delete_(r); if (!o) return o; if (pt(this)) { var a = mt(this, { object: this.proxy_ || this.target_, name: r, type: En, newValue: i.value }); if (!a) return null; var l = a.newValue; i.value !== l && (i = $n({}, i, { value: l })); } if (s) { if (!Reflect.defineProperty(this.target_, r, i)) return !1; } else Gt(this.target_, r, i); this.notifyPropertyAddition_(r, i.value); } finally { vt(); } return !0; }, t.defineObservableProperty_ = function(r, i, s, o) { o === void 0 && (o = !1), this.keysAtom_; try { gt(); var a = this.delete_(r); if (!a) return a; if (pt(this)) { var l = mt(this, { object: this.proxy_ || this.target_, name: r, type: En, newValue: i }); if (!l) return null; i = l.newValue; } var u = Nh(r), c = { configurable: $.safeDescriptors ? this.isPlainObject_ : !0, enumerable: !0, get: u.get, set: u.set }; if (o) { if (!Reflect.defineProperty(this.target_, r, c)) return !1; } else Gt(this.target_, r, c); var d = new ar(i, s, "ObservableObject.key", !1); this.values_.set(r, d), this.notifyPropertyAddition_(r, d.value_); } finally { vt(); } return !0; }, t.defineComputedProperty_ = function(r, i, s) { s === void 0 && (s = !1), this.keysAtom_; try { gt(); var o = this.delete_(r); if (!o) return o; if (pt(this)) { var a = mt(this, { object: this.proxy_ || this.target_, name: r, type: En, newValue: void 0 }); if (!a) return null; } i.name || (i.name = "ObservableObject.key"), i.context = this.proxy_ || this.target_; var l = Nh(r), u = { configurable: $.safeDescriptors ? this.isPlainObject_ : !0, enumerable: !1, get: l.get, set: l.set }; if (s) { if (!Reflect.defineProperty(this.target_, r, u)) return !1; } else Gt(this.target_, r, u); this.values_.set(r, new Ft(i)), this.notifyPropertyAddition_(r, void 0); } finally { vt(); } return !0; }, t.delete_ = function(r, i) { if (i === void 0 && (i = !1), this.keysAtom_, !rn(this.target_, r)) return !0; if (pt(this)) { var s = mt(this, { object: this.proxy_ || this.target_, name: r, type: wh }); if (!s) return null; } try { var o; gt(); var a = xt(this), l = !1, u = this.values_.get(r), c = void 0; if (!u && (a || l)) { var d; c = (d = na(this.target_, r)) == null ? void 0 : d.value; } if (i) { if (!Reflect.deleteProperty(this.target_, r)) return !1; } else delete this.target_[r]; if (u && (this.values_.delete(r), u instanceof ar && (c = u.value_), ev(u)), this.keysAtom_.reportChanged(), (o = this.pendingKeys_) == null || (o = o.get(r)) == null || o.set(r in this.target_), a || l) { var f = { type: wh, observableKind: "object", object: this.proxy_ || this.target_, debugObjectName: this.name_, oldValue: c, name: r }; a && Rt(this, f); } } finally { vt(); } return !0; }, t.observe_ = function(r, i) { return Qs(this, r); }, t.intercept_ = function(r) { return qs(this, r); }, t.notifyPropertyAddition_ = function(r, i) { var s, o = xt(this), a = !1; if (o || a) { var l = o || a ? { type: En, observableKind: "object", debugObjectName: this.name_, object: this.proxy_ || this.target_, name: r, newValue: i } : null; o && Rt(this, l); } (s = this.pendingKeys_) == null || (s = s.get(r)) == null || s.set(!0), this.keysAtom_.reportChanged(); }, t.ownKeys_ = function() { return this.keysAtom_.reportObserved(), Za(this.target_); }, t.keys_ = function() { return this.keysAtom_.reportObserved(), Object.keys(this.target_); }, e; }(); function Ni(e, t) { var n; if (rn(e, z)) return e; var r = (n = t == null ? void 0 : t.name) != null ? n : "ObservableObject", i = new mv(e, /* @__PURE__ */ new Map(), String(r), zE(t)); return Xa(e, z, i), e; } var Pw = /* @__PURE__ */ wr("ObservableObjectAdministration", mv); function Nh(e) { return Eh[e] || (Eh[e] = { get: function() { return this[z].getObservablePropValue_(e); }, set: function(n) { return this[z].setObservablePropValue_(e, n); } }); } function ll(e) { return Ya(e) ? Pw(e[z]) : !1; } function Ah(e, t, n) { var r; (r = e.target_[Bt]) == null || delete r[n]; } var Lw = /* @__PURE__ */ vv(0), Fw = /* @__PURE__ */ function() { var e = !1, t = {}; return Object.defineProperty(t, "0", { set: function() { e = !0; } }), Object.create(t)[0] = 1, e === !1; }(), Xl = 0, gv = function() { }; function Dw(e, t) { Object.setPrototypeOf ? Object.setPrototypeOf(e.prototype, t) : e.prototype.__proto__ !== void 0 ? e.prototype.__proto__ = t : e.prototype = t; } Dw(gv, Array.prototype); var Ud = /* @__PURE__ */ function(e) { function t(r, i, s, o) { var a; return s === void 0 && (s = "ObservableArray"), o === void 0 && (o = !1), a = e.call(this) || this, br(function() { var l = new Md(s, i, o, !0); l.proxy_ = a, Lg(a, z, l), r && r.length && a.spliceWithArray(0, 0, r), Fw && Object.defineProperty(a, "0", Lw); }), a; } $g(t, e); var n = t.prototype; return n.concat = function() { this[z].atom_.reportObserved(); for (var i = arguments.length, s = new Array(i), o = 0; o < i; o++) s[o] = arguments[o]; return Array.prototype.concat.apply( this.slice(), //@ts-ignore s.map(function(a) { return al(a) ? a.slice() : a; }) ); }, n[Symbol.iterator] = function() { var r = this, i = 0; return vs({ next: function() { return i < r.length ? { value: r[i++], done: !1 } : { done: !0, value: void 0 }; } }); }, _i(t, [{ key: "length", get: function() { return this[z].getArrayLength_(); }, set: function(i) { this[z].setArrayLength_(i); } }, { key: Symbol.toStringTag, get: function() { return "Array"; } }]); }(gv); Object.entries(aa).forEach(function(e) { var t = e[0], n = e[1]; t !== "concat" && Xa(Ud.prototype, t, n); }); function vv(e) { return { enumerable: !1, configurable: !0, get: function() { return this[z].get_(e); }, set: function(n) { this[z].set_(e, n); } }; } function $w(e) { Gt(Ud.prototype, "" + e, vv(e)); } function yv(e) { if (e > Xl) { for (var t = Xl; t < e + 100; t++) $w(t); Xl = e; } } yv(1e3); function Mw(e, t, n) { return new Ud(e, t, n); } function ec(e, t) { if (typeof e == "object" && e !== null) { if (al(e)) return t !== void 0 && Y(23), e[z].atom_; if (wi(e)) return e.atom_; if (Ar(e)) { if (t === void 0) return e.keysAtom_; var n = e.data_.get(t) || e.hasMap_.get(t); return n || Y(25, t, tc(e)), n; } if (ll(e)) { if (!t) return Y(26); var r = e[z].values_.get(t); return r || Y(27, t, tc(e)), r; } if (Fd(e) || il(e) || oa(e)) return e; } else if (Lt(e) && oa(e[z])) return e[z]; Y(28); } function Uw(e, t) { if (e || Y(29), Fd(e) || il(e) || oa(e) || Ar(e) || wi(e)) return e; if (e[z]) return e[z]; Y(24, e); } function tc(e, t) { var n; if (t !== void 0) n = ec(e, t); else { if (sl(e)) return e.name; ll(e) || Ar(e) || wi(e) ? n = Uw(e) : n = ec(e); } return n.name_; } function br(e) { var t = Nr(), n = nl(!0); gt(); try { return e(); } finally { vt(), rl(n), sn(t); } } var bh = Ja.toString; function jd(e, t, n) { return n === void 0 && (n = -1), nc(e, t, n); } function nc(e, t, n, r, i) { if (e === t) return e !== 0 || 1 / e === 1 / t; if (e == null || t == null) return !1; if (e !== e) return t !== t; var s = typeof e; if (s !== "function" && s !== "object" && typeof t != "object") return !1; var o = bh.call(e); if (o !== bh.call(t)) return !1; switch (o) { case "[object RegExp]": case "[object String]": return "" + e == "" + t; case "[object Number]": return +e != +e ? +t != +t : +e == 0 ? 1 / +e === 1 / t : +e == +t; case "[object Date]": case "[object Boolean]": return +e == +t; case "[object Symbol]": return typeof Symbol < "u" && Symbol.valueOf.call(e) === Symbol.valueOf.call(t); case "[object Map]": case "[object Set]": n >= 0 && n++; break; } e = Ch(e), t = Ch(t); var a = o === "[object Array]"; if (!a) { if (typeof e != "object" || typeof t != "object") return !1; var l = e.constructor, u = t.constructor; if (l !== u && !(Lt(l) && l instanceof l && Lt(u) && u instanceof u) && "constructor" in e && "constructor" in t) return !1; } if (n === 0) return !1; n < 0 && (n = -1), r = r || [], i = i || []; for (var c = r.length; c--; ) if (r[c] === e) return i[c] === t; if (r.push(e), i.push(t), a) { if (c = e.length, c !== t.length) return !1; for (; c--; ) if (!nc(e[c], t[c], n - 1, r, i)) return !1; } else { var d = Object.keys(e), f; if (c = d.length, Object.keys(t).length !== c) return !1; for (; c--; ) if (f = d[c], !(rn(t, f) && nc(e[f], t[f], n - 1, r, i))) return !1; } return r.pop(), i.pop(), !0; } function Ch(e) { return al(e) ? e.slice() : Si(e) || Ar(e) || Zt(e) || wi(e) ? Array.from(e.entries()) : e; } function vs(e) { return e[Symbol.iterator] = jw, e; } function jw() { return this; } ["Symbol", "Map", "Set"].forEach(function(e) { var t = Tg(); typeof t[e] > "u" && Y("MobX requires global '" + e + "' to be available or polyfilled"); }); typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__ == "object" && __MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({ spy: ow, extras: { getDebugName: tc }, $mobx: z }); function Vw(e, t = []) { D.useEffect(() => { const n = ol(e); return () => n(); }, t); } function kv(e, t = {}) { const { defaultValue: n, deps: r = [] } = t, i = D.useMemo(() => e, r), [s, o] = D.useState( () => i() || n ); return D.useEffect(() => { const a = ol(() => o(i())); return () => a(); }, [i, ...r]), s; } function Bw(e, t, n = []) { const r = D.useMemo(() => e, n), i = D.useMemo(() => t, n); D.useEffect(() => { const s = hw(r, i); return () => s(); }, [r, i]); } var Sv = { exports: {} }, ul = {}; /** * @license React * react-jsx-runtime.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var zw = D, Hw = Symbol.for("react.element"), Gw = Symbol.for("react.fragment"), Ww = Object.prototype.hasOwnProperty, qw = zw.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, Qw = { key: !0, ref: !0, __self: !0, __source: !0 }; function _v(e, t, n) { var r, i = {}, s = null, o = null; n !== void 0 && (s = "" + n), t.key !== void 0 && (s = "" + t.key), t.ref !== void 0 && (o = t.ref); for (r in t) Ww.call(t, r) && !Qw.hasOwnProperty(r) && (i[r] = t[r]); if (e && e.defaultProps) for (r in t = e.defaultProps, t) i[r] === void 0 && (i[r] = t[r]); return { $$typeof: Hw, type: e, key: s, ref: o, props: i, _owner: qw.current }; } ul.Fragment = Gw; ul.jsx = _v; ul.jsxs = _v; Sv.exports = ul; var ys = Sv.exports; let Vd = /* @__PURE__ */ new Map(); const rc = D.createContext(Vd), Kw = ({ children: e, stores: t }) => { const n = D.useContext(rc), r = D.useMemo(() => { const i = /* @__PURE__ */ new Map(); return t.forEach((s) => i.set(s.class, s.value)), Vd = new Map([...n, ...i]); }, []); return /* @__PURE__ */ ys.jsx(rc.Provider, { value: r, children: e }); }; function Jw(e) { return D.useContext(rc).get(e); } function Yw(e) { return Vd.get(e); } class Ev { constructor(t, n) { O(this, "logger"); O(this, "channel"); O(this, "listeners", /* @__PURE__ */ new Map()); O(this, "eventQueue", /* @__PURE__ */ new Map()); this.logger = St.withPrefix(n, "EventBus"); try { this.logger.debug(`Creating BroadcastChannel with name "${t}"`), this.channel = new BroadcastChannel(t), this.channel.onmessage = (r) => this.handleMessage(r), this.channel.onmessageerror = (r) => this.logger.error("NizzaBroadcastChannel error:", r); } catch (r) { throw this.logger.error("Failed to create NizzaBroadcastChannel:", r), r; } } /** * Subscribe a listener function to a specific event with wildcards. * * @param {string} pattern - The event name to subscribe to. You can use wildcards like 'user:*' or 'chat:**'. * @param {EventBusListener} listener - The listener function to handle the event. * @returns {EventBusSubscription} - A subscription object that includes the event name and the `off()` function for unsubscribing. * @example * const subscription = eventBus.on('user:*', (event) => { * console.log('User event:', event.name); * }); * const chatSubscription = eventBus.on('chat:**', (event) => { * console.log('Chat event:', event.name); * }); */ on(t, n) { return this.logger.debug(`Subscribing to pattern "${t}"`), this.subscribeToEvent(t, n), { off: () => this.unsubscribeFromEvent(t, n) }; } /** * Emit an event through the BroadcastChannel. * * @param {string} event - The event name to emit. * @param {any} data - The data associated with the event. * @param {Attributes} attrs - Optional attributes associated with the event. * @example * // Emit a user login event * eventBus.emit('user:login', { username: 'user123' }); * * // Emit a chat message event * eventBus.emit('chat:message', { text: 'Hello, world!' }); */ emit(t, n, r = {}) { this.logger.debug(`Emitting event "${t}" with data`, n), this.emitEvent(t, n, r); } /** * Handle messages received through the BroadcastChannel and call the corresponding listener functions. * * @private * @param {MessageEvent} event - The received message event. */ handleMessage(t) { const n = t.data, { name: r } = n; this.logger.debug(`Received message "${r}" with data`, n); for (const [i, s] of this.listeners.entries()) this.matchWildcard(i, r) && (this.logger.debug(`Matching pattern "${i}" for event "${r}"`), s.forEach( (o) => o({ ...n, wildcard: i }) )); } /** * Subscribe a listener function to a specific event. * * @private * @param {string} pattern - The pattern to subscribe to. * @param {EventBusListener} listener - The listener function to handle the event. */ subscribeToEvent(t, n) { if (typeof t != "string" || typeof n != "function") { const i = new Error("Invalid arguments"); throw this.logger.error(i), i; } this.listeners.has(t) || (this.logger.debug(`Adding new pattern "${t}"`), this.listeners.set(t, /* @__PURE__ */ new Set())); const r = Array.from(this.eventQueue).filter(([i]) => { const s = this.matchWildcard(t, i); return s && (this.eventQueue.delete(i), this.logger.debug(`Dequeued pending events for "${i}".`)), s; }).flatMap(([, i]) => i); for (const [i, s] of this.listeners.entries()) this.matchWildcard(i, t) && (this.logger.debug(`Adding listener to pattern "${i}"`), s.add(n), r.length && (this.logger.debug(`Delivering pending events for "${t}".`), r.forEach((o) => { n({ ...o, wildcard: i }); }))); } /** * Emit an event and deliver it to the corresponding listeners. * * @private * @param {string} event - The event name to emit. * @param {any} data - The data associated with the event. * @param {Attributes} attrs - Optional attributes associated with the event. */ emitEvent(t, n, r) { if (typeof t != "string") { const o = new Error("Invalid arguments"); throw this.logger.error(o), o; } const i = { name: t, data: n, attrs: r }, s = Array.from(this.getMatchingListeners(t)); if (s.length) { this.logger.debug(`Delivering event "${t}" to listeners`); for (const [o, a] of s) a({ ...i, wildcard: o }); } else this.logger.debug(`No listeners for event "${t}", enqueuing`), this.eventQueue.has(t) || this.eventQueue.set(t, []), this.eventQueue.get(t).push(i); this.logger.debug("Posting message to channel", i), this.channel.postMessage(i); } /** * Get listeners that match the event name pattern. * * @private * @param {string} event - The event name to match. * @returns {Iterable<[string, EventBusListener]>} - Iterable of matching listeners and their patterns. */ *getMatchingListeners(t) { this.logger.debug(`Getting matching listeners for event "${t}"`); for (const [n, r] of this.listeners.entries()) if (this.matchWildcard(n, t)) for (const i of r) yield [n, i]; } /** * Unsubscribe a listener function from a specific event. * * @private * @param {string} event - The event name to unsubscribe from. * @param {EventBusListener} listener - The listener function to unsubscribe. */ unsubscribeFromEvent(t, n) { if (this.listeners.has(t)) { this.logger.debug(`Unsubscribing from event "${t}"`); const r = this.listeners.get(t); r.delete(n), r.size === 0 && (this.logger.debug(`No more listeners for event "${t}", deleting`), this.listeners.delete(t)); } } /** * Match wildcards in event names. * * @private * @param {string} wildcard - The wildcard pattern to match. * @param {string} pattern - The event name to check. * @returns {boolean} - `true` if the event name matches the pattern, otherwise `false`. */ matchWildcard(t, n) { const r = t.replace(/\*/g, "[^:]*").replace(/\*\*/g, ".*"), s = new RegExp(`^${r}$`).test(n); return this.logger.debug( `Wildcard "${t}" matches with pattern "${n}": ${s}` ), s; } } const Xw = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"; let Zw = (e = 21) => { let t = "", n = crypto.getRandomValues(new Uint8Array(e)); for (; e--; ) t += Xw[n[e] & 63]; return t; }; const Un = (e = 8) => Zw(e), lr = (e, t = !1) => { const n = Object.entries(e).reduce((r, [i, s]) => s !== void 0 && (!t || s !== null) ? `${r}${r ? "&" : ""}${i}=${s}` : r, ""); return n ? `?${n}` : ""; }, wv = (e) => { const t = document.getElementById(e); return t ? new URL(t.src).searchParams : new URLSearchParams(); }; function eN() { const e = new Error().stack.split(` `); return e.length < 3 ? "" : e[2].trim().substring(3); } function Nv(e) { return new Promise((t) => setTimeout(t, e)); } var Av = { exports: {} }; (function(e) { (function(t, n) { e.exports ? e.exports = n() : t.log = n(); })(bd, function() { var t = function() { }, n = "undefined", r = typeof window !== n && typeof window.navigator !== n && /Trident\/|MSIE /.test(window.navigator.userAgent), i = [ "trace", "debug", "info", "warn", "error" ], s = {}, o = null; function a(m, k) { var h = m[k]; if (typeof h.bind == "function") return h.bind(m); try { return Function.prototype.bind.call(h, m); } catch { return function() { return Function.prototype.apply.apply(h, [m, arguments]); }; } } function l() { console.log && (console.log.apply ? console.log.apply(console, arguments) : Function.prototype.apply.apply(console.log, [console, arguments])), console.trace && console.trace(); } function u(m) { return m === "debug" && (m = "log"), typeof console === n ? !1 : m === "trace" && r ? l : console[m] !== void 0 ? a(console, m) : console.log !== void 0 ? a(console, "log") : t; } function c() { for (var m = this.getLevel(), k = 0; k < i.length; k++) { var h = i[k]; this[h] = k < m ? t : this.methodFactory(h, m, this.name); } if (this.log = this.debug, typeof console === n && m < this.levels.SILENT) return "No console available for logging"; } function d(m) { return function() { typeof console !== n && (c.call(this), this[m].apply(this, arguments)); }; } function f(m, k, h) { return u(m) || d.apply(this, arguments); } function y(m, k) { var h = this, p, v, S, _ = "loglevel"; typeof m == "string" ? _ += ":" + m : typeof m == "symbol" && (_ = void 0); function w(P) { var W = (i[P] || "silent").toUpperCase(); if (!(typeof window === n || !_)) { try { window.localStorage[_] = W; return; } catch { } try { window.document.cookie = encodeURIComponent(_) + "=" + W + ";"; } catch { } } } function A() { var P; if (!(typeof window === n || !_)) { try { P = window.localStorage[_]; } catch { } if (typeof P === n) try { var W = window.document.cookie, me = encodeURIComponent(_), E = W.indexOf(me + "="); E !== -1 && (P = /^([^;]+)/.exec( W.slice(E + me.length + 1) )[1]); } catch { } return h.levels[P] === void 0 && (P = void 0), P; } } function b() { if (!(typeof window === n || !_)) { try { window.localStorage.removeItem(_); } catch { } try { window.document.cookie = encodeURIComponent(_) + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC"; } catch { } } } function I(P) { var W = P; if (typeof W == "string" && h.levels[W.toUpperCase()] !== void 0 && (W = h.levels[W.toUpperCase()]), typeof W == "number" && W >= 0 && W <= h.levels.SILENT) return W; throw new TypeError("log.setLevel() called with invalid level: " + P); } h.name = m, h.levels = { TRACE: 0, DEBUG: 1, INFO: 2, WARN: 3, ERROR: 4, SILENT: 5 }, h.methodFactory = k || f, h.getLevel = function() { return S ?? v ?? p; }, h.setLevel = function(P, W) { return S = I(P), W !== !1 && w(S), c.call(h); }, h.setDefaultLevel = function(P) { v = I(P), A() || h.setLevel(P, !1); }, h.resetLevel = function() { S = null, b(), c.call(h); }, h.enableAll = function(P) { h.setLevel(h.levels.TRACE, P); }, h.disableAll = function(P) { h.setLevel(h.levels.SILENT, P); }, h.rebuild = function() { if (o !== h && (p = I(o.getLevel())), c.call(h), o === h) for (var P in s) s[P].rebuild(); }, p = I( o ? o.getLevel() : "WARN" ); var F = A(); F != null && (S = I(F)), c.call(h); } o = new y(), o.getLogger = function(k) { if (typeof k != "symbol" && typeof k != "string" || k === "") throw new TypeError("You must supply a name when creating a logger."); var h = s[k]; return h || (h = s[k] = new y( k, o.methodFactory )), h; }; var g = typeof window !== n ? window.log : void 0; return o.noConflict = function() { return typeof window !== n && window.log === o && (window.log = g), o; }, o.getLoggers = function() { return s; }, o.default = o, o; }); })(Av); var ic = Av.exports; const Zl = /* @__PURE__ */ qa(ic); var bv = { exports: {} }; (function(e) { (function(t, n) { e.exports ? e.exports = n() : t.prefix = n(t); })(bd, function(t) { var n = function(c) { for (var d = 1, f = arguments.length, y; d < f; d++) for (y in arguments[d]) Object.prototype.hasOwnProperty.call(arguments[d], y) && (c[y] = arguments[d][y]); return c; }, r = { template: "[%t] %l:", levelFormatter: function(c) { return c.toUpperCase(); }, nameFormatter: function(c) { return c || "root"; }, timestampFormatter: function(c) { return c.toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/, "$1"); }, format: void 0 }, i, s = {}, o = function(c) { if (!c || !c.getLogger) throw new TypeError("Argument is not a root logger"); i = c; }, a = function(c, d) { if (!c || !c.setLevel) throw new TypeError("Argument is not a logger"); var f = c.methodFactory, y = c.name || "", g = s[y] || s[""] || r; function m(k, h, p) { var v = f(k, h, p), S = s[p] || s[""], _ = S.template.indexOf("%t") !== -1, w = S.template.indexOf("%l") !== -1, A = S.template.indexOf("%n") !== -1; return function() { for (var b = "", I = arguments.length, F = Array(I), P = 0; P < I; P++) F[P] = arguments[P]; if (y || !s[p]) { var W = S.timestampFormatter(/* @__PURE__ */ new Date()), me = S.levelFormatter(k), E = S.nameFormatter(p); S.format ? b += S.format(me, E, W) : (b += S.template, _ && (b = b.replace(/%t/, W)), w && (b = b.replace(/%l/, me)), A && (b = b.replace(/%n/, E))), F.length && typeof F[0] == "string" ? F[0] = b + " " + F[0] : F.unshift(b); } v.apply(void 0, F); }; } return s[y] || (c.methodFactory = m), d = d || {}, d.template && (d.format = void 0), s[y] = n({}, g, d), c.setLevel(c.getLevel()), i || c.warn( "It is necessary to call the function reg() of loglevel-plugin-prefix before calling apply. From the next release, it will throw an error. See more: https://github.com/kutuluk/loglevel-plugin-prefix/blob/master/README.md" ), c; }, l = { reg: o, apply: a }, u; return t && (u = t.prefix, l.noConflict = function() { return t.prefix === l && (t.prefix = u), l; }), l; }); })(bv); var tN = bv.exports; const Oh = /* @__PURE__ */ qa(tN); var An; let St = (An = class { constructor(t = "") { O(this, "provider", Zl); O(this, "defaultLevel", this.getDefaultLevel()); this.namePrefix = t, this.namePrefix = t ? `${t}-` : "", this.provider.setDefaultLevel(this.defaultLevel), Oh.reg(Zl), Oh.apply(Zl, { template: "%l [%n]", nameFormatter: (n) => (n == null ? void 0 : n.toLowerCase()) ?? "", timestampFormatter: () => (/* @__PURE__ */ new Date()).toTimeString().slice(0, 8) }); } createLogger(t) { const n = `${this.namePrefix}${t.toLowerCase()}`, r = this.provider.getLogger(n), i = localStorage.getItem( `loglevel:${n}` ); return r.setLevel(i || this.defaultLevel), r; } static withPrefix(t, n) { const r = /\(\w+\)/, i = { get(s, o) { const a = s[o]; return typeof a == "function" && An.LOG_METHODS.includes(o) ? (...l) => (typeof l[0] == "string" && !r.test(l[0]) && (l[0] = `(${n}) ${l[0]}`), a.apply(s, l)) : a; } }; return new Proxy(t, i); } getDefaultLevel() { const t = localStorage.getItem("loglevel"); return An.LOG_METHODS.reduce((r, i) => { const s = i.toUpperCase(); return r[s] = ic.levels[s], r; }, {})[t == null ? void 0 : t.toUpperCase()] ?? ic.levels.INFO; } }, O(An, "LOG_METHODS", [ "trace", "debug", "info", "warn", "error", "log" ]), An); const dt = class dt { constructor() { O(this, "instanceId", Un()); O(this, "log", new St("nz")); O(this, "coreLogger", this.log.createLogger("core")); O(this, "_config", null); O(this, "_account"); O(this, "_accountStatus", "idle"); O(this, "_productDataSource"); O(this, "_eventBus", new Ev("nizza", this.coreLogger)); // Track the current account fetch request ID O(this, "activeAccountFetchId", null); this.coreLogger = St.withPrefix( this.coreLogger, `NizzaStore:${this.instanceId}` ), Aw( this, { _config: pe, _account: pe, _productDataSource: pe, _accountStatus: pe, config: _n, account: _n, accountName: _n, accountStatus: _n, setAccount: Ye, configure: Ye, refetchAccount: Ye, setProductDataSource: Ye, setAddToCartConfig: Ye, setProductId: Ye }, { name: "NizzaStore", autoBind: !0 } ), this.refetchAccount = this.refetchAccount.bind(this); } static instance() { var n; if (!!((n = window == null ? void 0 : window.nizza) != null && n.store)) dt._instance = window.nizza.store; else { const r = new dt(); dt._instance = r, dt._instance.coreLogger.debug("Created new NizzaStore instance"); } return window.nizza || (window.nizza = {}, window.nz = {}, dt._instance.coreLogger.debug("Initialized nizza window object")), window.nizza.store = dt._instance, window.nz = window.nizza, dt._instance; } async configure(t) { try { this.coreLogger.debug("Running configure with config:", t), await this.updateConfig(t); } catch (n) { this.setAccountStatus("error"), this.coreLogger.error("Error running configure", n); } } async updateConfig(t = {}) { var i; const { account: n, authToken: r } = this._config ?? {}; this._config = { ...this._config, ...t }, (i = this._config) != null && i.account && (n !== this._config.account || r !== this._config.authToken) ? (this.coreLogger.debug( `Fetching account data for account: ${this._config.account}, authToken provided: ${!!this._config.authToken}` ), await this.fetchAccount(this._config.account, this._config.authToken)) : this.coreLogger.debug( "Skipped fetching account data as the account or authToken did not change" ), t.getProductDataSource && this.setProductDataSource(await t.getProductDataSource()); } async fetchAccount(t, n) { this.setAccountStatus("loading"); const r = Un(); this.activeAccountFetchId = r; try { const i = await jv(t, n); if (this.activeAccountFetchId !== r) { this.coreLogger.debug( "Fetch account request was superseded by a newer request" ); return; } this.setAccount(i), this.setAccountStatus("success"), this.coreLogger.debug("Account fetched and set successfully:", i); } catch (i) { this.activeAccountFetchId === r && (this.setAccountStatus("error"), this.coreLogger.error("Error fetching account:", i)); } } setAccount(t) { this._account = t; } setAccountStatus(t) { this._accountStatus = t; } setProductDataSource(t) { this._productDataSource = t; } setProductId(t) { this._config && (this._config.productId = t); } setOrderFormId(t) { this._config && (this._config.orderFormId = t); } setAddToCartConfig(t) { if (!this._config) { const n = "You cannot set addToCartConfig before running configure()"; throw this.coreLogger.error(n), new Error(n); } this._config.addToCartConfig = t; } setAuthToken(t) { this.updateConfig({ authToken: t }); } async refetchAccount() { var t; (t = this._config) != null && t.account && await this.fetchAccount(this._config.account, this._config.authToken); } get version() { return dt.version; } get config() { return this._config; } get account() { return this._account; } get accountStatus() { return this._accountStatus; } get accountName() { var t; return (t = this._config) == null ? void 0 : t.account; } isPvtAccount(t) { var n; return !!(t && ((n = this._config) != null && n.authToken)); } isPubAccount(t) { var n; return !!(t && !((n = this._config) != null && n.authToken)); } get productDataSource() { return this._productDataSource; } get eventBus() { return this._eventBus; } }; O(dt, "version", "7"), O(dt, "_instance"); let ua = dt; const Le = (e) => { const t = ua.instance(); return cv( () => !!t.account, () => e == null ? void 0 : e(t) ), t; }; function Bd() { return D.useMemo(() => Le(), []); } function Cv(e, t) { const n = Bd(); return kv(() => e(n), t); } const { coreLogger: nN } = Le(), rN = St.withPrefix(nN, "CustomFetch"); async function tt(e) { const { url: t, method: n = "GET", body: r, raw: i = !1, contentTypeJson: s = !0, timeout: o, ...a } = e, l = new Headers({ ...s ? { "content-type": "application/json" } : {}, ...e.headers }); try { const u = new AbortController(), { signal: c } = u; let d; const f = fetch(t, { method: n, headers: l, body: r, signal: c, ...a }); o && (d = setTimeout(() => { u.abort(); }, o)); const y = await f; if (i) return y; const g = await y.json(); if (clearTimeout(d), !y.ok) { const m = g ? JSON.stringify(g) : y.statusText; throw new Error(m); } return g; } catch (u) { throw rN.error(u), u; } } const sc = (e) => tt({ ...e, contentTypeJson: !1, raw: !1 }); function iN(e, t, n) { fetch(t).then((r) => r.blob()).then((r) => Ov(r, `${e}.${n}`)); } const Ov = (e, t, n) => { const r = [e], i = new Blob(r, { type: n ?? "application/octet-stream" }); if (typeof window.navigator.msSaveBlob < "u") return window.navigator.msSaveBlob(i, t); const s = window.URL && window.URL.createObjectURL ? window.URL.createObjectURL(i) : window.webkitURL.createObjectURL(i), o = document.createElement("a"); return o.style.display = "none", o.href = s, o.setAttribute("download", t), typeof o.download > "u" && o.setAttribute("target", "_blank"), document.body.appendChild(o), o.click(), setTimeout(() => { document.body.removeChild(o), window.URL.revokeObjectURL(s); }, 200); }, { coreLogger: sN } = Le(), oN = St.withPrefix(sN, "getClientTimeZone"); function aN() { var r, i; let e = null, t = null, n = null; try { e = ((i = (r = Intl.DateTimeFormat()) == null ? void 0 : r.resolvedOptions()) == null ? void 0 : i.timeZone) ?? null; const s = -(/* @__PURE__ */ new Date()).getTimezoneOffset(); n = s; const o = s >= 0 ? "+" : "-", a = String( Math.floor(Math.abs(s) / 60) ).padStart(2, "0"), l = String(Math.abs(s) % 60).padStart( 2, "0" ); t = `${o}${a}:${l}`; } catch { oN.error("Error obtaining time zone or offset"); } return { offset: t, offsetValue: n, value: e, country: null, included: null, label: null }; } var jr = /* @__PURE__ */ ((e) => (e.VTEX = "VTEX", e.VTEX_IO = "VTEX-IO", e.VTEX_CMS = "PORTAL-VTEX", e.PLATFORM = "PLATFORM", e.UNKNOWN = "UNKNOWN", e))(jr || {}), Tv = /* @__PURE__ */ ((e) => (e.PLATFORM = "platform_module", e.ADENDA = "subscription_module", e.APP_STORE = "app_store", e))(Tv || {}), xv = /* @__PURE__ */ ((e) => (e.ACTIVE = "active_contract", e.INACTIVE = "inactive_contract", e))(xv || {}), Rv = /* @__PURE__ */ ((e) => (e.LITE = "lite", e.STANDARD = "standard", e.PRO = "pro", e))(Rv || {}), Iv = /* @__PURE__ */ ((e) => (e.LITE = "PLAN_LITE", e.STANDARD = "PLAN_ESTANDAR", e.PRO = "PLAN_PRO", e.NONE = "NO_PLAN", e))(Iv || {}), Pv = /* @__PURE__ */ ((e) => (e.PAST = "past", e.LIVE = "live", e.FUTURE = "future", e))(Pv || {}); class Lv extends Er { constructor(t) { super("CREATE_PLAN_ERROR", `Error creating plan: ${t.plan}`, t); } } const Th = `${Bn.apiUrls.restV1}/plans`; class Fv { async get(t) { const r = `/info${lr({ planType: t })}`, i = Th + r, { data: s } = await tt({ url: i }); return s; } async create(t) { const n = `${Th}/create`, { success: r } = await tt({ url: n, method: "POST", body: JSON.stringify(t) }); if (!r) throw new Lv(t); } } function lN(e) { const { host: t, account: n, username: r, createdAt: i, subscriptionType: s, installationDateApp: o, ...a } = e; return { ...a, account: n, host: t ?? null, username: r ?? n, createdAt: new Date(i), subscriptionType: s ?? null, installationDateApp: new Date(o) }; } function uN(e) { const { host: t, ...n } = e; return { ...n, host: t ?? null, plan: {} }; } const cN = `${Bn.apiUrls.restV1}/accounts/v2`; class Dv { async get(t) { const n = `${cN}/${t}`, { data: r } = await tt({ url: n }); return r ? uN(r) : null; } } const dN = `${Bn.apiUrls.restV1}/accounts/v2/pvt`; class fN { async get(t, n) { const r = `${dN}/${t}`, { data: i } = await tt({ url: r, headers: { authorization: `Bearer ${n}` } }); return i ? lN(i) : null; } } class $v { constructor(t, n, r) { this.publicAccountRepo = t, this.privateAccountRepo = n, this.accountPlanRepo = r; } // async get(name: string, authToken: string): Promise; // async get(name: string, authToken?: undefined): Promise; async get(t, n) { try { const r = n ? await this.privateAccountRepo.get(t, n) : await this.publicAccountRepo.get(t); if (!r) throw new ps(t); const i = await this.accountPlanRepo.get(r.descriptionPlan); if (!i) throw new ps(r.descriptionPlan); return { ...r, plan: i }; } catch (r) { throw new je(r); } } } const hN = new Dv(), pN = new fN(), mN = new Fv(), Mv = new $v( hN, pN, mN ), Uv = () => { const { account: e, accountName: t, accountStatus: n, refetchAccount: r, isPvtAccount: i, isPubAccount: s } = Cv((u) => ({ account: u.account, accountName: u.accountName, accountStatus: u.accountStatus, refetchAccount: u.refetchAccount, isPvtAccount: u.isPvtAccount, isPubAccount: u.isPubAccount })), o = ["idle", "loading"].includes(n); return { account: e, accountName: t, isLoading: o, isError: n === "error", isSuccess: n === "success", accountStatus: n, refetchAccount: r, isPvtAccount: i, isPubAccount: s }; }; async function jv(e, t) { return Mv.get(e, t); } var Vv = /* @__PURE__ */ ((e) => (e.CREATED = "CREATED", e.STARTING = "STARTING", e.LIVE = "LIVE", e.FINALIZED = "FINALIZED", e))(Vv || {}); const gN = { ALL: "*", CORE: "core:**", ADD_TO_CART_HOOKS: "core:addToCartHooks:**", LIVE_STREAMING_EVENT: "event:**", EVENT_CHAT: "event:chat:**", EVENT_PRODUCTS: "event:products:**", CUSTOMIZE_LIVE: "customize-live:**", PLAYER: "player:**", SNACK_SIZE_VIDEO: "ssv:**", SNACK_SIZE_VIDEO_ADMIN: "ssv-admin:**", UI: "ui:**", UTILS: "utils:**" }, Bv = { EVENT_STATUS_CHANGED: "event:statusChanged", /** AddToCartHook events */ ATCH_ACTION_EXECUTED: "core:addToCartHooks:actionExecuted" }; var zv = /* @__PURE__ */ ((e) => (e.English = "en", e.Spanish = "es", e.Portuguese = "pt", e))(zv || {}), Hv = /* @__PURE__ */ ((e) => (e.COMBO = "Combo", e.BADGE = "Badged", e))(Hv || {}), bn = /* @__PURE__ */ ((e) => (e.VTEX = "VTEX", e.PLATFORM = "platform", e.CACE = "CACE", e.GLOBAL_PAGE = "globalPage", e.CUSTOMIZATION = "customization", e.FAST_STORE = "faststore", e.UNKNOWN = "unknown", e))(bn || {}); const vN = 4; var Gv = /* @__PURE__ */ ((e) => (e.Created = "CREATED", e.Finalized = "FINALIZED", e.Live = "LIVE", e.Starting = "STARTING", e))(Gv || {}), Wv = /* @__PURE__ */ ((e) => (e.Add = "add", e.Remove = "remove", e))(Wv || {}), qv = /* @__PURE__ */ ((e) => (e.Active = "active", e.Inactive = "inactive", e))(qv || {}); const Qv = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "AddCollection" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "CreateCollectionInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "createCollection" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "CollectionSuccess" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, Kv = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "DeleteCollection" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "QueryInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "deleteCollection" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, Jv = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FindCollection" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "QueryInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "findCollection" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "CollectionSuccess" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "account" } }, { kind: "Field", name: { kind: "Name", value: "name" } }, { kind: "Field", name: { kind: "Name", value: "description" } }, { kind: "Field", name: { kind: "Name", value: "status" } }, { kind: "Field", name: { kind: "Name", value: "createdat" } }, { kind: "Field", name: { kind: "Name", value: "products" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "account" } }, { kind: "Field", name: { kind: "Name", value: "title" } }, { kind: "Field", name: { kind: "Name", value: "link" } }, { kind: "Field", name: { kind: "Name", value: "pictures" } }, { kind: "Field", name: { kind: "Name", value: "price" } }, { kind: "Field", name: { kind: "Name", value: "salesprice" } }, { kind: "Field", name: { kind: "Name", value: "status" } }, { kind: "Field", name: { kind: "Name", value: "createdat" } }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, Yv = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "GetAllCollections" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "QueryInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "getAllCollection" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "CollectionSuccessArray" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "account" } }, { kind: "Field", name: { kind: "Name", value: "name" } }, { kind: "Field", name: { kind: "Name", value: "description" } }, { kind: "Field", name: { kind: "Name", value: "status" } }, { kind: "Field", name: { kind: "Name", value: "createdat" } }, { kind: "Field", name: { kind: "Name", value: "products" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "account" } }, { kind: "Field", name: { kind: "Name", value: "title" } }, { kind: "Field", name: { kind: "Name", value: "link" } }, { kind: "Field", name: { kind: "Name", value: "pictures" } }, { kind: "Field", name: { kind: "Name", value: "price" } }, { kind: "Field", name: { kind: "Name", value: "salesprice" } }, { kind: "Field", name: { kind: "Name", value: "status" } }, { kind: "Field", name: { kind: "Name", value: "createdat" } }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, Xv = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "ManageCollectionProduct" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "ManageCollectionProductInInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "manageCollectionProduct" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, Zv = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "SearchCollections" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "QueryInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "searchCollection" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "CollectionSuccessArray" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "account" } }, { kind: "Field", name: { kind: "Name", value: "name" } }, { kind: "Field", name: { kind: "Name", value: "description" } }, { kind: "Field", name: { kind: "Name", value: "status" } }, { kind: "Field", name: { kind: "Name", value: "createdat" } }, { kind: "Field", name: { kind: "Name", value: "products" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "account" } }, { kind: "Field", name: { kind: "Name", value: "title" } }, { kind: "Field", name: { kind: "Name", value: "link" } }, { kind: "Field", name: { kind: "Name", value: "pictures" } }, { kind: "Field", name: { kind: "Name", value: "price" } }, { kind: "Field", name: { kind: "Name", value: "salesprice" } }, { kind: "Field", name: { kind: "Name", value: "status" } }, { kind: "Field", name: { kind: "Name", value: "createdat" } }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, ey = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "UpdateCollection" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "UpdateCollectionInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "updateCollection" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, yN = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FindMinimalEvent" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "FindEventInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "findEvent" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "EventData" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "account" } }, { kind: "Field", name: { kind: "Name", value: "eventName" } }, { kind: "Field", name: { kind: "Name", value: "thumbnailsPath" } }, { kind: "Field", name: { kind: "Name", value: "recordVideoPath" } }, { kind: "Field", name: { kind: "Name", value: "createdAt" } }, { kind: "Field", name: { kind: "Name", value: "status" } }, { kind: "Field", name: { kind: "Name", value: "thumbnails" } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, kN = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "SearchMinimalEvents" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "SearchEventInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "searchEvent" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "EventArray" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "account" } }, { kind: "Field", name: { kind: "Name", value: "eventName" } }, { kind: "Field", name: { kind: "Name", value: "thumbnailsPath" } }, { kind: "Field", name: { kind: "Name", value: "recordVideoPath" } }, { kind: "Field", name: { kind: "Name", value: "createdAt" } }, { kind: "Field", name: { kind: "Name", value: "status" } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, SN = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "BlockUser" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "BlockUserInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "blockUser" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "BlockUserSuccess" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }] } }] } }] } }] }, _N = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "ChangeAccountUsername" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "ChangeUsernameInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "changeAccountUsername" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ChangeUsernameSuccess" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }] } }] } }] } }] }, EN = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "DeleteChatMessage" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "DeleteChatInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "deleteChatMessage" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "DeleteChatMessageSuccess" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }] } }] } }] } }] }, wN = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "GetAllChatMessage" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "GetAllChatMessageInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "getAllChatMessage" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ChatMessageArray" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "account" } }, { kind: "Field", name: { kind: "Name", value: "connectionId" } }, { kind: "Field", name: { kind: "Name", value: "data" } }, { kind: "Field", name: { kind: "Name", value: "email" } }, { kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "idEvent" } }, { kind: "Field", name: { kind: "Name", value: "sendDate" } }, { kind: "Field", name: { kind: "Name", value: "sessionId" } }, { kind: "Field", name: { kind: "Name", value: "type" } }, { kind: "Field", name: { kind: "Name", value: "username" } }, { kind: "Field", name: { kind: "Name", value: "isAdmin" } }, { kind: "Field", name: { kind: "Name", value: "urlGif" } }, { kind: "Field", name: { kind: "Name", value: "second" } }, { kind: "Field", name: { kind: "Name", value: "ip" } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, ty = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "GetChatRoomToken" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "GetChatRoomInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "getChatRoomToken" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ChatRoomTokenData" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "token" } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, NN = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "PinChatMessage" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "PinChatInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "pinChatMessage" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "PinChatMessageSuccess" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }] } }] } }] } }] }, AN = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "highlightProduct" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "HighlightProductInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "highlightProduct" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "HighlightProductSuccess" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }] } }] } }] } }] }, bN = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "deleteAllCustomization" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "CustomPlayerInputAccount" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "deleteAllCustomPlayer" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, CN = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "getAllCustomization" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "QueryInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "getAllCustomPlayer" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "CustomPlayerSuccessArray" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "account" } }, { kind: "Field", name: { kind: "Name", value: "data" } }, { kind: "Field", name: { kind: "Name", value: "section" } }, { kind: "Field", name: { kind: "Name", value: "id" } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, ON = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "updateCustomization" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "CustomPlayerInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "updateCustomPlayer" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, TN = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "sendAddToCart" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "AddToCartInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "sendAddToCart" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "AddToCartSuccess" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }] } }] } }] } }] }, xN = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "GetTimeLine" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "GetTimeLineInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "getTimeLine" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "TimeLineArray" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "time" } }, { kind: "Field", name: { kind: "Name", value: "likes" } }, { kind: "Field", name: { kind: "Name", value: "comments" } }, { kind: "Field", name: { kind: "Name", value: "viewers" } }, { kind: "Field", name: { kind: "Name", value: "orders" } }, { kind: "Field", name: { kind: "Name", value: "minute" } }, { kind: "Field", name: { kind: "Name", value: "hour" } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, RN = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "AppendProductsToSnackVideo" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "RelateToProductsSnackVideoInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "appendProductsSnackVideo" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ActionSnackVideoSuccess" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, IN = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "CreatePlayList" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "CreatePlayListInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "createPlayList" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "CreatePlayListSuccess" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }] } }] } }] } }] }, PN = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "CreateSnackVideoBatch" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "CreateSnackVideoInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "createSnackVideos" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "SnackVideoArray" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, LN = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "DeleteRelationshipWithSnackVideo" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "SnackVideoRelationshipKeys" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "deleteRelationshipSnackVideo" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ActionSnackVideoSuccess" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Error" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }] } }] } }] } }] }, FN = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "DeleteSnackVideo" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "DeleteSnackVideoInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "deleteSnackVideo" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ActionSnackVideoSuccess" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }] } }] } }] } }] }, DN = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FindManySnackVideos" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "FindManySnackVideoInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "findManySnackVideos" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "SnackVideoArray" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "name" } }, { kind: "Field", name: { kind: "Name", value: "url" } }, { kind: "Field", name: { kind: "Name", value: "thumbnailUrl" } }, { kind: "Field", name: { kind: "Name", value: "uploadProgress" } }, { kind: "Field", name: { kind: "Name", value: "duration" } }, { kind: "Field", name: { kind: "Name", value: "eventId" } }, { kind: "Field", name: { kind: "Name", value: "eventName" } }, { kind: "Field", name: { kind: "Name", value: "transmitionType" } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, $N = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "GetAllSnackVideos" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "QueryInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "getAllSnackVideos" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "SnackVideoCreatedArray" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "snackVideos" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "name" } }, { kind: "Field", name: { kind: "Name", value: "url" } }, { kind: "Field", name: { kind: "Name", value: "thumbnailUrl" } }, { kind: "Field", name: { kind: "Name", value: "uploadProgress" } }, { kind: "Field", name: { kind: "Name", value: "duration" } }, { kind: "Field", name: { kind: "Name", value: "eventId" } }, { kind: "Field", name: { kind: "Name", value: "eventName" } }, { kind: "Field", name: { kind: "Name", value: "created" } }, { kind: "Field", name: { kind: "Name", value: "transmitionType" } }] } }, { kind: "Field", name: { kind: "Name", value: "cursor" } }, { kind: "Field", name: { kind: "Name", value: "totalItems" } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, MN = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "GetPlayLists" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "QueryInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "getPlayLists" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "PlayListArray" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "name" } }, { kind: "Field", name: { kind: "Name", value: "description" } }, { kind: "Field", name: { kind: "Name", value: "created" } }, { kind: "Field", name: { kind: "Name", value: "videoAmount" } }, { kind: "Field", name: { kind: "Name", value: "productAmount" } }, { kind: "Field", name: { kind: "Name", value: "updated" } }, { kind: "Field", name: { kind: "Name", value: "videos" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "thumbnailUrl" } }, { kind: "Field", name: { kind: "Name", value: "name" } }, { kind: "Field", name: { kind: "Name", value: "order" } }, { kind: "Field", name: { kind: "Name", value: "duration" } }, { kind: "Field", name: { kind: "Name", value: "transmitionType" } }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, UN = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "GetSnackVideoRelationships" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "SnackVideoRelationshipInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "getRelationshipSnackVideos" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "RelationshipSnackVideoArray" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "sourceEntity" } }, { kind: "Field", name: { kind: "Name", value: "attributeId" } }] } }] } }] } }] } }] }, jN = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "SearchSnackVideos" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "SearchInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "searchSnackVideos" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "SnackVideoCreatedArray" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "snackVideos" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "name" } }, { kind: "Field", name: { kind: "Name", value: "url" } }, { kind: "Field", name: { kind: "Name", value: "thumbnailUrl" } }, { kind: "Field", name: { kind: "Name", value: "uploadProgress" } }, { kind: "Field", name: { kind: "Name", value: "duration" } }, { kind: "Field", name: { kind: "Name", value: "eventId" } }, { kind: "Field", name: { kind: "Name", value: "eventName" } }, { kind: "Field", name: { kind: "Name", value: "created" } }] } }, { kind: "Field", name: { kind: "Name", value: "cursor" } }, { kind: "Field", name: { kind: "Name", value: "totalItems" } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, VN = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "UpdatePlayList" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "UpdatePlayListInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "updatePlayList" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "UpdatePlayListSuccess" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }] } }] } }] } }] }, BN = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FindByProductSnackVideo" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "FindByProductSnackVideoInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "findByProductSnackVideo" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "SnackVideoArray" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "name" } }, { kind: "Field", name: { kind: "Name", value: "url" } }, { kind: "Field", name: { kind: "Name", value: "thumbnailUrl" } }, { kind: "Field", name: { kind: "Name", value: "duration" } }, { kind: "Field", name: { kind: "Name", value: "transmitionType" } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, zN = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "GetPlayList" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "data" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "GetPlayListQueryInput" } } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "getPlayList" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "data" }, value: { kind: "Variable", name: { kind: "Name", value: "data" } } }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "__typename" } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "PlayListData" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "data" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "description" } }, { kind: "Field", name: { kind: "Name", value: "videos" }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "productId" } }, { kind: "Field", name: { kind: "Name", value: "id" } }, { kind: "Field", name: { kind: "Name", value: "name" } }, { kind: "Field", name: { kind: "Name", value: "url" } }, { kind: "Field", name: { kind: "Name", value: "thumbnailUrl" } }, { kind: "Field", name: { kind: "Name", value: "duration" } }, { kind: "Field", name: { kind: "Name", value: "transmitionType" } }, { kind: "Field", name: { kind: "Name", value: "order" } }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ErrorGeneral" } }, selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "message" } }, { kind: "Field", name: { kind: "Name", value: "statusCode" } }, { kind: "Field", name: { kind: "Name", value: "timestamp" } }] } }] } }] } }] }, HN = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, AddCollectionDocument: Qv, AppendProductsToSnackVideoDocument: RN, BlockUserDocument: SN, ChangeAccountUsernameDocument: _N, CreatePlayListDocument: IN, CreateSnackVideoBatchDocument: PN, DeleteAllCustomizationDocument: bN, DeleteChatMessageDocument: EN, DeleteCollectionDocument: Kv, DeleteRelationshipWithSnackVideoDocument: LN, DeleteSnackVideoDocument: FN, EventStatus: Gv, FindByProductSnackVideoDocument: BN, FindCollectionDocument: Jv, FindManySnackVideosDocument: DN, FindMinimalEventDocument: yN, GetAllChatMessageDocument: wN, GetAllCollectionsDocument: Yv, GetAllCustomizationDocument: CN, GetAllSnackVideosDocument: $N, GetChatRoomTokenDocument: ty, GetPlayListDocument: zN, GetPlayListsDocument: MN, GetSnackVideoRelationshipsDocument: UN, GetTimeLineDocument: xN, HighlightProductDocument: AN, ManageCollectionProductDocument: Xv, Methods: Wv, PinChatMessageDocument: NN, SearchCollectionsDocument: Zv, SearchMinimalEventsDocument: kN, SearchSnackVideosDocument: jN, SendAddToCartDocument: TN, Status: qv, UpdateCollectionDocument: ey, UpdateCustomizationDocument: ON, UpdatePlayListDocument: VN }, Symbol.toStringTag, { value: "Module" })); var cl = /* @__PURE__ */ ((e) => (e.OPEN_TAB = "openTab", e.OPEN_VARIATION_SELECTOR = "openVariationSelector", e.ADD_TO_CART = "addToCart", e))(cl || {}); function GN(e) { return { class: e, _value: null, get value() { return this._value || (this._value = new e(), Object.freeze(this)), this._value; } }; } var rt = /* @__PURE__ */ ((e) => (e.Local = "local", e.VtexLegacy = "vtexlegacy", e.VtexIO = "vtexio", e.VtexFastStore = "faststore", e.Platform = "platform", e.External = "external", e))(rt || {}), zd = /* @__PURE__ */ ((e) => (e.PROD = "prod", e.DEV = "dev", e.LOCAL = "local", e))(zd || {}); const { coreLogger: WN } = Le(), oc = St.withPrefix(WN, "addToCartHooks"), eu = "addToCartHooks.notification.error", ac = { errorAddingToCart: eu, errorOpeningVariationSelector: eu, errorOpeningNewTab: eu, successAddingToCart: "addToCartHooks.notification.success" }; async function qN(e) { const t = { ...e, action: { type: cl.ADD_TO_CART, exec: () => oc.error("action no implemented in validate hook") } }; try { const n = await QN(t), r = await KN(n); await JN(r); } catch (n) { oc.error("error unhandled", n); } } async function QN(e) { var s; const { context: t, userAddToCartConfig: n } = e, r = (s = n == null ? void 0 : n.hooks) == null ? void 0 : s.transform; let i = e.product; if (r) try { i = await r({ product: { ...i }, data: t.data ?? {} }); } catch (o) { ca("transform", o); } return { ...e, product: i }; } async function KN(e) { var l; const { context: t, hookStrategy: n, userAddToCartConfig: r, product: i } = e, s = ny(e), o = (l = r == null ? void 0 : r.hooks) == null ? void 0 : l.validate; let a = n.validate({ ...e, actionFactory: s }); if (o) try { a = await o({ product: { ...i }, defaultAction: { ...a }, action: s, data: t.data ?? {} }); } catch (u) { ca("validate", u); } return { ...e, action: a, actionFactory: s }; } async function JN(e) { var k; const { eventBus: t } = Le(), { product: n, userAddToCartConfig: r, notifyFactory: i, action: s, actionFactory: o } = e, { isVariationSelectorOpen: a, data: l = {} } = e.context, u = (k = r == null ? void 0 : r.hooks) == null ? void 0 : k.end, c = s.type === cl.ADD_TO_CART; let d = null, f = !1; const y = () => { !c || !a || o.openVariationSelector(!1).exec(); }, g = () => { !c || f || (d ? i.error(ac.errorAddingToCart) : i.success(ac.successAddingToCart)); }, m = () => { const h = { product: n, actionType: s.type, success: !d, error: d }; t.emit(Bv.ATCH_ACTION_EXECUTED, h); }; try { if (!s.type || !s.exec) throw new Error("Invalid action object, missing keys 'type' or 'exec'"); await s.exec(); } catch (h) { ca("end", h), d = h; } if (u) try { f = !!await u({ data: l, error: d, notify: i, actionExecuted: s }); } catch (h) { ca("end", h); } y(), g(), m(); } function ny(e) { const { actionFactory: t, userAddToCartConfig: n } = e, r = (i) => Object.entries(i ?? {}).reduce( (s, [o, a]) => ({ ...s, [o]: (l) => ({ type: o, exec: () => a(l) }) }), {} ); return { ...r(t), ...r(n == null ? void 0 : n.actionFactory) }; } function ca(e, t) { oc.error(`addToCartHooks error running ${e}: `, t); } class ry { constructor(t) { O(this, "aggregate"); O(this, "_numSetPropsApplied", 0); this.aggregate = t; } setProps(t) { for (const [n, r] of Object.entries(t)) n in this.aggregate && (this.aggregate[n] = r); this._numSetPropsApplied++; } get isFirstSetProps() { return this._numSetPropsApplied === 1; } } function dl(e) { return new ry(e); } class YN { constructor(t) { O(this, "_value"); t !== void 0 && (this._value = t); } get value() { return this._value; } } var Re = /* @__PURE__ */ ((e) => (e.GENERAL_ERROR = "GENERAL_ERROR", e.AXIOS_ERROR = "AXIOS_ERROR", e.NETWORK_ERROR = "NETWORK_ERROR", e.CONFIG_ERROR = "CONFIG_ERROR", e.TIMEOUT_ERROR = "TIMEOUT_ERROR", e.AUTH_ERROR = "AUTH_ERROR", e.NOT_FOUND = "NOT_FOUND", e.VALIDATION_ERROR = "VALIDATION_ERROR", e.SERVER_ERROR = "SERVER_ERROR", e.BAD_REQUEST = "BAD_REQUEST", e.UNAUTHORIZED = "UNAUTHORIZED", e.FORBIDDEN = "FORBIDDEN", e.CONFLICT = "CONFLICT", e.GONE = "GONE", e.UNSUPPORTED_MEDIA_TYPE = "UNSUPPORTED_MEDIA_TYPE", e.TOO_MANY_REQUESTS = "TOO_MANY_REQUESTS", e.INTERNAL_SERVER_ERROR = "INTERNAL_SERVER_ERROR", e.SERVICE_UNAVAILABLE = "SERVICE_UNAVAILABLE", e))(Re || {}); function iy(e, t) { return function() { return e.apply(t, arguments); }; } const { toString: XN } = Object.prototype, { getPrototypeOf: Hd } = Object, fl = /* @__PURE__ */ ((e) => (t) => { const n = XN.call(t); return e[n] || (e[n] = n.slice(8, -1).toLowerCase()); })(/* @__PURE__ */ Object.create(null)), Mt = (e) => (e = e.toLowerCase(), (t) => fl(t) === e), hl = (e) => (t) => typeof t === e, { isArray: Ai } = Array, ks = hl("undefined"); function ZN(e) { return e !== null && !ks(e) && e.constructor !== null && !ks(e.constructor) && st(e.constructor.isBuffer) && e.constructor.isBuffer(e); } const sy = Mt("ArrayBuffer"); function e1(e) { let t; return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && sy(e.buffer), t; } const t1 = hl("string"), st = hl("function"), oy = hl("number"), pl = (e) => e !== null && typeof e == "object", n1 = (e) => e === !0 || e === !1, Mo = (e) => { if (fl(e) !== "object") return !1; const t = Hd(e); return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e); }, r1 = Mt("Date"), i1 = Mt("File"), s1 = Mt("Blob"), o1 = Mt("FileList"), a1 = (e) => pl(e) && st(e.pipe), l1 = (e) => { let t; return e && (typeof FormData == "function" && e instanceof FormData || st(e.append) && ((t = fl(e)) === "formdata" || // detect form-data instance t === "object" && st(e.toString) && e.toString() === "[object FormData]")); }, u1 = Mt("URLSearchParams"), [c1, d1, f1, h1] = ["ReadableStream", "Request", "Response", "Headers"].map(Mt), p1 = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, ""); function Ks(e, t, { allOwnKeys: n = !1 } = {}) { if (e === null || typeof e > "u") return; let r, i; if (typeof e != "object" && (e = [e]), Ai(e)) for (r = 0, i = e.length; r < i; r++) t.call(null, e[r], r, e); else { const s = n ? Object.getOwnPropertyNames(e) : Object.keys(e), o = s.length; let a; for (r = 0; r < o; r++) a = s[r], t.call(null, e[a], a, e); } } function ay(e, t) { t = t.toLowerCase(); const n = Object.keys(e); let r = n.length, i; for (; r-- > 0; ) if (i = n[r], t === i.toLowerCase()) return i; return null; } const nr = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, ly = (e) => !ks(e) && e !== nr; function lc() { const { caseless: e } = ly(this) && this || {}, t = {}, n = (r, i) => { const s = e && ay(t, i) || i; Mo(t[s]) && Mo(r) ? t[s] = lc(t[s], r) : Mo(r) ? t[s] = lc({}, r) : Ai(r) ? t[s] = r.slice() : t[s] = r; }; for (let r = 0, i = arguments.length; r < i; r++) arguments[r] && Ks(arguments[r], n); return t; } const m1 = (e, t, n, { allOwnKeys: r } = {}) => (Ks(t, (i, s) => { n && st(i) ? e[s] = iy(i, n) : e[s] = i; }, { allOwnKeys: r }), e), g1 = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), v1 = (e, t, n, r) => { e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", { value: t.prototype }), n && Object.assign(e.prototype, n); }, y1 = (e, t, n, r) => { let i, s, o; const a = {}; if (t = t || {}, e == null) return t; do { for (i = Object.getOwnPropertyNames(e), s = i.length; s-- > 0; ) o = i[s], (!r || r(o, e, t)) && !a[o] && (t[o] = e[o], a[o] = !0); e = n !== !1 && Hd(e); } while (e && (!n || n(e, t)) && e !== Object.prototype); return t; }, k1 = (e, t, n) => { e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length; const r = e.indexOf(t, n); return r !== -1 && r === n; }, S1 = (e) => { if (!e) return null; if (Ai(e)) return e; let t = e.length; if (!oy(t)) return null; const n = new Array(t); for (; t-- > 0; ) n[t] = e[t]; return n; }, _1 = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Hd(Uint8Array)), E1 = (e, t) => { const r = (e && e[Symbol.iterator]).call(e); let i; for (; (i = r.next()) && !i.done; ) { const s = i.value; t.call(e, s[0], s[1]); } }, w1 = (e, t) => { let n; const r = []; for (; (n = e.exec(t)) !== null; ) r.push(n); return r; }, N1 = Mt("HTMLFormElement"), A1 = (e) => e.toLowerCase().replace( /[-_\s]([a-z\d])(\w*)/g, function(n, r, i) { return r.toUpperCase() + i; } ), xh = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), b1 = Mt("RegExp"), uy = (e, t) => { const n = Object.getOwnPropertyDescriptors(e), r = {}; Ks(n, (i, s) => { let o; (o = t(i, s, e)) !== !1 && (r[s] = o || i); }), Object.defineProperties(e, r); }, C1 = (e) => { uy(e, (t, n) => { if (st(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1) return !1; const r = e[n]; if (st(r)) { if (t.enumerable = !1, "writable" in t) { t.writable = !1; return; } t.set || (t.set = () => { throw Error("Can not rewrite read-only method '" + n + "'"); }); } }); }, O1 = (e, t) => { const n = {}, r = (i) => { i.forEach((s) => { n[s] = !0; }); }; return Ai(e) ? r(e) : r(String(e).split(t)), n; }, T1 = () => { }, x1 = (e, t) => e != null && Number.isFinite(e = +e) ? e : t, tu = "abcdefghijklmnopqrstuvwxyz", Rh = "0123456789", cy = { DIGIT: Rh, ALPHA: tu, ALPHA_DIGIT: tu + tu.toUpperCase() + Rh }, R1 = (e = 16, t = cy.ALPHA_DIGIT) => { let n = ""; const { length: r } = t; for (; e--; ) n += t[Math.random() * r | 0]; return n; }; function I1(e) { return !!(e && st(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]); } const P1 = (e) => { const t = new Array(10), n = (r, i) => { if (pl(r)) { if (t.indexOf(r) >= 0) return; if (!("toJSON" in r)) { t[i] = r; const s = Ai(r) ? [] : {}; return Ks(r, (o, a) => { const l = n(o, i + 1); !ks(l) && (s[a] = l); }), t[i] = void 0, s; } } return r; }; return n(e, 0); }, L1 = Mt("AsyncFunction"), F1 = (e) => e && (pl(e) || st(e)) && st(e.then) && st(e.catch), dy = ((e, t) => e ? setImmediate : t ? ((n, r) => (nr.addEventListener("message", ({ source: i, data: s }) => { i === nr && s === n && r.length && r.shift()(); }, !1), (i) => { r.push(i), nr.postMessage(n, "*"); }))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))( typeof setImmediate == "function", st(nr.postMessage) ), D1 = typeof queueMicrotask < "u" ? queueMicrotask.bind(nr) : typeof process < "u" && process.nextTick || dy, N = { isArray: Ai, isArrayBuffer: sy, isBuffer: ZN, isFormData: l1, isArrayBufferView: e1, isString: t1, isNumber: oy, isBoolean: n1, isObject: pl, isPlainObject: Mo, isReadableStream: c1, isRequest: d1, isResponse: f1, isHeaders: h1, isUndefined: ks, isDate: r1, isFile: i1, isBlob: s1, isRegExp: b1, isFunction: st, isStream: a1, isURLSearchParams: u1, isTypedArray: _1, isFileList: o1, forEach: Ks, merge: lc, extend: m1, trim: p1, stripBOM: g1, inherits: v1, toFlatObject: y1, kindOf: fl, kindOfTest: Mt, endsWith: k1, toArray: S1, forEachEntry: E1, matchAll: w1, isHTMLForm: N1, hasOwnProperty: xh, hasOwnProp: xh, // an alias to avoid ESLint no-prototype-builtins detection reduceDescriptors: uy, freezeMethods: C1, toObjectSet: O1, toCamelCase: A1, noop: T1, toFiniteNumber: x1, findKey: ay, global: nr, isContextDefined: ly, ALPHABET: cy, generateString: R1, isSpecCompliantForm: I1, toJSONObject: P1, isAsyncFn: L1, isThenable: F1, setImmediate: dy, asap: D1 }; function G(e, t, n, r, i) { Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), i && (this.response = i, this.status = i.status ? i.status : null); } N.inherits(G, Error, { toJSON: function() { return { // Standard message: this.message, name: this.name, // Microsoft description: this.description, number: this.number, // Mozilla fileName: this.fileName, lineNumber: this.lineNumber, columnNumber: this.columnNumber, stack: this.stack, // Axios config: N.toJSONObject(this.config), code: this.code, status: this.status }; } }); const fy = G.prototype, hy = {}; [ "ERR_BAD_OPTION_VALUE", "ERR_BAD_OPTION", "ECONNABORTED", "ETIMEDOUT", "ERR_NETWORK", "ERR_FR_TOO_MANY_REDIRECTS", "ERR_DEPRECATED", "ERR_BAD_RESPONSE", "ERR_BAD_REQUEST", "ERR_CANCELED", "ERR_NOT_SUPPORT", "ERR_INVALID_URL" // eslint-disable-next-line func-names ].forEach((e) => { hy[e] = { value: e }; }); Object.defineProperties(G, hy); Object.defineProperty(fy, "isAxiosError", { value: !0 }); G.from = (e, t, n, r, i, s) => { const o = Object.create(fy); return N.toFlatObject(e, o, function(l) { return l !== Error.prototype; }, (a) => a !== "isAxiosError"), G.call(o, e.message, t, n, r, i), o.cause = e, o.name = e.name, s && Object.assign(o, s), o; }; const $1 = null; function uc(e) { return N.isPlainObject(e) || N.isArray(e); } function py(e) { return N.endsWith(e, "[]") ? e.slice(0, -2) : e; } function Ih(e, t, n) { return e ? e.concat(t).map(function(i, s) { return i = py(i), !n && s ? "[" + i + "]" : i; }).join(n ? "." : "") : t; } function M1(e) { return N.isArray(e) && !e.some(uc); } const U1 = N.toFlatObject(N, {}, null, function(t) { return /^is[A-Z]/.test(t); }); function ml(e, t, n) { if (!N.isObject(e)) throw new TypeError("target must be an object"); t = t || new FormData(), n = N.toFlatObject(n, { metaTokens: !0, dots: !1, indexes: !1 }, !1, function(m, k) { return !N.isUndefined(k[m]); }); const r = n.metaTokens, i = n.visitor || c, s = n.dots, o = n.indexes, l = (n.Blob || typeof Blob < "u" && Blob) && N.isSpecCompliantForm(t); if (!N.isFunction(i)) throw new TypeError("visitor must be a function"); function u(g) { if (g === null) return ""; if (N.isDate(g)) return g.toISOString(); if (!l && N.isBlob(g)) throw new G("Blob is not supported. Use a Buffer instead."); return N.isArrayBuffer(g) || N.isTypedArray(g) ? l && typeof Blob == "function" ? new Blob([g]) : Buffer.from(g) : g; } function c(g, m, k) { let h = g; if (g && !k && typeof g == "object") { if (N.endsWith(m, "{}")) m = r ? m : m.slice(0, -2), g = JSON.stringify(g); else if (N.isArray(g) && M1(g) || (N.isFileList(g) || N.endsWith(m, "[]")) && (h = N.toArray(g))) return m = py(m), h.forEach(function(v, S) { !(N.isUndefined(v) || v === null) && t.append( // eslint-disable-next-line no-nested-ternary o === !0 ? Ih([m], S, s) : o === null ? m : m + "[]", u(v) ); }), !1; } return uc(g) ? !0 : (t.append(Ih(k, m, s), u(g)), !1); } const d = [], f = Object.assign(U1, { defaultVisitor: c, convertValue: u, isVisitable: uc }); function y(g, m) { if (!N.isUndefined(g)) { if (d.indexOf(g) !== -1) throw Error("Circular reference detected in " + m.join(".")); d.push(g), N.forEach(g, function(h, p) { (!(N.isUndefined(h) || h === null) && i.call( t, h, N.isString(p) ? p.trim() : p, m, f )) === !0 && y(h, m ? m.concat(p) : [p]); }), d.pop(); } } if (!N.isObject(e)) throw new TypeError("data must be an object"); return y(e), t; } function Ph(e) { const t = { "!": "%21", "'": "%27", "(": "%28", ")": "%29", "~": "%7E", "%20": "+", "%00": "\0" }; return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(r) { return t[r]; }); } function Gd(e, t) { this._pairs = [], e && ml(e, this, t); } const my = Gd.prototype; my.append = function(t, n) { this._pairs.push([t, n]); }; my.toString = function(t) { const n = t ? function(r) { return t.call(this, r, Ph); } : Ph; return this._pairs.map(function(i) { return n(i[0]) + "=" + n(i[1]); }, "").join("&"); }; function j1(e) { return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]"); } function gy(e, t, n) { if (!t) return e; const r = n && n.encode || j1, i = n && n.serialize; let s; if (i ? s = i(t, n) : s = N.isURLSearchParams(t) ? t.toString() : new Gd(t, n).toString(r), s) { const o = e.indexOf("#"); o !== -1 && (e = e.slice(0, o)), e += (e.indexOf("?") === -1 ? "?" : "&") + s; } return e; } class Lh { constructor() { this.handlers = []; } /** * Add a new interceptor to the stack * * @param {Function} fulfilled The function to handle `then` for a `Promise` * @param {Function} rejected The function to handle `reject` for a `Promise` * * @return {Number} An ID used to remove interceptor later */ use(t, n, r) { return this.handlers.push({ fulfilled: t, rejected: n, synchronous: r ? r.synchronous : !1, runWhen: r ? r.runWhen : null }), this.handlers.length - 1; } /** * Remove an interceptor from the stack * * @param {Number} id The ID that was returned by `use` * * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise */ eject(t) { this.handlers[t] && (this.handlers[t] = null); } /** * Clear all interceptors from the stack * * @returns {void} */ clear() { this.handlers && (this.handlers = []); } /** * Iterate over all the registered interceptors * * This method is particularly useful for skipping over any * interceptors that may have become `null` calling `eject`. * * @param {Function} fn The function to call for each interceptor * * @returns {void} */ forEach(t) { N.forEach(this.handlers, function(r) { r !== null && t(r); }); } } const vy = { silentJSONParsing: !0, forcedJSONParsing: !0, clarifyTimeoutError: !1 }, V1 = typeof URLSearchParams < "u" ? URLSearchParams : Gd, B1 = typeof FormData < "u" ? FormData : null, z1 = typeof Blob < "u" ? Blob : null, H1 = { isBrowser: !0, classes: { URLSearchParams: V1, FormData: B1, Blob: z1 }, protocols: ["http", "https", "file", "blob", "url", "data"] }, Wd = typeof window < "u" && typeof document < "u", cc = typeof navigator == "object" && navigator || void 0, G1 = Wd && (!cc || ["ReactNative", "NativeScript", "NS"].indexOf(cc.product) < 0), W1 = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef self instanceof WorkerGlobalScope && typeof self.importScripts == "function", q1 = Wd && window.location.href || "http://localhost", Q1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, hasBrowserEnv: Wd, hasStandardBrowserEnv: G1, hasStandardBrowserWebWorkerEnv: W1, navigator: cc, origin: q1 }, Symbol.toStringTag, { value: "Module" })), He = { ...Q1, ...H1 }; function K1(e, t) { return ml(e, new He.classes.URLSearchParams(), Object.assign({ visitor: function(n, r, i, s) { return He.isNode && N.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : s.defaultVisitor.apply(this, arguments); } }, t)); } function J1(e) { return N.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]); } function Y1(e) { const t = {}, n = Object.keys(e); let r; const i = n.length; let s; for (r = 0; r < i; r++) s = n[r], t[s] = e[s]; return t; } function yy(e) { function t(n, r, i, s) { let o = n[s++]; if (o === "__proto__") return !0; const a = Number.isFinite(+o), l = s >= n.length; return o = !o && N.isArray(i) ? i.length : o, l ? (N.hasOwnProp(i, o) ? i[o] = [i[o], r] : i[o] = r, !a) : ((!i[o] || !N.isObject(i[o])) && (i[o] = []), t(n, r, i[o], s) && N.isArray(i[o]) && (i[o] = Y1(i[o])), !a); } if (N.isFormData(e) && N.isFunction(e.entries)) { const n = {}; return N.forEachEntry(e, (r, i) => { t(J1(r), i, n, 0); }), n; } return null; } function X1(e, t, n) { if (N.isString(e)) try { return (t || JSON.parse)(e), N.trim(e); } catch (r) { if (r.name !== "SyntaxError") throw r; } return (n || JSON.stringify)(e); } const Js = { transitional: vy, adapter: ["xhr", "http", "fetch"], transformRequest: [function(t, n) { const r = n.getContentType() || "", i = r.indexOf("application/json") > -1, s = N.isObject(t); if (s && N.isHTMLForm(t) && (t = new FormData(t)), N.isFormData(t)) return i ? JSON.stringify(yy(t)) : t; if (N.isArrayBuffer(t) || N.isBuffer(t) || N.isStream(t) || N.isFile(t) || N.isBlob(t) || N.isReadableStream(t)) return t; if (N.isArrayBufferView(t)) return t.buffer; if (N.isURLSearchParams(t)) return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString(); let a; if (s) { if (r.indexOf("application/x-www-form-urlencoded") > -1) return K1(t, this.formSerializer).toString(); if ((a = N.isFileList(t)) || r.indexOf("multipart/form-data") > -1) { const l = this.env && this.env.FormData; return ml( a ? { "files[]": t } : t, l && new l(), this.formSerializer ); } } return s || i ? (n.setContentType("application/json", !1), X1(t)) : t; }], transformResponse: [function(t) { const n = this.transitional || Js.transitional, r = n && n.forcedJSONParsing, i = this.responseType === "json"; if (N.isResponse(t) || N.isReadableStream(t)) return t; if (t && N.isString(t) && (r && !this.responseType || i)) { const o = !(n && n.silentJSONParsing) && i; try { return JSON.parse(t); } catch (a) { if (o) throw a.name === "SyntaxError" ? G.from(a, G.ERR_BAD_RESPONSE, this, null, this.response) : a; } } return t; }], /** * A timeout in milliseconds to abort a request. If set to 0 (default) a * timeout is not created. */ timeout: 0, xsrfCookieName: "XSRF-TOKEN", xsrfHeaderName: "X-XSRF-TOKEN", maxContentLength: -1, maxBodyLength: -1, env: { FormData: He.classes.FormData, Blob: He.classes.Blob }, validateStatus: function(t) { return t >= 200 && t < 300; }, headers: { common: { Accept: "application/json, text/plain, */*", "Content-Type": void 0 } } }; N.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => { Js.headers[e] = {}; }); const Z1 = N.toObjectSet([ "age", "authorization", "content-length", "content-type", "etag", "expires", "from", "host", "if-modified-since", "if-unmodified-since", "last-modified", "location", "max-forwards", "proxy-authorization", "referer", "retry-after", "user-agent" ]), eA = (e) => { const t = {}; let n, r, i; return e && e.split(` `).forEach(function(o) { i = o.indexOf(":"), n = o.substring(0, i).trim().toLowerCase(), r = o.substring(i + 1).trim(), !(!n || t[n] && Z1[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r); }), t; }, Fh = Symbol("internals"); function Ii(e) { return e && String(e).trim().toLowerCase(); } function Uo(e) { return e === !1 || e == null ? e : N.isArray(e) ? e.map(Uo) : String(e); } function tA(e) { const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g; let r; for (; r = n.exec(e); ) t[r[1]] = r[2]; return t; } const nA = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()); function nu(e, t, n, r, i) { if (N.isFunction(r)) return r.call(this, t, n); if (i && (t = n), !!N.isString(t)) { if (N.isString(r)) return t.indexOf(r) !== -1; if (N.isRegExp(r)) return r.test(t); } } function rA(e) { return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r); } function iA(e, t) { const n = N.toCamelCase(" " + t); ["get", "set", "has"].forEach((r) => { Object.defineProperty(e, r + n, { value: function(i, s, o) { return this[r].call(this, t, i, s, o); }, configurable: !0 }); }); } class Ge { constructor(t) { t && this.set(t); } set(t, n, r) { const i = this; function s(a, l, u) { const c = Ii(l); if (!c) throw new Error("header name must be a non-empty string"); const d = N.findKey(i, c); (!d || i[d] === void 0 || u === !0 || u === void 0 && i[d] !== !1) && (i[d || l] = Uo(a)); } const o = (a, l) => N.forEach(a, (u, c) => s(u, c, l)); if (N.isPlainObject(t) || t instanceof this.constructor) o(t, n); else if (N.isString(t) && (t = t.trim()) && !nA(t)) o(eA(t), n); else if (N.isHeaders(t)) for (const [a, l] of t.entries()) s(l, a, r); else t != null && s(n, t, r); return this; } get(t, n) { if (t = Ii(t), t) { const r = N.findKey(this, t); if (r) { const i = this[r]; if (!n) return i; if (n === !0) return tA(i); if (N.isFunction(n)) return n.call(this, i, r); if (N.isRegExp(n)) return n.exec(i); throw new TypeError("parser must be boolean|regexp|function"); } } } has(t, n) { if (t = Ii(t), t) { const r = N.findKey(this, t); return !!(r && this[r] !== void 0 && (!n || nu(this, this[r], r, n))); } return !1; } delete(t, n) { const r = this; let i = !1; function s(o) { if (o = Ii(o), o) { const a = N.findKey(r, o); a && (!n || nu(r, r[a], a, n)) && (delete r[a], i = !0); } } return N.isArray(t) ? t.forEach(s) : s(t), i; } clear(t) { const n = Object.keys(this); let r = n.length, i = !1; for (; r--; ) { const s = n[r]; (!t || nu(this, this[s], s, t, !0)) && (delete this[s], i = !0); } return i; } normalize(t) { const n = this, r = {}; return N.forEach(this, (i, s) => { const o = N.findKey(r, s); if (o) { n[o] = Uo(i), delete n[s]; return; } const a = t ? rA(s) : String(s).trim(); a !== s && delete n[s], n[a] = Uo(i), r[a] = !0; }), this; } concat(...t) { return this.constructor.concat(this, ...t); } toJSON(t) { const n = /* @__PURE__ */ Object.create(null); return N.forEach(this, (r, i) => { r != null && r !== !1 && (n[i] = t && N.isArray(r) ? r.join(", ") : r); }), n; } [Symbol.iterator]() { return Object.entries(this.toJSON())[Symbol.iterator](); } toString() { return Object.entries(this.toJSON()).map(([t, n]) => t + ": " + n).join(` `); } get [Symbol.toStringTag]() { return "AxiosHeaders"; } static from(t) { return t instanceof this ? t : new this(t); } static concat(t, ...n) { const r = new this(t); return n.forEach((i) => r.set(i)), r; } static accessor(t) { const r = (this[Fh] = this[Fh] = { accessors: {} }).accessors, i = this.prototype; function s(o) { const a = Ii(o); r[a] || (iA(i, o), r[a] = !0); } return N.isArray(t) ? t.forEach(s) : s(t), this; } } Ge.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]); N.reduceDescriptors(Ge.prototype, ({ value: e }, t) => { let n = t[0].toUpperCase() + t.slice(1); return { get: () => e, set(r) { this[n] = r; } }; }); N.freezeMethods(Ge); function ru(e, t) { const n = this || Js, r = t || n, i = Ge.from(r.headers); let s = r.data; return N.forEach(e, function(a) { s = a.call(n, s, i.normalize(), t ? t.status : void 0); }), i.normalize(), s; } function ky(e) { return !!(e && e.__CANCEL__); } function bi(e, t, n) { G.call(this, e ?? "canceled", G.ERR_CANCELED, t, n), this.name = "CanceledError"; } N.inherits(bi, G, { __CANCEL__: !0 }); function Sy(e, t, n) { const r = n.config.validateStatus; !n.status || !r || r(n.status) ? e(n) : t(new G( "Request failed with status code " + n.status, [G.ERR_BAD_REQUEST, G.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4], n.config, n.request, n )); } function sA(e) { const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e); return t && t[1] || ""; } function oA(e, t) { e = e || 10; const n = new Array(e), r = new Array(e); let i = 0, s = 0, o; return t = t !== void 0 ? t : 1e3, function(l) { const u = Date.now(), c = r[s]; o || (o = u), n[i] = l, r[i] = u; let d = s, f = 0; for (; d !== i; ) f += n[d++], d = d % e; if (i = (i + 1) % e, i === s && (s = (s + 1) % e), u - o < t) return; const y = c && u - c; return y ? Math.round(f * 1e3 / y) : void 0; }; } function aA(e, t) { let n = 0, r = 1e3 / t, i, s; const o = (u, c = Date.now()) => { n = c, i = null, s && (clearTimeout(s), s = null), e.apply(null, u); }; return [(...u) => { const c = Date.now(), d = c - n; d >= r ? o(u, c) : (i = u, s || (s = setTimeout(() => { s = null, o(i); }, r - d))); }, () => i && o(i)]; } const da = (e, t, n = 3) => { let r = 0; const i = oA(50, 250); return aA((s) => { const o = s.loaded, a = s.lengthComputable ? s.total : void 0, l = o - r, u = i(l), c = o <= a; r = o; const d = { loaded: o, total: a, progress: a ? o / a : void 0, bytes: l, rate: u || void 0, estimated: u && a && c ? (a - o) / u : void 0, event: s, lengthComputable: a != null, [t ? "download" : "upload"]: !0 }; e(d); }, n); }, Dh = (e, t) => { const n = e != null; return [(r) => t[0]({ lengthComputable: n, total: e, loaded: r }), t[1]]; }, $h = (e) => (...t) => N.asap(() => e(...t)), lA = He.hasStandardBrowserEnv ? ( // Standard browser envs have full support of the APIs needed to test // whether the request URL is of the same origin as current location. function() { const t = He.navigator && /(msie|trident)/i.test(He.navigator.userAgent), n = document.createElement("a"); let r; function i(s) { let o = s; return t && (n.setAttribute("href", o), o = n.href), n.setAttribute("href", o), { href: n.href, protocol: n.protocol ? n.protocol.replace(/:$/, "") : "", host: n.host, search: n.search ? n.search.replace(/^\?/, "") : "", hash: n.hash ? n.hash.replace(/^#/, "") : "", hostname: n.hostname, port: n.port, pathname: n.pathname.charAt(0) === "/" ? n.pathname : "/" + n.pathname }; } return r = i(window.location.href), function(o) { const a = N.isString(o) ? i(o) : o; return a.protocol === r.protocol && a.host === r.host; }; }() ) : ( // Non standard browser envs (web workers, react-native) lack needed support. /* @__PURE__ */ function() { return function() { return !0; }; }() ), uA = He.hasStandardBrowserEnv ? ( // Standard browser envs support document.cookie { write(e, t, n, r, i, s) { const o = [e + "=" + encodeURIComponent(t)]; N.isNumber(n) && o.push("expires=" + new Date(n).toGMTString()), N.isString(r) && o.push("path=" + r), N.isString(i) && o.push("domain=" + i), s === !0 && o.push("secure"), document.cookie = o.join("; "); }, read(e) { const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)")); return t ? decodeURIComponent(t[3]) : null; }, remove(e) { this.write(e, "", Date.now() - 864e5); } } ) : ( // Non-standard browser env (web workers, react-native) lack needed support. { write() { }, read() { return null; }, remove() { } } ); function cA(e) { return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e); } function dA(e, t) { return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e; } function _y(e, t) { return e && !cA(t) ? dA(e, t) : t; } const Mh = (e) => e instanceof Ge ? { ...e } : e; function pr(e, t) { t = t || {}; const n = {}; function r(u, c, d) { return N.isPlainObject(u) && N.isPlainObject(c) ? N.merge.call({ caseless: d }, u, c) : N.isPlainObject(c) ? N.merge({}, c) : N.isArray(c) ? c.slice() : c; } function i(u, c, d) { if (N.isUndefined(c)) { if (!N.isUndefined(u)) return r(void 0, u, d); } else return r(u, c, d); } function s(u, c) { if (!N.isUndefined(c)) return r(void 0, c); } function o(u, c) { if (N.isUndefined(c)) { if (!N.isUndefined(u)) return r(void 0, u); } else return r(void 0, c); } function a(u, c, d) { if (d in t) return r(u, c); if (d in e) return r(void 0, u); } const l = { url: s, method: s, data: s, baseURL: o, transformRequest: o, transformResponse: o, paramsSerializer: o, timeout: o, timeoutMessage: o, withCredentials: o, withXSRFToken: o, adapter: o, responseType: o, xsrfCookieName: o, xsrfHeaderName: o, onUploadProgress: o, onDownloadProgress: o, decompress: o, maxContentLength: o, maxBodyLength: o, beforeRedirect: o, transport: o, httpAgent: o, httpsAgent: o, cancelToken: o, socketPath: o, responseEncoding: o, validateStatus: a, headers: (u, c) => i(Mh(u), Mh(c), !0) }; return N.forEach(Object.keys(Object.assign({}, e, t)), function(c) { const d = l[c] || i, f = d(e[c], t[c], c); N.isUndefined(f) && d !== a || (n[c] = f); }), n; } const Ey = (e) => { const t = pr({}, e); let { data: n, withXSRFToken: r, xsrfHeaderName: i, xsrfCookieName: s, headers: o, auth: a } = t; t.headers = o = Ge.from(o), t.url = gy(_y(t.baseURL, t.url), e.params, e.paramsSerializer), a && o.set( "Authorization", "Basic " + btoa((a.username || "") + ":" + (a.password ? unescape(encodeURIComponent(a.password)) : "")) ); let l; if (N.isFormData(n)) { if (He.hasStandardBrowserEnv || He.hasStandardBrowserWebWorkerEnv) o.setContentType(void 0); else if ((l = o.getContentType()) !== !1) { const [u, ...c] = l ? l.split(";").map((d) => d.trim()).filter(Boolean) : []; o.setContentType([u || "multipart/form-data", ...c].join("; ")); } } if (He.hasStandardBrowserEnv && (r && N.isFunction(r) && (r = r(t)), r || r !== !1 && lA(t.url))) { const u = i && s && uA.read(s); u && o.set(i, u); } return t; }, fA = typeof XMLHttpRequest < "u", hA = fA && function(e) { return new Promise(function(n, r) { const i = Ey(e); let s = i.data; const o = Ge.from(i.headers).normalize(); let { responseType: a, onUploadProgress: l, onDownloadProgress: u } = i, c, d, f, y, g; function m() { y && y(), g && g(), i.cancelToken && i.cancelToken.unsubscribe(c), i.signal && i.signal.removeEventListener("abort", c); } let k = new XMLHttpRequest(); k.open(i.method.toUpperCase(), i.url, !0), k.timeout = i.timeout; function h() { if (!k) return; const v = Ge.from( "getAllResponseHeaders" in k && k.getAllResponseHeaders() ), _ = { data: !a || a === "text" || a === "json" ? k.responseText : k.response, status: k.status, statusText: k.statusText, headers: v, config: e, request: k }; Sy(function(A) { n(A), m(); }, function(A) { r(A), m(); }, _), k = null; } "onloadend" in k ? k.onloadend = h : k.onreadystatechange = function() { !k || k.readyState !== 4 || k.status === 0 && !(k.responseURL && k.responseURL.indexOf("file:") === 0) || setTimeout(h); }, k.onabort = function() { k && (r(new G("Request aborted", G.ECONNABORTED, e, k)), k = null); }, k.onerror = function() { r(new G("Network Error", G.ERR_NETWORK, e, k)), k = null; }, k.ontimeout = function() { let S = i.timeout ? "timeout of " + i.timeout + "ms exceeded" : "timeout exceeded"; const _ = i.transitional || vy; i.timeoutErrorMessage && (S = i.timeoutErrorMessage), r(new G( S, _.clarifyTimeoutError ? G.ETIMEDOUT : G.ECONNABORTED, e, k )), k = null; }, s === void 0 && o.setContentType(null), "setRequestHeader" in k && N.forEach(o.toJSON(), function(S, _) { k.setRequestHeader(_, S); }), N.isUndefined(i.withCredentials) || (k.withCredentials = !!i.withCredentials), a && a !== "json" && (k.responseType = i.responseType), u && ([f, g] = da(u, !0), k.addEventListener("progress", f)), l && k.upload && ([d, y] = da(l), k.upload.addEventListener("progress", d), k.upload.addEventListener("loadend", y)), (i.cancelToken || i.signal) && (c = (v) => { k && (r(!v || v.type ? new bi(null, e, k) : v), k.abort(), k = null); }, i.cancelToken && i.cancelToken.subscribe(c), i.signal && (i.signal.aborted ? c() : i.signal.addEventListener("abort", c))); const p = sA(i.url); if (p && He.protocols.indexOf(p) === -1) { r(new G("Unsupported protocol " + p + ":", G.ERR_BAD_REQUEST, e)); return; } k.send(s || null); }); }, pA = (e, t) => { const { length: n } = e = e ? e.filter(Boolean) : []; if (t || n) { let r = new AbortController(), i; const s = function(u) { if (!i) { i = !0, a(); const c = u instanceof Error ? u : this.reason; r.abort(c instanceof G ? c : new bi(c instanceof Error ? c.message : c)); } }; let o = t && setTimeout(() => { o = null, s(new G(`timeout ${t} of ms exceeded`, G.ETIMEDOUT)); }, t); const a = () => { e && (o && clearTimeout(o), o = null, e.forEach((u) => { u.unsubscribe ? u.unsubscribe(s) : u.removeEventListener("abort", s); }), e = null); }; e.forEach((u) => u.addEventListener("abort", s)); const { signal: l } = r; return l.unsubscribe = () => N.asap(a), l; } }, mA = function* (e, t) { let n = e.byteLength; if (!t || n < t) { yield e; return; } let r = 0, i; for (; r < n; ) i = r + t, yield e.slice(r, i), r = i; }, gA = async function* (e, t) { for await (const n of vA(e)) yield* mA(n, t); }, vA = async function* (e) { if (e[Symbol.asyncIterator]) { yield* e; return; } const t = e.getReader(); try { for (; ; ) { const { done: n, value: r } = await t.read(); if (n) break; yield r; } } finally { await t.cancel(); } }, Uh = (e, t, n, r) => { const i = gA(e, t); let s = 0, o, a = (l) => { o || (o = !0, r && r(l)); }; return new ReadableStream({ async pull(l) { try { const { done: u, value: c } = await i.next(); if (u) { a(), l.close(); return; } let d = c.byteLength; if (n) { let f = s += d; n(f); } l.enqueue(new Uint8Array(c)); } catch (u) { throw a(u), u; } }, cancel(l) { return a(l), i.return(); } }, { highWaterMark: 2 }); }, gl = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", wy = gl && typeof ReadableStream == "function", yA = gl && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), Ny = (e, ...t) => { try { return !!e(...t); } catch { return !1; } }, kA = wy && Ny(() => { let e = !1; const t = new Request(He.origin, { body: new ReadableStream(), method: "POST", get duplex() { return e = !0, "half"; } }).headers.has("Content-Type"); return e && !t; }), jh = 64 * 1024, dc = wy && Ny(() => N.isReadableStream(new Response("").body)), fa = { stream: dc && ((e) => e.body) }; gl && ((e) => { ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => { !fa[t] && (fa[t] = N.isFunction(e[t]) ? (n) => n[t]() : (n, r) => { throw new G(`Response type '${t}' is not supported`, G.ERR_NOT_SUPPORT, r); }); }); })(new Response()); const SA = async (e) => { if (e == null) return 0; if (N.isBlob(e)) return e.size; if (N.isSpecCompliantForm(e)) return (await new Request(He.origin, { method: "POST", body: e }).arrayBuffer()).byteLength; if (N.isArrayBufferView(e) || N.isArrayBuffer(e)) return e.byteLength; if (N.isURLSearchParams(e) && (e = e + ""), N.isString(e)) return (await yA(e)).byteLength; }, _A = async (e, t) => { const n = N.toFiniteNumber(e.getContentLength()); return n ?? SA(t); }, EA = gl && (async (e) => { let { url: t, method: n, data: r, signal: i, cancelToken: s, timeout: o, onDownloadProgress: a, onUploadProgress: l, responseType: u, headers: c, withCredentials: d = "same-origin", fetchOptions: f } = Ey(e); u = u ? (u + "").toLowerCase() : "text"; let y = pA([i, s && s.toAbortSignal()], o), g; const m = y && y.unsubscribe && (() => { y.unsubscribe(); }); let k; try { if (l && kA && n !== "get" && n !== "head" && (k = await _A(c, r)) !== 0) { let _ = new Request(t, { method: "POST", body: r, duplex: "half" }), w; if (N.isFormData(r) && (w = _.headers.get("content-type")) && c.setContentType(w), _.body) { const [A, b] = Dh( k, da($h(l)) ); r = Uh(_.body, jh, A, b); } } N.isString(d) || (d = d ? "include" : "omit"); const h = "credentials" in Request.prototype; g = new Request(t, { ...f, signal: y, method: n.toUpperCase(), headers: c.normalize().toJSON(), body: r, duplex: "half", credentials: h ? d : void 0 }); let p = await fetch(g); const v = dc && (u === "stream" || u === "response"); if (dc && (a || v && m)) { const _ = {}; ["status", "statusText", "headers"].forEach((I) => { _[I] = p[I]; }); const w = N.toFiniteNumber(p.headers.get("content-length")), [A, b] = a && Dh( w, da($h(a), !0) ) || []; p = new Response( Uh(p.body, jh, A, () => { b && b(), m && m(); }), _ ); } u = u || "text"; let S = await fa[N.findKey(fa, u) || "text"](p, e); return !v && m && m(), await new Promise((_, w) => { Sy(_, w, { data: S, headers: Ge.from(p.headers), status: p.status, statusText: p.statusText, config: e, request: g }); }); } catch (h) { throw m && m(), h && h.name === "TypeError" && /fetch/i.test(h.message) ? Object.assign( new G("Network Error", G.ERR_NETWORK, e, g), { cause: h.cause || h } ) : G.from(h, h && h.code, e, g); } }), fc = { http: $1, xhr: hA, fetch: EA }; N.forEach(fc, (e, t) => { if (e) { try { Object.defineProperty(e, "name", { value: t }); } catch { } Object.defineProperty(e, "adapterName", { value: t }); } }); const Vh = (e) => `- ${e}`, wA = (e) => N.isFunction(e) || e === null || e === !1, Ay = { getAdapter: (e) => { e = N.isArray(e) ? e : [e]; const { length: t } = e; let n, r; const i = {}; for (let s = 0; s < t; s++) { n = e[s]; let o; if (r = n, !wA(n) && (r = fc[(o = String(n)).toLowerCase()], r === void 0)) throw new G(`Unknown adapter '${o}'`); if (r) break; i[o || "#" + s] = r; } if (!r) { const s = Object.entries(i).map( ([a, l]) => `adapter ${a} ` + (l === !1 ? "is not supported by the environment" : "is not available in the build") ); let o = t ? s.length > 1 ? `since : ` + s.map(Vh).join(` `) : " " + Vh(s[0]) : "as no adapter specified"; throw new G( "There is no suitable adapter to dispatch the request " + o, "ERR_NOT_SUPPORT" ); } return r; }, adapters: fc }; function iu(e) { if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted) throw new bi(null, e); } function Bh(e) { return iu(e), e.headers = Ge.from(e.headers), e.data = ru.call( e, e.transformRequest ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Ay.getAdapter(e.adapter || Js.adapter)(e).then(function(r) { return iu(e), r.data = ru.call( e, e.transformResponse, r ), r.headers = Ge.from(r.headers), r; }, function(r) { return ky(r) || (iu(e), r && r.response && (r.response.data = ru.call( e, e.transformResponse, r.response ), r.response.headers = Ge.from(r.response.headers))), Promise.reject(r); }); } const by = "1.7.7", qd = {}; ["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => { qd[e] = function(r) { return typeof r === e || "a" + (t < 1 ? "n " : " ") + e; }; }); const zh = {}; qd.transitional = function(t, n, r) { function i(s, o) { return "[Axios v" + by + "] Transitional option '" + s + "'" + o + (r ? ". " + r : ""); } return (s, o, a) => { if (t === !1) throw new G( i(o, " has been removed" + (n ? " in " + n : "")), G.ERR_DEPRECATED ); return n && !zh[o] && (zh[o] = !0, console.warn( i( o, " has been deprecated since v" + n + " and will be removed in the near future" ) )), t ? t(s, o, a) : !0; }; }; function NA(e, t, n) { if (typeof e != "object") throw new G("options must be an object", G.ERR_BAD_OPTION_VALUE); const r = Object.keys(e); let i = r.length; for (; i-- > 0; ) { const s = r[i], o = t[s]; if (o) { const a = e[s], l = a === void 0 || o(a, s, e); if (l !== !0) throw new G("option " + s + " must be " + l, G.ERR_BAD_OPTION_VALUE); continue; } if (n !== !0) throw new G("Unknown option " + s, G.ERR_BAD_OPTION); } } const hc = { assertOptions: NA, validators: qd }, pn = hc.validators; class ur { constructor(t) { this.defaults = t, this.interceptors = { request: new Lh(), response: new Lh() }; } /** * Dispatch a request * * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults) * @param {?Object} config * * @returns {Promise} The Promise to be fulfilled */ async request(t, n) { try { return await this._request(t, n); } catch (r) { if (r instanceof Error) { let i; Error.captureStackTrace ? Error.captureStackTrace(i = {}) : i = new Error(); const s = i.stack ? i.stack.replace(/^.+\n/, "") : ""; try { r.stack ? s && !String(r.stack).endsWith(s.replace(/^.+\n.+\n/, "")) && (r.stack += ` ` + s) : r.stack = s; } catch { } } throw r; } } _request(t, n) { typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = pr(this.defaults, n); const { transitional: r, paramsSerializer: i, headers: s } = n; r !== void 0 && hc.assertOptions(r, { silentJSONParsing: pn.transitional(pn.boolean), forcedJSONParsing: pn.transitional(pn.boolean), clarifyTimeoutError: pn.transitional(pn.boolean) }, !1), i != null && (N.isFunction(i) ? n.paramsSerializer = { serialize: i } : hc.assertOptions(i, { encode: pn.function, serialize: pn.function }, !0)), n.method = (n.method || this.defaults.method || "get").toLowerCase(); let o = s && N.merge( s.common, s[n.method] ); s && N.forEach( ["delete", "get", "head", "post", "put", "patch", "common"], (g) => { delete s[g]; } ), n.headers = Ge.concat(o, s); const a = []; let l = !0; this.interceptors.request.forEach(function(m) { typeof m.runWhen == "function" && m.runWhen(n) === !1 || (l = l && m.synchronous, a.unshift(m.fulfilled, m.rejected)); }); const u = []; this.interceptors.response.forEach(function(m) { u.push(m.fulfilled, m.rejected); }); let c, d = 0, f; if (!l) { const g = [Bh.bind(this), void 0]; for (g.unshift.apply(g, a), g.push.apply(g, u), f = g.length, c = Promise.resolve(n); d < f; ) c = c.then(g[d++], g[d++]); return c; } f = a.length; let y = n; for (d = 0; d < f; ) { const g = a[d++], m = a[d++]; try { y = g(y); } catch (k) { m.call(this, k); break; } } try { c = Bh.call(this, y); } catch (g) { return Promise.reject(g); } for (d = 0, f = u.length; d < f; ) c = c.then(u[d++], u[d++]); return c; } getUri(t) { t = pr(this.defaults, t); const n = _y(t.baseURL, t.url); return gy(n, t.params, t.paramsSerializer); } } N.forEach(["delete", "get", "head", "options"], function(t) { ur.prototype[t] = function(n, r) { return this.request(pr(r || {}, { method: t, url: n, data: (r || {}).data })); }; }); N.forEach(["post", "put", "patch"], function(t) { function n(r) { return function(s, o, a) { return this.request(pr(a || {}, { method: t, headers: r ? { "Content-Type": "multipart/form-data" } : {}, url: s, data: o })); }; } ur.prototype[t] = n(), ur.prototype[t + "Form"] = n(!0); }); class Qd { constructor(t) { if (typeof t != "function") throw new TypeError("executor must be a function."); let n; this.promise = new Promise(function(s) { n = s; }); const r = this; this.promise.then((i) => { if (!r._listeners) return; let s = r._listeners.length; for (; s-- > 0; ) r._listeners[s](i); r._listeners = null; }), this.promise.then = (i) => { let s; const o = new Promise((a) => { r.subscribe(a), s = a; }).then(i); return o.cancel = function() { r.unsubscribe(s); }, o; }, t(function(s, o, a) { r.reason || (r.reason = new bi(s, o, a), n(r.reason)); }); } /** * Throws a `CanceledError` if cancellation has been requested. */ throwIfRequested() { if (this.reason) throw this.reason; } /** * Subscribe to the cancel signal */ subscribe(t) { if (this.reason) { t(this.reason); return; } this._listeners ? this._listeners.push(t) : this._listeners = [t]; } /** * Unsubscribe from the cancel signal */ unsubscribe(t) { if (!this._listeners) return; const n = this._listeners.indexOf(t); n !== -1 && this._listeners.splice(n, 1); } toAbortSignal() { const t = new AbortController(), n = (r) => { t.abort(r); }; return this.subscribe(n), t.signal.unsubscribe = () => this.unsubscribe(n), t.signal; } /** * Returns an object that contains a new `CancelToken` and a function that, when called, * cancels the `CancelToken`. */ static source() { let t; return { token: new Qd(function(i) { t = i; }), cancel: t }; } } function AA(e) { return function(n) { return e.apply(null, n); }; } function bA(e) { return N.isObject(e) && e.isAxiosError === !0; } const pc = { Continue: 100, SwitchingProtocols: 101, Processing: 102, EarlyHints: 103, Ok: 200, Created: 201, Accepted: 202, NonAuthoritativeInformation: 203, NoContent: 204, ResetContent: 205, PartialContent: 206, MultiStatus: 207, AlreadyReported: 208, ImUsed: 226, MultipleChoices: 300, MovedPermanently: 301, Found: 302, SeeOther: 303, NotModified: 304, UseProxy: 305, Unused: 306, TemporaryRedirect: 307, PermanentRedirect: 308, BadRequest: 400, Unauthorized: 401, PaymentRequired: 402, Forbidden: 403, NotFound: 404, MethodNotAllowed: 405, NotAcceptable: 406, ProxyAuthenticationRequired: 407, RequestTimeout: 408, Conflict: 409, Gone: 410, LengthRequired: 411, PreconditionFailed: 412, PayloadTooLarge: 413, UriTooLong: 414, UnsupportedMediaType: 415, RangeNotSatisfiable: 416, ExpectationFailed: 417, ImATeapot: 418, MisdirectedRequest: 421, UnprocessableEntity: 422, Locked: 423, FailedDependency: 424, TooEarly: 425, UpgradeRequired: 426, PreconditionRequired: 428, TooManyRequests: 429, RequestHeaderFieldsTooLarge: 431, UnavailableForLegalReasons: 451, InternalServerError: 500, NotImplemented: 501, BadGateway: 502, ServiceUnavailable: 503, GatewayTimeout: 504, HttpVersionNotSupported: 505, VariantAlsoNegotiates: 506, InsufficientStorage: 507, LoopDetected: 508, NotExtended: 510, NetworkAuthenticationRequired: 511 }; Object.entries(pc).forEach(([e, t]) => { pc[t] = e; }); function Cy(e) { const t = new ur(e), n = iy(ur.prototype.request, t); return N.extend(n, ur.prototype, t, { allOwnKeys: !0 }), N.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(i) { return Cy(pr(e, i)); }, n; } const le = Cy(Js); le.Axios = ur; le.CanceledError = bi; le.CancelToken = Qd; le.isCancel = ky; le.VERSION = by; le.toFormData = ml; le.AxiosError = G; le.Cancel = le.CanceledError; le.all = function(t) { return Promise.all(t); }; le.spread = AA; le.isAxiosError = bA; le.mergeConfig = pr; le.AxiosHeaders = Ge; le.formToJSON = (e) => yy(N.isHTMLForm(e) ? new FormData(e) : e); le.getAdapter = Ay.getAdapter; le.HttpStatusCode = pc; le.default = le; const CA = { type: "logger", log(e) { this.output("log", e); }, warn(e) { this.output("warn", e); }, error(e) { this.output("error", e); }, output(e, t) { console && console[e] && console[e].apply(console, t); } }; class ha { constructor(t) { let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; this.init(t, n); } init(t) { let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; this.prefix = n.prefix || "i18next:", this.logger = t || CA, this.options = n, this.debug = n.debug; } log() { for (var t = arguments.length, n = new Array(t), r = 0; r < t; r++) n[r] = arguments[r]; return this.forward(n, "log", "", !0); } warn() { for (var t = arguments.length, n = new Array(t), r = 0; r < t; r++) n[r] = arguments[r]; return this.forward(n, "warn", "", !0); } error() { for (var t = arguments.length, n = new Array(t), r = 0; r < t; r++) n[r] = arguments[r]; return this.forward(n, "error", ""); } deprecate() { for (var t = arguments.length, n = new Array(t), r = 0; r < t; r++) n[r] = arguments[r]; return this.forward(n, "warn", "WARNING DEPRECATED: ", !0); } forward(t, n, r, i) { return i && !this.debug ? null : (typeof t[0] == "string" && (t[0] = `${r}${this.prefix} ${t[0]}`), this.logger[n](t)); } create(t) { return new ha(this.logger, { prefix: `${this.prefix}:${t}:`, ...this.options }); } clone(t) { return t = t || this.options, t.prefix = t.prefix || this.prefix, new ha(this.logger, t); } } var zt = new ha(); class vl { constructor() { this.observers = {}; } on(t, n) { return t.split(" ").forEach((r) => { this.observers[r] || (this.observers[r] = /* @__PURE__ */ new Map()); const i = this.observers[r].get(n) || 0; this.observers[r].set(n, i + 1); }), this; } off(t, n) { if (this.observers[t]) { if (!n) { delete this.observers[t]; return; } this.observers[t].delete(n); } } emit(t) { for (var n = arguments.length, r = new Array(n > 1 ? n - 1 : 0), i = 1; i < n; i++) r[i - 1] = arguments[i]; this.observers[t] && Array.from(this.observers[t].entries()).forEach((o) => { let [a, l] = o; for (let u = 0; u < l; u++) a(...r); }), this.observers["*"] && Array.from(this.observers["*"].entries()).forEach((o) => { let [a, l] = o; for (let u = 0; u < l; u++) a.apply(a, [t, ...r]); }); } } const Pi = () => { let e, t; const n = new Promise((r, i) => { e = r, t = i; }); return n.resolve = e, n.reject = t, n; }, Hh = (e) => e == null ? "" : "" + e, OA = (e, t, n) => { e.forEach((r) => { t[r] && (n[r] = t[r]); }); }, TA = /###/g, Gh = (e) => e && e.indexOf("###") > -1 ? e.replace(TA, ".") : e, Wh = (e) => !e || typeof e == "string", Zi = (e, t, n) => { const r = typeof t != "string" ? t : t.split("."); let i = 0; for (; i < r.length - 1; ) { if (Wh(e)) return {}; const s = Gh(r[i]); !e[s] && n && (e[s] = new n()), Object.prototype.hasOwnProperty.call(e, s) ? e = e[s] : e = {}, ++i; } return Wh(e) ? {} : { obj: e, k: Gh(r[i]) }; }, qh = (e, t, n) => { const { obj: r, k: i } = Zi(e, t, Object); if (r !== void 0 || t.length === 1) { r[i] = n; return; } let s = t[t.length - 1], o = t.slice(0, t.length - 1), a = Zi(e, o, Object); for (; a.obj === void 0 && o.length; ) s = `${o[o.length - 1]}.${s}`, o = o.slice(0, o.length - 1), a = Zi(e, o, Object), a && a.obj && typeof a.obj[`${a.k}.${s}`] < "u" && (a.obj = void 0); a.obj[`${a.k}.${s}`] = n; }, xA = (e, t, n, r) => { const { obj: i, k: s } = Zi(e, t, Object); i[s] = i[s] || [], i[s].push(n); }, pa = (e, t) => { const { obj: n, k: r } = Zi(e, t); if (n) return n[r]; }, RA = (e, t, n) => { const r = pa(e, n); return r !== void 0 ? r : pa(t, n); }, Oy = (e, t, n) => { for (const r in t) r !== "__proto__" && r !== "constructor" && (r in e ? typeof e[r] == "string" || e[r] instanceof String || typeof t[r] == "string" || t[r] instanceof String ? n && (e[r] = t[r]) : Oy(e[r], t[r], n) : e[r] = t[r]); return e; }, Rr = (e) => e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); var IA = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'", "/": "/" }; const PA = (e) => typeof e == "string" ? e.replace(/[&<>"'\/]/g, (t) => IA[t]) : e; class LA { constructor(t) { this.capacity = t, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = []; } getRegExp(t) { const n = this.regExpMap.get(t); if (n !== void 0) return n; const r = new RegExp(t); return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(t, r), this.regExpQueue.push(t), r; } } const FA = [" ", ",", "?", "!", ";"], DA = new LA(20), $A = (e, t, n) => { t = t || "", n = n || ""; const r = FA.filter((o) => t.indexOf(o) < 0 && n.indexOf(o) < 0); if (r.length === 0) return !0; const i = DA.getRegExp(`(${r.map((o) => o === "?" ? "\\?" : o).join("|")})`); let s = !i.test(e); if (!s) { const o = e.indexOf(n); o > 0 && !i.test(e.substring(0, o)) && (s = !0); } return s; }, mc = function(e, t) { let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "."; if (!e) return; if (e[t]) return e[t]; const r = t.split(n); let i = e; for (let s = 0; s < r.length; ) { if (!i || typeof i != "object") return; let o, a = ""; for (let l = s; l < r.length; ++l) if (l !== s && (a += n), a += r[l], o = i[a], o !== void 0) { if (["string", "number", "boolean"].indexOf(typeof o) > -1 && l < r.length - 1) continue; s += l - s + 1; break; } i = o; } return i; }, ma = (e) => e && e.indexOf("_") > 0 ? e.replace("_", "-") : e; class Qh extends vl { constructor(t) { let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : { ns: ["translation"], defaultNS: "translation" }; super(), this.data = t || {}, this.options = n, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.options.ignoreJSONStructure === void 0 && (this.options.ignoreJSONStructure = !0); } addNamespaces(t) { this.options.ns.indexOf(t) < 0 && this.options.ns.push(t); } removeNamespaces(t) { const n = this.options.ns.indexOf(t); n > -1 && this.options.ns.splice(n, 1); } getResource(t, n, r) { let i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}; const s = i.keySeparator !== void 0 ? i.keySeparator : this.options.keySeparator, o = i.ignoreJSONStructure !== void 0 ? i.ignoreJSONStructure : this.options.ignoreJSONStructure; let a; t.indexOf(".") > -1 ? a = t.split(".") : (a = [t, n], r && (Array.isArray(r) ? a.push(...r) : typeof r == "string" && s ? a.push(...r.split(s)) : a.push(r))); const l = pa(this.data, a); return !l && !n && !r && t.indexOf(".") > -1 && (t = a[0], n = a[1], r = a.slice(2).join(".")), l || !o || typeof r != "string" ? l : mc(this.data && this.data[t] && this.data[t][n], r, s); } addResource(t, n, r, i) { let s = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : { silent: !1 }; const o = s.keySeparator !== void 0 ? s.keySeparator : this.options.keySeparator; let a = [t, n]; r && (a = a.concat(o ? r.split(o) : r)), t.indexOf(".") > -1 && (a = t.split("."), i = n, n = a[1]), this.addNamespaces(n), qh(this.data, a, i), s.silent || this.emit("added", t, n, r, i); } addResources(t, n, r) { let i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : { silent: !1 }; for (const s in r) (typeof r[s] == "string" || Array.isArray(r[s])) && this.addResource(t, n, s, r[s], { silent: !0 }); i.silent || this.emit("added", t, n, r); } addResourceBundle(t, n, r, i, s) { let o = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : { silent: !1, skipCopy: !1 }, a = [t, n]; t.indexOf(".") > -1 && (a = t.split("."), i = r, r = n, n = a[1]), this.addNamespaces(n); let l = pa(this.data, a) || {}; o.skipCopy || (r = JSON.parse(JSON.stringify(r))), i ? Oy(l, r, s) : l = { ...l, ...r }, qh(this.data, a, l), o.silent || this.emit("added", t, n, r); } removeResourceBundle(t, n) { this.hasResourceBundle(t, n) && delete this.data[t][n], this.removeNamespaces(n), this.emit("removed", t, n); } hasResourceBundle(t, n) { return this.getResource(t, n) !== void 0; } getResourceBundle(t, n) { return n || (n = this.options.defaultNS), this.options.compatibilityAPI === "v1" ? { ...this.getResource(t, n) } : this.getResource(t, n); } getDataByLanguage(t) { return this.data[t]; } hasLanguageSomeTranslations(t) { const n = this.getDataByLanguage(t); return !!(n && Object.keys(n) || []).find((i) => n[i] && Object.keys(n[i]).length > 0); } toJSON() { return this.data; } } var Ty = { processors: {}, addPostProcessor(e) { this.processors[e.name] = e; }, handle(e, t, n, r, i) { return e.forEach((s) => { this.processors[s] && (t = this.processors[s].process(t, n, r, i)); }), t; } }; const Kh = {}; class ga extends vl { constructor(t) { let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; super(), OA(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], t, this), this.options = n, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = zt.create("translator"); } changeLanguage(t) { t && (this.language = t); } exists(t) { let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : { interpolation: {} }; if (t == null) return !1; const r = this.resolve(t, n); return r && r.res !== void 0; } extractFromKey(t, n) { let r = n.nsSeparator !== void 0 ? n.nsSeparator : this.options.nsSeparator; r === void 0 && (r = ":"); const i = n.keySeparator !== void 0 ? n.keySeparator : this.options.keySeparator; let s = n.ns || this.options.defaultNS || []; const o = r && t.indexOf(r) > -1, a = !this.options.userDefinedKeySeparator && !n.keySeparator && !this.options.userDefinedNsSeparator && !n.nsSeparator && !$A(t, r, i); if (o && !a) { const l = t.match(this.interpolator.nestingRegexp); if (l && l.length > 0) return { key: t, namespaces: s }; const u = t.split(r); (r !== i || r === i && this.options.ns.indexOf(u[0]) > -1) && (s = u.shift()), t = u.join(i); } return typeof s == "string" && (s = [s]), { key: t, namespaces: s }; } translate(t, n, r) { if (typeof n != "object" && this.options.overloadTranslationOptionHandler && (n = this.options.overloadTranslationOptionHandler(arguments)), typeof n == "object" && (n = { ...n }), n || (n = {}), t == null) return ""; Array.isArray(t) || (t = [String(t)]); const i = n.returnDetails !== void 0 ? n.returnDetails : this.options.returnDetails, s = n.keySeparator !== void 0 ? n.keySeparator : this.options.keySeparator, { key: o, namespaces: a } = this.extractFromKey(t[t.length - 1], n), l = a[a.length - 1], u = n.lng || this.language, c = n.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode; if (u && u.toLowerCase() === "cimode") { if (c) { const S = n.nsSeparator || this.options.nsSeparator; return i ? { res: `${l}${S}${o}`, usedKey: o, exactUsedKey: o, usedLng: u, usedNS: l, usedParams: this.getUsedParamsDetails(n) } : `${l}${S}${o}`; } return i ? { res: o, usedKey: o, exactUsedKey: o, usedLng: u, usedNS: l, usedParams: this.getUsedParamsDetails(n) } : o; } const d = this.resolve(t, n); let f = d && d.res; const y = d && d.usedKey || o, g = d && d.exactUsedKey || o, m = Object.prototype.toString.apply(f), k = ["[object Number]", "[object Function]", "[object RegExp]"], h = n.joinArrays !== void 0 ? n.joinArrays : this.options.joinArrays, p = !this.i18nFormat || this.i18nFormat.handleAsObject; if (p && f && (typeof f != "string" && typeof f != "boolean" && typeof f != "number") && k.indexOf(m) < 0 && !(typeof h == "string" && Array.isArray(f))) { if (!n.returnObjects && !this.options.returnObjects) { this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!"); const S = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(y, f, { ...n, ns: a }) : `key '${o} (${this.language})' returned an object instead of string.`; return i ? (d.res = S, d.usedParams = this.getUsedParamsDetails(n), d) : S; } if (s) { const S = Array.isArray(f), _ = S ? [] : {}, w = S ? g : y; for (const A in f) if (Object.prototype.hasOwnProperty.call(f, A)) { const b = `${w}${s}${A}`; _[A] = this.translate(b, { ...n, joinArrays: !1, ns: a }), _[A] === b && (_[A] = f[A]); } f = _; } } else if (p && typeof h == "string" && Array.isArray(f)) f = f.join(h), f && (f = this.extendTranslation(f, t, n, r)); else { let S = !1, _ = !1; const w = n.count !== void 0 && typeof n.count != "string", A = ga.hasDefaultValue(n), b = w ? this.pluralResolver.getSuffix(u, n.count, n) : "", I = n.ordinal && w ? this.pluralResolver.getSuffix(u, n.count, { ordinal: !1 }) : "", F = w && !n.ordinal && n.count === 0 && this.pluralResolver.shouldUseIntlApi(), P = F && n[`defaultValue${this.options.pluralSeparator}zero`] || n[`defaultValue${b}`] || n[`defaultValue${I}`] || n.defaultValue; !this.isValidLookup(f) && A && (S = !0, f = P), this.isValidLookup(f) || (_ = !0, f = o); const me = (n.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && _ ? void 0 : f, E = A && P !== f && this.options.updateMissing; if (_ || S || E) { if (this.logger.log(E ? "updateKey" : "missingKey", u, l, o, E ? P : f), s) { const T = this.resolve(o, { ...n, keySeparator: !1 }); T && T.res && this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format."); } let R = []; const j = this.languageUtils.getFallbackCodes(this.options.fallbackLng, n.lng || this.language); if (this.options.saveMissingTo === "fallback" && j && j[0]) for (let T = 0; T < j.length; T++) R.push(j[T]); else this.options.saveMissingTo === "all" ? R = this.languageUtils.toResolveHierarchy(n.lng || this.language) : R.push(n.lng || this.language); const oe = (T, L, V) => { const X = A && V !== f ? V : me; this.options.missingKeyHandler ? this.options.missingKeyHandler(T, l, L, X, E, n) : this.backendConnector && this.backendConnector.saveMissing && this.backendConnector.saveMissing(T, l, L, X, E, n), this.emit("missingKey", T, l, L, f); }; this.options.saveMissing && (this.options.saveMissingPlurals && w ? R.forEach((T) => { const L = this.pluralResolver.getSuffixes(T, n); F && n[`defaultValue${this.options.pluralSeparator}zero`] && L.indexOf(`${this.options.pluralSeparator}zero`) < 0 && L.push(`${this.options.pluralSeparator}zero`), L.forEach((V) => { oe([T], o + V, n[`defaultValue${V}`] || P); }); }) : oe(R, o, P)); } f = this.extendTranslation(f, t, n, d, r), _ && f === o && this.options.appendNamespaceToMissingKey && (f = `${l}:${o}`), (_ || S) && this.options.parseMissingKeyHandler && (this.options.compatibilityAPI !== "v1" ? f = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${l}:${o}` : o, S ? f : void 0) : f = this.options.parseMissingKeyHandler(f)); } return i ? (d.res = f, d.usedParams = this.getUsedParamsDetails(n), d) : f; } extendTranslation(t, n, r, i, s) { var o = this; if (this.i18nFormat && this.i18nFormat.parse) t = this.i18nFormat.parse(t, { ...this.options.interpolation.defaultVariables, ...r }, r.lng || this.language || i.usedLng, i.usedNS, i.usedKey, { resolved: i }); else if (!r.skipInterpolation) { r.interpolation && this.interpolator.init({ ...r, interpolation: { ...this.options.interpolation, ...r.interpolation } }); const u = typeof t == "string" && (r && r.interpolation && r.interpolation.skipOnVariables !== void 0 ? r.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables); let c; if (u) { const f = t.match(this.interpolator.nestingRegexp); c = f && f.length; } let d = r.replace && typeof r.replace != "string" ? r.replace : r; if (this.options.interpolation.defaultVariables && (d = { ...this.options.interpolation.defaultVariables, ...d }), t = this.interpolator.interpolate(t, d, r.lng || this.language || i.usedLng, r), u) { const f = t.match(this.interpolator.nestingRegexp), y = f && f.length; c < y && (r.nest = !1); } !r.lng && this.options.compatibilityAPI !== "v1" && i && i.res && (r.lng = this.language || i.usedLng), r.nest !== !1 && (t = this.interpolator.nest(t, function() { for (var f = arguments.length, y = new Array(f), g = 0; g < f; g++) y[g] = arguments[g]; return s && s[0] === y[0] && !r.context ? (o.logger.warn(`It seems you are nesting recursively key: ${y[0]} in key: ${n[0]}`), null) : o.translate(...y, n); }, r)), r.interpolation && this.interpolator.reset(); } const a = r.postProcess || this.options.postProcess, l = typeof a == "string" ? [a] : a; return t != null && l && l.length && r.applyPostProcessor !== !1 && (t = Ty.handle(l, t, n, this.options && this.options.postProcessPassResolved ? { i18nResolved: { ...i, usedParams: this.getUsedParamsDetails(r) }, ...r } : r, this)), t; } resolve(t) { let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r, i, s, o, a; return typeof t == "string" && (t = [t]), t.forEach((l) => { if (this.isValidLookup(r)) return; const u = this.extractFromKey(l, n), c = u.key; i = c; let d = u.namespaces; this.options.fallbackNS && (d = d.concat(this.options.fallbackNS)); const f = n.count !== void 0 && typeof n.count != "string", y = f && !n.ordinal && n.count === 0 && this.pluralResolver.shouldUseIntlApi(), g = n.context !== void 0 && (typeof n.context == "string" || typeof n.context == "number") && n.context !== "", m = n.lngs ? n.lngs : this.languageUtils.toResolveHierarchy(n.lng || this.language, n.fallbackLng); d.forEach((k) => { this.isValidLookup(r) || (a = k, !Kh[`${m[0]}-${k}`] && this.utils && this.utils.hasLoadedNamespace && !this.utils.hasLoadedNamespace(a) && (Kh[`${m[0]}-${k}`] = !0, this.logger.warn(`key "${i}" for languages "${m.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")), m.forEach((h) => { if (this.isValidLookup(r)) return; o = h; const p = [c]; if (this.i18nFormat && this.i18nFormat.addLookupKeys) this.i18nFormat.addLookupKeys(p, c, h, k, n); else { let S; f && (S = this.pluralResolver.getSuffix(h, n.count, n)); const _ = `${this.options.pluralSeparator}zero`, w = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`; if (f && (p.push(c + S), n.ordinal && S.indexOf(w) === 0 && p.push(c + S.replace(w, this.options.pluralSeparator)), y && p.push(c + _)), g) { const A = `${c}${this.options.contextSeparator}${n.context}`; p.push(A), f && (p.push(A + S), n.ordinal && S.indexOf(w) === 0 && p.push(A + S.replace(w, this.options.pluralSeparator)), y && p.push(A + _)); } } let v; for (; v = p.pop(); ) this.isValidLookup(r) || (s = v, r = this.getResource(h, k, v, n)); })); }); }), { res: r, usedKey: i, exactUsedKey: s, usedLng: o, usedNS: a }; } isValidLookup(t) { return t !== void 0 && !(!this.options.returnNull && t === null) && !(!this.options.returnEmptyString && t === ""); } getResource(t, n, r) { let i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}; return this.i18nFormat && this.i18nFormat.getResource ? this.i18nFormat.getResource(t, n, r, i) : this.resourceStore.getResource(t, n, r, i); } getUsedParamsDetails() { let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; const n = ["defaultValue", "ordinal", "context", "replace", "lng", "lngs", "fallbackLng", "ns", "keySeparator", "nsSeparator", "returnObjects", "returnDetails", "joinArrays", "postProcess", "interpolation"], r = t.replace && typeof t.replace != "string"; let i = r ? t.replace : t; if (r && typeof t.count < "u" && (i.count = t.count), this.options.interpolation.defaultVariables && (i = { ...this.options.interpolation.defaultVariables, ...i }), !r) { i = { ...i }; for (const s of n) delete i[s]; } return i; } static hasDefaultValue(t) { const n = "defaultValue"; for (const r in t) if (Object.prototype.hasOwnProperty.call(t, r) && n === r.substring(0, n.length) && t[r] !== void 0) return !0; return !1; } } const su = (e) => e.charAt(0).toUpperCase() + e.slice(1); class Jh { constructor(t) { this.options = t, this.supportedLngs = this.options.supportedLngs || !1, this.logger = zt.create("languageUtils"); } getScriptPartFromCode(t) { if (t = ma(t), !t || t.indexOf("-") < 0) return null; const n = t.split("-"); return n.length === 2 || (n.pop(), n[n.length - 1].toLowerCase() === "x") ? null : this.formatLanguageCode(n.join("-")); } getLanguagePartFromCode(t) { if (t = ma(t), !t || t.indexOf("-") < 0) return t; const n = t.split("-"); return this.formatLanguageCode(n[0]); } formatLanguageCode(t) { if (typeof t == "string" && t.indexOf("-") > -1) { const n = ["hans", "hant", "latn", "cyrl", "cans", "mong", "arab"]; let r = t.split("-"); return this.options.lowerCaseLng ? r = r.map((i) => i.toLowerCase()) : r.length === 2 ? (r[0] = r[0].toLowerCase(), r[1] = r[1].toUpperCase(), n.indexOf(r[1].toLowerCase()) > -1 && (r[1] = su(r[1].toLowerCase()))) : r.length === 3 && (r[0] = r[0].toLowerCase(), r[1].length === 2 && (r[1] = r[1].toUpperCase()), r[0] !== "sgn" && r[2].length === 2 && (r[2] = r[2].toUpperCase()), n.indexOf(r[1].toLowerCase()) > -1 && (r[1] = su(r[1].toLowerCase())), n.indexOf(r[2].toLowerCase()) > -1 && (r[2] = su(r[2].toLowerCase()))), r.join("-"); } return this.options.cleanCode || this.options.lowerCaseLng ? t.toLowerCase() : t; } isSupportedCode(t) { return (this.options.load === "languageOnly" || this.options.nonExplicitSupportedLngs) && (t = this.getLanguagePartFromCode(t)), !this.supportedLngs || !this.supportedLngs.length || this.supportedLngs.indexOf(t) > -1; } getBestMatchFromCodes(t) { if (!t) return null; let n; return t.forEach((r) => { if (n) return; const i = this.formatLanguageCode(r); (!this.options.supportedLngs || this.isSupportedCode(i)) && (n = i); }), !n && this.options.supportedLngs && t.forEach((r) => { if (n) return; const i = this.getLanguagePartFromCode(r); if (this.isSupportedCode(i)) return n = i; n = this.options.supportedLngs.find((s) => { if (s === i) return s; if (!(s.indexOf("-") < 0 && i.indexOf("-") < 0) && (s.indexOf("-") > 0 && i.indexOf("-") < 0 && s.substring(0, s.indexOf("-")) === i || s.indexOf(i) === 0 && i.length > 1)) return s; }); }), n || (n = this.getFallbackCodes(this.options.fallbackLng)[0]), n; } getFallbackCodes(t, n) { if (!t) return []; if (typeof t == "function" && (t = t(n)), typeof t == "string" && (t = [t]), Array.isArray(t)) return t; if (!n) return t.default || []; let r = t[n]; return r || (r = t[this.getScriptPartFromCode(n)]), r || (r = t[this.formatLanguageCode(n)]), r || (r = t[this.getLanguagePartFromCode(n)]), r || (r = t.default), r || []; } toResolveHierarchy(t, n) { const r = this.getFallbackCodes(n || this.options.fallbackLng || [], t), i = [], s = (o) => { o && (this.isSupportedCode(o) ? i.push(o) : this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`)); }; return typeof t == "string" && (t.indexOf("-") > -1 || t.indexOf("_") > -1) ? (this.options.load !== "languageOnly" && s(this.formatLanguageCode(t)), this.options.load !== "languageOnly" && this.options.load !== "currentOnly" && s(this.getScriptPartFromCode(t)), this.options.load !== "currentOnly" && s(this.getLanguagePartFromCode(t))) : typeof t == "string" && s(this.formatLanguageCode(t)), r.forEach((o) => { i.indexOf(o) < 0 && s(this.formatLanguageCode(o)); }), i; } } let MA = [{ lngs: ["ach", "ak", "am", "arn", "br", "fil", "gun", "ln", "mfe", "mg", "mi", "oc", "pt", "pt-BR", "tg", "tl", "ti", "tr", "uz", "wa"], nr: [1, 2], fc: 1 }, { lngs: ["af", "an", "ast", "az", "bg", "bn", "ca", "da", "de", "dev", "el", "en", "eo", "es", "et", "eu", "fi", "fo", "fur", "fy", "gl", "gu", "ha", "hi", "hu", "hy", "ia", "it", "kk", "kn", "ku", "lb", "mai", "ml", "mn", "mr", "nah", "nap", "nb", "ne", "nl", "nn", "no", "nso", "pa", "pap", "pms", "ps", "pt-PT", "rm", "sco", "se", "si", "so", "son", "sq", "sv", "sw", "ta", "te", "tk", "ur", "yo"], nr: [1, 2], fc: 2 }, { lngs: ["ay", "bo", "cgg", "fa", "ht", "id", "ja", "jbo", "ka", "km", "ko", "ky", "lo", "ms", "sah", "su", "th", "tt", "ug", "vi", "wo", "zh"], nr: [1], fc: 3 }, { lngs: ["be", "bs", "cnr", "dz", "hr", "ru", "sr", "uk"], nr: [1, 2, 5], fc: 4 }, { lngs: ["ar"], nr: [0, 1, 2, 3, 11, 100], fc: 5 }, { lngs: ["cs", "sk"], nr: [1, 2, 5], fc: 6 }, { lngs: ["csb", "pl"], nr: [1, 2, 5], fc: 7 }, { lngs: ["cy"], nr: [1, 2, 3, 8], fc: 8 }, { lngs: ["fr"], nr: [1, 2], fc: 9 }, { lngs: ["ga"], nr: [1, 2, 3, 7, 11], fc: 10 }, { lngs: ["gd"], nr: [1, 2, 3, 20], fc: 11 }, { lngs: ["is"], nr: [1, 2], fc: 12 }, { lngs: ["jv"], nr: [0, 1], fc: 13 }, { lngs: ["kw"], nr: [1, 2, 3, 4], fc: 14 }, { lngs: ["lt"], nr: [1, 2, 10], fc: 15 }, { lngs: ["lv"], nr: [1, 2, 0], fc: 16 }, { lngs: ["mk"], nr: [1, 2], fc: 17 }, { lngs: ["mnk"], nr: [0, 1, 2], fc: 18 }, { lngs: ["mt"], nr: [1, 2, 11, 20], fc: 19 }, { lngs: ["or"], nr: [2, 1], fc: 2 }, { lngs: ["ro"], nr: [1, 2, 20], fc: 20 }, { lngs: ["sl"], nr: [5, 1, 2, 3], fc: 21 }, { lngs: ["he", "iw"], nr: [1, 2, 20, 21], fc: 22 }], UA = { 1: (e) => +(e > 1), 2: (e) => +(e != 1), 3: (e) => 0, 4: (e) => e % 10 == 1 && e % 100 != 11 ? 0 : e % 10 >= 2 && e % 10 <= 4 && (e % 100 < 10 || e % 100 >= 20) ? 1 : 2, 5: (e) => e == 0 ? 0 : e == 1 ? 1 : e == 2 ? 2 : e % 100 >= 3 && e % 100 <= 10 ? 3 : e % 100 >= 11 ? 4 : 5, 6: (e) => e == 1 ? 0 : e >= 2 && e <= 4 ? 1 : 2, 7: (e) => e == 1 ? 0 : e % 10 >= 2 && e % 10 <= 4 && (e % 100 < 10 || e % 100 >= 20) ? 1 : 2, 8: (e) => e == 1 ? 0 : e == 2 ? 1 : e != 8 && e != 11 ? 2 : 3, 9: (e) => +(e >= 2), 10: (e) => e == 1 ? 0 : e == 2 ? 1 : e < 7 ? 2 : e < 11 ? 3 : 4, 11: (e) => e == 1 || e == 11 ? 0 : e == 2 || e == 12 ? 1 : e > 2 && e < 20 ? 2 : 3, 12: (e) => +(e % 10 != 1 || e % 100 == 11), 13: (e) => +(e !== 0), 14: (e) => e == 1 ? 0 : e == 2 ? 1 : e == 3 ? 2 : 3, 15: (e) => e % 10 == 1 && e % 100 != 11 ? 0 : e % 10 >= 2 && (e % 100 < 10 || e % 100 >= 20) ? 1 : 2, 16: (e) => e % 10 == 1 && e % 100 != 11 ? 0 : e !== 0 ? 1 : 2, 17: (e) => e == 1 || e % 10 == 1 && e % 100 != 11 ? 0 : 1, 18: (e) => e == 0 ? 0 : e == 1 ? 1 : 2, 19: (e) => e == 1 ? 0 : e == 0 || e % 100 > 1 && e % 100 < 11 ? 1 : e % 100 > 10 && e % 100 < 20 ? 2 : 3, 20: (e) => e == 1 ? 0 : e == 0 || e % 100 > 0 && e % 100 < 20 ? 1 : 2, 21: (e) => e % 100 == 1 ? 1 : e % 100 == 2 ? 2 : e % 100 == 3 || e % 100 == 4 ? 3 : 0, 22: (e) => e == 1 ? 0 : e == 2 ? 1 : (e < 0 || e > 10) && e % 10 == 0 ? 2 : 3 }; const jA = ["v1", "v2", "v3"], VA = ["v4"], Yh = { zero: 0, one: 1, two: 2, few: 3, many: 4, other: 5 }, BA = () => { const e = {}; return MA.forEach((t) => { t.lngs.forEach((n) => { e[n] = { numbers: t.nr, plurals: UA[t.fc] }; }); }), e; }; class zA { constructor(t) { let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; this.languageUtils = t, this.options = n, this.logger = zt.create("pluralResolver"), (!this.options.compatibilityJSON || VA.includes(this.options.compatibilityJSON)) && (typeof Intl > "u" || !Intl.PluralRules) && (this.options.compatibilityJSON = "v3", this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")), this.rules = BA(), this.pluralRulesCache = {}; } addRule(t, n) { this.rules[t] = n; } clearCache() { this.pluralRulesCache = {}; } getRule(t) { let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; if (this.shouldUseIntlApi()) try { const r = ma(t === "dev" ? "en" : t), i = n.ordinal ? "ordinal" : "cardinal", s = JSON.stringify({ cleanedCode: r, type: i }); if (s in this.pluralRulesCache) return this.pluralRulesCache[s]; const o = new Intl.PluralRules(r, { type: i }); return this.pluralRulesCache[s] = o, o; } catch { return; } return this.rules[t] || this.rules[this.languageUtils.getLanguagePartFromCode(t)]; } needsPlural(t) { let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; const r = this.getRule(t, n); return this.shouldUseIntlApi() ? r && r.resolvedOptions().pluralCategories.length > 1 : r && r.numbers.length > 1; } getPluralFormsOfKey(t, n) { let r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}; return this.getSuffixes(t, r).map((i) => `${n}${i}`); } getSuffixes(t) { let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; const r = this.getRule(t, n); return r ? this.shouldUseIntlApi() ? r.resolvedOptions().pluralCategories.sort((i, s) => Yh[i] - Yh[s]).map((i) => `${this.options.prepend}${n.ordinal ? `ordinal${this.options.prepend}` : ""}${i}`) : r.numbers.map((i) => this.getSuffix(t, i, n)) : []; } getSuffix(t, n) { let r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}; const i = this.getRule(t, r); return i ? this.shouldUseIntlApi() ? `${this.options.prepend}${r.ordinal ? `ordinal${this.options.prepend}` : ""}${i.select(n)}` : this.getSuffixRetroCompatible(i, n) : (this.logger.warn(`no plural rule found for: ${t}`), ""); } getSuffixRetroCompatible(t, n) { const r = t.noAbs ? t.plurals(n) : t.plurals(Math.abs(n)); let i = t.numbers[r]; this.options.simplifyPluralSuffix && t.numbers.length === 2 && t.numbers[0] === 1 && (i === 2 ? i = "plural" : i === 1 && (i = "")); const s = () => this.options.prepend && i.toString() ? this.options.prepend + i.toString() : i.toString(); return this.options.compatibilityJSON === "v1" ? i === 1 ? "" : typeof i == "number" ? `_plural_${i.toString()}` : s() : this.options.compatibilityJSON === "v2" || this.options.simplifyPluralSuffix && t.numbers.length === 2 && t.numbers[0] === 1 ? s() : this.options.prepend && r.toString() ? this.options.prepend + r.toString() : r.toString(); } shouldUseIntlApi() { return !jA.includes(this.options.compatibilityJSON); } } const Xh = function(e, t, n) { let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : ".", i = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, s = RA(e, t, n); return !s && i && typeof n == "string" && (s = mc(e, n, r), s === void 0 && (s = mc(t, n, r))), s; }, ou = (e) => e.replace(/\$/g, "$$$$"); class HA { constructor() { let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; this.logger = zt.create("interpolator"), this.options = t, this.format = t.interpolation && t.interpolation.format || ((n) => n), this.init(t); } init() { let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; t.interpolation || (t.interpolation = { escapeValue: !0 }); const { escape: n, escapeValue: r, useRawValueToEscape: i, prefix: s, prefixEscaped: o, suffix: a, suffixEscaped: l, formatSeparator: u, unescapeSuffix: c, unescapePrefix: d, nestingPrefix: f, nestingPrefixEscaped: y, nestingSuffix: g, nestingSuffixEscaped: m, nestingOptionsSeparator: k, maxReplaces: h, alwaysFormat: p } = t.interpolation; this.escape = n !== void 0 ? n : PA, this.escapeValue = r !== void 0 ? r : !0, this.useRawValueToEscape = i !== void 0 ? i : !1, this.prefix = s ? Rr(s) : o || "{{", this.suffix = a ? Rr(a) : l || "}}", this.formatSeparator = u || ",", this.unescapePrefix = c ? "" : d || "-", this.unescapeSuffix = this.unescapePrefix ? "" : c || "", this.nestingPrefix = f ? Rr(f) : y || Rr("$t("), this.nestingSuffix = g ? Rr(g) : m || Rr(")"), this.nestingOptionsSeparator = k || ",", this.maxReplaces = h || 1e3, this.alwaysFormat = p !== void 0 ? p : !1, this.resetRegExp(); } reset() { this.options && this.init(this.options); } resetRegExp() { const t = (n, r) => n && n.source === r ? (n.lastIndex = 0, n) : new RegExp(r, "g"); this.regexp = t(this.regexp, `${this.prefix}(.+?)${this.suffix}`), this.regexpUnescape = t(this.regexpUnescape, `${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`), this.nestingRegexp = t(this.nestingRegexp, `${this.nestingPrefix}(.+?)${this.nestingSuffix}`); } interpolate(t, n, r, i) { let s, o, a; const l = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, u = (y) => { if (y.indexOf(this.formatSeparator) < 0) { const h = Xh(n, l, y, this.options.keySeparator, this.options.ignoreJSONStructure); return this.alwaysFormat ? this.format(h, void 0, r, { ...i, ...n, interpolationkey: y }) : h; } const g = y.split(this.formatSeparator), m = g.shift().trim(), k = g.join(this.formatSeparator).trim(); return this.format(Xh(n, l, m, this.options.keySeparator, this.options.ignoreJSONStructure), k, r, { ...i, ...n, interpolationkey: m }); }; this.resetRegExp(); const c = i && i.missingInterpolationHandler || this.options.missingInterpolationHandler, d = i && i.interpolation && i.interpolation.skipOnVariables !== void 0 ? i.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables; return [{ regex: this.regexpUnescape, safeValue: (y) => ou(y) }, { regex: this.regexp, safeValue: (y) => this.escapeValue ? ou(this.escape(y)) : ou(y) }].forEach((y) => { for (a = 0; s = y.regex.exec(t); ) { const g = s[1].trim(); if (o = u(g), o === void 0) if (typeof c == "function") { const k = c(t, s, i); o = typeof k == "string" ? k : ""; } else if (i && Object.prototype.hasOwnProperty.call(i, g)) o = ""; else if (d) { o = s[0]; continue; } else this.logger.warn(`missed to pass in variable ${g} for interpolating ${t}`), o = ""; else typeof o != "string" && !this.useRawValueToEscape && (o = Hh(o)); const m = y.safeValue(o); if (t = t.replace(s[0], m), d ? (y.regex.lastIndex += o.length, y.regex.lastIndex -= s[0].length) : y.regex.lastIndex = 0, a++, a >= this.maxReplaces) break; } }), t; } nest(t, n) { let r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, i, s, o; const a = (l, u) => { const c = this.nestingOptionsSeparator; if (l.indexOf(c) < 0) return l; const d = l.split(new RegExp(`${c}[ ]*{`)); let f = `{${d[1]}`; l = d[0], f = this.interpolate(f, o); const y = f.match(/'/g), g = f.match(/"/g); (y && y.length % 2 === 0 && !g || g.length % 2 !== 0) && (f = f.replace(/'/g, '"')); try { o = JSON.parse(f), u && (o = { ...u, ...o }); } catch (m) { return this.logger.warn(`failed parsing options string in nesting for key ${l}`, m), `${l}${c}${f}`; } return o.defaultValue && o.defaultValue.indexOf(this.prefix) > -1 && delete o.defaultValue, l; }; for (; i = this.nestingRegexp.exec(t); ) { let l = []; o = { ...r }, o = o.replace && typeof o.replace != "string" ? o.replace : o, o.applyPostProcessor = !1, delete o.defaultValue; let u = !1; if (i[0].indexOf(this.formatSeparator) !== -1 && !/{.*}/.test(i[1])) { const c = i[1].split(this.formatSeparator).map((d) => d.trim()); i[1] = c.shift(), l = c, u = !0; } if (s = n(a.call(this, i[1].trim(), o), o), s && i[0] === t && typeof s != "string") return s; typeof s != "string" && (s = Hh(s)), s || (this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`), s = ""), u && (s = l.reduce((c, d) => this.format(c, d, r.lng, { ...r, interpolationkey: i[1].trim() }), s.trim())), t = t.replace(i[0], s), this.regexp.lastIndex = 0; } return t; } } const GA = (e) => { let t = e.toLowerCase().trim(); const n = {}; if (e.indexOf("(") > -1) { const r = e.split("("); t = r[0].toLowerCase().trim(); const i = r[1].substring(0, r[1].length - 1); t === "currency" && i.indexOf(":") < 0 ? n.currency || (n.currency = i.trim()) : t === "relativetime" && i.indexOf(":") < 0 ? n.range || (n.range = i.trim()) : i.split(";").forEach((o) => { if (o) { const [a, ...l] = o.split(":"), u = l.join(":").trim().replace(/^'+|'+$/g, ""), c = a.trim(); n[c] || (n[c] = u), u === "false" && (n[c] = !1), u === "true" && (n[c] = !0), isNaN(u) || (n[c] = parseInt(u, 10)); } }); } return { formatName: t, formatOptions: n }; }, Ir = (e) => { const t = {}; return (n, r, i) => { let s = i; i && i.interpolationkey && i.formatParams && i.formatParams[i.interpolationkey] && i[i.interpolationkey] && (s = { ...s, [i.interpolationkey]: void 0 }); const o = r + JSON.stringify(s); let a = t[o]; return a || (a = e(ma(r), i), t[o] = a), a(n); }; }; class WA { constructor() { let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; this.logger = zt.create("formatter"), this.options = t, this.formats = { number: Ir((n, r) => { const i = new Intl.NumberFormat(n, { ...r }); return (s) => i.format(s); }), currency: Ir((n, r) => { const i = new Intl.NumberFormat(n, { ...r, style: "currency" }); return (s) => i.format(s); }), datetime: Ir((n, r) => { const i = new Intl.DateTimeFormat(n, { ...r }); return (s) => i.format(s); }), relativetime: Ir((n, r) => { const i = new Intl.RelativeTimeFormat(n, { ...r }); return (s) => i.format(s, r.range || "day"); }), list: Ir((n, r) => { const i = new Intl.ListFormat(n, { ...r }); return (s) => i.format(s); }) }, this.init(t); } init(t) { const r = (arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : { interpolation: {} }).interpolation; this.formatSeparator = r.formatSeparator ? r.formatSeparator : r.formatSeparator || ","; } add(t, n) { this.formats[t.toLowerCase().trim()] = n; } addCached(t, n) { this.formats[t.toLowerCase().trim()] = Ir(n); } format(t, n, r) { let i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}; const s = n.split(this.formatSeparator); if (s.length > 1 && s[0].indexOf("(") > 1 && s[0].indexOf(")") < 0 && s.find((a) => a.indexOf(")") > -1)) { const a = s.findIndex((l) => l.indexOf(")") > -1); s[0] = [s[0], ...s.splice(1, a)].join(this.formatSeparator); } return s.reduce((a, l) => { const { formatName: u, formatOptions: c } = GA(l); if (this.formats[u]) { let d = a; try { const f = i && i.formatParams && i.formatParams[i.interpolationkey] || {}, y = f.locale || f.lng || i.locale || i.lng || r; d = this.formats[u](a, y, { ...c, ...i, ...f }); } catch (f) { this.logger.warn(f); } return d; } else this.logger.warn(`there was no format function for ${u}`); return a; }, t); } } const qA = (e, t) => { e.pending[t] !== void 0 && (delete e.pending[t], e.pendingCount--); }; class QA extends vl { constructor(t, n, r) { let i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {}; super(), this.backend = t, this.store = n, this.services = r, this.languageUtils = r.languageUtils, this.options = i, this.logger = zt.create("backendConnector"), this.waitingReads = [], this.maxParallelReads = i.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = i.maxRetries >= 0 ? i.maxRetries : 5, this.retryTimeout = i.retryTimeout >= 1 ? i.retryTimeout : 350, this.state = {}, this.queue = [], this.backend && this.backend.init && this.backend.init(r, i.backend, i); } queueLoad(t, n, r, i) { const s = {}, o = {}, a = {}, l = {}; return t.forEach((u) => { let c = !0; n.forEach((d) => { const f = `${u}|${d}`; !r.reload && this.store.hasResourceBundle(u, d) ? this.state[f] = 2 : this.state[f] < 0 || (this.state[f] === 1 ? o[f] === void 0 && (o[f] = !0) : (this.state[f] = 1, c = !1, o[f] === void 0 && (o[f] = !0), s[f] === void 0 && (s[f] = !0), l[d] === void 0 && (l[d] = !0))); }), c || (a[u] = !0); }), (Object.keys(s).length || Object.keys(o).length) && this.queue.push({ pending: o, pendingCount: Object.keys(o).length, loaded: {}, errors: [], callback: i }), { toLoad: Object.keys(s), pending: Object.keys(o), toLoadLanguages: Object.keys(a), toLoadNamespaces: Object.keys(l) }; } loaded(t, n, r) { const i = t.split("|"), s = i[0], o = i[1]; n && this.emit("failedLoading", s, o, n), !n && r && this.store.addResourceBundle(s, o, r, void 0, void 0, { skipCopy: !0 }), this.state[t] = n ? -1 : 2, n && r && (this.state[t] = 0); const a = {}; this.queue.forEach((l) => { xA(l.loaded, [s], o), qA(l, t), n && l.errors.push(n), l.pendingCount === 0 && !l.done && (Object.keys(l.loaded).forEach((u) => { a[u] || (a[u] = {}); const c = l.loaded[u]; c.length && c.forEach((d) => { a[u][d] === void 0 && (a[u][d] = !0); }); }), l.done = !0, l.errors.length ? l.callback(l.errors) : l.callback()); }), this.emit("loaded", a), this.queue = this.queue.filter((l) => !l.done); } read(t, n, r) { let i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0, s = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : this.retryTimeout, o = arguments.length > 5 ? arguments[5] : void 0; if (!t.length) return o(null, {}); if (this.readingCalls >= this.maxParallelReads) { this.waitingReads.push({ lng: t, ns: n, fcName: r, tried: i, wait: s, callback: o }); return; } this.readingCalls++; const a = (u, c) => { if (this.readingCalls--, this.waitingReads.length > 0) { const d = this.waitingReads.shift(); this.read(d.lng, d.ns, d.fcName, d.tried, d.wait, d.callback); } if (u && c && i < this.maxRetries) { setTimeout(() => { this.read.call(this, t, n, r, i + 1, s * 2, o); }, s); return; } o(u, c); }, l = this.backend[r].bind(this.backend); if (l.length === 2) { try { const u = l(t, n); u && typeof u.then == "function" ? u.then((c) => a(null, c)).catch(a) : a(null, u); } catch (u) { a(u); } return; } return l(t, n, a); } prepareLoading(t, n) { let r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, i = arguments.length > 3 ? arguments[3] : void 0; if (!this.backend) return this.logger.warn("No backend was added via i18next.use. Will not load resources."), i && i(); typeof t == "string" && (t = this.languageUtils.toResolveHierarchy(t)), typeof n == "string" && (n = [n]); const s = this.queueLoad(t, n, r, i); if (!s.toLoad.length) return s.pending.length || i(), null; s.toLoad.forEach((o) => { this.loadOne(o); }); } load(t, n, r) { this.prepareLoading(t, n, {}, r); } reload(t, n, r) { this.prepareLoading(t, n, { reload: !0 }, r); } loadOne(t) { let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ""; const r = t.split("|"), i = r[0], s = r[1]; this.read(i, s, "read", void 0, void 0, (o, a) => { o && this.logger.warn(`${n}loading namespace ${s} for language ${i} failed`, o), !o && a && this.logger.log(`${n}loaded namespace ${s} for language ${i}`, a), this.loaded(t, o, a); }); } saveMissing(t, n, r, i, s) { let o = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {}, a = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : () => { }; if (this.services.utils && this.services.utils.hasLoadedNamespace && !this.services.utils.hasLoadedNamespace(n)) { this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"); return; } if (!(r == null || r === "")) { if (this.backend && this.backend.create) { const l = { ...o, isUpdate: s }, u = this.backend.create.bind(this.backend); if (u.length < 6) try { let c; u.length === 5 ? c = u(t, n, r, i, l) : c = u(t, n, r, i), c && typeof c.then == "function" ? c.then((d) => a(null, d)).catch(a) : a(null, c); } catch (c) { a(c); } else u(t, n, r, i, a, l); } !t || !t[0] || this.store.addResource(t[0], n, r, i); } } } const Zh = () => ({ debug: !1, initImmediate: !0, ns: ["translation"], defaultNS: ["translation"], fallbackLng: ["dev"], fallbackNS: !1, supportedLngs: !1, nonExplicitSupportedLngs: !1, load: "all", preload: !1, simplifyPluralSuffix: !0, keySeparator: ".", nsSeparator: ":", pluralSeparator: "_", contextSeparator: "_", partialBundledLanguages: !1, saveMissing: !1, updateMissing: !1, saveMissingTo: "fallback", saveMissingPlurals: !0, missingKeyHandler: !1, missingInterpolationHandler: !1, postProcess: !1, postProcessPassResolved: !1, returnNull: !1, returnEmptyString: !0, returnObjects: !1, joinArrays: !1, returnedObjectHandler: !1, parseMissingKeyHandler: !1, appendNamespaceToMissingKey: !1, appendNamespaceToCIMode: !1, overloadTranslationOptionHandler: (e) => { let t = {}; if (typeof e[1] == "object" && (t = e[1]), typeof e[1] == "string" && (t.defaultValue = e[1]), typeof e[2] == "string" && (t.tDescription = e[2]), typeof e[2] == "object" || typeof e[3] == "object") { const n = e[3] || e[2]; Object.keys(n).forEach((r) => { t[r] = n[r]; }); } return t; }, interpolation: { escapeValue: !0, format: (e) => e, prefix: "{{", suffix: "}}", formatSeparator: ",", unescapePrefix: "-", nestingPrefix: "$t(", nestingSuffix: ")", nestingOptionsSeparator: ",", maxReplaces: 1e3, skipOnVariables: !0 } }), ep = (e) => (typeof e.ns == "string" && (e.ns = [e.ns]), typeof e.fallbackLng == "string" && (e.fallbackLng = [e.fallbackLng]), typeof e.fallbackNS == "string" && (e.fallbackNS = [e.fallbackNS]), e.supportedLngs && e.supportedLngs.indexOf("cimode") < 0 && (e.supportedLngs = e.supportedLngs.concat(["cimode"])), e), uo = () => { }, KA = (e) => { Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((n) => { typeof e[n] == "function" && (e[n] = e[n].bind(e)); }); }; class Ss extends vl { constructor() { let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n = arguments.length > 1 ? arguments[1] : void 0; if (super(), this.options = ep(t), this.services = {}, this.logger = zt, this.modules = { external: [] }, KA(this), n && !this.isInitialized && !t.isClone) { if (!this.options.initImmediate) return this.init(t, n), this; setTimeout(() => { this.init(t, n); }, 0); } } init() { var t = this; let n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, r = arguments.length > 1 ? arguments[1] : void 0; this.isInitializing = !0, typeof n == "function" && (r = n, n = {}), !n.defaultNS && n.defaultNS !== !1 && n.ns && (typeof n.ns == "string" ? n.defaultNS = n.ns : n.ns.indexOf("translation") < 0 && (n.defaultNS = n.ns[0])); const i = Zh(); this.options = { ...i, ...this.options, ...ep(n) }, this.options.compatibilityAPI !== "v1" && (this.options.interpolation = { ...i.interpolation, ...this.options.interpolation }), n.keySeparator !== void 0 && (this.options.userDefinedKeySeparator = n.keySeparator), n.nsSeparator !== void 0 && (this.options.userDefinedNsSeparator = n.nsSeparator); const s = (c) => c ? typeof c == "function" ? new c() : c : null; if (!this.options.isClone) { this.modules.logger ? zt.init(s(this.modules.logger), this.options) : zt.init(null, this.options); let c; this.modules.formatter ? c = this.modules.formatter : typeof Intl < "u" && (c = WA); const d = new Jh(this.options); this.store = new Qh(this.options.resources, this.options); const f = this.services; f.logger = zt, f.resourceStore = this.store, f.languageUtils = d, f.pluralResolver = new zA(d, { prepend: this.options.pluralSeparator, compatibilityJSON: this.options.compatibilityJSON, simplifyPluralSuffix: this.options.simplifyPluralSuffix }), c && (!this.options.interpolation.format || this.options.interpolation.format === i.interpolation.format) && (f.formatter = s(c), f.formatter.init(f, this.options), this.options.interpolation.format = f.formatter.format.bind(f.formatter)), f.interpolator = new HA(this.options), f.utils = { hasLoadedNamespace: this.hasLoadedNamespace.bind(this) }, f.backendConnector = new QA(s(this.modules.backend), f.resourceStore, f, this.options), f.backendConnector.on("*", function(y) { for (var g = arguments.length, m = new Array(g > 1 ? g - 1 : 0), k = 1; k < g; k++) m[k - 1] = arguments[k]; t.emit(y, ...m); }), this.modules.languageDetector && (f.languageDetector = s(this.modules.languageDetector), f.languageDetector.init && f.languageDetector.init(f, this.options.detection, this.options)), this.modules.i18nFormat && (f.i18nFormat = s(this.modules.i18nFormat), f.i18nFormat.init && f.i18nFormat.init(this)), this.translator = new ga(this.services, this.options), this.translator.on("*", function(y) { for (var g = arguments.length, m = new Array(g > 1 ? g - 1 : 0), k = 1; k < g; k++) m[k - 1] = arguments[k]; t.emit(y, ...m); }), this.modules.external.forEach((y) => { y.init && y.init(this); }); } if (this.format = this.options.interpolation.format, r || (r = uo), this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) { const c = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng); c.length > 0 && c[0] !== "dev" && (this.options.lng = c[0]); } !this.services.languageDetector && !this.options.lng && this.logger.warn("init: no languageDetector is used and no lng is defined"), ["getResource", "hasResourceBundle", "getResourceBundle", "getDataByLanguage"].forEach((c) => { this[c] = function() { return t.store[c](...arguments); }; }), ["addResource", "addResources", "addResourceBundle", "removeResourceBundle"].forEach((c) => { this[c] = function() { return t.store[c](...arguments), t; }; }); const l = Pi(), u = () => { const c = (d, f) => { this.isInitializing = !1, this.isInitialized && !this.initializedStoreOnce && this.logger.warn("init: i18next is already initialized. You should call init just once!"), this.isInitialized = !0, this.options.isClone || this.logger.log("initialized", this.options), this.emit("initialized", this.options), l.resolve(f), r(d, f); }; if (this.languages && this.options.compatibilityAPI !== "v1" && !this.isInitialized) return c(null, this.t.bind(this)); this.changeLanguage(this.options.lng, c); }; return this.options.resources || !this.options.initImmediate ? u() : setTimeout(u, 0), l; } loadResources(t) { let r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : uo; const i = typeof t == "string" ? t : this.language; if (typeof t == "function" && (r = t), !this.options.resources || this.options.partialBundledLanguages) { if (i && i.toLowerCase() === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return r(); const s = [], o = (a) => { if (!a || a === "cimode") return; this.services.languageUtils.toResolveHierarchy(a).forEach((u) => { u !== "cimode" && s.indexOf(u) < 0 && s.push(u); }); }; i ? o(i) : this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((l) => o(l)), this.options.preload && this.options.preload.forEach((a) => o(a)), this.services.backendConnector.load(s, this.options.ns, (a) => { !a && !this.resolvedLanguage && this.language && this.setResolvedLanguage(this.language), r(a); }); } else r(null); } reloadResources(t, n, r) { const i = Pi(); return typeof t == "function" && (r = t, t = void 0), typeof n == "function" && (r = n, n = void 0), t || (t = this.languages), n || (n = this.options.ns), r || (r = uo), this.services.backendConnector.reload(t, n, (s) => { i.resolve(), r(s); }), i; } use(t) { if (!t) throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()"); if (!t.type) throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()"); return t.type === "backend" && (this.modules.backend = t), (t.type === "logger" || t.log && t.warn && t.error) && (this.modules.logger = t), t.type === "languageDetector" && (this.modules.languageDetector = t), t.type === "i18nFormat" && (this.modules.i18nFormat = t), t.type === "postProcessor" && Ty.addPostProcessor(t), t.type === "formatter" && (this.modules.formatter = t), t.type === "3rdParty" && this.modules.external.push(t), this; } setResolvedLanguage(t) { if (!(!t || !this.languages) && !(["cimode", "dev"].indexOf(t) > -1)) for (let n = 0; n < this.languages.length; n++) { const r = this.languages[n]; if (!(["cimode", "dev"].indexOf(r) > -1) && this.store.hasLanguageSomeTranslations(r)) { this.resolvedLanguage = r; break; } } } changeLanguage(t, n) { var r = this; this.isLanguageChangingTo = t; const i = Pi(); this.emit("languageChanging", t); const s = (l) => { this.language = l, this.languages = this.services.languageUtils.toResolveHierarchy(l), this.resolvedLanguage = void 0, this.setResolvedLanguage(l); }, o = (l, u) => { u ? (s(u), this.translator.changeLanguage(u), this.isLanguageChangingTo = void 0, this.emit("languageChanged", u), this.logger.log("languageChanged", u)) : this.isLanguageChangingTo = void 0, i.resolve(function() { return r.t(...arguments); }), n && n(l, function() { return r.t(...arguments); }); }, a = (l) => { !t && !l && this.services.languageDetector && (l = []); const u = typeof l == "string" ? l : this.services.languageUtils.getBestMatchFromCodes(l); u && (this.language || s(u), this.translator.language || this.translator.changeLanguage(u), this.services.languageDetector && this.services.languageDetector.cacheUserLanguage && this.services.languageDetector.cacheUserLanguage(u)), this.loadResources(u, (c) => { o(c, u); }); }; return !t && this.services.languageDetector && !this.services.languageDetector.async ? a(this.services.languageDetector.detect()) : !t && this.services.languageDetector && this.services.languageDetector.async ? this.services.languageDetector.detect.length === 0 ? this.services.languageDetector.detect().then(a) : this.services.languageDetector.detect(a) : a(t), i; } getFixedT(t, n, r) { var i = this; const s = function(o, a) { let l; if (typeof a != "object") { for (var u = arguments.length, c = new Array(u > 2 ? u - 2 : 0), d = 2; d < u; d++) c[d - 2] = arguments[d]; l = i.options.overloadTranslationOptionHandler([o, a].concat(c)); } else l = { ...a }; l.lng = l.lng || s.lng, l.lngs = l.lngs || s.lngs, l.ns = l.ns || s.ns, l.keyPrefix !== "" && (l.keyPrefix = l.keyPrefix || r || s.keyPrefix); const f = i.options.keySeparator || "."; let y; return l.keyPrefix && Array.isArray(o) ? y = o.map((g) => `${l.keyPrefix}${f}${g}`) : y = l.keyPrefix ? `${l.keyPrefix}${f}${o}` : o, i.t(y, l); }; return typeof t == "string" ? s.lng = t : s.lngs = t, s.ns = n, s.keyPrefix = r, s; } t() { return this.translator && this.translator.translate(...arguments); } exists() { return this.translator && this.translator.exists(...arguments); } setDefaultNamespace(t) { this.options.defaultNS = t; } hasLoadedNamespace(t) { let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; if (!this.isInitialized) return this.logger.warn("hasLoadedNamespace: i18next was not initialized", this.languages), !1; if (!this.languages || !this.languages.length) return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty", this.languages), !1; const r = n.lng || this.resolvedLanguage || this.languages[0], i = this.options ? this.options.fallbackLng : !1, s = this.languages[this.languages.length - 1]; if (r.toLowerCase() === "cimode") return !0; const o = (a, l) => { const u = this.services.backendConnector.state[`${a}|${l}`]; return u === -1 || u === 0 || u === 2; }; if (n.precheck) { const a = n.precheck(this, o); if (a !== void 0) return a; } return !!(this.hasResourceBundle(r, t) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages || o(r, t) && (!i || o(s, t))); } loadNamespaces(t, n) { const r = Pi(); return this.options.ns ? (typeof t == "string" && (t = [t]), t.forEach((i) => { this.options.ns.indexOf(i) < 0 && this.options.ns.push(i); }), this.loadResources((i) => { r.resolve(), n && n(i); }), r) : (n && n(), Promise.resolve()); } loadLanguages(t, n) { const r = Pi(); typeof t == "string" && (t = [t]); const i = this.options.preload || [], s = t.filter((o) => i.indexOf(o) < 0 && this.services.languageUtils.isSupportedCode(o)); return s.length ? (this.options.preload = i.concat(s), this.loadResources((o) => { r.resolve(), n && n(o); }), r) : (n && n(), Promise.resolve()); } dir(t) { if (t || (t = this.resolvedLanguage || (this.languages && this.languages.length > 0 ? this.languages[0] : this.language)), !t) return "rtl"; const n = ["ar", "shu", "sqr", "ssh", "xaa", "yhd", "yud", "aao", "abh", "abv", "acm", "acq", "acw", "acx", "acy", "adf", "ads", "aeb", "aec", "afb", "ajp", "apc", "apd", "arb", "arq", "ars", "ary", "arz", "auz", "avl", "ayh", "ayl", "ayn", "ayp", "bbz", "pga", "he", "iw", "ps", "pbt", "pbu", "pst", "prp", "prd", "ug", "ur", "ydd", "yds", "yih", "ji", "yi", "hbo", "men", "xmn", "fa", "jpr", "peo", "pes", "prs", "dv", "sam", "ckb"], r = this.services && this.services.languageUtils || new Jh(Zh()); return n.indexOf(r.getLanguagePartFromCode(t)) > -1 || t.toLowerCase().indexOf("-arab") > 1 ? "rtl" : "ltr"; } static createInstance() { let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n = arguments.length > 1 ? arguments[1] : void 0; return new Ss(t, n); } cloneInstance() { let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : uo; const r = t.forkResourceStore; r && delete t.forkResourceStore; const i = { ...this.options, ...t, isClone: !0 }, s = new Ss(i); return (t.debug !== void 0 || t.prefix !== void 0) && (s.logger = s.logger.clone(t)), ["store", "services", "language"].forEach((a) => { s[a] = this[a]; }), s.services = { ...this.services }, s.services.utils = { hasLoadedNamespace: s.hasLoadedNamespace.bind(s) }, r && (s.store = new Qh(this.store.data, i), s.services.resourceStore = s.store), s.translator = new ga(s.services, i), s.translator.on("*", function(a) { for (var l = arguments.length, u = new Array(l > 1 ? l - 1 : 0), c = 1; c < l; c++) u[c - 1] = arguments[c]; s.emit(a, ...u); }), s.init(i, n), s.translator.options = i, s.translator.backendConnector.services.utils = { hasLoadedNamespace: s.hasLoadedNamespace.bind(s) }, s; } toJSON() { return { options: this.options, store: this.store, language: this.language, languages: this.languages, resolvedLanguage: this.resolvedLanguage }; } } const Oe = Ss.createInstance(); Oe.createInstance = Ss.createInstance; Oe.createInstance; Oe.dir; Oe.init; Oe.loadResources; Oe.reloadResources; Oe.use; Oe.changeLanguage; Oe.getFixedT; const tp = Oe.t; Oe.exists; Oe.setDefaultNamespace; Oe.hasLoadedNamespace; Oe.loadNamespaces; Oe.loadLanguages; const xy = (e) => tp(e ? `errorCodes.${e}` : "errorCodes.DEFAULT"); class JA { constructor(t) { O(this, "logger"); O(this, "axiosInstance"); this.logger = t.logger, this.axiosInstance = le.create({ baseURL: t.baseUrl, headers: t.accessToken ? { Authorization: `Bearer ${t.accessToken}` } : {} }); } /** * Performs a GET request to the specified path. * * @param {string} path - The endpoint path. * @returns {Promise} - The response data. * @throws {Error} - Throws a user-friendly error message if the request fails. */ async get(t) { try { return (await this.axiosInstance.get(t)).data; } catch (n) { throw this.handleError(n); } } /** * Performs a POST request to the specified path with the provided data. * * @param {string} path - The endpoint path. * @param {PostRequestInput} input - The request config. * @returns {Promise} - The response data. * @throws {Error} - Throws a user-friendly error message if the request fails. */ async post(t, n) { var s; const { data: r = {}, ignoreError: i = !1 } = n; try { return (await this.axiosInstance.post( t, r )).data; } catch (o) { if (i && le.isAxiosError(o)) return (s = o.response) == null ? void 0 : s.data; throw this.handleError(o); } } /** * Performs a PUT request to the specified path with the provided data. * * @param {string} path - The endpoint path. * @param {PostRequestInput} input - The request config. * @returns {Promise} - The response data. * @throws {Error} - Throws a user-friendly error message if the request fails. */ async put(t, n) { var s; const { data: r = {}, ignoreError: i = !1 } = n; try { return (await this.axiosInstance.put( t, r )).data; } catch (o) { if (i && le.isAxiosError(o)) return (s = o.response) == null ? void 0 : s.data; throw this.handleError(o); } } /** * Performs a DELETE request to the specified path. * * @param {string} path - The endpoint path. * @returns {Promise} - The response data. * @throws {Error} - Throws a user-friendly error message if the request fails. */ async delete(t) { try { return (await this.axiosInstance.delete(t)).data; } catch (n) { throw this.handleError(n); } } /** * Handles errors from Axios requests, logging them and returning a user-friendly error message. * * @param {unknown} error - The error object from Axios. * @returns {Error} - A new error with a user-friendly message. */ handleError(t) { var i; let n = Re.GENERAL_ERROR; if (le.isAxiosError(t)) if (t.response) switch (t.response.status) { case 400: n = Re.BAD_REQUEST; break; case 401: n = Re.UNAUTHORIZED; break; case 403: n = Re.FORBIDDEN; break; case 404: n = Re.NOT_FOUND; break; case 409: n = Re.CONFLICT; break; case 410: n = Re.GONE; break; case 415: n = Re.UNSUPPORTED_MEDIA_TYPE; break; case 429: n = Re.TOO_MANY_REQUESTS; break; case 500: n = Re.INTERNAL_SERVER_ERROR; break; case 503: n = Re.SERVICE_UNAVAILABLE; break; default: n = Re.SERVER_ERROR; } else t.request ? n = Re.NETWORK_ERROR : n = Re.CONFIG_ERROR; const r = xy(n); return this.logger.error("Error Code:", n, "Message:", r), this.logger.error("Result Data:", (i = t.response) == null ? void 0 : i.data), new Error(r); } } function Ry(e) { const t = Object.values(e); return Object.assign({}, ...t); } function Iy(e) { return Object.entries(e).reduce( (t, [n, r]) => { const i = Ry(r); return { ...t, [n]: i }; }, {} ); } function Py(e, t) { const n = Iy(t); Object.entries(n).forEach(([r, i]) => { e.addResourceBundle(r, "translation", i, !0); }); } const { slice: YA, forEach: XA } = []; function ZA(e) { return XA.call(YA.call(arguments, 1), (t) => { if (t) for (const n in t) e[n] === void 0 && (e[n] = t[n]); }), e; } const np = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, eb = (e, t, n) => { const r = n || {}; r.path = r.path || "/"; const i = encodeURIComponent(t); let s = `${e}=${i}`; if (r.maxAge > 0) { const o = r.maxAge - 0; if (Number.isNaN(o)) throw new Error("maxAge should be a Number"); s += `; Max-Age=${Math.floor(o)}`; } if (r.domain) { if (!np.test(r.domain)) throw new TypeError("option domain is invalid"); s += `; Domain=${r.domain}`; } if (r.path) { if (!np.test(r.path)) throw new TypeError("option path is invalid"); s += `; Path=${r.path}`; } if (r.expires) { if (typeof r.expires.toUTCString != "function") throw new TypeError("option expires is invalid"); s += `; Expires=${r.expires.toUTCString()}`; } if (r.httpOnly && (s += "; HttpOnly"), r.secure && (s += "; Secure"), r.sameSite) switch (typeof r.sameSite == "string" ? r.sameSite.toLowerCase() : r.sameSite) { case !0: s += "; SameSite=Strict"; break; case "lax": s += "; SameSite=Lax"; break; case "strict": s += "; SameSite=Strict"; break; case "none": s += "; SameSite=None"; break; default: throw new TypeError("option sameSite is invalid"); } return s; }, rp = { create(e, t, n, r) { let i = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : { path: "/", sameSite: "strict" }; n && (i.expires = /* @__PURE__ */ new Date(), i.expires.setTime(i.expires.getTime() + n * 60 * 1e3)), r && (i.domain = r), document.cookie = eb(e, encodeURIComponent(t), i); }, read(e) { const t = `${e}=`, n = document.cookie.split(";"); for (let r = 0; r < n.length; r++) { let i = n[r]; for (; i.charAt(0) === " "; ) i = i.substring(1, i.length); if (i.indexOf(t) === 0) return i.substring(t.length, i.length); } return null; }, remove(e) { this.create(e, "", -1); } }; var tb = { name: "cookie", // Deconstruct the options object and extract the lookupCookie property lookup(e) { let { lookupCookie: t } = e; if (t && typeof document < "u") return rp.read(t) || void 0; }, // Deconstruct the options object and extract the lookupCookie, cookieMinutes, cookieDomain, and cookieOptions properties cacheUserLanguage(e, t) { let { lookupCookie: n, cookieMinutes: r, cookieDomain: i, cookieOptions: s } = t; n && typeof document < "u" && rp.create(n, e, r, i, s); } }, nb = { name: "querystring", // Deconstruct the options object and extract the lookupQuerystring property lookup(e) { var r; let { lookupQuerystring: t } = e, n; if (typeof window < "u") { let { search: i } = window.location; !window.location.search && ((r = window.location.hash) == null ? void 0 : r.indexOf("?")) > -1 && (i = window.location.hash.substring(window.location.hash.indexOf("?"))); const o = i.substring(1).split("&"); for (let a = 0; a < o.length; a++) { const l = o[a].indexOf("="); l > 0 && o[a].substring(0, l) === t && (n = o[a].substring(l + 1)); } } return n; } }; let Li = null; const ip = () => { if (Li !== null) return Li; try { Li = window !== "undefined" && window.localStorage !== null; const e = "i18next.translate.boo"; window.localStorage.setItem(e, "foo"), window.localStorage.removeItem(e); } catch { Li = !1; } return Li; }; var rb = { name: "localStorage", // Deconstruct the options object and extract the lookupLocalStorage property lookup(e) { let { lookupLocalStorage: t } = e; if (t && ip()) return window.localStorage.getItem(t) || void 0; }, // Deconstruct the options object and extract the lookupLocalStorage property cacheUserLanguage(e, t) { let { lookupLocalStorage: n } = t; n && ip() && window.localStorage.setItem(n, e); } }; let Fi = null; const sp = () => { if (Fi !== null) return Fi; try { Fi = window !== "undefined" && window.sessionStorage !== null; const e = "i18next.translate.boo"; window.sessionStorage.setItem(e, "foo"), window.sessionStorage.removeItem(e); } catch { Fi = !1; } return Fi; }; var ib = { name: "sessionStorage", lookup(e) { let { lookupSessionStorage: t } = e; if (t && sp()) return window.sessionStorage.getItem(t) || void 0; }, cacheUserLanguage(e, t) { let { lookupSessionStorage: n } = t; n && sp() && window.sessionStorage.setItem(n, e); } }, sb = { name: "navigator", lookup(e) { const t = []; if (typeof navigator < "u") { const { languages: n, userLanguage: r, language: i } = navigator; if (n) for (let s = 0; s < n.length; s++) t.push(n[s]); r && t.push(r), i && t.push(i); } return t.length > 0 ? t : void 0; } }, ob = { name: "htmlTag", // Deconstruct the options object and extract the htmlTag property lookup(e) { let { htmlTag: t } = e, n; const r = t || (typeof document < "u" ? document.documentElement : null); return r && typeof r.getAttribute == "function" && (n = r.getAttribute("lang")), n; } }, ab = { name: "path", // Deconstruct the options object and extract the lookupFromPathIndex property lookup(e) { var i; let { lookupFromPathIndex: t } = e; if (typeof window > "u") return; const n = window.location.pathname.match(/\/([a-zA-Z-]*)/g); return Array.isArray(n) ? (i = n[typeof t == "number" ? t : 0]) == null ? void 0 : i.replace("/", "") : void 0; } }, lb = { name: "subdomain", lookup(e) { var i, s; let { lookupFromSubdomainIndex: t } = e; const n = typeof t == "number" ? t + 1 : 1, r = typeof window < "u" && ((s = (i = window.location) == null ? void 0 : i.hostname) == null ? void 0 : s.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i)); if (r) return r[n]; } }; function ub() { return { order: ["querystring", "cookie", "localStorage", "sessionStorage", "navigator", "htmlTag"], lookupQuerystring: "lng", lookupCookie: "i18next", lookupLocalStorage: "i18nextLng", lookupSessionStorage: "i18nextLng", // cache user language caches: ["localStorage"], excludeCacheFor: ["cimode"], // cookieMinutes: 10, // cookieDomain: 'myDomain' convertDetectedLanguage: (e) => e }; } class Ly { constructor(t) { let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; this.type = "languageDetector", this.detectors = {}, this.init(t, n); } init(t) { let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}; this.services = t || { languageUtils: {} }, this.options = ZA(n, this.options || {}, ub()), typeof this.options.convertDetectedLanguage == "string" && this.options.convertDetectedLanguage.indexOf("15897") > -1 && (this.options.convertDetectedLanguage = (i) => i.replace("-", "_")), this.options.lookupFromUrlIndex && (this.options.lookupFromPathIndex = this.options.lookupFromUrlIndex), this.i18nOptions = r, this.addDetector(tb), this.addDetector(nb), this.addDetector(rb), this.addDetector(ib), this.addDetector(sb), this.addDetector(ob), this.addDetector(ab), this.addDetector(lb); } addDetector(t) { return this.detectors[t.name] = t, this; } detect(t) { t || (t = this.options.order); let n = []; return t.forEach((r) => { if (this.detectors[r]) { let i = this.detectors[r].lookup(this.options); i && typeof i == "string" && (i = [i]), i && (n = n.concat(i)); } }), n = n.map((r) => this.options.convertDetectedLanguage(r)), this.services.languageUtils.getBestMatchFromCodes ? n : n.length > 0 ? n[0] : null; } cacheUserLanguage(t, n) { n || (n = this.options.caches), n && (this.options.excludeCacheFor && this.options.excludeCacheFor.indexOf(t) > -1 || n.forEach((r) => { this.detectors[r] && this.detectors[r].cacheUserLanguage(t, this.options); })); } } Ly.type = "languageDetector"; function Fy(e, t) { e.use(t).use(Ly).init({ resources: {}, fallbackLng: "en", debug: !1, interpolation: { escapeValue: !1, // not needed for react as it escapes by default format: (n, r, i) => { if (r) { const [s, ...o] = r.split(",").map((a) => a.trim()); if (s === "number") return new Intl.NumberFormat(i).format(n); if (s === "date") return new Intl.DateTimeFormat(i).format(n); if (s === "currency") return new Intl.NumberFormat(i, { style: "currency", currency: o[0] || "USD", currencyDisplay: "narrowSymbol" }).format(n).replace("$", "").trim(); } return n; } }, detection: { // order and from where user language should be detected order: [ "navigator", "cookie", "localStorage", "sessionStorage", "querystring", "htmlTag", "path", "subdomain" ] } }); } const cb = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g, db = { "&": "&", "&": "&", "<": "<", "<": "<", ">": ">", ">": ">", "'": "'", "'": "'", """: '"', """: '"', " ": " ", " ": " ", "©": "©", "©": "©", "®": "®", "®": "®", "…": "…", "…": "…", "/": "/", "/": "/" }, fb = (e) => db[e], hb = (e) => e.replace(cb, fb); let op = { bindI18n: "languageChanged", bindI18nStore: "", transEmptyNodeValue: "", transSupportBasicHtmlNodes: !0, transWrapTextNodes: "", transKeepBasicHtmlNodesFor: ["br", "strong", "i", "p"], useSuspense: !0, unescape: hb }; function pb() { let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}; op = { ...op, ...e }; } const mb = { type: "3rdParty", init(e) { pb(e.options.react); } }; Fy(Oe, mb); const gb = (e) => Py(Oe, e), ap = { startTime: "UNKNOWN", viewerCount: 0, status: "UNKNOWN" }, vb = () => { const [e, t] = D.useState([]), [n, r] = D.useState(ap); return { realTimeStreamInfo: n, productsInCart: e, onTextMetadataCue: (o) => { const { action: a, data: l, startTime: u, viewerCount: c, status: d } = JSON.parse( o == null ? void 0 : o.text ); switch (a) { case "sendivsdatarealtime": { r({ startTime: u, viewerCount: c, status: d }); break; } case "sendaddtocart": { const { id: f, sessionId: y, productId: g, productImageUrl: m, productName: k } = l; t((h) => [ ...h, { id: f, sessionId: y, productId: g, productImageUrl: m, productName: k } ]); } break; } }, resetRealTimeStreamInfo: () => { r(ap); }, setProductsInCart: t }; }, Kd = JSON, yb = (e) => e.toUpperCase(), kb = (e) => { const t = {}; return e.forEach((n, r) => { t[r] = n; }), t; }, Sb = (e, t, n) => e.document ? e : { document: e, variables: t, requestHeaders: n, signal: void 0 }, _b = (e, t, n) => e.query ? e : { query: e, variables: t, requestHeaders: n, signal: void 0 }, Eb = (e, t) => e.documents ? e : { documents: e, requestHeaders: t, signal: void 0 }; function jo(e, t) { if (!!!e) throw new Error(t); } function wb(e) { return typeof e == "object" && e !== null; } function Nb(e, t) { if (!!!e) throw new Error( "Unexpected invariant triggered." ); } const Ab = /\r\n|[\n\r]/g; function gc(e, t) { let n = 0, r = 1; for (const i of e.body.matchAll(Ab)) { if (typeof i.index == "number" || Nb(!1), i.index >= t) break; n = i.index + i[0].length, r += 1; } return { line: r, column: t + 1 - n }; } function bb(e) { return Dy( e.source, gc(e.source, e.start) ); } function Dy(e, t) { const n = e.locationOffset.column - 1, r = "".padStart(n) + e.body, i = t.line - 1, s = e.locationOffset.line - 1, o = t.line + s, a = t.line === 1 ? n : 0, l = t.column + a, u = `${e.name}:${o}:${l} `, c = r.split(/\r\n|[\n\r]/g), d = c[i]; if (d.length > 120) { const f = Math.floor(l / 80), y = l % 80, g = []; for (let m = 0; m < d.length; m += 80) g.push(d.slice(m, m + 80)); return u + lp([ [`${o} |`, g[0]], ...g.slice(1, f + 1).map((m) => ["|", m]), ["|", "^".padStart(y)], ["|", g[f + 1]] ]); } return u + lp([ // Lines specified like this: ["prefix", "string"], [`${o - 1} |`, c[i - 1]], [`${o} |`, d], ["|", "^".padStart(l)], [`${o + 1} |`, c[i + 1]] ]); } function lp(e) { const t = e.filter(([r, i]) => i !== void 0), n = Math.max(...t.map(([r]) => r.length)); return t.map(([r, i]) => r.padStart(n) + (i ? " " + i : "")).join(` `); } function Cb(e) { const t = e[0]; return t == null || "kind" in t || "length" in t ? { nodes: t, source: e[1], positions: e[2], path: e[3], originalError: e[4], extensions: e[5] } : t; } class Jd extends Error { /** * An array of `{ line, column }` locations within the source GraphQL document * which correspond to this error. * * Errors during validation often contain multiple locations, for example to * point out two things with the same name. Errors during execution include a * single location, the field which produced the error. * * Enumerable, and appears in the result of JSON.stringify(). */ /** * An array describing the JSON-path into the execution response which * corresponds to this error. Only included for errors during execution. * * Enumerable, and appears in the result of JSON.stringify(). */ /** * An array of GraphQL AST Nodes corresponding to this error. */ /** * The source GraphQL document for the first location of this error. * * Note that if this Error represents more than one node, the source may not * represent nodes after the first node. */ /** * An array of character offsets within the source GraphQL document * which correspond to this error. */ /** * The original error thrown from a field resolver during execution. */ /** * Extension fields to add to the formatted error. */ /** * @deprecated Please use the `GraphQLErrorOptions` constructor overload instead. */ constructor(t, ...n) { var r, i, s; const { nodes: o, source: a, positions: l, path: u, originalError: c, extensions: d } = Cb(n); super(t), this.name = "GraphQLError", this.path = u ?? void 0, this.originalError = c ?? void 0, this.nodes = up( Array.isArray(o) ? o : o ? [o] : void 0 ); const f = up( (r = this.nodes) === null || r === void 0 ? void 0 : r.map((g) => g.loc).filter((g) => g != null) ); this.source = a ?? (f == null || (i = f[0]) === null || i === void 0 ? void 0 : i.source), this.positions = l ?? (f == null ? void 0 : f.map((g) => g.start)), this.locations = l && a ? l.map((g) => gc(a, g)) : f == null ? void 0 : f.map((g) => gc(g.source, g.start)); const y = wb( c == null ? void 0 : c.extensions ) ? c == null ? void 0 : c.extensions : void 0; this.extensions = (s = d ?? y) !== null && s !== void 0 ? s : /* @__PURE__ */ Object.create(null), Object.defineProperties(this, { message: { writable: !0, enumerable: !0 }, name: { enumerable: !1 }, nodes: { enumerable: !1 }, source: { enumerable: !1 }, positions: { enumerable: !1 }, originalError: { enumerable: !1 } }), c != null && c.stack ? Object.defineProperty(this, "stack", { value: c.stack, writable: !0, configurable: !0 }) : Error.captureStackTrace ? Error.captureStackTrace(this, Jd) : Object.defineProperty(this, "stack", { value: Error().stack, writable: !0, configurable: !0 }); } get [Symbol.toStringTag]() { return "GraphQLError"; } toString() { let t = this.message; if (this.nodes) for (const n of this.nodes) n.loc && (t += ` ` + bb(n.loc)); else if (this.source && this.locations) for (const n of this.locations) t += ` ` + Dy(this.source, n); return t; } toJSON() { const t = { message: this.message }; return this.locations != null && (t.locations = this.locations), this.path != null && (t.path = this.path), this.extensions != null && Object.keys(this.extensions).length > 0 && (t.extensions = this.extensions), t; } } function up(e) { return e === void 0 || e.length === 0 ? void 0 : e; } function Ee(e, t, n) { return new Jd(`Syntax Error: ${n}`, { source: e, positions: [t] }); } class Ob { /** * The character offset at which this Node begins. */ /** * The character offset at which this Node ends. */ /** * The Token at which this Node begins. */ /** * The Token at which this Node ends. */ /** * The Source document the AST represents. */ constructor(t, n, r) { this.start = t.start, this.end = n.end, this.startToken = t, this.endToken = n, this.source = r; } get [Symbol.toStringTag]() { return "Location"; } toJSON() { return { start: this.start, end: this.end }; } } class $y { /** * The kind of Token. */ /** * The character offset at which this Node begins. */ /** * The character offset at which this Node ends. */ /** * The 1-indexed line number on which this Token appears. */ /** * The 1-indexed column number at which this Token begins. */ /** * For non-punctuation tokens, represents the interpreted value of the token. * * Note: is undefined for punctuation tokens, but typed as string for * convenience in the parser. */ /** * Tokens exist as nodes in a double-linked-list amongst all tokens * including ignored tokens. is always the first node and * the last. */ constructor(t, n, r, i, s, o) { this.kind = t, this.start = n, this.end = r, this.line = i, this.column = s, this.value = o, this.prev = null, this.next = null; } get [Symbol.toStringTag]() { return "Token"; } toJSON() { return { kind: this.kind, value: this.value, line: this.line, column: this.column }; } } const My = { Name: [], Document: ["definitions"], OperationDefinition: [ "name", "variableDefinitions", "directives", "selectionSet" ], VariableDefinition: ["variable", "type", "defaultValue", "directives"], Variable: ["name"], SelectionSet: ["selections"], Field: ["alias", "name", "arguments", "directives", "selectionSet"], Argument: ["name", "value"], FragmentSpread: ["name", "directives"], InlineFragment: ["typeCondition", "directives", "selectionSet"], FragmentDefinition: [ "name", // Note: fragment variable definitions are deprecated and will removed in v17.0.0 "variableDefinitions", "typeCondition", "directives", "selectionSet" ], IntValue: [], FloatValue: [], StringValue: [], BooleanValue: [], NullValue: [], EnumValue: [], ListValue: ["values"], ObjectValue: ["fields"], ObjectField: ["name", "value"], Directive: ["name", "arguments"], NamedType: ["name"], ListType: ["type"], NonNullType: ["type"], SchemaDefinition: ["description", "directives", "operationTypes"], OperationTypeDefinition: ["type"], ScalarTypeDefinition: ["description", "name", "directives"], ObjectTypeDefinition: [ "description", "name", "interfaces", "directives", "fields" ], FieldDefinition: ["description", "name", "arguments", "type", "directives"], InputValueDefinition: [ "description", "name", "type", "defaultValue", "directives" ], InterfaceTypeDefinition: [ "description", "name", "interfaces", "directives", "fields" ], UnionTypeDefinition: ["description", "name", "directives", "types"], EnumTypeDefinition: ["description", "name", "directives", "values"], EnumValueDefinition: ["description", "name", "directives"], InputObjectTypeDefinition: ["description", "name", "directives", "fields"], DirectiveDefinition: ["description", "name", "arguments", "locations"], SchemaExtension: ["directives", "operationTypes"], ScalarTypeExtension: ["name", "directives"], ObjectTypeExtension: ["name", "interfaces", "directives", "fields"], InterfaceTypeExtension: ["name", "interfaces", "directives", "fields"], UnionTypeExtension: ["name", "directives", "types"], EnumTypeExtension: ["name", "directives", "values"], InputObjectTypeExtension: ["name", "directives", "fields"] }, Tb = new Set(Object.keys(My)); function cp(e) { const t = e == null ? void 0 : e.kind; return typeof t == "string" && Tb.has(t); } var Vr; (function(e) { e.QUERY = "query", e.MUTATION = "mutation", e.SUBSCRIPTION = "subscription"; })(Vr || (Vr = {})); var vc; (function(e) { e.QUERY = "QUERY", e.MUTATION = "MUTATION", e.SUBSCRIPTION = "SUBSCRIPTION", e.FIELD = "FIELD", e.FRAGMENT_DEFINITION = "FRAGMENT_DEFINITION", e.FRAGMENT_SPREAD = "FRAGMENT_SPREAD", e.INLINE_FRAGMENT = "INLINE_FRAGMENT", e.VARIABLE_DEFINITION = "VARIABLE_DEFINITION", e.SCHEMA = "SCHEMA", e.SCALAR = "SCALAR", e.OBJECT = "OBJECT", e.FIELD_DEFINITION = "FIELD_DEFINITION", e.ARGUMENT_DEFINITION = "ARGUMENT_DEFINITION", e.INTERFACE = "INTERFACE", e.UNION = "UNION", e.ENUM = "ENUM", e.ENUM_VALUE = "ENUM_VALUE", e.INPUT_OBJECT = "INPUT_OBJECT", e.INPUT_FIELD_DEFINITION = "INPUT_FIELD_DEFINITION"; })(vc || (vc = {})); var B; (function(e) { e.NAME = "Name", e.DOCUMENT = "Document", e.OPERATION_DEFINITION = "OperationDefinition", e.VARIABLE_DEFINITION = "VariableDefinition", e.SELECTION_SET = "SelectionSet", e.FIELD = "Field", e.ARGUMENT = "Argument", e.FRAGMENT_SPREAD = "FragmentSpread", e.INLINE_FRAGMENT = "InlineFragment", e.FRAGMENT_DEFINITION = "FragmentDefinition", e.VARIABLE = "Variable", e.INT = "IntValue", e.FLOAT = "FloatValue", e.STRING = "StringValue", e.BOOLEAN = "BooleanValue", e.NULL = "NullValue", e.ENUM = "EnumValue", e.LIST = "ListValue", e.OBJECT = "ObjectValue", e.OBJECT_FIELD = "ObjectField", e.DIRECTIVE = "Directive", e.NAMED_TYPE = "NamedType", e.LIST_TYPE = "ListType", e.NON_NULL_TYPE = "NonNullType", e.SCHEMA_DEFINITION = "SchemaDefinition", e.OPERATION_TYPE_DEFINITION = "OperationTypeDefinition", e.SCALAR_TYPE_DEFINITION = "ScalarTypeDefinition", e.OBJECT_TYPE_DEFINITION = "ObjectTypeDefinition", e.FIELD_DEFINITION = "FieldDefinition", e.INPUT_VALUE_DEFINITION = "InputValueDefinition", e.INTERFACE_TYPE_DEFINITION = "InterfaceTypeDefinition", e.UNION_TYPE_DEFINITION = "UnionTypeDefinition", e.ENUM_TYPE_DEFINITION = "EnumTypeDefinition", e.ENUM_VALUE_DEFINITION = "EnumValueDefinition", e.INPUT_OBJECT_TYPE_DEFINITION = "InputObjectTypeDefinition", e.DIRECTIVE_DEFINITION = "DirectiveDefinition", e.SCHEMA_EXTENSION = "SchemaExtension", e.SCALAR_TYPE_EXTENSION = "ScalarTypeExtension", e.OBJECT_TYPE_EXTENSION = "ObjectTypeExtension", e.INTERFACE_TYPE_EXTENSION = "InterfaceTypeExtension", e.UNION_TYPE_EXTENSION = "UnionTypeExtension", e.ENUM_TYPE_EXTENSION = "EnumTypeExtension", e.INPUT_OBJECT_TYPE_EXTENSION = "InputObjectTypeExtension"; })(B || (B = {})); function yc(e) { return e === 9 || e === 32; } function _s(e) { return e >= 48 && e <= 57; } function Uy(e) { return e >= 97 && e <= 122 || // A-Z e >= 65 && e <= 90; } function jy(e) { return Uy(e) || e === 95; } function xb(e) { return Uy(e) || _s(e) || e === 95; } function Rb(e) { var t; let n = Number.MAX_SAFE_INTEGER, r = null, i = -1; for (let o = 0; o < e.length; ++o) { var s; const a = e[o], l = Ib(a); l !== a.length && (r = (s = r) !== null && s !== void 0 ? s : o, i = o, o !== 0 && l < n && (n = l)); } return e.map((o, a) => a === 0 ? o : o.slice(n)).slice( (t = r) !== null && t !== void 0 ? t : 0, i + 1 ); } function Ib(e) { let t = 0; for (; t < e.length && yc(e.charCodeAt(t)); ) ++t; return t; } function Pb(e, t) { const n = e.replace(/"""/g, '\\"""'), r = n.split(/\r\n|[\n\r]/g), i = r.length === 1, s = r.length > 1 && r.slice(1).every((y) => y.length === 0 || yc(y.charCodeAt(0))), o = n.endsWith('\\"""'), a = e.endsWith('"') && !o, l = e.endsWith("\\"), u = a || l, c = ( // add leading and trailing new lines only if it improves readability !i || e.length > 70 || u || s || o ); let d = ""; const f = i && yc(e.charCodeAt(0)); return (c && !f || s) && (d += ` `), d += n, (c || u) && (d += ` `), '"""' + d + '"""'; } var C; (function(e) { e.SOF = "", e.EOF = "", e.BANG = "!", e.DOLLAR = "$", e.AMP = "&", e.PAREN_L = "(", e.PAREN_R = ")", e.SPREAD = "...", e.COLON = ":", e.EQUALS = "=", e.AT = "@", e.BRACKET_L = "[", e.BRACKET_R = "]", e.BRACE_L = "{", e.PIPE = "|", e.BRACE_R = "}", e.NAME = "Name", e.INT = "Int", e.FLOAT = "Float", e.STRING = "String", e.BLOCK_STRING = "BlockString", e.COMMENT = "Comment"; })(C || (C = {})); class Lb { /** * The previously focused non-ignored token. */ /** * The currently focused non-ignored token. */ /** * The (1-indexed) line containing the current token. */ /** * The character offset at which the current line begins. */ constructor(t) { const n = new $y(C.SOF, 0, 0, 0, 0); this.source = t, this.lastToken = n, this.token = n, this.line = 1, this.lineStart = 0; } get [Symbol.toStringTag]() { return "Lexer"; } /** * Advances the token stream to the next non-ignored token. */ advance() { return this.lastToken = this.token, this.token = this.lookahead(); } /** * Looks ahead and returns the next non-ignored token, but does not change * the state of Lexer. */ lookahead() { let t = this.token; if (t.kind !== C.EOF) do if (t.next) t = t.next; else { const n = Db(this, t.end); t.next = n, n.prev = t, t = n; } while (t.kind === C.COMMENT); return t; } } function Fb(e) { return e === C.BANG || e === C.DOLLAR || e === C.AMP || e === C.PAREN_L || e === C.PAREN_R || e === C.SPREAD || e === C.COLON || e === C.EQUALS || e === C.AT || e === C.BRACKET_L || e === C.BRACKET_R || e === C.BRACE_L || e === C.PIPE || e === C.BRACE_R; } function Ci(e) { return e >= 0 && e <= 55295 || e >= 57344 && e <= 1114111; } function yl(e, t) { return Vy(e.charCodeAt(t)) && By(e.charCodeAt(t + 1)); } function Vy(e) { return e >= 55296 && e <= 56319; } function By(e) { return e >= 56320 && e <= 57343; } function mr(e, t) { const n = e.source.body.codePointAt(t); if (n === void 0) return C.EOF; if (n >= 32 && n <= 126) { const r = String.fromCodePoint(n); return r === '"' ? `'"'` : `"${r}"`; } return "U+" + n.toString(16).toUpperCase().padStart(4, "0"); } function ge(e, t, n, r, i) { const s = e.line, o = 1 + n - e.lineStart; return new $y(t, n, r, s, o, i); } function Db(e, t) { const n = e.source.body, r = n.length; let i = t; for (; i < r; ) { const s = n.charCodeAt(i); switch (s) { case 65279: case 9: case 32: case 44: ++i; continue; case 10: ++i, ++e.line, e.lineStart = i; continue; case 13: n.charCodeAt(i + 1) === 10 ? i += 2 : ++i, ++e.line, e.lineStart = i; continue; case 35: return $b(e, i); case 33: return ge(e, C.BANG, i, i + 1); case 36: return ge(e, C.DOLLAR, i, i + 1); case 38: return ge(e, C.AMP, i, i + 1); case 40: return ge(e, C.PAREN_L, i, i + 1); case 41: return ge(e, C.PAREN_R, i, i + 1); case 46: if (n.charCodeAt(i + 1) === 46 && n.charCodeAt(i + 2) === 46) return ge(e, C.SPREAD, i, i + 3); break; case 58: return ge(e, C.COLON, i, i + 1); case 61: return ge(e, C.EQUALS, i, i + 1); case 64: return ge(e, C.AT, i, i + 1); case 91: return ge(e, C.BRACKET_L, i, i + 1); case 93: return ge(e, C.BRACKET_R, i, i + 1); case 123: return ge(e, C.BRACE_L, i, i + 1); case 124: return ge(e, C.PIPE, i, i + 1); case 125: return ge(e, C.BRACE_R, i, i + 1); case 34: return n.charCodeAt(i + 1) === 34 && n.charCodeAt(i + 2) === 34 ? zb(e, i) : Ub(e, i); } if (_s(s) || s === 45) return Mb(e, i, s); if (jy(s)) return Hb(e, i); throw Ee( e.source, i, s === 39 ? `Unexpected single quote character ('), did you mean to use a double quote (")?` : Ci(s) || yl(n, i) ? `Unexpected character: ${mr(e, i)}.` : `Invalid character: ${mr(e, i)}.` ); } return ge(e, C.EOF, r, r); } function $b(e, t) { const n = e.source.body, r = n.length; let i = t + 1; for (; i < r; ) { const s = n.charCodeAt(i); if (s === 10 || s === 13) break; if (Ci(s)) ++i; else if (yl(n, i)) i += 2; else break; } return ge( e, C.COMMENT, t, i, n.slice(t + 1, i) ); } function Mb(e, t, n) { const r = e.source.body; let i = t, s = n, o = !1; if (s === 45 && (s = r.charCodeAt(++i)), s === 48) { if (s = r.charCodeAt(++i), _s(s)) throw Ee( e.source, i, `Invalid number, unexpected digit after 0: ${mr( e, i )}.` ); } else i = au(e, i, s), s = r.charCodeAt(i); if (s === 46 && (o = !0, s = r.charCodeAt(++i), i = au(e, i, s), s = r.charCodeAt(i)), (s === 69 || s === 101) && (o = !0, s = r.charCodeAt(++i), (s === 43 || s === 45) && (s = r.charCodeAt(++i)), i = au(e, i, s), s = r.charCodeAt(i)), s === 46 || jy(s)) throw Ee( e.source, i, `Invalid number, expected digit but got: ${mr( e, i )}.` ); return ge( e, o ? C.FLOAT : C.INT, t, i, r.slice(t, i) ); } function au(e, t, n) { if (!_s(n)) throw Ee( e.source, t, `Invalid number, expected digit but got: ${mr( e, t )}.` ); const r = e.source.body; let i = t + 1; for (; _s(r.charCodeAt(i)); ) ++i; return i; } function Ub(e, t) { const n = e.source.body, r = n.length; let i = t + 1, s = i, o = ""; for (; i < r; ) { const a = n.charCodeAt(i); if (a === 34) return o += n.slice(s, i), ge(e, C.STRING, t, i + 1, o); if (a === 92) { o += n.slice(s, i); const l = n.charCodeAt(i + 1) === 117 ? n.charCodeAt(i + 2) === 123 ? jb(e, i) : Vb(e, i) : Bb(e, i); o += l.value, i += l.size, s = i; continue; } if (a === 10 || a === 13) break; if (Ci(a)) ++i; else if (yl(n, i)) i += 2; else throw Ee( e.source, i, `Invalid character within String: ${mr( e, i )}.` ); } throw Ee(e.source, i, "Unterminated string."); } function jb(e, t) { const n = e.source.body; let r = 0, i = 3; for (; i < 12; ) { const s = n.charCodeAt(t + i++); if (s === 125) { if (i < 5 || !Ci(r)) break; return { value: String.fromCodePoint(r), size: i }; } if (r = r << 4 | Gi(s), r < 0) break; } throw Ee( e.source, t, `Invalid Unicode escape sequence: "${n.slice( t, t + i )}".` ); } function Vb(e, t) { const n = e.source.body, r = dp(n, t + 2); if (Ci(r)) return { value: String.fromCodePoint(r), size: 6 }; if (Vy(r) && n.charCodeAt(t + 6) === 92 && n.charCodeAt(t + 7) === 117) { const i = dp(n, t + 8); if (By(i)) return { value: String.fromCodePoint(r, i), size: 12 }; } throw Ee( e.source, t, `Invalid Unicode escape sequence: "${n.slice(t, t + 6)}".` ); } function dp(e, t) { return Gi(e.charCodeAt(t)) << 12 | Gi(e.charCodeAt(t + 1)) << 8 | Gi(e.charCodeAt(t + 2)) << 4 | Gi(e.charCodeAt(t + 3)); } function Gi(e) { return e >= 48 && e <= 57 ? e - 48 : e >= 65 && e <= 70 ? e - 55 : e >= 97 && e <= 102 ? e - 87 : -1; } function Bb(e, t) { const n = e.source.body; switch (n.charCodeAt(t + 1)) { case 34: return { value: '"', size: 2 }; case 92: return { value: "\\", size: 2 }; case 47: return { value: "/", size: 2 }; case 98: return { value: "\b", size: 2 }; case 102: return { value: "\f", size: 2 }; case 110: return { value: ` `, size: 2 }; case 114: return { value: "\r", size: 2 }; case 116: return { value: " ", size: 2 }; } throw Ee( e.source, t, `Invalid character escape sequence: "${n.slice( t, t + 2 )}".` ); } function zb(e, t) { const n = e.source.body, r = n.length; let i = e.lineStart, s = t + 3, o = s, a = ""; const l = []; for (; s < r; ) { const u = n.charCodeAt(s); if (u === 34 && n.charCodeAt(s + 1) === 34 && n.charCodeAt(s + 2) === 34) { a += n.slice(o, s), l.push(a); const c = ge( e, C.BLOCK_STRING, t, s + 3, // Return a string of the lines joined with U+000A. Rb(l).join(` `) ); return e.line += l.length - 1, e.lineStart = i, c; } if (u === 92 && n.charCodeAt(s + 1) === 34 && n.charCodeAt(s + 2) === 34 && n.charCodeAt(s + 3) === 34) { a += n.slice(o, s), o = s + 1, s += 4; continue; } if (u === 10 || u === 13) { a += n.slice(o, s), l.push(a), u === 13 && n.charCodeAt(s + 1) === 10 ? s += 2 : ++s, a = "", o = s, i = s; continue; } if (Ci(u)) ++s; else if (yl(n, s)) s += 2; else throw Ee( e.source, s, `Invalid character within String: ${mr( e, s )}.` ); } throw Ee(e.source, s, "Unterminated string."); } function Hb(e, t) { const n = e.source.body, r = n.length; let i = t + 1; for (; i < r; ) { const s = n.charCodeAt(i); if (xb(s)) ++i; else break; } return ge( e, C.NAME, t, i, n.slice(t, i) ); } const Gb = 10, zy = 2; function Yd(e) { return kl(e, []); } function kl(e, t) { switch (typeof e) { case "string": return JSON.stringify(e); case "function": return e.name ? `[function ${e.name}]` : "[function]"; case "object": return Wb(e, t); default: return String(e); } } function Wb(e, t) { if (e === null) return "null"; if (t.includes(e)) return "[Circular]"; const n = [...t, e]; if (qb(e)) { const r = e.toJSON(); if (r !== e) return typeof r == "string" ? r : kl(r, n); } else if (Array.isArray(e)) return Kb(e, n); return Qb(e, n); } function qb(e) { return typeof e.toJSON == "function"; } function Qb(e, t) { const n = Object.entries(e); return n.length === 0 ? "{}" : t.length > zy ? "[" + Jb(e) + "]" : "{ " + n.map( ([i, s]) => i + ": " + kl(s, t) ).join(", ") + " }"; } function Kb(e, t) { if (e.length === 0) return "[]"; if (t.length > zy) return "[Array]"; const n = Math.min(Gb, e.length), r = e.length - n, i = []; for (let s = 0; s < n; ++s) i.push(kl(e[s], t)); return r === 1 ? i.push("... 1 more item") : r > 1 && i.push(`... ${r} more items`), "[" + i.join(", ") + "]"; } function Jb(e) { const t = Object.prototype.toString.call(e).replace(/^\[object /, "").replace(/]$/, ""); if (t === "Object" && typeof e.constructor == "function") { const n = e.constructor.name; if (typeof n == "string" && n !== "") return n; } return t; } const Yb = globalThis.process && // eslint-disable-next-line no-undef !0, Xb = ( /* c8 ignore next 6 */ // FIXME: https://github.com/graphql/graphql-js/issues/2317 Yb ? function(t, n) { return t instanceof n; } : function(t, n) { if (t instanceof n) return !0; if (typeof t == "object" && t !== null) { var r; const i = n.prototype[Symbol.toStringTag], s = ( // We still need to support constructor's name to detect conflicts with older versions of this library. Symbol.toStringTag in t ? t[Symbol.toStringTag] : (r = t.constructor) === null || r === void 0 ? void 0 : r.name ); if (i === s) { const o = Yd(t); throw new Error(`Cannot use ${i} "${o}" from another module or realm. Ensure that there is only one instance of "graphql" in the node_modules directory. If different versions of "graphql" are the dependencies of other relied on modules, use "resolutions" to ensure only one version is installed. https://yarnpkg.com/en/docs/selective-version-resolutions Duplicate "graphql" modules cannot be used at the same time since different versions may have different capabilities and behavior. The data from one version used in the function from another could produce confusing and spurious results.`); } } return !1; } ); class Hy { constructor(t, n = "GraphQL request", r = { line: 1, column: 1 }) { typeof t == "string" || jo(!1, `Body must be a string. Received: ${Yd(t)}.`), this.body = t, this.name = n, this.locationOffset = r, this.locationOffset.line > 0 || jo( !1, "line in locationOffset is 1-indexed and must be positive." ), this.locationOffset.column > 0 || jo( !1, "column in locationOffset is 1-indexed and must be positive." ); } get [Symbol.toStringTag]() { return "Source"; } } function Zb(e) { return Xb(e, Hy); } function eC(e, t) { return new tC(e, t).parseDocument(); } class tC { constructor(t, n = {}) { const r = Zb(t) ? t : new Hy(t); this._lexer = new Lb(r), this._options = n, this._tokenCounter = 0; } /** * Converts a name lex token into a name parse node. */ parseName() { const t = this.expectToken(C.NAME); return this.node(t, { kind: B.NAME, value: t.value }); } // Implements the parsing rules in the Document section. /** * Document : Definition+ */ parseDocument() { return this.node(this._lexer.token, { kind: B.DOCUMENT, definitions: this.many( C.SOF, this.parseDefinition, C.EOF ) }); } /** * Definition : * - ExecutableDefinition * - TypeSystemDefinition * - TypeSystemExtension * * ExecutableDefinition : * - OperationDefinition * - FragmentDefinition * * TypeSystemDefinition : * - SchemaDefinition * - TypeDefinition * - DirectiveDefinition * * TypeDefinition : * - ScalarTypeDefinition * - ObjectTypeDefinition * - InterfaceTypeDefinition * - UnionTypeDefinition * - EnumTypeDefinition * - InputObjectTypeDefinition */ parseDefinition() { if (this.peek(C.BRACE_L)) return this.parseOperationDefinition(); const t = this.peekDescription(), n = t ? this._lexer.lookahead() : this._lexer.token; if (n.kind === C.NAME) { switch (n.value) { case "schema": return this.parseSchemaDefinition(); case "scalar": return this.parseScalarTypeDefinition(); case "type": return this.parseObjectTypeDefinition(); case "interface": return this.parseInterfaceTypeDefinition(); case "union": return this.parseUnionTypeDefinition(); case "enum": return this.parseEnumTypeDefinition(); case "input": return this.parseInputObjectTypeDefinition(); case "directive": return this.parseDirectiveDefinition(); } if (t) throw Ee( this._lexer.source, this._lexer.token.start, "Unexpected description, descriptions are supported only on type definitions." ); switch (n.value) { case "query": case "mutation": case "subscription": return this.parseOperationDefinition(); case "fragment": return this.parseFragmentDefinition(); case "extend": return this.parseTypeSystemExtension(); } } throw this.unexpected(n); } // Implements the parsing rules in the Operations section. /** * OperationDefinition : * - SelectionSet * - OperationType Name? VariableDefinitions? Directives? SelectionSet */ parseOperationDefinition() { const t = this._lexer.token; if (this.peek(C.BRACE_L)) return this.node(t, { kind: B.OPERATION_DEFINITION, operation: Vr.QUERY, name: void 0, variableDefinitions: [], directives: [], selectionSet: this.parseSelectionSet() }); const n = this.parseOperationType(); let r; return this.peek(C.NAME) && (r = this.parseName()), this.node(t, { kind: B.OPERATION_DEFINITION, operation: n, name: r, variableDefinitions: this.parseVariableDefinitions(), directives: this.parseDirectives(!1), selectionSet: this.parseSelectionSet() }); } /** * OperationType : one of query mutation subscription */ parseOperationType() { const t = this.expectToken(C.NAME); switch (t.value) { case "query": return Vr.QUERY; case "mutation": return Vr.MUTATION; case "subscription": return Vr.SUBSCRIPTION; } throw this.unexpected(t); } /** * VariableDefinitions : ( VariableDefinition+ ) */ parseVariableDefinitions() { return this.optionalMany( C.PAREN_L, this.parseVariableDefinition, C.PAREN_R ); } /** * VariableDefinition : Variable : Type DefaultValue? Directives[Const]? */ parseVariableDefinition() { return this.node(this._lexer.token, { kind: B.VARIABLE_DEFINITION, variable: this.parseVariable(), type: (this.expectToken(C.COLON), this.parseTypeReference()), defaultValue: this.expectOptionalToken(C.EQUALS) ? this.parseConstValueLiteral() : void 0, directives: this.parseConstDirectives() }); } /** * Variable : $ Name */ parseVariable() { const t = this._lexer.token; return this.expectToken(C.DOLLAR), this.node(t, { kind: B.VARIABLE, name: this.parseName() }); } /** * ``` * SelectionSet : { Selection+ } * ``` */ parseSelectionSet() { return this.node(this._lexer.token, { kind: B.SELECTION_SET, selections: this.many( C.BRACE_L, this.parseSelection, C.BRACE_R ) }); } /** * Selection : * - Field * - FragmentSpread * - InlineFragment */ parseSelection() { return this.peek(C.SPREAD) ? this.parseFragment() : this.parseField(); } /** * Field : Alias? Name Arguments? Directives? SelectionSet? * * Alias : Name : */ parseField() { const t = this._lexer.token, n = this.parseName(); let r, i; return this.expectOptionalToken(C.COLON) ? (r = n, i = this.parseName()) : i = n, this.node(t, { kind: B.FIELD, alias: r, name: i, arguments: this.parseArguments(!1), directives: this.parseDirectives(!1), selectionSet: this.peek(C.BRACE_L) ? this.parseSelectionSet() : void 0 }); } /** * Arguments[Const] : ( Argument[?Const]+ ) */ parseArguments(t) { const n = t ? this.parseConstArgument : this.parseArgument; return this.optionalMany(C.PAREN_L, n, C.PAREN_R); } /** * Argument[Const] : Name : Value[?Const] */ parseArgument(t = !1) { const n = this._lexer.token, r = this.parseName(); return this.expectToken(C.COLON), this.node(n, { kind: B.ARGUMENT, name: r, value: this.parseValueLiteral(t) }); } parseConstArgument() { return this.parseArgument(!0); } // Implements the parsing rules in the Fragments section. /** * Corresponds to both FragmentSpread and InlineFragment in the spec. * * FragmentSpread : ... FragmentName Directives? * * InlineFragment : ... TypeCondition? Directives? SelectionSet */ parseFragment() { const t = this._lexer.token; this.expectToken(C.SPREAD); const n = this.expectOptionalKeyword("on"); return !n && this.peek(C.NAME) ? this.node(t, { kind: B.FRAGMENT_SPREAD, name: this.parseFragmentName(), directives: this.parseDirectives(!1) }) : this.node(t, { kind: B.INLINE_FRAGMENT, typeCondition: n ? this.parseNamedType() : void 0, directives: this.parseDirectives(!1), selectionSet: this.parseSelectionSet() }); } /** * FragmentDefinition : * - fragment FragmentName on TypeCondition Directives? SelectionSet * * TypeCondition : NamedType */ parseFragmentDefinition() { const t = this._lexer.token; return this.expectKeyword("fragment"), this._options.allowLegacyFragmentVariables === !0 ? this.node(t, { kind: B.FRAGMENT_DEFINITION, name: this.parseFragmentName(), variableDefinitions: this.parseVariableDefinitions(), typeCondition: (this.expectKeyword("on"), this.parseNamedType()), directives: this.parseDirectives(!1), selectionSet: this.parseSelectionSet() }) : this.node(t, { kind: B.FRAGMENT_DEFINITION, name: this.parseFragmentName(), typeCondition: (this.expectKeyword("on"), this.parseNamedType()), directives: this.parseDirectives(!1), selectionSet: this.parseSelectionSet() }); } /** * FragmentName : Name but not `on` */ parseFragmentName() { if (this._lexer.token.value === "on") throw this.unexpected(); return this.parseName(); } // Implements the parsing rules in the Values section. /** * Value[Const] : * - [~Const] Variable * - IntValue * - FloatValue * - StringValue * - BooleanValue * - NullValue * - EnumValue * - ListValue[?Const] * - ObjectValue[?Const] * * BooleanValue : one of `true` `false` * * NullValue : `null` * * EnumValue : Name but not `true`, `false` or `null` */ parseValueLiteral(t) { const n = this._lexer.token; switch (n.kind) { case C.BRACKET_L: return this.parseList(t); case C.BRACE_L: return this.parseObject(t); case C.INT: return this.advanceLexer(), this.node(n, { kind: B.INT, value: n.value }); case C.FLOAT: return this.advanceLexer(), this.node(n, { kind: B.FLOAT, value: n.value }); case C.STRING: case C.BLOCK_STRING: return this.parseStringLiteral(); case C.NAME: switch (this.advanceLexer(), n.value) { case "true": return this.node(n, { kind: B.BOOLEAN, value: !0 }); case "false": return this.node(n, { kind: B.BOOLEAN, value: !1 }); case "null": return this.node(n, { kind: B.NULL }); default: return this.node(n, { kind: B.ENUM, value: n.value }); } case C.DOLLAR: if (t) if (this.expectToken(C.DOLLAR), this._lexer.token.kind === C.NAME) { const r = this._lexer.token.value; throw Ee( this._lexer.source, n.start, `Unexpected variable "$${r}" in constant value.` ); } else throw this.unexpected(n); return this.parseVariable(); default: throw this.unexpected(); } } parseConstValueLiteral() { return this.parseValueLiteral(!0); } parseStringLiteral() { const t = this._lexer.token; return this.advanceLexer(), this.node(t, { kind: B.STRING, value: t.value, block: t.kind === C.BLOCK_STRING }); } /** * ListValue[Const] : * - [ ] * - [ Value[?Const]+ ] */ parseList(t) { const n = () => this.parseValueLiteral(t); return this.node(this._lexer.token, { kind: B.LIST, values: this.any(C.BRACKET_L, n, C.BRACKET_R) }); } /** * ``` * ObjectValue[Const] : * - { } * - { ObjectField[?Const]+ } * ``` */ parseObject(t) { const n = () => this.parseObjectField(t); return this.node(this._lexer.token, { kind: B.OBJECT, fields: this.any(C.BRACE_L, n, C.BRACE_R) }); } /** * ObjectField[Const] : Name : Value[?Const] */ parseObjectField(t) { const n = this._lexer.token, r = this.parseName(); return this.expectToken(C.COLON), this.node(n, { kind: B.OBJECT_FIELD, name: r, value: this.parseValueLiteral(t) }); } // Implements the parsing rules in the Directives section. /** * Directives[Const] : Directive[?Const]+ */ parseDirectives(t) { const n = []; for (; this.peek(C.AT); ) n.push(this.parseDirective(t)); return n; } parseConstDirectives() { return this.parseDirectives(!0); } /** * ``` * Directive[Const] : @ Name Arguments[?Const]? * ``` */ parseDirective(t) { const n = this._lexer.token; return this.expectToken(C.AT), this.node(n, { kind: B.DIRECTIVE, name: this.parseName(), arguments: this.parseArguments(t) }); } // Implements the parsing rules in the Types section. /** * Type : * - NamedType * - ListType * - NonNullType */ parseTypeReference() { const t = this._lexer.token; let n; if (this.expectOptionalToken(C.BRACKET_L)) { const r = this.parseTypeReference(); this.expectToken(C.BRACKET_R), n = this.node(t, { kind: B.LIST_TYPE, type: r }); } else n = this.parseNamedType(); return this.expectOptionalToken(C.BANG) ? this.node(t, { kind: B.NON_NULL_TYPE, type: n }) : n; } /** * NamedType : Name */ parseNamedType() { return this.node(this._lexer.token, { kind: B.NAMED_TYPE, name: this.parseName() }); } // Implements the parsing rules in the Type Definition section. peekDescription() { return this.peek(C.STRING) || this.peek(C.BLOCK_STRING); } /** * Description : StringValue */ parseDescription() { if (this.peekDescription()) return this.parseStringLiteral(); } /** * ``` * SchemaDefinition : Description? schema Directives[Const]? { OperationTypeDefinition+ } * ``` */ parseSchemaDefinition() { const t = this._lexer.token, n = this.parseDescription(); this.expectKeyword("schema"); const r = this.parseConstDirectives(), i = this.many( C.BRACE_L, this.parseOperationTypeDefinition, C.BRACE_R ); return this.node(t, { kind: B.SCHEMA_DEFINITION, description: n, directives: r, operationTypes: i }); } /** * OperationTypeDefinition : OperationType : NamedType */ parseOperationTypeDefinition() { const t = this._lexer.token, n = this.parseOperationType(); this.expectToken(C.COLON); const r = this.parseNamedType(); return this.node(t, { kind: B.OPERATION_TYPE_DEFINITION, operation: n, type: r }); } /** * ScalarTypeDefinition : Description? scalar Name Directives[Const]? */ parseScalarTypeDefinition() { const t = this._lexer.token, n = this.parseDescription(); this.expectKeyword("scalar"); const r = this.parseName(), i = this.parseConstDirectives(); return this.node(t, { kind: B.SCALAR_TYPE_DEFINITION, description: n, name: r, directives: i }); } /** * ObjectTypeDefinition : * Description? * type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition? */ parseObjectTypeDefinition() { const t = this._lexer.token, n = this.parseDescription(); this.expectKeyword("type"); const r = this.parseName(), i = this.parseImplementsInterfaces(), s = this.parseConstDirectives(), o = this.parseFieldsDefinition(); return this.node(t, { kind: B.OBJECT_TYPE_DEFINITION, description: n, name: r, interfaces: i, directives: s, fields: o }); } /** * ImplementsInterfaces : * - implements `&`? NamedType * - ImplementsInterfaces & NamedType */ parseImplementsInterfaces() { return this.expectOptionalKeyword("implements") ? this.delimitedMany(C.AMP, this.parseNamedType) : []; } /** * ``` * FieldsDefinition : { FieldDefinition+ } * ``` */ parseFieldsDefinition() { return this.optionalMany( C.BRACE_L, this.parseFieldDefinition, C.BRACE_R ); } /** * FieldDefinition : * - Description? Name ArgumentsDefinition? : Type Directives[Const]? */ parseFieldDefinition() { const t = this._lexer.token, n = this.parseDescription(), r = this.parseName(), i = this.parseArgumentDefs(); this.expectToken(C.COLON); const s = this.parseTypeReference(), o = this.parseConstDirectives(); return this.node(t, { kind: B.FIELD_DEFINITION, description: n, name: r, arguments: i, type: s, directives: o }); } /** * ArgumentsDefinition : ( InputValueDefinition+ ) */ parseArgumentDefs() { return this.optionalMany( C.PAREN_L, this.parseInputValueDef, C.PAREN_R ); } /** * InputValueDefinition : * - Description? Name : Type DefaultValue? Directives[Const]? */ parseInputValueDef() { const t = this._lexer.token, n = this.parseDescription(), r = this.parseName(); this.expectToken(C.COLON); const i = this.parseTypeReference(); let s; this.expectOptionalToken(C.EQUALS) && (s = this.parseConstValueLiteral()); const o = this.parseConstDirectives(); return this.node(t, { kind: B.INPUT_VALUE_DEFINITION, description: n, name: r, type: i, defaultValue: s, directives: o }); } /** * InterfaceTypeDefinition : * - Description? interface Name Directives[Const]? FieldsDefinition? */ parseInterfaceTypeDefinition() { const t = this._lexer.token, n = this.parseDescription(); this.expectKeyword("interface"); const r = this.parseName(), i = this.parseImplementsInterfaces(), s = this.parseConstDirectives(), o = this.parseFieldsDefinition(); return this.node(t, { kind: B.INTERFACE_TYPE_DEFINITION, description: n, name: r, interfaces: i, directives: s, fields: o }); } /** * UnionTypeDefinition : * - Description? union Name Directives[Const]? UnionMemberTypes? */ parseUnionTypeDefinition() { const t = this._lexer.token, n = this.parseDescription(); this.expectKeyword("union"); const r = this.parseName(), i = this.parseConstDirectives(), s = this.parseUnionMemberTypes(); return this.node(t, { kind: B.UNION_TYPE_DEFINITION, description: n, name: r, directives: i, types: s }); } /** * UnionMemberTypes : * - = `|`? NamedType * - UnionMemberTypes | NamedType */ parseUnionMemberTypes() { return this.expectOptionalToken(C.EQUALS) ? this.delimitedMany(C.PIPE, this.parseNamedType) : []; } /** * EnumTypeDefinition : * - Description? enum Name Directives[Const]? EnumValuesDefinition? */ parseEnumTypeDefinition() { const t = this._lexer.token, n = this.parseDescription(); this.expectKeyword("enum"); const r = this.parseName(), i = this.parseConstDirectives(), s = this.parseEnumValuesDefinition(); return this.node(t, { kind: B.ENUM_TYPE_DEFINITION, description: n, name: r, directives: i, values: s }); } /** * ``` * EnumValuesDefinition : { EnumValueDefinition+ } * ``` */ parseEnumValuesDefinition() { return this.optionalMany( C.BRACE_L, this.parseEnumValueDefinition, C.BRACE_R ); } /** * EnumValueDefinition : Description? EnumValue Directives[Const]? */ parseEnumValueDefinition() { const t = this._lexer.token, n = this.parseDescription(), r = this.parseEnumValueName(), i = this.parseConstDirectives(); return this.node(t, { kind: B.ENUM_VALUE_DEFINITION, description: n, name: r, directives: i }); } /** * EnumValue : Name but not `true`, `false` or `null` */ parseEnumValueName() { if (this._lexer.token.value === "true" || this._lexer.token.value === "false" || this._lexer.token.value === "null") throw Ee( this._lexer.source, this._lexer.token.start, `${co( this._lexer.token )} is reserved and cannot be used for an enum value.` ); return this.parseName(); } /** * InputObjectTypeDefinition : * - Description? input Name Directives[Const]? InputFieldsDefinition? */ parseInputObjectTypeDefinition() { const t = this._lexer.token, n = this.parseDescription(); this.expectKeyword("input"); const r = this.parseName(), i = this.parseConstDirectives(), s = this.parseInputFieldsDefinition(); return this.node(t, { kind: B.INPUT_OBJECT_TYPE_DEFINITION, description: n, name: r, directives: i, fields: s }); } /** * ``` * InputFieldsDefinition : { InputValueDefinition+ } * ``` */ parseInputFieldsDefinition() { return this.optionalMany( C.BRACE_L, this.parseInputValueDef, C.BRACE_R ); } /** * TypeSystemExtension : * - SchemaExtension * - TypeExtension * * TypeExtension : * - ScalarTypeExtension * - ObjectTypeExtension * - InterfaceTypeExtension * - UnionTypeExtension * - EnumTypeExtension * - InputObjectTypeDefinition */ parseTypeSystemExtension() { const t = this._lexer.lookahead(); if (t.kind === C.NAME) switch (t.value) { case "schema": return this.parseSchemaExtension(); case "scalar": return this.parseScalarTypeExtension(); case "type": return this.parseObjectTypeExtension(); case "interface": return this.parseInterfaceTypeExtension(); case "union": return this.parseUnionTypeExtension(); case "enum": return this.parseEnumTypeExtension(); case "input": return this.parseInputObjectTypeExtension(); } throw this.unexpected(t); } /** * ``` * SchemaExtension : * - extend schema Directives[Const]? { OperationTypeDefinition+ } * - extend schema Directives[Const] * ``` */ parseSchemaExtension() { const t = this._lexer.token; this.expectKeyword("extend"), this.expectKeyword("schema"); const n = this.parseConstDirectives(), r = this.optionalMany( C.BRACE_L, this.parseOperationTypeDefinition, C.BRACE_R ); if (n.length === 0 && r.length === 0) throw this.unexpected(); return this.node(t, { kind: B.SCHEMA_EXTENSION, directives: n, operationTypes: r }); } /** * ScalarTypeExtension : * - extend scalar Name Directives[Const] */ parseScalarTypeExtension() { const t = this._lexer.token; this.expectKeyword("extend"), this.expectKeyword("scalar"); const n = this.parseName(), r = this.parseConstDirectives(); if (r.length === 0) throw this.unexpected(); return this.node(t, { kind: B.SCALAR_TYPE_EXTENSION, name: n, directives: r }); } /** * ObjectTypeExtension : * - extend type Name ImplementsInterfaces? Directives[Const]? FieldsDefinition * - extend type Name ImplementsInterfaces? Directives[Const] * - extend type Name ImplementsInterfaces */ parseObjectTypeExtension() { const t = this._lexer.token; this.expectKeyword("extend"), this.expectKeyword("type"); const n = this.parseName(), r = this.parseImplementsInterfaces(), i = this.parseConstDirectives(), s = this.parseFieldsDefinition(); if (r.length === 0 && i.length === 0 && s.length === 0) throw this.unexpected(); return this.node(t, { kind: B.OBJECT_TYPE_EXTENSION, name: n, interfaces: r, directives: i, fields: s }); } /** * InterfaceTypeExtension : * - extend interface Name ImplementsInterfaces? Directives[Const]? FieldsDefinition * - extend interface Name ImplementsInterfaces? Directives[Const] * - extend interface Name ImplementsInterfaces */ parseInterfaceTypeExtension() { const t = this._lexer.token; this.expectKeyword("extend"), this.expectKeyword("interface"); const n = this.parseName(), r = this.parseImplementsInterfaces(), i = this.parseConstDirectives(), s = this.parseFieldsDefinition(); if (r.length === 0 && i.length === 0 && s.length === 0) throw this.unexpected(); return this.node(t, { kind: B.INTERFACE_TYPE_EXTENSION, name: n, interfaces: r, directives: i, fields: s }); } /** * UnionTypeExtension : * - extend union Name Directives[Const]? UnionMemberTypes * - extend union Name Directives[Const] */ parseUnionTypeExtension() { const t = this._lexer.token; this.expectKeyword("extend"), this.expectKeyword("union"); const n = this.parseName(), r = this.parseConstDirectives(), i = this.parseUnionMemberTypes(); if (r.length === 0 && i.length === 0) throw this.unexpected(); return this.node(t, { kind: B.UNION_TYPE_EXTENSION, name: n, directives: r, types: i }); } /** * EnumTypeExtension : * - extend enum Name Directives[Const]? EnumValuesDefinition * - extend enum Name Directives[Const] */ parseEnumTypeExtension() { const t = this._lexer.token; this.expectKeyword("extend"), this.expectKeyword("enum"); const n = this.parseName(), r = this.parseConstDirectives(), i = this.parseEnumValuesDefinition(); if (r.length === 0 && i.length === 0) throw this.unexpected(); return this.node(t, { kind: B.ENUM_TYPE_EXTENSION, name: n, directives: r, values: i }); } /** * InputObjectTypeExtension : * - extend input Name Directives[Const]? InputFieldsDefinition * - extend input Name Directives[Const] */ parseInputObjectTypeExtension() { const t = this._lexer.token; this.expectKeyword("extend"), this.expectKeyword("input"); const n = this.parseName(), r = this.parseConstDirectives(), i = this.parseInputFieldsDefinition(); if (r.length === 0 && i.length === 0) throw this.unexpected(); return this.node(t, { kind: B.INPUT_OBJECT_TYPE_EXTENSION, name: n, directives: r, fields: i }); } /** * ``` * DirectiveDefinition : * - Description? directive @ Name ArgumentsDefinition? `repeatable`? on DirectiveLocations * ``` */ parseDirectiveDefinition() { const t = this._lexer.token, n = this.parseDescription(); this.expectKeyword("directive"), this.expectToken(C.AT); const r = this.parseName(), i = this.parseArgumentDefs(), s = this.expectOptionalKeyword("repeatable"); this.expectKeyword("on"); const o = this.parseDirectiveLocations(); return this.node(t, { kind: B.DIRECTIVE_DEFINITION, description: n, name: r, arguments: i, repeatable: s, locations: o }); } /** * DirectiveLocations : * - `|`? DirectiveLocation * - DirectiveLocations | DirectiveLocation */ parseDirectiveLocations() { return this.delimitedMany(C.PIPE, this.parseDirectiveLocation); } /* * DirectiveLocation : * - ExecutableDirectiveLocation * - TypeSystemDirectiveLocation * * ExecutableDirectiveLocation : one of * `QUERY` * `MUTATION` * `SUBSCRIPTION` * `FIELD` * `FRAGMENT_DEFINITION` * `FRAGMENT_SPREAD` * `INLINE_FRAGMENT` * * TypeSystemDirectiveLocation : one of * `SCHEMA` * `SCALAR` * `OBJECT` * `FIELD_DEFINITION` * `ARGUMENT_DEFINITION` * `INTERFACE` * `UNION` * `ENUM` * `ENUM_VALUE` * `INPUT_OBJECT` * `INPUT_FIELD_DEFINITION` */ parseDirectiveLocation() { const t = this._lexer.token, n = this.parseName(); if (Object.prototype.hasOwnProperty.call(vc, n.value)) return n; throw this.unexpected(t); } // Core parsing utility functions /** * Returns a node that, if configured to do so, sets a "loc" field as a * location object, used to identify the place in the source that created a * given parsed object. */ node(t, n) { return this._options.noLocation !== !0 && (n.loc = new Ob( t, this._lexer.lastToken, this._lexer.source )), n; } /** * Determines if the next token is of a given kind */ peek(t) { return this._lexer.token.kind === t; } /** * If the next token is of the given kind, return that token after advancing the lexer. * Otherwise, do not change the parser state and throw an error. */ expectToken(t) { const n = this._lexer.token; if (n.kind === t) return this.advanceLexer(), n; throw Ee( this._lexer.source, n.start, `Expected ${Gy(t)}, found ${co(n)}.` ); } /** * If the next token is of the given kind, return "true" after advancing the lexer. * Otherwise, do not change the parser state and return "false". */ expectOptionalToken(t) { return this._lexer.token.kind === t ? (this.advanceLexer(), !0) : !1; } /** * If the next token is a given keyword, advance the lexer. * Otherwise, do not change the parser state and throw an error. */ expectKeyword(t) { const n = this._lexer.token; if (n.kind === C.NAME && n.value === t) this.advanceLexer(); else throw Ee( this._lexer.source, n.start, `Expected "${t}", found ${co(n)}.` ); } /** * If the next token is a given keyword, return "true" after advancing the lexer. * Otherwise, do not change the parser state and return "false". */ expectOptionalKeyword(t) { const n = this._lexer.token; return n.kind === C.NAME && n.value === t ? (this.advanceLexer(), !0) : !1; } /** * Helper function for creating an error when an unexpected lexed token is encountered. */ unexpected(t) { const n = t ?? this._lexer.token; return Ee( this._lexer.source, n.start, `Unexpected ${co(n)}.` ); } /** * Returns a possibly empty list of parse nodes, determined by the parseFn. * This list begins with a lex token of openKind and ends with a lex token of closeKind. * Advances the parser to the next lex token after the closing token. */ any(t, n, r) { this.expectToken(t); const i = []; for (; !this.expectOptionalToken(r); ) i.push(n.call(this)); return i; } /** * Returns a list of parse nodes, determined by the parseFn. * It can be empty only if open token is missing otherwise it will always return non-empty list * that begins with a lex token of openKind and ends with a lex token of closeKind. * Advances the parser to the next lex token after the closing token. */ optionalMany(t, n, r) { if (this.expectOptionalToken(t)) { const i = []; do i.push(n.call(this)); while (!this.expectOptionalToken(r)); return i; } return []; } /** * Returns a non-empty list of parse nodes, determined by the parseFn. * This list begins with a lex token of openKind and ends with a lex token of closeKind. * Advances the parser to the next lex token after the closing token. */ many(t, n, r) { this.expectToken(t); const i = []; do i.push(n.call(this)); while (!this.expectOptionalToken(r)); return i; } /** * Returns a non-empty list of parse nodes, determined by the parseFn. * This list may begin with a lex token of delimiterKind followed by items separated by lex tokens of tokenKind. * Advances the parser to the next lex token after last item in the list. */ delimitedMany(t, n) { this.expectOptionalToken(t); const r = []; do r.push(n.call(this)); while (this.expectOptionalToken(t)); return r; } advanceLexer() { const { maxTokens: t } = this._options, n = this._lexer.advance(); if (t !== void 0 && n.kind !== C.EOF && (++this._tokenCounter, this._tokenCounter > t)) throw Ee( this._lexer.source, n.start, `Document contains more that ${t} tokens. Parsing aborted.` ); } } function co(e) { const t = e.value; return Gy(e.kind) + (t != null ? ` "${t}"` : ""); } function Gy(e) { return Fb(e) ? `"${e}"` : e; } function nC(e) { return `"${e.replace(rC, iC)}"`; } const rC = /[\x00-\x1f\x22\x5c\x7f-\x9f]/g; function iC(e) { return sC[e.charCodeAt(0)]; } const sC = [ "\\u0000", "\\u0001", "\\u0002", "\\u0003", "\\u0004", "\\u0005", "\\u0006", "\\u0007", "\\b", "\\t", "\\n", "\\u000B", "\\f", "\\r", "\\u000E", "\\u000F", "\\u0010", "\\u0011", "\\u0012", "\\u0013", "\\u0014", "\\u0015", "\\u0016", "\\u0017", "\\u0018", "\\u0019", "\\u001A", "\\u001B", "\\u001C", "\\u001D", "\\u001E", "\\u001F", "", "", '\\"', "", "", "", "", "", "", "", "", "", "", "", "", "", // 2F "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", // 3F "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", // 4F "", "", "", "", "", "", "", "", "", "", "", "", "\\\\", "", "", "", // 5F "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", // 6F "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "\\u007F", "\\u0080", "\\u0081", "\\u0082", "\\u0083", "\\u0084", "\\u0085", "\\u0086", "\\u0087", "\\u0088", "\\u0089", "\\u008A", "\\u008B", "\\u008C", "\\u008D", "\\u008E", "\\u008F", "\\u0090", "\\u0091", "\\u0092", "\\u0093", "\\u0094", "\\u0095", "\\u0096", "\\u0097", "\\u0098", "\\u0099", "\\u009A", "\\u009B", "\\u009C", "\\u009D", "\\u009E", "\\u009F" ], oC = Object.freeze({}); function aC(e, t, n = My) { const r = /* @__PURE__ */ new Map(); for (const h of Object.values(B)) r.set(h, lC(t, h)); let i, s = Array.isArray(e), o = [e], a = -1, l = [], u = e, c, d; const f = [], y = []; do { a++; const h = a === o.length, p = h && l.length !== 0; if (h) { if (c = y.length === 0 ? void 0 : f[f.length - 1], u = d, d = y.pop(), p) if (s) { u = u.slice(); let S = 0; for (const [_, w] of l) { const A = _ - S; w === null ? (u.splice(A, 1), S++) : u[A] = w; } } else { u = Object.defineProperties( {}, Object.getOwnPropertyDescriptors(u) ); for (const [S, _] of l) u[S] = _; } a = i.index, o = i.keys, l = i.edits, s = i.inArray, i = i.prev; } else if (d) { if (c = s ? a : o[a], u = d[c], u == null) continue; f.push(c); } let v; if (!Array.isArray(u)) { var g, m; cp(u) || jo(!1, `Invalid AST Node: ${Yd(u)}.`); const S = h ? (g = r.get(u.kind)) === null || g === void 0 ? void 0 : g.leave : (m = r.get(u.kind)) === null || m === void 0 ? void 0 : m.enter; if (v = S == null ? void 0 : S.call(t, u, c, d, f, y), v === oC) break; if (v === !1) { if (!h) { f.pop(); continue; } } else if (v !== void 0 && (l.push([c, v]), !h)) if (cp(v)) u = v; else { f.pop(); continue; } } if (v === void 0 && p && l.push([c, u]), h) f.pop(); else { var k; i = { inArray: s, index: a, keys: o, edits: l, prev: i }, s = Array.isArray(u), o = s ? u : (k = n[u.kind]) !== null && k !== void 0 ? k : [], a = -1, l = [], d && y.push(d), d = u; } } while (i !== void 0); return l.length !== 0 ? l[l.length - 1][1] : e; } function lC(e, t) { const n = e[t]; return typeof n == "object" ? n : typeof n == "function" ? { enter: n, leave: void 0 } : { enter: e.enter, leave: e.leave }; } function uC(e) { return aC(e, dC); } const cC = 80, dC = { Name: { leave: (e) => e.value }, Variable: { leave: (e) => "$" + e.name }, // Document Document: { leave: (e) => U(e.definitions, ` `) }, OperationDefinition: { leave(e) { const t = Q("(", U(e.variableDefinitions, ", "), ")"), n = U( [ e.operation, U([e.name, t]), U(e.directives, " ") ], " " ); return (n === "query" ? "" : n + " ") + e.selectionSet; } }, VariableDefinition: { leave: ({ variable: e, type: t, defaultValue: n, directives: r }) => e + ": " + t + Q(" = ", n) + Q(" ", U(r, " ")) }, SelectionSet: { leave: ({ selections: e }) => wt(e) }, Field: { leave({ alias: e, name: t, arguments: n, directives: r, selectionSet: i }) { const s = Q("", e, ": ") + t; let o = s + Q("(", U(n, ", "), ")"); return o.length > cC && (o = s + Q(`( `, Vo(U(n, ` `)), ` )`)), U([o, U(r, " "), i], " "); } }, Argument: { leave: ({ name: e, value: t }) => e + ": " + t }, // Fragments FragmentSpread: { leave: ({ name: e, directives: t }) => "..." + e + Q(" ", U(t, " ")) }, InlineFragment: { leave: ({ typeCondition: e, directives: t, selectionSet: n }) => U( [ "...", Q("on ", e), U(t, " "), n ], " " ) }, FragmentDefinition: { leave: ({ name: e, typeCondition: t, variableDefinitions: n, directives: r, selectionSet: i }) => ( // or removed in the future. `fragment ${e}${Q("(", U(n, ", "), ")")} on ${t} ${Q("", U(r, " "), " ")}` + i ) }, // Value IntValue: { leave: ({ value: e }) => e }, FloatValue: { leave: ({ value: e }) => e }, StringValue: { leave: ({ value: e, block: t }) => t ? Pb(e) : nC(e) }, BooleanValue: { leave: ({ value: e }) => e ? "true" : "false" }, NullValue: { leave: () => "null" }, EnumValue: { leave: ({ value: e }) => e }, ListValue: { leave: ({ values: e }) => "[" + U(e, ", ") + "]" }, ObjectValue: { leave: ({ fields: e }) => "{" + U(e, ", ") + "}" }, ObjectField: { leave: ({ name: e, value: t }) => e + ": " + t }, // Directive Directive: { leave: ({ name: e, arguments: t }) => "@" + e + Q("(", U(t, ", "), ")") }, // Type NamedType: { leave: ({ name: e }) => e }, ListType: { leave: ({ type: e }) => "[" + e + "]" }, NonNullType: { leave: ({ type: e }) => e + "!" }, // Type System Definitions SchemaDefinition: { leave: ({ description: e, directives: t, operationTypes: n }) => Q("", e, ` `) + U(["schema", U(t, " "), wt(n)], " ") }, OperationTypeDefinition: { leave: ({ operation: e, type: t }) => e + ": " + t }, ScalarTypeDefinition: { leave: ({ description: e, name: t, directives: n }) => Q("", e, ` `) + U(["scalar", t, U(n, " ")], " ") }, ObjectTypeDefinition: { leave: ({ description: e, name: t, interfaces: n, directives: r, fields: i }) => Q("", e, ` `) + U( [ "type", t, Q("implements ", U(n, " & ")), U(r, " "), wt(i) ], " " ) }, FieldDefinition: { leave: ({ description: e, name: t, arguments: n, type: r, directives: i }) => Q("", e, ` `) + t + (fp(n) ? Q(`( `, Vo(U(n, ` `)), ` )`) : Q("(", U(n, ", "), ")")) + ": " + r + Q(" ", U(i, " ")) }, InputValueDefinition: { leave: ({ description: e, name: t, type: n, defaultValue: r, directives: i }) => Q("", e, ` `) + U( [t + ": " + n, Q("= ", r), U(i, " ")], " " ) }, InterfaceTypeDefinition: { leave: ({ description: e, name: t, interfaces: n, directives: r, fields: i }) => Q("", e, ` `) + U( [ "interface", t, Q("implements ", U(n, " & ")), U(r, " "), wt(i) ], " " ) }, UnionTypeDefinition: { leave: ({ description: e, name: t, directives: n, types: r }) => Q("", e, ` `) + U( ["union", t, U(n, " "), Q("= ", U(r, " | "))], " " ) }, EnumTypeDefinition: { leave: ({ description: e, name: t, directives: n, values: r }) => Q("", e, ` `) + U(["enum", t, U(n, " "), wt(r)], " ") }, EnumValueDefinition: { leave: ({ description: e, name: t, directives: n }) => Q("", e, ` `) + U([t, U(n, " ")], " ") }, InputObjectTypeDefinition: { leave: ({ description: e, name: t, directives: n, fields: r }) => Q("", e, ` `) + U(["input", t, U(n, " "), wt(r)], " ") }, DirectiveDefinition: { leave: ({ description: e, name: t, arguments: n, repeatable: r, locations: i }) => Q("", e, ` `) + "directive @" + t + (fp(n) ? Q(`( `, Vo(U(n, ` `)), ` )`) : Q("(", U(n, ", "), ")")) + (r ? " repeatable" : "") + " on " + U(i, " | ") }, SchemaExtension: { leave: ({ directives: e, operationTypes: t }) => U( ["extend schema", U(e, " "), wt(t)], " " ) }, ScalarTypeExtension: { leave: ({ name: e, directives: t }) => U(["extend scalar", e, U(t, " ")], " ") }, ObjectTypeExtension: { leave: ({ name: e, interfaces: t, directives: n, fields: r }) => U( [ "extend type", e, Q("implements ", U(t, " & ")), U(n, " "), wt(r) ], " " ) }, InterfaceTypeExtension: { leave: ({ name: e, interfaces: t, directives: n, fields: r }) => U( [ "extend interface", e, Q("implements ", U(t, " & ")), U(n, " "), wt(r) ], " " ) }, UnionTypeExtension: { leave: ({ name: e, directives: t, types: n }) => U( [ "extend union", e, U(t, " "), Q("= ", U(n, " | ")) ], " " ) }, EnumTypeExtension: { leave: ({ name: e, directives: t, values: n }) => U(["extend enum", e, U(t, " "), wt(n)], " ") }, InputObjectTypeExtension: { leave: ({ name: e, directives: t, fields: n }) => U(["extend input", e, U(t, " "), wt(n)], " ") } }; function U(e, t = "") { var n; return (n = e == null ? void 0 : e.filter((r) => r).join(t)) !== null && n !== void 0 ? n : ""; } function wt(e) { return Q(`{ `, Vo(U(e, ` `)), ` }`); } function Q(e, t, n = "") { return t != null && t !== "" ? e + t + n : ""; } function Vo(e) { return Q(" ", e.replace(/\n/g, ` `)); } function fp(e) { var t; return (t = e == null ? void 0 : e.some((n) => n.includes(` `))) !== null && t !== void 0 ? t : !1; } const hp = (e) => { var r, i; let t; const n = e.definitions.filter((s) => s.kind === "OperationDefinition"); return n.length === 1 && (t = (i = (r = n[0]) == null ? void 0 : r.name) == null ? void 0 : i.value), t; }, lu = (e) => { if (typeof e == "string") { let n; try { const r = eC(e); n = hp(r); } catch { } return { query: e, operationName: n }; } const t = hp(e); return { query: uC(e), operationName: t }; }; class es extends Error { constructor(t, n) { const r = `${es.extractMessage(t)}: ${JSON.stringify({ response: t, request: n })}`; super(r), Object.setPrototypeOf(this, es.prototype), this.response = t, this.request = n, typeof Error.captureStackTrace == "function" && Error.captureStackTrace(this, es); } static extractMessage(t) { var n, r; return ((r = (n = t.errors) == null ? void 0 : n[0]) == null ? void 0 : r.message) ?? `GraphQL Error (Code: ${t.status})`; } } var kc = { exports: {} }; (function(e, t) { var n = typeof self < "u" ? self : bd, r = function() { function s() { this.fetch = !1, this.DOMException = n.DOMException; } return s.prototype = n, new s(); }(); (function(s) { (function(o) { var a = { searchParams: "URLSearchParams" in s, iterable: "Symbol" in s && "iterator" in Symbol, blob: "FileReader" in s && "Blob" in s && function() { try { return new Blob(), !0; } catch { return !1; } }(), formData: "FormData" in s, arrayBuffer: "ArrayBuffer" in s }; function l(E) { return E && DataView.prototype.isPrototypeOf(E); } if (a.arrayBuffer) var u = [ "[object Int8Array]", "[object Uint8Array]", "[object Uint8ClampedArray]", "[object Int16Array]", "[object Uint16Array]", "[object Int32Array]", "[object Uint32Array]", "[object Float32Array]", "[object Float64Array]" ], c = ArrayBuffer.isView || function(E) { return E && u.indexOf(Object.prototype.toString.call(E)) > -1; }; function d(E) { if (typeof E != "string" && (E = String(E)), /[^a-z0-9\-#$%&'*+.^_`|~]/i.test(E)) throw new TypeError("Invalid character in header field name"); return E.toLowerCase(); } function f(E) { return typeof E != "string" && (E = String(E)), E; } function y(E) { var R = { next: function() { var j = E.shift(); return { done: j === void 0, value: j }; } }; return a.iterable && (R[Symbol.iterator] = function() { return R; }), R; } function g(E) { this.map = {}, E instanceof g ? E.forEach(function(R, j) { this.append(j, R); }, this) : Array.isArray(E) ? E.forEach(function(R) { this.append(R[0], R[1]); }, this) : E && Object.getOwnPropertyNames(E).forEach(function(R) { this.append(R, E[R]); }, this); } g.prototype.append = function(E, R) { E = d(E), R = f(R); var j = this.map[E]; this.map[E] = j ? j + ", " + R : R; }, g.prototype.delete = function(E) { delete this.map[d(E)]; }, g.prototype.get = function(E) { return E = d(E), this.has(E) ? this.map[E] : null; }, g.prototype.has = function(E) { return this.map.hasOwnProperty(d(E)); }, g.prototype.set = function(E, R) { this.map[d(E)] = f(R); }, g.prototype.forEach = function(E, R) { for (var j in this.map) this.map.hasOwnProperty(j) && E.call(R, this.map[j], j, this); }, g.prototype.keys = function() { var E = []; return this.forEach(function(R, j) { E.push(j); }), y(E); }, g.prototype.values = function() { var E = []; return this.forEach(function(R) { E.push(R); }), y(E); }, g.prototype.entries = function() { var E = []; return this.forEach(function(R, j) { E.push([j, R]); }), y(E); }, a.iterable && (g.prototype[Symbol.iterator] = g.prototype.entries); function m(E) { if (E.bodyUsed) return Promise.reject(new TypeError("Already read")); E.bodyUsed = !0; } function k(E) { return new Promise(function(R, j) { E.onload = function() { R(E.result); }, E.onerror = function() { j(E.error); }; }); } function h(E) { var R = new FileReader(), j = k(R); return R.readAsArrayBuffer(E), j; } function p(E) { var R = new FileReader(), j = k(R); return R.readAsText(E), j; } function v(E) { for (var R = new Uint8Array(E), j = new Array(R.length), oe = 0; oe < R.length; oe++) j[oe] = String.fromCharCode(R[oe]); return j.join(""); } function S(E) { if (E.slice) return E.slice(0); var R = new Uint8Array(E.byteLength); return R.set(new Uint8Array(E)), R.buffer; } function _() { return this.bodyUsed = !1, this._initBody = function(E) { this._bodyInit = E, E ? typeof E == "string" ? this._bodyText = E : a.blob && Blob.prototype.isPrototypeOf(E) ? this._bodyBlob = E : a.formData && FormData.prototype.isPrototypeOf(E) ? this._bodyFormData = E : a.searchParams && URLSearchParams.prototype.isPrototypeOf(E) ? this._bodyText = E.toString() : a.arrayBuffer && a.blob && l(E) ? (this._bodyArrayBuffer = S(E.buffer), this._bodyInit = new Blob([this._bodyArrayBuffer])) : a.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(E) || c(E)) ? this._bodyArrayBuffer = S(E) : this._bodyText = E = Object.prototype.toString.call(E) : this._bodyText = "", this.headers.get("content-type") || (typeof E == "string" ? this.headers.set("content-type", "text/plain;charset=UTF-8") : this._bodyBlob && this._bodyBlob.type ? this.headers.set("content-type", this._bodyBlob.type) : a.searchParams && URLSearchParams.prototype.isPrototypeOf(E) && this.headers.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8")); }, a.blob && (this.blob = function() { var E = m(this); if (E) return E; if (this._bodyBlob) return Promise.resolve(this._bodyBlob); if (this._bodyArrayBuffer) return Promise.resolve(new Blob([this._bodyArrayBuffer])); if (this._bodyFormData) throw new Error("could not read FormData body as blob"); return Promise.resolve(new Blob([this._bodyText])); }, this.arrayBuffer = function() { return this._bodyArrayBuffer ? m(this) || Promise.resolve(this._bodyArrayBuffer) : this.blob().then(h); }), this.text = function() { var E = m(this); if (E) return E; if (this._bodyBlob) return p(this._bodyBlob); if (this._bodyArrayBuffer) return Promise.resolve(v(this._bodyArrayBuffer)); if (this._bodyFormData) throw new Error("could not read FormData body as text"); return Promise.resolve(this._bodyText); }, a.formData && (this.formData = function() { return this.text().then(I); }), this.json = function() { return this.text().then(JSON.parse); }, this; } var w = ["DELETE", "GET", "HEAD", "OPTIONS", "POST", "PUT"]; function A(E) { var R = E.toUpperCase(); return w.indexOf(R) > -1 ? R : E; } function b(E, R) { R = R || {}; var j = R.body; if (E instanceof b) { if (E.bodyUsed) throw new TypeError("Already read"); this.url = E.url, this.credentials = E.credentials, R.headers || (this.headers = new g(E.headers)), this.method = E.method, this.mode = E.mode, this.signal = E.signal, !j && E._bodyInit != null && (j = E._bodyInit, E.bodyUsed = !0); } else this.url = String(E); if (this.credentials = R.credentials || this.credentials || "same-origin", (R.headers || !this.headers) && (this.headers = new g(R.headers)), this.method = A(R.method || this.method || "GET"), this.mode = R.mode || this.mode || null, this.signal = R.signal || this.signal, this.referrer = null, (this.method === "GET" || this.method === "HEAD") && j) throw new TypeError("Body not allowed for GET or HEAD requests"); this._initBody(j); } b.prototype.clone = function() { return new b(this, { body: this._bodyInit }); }; function I(E) { var R = new FormData(); return E.trim().split("&").forEach(function(j) { if (j) { var oe = j.split("="), T = oe.shift().replace(/\+/g, " "), L = oe.join("=").replace(/\+/g, " "); R.append(decodeURIComponent(T), decodeURIComponent(L)); } }), R; } function F(E) { var R = new g(), j = E.replace(/\r?\n[\t ]+/g, " "); return j.split(/\r?\n/).forEach(function(oe) { var T = oe.split(":"), L = T.shift().trim(); if (L) { var V = T.join(":").trim(); R.append(L, V); } }), R; } _.call(b.prototype); function P(E, R) { R || (R = {}), this.type = "default", this.status = R.status === void 0 ? 200 : R.status, this.ok = this.status >= 200 && this.status < 300, this.statusText = "statusText" in R ? R.statusText : "OK", this.headers = new g(R.headers), this.url = R.url || "", this._initBody(E); } _.call(P.prototype), P.prototype.clone = function() { return new P(this._bodyInit, { status: this.status, statusText: this.statusText, headers: new g(this.headers), url: this.url }); }, P.error = function() { var E = new P(null, { status: 0, statusText: "" }); return E.type = "error", E; }; var W = [301, 302, 303, 307, 308]; P.redirect = function(E, R) { if (W.indexOf(R) === -1) throw new RangeError("Invalid status code"); return new P(null, { status: R, headers: { location: E } }); }, o.DOMException = s.DOMException; try { new o.DOMException(); } catch { o.DOMException = function(R, j) { this.message = R, this.name = j; var oe = Error(R); this.stack = oe.stack; }, o.DOMException.prototype = Object.create(Error.prototype), o.DOMException.prototype.constructor = o.DOMException; } function me(E, R) { return new Promise(function(j, oe) { var T = new b(E, R); if (T.signal && T.signal.aborted) return oe(new o.DOMException("Aborted", "AbortError")); var L = new XMLHttpRequest(); function V() { L.abort(); } L.onload = function() { var X = { status: L.status, statusText: L.statusText, headers: F(L.getAllResponseHeaders() || "") }; X.url = "responseURL" in L ? L.responseURL : X.headers.get("X-Request-URL"); var de = "response" in L ? L.response : L.responseText; j(new P(de, X)); }, L.onerror = function() { oe(new TypeError("Network request failed")); }, L.ontimeout = function() { oe(new TypeError("Network request failed")); }, L.onabort = function() { oe(new o.DOMException("Aborted", "AbortError")); }, L.open(T.method, T.url, !0), T.credentials === "include" ? L.withCredentials = !0 : T.credentials === "omit" && (L.withCredentials = !1), "responseType" in L && a.blob && (L.responseType = "blob"), T.headers.forEach(function(X, de) { L.setRequestHeader(de, X); }), T.signal && (T.signal.addEventListener("abort", V), L.onreadystatechange = function() { L.readyState === 4 && T.signal.removeEventListener("abort", V); }), L.send(typeof T._bodyInit > "u" ? null : T._bodyInit); }); } return me.polyfill = !0, s.fetch || (s.fetch = me, s.Headers = g, s.Request = b, s.Response = P), o.Headers = g, o.Request = b, o.Response = P, o.fetch = me, Object.defineProperty(o, "__esModule", { value: !0 }), o; })({}); })(r), r.fetch.ponyfill = !0, delete r.fetch.polyfill; var i = r; t = i.fetch, t.default = i.fetch, t.fetch = i.fetch, t.Headers = i.Headers, t.Request = i.Request, t.Response = i.Response, e.exports = t; })(kc, kc.exports); var va = kc.exports; const Bo = /* @__PURE__ */ qa(va), fC = /* @__PURE__ */ qS({ __proto__: null, default: Bo }, [va]), Pr = (e) => { let t = {}; return e && (typeof Headers < "u" && e instanceof Headers || fC && va.Headers && e instanceof va.Headers ? t = kb(e) : Array.isArray(e) ? e.forEach(([n, r]) => { n && r !== void 0 && (t[n] = r); }) : t = e), t; }, pp = (e) => e.replace(/([\s,]|#[^\n\r]+)+/g, " ").trim(), hC = (e) => { if (!Array.isArray(e.query)) { const r = e, i = [`query=${encodeURIComponent(pp(r.query))}`]; return e.variables && i.push(`variables=${encodeURIComponent(r.jsonSerializer.stringify(r.variables))}`), r.operationName && i.push(`operationName=${encodeURIComponent(r.operationName)}`), i.join("&"); } if (typeof e.variables < "u" && !Array.isArray(e.variables)) throw new Error("Cannot create query with given variable type, array expected"); const t = e, n = e.query.reduce((r, i, s) => (r.push({ query: pp(i), variables: t.variables ? t.jsonSerializer.stringify(t.variables[s]) : void 0 }), r), []); return `query=${encodeURIComponent(t.jsonSerializer.stringify(n))}`; }, pC = (e) => async (t) => { const { url: n, query: r, variables: i, operationName: s, fetch: o, fetchOptions: a, middleware: l } = t, u = { ...t.headers }; let c = "", d; e === "POST" ? (d = mC(r, i, s, a.jsonSerializer), typeof d == "string" && (u["Content-Type"] = "application/json")) : c = hC({ query: r, variables: i, operationName: s, jsonSerializer: a.jsonSerializer ?? Kd }); const f = { method: e, headers: u, body: d, ...a }; let y = n, g = f; if (l) { const m = await Promise.resolve(l({ ...f, url: n, operationName: s, variables: i })), { url: k, ...h } = m; y = k, g = h; } return c && (y = `${y}?${c}`), await o(y, g); }; class Wy { constructor(t, n = {}) { this.url = t, this.requestConfig = n, this.rawRequest = async (...r) => { const [i, s, o] = r, a = _b(i, s, o), { headers: l, fetch: u = Bo, method: c = "POST", requestMiddleware: d, responseMiddleware: f, ...y } = this.requestConfig, { url: g } = this; a.signal !== void 0 && (y.signal = a.signal); const { operationName: m } = lu(a.query); return uu({ url: g, query: a.query, variables: a.variables, headers: { ...Pr(cu(l)), ...Pr(a.requestHeaders) }, operationName: m, fetch: u, method: c, fetchOptions: y, middleware: d }).then((k) => (f && f(k), k)).catch((k) => { throw f && f(k), k; }); }; } async request(t, ...n) { const [r, i] = n, s = Sb(t, r, i), { headers: o, fetch: a = Bo, method: l = "POST", requestMiddleware: u, responseMiddleware: c, ...d } = this.requestConfig, { url: f } = this; s.signal !== void 0 && (d.signal = s.signal); const { query: y, operationName: g } = lu(s.document); return uu({ url: f, query: y, variables: s.variables, headers: { ...Pr(cu(o)), ...Pr(s.requestHeaders) }, operationName: g, fetch: a, method: l, fetchOptions: d, middleware: u }).then((m) => (c && c(m), m.data)).catch((m) => { throw c && c(m), m; }); } // prettier-ignore batchRequests(t, n) { const r = Eb(t, n), { headers: i, ...s } = this.requestConfig; r.signal !== void 0 && (s.signal = r.signal); const o = r.documents.map(({ document: l }) => lu(l).query), a = r.documents.map(({ variables: l }) => l); return uu({ url: this.url, query: o, // @ts-expect-error TODO reconcile batch variables into system. variables: a, headers: { ...Pr(cu(i)), ...Pr(r.requestHeaders) }, operationName: void 0, fetch: this.requestConfig.fetch ?? Bo, method: this.requestConfig.method || "POST", fetchOptions: s, middleware: this.requestConfig.requestMiddleware }).then((l) => (this.requestConfig.responseMiddleware && this.requestConfig.responseMiddleware(l), l.data)).catch((l) => { throw this.requestConfig.responseMiddleware && this.requestConfig.responseMiddleware(l), l; }); } setHeaders(t) { return this.requestConfig.headers = t, this; } /** * Attach a header to the client. All subsequent requests will have this header. */ setHeader(t, n) { const { headers: r } = this.requestConfig; return r ? r[t] = n : this.requestConfig.headers = { [t]: n }, this; } /** * Change the client endpoint. All subsequent requests will send to this endpoint. */ setEndpoint(t) { return this.url = t, this; } } const uu = async (e) => { const { query: t, variables: n, fetchOptions: r } = e, i = pC(yb(e.method ?? "post")), s = Array.isArray(e.query), o = await i(e), a = await gC(o, r.jsonSerializer ?? Kd), l = Array.isArray(a) ? !a.some(({ data: c }) => !c) : !!a.data, u = Array.isArray(a) || !a.errors || Array.isArray(a.errors) && !a.errors.length || r.errorPolicy === "all" || r.errorPolicy === "ignore"; if (o.ok && u && l) { const { errors: c, ...d } = (Array.isArray(a), a), f = r.errorPolicy === "ignore" ? d : a; return { ...s ? { data: f } : f, headers: o.headers, status: o.status }; } else { const c = typeof a == "string" ? { error: a } : a; throw new es( // @ts-expect-error TODO { ...c, status: o.status, headers: o.headers }, { query: t, variables: n } ); } }, mC = (e, t, n, r) => { const i = r ?? Kd; if (!Array.isArray(e)) return i.stringify({ query: e, variables: t, operationName: n }); if (typeof t < "u" && !Array.isArray(t)) throw new Error("Cannot create request body with given variable type, array expected"); const s = e.reduce((o, a, l) => (o.push({ query: a, variables: t ? t[l] : void 0 }), o), []); return i.stringify(s); }, gC = async (e, t) => { let n; return e.headers.forEach((r, i) => { i.toLowerCase() === "content-type" && (n = r); }), n && (n.toLowerCase().startsWith("application/json") || n.toLowerCase().startsWith("application/graphql+json") || n.toLowerCase().startsWith("application/graphql-response+json")) ? t.parse(await e.text()) : e.text(); }, cu = (e) => typeof e == "function" ? e() : e; class qy extends Er { constructor() { super( "EVENT_CHAT_ROOM_TOKEN_ERROR", "Error getting chat room connection token" ); } } class Sl { constructor(t) { O(this, "root", dl(this)); O(this, "token"); this.root.setProps(t); } static toDomain(t) { const n = { token: t.token }; return new Sl(n); } toPrimitives() { const { root: t, ...n } = this; return { ...n }; } } const vC = Bn.apiUrls.graphql; class Qy { constructor() { O(this, "client"); this.client = new Wy(vC); } async getChatRoom(t) { var i; const { getChatRoomToken: n } = await this.client.request( ty, { data: { account: t.account, idEvent: t.eventId, userName: t.userName } } ); this.propagateGraphqlErrorIfExists( n ); const r = (i = n.data) == null ? void 0 : i.token; if (!r) throw new qy(); return Sl.toDomain({ token: r }); } propagateGraphqlErrorIfExists(t) { if (t.__typename === "ErrorGeneral") throw new Error(t.message); } } class Ky { constructor(t) { O(this, "account"); this.eventChatRoomRepository = t; } async get(t) { this.validateAccount(); try { return await this.eventChatRoomRepository.getChatRoom({ ...t, account: this.account }); } catch (n) { throw new je(n); } } setAccount(t) { this.account = t; } validateAccount() { if (!this.account) throw new Ka(); } } const yC = new Qy(), Sc = new Ky( yC ), _l = Xt(void 0); _l.debugLabel = "chatSocketAtom"; const El = Xt(!1); El.debugLabel = "chatIsConnectedAtom"; const Ys = Xt([]); Ys.debugLabel = "chatMessageListAtom"; const Jy = (e) => { e.data = e.data.replace("replace_gif", e.urlGif ?? ""); const t = e.data.indexOf("::question__") > -1; if (t) { const [n, r] = e.data.split("::") || ["none", "none"], i = r.split("question__")[1], s = { response: n.replace("response__", ""), question: JSON.parse(i) }; return { ...e, data: s.response, isResponse: t, responseData: e.data, question: t ? s.question : null }; } return e; }, Yy = (e) => { const { url: t, token: n, onOpen: r, onClose: i, onMessage: s, onError: o } = e, a = new WebSocket(t, n); return a.onopen = (l) => r(l), a.onclose = (l) => i(l), a.onerror = (l) => o(l), a.onmessage = (l) => s(l), a; }, Xy = () => { const e = "0123456789ABCDEF"; let t = "#"; for (let n = 0; n < 6; n += 1) t += e[Math.floor(Math.random() * 16)]; return t; }, Xd = (e, t) => { var f; const { Content: n, Attributes: r, Sender: { Attributes: i } } = t, { username: s, type: o, email: a } = r, { isAdmin: l } = i, u = (r == null ? void 0 : r.id) ?? Un(8), c = ((f = e.find((y) => y.username === s)) == null ? void 0 : f.color) || Xy(), d = { id: u, type: o, color: c, username: s, email: a, data: n, sendDate: r.sendDate, isAdmin: l === "true", responseAdmin: !1, question: null, account: r.account, idEvent: r.idEvent, urlGif: r.urlGif, ip: r.ip }; return Jy(d); }; class Zd { constructor() { this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this); } subscribe(t) { const n = { listener: t }; return this.listeners.add(n), this.onSubscribe(), () => { this.listeners.delete(n), this.onUnsubscribe(); }; } hasListeners() { return this.listeners.size > 0; } onSubscribe() { } onUnsubscribe() { } } const ya = typeof window > "u" || "Deno" in window; function kC() { } function mp(e) { return typeof e == "number" && e >= 0 && e !== 1 / 0; } function SC(e, t) { return Math.max(e + (t || 0) - Date.now(), 0); } function _C(e, t, n) { return EC(e) ? { ...t, queryKey: e } : e; } function Zy(e, t) { if (e === t) return e; const n = gp(e) && gp(t); if (n || vp(e) && vp(t)) { const r = n ? e.length : Object.keys(e).length, i = n ? t : Object.keys(t), s = i.length, o = n ? [] : {}; let a = 0; for (let l = 0; l < s; l++) { const u = n ? l : i[l]; o[u] = Zy(e[u], t[u]), o[u] === e[u] && a++; } return r === s && a === r ? e : o; } return t; } function _c(e, t) { if (e && !t || t && !e) return !1; for (const n in e) if (e[n] !== t[n]) return !1; return !0; } function gp(e) { return Array.isArray(e) && e.length === Object.keys(e).length; } function vp(e) { if (!yp(e)) return !1; const t = e.constructor; if (typeof t > "u") return !0; const n = t.prototype; return !(!yp(n) || !n.hasOwnProperty("isPrototypeOf")); } function yp(e) { return Object.prototype.toString.call(e) === "[object Object]"; } function EC(e) { return Array.isArray(e); } function wC(e) { return new Promise((t) => { setTimeout(t, e); }); } function kp(e) { wC(0).then(e); } function Sp(e, t, n) { return n.isDataEqual != null && n.isDataEqual(e, t) ? e : typeof n.structuralSharing == "function" ? n.structuralSharing(e, t) : n.structuralSharing !== !1 ? Zy(e, t) : t; } class NC extends Zd { constructor() { super(), this.setup = (t) => { if (!ya && window.addEventListener) { const n = () => t(); return window.addEventListener("visibilitychange", n, !1), window.addEventListener("focus", n, !1), () => { window.removeEventListener("visibilitychange", n), window.removeEventListener("focus", n); }; } }; } onSubscribe() { this.cleanup || this.setEventListener(this.setup); } onUnsubscribe() { if (!this.hasListeners()) { var t; (t = this.cleanup) == null || t.call(this), this.cleanup = void 0; } } setEventListener(t) { var n; this.setup = t, (n = this.cleanup) == null || n.call(this), this.cleanup = t((r) => { typeof r == "boolean" ? this.setFocused(r) : this.onFocus(); }); } setFocused(t) { this.focused !== t && (this.focused = t, this.onFocus()); } onFocus() { this.listeners.forEach(({ listener: t }) => { t(); }); } isFocused() { return typeof this.focused == "boolean" ? this.focused : typeof document > "u" ? !0 : [void 0, "visible", "prerender"].includes(document.visibilityState); } } const AC = new NC(), _p = ["online", "offline"]; class bC extends Zd { constructor() { super(), this.setup = (t) => { if (!ya && window.addEventListener) { const n = () => t(); return _p.forEach((r) => { window.addEventListener(r, n, !1); }), () => { _p.forEach((r) => { window.removeEventListener(r, n); }); }; } }; } onSubscribe() { this.cleanup || this.setEventListener(this.setup); } onUnsubscribe() { if (!this.hasListeners()) { var t; (t = this.cleanup) == null || t.call(this), this.cleanup = void 0; } } setEventListener(t) { var n; this.setup = t, (n = this.cleanup) == null || n.call(this), this.cleanup = t((r) => { typeof r == "boolean" ? this.setOnline(r) : this.onOnline(); }); } setOnline(t) { this.online !== t && (this.online = t, this.onOnline()); } onOnline() { this.listeners.forEach(({ listener: t }) => { t(); }); } isOnline() { return typeof this.online == "boolean" ? this.online : typeof navigator > "u" || typeof navigator.onLine > "u" ? !0 : navigator.onLine; } } const CC = new bC(); function OC(e) { return (e ?? "online") === "online" ? CC.isOnline() : !0; } class TC { constructor(t) { this.revert = t == null ? void 0 : t.revert, this.silent = t == null ? void 0 : t.silent; } } function xC(e) { return e instanceof TC; } function RC() { let e = [], t = 0, n = (c) => { c(); }, r = (c) => { c(); }; const i = (c) => { let d; t++; try { d = c(); } finally { t--, t || a(); } return d; }, s = (c) => { t ? e.push(c) : kp(() => { n(c); }); }, o = (c) => (...d) => { s(() => { c(...d); }); }, a = () => { const c = e; e = [], c.length && kp(() => { r(() => { c.forEach((d) => { n(d); }); }); }); }; return { batch: i, batchCalls: o, schedule: s, setNotifyFunction: (c) => { n = c; }, setBatchNotifyFunction: (c) => { r = c; } }; } const Wi = RC(); class IC extends Zd { constructor(t, n) { super(), this.client = t, this.options = n, this.trackedProps = /* @__PURE__ */ new Set(), this.selectError = null, this.bindMethods(), this.setOptions(n); } bindMethods() { this.remove = this.remove.bind(this), this.refetch = this.refetch.bind(this); } onSubscribe() { this.listeners.size === 1 && (this.currentQuery.addObserver(this), Ep(this.currentQuery, this.options) && this.executeFetch(), this.updateTimers()); } onUnsubscribe() { this.hasListeners() || this.destroy(); } shouldFetchOnReconnect() { return Ec(this.currentQuery, this.options, this.options.refetchOnReconnect); } shouldFetchOnWindowFocus() { return Ec(this.currentQuery, this.options, this.options.refetchOnWindowFocus); } destroy() { this.listeners = /* @__PURE__ */ new Set(), this.clearStaleTimeout(), this.clearRefetchInterval(), this.currentQuery.removeObserver(this); } setOptions(t, n) { const r = this.options, i = this.currentQuery; if (this.options = this.client.defaultQueryOptions(t), _c(r, this.options) || this.client.getQueryCache().notify({ type: "observerOptionsUpdated", query: this.currentQuery, observer: this }), typeof this.options.enabled < "u" && typeof this.options.enabled != "boolean") throw new Error("Expected enabled to be a boolean"); this.options.queryKey || (this.options.queryKey = r.queryKey), this.updateQuery(); const s = this.hasListeners(); s && wp(this.currentQuery, i, this.options, r) && this.executeFetch(), this.updateResult(n), s && (this.currentQuery !== i || this.options.enabled !== r.enabled || this.options.staleTime !== r.staleTime) && this.updateStaleTimeout(); const o = this.computeRefetchInterval(); s && (this.currentQuery !== i || this.options.enabled !== r.enabled || o !== this.currentRefetchInterval) && this.updateRefetchInterval(o); } getOptimisticResult(t) { const n = this.client.getQueryCache().build(this.client, t), r = this.createResult(n, t); return LC(this, r, t) && (this.currentResult = r, this.currentResultOptions = this.options, this.currentResultState = this.currentQuery.state), r; } getCurrentResult() { return this.currentResult; } trackResult(t) { const n = {}; return Object.keys(t).forEach((r) => { Object.defineProperty(n, r, { configurable: !1, enumerable: !0, get: () => (this.trackedProps.add(r), t[r]) }); }), n; } getCurrentQuery() { return this.currentQuery; } remove() { this.client.getQueryCache().remove(this.currentQuery); } refetch({ refetchPage: t, ...n } = {}) { return this.fetch({ ...n, meta: { refetchPage: t } }); } fetchOptimistic(t) { const n = this.client.defaultQueryOptions(t), r = this.client.getQueryCache().build(this.client, n); return r.isFetchingOptimistic = !0, r.fetch().then(() => this.createResult(r, n)); } fetch(t) { var n; return this.executeFetch({ ...t, cancelRefetch: (n = t.cancelRefetch) != null ? n : !0 }).then(() => (this.updateResult(), this.currentResult)); } executeFetch(t) { this.updateQuery(); let n = this.currentQuery.fetch(this.options, t); return t != null && t.throwOnError || (n = n.catch(kC)), n; } updateStaleTimeout() { if (this.clearStaleTimeout(), ya || this.currentResult.isStale || !mp(this.options.staleTime)) return; const n = SC(this.currentResult.dataUpdatedAt, this.options.staleTime) + 1; this.staleTimeoutId = setTimeout(() => { this.currentResult.isStale || this.updateResult(); }, n); } computeRefetchInterval() { var t; return typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(this.currentResult.data, this.currentQuery) : (t = this.options.refetchInterval) != null ? t : !1; } updateRefetchInterval(t) { this.clearRefetchInterval(), this.currentRefetchInterval = t, !(ya || this.options.enabled === !1 || !mp(this.currentRefetchInterval) || this.currentRefetchInterval === 0) && (this.refetchIntervalId = setInterval(() => { (this.options.refetchIntervalInBackground || AC.isFocused()) && this.executeFetch(); }, this.currentRefetchInterval)); } updateTimers() { this.updateStaleTimeout(), this.updateRefetchInterval(this.computeRefetchInterval()); } clearStaleTimeout() { this.staleTimeoutId && (clearTimeout(this.staleTimeoutId), this.staleTimeoutId = void 0); } clearRefetchInterval() { this.refetchIntervalId && (clearInterval(this.refetchIntervalId), this.refetchIntervalId = void 0); } createResult(t, n) { const r = this.currentQuery, i = this.options, s = this.currentResult, o = this.currentResultState, a = this.currentResultOptions, l = t !== r, u = l ? t.state : this.currentQueryInitialState, c = l ? this.currentResult : this.previousQueryResult, { state: d } = t; let { dataUpdatedAt: f, error: y, errorUpdatedAt: g, fetchStatus: m, status: k } = d, h = !1, p = !1, v; if (n._optimisticResults) { const b = this.hasListeners(), I = !b && Ep(t, n), F = b && wp(t, r, n, i); (I || F) && (m = OC(t.options.networkMode) ? "fetching" : "paused", f || (k = "loading")), n._optimisticResults === "isRestoring" && (m = "idle"); } if (n.keepPreviousData && !d.dataUpdatedAt && c != null && c.isSuccess && k !== "error") v = c.data, f = c.dataUpdatedAt, k = c.status, h = !0; else if (n.select && typeof d.data < "u") if (s && d.data === (o == null ? void 0 : o.data) && n.select === this.selectFn) v = this.selectResult; else try { this.selectFn = n.select, v = n.select(d.data), v = Sp(s == null ? void 0 : s.data, v, n), this.selectResult = v, this.selectError = null; } catch (b) { this.selectError = b; } else v = d.data; if (typeof n.placeholderData < "u" && typeof v > "u" && k === "loading") { let b; if (s != null && s.isPlaceholderData && n.placeholderData === (a == null ? void 0 : a.placeholderData)) b = s.data; else if (b = typeof n.placeholderData == "function" ? n.placeholderData() : n.placeholderData, n.select && typeof b < "u") try { b = n.select(b), this.selectError = null; } catch (I) { this.selectError = I; } typeof b < "u" && (k = "success", v = Sp(s == null ? void 0 : s.data, b, n), p = !0); } this.selectError && (y = this.selectError, v = this.selectResult, g = Date.now(), k = "error"); const S = m === "fetching", _ = k === "loading", w = k === "error"; return { status: k, fetchStatus: m, isLoading: _, isSuccess: k === "success", isError: w, isInitialLoading: _ && S, data: v, dataUpdatedAt: f, error: y, errorUpdatedAt: g, failureCount: d.fetchFailureCount, failureReason: d.fetchFailureReason, errorUpdateCount: d.errorUpdateCount, isFetched: d.dataUpdateCount > 0 || d.errorUpdateCount > 0, isFetchedAfterMount: d.dataUpdateCount > u.dataUpdateCount || d.errorUpdateCount > u.errorUpdateCount, isFetching: S, isRefetching: S && !_, isLoadingError: w && d.dataUpdatedAt === 0, isPaused: m === "paused", isPlaceholderData: p, isPreviousData: h, isRefetchError: w && d.dataUpdatedAt !== 0, isStale: ef(t, n), refetch: this.refetch, remove: this.remove }; } updateResult(t) { const n = this.currentResult, r = this.createResult(this.currentQuery, this.options); if (this.currentResultState = this.currentQuery.state, this.currentResultOptions = this.options, _c(r, n)) return; this.currentResult = r; const i = { cache: !0 }, s = () => { if (!n) return !0; const { notifyOnChangeProps: o } = this.options, a = typeof o == "function" ? o() : o; if (a === "all" || !a && !this.trackedProps.size) return !0; const l = new Set(a ?? this.trackedProps); return this.options.useErrorBoundary && l.add("error"), Object.keys(this.currentResult).some((u) => { const c = u; return this.currentResult[c] !== n[c] && l.has(c); }); }; (t == null ? void 0 : t.listeners) !== !1 && s() && (i.listeners = !0), this.notify({ ...i, ...t }); } updateQuery() { const t = this.client.getQueryCache().build(this.client, this.options); if (t === this.currentQuery) return; const n = this.currentQuery; this.currentQuery = t, this.currentQueryInitialState = t.state, this.previousQueryResult = this.currentResult, this.hasListeners() && (n == null || n.removeObserver(this), t.addObserver(this)); } onQueryUpdate(t) { const n = {}; t.type === "success" ? n.onSuccess = !t.manual : t.type === "error" && !xC(t.error) && (n.onError = !0), this.updateResult(n), this.hasListeners() && this.updateTimers(); } notify(t) { Wi.batch(() => { if (t.onSuccess) { var n, r, i, s; (n = (r = this.options).onSuccess) == null || n.call(r, this.currentResult.data), (i = (s = this.options).onSettled) == null || i.call(s, this.currentResult.data, null); } else if (t.onError) { var o, a, l, u; (o = (a = this.options).onError) == null || o.call(a, this.currentResult.error), (l = (u = this.options).onSettled) == null || l.call(u, void 0, this.currentResult.error); } t.listeners && this.listeners.forEach(({ listener: c }) => { c(this.currentResult); }), t.cache && this.client.getQueryCache().notify({ query: this.currentQuery, type: "observerResultsUpdated" }); }); } } function PC(e, t) { return t.enabled !== !1 && !e.state.dataUpdatedAt && !(e.state.status === "error" && t.retryOnMount === !1); } function Ep(e, t) { return PC(e, t) || e.state.dataUpdatedAt > 0 && Ec(e, t, t.refetchOnMount); } function Ec(e, t, n) { if (t.enabled !== !1) { const r = typeof n == "function" ? n(e) : n; return r === "always" || r !== !1 && ef(e, t); } return !1; } function wp(e, t, n, r) { return n.enabled !== !1 && (e !== t || r.enabled === !1) && (!n.suspense || e.state.status !== "error") && ef(e, n); } function ef(e, t) { return e.isStaleByTime(t.staleTime); } function LC(e, t, n) { return n.keepPreviousData ? !1 : n.placeholderData !== void 0 ? t.isPlaceholderData : !_c(e.getCurrentResult(), t); } var ek = { exports: {} }, ut = {}, tk = { exports: {} }, nk = {}; /** * @license React * scheduler.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ (function(e) { function t(T, L) { var V = T.length; T.push(L); e: for (; 0 < V; ) { var X = V - 1 >>> 1, de = T[X]; if (0 < i(de, L)) T[X] = L, T[V] = de, V = X; else break e; } } function n(T) { return T.length === 0 ? null : T[0]; } function r(T) { if (T.length === 0) return null; var L = T[0], V = T.pop(); if (V !== L) { T[0] = V; e: for (var X = 0, de = T.length, ro = de >>> 1; X < ro; ) { var Qn = 2 * (X + 1) - 1, Bl = T[Qn], Kn = Qn + 1, io = T[Kn]; if (0 > i(Bl, V)) Kn < de && 0 > i(io, Bl) ? (T[X] = io, T[Kn] = V, X = Kn) : (T[X] = Bl, T[Qn] = V, X = Qn); else if (Kn < de && 0 > i(io, V)) T[X] = io, T[Kn] = V, X = Kn; else break e; } } return L; } function i(T, L) { var V = T.sortIndex - L.sortIndex; return V !== 0 ? V : T.id - L.id; } if (typeof performance == "object" && typeof performance.now == "function") { var s = performance; e.unstable_now = function() { return s.now(); }; } else { var o = Date, a = o.now(); e.unstable_now = function() { return o.now() - a; }; } var l = [], u = [], c = 1, d = null, f = 3, y = !1, g = !1, m = !1, k = typeof setTimeout == "function" ? setTimeout : null, h = typeof clearTimeout == "function" ? clearTimeout : null, p = typeof setImmediate < "u" ? setImmediate : null; typeof navigator < "u" && navigator.scheduling !== void 0 && navigator.scheduling.isInputPending !== void 0 && navigator.scheduling.isInputPending.bind(navigator.scheduling); function v(T) { for (var L = n(u); L !== null; ) { if (L.callback === null) r(u); else if (L.startTime <= T) r(u), L.sortIndex = L.expirationTime, t(l, L); else break; L = n(u); } } function S(T) { if (m = !1, v(T), !g) if (n(l) !== null) g = !0, j(_); else { var L = n(u); L !== null && oe(S, L.startTime - T); } } function _(T, L) { g = !1, m && (m = !1, h(b), b = -1), y = !0; var V = f; try { for (v(L), d = n(l); d !== null && (!(d.expirationTime > L) || T && !P()); ) { var X = d.callback; if (typeof X == "function") { d.callback = null, f = d.priorityLevel; var de = X(d.expirationTime <= L); L = e.unstable_now(), typeof de == "function" ? d.callback = de : d === n(l) && r(l), v(L); } else r(l); d = n(l); } if (d !== null) var ro = !0; else { var Qn = n(u); Qn !== null && oe(S, Qn.startTime - L), ro = !1; } return ro; } finally { d = null, f = V, y = !1; } } var w = !1, A = null, b = -1, I = 5, F = -1; function P() { return !(e.unstable_now() - F < I); } function W() { if (A !== null) { var T = e.unstable_now(); F = T; var L = !0; try { L = A(!0, T); } finally { L ? me() : (w = !1, A = null); } } else w = !1; } var me; if (typeof p == "function") me = function() { p(W); }; else if (typeof MessageChannel < "u") { var E = new MessageChannel(), R = E.port2; E.port1.onmessage = W, me = function() { R.postMessage(null); }; } else me = function() { k(W, 0); }; function j(T) { A = T, w || (w = !0, me()); } function oe(T, L) { b = k(function() { T(e.unstable_now()); }, L); } e.unstable_IdlePriority = 5, e.unstable_ImmediatePriority = 1, e.unstable_LowPriority = 4, e.unstable_NormalPriority = 3, e.unstable_Profiling = null, e.unstable_UserBlockingPriority = 2, e.unstable_cancelCallback = function(T) { T.callback = null; }, e.unstable_continueExecution = function() { g || y || (g = !0, j(_)); }, e.unstable_forceFrameRate = function(T) { 0 > T || 125 < T ? console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported") : I = 0 < T ? Math.floor(1e3 / T) : 5; }, e.unstable_getCurrentPriorityLevel = function() { return f; }, e.unstable_getFirstCallbackNode = function() { return n(l); }, e.unstable_next = function(T) { switch (f) { case 1: case 2: case 3: var L = 3; break; default: L = f; } var V = f; f = L; try { return T(); } finally { f = V; } }, e.unstable_pauseExecution = function() { }, e.unstable_requestPaint = function() { }, e.unstable_runWithPriority = function(T, L) { switch (T) { case 1: case 2: case 3: case 4: case 5: break; default: T = 3; } var V = f; f = T; try { return L(); } finally { f = V; } }, e.unstable_scheduleCallback = function(T, L, V) { var X = e.unstable_now(); switch (typeof V == "object" && V !== null ? (V = V.delay, V = typeof V == "number" && 0 < V ? X + V : X) : V = X, T) { case 1: var de = -1; break; case 2: de = 250; break; case 5: de = 1073741823; break; case 4: de = 1e4; break; default: de = 5e3; } return de = V + de, T = { id: c++, callback: L, priorityLevel: T, startTime: V, expirationTime: de, sortIndex: -1 }, V > X ? (T.sortIndex = V, t(u, T), n(l) === null && T === n(u) && (m ? (h(b), b = -1) : m = !0, oe(S, V - X))) : (T.sortIndex = de, t(l, T), g || y || (g = !0, j(_))), T; }, e.unstable_shouldYield = P, e.unstable_wrapCallback = function(T) { var L = f; return function() { var V = f; f = L; try { return T.apply(this, arguments); } finally { f = V; } }; }; })(nk); tk.exports = nk; var FC = tk.exports; /** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var DC = D, at = FC; function x(e) { for (var t = "https://reactjs.org/docs/error-decoder.html?invariant=" + e, n = 1; n < arguments.length; n++) t += "&args[]=" + encodeURIComponent(arguments[n]); return "Minified React error #" + e + "; visit " + t + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings."; } var rk = /* @__PURE__ */ new Set(), Es = {}; function Cr(e, t) { ui(e, t), ui(e + "Capture", t); } function ui(e, t) { for (Es[e] = t, e = 0; e < t.length; e++) rk.add(t[e]); } var ln = !(typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u"), wc = Object.prototype.hasOwnProperty, $C = /^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/, Np = {}, Ap = {}; function MC(e) { return wc.call(Ap, e) ? !0 : wc.call(Np, e) ? !1 : $C.test(e) ? Ap[e] = !0 : (Np[e] = !0, !1); } function UC(e, t, n, r) { if (n !== null && n.type === 0) return !1; switch (typeof t) { case "function": case "symbol": return !0; case "boolean": return r ? !1 : n !== null ? !n.acceptsBooleans : (e = e.toLowerCase().slice(0, 5), e !== "data-" && e !== "aria-"); default: return !1; } } function jC(e, t, n, r) { if (t === null || typeof t > "u" || UC(e, t, n, r)) return !0; if (r) return !1; if (n !== null) switch (n.type) { case 3: return !t; case 4: return t === !1; case 5: return isNaN(t); case 6: return isNaN(t) || 1 > t; } return !1; } function Me(e, t, n, r, i, s, o) { this.acceptsBooleans = t === 2 || t === 3 || t === 4, this.attributeName = r, this.attributeNamespace = i, this.mustUseProperty = n, this.propertyName = e, this.type = t, this.sanitizeURL = s, this.removeEmptyString = o; } var Ce = {}; "children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e) { Ce[e] = new Me(e, 0, !1, e, null, !1, !1); }); [["acceptCharset", "accept-charset"], ["className", "class"], ["htmlFor", "for"], ["httpEquiv", "http-equiv"]].forEach(function(e) { var t = e[0]; Ce[t] = new Me(t, 1, !1, e[1], null, !1, !1); }); ["contentEditable", "draggable", "spellCheck", "value"].forEach(function(e) { Ce[e] = new Me(e, 2, !1, e.toLowerCase(), null, !1, !1); }); ["autoReverse", "externalResourcesRequired", "focusable", "preserveAlpha"].forEach(function(e) { Ce[e] = new Me(e, 2, !1, e, null, !1, !1); }); "allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e) { Ce[e] = new Me(e, 3, !1, e.toLowerCase(), null, !1, !1); }); ["checked", "multiple", "muted", "selected"].forEach(function(e) { Ce[e] = new Me(e, 3, !0, e, null, !1, !1); }); ["capture", "download"].forEach(function(e) { Ce[e] = new Me(e, 4, !1, e, null, !1, !1); }); ["cols", "rows", "size", "span"].forEach(function(e) { Ce[e] = new Me(e, 6, !1, e, null, !1, !1); }); ["rowSpan", "start"].forEach(function(e) { Ce[e] = new Me(e, 5, !1, e.toLowerCase(), null, !1, !1); }); var tf = /[\-:]([a-z])/g; function nf(e) { return e[1].toUpperCase(); } "accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e) { var t = e.replace( tf, nf ); Ce[t] = new Me(t, 1, !1, e, null, !1, !1); }); "xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e) { var t = e.replace(tf, nf); Ce[t] = new Me(t, 1, !1, e, "http://www.w3.org/1999/xlink", !1, !1); }); ["xml:base", "xml:lang", "xml:space"].forEach(function(e) { var t = e.replace(tf, nf); Ce[t] = new Me(t, 1, !1, e, "http://www.w3.org/XML/1998/namespace", !1, !1); }); ["tabIndex", "crossOrigin"].forEach(function(e) { Ce[e] = new Me(e, 1, !1, e.toLowerCase(), null, !1, !1); }); Ce.xlinkHref = new Me("xlinkHref", 1, !1, "xlink:href", "http://www.w3.org/1999/xlink", !0, !1); ["src", "href", "action", "formAction"].forEach(function(e) { Ce[e] = new Me(e, 1, !1, e.toLowerCase(), null, !0, !0); }); function rf(e, t, n, r) { var i = Ce.hasOwnProperty(t) ? Ce[t] : null; (i !== null ? i.type !== 0 : r || !(2 < t.length) || t[0] !== "o" && t[0] !== "O" || t[1] !== "n" && t[1] !== "N") && (jC(t, n, i, r) && (n = null), r || i === null ? MC(t) && (n === null ? e.removeAttribute(t) : e.setAttribute(t, "" + n)) : i.mustUseProperty ? e[i.propertyName] = n === null ? i.type === 3 ? !1 : "" : n : (t = i.attributeName, r = i.attributeNamespace, n === null ? e.removeAttribute(t) : (i = i.type, n = i === 3 || i === 4 && n === !0 ? "" : "" + n, r ? e.setAttributeNS(r, t, n) : e.setAttribute(t, n)))); } var hn = DC.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, fo = Symbol.for("react.element"), Br = Symbol.for("react.portal"), zr = Symbol.for("react.fragment"), sf = Symbol.for("react.strict_mode"), Nc = Symbol.for("react.profiler"), ik = Symbol.for("react.provider"), sk = Symbol.for("react.context"), of = Symbol.for("react.forward_ref"), Ac = Symbol.for("react.suspense"), bc = Symbol.for("react.suspense_list"), af = Symbol.for("react.memo"), gn = Symbol.for("react.lazy"), ok = Symbol.for("react.offscreen"), bp = Symbol.iterator; function Di(e) { return e === null || typeof e != "object" ? null : (e = bp && e[bp] || e["@@iterator"], typeof e == "function" ? e : null); } var ce = Object.assign, du; function qi(e) { if (du === void 0) try { throw Error(); } catch (n) { var t = n.stack.trim().match(/\n( *(at )?)/); du = t && t[1] || ""; } return ` ` + du + e; } var fu = !1; function hu(e, t) { if (!e || fu) return ""; fu = !0; var n = Error.prepareStackTrace; Error.prepareStackTrace = void 0; try { if (t) if (t = function() { throw Error(); }, Object.defineProperty(t.prototype, "props", { set: function() { throw Error(); } }), typeof Reflect == "object" && Reflect.construct) { try { Reflect.construct(t, []); } catch (u) { var r = u; } Reflect.construct(e, [], t); } else { try { t.call(); } catch (u) { r = u; } e.call(t.prototype); } else { try { throw Error(); } catch (u) { r = u; } e(); } } catch (u) { if (u && r && typeof u.stack == "string") { for (var i = u.stack.split(` `), s = r.stack.split(` `), o = i.length - 1, a = s.length - 1; 1 <= o && 0 <= a && i[o] !== s[a]; ) a--; for (; 1 <= o && 0 <= a; o--, a--) if (i[o] !== s[a]) { if (o !== 1 || a !== 1) do if (o--, a--, 0 > a || i[o] !== s[a]) { var l = ` ` + i[o].replace(" at new ", " at "); return e.displayName && l.includes("") && (l = l.replace("", e.displayName)), l; } while (1 <= o && 0 <= a); break; } } } finally { fu = !1, Error.prepareStackTrace = n; } return (e = e ? e.displayName || e.name : "") ? qi(e) : ""; } function VC(e) { switch (e.tag) { case 5: return qi(e.type); case 16: return qi("Lazy"); case 13: return qi("Suspense"); case 19: return qi("SuspenseList"); case 0: case 2: case 15: return e = hu(e.type, !1), e; case 11: return e = hu(e.type.render, !1), e; case 1: return e = hu(e.type, !0), e; default: return ""; } } function Cc(e) { if (e == null) return null; if (typeof e == "function") return e.displayName || e.name || null; if (typeof e == "string") return e; switch (e) { case zr: return "Fragment"; case Br: return "Portal"; case Nc: return "Profiler"; case sf: return "StrictMode"; case Ac: return "Suspense"; case bc: return "SuspenseList"; } if (typeof e == "object") switch (e.$$typeof) { case sk: return (e.displayName || "Context") + ".Consumer"; case ik: return (e._context.displayName || "Context") + ".Provider"; case of: var t = e.render; return e = e.displayName, e || (e = t.displayName || t.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e; case af: return t = e.displayName || null, t !== null ? t : Cc(e.type) || "Memo"; case gn: t = e._payload, e = e._init; try { return Cc(e(t)); } catch { } } return null; } function BC(e) { var t = e.type; switch (e.tag) { case 24: return "Cache"; case 9: return (t.displayName || "Context") + ".Consumer"; case 10: return (t._context.displayName || "Context") + ".Provider"; case 18: return "DehydratedFragment"; case 11: return e = t.render, e = e.displayName || e.name || "", t.displayName || (e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"); case 7: return "Fragment"; case 5: return t; case 4: return "Portal"; case 3: return "Root"; case 6: return "Text"; case 16: return Cc(t); case 8: return t === sf ? "StrictMode" : "Mode"; case 22: return "Offscreen"; case 12: return "Profiler"; case 21: return "Scope"; case 13: return "Suspense"; case 19: return "SuspenseList"; case 25: return "TracingMarker"; case 1: case 0: case 17: case 2: case 14: case 15: if (typeof t == "function") return t.displayName || t.name || null; if (typeof t == "string") return t; } return null; } function jn(e) { switch (typeof e) { case "boolean": case "number": case "string": case "undefined": return e; case "object": return e; default: return ""; } } function ak(e) { var t = e.type; return (e = e.nodeName) && e.toLowerCase() === "input" && (t === "checkbox" || t === "radio"); } function zC(e) { var t = ak(e) ? "checked" : "value", n = Object.getOwnPropertyDescriptor(e.constructor.prototype, t), r = "" + e[t]; if (!e.hasOwnProperty(t) && typeof n < "u" && typeof n.get == "function" && typeof n.set == "function") { var i = n.get, s = n.set; return Object.defineProperty(e, t, { configurable: !0, get: function() { return i.call(this); }, set: function(o) { r = "" + o, s.call(this, o); } }), Object.defineProperty(e, t, { enumerable: n.enumerable }), { getValue: function() { return r; }, setValue: function(o) { r = "" + o; }, stopTracking: function() { e._valueTracker = null, delete e[t]; } }; } } function ho(e) { e._valueTracker || (e._valueTracker = zC(e)); } function lk(e) { if (!e) return !1; var t = e._valueTracker; if (!t) return !0; var n = t.getValue(), r = ""; return e && (r = ak(e) ? e.checked ? "true" : "false" : e.value), e = r, e !== n ? (t.setValue(e), !0) : !1; } function ka(e) { if (e = e || (typeof document < "u" ? document : void 0), typeof e > "u") return null; try { return e.activeElement || e.body; } catch { return e.body; } } function Oc(e, t) { var n = t.checked; return ce({}, t, { defaultChecked: void 0, defaultValue: void 0, value: void 0, checked: n ?? e._wrapperState.initialChecked }); } function Cp(e, t) { var n = t.defaultValue == null ? "" : t.defaultValue, r = t.checked != null ? t.checked : t.defaultChecked; n = jn(t.value != null ? t.value : n), e._wrapperState = { initialChecked: r, initialValue: n, controlled: t.type === "checkbox" || t.type === "radio" ? t.checked != null : t.value != null }; } function uk(e, t) { t = t.checked, t != null && rf(e, "checked", t, !1); } function Tc(e, t) { uk(e, t); var n = jn(t.value), r = t.type; if (n != null) r === "number" ? (n === 0 && e.value === "" || e.value != n) && (e.value = "" + n) : e.value !== "" + n && (e.value = "" + n); else if (r === "submit" || r === "reset") { e.removeAttribute("value"); return; } t.hasOwnProperty("value") ? xc(e, t.type, n) : t.hasOwnProperty("defaultValue") && xc(e, t.type, jn(t.defaultValue)), t.checked == null && t.defaultChecked != null && (e.defaultChecked = !!t.defaultChecked); } function Op(e, t, n) { if (t.hasOwnProperty("value") || t.hasOwnProperty("defaultValue")) { var r = t.type; if (!(r !== "submit" && r !== "reset" || t.value !== void 0 && t.value !== null)) return; t = "" + e._wrapperState.initialValue, n || t === e.value || (e.value = t), e.defaultValue = t; } n = e.name, n !== "" && (e.name = ""), e.defaultChecked = !!e._wrapperState.initialChecked, n !== "" && (e.name = n); } function xc(e, t, n) { (t !== "number" || ka(e.ownerDocument) !== e) && (n == null ? e.defaultValue = "" + e._wrapperState.initialValue : e.defaultValue !== "" + n && (e.defaultValue = "" + n)); } var Qi = Array.isArray; function ei(e, t, n, r) { if (e = e.options, t) { t = {}; for (var i = 0; i < n.length; i++) t["$" + n[i]] = !0; for (n = 0; n < e.length; n++) i = t.hasOwnProperty("$" + e[n].value), e[n].selected !== i && (e[n].selected = i), i && r && (e[n].defaultSelected = !0); } else { for (n = "" + jn(n), t = null, i = 0; i < e.length; i++) { if (e[i].value === n) { e[i].selected = !0, r && (e[i].defaultSelected = !0); return; } t !== null || e[i].disabled || (t = e[i]); } t !== null && (t.selected = !0); } } function Rc(e, t) { if (t.dangerouslySetInnerHTML != null) throw Error(x(91)); return ce({}, t, { value: void 0, defaultValue: void 0, children: "" + e._wrapperState.initialValue }); } function Tp(e, t) { var n = t.value; if (n == null) { if (n = t.children, t = t.defaultValue, n != null) { if (t != null) throw Error(x(92)); if (Qi(n)) { if (1 < n.length) throw Error(x(93)); n = n[0]; } t = n; } t == null && (t = ""), n = t; } e._wrapperState = { initialValue: jn(n) }; } function ck(e, t) { var n = jn(t.value), r = jn(t.defaultValue); n != null && (n = "" + n, n !== e.value && (e.value = n), t.defaultValue == null && e.defaultValue !== n && (e.defaultValue = n)), r != null && (e.defaultValue = "" + r); } function xp(e) { var t = e.textContent; t === e._wrapperState.initialValue && t !== "" && t !== null && (e.value = t); } function dk(e) { switch (e) { case "svg": return "http://www.w3.org/2000/svg"; case "math": return "http://www.w3.org/1998/Math/MathML"; default: return "http://www.w3.org/1999/xhtml"; } } function Ic(e, t) { return e == null || e === "http://www.w3.org/1999/xhtml" ? dk(t) : e === "http://www.w3.org/2000/svg" && t === "foreignObject" ? "http://www.w3.org/1999/xhtml" : e; } var po, fk = function(e) { return typeof MSApp < "u" && MSApp.execUnsafeLocalFunction ? function(t, n, r, i) { MSApp.execUnsafeLocalFunction(function() { return e(t, n, r, i); }); } : e; }(function(e, t) { if (e.namespaceURI !== "http://www.w3.org/2000/svg" || "innerHTML" in e) e.innerHTML = t; else { for (po = po || document.createElement("div"), po.innerHTML = "" + t.valueOf().toString() + "", t = po.firstChild; e.firstChild; ) e.removeChild(e.firstChild); for (; t.firstChild; ) e.appendChild(t.firstChild); } }); function ws(e, t) { if (t) { var n = e.firstChild; if (n && n === e.lastChild && n.nodeType === 3) { n.nodeValue = t; return; } } e.textContent = t; } var ts = { animationIterationCount: !0, aspectRatio: !0, borderImageOutset: !0, borderImageSlice: !0, borderImageWidth: !0, boxFlex: !0, boxFlexGroup: !0, boxOrdinalGroup: !0, columnCount: !0, columns: !0, flex: !0, flexGrow: !0, flexPositive: !0, flexShrink: !0, flexNegative: !0, flexOrder: !0, gridArea: !0, gridRow: !0, gridRowEnd: !0, gridRowSpan: !0, gridRowStart: !0, gridColumn: !0, gridColumnEnd: !0, gridColumnSpan: !0, gridColumnStart: !0, fontWeight: !0, lineClamp: !0, lineHeight: !0, opacity: !0, order: !0, orphans: !0, tabSize: !0, widows: !0, zIndex: !0, zoom: !0, fillOpacity: !0, floodOpacity: !0, stopOpacity: !0, strokeDasharray: !0, strokeDashoffset: !0, strokeMiterlimit: !0, strokeOpacity: !0, strokeWidth: !0 }, HC = ["Webkit", "ms", "Moz", "O"]; Object.keys(ts).forEach(function(e) { HC.forEach(function(t) { t = t + e.charAt(0).toUpperCase() + e.substring(1), ts[t] = ts[e]; }); }); function hk(e, t, n) { return t == null || typeof t == "boolean" || t === "" ? "" : n || typeof t != "number" || t === 0 || ts.hasOwnProperty(e) && ts[e] ? ("" + t).trim() : t + "px"; } function pk(e, t) { e = e.style; for (var n in t) if (t.hasOwnProperty(n)) { var r = n.indexOf("--") === 0, i = hk(n, t[n], r); n === "float" && (n = "cssFloat"), r ? e.setProperty(n, i) : e[n] = i; } } var GC = ce({ menuitem: !0 }, { area: !0, base: !0, br: !0, col: !0, embed: !0, hr: !0, img: !0, input: !0, keygen: !0, link: !0, meta: !0, param: !0, source: !0, track: !0, wbr: !0 }); function Pc(e, t) { if (t) { if (GC[e] && (t.children != null || t.dangerouslySetInnerHTML != null)) throw Error(x(137, e)); if (t.dangerouslySetInnerHTML != null) { if (t.children != null) throw Error(x(60)); if (typeof t.dangerouslySetInnerHTML != "object" || !("__html" in t.dangerouslySetInnerHTML)) throw Error(x(61)); } if (t.style != null && typeof t.style != "object") throw Error(x(62)); } } function Lc(e, t) { if (e.indexOf("-") === -1) return typeof t.is == "string"; switch (e) { case "annotation-xml": case "color-profile": case "font-face": case "font-face-src": case "font-face-uri": case "font-face-format": case "font-face-name": case "missing-glyph": return !1; default: return !0; } } var Fc = null; function lf(e) { return e = e.target || e.srcElement || window, e.correspondingUseElement && (e = e.correspondingUseElement), e.nodeType === 3 ? e.parentNode : e; } var Dc = null, ti = null, ni = null; function Rp(e) { if (e = eo(e)) { if (typeof Dc != "function") throw Error(x(280)); var t = e.stateNode; t && (t = Cl(t), Dc(e.stateNode, e.type, t)); } } function mk(e) { ti ? ni ? ni.push(e) : ni = [e] : ti = e; } function gk() { if (ti) { var e = ti, t = ni; if (ni = ti = null, Rp(e), t) for (e = 0; e < t.length; e++) Rp(t[e]); } } function vk(e, t) { return e(t); } function yk() { } var pu = !1; function kk(e, t, n) { if (pu) return e(t, n); pu = !0; try { return vk(e, t, n); } finally { pu = !1, (ti !== null || ni !== null) && (yk(), gk()); } } function Ns(e, t) { var n = e.stateNode; if (n === null) return null; var r = Cl(n); if (r === null) return null; n = r[t]; e: switch (t) { case "onClick": case "onClickCapture": case "onDoubleClick": case "onDoubleClickCapture": case "onMouseDown": case "onMouseDownCapture": case "onMouseMove": case "onMouseMoveCapture": case "onMouseUp": case "onMouseUpCapture": case "onMouseEnter": (r = !r.disabled) || (e = e.type, r = !(e === "button" || e === "input" || e === "select" || e === "textarea")), e = !r; break e; default: e = !1; } if (e) return null; if (n && typeof n != "function") throw Error(x(231, t, typeof n)); return n; } var $c = !1; if (ln) try { var $i = {}; Object.defineProperty($i, "passive", { get: function() { $c = !0; } }), window.addEventListener("test", $i, $i), window.removeEventListener("test", $i, $i); } catch { $c = !1; } function WC(e, t, n, r, i, s, o, a, l) { var u = Array.prototype.slice.call(arguments, 3); try { t.apply(n, u); } catch (c) { this.onError(c); } } var ns = !1, Sa = null, _a = !1, Mc = null, qC = { onError: function(e) { ns = !0, Sa = e; } }; function QC(e, t, n, r, i, s, o, a, l) { ns = !1, Sa = null, WC.apply(qC, arguments); } function KC(e, t, n, r, i, s, o, a, l) { if (QC.apply(this, arguments), ns) { if (ns) { var u = Sa; ns = !1, Sa = null; } else throw Error(x(198)); _a || (_a = !0, Mc = u); } } function Or(e) { var t = e, n = e; if (e.alternate) for (; t.return; ) t = t.return; else { e = t; do t = e, t.flags & 4098 && (n = t.return), e = t.return; while (e); } return t.tag === 3 ? n : null; } function Sk(e) { if (e.tag === 13) { var t = e.memoizedState; if (t === null && (e = e.alternate, e !== null && (t = e.memoizedState)), t !== null) return t.dehydrated; } return null; } function Ip(e) { if (Or(e) !== e) throw Error(x(188)); } function JC(e) { var t = e.alternate; if (!t) { if (t = Or(e), t === null) throw Error(x(188)); return t !== e ? null : e; } for (var n = e, r = t; ; ) { var i = n.return; if (i === null) break; var s = i.alternate; if (s === null) { if (r = i.return, r !== null) { n = r; continue; } break; } if (i.child === s.child) { for (s = i.child; s; ) { if (s === n) return Ip(i), e; if (s === r) return Ip(i), t; s = s.sibling; } throw Error(x(188)); } if (n.return !== r.return) n = i, r = s; else { for (var o = !1, a = i.child; a; ) { if (a === n) { o = !0, n = i, r = s; break; } if (a === r) { o = !0, r = i, n = s; break; } a = a.sibling; } if (!o) { for (a = s.child; a; ) { if (a === n) { o = !0, n = s, r = i; break; } if (a === r) { o = !0, r = s, n = i; break; } a = a.sibling; } if (!o) throw Error(x(189)); } } if (n.alternate !== r) throw Error(x(190)); } if (n.tag !== 3) throw Error(x(188)); return n.stateNode.current === n ? e : t; } function _k(e) { return e = JC(e), e !== null ? Ek(e) : null; } function Ek(e) { if (e.tag === 5 || e.tag === 6) return e; for (e = e.child; e !== null; ) { var t = Ek(e); if (t !== null) return t; e = e.sibling; } return null; } var wk = at.unstable_scheduleCallback, Pp = at.unstable_cancelCallback, YC = at.unstable_shouldYield, XC = at.unstable_requestPaint, he = at.unstable_now, ZC = at.unstable_getCurrentPriorityLevel, uf = at.unstable_ImmediatePriority, Nk = at.unstable_UserBlockingPriority, Ea = at.unstable_NormalPriority, eO = at.unstable_LowPriority, Ak = at.unstable_IdlePriority, wl = null, Qt = null; function tO(e) { if (Qt && typeof Qt.onCommitFiberRoot == "function") try { Qt.onCommitFiberRoot(wl, e, void 0, (e.current.flags & 128) === 128); } catch { } } var It = Math.clz32 ? Math.clz32 : iO, nO = Math.log, rO = Math.LN2; function iO(e) { return e >>>= 0, e === 0 ? 32 : 31 - (nO(e) / rO | 0) | 0; } var mo = 64, go = 4194304; function Ki(e) { switch (e & -e) { case 1: return 1; case 2: return 2; case 4: return 4; case 8: return 8; case 16: return 16; case 32: return 32; case 64: case 128: case 256: case 512: case 1024: case 2048: case 4096: case 8192: case 16384: case 32768: case 65536: case 131072: case 262144: case 524288: case 1048576: case 2097152: return e & 4194240; case 4194304: case 8388608: case 16777216: case 33554432: case 67108864: return e & 130023424; case 134217728: return 134217728; case 268435456: return 268435456; case 536870912: return 536870912; case 1073741824: return 1073741824; default: return e; } } function wa(e, t) { var n = e.pendingLanes; if (n === 0) return 0; var r = 0, i = e.suspendedLanes, s = e.pingedLanes, o = n & 268435455; if (o !== 0) { var a = o & ~i; a !== 0 ? r = Ki(a) : (s &= o, s !== 0 && (r = Ki(s))); } else o = n & ~i, o !== 0 ? r = Ki(o) : s !== 0 && (r = Ki(s)); if (r === 0) return 0; if (t !== 0 && t !== r && !(t & i) && (i = r & -r, s = t & -t, i >= s || i === 16 && (s & 4194240) !== 0)) return t; if (r & 4 && (r |= n & 16), t = e.entangledLanes, t !== 0) for (e = e.entanglements, t &= r; 0 < t; ) n = 31 - It(t), i = 1 << n, r |= e[n], t &= ~i; return r; } function sO(e, t) { switch (e) { case 1: case 2: case 4: return t + 250; case 8: case 16: case 32: case 64: case 128: case 256: case 512: case 1024: case 2048: case 4096: case 8192: case 16384: case 32768: case 65536: case 131072: case 262144: case 524288: case 1048576: case 2097152: return t + 5e3; case 4194304: case 8388608: case 16777216: case 33554432: case 67108864: return -1; case 134217728: case 268435456: case 536870912: case 1073741824: return -1; default: return -1; } } function oO(e, t) { for (var n = e.suspendedLanes, r = e.pingedLanes, i = e.expirationTimes, s = e.pendingLanes; 0 < s; ) { var o = 31 - It(s), a = 1 << o, l = i[o]; l === -1 ? (!(a & n) || a & r) && (i[o] = sO(a, t)) : l <= t && (e.expiredLanes |= a), s &= ~a; } } function Uc(e) { return e = e.pendingLanes & -1073741825, e !== 0 ? e : e & 1073741824 ? 1073741824 : 0; } function bk() { var e = mo; return mo <<= 1, !(mo & 4194240) && (mo = 64), e; } function mu(e) { for (var t = [], n = 0; 31 > n; n++) t.push(e); return t; } function Xs(e, t, n) { e.pendingLanes |= t, t !== 536870912 && (e.suspendedLanes = 0, e.pingedLanes = 0), e = e.eventTimes, t = 31 - It(t), e[t] = n; } function aO(e, t) { var n = e.pendingLanes & ~t; e.pendingLanes = t, e.suspendedLanes = 0, e.pingedLanes = 0, e.expiredLanes &= t, e.mutableReadLanes &= t, e.entangledLanes &= t, t = e.entanglements; var r = e.eventTimes; for (e = e.expirationTimes; 0 < n; ) { var i = 31 - It(n), s = 1 << i; t[i] = 0, r[i] = -1, e[i] = -1, n &= ~s; } } function cf(e, t) { var n = e.entangledLanes |= t; for (e = e.entanglements; n; ) { var r = 31 - It(n), i = 1 << r; i & t | e[r] & t && (e[r] |= t), n &= ~i; } } var Z = 0; function Ck(e) { return e &= -e, 1 < e ? 4 < e ? e & 268435455 ? 16 : 536870912 : 4 : 1; } var Ok, df, Tk, xk, Rk, jc = !1, vo = [], Cn = null, On = null, Tn = null, As = /* @__PURE__ */ new Map(), bs = /* @__PURE__ */ new Map(), yn = [], lO = "mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" "); function Lp(e, t) { switch (e) { case "focusin": case "focusout": Cn = null; break; case "dragenter": case "dragleave": On = null; break; case "mouseover": case "mouseout": Tn = null; break; case "pointerover": case "pointerout": As.delete(t.pointerId); break; case "gotpointercapture": case "lostpointercapture": bs.delete(t.pointerId); } } function Mi(e, t, n, r, i, s) { return e === null || e.nativeEvent !== s ? (e = { blockedOn: t, domEventName: n, eventSystemFlags: r, nativeEvent: s, targetContainers: [i] }, t !== null && (t = eo(t), t !== null && df(t)), e) : (e.eventSystemFlags |= r, t = e.targetContainers, i !== null && t.indexOf(i) === -1 && t.push(i), e); } function uO(e, t, n, r, i) { switch (t) { case "focusin": return Cn = Mi(Cn, e, t, n, r, i), !0; case "dragenter": return On = Mi(On, e, t, n, r, i), !0; case "mouseover": return Tn = Mi(Tn, e, t, n, r, i), !0; case "pointerover": var s = i.pointerId; return As.set(s, Mi(As.get(s) || null, e, t, n, r, i)), !0; case "gotpointercapture": return s = i.pointerId, bs.set(s, Mi(bs.get(s) || null, e, t, n, r, i)), !0; } return !1; } function Ik(e) { var t = rr(e.target); if (t !== null) { var n = Or(t); if (n !== null) { if (t = n.tag, t === 13) { if (t = Sk(n), t !== null) { e.blockedOn = t, Rk(e.priority, function() { Tk(n); }); return; } } else if (t === 3 && n.stateNode.current.memoizedState.isDehydrated) { e.blockedOn = n.tag === 3 ? n.stateNode.containerInfo : null; return; } } } e.blockedOn = null; } function zo(e) { if (e.blockedOn !== null) return !1; for (var t = e.targetContainers; 0 < t.length; ) { var n = Vc(e.domEventName, e.eventSystemFlags, t[0], e.nativeEvent); if (n === null) { n = e.nativeEvent; var r = new n.constructor(n.type, n); Fc = r, n.target.dispatchEvent(r), Fc = null; } else return t = eo(n), t !== null && df(t), e.blockedOn = n, !1; t.shift(); } return !0; } function Fp(e, t, n) { zo(e) && n.delete(t); } function cO() { jc = !1, Cn !== null && zo(Cn) && (Cn = null), On !== null && zo(On) && (On = null), Tn !== null && zo(Tn) && (Tn = null), As.forEach(Fp), bs.forEach(Fp); } function Ui(e, t) { e.blockedOn === t && (e.blockedOn = null, jc || (jc = !0, at.unstable_scheduleCallback(at.unstable_NormalPriority, cO))); } function Cs(e) { function t(i) { return Ui(i, e); } if (0 < vo.length) { Ui(vo[0], e); for (var n = 1; n < vo.length; n++) { var r = vo[n]; r.blockedOn === e && (r.blockedOn = null); } } for (Cn !== null && Ui(Cn, e), On !== null && Ui(On, e), Tn !== null && Ui(Tn, e), As.forEach(t), bs.forEach(t), n = 0; n < yn.length; n++) r = yn[n], r.blockedOn === e && (r.blockedOn = null); for (; 0 < yn.length && (n = yn[0], n.blockedOn === null); ) Ik(n), n.blockedOn === null && yn.shift(); } var ri = hn.ReactCurrentBatchConfig, Na = !0; function dO(e, t, n, r) { var i = Z, s = ri.transition; ri.transition = null; try { Z = 1, ff(e, t, n, r); } finally { Z = i, ri.transition = s; } } function fO(e, t, n, r) { var i = Z, s = ri.transition; ri.transition = null; try { Z = 4, ff(e, t, n, r); } finally { Z = i, ri.transition = s; } } function ff(e, t, n, r) { if (Na) { var i = Vc(e, t, n, r); if (i === null) Au(e, t, r, Aa, n), Lp(e, r); else if (uO(i, e, t, n, r)) r.stopPropagation(); else if (Lp(e, r), t & 4 && -1 < lO.indexOf(e)) { for (; i !== null; ) { var s = eo(i); if (s !== null && Ok(s), s = Vc(e, t, n, r), s === null && Au(e, t, r, Aa, n), s === i) break; i = s; } i !== null && r.stopPropagation(); } else Au(e, t, r, null, n); } } var Aa = null; function Vc(e, t, n, r) { if (Aa = null, e = lf(r), e = rr(e), e !== null) if (t = Or(e), t === null) e = null; else if (n = t.tag, n === 13) { if (e = Sk(t), e !== null) return e; e = null; } else if (n === 3) { if (t.stateNode.current.memoizedState.isDehydrated) return t.tag === 3 ? t.stateNode.containerInfo : null; e = null; } else t !== e && (e = null); return Aa = e, null; } function Pk(e) { switch (e) { case "cancel": case "click": case "close": case "contextmenu": case "copy": case "cut": case "auxclick": case "dblclick": case "dragend": case "dragstart": case "drop": case "focusin": case "focusout": case "input": case "invalid": case "keydown": case "keypress": case "keyup": case "mousedown": case "mouseup": case "paste": case "pause": case "play": case "pointercancel": case "pointerdown": case "pointerup": case "ratechange": case "reset": case "resize": case "seeked": case "submit": case "touchcancel": case "touchend": case "touchstart": case "volumechange": case "change": case "selectionchange": case "textInput": case "compositionstart": case "compositionend": case "compositionupdate": case "beforeblur": case "afterblur": case "beforeinput": case "blur": case "fullscreenchange": case "focus": case "hashchange": case "popstate": case "select": case "selectstart": return 1; case "drag": case "dragenter": case "dragexit": case "dragleave": case "dragover": case "mousemove": case "mouseout": case "mouseover": case "pointermove": case "pointerout": case "pointerover": case "scroll": case "toggle": case "touchmove": case "wheel": case "mouseenter": case "mouseleave": case "pointerenter": case "pointerleave": return 4; case "message": switch (ZC()) { case uf: return 1; case Nk: return 4; case Ea: case eO: return 16; case Ak: return 536870912; default: return 16; } default: return 16; } } var wn = null, hf = null, Ho = null; function Lk() { if (Ho) return Ho; var e, t = hf, n = t.length, r, i = "value" in wn ? wn.value : wn.textContent, s = i.length; for (e = 0; e < n && t[e] === i[e]; e++) ; var o = n - e; for (r = 1; r <= o && t[n - r] === i[s - r]; r++) ; return Ho = i.slice(e, 1 < r ? 1 - r : void 0); } function Go(e) { var t = e.keyCode; return "charCode" in e ? (e = e.charCode, e === 0 && t === 13 && (e = 13)) : e = t, e === 10 && (e = 13), 32 <= e || e === 13 ? e : 0; } function yo() { return !0; } function Dp() { return !1; } function ct(e) { function t(n, r, i, s, o) { this._reactName = n, this._targetInst = i, this.type = r, this.nativeEvent = s, this.target = o, this.currentTarget = null; for (var a in e) e.hasOwnProperty(a) && (n = e[a], this[a] = n ? n(s) : s[a]); return this.isDefaultPrevented = (s.defaultPrevented != null ? s.defaultPrevented : s.returnValue === !1) ? yo : Dp, this.isPropagationStopped = Dp, this; } return ce(t.prototype, { preventDefault: function() { this.defaultPrevented = !0; var n = this.nativeEvent; n && (n.preventDefault ? n.preventDefault() : typeof n.returnValue != "unknown" && (n.returnValue = !1), this.isDefaultPrevented = yo); }, stopPropagation: function() { var n = this.nativeEvent; n && (n.stopPropagation ? n.stopPropagation() : typeof n.cancelBubble != "unknown" && (n.cancelBubble = !0), this.isPropagationStopped = yo); }, persist: function() { }, isPersistent: yo }), t; } var Oi = { eventPhase: 0, bubbles: 0, cancelable: 0, timeStamp: function(e) { return e.timeStamp || Date.now(); }, defaultPrevented: 0, isTrusted: 0 }, pf = ct(Oi), Zs = ce({}, Oi, { view: 0, detail: 0 }), hO = ct(Zs), gu, vu, ji, Nl = ce({}, Zs, { screenX: 0, screenY: 0, clientX: 0, clientY: 0, pageX: 0, pageY: 0, ctrlKey: 0, shiftKey: 0, altKey: 0, metaKey: 0, getModifierState: mf, button: 0, buttons: 0, relatedTarget: function(e) { return e.relatedTarget === void 0 ? e.fromElement === e.srcElement ? e.toElement : e.fromElement : e.relatedTarget; }, movementX: function(e) { return "movementX" in e ? e.movementX : (e !== ji && (ji && e.type === "mousemove" ? (gu = e.screenX - ji.screenX, vu = e.screenY - ji.screenY) : vu = gu = 0, ji = e), gu); }, movementY: function(e) { return "movementY" in e ? e.movementY : vu; } }), $p = ct(Nl), pO = ce({}, Nl, { dataTransfer: 0 }), mO = ct(pO), gO = ce({}, Zs, { relatedTarget: 0 }), yu = ct(gO), vO = ce({}, Oi, { animationName: 0, elapsedTime: 0, pseudoElement: 0 }), yO = ct(vO), kO = ce({}, Oi, { clipboardData: function(e) { return "clipboardData" in e ? e.clipboardData : window.clipboardData; } }), SO = ct(kO), _O = ce({}, Oi, { data: 0 }), Mp = ct(_O), EO = { Esc: "Escape", Spacebar: " ", Left: "ArrowLeft", Up: "ArrowUp", Right: "ArrowRight", Down: "ArrowDown", Del: "Delete", Win: "OS", Menu: "ContextMenu", Apps: "ContextMenu", Scroll: "ScrollLock", MozPrintableKey: "Unidentified" }, wO = { 8: "Backspace", 9: "Tab", 12: "Clear", 13: "Enter", 16: "Shift", 17: "Control", 18: "Alt", 19: "Pause", 20: "CapsLock", 27: "Escape", 32: " ", 33: "PageUp", 34: "PageDown", 35: "End", 36: "Home", 37: "ArrowLeft", 38: "ArrowUp", 39: "ArrowRight", 40: "ArrowDown", 45: "Insert", 46: "Delete", 112: "F1", 113: "F2", 114: "F3", 115: "F4", 116: "F5", 117: "F6", 118: "F7", 119: "F8", 120: "F9", 121: "F10", 122: "F11", 123: "F12", 144: "NumLock", 145: "ScrollLock", 224: "Meta" }, NO = { Alt: "altKey", Control: "ctrlKey", Meta: "metaKey", Shift: "shiftKey" }; function AO(e) { var t = this.nativeEvent; return t.getModifierState ? t.getModifierState(e) : (e = NO[e]) ? !!t[e] : !1; } function mf() { return AO; } var bO = ce({}, Zs, { key: function(e) { if (e.key) { var t = EO[e.key] || e.key; if (t !== "Unidentified") return t; } return e.type === "keypress" ? (e = Go(e), e === 13 ? "Enter" : String.fromCharCode(e)) : e.type === "keydown" || e.type === "keyup" ? wO[e.keyCode] || "Unidentified" : ""; }, code: 0, location: 0, ctrlKey: 0, shiftKey: 0, altKey: 0, metaKey: 0, repeat: 0, locale: 0, getModifierState: mf, charCode: function(e) { return e.type === "keypress" ? Go(e) : 0; }, keyCode: function(e) { return e.type === "keydown" || e.type === "keyup" ? e.keyCode : 0; }, which: function(e) { return e.type === "keypress" ? Go(e) : e.type === "keydown" || e.type === "keyup" ? e.keyCode : 0; } }), CO = ct(bO), OO = ce({}, Nl, { pointerId: 0, width: 0, height: 0, pressure: 0, tangentialPressure: 0, tiltX: 0, tiltY: 0, twist: 0, pointerType: 0, isPrimary: 0 }), Up = ct(OO), TO = ce({}, Zs, { touches: 0, targetTouches: 0, changedTouches: 0, altKey: 0, metaKey: 0, ctrlKey: 0, shiftKey: 0, getModifierState: mf }), xO = ct(TO), RO = ce({}, Oi, { propertyName: 0, elapsedTime: 0, pseudoElement: 0 }), IO = ct(RO), PO = ce({}, Nl, { deltaX: function(e) { return "deltaX" in e ? e.deltaX : "wheelDeltaX" in e ? -e.wheelDeltaX : 0; }, deltaY: function(e) { return "deltaY" in e ? e.deltaY : "wheelDeltaY" in e ? -e.wheelDeltaY : "wheelDelta" in e ? -e.wheelDelta : 0; }, deltaZ: 0, deltaMode: 0 }), LO = ct(PO), FO = [9, 13, 27, 32], gf = ln && "CompositionEvent" in window, rs = null; ln && "documentMode" in document && (rs = document.documentMode); var DO = ln && "TextEvent" in window && !rs, Fk = ln && (!gf || rs && 8 < rs && 11 >= rs), jp = " ", Vp = !1; function Dk(e, t) { switch (e) { case "keyup": return FO.indexOf(t.keyCode) !== -1; case "keydown": return t.keyCode !== 229; case "keypress": case "mousedown": case "focusout": return !0; default: return !1; } } function $k(e) { return e = e.detail, typeof e == "object" && "data" in e ? e.data : null; } var Hr = !1; function $O(e, t) { switch (e) { case "compositionend": return $k(t); case "keypress": return t.which !== 32 ? null : (Vp = !0, jp); case "textInput": return e = t.data, e === jp && Vp ? null : e; default: return null; } } function MO(e, t) { if (Hr) return e === "compositionend" || !gf && Dk(e, t) ? (e = Lk(), Ho = hf = wn = null, Hr = !1, e) : null; switch (e) { case "paste": return null; case "keypress": if (!(t.ctrlKey || t.altKey || t.metaKey) || t.ctrlKey && t.altKey) { if (t.char && 1 < t.char.length) return t.char; if (t.which) return String.fromCharCode(t.which); } return null; case "compositionend": return Fk && t.locale !== "ko" ? null : t.data; default: return null; } } var UO = { color: !0, date: !0, datetime: !0, "datetime-local": !0, email: !0, month: !0, number: !0, password: !0, range: !0, search: !0, tel: !0, text: !0, time: !0, url: !0, week: !0 }; function Bp(e) { var t = e && e.nodeName && e.nodeName.toLowerCase(); return t === "input" ? !!UO[e.type] : t === "textarea"; } function Mk(e, t, n, r) { mk(r), t = ba(t, "onChange"), 0 < t.length && (n = new pf("onChange", "change", null, n, r), e.push({ event: n, listeners: t })); } var is = null, Os = null; function jO(e) { Kk(e, 0); } function Al(e) { var t = qr(e); if (lk(t)) return e; } function VO(e, t) { if (e === "change") return t; } var Uk = !1; if (ln) { var ku; if (ln) { var Su = "oninput" in document; if (!Su) { var zp = document.createElement("div"); zp.setAttribute("oninput", "return;"), Su = typeof zp.oninput == "function"; } ku = Su; } else ku = !1; Uk = ku && (!document.documentMode || 9 < document.documentMode); } function Hp() { is && (is.detachEvent("onpropertychange", jk), Os = is = null); } function jk(e) { if (e.propertyName === "value" && Al(Os)) { var t = []; Mk(t, Os, e, lf(e)), kk(jO, t); } } function BO(e, t, n) { e === "focusin" ? (Hp(), is = t, Os = n, is.attachEvent("onpropertychange", jk)) : e === "focusout" && Hp(); } function zO(e) { if (e === "selectionchange" || e === "keyup" || e === "keydown") return Al(Os); } function HO(e, t) { if (e === "click") return Al(t); } function GO(e, t) { if (e === "input" || e === "change") return Al(t); } function WO(e, t) { return e === t && (e !== 0 || 1 / e === 1 / t) || e !== e && t !== t; } var Dt = typeof Object.is == "function" ? Object.is : WO; function Ts(e, t) { if (Dt(e, t)) return !0; if (typeof e != "object" || e === null || typeof t != "object" || t === null) return !1; var n = Object.keys(e), r = Object.keys(t); if (n.length !== r.length) return !1; for (r = 0; r < n.length; r++) { var i = n[r]; if (!wc.call(t, i) || !Dt(e[i], t[i])) return !1; } return !0; } function Gp(e) { for (; e && e.firstChild; ) e = e.firstChild; return e; } function Wp(e, t) { var n = Gp(e); e = 0; for (var r; n; ) { if (n.nodeType === 3) { if (r = e + n.textContent.length, e <= t && r >= t) return { node: n, offset: t - e }; e = r; } e: { for (; n; ) { if (n.nextSibling) { n = n.nextSibling; break e; } n = n.parentNode; } n = void 0; } n = Gp(n); } } function Vk(e, t) { return e && t ? e === t ? !0 : e && e.nodeType === 3 ? !1 : t && t.nodeType === 3 ? Vk(e, t.parentNode) : "contains" in e ? e.contains(t) : e.compareDocumentPosition ? !!(e.compareDocumentPosition(t) & 16) : !1 : !1; } function Bk() { for (var e = window, t = ka(); t instanceof e.HTMLIFrameElement; ) { try { var n = typeof t.contentWindow.location.href == "string"; } catch { n = !1; } if (n) e = t.contentWindow; else break; t = ka(e.document); } return t; } function vf(e) { var t = e && e.nodeName && e.nodeName.toLowerCase(); return t && (t === "input" && (e.type === "text" || e.type === "search" || e.type === "tel" || e.type === "url" || e.type === "password") || t === "textarea" || e.contentEditable === "true"); } function qO(e) { var t = Bk(), n = e.focusedElem, r = e.selectionRange; if (t !== n && n && n.ownerDocument && Vk(n.ownerDocument.documentElement, n)) { if (r !== null && vf(n)) { if (t = r.start, e = r.end, e === void 0 && (e = t), "selectionStart" in n) n.selectionStart = t, n.selectionEnd = Math.min(e, n.value.length); else if (e = (t = n.ownerDocument || document) && t.defaultView || window, e.getSelection) { e = e.getSelection(); var i = n.textContent.length, s = Math.min(r.start, i); r = r.end === void 0 ? s : Math.min(r.end, i), !e.extend && s > r && (i = r, r = s, s = i), i = Wp(n, s); var o = Wp( n, r ); i && o && (e.rangeCount !== 1 || e.anchorNode !== i.node || e.anchorOffset !== i.offset || e.focusNode !== o.node || e.focusOffset !== o.offset) && (t = t.createRange(), t.setStart(i.node, i.offset), e.removeAllRanges(), s > r ? (e.addRange(t), e.extend(o.node, o.offset)) : (t.setEnd(o.node, o.offset), e.addRange(t))); } } for (t = [], e = n; e = e.parentNode; ) e.nodeType === 1 && t.push({ element: e, left: e.scrollLeft, top: e.scrollTop }); for (typeof n.focus == "function" && n.focus(), n = 0; n < t.length; n++) e = t[n], e.element.scrollLeft = e.left, e.element.scrollTop = e.top; } } var QO = ln && "documentMode" in document && 11 >= document.documentMode, Gr = null, Bc = null, ss = null, zc = !1; function qp(e, t, n) { var r = n.window === n ? n.document : n.nodeType === 9 ? n : n.ownerDocument; zc || Gr == null || Gr !== ka(r) || (r = Gr, "selectionStart" in r && vf(r) ? r = { start: r.selectionStart, end: r.selectionEnd } : (r = (r.ownerDocument && r.ownerDocument.defaultView || window).getSelection(), r = { anchorNode: r.anchorNode, anchorOffset: r.anchorOffset, focusNode: r.focusNode, focusOffset: r.focusOffset }), ss && Ts(ss, r) || (ss = r, r = ba(Bc, "onSelect"), 0 < r.length && (t = new pf("onSelect", "select", null, t, n), e.push({ event: t, listeners: r }), t.target = Gr))); } function ko(e, t) { var n = {}; return n[e.toLowerCase()] = t.toLowerCase(), n["Webkit" + e] = "webkit" + t, n["Moz" + e] = "moz" + t, n; } var Wr = { animationend: ko("Animation", "AnimationEnd"), animationiteration: ko("Animation", "AnimationIteration"), animationstart: ko("Animation", "AnimationStart"), transitionend: ko("Transition", "TransitionEnd") }, _u = {}, zk = {}; ln && (zk = document.createElement("div").style, "AnimationEvent" in window || (delete Wr.animationend.animation, delete Wr.animationiteration.animation, delete Wr.animationstart.animation), "TransitionEvent" in window || delete Wr.transitionend.transition); function bl(e) { if (_u[e]) return _u[e]; if (!Wr[e]) return e; var t = Wr[e], n; for (n in t) if (t.hasOwnProperty(n) && n in zk) return _u[e] = t[n]; return e; } var Hk = bl("animationend"), Gk = bl("animationiteration"), Wk = bl("animationstart"), qk = bl("transitionend"), Qk = /* @__PURE__ */ new Map(), Qp = "abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" "); function Hn(e, t) { Qk.set(e, t), Cr(t, [e]); } for (var Eu = 0; Eu < Qp.length; Eu++) { var wu = Qp[Eu], KO = wu.toLowerCase(), JO = wu[0].toUpperCase() + wu.slice(1); Hn(KO, "on" + JO); } Hn(Hk, "onAnimationEnd"); Hn(Gk, "onAnimationIteration"); Hn(Wk, "onAnimationStart"); Hn("dblclick", "onDoubleClick"); Hn("focusin", "onFocus"); Hn("focusout", "onBlur"); Hn(qk, "onTransitionEnd"); ui("onMouseEnter", ["mouseout", "mouseover"]); ui("onMouseLeave", ["mouseout", "mouseover"]); ui("onPointerEnter", ["pointerout", "pointerover"]); ui("onPointerLeave", ["pointerout", "pointerover"]); Cr("onChange", "change click focusin focusout input keydown keyup selectionchange".split(" ")); Cr("onSelect", "focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")); Cr("onBeforeInput", ["compositionend", "keypress", "textInput", "paste"]); Cr("onCompositionEnd", "compositionend focusout keydown keypress keyup mousedown".split(" ")); Cr("onCompositionStart", "compositionstart focusout keydown keypress keyup mousedown".split(" ")); Cr("onCompositionUpdate", "compositionupdate focusout keydown keypress keyup mousedown".split(" ")); var Ji = "abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "), YO = new Set("cancel close invalid load scroll toggle".split(" ").concat(Ji)); function Kp(e, t, n) { var r = e.type || "unknown-event"; e.currentTarget = n, KC(r, t, void 0, e), e.currentTarget = null; } function Kk(e, t) { t = (t & 4) !== 0; for (var n = 0; n < e.length; n++) { var r = e[n], i = r.event; r = r.listeners; e: { var s = void 0; if (t) for (var o = r.length - 1; 0 <= o; o--) { var a = r[o], l = a.instance, u = a.currentTarget; if (a = a.listener, l !== s && i.isPropagationStopped()) break e; Kp(i, a, u), s = l; } else for (o = 0; o < r.length; o++) { if (a = r[o], l = a.instance, u = a.currentTarget, a = a.listener, l !== s && i.isPropagationStopped()) break e; Kp(i, a, u), s = l; } } } if (_a) throw e = Mc, _a = !1, Mc = null, e; } function ne(e, t) { var n = t[Qc]; n === void 0 && (n = t[Qc] = /* @__PURE__ */ new Set()); var r = e + "__bubble"; n.has(r) || (Jk(t, e, 2, !1), n.add(r)); } function Nu(e, t, n) { var r = 0; t && (r |= 4), Jk(n, e, r, t); } var So = "_reactListening" + Math.random().toString(36).slice(2); function xs(e) { if (!e[So]) { e[So] = !0, rk.forEach(function(n) { n !== "selectionchange" && (YO.has(n) || Nu(n, !1, e), Nu(n, !0, e)); }); var t = e.nodeType === 9 ? e : e.ownerDocument; t === null || t[So] || (t[So] = !0, Nu("selectionchange", !1, t)); } } function Jk(e, t, n, r) { switch (Pk(t)) { case 1: var i = dO; break; case 4: i = fO; break; default: i = ff; } n = i.bind(null, t, n, e), i = void 0, !$c || t !== "touchstart" && t !== "touchmove" && t !== "wheel" || (i = !0), r ? i !== void 0 ? e.addEventListener(t, n, { capture: !0, passive: i }) : e.addEventListener(t, n, !0) : i !== void 0 ? e.addEventListener(t, n, { passive: i }) : e.addEventListener(t, n, !1); } function Au(e, t, n, r, i) { var s = r; if (!(t & 1) && !(t & 2) && r !== null) e: for (; ; ) { if (r === null) return; var o = r.tag; if (o === 3 || o === 4) { var a = r.stateNode.containerInfo; if (a === i || a.nodeType === 8 && a.parentNode === i) break; if (o === 4) for (o = r.return; o !== null; ) { var l = o.tag; if ((l === 3 || l === 4) && (l = o.stateNode.containerInfo, l === i || l.nodeType === 8 && l.parentNode === i)) return; o = o.return; } for (; a !== null; ) { if (o = rr(a), o === null) return; if (l = o.tag, l === 5 || l === 6) { r = s = o; continue e; } a = a.parentNode; } } r = r.return; } kk(function() { var u = s, c = lf(n), d = []; e: { var f = Qk.get(e); if (f !== void 0) { var y = pf, g = e; switch (e) { case "keypress": if (Go(n) === 0) break e; case "keydown": case "keyup": y = CO; break; case "focusin": g = "focus", y = yu; break; case "focusout": g = "blur", y = yu; break; case "beforeblur": case "afterblur": y = yu; break; case "click": if (n.button === 2) break e; case "auxclick": case "dblclick": case "mousedown": case "mousemove": case "mouseup": case "mouseout": case "mouseover": case "contextmenu": y = $p; break; case "drag": case "dragend": case "dragenter": case "dragexit": case "dragleave": case "dragover": case "dragstart": case "drop": y = mO; break; case "touchcancel": case "touchend": case "touchmove": case "touchstart": y = xO; break; case Hk: case Gk: case Wk: y = yO; break; case qk: y = IO; break; case "scroll": y = hO; break; case "wheel": y = LO; break; case "copy": case "cut": case "paste": y = SO; break; case "gotpointercapture": case "lostpointercapture": case "pointercancel": case "pointerdown": case "pointermove": case "pointerout": case "pointerover": case "pointerup": y = Up; } var m = (t & 4) !== 0, k = !m && e === "scroll", h = m ? f !== null ? f + "Capture" : null : f; m = []; for (var p = u, v; p !== null; ) { v = p; var S = v.stateNode; if (v.tag === 5 && S !== null && (v = S, h !== null && (S = Ns(p, h), S != null && m.push(Rs(p, S, v)))), k) break; p = p.return; } 0 < m.length && (f = new y(f, g, null, n, c), d.push({ event: f, listeners: m })); } } if (!(t & 7)) { e: { if (f = e === "mouseover" || e === "pointerover", y = e === "mouseout" || e === "pointerout", f && n !== Fc && (g = n.relatedTarget || n.fromElement) && (rr(g) || g[un])) break e; if ((y || f) && (f = c.window === c ? c : (f = c.ownerDocument) ? f.defaultView || f.parentWindow : window, y ? (g = n.relatedTarget || n.toElement, y = u, g = g ? rr(g) : null, g !== null && (k = Or(g), g !== k || g.tag !== 5 && g.tag !== 6) && (g = null)) : (y = null, g = u), y !== g)) { if (m = $p, S = "onMouseLeave", h = "onMouseEnter", p = "mouse", (e === "pointerout" || e === "pointerover") && (m = Up, S = "onPointerLeave", h = "onPointerEnter", p = "pointer"), k = y == null ? f : qr(y), v = g == null ? f : qr(g), f = new m(S, p + "leave", y, n, c), f.target = k, f.relatedTarget = v, S = null, rr(c) === u && (m = new m(h, p + "enter", g, n, c), m.target = v, m.relatedTarget = k, S = m), k = S, y && g) t: { for (m = y, h = g, p = 0, v = m; v; v = Lr(v)) p++; for (v = 0, S = h; S; S = Lr(S)) v++; for (; 0 < p - v; ) m = Lr(m), p--; for (; 0 < v - p; ) h = Lr(h), v--; for (; p--; ) { if (m === h || h !== null && m === h.alternate) break t; m = Lr(m), h = Lr(h); } m = null; } else m = null; y !== null && Jp(d, f, y, m, !1), g !== null && k !== null && Jp(d, k, g, m, !0); } } e: { if (f = u ? qr(u) : window, y = f.nodeName && f.nodeName.toLowerCase(), y === "select" || y === "input" && f.type === "file") var _ = VO; else if (Bp(f)) if (Uk) _ = GO; else { _ = zO; var w = BO; } else (y = f.nodeName) && y.toLowerCase() === "input" && (f.type === "checkbox" || f.type === "radio") && (_ = HO); if (_ && (_ = _(e, u))) { Mk(d, _, n, c); break e; } w && w(e, f, u), e === "focusout" && (w = f._wrapperState) && w.controlled && f.type === "number" && xc(f, "number", f.value); } switch (w = u ? qr(u) : window, e) { case "focusin": (Bp(w) || w.contentEditable === "true") && (Gr = w, Bc = u, ss = null); break; case "focusout": ss = Bc = Gr = null; break; case "mousedown": zc = !0; break; case "contextmenu": case "mouseup": case "dragend": zc = !1, qp(d, n, c); break; case "selectionchange": if (QO) break; case "keydown": case "keyup": qp(d, n, c); } var A; if (gf) e: { switch (e) { case "compositionstart": var b = "onCompositionStart"; break e; case "compositionend": b = "onCompositionEnd"; break e; case "compositionupdate": b = "onCompositionUpdate"; break e; } b = void 0; } else Hr ? Dk(e, n) && (b = "onCompositionEnd") : e === "keydown" && n.keyCode === 229 && (b = "onCompositionStart"); b && (Fk && n.locale !== "ko" && (Hr || b !== "onCompositionStart" ? b === "onCompositionEnd" && Hr && (A = Lk()) : (wn = c, hf = "value" in wn ? wn.value : wn.textContent, Hr = !0)), w = ba(u, b), 0 < w.length && (b = new Mp(b, e, null, n, c), d.push({ event: b, listeners: w }), A ? b.data = A : (A = $k(n), A !== null && (b.data = A)))), (A = DO ? $O(e, n) : MO(e, n)) && (u = ba(u, "onBeforeInput"), 0 < u.length && (c = new Mp("onBeforeInput", "beforeinput", null, n, c), d.push({ event: c, listeners: u }), c.data = A)); } Kk(d, t); }); } function Rs(e, t, n) { return { instance: e, listener: t, currentTarget: n }; } function ba(e, t) { for (var n = t + "Capture", r = []; e !== null; ) { var i = e, s = i.stateNode; i.tag === 5 && s !== null && (i = s, s = Ns(e, n), s != null && r.unshift(Rs(e, s, i)), s = Ns(e, t), s != null && r.push(Rs(e, s, i))), e = e.return; } return r; } function Lr(e) { if (e === null) return null; do e = e.return; while (e && e.tag !== 5); return e || null; } function Jp(e, t, n, r, i) { for (var s = t._reactName, o = []; n !== null && n !== r; ) { var a = n, l = a.alternate, u = a.stateNode; if (l !== null && l === r) break; a.tag === 5 && u !== null && (a = u, i ? (l = Ns(n, s), l != null && o.unshift(Rs(n, l, a))) : i || (l = Ns(n, s), l != null && o.push(Rs(n, l, a)))), n = n.return; } o.length !== 0 && e.push({ event: t, listeners: o }); } var XO = /\r\n?/g, ZO = /\u0000|\uFFFD/g; function Yp(e) { return (typeof e == "string" ? e : "" + e).replace(XO, ` `).replace(ZO, ""); } function _o(e, t, n) { if (t = Yp(t), Yp(e) !== t && n) throw Error(x(425)); } function Ca() { } var Hc = null, Gc = null; function Wc(e, t) { return e === "textarea" || e === "noscript" || typeof t.children == "string" || typeof t.children == "number" || typeof t.dangerouslySetInnerHTML == "object" && t.dangerouslySetInnerHTML !== null && t.dangerouslySetInnerHTML.__html != null; } var qc = typeof setTimeout == "function" ? setTimeout : void 0, eT = typeof clearTimeout == "function" ? clearTimeout : void 0, Xp = typeof Promise == "function" ? Promise : void 0, tT = typeof queueMicrotask == "function" ? queueMicrotask : typeof Xp < "u" ? function(e) { return Xp.resolve(null).then(e).catch(nT); } : qc; function nT(e) { setTimeout(function() { throw e; }); } function bu(e, t) { var n = t, r = 0; do { var i = n.nextSibling; if (e.removeChild(n), i && i.nodeType === 8) if (n = i.data, n === "/$") { if (r === 0) { e.removeChild(i), Cs(t); return; } r--; } else n !== "$" && n !== "$?" && n !== "$!" || r++; n = i; } while (n); Cs(t); } function xn(e) { for (; e != null; e = e.nextSibling) { var t = e.nodeType; if (t === 1 || t === 3) break; if (t === 8) { if (t = e.data, t === "$" || t === "$!" || t === "$?") break; if (t === "/$") return null; } } return e; } function Zp(e) { e = e.previousSibling; for (var t = 0; e; ) { if (e.nodeType === 8) { var n = e.data; if (n === "$" || n === "$!" || n === "$?") { if (t === 0) return e; t--; } else n === "/$" && t++; } e = e.previousSibling; } return null; } var Ti = Math.random().toString(36).slice(2), Vt = "__reactFiber$" + Ti, Is = "__reactProps$" + Ti, un = "__reactContainer$" + Ti, Qc = "__reactEvents$" + Ti, rT = "__reactListeners$" + Ti, iT = "__reactHandles$" + Ti; function rr(e) { var t = e[Vt]; if (t) return t; for (var n = e.parentNode; n; ) { if (t = n[un] || n[Vt]) { if (n = t.alternate, t.child !== null || n !== null && n.child !== null) for (e = Zp(e); e !== null; ) { if (n = e[Vt]) return n; e = Zp(e); } return t; } e = n, n = e.parentNode; } return null; } function eo(e) { return e = e[Vt] || e[un], !e || e.tag !== 5 && e.tag !== 6 && e.tag !== 13 && e.tag !== 3 ? null : e; } function qr(e) { if (e.tag === 5 || e.tag === 6) return e.stateNode; throw Error(x(33)); } function Cl(e) { return e[Is] || null; } var Kc = [], Qr = -1; function Gn(e) { return { current: e }; } function ie(e) { 0 > Qr || (e.current = Kc[Qr], Kc[Qr] = null, Qr--); } function ee(e, t) { Qr++, Kc[Qr] = e.current, e.current = t; } var Vn = {}, Pe = Gn(Vn), We = Gn(!1), gr = Vn; function ci(e, t) { var n = e.type.contextTypes; if (!n) return Vn; var r = e.stateNode; if (r && r.__reactInternalMemoizedUnmaskedChildContext === t) return r.__reactInternalMemoizedMaskedChildContext; var i = {}, s; for (s in n) i[s] = t[s]; return r && (e = e.stateNode, e.__reactInternalMemoizedUnmaskedChildContext = t, e.__reactInternalMemoizedMaskedChildContext = i), i; } function qe(e) { return e = e.childContextTypes, e != null; } function Oa() { ie(We), ie(Pe); } function em(e, t, n) { if (Pe.current !== Vn) throw Error(x(168)); ee(Pe, t), ee(We, n); } function Yk(e, t, n) { var r = e.stateNode; if (t = t.childContextTypes, typeof r.getChildContext != "function") return n; r = r.getChildContext(); for (var i in r) if (!(i in t)) throw Error(x(108, BC(e) || "Unknown", i)); return ce({}, n, r); } function Ta(e) { return e = (e = e.stateNode) && e.__reactInternalMemoizedMergedChildContext || Vn, gr = Pe.current, ee(Pe, e), ee(We, We.current), !0; } function tm(e, t, n) { var r = e.stateNode; if (!r) throw Error(x(169)); n ? (e = Yk(e, t, gr), r.__reactInternalMemoizedMergedChildContext = e, ie(We), ie(Pe), ee(Pe, e)) : ie(We), ee(We, n); } var Yt = null, Ol = !1, Cu = !1; function Xk(e) { Yt === null ? Yt = [e] : Yt.push(e); } function sT(e) { Ol = !0, Xk(e); } function Wn() { if (!Cu && Yt !== null) { Cu = !0; var e = 0, t = Z; try { var n = Yt; for (Z = 1; e < n.length; e++) { var r = n[e]; do r = r(!0); while (r !== null); } Yt = null, Ol = !1; } catch (i) { throw Yt !== null && (Yt = Yt.slice(e + 1)), wk(uf, Wn), i; } finally { Z = t, Cu = !1; } } return null; } var Kr = [], Jr = 0, xa = null, Ra = 0, ft = [], ht = 0, vr = null, tn = 1, nn = ""; function Xn(e, t) { Kr[Jr++] = Ra, Kr[Jr++] = xa, xa = e, Ra = t; } function Zk(e, t, n) { ft[ht++] = tn, ft[ht++] = nn, ft[ht++] = vr, vr = e; var r = tn; e = nn; var i = 32 - It(r) - 1; r &= ~(1 << i), n += 1; var s = 32 - It(t) + i; if (30 < s) { var o = i - i % 5; s = (r & (1 << o) - 1).toString(32), r >>= o, i -= o, tn = 1 << 32 - It(t) + i | n << i | r, nn = s + e; } else tn = 1 << s | n << i | r, nn = e; } function yf(e) { e.return !== null && (Xn(e, 1), Zk(e, 1, 0)); } function kf(e) { for (; e === xa; ) xa = Kr[--Jr], Kr[Jr] = null, Ra = Kr[--Jr], Kr[Jr] = null; for (; e === vr; ) vr = ft[--ht], ft[ht] = null, nn = ft[--ht], ft[ht] = null, tn = ft[--ht], ft[ht] = null; } var ot = null, it = null, se = !1, Tt = null; function e0(e, t) { var n = yt(5, null, null, 0); n.elementType = "DELETED", n.stateNode = t, n.return = e, t = e.deletions, t === null ? (e.deletions = [n], e.flags |= 16) : t.push(n); } function nm(e, t) { switch (e.tag) { case 5: var n = e.type; return t = t.nodeType !== 1 || n.toLowerCase() !== t.nodeName.toLowerCase() ? null : t, t !== null ? (e.stateNode = t, ot = e, it = xn(t.firstChild), !0) : !1; case 6: return t = e.pendingProps === "" || t.nodeType !== 3 ? null : t, t !== null ? (e.stateNode = t, ot = e, it = null, !0) : !1; case 13: return t = t.nodeType !== 8 ? null : t, t !== null ? (n = vr !== null ? { id: tn, overflow: nn } : null, e.memoizedState = { dehydrated: t, treeContext: n, retryLane: 1073741824 }, n = yt(18, null, null, 0), n.stateNode = t, n.return = e, e.child = n, ot = e, it = null, !0) : !1; default: return !1; } } function Jc(e) { return (e.mode & 1) !== 0 && (e.flags & 128) === 0; } function Yc(e) { if (se) { var t = it; if (t) { var n = t; if (!nm(e, t)) { if (Jc(e)) throw Error(x(418)); t = xn(n.nextSibling); var r = ot; t && nm(e, t) ? e0(r, n) : (e.flags = e.flags & -4097 | 2, se = !1, ot = e); } } else { if (Jc(e)) throw Error(x(418)); e.flags = e.flags & -4097 | 2, se = !1, ot = e; } } } function rm(e) { for (e = e.return; e !== null && e.tag !== 5 && e.tag !== 3 && e.tag !== 13; ) e = e.return; ot = e; } function Eo(e) { if (e !== ot) return !1; if (!se) return rm(e), se = !0, !1; var t; if ((t = e.tag !== 3) && !(t = e.tag !== 5) && (t = e.type, t = t !== "head" && t !== "body" && !Wc(e.type, e.memoizedProps)), t && (t = it)) { if (Jc(e)) throw t0(), Error(x(418)); for (; t; ) e0(e, t), t = xn(t.nextSibling); } if (rm(e), e.tag === 13) { if (e = e.memoizedState, e = e !== null ? e.dehydrated : null, !e) throw Error(x(317)); e: { for (e = e.nextSibling, t = 0; e; ) { if (e.nodeType === 8) { var n = e.data; if (n === "/$") { if (t === 0) { it = xn(e.nextSibling); break e; } t--; } else n !== "$" && n !== "$!" && n !== "$?" || t++; } e = e.nextSibling; } it = null; } } else it = ot ? xn(e.stateNode.nextSibling) : null; return !0; } function t0() { for (var e = it; e; ) e = xn(e.nextSibling); } function di() { it = ot = null, se = !1; } function Sf(e) { Tt === null ? Tt = [e] : Tt.push(e); } var oT = hn.ReactCurrentBatchConfig; function Vi(e, t, n) { if (e = n.ref, e !== null && typeof e != "function" && typeof e != "object") { if (n._owner) { if (n = n._owner, n) { if (n.tag !== 1) throw Error(x(309)); var r = n.stateNode; } if (!r) throw Error(x(147, e)); var i = r, s = "" + e; return t !== null && t.ref !== null && typeof t.ref == "function" && t.ref._stringRef === s ? t.ref : (t = function(o) { var a = i.refs; o === null ? delete a[s] : a[s] = o; }, t._stringRef = s, t); } if (typeof e != "string") throw Error(x(284)); if (!n._owner) throw Error(x(290, e)); } return e; } function wo(e, t) { throw e = Object.prototype.toString.call(t), Error(x(31, e === "[object Object]" ? "object with keys {" + Object.keys(t).join(", ") + "}" : e)); } function im(e) { var t = e._init; return t(e._payload); } function n0(e) { function t(h, p) { if (e) { var v = h.deletions; v === null ? (h.deletions = [p], h.flags |= 16) : v.push(p); } } function n(h, p) { if (!e) return null; for (; p !== null; ) t(h, p), p = p.sibling; return null; } function r(h, p) { for (h = /* @__PURE__ */ new Map(); p !== null; ) p.key !== null ? h.set(p.key, p) : h.set(p.index, p), p = p.sibling; return h; } function i(h, p) { return h = Ln(h, p), h.index = 0, h.sibling = null, h; } function s(h, p, v) { return h.index = v, e ? (v = h.alternate, v !== null ? (v = v.index, v < p ? (h.flags |= 2, p) : v) : (h.flags |= 2, p)) : (h.flags |= 1048576, p); } function o(h) { return e && h.alternate === null && (h.flags |= 2), h; } function a(h, p, v, S) { return p === null || p.tag !== 6 ? (p = Lu(v, h.mode, S), p.return = h, p) : (p = i(p, v), p.return = h, p); } function l(h, p, v, S) { var _ = v.type; return _ === zr ? c(h, p, v.props.children, S, v.key) : p !== null && (p.elementType === _ || typeof _ == "object" && _ !== null && _.$$typeof === gn && im(_) === p.type) ? (S = i(p, v.props), S.ref = Vi(h, p, v), S.return = h, S) : (S = Xo(v.type, v.key, v.props, null, h.mode, S), S.ref = Vi(h, p, v), S.return = h, S); } function u(h, p, v, S) { return p === null || p.tag !== 4 || p.stateNode.containerInfo !== v.containerInfo || p.stateNode.implementation !== v.implementation ? (p = Fu(v, h.mode, S), p.return = h, p) : (p = i(p, v.children || []), p.return = h, p); } function c(h, p, v, S, _) { return p === null || p.tag !== 7 ? (p = dr(v, h.mode, S, _), p.return = h, p) : (p = i(p, v), p.return = h, p); } function d(h, p, v) { if (typeof p == "string" && p !== "" || typeof p == "number") return p = Lu("" + p, h.mode, v), p.return = h, p; if (typeof p == "object" && p !== null) { switch (p.$$typeof) { case fo: return v = Xo(p.type, p.key, p.props, null, h.mode, v), v.ref = Vi(h, null, p), v.return = h, v; case Br: return p = Fu(p, h.mode, v), p.return = h, p; case gn: var S = p._init; return d(h, S(p._payload), v); } if (Qi(p) || Di(p)) return p = dr(p, h.mode, v, null), p.return = h, p; wo(h, p); } return null; } function f(h, p, v, S) { var _ = p !== null ? p.key : null; if (typeof v == "string" && v !== "" || typeof v == "number") return _ !== null ? null : a(h, p, "" + v, S); if (typeof v == "object" && v !== null) { switch (v.$$typeof) { case fo: return v.key === _ ? l(h, p, v, S) : null; case Br: return v.key === _ ? u(h, p, v, S) : null; case gn: return _ = v._init, f( h, p, _(v._payload), S ); } if (Qi(v) || Di(v)) return _ !== null ? null : c(h, p, v, S, null); wo(h, v); } return null; } function y(h, p, v, S, _) { if (typeof S == "string" && S !== "" || typeof S == "number") return h = h.get(v) || null, a(p, h, "" + S, _); if (typeof S == "object" && S !== null) { switch (S.$$typeof) { case fo: return h = h.get(S.key === null ? v : S.key) || null, l(p, h, S, _); case Br: return h = h.get(S.key === null ? v : S.key) || null, u(p, h, S, _); case gn: var w = S._init; return y(h, p, v, w(S._payload), _); } if (Qi(S) || Di(S)) return h = h.get(v) || null, c(p, h, S, _, null); wo(p, S); } return null; } function g(h, p, v, S) { for (var _ = null, w = null, A = p, b = p = 0, I = null; A !== null && b < v.length; b++) { A.index > b ? (I = A, A = null) : I = A.sibling; var F = f(h, A, v[b], S); if (F === null) { A === null && (A = I); break; } e && A && F.alternate === null && t(h, A), p = s(F, p, b), w === null ? _ = F : w.sibling = F, w = F, A = I; } if (b === v.length) return n(h, A), se && Xn(h, b), _; if (A === null) { for (; b < v.length; b++) A = d(h, v[b], S), A !== null && (p = s(A, p, b), w === null ? _ = A : w.sibling = A, w = A); return se && Xn(h, b), _; } for (A = r(h, A); b < v.length; b++) I = y(A, h, b, v[b], S), I !== null && (e && I.alternate !== null && A.delete(I.key === null ? b : I.key), p = s(I, p, b), w === null ? _ = I : w.sibling = I, w = I); return e && A.forEach(function(P) { return t(h, P); }), se && Xn(h, b), _; } function m(h, p, v, S) { var _ = Di(v); if (typeof _ != "function") throw Error(x(150)); if (v = _.call(v), v == null) throw Error(x(151)); for (var w = _ = null, A = p, b = p = 0, I = null, F = v.next(); A !== null && !F.done; b++, F = v.next()) { A.index > b ? (I = A, A = null) : I = A.sibling; var P = f(h, A, F.value, S); if (P === null) { A === null && (A = I); break; } e && A && P.alternate === null && t(h, A), p = s(P, p, b), w === null ? _ = P : w.sibling = P, w = P, A = I; } if (F.done) return n( h, A ), se && Xn(h, b), _; if (A === null) { for (; !F.done; b++, F = v.next()) F = d(h, F.value, S), F !== null && (p = s(F, p, b), w === null ? _ = F : w.sibling = F, w = F); return se && Xn(h, b), _; } for (A = r(h, A); !F.done; b++, F = v.next()) F = y(A, h, b, F.value, S), F !== null && (e && F.alternate !== null && A.delete(F.key === null ? b : F.key), p = s(F, p, b), w === null ? _ = F : w.sibling = F, w = F); return e && A.forEach(function(W) { return t(h, W); }), se && Xn(h, b), _; } function k(h, p, v, S) { if (typeof v == "object" && v !== null && v.type === zr && v.key === null && (v = v.props.children), typeof v == "object" && v !== null) { switch (v.$$typeof) { case fo: e: { for (var _ = v.key, w = p; w !== null; ) { if (w.key === _) { if (_ = v.type, _ === zr) { if (w.tag === 7) { n(h, w.sibling), p = i(w, v.props.children), p.return = h, h = p; break e; } } else if (w.elementType === _ || typeof _ == "object" && _ !== null && _.$$typeof === gn && im(_) === w.type) { n(h, w.sibling), p = i(w, v.props), p.ref = Vi(h, w, v), p.return = h, h = p; break e; } n(h, w); break; } else t(h, w); w = w.sibling; } v.type === zr ? (p = dr(v.props.children, h.mode, S, v.key), p.return = h, h = p) : (S = Xo(v.type, v.key, v.props, null, h.mode, S), S.ref = Vi(h, p, v), S.return = h, h = S); } return o(h); case Br: e: { for (w = v.key; p !== null; ) { if (p.key === w) if (p.tag === 4 && p.stateNode.containerInfo === v.containerInfo && p.stateNode.implementation === v.implementation) { n(h, p.sibling), p = i(p, v.children || []), p.return = h, h = p; break e; } else { n(h, p); break; } else t(h, p); p = p.sibling; } p = Fu(v, h.mode, S), p.return = h, h = p; } return o(h); case gn: return w = v._init, k(h, p, w(v._payload), S); } if (Qi(v)) return g(h, p, v, S); if (Di(v)) return m(h, p, v, S); wo(h, v); } return typeof v == "string" && v !== "" || typeof v == "number" ? (v = "" + v, p !== null && p.tag === 6 ? (n(h, p.sibling), p = i(p, v), p.return = h, h = p) : (n(h, p), p = Lu(v, h.mode, S), p.return = h, h = p), o(h)) : n(h, p); } return k; } var fi = n0(!0), r0 = n0(!1), Ia = Gn(null), Pa = null, Yr = null, _f = null; function Ef() { _f = Yr = Pa = null; } function wf(e) { var t = Ia.current; ie(Ia), e._currentValue = t; } function Xc(e, t, n) { for (; e !== null; ) { var r = e.alternate; if ((e.childLanes & t) !== t ? (e.childLanes |= t, r !== null && (r.childLanes |= t)) : r !== null && (r.childLanes & t) !== t && (r.childLanes |= t), e === n) break; e = e.return; } } function ii(e, t) { Pa = e, _f = Yr = null, e = e.dependencies, e !== null && e.firstContext !== null && (e.lanes & t && (Be = !0), e.firstContext = null); } function _t(e) { var t = e._currentValue; if (_f !== e) if (e = { context: e, memoizedValue: t, next: null }, Yr === null) { if (Pa === null) throw Error(x(308)); Yr = e, Pa.dependencies = { lanes: 0, firstContext: e }; } else Yr = Yr.next = e; return t; } var ir = null; function Nf(e) { ir === null ? ir = [e] : ir.push(e); } function i0(e, t, n, r) { var i = t.interleaved; return i === null ? (n.next = n, Nf(t)) : (n.next = i.next, i.next = n), t.interleaved = n, cn(e, r); } function cn(e, t) { e.lanes |= t; var n = e.alternate; for (n !== null && (n.lanes |= t), n = e, e = e.return; e !== null; ) e.childLanes |= t, n = e.alternate, n !== null && (n.childLanes |= t), n = e, e = e.return; return n.tag === 3 ? n.stateNode : null; } var vn = !1; function Af(e) { e.updateQueue = { baseState: e.memoizedState, firstBaseUpdate: null, lastBaseUpdate: null, shared: { pending: null, interleaved: null, lanes: 0 }, effects: null }; } function s0(e, t) { e = e.updateQueue, t.updateQueue === e && (t.updateQueue = { baseState: e.baseState, firstBaseUpdate: e.firstBaseUpdate, lastBaseUpdate: e.lastBaseUpdate, shared: e.shared, effects: e.effects }); } function on(e, t) { return { eventTime: e, lane: t, tag: 0, payload: null, callback: null, next: null }; } function Rn(e, t, n) { var r = e.updateQueue; if (r === null) return null; if (r = r.shared, K & 2) { var i = r.pending; return i === null ? t.next = t : (t.next = i.next, i.next = t), r.pending = t, cn(e, n); } return i = r.interleaved, i === null ? (t.next = t, Nf(r)) : (t.next = i.next, i.next = t), r.interleaved = t, cn(e, n); } function Wo(e, t, n) { if (t = t.updateQueue, t !== null && (t = t.shared, (n & 4194240) !== 0)) { var r = t.lanes; r &= e.pendingLanes, n |= r, t.lanes = n, cf(e, n); } } function sm(e, t) { var n = e.updateQueue, r = e.alternate; if (r !== null && (r = r.updateQueue, n === r)) { var i = null, s = null; if (n = n.firstBaseUpdate, n !== null) { do { var o = { eventTime: n.eventTime, lane: n.lane, tag: n.tag, payload: n.payload, callback: n.callback, next: null }; s === null ? i = s = o : s = s.next = o, n = n.next; } while (n !== null); s === null ? i = s = t : s = s.next = t; } else i = s = t; n = { baseState: r.baseState, firstBaseUpdate: i, lastBaseUpdate: s, shared: r.shared, effects: r.effects }, e.updateQueue = n; return; } e = n.lastBaseUpdate, e === null ? n.firstBaseUpdate = t : e.next = t, n.lastBaseUpdate = t; } function La(e, t, n, r) { var i = e.updateQueue; vn = !1; var s = i.firstBaseUpdate, o = i.lastBaseUpdate, a = i.shared.pending; if (a !== null) { i.shared.pending = null; var l = a, u = l.next; l.next = null, o === null ? s = u : o.next = u, o = l; var c = e.alternate; c !== null && (c = c.updateQueue, a = c.lastBaseUpdate, a !== o && (a === null ? c.firstBaseUpdate = u : a.next = u, c.lastBaseUpdate = l)); } if (s !== null) { var d = i.baseState; o = 0, c = u = l = null, a = s; do { var f = a.lane, y = a.eventTime; if ((r & f) === f) { c !== null && (c = c.next = { eventTime: y, lane: 0, tag: a.tag, payload: a.payload, callback: a.callback, next: null }); e: { var g = e, m = a; switch (f = t, y = n, m.tag) { case 1: if (g = m.payload, typeof g == "function") { d = g.call(y, d, f); break e; } d = g; break e; case 3: g.flags = g.flags & -65537 | 128; case 0: if (g = m.payload, f = typeof g == "function" ? g.call(y, d, f) : g, f == null) break e; d = ce({}, d, f); break e; case 2: vn = !0; } } a.callback !== null && a.lane !== 0 && (e.flags |= 64, f = i.effects, f === null ? i.effects = [a] : f.push(a)); } else y = { eventTime: y, lane: f, tag: a.tag, payload: a.payload, callback: a.callback, next: null }, c === null ? (u = c = y, l = d) : c = c.next = y, o |= f; if (a = a.next, a === null) { if (a = i.shared.pending, a === null) break; f = a, a = f.next, f.next = null, i.lastBaseUpdate = f, i.shared.pending = null; } } while (!0); if (c === null && (l = d), i.baseState = l, i.firstBaseUpdate = u, i.lastBaseUpdate = c, t = i.shared.interleaved, t !== null) { i = t; do o |= i.lane, i = i.next; while (i !== t); } else s === null && (i.shared.lanes = 0); kr |= o, e.lanes = o, e.memoizedState = d; } } function om(e, t, n) { if (e = t.effects, t.effects = null, e !== null) for (t = 0; t < e.length; t++) { var r = e[t], i = r.callback; if (i !== null) { if (r.callback = null, r = n, typeof i != "function") throw Error(x(191, i)); i.call(r); } } } var to = {}, Kt = Gn(to), Ps = Gn(to), Ls = Gn(to); function sr(e) { if (e === to) throw Error(x(174)); return e; } function bf(e, t) { switch (ee(Ls, t), ee(Ps, e), ee(Kt, to), e = t.nodeType, e) { case 9: case 11: t = (t = t.documentElement) ? t.namespaceURI : Ic(null, ""); break; default: e = e === 8 ? t.parentNode : t, t = e.namespaceURI || null, e = e.tagName, t = Ic(t, e); } ie(Kt), ee(Kt, t); } function hi() { ie(Kt), ie(Ps), ie(Ls); } function o0(e) { sr(Ls.current); var t = sr(Kt.current), n = Ic(t, e.type); t !== n && (ee(Ps, e), ee(Kt, n)); } function Cf(e) { Ps.current === e && (ie(Kt), ie(Ps)); } var ae = Gn(0); function Fa(e) { for (var t = e; t !== null; ) { if (t.tag === 13) { var n = t.memoizedState; if (n !== null && (n = n.dehydrated, n === null || n.data === "$?" || n.data === "$!")) return t; } else if (t.tag === 19 && t.memoizedProps.revealOrder !== void 0) { if (t.flags & 128) return t; } else if (t.child !== null) { t.child.return = t, t = t.child; continue; } if (t === e) break; for (; t.sibling === null; ) { if (t.return === null || t.return === e) return null; t = t.return; } t.sibling.return = t.return, t = t.sibling; } return null; } var Ou = []; function Of() { for (var e = 0; e < Ou.length; e++) Ou[e]._workInProgressVersionPrimary = null; Ou.length = 0; } var qo = hn.ReactCurrentDispatcher, Tu = hn.ReactCurrentBatchConfig, yr = 0, ue = null, ke = null, _e = null, Da = !1, os = !1, Fs = 0, aT = 0; function Te() { throw Error(x(321)); } function Tf(e, t) { if (t === null) return !1; for (var n = 0; n < t.length && n < e.length; n++) if (!Dt(e[n], t[n])) return !1; return !0; } function xf(e, t, n, r, i, s) { if (yr = s, ue = t, t.memoizedState = null, t.updateQueue = null, t.lanes = 0, qo.current = e === null || e.memoizedState === null ? dT : fT, e = n(r, i), os) { s = 0; do { if (os = !1, Fs = 0, 25 <= s) throw Error(x(301)); s += 1, _e = ke = null, t.updateQueue = null, qo.current = hT, e = n(r, i); } while (os); } if (qo.current = $a, t = ke !== null && ke.next !== null, yr = 0, _e = ke = ue = null, Da = !1, t) throw Error(x(300)); return e; } function Rf() { var e = Fs !== 0; return Fs = 0, e; } function jt() { var e = { memoizedState: null, baseState: null, baseQueue: null, queue: null, next: null }; return _e === null ? ue.memoizedState = _e = e : _e = _e.next = e, _e; } function Et() { if (ke === null) { var e = ue.alternate; e = e !== null ? e.memoizedState : null; } else e = ke.next; var t = _e === null ? ue.memoizedState : _e.next; if (t !== null) _e = t, ke = e; else { if (e === null) throw Error(x(310)); ke = e, e = { memoizedState: ke.memoizedState, baseState: ke.baseState, baseQueue: ke.baseQueue, queue: ke.queue, next: null }, _e === null ? ue.memoizedState = _e = e : _e = _e.next = e; } return _e; } function Ds(e, t) { return typeof t == "function" ? t(e) : t; } function xu(e) { var t = Et(), n = t.queue; if (n === null) throw Error(x(311)); n.lastRenderedReducer = e; var r = ke, i = r.baseQueue, s = n.pending; if (s !== null) { if (i !== null) { var o = i.next; i.next = s.next, s.next = o; } r.baseQueue = i = s, n.pending = null; } if (i !== null) { s = i.next, r = r.baseState; var a = o = null, l = null, u = s; do { var c = u.lane; if ((yr & c) === c) l !== null && (l = l.next = { lane: 0, action: u.action, hasEagerState: u.hasEagerState, eagerState: u.eagerState, next: null }), r = u.hasEagerState ? u.eagerState : e(r, u.action); else { var d = { lane: c, action: u.action, hasEagerState: u.hasEagerState, eagerState: u.eagerState, next: null }; l === null ? (a = l = d, o = r) : l = l.next = d, ue.lanes |= c, kr |= c; } u = u.next; } while (u !== null && u !== s); l === null ? o = r : l.next = a, Dt(r, t.memoizedState) || (Be = !0), t.memoizedState = r, t.baseState = o, t.baseQueue = l, n.lastRenderedState = r; } if (e = n.interleaved, e !== null) { i = e; do s = i.lane, ue.lanes |= s, kr |= s, i = i.next; while (i !== e); } else i === null && (n.lanes = 0); return [t.memoizedState, n.dispatch]; } function Ru(e) { var t = Et(), n = t.queue; if (n === null) throw Error(x(311)); n.lastRenderedReducer = e; var r = n.dispatch, i = n.pending, s = t.memoizedState; if (i !== null) { n.pending = null; var o = i = i.next; do s = e(s, o.action), o = o.next; while (o !== i); Dt(s, t.memoizedState) || (Be = !0), t.memoizedState = s, t.baseQueue === null && (t.baseState = s), n.lastRenderedState = s; } return [s, r]; } function a0() { } function l0(e, t) { var n = ue, r = Et(), i = t(), s = !Dt(r.memoizedState, i); if (s && (r.memoizedState = i, Be = !0), r = r.queue, If(d0.bind(null, n, r, e), [e]), r.getSnapshot !== t || s || _e !== null && _e.memoizedState.tag & 1) { if (n.flags |= 2048, $s(9, c0.bind(null, n, r, i, t), void 0, null), we === null) throw Error(x(349)); yr & 30 || u0(n, t, i); } return i; } function u0(e, t, n) { e.flags |= 16384, e = { getSnapshot: t, value: n }, t = ue.updateQueue, t === null ? (t = { lastEffect: null, stores: null }, ue.updateQueue = t, t.stores = [e]) : (n = t.stores, n === null ? t.stores = [e] : n.push(e)); } function c0(e, t, n, r) { t.value = n, t.getSnapshot = r, f0(t) && h0(e); } function d0(e, t, n) { return n(function() { f0(t) && h0(e); }); } function f0(e) { var t = e.getSnapshot; e = e.value; try { var n = t(); return !Dt(e, n); } catch { return !0; } } function h0(e) { var t = cn(e, 1); t !== null && Pt(t, e, 1, -1); } function am(e) { var t = jt(); return typeof e == "function" && (e = e()), t.memoizedState = t.baseState = e, e = { pending: null, interleaved: null, lanes: 0, dispatch: null, lastRenderedReducer: Ds, lastRenderedState: e }, t.queue = e, e = e.dispatch = cT.bind(null, ue, e), [t.memoizedState, e]; } function $s(e, t, n, r) { return e = { tag: e, create: t, destroy: n, deps: r, next: null }, t = ue.updateQueue, t === null ? (t = { lastEffect: null, stores: null }, ue.updateQueue = t, t.lastEffect = e.next = e) : (n = t.lastEffect, n === null ? t.lastEffect = e.next = e : (r = n.next, n.next = e, e.next = r, t.lastEffect = e)), e; } function p0() { return Et().memoizedState; } function Qo(e, t, n, r) { var i = jt(); ue.flags |= e, i.memoizedState = $s(1 | t, n, void 0, r === void 0 ? null : r); } function Tl(e, t, n, r) { var i = Et(); r = r === void 0 ? null : r; var s = void 0; if (ke !== null) { var o = ke.memoizedState; if (s = o.destroy, r !== null && Tf(r, o.deps)) { i.memoizedState = $s(t, n, s, r); return; } } ue.flags |= e, i.memoizedState = $s(1 | t, n, s, r); } function lm(e, t) { return Qo(8390656, 8, e, t); } function If(e, t) { return Tl(2048, 8, e, t); } function m0(e, t) { return Tl(4, 2, e, t); } function g0(e, t) { return Tl(4, 4, e, t); } function v0(e, t) { if (typeof t == "function") return e = e(), t(e), function() { t(null); }; if (t != null) return e = e(), t.current = e, function() { t.current = null; }; } function y0(e, t, n) { return n = n != null ? n.concat([e]) : null, Tl(4, 4, v0.bind(null, t, e), n); } function Pf() { } function k0(e, t) { var n = Et(); t = t === void 0 ? null : t; var r = n.memoizedState; return r !== null && t !== null && Tf(t, r[1]) ? r[0] : (n.memoizedState = [e, t], e); } function S0(e, t) { var n = Et(); t = t === void 0 ? null : t; var r = n.memoizedState; return r !== null && t !== null && Tf(t, r[1]) ? r[0] : (e = e(), n.memoizedState = [e, t], e); } function _0(e, t, n) { return yr & 21 ? (Dt(n, t) || (n = bk(), ue.lanes |= n, kr |= n, e.baseState = !0), t) : (e.baseState && (e.baseState = !1, Be = !0), e.memoizedState = n); } function lT(e, t) { var n = Z; Z = n !== 0 && 4 > n ? n : 4, e(!0); var r = Tu.transition; Tu.transition = {}; try { e(!1), t(); } finally { Z = n, Tu.transition = r; } } function E0() { return Et().memoizedState; } function uT(e, t, n) { var r = Pn(e); if (n = { lane: r, action: n, hasEagerState: !1, eagerState: null, next: null }, w0(e)) N0(t, n); else if (n = i0(e, t, n, r), n !== null) { var i = De(); Pt(n, e, r, i), A0(n, t, r); } } function cT(e, t, n) { var r = Pn(e), i = { lane: r, action: n, hasEagerState: !1, eagerState: null, next: null }; if (w0(e)) N0(t, i); else { var s = e.alternate; if (e.lanes === 0 && (s === null || s.lanes === 0) && (s = t.lastRenderedReducer, s !== null)) try { var o = t.lastRenderedState, a = s(o, n); if (i.hasEagerState = !0, i.eagerState = a, Dt(a, o)) { var l = t.interleaved; l === null ? (i.next = i, Nf(t)) : (i.next = l.next, l.next = i), t.interleaved = i; return; } } catch { } finally { } n = i0(e, t, i, r), n !== null && (i = De(), Pt(n, e, r, i), A0(n, t, r)); } } function w0(e) { var t = e.alternate; return e === ue || t !== null && t === ue; } function N0(e, t) { os = Da = !0; var n = e.pending; n === null ? t.next = t : (t.next = n.next, n.next = t), e.pending = t; } function A0(e, t, n) { if (n & 4194240) { var r = t.lanes; r &= e.pendingLanes, n |= r, t.lanes = n, cf(e, n); } } var $a = { readContext: _t, useCallback: Te, useContext: Te, useEffect: Te, useImperativeHandle: Te, useInsertionEffect: Te, useLayoutEffect: Te, useMemo: Te, useReducer: Te, useRef: Te, useState: Te, useDebugValue: Te, useDeferredValue: Te, useTransition: Te, useMutableSource: Te, useSyncExternalStore: Te, useId: Te, unstable_isNewReconciler: !1 }, dT = { readContext: _t, useCallback: function(e, t) { return jt().memoizedState = [e, t === void 0 ? null : t], e; }, useContext: _t, useEffect: lm, useImperativeHandle: function(e, t, n) { return n = n != null ? n.concat([e]) : null, Qo( 4194308, 4, v0.bind(null, t, e), n ); }, useLayoutEffect: function(e, t) { return Qo(4194308, 4, e, t); }, useInsertionEffect: function(e, t) { return Qo(4, 2, e, t); }, useMemo: function(e, t) { var n = jt(); return t = t === void 0 ? null : t, e = e(), n.memoizedState = [e, t], e; }, useReducer: function(e, t, n) { var r = jt(); return t = n !== void 0 ? n(t) : t, r.memoizedState = r.baseState = t, e = { pending: null, interleaved: null, lanes: 0, dispatch: null, lastRenderedReducer: e, lastRenderedState: t }, r.queue = e, e = e.dispatch = uT.bind(null, ue, e), [r.memoizedState, e]; }, useRef: function(e) { var t = jt(); return e = { current: e }, t.memoizedState = e; }, useState: am, useDebugValue: Pf, useDeferredValue: function(e) { return jt().memoizedState = e; }, useTransition: function() { var e = am(!1), t = e[0]; return e = lT.bind(null, e[1]), jt().memoizedState = e, [t, e]; }, useMutableSource: function() { }, useSyncExternalStore: function(e, t, n) { var r = ue, i = jt(); if (se) { if (n === void 0) throw Error(x(407)); n = n(); } else { if (n = t(), we === null) throw Error(x(349)); yr & 30 || u0(r, t, n); } i.memoizedState = n; var s = { value: n, getSnapshot: t }; return i.queue = s, lm(d0.bind( null, r, s, e ), [e]), r.flags |= 2048, $s(9, c0.bind(null, r, s, n, t), void 0, null), n; }, useId: function() { var e = jt(), t = we.identifierPrefix; if (se) { var n = nn, r = tn; n = (r & ~(1 << 32 - It(r) - 1)).toString(32) + n, t = ":" + t + "R" + n, n = Fs++, 0 < n && (t += "H" + n.toString(32)), t += ":"; } else n = aT++, t = ":" + t + "r" + n.toString(32) + ":"; return e.memoizedState = t; }, unstable_isNewReconciler: !1 }, fT = { readContext: _t, useCallback: k0, useContext: _t, useEffect: If, useImperativeHandle: y0, useInsertionEffect: m0, useLayoutEffect: g0, useMemo: S0, useReducer: xu, useRef: p0, useState: function() { return xu(Ds); }, useDebugValue: Pf, useDeferredValue: function(e) { var t = Et(); return _0(t, ke.memoizedState, e); }, useTransition: function() { var e = xu(Ds)[0], t = Et().memoizedState; return [e, t]; }, useMutableSource: a0, useSyncExternalStore: l0, useId: E0, unstable_isNewReconciler: !1 }, hT = { readContext: _t, useCallback: k0, useContext: _t, useEffect: If, useImperativeHandle: y0, useInsertionEffect: m0, useLayoutEffect: g0, useMemo: S0, useReducer: Ru, useRef: p0, useState: function() { return Ru(Ds); }, useDebugValue: Pf, useDeferredValue: function(e) { var t = Et(); return ke === null ? t.memoizedState = e : _0(t, ke.memoizedState, e); }, useTransition: function() { var e = Ru(Ds)[0], t = Et().memoizedState; return [e, t]; }, useMutableSource: a0, useSyncExternalStore: l0, useId: E0, unstable_isNewReconciler: !1 }; function At(e, t) { if (e && e.defaultProps) { t = ce({}, t), e = e.defaultProps; for (var n in e) t[n] === void 0 && (t[n] = e[n]); return t; } return t; } function Zc(e, t, n, r) { t = e.memoizedState, n = n(r, t), n = n == null ? t : ce({}, t, n), e.memoizedState = n, e.lanes === 0 && (e.updateQueue.baseState = n); } var xl = { isMounted: function(e) { return (e = e._reactInternals) ? Or(e) === e : !1; }, enqueueSetState: function(e, t, n) { e = e._reactInternals; var r = De(), i = Pn(e), s = on(r, i); s.payload = t, n != null && (s.callback = n), t = Rn(e, s, i), t !== null && (Pt(t, e, i, r), Wo(t, e, i)); }, enqueueReplaceState: function(e, t, n) { e = e._reactInternals; var r = De(), i = Pn(e), s = on(r, i); s.tag = 1, s.payload = t, n != null && (s.callback = n), t = Rn(e, s, i), t !== null && (Pt(t, e, i, r), Wo(t, e, i)); }, enqueueForceUpdate: function(e, t) { e = e._reactInternals; var n = De(), r = Pn(e), i = on(n, r); i.tag = 2, t != null && (i.callback = t), t = Rn(e, i, r), t !== null && (Pt(t, e, r, n), Wo(t, e, r)); } }; function um(e, t, n, r, i, s, o) { return e = e.stateNode, typeof e.shouldComponentUpdate == "function" ? e.shouldComponentUpdate(r, s, o) : t.prototype && t.prototype.isPureReactComponent ? !Ts(n, r) || !Ts(i, s) : !0; } function b0(e, t, n) { var r = !1, i = Vn, s = t.contextType; return typeof s == "object" && s !== null ? s = _t(s) : (i = qe(t) ? gr : Pe.current, r = t.contextTypes, s = (r = r != null) ? ci(e, i) : Vn), t = new t(n, s), e.memoizedState = t.state !== null && t.state !== void 0 ? t.state : null, t.updater = xl, e.stateNode = t, t._reactInternals = e, r && (e = e.stateNode, e.__reactInternalMemoizedUnmaskedChildContext = i, e.__reactInternalMemoizedMaskedChildContext = s), t; } function cm(e, t, n, r) { e = t.state, typeof t.componentWillReceiveProps == "function" && t.componentWillReceiveProps(n, r), typeof t.UNSAFE_componentWillReceiveProps == "function" && t.UNSAFE_componentWillReceiveProps(n, r), t.state !== e && xl.enqueueReplaceState(t, t.state, null); } function ed(e, t, n, r) { var i = e.stateNode; i.props = n, i.state = e.memoizedState, i.refs = {}, Af(e); var s = t.contextType; typeof s == "object" && s !== null ? i.context = _t(s) : (s = qe(t) ? gr : Pe.current, i.context = ci(e, s)), i.state = e.memoizedState, s = t.getDerivedStateFromProps, typeof s == "function" && (Zc(e, t, s, n), i.state = e.memoizedState), typeof t.getDerivedStateFromProps == "function" || typeof i.getSnapshotBeforeUpdate == "function" || typeof i.UNSAFE_componentWillMount != "function" && typeof i.componentWillMount != "function" || (t = i.state, typeof i.componentWillMount == "function" && i.componentWillMount(), typeof i.UNSAFE_componentWillMount == "function" && i.UNSAFE_componentWillMount(), t !== i.state && xl.enqueueReplaceState(i, i.state, null), La(e, n, i, r), i.state = e.memoizedState), typeof i.componentDidMount == "function" && (e.flags |= 4194308); } function pi(e, t) { try { var n = "", r = t; do n += VC(r), r = r.return; while (r); var i = n; } catch (s) { i = ` Error generating stack: ` + s.message + ` ` + s.stack; } return { value: e, source: t, stack: i, digest: null }; } function Iu(e, t, n) { return { value: e, source: null, stack: n ?? null, digest: t ?? null }; } function td(e, t) { try { console.error(t.value); } catch (n) { setTimeout(function() { throw n; }); } } var pT = typeof WeakMap == "function" ? WeakMap : Map; function C0(e, t, n) { n = on(-1, n), n.tag = 3, n.payload = { element: null }; var r = t.value; return n.callback = function() { Ua || (Ua = !0, dd = r), td(e, t); }, n; } function O0(e, t, n) { n = on(-1, n), n.tag = 3; var r = e.type.getDerivedStateFromError; if (typeof r == "function") { var i = t.value; n.payload = function() { return r(i); }, n.callback = function() { td(e, t); }; } var s = e.stateNode; return s !== null && typeof s.componentDidCatch == "function" && (n.callback = function() { td(e, t), typeof r != "function" && (In === null ? In = /* @__PURE__ */ new Set([this]) : In.add(this)); var o = t.stack; this.componentDidCatch(t.value, { componentStack: o !== null ? o : "" }); }), n; } function dm(e, t, n) { var r = e.pingCache; if (r === null) { r = e.pingCache = new pT(); var i = /* @__PURE__ */ new Set(); r.set(t, i); } else i = r.get(t), i === void 0 && (i = /* @__PURE__ */ new Set(), r.set(t, i)); i.has(n) || (i.add(n), e = OT.bind(null, e, t, n), t.then(e, e)); } function fm(e) { do { var t; if ((t = e.tag === 13) && (t = e.memoizedState, t = t !== null ? t.dehydrated !== null : !0), t) return e; e = e.return; } while (e !== null); return null; } function hm(e, t, n, r, i) { return e.mode & 1 ? (e.flags |= 65536, e.lanes = i, e) : (e === t ? e.flags |= 65536 : (e.flags |= 128, n.flags |= 131072, n.flags &= -52805, n.tag === 1 && (n.alternate === null ? n.tag = 17 : (t = on(-1, 1), t.tag = 2, Rn(n, t, 1))), n.lanes |= 1), e); } var mT = hn.ReactCurrentOwner, Be = !1; function Fe(e, t, n, r) { t.child = e === null ? r0(t, null, n, r) : fi(t, e.child, n, r); } function pm(e, t, n, r, i) { n = n.render; var s = t.ref; return ii(t, i), r = xf(e, t, n, r, s, i), n = Rf(), e !== null && !Be ? (t.updateQueue = e.updateQueue, t.flags &= -2053, e.lanes &= ~i, dn(e, t, i)) : (se && n && yf(t), t.flags |= 1, Fe(e, t, r, i), t.child); } function mm(e, t, n, r, i) { if (e === null) { var s = n.type; return typeof s == "function" && !Vf(s) && s.defaultProps === void 0 && n.compare === null && n.defaultProps === void 0 ? (t.tag = 15, t.type = s, T0(e, t, s, r, i)) : (e = Xo(n.type, null, r, t, t.mode, i), e.ref = t.ref, e.return = t, t.child = e); } if (s = e.child, !(e.lanes & i)) { var o = s.memoizedProps; if (n = n.compare, n = n !== null ? n : Ts, n(o, r) && e.ref === t.ref) return dn(e, t, i); } return t.flags |= 1, e = Ln(s, r), e.ref = t.ref, e.return = t, t.child = e; } function T0(e, t, n, r, i) { if (e !== null) { var s = e.memoizedProps; if (Ts(s, r) && e.ref === t.ref) if (Be = !1, t.pendingProps = r = s, (e.lanes & i) !== 0) e.flags & 131072 && (Be = !0); else return t.lanes = e.lanes, dn(e, t, i); } return nd(e, t, n, r, i); } function x0(e, t, n) { var r = t.pendingProps, i = r.children, s = e !== null ? e.memoizedState : null; if (r.mode === "hidden") if (!(t.mode & 1)) t.memoizedState = { baseLanes: 0, cachePool: null, transitions: null }, ee(Zr, Ke), Ke |= n; else { if (!(n & 1073741824)) return e = s !== null ? s.baseLanes | n : n, t.lanes = t.childLanes = 1073741824, t.memoizedState = { baseLanes: e, cachePool: null, transitions: null }, t.updateQueue = null, ee(Zr, Ke), Ke |= e, null; t.memoizedState = { baseLanes: 0, cachePool: null, transitions: null }, r = s !== null ? s.baseLanes : n, ee(Zr, Ke), Ke |= r; } else s !== null ? (r = s.baseLanes | n, t.memoizedState = null) : r = n, ee(Zr, Ke), Ke |= r; return Fe(e, t, i, n), t.child; } function R0(e, t) { var n = t.ref; (e === null && n !== null || e !== null && e.ref !== n) && (t.flags |= 512, t.flags |= 2097152); } function nd(e, t, n, r, i) { var s = qe(n) ? gr : Pe.current; return s = ci(t, s), ii(t, i), n = xf(e, t, n, r, s, i), r = Rf(), e !== null && !Be ? (t.updateQueue = e.updateQueue, t.flags &= -2053, e.lanes &= ~i, dn(e, t, i)) : (se && r && yf(t), t.flags |= 1, Fe(e, t, n, i), t.child); } function gm(e, t, n, r, i) { if (qe(n)) { var s = !0; Ta(t); } else s = !1; if (ii(t, i), t.stateNode === null) Ko(e, t), b0(t, n, r), ed(t, n, r, i), r = !0; else if (e === null) { var o = t.stateNode, a = t.memoizedProps; o.props = a; var l = o.context, u = n.contextType; typeof u == "object" && u !== null ? u = _t(u) : (u = qe(n) ? gr : Pe.current, u = ci(t, u)); var c = n.getDerivedStateFromProps, d = typeof c == "function" || typeof o.getSnapshotBeforeUpdate == "function"; d || typeof o.UNSAFE_componentWillReceiveProps != "function" && typeof o.componentWillReceiveProps != "function" || (a !== r || l !== u) && cm(t, o, r, u), vn = !1; var f = t.memoizedState; o.state = f, La(t, r, o, i), l = t.memoizedState, a !== r || f !== l || We.current || vn ? (typeof c == "function" && (Zc(t, n, c, r), l = t.memoizedState), (a = vn || um(t, n, a, r, f, l, u)) ? (d || typeof o.UNSAFE_componentWillMount != "function" && typeof o.componentWillMount != "function" || (typeof o.componentWillMount == "function" && o.componentWillMount(), typeof o.UNSAFE_componentWillMount == "function" && o.UNSAFE_componentWillMount()), typeof o.componentDidMount == "function" && (t.flags |= 4194308)) : (typeof o.componentDidMount == "function" && (t.flags |= 4194308), t.memoizedProps = r, t.memoizedState = l), o.props = r, o.state = l, o.context = u, r = a) : (typeof o.componentDidMount == "function" && (t.flags |= 4194308), r = !1); } else { o = t.stateNode, s0(e, t), a = t.memoizedProps, u = t.type === t.elementType ? a : At(t.type, a), o.props = u, d = t.pendingProps, f = o.context, l = n.contextType, typeof l == "object" && l !== null ? l = _t(l) : (l = qe(n) ? gr : Pe.current, l = ci(t, l)); var y = n.getDerivedStateFromProps; (c = typeof y == "function" || typeof o.getSnapshotBeforeUpdate == "function") || typeof o.UNSAFE_componentWillReceiveProps != "function" && typeof o.componentWillReceiveProps != "function" || (a !== d || f !== l) && cm(t, o, r, l), vn = !1, f = t.memoizedState, o.state = f, La(t, r, o, i); var g = t.memoizedState; a !== d || f !== g || We.current || vn ? (typeof y == "function" && (Zc(t, n, y, r), g = t.memoizedState), (u = vn || um(t, n, u, r, f, g, l) || !1) ? (c || typeof o.UNSAFE_componentWillUpdate != "function" && typeof o.componentWillUpdate != "function" || (typeof o.componentWillUpdate == "function" && o.componentWillUpdate(r, g, l), typeof o.UNSAFE_componentWillUpdate == "function" && o.UNSAFE_componentWillUpdate(r, g, l)), typeof o.componentDidUpdate == "function" && (t.flags |= 4), typeof o.getSnapshotBeforeUpdate == "function" && (t.flags |= 1024)) : (typeof o.componentDidUpdate != "function" || a === e.memoizedProps && f === e.memoizedState || (t.flags |= 4), typeof o.getSnapshotBeforeUpdate != "function" || a === e.memoizedProps && f === e.memoizedState || (t.flags |= 1024), t.memoizedProps = r, t.memoizedState = g), o.props = r, o.state = g, o.context = l, r = u) : (typeof o.componentDidUpdate != "function" || a === e.memoizedProps && f === e.memoizedState || (t.flags |= 4), typeof o.getSnapshotBeforeUpdate != "function" || a === e.memoizedProps && f === e.memoizedState || (t.flags |= 1024), r = !1); } return rd(e, t, n, r, s, i); } function rd(e, t, n, r, i, s) { R0(e, t); var o = (t.flags & 128) !== 0; if (!r && !o) return i && tm(t, n, !1), dn(e, t, s); r = t.stateNode, mT.current = t; var a = o && typeof n.getDerivedStateFromError != "function" ? null : r.render(); return t.flags |= 1, e !== null && o ? (t.child = fi(t, e.child, null, s), t.child = fi(t, null, a, s)) : Fe(e, t, a, s), t.memoizedState = r.state, i && tm(t, n, !0), t.child; } function I0(e) { var t = e.stateNode; t.pendingContext ? em(e, t.pendingContext, t.pendingContext !== t.context) : t.context && em(e, t.context, !1), bf(e, t.containerInfo); } function vm(e, t, n, r, i) { return di(), Sf(i), t.flags |= 256, Fe(e, t, n, r), t.child; } var id = { dehydrated: null, treeContext: null, retryLane: 0 }; function sd(e) { return { baseLanes: e, cachePool: null, transitions: null }; } function P0(e, t, n) { var r = t.pendingProps, i = ae.current, s = !1, o = (t.flags & 128) !== 0, a; if ((a = o) || (a = e !== null && e.memoizedState === null ? !1 : (i & 2) !== 0), a ? (s = !0, t.flags &= -129) : (e === null || e.memoizedState !== null) && (i |= 1), ee(ae, i & 1), e === null) return Yc(t), e = t.memoizedState, e !== null && (e = e.dehydrated, e !== null) ? (t.mode & 1 ? e.data === "$!" ? t.lanes = 8 : t.lanes = 1073741824 : t.lanes = 1, null) : (o = r.children, e = r.fallback, s ? (r = t.mode, s = t.child, o = { mode: "hidden", children: o }, !(r & 1) && s !== null ? (s.childLanes = 0, s.pendingProps = o) : s = Pl(o, r, 0, null), e = dr(e, r, n, null), s.return = t, e.return = t, s.sibling = e, t.child = s, t.child.memoizedState = sd(n), t.memoizedState = id, e) : Lf(t, o)); if (i = e.memoizedState, i !== null && (a = i.dehydrated, a !== null)) return gT(e, t, o, r, a, i, n); if (s) { s = r.fallback, o = t.mode, i = e.child, a = i.sibling; var l = { mode: "hidden", children: r.children }; return !(o & 1) && t.child !== i ? (r = t.child, r.childLanes = 0, r.pendingProps = l, t.deletions = null) : (r = Ln(i, l), r.subtreeFlags = i.subtreeFlags & 14680064), a !== null ? s = Ln(a, s) : (s = dr(s, o, n, null), s.flags |= 2), s.return = t, r.return = t, r.sibling = s, t.child = r, r = s, s = t.child, o = e.child.memoizedState, o = o === null ? sd(n) : { baseLanes: o.baseLanes | n, cachePool: null, transitions: o.transitions }, s.memoizedState = o, s.childLanes = e.childLanes & ~n, t.memoizedState = id, r; } return s = e.child, e = s.sibling, r = Ln(s, { mode: "visible", children: r.children }), !(t.mode & 1) && (r.lanes = n), r.return = t, r.sibling = null, e !== null && (n = t.deletions, n === null ? (t.deletions = [e], t.flags |= 16) : n.push(e)), t.child = r, t.memoizedState = null, r; } function Lf(e, t) { return t = Pl({ mode: "visible", children: t }, e.mode, 0, null), t.return = e, e.child = t; } function No(e, t, n, r) { return r !== null && Sf(r), fi(t, e.child, null, n), e = Lf(t, t.pendingProps.children), e.flags |= 2, t.memoizedState = null, e; } function gT(e, t, n, r, i, s, o) { if (n) return t.flags & 256 ? (t.flags &= -257, r = Iu(Error(x(422))), No(e, t, o, r)) : t.memoizedState !== null ? (t.child = e.child, t.flags |= 128, null) : (s = r.fallback, i = t.mode, r = Pl({ mode: "visible", children: r.children }, i, 0, null), s = dr(s, i, o, null), s.flags |= 2, r.return = t, s.return = t, r.sibling = s, t.child = r, t.mode & 1 && fi(t, e.child, null, o), t.child.memoizedState = sd(o), t.memoizedState = id, s); if (!(t.mode & 1)) return No(e, t, o, null); if (i.data === "$!") { if (r = i.nextSibling && i.nextSibling.dataset, r) var a = r.dgst; return r = a, s = Error(x(419)), r = Iu(s, r, void 0), No(e, t, o, r); } if (a = (o & e.childLanes) !== 0, Be || a) { if (r = we, r !== null) { switch (o & -o) { case 4: i = 2; break; case 16: i = 8; break; case 64: case 128: case 256: case 512: case 1024: case 2048: case 4096: case 8192: case 16384: case 32768: case 65536: case 131072: case 262144: case 524288: case 1048576: case 2097152: case 4194304: case 8388608: case 16777216: case 33554432: case 67108864: i = 32; break; case 536870912: i = 268435456; break; default: i = 0; } i = i & (r.suspendedLanes | o) ? 0 : i, i !== 0 && i !== s.retryLane && (s.retryLane = i, cn(e, i), Pt(r, e, i, -1)); } return jf(), r = Iu(Error(x(421))), No(e, t, o, r); } return i.data === "$?" ? (t.flags |= 128, t.child = e.child, t = TT.bind(null, e), i._reactRetry = t, null) : (e = s.treeContext, it = xn(i.nextSibling), ot = t, se = !0, Tt = null, e !== null && (ft[ht++] = tn, ft[ht++] = nn, ft[ht++] = vr, tn = e.id, nn = e.overflow, vr = t), t = Lf(t, r.children), t.flags |= 4096, t); } function ym(e, t, n) { e.lanes |= t; var r = e.alternate; r !== null && (r.lanes |= t), Xc(e.return, t, n); } function Pu(e, t, n, r, i) { var s = e.memoizedState; s === null ? e.memoizedState = { isBackwards: t, rendering: null, renderingStartTime: 0, last: r, tail: n, tailMode: i } : (s.isBackwards = t, s.rendering = null, s.renderingStartTime = 0, s.last = r, s.tail = n, s.tailMode = i); } function L0(e, t, n) { var r = t.pendingProps, i = r.revealOrder, s = r.tail; if (Fe(e, t, r.children, n), r = ae.current, r & 2) r = r & 1 | 2, t.flags |= 128; else { if (e !== null && e.flags & 128) e: for (e = t.child; e !== null; ) { if (e.tag === 13) e.memoizedState !== null && ym(e, n, t); else if (e.tag === 19) ym(e, n, t); else if (e.child !== null) { e.child.return = e, e = e.child; continue; } if (e === t) break e; for (; e.sibling === null; ) { if (e.return === null || e.return === t) break e; e = e.return; } e.sibling.return = e.return, e = e.sibling; } r &= 1; } if (ee(ae, r), !(t.mode & 1)) t.memoizedState = null; else switch (i) { case "forwards": for (n = t.child, i = null; n !== null; ) e = n.alternate, e !== null && Fa(e) === null && (i = n), n = n.sibling; n = i, n === null ? (i = t.child, t.child = null) : (i = n.sibling, n.sibling = null), Pu(t, !1, i, n, s); break; case "backwards": for (n = null, i = t.child, t.child = null; i !== null; ) { if (e = i.alternate, e !== null && Fa(e) === null) { t.child = i; break; } e = i.sibling, i.sibling = n, n = i, i = e; } Pu(t, !0, n, null, s); break; case "together": Pu(t, !1, null, null, void 0); break; default: t.memoizedState = null; } return t.child; } function Ko(e, t) { !(t.mode & 1) && e !== null && (e.alternate = null, t.alternate = null, t.flags |= 2); } function dn(e, t, n) { if (e !== null && (t.dependencies = e.dependencies), kr |= t.lanes, !(n & t.childLanes)) return null; if (e !== null && t.child !== e.child) throw Error(x(153)); if (t.child !== null) { for (e = t.child, n = Ln(e, e.pendingProps), t.child = n, n.return = t; e.sibling !== null; ) e = e.sibling, n = n.sibling = Ln(e, e.pendingProps), n.return = t; n.sibling = null; } return t.child; } function vT(e, t, n) { switch (t.tag) { case 3: I0(t), di(); break; case 5: o0(t); break; case 1: qe(t.type) && Ta(t); break; case 4: bf(t, t.stateNode.containerInfo); break; case 10: var r = t.type._context, i = t.memoizedProps.value; ee(Ia, r._currentValue), r._currentValue = i; break; case 13: if (r = t.memoizedState, r !== null) return r.dehydrated !== null ? (ee(ae, ae.current & 1), t.flags |= 128, null) : n & t.child.childLanes ? P0(e, t, n) : (ee(ae, ae.current & 1), e = dn(e, t, n), e !== null ? e.sibling : null); ee(ae, ae.current & 1); break; case 19: if (r = (n & t.childLanes) !== 0, e.flags & 128) { if (r) return L0(e, t, n); t.flags |= 128; } if (i = t.memoizedState, i !== null && (i.rendering = null, i.tail = null, i.lastEffect = null), ee(ae, ae.current), r) break; return null; case 22: case 23: return t.lanes = 0, x0(e, t, n); } return dn(e, t, n); } var F0, od, D0, $0; F0 = function(e, t) { for (var n = t.child; n !== null; ) { if (n.tag === 5 || n.tag === 6) e.appendChild(n.stateNode); else if (n.tag !== 4 && n.child !== null) { n.child.return = n, n = n.child; continue; } if (n === t) break; for (; n.sibling === null; ) { if (n.return === null || n.return === t) return; n = n.return; } n.sibling.return = n.return, n = n.sibling; } }; od = function() { }; D0 = function(e, t, n, r) { var i = e.memoizedProps; if (i !== r) { e = t.stateNode, sr(Kt.current); var s = null; switch (n) { case "input": i = Oc(e, i), r = Oc(e, r), s = []; break; case "select": i = ce({}, i, { value: void 0 }), r = ce({}, r, { value: void 0 }), s = []; break; case "textarea": i = Rc(e, i), r = Rc(e, r), s = []; break; default: typeof i.onClick != "function" && typeof r.onClick == "function" && (e.onclick = Ca); } Pc(n, r); var o; n = null; for (u in i) if (!r.hasOwnProperty(u) && i.hasOwnProperty(u) && i[u] != null) if (u === "style") { var a = i[u]; for (o in a) a.hasOwnProperty(o) && (n || (n = {}), n[o] = ""); } else u !== "dangerouslySetInnerHTML" && u !== "children" && u !== "suppressContentEditableWarning" && u !== "suppressHydrationWarning" && u !== "autoFocus" && (Es.hasOwnProperty(u) ? s || (s = []) : (s = s || []).push(u, null)); for (u in r) { var l = r[u]; if (a = i != null ? i[u] : void 0, r.hasOwnProperty(u) && l !== a && (l != null || a != null)) if (u === "style") if (a) { for (o in a) !a.hasOwnProperty(o) || l && l.hasOwnProperty(o) || (n || (n = {}), n[o] = ""); for (o in l) l.hasOwnProperty(o) && a[o] !== l[o] && (n || (n = {}), n[o] = l[o]); } else n || (s || (s = []), s.push( u, n )), n = l; else u === "dangerouslySetInnerHTML" ? (l = l ? l.__html : void 0, a = a ? a.__html : void 0, l != null && a !== l && (s = s || []).push(u, l)) : u === "children" ? typeof l != "string" && typeof l != "number" || (s = s || []).push(u, "" + l) : u !== "suppressContentEditableWarning" && u !== "suppressHydrationWarning" && (Es.hasOwnProperty(u) ? (l != null && u === "onScroll" && ne("scroll", e), s || a === l || (s = [])) : (s = s || []).push(u, l)); } n && (s = s || []).push("style", n); var u = s; (t.updateQueue = u) && (t.flags |= 4); } }; $0 = function(e, t, n, r) { n !== r && (t.flags |= 4); }; function Bi(e, t) { if (!se) switch (e.tailMode) { case "hidden": t = e.tail; for (var n = null; t !== null; ) t.alternate !== null && (n = t), t = t.sibling; n === null ? e.tail = null : n.sibling = null; break; case "collapsed": n = e.tail; for (var r = null; n !== null; ) n.alternate !== null && (r = n), n = n.sibling; r === null ? t || e.tail === null ? e.tail = null : e.tail.sibling = null : r.sibling = null; } } function xe(e) { var t = e.alternate !== null && e.alternate.child === e.child, n = 0, r = 0; if (t) for (var i = e.child; i !== null; ) n |= i.lanes | i.childLanes, r |= i.subtreeFlags & 14680064, r |= i.flags & 14680064, i.return = e, i = i.sibling; else for (i = e.child; i !== null; ) n |= i.lanes | i.childLanes, r |= i.subtreeFlags, r |= i.flags, i.return = e, i = i.sibling; return e.subtreeFlags |= r, e.childLanes = n, t; } function yT(e, t, n) { var r = t.pendingProps; switch (kf(t), t.tag) { case 2: case 16: case 15: case 0: case 11: case 7: case 8: case 12: case 9: case 14: return xe(t), null; case 1: return qe(t.type) && Oa(), xe(t), null; case 3: return r = t.stateNode, hi(), ie(We), ie(Pe), Of(), r.pendingContext && (r.context = r.pendingContext, r.pendingContext = null), (e === null || e.child === null) && (Eo(t) ? t.flags |= 4 : e === null || e.memoizedState.isDehydrated && !(t.flags & 256) || (t.flags |= 1024, Tt !== null && (pd(Tt), Tt = null))), od(e, t), xe(t), null; case 5: Cf(t); var i = sr(Ls.current); if (n = t.type, e !== null && t.stateNode != null) D0(e, t, n, r, i), e.ref !== t.ref && (t.flags |= 512, t.flags |= 2097152); else { if (!r) { if (t.stateNode === null) throw Error(x(166)); return xe(t), null; } if (e = sr(Kt.current), Eo(t)) { r = t.stateNode, n = t.type; var s = t.memoizedProps; switch (r[Vt] = t, r[Is] = s, e = (t.mode & 1) !== 0, n) { case "dialog": ne("cancel", r), ne("close", r); break; case "iframe": case "object": case "embed": ne("load", r); break; case "video": case "audio": for (i = 0; i < Ji.length; i++) ne(Ji[i], r); break; case "source": ne("error", r); break; case "img": case "image": case "link": ne( "error", r ), ne("load", r); break; case "details": ne("toggle", r); break; case "input": Cp(r, s), ne("invalid", r); break; case "select": r._wrapperState = { wasMultiple: !!s.multiple }, ne("invalid", r); break; case "textarea": Tp(r, s), ne("invalid", r); } Pc(n, s), i = null; for (var o in s) if (s.hasOwnProperty(o)) { var a = s[o]; o === "children" ? typeof a == "string" ? r.textContent !== a && (s.suppressHydrationWarning !== !0 && _o(r.textContent, a, e), i = ["children", a]) : typeof a == "number" && r.textContent !== "" + a && (s.suppressHydrationWarning !== !0 && _o( r.textContent, a, e ), i = ["children", "" + a]) : Es.hasOwnProperty(o) && a != null && o === "onScroll" && ne("scroll", r); } switch (n) { case "input": ho(r), Op(r, s, !0); break; case "textarea": ho(r), xp(r); break; case "select": case "option": break; default: typeof s.onClick == "function" && (r.onclick = Ca); } r = i, t.updateQueue = r, r !== null && (t.flags |= 4); } else { o = i.nodeType === 9 ? i : i.ownerDocument, e === "http://www.w3.org/1999/xhtml" && (e = dk(n)), e === "http://www.w3.org/1999/xhtml" ? n === "script" ? (e = o.createElement("div"), e.innerHTML = "