diff --git a/aform/dist/aform.js b/aform/dist/aform.js index 19dad347..35fe0ee3 100644 --- a/aform/dist/aform.js +++ b/aform/dist/aform.js @@ -1,5 +1,5 @@ -import { defineComponent as w, computed as x, openBlock as m, createElementBlock as g, createElementVNode as u, withDirectives as k, isRef as P, vModelCheckbox as ve, unref as v, toDisplayString as A, vShow as S, resolveComponent as ye, createBlock as B, withCtx as ge, vModelText as H, onMounted as oe, onBeforeUnmount as he, ref as y, watch as q, getCurrentScope as _e, onScopeDispose as be, nextTick as ke, Fragment as O, renderList as $, withModifiers as we, normalizeClass as ae, pushScopeId as De, popScopeId as Ee, resolveDynamicComponent as xe, mergeProps as Ae, createTextVNode as Ce, createCommentVNode as Me, renderSlot as Te, createVNode as Ie, inject as Se, resolveDirective as Ve } from "vue"; -const Oe = { id: "checkbox-container" }, $e = ["id", "readonly", "required"], Le = { id: "custom-checkbox" }, Pe = ["for"], Be = ["innerHTML"], He = /* @__PURE__ */ w({ +import { defineComponent as D, computed as M, openBlock as f, createElementBlock as _, createElementVNode as u, withDirectives as k, isRef as P, vModelCheckbox as me, unref as v, toDisplayString as x, vShow as S, resolveComponent as ve, createBlock as B, withCtx as ye, vModelText as H, onMounted as le, onBeforeUnmount as ge, ref as g, watch as q, getCurrentScope as _e, onScopeDispose as he, nextTick as be, Fragment as $, renderList as O, withModifiers as ke, normalizeClass as oe, pushScopeId as De, popScopeId as we, resolveDynamicComponent as Ee, mergeProps as xe, createTextVNode as Ae, createCommentVNode as Ce, renderSlot as Me, createVNode as Te, inject as Ie, resolveDirective as Se } from "vue"; +const Ve = { id: "checkbox-container" }, $e = ["id", "readonly", "required"], Oe = { id: "custom-checkbox" }, Le = ["for"], Pe = ["innerHTML"], Be = /* @__PURE__ */ D({ __name: "ACheckbox", props: { label: null, @@ -11,7 +11,7 @@ const Oe = { id: "checkbox-container" }, $e = ["id", "readonly", "required"], Le }, emits: ["update:value"], setup(e, { emit: t }) { - const l = e, n = x({ + const l = e, n = M({ get() { return l.value; }, @@ -19,8 +19,8 @@ const Oe = { id: "checkbox-container" }, $e = ["id", "readonly", "required"], Le t("update:value", o); } }); - return (o, a) => (m(), g("div", null, [ - u("label", Oe, [ + return (o, a) => (f(), _("div", null, [ + u("label", Ve, [ k(u("input", { "onUpdate:modelValue": a[0] || (a[0] = (s) => P(n) ? n.value = s : null), type: "checkbox", @@ -29,50 +29,50 @@ const Oe = { id: "checkbox-container" }, $e = ["id", "readonly", "required"], Le readonly: e.readOnly, required: e.required }, null, 8, $e), [ - [ve, v(n)] + [me, v(n)] ]), - u("span", Le, A(v(n)), 1) + u("span", Oe, x(v(n)), 1) ]), u("label", { for: e.uuid, id: "checkbox-label" - }, A(e.label), 9, Pe), + }, x(e.label), 9, Le), k(u("p", { innerHTML: e.validation.errorMessage - }, null, 8, Be), [ + }, null, 8, Pe), [ [S, e.validation.errorMessage] ]) ])); } }); -const C = (e, t) => { +const A = (e, t) => { const l = e.__vccOpts || e; for (const [n, o] of t) l[n] = o; return l; -}, qe = /* @__PURE__ */ C(He, [["__scopeId", "data-v-743cd4db"]]), Fe = /* @__PURE__ */ u("div", null, [ +}, He = /* @__PURE__ */ A(Be, [["__scopeId", "data-v-743cd4db"]]), qe = /* @__PURE__ */ u("div", null, [ /* @__PURE__ */ u("input", { type: "text" }), /* @__PURE__ */ u("input", { type: "text" }), /* @__PURE__ */ u("input", { type: "text" }) -], -1), Ue = /* @__PURE__ */ w({ +], -1), Fe = /* @__PURE__ */ D({ __name: "AComboBox", props: ["event", "cellData", "tableID"], setup(e) { return (t, l) => { - const n = ye("ATableModal"); - return m(), B(n, { + const n = ve("ATableModal"); + return f(), B(n, { event: e.event, cellData: e.cellData, class: "amodal" }, { - default: ge(() => [ - Fe + default: ye(() => [ + qe ]), _: 1 }, 8, ["event", "cellData"]); }; } -}), Ne = ["id", "disabled", "required"], Re = ["for"], Qe = ["innerHTML"], Ye = /* @__PURE__ */ w({ +}), Ue = ["id", "disabled", "required"], Re = ["for"], Ne = ["innerHTML"], Qe = /* @__PURE__ */ D({ __name: "ADate", props: { label: null, @@ -84,69 +84,69 @@ const C = (e, t) => { }, emits: ["update:modelValue"], setup(e, { emit: t }) { - const l = e, n = x({ + const l = e, n = M({ get: () => l.modelValue, set: (o) => { t("update:modelValue", o); } }); - return (o, a) => (m(), g("div", null, [ + return (o, a) => (f(), _("div", null, [ k(u("input", { "onUpdate:modelValue": a[0] || (a[0] = (s) => P(n) ? n.value = s : null), type: "date", id: e.uuid, disabled: e.readonly, required: e.required - }, null, 8, Ne), [ + }, null, 8, Ue), [ [H, v(n)] ]), - u("label", { for: e.uuid }, A(e.label), 9, Re), + u("label", { for: e.uuid }, x(e.label), 9, Re), k(u("p", { innerHTML: e.validation.errorMessage - }, null, 8, Qe), [ + }, null, 8, Ne), [ [S, e.validation.errorMessage] ]) ])); } }); -const je = /* @__PURE__ */ C(Ye, [["__scopeId", "data-v-91963706"]]); -var Y; -const se = typeof window < "u", We = (e) => typeof e == "string", Ge = () => { +const Ye = /* @__PURE__ */ A(Qe, [["__scopeId", "data-v-91963706"]]); +var Q; +const ae = typeof window < "u", je = (e) => typeof e == "string", We = () => { }; -se && (Y = window == null ? void 0 : window.navigator) != null && Y.userAgent && /iP(ad|hone|od)/.test(window.navigator.userAgent); -function re(e) { +ae && (Q = window == null ? void 0 : window.navigator) != null && Q.userAgent && /iP(ad|hone|od)/.test(window.navigator.userAgent); +function se(e) { return typeof e == "function" ? e() : v(e); } -function ze(e) { +function Ge(e) { return e; } -function Je(e) { - return _e() ? (be(e), !0) : !1; +function ze(e) { + return _e() ? (he(e), !0) : !1; } function L(e) { var t; - const l = re(e); + const l = se(e); return (t = l == null ? void 0 : l.$el) != null ? t : l; } -const ue = se ? window : void 0; -function Ke(...e) { +const re = ae ? window : void 0; +function Je(...e) { let t, l, n, o; - if (We(e[0]) || Array.isArray(e[0]) ? ([l, n, o] = e, t = ue) : [t, l, n, o] = e, !t) - return Ge; + if (je(e[0]) || Array.isArray(e[0]) ? ([l, n, o] = e, t = re) : [t, l, n, o] = e, !t) + return We; Array.isArray(l) || (l = [l]), Array.isArray(n) || (n = [n]); const a = [], s = () => { a.forEach((p) => p()), a.length = 0; - }, r = (p, b, h, d) => (p.addEventListener(b, h, d), () => p.removeEventListener(b, h, d)), i = q(() => [L(t), re(o)], ([p, b]) => { + }, r = (p, b, h, d) => (p.addEventListener(b, h, d), () => p.removeEventListener(b, h, d)), i = q(() => [L(t), se(o)], ([p, b]) => { s(), p && a.push(...l.flatMap((h) => n.map((d) => r(p, h, d, b)))); }, { immediate: !0, flush: "post" }), c = () => { i(), s(); }; - return Je(c), c; + return ze(c), c; } -const j = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, W = "__vueuse_ssr_handlers__"; -j[W] = j[W] || {}; -function Xe(e, { window: t = ue, scrollTarget: l } = {}) { - const n = y(!1), o = () => { +const Y = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, j = "__vueuse_ssr_handlers__"; +Y[j] = Y[j] || {}; +function Ke(e, { window: t = re, scrollTarget: l } = {}) { + const n = g(!1), o = () => { if (!t) return; const a = t.document, s = L(e); @@ -157,24 +157,24 @@ function Xe(e, { window: t = ue, scrollTarget: l } = {}) { n.value = r.top <= (t.innerHeight || a.documentElement.clientHeight) && r.left <= (t.innerWidth || a.documentElement.clientWidth) && r.bottom >= 0 && r.right >= 0; } }; - return q(() => L(e), () => o(), { immediate: !0, flush: "post" }), t && Ke(l || t, "scroll", o, { + return q(() => L(e), () => o(), { immediate: !0, flush: "post" }), t && Je(l || t, "scroll", o, { capture: !1, passive: !0 }), n; } -var G; +var W; (function(e) { e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE"; -})(G || (G = {})); -var Ze = Object.defineProperty, z = Object.getOwnPropertySymbols, et = Object.prototype.hasOwnProperty, tt = Object.prototype.propertyIsEnumerable, J = (e, t, l) => t in e ? Ze(e, t, { enumerable: !0, configurable: !0, writable: !0, value: l }) : e[t] = l, nt = (e, t) => { +})(W || (W = {})); +var Xe = Object.defineProperty, G = Object.getOwnPropertySymbols, Ze = Object.prototype.hasOwnProperty, et = Object.prototype.propertyIsEnumerable, z = (e, t, l) => t in e ? Xe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: l }) : e[t] = l, tt = (e, t) => { for (var l in t || (t = {})) - et.call(t, l) && J(e, l, t[l]); - if (z) - for (var l of z(t)) - tt.call(t, l) && J(e, l, t[l]); + Ze.call(t, l) && z(e, l, t[l]); + if (G) + for (var l of G(t)) + et.call(t, l) && z(e, l, t[l]); return e; }; -const lt = { +const nt = { easeInSine: [0.12, 0, 0.39, 0], easeOutSine: [0.61, 1, 0.88, 1], easeInOutSine: [0.37, 0, 0.63, 1], @@ -200,13 +200,13 @@ const lt = { easeOutBack: [0.34, 1.56, 0.64, 1], easeInOutBack: [0.68, -0.6, 0.32, 1.6] }; -nt({ - linear: ze -}, lt); -const D = (e) => { - let t = Xe(e).value; +tt({ + linear: Ge +}, nt); +const w = (e) => { + let t = Ke(e).value; return t = t && e.offsetHeight > 0, t; -}, E = (e) => e.tabIndex >= 0, K = (e) => { +}, E = (e) => e.tabIndex >= 0, J = (e) => { const t = e.target; return F(t); }, F = (e) => { @@ -222,8 +222,8 @@ const D = (e) => { const n = e.previousElementSibling; n && (l = n); } - return l && (!E(l) || !D(l)) ? F(l) : l; -}, ot = (e) => { + return l && (!E(l) || !w(l)) ? F(l) : l; +}, lt = (e) => { var t; const l = e.target; let n; @@ -240,8 +240,8 @@ const D = (e) => { a && (n = a); } } - return n && (!E(n) || !D(n)) ? U(n) : n; -}, X = (e) => { + return n && (!E(n) || !w(n)) ? U(n) : n; +}, K = (e) => { const t = e.target; return U(t); }, U = (e) => { @@ -257,8 +257,8 @@ const D = (e) => { const n = e.nextElementSibling; n && (l = n); } - return l && (!E(l) || !D(l)) ? U(l) : l; -}, at = (e) => { + return l && (!E(l) || !w(l)) ? U(l) : l; +}, ot = (e) => { var t; const l = e.target; let n; @@ -275,11 +275,11 @@ const D = (e) => { a && (n = a); } } - return n && (!E(n) || !D(n)) ? F(n) : n; -}, Z = (e) => { + return n && (!E(n) || !w(n)) ? F(n) : n; +}, X = (e) => { const t = e.target; - return N(t); -}, N = (e) => { + return R(t); +}, R = (e) => { var t; let l; if (e.previousElementSibling) @@ -288,11 +288,11 @@ const D = (e) => { const n = (t = e.parentElement) == null ? void 0 : t.previousElementSibling; l = n == null ? void 0 : n.lastElementChild; } - return l && (!E(l) || !D(l)) ? N(l) : l; -}, ee = (e) => { + return l && (!E(l) || !w(l)) ? R(l) : l; +}, Z = (e) => { const t = e.target; - return R(t); -}, R = (e) => { + return N(t); +}, N = (e) => { var t; let l; if (e.nextElementSibling) @@ -301,83 +301,83 @@ const D = (e) => { const n = (t = e.parentElement) == null ? void 0 : t.nextElementSibling; l = n == null ? void 0 : n.firstElementChild; } - return l && (!E(l) || !D(l)) ? R(l) : l; -}, te = (e) => { + return l && (!E(l) || !w(l)) ? N(l) : l; +}, ee = (e) => { const t = e.target.parentElement.firstElementChild; - return t && (!E(t) || !D(t)) ? R(t) : t; -}, ne = (e) => { + return t && (!E(t) || !w(t)) ? N(t) : t; +}, te = (e) => { const t = e.target.parentElement.lastElementChild; - return t && (!E(t) || !D(t)) ? N(t) : t; -}, V = ["alt", "control", "shift", "meta"], st = { + return t && (!E(t) || !w(t)) ? R(t) : t; +}, V = ["alt", "control", "shift", "meta"], at = { ArrowUp: "up", ArrowDown: "down", ArrowLeft: "left", ArrowRight: "right" -}, ie = { +}, ue = { "keydown.up": (e) => { - const t = K(e); + const t = J(e); t && (e.preventDefault(), e.stopPropagation(), t.focus()); }, "keydown.down": (e) => { - const t = X(e); + const t = K(e); t && (e.preventDefault(), e.stopPropagation(), t.focus()); }, "keydown.left": (e) => { - const t = Z(e); + const t = X(e); e.preventDefault(), e.stopPropagation(), t && t.focus(); }, "keydown.right": (e) => { - const t = ee(e); + const t = Z(e); e.preventDefault(), e.stopPropagation(), t && t.focus(); }, "keydown.control.up": (e) => { - const t = ot(e); + const t = lt(e); t && (e.preventDefault(), e.stopPropagation(), t.focus()); }, "keydown.control.down": (e) => { - const t = at(e); + const t = ot(e); t && (e.preventDefault(), e.stopPropagation(), t.focus()); }, "keydown.control.left": (e) => { - const t = te(e); + const t = ee(e); t && (e.preventDefault(), e.stopPropagation(), t.focus()); }, "keydown.control.right": (e) => { - const t = ne(e); + const t = te(e); t && (e.preventDefault(), e.stopPropagation(), t.focus()); }, "keydown.end": (e) => { - const t = ne(e); + const t = te(e); t && (e.preventDefault(), e.stopPropagation(), t.focus()); }, "keydown.enter": (e) => { if (e.target instanceof HTMLTableCellElement) { e.preventDefault(), e.stopPropagation(); - const t = X(e); + const t = K(e); t && t.focus(); } }, "keydown.shift.enter": (e) => { if (e.target instanceof HTMLTableCellElement) { e.preventDefault(), e.stopPropagation(); - const t = K(e); + const t = J(e); t && t.focus(); } }, "keydown.home": (e) => { - const t = te(e); + const t = ee(e); t && (e.preventDefault(), e.stopPropagation(), t.focus()); }, "keydown.tab": (e) => { - const t = ee(e); + const t = Z(e); t && (e.preventDefault(), e.stopPropagation(), t.focus()); }, "keydown.shift.tab": (e) => { - const t = Z(e); + const t = X(e); t && (e.preventDefault(), e.stopPropagation(), t.focus()); } }; -function rt(e) { +function st(e) { const t = (n) => { let o = null; n.parent && (typeof n.parent == "string" ? o = document.querySelector(n.parent) : n.parent instanceof Element ? o = n.parent : o = n.parent.value); @@ -393,26 +393,26 @@ function rt(e) { else a.push(n.selectors.value); else - a = Array.from(o.children).filter((s) => E(s) && D(s)); + a = Array.from(o.children).filter((s) => E(s) && w(s)); return a; }, l = (n) => (o) => { - const a = st[o.key] || o.key.toLowerCase(); + const a = at[o.key] || o.key.toLowerCase(); if (V.includes(a)) return; - const s = n.handlers || ie; + const s = n.handlers || ue; for (const r of Object.keys(s)) { const [i, ...c] = r.split("."); if (i === "keydown" && c.includes(a)) { const p = s[r], b = c.filter((d) => V.includes(d)), h = V.some((d) => { - const M = d.charAt(0).toUpperCase() + d.slice(1); - return o.getModifierState(M); + const T = d.charAt(0).toUpperCase() + d.slice(1); + return o.getModifierState(T); }); if (b.length > 0) { if (h) { for (const d of V) if (c.includes(d)) { - const M = d.charAt(0).toUpperCase() + d.slice(1); - o.getModifierState(M) && p(o); + const T = d.charAt(0).toUpperCase() + d.slice(1); + o.getModifierState(T) && p(o); } } } else @@ -420,13 +420,13 @@ function rt(e) { } } }; - oe(() => { + le(() => { for (const n of e) { const o = t(n); for (const a of o) a.addEventListener("keydown", l(n)); } - }), he(() => { + }), ge(() => { for (const n of e) { const o = t(n); for (const a of o) @@ -434,7 +434,7 @@ function rt(e) { } }); } -const ut = (e) => (De("data-v-8bc67bdf"), e = e(), Ee(), e), it = ["event"], ct = { colspan: "5" }, dt = /* @__PURE__ */ ut(() => /* @__PURE__ */ u("tr", null, [ +const rt = (e) => (De("data-v-e1d2d140"), e = e(), we(), e), ut = ["event"], it = { colspan: "5" }, ct = /* @__PURE__ */ rt(() => /* @__PURE__ */ u("tr", null, [ /* @__PURE__ */ u("td", null, "M"), /* @__PURE__ */ u("td", null, "T"), /* @__PURE__ */ u("td", null, "W"), @@ -442,77 +442,63 @@ const ut = (e) => (De("data-v-8bc67bdf"), e = e(), Ee(), e), it = ["event"], ct /* @__PURE__ */ u("td", null, "F"), /* @__PURE__ */ u("td", null, "S"), /* @__PURE__ */ u("td", null, "S") -], -1)), pt = ["onClick"], ft = /* @__PURE__ */ w({ +], -1)), dt = ["onClick"], pt = /* @__PURE__ */ D({ __name: "ADatePicker", props: { modelValue: null, event: null }, - emits: ["modelValue"], + emits: ["update:modelValue"], setup(e, { emit: t }) { - const l = e, n = 6, o = 7, a = /* @__PURE__ */ new Date(), s = y(l.modelValue || void 0), r = y(), i = y(), c = y([]); - oe(async () => { - let f = /* @__PURE__ */ new Date(); - f ? (s.value = f, r.value = s.value.getMonth(), i.value = s.value.getFullYear()) : (r.value = a.getMonth(), i.value = a.getFullYear()), p(), await ke(); - const I = document.getElementsByClassName("selecteddate"); + const l = e, n = 6, o = 7, a = /* @__PURE__ */ new Date(), s = g(l.modelValue ? new Date(l.modelValue) : void 0), r = g(), i = g(), c = g([]); + le(async () => { + let m = /* @__PURE__ */ new Date(); + m ? (s.value = m, r.value = s.value.getMonth(), i.value = s.value.getFullYear()) : (r.value = a.getMonth(), i.value = a.getFullYear()), p(), await be(); + const I = document.getElementsByClassName("selectedDate"); if (I.length > 0) I[0].focus(); else { - const _ = document.getElementsByClassName("todaysdate"); - _.length > 0 && _[0].focus(); + const y = document.getElementsByClassName("todaysDate"); + y.length > 0 && y[0].focus(); } }), q([r, i], () => { p(); }); const p = () => { c.value = []; - const f = new Date(i.value, r.value, 1), I = f.getDay(), _ = f.setDate(f.getDate() - I); - for (let T of Array(43).keys()) - c.value.push(_ + T * 864e5); + const m = new Date(i.value, r.value, 1), I = m.getDay(), y = m.setDate(m.getDate() - I); + for (let C of Array(43).keys()) + c.value.push(y + C * 864e5); }, b = () => { i.value -= 1; }, h = () => { i.value += 1; }, d = () => { r.value == 0 ? (r.value = 11, b()) : r.value -= 1; - }, M = () => { + }, T = () => { r.value == 11 ? (r.value = 0, h()) : r.value += 1; - }, de = (f) => { + }, ce = (m) => { if (r.value === a.getMonth()) - return a.toDateString() === new Date(f).toDateString(); - }, pe = (f) => new Date(f).toDateString() === new Date(s.value).toDateString(); - x({ - get: () => modelValue.value, - set: (f) => { - Q(f); - } - }); - const Q = (f) => { - s.value = new Date(c.value[f]), t("modelValue", s.value.getTime()); - }, fe = x(() => new Date(i.value, r.value, 1).toLocaleDateString(void 0, { + return a.toDateString() === new Date(m).toDateString(); + }, de = (m) => new Date(m).toDateString() === new Date(s.value).toDateString(), pe = (m) => { + s.value = new Date(c.value[m]), t("update:modelValue", s.value.getTime()); + }, fe = M(() => new Date(i.value, r.value, 1).toLocaleDateString(void 0, { year: "numeric", month: "long" })); - return rt([ + return st([ { parent: "table.adate", selectors: "td", handlers: { - ...ie, + ...ue, "keydown.pageup": d, "keydown.shift.pageup": b, - "keydown.pagedown": M, - "keydown.shift.pagedown": h, - // 'keydown.tab': selectDate // select this date - // 'keydown.enter': selectDate // select this date - "keydown.shift.tab": () => { - }, - // disable - not working - "keydown.shift.enter": () => { - } + "keydown.pagedown": T, + "keydown.shift.pagedown": h } } - ]), (f, I) => (m(), g("div", { + ]), (m, I) => (f(), _("div", { event: e.event, class: "adatepicker", tabindex: "0", @@ -524,42 +510,42 @@ const ut = (e) => (De("data-v-8bc67bdf"), e = e(), Ee(), e), it = ["event"], ct onClick: d, tabindex: -1 }, "<"), - u("th", ct, A(v(fe)), 1), + u("th", it, x(v(fe)), 1), u("td", { - onClick: M, + onClick: T, tabindex: -1 }, ">") ]), - dt, - (m(), g(O, null, $(n, (_) => u("tr", { key: _ }, [ - (m(), g(O, null, $(o, (T) => u("td", { - key: (_ - 1) * o + T, + ct, + (f(), _($, null, O(n, (y) => u("tr", { key: y }, [ + (f(), _($, null, O(o, (C) => u("td", { + key: (y - 1) * o + C, contenteditable: !1, spellcheck: !1, tabindex: 0, - onClick: we((me) => Q(me), ["prevent", "stop"]), - class: ae({ - todaysDate: de(c.value[(_ - 1) * o + T]), - selectedDate: pe(c.value[(_ - 1) * o + T]) + onClick: ke((Lt) => pe((y - 1) * o + C), ["prevent", "stop"]), + class: oe({ + todaysDate: ce(c.value[(y - 1) * o + C]), + selectedDate: de(c.value[(y - 1) * o + C]) }) - }, A(new Date(c.value[(_ - 1) * o + T]).getDate()), 11, pt)), 64)) + }, x(new Date(c.value[(y - 1) * o + C]).getDate()), 11, dt)), 64)) ])), 64)) ]) - ], 8, it)); + ], 8, ut)); } }); -const mt = /* @__PURE__ */ C(ft, [["__scopeId", "data-v-8bc67bdf"]]), vt = /* @__PURE__ */ w({ +const ft = /* @__PURE__ */ A(pt, [["__scopeId", "data-v-e1d2d140"]]), mt = /* @__PURE__ */ D({ __name: "CollapseButton", props: { collapsed: { type: Boolean } }, setup(e) { - return (t, l) => (m(), g("button", { - class: ae(["collapse-button", e.collapsed ? "rotated" : "unrotated"]) + return (t, l) => (f(), _("button", { + class: oe(["collapse-button", e.collapsed ? "rotated" : "unrotated"]) }, "×", 2)); } }); -const yt = /* @__PURE__ */ C(vt, [["__scopeId", "data-v-6f1c1b45"]]), gt = /* @__PURE__ */ w({ +const vt = /* @__PURE__ */ A(mt, [["__scopeId", "data-v-6f1c1b45"]]), yt = /* @__PURE__ */ D({ __name: "AForm", props: { modelValue: null, @@ -568,13 +554,13 @@ const yt = /* @__PURE__ */ C(vt, [["__scopeId", "data-v-6f1c1b45"]]), gt = /* @_ }, emits: ["update:modelValue"], setup(e, { emit: t }) { - const l = e, n = y(l.data || {}), o = (s) => { + const l = e, n = g(l.data || {}), o = (s) => { let r = {}; for (const [i, c] of Object.entries(s)) ["component", "fieldtype"].includes(i) || (r[i] = c), i === "rows" && c && c.length === 0 && (r.rows = n.value[s.fieldname]); return r; - }, a = x({ - get: () => l.modelValue.map((s, r) => x({ + }, a = M({ + get: () => l.modelValue.map((s, r) => M({ get() { return s.value; }, @@ -585,8 +571,8 @@ const yt = /* @__PURE__ */ C(vt, [["__scopeId", "data-v-6f1c1b45"]]), gt = /* @_ set: () => { } }); - return (s, r) => (m(), g("form", null, [ - (m(!0), g(O, null, $(e.modelValue, (i, c) => (m(), B(xe(i.component), Ae({ + return (s, r) => (f(), _("form", null, [ + (f(!0), _($, null, O(e.modelValue, (i, c) => (f(), B(Ee(i.component), xe({ key: c, schema: i, modelValue: v(a)[c].value, @@ -597,7 +583,7 @@ const yt = /* @__PURE__ */ C(vt, [["__scopeId", "data-v-6f1c1b45"]]), gt = /* @_ ])); } }); -const ce = /* @__PURE__ */ C(gt, [["__scopeId", "data-v-74d66cf2"]]), ht = /* @__PURE__ */ w({ +const ie = /* @__PURE__ */ A(yt, [["__scopeId", "data-v-74d66cf2"]]), gt = /* @__PURE__ */ D({ __name: "AFieldset", props: { schema: null, @@ -606,25 +592,25 @@ const ce = /* @__PURE__ */ C(gt, [["__scopeId", "data-v-74d66cf2"]]), ht = /* @_ data: null }, setup(e) { - const t = e, l = y(t.data || []); - let n = y(!1), o = y(t.collapsible); - const a = y(t.schema); + const t = e, l = g(t.data || []); + let n = g(!1), o = g(t.collapsible); + const a = g(t.schema); function s(r) { r.preventDefault(), o.value && (n.value = !n.value); } - return (r, i) => (m(), g("fieldset", null, [ + return (r, i) => (f(), _("fieldset", null, [ u("legend", { onClick: s, onSubmit: s }, [ - Ce(A(e.label) + " ", 1), - v(o) ? (m(), B(yt, { + Ae(x(e.label) + " ", 1), + v(o) ? (f(), B(vt, { key: 0, collapsed: v(n) - }, null, 8, ["collapsed"])) : Me("", !0) + }, null, 8, ["collapsed"])) : Ce("", !0) ], 32), - Te(r.$slots, "default", { collapsed: v(n) }, () => [ - k(Ie(ce, { + Me(r.$slots, "default", { collapsed: v(n) }, () => [ + k(Te(ie, { modelValue: a.value, "onUpdate:modelValue": i[0] || (i[0] = (c) => a.value = c), data: l.value @@ -635,7 +621,7 @@ const ce = /* @__PURE__ */ C(gt, [["__scopeId", "data-v-74d66cf2"]]), ht = /* @_ ])); } }); -const _t = /* @__PURE__ */ C(ht, [["__scopeId", "data-v-cad9b578"]]), bt = ["id", "disabled", "required"], kt = ["for"], wt = ["innerHTML"], Dt = /* @__PURE__ */ w({ +const _t = /* @__PURE__ */ A(gt, [["__scopeId", "data-v-cad9b578"]]), ht = ["id", "disabled", "required"], bt = ["for"], kt = ["innerHTML"], Dt = /* @__PURE__ */ D({ __name: "ANumericInput", props: { label: null, @@ -647,32 +633,32 @@ const _t = /* @__PURE__ */ C(ht, [["__scopeId", "data-v-cad9b578"]]), bt = ["id" }, emits: ["update:modelValue"], setup(e, { emit: t }) { - const l = e, n = x({ + const l = e, n = M({ get: () => l.modelValue, set: (o) => { t("update:modelValue", o); } }); - return (o, a) => (m(), g("div", null, [ + return (o, a) => (f(), _("div", null, [ k(u("input", { "onUpdate:modelValue": a[0] || (a[0] = (s) => P(n) ? n.value = s : null), type: "number", id: e.uuid, disabled: e.readonly, required: e.required - }, null, 8, bt), [ + }, null, 8, ht), [ [H, v(n)] ]), - u("label", { for: e.uuid }, A(e.label), 9, kt), + u("label", { for: e.uuid }, x(e.label), 9, bt), k(u("p", { innerHTML: e.validation.errorMessage - }, null, 8, wt), [ + }, null, 8, kt), [ [S, e.validation.errorMessage] ]) ])); } }); -const Et = /* @__PURE__ */ C(Dt, [["__scopeId", "data-v-be33e6c4"]]), le = { +const wt = /* @__PURE__ */ A(Dt, [["__scopeId", "data-v-be33e6c4"]]), ne = { date: "##/##/####", datetime: "####/##/## ##:##", time: "##:##", @@ -680,28 +666,28 @@ const Et = /* @__PURE__ */ C(Dt, [["__scopeId", "data-v-be33e6c4"]]), le = { phone: "(###) ### - ####", card: "#### #### #### ####" }; -function xt(e) { +function Et(e) { try { return Function(`"use strict";return (${e})`)(); } catch { } } -function At(e) { +function xt(e) { var l; let t = e.value; if (t) { - const n = xt(t); + const n = Et(t); if (n) { const o = e.instance.locale; t = n(o); } } else { const o = (l = e.instance.schema.fieldtype) == null ? void 0 : l.toLowerCase(); - o && le[o] && (t = le[o]); + o && ne[o] && (t = ne[o]); } return t; } -function Ct(e, t) { +function At(e, t) { t || (t = "#"); let l = e; const n = [t, "/", "-", "(", ")", " "]; @@ -709,7 +695,7 @@ function Ct(e, t) { l = l.replaceAll(o, ""); return l; } -function Mt(e, t, l) { +function Ct(e, t, l) { l || (l = "#"); let n = t; for (const o of e) { @@ -721,18 +707,18 @@ function Mt(e, t, l) { } return n.slice(0, t.length); } -function Tt(e, t) { - const l = At(t); +function Mt(e, t) { + const l = xt(t); if (!l) return; - const n = "#", o = e.value, a = Ct(o, n); + const n = "#", o = e.value, a = At(o, n); if (a) { - const s = Mt(a, l, n); + const s = Ct(a, l, n); t.instance.maskFilled && (t.instance.maskFilled = !s.includes(n)), e.value = s; } else e.value = l; } -const It = w({ +const Tt = D({ name: "ATextInput", props: { schema: { @@ -764,8 +750,8 @@ const It = w({ } }, setup(e, t) { - const l = y(!1), n = Se("locale", ""); - return { inputText: x({ + const l = g(!1), n = Ie("locale", ""); + return { inputText: M({ get() { return e.modelValue; }, @@ -775,44 +761,44 @@ const It = w({ }), locale: n, maskFilled: l }; }, directives: { - mask: Tt + mask: Mt } }); -const St = ["id", "disabled", "maxlength", "required"], Vt = ["for"], Ot = ["innerHTML"]; +const It = ["id", "disabled", "maxlength", "required"], St = ["for"], Vt = ["innerHTML"]; function $t(e, t, l, n, o, a) { - const s = Ve("mask"); - return m(), g("div", null, [ + const s = Se("mask"); + return f(), _("div", null, [ k(u("input", { "onUpdate:modelValue": t[0] || (t[0] = (r) => e.inputText = r), id: e.uuid, disabled: e.readonly, maxlength: e.mask ? e.maskFilled && e.mask.length : void 0, required: e.required - }, null, 8, St), [ + }, null, 8, It), [ [H, e.inputText], [s, e.mask] ]), - u("label", { for: e.uuid }, A(e.label), 9, Vt), + u("label", { for: e.uuid }, x(e.label), 9, St), k(u("p", { innerHTML: e.validation.errorMessage - }, null, 8, Ot), [ + }, null, 8, Vt), [ [S, e.validation.errorMessage] ]) ]); } -const Lt = /* @__PURE__ */ C(It, [["render", $t], ["__scopeId", "data-v-76dba9b8"]]); +const Ot = /* @__PURE__ */ A(Tt, [["render", $t], ["__scopeId", "data-v-76dba9b8"]]); function Bt(e) { - e.component("ACheckbox", qe), e.component("ACombobox", Ue), e.component("ADate", je), e.component("ADatePicker", mt), e.component("AFieldset", _t), e.component("AForm", ce), e.component("ANumericInput", Et), e.component("ATextInput", Lt); + e.component("ACheckbox", He), e.component("ACombobox", Fe), e.component("ADate", Ye), e.component("ADatePicker", ft), e.component("AFieldset", _t), e.component("AForm", ie), e.component("ANumericInput", wt), e.component("ATextInput", Ot); } export { - qe as ACheckbox, - Ue as AComboBox, - je as ADate, - mt as ADatePicker, + He as ACheckbox, + Fe as AComboBox, + Ye as ADate, + ft as ADatePicker, _t as AFieldset, - ce as AForm, - Et as ANumericInput, - Lt as ATextInput, + ie as AForm, + wt as ANumericInput, + Ot as ATextInput, Bt as install }; //# sourceMappingURL=aform.js.map diff --git a/aform/dist/aform.js.map b/aform/dist/aform.js.map index 42872c2e..8f016dc9 100644 --- a/aform/dist/aform.js.map +++ b/aform/dist/aform.js.map @@ -1 +1 @@ -{"version":3,"file":"aform.js","sources":["../src/components/form/ACheckbox.vue","../src/components/form/ADate.vue","../../utilities/dist/utilities.js","../src/components/form/ADatePicker.vue","../src/components/AForm.vue","../src/components/form/AFieldset.vue","../src/components/form/ANumericInput.vue","../src/directives/mask.ts","../src/components/form/ATextInput.vue","../src/index.ts"],"sourcesContent":["\n\n\n\n\n","\n\n\n\n\n","import { unref as Q, getCurrentScope as U, onScopeDispose as K, ref as B, watch as D, onMounted as W, onBeforeUnmount as V } from \"vue\";\nvar v;\nconst M = typeof window < \"u\", F = (e) => typeof e == \"string\", j = () => {\n};\nM && ((v = window == null ? void 0 : window.navigator) != null && v.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);\nfunction H(e) {\n return typeof e == \"function\" ? e() : Q(e);\n}\nfunction q(e) {\n return e;\n}\nfunction G(e) {\n return U() ? (K(e), !0) : !1;\n}\nfunction y(e) {\n var t;\n const r = H(e);\n return (t = r == null ? void 0 : r.$el) != null ? t : r;\n}\nconst N = M ? window : void 0;\nfunction z(...e) {\n let t, r, n, o;\n if (F(e[0]) || Array.isArray(e[0]) ? ([r, n, o] = e, t = N) : [t, r, n, o] = e, !t)\n return j;\n Array.isArray(r) || (r = [r]), Array.isArray(n) || (n = [n]);\n const l = [], s = () => {\n l.forEach((c) => c()), l.length = 0;\n }, a = (c, g, p, i) => (c.addEventListener(g, p, i), () => c.removeEventListener(g, p, i)), C = D(() => [y(t), H(o)], ([c, g]) => {\n s(), c && l.push(...r.flatMap((p) => n.map((i) => a(c, p, i, g))));\n }, { immediate: !0, flush: \"post\" }), d = () => {\n C(), s();\n };\n return G(d), d;\n}\nconst O = typeof globalThis < \"u\" ? globalThis : typeof window < \"u\" ? window : typeof global < \"u\" ? global : typeof self < \"u\" ? self : {}, T = \"__vueuse_ssr_handlers__\";\nO[T] = O[T] || {};\nfunction J(e, { window: t = N, scrollTarget: r } = {}) {\n const n = B(!1), o = () => {\n if (!t)\n return;\n const l = t.document, s = y(e);\n if (!s)\n n.value = !1;\n else {\n const a = s.getBoundingClientRect();\n n.value = a.top <= (t.innerHeight || l.documentElement.clientHeight) && a.left <= (t.innerWidth || l.documentElement.clientWidth) && a.bottom >= 0 && a.right >= 0;\n }\n };\n return D(() => y(e), () => o(), { immediate: !0, flush: \"post\" }), t && z(r || t, \"scroll\", o, {\n capture: !1,\n passive: !0\n }), n;\n}\nvar P;\n(function(e) {\n e.UP = \"UP\", e.RIGHT = \"RIGHT\", e.DOWN = \"DOWN\", e.LEFT = \"LEFT\", e.NONE = \"NONE\";\n})(P || (P = {}));\nvar X = Object.defineProperty, I = Object.getOwnPropertySymbols, Y = Object.prototype.hasOwnProperty, Z = Object.prototype.propertyIsEnumerable, _ = (e, t, r) => t in e ? X(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, ee = (e, t) => {\n for (var r in t || (t = {}))\n Y.call(t, r) && _(e, r, t[r]);\n if (I)\n for (var r of I(t))\n Z.call(t, r) && _(e, r, t[r]);\n return e;\n};\nconst te = {\n easeInSine: [0.12, 0, 0.39, 0],\n easeOutSine: [0.61, 1, 0.88, 1],\n easeInOutSine: [0.37, 0, 0.63, 1],\n easeInQuad: [0.11, 0, 0.5, 0],\n easeOutQuad: [0.5, 1, 0.89, 1],\n easeInOutQuad: [0.45, 0, 0.55, 1],\n easeInCubic: [0.32, 0, 0.67, 0],\n easeOutCubic: [0.33, 1, 0.68, 1],\n easeInOutCubic: [0.65, 0, 0.35, 1],\n easeInQuart: [0.5, 0, 0.75, 0],\n easeOutQuart: [0.25, 1, 0.5, 1],\n easeInOutQuart: [0.76, 0, 0.24, 1],\n easeInQuint: [0.64, 0, 0.78, 0],\n easeOutQuint: [0.22, 1, 0.36, 1],\n easeInOutQuint: [0.83, 0, 0.17, 1],\n easeInExpo: [0.7, 0, 0.84, 0],\n easeOutExpo: [0.16, 1, 0.3, 1],\n easeInOutExpo: [0.87, 0, 0.13, 1],\n easeInCirc: [0.55, 0, 1, 0.45],\n easeOutCirc: [0, 0.55, 0.45, 1],\n easeInOutCirc: [0.85, 0, 0.15, 1],\n easeInBack: [0.36, 0, 0.66, -0.56],\n easeOutBack: [0.34, 1.56, 0.64, 1],\n easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\nee({\n linear: q\n}, te);\nconst f = (e) => {\n let t = J(e).value;\n return t = t && e.offsetHeight > 0, t;\n}, u = (e) => e.tabIndex >= 0, A = (e) => {\n const t = e.target;\n return E(t);\n}, E = (e) => {\n var r;\n let t;\n if (e instanceof HTMLTableCellElement) {\n const n = (r = e.parentElement) == null ? void 0 : r.previousElementSibling;\n if (n) {\n const l = Array.from(n.children)[e.cellIndex];\n l && (t = l);\n }\n } else if (e instanceof HTMLTableRowElement) {\n const n = e.previousElementSibling;\n n && (t = n);\n }\n return t && (!u(t) || !f(t)) ? E(t) : t;\n}, ne = (e) => {\n var n;\n const t = e.target;\n let r;\n if (t instanceof HTMLTableCellElement) {\n const o = (n = t.parentElement) == null ? void 0 : n.parentElement;\n if (o) {\n const s = o.firstElementChild.children[t.cellIndex];\n s && (r = s);\n }\n } else if (t instanceof HTMLTableRowElement) {\n const o = t.parentElement;\n if (o) {\n const l = o.firstElementChild;\n l && (r = l);\n }\n }\n return r && (!u(r) || !f(r)) ? w(r) : r;\n}, x = (e) => {\n const t = e.target;\n return w(t);\n}, w = (e) => {\n var r;\n let t;\n if (e instanceof HTMLTableCellElement) {\n const n = (r = e.parentElement) == null ? void 0 : r.nextElementSibling;\n if (n) {\n const l = Array.from(n.children)[e.cellIndex];\n l && (t = l);\n }\n } else if (e instanceof HTMLTableRowElement) {\n const n = e.nextElementSibling;\n n && (t = n);\n }\n return t && (!u(t) || !f(t)) ? w(t) : t;\n}, re = (e) => {\n var n;\n const t = e.target;\n let r;\n if (t instanceof HTMLTableCellElement) {\n const o = (n = t.parentElement) == null ? void 0 : n.parentElement;\n if (o) {\n const s = o.lastElementChild.children[t.cellIndex];\n s && (r = s);\n }\n } else if (t instanceof HTMLTableRowElement) {\n const o = t.parentElement;\n if (o) {\n const l = o.lastElementChild;\n l && (r = l);\n }\n }\n return r && (!u(r) || !f(r)) ? E(r) : r;\n}, k = (e) => {\n const t = e.target;\n return h(t);\n}, h = (e) => {\n var r;\n let t;\n if (e.previousElementSibling)\n t = e.previousElementSibling;\n else {\n const n = (r = e.parentElement) == null ? void 0 : r.previousElementSibling;\n t = n == null ? void 0 : n.lastElementChild;\n }\n return t && (!u(t) || !f(t)) ? h(t) : t;\n}, S = (e) => {\n const t = e.target;\n return b(t);\n}, b = (e) => {\n var r;\n let t;\n if (e.nextElementSibling)\n t = e.nextElementSibling;\n else {\n const n = (r = e.parentElement) == null ? void 0 : r.nextElementSibling;\n t = n == null ? void 0 : n.firstElementChild;\n }\n return t && (!u(t) || !f(t)) ? b(t) : t;\n}, L = (e) => {\n const n = e.target.parentElement.firstElementChild;\n return n && (!u(n) || !f(n)) ? b(n) : n;\n}, R = (e) => {\n const n = e.target.parentElement.lastElementChild;\n return n && (!u(n) || !f(n)) ? h(n) : n;\n}, m = [\"alt\", \"control\", \"shift\", \"meta\"], oe = {\n ArrowUp: \"up\",\n ArrowDown: \"down\",\n ArrowLeft: \"left\",\n ArrowRight: \"right\"\n}, le = {\n \"keydown.up\": (e) => {\n const t = A(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.down\": (e) => {\n const t = x(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.left\": (e) => {\n const t = k(e);\n e.preventDefault(), e.stopPropagation(), t && t.focus();\n },\n \"keydown.right\": (e) => {\n const t = S(e);\n e.preventDefault(), e.stopPropagation(), t && t.focus();\n },\n \"keydown.control.up\": (e) => {\n const t = ne(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.down\": (e) => {\n const t = re(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.left\": (e) => {\n const t = L(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.right\": (e) => {\n const t = R(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.end\": (e) => {\n const t = R(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.enter\": (e) => {\n if (e.target instanceof HTMLTableCellElement) {\n e.preventDefault(), e.stopPropagation();\n const r = x(e);\n r && r.focus();\n }\n },\n \"keydown.shift.enter\": (e) => {\n if (e.target instanceof HTMLTableCellElement) {\n e.preventDefault(), e.stopPropagation();\n const r = A(e);\n r && r.focus();\n }\n },\n \"keydown.home\": (e) => {\n const t = L(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.tab\": (e) => {\n const t = S(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.shift.tab\": (e) => {\n const t = k(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n }\n};\nfunction ie(e) {\n const t = (n) => {\n let o = null;\n n.parent && (typeof n.parent == \"string\" ? o = document.querySelector(n.parent) : n.parent instanceof Element ? o = n.parent : o = n.parent.value);\n let l = [];\n if (n.selectors)\n if (typeof n.selectors == \"string\")\n l = o ? Array.from(o.querySelectorAll(n.selectors)) : Array.from(document.querySelectorAll(n.selectors));\n else if (n.selectors instanceof Element)\n l.push(n.selectors);\n else if (Array.isArray(n.selectors.value))\n for (const s of n.selectors.value)\n s instanceof Element ? l.push(s) : l.push(s.$el);\n else\n l.push(n.selectors.value);\n else\n l = Array.from(o.children).filter((a) => u(a) && f(a));\n return l;\n }, r = (n) => (o) => {\n const l = oe[o.key] || o.key.toLowerCase();\n if (m.includes(l))\n return;\n const s = n.handlers || le;\n for (const a of Object.keys(s)) {\n const [C, ...d] = a.split(\".\");\n if (C === \"keydown\" && d.includes(l)) {\n const c = s[a], g = d.filter((i) => m.includes(i)), p = m.some((i) => {\n const $ = i.charAt(0).toUpperCase() + i.slice(1);\n return o.getModifierState($);\n });\n if (g.length > 0) {\n if (p) {\n for (const i of m)\n if (d.includes(i)) {\n const $ = i.charAt(0).toUpperCase() + i.slice(1);\n o.getModifierState($) && c(o);\n }\n }\n } else\n p || c(o);\n }\n }\n };\n W(() => {\n for (const n of e) {\n const o = t(n);\n for (const l of o)\n l.addEventListener(\"keydown\", r(n));\n }\n }), V(() => {\n for (const n of e) {\n const o = t(n);\n for (const l of o)\n l.removeEventListener(\"keydown\", r(n));\n }\n });\n}\nfunction ae(e) {\n}\nexport {\n le as defaultKeypressHandlers,\n ae as install,\n ie as useKeyboardNav\n};\n//# sourceMappingURL=utilities.js.map\n","\n\n\n\n\n","\n\n\n\n\n","\n\n\n\n\n","\n\n\n\n\n","import type { FormSchema } from 'types'\nimport { DirectiveBinding } from 'vue'\n\nconst NAMED_MASKS = {\n\tdate: '##/##/####',\n\tdatetime: '####/##/## ##:##',\n\ttime: '##:##',\n\tfulltime: '##:##:##',\n\tphone: '(###) ### - ####',\n\tcard: '#### #### #### ####',\n}\n\nfunction extractMaskFn(mask: string): ((args: any) => string) | void {\n\ttry {\n\t\t// eslint-disable-next-line @typescript-eslint/no-implied-eval\n\t\treturn Function(`\"use strict\";return (${mask})`)()\n\t} catch (error) {\n\t\tif (error instanceof ReferenceError) {\n\t\t\t// assume mask is a string\n\t\t}\n\t}\n}\n\nfunction getMask(binding: DirectiveBinding) {\n\tlet mask = binding.value\n\n\tif (mask) {\n\t\tconst maskFn = extractMaskFn(mask)\n\t\tif (maskFn) {\n\t\t\t// TODO: (state) replace with state management;\n\t\t\t// pass the entire form/table data to the function\n\t\t\tconst locale = binding.instance['locale']\n\t\t\tmask = maskFn(locale)\n\t\t}\n\t} else {\n\t\t// TODO: (state) handle using state management\n\t\tconst schema: FormSchema = binding.instance['schema']\n\t\tconst fieldType: string | undefined = schema.fieldtype?.toLowerCase()\n\t\tif (fieldType && NAMED_MASKS[fieldType]) {\n\t\t\tmask = NAMED_MASKS[fieldType]\n\t\t}\n\t}\n\n\treturn mask\n}\n\nfunction unmaskInput(input: string, maskToken?: string) {\n\tif (!maskToken) {\n\t\tmaskToken = '#'\n\t}\n\n\tlet unmaskedInput = input\n\tconst maskChars = [maskToken, '/', '-', '(', ')', ' ']\n\n\tfor (const char of maskChars) {\n\t\tunmaskedInput = unmaskedInput.replaceAll(char, '')\n\t}\n\n\treturn unmaskedInput\n}\n\nfunction fillMask(input: string, mask: string, maskToken?: string) {\n\tif (!maskToken) {\n\t\tmaskToken = '#'\n\t}\n\n\tlet replacement = mask\n\tfor (const inputChar of input) {\n\t\tconst replaceIndex = replacement.indexOf(maskToken)\n\t\tif (replaceIndex !== -1) {\n\t\t\tconst prefix = replacement.substring(0, replaceIndex)\n\t\t\tconst suffix = replacement.substring(replaceIndex + 1)\n\t\t\treplacement = prefix + inputChar + suffix\n\t\t}\n\t}\n\n\treturn replacement.slice(0, mask.length)\n}\n\nexport function useStringMask(el: HTMLInputElement, binding: DirectiveBinding) {\n\tconst mask = getMask(binding)\n\tif (!mask) return\n\n\tconst maskToken = '#'\n\tconst inputText = el.value\n\n\t// process input value with mask\n\tconst unmaskedInput = unmaskInput(inputText, maskToken)\n\tif (unmaskedInput) {\n\t\tconst replacement = fillMask(unmaskedInput, mask, maskToken)\n\n\t\t// TODO: (state) this is very opinionated;\n\t\t// most likely fixed with state management;\n\t\t// a better way could be to emit back to instance;\n\n\t\tif (binding.instance['maskFilled']) {\n\t\t\tbinding.instance['maskFilled'] = !replacement.includes(maskToken)\n\t\t}\n\n\t\tel.value = replacement\n\t} else {\n\t\tel.value = mask\n\t}\n}\n","\n\n\n\n\n","import { App } from 'vue'\n\nimport ACheckbox from '@/components/form/ACheckbox.vue'\nimport AComboBox from '@/components/form/AComboBox.vue'\nimport ADate from '@/components/form/ADate.vue'\nimport ADatePicker from '@/components/form/ADatePicker.vue'\nimport AFieldset from '@/components/form/AFieldset.vue'\nimport AForm from '@/components/AForm.vue'\nimport ANumericInput from '@/components/form/ANumericInput.vue'\nimport ATextInput from '@/components/form/ATextInput.vue'\n// import { ACurrency } from '@/components/form/ACurrency.vue'\n// import { AQuantity } from '@/components/form/AQuantity.vue'\n\nfunction install(app: App /* options */) {\n\tapp.component('ACheckbox', ACheckbox)\n\tapp.component('ACombobox', AComboBox)\n\tapp.component('ADate', ADate)\n\tapp.component('ADatePicker', ADatePicker)\n\tapp.component('AFieldset', AFieldset)\n\tapp.component('AForm', AForm)\n\tapp.component('ANumericInput', ANumericInput)\n\tapp.component('ATextInput', ATextInput)\n\t// app.component('ACurrency', ACurrency)\n\t// app.component('AQuantity', AQuantity)\n}\n\nexport { ACheckbox, AComboBox, ADate, ADatePicker, AFieldset, AForm, ANumericInput, ATextInput, install }\n"],"names":["checkbox","computed","props","value","emit","inputDate","newValue","v","M","F","j","H","Q","q","G","U","K","y","r","N","z","l","c","a","g","p","i","C","D","d","O","T","J","B","P","X","I","Y","Z","_","ee","te","f","u","A","E","t","ne","n","s","w","x","re","k","h","S","b","L","R","m","oe","le","ie","$","W","V","numberOfRows","numberOfColumns","todaysDate","selectedDate","ref","currentMonth","currentYear","currentDates","onMounted","cellDate","renderMonth","nextTick","$selectedDate","$todaysDate","watch","firstOfMonth","monthStartWeekday","calendarStartDay","dayIndex","previousYear","nextYear","previousMonth","nextMonth","isTodaysDate","day","isSelectedDate","selectDate","currentIndex","monthAndYear","useKeyboardNav","defaultKeypressHandlers","formData","componentProps","componentObj","propsToPass","key","childModels","val","collapsed","collapsible","formSchema","toggleCollapse","event","inputNumber","NAMED_MASKS","extractMaskFn","mask","getMask","binding","maskFn","locale","fieldType","_a","unmaskInput","input","maskToken","unmaskedInput","maskChars","char","fillMask","replacement","inputChar","replaceIndex","prefix","suffix","useStringMask","el","inputText","_sfc_main","defineComponent","context","maskFilled","inject","_resolveDirective","_withDirectives","_createElementVNode","_cache","$event","_ctx","_hoisted_1","_vModelText","_directive_mask","_toDisplayString","_hoisted_2","_hoisted_3","install","app","ACheckbox","AComboBox","ADate","ADatePicker","AFieldset","AForm","ANumericInput","ATextInput"],"mappings":";;;;;;;;;;;;;iBAgCMA,IAAWC,EAAS;AAAA,MACzB,MAAM;AACL,eAAOC,EAAM;AAAA,MACd;AAAA,MACA,IAAIC,GAAO;AACV,QAAAC,EAAK,gBAAgBD,CAAK;AAAA,MAC3B;AAAA,IAAA,CACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBCdKE,IAAYJ,EAAS;AAAA,MAC1B,KAAK,MACGC,EAAM;AAAA,MAEd,KAAK,CAAYI,MAAA;AAChB,QAAAF,EAAK,qBAAqBE,CAAQ;AAAA,MACnC;AAAA,IAAA,CACA;;;;;;;;;;;;;;;;;;;;;AC/BD,IAAIC;AACJ,MAAMC,KAAI,OAAO,SAAS,KAAKC,KAAI,CAAC,MAAM,OAAO,KAAK,UAAUC,KAAI,MAAM;AAC1E;AACAF,OAAOD,IAAI,UAAU,OAAO,SAAS,OAAO,cAAc,QAAQA,EAAE,aAAc,iBAAiB,KAAK,OAAO,UAAU,SAAS;AAClI,SAASI,GAAE,GAAG;AACZ,SAAO,OAAO,KAAK,aAAa,EAAC,IAAKC,EAAE,CAAC;AAC3C;AACA,SAASC,GAAE,GAAG;AACZ,SAAO;AACT;AACA,SAASC,GAAE,GAAG;AACZ,SAAOC,GAAG,KAAIC,GAAE,CAAC,GAAG,MAAM;AAC5B;AACA,SAASC,EAAE,GAAG;AACZ,MAAI;AACJ,QAAMC,IAAIP,GAAE,CAAC;AACb,UAAQ,IAAIO,KAAK,OAAO,SAASA,EAAE,QAAQ,OAAO,IAAIA;AACxD;AACA,MAAMC,KAAIX,KAAI,SAAS;AACvB,SAASY,MAAK,GAAG;AACf,MAAI,GA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MAAA;;IAPKC,EAAAC,EAAA,SAAA;AAAA,MACR,uBAAkBC,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,CAAAC,MAAAC,EAAA,YAAAD;AAAA,MAClB,IAASC,EAAA;AAAA,MACT,UAAUA,EAAA;AAAA,MAAA,WAAAA,EAAA,OAAAA,EAAA,cAAAA,EAAA,KAAA,SAAA;AAAA,MAJF,UAAAA,EAAA;AAAA,IAAA,GAKD,MAAA,GAAAC,EAAA,GAAA;AAAA,MAAA,CAAAC,GAAAF,EAAA,SAAA;AAAA,MACT,CAAuCG,GAAAH,EAAA,IAAA;AAAA,IAAA,CAAA;AAAA,IACKH,EAAA,SAAW,EAAY,KAAAG,EAAA,KAAA,GAAAI,EAAAJ,EAAA,KAAA,GAAA,GAAAK,EAAA;AAAA,IAAAT,EAAAC,EAAA,KAAA;AAAA,iBAAxDG,EAAW,WAAA;AAAA,IAAA,GAAA,MAAA,GAAAM,EAAA,GAAA;AAAA;;;;;ACGxB,SAASC,GAAQC,GAAwB;AACpC,EAAAA,EAAA,UAAU,aAAaC,EAAS,GAChCD,EAAA,UAAU,aAAaE,EAAS,GAChCF,EAAA,UAAU,SAASG,EAAK,GACxBH,EAAA,UAAU,eAAeI,EAAW,GACpCJ,EAAA,UAAU,aAAaK,EAAS,GAChCL,EAAA,UAAU,SAASM,EAAK,GACxBN,EAAA,UAAU,iBAAiBO,EAAa,GACxCP,EAAA,UAAU,cAAcQ,EAAU;AAGvC;"} \ No newline at end of file +{"version":3,"file":"aform.js","sources":["../src/components/form/ACheckbox.vue","../src/components/form/ADate.vue","../../utilities/dist/utilities.js","../src/components/form/ADatePicker.vue","../src/components/AForm.vue","../src/components/form/AFieldset.vue","../src/components/form/ANumericInput.vue","../src/directives/mask.ts","../src/components/form/ATextInput.vue","../src/index.ts"],"sourcesContent":["\n\n\n\n\n","\n\n\n\n\n","import { unref as Q, getCurrentScope as U, onScopeDispose as K, ref as B, watch as D, onMounted as W, onBeforeUnmount as V } from \"vue\";\nvar v;\nconst M = typeof window < \"u\", F = (e) => typeof e == \"string\", j = () => {\n};\nM && ((v = window == null ? void 0 : window.navigator) != null && v.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);\nfunction H(e) {\n return typeof e == \"function\" ? e() : Q(e);\n}\nfunction q(e) {\n return e;\n}\nfunction G(e) {\n return U() ? (K(e), !0) : !1;\n}\nfunction y(e) {\n var t;\n const r = H(e);\n return (t = r == null ? void 0 : r.$el) != null ? t : r;\n}\nconst N = M ? window : void 0;\nfunction z(...e) {\n let t, r, n, o;\n if (F(e[0]) || Array.isArray(e[0]) ? ([r, n, o] = e, t = N) : [t, r, n, o] = e, !t)\n return j;\n Array.isArray(r) || (r = [r]), Array.isArray(n) || (n = [n]);\n const l = [], s = () => {\n l.forEach((c) => c()), l.length = 0;\n }, a = (c, g, p, i) => (c.addEventListener(g, p, i), () => c.removeEventListener(g, p, i)), C = D(() => [y(t), H(o)], ([c, g]) => {\n s(), c && l.push(...r.flatMap((p) => n.map((i) => a(c, p, i, g))));\n }, { immediate: !0, flush: \"post\" }), d = () => {\n C(), s();\n };\n return G(d), d;\n}\nconst O = typeof globalThis < \"u\" ? globalThis : typeof window < \"u\" ? window : typeof global < \"u\" ? global : typeof self < \"u\" ? self : {}, T = \"__vueuse_ssr_handlers__\";\nO[T] = O[T] || {};\nfunction J(e, { window: t = N, scrollTarget: r } = {}) {\n const n = B(!1), o = () => {\n if (!t)\n return;\n const l = t.document, s = y(e);\n if (!s)\n n.value = !1;\n else {\n const a = s.getBoundingClientRect();\n n.value = a.top <= (t.innerHeight || l.documentElement.clientHeight) && a.left <= (t.innerWidth || l.documentElement.clientWidth) && a.bottom >= 0 && a.right >= 0;\n }\n };\n return D(() => y(e), () => o(), { immediate: !0, flush: \"post\" }), t && z(r || t, \"scroll\", o, {\n capture: !1,\n passive: !0\n }), n;\n}\nvar P;\n(function(e) {\n e.UP = \"UP\", e.RIGHT = \"RIGHT\", e.DOWN = \"DOWN\", e.LEFT = \"LEFT\", e.NONE = \"NONE\";\n})(P || (P = {}));\nvar X = Object.defineProperty, I = Object.getOwnPropertySymbols, Y = Object.prototype.hasOwnProperty, Z = Object.prototype.propertyIsEnumerable, _ = (e, t, r) => t in e ? X(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, ee = (e, t) => {\n for (var r in t || (t = {}))\n Y.call(t, r) && _(e, r, t[r]);\n if (I)\n for (var r of I(t))\n Z.call(t, r) && _(e, r, t[r]);\n return e;\n};\nconst te = {\n easeInSine: [0.12, 0, 0.39, 0],\n easeOutSine: [0.61, 1, 0.88, 1],\n easeInOutSine: [0.37, 0, 0.63, 1],\n easeInQuad: [0.11, 0, 0.5, 0],\n easeOutQuad: [0.5, 1, 0.89, 1],\n easeInOutQuad: [0.45, 0, 0.55, 1],\n easeInCubic: [0.32, 0, 0.67, 0],\n easeOutCubic: [0.33, 1, 0.68, 1],\n easeInOutCubic: [0.65, 0, 0.35, 1],\n easeInQuart: [0.5, 0, 0.75, 0],\n easeOutQuart: [0.25, 1, 0.5, 1],\n easeInOutQuart: [0.76, 0, 0.24, 1],\n easeInQuint: [0.64, 0, 0.78, 0],\n easeOutQuint: [0.22, 1, 0.36, 1],\n easeInOutQuint: [0.83, 0, 0.17, 1],\n easeInExpo: [0.7, 0, 0.84, 0],\n easeOutExpo: [0.16, 1, 0.3, 1],\n easeInOutExpo: [0.87, 0, 0.13, 1],\n easeInCirc: [0.55, 0, 1, 0.45],\n easeOutCirc: [0, 0.55, 0.45, 1],\n easeInOutCirc: [0.85, 0, 0.15, 1],\n easeInBack: [0.36, 0, 0.66, -0.56],\n easeOutBack: [0.34, 1.56, 0.64, 1],\n easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\nee({\n linear: q\n}, te);\nconst f = (e) => {\n let t = J(e).value;\n return t = t && e.offsetHeight > 0, t;\n}, u = (e) => e.tabIndex >= 0, A = (e) => {\n const t = e.target;\n return E(t);\n}, E = (e) => {\n var r;\n let t;\n if (e instanceof HTMLTableCellElement) {\n const n = (r = e.parentElement) == null ? void 0 : r.previousElementSibling;\n if (n) {\n const l = Array.from(n.children)[e.cellIndex];\n l && (t = l);\n }\n } else if (e instanceof HTMLTableRowElement) {\n const n = e.previousElementSibling;\n n && (t = n);\n }\n return t && (!u(t) || !f(t)) ? E(t) : t;\n}, ne = (e) => {\n var n;\n const t = e.target;\n let r;\n if (t instanceof HTMLTableCellElement) {\n const o = (n = t.parentElement) == null ? void 0 : n.parentElement;\n if (o) {\n const s = o.firstElementChild.children[t.cellIndex];\n s && (r = s);\n }\n } else if (t instanceof HTMLTableRowElement) {\n const o = t.parentElement;\n if (o) {\n const l = o.firstElementChild;\n l && (r = l);\n }\n }\n return r && (!u(r) || !f(r)) ? w(r) : r;\n}, x = (e) => {\n const t = e.target;\n return w(t);\n}, w = (e) => {\n var r;\n let t;\n if (e instanceof HTMLTableCellElement) {\n const n = (r = e.parentElement) == null ? void 0 : r.nextElementSibling;\n if (n) {\n const l = Array.from(n.children)[e.cellIndex];\n l && (t = l);\n }\n } else if (e instanceof HTMLTableRowElement) {\n const n = e.nextElementSibling;\n n && (t = n);\n }\n return t && (!u(t) || !f(t)) ? w(t) : t;\n}, re = (e) => {\n var n;\n const t = e.target;\n let r;\n if (t instanceof HTMLTableCellElement) {\n const o = (n = t.parentElement) == null ? void 0 : n.parentElement;\n if (o) {\n const s = o.lastElementChild.children[t.cellIndex];\n s && (r = s);\n }\n } else if (t instanceof HTMLTableRowElement) {\n const o = t.parentElement;\n if (o) {\n const l = o.lastElementChild;\n l && (r = l);\n }\n }\n return r && (!u(r) || !f(r)) ? E(r) : r;\n}, k = (e) => {\n const t = e.target;\n return h(t);\n}, h = (e) => {\n var r;\n let t;\n if (e.previousElementSibling)\n t = e.previousElementSibling;\n else {\n const n = (r = e.parentElement) == null ? void 0 : r.previousElementSibling;\n t = n == null ? void 0 : n.lastElementChild;\n }\n return t && (!u(t) || !f(t)) ? h(t) : t;\n}, S = (e) => {\n const t = e.target;\n return b(t);\n}, b = (e) => {\n var r;\n let t;\n if (e.nextElementSibling)\n t = e.nextElementSibling;\n else {\n const n = (r = e.parentElement) == null ? void 0 : r.nextElementSibling;\n t = n == null ? void 0 : n.firstElementChild;\n }\n return t && (!u(t) || !f(t)) ? b(t) : t;\n}, L = (e) => {\n const n = e.target.parentElement.firstElementChild;\n return n && (!u(n) || !f(n)) ? b(n) : n;\n}, R = (e) => {\n const n = e.target.parentElement.lastElementChild;\n return n && (!u(n) || !f(n)) ? h(n) : n;\n}, m = [\"alt\", \"control\", \"shift\", \"meta\"], oe = {\n ArrowUp: \"up\",\n ArrowDown: \"down\",\n ArrowLeft: \"left\",\n ArrowRight: \"right\"\n}, le = {\n \"keydown.up\": (e) => {\n const t = A(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.down\": (e) => {\n const t = x(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.left\": (e) => {\n const t = k(e);\n e.preventDefault(), e.stopPropagation(), t && t.focus();\n },\n \"keydown.right\": (e) => {\n const t = S(e);\n e.preventDefault(), e.stopPropagation(), t && t.focus();\n },\n \"keydown.control.up\": (e) => {\n const t = ne(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.down\": (e) => {\n const t = re(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.left\": (e) => {\n const t = L(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.right\": (e) => {\n const t = R(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.end\": (e) => {\n const t = R(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.enter\": (e) => {\n if (e.target instanceof HTMLTableCellElement) {\n e.preventDefault(), e.stopPropagation();\n const r = x(e);\n r && r.focus();\n }\n },\n \"keydown.shift.enter\": (e) => {\n if (e.target instanceof HTMLTableCellElement) {\n e.preventDefault(), e.stopPropagation();\n const r = A(e);\n r && r.focus();\n }\n },\n \"keydown.home\": (e) => {\n const t = L(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.tab\": (e) => {\n const t = S(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.shift.tab\": (e) => {\n const t = k(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n }\n};\nfunction ie(e) {\n const t = (n) => {\n let o = null;\n n.parent && (typeof n.parent == \"string\" ? o = document.querySelector(n.parent) : n.parent instanceof Element ? o = n.parent : o = n.parent.value);\n let l = [];\n if (n.selectors)\n if (typeof n.selectors == \"string\")\n l = o ? Array.from(o.querySelectorAll(n.selectors)) : Array.from(document.querySelectorAll(n.selectors));\n else if (n.selectors instanceof Element)\n l.push(n.selectors);\n else if (Array.isArray(n.selectors.value))\n for (const s of n.selectors.value)\n s instanceof Element ? l.push(s) : l.push(s.$el);\n else\n l.push(n.selectors.value);\n else\n l = Array.from(o.children).filter((a) => u(a) && f(a));\n return l;\n }, r = (n) => (o) => {\n const l = oe[o.key] || o.key.toLowerCase();\n if (m.includes(l))\n return;\n const s = n.handlers || le;\n for (const a of Object.keys(s)) {\n const [C, ...d] = a.split(\".\");\n if (C === \"keydown\" && d.includes(l)) {\n const c = s[a], g = d.filter((i) => m.includes(i)), p = m.some((i) => {\n const $ = i.charAt(0).toUpperCase() + i.slice(1);\n return o.getModifierState($);\n });\n if (g.length > 0) {\n if (p) {\n for (const i of m)\n if (d.includes(i)) {\n const $ = i.charAt(0).toUpperCase() + i.slice(1);\n o.getModifierState($) && c(o);\n }\n }\n } else\n p || c(o);\n }\n }\n };\n W(() => {\n for (const n of e) {\n const o = t(n);\n for (const l of o)\n l.addEventListener(\"keydown\", r(n));\n }\n }), V(() => {\n for (const n of e) {\n const o = t(n);\n for (const l of o)\n l.removeEventListener(\"keydown\", r(n));\n }\n });\n}\nfunction ae(e) {\n}\nexport {\n le as defaultKeypressHandlers,\n ae as install,\n ie as useKeyboardNav\n};\n//# sourceMappingURL=utilities.js.map\n","\n\n\n\n\n","\n\n\n\n\n","\n\n\n\n\n","\n\n\n\n\n","import type { FormSchema } from 'types'\nimport { DirectiveBinding } from 'vue'\n\nconst NAMED_MASKS = {\n\tdate: '##/##/####',\n\tdatetime: '####/##/## ##:##',\n\ttime: '##:##',\n\tfulltime: '##:##:##',\n\tphone: '(###) ### - ####',\n\tcard: '#### #### #### ####',\n}\n\nfunction extractMaskFn(mask: string): ((args: any) => string) | void {\n\ttry {\n\t\t// eslint-disable-next-line @typescript-eslint/no-implied-eval\n\t\treturn Function(`\"use strict\";return (${mask})`)()\n\t} catch (error) {\n\t\tif (error instanceof ReferenceError) {\n\t\t\t// assume mask is a string\n\t\t}\n\t}\n}\n\nfunction getMask(binding: DirectiveBinding) {\n\tlet mask = binding.value\n\n\tif (mask) {\n\t\tconst maskFn = extractMaskFn(mask)\n\t\tif (maskFn) {\n\t\t\t// TODO: (state) replace with state management;\n\t\t\t// pass the entire form/table data to the function\n\t\t\tconst locale = binding.instance['locale']\n\t\t\tmask = maskFn(locale)\n\t\t}\n\t} else {\n\t\t// TODO: (state) handle using state management\n\t\tconst schema: FormSchema = binding.instance['schema']\n\t\tconst fieldType: string | undefined = schema.fieldtype?.toLowerCase()\n\t\tif (fieldType && NAMED_MASKS[fieldType]) {\n\t\t\tmask = NAMED_MASKS[fieldType]\n\t\t}\n\t}\n\n\treturn mask\n}\n\nfunction unmaskInput(input: string, maskToken?: string) {\n\tif (!maskToken) {\n\t\tmaskToken = '#'\n\t}\n\n\tlet unmaskedInput = input\n\tconst maskChars = [maskToken, '/', '-', '(', ')', ' ']\n\n\tfor (const char of maskChars) {\n\t\tunmaskedInput = unmaskedInput.replaceAll(char, '')\n\t}\n\n\treturn unmaskedInput\n}\n\nfunction fillMask(input: string, mask: string, maskToken?: string) {\n\tif (!maskToken) {\n\t\tmaskToken = '#'\n\t}\n\n\tlet replacement = mask\n\tfor (const inputChar of input) {\n\t\tconst replaceIndex = replacement.indexOf(maskToken)\n\t\tif (replaceIndex !== -1) {\n\t\t\tconst prefix = replacement.substring(0, replaceIndex)\n\t\t\tconst suffix = replacement.substring(replaceIndex + 1)\n\t\t\treplacement = prefix + inputChar + suffix\n\t\t}\n\t}\n\n\treturn replacement.slice(0, mask.length)\n}\n\nexport function useStringMask(el: HTMLInputElement, binding: DirectiveBinding) {\n\tconst mask = getMask(binding)\n\tif (!mask) return\n\n\tconst maskToken = '#'\n\tconst inputText = el.value\n\n\t// process input value with mask\n\tconst unmaskedInput = unmaskInput(inputText, maskToken)\n\tif (unmaskedInput) {\n\t\tconst replacement = fillMask(unmaskedInput, mask, maskToken)\n\n\t\t// TODO: (state) this is very opinionated;\n\t\t// most likely fixed with state management;\n\t\t// a better way could be to emit back to instance;\n\n\t\tif (binding.instance['maskFilled']) {\n\t\t\tbinding.instance['maskFilled'] = !replacement.includes(maskToken)\n\t\t}\n\n\t\tel.value = replacement\n\t} else {\n\t\tel.value = mask\n\t}\n}\n","\n\n\n\n\n","import { App } from 'vue'\n\nimport ACheckbox from '@/components/form/ACheckbox.vue'\nimport AComboBox from '@/components/form/AComboBox.vue'\nimport ADate from '@/components/form/ADate.vue'\nimport ADatePicker from '@/components/form/ADatePicker.vue'\nimport AFieldset from '@/components/form/AFieldset.vue'\nimport AForm from '@/components/AForm.vue'\nimport ANumericInput from '@/components/form/ANumericInput.vue'\nimport ATextInput from '@/components/form/ATextInput.vue'\n// import { ACurrency } from '@/components/form/ACurrency.vue'\n// import { AQuantity } from '@/components/form/AQuantity.vue'\n\nfunction install(app: App /* options */) {\n\tapp.component('ACheckbox', ACheckbox)\n\tapp.component('ACombobox', AComboBox)\n\tapp.component('ADate', ADate)\n\tapp.component('ADatePicker', ADatePicker)\n\tapp.component('AFieldset', AFieldset)\n\tapp.component('AForm', AForm)\n\tapp.component('ANumericInput', ANumericInput)\n\tapp.component('ATextInput', ATextInput)\n\t// app.component('ACurrency', ACurrency)\n\t// app.component('AQuantity', AQuantity)\n}\n\nexport { ACheckbox, AComboBox, ADate, ADatePicker, AFieldset, AForm, ANumericInput, ATextInput, install }\n"],"names":["checkbox","computed","props","value","emit","inputDate","newValue","v","M","F","j","H","Q","q","G","U","K","y","r","N","z","l","c","a","g","p","i","C","D","d","O","T","J","B","P","X","I","Y","Z","_","ee","te","f","u","A","E","t","ne","n","s","w","x","re","k","h","S","b","L","R","m","oe","le","ie","$","W","V","numberOfRows","numberOfColumns","todaysDate","selectedDate","ref","currentMonth","currentYear","currentDates","onMounted","cellDate","renderMonth","nextTick","$selectedDate","$todaysDate","watch","firstOfMonth","monthStartWeekday","calendarStartDay","dayIndex","previousYear","nextYear","previousMonth","nextMonth","isTodaysDate","day","isSelectedDate","selectDate","currentIndex","monthAndYear","useKeyboardNav","defaultKeypressHandlers","formData","componentProps","componentObj","propsToPass","key","childModels","val","collapsed","collapsible","formSchema","toggleCollapse","event","inputNumber","NAMED_MASKS","extractMaskFn","mask","getMask","binding","maskFn","locale","fieldType","_a","unmaskInput","input","maskToken","unmaskedInput","maskChars","char","fillMask","replacement","inputChar","replaceIndex","prefix","suffix","useStringMask","el","inputText","_sfc_main","defineComponent","context","maskFilled","inject","_resolveDirective","_withDirectives","_createElementVNode","_cache","$event","_ctx","_hoisted_1","_vModelText","_directive_mask","_toDisplayString","_hoisted_2","_hoisted_3","install","app","ACheckbox","AComboBox","ADate","ADatePicker","AFieldset","AForm","ANumericInput","ATextInput"],"mappings":";;;;;;;;;;;;;iBAgCMA,IAAWC,EAAS;AAAA,MACzB,MAAM;AACL,eAAOC,EAAM;AAAA,MACd;AAAA,MACA,IAAIC,GAAO;AACV,QAAAC,EAAK,gBAAgBD,CAAK;AAAA,MAC3B;AAAA,IAAA,CACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBCdKE,IAAYJ,EAAS;AAAA,MAC1B,KAAK,MACGC,EAAM;AAAA,MAEd,KAAK,CAA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A,UAAU,SAASG,EAAK,GACxBH,EAAA,UAAU,eAAeI,EAAW,GACpCJ,EAAA,UAAU,aAAaK,EAAS,GAChCL,EAAA,UAAU,SAASM,EAAK,GACxBN,EAAA,UAAU,iBAAiBO,EAAa,GACxCP,EAAA,UAAU,cAAcQ,EAAU;AAGvC;"} \ No newline at end of file diff --git a/aform/dist/aform.umd.cjs b/aform/dist/aform.umd.cjs index 08366784..76e9f538 100644 --- a/aform/dist/aform.umd.cjs +++ b/aform/dist/aform.umd.cjs @@ -1,2 +1,2 @@ -(function(f,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(f=typeof globalThis<"u"?globalThis:f||self,t(f["@agritheory/aform"]={},f.Vue))})(this,function(f,t){"use strict";const ne={id:"checkbox-container"},oe=["id","readonly","required"],le={id:"custom-checkbox"},ae=["for"],re=["innerHTML"],se=t.defineComponent({__name:"ACheckbox",props:{label:null,value:null,required:{type:Boolean},readOnly:{type:Boolean},uuid:null,validation:{default:()=>({errorMessage:" "})}},emits:["update:value"],setup(e,{emit:n}){const l=e,o=t.computed({get(){return l.value},set(a){n("update:value",a)}});return(a,r)=>(t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("label",ne,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":r[0]||(r[0]=s=>t.isRef(o)?o.value=s:null),type:"checkbox",id:e.uuid,class:"checkbox",readonly:e.readOnly,required:e.required},null,8,oe),[[t.vModelCheckbox,t.unref(o)]]),t.createElementVNode("span",le,t.toDisplayString(t.unref(o)),1)]),t.createElementVNode("label",{for:e.uuid,id:"checkbox-label"},t.toDisplayString(e.label),9,ae),t.withDirectives(t.createElementVNode("p",{innerHTML:e.validation.errorMessage},null,8,re),[[t.vShow,e.validation.errorMessage]])]))}}),nt="",E=(e,n)=>{const l=e.__vccOpts||e;for(const[o,a]of n)l[o]=a;return l},I=E(se,[["__scopeId","data-v-743cd4db"]]),ce=t.createElementVNode("div",null,[t.createElementVNode("input",{type:"text"}),t.createElementVNode("input",{type:"text"}),t.createElementVNode("input",{type:"text"})],-1),B=t.defineComponent({__name:"AComboBox",props:["event","cellData","tableID"],setup(e){return(n,l)=>{const o=t.resolveComponent("ATableModal");return t.openBlock(),t.createBlock(o,{event:e.event,cellData:e.cellData,class:"amodal"},{default:t.withCtx(()=>[ce]),_:1},8,["event","cellData"])}}}),ie=["id","disabled","required"],de=["for"],ue=["innerHTML"],fe=t.defineComponent({__name:"ADate",props:{label:null,modelValue:null,required:{type:Boolean},readonly:{type:Boolean},uuid:null,validation:{default:()=>({errorMessage:" "})}},emits:["update:modelValue"],setup(e,{emit:n}){const l=e,o=t.computed({get:()=>l.modelValue,set:a=>{n("update:modelValue",a)}});return(a,r)=>(t.openBlock(),t.createElementBlock("div",null,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":r[0]||(r[0]=s=>t.isRef(o)?o.value=s:null),type:"date",id:e.uuid,disabled:e.readonly,required:e.required},null,8,ie),[[t.vModelText,t.unref(o)]]),t.createElementVNode("label",{for:e.uuid},t.toDisplayString(e.label),9,de),t.withDirectives(t.createElementVNode("p",{innerHTML:e.validation.errorMessage},null,8,ue),[[t.vShow,e.validation.errorMessage]])]))}}),ot="",N=E(fe,[["__scopeId","data-v-91963706"]]);var v;const O=typeof window<"u",pe=e=>typeof e=="string",me=()=>{};O&&(v=window==null?void 0:window.navigator)!=null&&v.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function $(e){return typeof e=="function"?e():t.unref(e)}function ye(e){return e}function he(e){return t.getCurrentScope()?(t.onScopeDispose(e),!0):!1}function A(e){var n;const l=$(e);return(n=l==null?void 0:l.$el)!=null?n:l}const L=O?window:void 0;function ge(...e){let n,l,o,a;if(pe(e[0])||Array.isArray(e[0])?([l,o,a]=e,n=L):[n,l,o,a]=e,!n)return me;Array.isArray(l)||(l=[l]),Array.isArray(o)||(o=[o]);const r=[],s=()=>{r.forEach(p=>p()),r.length=0},c=(p,_,y,u)=>(p.addEventListener(_,y,u),()=>p.removeEventListener(_,y,u)),i=t.watch(()=>[A(n),$(a)],([p,_])=>{s(),p&&r.push(...l.flatMap(y=>o.map(u=>c(p,y,u,_))))},{immediate:!0,flush:"post"}),d=()=>{i(),s()};return he(d),d}const P=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},F="__vueuse_ssr_handlers__";P[F]=P[F]||{};function be(e,{window:n=L,scrollTarget:l}={}){const o=t.ref(!1),a=()=>{if(!n)return;const r=n.document,s=A(e);if(!s)o.value=!1;else{const c=s.getBoundingClientRect();o.value=c.top<=(n.innerHeight||r.documentElement.clientHeight)&&c.left<=(n.innerWidth||r.documentElement.clientWidth)&&c.bottom>=0&&c.right>=0}};return t.watch(()=>A(e),()=>a(),{immediate:!0,flush:"post"}),n&&ge(l||n,"scroll",a,{capture:!1,passive:!0}),o}var H;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(H||(H={}));var _e=Object.defineProperty,q=Object.getOwnPropertySymbols,Ee=Object.prototype.hasOwnProperty,ke=Object.prototype.propertyIsEnumerable,R=(e,n,l)=>n in e?_e(e,n,{enumerable:!0,configurable:!0,writable:!0,value:l}):e[n]=l,we=(e,n)=>{for(var l in n||(n={}))Ee.call(n,l)&&R(e,l,n[l]);if(q)for(var l of q(n))ke.call(n,l)&&R(e,l,n[l]);return e};we({linear:ye},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]});const g=e=>{let n=be(e).value;return n=n&&e.offsetHeight>0,n},b=e=>e.tabIndex>=0,U=e=>{const n=e.target;return C(n)},C=e=>{var n;let l;if(e instanceof HTMLTableCellElement){const o=(n=e.parentElement)==null?void 0:n.previousElementSibling;if(o){const a=Array.from(o.children)[e.cellIndex];a&&(l=a)}}else if(e instanceof HTMLTableRowElement){const o=e.previousElementSibling;o&&(l=o)}return l&&(!b(l)||!g(l))?C(l):l},De=e=>{var n;const l=e.target;let o;if(l instanceof HTMLTableCellElement){const a=(n=l.parentElement)==null?void 0:n.parentElement;if(a){const r=a.firstElementChild.children[l.cellIndex];r&&(o=r)}}else if(l instanceof HTMLTableRowElement){const a=l.parentElement;if(a){const r=a.firstElementChild;r&&(o=r)}}return o&&(!b(o)||!g(o))?x(o):o},Q=e=>{const n=e.target;return x(n)},x=e=>{var n;let l;if(e instanceof HTMLTableCellElement){const o=(n=e.parentElement)==null?void 0:n.nextElementSibling;if(o){const a=Array.from(o.children)[e.cellIndex];a&&(l=a)}}else if(e instanceof HTMLTableRowElement){const o=e.nextElementSibling;o&&(l=o)}return l&&(!b(l)||!g(l))?x(l):l},Ve=e=>{var n;const l=e.target;let o;if(l instanceof HTMLTableCellElement){const a=(n=l.parentElement)==null?void 0:n.parentElement;if(a){const r=a.lastElementChild.children[l.cellIndex];r&&(o=r)}}else if(l instanceof HTMLTableRowElement){const a=l.parentElement;if(a){const r=a.lastElementChild;r&&(o=r)}}return o&&(!b(o)||!g(o))?C(o):o},j=e=>{const n=e.target;return M(n)},M=e=>{var n;let l;if(e.previousElementSibling)l=e.previousElementSibling;else{const o=(n=e.parentElement)==null?void 0:n.previousElementSibling;l=o==null?void 0:o.lastElementChild}return l&&(!b(l)||!g(l))?M(l):l},Y=e=>{const n=e.target;return S(n)},S=e=>{var n;let l;if(e.nextElementSibling)l=e.nextElementSibling;else{const o=(n=e.parentElement)==null?void 0:n.nextElementSibling;l=o==null?void 0:o.firstElementChild}return l&&(!b(l)||!g(l))?S(l):l},W=e=>{const n=e.target.parentElement.firstElementChild;return n&&(!b(n)||!g(n))?S(n):n},z=e=>{const n=e.target.parentElement.lastElementChild;return n&&(!b(n)||!g(n))?M(n):n},V=["alt","control","shift","meta"],Ae={ArrowUp:"up",ArrowDown:"down",ArrowLeft:"left",ArrowRight:"right"},G={"keydown.up":e=>{const n=U(e);n&&(e.preventDefault(),e.stopPropagation(),n.focus())},"keydown.down":e=>{const n=Q(e);n&&(e.preventDefault(),e.stopPropagation(),n.focus())},"keydown.left":e=>{const n=j(e);e.preventDefault(),e.stopPropagation(),n&&n.focus()},"keydown.right":e=>{const n=Y(e);e.preventDefault(),e.stopPropagation(),n&&n.focus()},"keydown.control.up":e=>{const n=De(e);n&&(e.preventDefault(),e.stopPropagation(),n.focus())},"keydown.control.down":e=>{const n=Ve(e);n&&(e.preventDefault(),e.stopPropagation(),n.focus())},"keydown.control.left":e=>{const n=W(e);n&&(e.preventDefault(),e.stopPropagation(),n.focus())},"keydown.control.right":e=>{const n=z(e);n&&(e.preventDefault(),e.stopPropagation(),n.focus())},"keydown.end":e=>{const n=z(e);n&&(e.preventDefault(),e.stopPropagation(),n.focus())},"keydown.enter":e=>{if(e.target instanceof HTMLTableCellElement){e.preventDefault(),e.stopPropagation();const n=Q(e);n&&n.focus()}},"keydown.shift.enter":e=>{if(e.target instanceof HTMLTableCellElement){e.preventDefault(),e.stopPropagation();const n=U(e);n&&n.focus()}},"keydown.home":e=>{const n=W(e);n&&(e.preventDefault(),e.stopPropagation(),n.focus())},"keydown.tab":e=>{const n=Y(e);n&&(e.preventDefault(),e.stopPropagation(),n.focus())},"keydown.shift.tab":e=>{const n=j(e);n&&(e.preventDefault(),e.stopPropagation(),n.focus())}};function Ce(e){const n=o=>{let a=null;o.parent&&(typeof o.parent=="string"?a=document.querySelector(o.parent):o.parent instanceof Element?a=o.parent:a=o.parent.value);let r=[];if(o.selectors)if(typeof o.selectors=="string")r=a?Array.from(a.querySelectorAll(o.selectors)):Array.from(document.querySelectorAll(o.selectors));else if(o.selectors instanceof Element)r.push(o.selectors);else if(Array.isArray(o.selectors.value))for(const s of o.selectors.value)s instanceof Element?r.push(s):r.push(s.$el);else r.push(o.selectors.value);else r=Array.from(a.children).filter(s=>b(s)&&g(s));return r},l=o=>a=>{const r=Ae[a.key]||a.key.toLowerCase();if(V.includes(r))return;const s=o.handlers||G;for(const c of Object.keys(s)){const[i,...d]=c.split(".");if(i==="keydown"&&d.includes(r)){const p=s[c],_=d.filter(u=>V.includes(u)),y=V.some(u=>{const k=u.charAt(0).toUpperCase()+u.slice(1);return a.getModifierState(k)});if(_.length>0){if(y){for(const u of V)if(d.includes(u)){const k=u.charAt(0).toUpperCase()+u.slice(1);a.getModifierState(k)&&p(a)}}}else y||p(a)}}};t.onMounted(()=>{for(const o of e){const a=n(o);for(const r of a)r.addEventListener("keydown",l(o))}}),t.onBeforeUnmount(()=>{for(const o of e){const a=n(o);for(const r of a)r.removeEventListener("keydown",l(o))}})}const xe=e=>(t.pushScopeId("data-v-8bc67bdf"),e=e(),t.popScopeId(),e),Me=["event"],Se={colspan:"5"},Te=xe(()=>t.createElementVNode("tr",null,[t.createElementVNode("td",null,"M"),t.createElementVNode("td",null,"T"),t.createElementVNode("td",null,"W"),t.createElementVNode("td",null,"T"),t.createElementVNode("td",null,"F"),t.createElementVNode("td",null,"S"),t.createElementVNode("td",null,"S")],-1)),Ie=["onClick"],Be=t.defineComponent({__name:"ADatePicker",props:{modelValue:null,event:null},emits:["modelValue"],setup(e,{emit:n}){const l=e,o=6,a=7,r=new Date,s=t.ref(l.modelValue||void 0),c=t.ref(),i=t.ref(),d=t.ref([]);t.onMounted(async()=>{let m=new Date;m?(s.value=m,c.value=s.value.getMonth(),i.value=s.value.getFullYear()):(c.value=r.getMonth(),i.value=r.getFullYear()),p(),await t.nextTick();const D=document.getElementsByClassName("selecteddate");if(D.length>0)D[0].focus();else{const h=document.getElementsByClassName("todaysdate");h.length>0&&h[0].focus()}}),t.watch([c,i],()=>{p()});const p=()=>{d.value=[];const m=new Date(i.value,c.value,1),D=m.getDay(),h=m.setDate(m.getDate()-D);for(let w of Array(43).keys())d.value.push(h+w*864e5)},_=()=>{i.value-=1},y=()=>{i.value+=1},u=()=>{c.value==0?(c.value=11,_()):c.value-=1},k=()=>{c.value==11?(c.value=0,y()):c.value+=1},Xe=m=>{if(c.value===r.getMonth())return r.toDateString()===new Date(m).toDateString()},Ze=m=>new Date(m).toDateString()===new Date(s.value).toDateString();t.computed({get:()=>modelValue.value,set:m=>{te(m)}});const te=m=>{s.value=new Date(d.value[m]),n("modelValue",s.value.getTime())},et=t.computed(()=>new Date(i.value,c.value,1).toLocaleDateString(void 0,{year:"numeric",month:"long"}));return Ce([{parent:"table.adate",selectors:"td",handlers:{...G,"keydown.pageup":u,"keydown.shift.pageup":_,"keydown.pagedown":k,"keydown.shift.pagedown":y,"keydown.shift.tab":()=>{},"keydown.shift.enter":()=>{}}}]),(m,D)=>(t.openBlock(),t.createElementBlock("div",{event:e.event,class:"adatepicker",tabindex:"0",ref:"adatepicker"},[t.createElementVNode("table",null,[t.createElementVNode("tr",null,[t.createElementVNode("td",{onClick:u,tabindex:-1},"<"),t.createElementVNode("th",Se,t.toDisplayString(t.unref(et)),1),t.createElementVNode("td",{onClick:k,tabindex:-1},">")]),Te,(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(o,h=>t.createElementVNode("tr",{key:h},[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(a,w=>t.createElementVNode("td",{key:(h-1)*a+w,contenteditable:!1,spellcheck:!1,tabindex:0,onClick:t.withModifiers(tt=>te(tt),["prevent","stop"]),class:t.normalizeClass({todaysDate:Xe(d.value[(h-1)*a+w]),selectedDate:Ze(d.value[(h-1)*a+w])})},t.toDisplayString(new Date(d.value[(h-1)*a+w]).getDate()),11,Ie)),64))])),64))])],8,Me))}}),at="",J=E(Be,[["__scopeId","data-v-8bc67bdf"]]),Ne=t.defineComponent({__name:"CollapseButton",props:{collapsed:{type:Boolean}},setup(e){return(n,l)=>(t.openBlock(),t.createElementBlock("button",{class:t.normalizeClass(["collapse-button",e.collapsed?"rotated":"unrotated"])},"×",2))}}),rt="",ve=E(Ne,[["__scopeId","data-v-6f1c1b45"]]),Oe=t.defineComponent({__name:"AForm",props:{modelValue:null,data:null,readonly:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:n}){const l=e,o=t.ref(l.data||{}),a=s=>{let c={};for(const[i,d]of Object.entries(s))["component","fieldtype"].includes(i)||(c[i]=d),i==="rows"&&d&&d.length===0&&(c.rows=o.value[s.fieldname]);return c},r=t.computed({get:()=>l.modelValue.map((s,c)=>t.computed({get(){return s.value},set:i=>{l.modelValue[c].value=i,n("update:modelValue",l.modelValue)}})),set:()=>{}});return(s,c)=>(t.openBlock(),t.createElementBlock("form",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.modelValue,(i,d)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(i.component),t.mergeProps({key:d,schema:i,modelValue:t.unref(r)[d].value,"onUpdate:modelValue":p=>t.unref(r)[d].value=p,data:o.value[i.fieldname],readonly:e.readonly},a(i)),null,16,["schema","modelValue","onUpdate:modelValue","data","readonly"]))),128))]))}}),st="",T=E(Oe,[["__scopeId","data-v-74d66cf2"]]),$e=t.defineComponent({__name:"AFieldset",props:{schema:null,label:null,collapsible:{type:Boolean},data:null},setup(e){const n=e,l=t.ref(n.data||[]);let o=t.ref(!1),a=t.ref(n.collapsible);const r=t.ref(n.schema);function s(c){c.preventDefault(),a.value&&(o.value=!o.value)}return(c,i)=>(t.openBlock(),t.createElementBlock("fieldset",null,[t.createElementVNode("legend",{onClick:s,onSubmit:s},[t.createTextVNode(t.toDisplayString(e.label)+" ",1),t.unref(a)?(t.openBlock(),t.createBlock(ve,{key:0,collapsed:t.unref(o)},null,8,["collapsed"])):t.createCommentVNode("",!0)],32),t.renderSlot(c.$slots,"default",{collapsed:t.unref(o)},()=>[t.withDirectives(t.createVNode(T,{modelValue:r.value,"onUpdate:modelValue":i[0]||(i[0]=d=>r.value=d),data:l.value},null,8,["modelValue","data"]),[[t.vShow,!t.unref(o)]])],!0)]))}}),ct="",K=E($e,[["__scopeId","data-v-cad9b578"]]),Le=["id","disabled","required"],Pe=["for"],Fe=["innerHTML"],He=t.defineComponent({__name:"ANumericInput",props:{label:null,modelValue:null,required:{type:Boolean},readonly:{type:Boolean},uuid:null,validation:{default:()=>({errorMessage:" "})}},emits:["update:modelValue"],setup(e,{emit:n}){const l=e,o=t.computed({get:()=>l.modelValue,set:a=>{n("update:modelValue",a)}});return(a,r)=>(t.openBlock(),t.createElementBlock("div",null,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":r[0]||(r[0]=s=>t.isRef(o)?o.value=s:null),type:"number",id:e.uuid,disabled:e.readonly,required:e.required},null,8,Le),[[t.vModelText,t.unref(o)]]),t.createElementVNode("label",{for:e.uuid},t.toDisplayString(e.label),9,Pe),t.withDirectives(t.createElementVNode("p",{innerHTML:e.validation.errorMessage},null,8,Fe),[[t.vShow,e.validation.errorMessage]])]))}}),it="",X=E(He,[["__scopeId","data-v-be33e6c4"]]),Z={date:"##/##/####",datetime:"####/##/## ##:##",time:"##:##",fulltime:"##:##:##",phone:"(###) ### - ####",card:"#### #### #### ####"};function qe(e){try{return Function(`"use strict";return (${e})`)()}catch{}}function Re(e){var l;let n=e.value;if(n){const o=qe(n);if(o){const a=e.instance.locale;n=o(a)}}else{const a=(l=e.instance.schema.fieldtype)==null?void 0:l.toLowerCase();a&&Z[a]&&(n=Z[a])}return n}function Ue(e,n){n||(n="#");let l=e;const o=[n,"/","-","(",")"," "];for(const a of o)l=l.replaceAll(a,"");return l}function Qe(e,n,l){l||(l="#");let o=n;for(const a of e){const r=o.indexOf(l);if(r!==-1){const s=o.substring(0,r),c=o.substring(r+1);o=s+a+c}}return o.slice(0,n.length)}function je(e,n){const l=Re(n);if(!l)return;const o="#",a=e.value,r=Ue(a,o);if(r){const s=Qe(r,l,o);n.instance.maskFilled&&(n.instance.maskFilled=!s.includes(o)),e.value=s}else e.value=l}const Ye=t.defineComponent({name:"ATextInput",props:{schema:{type:Object,required:!0},label:{type:String,required:!0},modelValue:{type:null},mask:{type:String},required:{type:Boolean},readonly:{type:Boolean},uuid:{type:String},validation:{type:Object,default:()=>({errorMessage:" "})}},setup(e,n){const l=t.ref(!1),o=t.inject("locale","");return{inputText:t.computed({get(){return e.modelValue},set(r){n.emit("update:modelValue",r)}}),locale:o,maskFilled:l}},directives:{mask:je}}),dt="",We=["id","disabled","maxlength","required"],ze=["for"],Ge=["innerHTML"];function Je(e,n,l,o,a,r){const s=t.resolveDirective("mask");return t.openBlock(),t.createElementBlock("div",null,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":n[0]||(n[0]=c=>e.inputText=c),id:e.uuid,disabled:e.readonly,maxlength:e.mask?e.maskFilled&&e.mask.length:void 0,required:e.required},null,8,We),[[t.vModelText,e.inputText],[s,e.mask]]),t.createElementVNode("label",{for:e.uuid},t.toDisplayString(e.label),9,ze),t.withDirectives(t.createElementVNode("p",{innerHTML:e.validation.errorMessage},null,8,Ge),[[t.vShow,e.validation.errorMessage]])])}const ee=E(Ye,[["render",Je],["__scopeId","data-v-76dba9b8"]]);function Ke(e){e.component("ACheckbox",I),e.component("ACombobox",B),e.component("ADate",N),e.component("ADatePicker",J),e.component("AFieldset",K),e.component("AForm",T),e.component("ANumericInput",X),e.component("ATextInput",ee)}f.ACheckbox=I,f.AComboBox=B,f.ADate=N,f.ADatePicker=J,f.AFieldset=K,f.AForm=T,f.ANumericInput=X,f.ATextInput=ee,f.install=Ke,Object.defineProperty(f,Symbol.toStringTag,{value:"Module"})}); +(function(p,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(p=typeof globalThis<"u"?globalThis:p||self,t(p["@agritheory/aform"]={},p.Vue))})(this,function(p,t){"use strict";const te={id:"checkbox-container"},ne=["id","readonly","required"],oe={id:"custom-checkbox"},le=["for"],ae=["innerHTML"],re=t.defineComponent({__name:"ACheckbox",props:{label:null,value:null,required:{type:Boolean},readOnly:{type:Boolean},uuid:null,validation:{default:()=>({errorMessage:" "})}},emits:["update:value"],setup(e,{emit:n}){const l=e,o=t.computed({get(){return l.value},set(a){n("update:value",a)}});return(a,r)=>(t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("label",te,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":r[0]||(r[0]=s=>t.isRef(o)?o.value=s:null),type:"checkbox",id:e.uuid,class:"checkbox",readonly:e.readOnly,required:e.required},null,8,ne),[[t.vModelCheckbox,t.unref(o)]]),t.createElementVNode("span",oe,t.toDisplayString(t.unref(o)),1)]),t.createElementVNode("label",{for:e.uuid,id:"checkbox-label"},t.toDisplayString(e.label),9,le),t.withDirectives(t.createElementVNode("p",{innerHTML:e.validation.errorMessage},null,8,ae),[[t.vShow,e.validation.errorMessage]])]))}}),tt="",E=(e,n)=>{const l=e.__vccOpts||e;for(const[o,a]of n)l[o]=a;return l},I=E(re,[["__scopeId","data-v-743cd4db"]]),se=t.createElementVNode("div",null,[t.createElementVNode("input",{type:"text"}),t.createElementVNode("input",{type:"text"}),t.createElementVNode("input",{type:"text"})],-1),B=t.defineComponent({__name:"AComboBox",props:["event","cellData","tableID"],setup(e){return(n,l)=>{const o=t.resolveComponent("ATableModal");return t.openBlock(),t.createBlock(o,{event:e.event,cellData:e.cellData,class:"amodal"},{default:t.withCtx(()=>[se]),_:1},8,["event","cellData"])}}}),ie=["id","disabled","required"],ce=["for"],de=["innerHTML"],ue=t.defineComponent({__name:"ADate",props:{label:null,modelValue:null,required:{type:Boolean},readonly:{type:Boolean},uuid:null,validation:{default:()=>({errorMessage:" "})}},emits:["update:modelValue"],setup(e,{emit:n}){const l=e,o=t.computed({get:()=>l.modelValue,set:a=>{n("update:modelValue",a)}});return(a,r)=>(t.openBlock(),t.createElementBlock("div",null,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":r[0]||(r[0]=s=>t.isRef(o)?o.value=s:null),type:"date",id:e.uuid,disabled:e.readonly,required:e.required},null,8,ie),[[t.vModelText,t.unref(o)]]),t.createElementVNode("label",{for:e.uuid},t.toDisplayString(e.label),9,ce),t.withDirectives(t.createElementVNode("p",{innerHTML:e.validation.errorMessage},null,8,de),[[t.vShow,e.validation.errorMessage]])]))}}),nt="",N=E(ue,[["__scopeId","data-v-91963706"]]);var v;const O=typeof window<"u",pe=e=>typeof e=="string",fe=()=>{};O&&(v=window==null?void 0:window.navigator)!=null&&v.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function $(e){return typeof e=="function"?e():t.unref(e)}function me(e){return e}function ye(e){return t.getCurrentScope()?(t.onScopeDispose(e),!0):!1}function A(e){var n;const l=$(e);return(n=l==null?void 0:l.$el)!=null?n:l}const L=O?window:void 0;function he(...e){let n,l,o,a;if(pe(e[0])||Array.isArray(e[0])?([l,o,a]=e,n=L):[n,l,o,a]=e,!n)return fe;Array.isArray(l)||(l=[l]),Array.isArray(o)||(o=[o]);const r=[],s=()=>{r.forEach(f=>f()),r.length=0},i=(f,b,h,u)=>(f.addEventListener(b,h,u),()=>f.removeEventListener(b,h,u)),c=t.watch(()=>[A(n),$(a)],([f,b])=>{s(),f&&r.push(...l.flatMap(h=>o.map(u=>i(f,h,u,b))))},{immediate:!0,flush:"post"}),d=()=>{c(),s()};return ye(d),d}const P=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},F="__vueuse_ssr_handlers__";P[F]=P[F]||{};function ge(e,{window:n=L,scrollTarget:l}={}){const o=t.ref(!1),a=()=>{if(!n)return;const r=n.document,s=A(e);if(!s)o.value=!1;else{const i=s.getBoundingClientRect();o.value=i.top<=(n.innerHeight||r.documentElement.clientHeight)&&i.left<=(n.innerWidth||r.documentElement.clientWidth)&&i.bottom>=0&&i.right>=0}};return t.watch(()=>A(e),()=>a(),{immediate:!0,flush:"post"}),n&&he(l||n,"scroll",a,{capture:!1,passive:!0}),o}var H;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(H||(H={}));var _e=Object.defineProperty,q=Object.getOwnPropertySymbols,be=Object.prototype.hasOwnProperty,Ee=Object.prototype.propertyIsEnumerable,R=(e,n,l)=>n in e?_e(e,n,{enumerable:!0,configurable:!0,writable:!0,value:l}):e[n]=l,ke=(e,n)=>{for(var l in n||(n={}))be.call(n,l)&&R(e,l,n[l]);if(q)for(var l of q(n))Ee.call(n,l)&&R(e,l,n[l]);return e};ke({linear:me},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]});const g=e=>{let n=ge(e).value;return n=n&&e.offsetHeight>0,n},_=e=>e.tabIndex>=0,U=e=>{const n=e.target;return C(n)},C=e=>{var n;let l;if(e instanceof HTMLTableCellElement){const o=(n=e.parentElement)==null?void 0:n.previousElementSibling;if(o){const a=Array.from(o.children)[e.cellIndex];a&&(l=a)}}else if(e instanceof HTMLTableRowElement){const o=e.previousElementSibling;o&&(l=o)}return l&&(!_(l)||!g(l))?C(l):l},De=e=>{var n;const l=e.target;let o;if(l instanceof HTMLTableCellElement){const a=(n=l.parentElement)==null?void 0:n.parentElement;if(a){const r=a.firstElementChild.children[l.cellIndex];r&&(o=r)}}else if(l instanceof HTMLTableRowElement){const a=l.parentElement;if(a){const r=a.firstElementChild;r&&(o=r)}}return o&&(!_(o)||!g(o))?x(o):o},Q=e=>{const n=e.target;return x(n)},x=e=>{var n;let l;if(e instanceof HTMLTableCellElement){const o=(n=e.parentElement)==null?void 0:n.nextElementSibling;if(o){const a=Array.from(o.children)[e.cellIndex];a&&(l=a)}}else if(e instanceof HTMLTableRowElement){const o=e.nextElementSibling;o&&(l=o)}return l&&(!_(l)||!g(l))?x(l):l},we=e=>{var n;const l=e.target;let o;if(l instanceof HTMLTableCellElement){const a=(n=l.parentElement)==null?void 0:n.parentElement;if(a){const r=a.lastElementChild.children[l.cellIndex];r&&(o=r)}}else if(l instanceof HTMLTableRowElement){const a=l.parentElement;if(a){const r=a.lastElementChild;r&&(o=r)}}return o&&(!_(o)||!g(o))?C(o):o},j=e=>{const n=e.target;return M(n)},M=e=>{var n;let l;if(e.previousElementSibling)l=e.previousElementSibling;else{const o=(n=e.parentElement)==null?void 0:n.previousElementSibling;l=o==null?void 0:o.lastElementChild}return l&&(!_(l)||!g(l))?M(l):l},Y=e=>{const n=e.target;return S(n)},S=e=>{var n;let l;if(e.nextElementSibling)l=e.nextElementSibling;else{const o=(n=e.parentElement)==null?void 0:n.nextElementSibling;l=o==null?void 0:o.firstElementChild}return l&&(!_(l)||!g(l))?S(l):l},W=e=>{const n=e.target.parentElement.firstElementChild;return n&&(!_(n)||!g(n))?S(n):n},z=e=>{const n=e.target.parentElement.lastElementChild;return n&&(!_(n)||!g(n))?M(n):n},V=["alt","control","shift","meta"],Ve={ArrowUp:"up",ArrowDown:"down",ArrowLeft:"left",ArrowRight:"right"},G={"keydown.up":e=>{const n=U(e);n&&(e.preventDefault(),e.stopPropagation(),n.focus())},"keydown.down":e=>{const n=Q(e);n&&(e.preventDefault(),e.stopPropagation(),n.focus())},"keydown.left":e=>{const n=j(e);e.preventDefault(),e.stopPropagation(),n&&n.focus()},"keydown.right":e=>{const n=Y(e);e.preventDefault(),e.stopPropagation(),n&&n.focus()},"keydown.control.up":e=>{const n=De(e);n&&(e.preventDefault(),e.stopPropagation(),n.focus())},"keydown.control.down":e=>{const n=we(e);n&&(e.preventDefault(),e.stopPropagation(),n.focus())},"keydown.control.left":e=>{const n=W(e);n&&(e.preventDefault(),e.stopPropagation(),n.focus())},"keydown.control.right":e=>{const n=z(e);n&&(e.preventDefault(),e.stopPropagation(),n.focus())},"keydown.end":e=>{const n=z(e);n&&(e.preventDefault(),e.stopPropagation(),n.focus())},"keydown.enter":e=>{if(e.target instanceof HTMLTableCellElement){e.preventDefault(),e.stopPropagation();const n=Q(e);n&&n.focus()}},"keydown.shift.enter":e=>{if(e.target instanceof HTMLTableCellElement){e.preventDefault(),e.stopPropagation();const n=U(e);n&&n.focus()}},"keydown.home":e=>{const n=W(e);n&&(e.preventDefault(),e.stopPropagation(),n.focus())},"keydown.tab":e=>{const n=Y(e);n&&(e.preventDefault(),e.stopPropagation(),n.focus())},"keydown.shift.tab":e=>{const n=j(e);n&&(e.preventDefault(),e.stopPropagation(),n.focus())}};function Ae(e){const n=o=>{let a=null;o.parent&&(typeof o.parent=="string"?a=document.querySelector(o.parent):o.parent instanceof Element?a=o.parent:a=o.parent.value);let r=[];if(o.selectors)if(typeof o.selectors=="string")r=a?Array.from(a.querySelectorAll(o.selectors)):Array.from(document.querySelectorAll(o.selectors));else if(o.selectors instanceof Element)r.push(o.selectors);else if(Array.isArray(o.selectors.value))for(const s of o.selectors.value)s instanceof Element?r.push(s):r.push(s.$el);else r.push(o.selectors.value);else r=Array.from(a.children).filter(s=>_(s)&&g(s));return r},l=o=>a=>{const r=Ve[a.key]||a.key.toLowerCase();if(V.includes(r))return;const s=o.handlers||G;for(const i of Object.keys(s)){const[c,...d]=i.split(".");if(c==="keydown"&&d.includes(r)){const f=s[i],b=d.filter(u=>V.includes(u)),h=V.some(u=>{const D=u.charAt(0).toUpperCase()+u.slice(1);return a.getModifierState(D)});if(b.length>0){if(h){for(const u of V)if(d.includes(u)){const D=u.charAt(0).toUpperCase()+u.slice(1);a.getModifierState(D)&&f(a)}}}else h||f(a)}}};t.onMounted(()=>{for(const o of e){const a=n(o);for(const r of a)r.addEventListener("keydown",l(o))}}),t.onBeforeUnmount(()=>{for(const o of e){const a=n(o);for(const r of a)r.removeEventListener("keydown",l(o))}})}const Ce=e=>(t.pushScopeId("data-v-e1d2d140"),e=e(),t.popScopeId(),e),xe=["event"],Me={colspan:"5"},Se=Ce(()=>t.createElementVNode("tr",null,[t.createElementVNode("td",null,"M"),t.createElementVNode("td",null,"T"),t.createElementVNode("td",null,"W"),t.createElementVNode("td",null,"T"),t.createElementVNode("td",null,"F"),t.createElementVNode("td",null,"S"),t.createElementVNode("td",null,"S")],-1)),Te=["onClick"],Ie=t.defineComponent({__name:"ADatePicker",props:{modelValue:null,event:null},emits:["update:modelValue"],setup(e,{emit:n}){const l=e,o=6,a=7,r=new Date,s=t.ref(l.modelValue?new Date(l.modelValue):void 0),i=t.ref(),c=t.ref(),d=t.ref([]);t.onMounted(async()=>{let m=new Date;m?(s.value=m,i.value=s.value.getMonth(),c.value=s.value.getFullYear()):(i.value=r.getMonth(),c.value=r.getFullYear()),f(),await t.nextTick();const w=document.getElementsByClassName("selectedDate");if(w.length>0)w[0].focus();else{const y=document.getElementsByClassName("todaysDate");y.length>0&&y[0].focus()}}),t.watch([i,c],()=>{f()});const f=()=>{d.value=[];const m=new Date(c.value,i.value,1),w=m.getDay(),y=m.setDate(m.getDate()-w);for(let k of Array(43).keys())d.value.push(y+k*864e5)},b=()=>{c.value-=1},h=()=>{c.value+=1},u=()=>{i.value==0?(i.value=11,b()):i.value-=1},D=()=>{i.value==11?(i.value=0,h()):i.value+=1},Ke=m=>{if(i.value===r.getMonth())return r.toDateString()===new Date(m).toDateString()},Xe=m=>new Date(m).toDateString()===new Date(s.value).toDateString(),Ze=m=>{s.value=new Date(d.value[m]),n("update:modelValue",s.value.getTime())},et=t.computed(()=>new Date(c.value,i.value,1).toLocaleDateString(void 0,{year:"numeric",month:"long"}));return Ae([{parent:"table.adate",selectors:"td",handlers:{...G,"keydown.pageup":u,"keydown.shift.pageup":b,"keydown.pagedown":D,"keydown.shift.pagedown":h}}]),(m,w)=>(t.openBlock(),t.createElementBlock("div",{event:e.event,class:"adatepicker",tabindex:"0",ref:"adatepicker"},[t.createElementVNode("table",null,[t.createElementVNode("tr",null,[t.createElementVNode("td",{onClick:u,tabindex:-1},"<"),t.createElementVNode("th",Me,t.toDisplayString(t.unref(et)),1),t.createElementVNode("td",{onClick:D,tabindex:-1},">")]),Se,(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(o,y=>t.createElementVNode("tr",{key:y},[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList(a,k=>t.createElementVNode("td",{key:(y-1)*a+k,contenteditable:!1,spellcheck:!1,tabindex:0,onClick:t.withModifiers(dt=>Ze((y-1)*a+k),["prevent","stop"]),class:t.normalizeClass({todaysDate:Ke(d.value[(y-1)*a+k]),selectedDate:Xe(d.value[(y-1)*a+k])})},t.toDisplayString(new Date(d.value[(y-1)*a+k]).getDate()),11,Te)),64))])),64))])],8,xe))}}),lt="",J=E(Ie,[["__scopeId","data-v-e1d2d140"]]),Be=t.defineComponent({__name:"CollapseButton",props:{collapsed:{type:Boolean}},setup(e){return(n,l)=>(t.openBlock(),t.createElementBlock("button",{class:t.normalizeClass(["collapse-button",e.collapsed?"rotated":"unrotated"])},"×",2))}}),at="",Ne=E(Be,[["__scopeId","data-v-6f1c1b45"]]),ve=t.defineComponent({__name:"AForm",props:{modelValue:null,data:null,readonly:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:n}){const l=e,o=t.ref(l.data||{}),a=s=>{let i={};for(const[c,d]of Object.entries(s))["component","fieldtype"].includes(c)||(i[c]=d),c==="rows"&&d&&d.length===0&&(i.rows=o.value[s.fieldname]);return i},r=t.computed({get:()=>l.modelValue.map((s,i)=>t.computed({get(){return s.value},set:c=>{l.modelValue[i].value=c,n("update:modelValue",l.modelValue)}})),set:()=>{}});return(s,i)=>(t.openBlock(),t.createElementBlock("form",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.modelValue,(c,d)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(c.component),t.mergeProps({key:d,schema:c,modelValue:t.unref(r)[d].value,"onUpdate:modelValue":f=>t.unref(r)[d].value=f,data:o.value[c.fieldname],readonly:e.readonly},a(c)),null,16,["schema","modelValue","onUpdate:modelValue","data","readonly"]))),128))]))}}),rt="",T=E(ve,[["__scopeId","data-v-74d66cf2"]]),Oe=t.defineComponent({__name:"AFieldset",props:{schema:null,label:null,collapsible:{type:Boolean},data:null},setup(e){const n=e,l=t.ref(n.data||[]);let o=t.ref(!1),a=t.ref(n.collapsible);const r=t.ref(n.schema);function s(i){i.preventDefault(),a.value&&(o.value=!o.value)}return(i,c)=>(t.openBlock(),t.createElementBlock("fieldset",null,[t.createElementVNode("legend",{onClick:s,onSubmit:s},[t.createTextVNode(t.toDisplayString(e.label)+" ",1),t.unref(a)?(t.openBlock(),t.createBlock(Ne,{key:0,collapsed:t.unref(o)},null,8,["collapsed"])):t.createCommentVNode("",!0)],32),t.renderSlot(i.$slots,"default",{collapsed:t.unref(o)},()=>[t.withDirectives(t.createVNode(T,{modelValue:r.value,"onUpdate:modelValue":c[0]||(c[0]=d=>r.value=d),data:l.value},null,8,["modelValue","data"]),[[t.vShow,!t.unref(o)]])],!0)]))}}),st="",K=E(Oe,[["__scopeId","data-v-cad9b578"]]),$e=["id","disabled","required"],Le=["for"],Pe=["innerHTML"],Fe=t.defineComponent({__name:"ANumericInput",props:{label:null,modelValue:null,required:{type:Boolean},readonly:{type:Boolean},uuid:null,validation:{default:()=>({errorMessage:" "})}},emits:["update:modelValue"],setup(e,{emit:n}){const l=e,o=t.computed({get:()=>l.modelValue,set:a=>{n("update:modelValue",a)}});return(a,r)=>(t.openBlock(),t.createElementBlock("div",null,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":r[0]||(r[0]=s=>t.isRef(o)?o.value=s:null),type:"number",id:e.uuid,disabled:e.readonly,required:e.required},null,8,$e),[[t.vModelText,t.unref(o)]]),t.createElementVNode("label",{for:e.uuid},t.toDisplayString(e.label),9,Le),t.withDirectives(t.createElementVNode("p",{innerHTML:e.validation.errorMessage},null,8,Pe),[[t.vShow,e.validation.errorMessage]])]))}}),it="",X=E(Fe,[["__scopeId","data-v-be33e6c4"]]),Z={date:"##/##/####",datetime:"####/##/## ##:##",time:"##:##",fulltime:"##:##:##",phone:"(###) ### - ####",card:"#### #### #### ####"};function He(e){try{return Function(`"use strict";return (${e})`)()}catch{}}function qe(e){var l;let n=e.value;if(n){const o=He(n);if(o){const a=e.instance.locale;n=o(a)}}else{const a=(l=e.instance.schema.fieldtype)==null?void 0:l.toLowerCase();a&&Z[a]&&(n=Z[a])}return n}function Re(e,n){n||(n="#");let l=e;const o=[n,"/","-","(",")"," "];for(const a of o)l=l.replaceAll(a,"");return l}function Ue(e,n,l){l||(l="#");let o=n;for(const a of e){const r=o.indexOf(l);if(r!==-1){const s=o.substring(0,r),i=o.substring(r+1);o=s+a+i}}return o.slice(0,n.length)}function Qe(e,n){const l=qe(n);if(!l)return;const o="#",a=e.value,r=Re(a,o);if(r){const s=Ue(r,l,o);n.instance.maskFilled&&(n.instance.maskFilled=!s.includes(o)),e.value=s}else e.value=l}const je=t.defineComponent({name:"ATextInput",props:{schema:{type:Object,required:!0},label:{type:String,required:!0},modelValue:{type:null},mask:{type:String},required:{type:Boolean},readonly:{type:Boolean},uuid:{type:String},validation:{type:Object,default:()=>({errorMessage:" "})}},setup(e,n){const l=t.ref(!1),o=t.inject("locale","");return{inputText:t.computed({get(){return e.modelValue},set(r){n.emit("update:modelValue",r)}}),locale:o,maskFilled:l}},directives:{mask:Qe}}),ct="",Ye=["id","disabled","maxlength","required"],We=["for"],ze=["innerHTML"];function Ge(e,n,l,o,a,r){const s=t.resolveDirective("mask");return t.openBlock(),t.createElementBlock("div",null,[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":n[0]||(n[0]=i=>e.inputText=i),id:e.uuid,disabled:e.readonly,maxlength:e.mask?e.maskFilled&&e.mask.length:void 0,required:e.required},null,8,Ye),[[t.vModelText,e.inputText],[s,e.mask]]),t.createElementVNode("label",{for:e.uuid},t.toDisplayString(e.label),9,We),t.withDirectives(t.createElementVNode("p",{innerHTML:e.validation.errorMessage},null,8,ze),[[t.vShow,e.validation.errorMessage]])])}const ee=E(je,[["render",Ge],["__scopeId","data-v-76dba9b8"]]);function Je(e){e.component("ACheckbox",I),e.component("ACombobox",B),e.component("ADate",N),e.component("ADatePicker",J),e.component("AFieldset",K),e.component("AForm",T),e.component("ANumericInput",X),e.component("ATextInput",ee)}p.ACheckbox=I,p.AComboBox=B,p.ADate=N,p.ADatePicker=J,p.AFieldset=K,p.AForm=T,p.ANumericInput=X,p.ATextInput=ee,p.install=Je,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})}); //# sourceMappingURL=aform.umd.cjs.map diff --git a/aform/dist/aform.umd.cjs.map b/aform/dist/aform.umd.cjs.map index 6f0b2cb0..6f9eee98 100644 --- a/aform/dist/aform.umd.cjs.map +++ b/aform/dist/aform.umd.cjs.map @@ -1 +1 @@ -{"version":3,"file":"aform.umd.cjs","sources":["../src/components/form/ACheckbox.vue","../src/components/form/ADate.vue","../../utilities/dist/utilities.js","../src/components/form/ADatePicker.vue","../src/components/AForm.vue","../src/components/form/AFieldset.vue","../src/components/form/ANumericInput.vue","../src/directives/mask.ts","../src/components/form/ATextInput.vue","../src/index.ts"],"sourcesContent":["\n\n\n\n\n","\n\n\n\n\n","import { unref as Q, getCurrentScope as U, onScopeDispose as K, ref as B, watch as D, onMounted as W, onBeforeUnmount as V } from \"vue\";\nvar v;\nconst M = typeof window < \"u\", F = (e) => typeof e == \"string\", j = () => {\n};\nM && ((v = window == null ? void 0 : window.navigator) != null && v.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);\nfunction H(e) {\n return typeof e == \"function\" ? e() : Q(e);\n}\nfunction q(e) {\n return e;\n}\nfunction G(e) {\n return U() ? (K(e), !0) : !1;\n}\nfunction y(e) {\n var t;\n const r = H(e);\n return (t = r == null ? void 0 : r.$el) != null ? t : r;\n}\nconst N = M ? window : void 0;\nfunction z(...e) {\n let t, r, n, o;\n if (F(e[0]) || Array.isArray(e[0]) ? ([r, n, o] = e, t = N) : [t, r, n, o] = e, !t)\n return j;\n Array.isArray(r) || (r = [r]), Array.isArray(n) || (n = [n]);\n const l = [], s = () => {\n l.forEach((c) => c()), l.length = 0;\n }, a = (c, g, p, i) => (c.addEventListener(g, p, i), () => c.removeEventListener(g, p, i)), C = D(() => [y(t), H(o)], ([c, g]) => {\n s(), c && l.push(...r.flatMap((p) => n.map((i) => a(c, p, i, g))));\n }, { immediate: !0, flush: \"post\" }), d = () => {\n C(), s();\n };\n return G(d), d;\n}\nconst O = typeof globalThis < \"u\" ? globalThis : typeof window < \"u\" ? window : typeof global < \"u\" ? global : typeof self < \"u\" ? self : {}, T = \"__vueuse_ssr_handlers__\";\nO[T] = O[T] || {};\nfunction J(e, { window: t = N, scrollTarget: r } = {}) {\n const n = B(!1), o = () => {\n if (!t)\n return;\n const l = t.document, s = y(e);\n if (!s)\n n.value = !1;\n else {\n const a = s.getBoundingClientRect();\n n.value = a.top <= (t.innerHeight || l.documentElement.clientHeight) && a.left <= (t.innerWidth || l.documentElement.clientWidth) && a.bottom >= 0 && a.right >= 0;\n }\n };\n return D(() => y(e), () => o(), { immediate: !0, flush: \"post\" }), t && z(r || t, \"scroll\", o, {\n capture: !1,\n passive: !0\n }), n;\n}\nvar P;\n(function(e) {\n e.UP = \"UP\", e.RIGHT = \"RIGHT\", e.DOWN = \"DOWN\", e.LEFT = \"LEFT\", e.NONE = \"NONE\";\n})(P || (P = {}));\nvar X = Object.defineProperty, I = Object.getOwnPropertySymbols, Y = Object.prototype.hasOwnProperty, Z = Object.prototype.propertyIsEnumerable, _ = (e, t, r) => t in e ? X(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, ee = (e, t) => {\n for (var r in t || (t = {}))\n Y.call(t, r) && _(e, r, t[r]);\n if (I)\n for (var r of I(t))\n Z.call(t, r) && _(e, r, t[r]);\n return e;\n};\nconst te = {\n easeInSine: [0.12, 0, 0.39, 0],\n easeOutSine: [0.61, 1, 0.88, 1],\n easeInOutSine: [0.37, 0, 0.63, 1],\n easeInQuad: [0.11, 0, 0.5, 0],\n easeOutQuad: [0.5, 1, 0.89, 1],\n easeInOutQuad: [0.45, 0, 0.55, 1],\n easeInCubic: [0.32, 0, 0.67, 0],\n easeOutCubic: [0.33, 1, 0.68, 1],\n easeInOutCubic: [0.65, 0, 0.35, 1],\n easeInQuart: [0.5, 0, 0.75, 0],\n easeOutQuart: [0.25, 1, 0.5, 1],\n easeInOutQuart: [0.76, 0, 0.24, 1],\n easeInQuint: [0.64, 0, 0.78, 0],\n easeOutQuint: [0.22, 1, 0.36, 1],\n easeInOutQuint: [0.83, 0, 0.17, 1],\n easeInExpo: [0.7, 0, 0.84, 0],\n easeOutExpo: [0.16, 1, 0.3, 1],\n easeInOutExpo: [0.87, 0, 0.13, 1],\n easeInCirc: [0.55, 0, 1, 0.45],\n easeOutCirc: [0, 0.55, 0.45, 1],\n easeInOutCirc: [0.85, 0, 0.15, 1],\n easeInBack: [0.36, 0, 0.66, -0.56],\n easeOutBack: [0.34, 1.56, 0.64, 1],\n easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\nee({\n linear: q\n}, te);\nconst f = (e) => {\n let t = J(e).value;\n return t = t && e.offsetHeight > 0, t;\n}, u = (e) => e.tabIndex >= 0, A = (e) => {\n const t = e.target;\n return E(t);\n}, E = (e) => {\n var r;\n let t;\n if (e instanceof HTMLTableCellElement) {\n const n = (r = e.parentElement) == null ? void 0 : r.previousElementSibling;\n if (n) {\n const l = Array.from(n.children)[e.cellIndex];\n l && (t = l);\n }\n } else if (e instanceof HTMLTableRowElement) {\n const n = e.previousElementSibling;\n n && (t = n);\n }\n return t && (!u(t) || !f(t)) ? E(t) : t;\n}, ne = (e) => {\n var n;\n const t = e.target;\n let r;\n if (t instanceof HTMLTableCellElement) {\n const o = (n = t.parentElement) == null ? void 0 : n.parentElement;\n if (o) {\n const s = o.firstElementChild.children[t.cellIndex];\n s && (r = s);\n }\n } else if (t instanceof HTMLTableRowElement) {\n const o = t.parentElement;\n if (o) {\n const l = o.firstElementChild;\n l && (r = l);\n }\n }\n return r && (!u(r) || !f(r)) ? w(r) : r;\n}, x = (e) => {\n const t = e.target;\n return w(t);\n}, w = (e) => {\n var r;\n let t;\n if (e instanceof HTMLTableCellElement) {\n const n = (r = e.parentElement) == null ? void 0 : r.nextElementSibling;\n if (n) {\n const l = Array.from(n.children)[e.cellIndex];\n l && (t = l);\n }\n } else if (e instanceof HTMLTableRowElement) {\n const n = e.nextElementSibling;\n n && (t = n);\n }\n return t && (!u(t) || !f(t)) ? w(t) : t;\n}, re = (e) => {\n var n;\n const t = e.target;\n let r;\n if (t instanceof HTMLTableCellElement) {\n const o = (n = t.parentElement) == null ? void 0 : n.parentElement;\n if (o) {\n const s = o.lastElementChild.children[t.cellIndex];\n s && (r = s);\n }\n } else if (t instanceof HTMLTableRowElement) {\n const o = t.parentElement;\n if (o) {\n const l = o.lastElementChild;\n l && (r = l);\n }\n }\n return r && (!u(r) || !f(r)) ? E(r) : r;\n}, k = (e) => {\n const t = e.target;\n return h(t);\n}, h = (e) => {\n var r;\n let t;\n if (e.previousElementSibling)\n t = e.previousElementSibling;\n else {\n const n = (r = e.parentElement) == null ? void 0 : r.previousElementSibling;\n t = n == null ? void 0 : n.lastElementChild;\n }\n return t && (!u(t) || !f(t)) ? h(t) : t;\n}, S = (e) => {\n const t = e.target;\n return b(t);\n}, b = (e) => {\n var r;\n let t;\n if (e.nextElementSibling)\n t = e.nextElementSibling;\n else {\n const n = (r = e.parentElement) == null ? void 0 : r.nextElementSibling;\n t = n == null ? void 0 : n.firstElementChild;\n }\n return t && (!u(t) || !f(t)) ? b(t) : t;\n}, L = (e) => {\n const n = e.target.parentElement.firstElementChild;\n return n && (!u(n) || !f(n)) ? b(n) : n;\n}, R = (e) => {\n const n = e.target.parentElement.lastElementChild;\n return n && (!u(n) || !f(n)) ? h(n) : n;\n}, m = [\"alt\", \"control\", \"shift\", \"meta\"], oe = {\n ArrowUp: \"up\",\n ArrowDown: \"down\",\n ArrowLeft: \"left\",\n ArrowRight: \"right\"\n}, le = {\n \"keydown.up\": (e) => {\n const t = A(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.down\": (e) => {\n const t = x(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.left\": (e) => {\n const t = k(e);\n e.preventDefault(), e.stopPropagation(), t && t.focus();\n },\n \"keydown.right\": (e) => {\n const t = S(e);\n e.preventDefault(), e.stopPropagation(), t && t.focus();\n },\n \"keydown.control.up\": (e) => {\n const t = ne(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.down\": (e) => {\n const t = re(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.left\": (e) => {\n const t = L(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.right\": (e) => {\n const t = R(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.end\": (e) => {\n const t = R(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.enter\": (e) => {\n if (e.target instanceof HTMLTableCellElement) {\n e.preventDefault(), e.stopPropagation();\n const r = x(e);\n r && r.focus();\n }\n },\n \"keydown.shift.enter\": (e) => {\n if (e.target instanceof HTMLTableCellElement) {\n e.preventDefault(), e.stopPropagation();\n const r = A(e);\n r && r.focus();\n }\n },\n \"keydown.home\": (e) => {\n const t = L(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.tab\": (e) => {\n const t = S(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.shift.tab\": (e) => {\n const t = k(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n }\n};\nfunction ie(e) {\n const t = (n) => {\n let o = null;\n n.parent && (typeof n.parent == \"string\" ? o = document.querySelector(n.parent) : n.parent instanceof Element ? o = n.parent : o = n.parent.value);\n let l = [];\n if (n.selectors)\n if (typeof n.selectors == \"string\")\n l = o ? Array.from(o.querySelectorAll(n.selectors)) : Array.from(document.querySelectorAll(n.selectors));\n else if (n.selectors instanceof Element)\n l.push(n.selectors);\n else if (Array.isArray(n.selectors.value))\n for (const s of n.selectors.value)\n s instanceof Element ? l.push(s) : l.push(s.$el);\n else\n l.push(n.selectors.value);\n else\n l = Array.from(o.children).filter((a) => u(a) && f(a));\n return l;\n }, r = (n) => (o) => {\n const l = oe[o.key] || o.key.toLowerCase();\n if (m.includes(l))\n return;\n const s = n.handlers || le;\n for (const a of Object.keys(s)) {\n const [C, ...d] = a.split(\".\");\n if (C === \"keydown\" && d.includes(l)) {\n const c = s[a], g = d.filter((i) => m.includes(i)), p = m.some((i) => {\n const $ = i.charAt(0).toUpperCase() + i.slice(1);\n return o.getModifierState($);\n });\n if (g.length > 0) {\n if (p) {\n for (const i of m)\n if (d.includes(i)) {\n const $ = i.charAt(0).toUpperCase() + i.slice(1);\n o.getModifierState($) && c(o);\n }\n }\n } else\n p || c(o);\n }\n }\n };\n W(() => {\n for (const n of e) {\n const o = t(n);\n for (const l of o)\n l.addEventListener(\"keydown\", r(n));\n }\n }), V(() => {\n for (const n of e) {\n const o = t(n);\n for (const l of o)\n l.removeEventListener(\"keydown\", r(n));\n }\n });\n}\nfunction ae(e) {\n}\nexport {\n le as defaultKeypressHandlers,\n ae as install,\n ie as useKeyboardNav\n};\n//# sourceMappingURL=utilities.js.map\n","\n\n\n\n\n","\n\n\n\n\n","\n\n\n\n\n","\n\n\n\n\n","import type { FormSchema } from 'types'\nimport { DirectiveBinding } from 'vue'\n\nconst NAMED_MASKS = {\n\tdate: '##/##/####',\n\tdatetime: '####/##/## ##:##',\n\ttime: '##:##',\n\tfulltime: '##:##:##',\n\tphone: '(###) ### - ####',\n\tcard: '#### #### #### ####',\n}\n\nfunction extractMaskFn(mask: string): ((args: any) => string) | void {\n\ttry {\n\t\t// eslint-disable-next-line @typescript-eslint/no-implied-eval\n\t\treturn Function(`\"use strict\";return (${mask})`)()\n\t} catch (error) {\n\t\tif (error instanceof ReferenceError) {\n\t\t\t// assume mask is a string\n\t\t}\n\t}\n}\n\nfunction getMask(binding: DirectiveBinding) {\n\tlet mask = binding.value\n\n\tif (mask) {\n\t\tconst maskFn = extractMaskFn(mask)\n\t\tif (maskFn) {\n\t\t\t// TODO: (state) replace with state management;\n\t\t\t// pass the entire form/table data to the function\n\t\t\tconst locale = binding.instance['locale']\n\t\t\tmask = maskFn(locale)\n\t\t}\n\t} else {\n\t\t// TODO: (state) handle using state management\n\t\tconst schema: FormSchema = binding.instance['schema']\n\t\tconst fieldType: string | undefined = schema.fieldtype?.toLowerCase()\n\t\tif (fieldType && NAMED_MASKS[fieldType]) {\n\t\t\tmask = NAMED_MASKS[fieldType]\n\t\t}\n\t}\n\n\treturn mask\n}\n\nfunction unmaskInput(input: string, maskToken?: string) {\n\tif (!maskToken) {\n\t\tmaskToken = '#'\n\t}\n\n\tlet unmaskedInput = input\n\tconst maskChars = [maskToken, '/', '-', '(', ')', ' ']\n\n\tfor (const char of maskChars) {\n\t\tunmaskedInput = unmaskedInput.replaceAll(char, '')\n\t}\n\n\treturn unmaskedInput\n}\n\nfunction fillMask(input: string, mask: string, maskToken?: string) {\n\tif (!maskToken) {\n\t\tmaskToken = '#'\n\t}\n\n\tlet replacement = mask\n\tfor (const inputChar of input) {\n\t\tconst replaceIndex = replacement.indexOf(maskToken)\n\t\tif (replaceIndex !== -1) {\n\t\t\tconst prefix = replacement.substring(0, replaceIndex)\n\t\t\tconst suffix = replacement.substring(replaceIndex + 1)\n\t\t\treplacement = prefix + inputChar + suffix\n\t\t}\n\t}\n\n\treturn replacement.slice(0, mask.length)\n}\n\nexport function useStringMask(el: HTMLInputElement, binding: DirectiveBinding) {\n\tconst mask = getMask(binding)\n\tif (!mask) return\n\n\tconst maskToken = '#'\n\tconst inputText = el.value\n\n\t// process input value with mask\n\tconst unmaskedInput = unmaskInput(inputText, maskToken)\n\tif (unmaskedInput) {\n\t\tconst replacement = fillMask(unmaskedInput, mask, maskToken)\n\n\t\t// TODO: (state) this is very opinionated;\n\t\t// most likely fixed with state management;\n\t\t// a better way could be to emit back to instance;\n\n\t\tif (binding.instance['maskFilled']) {\n\t\t\tbinding.instance['maskFilled'] = !replacement.includes(maskToken)\n\t\t}\n\n\t\tel.value = replacement\n\t} else {\n\t\tel.value = mask\n\t}\n}\n","\n\n\n\n\n","import { App } from 'vue'\n\nimport ACheckbox from '@/components/form/ACheckbox.vue'\nimport AComboBox from '@/components/form/AComboBox.vue'\nimport ADate from '@/components/form/ADate.vue'\nimport ADatePicker from '@/components/form/ADatePicker.vue'\nimport AFieldset from '@/components/form/AFieldset.vue'\nimport AForm from '@/components/AForm.vue'\nimport ANumericInput from '@/components/form/ANumericInput.vue'\nimport ATextInput from '@/components/form/ATextInput.vue'\n// import { ACurrency } from '@/components/form/ACurrency.vue'\n// import { AQuantity } from '@/components/form/AQuantity.vue'\n\nfunction install(app: App /* options */) {\n\tapp.component('ACheckbox', ACheckbox)\n\tapp.component('ACombobox', AComboBox)\n\tapp.component('ADate', ADate)\n\tapp.component('ADatePicker', ADatePicker)\n\tapp.component('AFieldset', AFieldset)\n\tapp.component('AForm', AForm)\n\tapp.component('ANumericInput', ANumericInput)\n\tapp.component('ATextInput', ATextInput)\n\t// app.component('ACurrency', ACurrency)\n\t// app.component('AQuantity', AQuantity)\n}\n\nexport { ACheckbox, AComboBox, ADate, ADatePicker, AFieldset, AForm, ANumericInput, ATextInput, install }\n"],"names":["checkbox","computed","props","value","emit","inputDate","newValue","M","F","j","H","Q","q","G","U","K","y","t","r","N","z","n","o","l","c","a","g","p","i","C","D","O","T","J","B","P","X","I","Y","Z","_","ee","f","u","A","E","ne","s","w","x","re","k","h","S","b","L","R","m","oe","le","ie","$","W","V","numberOfRows","numberOfColumns","todaysDate","selectedDate","ref","currentMonth","currentYear","currentDates","onMounted","cellDate","renderMonth","nextTick","$selectedDate","$todaysDate","watch","firstOfMonth","monthStartWeekday","calendarStartDay","dayIndex","previousYear","nextYear","previousMonth","nextMonth","isTodaysDate","day","isSelectedDate","selectDate","currentIndex","monthAndYear","useKeyboardNav","defaultKeypressHandlers","formData","componentProps","componentObj","propsToPass","key","childModels","val","collapsed","collapsible","formSchema","toggleCollapse","event","inputNumber","NAMED_MASKS","extractMaskFn","mask","getMask","binding","maskFn","locale","fieldType","_a","unmaskInput","input","maskToken","unmaskedInput","maskChars","char","fillMask","replacement","inputChar","replaceIndex","prefix","suffix","useStringMask","el","inputText","_sfc_main","defineComponent","context","maskFilled","inject","_resolveDirective","_withDirectives","_createElementVNode","_cache","$event","_ctx","_hoisted_1","_vModelText","_directive_mask","_toDisplayString","_hoisted_2","_hoisted_3","install","app","ACheckbox","AComboBox","ADate","ADatePicker","AFieldset","AForm","ANumericInput","ATextInput"],"mappings":"ymBAgCMA,EAAWC,EAAAA,SAAS,CACzB,KAAM,CACL,OAAOC,EAAM,KACd,EACA,IAAIC,EAAO,CACVC,EAAK,eAAgBD,CAAK,CAC3B,CAAA,CACA,u+C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A,UAAU,aAAcQ,EAAU,CAGvC"} \ No newline at end of file +{"version":3,"file":"aform.umd.cjs","sources":["../src/components/form/ACheckbox.vue","../src/components/form/ADate.vue","../../utilities/dist/utilities.js","../src/components/form/ADatePicker.vue","../src/components/AForm.vue","../src/components/form/AFieldset.vue","../src/components/form/ANumericInput.vue","../src/directives/mask.ts","../src/components/form/ATextInput.vue","../src/index.ts"],"sourcesContent":["\n\n\n\n\n","\n\n\n\n\n","import { unref as Q, getCurrentScope as U, onScopeDispose as K, ref as B, watch as D, onMounted as W, onBeforeUnmount as V } from \"vue\";\nvar v;\nconst M = typeof window < \"u\", F = (e) => typeof e == \"string\", j = () => {\n};\nM && ((v = window == null ? void 0 : window.navigator) != null && v.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);\nfunction H(e) {\n return typeof e == \"function\" ? e() : Q(e);\n}\nfunction q(e) {\n return e;\n}\nfunction G(e) {\n return U() ? (K(e), !0) : !1;\n}\nfunction y(e) {\n var t;\n const r = H(e);\n return (t = r == null ? void 0 : r.$el) != null ? t : r;\n}\nconst N = M ? window : void 0;\nfunction z(...e) {\n let t, r, n, o;\n if (F(e[0]) || Array.isArray(e[0]) ? ([r, n, o] = e, t = N) : [t, r, n, o] = e, !t)\n return j;\n Array.isArray(r) || (r = [r]), Array.isArray(n) || (n = [n]);\n const l = [], s = () => {\n l.forEach((c) => c()), l.length = 0;\n }, a = (c, g, p, i) => (c.addEventListener(g, p, i), () => c.removeEventListener(g, p, i)), C = D(() => [y(t), H(o)], ([c, g]) => {\n s(), c && l.push(...r.flatMap((p) => n.map((i) => a(c, p, i, g))));\n }, { immediate: !0, flush: \"post\" }), d = () => {\n C(), s();\n };\n return G(d), d;\n}\nconst O = typeof globalThis < \"u\" ? globalThis : typeof window < \"u\" ? window : typeof global < \"u\" ? global : typeof self < \"u\" ? self : {}, T = \"__vueuse_ssr_handlers__\";\nO[T] = O[T] || {};\nfunction J(e, { window: t = N, scrollTarget: r } = {}) {\n const n = B(!1), o = () => {\n if (!t)\n return;\n const l = t.document, s = y(e);\n if (!s)\n n.value = !1;\n else {\n const a = s.getBoundingClientRect();\n n.value = a.top <= (t.innerHeight || l.documentElement.clientHeight) && a.left <= (t.innerWidth || l.documentElement.clientWidth) && a.bottom >= 0 && a.right >= 0;\n }\n };\n return D(() => y(e), () => o(), { immediate: !0, flush: \"post\" }), t && z(r || t, \"scroll\", o, {\n capture: !1,\n passive: !0\n }), n;\n}\nvar P;\n(function(e) {\n e.UP = \"UP\", e.RIGHT = \"RIGHT\", e.DOWN = \"DOWN\", e.LEFT = \"LEFT\", e.NONE = \"NONE\";\n})(P || (P = {}));\nvar X = Object.defineProperty, I = Object.getOwnPropertySymbols, Y = Object.prototype.hasOwnProperty, Z = Object.prototype.propertyIsEnumerable, _ = (e, t, r) => t in e ? X(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, ee = (e, t) => {\n for (var r in t || (t = {}))\n Y.call(t, r) && _(e, r, t[r]);\n if (I)\n for (var r of I(t))\n Z.call(t, r) && _(e, r, t[r]);\n return e;\n};\nconst te = {\n easeInSine: [0.12, 0, 0.39, 0],\n easeOutSine: [0.61, 1, 0.88, 1],\n easeInOutSine: [0.37, 0, 0.63, 1],\n easeInQuad: [0.11, 0, 0.5, 0],\n easeOutQuad: [0.5, 1, 0.89, 1],\n easeInOutQuad: [0.45, 0, 0.55, 1],\n easeInCubic: [0.32, 0, 0.67, 0],\n easeOutCubic: [0.33, 1, 0.68, 1],\n easeInOutCubic: [0.65, 0, 0.35, 1],\n easeInQuart: [0.5, 0, 0.75, 0],\n easeOutQuart: [0.25, 1, 0.5, 1],\n easeInOutQuart: [0.76, 0, 0.24, 1],\n easeInQuint: [0.64, 0, 0.78, 0],\n easeOutQuint: [0.22, 1, 0.36, 1],\n easeInOutQuint: [0.83, 0, 0.17, 1],\n easeInExpo: [0.7, 0, 0.84, 0],\n easeOutExpo: [0.16, 1, 0.3, 1],\n easeInOutExpo: [0.87, 0, 0.13, 1],\n easeInCirc: [0.55, 0, 1, 0.45],\n easeOutCirc: [0, 0.55, 0.45, 1],\n easeInOutCirc: [0.85, 0, 0.15, 1],\n easeInBack: [0.36, 0, 0.66, -0.56],\n easeOutBack: [0.34, 1.56, 0.64, 1],\n easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\nee({\n linear: q\n}, te);\nconst f = (e) => {\n let t = J(e).value;\n return t = t && e.offsetHeight > 0, t;\n}, u = (e) => e.tabIndex >= 0, A = (e) => {\n const t = e.target;\n return E(t);\n}, E = (e) => {\n var r;\n let t;\n if (e instanceof HTMLTableCellElement) {\n const n = (r = e.parentElement) == null ? void 0 : r.previousElementSibling;\n if (n) {\n const l = Array.from(n.children)[e.cellIndex];\n l && (t = l);\n }\n } else if (e instanceof HTMLTableRowElement) {\n const n = e.previousElementSibling;\n n && (t = n);\n }\n return t && (!u(t) || !f(t)) ? E(t) : t;\n}, ne = (e) => {\n var n;\n const t = e.target;\n let r;\n if (t instanceof HTMLTableCellElement) {\n const o = (n = t.parentElement) == null ? void 0 : n.parentElement;\n if (o) {\n const s = o.firstElementChild.children[t.cellIndex];\n s && (r = s);\n }\n } else if (t instanceof HTMLTableRowElement) {\n const o = t.parentElement;\n if (o) {\n const l = o.firstElementChild;\n l && (r = l);\n }\n }\n return r && (!u(r) || !f(r)) ? w(r) : r;\n}, x = (e) => {\n const t = e.target;\n return w(t);\n}, w = (e) => {\n var r;\n let t;\n if (e instanceof HTMLTableCellElement) {\n const n = (r = e.parentElement) == null ? void 0 : r.nextElementSibling;\n if (n) {\n const l = Array.from(n.children)[e.cellIndex];\n l && (t = l);\n }\n } else if (e instanceof HTMLTableRowElement) {\n const n = e.nextElementSibling;\n n && (t = n);\n }\n return t && (!u(t) || !f(t)) ? w(t) : t;\n}, re = (e) => {\n var n;\n const t = e.target;\n let r;\n if (t instanceof HTMLTableCellElement) {\n const o = (n = t.parentElement) == null ? void 0 : n.parentElement;\n if (o) {\n const s = o.lastElementChild.children[t.cellIndex];\n s && (r = s);\n }\n } else if (t instanceof HTMLTableRowElement) {\n const o = t.parentElement;\n if (o) {\n const l = o.lastElementChild;\n l && (r = l);\n }\n }\n return r && (!u(r) || !f(r)) ? E(r) : r;\n}, k = (e) => {\n const t = e.target;\n return h(t);\n}, h = (e) => {\n var r;\n let t;\n if (e.previousElementSibling)\n t = e.previousElementSibling;\n else {\n const n = (r = e.parentElement) == null ? void 0 : r.previousElementSibling;\n t = n == null ? void 0 : n.lastElementChild;\n }\n return t && (!u(t) || !f(t)) ? h(t) : t;\n}, S = (e) => {\n const t = e.target;\n return b(t);\n}, b = (e) => {\n var r;\n let t;\n if (e.nextElementSibling)\n t = e.nextElementSibling;\n else {\n const n = (r = e.parentElement) == null ? void 0 : r.nextElementSibling;\n t = n == null ? void 0 : n.firstElementChild;\n }\n return t && (!u(t) || !f(t)) ? b(t) : t;\n}, L = (e) => {\n const n = e.target.parentElement.firstElementChild;\n return n && (!u(n) || !f(n)) ? b(n) : n;\n}, R = (e) => {\n const n = e.target.parentElement.lastElementChild;\n return n && (!u(n) || !f(n)) ? h(n) : n;\n}, m = [\"alt\", \"control\", \"shift\", \"meta\"], oe = {\n ArrowUp: \"up\",\n ArrowDown: \"down\",\n ArrowLeft: \"left\",\n ArrowRight: \"right\"\n}, le = {\n \"keydown.up\": (e) => {\n const t = A(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.down\": (e) => {\n const t = x(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.left\": (e) => {\n const t = k(e);\n e.preventDefault(), e.stopPropagation(), t && t.focus();\n },\n \"keydown.right\": (e) => {\n const t = S(e);\n e.preventDefault(), e.stopPropagation(), t && t.focus();\n },\n \"keydown.control.up\": (e) => {\n const t = ne(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.down\": (e) => {\n const t = re(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.left\": (e) => {\n const t = L(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.right\": (e) => {\n const t = R(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.end\": (e) => {\n const t = R(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.enter\": (e) => {\n if (e.target instanceof HTMLTableCellElement) {\n e.preventDefault(), e.stopPropagation();\n const r = x(e);\n r && r.focus();\n }\n },\n \"keydown.shift.enter\": (e) => {\n if (e.target instanceof HTMLTableCellElement) {\n e.preventDefault(), e.stopPropagation();\n const r = A(e);\n r && r.focus();\n }\n },\n \"keydown.home\": (e) => {\n const t = L(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.tab\": (e) => {\n const t = S(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.shift.tab\": (e) => {\n const t = k(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n }\n};\nfunction ie(e) {\n const t = (n) => {\n let o = null;\n n.parent && (typeof n.parent == \"string\" ? o = document.querySelector(n.parent) : n.parent instanceof Element ? o = n.parent : o = n.parent.value);\n let l = [];\n if (n.selectors)\n if (typeof n.selectors == \"string\")\n l = o ? Array.from(o.querySelectorAll(n.selectors)) : Array.from(document.querySelectorAll(n.selectors));\n else if (n.selectors instanceof Element)\n l.push(n.selectors);\n else if (Array.isArray(n.selectors.value))\n for (const s of n.selectors.value)\n s instanceof Element ? l.push(s) : l.push(s.$el);\n else\n l.push(n.selectors.value);\n else\n l = Array.from(o.children).filter((a) => u(a) && f(a));\n return l;\n }, r = (n) => (o) => {\n const l = oe[o.key] || o.key.toLowerCase();\n if (m.includes(l))\n return;\n const s = n.handlers || le;\n for (const a of Object.keys(s)) {\n const [C, ...d] = a.split(\".\");\n if (C === \"keydown\" && d.includes(l)) {\n const c = s[a], g = d.filter((i) => m.includes(i)), p = m.some((i) => {\n const $ = i.charAt(0).toUpperCase() + i.slice(1);\n return o.getModifierState($);\n });\n if (g.length > 0) {\n if (p) {\n for (const i of m)\n if (d.includes(i)) {\n const $ = i.charAt(0).toUpperCase() + i.slice(1);\n o.getModifierState($) && c(o);\n }\n }\n } else\n p || c(o);\n }\n }\n };\n W(() => {\n for (const n of e) {\n const o = t(n);\n for (const l of o)\n l.addEventListener(\"keydown\", r(n));\n }\n }), V(() => {\n for (const n of e) {\n const o = t(n);\n for (const l of o)\n l.removeEventListener(\"keydown\", r(n));\n }\n });\n}\nfunction ae(e) {\n}\nexport {\n le as defaultKeypressHandlers,\n ae as install,\n ie as useKeyboardNav\n};\n//# sourceMappingURL=utilities.js.map\n","\n\n\n\n\n","\n\n\n\n\n","\n\n\n\n\n","\n\n\n\n\n","import type { FormSchema } from 'types'\nimport { DirectiveBinding } from 'vue'\n\nconst NAMED_MASKS = {\n\tdate: '##/##/####',\n\tdatetime: '####/##/## ##:##',\n\ttime: '##:##',\n\tfulltime: '##:##:##',\n\tphone: '(###) ### - ####',\n\tcard: '#### #### #### ####',\n}\n\nfunction extractMaskFn(mask: string): ((args: any) => string) | void {\n\ttry {\n\t\t// eslint-disable-next-line @typescript-eslint/no-implied-eval\n\t\treturn Function(`\"use strict\";return (${mask})`)()\n\t} catch (error) {\n\t\tif (error instanceof ReferenceError) {\n\t\t\t// assume mask is a string\n\t\t}\n\t}\n}\n\nfunction getMask(binding: DirectiveBinding) {\n\tlet mask = binding.value\n\n\tif (mask) {\n\t\tconst maskFn = extractMaskFn(mask)\n\t\tif (maskFn) {\n\t\t\t// TODO: (state) replace with state management;\n\t\t\t// pass the entire form/table data to the function\n\t\t\tconst locale = binding.instance['locale']\n\t\t\tmask = maskFn(locale)\n\t\t}\n\t} else {\n\t\t// TODO: (state) handle using state management\n\t\tconst schema: FormSchema = binding.instance['schema']\n\t\tconst fieldType: string | undefined = schema.fieldtype?.toLowerCase()\n\t\tif (fieldType && NAMED_MASKS[fieldType]) {\n\t\t\tmask = NAMED_MASKS[fieldType]\n\t\t}\n\t}\n\n\treturn mask\n}\n\nfunction unmaskInput(input: string, maskToken?: string) {\n\tif (!maskToken) {\n\t\tmaskToken = '#'\n\t}\n\n\tlet unmaskedInput = input\n\tconst maskChars = [maskToken, '/', '-', '(', ')', ' ']\n\n\tfor (const char of maskChars) {\n\t\tunmaskedInput = unmaskedInput.replaceAll(char, '')\n\t}\n\n\treturn unmaskedInput\n}\n\nfunction fillMask(input: string, mask: string, maskToken?: string) {\n\tif (!maskToken) {\n\t\tmaskToken = '#'\n\t}\n\n\tlet replacement = mask\n\tfor (const inputChar of input) {\n\t\tconst replaceIndex = replacement.indexOf(maskToken)\n\t\tif (replaceIndex !== -1) {\n\t\t\tconst prefix = replacement.substring(0, replaceIndex)\n\t\t\tconst suffix = replacement.substring(replaceIndex + 1)\n\t\t\treplacement = prefix + inputChar + suffix\n\t\t}\n\t}\n\n\treturn replacement.slice(0, mask.length)\n}\n\nexport function useStringMask(el: HTMLInputElement, binding: DirectiveBinding) {\n\tconst mask = getMask(binding)\n\tif (!mask) return\n\n\tconst maskToken = '#'\n\tconst inputText = el.value\n\n\t// process input value with mask\n\tconst unmaskedInput = unmaskInput(inputText, maskToken)\n\tif (unmaskedInput) {\n\t\tconst replacement = fillMask(unmaskedInput, mask, maskToken)\n\n\t\t// TODO: (state) this is very opinionated;\n\t\t// most likely fixed with state management;\n\t\t// a better way could be to emit back to instance;\n\n\t\tif (binding.instance['maskFilled']) {\n\t\t\tbinding.instance['maskFilled'] = !replacement.includes(maskToken)\n\t\t}\n\n\t\tel.value = replacement\n\t} else {\n\t\tel.value = mask\n\t}\n}\n","\n\n\n\n\n","import { App } from 'vue'\n\nimport ACheckbox from '@/components/form/ACheckbox.vue'\nimport AComboBox from '@/components/form/AComboBox.vue'\nimport ADate from '@/components/form/ADate.vue'\nimport ADatePicker from '@/components/form/ADatePicker.vue'\nimport AFieldset from '@/components/form/AFieldset.vue'\nimport AForm from '@/components/AForm.vue'\nimport ANumericInput from '@/components/form/ANumericInput.vue'\nimport ATextInput from '@/components/form/ATextInput.vue'\n// import { ACurrency } from '@/components/form/ACurrency.vue'\n// import { AQuantity } from '@/components/form/AQuantity.vue'\n\nfunction install(app: App /* options */) {\n\tapp.component('ACheckbox', ACheckbox)\n\tapp.component('ACombobox', AComboBox)\n\tapp.component('ADate', ADate)\n\tapp.component('ADatePicker', ADatePicker)\n\tapp.component('AFieldset', AFieldset)\n\tapp.component('AForm', AForm)\n\tapp.component('ANumericInput', ANumericInput)\n\tapp.component('ATextInput', ATextInput)\n\t// app.component('ACurrency', ACurrency)\n\t// app.component('AQuantity', AQuantity)\n}\n\nexport { ACheckbox, AComboBox, ADate, ADatePicker, AFieldset, AForm, ANumericInput, ATextInput, install }\n"],"names":["checkbox","computed","props","value","emit","inputDate","newValue","M","F","j","H","Q","q","G","U","K","y","t","r","N","z","n","o","l","c","a","g","p","i","C","D","O","T","J","B","P","X","I","Y","Z","_","ee","f","u","A","E","ne","s","w","x","re","k","h","S","b","L","R","m","oe","le","ie","$","W","V","numberOfRows","numberOfColumns","todaysDate","selectedDate","ref","currentMonth","currentYear","currentDates","onMounted","cellDate","renderMonth","nextTick","$selectedDate","$todaysDate","watch","firstOfMonth","monthStartWeekday","calendarStartDay","dayIndex","previousYear","nextYear","previousMonth","nextMonth","isTodaysDate","day","isSelectedDate","selectDate","currentIndex","monthAndYear","useKeyboardNav","defaultKeypressHandlers","formData","componentProps","componentObj","propsToPass","key","childModels","val","collapsed","collapsible","formSchema","toggleCollapse","event","inputNumber","NAMED_MASKS","extractMaskFn","mask","getMask","binding","maskFn","locale","fieldType","_a","unmaskInput","input","maskToken","unmaskedInput","maskChars","char","fillMask","replacement","inputChar","replaceIndex","prefix","suffix","useStringMask","el","inputText","_sfc_main","defineComponent","context","maskFilled","inject","_resolveDirective","_withDirectives","_createElementVNode","_cache","$event","_ctx","_hoisted_1","_vModelText","_directive_mask","_toDisplayString","_hoisted_2","_hoisted_3","install","app","ACheckbox","AComboBox","ADate","ADatePicker","AFieldset","A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,gBAAiBO,CAAa,EACxCP,EAAA,UAAU,aAAcQ,EAAU,CAGvC"} \ No newline at end of file diff --git a/aform/dist/style.css b/aform/dist/style.css index 0899442d..71d8fe7b 100644 --- a/aform/dist/style.css +++ b/aform/dist/style.css @@ -1 +1 @@ -@import"https://fonts.googleapis.com/css2?family=Arimo:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap";div[data-v-743cd4db]{display:inline-block;min-width:40ch;border:1px solid transparent;padding:0rem;margin:0rem;margin-right:1ch}p[data-v-743cd4db],label[data-v-743cd4db]{color:var(--input-label-color);display:block;min-height:1.15rem;padding:0rem;margin:0rem 0rem .25rem;border:1px solid transparent}p[data-v-743cd4db]{width:100%;color:red;font-size:85%}.checkbox[data-v-743cd4db]{visibility:hidden}.checkbox+#custom-checkbox[data-v-743cd4db]:after{content:"⬡";padding:1ch 0 .5ch;font-size:120%;cursor:pointer;position:relative;left:-18px}.checkbox:checked+#custom-checkbox[data-v-743cd4db]:after{content:"⬣";padding:1ch 0 .5ch;font-size:120%;cursor:pointer;position:relative;left:-18px}#custom-checkbox[data-v-743cd4db]{display:inline-block}#checkbox-container[data-v-743cd4db]{display:inline-block;min-width:calc(100% - 1ch);outline:1px solid transparent;border:1px solid var(--input-border-color);padding:1ch .5ch .5ch 1ch;margin:.575rem 0 0;height:1.15rem;border-radius:.25rem}#checkbox-container[data-v-743cd4db]:hover{border:1px solid var(--input-active-border-color)}#checkbox-container:hover+label[data-v-743cd4db]{color:var(--input-active-label-color)}#checkbox-label[data-v-743cd4db]{z-index:2;font-size:80%;position:absolute;background:white;margin:-2.575rem 0 0 1ch;padding:0 .25ch}div[data-v-91963706]{min-width:40ch;border:1px solid transparent;padding:0rem;margin:0rem;margin-right:1ch}input[data-v-91963706]{width:calc(100% - 1ch);outline:1px solid transparent;border:1px solid var(--input-border-color);padding:1ch .5ch .5ch 1ch;margin:.575rem 0 0;min-height:1.15rem;border-radius:.25rem}p[data-v-91963706],label[data-v-91963706]{color:var(--input-label-color);display:block;min-height:1.15rem;padding:0rem;margin:0rem 0rem .25rem;border:1px solid transparent}p[data-v-91963706]{width:100%;color:red;font-size:85%}label[data-v-91963706]{z-index:2;font-size:80%;position:absolute;background:white;margin:-2.575rem 0 0 1ch;padding:0 .25ch}input[data-v-91963706]:focus{border:1px solid var(--input-active-border-color)}input:focus+label[data-v-91963706]{color:var(--input-active-label-color)}[data-v-8bc67bdf]:root{--primary-color: #0098c9;--primary-text-color: #ffffff;--brand-color: #202a44;--gray-5: #f2f2f2;--gray-10: #e6e6e6;--gray-20: #cccccc;--gray-50: #808080;--gray-60: #666666;--gray-80: #333333;--row-color-zebra-light: #eeeeee;--row-color-zebra-dark: #dddddd;--focus-cell-background: #ffffff;--focus-cell-outline: #000000;--cell-border-color: #ffffff;--cell-text-color: #3a3c41;--active-cell-background: #ffffff;--active-cell-outline: #e6a92d;--row-border-color: var(--gray-20);--header-border-color: #ffffff;--header-text-color: var(--gray-20);--row-number-background-color: #ffffff;--input-border-color: var(--gray-20);--input-label-color: var(--gray-80);--input-active-border-color: #000000;--input-active-label-color: #000000;--required-border: #e63c28;--font-size: 11pt;--font-family: Arimo, Arial, sans-serif;--table-font-size: 11pt;--atable-font-family: "Arimo", sans-serif;--atable-row-padding: 0px;--atable-row-height: 1.5em}[data-v-8bc67bdf]:root{font-family:var(--font-family)}.aform-primary-action[data-v-8bc67bdf]{font-size:100%;text-align:center;min-height:2em;padding:.25rem 1rem;border:1px solid var(--primary-color);color:var(--primary-text-color);background-color:var(--primary-color);outline:2px solid var(--primary-text-color);transition:outline-offset .2s ease;font-size:var(--font-size);margin:.5ch}.aform-primary-action[data-v-8bc67bdf]:hover,.aform-primary-action[data-v-8bc67bdf]:active{outline:2px solid var(--primary-text-color);outline-offset:-4px;transition:outline-offset .2s ease}.adatepicker[data-v-8bc67bdf]{font-size:var(--table-font-size);display:inline-table;color:var(--cell-text-color);outline:none;border-collapse:collapse}.adatepicker tr[data-v-8bc67bdf]{height:1.15rem;text-align:center;vertical-align:middle}.adatepicker td[data-v-8bc67bdf]{border:2px solid transparent;outline:2px solid transparent;min-width:3ch;max-width:3ch}.adatepicker td[data-v-8bc67bdf]:focus,.adatepicker td[data-v-8bc67bdf]:focus-within{outline-width:2px;outline-style:solid;outline-color:var(--active-cell-outline);box-shadow:none;min-height:1.15em;max-height:1.15em;overflow:hidden}.adatepicker .selectedDate[data-v-8bc67bdf]{border:2px solid var(--focus-cell-outline)}.adatepicker .todaysDate[data-v-8bc67bdf]{border-bottom-color:var(--active-cell-outline)}.collapse-button[data-v-6f1c1b45]{width:2ch;min-width:calc(66px - 4ch);background-color:transparent;font-size:150%;text-align:center;border:none;margin-top:-.5rem}.rotated[data-v-6f1c1b45]{transform:rotate(45deg);-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transition:transform .25s;transform-origin:center center}.unrotated[data-v-6f1c1b45]{transform:rotate(0);-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-ms-transform:rotate(0deg);-o-transform:rotate(0deg);transition:transform .25s}form[data-v-74d66cf2]{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:flex-start;align-items:baseline}fieldset[data-v-cad9b578]{max-width:100%;width:100%;margin-right:2ch;border:1px solid transparent;border-bottom:1px solid var(--gray-50)}legend[data-v-cad9b578]{width:100%;height:1.15rem;border:1px solid transparent;padding-bottom:.5rem;font-size:110%;font-weight:600;user-select:none}.collapse-button[data-v-cad9b578]{float:right}div[data-v-be33e6c4]{min-width:40ch;border:1px solid transparent;padding:0rem;margin:0rem;margin-right:1ch}input[data-v-be33e6c4]{width:calc(100% - 1ch);outline:1px solid transparent;border:1px solid var(--input-border-color);padding:1ch .5ch .5ch 1ch;margin:.575rem 0 0;min-height:1.15rem;border-radius:.25rem}p[data-v-be33e6c4],label[data-v-be33e6c4]{color:var(--input-label-color);display:block;min-height:1.15rem;padding:0rem;margin:0rem 0rem .25rem;border:1px solid transparent}p[data-v-be33e6c4]{width:100%;color:red;font-size:85%}label[data-v-be33e6c4]{z-index:2;font-size:80%;position:absolute;background:white;margin:-2.575rem 0 0 1ch;padding:0 .25ch}input[data-v-be33e6c4]:focus{border:1px solid var(--input-active-border-color)}input:focus+label[data-v-be33e6c4]{color:var(--input-active-label-color)}div[data-v-76dba9b8]{min-width:40ch;border:1px solid transparent;padding:0rem;margin:0rem;margin-right:1ch}input[data-v-76dba9b8]{width:calc(100% - 1ch);outline:1px solid transparent;border:1px solid var(--input-border-color);padding:1ch .5ch .5ch 1ch;margin:.575rem 0 0;min-height:1.15rem;border-radius:.25rem}p[data-v-76dba9b8],label[data-v-76dba9b8]{color:var(--input-label-color);display:block;min-height:1.15rem;padding:0rem;margin:0rem 0rem .25rem;border:1px solid transparent}p[data-v-76dba9b8]{width:100%;color:red;font-size:85%}label[data-v-76dba9b8]{z-index:2;font-size:80%;position:absolute;background:white;margin:-2.575rem 0 0 1ch;padding:0 .25ch}input[data-v-76dba9b8]:focus{border:1px solid var(--input-active-border-color)}input:focus+label[data-v-76dba9b8]{color:var(--input-active-label-color)} +@import"https://fonts.googleapis.com/css2?family=Arimo:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap";div[data-v-743cd4db]{display:inline-block;min-width:40ch;border:1px solid transparent;padding:0rem;margin:0rem;margin-right:1ch}p[data-v-743cd4db],label[data-v-743cd4db]{color:var(--input-label-color);display:block;min-height:1.15rem;padding:0rem;margin:0rem 0rem .25rem;border:1px solid transparent}p[data-v-743cd4db]{width:100%;color:red;font-size:85%}.checkbox[data-v-743cd4db]{visibility:hidden}.checkbox+#custom-checkbox[data-v-743cd4db]:after{content:"⬡";padding:1ch 0 .5ch;font-size:120%;cursor:pointer;position:relative;left:-18px}.checkbox:checked+#custom-checkbox[data-v-743cd4db]:after{content:"⬣";padding:1ch 0 .5ch;font-size:120%;cursor:pointer;position:relative;left:-18px}#custom-checkbox[data-v-743cd4db]{display:inline-block}#checkbox-container[data-v-743cd4db]{display:inline-block;min-width:calc(100% - 1ch);outline:1px solid transparent;border:1px solid var(--input-border-color);padding:1ch .5ch .5ch 1ch;margin:.575rem 0 0;height:1.15rem;border-radius:.25rem}#checkbox-container[data-v-743cd4db]:hover{border:1px solid var(--input-active-border-color)}#checkbox-container:hover+label[data-v-743cd4db]{color:var(--input-active-label-color)}#checkbox-label[data-v-743cd4db]{z-index:2;font-size:80%;position:absolute;background:white;margin:-2.575rem 0 0 1ch;padding:0 .25ch}div[data-v-91963706]{min-width:40ch;border:1px solid transparent;padding:0rem;margin:0rem;margin-right:1ch}input[data-v-91963706]{width:calc(100% - 1ch);outline:1px solid transparent;border:1px solid var(--input-border-color);padding:1ch .5ch .5ch 1ch;margin:.575rem 0 0;min-height:1.15rem;border-radius:.25rem}p[data-v-91963706],label[data-v-91963706]{color:var(--input-label-color);display:block;min-height:1.15rem;padding:0rem;margin:0rem 0rem .25rem;border:1px solid transparent}p[data-v-91963706]{width:100%;color:red;font-size:85%}label[data-v-91963706]{z-index:2;font-size:80%;position:absolute;background:white;margin:-2.575rem 0 0 1ch;padding:0 .25ch}input[data-v-91963706]:focus{border:1px solid var(--input-active-border-color)}input:focus+label[data-v-91963706]{color:var(--input-active-label-color)}[data-v-e1d2d140]:root{--primary-color: #0098c9;--primary-text-color: #ffffff;--brand-color: #202a44;--gray-5: #f2f2f2;--gray-10: #e6e6e6;--gray-20: #cccccc;--gray-50: #808080;--gray-60: #666666;--gray-80: #333333;--row-color-zebra-light: #eeeeee;--row-color-zebra-dark: #dddddd;--focus-cell-background: #ffffff;--focus-cell-outline: #000000;--cell-border-color: #ffffff;--cell-text-color: #3a3c41;--active-cell-background: #ffffff;--active-cell-outline: #e6a92d;--row-border-color: var(--gray-20);--header-border-color: #ffffff;--header-text-color: var(--gray-20);--row-number-background-color: #ffffff;--input-border-color: var(--gray-20);--input-label-color: var(--gray-80);--input-active-border-color: #000000;--input-active-label-color: #000000;--required-border: #e63c28;--font-size: 11pt;--font-family: Arimo, Arial, sans-serif;--table-font-size: 11pt;--atable-font-family: "Arimo", sans-serif;--atable-row-padding: 0px;--atable-row-height: 1.5em}[data-v-e1d2d140]:root{font-family:var(--font-family)}.aform-primary-action[data-v-e1d2d140]{font-size:100%;text-align:center;min-height:2em;padding:.25rem 1rem;border:1px solid var(--primary-color);color:var(--primary-text-color);background-color:var(--primary-color);outline:2px solid var(--primary-text-color);transition:outline-offset .2s ease;font-size:var(--font-size);margin:.5ch}.aform-primary-action[data-v-e1d2d140]:hover,.aform-primary-action[data-v-e1d2d140]:active{outline:2px solid var(--primary-text-color);outline-offset:-4px;transition:outline-offset .2s ease}.adatepicker[data-v-e1d2d140]{font-size:var(--table-font-size);display:inline-table;color:var(--cell-text-color);outline:none;border-collapse:collapse}.adatepicker tr[data-v-e1d2d140]{height:1.15rem;text-align:center;vertical-align:middle}.adatepicker td[data-v-e1d2d140]{border:2px solid transparent;outline:2px solid transparent;min-width:3ch;max-width:3ch}.adatepicker td[data-v-e1d2d140]:focus,.adatepicker td[data-v-e1d2d140]:focus-within{outline-width:2px;outline-style:solid;outline-color:var(--active-cell-outline);box-shadow:none;min-height:1.15em;max-height:1.15em;overflow:hidden}.adatepicker .selectedDate[data-v-e1d2d140]{border:2px solid var(--focus-cell-outline)}.adatepicker .todaysDate[data-v-e1d2d140]{border-bottom-color:var(--active-cell-outline)}.collapse-button[data-v-6f1c1b45]{width:2ch;min-width:calc(66px - 4ch);background-color:transparent;font-size:150%;text-align:center;border:none;margin-top:-.5rem}.rotated[data-v-6f1c1b45]{transform:rotate(45deg);-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-ms-transform:rotate(45deg);-o-transform:rotate(45deg);transition:transform .25s;transform-origin:center center}.unrotated[data-v-6f1c1b45]{transform:rotate(0);-webkit-transform:rotate(0deg);-moz-transform:rotate(0deg);-ms-transform:rotate(0deg);-o-transform:rotate(0deg);transition:transform .25s}form[data-v-74d66cf2]{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:flex-start;align-items:baseline}fieldset[data-v-cad9b578]{max-width:100%;width:100%;margin-right:2ch;border:1px solid transparent;border-bottom:1px solid var(--gray-50)}legend[data-v-cad9b578]{width:100%;height:1.15rem;border:1px solid transparent;padding-bottom:.5rem;font-size:110%;font-weight:600;user-select:none}.collapse-button[data-v-cad9b578]{float:right}div[data-v-be33e6c4]{min-width:40ch;border:1px solid transparent;padding:0rem;margin:0rem;margin-right:1ch}input[data-v-be33e6c4]{width:calc(100% - 1ch);outline:1px solid transparent;border:1px solid var(--input-border-color);padding:1ch .5ch .5ch 1ch;margin:.575rem 0 0;min-height:1.15rem;border-radius:.25rem}p[data-v-be33e6c4],label[data-v-be33e6c4]{color:var(--input-label-color);display:block;min-height:1.15rem;padding:0rem;margin:0rem 0rem .25rem;border:1px solid transparent}p[data-v-be33e6c4]{width:100%;color:red;font-size:85%}label[data-v-be33e6c4]{z-index:2;font-size:80%;position:absolute;background:white;margin:-2.575rem 0 0 1ch;padding:0 .25ch}input[data-v-be33e6c4]:focus{border:1px solid var(--input-active-border-color)}input:focus+label[data-v-be33e6c4]{color:var(--input-active-label-color)}div[data-v-76dba9b8]{min-width:40ch;border:1px solid transparent;padding:0rem;margin:0rem;margin-right:1ch}input[data-v-76dba9b8]{width:calc(100% - 1ch);outline:1px solid transparent;border:1px solid var(--input-border-color);padding:1ch .5ch .5ch 1ch;margin:.575rem 0 0;min-height:1.15rem;border-radius:.25rem}p[data-v-76dba9b8],label[data-v-76dba9b8]{color:var(--input-label-color);display:block;min-height:1.15rem;padding:0rem;margin:0rem 0rem .25rem;border:1px solid transparent}p[data-v-76dba9b8]{width:100%;color:red;font-size:85%}label[data-v-76dba9b8]{z-index:2;font-size:80%;position:absolute;background:white;margin:-2.575rem 0 0 1ch;padding:0 .25ch}input[data-v-76dba9b8]:focus{border:1px solid var(--input-active-border-color)}input:focus+label[data-v-76dba9b8]{color:var(--input-active-label-color)} diff --git a/aform/package.json b/aform/package.json index cd330d34..ef36646d 100644 --- a/aform/package.json +++ b/aform/package.json @@ -37,7 +37,7 @@ }, "devDependencies": { "@agritheory/atable": "workspace:*", - "@histoire/plugin-vue": "^0.16.1", + "@histoire/plugin-vue": "0.17.1", "@types/uuid": "^9.0.0", "@typescript-eslint/eslint-plugin": "^5.59.5", "@typescript-eslint/parser": "^5.59.5", @@ -49,7 +49,7 @@ "eslint": "^8.40.0", "eslint-config-prettier": "^8.8.0", "eslint-plugin-vue": "^9.11.1", - "histoire": "^0.16.1", + "histoire": "0.17.0", "jsdom": "^22.0.0", "typescript": "^5.0.4", "vite": "^4.3.5", diff --git a/aform/src/components/form/ADatePicker.vue b/aform/src/components/form/ADatePicker.vue index 9d1a68bc..6455b091 100644 --- a/aform/src/components/form/ADatePicker.vue +++ b/aform/src/components/form/ADatePicker.vue @@ -16,14 +16,13 @@ S - - - - - - + + + + + + + + \n\n\n","\n\n\n","import { defineComponent as w, computed as x, openBlock as m, createElementBlock as g, createElementVNode as u, withDirectives as k, isRef as P, vModelCheckbox as ve, unref as v, toDisplayString as A, vShow as S, resolveComponent as ye, createBlock as B, withCtx as ge, vModelText as H, onMounted as oe, onBeforeUnmount as he, ref as y, watch as q, getCurrentScope as _e, onScopeDispose as be, nextTick as ke, Fragment as O, renderList as $, withModifiers as we, normalizeClass as ae, pushScopeId as De, popScopeId as Ee, resolveDynamicComponent as xe, mergeProps as Ae, createTextVNode as Ce, createCommentVNode as Me, renderSlot as Te, createVNode as Ie, inject as Se, resolveDirective as Ve } from \"vue\";\nconst Oe = { id: \"checkbox-container\" }, $e = [\"id\", \"readonly\", \"required\"], Le = { id: \"custom-checkbox\" }, Pe = [\"for\"], Be = [\"innerHTML\"], He = /* @__PURE__ */ w({\n __name: \"ACheckbox\",\n props: {\n label: null,\n value: null,\n required: { type: Boolean },\n readOnly: { type: Boolean },\n uuid: null,\n validation: { default: () => ({ errorMessage: \" \" }) }\n },\n emits: [\"update:value\"],\n setup(e, { emit: t }) {\n const l = e, n = x({\n get() {\n return l.value;\n },\n set(o) {\n t(\"update:value\", o);\n }\n });\n return (o, a) => (m(), g(\"div\", null, [\n u(\"label\", Oe, [\n k(u(\"input\", {\n \"onUpdate:modelValue\": a[0] || (a[0] = (s) => P(n) ? n.value = s : null),\n type: \"checkbox\",\n id: e.uuid,\n class: \"checkbox\",\n readonly: e.readOnly,\n required: e.required\n }, null, 8, $e), [\n [ve, v(n)]\n ]),\n u(\"span\", Le, A(v(n)), 1)\n ]),\n u(\"label\", {\n for: e.uuid,\n id: \"checkbox-label\"\n }, A(e.label), 9, Pe),\n k(u(\"p\", {\n innerHTML: e.validation.errorMessage\n }, null, 8, Be), [\n [S, e.validation.errorMessage]\n ])\n ]));\n }\n});\nconst C = (e, t) => {\n const l = e.__vccOpts || e;\n for (const [n, o] of t)\n l[n] = o;\n return l;\n}, qe = /* @__PURE__ */ C(He, [[\"__scopeId\", \"data-v-743cd4db\"]]), Fe = /* @__PURE__ */ u(\"div\", null, [\n /* @__PURE__ */ u(\"input\", { type: \"text\" }),\n /* @__PURE__ */ u(\"input\", { type: \"text\" }),\n /* @__PURE__ */ u(\"input\", { type: \"text\" })\n], -1), Ue = /* @__PURE__ */ w({\n __name: \"AComboBox\",\n props: [\"event\", \"cellData\", \"tableID\"],\n setup(e) {\n return (t, l) => {\n const n = ye(\"ATableModal\");\n return m(), B(n, {\n event: e.event,\n cellData: e.cellData,\n class: \"amodal\"\n }, {\n default: ge(() => [\n Fe\n ]),\n _: 1\n }, 8, [\"event\", \"cellData\"]);\n };\n }\n}), Ne = [\"id\", \"disabled\", \"required\"], Re = [\"for\"], Qe = [\"innerHTML\"], Ye = /* @__PURE__ */ w({\n __name: \"ADate\",\n props: {\n label: null,\n modelValue: null,\n required: { type: Boolean },\n readonly: { type: Boolean },\n uuid: null,\n validation: { default: () => ({ errorMessage: \" \" }) }\n },\n emits: [\"update:modelValue\"],\n setup(e, { emit: t }) {\n const l = e, n = x({\n get: () => l.modelValue,\n set: (o) => {\n t(\"update:modelValue\", o);\n }\n });\n return (o, a) => (m(), g(\"div\", null, [\n k(u(\"input\", {\n \"onUpdate:modelValue\": a[0] || (a[0] = (s) => P(n) ? n.value = s : null),\n type: \"date\",\n id: e.uuid,\n disabled: e.readonly,\n required: e.required\n }, null, 8, Ne), [\n [H, v(n)]\n ]),\n u(\"label\", { for: e.uuid }, A(e.label), 9, Re),\n k(u(\"p\", {\n innerHTML: e.validation.errorMessage\n }, null, 8, Qe), [\n [S, e.validation.errorMessage]\n ])\n ]));\n }\n});\nconst je = /* @__PURE__ */ C(Ye, [[\"__scopeId\", \"data-v-5ae6697e\"]]);\nvar Y;\nconst se = typeof window < \"u\", We = (e) => typeof e == \"string\", Ge = () => {\n};\nse && (Y = window == null ? void 0 : window.navigator) != null && Y.userAgent && /iP(ad|hone|od)/.test(window.navigator.userAgent);\nfunction re(e) {\n return typeof e == \"function\" ? e() : v(e);\n}\nfunction ze(e) {\n return e;\n}\nfunction Je(e) {\n return _e() ? (be(e), !0) : !1;\n}\nfunction L(e) {\n var t;\n const l = re(e);\n return (t = l == null ? void 0 : l.$el) != null ? t : l;\n}\nconst ue = se ? window : void 0;\nfunction Ke(...e) {\n let t, l, n, o;\n if (We(e[0]) || Array.isArray(e[0]) ? ([l, n, o] = e, t = ue) : [t, l, n, o] = e, !t)\n return Ge;\n Array.isArray(l) || (l = [l]), Array.isArray(n) || (n = [n]);\n const a = [], s = () => {\n a.forEach((p) => p()), a.length = 0;\n }, r = (p, b, h, d) => (p.addEventListener(b, h, d), () => p.removeEventListener(b, h, d)), i = q(() => [L(t), re(o)], ([p, b]) => {\n s(), p && a.push(...l.flatMap((h) => n.map((d) => r(p, h, d, b))));\n }, { immediate: !0, flush: \"post\" }), c = () => {\n i(), s();\n };\n return Je(c), c;\n}\nconst j = typeof globalThis < \"u\" ? globalThis : typeof window < \"u\" ? window : typeof global < \"u\" ? global : typeof self < \"u\" ? self : {}, W = \"__vueuse_ssr_handlers__\";\nj[W] = j[W] || {};\nfunction Xe(e, { window: t = ue, scrollTarget: l } = {}) {\n const n = y(!1), o = () => {\n if (!t)\n return;\n const a = t.document, s = L(e);\n if (!s)\n n.value = !1;\n else {\n const r = s.getBoundingClientRect();\n n.value = r.top <= (t.innerHeight || a.documentElement.clientHeight) && r.left <= (t.innerWidth || a.documentElement.clientWidth) && r.bottom >= 0 && r.right >= 0;\n }\n };\n return q(() => L(e), () => o(), { immediate: !0, flush: \"post\" }), t && Ke(l || t, \"scroll\", o, {\n capture: !1,\n passive: !0\n }), n;\n}\nvar G;\n(function(e) {\n e.UP = \"UP\", e.RIGHT = \"RIGHT\", e.DOWN = \"DOWN\", e.LEFT = \"LEFT\", e.NONE = \"NONE\";\n})(G || (G = {}));\nvar Ze = Object.defineProperty, z = Object.getOwnPropertySymbols, et = Object.prototype.hasOwnProperty, tt = Object.prototype.propertyIsEnumerable, J = (e, t, l) => t in e ? Ze(e, t, { enumerable: !0, configurable: !0, writable: !0, value: l }) : e[t] = l, nt = (e, t) => {\n for (var l in t || (t = {}))\n et.call(t, l) && J(e, l, t[l]);\n if (z)\n for (var l of z(t))\n tt.call(t, l) && J(e, l, t[l]);\n return e;\n};\nconst lt = {\n easeInSine: [0.12, 0, 0.39, 0],\n easeOutSine: [0.61, 1, 0.88, 1],\n easeInOutSine: [0.37, 0, 0.63, 1],\n easeInQuad: [0.11, 0, 0.5, 0],\n easeOutQuad: [0.5, 1, 0.89, 1],\n easeInOutQuad: [0.45, 0, 0.55, 1],\n easeInCubic: [0.32, 0, 0.67, 0],\n easeOutCubic: [0.33, 1, 0.68, 1],\n easeInOutCubic: [0.65, 0, 0.35, 1],\n easeInQuart: [0.5, 0, 0.75, 0],\n easeOutQuart: [0.25, 1, 0.5, 1],\n easeInOutQuart: [0.76, 0, 0.24, 1],\n easeInQuint: [0.64, 0, 0.78, 0],\n easeOutQuint: [0.22, 1, 0.36, 1],\n easeInOutQuint: [0.83, 0, 0.17, 1],\n easeInExpo: [0.7, 0, 0.84, 0],\n easeOutExpo: [0.16, 1, 0.3, 1],\n easeInOutExpo: [0.87, 0, 0.13, 1],\n easeInCirc: [0.55, 0, 1, 0.45],\n easeOutCirc: [0, 0.55, 0.45, 1],\n easeInOutCirc: [0.85, 0, 0.15, 1],\n easeInBack: [0.36, 0, 0.66, -0.56],\n easeOutBack: [0.34, 1.56, 0.64, 1],\n easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\nnt({\n linear: ze\n}, lt);\nconst D = (e) => {\n let t = Xe(e).value;\n return t = t && e.offsetHeight > 0, t;\n}, E = (e) => e.tabIndex >= 0, K = (e) => {\n const t = e.target;\n return F(t);\n}, F = (e) => {\n var t;\n let l;\n if (e instanceof HTMLTableCellElement) {\n const n = (t = e.parentElement) == null ? void 0 : t.previousElementSibling;\n if (n) {\n const o = Array.from(n.children)[e.cellIndex];\n o && (l = o);\n }\n } else if (e instanceof HTMLTableRowElement) {\n const n = e.previousElementSibling;\n n && (l = n);\n }\n return l && (!E(l) || !D(l)) ? F(l) : l;\n}, ot = (e) => {\n var t;\n const l = e.target;\n let n;\n if (l instanceof HTMLTableCellElement) {\n const o = (t = l.parentElement) == null ? void 0 : t.parentElement;\n if (o) {\n const a = o.firstElementChild.children[l.cellIndex];\n a && (n = a);\n }\n } else if (l instanceof HTMLTableRowElement) {\n const o = l.parentElement;\n if (o) {\n const a = o.firstElementChild;\n a && (n = a);\n }\n }\n return n && (!E(n) || !D(n)) ? U(n) : n;\n}, X = (e) => {\n const t = e.target;\n return U(t);\n}, U = (e) => {\n var t;\n let l;\n if (e instanceof HTMLTableCellElement) {\n const n = (t = e.parentElement) == null ? void 0 : t.nextElementSibling;\n if (n) {\n const o = Array.from(n.children)[e.cellIndex];\n o && (l = o);\n }\n } else if (e instanceof HTMLTableRowElement) {\n const n = e.nextElementSibling;\n n && (l = n);\n }\n return l && (!E(l) || !D(l)) ? U(l) : l;\n}, at = (e) => {\n var t;\n const l = e.target;\n let n;\n if (l instanceof HTMLTableCellElement) {\n const o = (t = l.parentElement) == null ? void 0 : t.parentElement;\n if (o) {\n const a = o.lastElementChild.children[l.cellIndex];\n a && (n = a);\n }\n } else if (l instanceof HTMLTableRowElement) {\n const o = l.parentElement;\n if (o) {\n const a = o.lastElementChild;\n a && (n = a);\n }\n }\n return n && (!E(n) || !D(n)) ? F(n) : n;\n}, Z = (e) => {\n const t = e.target;\n return N(t);\n}, N = (e) => {\n var t;\n let l;\n if (e.previousElementSibling)\n l = e.previousElementSibling;\n else {\n const n = (t = e.parentElement) == null ? void 0 : t.previousElementSibling;\n l = n == null ? void 0 : n.lastElementChild;\n }\n return l && (!E(l) || !D(l)) ? N(l) : l;\n}, ee = (e) => {\n const t = e.target;\n return R(t);\n}, R = (e) => {\n var t;\n let l;\n if (e.nextElementSibling)\n l = e.nextElementSibling;\n else {\n const n = (t = e.parentElement) == null ? void 0 : t.nextElementSibling;\n l = n == null ? void 0 : n.firstElementChild;\n }\n return l && (!E(l) || !D(l)) ? R(l) : l;\n}, te = (e) => {\n const t = e.target.parentElement.firstElementChild;\n return t && (!E(t) || !D(t)) ? R(t) : t;\n}, ne = (e) => {\n const t = e.target.parentElement.lastElementChild;\n return t && (!E(t) || !D(t)) ? N(t) : t;\n}, V = [\"alt\", \"control\", \"shift\", \"meta\"], st = {\n ArrowUp: \"up\",\n ArrowDown: \"down\",\n ArrowLeft: \"left\",\n ArrowRight: \"right\"\n}, ie = {\n \"keydown.up\": (e) => {\n const t = K(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.down\": (e) => {\n const t = X(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.left\": (e) => {\n const t = Z(e);\n e.preventDefault(), e.stopPropagation(), t && t.focus();\n },\n \"keydown.right\": (e) => {\n const t = ee(e);\n e.preventDefault(), e.stopPropagation(), t && t.focus();\n },\n \"keydown.control.up\": (e) => {\n const t = ot(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.down\": (e) => {\n const t = at(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.left\": (e) => {\n const t = te(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.right\": (e) => {\n const t = ne(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.end\": (e) => {\n const t = ne(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.enter\": (e) => {\n if (e.target instanceof HTMLTableCellElement) {\n e.preventDefault(), e.stopPropagation();\n const t = X(e);\n t && t.focus();\n }\n },\n \"keydown.shift.enter\": (e) => {\n if (e.target instanceof HTMLTableCellElement) {\n e.preventDefault(), e.stopPropagation();\n const t = K(e);\n t && t.focus();\n }\n },\n \"keydown.home\": (e) => {\n const t = te(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.tab\": (e) => {\n const t = ee(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.shift.tab\": (e) => {\n const t = Z(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n }\n};\nfunction rt(e) {\n const t = (n) => {\n let o = null;\n n.parent && (typeof n.parent == \"string\" ? o = document.querySelector(n.parent) : n.parent instanceof Element ? o = n.parent : o = n.parent.value);\n let a = [];\n if (n.selectors)\n if (typeof n.selectors == \"string\")\n a = o ? Array.from(o.querySelectorAll(n.selectors)) : Array.from(document.querySelectorAll(n.selectors));\n else if (n.selectors instanceof Element)\n a.push(n.selectors);\n else if (Array.isArray(n.selectors.value))\n for (const s of n.selectors.value)\n s instanceof Element ? a.push(s) : a.push(s.$el);\n else\n a.push(n.selectors.value);\n else\n a = Array.from(o.children).filter((s) => E(s) && D(s));\n return a;\n }, l = (n) => (o) => {\n const a = st[o.key] || o.key.toLowerCase();\n if (V.includes(a))\n return;\n const s = n.handlers || ie;\n for (const r of Object.keys(s)) {\n const [i, ...c] = r.split(\".\");\n if (i === \"keydown\" && c.includes(a)) {\n const p = s[r], b = c.filter((d) => V.includes(d)), h = V.some((d) => {\n const M = d.charAt(0).toUpperCase() + d.slice(1);\n return o.getModifierState(M);\n });\n if (b.length > 0) {\n if (h) {\n for (const d of V)\n if (c.includes(d)) {\n const M = d.charAt(0).toUpperCase() + d.slice(1);\n o.getModifierState(M) && p(o);\n }\n }\n } else\n h || p(o);\n }\n }\n };\n oe(() => {\n for (const n of e) {\n const o = t(n);\n for (const a of o)\n a.addEventListener(\"keydown\", l(n));\n }\n }), he(() => {\n for (const n of e) {\n const o = t(n);\n for (const a of o)\n a.removeEventListener(\"keydown\", l(n));\n }\n });\n}\nconst ut = (e) => (De(\"data-v-0d8a7adf\"), e = e(), Ee(), e), it = [\"event\"], ct = { colspan: \"5\" }, dt = /* @__PURE__ */ ut(() => /* @__PURE__ */ u(\"tr\", null, [\n /* @__PURE__ */ u(\"td\", null, \"M\"),\n /* @__PURE__ */ u(\"td\", null, \"T\"),\n /* @__PURE__ */ u(\"td\", null, \"W\"),\n /* @__PURE__ */ u(\"td\", null, \"T\"),\n /* @__PURE__ */ u(\"td\", null, \"F\"),\n /* @__PURE__ */ u(\"td\", null, \"S\"),\n /* @__PURE__ */ u(\"td\", null, \"S\")\n], -1)), pt = [\"onClick\"], ft = /* @__PURE__ */ w({\n __name: \"ADatePicker\",\n props: {\n modelValue: null,\n event: null\n },\n emits: [\"modelValue\"],\n setup(e, { emit: t }) {\n const l = e, n = 6, o = 7, a = /* @__PURE__ */ new Date(), s = y(l.modelValue || void 0), r = y(), i = y(), c = y([]);\n oe(async () => {\n let f = /* @__PURE__ */ new Date();\n f ? (s.value = f, r.value = s.value.getMonth(), i.value = s.value.getFullYear()) : (r.value = a.getMonth(), i.value = a.getFullYear()), p(), await ke();\n const I = document.getElementsByClassName(\"selecteddate\");\n if (I.length > 0)\n I[0].focus();\n else {\n const _ = document.getElementsByClassName(\"todaysdate\");\n _.length > 0 && _[0].focus();\n }\n }), q([r, i], () => {\n p();\n });\n const p = () => {\n c.value = [];\n const f = new Date(i.value, r.value, 1), I = f.getDay(), _ = f.setDate(f.getDate() - I);\n for (let T of Array(43).keys())\n c.value.push(_ + T * 864e5);\n }, b = () => {\n i.value -= 1;\n }, h = () => {\n i.value += 1;\n }, d = () => {\n r.value == 0 ? (r.value = 11, b()) : r.value -= 1;\n }, M = () => {\n r.value == 11 ? (r.value = 0, h()) : r.value += 1;\n }, de = (f) => {\n if (r.value === a.getMonth())\n return a.toDateString() === new Date(f).toDateString();\n }, pe = (f) => new Date(f).toDateString() === new Date(s.value).toDateString();\n x({\n get: () => modelValue.value,\n set: (f) => {\n Q(f);\n }\n });\n const Q = (f) => {\n s.value = new Date(c.value[f]), t(\"modelValue\", s.value.getTime());\n }, fe = x(() => new Date(i.value, r.value, 1).toLocaleDateString(void 0, {\n year: \"numeric\",\n month: \"long\"\n }));\n return rt([\n {\n parent: \"table.adate\",\n selectors: \"td\",\n handlers: {\n ...ie,\n \"keydown.pageup\": d,\n \"keydown.shift.pageup\": b,\n \"keydown.pagedown\": M,\n \"keydown.shift.pagedown\": h,\n // 'keydown.tab': selectDate // select this date\n // 'keydown.enter': selectDate // select this date\n \"keydown.shift.tab\": () => {\n },\n // disable - not working\n \"keydown.shift.enter\": () => {\n }\n }\n }\n ]), (f, I) => (m(), g(\"div\", {\n event: e.event,\n class: \"adatepicker\",\n tabindex: \"0\",\n ref: \"adatepicker\"\n }, [\n u(\"table\", null, [\n u(\"tr\", null, [\n u(\"td\", {\n onClick: d,\n tabindex: -1\n }, \"<\"),\n u(\"th\", ct, A(v(fe)), 1),\n u(\"td\", {\n onClick: M,\n tabindex: -1\n }, \">\")\n ]),\n dt,\n (m(), g(O, null, $(n, (_) => u(\"tr\", { key: _ }, [\n (m(), g(O, null, $(o, (T) => u(\"td\", {\n key: (_ - 1) * o + T,\n contenteditable: !1,\n spellcheck: !1,\n tabindex: 0,\n onClick: we((me) => Q(me), [\"prevent\", \"stop\"]),\n class: ae({\n todaysDate: de(c.value[(_ - 1) * o + T]),\n selectedDate: pe(c.value[(_ - 1) * o + T])\n })\n }, A(new Date(c.value[(_ - 1) * o + T]).getDate()), 11, pt)), 64))\n ])), 64))\n ])\n ], 8, it));\n }\n});\nconst mt = /* @__PURE__ */ C(ft, [[\"__scopeId\", \"data-v-0d8a7adf\"]]), vt = /* @__PURE__ */ w({\n __name: \"CollapseButton\",\n props: {\n collapsed: { type: Boolean }\n },\n setup(e) {\n return (t, l) => (m(), g(\"button\", {\n class: ae([\"collapse-button\", e.collapsed ? \"rotated\" : \"unrotated\"])\n }, \"×\", 2));\n }\n});\nconst yt = /* @__PURE__ */ C(vt, [[\"__scopeId\", \"data-v-6f1c1b45\"]]), gt = /* @__PURE__ */ w({\n __name: \"AForm\",\n props: {\n modelValue: null,\n data: null,\n readonly: { type: Boolean }\n },\n emits: [\"update:modelValue\"],\n setup(e, { emit: t }) {\n const l = e, n = y(l.data || {}), o = (s) => {\n let r = {};\n for (const [i, c] of Object.entries(s))\n [\"component\", \"fieldtype\"].includes(i) || (r[i] = c), i === \"rows\" && c && c.length === 0 && (r.rows = n.value[s.fieldname]);\n return r;\n }, a = x({\n get: () => l.modelValue.map((s, r) => x({\n get() {\n return s.value;\n },\n set: (i) => {\n l.modelValue[r].value = i, t(\"update:modelValue\", l.modelValue);\n }\n })),\n set: () => {\n }\n });\n return (s, r) => (m(), g(\"form\", null, [\n (m(!0), g(O, null, $(e.modelValue, (i, c) => (m(), B(xe(i.component), Ae({\n key: c,\n schema: i,\n modelValue: v(a)[c].value,\n \"onUpdate:modelValue\": (p) => v(a)[c].value = p,\n data: n.value[i.fieldname],\n readonly: e.readonly\n }, o(i)), null, 16, [\"schema\", \"modelValue\", \"onUpdate:modelValue\", \"data\", \"readonly\"]))), 128))\n ]));\n }\n});\nconst ce = /* @__PURE__ */ C(gt, [[\"__scopeId\", \"data-v-74d66cf2\"]]), ht = /* @__PURE__ */ w({\n __name: \"AFieldset\",\n props: {\n schema: null,\n label: null,\n collapsible: { type: Boolean },\n data: null\n },\n setup(e) {\n const t = e, l = y(t.data || []);\n let n = y(!1), o = y(t.collapsible);\n const a = y(t.schema);\n function s(r) {\n r.preventDefault(), o.value && (n.value = !n.value);\n }\n return (r, i) => (m(), g(\"fieldset\", null, [\n u(\"legend\", {\n onClick: s,\n onSubmit: s\n }, [\n Ce(A(e.label) + \" \", 1),\n v(o) ? (m(), B(yt, {\n key: 0,\n collapsed: v(n)\n }, null, 8, [\"collapsed\"])) : Me(\"\", !0)\n ], 32),\n Te(r.$slots, \"default\", { collapsed: v(n) }, () => [\n k(Ie(ce, {\n modelValue: a.value,\n \"onUpdate:modelValue\": i[0] || (i[0] = (c) => a.value = c),\n data: l.value\n }, null, 8, [\"modelValue\", \"data\"]), [\n [S, !v(n)]\n ])\n ], !0)\n ]));\n }\n});\nconst _t = /* @__PURE__ */ C(ht, [[\"__scopeId\", \"data-v-cad9b578\"]]), bt = [\"id\", \"disabled\", \"required\"], kt = [\"for\"], wt = [\"innerHTML\"], Dt = /* @__PURE__ */ w({\n __name: \"ANumericInput\",\n props: {\n label: null,\n modelValue: null,\n required: { type: Boolean },\n readonly: { type: Boolean },\n uuid: null,\n validation: { default: () => ({ errorMessage: \" \" }) }\n },\n emits: [\"update:modelValue\"],\n setup(e, { emit: t }) {\n const l = e, n = x({\n get: () => l.modelValue,\n set: (o) => {\n t(\"update:modelValue\", o);\n }\n });\n return (o, a) => (m(), g(\"div\", null, [\n k(u(\"input\", {\n \"onUpdate:modelValue\": a[0] || (a[0] = (s) => P(n) ? n.value = s : null),\n type: \"number\",\n id: e.uuid,\n disabled: e.readonly,\n required: e.required\n }, null, 8, bt), [\n [H, v(n)]\n ]),\n u(\"label\", { for: e.uuid }, A(e.label), 9, kt),\n k(u(\"p\", {\n innerHTML: e.validation.errorMessage\n }, null, 8, wt), [\n [S, e.validation.errorMessage]\n ])\n ]));\n }\n});\nconst Et = /* @__PURE__ */ C(Dt, [[\"__scopeId\", \"data-v-be33e6c4\"]]), le = {\n date: \"##/##/####\",\n datetime: \"####/##/## ##:##\",\n time: \"##:##\",\n fulltime: \"##:##:##\",\n phone: \"(###) ### - ####\",\n card: \"#### #### #### ####\"\n};\nfunction xt(e) {\n try {\n return Function(`\"use strict\";return (${e})`)();\n } catch {\n }\n}\nfunction At(e) {\n var l;\n let t = e.value;\n if (t) {\n const n = xt(t);\n if (n) {\n const o = e.instance.locale;\n t = n(o);\n }\n } else {\n const o = (l = e.instance.schema.fieldtype) == null ? void 0 : l.toLowerCase();\n o && le[o] && (t = le[o]);\n }\n return t;\n}\nfunction Ct(e, t) {\n t || (t = \"#\");\n let l = e;\n const n = [t, \"/\", \"-\", \"(\", \")\", \" \"];\n for (const o of n)\n l = l.replaceAll(o, \"\");\n return l;\n}\nfunction Mt(e, t, l) {\n l || (l = \"#\");\n let n = t;\n for (const o of e) {\n const a = n.indexOf(l);\n if (a !== -1) {\n const s = n.substring(0, a), r = n.substring(a + 1);\n n = s + o + r;\n }\n }\n return n.slice(0, t.length);\n}\nfunction Tt(e, t) {\n const l = At(t);\n if (!l)\n return;\n const n = \"#\", o = e.value, a = Ct(o, n);\n if (a) {\n const s = Mt(a, l, n);\n t.instance.maskFilled && (t.instance.maskFilled = !s.includes(n)), e.value = s;\n } else\n e.value = l;\n}\nconst It = w({\n name: \"ATextInput\",\n props: {\n schema: {\n type: Object,\n required: !0\n },\n label: {\n type: String,\n required: !0\n },\n modelValue: {\n type: null\n },\n mask: {\n type: String\n },\n required: {\n type: Boolean\n },\n readonly: {\n type: Boolean\n },\n uuid: {\n type: String\n },\n validation: {\n type: Object,\n default: () => ({ errorMessage: \" \" })\n }\n },\n setup(e, t) {\n const l = y(!1), n = Se(\"locale\", \"\");\n return { inputText: x({\n get() {\n return e.modelValue;\n },\n set(a) {\n t.emit(\"update:modelValue\", a);\n }\n }), locale: n, maskFilled: l };\n },\n directives: {\n mask: Tt\n }\n});\nconst St = [\"id\", \"disabled\", \"maxlength\", \"required\"], Vt = [\"for\"], Ot = [\"innerHTML\"];\nfunction $t(e, t, l, n, o, a) {\n const s = Ve(\"mask\");\n return m(), g(\"div\", null, [\n k(u(\"input\", {\n \"onUpdate:modelValue\": t[0] || (t[0] = (r) => e.inputText = r),\n id: e.uuid,\n disabled: e.readonly,\n maxlength: e.mask ? e.maskFilled && e.mask.length : void 0,\n required: e.required\n }, null, 8, St), [\n [H, e.inputText],\n [s, e.mask]\n ]),\n u(\"label\", { for: e.uuid }, A(e.label), 9, Vt),\n k(u(\"p\", {\n innerHTML: e.validation.errorMessage\n }, null, 8, Ot), [\n [S, e.validation.errorMessage]\n ])\n ]);\n}\nconst Lt = /* @__PURE__ */ C(It, [[\"render\", $t], [\"__scopeId\", \"data-v-76dba9b8\"]]);\nfunction Bt(e) {\n e.component(\"ACheckbox\", qe), e.component(\"ACombobox\", Ue), e.component(\"ADate\", je), e.component(\"ADatePicker\", mt), e.component(\"AFieldset\", _t), e.component(\"AForm\", ce), e.component(\"ANumericInput\", Et), e.component(\"ATextInput\", Lt);\n}\nexport {\n qe as ACheckbox,\n Ue as AComboBox,\n je as ADate,\n mt as ADatePicker,\n _t as AFieldset,\n ce as AForm,\n Et as ANumericInput,\n Lt as ATextInput,\n Bt as install\n};\n//# sourceMappingURL=aform.js.map\n","import { effectScope, ref, markRaw, toRaw, getCurrentInstance, inject, watch, unref, reactive, isRef, isReactive, toRef, nextTick, computed, getCurrentScope, onScopeDispose, toRefs, onBeforeMount, shallowRef, defineComponent, h as h$1, provide, watchEffect } from \"vue\";\nclass Stonecrop {\n /**\n * @constructor\n * @param {Registry} registry - The immutable registry\n * @param {ReturnType} store - The mutable Pinia store\n * @param {Schema} [schema] - (optional) The Stonecrop schema\n * @param {ImmutableDoctype['workflow']} [workflow] - (optional) The Stonecrop workflow\n * @param {ImmutableDoctype['actions']} [actions] - (optional) The Stonecrop actions\n * @returns {Stonecrop} The Stonecrop instance\n */\n constructor(registry, store, schema, workflow, actions) {\n this.name = \"Stonecrop\";\n if (Stonecrop._root) {\n return Stonecrop._root;\n }\n Stonecrop._root = this;\n this.registry = registry;\n this.store = store;\n this.schema = schema;\n this.workflow = workflow;\n this.actions = actions;\n }\n /**\n * @method setup\n * @param {DoctypeMeta} doctype - The doctype to setup\n * @returns {void}\n * @description Sets up the Stonecrop instance with the given doctype\n * @example\n * const doctype = await registry.doctypeLoader('Task')\n * stonecrop.setup(doctype)\n */\n setup(doctype) {\n this.getMeta(doctype);\n this.getWorkflow(doctype);\n this.getActions(doctype);\n }\n /**\n * @method getMeta\n * @param {DoctypeMeta} doctype - The doctype to get meta for\n * @returns {void}\n * @description Gets the meta for the given doctype\n * @example\n * const doctype = await registry.doctypeLoader('Task')\n * stonecrop.getMeta(doctype)\n */\n getMeta(doctype) {\n this.schema = { doctype: doctype.doctype, schema: doctype.schema };\n }\n /**\n * @method getWorkflow\n * @param {DoctypeMeta} doctype - The doctype to get workflow for\n * @returns {void}\n * @description Gets the workflow for the given doctype\n * @example\n * const doctype = await registry.doctypeLoader('Task')\n * stonecrop.getWorkflow(doctype)\n */\n getWorkflow(doctype) {\n const doctypeRegistry = this.registry.registry[doctype.slug];\n this.workflow = doctypeRegistry.workflow;\n }\n /**\n * @method getActions\n * @param {DoctypeMeta} doctype - The doctype to get actions for\n * @returns {void}\n * @description Gets the actions for the given doctype\n * @example\n * const doctype = await registry.doctypeLoader('Task')\n * stonecrop.getActions(doctype)\n */\n getActions(doctype) {\n const doctypeRegistry = this.registry.registry[doctype.slug];\n this.actions = doctypeRegistry.actions;\n }\n /**\n * @method getRecords\n * @param {DoctypeMeta} doctype - The doctype to get records for\n * @param {RequestInit} [filters] - The filters to apply to the records\n * @returns {Promise}\n * @description Gets the records for the given doctype\n * @example\n * const doctype = await registry.doctypeLoader('Task')\n * await stonecrop.getRecords(doctype)\n * @example\n * const doctype = await registry.doctypeLoader('Task')\n * const filters = JSON.stringify({ status: 'Open' })\n * await stonecrop.getRecords(doctype, { body: filters })\n */\n async getRecords(doctype, filters) {\n this.store.$patch({ records: [] });\n const records = await fetch(`/${doctype.slug}`, filters);\n const data = await records.json();\n this.store.$patch({ records: data });\n }\n /**\n * @method getRecord\n * @param {DoctypeMeta} doctype - The doctype to get record for\n * @param {string} id - The id of the record to get\n * @returns {Promise}\n * @description Gets the record for the given doctype and id\n * @example\n * const doctype = await registry.doctypeLoader('Task')\n * await stonecrop.getRecord(doctype, 'TASK-00001')\n */\n async getRecord(doctype, id) {\n this.store.$patch({ record: {} });\n const record = await fetch(`/${doctype.slug}/${id}`);\n const data = await record.json();\n this.store.$patch({ record: data });\n }\n /**\n * @method runAction\n * @param {DoctypeMeta} doctype - The doctype to run action for\n * @param {string} action - The action to run\n * @param {string[]} [id] - The id(s) of the record(s) to run action on\n * @returns {void}\n * @description Runs the action for the given doctype and id\n * @example\n * const doctype = await registry.doctypeLoader('Task')\n * stonecrop.runAction(doctype, 'CREATE')\n * @example\n * const doctype = await registry.doctypeLoader('Task')\n * stonecrop.runAction(doctype, 'UPDATE', ['TASK-00001'])\n * @example\n * const doctype = await registry.doctypeLoader('Task')\n * stonecrop.runAction(doctype, 'DELETE', ['TASK-00001'])\n * @example\n * const doctype = await registry.doctypeLoader('Task')\n * stonecrop.runAction(doctype, 'TRANSITION', ['TASK-00001', 'TASK-00002'])\n */\n runAction(doctype, action, id) {\n const doctypeRegistry = this.registry.registry[doctype.slug];\n const actions = doctypeRegistry.actions.get(action);\n const { initialState } = this.workflow;\n this.workflow.transition(initialState, { type: action });\n if (actions.length > 0) {\n actions.forEach((action2) => {\n const actionFn = new Function(action2);\n actionFn(id);\n });\n }\n }\n}\nvar isVue2 = false;\nfunction set(target, key, val) {\n if (Array.isArray(target)) {\n target.length = Math.max(target.length, key);\n target.splice(key, 1, val);\n return val;\n }\n target[key] = val;\n return val;\n}\nfunction del(target, key) {\n if (Array.isArray(target)) {\n target.splice(key, 1);\n return;\n }\n delete target[key];\n}\nfunction getDevtoolsGlobalHook$1() {\n return getTarget$1().__VUE_DEVTOOLS_GLOBAL_HOOK__;\n}\nfunction getTarget$1() {\n return typeof navigator !== \"undefined\" && typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : {};\n}\nconst isProxyAvailable$1 = typeof Proxy === \"function\";\nconst HOOK_SETUP$1 = \"devtools-plugin:setup\";\nconst HOOK_PLUGIN_SETTINGS_SET$1 = \"plugin:settings:set\";\nlet supported$1;\nlet perf$1;\nfunction isPerformanceSupported$1() {\n var _a;\n if (supported$1 !== void 0) {\n return supported$1;\n }\n if (typeof window !== \"undefined\" && window.performance) {\n supported$1 = true;\n perf$1 = window.performance;\n } else if (typeof global !== \"undefined\" && ((_a = global.perf_hooks) === null || _a === void 0 ? void 0 : _a.performance)) {\n supported$1 = true;\n perf$1 = global.perf_hooks.performance;\n } else {\n supported$1 = false;\n }\n return supported$1;\n}\nfunction now$2() {\n return isPerformanceSupported$1() ? perf$1.now() : Date.now();\n}\nlet ApiProxy$1 = class ApiProxy {\n constructor(plugin, hook) {\n this.target = null;\n this.targetQueue = [];\n this.onQueue = [];\n this.plugin = plugin;\n this.hook = hook;\n const defaultSettings = {};\n if (plugin.settings) {\n for (const id in plugin.settings) {\n const item = plugin.settings[id];\n defaultSettings[id] = item.defaultValue;\n }\n }\n const localSettingsSaveId = `__vue-devtools-plugin-settings__${plugin.id}`;\n let currentSettings = Object.assign({}, defaultSettings);\n try {\n const raw = localStorage.getItem(localSettingsSaveId);\n const data = JSON.parse(raw);\n Object.assign(currentSettings, data);\n } catch (e) {\n }\n this.fallbacks = {\n getSettings() {\n return currentSettings;\n },\n setSettings(value) {\n try {\n localStorage.setItem(localSettingsSaveId, JSON.stringify(value));\n } catch (e) {\n }\n currentSettings = value;\n },\n now() {\n return now$2();\n }\n };\n if (hook) {\n hook.on(HOOK_PLUGIN_SETTINGS_SET$1, (pluginId, value) => {\n if (pluginId === this.plugin.id) {\n this.fallbacks.setSettings(value);\n }\n });\n }\n this.proxiedOn = new Proxy({}, {\n get: (_target, prop) => {\n if (this.target) {\n return this.target.on[prop];\n } else {\n return (...args) => {\n this.onQueue.push({\n method: prop,\n args\n });\n };\n }\n }\n });\n this.proxiedTarget = new Proxy({}, {\n get: (_target, prop) => {\n if (this.target) {\n return this.target[prop];\n } else if (prop === \"on\") {\n return this.proxiedOn;\n } else if (Object.keys(this.fallbacks).includes(prop)) {\n return (...args) => {\n this.targetQueue.push({\n method: prop,\n args,\n resolve: () => {\n }\n });\n return this.fallbacks[prop](...args);\n };\n } else {\n return (...args) => {\n return new Promise((resolve) => {\n this.targetQueue.push({\n method: prop,\n args,\n resolve\n });\n });\n };\n }\n }\n });\n }\n async setRealTarget(target) {\n this.target = target;\n for (const item of this.onQueue) {\n this.target.on[item.method](...item.args);\n }\n for (const item of this.targetQueue) {\n item.resolve(await this.target[item.method](...item.args));\n }\n }\n};\nfunction setupDevtoolsPlugin$1(pluginDescriptor, setupFn) {\n const descriptor = pluginDescriptor;\n const target = getTarget$1();\n const hook = getDevtoolsGlobalHook$1();\n const enableProxy = isProxyAvailable$1 && descriptor.enableEarlyProxy;\n if (hook && (target.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !enableProxy)) {\n hook.emit(HOOK_SETUP$1, pluginDescriptor, setupFn);\n } else {\n const proxy = enableProxy ? new ApiProxy$1(descriptor, hook) : null;\n const list = target.__VUE_DEVTOOLS_PLUGINS__ = target.__VUE_DEVTOOLS_PLUGINS__ || [];\n list.push({\n pluginDescriptor: descriptor,\n setupFn,\n proxy\n });\n if (proxy)\n setupFn(proxy.proxiedTarget);\n }\n}\n/*!\n * pinia v2.0.33\n * (c) 2023 Eduardo San Martin Morote\n * @license MIT\n */\nlet activePinia;\nconst setActivePinia = (pinia2) => activePinia = pinia2;\nconst piniaSymbol = process.env.NODE_ENV !== \"production\" ? Symbol(\"pinia\") : (\n /* istanbul ignore next */\n Symbol()\n);\nfunction isPlainObject(o) {\n return o && typeof o === \"object\" && Object.prototype.toString.call(o) === \"[object Object]\" && typeof o.toJSON !== \"function\";\n}\nvar MutationType;\n(function(MutationType2) {\n MutationType2[\"direct\"] = \"direct\";\n MutationType2[\"patchObject\"] = \"patch object\";\n MutationType2[\"patchFunction\"] = \"patch function\";\n})(MutationType || (MutationType = {}));\nconst IS_CLIENT = typeof window !== \"undefined\";\nconst USE_DEVTOOLS = (process.env.NODE_ENV !== \"production\" || false) && !(process.env.NODE_ENV === \"test\") && IS_CLIENT;\nconst _global = /* @__PURE__ */ (() => typeof window === \"object\" && window.window === window ? window : typeof self === \"object\" && self.self === self ? self : typeof global === \"object\" && global.global === global ? global : typeof globalThis === \"object\" ? globalThis : { HTMLElement: null })();\nfunction bom(blob, { autoBom = false } = {}) {\n if (autoBom && /^\\s*(?:text\\/\\S*|application\\/xml|\\S*\\/\\S*\\+xml)\\s*;.*charset\\s*=\\s*utf-8/i.test(blob.type)) {\n return new Blob([String.fromCharCode(65279), blob], { type: blob.type });\n }\n return blob;\n}\nfunction download(url, name, opts) {\n const xhr = new XMLHttpRequest();\n xhr.open(\"GET\", url);\n xhr.responseType = \"blob\";\n xhr.onload = function() {\n saveAs(xhr.response, name, opts);\n };\n xhr.onerror = function() {\n console.error(\"could not download file\");\n };\n xhr.send();\n}\nfunction corsEnabled(url) {\n const xhr = new XMLHttpRequest();\n xhr.open(\"HEAD\", url, false);\n try {\n xhr.send();\n } catch (e) {\n }\n return xhr.status >= 200 && xhr.status <= 299;\n}\nfunction click(node) {\n try {\n node.dispatchEvent(new MouseEvent(\"click\"));\n } catch (e) {\n const evt = document.createEvent(\"MouseEvents\");\n evt.initMouseEvent(\"click\", true, true, window, 0, 0, 0, 80, 20, false, false, false, false, 0, null);\n node.dispatchEvent(evt);\n }\n}\nconst _navigator = typeof navigator === \"object\" ? navigator : { userAgent: \"\" };\nconst isMacOSWebView = /* @__PURE__ */ (() => /Macintosh/.test(_navigator.userAgent) && /AppleWebKit/.test(_navigator.userAgent) && !/Safari/.test(_navigator.userAgent))();\nconst saveAs = !IS_CLIENT ? () => {\n} : (\n // Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program\n typeof HTMLAnchorElement !== \"undefined\" && \"download\" in HTMLAnchorElement.prototype && !isMacOSWebView ? downloadSaveAs : (\n // Use msSaveOrOpenBlob as a second approach\n \"msSaveOrOpenBlob\" in _navigator ? msSaveAs : (\n // Fallback to using FileReader and a popup\n fileSaverSaveAs\n )\n )\n);\nfunction downloadSaveAs(blob, name = \"download\", opts) {\n const a = document.createElement(\"a\");\n a.download = name;\n a.rel = \"noopener\";\n if (typeof blob === \"string\") {\n a.href = blob;\n if (a.origin !== location.origin) {\n if (corsEnabled(a.href)) {\n download(blob, name, opts);\n } else {\n a.target = \"_blank\";\n click(a);\n }\n } else {\n click(a);\n }\n } else {\n a.href = URL.createObjectURL(blob);\n setTimeout(function() {\n URL.revokeObjectURL(a.href);\n }, 4e4);\n setTimeout(function() {\n click(a);\n }, 0);\n }\n}\nfunction msSaveAs(blob, name = \"download\", opts) {\n if (typeof blob === \"string\") {\n if (corsEnabled(blob)) {\n download(blob, name, opts);\n } else {\n const a = document.createElement(\"a\");\n a.href = blob;\n a.target = \"_blank\";\n setTimeout(function() {\n click(a);\n });\n }\n } else {\n navigator.msSaveOrOpenBlob(bom(blob, opts), name);\n }\n}\nfunction fileSaverSaveAs(blob, name, opts, popup) {\n popup = popup || open(\"\", \"_blank\");\n if (popup) {\n popup.document.title = popup.document.body.innerText = \"downloading...\";\n }\n if (typeof blob === \"string\")\n return download(blob, name, opts);\n const force = blob.type === \"application/octet-stream\";\n const isSafari = /constructor/i.test(String(_global.HTMLElement)) || \"safari\" in _global;\n const isChromeIOS = /CriOS\\/[\\d]+/.test(navigator.userAgent);\n if ((isChromeIOS || force && isSafari || isMacOSWebView) && typeof FileReader !== \"undefined\") {\n const reader = new FileReader();\n reader.onloadend = function() {\n let url = reader.result;\n if (typeof url !== \"string\") {\n popup = null;\n throw new Error(\"Wrong reader.result type\");\n }\n url = isChromeIOS ? url : url.replace(/^data:[^;]*;/, \"data:attachment/file;\");\n if (popup) {\n popup.location.href = url;\n } else {\n location.assign(url);\n }\n popup = null;\n };\n reader.readAsDataURL(blob);\n } else {\n const url = URL.createObjectURL(blob);\n if (popup)\n popup.location.assign(url);\n else\n location.href = url;\n popup = null;\n setTimeout(function() {\n URL.revokeObjectURL(url);\n }, 4e4);\n }\n}\nfunction toastMessage(message, type2) {\n const piniaMessage = \"🍍 \" + message;\n if (typeof __VUE_DEVTOOLS_TOAST__ === \"function\") {\n __VUE_DEVTOOLS_TOAST__(piniaMessage, type2);\n } else if (type2 === \"error\") {\n console.error(piniaMessage);\n } else if (type2 === \"warn\") {\n console.warn(piniaMessage);\n } else {\n console.log(piniaMessage);\n }\n}\nfunction isPinia(o) {\n return \"_a\" in o && \"install\" in o;\n}\nfunction checkClipboardAccess() {\n if (!(\"clipboard\" in navigator)) {\n toastMessage(`Your browser doesn't support the Clipboard API`, \"error\");\n return true;\n }\n}\nfunction checkNotFocusedError(error) {\n if (error instanceof Error && error.message.toLowerCase().includes(\"document is not focused\")) {\n toastMessage('You need to activate the \"Emulate a focused page\" setting in the \"Rendering\" panel of devtools.', \"warn\");\n return true;\n }\n return false;\n}\nasync function actionGlobalCopyState(pinia2) {\n if (checkClipboardAccess())\n return;\n try {\n await navigator.clipboard.writeText(JSON.stringify(pinia2.state.value));\n toastMessage(\"Global state copied to clipboard.\");\n } catch (error) {\n if (checkNotFocusedError(error))\n return;\n toastMessage(`Failed to serialize the state. Check the console for more details.`, \"error\");\n console.error(error);\n }\n}\nasync function actionGlobalPasteState(pinia2) {\n if (checkClipboardAccess())\n return;\n try {\n pinia2.state.value = JSON.parse(await navigator.clipboard.readText());\n toastMessage(\"Global state pasted from clipboard.\");\n } catch (error) {\n if (checkNotFocusedError(error))\n return;\n toastMessage(`Failed to deserialize the state from clipboard. Check the console for more details.`, \"error\");\n console.error(error);\n }\n}\nasync function actionGlobalSaveState(pinia2) {\n try {\n saveAs(new Blob([JSON.stringify(pinia2.state.value)], {\n type: \"text/plain;charset=utf-8\"\n }), \"pinia-state.json\");\n } catch (error) {\n toastMessage(`Failed to export the state as JSON. Check the console for more details.`, \"error\");\n console.error(error);\n }\n}\nlet fileInput;\nfunction getFileOpener() {\n if (!fileInput) {\n fileInput = document.createElement(\"input\");\n fileInput.type = \"file\";\n fileInput.accept = \".json\";\n }\n function openFile() {\n return new Promise((resolve, reject) => {\n fileInput.onchange = async () => {\n const files = fileInput.files;\n if (!files)\n return resolve(null);\n const file = files.item(0);\n if (!file)\n return resolve(null);\n return resolve({ text: await file.text(), file });\n };\n fileInput.oncancel = () => resolve(null);\n fileInput.onerror = reject;\n fileInput.click();\n });\n }\n return openFile;\n}\nasync function actionGlobalOpenStateFile(pinia2) {\n try {\n const open2 = await getFileOpener();\n const result = await open2();\n if (!result)\n return;\n const { text, file } = result;\n pinia2.state.value = JSON.parse(text);\n toastMessage(`Global state imported from \"${file.name}\".`);\n } catch (error) {\n toastMessage(`Failed to export the state as JSON. Check the console for more details.`, \"error\");\n console.error(error);\n }\n}\nfunction formatDisplay$1(display) {\n return {\n _custom: {\n display\n }\n };\n}\nconst PINIA_ROOT_LABEL = \"🍍 Pinia (root)\";\nconst PINIA_ROOT_ID = \"_root\";\nfunction formatStoreForInspectorTree(store) {\n return isPinia(store) ? {\n id: PINIA_ROOT_ID,\n label: PINIA_ROOT_LABEL\n } : {\n id: store.$id,\n label: store.$id\n };\n}\nfunction formatStoreForInspectorState(store) {\n if (isPinia(store)) {\n const storeNames = Array.from(store._s.keys());\n const storeMap = store._s;\n const state2 = {\n state: storeNames.map((storeId) => ({\n editable: true,\n key: storeId,\n value: store.state.value[storeId]\n })),\n getters: storeNames.filter((id) => storeMap.get(id)._getters).map((id) => {\n const store2 = storeMap.get(id);\n return {\n editable: false,\n key: id,\n value: store2._getters.reduce((getters, key) => {\n getters[key] = store2[key];\n return getters;\n }, {})\n };\n })\n };\n return state2;\n }\n const state = {\n state: Object.keys(store.$state).map((key) => ({\n editable: true,\n key,\n value: store.$state[key]\n }))\n };\n if (store._getters && store._getters.length) {\n state.getters = store._getters.map((getterName) => ({\n editable: false,\n key: getterName,\n value: store[getterName]\n }));\n }\n if (store._customProperties.size) {\n state.customProperties = Array.from(store._customProperties).map((key) => ({\n editable: true,\n key,\n value: store[key]\n }));\n }\n return state;\n}\nfunction formatEventData(events) {\n if (!events)\n return {};\n if (Array.isArray(events)) {\n return events.reduce((data, event) => {\n data.keys.push(event.key);\n data.operations.push(event.type);\n data.oldValue[event.key] = event.oldValue;\n data.newValue[event.key] = event.newValue;\n return data;\n }, {\n oldValue: {},\n keys: [],\n operations: [],\n newValue: {}\n });\n } else {\n return {\n operation: formatDisplay$1(events.type),\n key: formatDisplay$1(events.key),\n oldValue: events.oldValue,\n newValue: events.newValue\n };\n }\n}\nfunction formatMutationType(type2) {\n switch (type2) {\n case MutationType.direct:\n return \"mutation\";\n case MutationType.patchFunction:\n return \"$patch\";\n case MutationType.patchObject:\n return \"$patch\";\n default:\n return \"unknown\";\n }\n}\nlet isTimelineActive = true;\nconst componentStateTypes = [];\nconst MUTATIONS_LAYER_ID = \"pinia:mutations\";\nconst INSPECTOR_ID = \"pinia\";\nconst { assign: assign$1 } = Object;\nconst getStoreType = (id) => \"🍍 \" + id;\nfunction registerPiniaDevtools(app, pinia2) {\n setupDevtoolsPlugin$1({\n id: \"dev.esm.pinia\",\n label: \"Pinia 🍍\",\n logo: \"https://pinia.vuejs.org/logo.svg\",\n packageName: \"pinia\",\n homepage: \"https://pinia.vuejs.org\",\n componentStateTypes,\n app\n }, (api) => {\n if (typeof api.now !== \"function\") {\n toastMessage(\"You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html.\");\n }\n api.addTimelineLayer({\n id: MUTATIONS_LAYER_ID,\n label: `Pinia 🍍`,\n color: 15064968\n });\n api.addInspector({\n id: INSPECTOR_ID,\n label: \"Pinia 🍍\",\n icon: \"storage\",\n treeFilterPlaceholder: \"Search stores\",\n actions: [\n {\n icon: \"content_copy\",\n action: () => {\n actionGlobalCopyState(pinia2);\n },\n tooltip: \"Serialize and copy the state\"\n },\n {\n icon: \"content_paste\",\n action: async () => {\n await actionGlobalPasteState(pinia2);\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n },\n tooltip: \"Replace the state with the content of your clipboard\"\n },\n {\n icon: \"save\",\n action: () => {\n actionGlobalSaveState(pinia2);\n },\n tooltip: \"Save the state as a JSON file\"\n },\n {\n icon: \"folder_open\",\n action: async () => {\n await actionGlobalOpenStateFile(pinia2);\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n },\n tooltip: \"Import the state from a JSON file\"\n }\n ],\n nodeActions: [\n {\n icon: \"restore\",\n tooltip: \"Reset the state (option store only)\",\n action: (nodeId) => {\n const store = pinia2._s.get(nodeId);\n if (!store) {\n toastMessage(`Cannot reset \"${nodeId}\" store because it wasn't found.`, \"warn\");\n } else if (!store._isOptionsAPI) {\n toastMessage(`Cannot reset \"${nodeId}\" store because it's a setup store.`, \"warn\");\n } else {\n store.$reset();\n toastMessage(`Store \"${nodeId}\" reset.`);\n }\n }\n }\n ]\n });\n api.on.inspectComponent((payload, ctx) => {\n const proxy = payload.componentInstance && payload.componentInstance.proxy;\n if (proxy && proxy._pStores) {\n const piniaStores = payload.componentInstance.proxy._pStores;\n Object.values(piniaStores).forEach((store) => {\n payload.instanceData.state.push({\n type: getStoreType(store.$id),\n key: \"state\",\n editable: true,\n value: store._isOptionsAPI ? {\n _custom: {\n value: toRaw(store.$state),\n actions: [\n {\n icon: \"restore\",\n tooltip: \"Reset the state of this store\",\n action: () => store.$reset()\n }\n ]\n }\n } : (\n // NOTE: workaround to unwrap transferred refs\n Object.keys(store.$state).reduce((state, key) => {\n state[key] = store.$state[key];\n return state;\n }, {})\n )\n });\n if (store._getters && store._getters.length) {\n payload.instanceData.state.push({\n type: getStoreType(store.$id),\n key: \"getters\",\n editable: false,\n value: store._getters.reduce((getters, key) => {\n try {\n getters[key] = store[key];\n } catch (error) {\n getters[key] = error;\n }\n return getters;\n }, {})\n });\n }\n });\n }\n });\n api.on.getInspectorTree((payload) => {\n if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {\n let stores = [pinia2];\n stores = stores.concat(Array.from(pinia2._s.values()));\n payload.rootNodes = (payload.filter ? stores.filter((store) => \"$id\" in store ? store.$id.toLowerCase().includes(payload.filter.toLowerCase()) : PINIA_ROOT_LABEL.toLowerCase().includes(payload.filter.toLowerCase())) : stores).map(formatStoreForInspectorTree);\n }\n });\n api.on.getInspectorState((payload) => {\n if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {\n const inspectedStore = payload.nodeId === PINIA_ROOT_ID ? pinia2 : pinia2._s.get(payload.nodeId);\n if (!inspectedStore) {\n return;\n }\n if (inspectedStore) {\n payload.state = formatStoreForInspectorState(inspectedStore);\n }\n }\n });\n api.on.editInspectorState((payload, ctx) => {\n if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {\n const inspectedStore = payload.nodeId === PINIA_ROOT_ID ? pinia2 : pinia2._s.get(payload.nodeId);\n if (!inspectedStore) {\n return toastMessage(`store \"${payload.nodeId}\" not found`, \"error\");\n }\n const { path } = payload;\n if (!isPinia(inspectedStore)) {\n if (path.length !== 1 || !inspectedStore._customProperties.has(path[0]) || path[0] in inspectedStore.$state) {\n path.unshift(\"$state\");\n }\n } else {\n path.unshift(\"state\");\n }\n isTimelineActive = false;\n payload.set(inspectedStore, path, payload.state.value);\n isTimelineActive = true;\n }\n });\n api.on.editComponentState((payload) => {\n if (payload.type.startsWith(\"🍍\")) {\n const storeId = payload.type.replace(/^🍍\\s*/, \"\");\n const store = pinia2._s.get(storeId);\n if (!store) {\n return toastMessage(`store \"${storeId}\" not found`, \"error\");\n }\n const { path } = payload;\n if (path[0] !== \"state\") {\n return toastMessage(`Invalid path for store \"${storeId}\":\n${path}\nOnly state can be modified.`);\n }\n path[0] = \"$state\";\n isTimelineActive = false;\n payload.set(store, path, payload.state.value);\n isTimelineActive = true;\n }\n });\n });\n}\nfunction addStoreToDevtools(app, store) {\n if (!componentStateTypes.includes(getStoreType(store.$id))) {\n componentStateTypes.push(getStoreType(store.$id));\n }\n setupDevtoolsPlugin$1({\n id: \"dev.esm.pinia\",\n label: \"Pinia 🍍\",\n logo: \"https://pinia.vuejs.org/logo.svg\",\n packageName: \"pinia\",\n homepage: \"https://pinia.vuejs.org\",\n componentStateTypes,\n app,\n settings: {\n logStoreChanges: {\n label: \"Notify about new/deleted stores\",\n type: \"boolean\",\n defaultValue: true\n }\n // useEmojis: {\n // label: 'Use emojis in messages ⚡️',\n // type: 'boolean',\n // defaultValue: true,\n // },\n }\n }, (api) => {\n const now2 = typeof api.now === \"function\" ? api.now.bind(api) : Date.now;\n store.$onAction(({ after, onError, name, args }) => {\n const groupId = runningActionId++;\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now2(),\n title: \"🛫 \" + name,\n subtitle: \"start\",\n data: {\n store: formatDisplay$1(store.$id),\n action: formatDisplay$1(name),\n args\n },\n groupId\n }\n });\n after((result) => {\n activeAction = void 0;\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now2(),\n title: \"🛬 \" + name,\n subtitle: \"end\",\n data: {\n store: formatDisplay$1(store.$id),\n action: formatDisplay$1(name),\n args,\n result\n },\n groupId\n }\n });\n });\n onError((error) => {\n activeAction = void 0;\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now2(),\n logType: \"error\",\n title: \"💥 \" + name,\n subtitle: \"end\",\n data: {\n store: formatDisplay$1(store.$id),\n action: formatDisplay$1(name),\n args,\n error\n },\n groupId\n }\n });\n });\n }, true);\n store._customProperties.forEach((name) => {\n watch(() => unref(store[name]), (newValue, oldValue) => {\n api.notifyComponentUpdate();\n api.sendInspectorState(INSPECTOR_ID);\n if (isTimelineActive) {\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now2(),\n title: \"Change\",\n subtitle: name,\n data: {\n newValue,\n oldValue\n },\n groupId: activeAction\n }\n });\n }\n }, { deep: true });\n });\n store.$subscribe(({ events, type: type2 }, state) => {\n api.notifyComponentUpdate();\n api.sendInspectorState(INSPECTOR_ID);\n if (!isTimelineActive)\n return;\n const eventData = {\n time: now2(),\n title: formatMutationType(type2),\n data: assign$1({ store: formatDisplay$1(store.$id) }, formatEventData(events)),\n groupId: activeAction\n };\n activeAction = void 0;\n if (type2 === MutationType.patchFunction) {\n eventData.subtitle = \"⤵️\";\n } else if (type2 === MutationType.patchObject) {\n eventData.subtitle = \"🧩\";\n } else if (events && !Array.isArray(events)) {\n eventData.subtitle = events.type;\n }\n if (events) {\n eventData.data[\"rawEvent(s)\"] = {\n _custom: {\n display: \"DebuggerEvent\",\n type: \"object\",\n tooltip: \"raw DebuggerEvent[]\",\n value: events\n }\n };\n }\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: eventData\n });\n }, { detached: true, flush: \"sync\" });\n const hotUpdate = store._hotUpdate;\n store._hotUpdate = markRaw((newStore) => {\n hotUpdate(newStore);\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now2(),\n title: \"🔥 \" + store.$id,\n subtitle: \"HMR update\",\n data: {\n store: formatDisplay$1(store.$id),\n info: formatDisplay$1(`HMR update`)\n }\n }\n });\n api.notifyComponentUpdate();\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n });\n const { $dispose } = store;\n store.$dispose = () => {\n $dispose();\n api.notifyComponentUpdate();\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n api.getSettings().logStoreChanges && toastMessage(`Disposed \"${store.$id}\" store 🗑`);\n };\n api.notifyComponentUpdate();\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n api.getSettings().logStoreChanges && toastMessage(`\"${store.$id}\" store installed 🆕`);\n });\n}\nlet runningActionId = 0;\nlet activeAction;\nfunction patchActionForGrouping(store, actionNames) {\n const actions = actionNames.reduce((storeActions, actionName) => {\n storeActions[actionName] = toRaw(store)[actionName];\n return storeActions;\n }, {});\n for (const actionName in actions) {\n store[actionName] = function() {\n const _actionId = runningActionId;\n const trackedStore = new Proxy(store, {\n get(...args) {\n activeAction = _actionId;\n return Reflect.get(...args);\n },\n set(...args) {\n activeAction = _actionId;\n return Reflect.set(...args);\n }\n });\n return actions[actionName].apply(trackedStore, arguments);\n };\n }\n}\nfunction devtoolsPlugin({ app, store, options }) {\n if (store.$id.startsWith(\"__hot:\")) {\n return;\n }\n if (options.state) {\n store._isOptionsAPI = true;\n }\n if (typeof options.state === \"function\") {\n patchActionForGrouping(\n // @ts-expect-error: can cast the store...\n store,\n Object.keys(options.actions)\n );\n const originalHotUpdate = store._hotUpdate;\n toRaw(store)._hotUpdate = function(newStore) {\n originalHotUpdate.apply(this, arguments);\n patchActionForGrouping(store, Object.keys(newStore._hmrPayload.actions));\n };\n }\n addStoreToDevtools(\n app,\n // FIXME: is there a way to allow the assignment from Store to StoreGeneric?\n store\n );\n}\nfunction createPinia() {\n const scope = effectScope(true);\n const state = scope.run(() => ref({}));\n let _p = [];\n let toBeInstalled = [];\n const pinia2 = markRaw({\n install(app) {\n setActivePinia(pinia2);\n {\n pinia2._a = app;\n app.provide(piniaSymbol, pinia2);\n app.config.globalProperties.$pinia = pinia2;\n if (USE_DEVTOOLS) {\n registerPiniaDevtools(app, pinia2);\n }\n toBeInstalled.forEach((plugin) => _p.push(plugin));\n toBeInstalled = [];\n }\n },\n use(plugin) {\n if (!this._a && !isVue2) {\n toBeInstalled.push(plugin);\n } else {\n _p.push(plugin);\n }\n return this;\n },\n _p,\n // it's actually undefined here\n // @ts-expect-error\n _a: null,\n _e: scope,\n _s: /* @__PURE__ */ new Map(),\n state\n });\n if (USE_DEVTOOLS && typeof Proxy !== \"undefined\") {\n pinia2.use(devtoolsPlugin);\n }\n return pinia2;\n}\nfunction patchObject(newState, oldState) {\n for (const key in oldState) {\n const subPatch = oldState[key];\n if (!(key in newState)) {\n continue;\n }\n const targetValue = newState[key];\n if (isPlainObject(targetValue) && isPlainObject(subPatch) && !isRef(subPatch) && !isReactive(subPatch)) {\n newState[key] = patchObject(targetValue, subPatch);\n } else {\n {\n newState[key] = subPatch;\n }\n }\n }\n return newState;\n}\nconst noop$1 = () => {\n};\nfunction addSubscription(subscriptions, callback, detached, onCleanup = noop$1) {\n subscriptions.push(callback);\n const removeSubscription = () => {\n const idx = subscriptions.indexOf(callback);\n if (idx > -1) {\n subscriptions.splice(idx, 1);\n onCleanup();\n }\n };\n if (!detached && getCurrentScope()) {\n onScopeDispose(removeSubscription);\n }\n return removeSubscription;\n}\nfunction triggerSubscriptions(subscriptions, ...args) {\n subscriptions.slice().forEach((callback) => {\n callback(...args);\n });\n}\nfunction mergeReactiveObjects(target, patchToApply) {\n if (target instanceof Map && patchToApply instanceof Map) {\n patchToApply.forEach((value, key) => target.set(key, value));\n }\n if (target instanceof Set && patchToApply instanceof Set) {\n patchToApply.forEach(target.add, target);\n }\n for (const key in patchToApply) {\n if (!patchToApply.hasOwnProperty(key))\n continue;\n const subPatch = patchToApply[key];\n const targetValue = target[key];\n if (isPlainObject(targetValue) && isPlainObject(subPatch) && target.hasOwnProperty(key) && !isRef(subPatch) && !isReactive(subPatch)) {\n target[key] = mergeReactiveObjects(targetValue, subPatch);\n } else {\n target[key] = subPatch;\n }\n }\n return target;\n}\nconst skipHydrateSymbol = process.env.NODE_ENV !== \"production\" ? Symbol(\"pinia:skipHydration\") : (\n /* istanbul ignore next */\n Symbol()\n);\nfunction shouldHydrate(obj) {\n return !isPlainObject(obj) || !obj.hasOwnProperty(skipHydrateSymbol);\n}\nconst { assign: assign$2 } = Object;\nfunction isComputed(o) {\n return !!(isRef(o) && o.effect);\n}\nfunction createOptionsStore(id, options, pinia2, hot) {\n const { state, actions, getters } = options;\n const initialState = pinia2.state.value[id];\n let store;\n function setup() {\n if (!initialState && (!(process.env.NODE_ENV !== \"production\") || !hot)) {\n {\n pinia2.state.value[id] = state ? state() : {};\n }\n }\n const localState = process.env.NODE_ENV !== \"production\" && hot ? (\n // use ref() to unwrap refs inside state TODO: check if this is still necessary\n toRefs(ref(state ? state() : {}).value)\n ) : toRefs(pinia2.state.value[id]);\n return assign$2(localState, actions, Object.keys(getters || {}).reduce((computedGetters, name) => {\n if (process.env.NODE_ENV !== \"production\" && name in localState) {\n console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with \"${name}\" in store \"${id}\".`);\n }\n computedGetters[name] = markRaw(computed(() => {\n setActivePinia(pinia2);\n const store2 = pinia2._s.get(id);\n return getters[name].call(store2, store2);\n }));\n return computedGetters;\n }, {}));\n }\n store = createSetupStore(id, setup, options, pinia2, hot, true);\n return store;\n}\nfunction createSetupStore($id, setup, options = {}, pinia2, hot, isOptionsStore) {\n let scope;\n const optionsForPlugin = assign$2({ actions: {} }, options);\n if (process.env.NODE_ENV !== \"production\" && !pinia2._e.active) {\n throw new Error(\"Pinia destroyed\");\n }\n const $subscribeOptions = {\n deep: true\n // flush: 'post',\n };\n if (process.env.NODE_ENV !== \"production\" && !isVue2) {\n $subscribeOptions.onTrigger = (event) => {\n if (isListening) {\n debuggerEvents = event;\n } else if (isListening == false && !store._hotUpdating) {\n if (Array.isArray(debuggerEvents)) {\n debuggerEvents.push(event);\n } else {\n console.error(\"🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug.\");\n }\n }\n };\n }\n let isListening;\n let isSyncListening;\n let subscriptions = markRaw([]);\n let actionSubscriptions = markRaw([]);\n let debuggerEvents;\n const initialState = pinia2.state.value[$id];\n if (!isOptionsStore && !initialState && (!(process.env.NODE_ENV !== \"production\") || !hot)) {\n {\n pinia2.state.value[$id] = {};\n }\n }\n const hotState = ref({});\n let activeListener;\n function $patch(partialStateOrMutator) {\n let subscriptionMutation;\n isListening = isSyncListening = false;\n if (process.env.NODE_ENV !== \"production\") {\n debuggerEvents = [];\n }\n if (typeof partialStateOrMutator === \"function\") {\n partialStateOrMutator(pinia2.state.value[$id]);\n subscriptionMutation = {\n type: MutationType.patchFunction,\n storeId: $id,\n events: debuggerEvents\n };\n } else {\n mergeReactiveObjects(pinia2.state.value[$id], partialStateOrMutator);\n subscriptionMutation = {\n type: MutationType.patchObject,\n payload: partialStateOrMutator,\n storeId: $id,\n events: debuggerEvents\n };\n }\n const myListenerId = activeListener = Symbol();\n nextTick().then(() => {\n if (activeListener === myListenerId) {\n isListening = true;\n }\n });\n isSyncListening = true;\n triggerSubscriptions(subscriptions, subscriptionMutation, pinia2.state.value[$id]);\n }\n const $reset = isOptionsStore ? function $reset2() {\n const { state } = options;\n const newState = state ? state() : {};\n this.$patch(($state) => {\n assign$2($state, newState);\n });\n } : (\n /* istanbul ignore next */\n process.env.NODE_ENV !== \"production\" ? () => {\n throw new Error(`🍍: Store \"${$id}\" is built using the setup syntax and does not implement $reset().`);\n } : noop$1\n );\n function $dispose() {\n scope.stop();\n subscriptions = [];\n actionSubscriptions = [];\n pinia2._s.delete($id);\n }\n function wrapAction(name, action) {\n return function() {\n setActivePinia(pinia2);\n const args = Array.from(arguments);\n const afterCallbackList = [];\n const onErrorCallbackList = [];\n function after(callback) {\n afterCallbackList.push(callback);\n }\n function onError(callback) {\n onErrorCallbackList.push(callback);\n }\n triggerSubscriptions(actionSubscriptions, {\n args,\n name,\n store,\n after,\n onError\n });\n let ret;\n try {\n ret = action.apply(this && this.$id === $id ? this : store, args);\n } catch (error) {\n triggerSubscriptions(onErrorCallbackList, error);\n throw error;\n }\n if (ret instanceof Promise) {\n return ret.then((value) => {\n triggerSubscriptions(afterCallbackList, value);\n return value;\n }).catch((error) => {\n triggerSubscriptions(onErrorCallbackList, error);\n return Promise.reject(error);\n });\n }\n triggerSubscriptions(afterCallbackList, ret);\n return ret;\n };\n }\n const _hmrPayload = /* @__PURE__ */ markRaw({\n actions: {},\n getters: {},\n state: [],\n hotState\n });\n const partialStore = {\n _p: pinia2,\n // _s: scope,\n $id,\n $onAction: addSubscription.bind(null, actionSubscriptions),\n $patch,\n $reset,\n $subscribe(callback, options2 = {}) {\n const removeSubscription = addSubscription(subscriptions, callback, options2.detached, () => stopWatcher());\n const stopWatcher = scope.run(() => watch(() => pinia2.state.value[$id], (state) => {\n if (options2.flush === \"sync\" ? isSyncListening : isListening) {\n callback({\n storeId: $id,\n type: MutationType.direct,\n events: debuggerEvents\n }, state);\n }\n }, assign$2({}, $subscribeOptions, options2)));\n return removeSubscription;\n },\n $dispose\n };\n const store = reactive(process.env.NODE_ENV !== \"production\" || USE_DEVTOOLS ? assign$2(\n {\n _hmrPayload,\n _customProperties: markRaw(/* @__PURE__ */ new Set())\n // devtools custom properties\n },\n partialStore\n // must be added later\n // setupStore\n ) : partialStore);\n pinia2._s.set($id, store);\n const setupStore = pinia2._e.run(() => {\n scope = effectScope();\n return scope.run(() => setup());\n });\n for (const key in setupStore) {\n const prop = setupStore[key];\n if (isRef(prop) && !isComputed(prop) || isReactive(prop)) {\n if (process.env.NODE_ENV !== \"production\" && hot) {\n set(hotState.value, key, toRef(setupStore, key));\n } else if (!isOptionsStore) {\n if (initialState && shouldHydrate(prop)) {\n if (isRef(prop)) {\n prop.value = initialState[key];\n } else {\n mergeReactiveObjects(prop, initialState[key]);\n }\n }\n {\n pinia2.state.value[$id][key] = prop;\n }\n }\n if (process.env.NODE_ENV !== \"production\") {\n _hmrPayload.state.push(key);\n }\n } else if (typeof prop === \"function\") {\n const actionValue = process.env.NODE_ENV !== \"production\" && hot ? prop : wrapAction(key, prop);\n {\n setupStore[key] = actionValue;\n }\n if (process.env.NODE_ENV !== \"production\") {\n _hmrPayload.actions[key] = prop;\n }\n optionsForPlugin.actions[key] = prop;\n } else if (process.env.NODE_ENV !== \"production\") {\n if (isComputed(prop)) {\n _hmrPayload.getters[key] = isOptionsStore ? (\n // @ts-expect-error\n options.getters[key]\n ) : prop;\n if (IS_CLIENT) {\n const getters = setupStore._getters || // @ts-expect-error: same\n (setupStore._getters = markRaw([]));\n getters.push(key);\n }\n }\n }\n }\n {\n assign$2(store, setupStore);\n assign$2(toRaw(store), setupStore);\n }\n Object.defineProperty(store, \"$state\", {\n get: () => process.env.NODE_ENV !== \"production\" && hot ? hotState.value : pinia2.state.value[$id],\n set: (state) => {\n if (process.env.NODE_ENV !== \"production\" && hot) {\n throw new Error(\"cannot set hotState\");\n }\n $patch(($state) => {\n assign$2($state, state);\n });\n }\n });\n if (process.env.NODE_ENV !== \"production\") {\n store._hotUpdate = markRaw((newStore) => {\n store._hotUpdating = true;\n newStore._hmrPayload.state.forEach((stateKey) => {\n if (stateKey in store.$state) {\n const newStateTarget = newStore.$state[stateKey];\n const oldStateSource = store.$state[stateKey];\n if (typeof newStateTarget === \"object\" && isPlainObject(newStateTarget) && isPlainObject(oldStateSource)) {\n patchObject(newStateTarget, oldStateSource);\n } else {\n newStore.$state[stateKey] = oldStateSource;\n }\n }\n set(store, stateKey, toRef(newStore.$state, stateKey));\n });\n Object.keys(store.$state).forEach((stateKey) => {\n if (!(stateKey in newStore.$state)) {\n del(store, stateKey);\n }\n });\n isListening = false;\n isSyncListening = false;\n pinia2.state.value[$id] = toRef(newStore._hmrPayload, \"hotState\");\n isSyncListening = true;\n nextTick().then(() => {\n isListening = true;\n });\n for (const actionName in newStore._hmrPayload.actions) {\n const action = newStore[actionName];\n set(store, actionName, wrapAction(actionName, action));\n }\n for (const getterName in newStore._hmrPayload.getters) {\n const getter = newStore._hmrPayload.getters[getterName];\n const getterValue = isOptionsStore ? (\n // special handling of options api\n computed(() => {\n setActivePinia(pinia2);\n return getter.call(store, store);\n })\n ) : getter;\n set(store, getterName, getterValue);\n }\n Object.keys(store._hmrPayload.getters).forEach((key) => {\n if (!(key in newStore._hmrPayload.getters)) {\n del(store, key);\n }\n });\n Object.keys(store._hmrPayload.actions).forEach((key) => {\n if (!(key in newStore._hmrPayload.actions)) {\n del(store, key);\n }\n });\n store._hmrPayload = newStore._hmrPayload;\n store._getters = newStore._getters;\n store._hotUpdating = false;\n });\n }\n if (USE_DEVTOOLS) {\n const nonEnumerable = {\n writable: true,\n configurable: true,\n // avoid warning on devtools trying to display this property\n enumerable: false\n };\n [\"_p\", \"_hmrPayload\", \"_getters\", \"_customProperties\"].forEach((p) => {\n Object.defineProperty(store, p, assign$2({ value: store[p] }, nonEnumerable));\n });\n }\n pinia2._p.forEach((extender) => {\n if (USE_DEVTOOLS) {\n const extensions = scope.run(() => extender({\n store,\n app: pinia2._a,\n pinia: pinia2,\n options: optionsForPlugin\n }));\n Object.keys(extensions || {}).forEach((key) => store._customProperties.add(key));\n assign$2(store, extensions);\n } else {\n assign$2(store, scope.run(() => extender({\n store,\n app: pinia2._a,\n pinia: pinia2,\n options: optionsForPlugin\n })));\n }\n });\n if (process.env.NODE_ENV !== \"production\" && store.$state && typeof store.$state === \"object\" && typeof store.$state.constructor === \"function\" && !store.$state.constructor.toString().includes(\"[native code]\")) {\n console.warn(`[🍍]: The \"state\" must be a plain object. It cannot be\n\tstate: () => new MyClass()\nFound in store \"${store.$id}\".`);\n }\n if (initialState && isOptionsStore && options.hydrate) {\n options.hydrate(store.$state, initialState);\n }\n isListening = true;\n isSyncListening = true;\n return store;\n}\nfunction defineStore(idOrOptions, setup, setupOptions) {\n let id;\n let options;\n const isSetupStore = typeof setup === \"function\";\n if (typeof idOrOptions === \"string\") {\n id = idOrOptions;\n options = isSetupStore ? setupOptions : setup;\n } else {\n options = idOrOptions;\n id = idOrOptions.id;\n }\n function useStore(pinia2, hot) {\n const currentInstance = getCurrentInstance();\n pinia2 = // in test mode, ignore the argument provided as we can always retrieve a\n // pinia instance with getActivePinia()\n (process.env.NODE_ENV === \"test\" && activePinia && activePinia._testing ? null : pinia2) || currentInstance && inject(piniaSymbol, null);\n if (pinia2)\n setActivePinia(pinia2);\n if (process.env.NODE_ENV !== \"production\" && !activePinia) {\n throw new Error(`[🍍]: getActivePinia was called with no active Pinia. Did you forget to install pinia?\n\tconst pinia = createPinia()\n\tapp.use(pinia)\nThis will fail in production.`);\n }\n pinia2 = activePinia;\n if (!pinia2._s.has(id)) {\n if (isSetupStore) {\n createSetupStore(id, setup, options, pinia2);\n } else {\n createOptionsStore(id, options, pinia2);\n }\n if (process.env.NODE_ENV !== \"production\") {\n useStore._pinia = pinia2;\n }\n }\n const store = pinia2._s.get(id);\n if (process.env.NODE_ENV !== \"production\" && hot) {\n const hotId = \"__hot:\" + id;\n const newStore = isSetupStore ? createSetupStore(hotId, setup, options, pinia2, true) : createOptionsStore(hotId, assign$2({}, options), pinia2, true);\n hot._hotUpdate(newStore);\n delete pinia2.state.value[hotId];\n pinia2._s.delete(hotId);\n }\n if (process.env.NODE_ENV !== \"production\" && IS_CLIENT && currentInstance && currentInstance.proxy && // avoid adding stores that are just built for hot module replacement\n !hot) {\n const vm = currentInstance.proxy;\n const cache = \"_pStores\" in vm ? vm._pStores : vm._pStores = {};\n cache[id] = store;\n }\n return store;\n }\n useStore.$id = id;\n return useStore;\n}\nconst useDataStore = defineStore(\"data\", () => {\n const records = ref([]);\n const record = ref({});\n return { records, record };\n});\nfunction useStonecrop(registry) {\n if (!registry) {\n registry = inject(\"$registry\");\n }\n const store = useDataStore();\n const stonecrop = ref(new Stonecrop(registry, store));\n const isReady = ref(false);\n onBeforeMount(async () => {\n var _a, _b;\n const route = registry.router.currentRoute.value;\n const doctypeSlug = (_a = route.params.records) == null ? void 0 : _a.toString().toLowerCase();\n const recordId = (_b = route.params.record) == null ? void 0 : _b.toString().toLowerCase();\n if (!doctypeSlug && !recordId) {\n return;\n }\n const doctype = await registry.doctypeLoader(doctypeSlug);\n registry.addDoctype(doctype);\n stonecrop.value.setup(doctype);\n if (doctypeSlug) {\n if (recordId) {\n await stonecrop.value.getRecord(doctype, recordId);\n } else {\n await stonecrop.value.getRecords(doctype);\n }\n }\n stonecrop.value.runAction(doctype, \"LOAD\", recordId ? [recordId] : void 0);\n isReady.value = true;\n });\n return { stonecrop, isReady };\n}\nclass DoctypeMeta {\n constructor(doctype, schema, workflow, actions, component) {\n this.doctype = doctype;\n this.schema = schema;\n this.workflow = workflow;\n this.actions = actions;\n this.component = component;\n }\n get slug() {\n return this.doctype.replace(/([a-z])([A-Z])/g, \"$1-$2\").replace(/[\\s_]+/g, \"-\").toLowerCase();\n }\n get __typename() {\n return this.doctype;\n }\n}\nclass Registry {\n constructor(router2, doctypeLoader = void 0) {\n if (Registry._root) {\n return Registry._root;\n }\n Registry._root = this;\n this.name = \"Registry\";\n this.router = router2;\n this.registry = {};\n this.doctypeLoader = doctypeLoader;\n }\n addDoctype(doctype) {\n if (!(doctype.doctype in Object.keys(this.registry))) {\n this.registry[doctype.slug] = doctype;\n }\n if (!this.router.hasRoute(doctype.doctype)) {\n this.router.addRoute({\n path: `/${doctype.slug}`,\n name: doctype.slug,\n component: doctype.component\n });\n }\n }\n}\nfunction getDevtoolsGlobalHook() {\n return getTarget().__VUE_DEVTOOLS_GLOBAL_HOOK__;\n}\nfunction getTarget() {\n return typeof navigator !== \"undefined\" && typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : {};\n}\nconst isProxyAvailable = typeof Proxy === \"function\";\nconst HOOK_SETUP = \"devtools-plugin:setup\";\nconst HOOK_PLUGIN_SETTINGS_SET = \"plugin:settings:set\";\nlet supported;\nlet perf;\nfunction isPerformanceSupported() {\n var _a;\n if (supported !== void 0) {\n return supported;\n }\n if (typeof window !== \"undefined\" && window.performance) {\n supported = true;\n perf = window.performance;\n } else if (typeof global !== \"undefined\" && ((_a = global.perf_hooks) === null || _a === void 0 ? void 0 : _a.performance)) {\n supported = true;\n perf = global.perf_hooks.performance;\n } else {\n supported = false;\n }\n return supported;\n}\nfunction now$1() {\n return isPerformanceSupported() ? perf.now() : Date.now();\n}\nclass ApiProxy2 {\n constructor(plugin, hook) {\n this.target = null;\n this.targetQueue = [];\n this.onQueue = [];\n this.plugin = plugin;\n this.hook = hook;\n const defaultSettings = {};\n if (plugin.settings) {\n for (const id in plugin.settings) {\n const item = plugin.settings[id];\n defaultSettings[id] = item.defaultValue;\n }\n }\n const localSettingsSaveId = `__vue-devtools-plugin-settings__${plugin.id}`;\n let currentSettings = Object.assign({}, defaultSettings);\n try {\n const raw = localStorage.getItem(localSettingsSaveId);\n const data = JSON.parse(raw);\n Object.assign(currentSettings, data);\n } catch (e) {\n }\n this.fallbacks = {\n getSettings() {\n return currentSettings;\n },\n setSettings(value) {\n try {\n localStorage.setItem(localSettingsSaveId, JSON.stringify(value));\n } catch (e) {\n }\n currentSettings = value;\n },\n now() {\n return now$1();\n }\n };\n if (hook) {\n hook.on(HOOK_PLUGIN_SETTINGS_SET, (pluginId, value) => {\n if (pluginId === this.plugin.id) {\n this.fallbacks.setSettings(value);\n }\n });\n }\n this.proxiedOn = new Proxy({}, {\n get: (_target, prop) => {\n if (this.target) {\n return this.target.on[prop];\n } else {\n return (...args) => {\n this.onQueue.push({\n method: prop,\n args\n });\n };\n }\n }\n });\n this.proxiedTarget = new Proxy({}, {\n get: (_target, prop) => {\n if (this.target) {\n return this.target[prop];\n } else if (prop === \"on\") {\n return this.proxiedOn;\n } else if (Object.keys(this.fallbacks).includes(prop)) {\n return (...args) => {\n this.targetQueue.push({\n method: prop,\n args,\n resolve: () => {\n }\n });\n return this.fallbacks[prop](...args);\n };\n } else {\n return (...args) => {\n return new Promise((resolve) => {\n this.targetQueue.push({\n method: prop,\n args,\n resolve\n });\n });\n };\n }\n }\n });\n }\n async setRealTarget(target) {\n this.target = target;\n for (const item of this.onQueue) {\n this.target.on[item.method](...item.args);\n }\n for (const item of this.targetQueue) {\n item.resolve(await this.target[item.method](...item.args));\n }\n }\n}\nfunction setupDevtoolsPlugin(pluginDescriptor, setupFn) {\n const descriptor = pluginDescriptor;\n const target = getTarget();\n const hook = getDevtoolsGlobalHook();\n const enableProxy = isProxyAvailable && descriptor.enableEarlyProxy;\n if (hook && (target.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !enableProxy)) {\n hook.emit(HOOK_SETUP, pluginDescriptor, setupFn);\n } else {\n const proxy = enableProxy ? new ApiProxy2(descriptor, hook) : null;\n const list = target.__VUE_DEVTOOLS_PLUGINS__ = target.__VUE_DEVTOOLS_PLUGINS__ || [];\n list.push({\n pluginDescriptor: descriptor,\n setupFn,\n proxy\n });\n if (proxy)\n setupFn(proxy.proxiedTarget);\n }\n}\n/*!\n * vue-router v4.1.6\n * (c) 2022 Eduardo San Martin Morote\n * @license MIT\n */\nconst isBrowser = typeof window !== \"undefined\";\nfunction isESModule(obj) {\n return obj.__esModule || obj[Symbol.toStringTag] === \"Module\";\n}\nconst assign = Object.assign;\nfunction applyToParams(fn, params) {\n const newParams = {};\n for (const key in params) {\n const value = params[key];\n newParams[key] = isArray(value) ? value.map(fn) : fn(value);\n }\n return newParams;\n}\nconst noop = () => {\n};\nconst isArray = Array.isArray;\nfunction warn(msg) {\n const args = Array.from(arguments).slice(1);\n console.warn.apply(console, [\"[Vue Router warn]: \" + msg].concat(args));\n}\nconst TRAILING_SLASH_RE = /\\/$/;\nconst removeTrailingSlash = (path) => path.replace(TRAILING_SLASH_RE, \"\");\nfunction parseURL(parseQuery2, location2, currentLocation = \"/\") {\n let path, query = {}, searchString = \"\", hash = \"\";\n const hashPos = location2.indexOf(\"#\");\n let searchPos = location2.indexOf(\"?\");\n if (hashPos < searchPos && hashPos >= 0) {\n searchPos = -1;\n }\n if (searchPos > -1) {\n path = location2.slice(0, searchPos);\n searchString = location2.slice(searchPos + 1, hashPos > -1 ? hashPos : location2.length);\n query = parseQuery2(searchString);\n }\n if (hashPos > -1) {\n path = path || location2.slice(0, hashPos);\n hash = location2.slice(hashPos, location2.length);\n }\n path = resolveRelativePath(path != null ? path : location2, currentLocation);\n return {\n fullPath: path + (searchString && \"?\") + searchString + hash,\n path,\n query,\n hash\n };\n}\nfunction stringifyURL(stringifyQuery2, location2) {\n const query = location2.query ? stringifyQuery2(location2.query) : \"\";\n return location2.path + (query && \"?\") + query + (location2.hash || \"\");\n}\nfunction stripBase(pathname, base) {\n if (!base || !pathname.toLowerCase().startsWith(base.toLowerCase()))\n return pathname;\n return pathname.slice(base.length) || \"/\";\n}\nfunction isSameRouteLocation(stringifyQuery2, a, b) {\n const aLastIndex = a.matched.length - 1;\n const bLastIndex = b.matched.length - 1;\n return aLastIndex > -1 && aLastIndex === bLastIndex && isSameRouteRecord(a.matched[aLastIndex], b.matched[bLastIndex]) && isSameRouteLocationParams(a.params, b.params) && stringifyQuery2(a.query) === stringifyQuery2(b.query) && a.hash === b.hash;\n}\nfunction isSameRouteRecord(a, b) {\n return (a.aliasOf || a) === (b.aliasOf || b);\n}\nfunction isSameRouteLocationParams(a, b) {\n if (Object.keys(a).length !== Object.keys(b).length)\n return false;\n for (const key in a) {\n if (!isSameRouteLocationParamsValue(a[key], b[key]))\n return false;\n }\n return true;\n}\nfunction isSameRouteLocationParamsValue(a, b) {\n return isArray(a) ? isEquivalentArray(a, b) : isArray(b) ? isEquivalentArray(b, a) : a === b;\n}\nfunction isEquivalentArray(a, b) {\n return isArray(b) ? a.length === b.length && a.every((value, i) => value === b[i]) : a.length === 1 && a[0] === b;\n}\nfunction resolveRelativePath(to, from) {\n if (to.startsWith(\"/\"))\n return to;\n if (process.env.NODE_ENV !== \"production\" && !from.startsWith(\"/\")) {\n warn(`Cannot resolve a relative location without an absolute path. Trying to resolve \"${to}\" from \"${from}\". It should look like \"/${from}\".`);\n return to;\n }\n if (!to)\n return from;\n const fromSegments = from.split(\"/\");\n const toSegments = to.split(\"/\");\n let position = fromSegments.length - 1;\n let toPosition;\n let segment;\n for (toPosition = 0; toPosition < toSegments.length; toPosition++) {\n segment = toSegments[toPosition];\n if (segment === \".\")\n continue;\n if (segment === \"..\") {\n if (position > 1)\n position--;\n } else\n break;\n }\n return fromSegments.slice(0, position).join(\"/\") + \"/\" + toSegments.slice(toPosition - (toPosition === toSegments.length ? 1 : 0)).join(\"/\");\n}\nvar NavigationType;\n(function(NavigationType2) {\n NavigationType2[\"pop\"] = \"pop\";\n NavigationType2[\"push\"] = \"push\";\n})(NavigationType || (NavigationType = {}));\nvar NavigationDirection;\n(function(NavigationDirection2) {\n NavigationDirection2[\"back\"] = \"back\";\n NavigationDirection2[\"forward\"] = \"forward\";\n NavigationDirection2[\"unknown\"] = \"\";\n})(NavigationDirection || (NavigationDirection = {}));\nfunction normalizeBase(base) {\n if (!base) {\n if (isBrowser) {\n const baseEl = document.querySelector(\"base\");\n base = baseEl && baseEl.getAttribute(\"href\") || \"/\";\n base = base.replace(/^\\w+:\\/\\/[^\\/]+/, \"\");\n } else {\n base = \"/\";\n }\n }\n if (base[0] !== \"/\" && base[0] !== \"#\")\n base = \"/\" + base;\n return removeTrailingSlash(base);\n}\nconst BEFORE_HASH_RE = /^[^#]+#/;\nfunction createHref(base, location2) {\n return base.replace(BEFORE_HASH_RE, \"#\") + location2;\n}\nfunction getElementPosition(el, offset) {\n const docRect = document.documentElement.getBoundingClientRect();\n const elRect = el.getBoundingClientRect();\n return {\n behavior: offset.behavior,\n left: elRect.left - docRect.left - (offset.left || 0),\n top: elRect.top - docRect.top - (offset.top || 0)\n };\n}\nconst computeScrollPosition = () => ({\n left: window.pageXOffset,\n top: window.pageYOffset\n});\nfunction scrollToPosition(position) {\n let scrollToOptions;\n if (\"el\" in position) {\n const positionEl = position.el;\n const isIdSelector = typeof positionEl === \"string\" && positionEl.startsWith(\"#\");\n if (process.env.NODE_ENV !== \"production\" && typeof position.el === \"string\") {\n if (!isIdSelector || !document.getElementById(position.el.slice(1))) {\n try {\n const foundEl = document.querySelector(position.el);\n if (isIdSelector && foundEl) {\n warn(`The selector \"${position.el}\" should be passed as \"el: document.querySelector('${position.el}')\" because it starts with \"#\".`);\n return;\n }\n } catch (err) {\n warn(`The selector \"${position.el}\" is invalid. If you are using an id selector, make sure to escape it. You can find more information about escaping characters in selectors at https://mathiasbynens.be/notes/css-escapes or use CSS.escape (https://developer.mozilla.org/en-US/docs/Web/API/CSS/escape).`);\n return;\n }\n }\n }\n const el = typeof positionEl === \"string\" ? isIdSelector ? document.getElementById(positionEl.slice(1)) : document.querySelector(positionEl) : positionEl;\n if (!el) {\n process.env.NODE_ENV !== \"production\" && warn(`Couldn't find element using selector \"${position.el}\" returned by scrollBehavior.`);\n return;\n }\n scrollToOptions = getElementPosition(el, position);\n } else {\n scrollToOptions = position;\n }\n if (\"scrollBehavior\" in document.documentElement.style)\n window.scrollTo(scrollToOptions);\n else {\n window.scrollTo(scrollToOptions.left != null ? scrollToOptions.left : window.pageXOffset, scrollToOptions.top != null ? scrollToOptions.top : window.pageYOffset);\n }\n}\nfunction getScrollKey(path, delta) {\n const position = history.state ? history.state.position - delta : -1;\n return position + path;\n}\nconst scrollPositions = /* @__PURE__ */ new Map();\nfunction saveScrollPosition(key, scrollPosition) {\n scrollPositions.set(key, scrollPosition);\n}\nfunction getSavedScrollPosition(key) {\n const scroll = scrollPositions.get(key);\n scrollPositions.delete(key);\n return scroll;\n}\nlet createBaseLocation = () => location.protocol + \"//\" + location.host;\nfunction createCurrentLocation(base, location2) {\n const { pathname, search, hash } = location2;\n const hashPos = base.indexOf(\"#\");\n if (hashPos > -1) {\n let slicePos = hash.includes(base.slice(hashPos)) ? base.slice(hashPos).length : 1;\n let pathFromHash = hash.slice(slicePos);\n if (pathFromHash[0] !== \"/\")\n pathFromHash = \"/\" + pathFromHash;\n return stripBase(pathFromHash, \"\");\n }\n const path = stripBase(pathname, base);\n return path + search + hash;\n}\nfunction useHistoryListeners(base, historyState, currentLocation, replace) {\n let listeners = [];\n let teardowns = [];\n let pauseState = null;\n const popStateHandler = ({ state }) => {\n const to = createCurrentLocation(base, location);\n const from = currentLocation.value;\n const fromState = historyState.value;\n let delta = 0;\n if (state) {\n currentLocation.value = to;\n historyState.value = state;\n if (pauseState && pauseState === from) {\n pauseState = null;\n return;\n }\n delta = fromState ? state.position - fromState.position : 0;\n } else {\n replace(to);\n }\n listeners.forEach((listener) => {\n listener(currentLocation.value, from, {\n delta,\n type: NavigationType.pop,\n direction: delta ? delta > 0 ? NavigationDirection.forward : NavigationDirection.back : NavigationDirection.unknown\n });\n });\n };\n function pauseListeners() {\n pauseState = currentLocation.value;\n }\n function listen(callback) {\n listeners.push(callback);\n const teardown = () => {\n const index2 = listeners.indexOf(callback);\n if (index2 > -1)\n listeners.splice(index2, 1);\n };\n teardowns.push(teardown);\n return teardown;\n }\n function beforeUnloadListener() {\n const { history: history2 } = window;\n if (!history2.state)\n return;\n history2.replaceState(assign({}, history2.state, { scroll: computeScrollPosition() }), \"\");\n }\n function destroy() {\n for (const teardown of teardowns)\n teardown();\n teardowns = [];\n window.removeEventListener(\"popstate\", popStateHandler);\n window.removeEventListener(\"beforeunload\", beforeUnloadListener);\n }\n window.addEventListener(\"popstate\", popStateHandler);\n window.addEventListener(\"beforeunload\", beforeUnloadListener);\n return {\n pauseListeners,\n listen,\n destroy\n };\n}\nfunction buildState(back, current, forward, replaced = false, computeScroll = false) {\n return {\n back,\n current,\n forward,\n replaced,\n position: window.history.length,\n scroll: computeScroll ? computeScrollPosition() : null\n };\n}\nfunction useHistoryStateNavigation(base) {\n const { history: history2, location: location2 } = window;\n const currentLocation = {\n value: createCurrentLocation(base, location2)\n };\n const historyState = { value: history2.state };\n if (!historyState.value) {\n changeLocation(currentLocation.value, {\n back: null,\n current: currentLocation.value,\n forward: null,\n // the length is off by one, we need to decrease it\n position: history2.length - 1,\n replaced: true,\n // don't add a scroll as the user may have an anchor, and we want\n // scrollBehavior to be triggered without a saved position\n scroll: null\n }, true);\n }\n function changeLocation(to, state, replace2) {\n const hashIndex = base.indexOf(\"#\");\n const url = hashIndex > -1 ? (location2.host && document.querySelector(\"base\") ? base : base.slice(hashIndex)) + to : createBaseLocation() + base + to;\n try {\n history2[replace2 ? \"replaceState\" : \"pushState\"](state, \"\", url);\n historyState.value = state;\n } catch (err) {\n if (process.env.NODE_ENV !== \"production\") {\n warn(\"Error with push/replace State\", err);\n } else {\n console.error(err);\n }\n location2[replace2 ? \"replace\" : \"assign\"](url);\n }\n }\n function replace(to, data) {\n const state = assign({}, history2.state, buildState(\n historyState.value.back,\n // keep back and forward entries but override current position\n to,\n historyState.value.forward,\n true\n ), data, { position: historyState.value.position });\n changeLocation(to, state, true);\n currentLocation.value = to;\n }\n function push(to, data) {\n const currentState = assign(\n {},\n // use current history state to gracefully handle a wrong call to\n // history.replaceState\n // https://github.com/vuejs/router/issues/366\n historyState.value,\n history2.state,\n {\n forward: to,\n scroll: computeScrollPosition()\n }\n );\n if (process.env.NODE_ENV !== \"production\" && !history2.state) {\n warn(`history.state seems to have been manually replaced without preserving the necessary values. Make sure to preserve existing history state if you are manually calling history.replaceState:\n\nhistory.replaceState(history.state, '', url)\n\nYou can find more information at https://next.router.vuejs.org/guide/migration/#usage-of-history-state.`);\n }\n changeLocation(currentState.current, currentState, true);\n const state = assign({}, buildState(currentLocation.value, to, null), { position: currentState.position + 1 }, data);\n changeLocation(to, state, false);\n currentLocation.value = to;\n }\n return {\n location: currentLocation,\n state: historyState,\n push,\n replace\n };\n}\nfunction createWebHistory(base) {\n base = normalizeBase(base);\n const historyNavigation = useHistoryStateNavigation(base);\n const historyListeners = useHistoryListeners(base, historyNavigation.state, historyNavigation.location, historyNavigation.replace);\n function go(delta, triggerListeners = true) {\n if (!triggerListeners)\n historyListeners.pauseListeners();\n history.go(delta);\n }\n const routerHistory = assign({\n // it's overridden right after\n location: \"\",\n base,\n go,\n createHref: createHref.bind(null, base)\n }, historyNavigation, historyListeners);\n Object.defineProperty(routerHistory, \"location\", {\n enumerable: true,\n get: () => historyNavigation.location.value\n });\n Object.defineProperty(routerHistory, \"state\", {\n enumerable: true,\n get: () => historyNavigation.state.value\n });\n return routerHistory;\n}\nfunction isRouteLocation(route) {\n return typeof route === \"string\" || route && typeof route === \"object\";\n}\nfunction isRouteName(name) {\n return typeof name === \"string\" || typeof name === \"symbol\";\n}\nconst START_LOCATION_NORMALIZED = {\n path: \"/\",\n name: void 0,\n params: {},\n query: {},\n hash: \"\",\n fullPath: \"/\",\n matched: [],\n meta: {},\n redirectedFrom: void 0\n};\nconst NavigationFailureSymbol = Symbol(process.env.NODE_ENV !== \"production\" ? \"navigation failure\" : \"\");\nvar NavigationFailureType;\n(function(NavigationFailureType2) {\n NavigationFailureType2[NavigationFailureType2[\"aborted\"] = 4] = \"aborted\";\n NavigationFailureType2[NavigationFailureType2[\"cancelled\"] = 8] = \"cancelled\";\n NavigationFailureType2[NavigationFailureType2[\"duplicated\"] = 16] = \"duplicated\";\n})(NavigationFailureType || (NavigationFailureType = {}));\nconst ErrorTypeMessages = {\n [\n 1\n /* ErrorTypes.MATCHER_NOT_FOUND */\n ]({ location: location2, currentLocation }) {\n return `No match for\n ${JSON.stringify(location2)}${currentLocation ? \"\\nwhile being at\\n\" + JSON.stringify(currentLocation) : \"\"}`;\n },\n [\n 2\n /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */\n ]({ from, to }) {\n return `Redirected from \"${from.fullPath}\" to \"${stringifyRoute(to)}\" via a navigation guard.`;\n },\n [\n 4\n /* ErrorTypes.NAVIGATION_ABORTED */\n ]({ from, to }) {\n return `Navigation aborted from \"${from.fullPath}\" to \"${to.fullPath}\" via a navigation guard.`;\n },\n [\n 8\n /* ErrorTypes.NAVIGATION_CANCELLED */\n ]({ from, to }) {\n return `Navigation cancelled from \"${from.fullPath}\" to \"${to.fullPath}\" with a new navigation.`;\n },\n [\n 16\n /* ErrorTypes.NAVIGATION_DUPLICATED */\n ]({ from, to }) {\n return `Avoided redundant navigation to current location: \"${from.fullPath}\".`;\n }\n};\nfunction createRouterError(type2, params) {\n if (process.env.NODE_ENV !== \"production\" || false) {\n return assign(new Error(ErrorTypeMessages[type2](params)), {\n type: type2,\n [NavigationFailureSymbol]: true\n }, params);\n } else {\n return assign(new Error(), {\n type: type2,\n [NavigationFailureSymbol]: true\n }, params);\n }\n}\nfunction isNavigationFailure(error, type2) {\n return error instanceof Error && NavigationFailureSymbol in error && (type2 == null || !!(error.type & type2));\n}\nconst propertiesToLog = [\"params\", \"query\", \"hash\"];\nfunction stringifyRoute(to) {\n if (typeof to === \"string\")\n return to;\n if (\"path\" in to)\n return to.path;\n const location2 = {};\n for (const key of propertiesToLog) {\n if (key in to)\n location2[key] = to[key];\n }\n return JSON.stringify(location2, null, 2);\n}\nconst BASE_PARAM_PATTERN = \"[^/]+?\";\nconst BASE_PATH_PARSER_OPTIONS = {\n sensitive: false,\n strict: false,\n start: true,\n end: true\n};\nconst REGEX_CHARS_RE = /[.+*?^${}()[\\]/\\\\]/g;\nfunction tokensToParser(segments, extraOptions) {\n const options = assign({}, BASE_PATH_PARSER_OPTIONS, extraOptions);\n const score = [];\n let pattern = options.start ? \"^\" : \"\";\n const keys = [];\n for (const segment of segments) {\n const segmentScores = segment.length ? [] : [\n 90\n /* PathScore.Root */\n ];\n if (options.strict && !segment.length)\n pattern += \"/\";\n for (let tokenIndex = 0; tokenIndex < segment.length; tokenIndex++) {\n const token = segment[tokenIndex];\n let subSegmentScore = 40 + (options.sensitive ? 0.25 : 0);\n if (token.type === 0) {\n if (!tokenIndex)\n pattern += \"/\";\n pattern += token.value.replace(REGEX_CHARS_RE, \"\\\\$&\");\n subSegmentScore += 40;\n } else if (token.type === 1) {\n const { value, repeatable, optional, regexp } = token;\n keys.push({\n name: value,\n repeatable,\n optional\n });\n const re2 = regexp ? regexp : BASE_PARAM_PATTERN;\n if (re2 !== BASE_PARAM_PATTERN) {\n subSegmentScore += 10;\n try {\n new RegExp(`(${re2})`);\n } catch (err) {\n throw new Error(`Invalid custom RegExp for param \"${value}\" (${re2}): ` + err.message);\n }\n }\n let subPattern = repeatable ? `((?:${re2})(?:/(?:${re2}))*)` : `(${re2})`;\n if (!tokenIndex)\n subPattern = // avoid an optional / if there are more segments e.g. /:p?-static\n // or /:p?-:p2\n optional && segment.length < 2 ? `(?:/${subPattern})` : \"/\" + subPattern;\n if (optional)\n subPattern += \"?\";\n pattern += subPattern;\n subSegmentScore += 20;\n if (optional)\n subSegmentScore += -8;\n if (repeatable)\n subSegmentScore += -20;\n if (re2 === \".*\")\n subSegmentScore += -50;\n }\n segmentScores.push(subSegmentScore);\n }\n score.push(segmentScores);\n }\n if (options.strict && options.end) {\n const i = score.length - 1;\n score[i][score[i].length - 1] += 0.7000000000000001;\n }\n if (!options.strict)\n pattern += \"/?\";\n if (options.end)\n pattern += \"$\";\n else if (options.strict)\n pattern += \"(?:/|$)\";\n const re = new RegExp(pattern, options.sensitive ? \"\" : \"i\");\n function parse2(path) {\n const match = path.match(re);\n const params = {};\n if (!match)\n return null;\n for (let i = 1; i < match.length; i++) {\n const value = match[i] || \"\";\n const key = keys[i - 1];\n params[key.name] = value && key.repeatable ? value.split(\"/\") : value;\n }\n return params;\n }\n function stringify2(params) {\n let path = \"\";\n let avoidDuplicatedSlash = false;\n for (const segment of segments) {\n if (!avoidDuplicatedSlash || !path.endsWith(\"/\"))\n path += \"/\";\n avoidDuplicatedSlash = false;\n for (const token of segment) {\n if (token.type === 0) {\n path += token.value;\n } else if (token.type === 1) {\n const { value, repeatable, optional } = token;\n const param = value in params ? params[value] : \"\";\n if (isArray(param) && !repeatable) {\n throw new Error(`Provided param \"${value}\" is an array but it is not repeatable (* or + modifiers)`);\n }\n const text = isArray(param) ? param.join(\"/\") : param;\n if (!text) {\n if (optional) {\n if (segment.length < 2) {\n if (path.endsWith(\"/\"))\n path = path.slice(0, -1);\n else\n avoidDuplicatedSlash = true;\n }\n } else\n throw new Error(`Missing required param \"${value}\"`);\n }\n path += text;\n }\n }\n }\n return path || \"/\";\n }\n return {\n re,\n score,\n keys,\n parse: parse2,\n stringify: stringify2\n };\n}\nfunction compareScoreArray(a, b) {\n let i = 0;\n while (i < a.length && i < b.length) {\n const diff = b[i] - a[i];\n if (diff)\n return diff;\n i++;\n }\n if (a.length < b.length) {\n return a.length === 1 && a[0] === 40 + 40 ? -1 : 1;\n } else if (a.length > b.length) {\n return b.length === 1 && b[0] === 40 + 40 ? 1 : -1;\n }\n return 0;\n}\nfunction comparePathParserScore(a, b) {\n let i = 0;\n const aScore = a.score;\n const bScore = b.score;\n while (i < aScore.length && i < bScore.length) {\n const comp = compareScoreArray(aScore[i], bScore[i]);\n if (comp)\n return comp;\n i++;\n }\n if (Math.abs(bScore.length - aScore.length) === 1) {\n if (isLastScoreNegative(aScore))\n return 1;\n if (isLastScoreNegative(bScore))\n return -1;\n }\n return bScore.length - aScore.length;\n}\nfunction isLastScoreNegative(score) {\n const last = score[score.length - 1];\n return score.length > 0 && last[last.length - 1] < 0;\n}\nconst ROOT_TOKEN = {\n type: 0,\n value: \"\"\n};\nconst VALID_PARAM_RE = /[a-zA-Z0-9_]/;\nfunction tokenizePath(path) {\n if (!path)\n return [[]];\n if (path === \"/\")\n return [[ROOT_TOKEN]];\n if (!path.startsWith(\"/\")) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `Route paths should start with a \"/\": \"${path}\" should be \"/${path}\".` : `Invalid path \"${path}\"`);\n }\n function crash(message) {\n throw new Error(`ERR (${state})/\"${buffer}\": ${message}`);\n }\n let state = 0;\n let previousState = state;\n const tokens = [];\n let segment;\n function finalizeSegment() {\n if (segment)\n tokens.push(segment);\n segment = [];\n }\n let i = 0;\n let char;\n let buffer = \"\";\n let customRe = \"\";\n function consumeBuffer() {\n if (!buffer)\n return;\n if (state === 0) {\n segment.push({\n type: 0,\n value: buffer\n });\n } else if (state === 1 || state === 2 || state === 3) {\n if (segment.length > 1 && (char === \"*\" || char === \"+\"))\n crash(`A repeatable param (${buffer}) must be alone in its segment. eg: '/:ids+.`);\n segment.push({\n type: 1,\n value: buffer,\n regexp: customRe,\n repeatable: char === \"*\" || char === \"+\",\n optional: char === \"*\" || char === \"?\"\n });\n } else {\n crash(\"Invalid state to consume buffer\");\n }\n buffer = \"\";\n }\n function addCharToBuffer() {\n buffer += char;\n }\n while (i < path.length) {\n char = path[i++];\n if (char === \"\\\\\" && state !== 2) {\n previousState = state;\n state = 4;\n continue;\n }\n switch (state) {\n case 0:\n if (char === \"/\") {\n if (buffer) {\n consumeBuffer();\n }\n finalizeSegment();\n } else if (char === \":\") {\n consumeBuffer();\n state = 1;\n } else {\n addCharToBuffer();\n }\n break;\n case 4:\n addCharToBuffer();\n state = previousState;\n break;\n case 1:\n if (char === \"(\") {\n state = 2;\n } else if (VALID_PARAM_RE.test(char)) {\n addCharToBuffer();\n } else {\n consumeBuffer();\n state = 0;\n if (char !== \"*\" && char !== \"?\" && char !== \"+\")\n i--;\n }\n break;\n case 2:\n if (char === \")\") {\n if (customRe[customRe.length - 1] == \"\\\\\")\n customRe = customRe.slice(0, -1) + char;\n else\n state = 3;\n } else {\n customRe += char;\n }\n break;\n case 3:\n consumeBuffer();\n state = 0;\n if (char !== \"*\" && char !== \"?\" && char !== \"+\")\n i--;\n customRe = \"\";\n break;\n default:\n crash(\"Unknown state\");\n break;\n }\n }\n if (state === 2)\n crash(`Unfinished custom RegExp for param \"${buffer}\"`);\n consumeBuffer();\n finalizeSegment();\n return tokens;\n}\nfunction createRouteRecordMatcher(record, parent, options) {\n const parser = tokensToParser(tokenizePath(record.path), options);\n if (process.env.NODE_ENV !== \"production\") {\n const existingKeys = /* @__PURE__ */ new Set();\n for (const key of parser.keys) {\n if (existingKeys.has(key.name))\n warn(`Found duplicated params with name \"${key.name}\" for path \"${record.path}\". Only the last one will be available on \"$route.params\".`);\n existingKeys.add(key.name);\n }\n }\n const matcher = assign(parser, {\n record,\n parent,\n // these needs to be populated by the parent\n children: [],\n alias: []\n });\n if (parent) {\n if (!matcher.record.aliasOf === !parent.record.aliasOf)\n parent.children.push(matcher);\n }\n return matcher;\n}\nfunction createRouterMatcher(routes, globalOptions) {\n const matchers = [];\n const matcherMap = /* @__PURE__ */ new Map();\n globalOptions = mergeOptions({ strict: false, end: true, sensitive: false }, globalOptions);\n function getRecordMatcher(name) {\n return matcherMap.get(name);\n }\n function addRoute(record, parent, originalRecord) {\n const isRootAdd = !originalRecord;\n const mainNormalizedRecord = normalizeRouteRecord(record);\n if (process.env.NODE_ENV !== \"production\") {\n checkChildMissingNameWithEmptyPath(mainNormalizedRecord, parent);\n }\n mainNormalizedRecord.aliasOf = originalRecord && originalRecord.record;\n const options = mergeOptions(globalOptions, record);\n const normalizedRecords = [\n mainNormalizedRecord\n ];\n if (\"alias\" in record) {\n const aliases = typeof record.alias === \"string\" ? [record.alias] : record.alias;\n for (const alias of aliases) {\n normalizedRecords.push(assign({}, mainNormalizedRecord, {\n // this allows us to hold a copy of the `components` option\n // so that async components cache is hold on the original record\n components: originalRecord ? originalRecord.record.components : mainNormalizedRecord.components,\n path: alias,\n // we might be the child of an alias\n aliasOf: originalRecord ? originalRecord.record : mainNormalizedRecord\n // the aliases are always of the same kind as the original since they\n // are defined on the same record\n }));\n }\n }\n let matcher;\n let originalMatcher;\n for (const normalizedRecord of normalizedRecords) {\n const { path } = normalizedRecord;\n if (parent && path[0] !== \"/\") {\n const parentPath = parent.record.path;\n const connectingSlash = parentPath[parentPath.length - 1] === \"/\" ? \"\" : \"/\";\n normalizedRecord.path = parent.record.path + (path && connectingSlash + path);\n }\n if (process.env.NODE_ENV !== \"production\" && normalizedRecord.path === \"*\") {\n throw new Error('Catch all routes (\"*\") must now be defined using a param with a custom regexp.\\nSee more at https://next.router.vuejs.org/guide/migration/#removed-star-or-catch-all-routes.');\n }\n matcher = createRouteRecordMatcher(normalizedRecord, parent, options);\n if (process.env.NODE_ENV !== \"production\" && parent && path[0] === \"/\")\n checkMissingParamsInAbsolutePath(matcher, parent);\n if (originalRecord) {\n originalRecord.alias.push(matcher);\n if (process.env.NODE_ENV !== \"production\") {\n checkSameParams(originalRecord, matcher);\n }\n } else {\n originalMatcher = originalMatcher || matcher;\n if (originalMatcher !== matcher)\n originalMatcher.alias.push(matcher);\n if (isRootAdd && record.name && !isAliasRecord(matcher))\n removeRoute(record.name);\n }\n if (mainNormalizedRecord.children) {\n const children = mainNormalizedRecord.children;\n for (let i = 0; i < children.length; i++) {\n addRoute(children[i], matcher, originalRecord && originalRecord.children[i]);\n }\n }\n originalRecord = originalRecord || matcher;\n if (matcher.record.components && Object.keys(matcher.record.components).length || matcher.record.name || matcher.record.redirect) {\n insertMatcher(matcher);\n }\n }\n return originalMatcher ? () => {\n removeRoute(originalMatcher);\n } : noop;\n }\n function removeRoute(matcherRef) {\n if (isRouteName(matcherRef)) {\n const matcher = matcherMap.get(matcherRef);\n if (matcher) {\n matcherMap.delete(matcherRef);\n matchers.splice(matchers.indexOf(matcher), 1);\n matcher.children.forEach(removeRoute);\n matcher.alias.forEach(removeRoute);\n }\n } else {\n const index2 = matchers.indexOf(matcherRef);\n if (index2 > -1) {\n matchers.splice(index2, 1);\n if (matcherRef.record.name)\n matcherMap.delete(matcherRef.record.name);\n matcherRef.children.forEach(removeRoute);\n matcherRef.alias.forEach(removeRoute);\n }\n }\n }\n function getRoutes() {\n return matchers;\n }\n function insertMatcher(matcher) {\n let i = 0;\n while (i < matchers.length && comparePathParserScore(matcher, matchers[i]) >= 0 && // Adding children with empty path should still appear before the parent\n // https://github.com/vuejs/router/issues/1124\n (matcher.record.path !== matchers[i].record.path || !isRecordChildOf(matcher, matchers[i])))\n i++;\n matchers.splice(i, 0, matcher);\n if (matcher.record.name && !isAliasRecord(matcher))\n matcherMap.set(matcher.record.name, matcher);\n }\n function resolve(location2, currentLocation) {\n let matcher;\n let params = {};\n let path;\n let name;\n if (\"name\" in location2 && location2.name) {\n matcher = matcherMap.get(location2.name);\n if (!matcher)\n throw createRouterError(1, {\n location: location2\n });\n if (process.env.NODE_ENV !== \"production\") {\n const invalidParams = Object.keys(location2.params || {}).filter((paramName) => !matcher.keys.find((k) => k.name === paramName));\n if (invalidParams.length) {\n warn(`Discarded invalid param(s) \"${invalidParams.join('\", \"')}\" when navigating. See https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 for more details.`);\n }\n }\n name = matcher.record.name;\n params = assign(\n // paramsFromLocation is a new object\n paramsFromLocation(\n currentLocation.params,\n // only keep params that exist in the resolved location\n // TODO: only keep optional params coming from a parent record\n matcher.keys.filter((k) => !k.optional).map((k) => k.name)\n ),\n // discard any existing params in the current location that do not exist here\n // #1497 this ensures better active/exact matching\n location2.params && paramsFromLocation(location2.params, matcher.keys.map((k) => k.name))\n );\n path = matcher.stringify(params);\n } else if (\"path\" in location2) {\n path = location2.path;\n if (process.env.NODE_ENV !== \"production\" && !path.startsWith(\"/\")) {\n warn(`The Matcher cannot resolve relative paths but received \"${path}\". Unless you directly called \\`matcher.resolve(\"${path}\")\\`, this is probably a bug in vue-router. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/router.`);\n }\n matcher = matchers.find((m2) => m2.re.test(path));\n if (matcher) {\n params = matcher.parse(path);\n name = matcher.record.name;\n }\n } else {\n matcher = currentLocation.name ? matcherMap.get(currentLocation.name) : matchers.find((m2) => m2.re.test(currentLocation.path));\n if (!matcher)\n throw createRouterError(1, {\n location: location2,\n currentLocation\n });\n name = matcher.record.name;\n params = assign({}, currentLocation.params, location2.params);\n path = matcher.stringify(params);\n }\n const matched = [];\n let parentMatcher = matcher;\n while (parentMatcher) {\n matched.unshift(parentMatcher.record);\n parentMatcher = parentMatcher.parent;\n }\n return {\n name,\n path,\n params,\n matched,\n meta: mergeMetaFields(matched)\n };\n }\n routes.forEach((route) => addRoute(route));\n return { addRoute, resolve, removeRoute, getRoutes, getRecordMatcher };\n}\nfunction paramsFromLocation(params, keys) {\n const newParams = {};\n for (const key of keys) {\n if (key in params)\n newParams[key] = params[key];\n }\n return newParams;\n}\nfunction normalizeRouteRecord(record) {\n return {\n path: record.path,\n redirect: record.redirect,\n name: record.name,\n meta: record.meta || {},\n aliasOf: void 0,\n beforeEnter: record.beforeEnter,\n props: normalizeRecordProps(record),\n children: record.children || [],\n instances: {},\n leaveGuards: /* @__PURE__ */ new Set(),\n updateGuards: /* @__PURE__ */ new Set(),\n enterCallbacks: {},\n components: \"components\" in record ? record.components || null : record.component && { default: record.component }\n };\n}\nfunction normalizeRecordProps(record) {\n const propsObject = {};\n const props = record.props || false;\n if (\"component\" in record) {\n propsObject.default = props;\n } else {\n for (const name in record.components)\n propsObject[name] = typeof props === \"boolean\" ? props : props[name];\n }\n return propsObject;\n}\nfunction isAliasRecord(record) {\n while (record) {\n if (record.record.aliasOf)\n return true;\n record = record.parent;\n }\n return false;\n}\nfunction mergeMetaFields(matched) {\n return matched.reduce((meta, record) => assign(meta, record.meta), {});\n}\nfunction mergeOptions(defaults, partialOptions) {\n const options = {};\n for (const key in defaults) {\n options[key] = key in partialOptions ? partialOptions[key] : defaults[key];\n }\n return options;\n}\nfunction isSameParam(a, b) {\n return a.name === b.name && a.optional === b.optional && a.repeatable === b.repeatable;\n}\nfunction checkSameParams(a, b) {\n for (const key of a.keys) {\n if (!key.optional && !b.keys.find(isSameParam.bind(null, key)))\n return warn(`Alias \"${b.record.path}\" and the original record: \"${a.record.path}\" must have the exact same param named \"${key.name}\"`);\n }\n for (const key of b.keys) {\n if (!key.optional && !a.keys.find(isSameParam.bind(null, key)))\n return warn(`Alias \"${b.record.path}\" and the original record: \"${a.record.path}\" must have the exact same param named \"${key.name}\"`);\n }\n}\nfunction checkChildMissingNameWithEmptyPath(mainNormalizedRecord, parent) {\n if (parent && parent.record.name && !mainNormalizedRecord.name && !mainNormalizedRecord.path) {\n warn(`The route named \"${String(parent.record.name)}\" has a child without a name and an empty path. Using that name won't render the empty path child so you probably want to move the name to the child instead. If this is intentional, add a name to the child route to remove the warning.`);\n }\n}\nfunction checkMissingParamsInAbsolutePath(record, parent) {\n for (const key of parent.keys) {\n if (!record.keys.find(isSameParam.bind(null, key)))\n return warn(`Absolute path \"${record.record.path}\" must have the exact same param named \"${key.name}\" as its parent \"${parent.record.path}\".`);\n }\n}\nfunction isRecordChildOf(record, parent) {\n return parent.children.some((child) => child === record || isRecordChildOf(record, child));\n}\nconst HASH_RE = /#/g;\nconst AMPERSAND_RE = /&/g;\nconst SLASH_RE = /\\//g;\nconst EQUAL_RE = /=/g;\nconst IM_RE = /\\?/g;\nconst PLUS_RE = /\\+/g;\nconst ENC_BRACKET_OPEN_RE = /%5B/g;\nconst ENC_BRACKET_CLOSE_RE = /%5D/g;\nconst ENC_CARET_RE = /%5E/g;\nconst ENC_BACKTICK_RE = /%60/g;\nconst ENC_CURLY_OPEN_RE = /%7B/g;\nconst ENC_PIPE_RE = /%7C/g;\nconst ENC_CURLY_CLOSE_RE = /%7D/g;\nconst ENC_SPACE_RE = /%20/g;\nfunction commonEncode(text) {\n return encodeURI(\"\" + text).replace(ENC_PIPE_RE, \"|\").replace(ENC_BRACKET_OPEN_RE, \"[\").replace(ENC_BRACKET_CLOSE_RE, \"]\");\n}\nfunction encodeHash(text) {\n return commonEncode(text).replace(ENC_CURLY_OPEN_RE, \"{\").replace(ENC_CURLY_CLOSE_RE, \"}\").replace(ENC_CARET_RE, \"^\");\n}\nfunction encodeQueryValue(text) {\n return commonEncode(text).replace(PLUS_RE, \"%2B\").replace(ENC_SPACE_RE, \"+\").replace(HASH_RE, \"%23\").replace(AMPERSAND_RE, \"%26\").replace(ENC_BACKTICK_RE, \"`\").replace(ENC_CURLY_OPEN_RE, \"{\").replace(ENC_CURLY_CLOSE_RE, \"}\").replace(ENC_CARET_RE, \"^\");\n}\nfunction encodeQueryKey(text) {\n return encodeQueryValue(text).replace(EQUAL_RE, \"%3D\");\n}\nfunction encodePath(text) {\n return commonEncode(text).replace(HASH_RE, \"%23\").replace(IM_RE, \"%3F\");\n}\nfunction encodeParam(text) {\n return text == null ? \"\" : encodePath(text).replace(SLASH_RE, \"%2F\");\n}\nfunction decode(text) {\n try {\n return decodeURIComponent(\"\" + text);\n } catch (err) {\n process.env.NODE_ENV !== \"production\" && warn(`Error decoding \"${text}\". Using original value`);\n }\n return \"\" + text;\n}\nfunction parseQuery(search) {\n const query = {};\n if (search === \"\" || search === \"?\")\n return query;\n const hasLeadingIM = search[0] === \"?\";\n const searchParams = (hasLeadingIM ? search.slice(1) : search).split(\"&\");\n for (let i = 0; i < searchParams.length; ++i) {\n const searchParam = searchParams[i].replace(PLUS_RE, \" \");\n const eqPos = searchParam.indexOf(\"=\");\n const key = decode(eqPos < 0 ? searchParam : searchParam.slice(0, eqPos));\n const value = eqPos < 0 ? null : decode(searchParam.slice(eqPos + 1));\n if (key in query) {\n let currentValue = query[key];\n if (!isArray(currentValue)) {\n currentValue = query[key] = [currentValue];\n }\n currentValue.push(value);\n } else {\n query[key] = value;\n }\n }\n return query;\n}\nfunction stringifyQuery(query) {\n let search = \"\";\n for (let key in query) {\n const value = query[key];\n key = encodeQueryKey(key);\n if (value == null) {\n if (value !== void 0) {\n search += (search.length ? \"&\" : \"\") + key;\n }\n continue;\n }\n const values = isArray(value) ? value.map((v) => v && encodeQueryValue(v)) : [value && encodeQueryValue(value)];\n values.forEach((value2) => {\n if (value2 !== void 0) {\n search += (search.length ? \"&\" : \"\") + key;\n if (value2 != null)\n search += \"=\" + value2;\n }\n });\n }\n return search;\n}\nfunction normalizeQuery(query) {\n const normalizedQuery = {};\n for (const key in query) {\n const value = query[key];\n if (value !== void 0) {\n normalizedQuery[key] = isArray(value) ? value.map((v) => v == null ? null : \"\" + v) : value == null ? value : \"\" + value;\n }\n }\n return normalizedQuery;\n}\nconst matchedRouteKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"router view location matched\" : \"\");\nconst viewDepthKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"router view depth\" : \"\");\nconst routerKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"router\" : \"\");\nconst routeLocationKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"route location\" : \"\");\nconst routerViewLocationKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"router view location\" : \"\");\nfunction useCallbacks() {\n let handlers = [];\n function add(handler) {\n handlers.push(handler);\n return () => {\n const i = handlers.indexOf(handler);\n if (i > -1)\n handlers.splice(i, 1);\n };\n }\n function reset() {\n handlers = [];\n }\n return {\n add,\n list: () => handlers,\n reset\n };\n}\nfunction guardToPromiseFn(guard, to, from, record, name) {\n const enterCallbackArray = record && // name is defined if record is because of the function overload\n (record.enterCallbacks[name] = record.enterCallbacks[name] || []);\n return () => new Promise((resolve, reject) => {\n const next = (valid) => {\n if (valid === false) {\n reject(createRouterError(4, {\n from,\n to\n }));\n } else if (valid instanceof Error) {\n reject(valid);\n } else if (isRouteLocation(valid)) {\n reject(createRouterError(2, {\n from: to,\n to: valid\n }));\n } else {\n if (enterCallbackArray && // since enterCallbackArray is truthy, both record and name also are\n record.enterCallbacks[name] === enterCallbackArray && typeof valid === \"function\") {\n enterCallbackArray.push(valid);\n }\n resolve();\n }\n };\n const guardReturn = guard.call(record && record.instances[name], to, from, process.env.NODE_ENV !== \"production\" ? canOnlyBeCalledOnce(next, to, from) : next);\n let guardCall = Promise.resolve(guardReturn);\n if (guard.length < 3)\n guardCall = guardCall.then(next);\n if (process.env.NODE_ENV !== \"production\" && guard.length > 2) {\n const message = `The \"next\" callback was never called inside of ${guard.name ? '\"' + guard.name + '\"' : \"\"}:\n${guard.toString()}\n. If you are returning a value instead of calling \"next\", make sure to remove the \"next\" parameter from your function.`;\n if (typeof guardReturn === \"object\" && \"then\" in guardReturn) {\n guardCall = guardCall.then((resolvedValue) => {\n if (!next._called) {\n warn(message);\n return Promise.reject(new Error(\"Invalid navigation guard\"));\n }\n return resolvedValue;\n });\n } else if (guardReturn !== void 0) {\n if (!next._called) {\n warn(message);\n reject(new Error(\"Invalid navigation guard\"));\n return;\n }\n }\n }\n guardCall.catch((err) => reject(err));\n });\n}\nfunction canOnlyBeCalledOnce(next, to, from) {\n let called = 0;\n return function() {\n if (called++ === 1)\n warn(`The \"next\" callback was called more than once in one navigation guard when going from \"${from.fullPath}\" to \"${to.fullPath}\". It should be called exactly one time in each navigation guard. This will fail in production.`);\n next._called = true;\n if (called === 1)\n next.apply(null, arguments);\n };\n}\nfunction extractComponentsGuards(matched, guardType, to, from) {\n const guards = [];\n for (const record of matched) {\n if (process.env.NODE_ENV !== \"production\" && !record.components && !record.children.length) {\n warn(`Record with path \"${record.path}\" is either missing a \"component(s)\" or \"children\" property.`);\n }\n for (const name in record.components) {\n let rawComponent = record.components[name];\n if (process.env.NODE_ENV !== \"production\") {\n if (!rawComponent || typeof rawComponent !== \"object\" && typeof rawComponent !== \"function\") {\n warn(`Component \"${name}\" in record with path \"${record.path}\" is not a valid component. Received \"${String(rawComponent)}\".`);\n throw new Error(\"Invalid route component\");\n } else if (\"then\" in rawComponent) {\n warn(`Component \"${name}\" in record with path \"${record.path}\" is a Promise instead of a function that returns a Promise. Did you write \"import('./MyPage.vue')\" instead of \"() => import('./MyPage.vue')\" ? This will break in production if not fixed.`);\n const promise = rawComponent;\n rawComponent = () => promise;\n } else if (rawComponent.__asyncLoader && // warn only once per component\n !rawComponent.__warnedDefineAsync) {\n rawComponent.__warnedDefineAsync = true;\n warn(`Component \"${name}\" in record with path \"${record.path}\" is defined using \"defineAsyncComponent()\". Write \"() => import('./MyPage.vue')\" instead of \"defineAsyncComponent(() => import('./MyPage.vue'))\".`);\n }\n }\n if (guardType !== \"beforeRouteEnter\" && !record.instances[name])\n continue;\n if (isRouteComponent(rawComponent)) {\n const options = rawComponent.__vccOpts || rawComponent;\n const guard = options[guardType];\n guard && guards.push(guardToPromiseFn(guard, to, from, record, name));\n } else {\n let componentPromise = rawComponent();\n if (process.env.NODE_ENV !== \"production\" && !(\"catch\" in componentPromise)) {\n warn(`Component \"${name}\" in record with path \"${record.path}\" is a function that does not return a Promise. If you were passing a functional component, make sure to add a \"displayName\" to the component. This will break in production if not fixed.`);\n componentPromise = Promise.resolve(componentPromise);\n }\n guards.push(() => componentPromise.then((resolved) => {\n if (!resolved)\n return Promise.reject(new Error(`Couldn't resolve component \"${name}\" at \"${record.path}\"`));\n const resolvedComponent = isESModule(resolved) ? resolved.default : resolved;\n record.components[name] = resolvedComponent;\n const options = resolvedComponent.__vccOpts || resolvedComponent;\n const guard = options[guardType];\n return guard && guardToPromiseFn(guard, to, from, record, name)();\n }));\n }\n }\n }\n return guards;\n}\nfunction isRouteComponent(component) {\n return typeof component === \"object\" || \"displayName\" in component || \"props\" in component || \"__vccOpts\" in component;\n}\nfunction useLink(props) {\n const router2 = inject(routerKey);\n const currentRoute = inject(routeLocationKey);\n const route = computed(() => router2.resolve(unref(props.to)));\n const activeRecordIndex = computed(() => {\n const { matched } = route.value;\n const { length } = matched;\n const routeMatched = matched[length - 1];\n const currentMatched = currentRoute.matched;\n if (!routeMatched || !currentMatched.length)\n return -1;\n const index2 = currentMatched.findIndex(isSameRouteRecord.bind(null, routeMatched));\n if (index2 > -1)\n return index2;\n const parentRecordPath = getOriginalPath(matched[length - 2]);\n return (\n // we are dealing with nested routes\n length > 1 && // if the parent and matched route have the same path, this link is\n // referring to the empty child. Or we currently are on a different\n // child of the same parent\n getOriginalPath(routeMatched) === parentRecordPath && // avoid comparing the child with its parent\n currentMatched[currentMatched.length - 1].path !== parentRecordPath ? currentMatched.findIndex(isSameRouteRecord.bind(null, matched[length - 2])) : index2\n );\n });\n const isActive = computed(() => activeRecordIndex.value > -1 && includesParams(currentRoute.params, route.value.params));\n const isExactActive = computed(() => activeRecordIndex.value > -1 && activeRecordIndex.value === currentRoute.matched.length - 1 && isSameRouteLocationParams(currentRoute.params, route.value.params));\n function navigate(e = {}) {\n if (guardEvent(e)) {\n return router2[unref(props.replace) ? \"replace\" : \"push\"](\n unref(props.to)\n // avoid uncaught errors are they are logged anyway\n ).catch(noop);\n }\n return Promise.resolve();\n }\n if ((process.env.NODE_ENV !== \"production\" || false) && isBrowser) {\n const instance = getCurrentInstance();\n if (instance) {\n const linkContextDevtools = {\n route: route.value,\n isActive: isActive.value,\n isExactActive: isExactActive.value\n };\n instance.__vrl_devtools = instance.__vrl_devtools || [];\n instance.__vrl_devtools.push(linkContextDevtools);\n watchEffect(() => {\n linkContextDevtools.route = route.value;\n linkContextDevtools.isActive = isActive.value;\n linkContextDevtools.isExactActive = isExactActive.value;\n }, { flush: \"post\" });\n }\n }\n return {\n route,\n href: computed(() => route.value.href),\n isActive,\n isExactActive,\n navigate\n };\n}\nconst RouterLinkImpl = /* @__PURE__ */ defineComponent({\n name: \"RouterLink\",\n compatConfig: { MODE: 3 },\n props: {\n to: {\n type: [String, Object],\n required: true\n },\n replace: Boolean,\n activeClass: String,\n // inactiveClass: String,\n exactActiveClass: String,\n custom: Boolean,\n ariaCurrentValue: {\n type: String,\n default: \"page\"\n }\n },\n useLink,\n setup(props, { slots }) {\n const link = reactive(useLink(props));\n const { options } = inject(routerKey);\n const elClass = computed(() => ({\n [getLinkClass(props.activeClass, options.linkActiveClass, \"router-link-active\")]: link.isActive,\n // [getLinkClass(\n // props.inactiveClass,\n // options.linkInactiveClass,\n // 'router-link-inactive'\n // )]: !link.isExactActive,\n [getLinkClass(props.exactActiveClass, options.linkExactActiveClass, \"router-link-exact-active\")]: link.isExactActive\n }));\n return () => {\n const children = slots.default && slots.default(link);\n return props.custom ? children : h$1(\"a\", {\n \"aria-current\": link.isExactActive ? props.ariaCurrentValue : null,\n href: link.href,\n // this would override user added attrs but Vue will still add\n // the listener, so we end up triggering both\n onClick: link.navigate,\n class: elClass.value\n }, children);\n };\n }\n});\nconst RouterLink = RouterLinkImpl;\nfunction guardEvent(e) {\n if (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey)\n return;\n if (e.defaultPrevented)\n return;\n if (e.button !== void 0 && e.button !== 0)\n return;\n if (e.currentTarget && e.currentTarget.getAttribute) {\n const target = e.currentTarget.getAttribute(\"target\");\n if (/\\b_blank\\b/i.test(target))\n return;\n }\n if (e.preventDefault)\n e.preventDefault();\n return true;\n}\nfunction includesParams(outer, inner) {\n for (const key in inner) {\n const innerValue = inner[key];\n const outerValue = outer[key];\n if (typeof innerValue === \"string\") {\n if (innerValue !== outerValue)\n return false;\n } else {\n if (!isArray(outerValue) || outerValue.length !== innerValue.length || innerValue.some((value, i) => value !== outerValue[i]))\n return false;\n }\n }\n return true;\n}\nfunction getOriginalPath(record) {\n return record ? record.aliasOf ? record.aliasOf.path : record.path : \"\";\n}\nconst getLinkClass = (propClass, globalClass, defaultClass) => propClass != null ? propClass : globalClass != null ? globalClass : defaultClass;\nconst RouterViewImpl = /* @__PURE__ */ defineComponent({\n name: \"RouterView\",\n // #674 we manually inherit them\n inheritAttrs: false,\n props: {\n name: {\n type: String,\n default: \"default\"\n },\n route: Object\n },\n // Better compat for @vue/compat users\n // https://github.com/vuejs/router/issues/1315\n compatConfig: { MODE: 3 },\n setup(props, { attrs, slots }) {\n process.env.NODE_ENV !== \"production\" && warnDeprecatedUsage();\n const injectedRoute = inject(routerViewLocationKey);\n const routeToDisplay = computed(() => props.route || injectedRoute.value);\n const injectedDepth = inject(viewDepthKey, 0);\n const depth = computed(() => {\n let initialDepth = unref(injectedDepth);\n const { matched } = routeToDisplay.value;\n let matchedRoute;\n while ((matchedRoute = matched[initialDepth]) && !matchedRoute.components) {\n initialDepth++;\n }\n return initialDepth;\n });\n const matchedRouteRef = computed(() => routeToDisplay.value.matched[depth.value]);\n provide(viewDepthKey, computed(() => depth.value + 1));\n provide(matchedRouteKey, matchedRouteRef);\n provide(routerViewLocationKey, routeToDisplay);\n const viewRef = ref();\n watch(() => [viewRef.value, matchedRouteRef.value, props.name], ([instance, to, name], [oldInstance, from, oldName]) => {\n if (to) {\n to.instances[name] = instance;\n if (from && from !== to && instance && instance === oldInstance) {\n if (!to.leaveGuards.size) {\n to.leaveGuards = from.leaveGuards;\n }\n if (!to.updateGuards.size) {\n to.updateGuards = from.updateGuards;\n }\n }\n }\n if (instance && to && // if there is no instance but to and from are the same this might be\n // the first visit\n (!from || !isSameRouteRecord(to, from) || !oldInstance)) {\n (to.enterCallbacks[name] || []).forEach((callback) => callback(instance));\n }\n }, { flush: \"post\" });\n return () => {\n const route = routeToDisplay.value;\n const currentName = props.name;\n const matchedRoute = matchedRouteRef.value;\n const ViewComponent = matchedRoute && matchedRoute.components[currentName];\n if (!ViewComponent) {\n return normalizeSlot(slots.default, { Component: ViewComponent, route });\n }\n const routePropsOption = matchedRoute.props[currentName];\n const routeProps = routePropsOption ? routePropsOption === true ? route.params : typeof routePropsOption === \"function\" ? routePropsOption(route) : routePropsOption : null;\n const onVnodeUnmounted = (vnode) => {\n if (vnode.component.isUnmounted) {\n matchedRoute.instances[currentName] = null;\n }\n };\n const component = h$1(ViewComponent, assign({}, routeProps, attrs, {\n onVnodeUnmounted,\n ref: viewRef\n }));\n if ((process.env.NODE_ENV !== \"production\" || false) && isBrowser && component.ref) {\n const info = {\n depth: depth.value,\n name: matchedRoute.name,\n path: matchedRoute.path,\n meta: matchedRoute.meta\n };\n const internalInstances = isArray(component.ref) ? component.ref.map((r) => r.i) : [component.ref.i];\n internalInstances.forEach((instance) => {\n instance.__vrv_devtools = info;\n });\n }\n return (\n // pass the vnode to the slot as a prop.\n // h and both accept vnodes\n normalizeSlot(slots.default, { Component: component, route }) || component\n );\n };\n }\n});\nfunction normalizeSlot(slot, data) {\n if (!slot)\n return null;\n const slotContent = slot(data);\n return slotContent.length === 1 ? slotContent[0] : slotContent;\n}\nconst RouterView = RouterViewImpl;\nfunction warnDeprecatedUsage() {\n const instance = getCurrentInstance();\n const parentName = instance.parent && instance.parent.type.name;\n if (parentName && (parentName === \"KeepAlive\" || parentName.includes(\"Transition\"))) {\n const comp = parentName === \"KeepAlive\" ? \"keep-alive\" : \"transition\";\n warn(` can no longer be used directly inside or .\nUse slot props instead:\n\n\n <${comp}>\n \n \n`);\n }\n}\nfunction formatRouteLocation(routeLocation, tooltip) {\n const copy = assign({}, routeLocation, {\n // remove variables that can contain vue instances\n matched: routeLocation.matched.map((matched) => omit(matched, [\"instances\", \"children\", \"aliasOf\"]))\n });\n return {\n _custom: {\n type: null,\n readOnly: true,\n display: routeLocation.fullPath,\n tooltip,\n value: copy\n }\n };\n}\nfunction formatDisplay(display) {\n return {\n _custom: {\n display\n }\n };\n}\nlet routerId = 0;\nfunction addDevtools(app, router2, matcher) {\n if (router2.__hasDevtools)\n return;\n router2.__hasDevtools = true;\n const id = routerId++;\n setupDevtoolsPlugin({\n id: \"org.vuejs.router\" + (id ? \".\" + id : \"\"),\n label: \"Vue Router\",\n packageName: \"vue-router\",\n homepage: \"https://router.vuejs.org\",\n logo: \"https://router.vuejs.org/logo.png\",\n componentStateTypes: [\"Routing\"],\n app\n }, (api) => {\n if (typeof api.now !== \"function\") {\n console.warn(\"[Vue Router]: You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html.\");\n }\n api.on.inspectComponent((payload, ctx) => {\n if (payload.instanceData) {\n payload.instanceData.state.push({\n type: \"Routing\",\n key: \"$route\",\n editable: false,\n value: formatRouteLocation(router2.currentRoute.value, \"Current Route\")\n });\n }\n });\n api.on.visitComponentTree(({ treeNode: node, componentInstance }) => {\n if (componentInstance.__vrv_devtools) {\n const info = componentInstance.__vrv_devtools;\n node.tags.push({\n label: (info.name ? `${info.name.toString()}: ` : \"\") + info.path,\n textColor: 0,\n tooltip: \"This component is rendered by <router-view>\",\n backgroundColor: PINK_500\n });\n }\n if (isArray(componentInstance.__vrl_devtools)) {\n componentInstance.__devtoolsApi = api;\n componentInstance.__vrl_devtools.forEach((devtoolsData) => {\n let backgroundColor = ORANGE_400;\n let tooltip = \"\";\n if (devtoolsData.isExactActive) {\n backgroundColor = LIME_500;\n tooltip = \"This is exactly active\";\n } else if (devtoolsData.isActive) {\n backgroundColor = BLUE_600;\n tooltip = \"This link is active\";\n }\n node.tags.push({\n label: devtoolsData.route.path,\n textColor: 0,\n tooltip,\n backgroundColor\n });\n });\n }\n });\n watch(router2.currentRoute, () => {\n refreshRoutesView();\n api.notifyComponentUpdate();\n api.sendInspectorTree(routerInspectorId);\n api.sendInspectorState(routerInspectorId);\n });\n const navigationsLayerId = \"router:navigations:\" + id;\n api.addTimelineLayer({\n id: navigationsLayerId,\n label: `Router${id ? \" \" + id : \"\"} Navigations`,\n color: 4237508\n });\n router2.onError((error, to) => {\n api.addTimelineEvent({\n layerId: navigationsLayerId,\n event: {\n title: \"Error during Navigation\",\n subtitle: to.fullPath,\n logType: \"error\",\n time: api.now(),\n data: { error },\n groupId: to.meta.__navigationId\n }\n });\n });\n let navigationId = 0;\n router2.beforeEach((to, from) => {\n const data = {\n guard: formatDisplay(\"beforeEach\"),\n from: formatRouteLocation(from, \"Current Location during this navigation\"),\n to: formatRouteLocation(to, \"Target location\")\n };\n Object.defineProperty(to.meta, \"__navigationId\", {\n value: navigationId++\n });\n api.addTimelineEvent({\n layerId: navigationsLayerId,\n event: {\n time: api.now(),\n title: \"Start of navigation\",\n subtitle: to.fullPath,\n data,\n groupId: to.meta.__navigationId\n }\n });\n });\n router2.afterEach((to, from, failure) => {\n const data = {\n guard: formatDisplay(\"afterEach\")\n };\n if (failure) {\n data.failure = {\n _custom: {\n type: Error,\n readOnly: true,\n display: failure ? failure.message : \"\",\n tooltip: \"Navigation Failure\",\n value: failure\n }\n };\n data.status = formatDisplay(\"❌\");\n } else {\n data.status = formatDisplay(\"✅\");\n }\n data.from = formatRouteLocation(from, \"Current Location during this navigation\");\n data.to = formatRouteLocation(to, \"Target location\");\n api.addTimelineEvent({\n layerId: navigationsLayerId,\n event: {\n title: \"End of navigation\",\n subtitle: to.fullPath,\n time: api.now(),\n data,\n logType: failure ? \"warning\" : \"default\",\n groupId: to.meta.__navigationId\n }\n });\n });\n const routerInspectorId = \"router-inspector:\" + id;\n api.addInspector({\n id: routerInspectorId,\n label: \"Routes\" + (id ? \" \" + id : \"\"),\n icon: \"book\",\n treeFilterPlaceholder: \"Search routes\"\n });\n function refreshRoutesView() {\n if (!activeRoutesPayload)\n return;\n const payload = activeRoutesPayload;\n let routes = matcher.getRoutes().filter((route) => !route.parent);\n routes.forEach(resetMatchStateOnRouteRecord);\n if (payload.filter) {\n routes = routes.filter((route) => (\n // save matches state based on the payload\n isRouteMatching(route, payload.filter.toLowerCase())\n ));\n }\n routes.forEach((route) => markRouteRecordActive(route, router2.currentRoute.value));\n payload.rootNodes = routes.map(formatRouteRecordForInspector);\n }\n let activeRoutesPayload;\n api.on.getInspectorTree((payload) => {\n activeRoutesPayload = payload;\n if (payload.app === app && payload.inspectorId === routerInspectorId) {\n refreshRoutesView();\n }\n });\n api.on.getInspectorState((payload) => {\n if (payload.app === app && payload.inspectorId === routerInspectorId) {\n const routes = matcher.getRoutes();\n const route = routes.find((route2) => route2.record.__vd_id === payload.nodeId);\n if (route) {\n payload.state = {\n options: formatRouteRecordMatcherForStateInspector(route)\n };\n }\n }\n });\n api.sendInspectorTree(routerInspectorId);\n api.sendInspectorState(routerInspectorId);\n });\n}\nfunction modifierForKey(key) {\n if (key.optional) {\n return key.repeatable ? \"*\" : \"?\";\n } else {\n return key.repeatable ? \"+\" : \"\";\n }\n}\nfunction formatRouteRecordMatcherForStateInspector(route) {\n const { record } = route;\n const fields = [\n { editable: false, key: \"path\", value: record.path }\n ];\n if (record.name != null) {\n fields.push({\n editable: false,\n key: \"name\",\n value: record.name\n });\n }\n fields.push({ editable: false, key: \"regexp\", value: route.re });\n if (route.keys.length) {\n fields.push({\n editable: false,\n key: \"keys\",\n value: {\n _custom: {\n type: null,\n readOnly: true,\n display: route.keys.map((key) => `${key.name}${modifierForKey(key)}`).join(\" \"),\n tooltip: \"Param keys\",\n value: route.keys\n }\n }\n });\n }\n if (record.redirect != null) {\n fields.push({\n editable: false,\n key: \"redirect\",\n value: record.redirect\n });\n }\n if (route.alias.length) {\n fields.push({\n editable: false,\n key: \"aliases\",\n value: route.alias.map((alias) => alias.record.path)\n });\n }\n if (Object.keys(route.record.meta).length) {\n fields.push({\n editable: false,\n key: \"meta\",\n value: route.record.meta\n });\n }\n fields.push({\n key: \"score\",\n editable: false,\n value: {\n _custom: {\n type: null,\n readOnly: true,\n display: route.score.map((score) => score.join(\", \")).join(\" | \"),\n tooltip: \"Score used to sort routes\",\n value: route.score\n }\n }\n });\n return fields;\n}\nconst PINK_500 = 15485081;\nconst BLUE_600 = 2450411;\nconst LIME_500 = 8702998;\nconst CYAN_400 = 2282478;\nconst ORANGE_400 = 16486972;\nconst DARK = 6710886;\nfunction formatRouteRecordForInspector(route) {\n const tags = [];\n const { record } = route;\n if (record.name != null) {\n tags.push({\n label: String(record.name),\n textColor: 0,\n backgroundColor: CYAN_400\n });\n }\n if (record.aliasOf) {\n tags.push({\n label: \"alias\",\n textColor: 0,\n backgroundColor: ORANGE_400\n });\n }\n if (route.__vd_match) {\n tags.push({\n label: \"matches\",\n textColor: 0,\n backgroundColor: PINK_500\n });\n }\n if (route.__vd_exactActive) {\n tags.push({\n label: \"exact\",\n textColor: 0,\n backgroundColor: LIME_500\n });\n }\n if (route.__vd_active) {\n tags.push({\n label: \"active\",\n textColor: 0,\n backgroundColor: BLUE_600\n });\n }\n if (record.redirect) {\n tags.push({\n label: typeof record.redirect === \"string\" ? `redirect: ${record.redirect}` : \"redirects\",\n textColor: 16777215,\n backgroundColor: DARK\n });\n }\n let id = record.__vd_id;\n if (id == null) {\n id = String(routeRecordId++);\n record.__vd_id = id;\n }\n return {\n id,\n label: record.path,\n tags,\n children: route.children.map(formatRouteRecordForInspector)\n };\n}\nlet routeRecordId = 0;\nconst EXTRACT_REGEXP_RE = /^\\/(.*)\\/([a-z]*)$/;\nfunction markRouteRecordActive(route, currentRoute) {\n const isExactActive = currentRoute.matched.length && isSameRouteRecord(currentRoute.matched[currentRoute.matched.length - 1], route.record);\n route.__vd_exactActive = route.__vd_active = isExactActive;\n if (!isExactActive) {\n route.__vd_active = currentRoute.matched.some((match) => isSameRouteRecord(match, route.record));\n }\n route.children.forEach((childRoute) => markRouteRecordActive(childRoute, currentRoute));\n}\nfunction resetMatchStateOnRouteRecord(route) {\n route.__vd_match = false;\n route.children.forEach(resetMatchStateOnRouteRecord);\n}\nfunction isRouteMatching(route, filter) {\n const found = String(route.re).match(EXTRACT_REGEXP_RE);\n route.__vd_match = false;\n if (!found || found.length < 3) {\n return false;\n }\n const nonEndingRE = new RegExp(found[1].replace(/\\$$/, \"\"), found[2]);\n if (nonEndingRE.test(filter)) {\n route.children.forEach((child) => isRouteMatching(child, filter));\n if (route.record.path !== \"/\" || filter === \"/\") {\n route.__vd_match = route.re.test(filter);\n return true;\n }\n return false;\n }\n const path = route.record.path.toLowerCase();\n const decodedPath = decode(path);\n if (!filter.startsWith(\"/\") && (decodedPath.includes(filter) || path.includes(filter)))\n return true;\n if (decodedPath.startsWith(filter) || path.startsWith(filter))\n return true;\n if (route.record.name && String(route.record.name).includes(filter))\n return true;\n return route.children.some((child) => isRouteMatching(child, filter));\n}\nfunction omit(obj, keys) {\n const ret = {};\n for (const key in obj) {\n if (!keys.includes(key)) {\n ret[key] = obj[key];\n }\n }\n return ret;\n}\nfunction createRouter(options) {\n const matcher = createRouterMatcher(options.routes, options);\n const parseQuery$1 = options.parseQuery || parseQuery;\n const stringifyQuery$1 = options.stringifyQuery || stringifyQuery;\n const routerHistory = options.history;\n if (process.env.NODE_ENV !== \"production\" && !routerHistory)\n throw new Error('Provide the \"history\" option when calling \"createRouter()\": https://next.router.vuejs.org/api/#history.');\n const beforeGuards = useCallbacks();\n const beforeResolveGuards = useCallbacks();\n const afterGuards = useCallbacks();\n const currentRoute = shallowRef(START_LOCATION_NORMALIZED);\n let pendingLocation = START_LOCATION_NORMALIZED;\n if (isBrowser && options.scrollBehavior && \"scrollRestoration\" in history) {\n history.scrollRestoration = \"manual\";\n }\n const normalizeParams = applyToParams.bind(null, (paramValue) => \"\" + paramValue);\n const encodeParams = applyToParams.bind(null, encodeParam);\n const decodeParams = (\n // @ts-expect-error: intentionally avoid the type check\n applyToParams.bind(null, decode)\n );\n function addRoute(parentOrRoute, route) {\n let parent;\n let record;\n if (isRouteName(parentOrRoute)) {\n parent = matcher.getRecordMatcher(parentOrRoute);\n record = route;\n } else {\n record = parentOrRoute;\n }\n return matcher.addRoute(record, parent);\n }\n function removeRoute(name) {\n const recordMatcher = matcher.getRecordMatcher(name);\n if (recordMatcher) {\n matcher.removeRoute(recordMatcher);\n } else if (process.env.NODE_ENV !== \"production\") {\n warn(`Cannot remove non-existent route \"${String(name)}\"`);\n }\n }\n function getRoutes() {\n return matcher.getRoutes().map((routeMatcher) => routeMatcher.record);\n }\n function hasRoute(name) {\n return !!matcher.getRecordMatcher(name);\n }\n function resolve(rawLocation, currentLocation) {\n currentLocation = assign({}, currentLocation || currentRoute.value);\n if (typeof rawLocation === \"string\") {\n const locationNormalized = parseURL(parseQuery$1, rawLocation, currentLocation.path);\n const matchedRoute2 = matcher.resolve({ path: locationNormalized.path }, currentLocation);\n const href2 = routerHistory.createHref(locationNormalized.fullPath);\n if (process.env.NODE_ENV !== \"production\") {\n if (href2.startsWith(\"//\"))\n warn(`Location \"${rawLocation}\" resolved to \"${href2}\". A resolved location cannot start with multiple slashes.`);\n else if (!matchedRoute2.matched.length) {\n warn(`No match found for location with path \"${rawLocation}\"`);\n }\n }\n return assign(locationNormalized, matchedRoute2, {\n params: decodeParams(matchedRoute2.params),\n hash: decode(locationNormalized.hash),\n redirectedFrom: void 0,\n href: href2\n });\n }\n let matcherLocation;\n if (\"path\" in rawLocation) {\n if (process.env.NODE_ENV !== \"production\" && \"params\" in rawLocation && !(\"name\" in rawLocation) && // @ts-expect-error: the type is never\n Object.keys(rawLocation.params).length) {\n warn(`Path \"${// @ts-expect-error: the type is never\n rawLocation.path}\" was passed with params but they will be ignored. Use a named route alongside params instead.`);\n }\n matcherLocation = assign({}, rawLocation, {\n path: parseURL(parseQuery$1, rawLocation.path, currentLocation.path).path\n });\n } else {\n const targetParams = assign({}, rawLocation.params);\n for (const key in targetParams) {\n if (targetParams[key] == null) {\n delete targetParams[key];\n }\n }\n matcherLocation = assign({}, rawLocation, {\n params: encodeParams(rawLocation.params)\n });\n currentLocation.params = encodeParams(currentLocation.params);\n }\n const matchedRoute = matcher.resolve(matcherLocation, currentLocation);\n const hash = rawLocation.hash || \"\";\n if (process.env.NODE_ENV !== \"production\" && hash && !hash.startsWith(\"#\")) {\n warn(`A \\`hash\\` should always start with the character \"#\". Replace \"${hash}\" with \"#${hash}\".`);\n }\n matchedRoute.params = normalizeParams(decodeParams(matchedRoute.params));\n const fullPath = stringifyURL(stringifyQuery$1, assign({}, rawLocation, {\n hash: encodeHash(hash),\n path: matchedRoute.path\n }));\n const href = routerHistory.createHref(fullPath);\n if (process.env.NODE_ENV !== \"production\") {\n if (href.startsWith(\"//\")) {\n warn(`Location \"${rawLocation}\" resolved to \"${href}\". A resolved location cannot start with multiple slashes.`);\n } else if (!matchedRoute.matched.length) {\n warn(`No match found for location with path \"${\"path\" in rawLocation ? rawLocation.path : rawLocation}\"`);\n }\n }\n return assign({\n fullPath,\n // keep the hash encoded so fullPath is effectively path + encodedQuery +\n // hash\n hash,\n query: (\n // if the user is using a custom query lib like qs, we might have\n // nested objects, so we keep the query as is, meaning it can contain\n // numbers at `$route.query`, but at the point, the user will have to\n // use their own type anyway.\n // https://github.com/vuejs/router/issues/328#issuecomment-649481567\n stringifyQuery$1 === stringifyQuery ? normalizeQuery(rawLocation.query) : rawLocation.query || {}\n )\n }, matchedRoute, {\n redirectedFrom: void 0,\n href\n });\n }\n function locationAsObject(to) {\n return typeof to === \"string\" ? parseURL(parseQuery$1, to, currentRoute.value.path) : assign({}, to);\n }\n function checkCanceledNavigation(to, from) {\n if (pendingLocation !== to) {\n return createRouterError(8, {\n from,\n to\n });\n }\n }\n function push(to) {\n return pushWithRedirect(to);\n }\n function replace(to) {\n return push(assign(locationAsObject(to), { replace: true }));\n }\n function handleRedirectRecord(to) {\n const lastMatched = to.matched[to.matched.length - 1];\n if (lastMatched && lastMatched.redirect) {\n const { redirect } = lastMatched;\n let newTargetLocation = typeof redirect === \"function\" ? redirect(to) : redirect;\n if (typeof newTargetLocation === \"string\") {\n newTargetLocation = newTargetLocation.includes(\"?\") || newTargetLocation.includes(\"#\") ? newTargetLocation = locationAsObject(newTargetLocation) : (\n // force empty params\n { path: newTargetLocation }\n );\n newTargetLocation.params = {};\n }\n if (process.env.NODE_ENV !== \"production\" && !(\"path\" in newTargetLocation) && !(\"name\" in newTargetLocation)) {\n warn(`Invalid redirect found:\n${JSON.stringify(newTargetLocation, null, 2)}\n when navigating to \"${to.fullPath}\". A redirect must contain a name or path. This will break in production.`);\n throw new Error(\"Invalid redirect\");\n }\n return assign({\n query: to.query,\n hash: to.hash,\n // avoid transferring params if the redirect has a path\n params: \"path\" in newTargetLocation ? {} : to.params\n }, newTargetLocation);\n }\n }\n function pushWithRedirect(to, redirectedFrom) {\n const targetLocation = pendingLocation = resolve(to);\n const from = currentRoute.value;\n const data = to.state;\n const force = to.force;\n const replace2 = to.replace === true;\n const shouldRedirect = handleRedirectRecord(targetLocation);\n if (shouldRedirect)\n return pushWithRedirect(\n assign(locationAsObject(shouldRedirect), {\n state: typeof shouldRedirect === \"object\" ? assign({}, data, shouldRedirect.state) : data,\n force,\n replace: replace2\n }),\n // keep original redirectedFrom if it exists\n redirectedFrom || targetLocation\n );\n const toLocation = targetLocation;\n toLocation.redirectedFrom = redirectedFrom;\n let failure;\n if (!force && isSameRouteLocation(stringifyQuery$1, from, targetLocation)) {\n failure = createRouterError(16, { to: toLocation, from });\n handleScroll(\n from,\n from,\n // this is a push, the only way for it to be triggered from a\n // history.listen is with a redirect, which makes it become a push\n true,\n // This cannot be the first navigation because the initial location\n // cannot be manually navigated to\n false\n );\n }\n return (failure ? Promise.resolve(failure) : navigate(toLocation, from)).catch((error) => isNavigationFailure(error) ? (\n // navigation redirects still mark the router as ready\n isNavigationFailure(\n error,\n 2\n /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */\n ) ? error : markAsReady(error)\n ) : (\n // reject any unknown error\n triggerError(error, toLocation, from)\n )).then((failure2) => {\n if (failure2) {\n if (isNavigationFailure(\n failure2,\n 2\n /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */\n )) {\n if (process.env.NODE_ENV !== \"production\" && // we are redirecting to the same location we were already at\n isSameRouteLocation(stringifyQuery$1, resolve(failure2.to), toLocation) && // and we have done it a couple of times\n redirectedFrom && // @ts-expect-error: added only in dev\n (redirectedFrom._count = redirectedFrom._count ? (\n // @ts-expect-error\n redirectedFrom._count + 1\n ) : 1) > 10) {\n warn(`Detected an infinite redirection in a navigation guard when going from \"${from.fullPath}\" to \"${toLocation.fullPath}\". Aborting to avoid a Stack Overflow. This will break in production if not fixed.`);\n return Promise.reject(new Error(\"Infinite redirect in navigation guard\"));\n }\n return pushWithRedirect(\n // keep options\n assign({\n // preserve an existing replacement but allow the redirect to override it\n replace: replace2\n }, locationAsObject(failure2.to), {\n state: typeof failure2.to === \"object\" ? assign({}, data, failure2.to.state) : data,\n force\n }),\n // preserve the original redirectedFrom if any\n redirectedFrom || toLocation\n );\n }\n } else {\n failure2 = finalizeNavigation(toLocation, from, true, replace2, data);\n }\n triggerAfterEach(toLocation, from, failure2);\n return failure2;\n });\n }\n function checkCanceledNavigationAndReject(to, from) {\n const error = checkCanceledNavigation(to, from);\n return error ? Promise.reject(error) : Promise.resolve();\n }\n function navigate(to, from) {\n let guards;\n const [leavingRecords, updatingRecords, enteringRecords] = extractChangingRecords(to, from);\n guards = extractComponentsGuards(leavingRecords.reverse(), \"beforeRouteLeave\", to, from);\n for (const record of leavingRecords) {\n record.leaveGuards.forEach((guard) => {\n guards.push(guardToPromiseFn(guard, to, from));\n });\n }\n const canceledNavigationCheck = checkCanceledNavigationAndReject.bind(null, to, from);\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards).then(() => {\n guards = [];\n for (const guard of beforeGuards.list()) {\n guards.push(guardToPromiseFn(guard, to, from));\n }\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards);\n }).then(() => {\n guards = extractComponentsGuards(updatingRecords, \"beforeRouteUpdate\", to, from);\n for (const record of updatingRecords) {\n record.updateGuards.forEach((guard) => {\n guards.push(guardToPromiseFn(guard, to, from));\n });\n }\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards);\n }).then(() => {\n guards = [];\n for (const record of to.matched) {\n if (record.beforeEnter && !from.matched.includes(record)) {\n if (isArray(record.beforeEnter)) {\n for (const beforeEnter of record.beforeEnter)\n guards.push(guardToPromiseFn(beforeEnter, to, from));\n } else {\n guards.push(guardToPromiseFn(record.beforeEnter, to, from));\n }\n }\n }\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards);\n }).then(() => {\n to.matched.forEach((record) => record.enterCallbacks = {});\n guards = extractComponentsGuards(enteringRecords, \"beforeRouteEnter\", to, from);\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards);\n }).then(() => {\n guards = [];\n for (const guard of beforeResolveGuards.list()) {\n guards.push(guardToPromiseFn(guard, to, from));\n }\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards);\n }).catch((err) => isNavigationFailure(\n err,\n 8\n /* ErrorTypes.NAVIGATION_CANCELLED */\n ) ? err : Promise.reject(err));\n }\n function triggerAfterEach(to, from, failure) {\n for (const guard of afterGuards.list())\n guard(to, from, failure);\n }\n function finalizeNavigation(toLocation, from, isPush, replace2, data) {\n const error = checkCanceledNavigation(toLocation, from);\n if (error)\n return error;\n const isFirstNavigation = from === START_LOCATION_NORMALIZED;\n const state = !isBrowser ? {} : history.state;\n if (isPush) {\n if (replace2 || isFirstNavigation)\n routerHistory.replace(toLocation.fullPath, assign({\n scroll: isFirstNavigation && state && state.scroll\n }, data));\n else\n routerHistory.push(toLocation.fullPath, data);\n }\n currentRoute.value = toLocation;\n handleScroll(toLocation, from, isPush, isFirstNavigation);\n markAsReady();\n }\n let removeHistoryListener;\n function setupListeners() {\n if (removeHistoryListener)\n return;\n removeHistoryListener = routerHistory.listen((to, _from, info) => {\n if (!router2.listening)\n return;\n const toLocation = resolve(to);\n const shouldRedirect = handleRedirectRecord(toLocation);\n if (shouldRedirect) {\n pushWithRedirect(assign(shouldRedirect, { replace: true }), toLocation).catch(noop);\n return;\n }\n pendingLocation = toLocation;\n const from = currentRoute.value;\n if (isBrowser) {\n saveScrollPosition(getScrollKey(from.fullPath, info.delta), computeScrollPosition());\n }\n navigate(toLocation, from).catch((error) => {\n if (isNavigationFailure(\n error,\n 4 | 8\n /* ErrorTypes.NAVIGATION_CANCELLED */\n )) {\n return error;\n }\n if (isNavigationFailure(\n error,\n 2\n /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */\n )) {\n pushWithRedirect(\n error.to,\n toLocation\n // avoid an uncaught rejection, let push call triggerError\n ).then((failure) => {\n if (isNavigationFailure(\n failure,\n 4 | 16\n /* ErrorTypes.NAVIGATION_DUPLICATED */\n ) && !info.delta && info.type === NavigationType.pop) {\n routerHistory.go(-1, false);\n }\n }).catch(noop);\n return Promise.reject();\n }\n if (info.delta) {\n routerHistory.go(-info.delta, false);\n }\n return triggerError(error, toLocation, from);\n }).then((failure) => {\n failure = failure || finalizeNavigation(\n // after navigation, all matched components are resolved\n toLocation,\n from,\n false\n );\n if (failure) {\n if (info.delta && // a new navigation has been triggered, so we do not want to revert, that will change the current history\n // entry while a different route is displayed\n !isNavigationFailure(\n failure,\n 8\n /* ErrorTypes.NAVIGATION_CANCELLED */\n )) {\n routerHistory.go(-info.delta, false);\n } else if (info.type === NavigationType.pop && isNavigationFailure(\n failure,\n 4 | 16\n /* ErrorTypes.NAVIGATION_DUPLICATED */\n )) {\n routerHistory.go(-1, false);\n }\n }\n triggerAfterEach(toLocation, from, failure);\n }).catch(noop);\n });\n }\n let readyHandlers = useCallbacks();\n let errorHandlers = useCallbacks();\n let ready;\n function triggerError(error, to, from) {\n markAsReady(error);\n const list = errorHandlers.list();\n if (list.length) {\n list.forEach((handler) => handler(error, to, from));\n } else {\n if (process.env.NODE_ENV !== \"production\") {\n warn(\"uncaught error during route navigation:\");\n }\n console.error(error);\n }\n return Promise.reject(error);\n }\n function isReady() {\n if (ready && currentRoute.value !== START_LOCATION_NORMALIZED)\n return Promise.resolve();\n return new Promise((resolve2, reject) => {\n readyHandlers.add([resolve2, reject]);\n });\n }\n function markAsReady(err) {\n if (!ready) {\n ready = !err;\n setupListeners();\n readyHandlers.list().forEach(([resolve2, reject]) => err ? reject(err) : resolve2());\n readyHandlers.reset();\n }\n return err;\n }\n function handleScroll(to, from, isPush, isFirstNavigation) {\n const { scrollBehavior } = options;\n if (!isBrowser || !scrollBehavior)\n return Promise.resolve();\n const scrollPosition = !isPush && getSavedScrollPosition(getScrollKey(to.fullPath, 0)) || (isFirstNavigation || !isPush) && history.state && history.state.scroll || null;\n return nextTick().then(() => scrollBehavior(to, from, scrollPosition)).then((position) => position && scrollToPosition(position)).catch((err) => triggerError(err, to, from));\n }\n const go = (delta) => routerHistory.go(delta);\n let started;\n const installedApps = /* @__PURE__ */ new Set();\n const router2 = {\n currentRoute,\n listening: true,\n addRoute,\n removeRoute,\n hasRoute,\n getRoutes,\n resolve,\n options,\n push,\n replace,\n go,\n back: () => go(-1),\n forward: () => go(1),\n beforeEach: beforeGuards.add,\n beforeResolve: beforeResolveGuards.add,\n afterEach: afterGuards.add,\n onError: errorHandlers.add,\n isReady,\n install(app) {\n const router3 = this;\n app.component(\"RouterLink\", RouterLink);\n app.component(\"RouterView\", RouterView);\n app.config.globalProperties.$router = router3;\n Object.defineProperty(app.config.globalProperties, \"$route\", {\n enumerable: true,\n get: () => unref(currentRoute)\n });\n if (isBrowser && // used for the initial navigation client side to avoid pushing\n // multiple times when the router is used in multiple apps\n !started && currentRoute.value === START_LOCATION_NORMALIZED) {\n started = true;\n push(routerHistory.location).catch((err) => {\n if (process.env.NODE_ENV !== \"production\")\n warn(\"Unexpected error when starting the router:\", err);\n });\n }\n const reactiveRoute = {};\n for (const key in START_LOCATION_NORMALIZED) {\n reactiveRoute[key] = computed(() => currentRoute.value[key]);\n }\n app.provide(routerKey, router3);\n app.provide(routeLocationKey, reactive(reactiveRoute));\n app.provide(routerViewLocationKey, currentRoute);\n const unmountApp = app.unmount;\n installedApps.add(app);\n app.unmount = function() {\n installedApps.delete(app);\n if (installedApps.size < 1) {\n pendingLocation = START_LOCATION_NORMALIZED;\n removeHistoryListener && removeHistoryListener();\n removeHistoryListener = null;\n currentRoute.value = START_LOCATION_NORMALIZED;\n started = false;\n ready = false;\n }\n unmountApp();\n };\n if ((process.env.NODE_ENV !== \"production\" || false) && isBrowser) {\n addDevtools(app, router3, matcher);\n }\n }\n };\n return router2;\n}\nfunction runGuardQueue(guards) {\n return guards.reduce((promise, guard) => promise.then(() => guard()), Promise.resolve());\n}\nfunction extractChangingRecords(to, from) {\n const leavingRecords = [];\n const updatingRecords = [];\n const enteringRecords = [];\n const len = Math.max(from.matched.length, to.matched.length);\n for (let i = 0; i < len; i++) {\n const recordFrom = from.matched[i];\n if (recordFrom) {\n if (to.matched.find((record) => isSameRouteRecord(record, recordFrom)))\n updatingRecords.push(recordFrom);\n else\n leavingRecords.push(recordFrom);\n }\n const recordTo = to.matched[i];\n if (recordTo) {\n if (!from.matched.find((record) => isSameRouteRecord(record, recordTo))) {\n enteringRecords.push(recordTo);\n }\n }\n }\n return [leavingRecords, updatingRecords, enteringRecords];\n}\nconst router = createRouter({\n history: createWebHistory(),\n routes: []\n});\nfunction isPromise(obj) {\n return obj && typeof obj.then === \"function\";\n}\nPromise.resolve(false);\nPromise.resolve(true);\nvar PROMISE_RESOLVED_VOID = Promise.resolve();\nfunction sleep(time, resolveWith) {\n if (!time)\n time = 0;\n return new Promise(function(res) {\n return setTimeout(function() {\n return res(resolveWith);\n }, time);\n });\n}\nfunction randomInt(min, max) {\n return Math.floor(Math.random() * (max - min + 1) + min);\n}\nfunction randomToken() {\n return Math.random().toString(36).substring(2);\n}\nvar lastMs = 0;\nvar additional = 0;\nfunction microSeconds$4() {\n var ms = (/* @__PURE__ */ new Date()).getTime();\n if (ms === lastMs) {\n additional++;\n return ms * 1e3 + additional;\n } else {\n lastMs = ms;\n additional = 0;\n return ms * 1e3;\n }\n}\nvar microSeconds$3 = microSeconds$4;\nvar type$3 = \"native\";\nfunction create$3(channelName) {\n var state = {\n messagesCallback: null,\n bc: new BroadcastChannel(channelName),\n subFns: []\n // subscriberFunctions\n };\n state.bc.onmessage = function(msg) {\n if (state.messagesCallback) {\n state.messagesCallback(msg.data);\n }\n };\n return state;\n}\nfunction close$3(channelState) {\n channelState.bc.close();\n channelState.subFns = [];\n}\nfunction postMessage$3(channelState, messageJson) {\n try {\n channelState.bc.postMessage(messageJson, false);\n return PROMISE_RESOLVED_VOID;\n } catch (err) {\n return Promise.reject(err);\n }\n}\nfunction onMessage$3(channelState, fn) {\n channelState.messagesCallback = fn;\n}\nfunction canBeUsed$3() {\n if (typeof window === \"undefined\") {\n return false;\n }\n if (typeof BroadcastChannel === \"function\") {\n if (BroadcastChannel._pubkey) {\n throw new Error(\"BroadcastChannel: Do not overwrite window.BroadcastChannel with this module, this is not a polyfill\");\n }\n return true;\n } else {\n return false;\n }\n}\nfunction averageResponseTime$3() {\n return 150;\n}\nvar NativeMethod = {\n create: create$3,\n close: close$3,\n onMessage: onMessage$3,\n postMessage: postMessage$3,\n canBeUsed: canBeUsed$3,\n type: type$3,\n averageResponseTime: averageResponseTime$3,\n microSeconds: microSeconds$3\n};\nvar ObliviousSet = (\n /** @class */\n function() {\n function ObliviousSet2(ttl) {\n this.ttl = ttl;\n this.map = /* @__PURE__ */ new Map();\n this._to = false;\n }\n ObliviousSet2.prototype.has = function(value) {\n return this.map.has(value);\n };\n ObliviousSet2.prototype.add = function(value) {\n var _this = this;\n this.map.set(value, now());\n if (!this._to) {\n this._to = true;\n setTimeout(function() {\n _this._to = false;\n removeTooOldValues(_this);\n }, 0);\n }\n };\n ObliviousSet2.prototype.clear = function() {\n this.map.clear();\n };\n return ObliviousSet2;\n }()\n);\nfunction removeTooOldValues(obliviousSet) {\n var olderThen = now() - obliviousSet.ttl;\n var iterator = obliviousSet.map[Symbol.iterator]();\n while (true) {\n var next = iterator.next().value;\n if (!next) {\n return;\n }\n var value = next[0];\n var time = next[1];\n if (time < olderThen) {\n obliviousSet.map.delete(value);\n } else {\n return;\n }\n }\n}\nfunction now() {\n return (/* @__PURE__ */ new Date()).getTime();\n}\nfunction fillOptionsWithDefaults() {\n var originalOptions = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};\n var options = JSON.parse(JSON.stringify(originalOptions));\n if (typeof options.webWorkerSupport === \"undefined\")\n options.webWorkerSupport = true;\n if (!options.idb)\n options.idb = {};\n if (!options.idb.ttl)\n options.idb.ttl = 1e3 * 45;\n if (!options.idb.fallbackInterval)\n options.idb.fallbackInterval = 150;\n if (originalOptions.idb && typeof originalOptions.idb.onclose === \"function\")\n options.idb.onclose = originalOptions.idb.onclose;\n if (!options.localstorage)\n options.localstorage = {};\n if (!options.localstorage.removeTimeout)\n options.localstorage.removeTimeout = 1e3 * 60;\n if (originalOptions.methods)\n options.methods = originalOptions.methods;\n if (!options.node)\n options.node = {};\n if (!options.node.ttl)\n options.node.ttl = 1e3 * 60 * 2;\n if (!options.node.maxParallelWrites)\n options.node.maxParallelWrites = 2048;\n if (typeof options.node.useFastPath === \"undefined\")\n options.node.useFastPath = true;\n return options;\n}\nvar microSeconds$2 = microSeconds$4;\nvar DB_PREFIX = \"pubkey.broadcast-channel-0-\";\nvar OBJECT_STORE_ID = \"messages\";\nvar TRANSACTION_SETTINGS = {\n durability: \"relaxed\"\n};\nvar type$2 = \"idb\";\nfunction getIdb() {\n if (typeof indexedDB !== \"undefined\")\n return indexedDB;\n if (typeof window !== \"undefined\") {\n if (typeof window.mozIndexedDB !== \"undefined\")\n return window.mozIndexedDB;\n if (typeof window.webkitIndexedDB !== \"undefined\")\n return window.webkitIndexedDB;\n if (typeof window.msIndexedDB !== \"undefined\")\n return window.msIndexedDB;\n }\n return false;\n}\nfunction commitIndexedDBTransaction(tx) {\n if (tx.commit) {\n tx.commit();\n }\n}\nfunction createDatabase(channelName) {\n var IndexedDB = getIdb();\n var dbName = DB_PREFIX + channelName;\n var openRequest = IndexedDB.open(dbName);\n openRequest.onupgradeneeded = function(ev) {\n var db = ev.target.result;\n db.createObjectStore(OBJECT_STORE_ID, {\n keyPath: \"id\",\n autoIncrement: true\n });\n };\n return new Promise(function(res, rej) {\n openRequest.onerror = function(ev) {\n return rej(ev);\n };\n openRequest.onsuccess = function() {\n res(openRequest.result);\n };\n });\n}\nfunction writeMessage(db, readerUuid, messageJson) {\n var time = (/* @__PURE__ */ new Date()).getTime();\n var writeObject = {\n uuid: readerUuid,\n time,\n data: messageJson\n };\n var tx = db.transaction([OBJECT_STORE_ID], \"readwrite\", TRANSACTION_SETTINGS);\n return new Promise(function(res, rej) {\n tx.oncomplete = function() {\n return res();\n };\n tx.onerror = function(ev) {\n return rej(ev);\n };\n var objectStore = tx.objectStore(OBJECT_STORE_ID);\n objectStore.add(writeObject);\n commitIndexedDBTransaction(tx);\n });\n}\nfunction getMessagesHigherThan(db, lastCursorId) {\n var tx = db.transaction(OBJECT_STORE_ID, \"readonly\", TRANSACTION_SETTINGS);\n var objectStore = tx.objectStore(OBJECT_STORE_ID);\n var ret = [];\n var keyRangeValue = IDBKeyRange.bound(lastCursorId + 1, Infinity);\n if (objectStore.getAll) {\n var getAllRequest = objectStore.getAll(keyRangeValue);\n return new Promise(function(res, rej) {\n getAllRequest.onerror = function(err) {\n return rej(err);\n };\n getAllRequest.onsuccess = function(e) {\n res(e.target.result);\n };\n });\n }\n function openCursor() {\n try {\n keyRangeValue = IDBKeyRange.bound(lastCursorId + 1, Infinity);\n return objectStore.openCursor(keyRangeValue);\n } catch (e) {\n return objectStore.openCursor();\n }\n }\n return new Promise(function(res, rej) {\n var openCursorRequest = openCursor();\n openCursorRequest.onerror = function(err) {\n return rej(err);\n };\n openCursorRequest.onsuccess = function(ev) {\n var cursor = ev.target.result;\n if (cursor) {\n if (cursor.value.id < lastCursorId + 1) {\n cursor[\"continue\"](lastCursorId + 1);\n } else {\n ret.push(cursor.value);\n cursor[\"continue\"]();\n }\n } else {\n commitIndexedDBTransaction(tx);\n res(ret);\n }\n };\n });\n}\nfunction removeMessagesById(channelState, ids) {\n if (channelState.closed) {\n return Promise.resolve([]);\n }\n var tx = channelState.db.transaction(OBJECT_STORE_ID, \"readwrite\", TRANSACTION_SETTINGS);\n var objectStore = tx.objectStore(OBJECT_STORE_ID);\n return Promise.all(ids.map(function(id) {\n var deleteRequest = objectStore[\"delete\"](id);\n return new Promise(function(res) {\n deleteRequest.onsuccess = function() {\n return res();\n };\n });\n }));\n}\nfunction getOldMessages(db, ttl) {\n var olderThen = (/* @__PURE__ */ new Date()).getTime() - ttl;\n var tx = db.transaction(OBJECT_STORE_ID, \"readonly\", TRANSACTION_SETTINGS);\n var objectStore = tx.objectStore(OBJECT_STORE_ID);\n var ret = [];\n return new Promise(function(res) {\n objectStore.openCursor().onsuccess = function(ev) {\n var cursor = ev.target.result;\n if (cursor) {\n var msgObk = cursor.value;\n if (msgObk.time < olderThen) {\n ret.push(msgObk);\n cursor[\"continue\"]();\n } else {\n commitIndexedDBTransaction(tx);\n res(ret);\n }\n } else {\n res(ret);\n }\n };\n });\n}\nfunction cleanOldMessages(channelState) {\n return getOldMessages(channelState.db, channelState.options.idb.ttl).then(function(tooOld) {\n return removeMessagesById(channelState, tooOld.map(function(msg) {\n return msg.id;\n }));\n });\n}\nfunction create$2(channelName, options) {\n options = fillOptionsWithDefaults(options);\n return createDatabase(channelName).then(function(db) {\n var state = {\n closed: false,\n lastCursorId: 0,\n channelName,\n options,\n uuid: randomToken(),\n /**\n * emittedMessagesIds\n * contains all messages that have been emitted before\n * @type {ObliviousSet}\n */\n eMIs: new ObliviousSet(options.idb.ttl * 2),\n // ensures we do not read messages in parallel\n writeBlockPromise: PROMISE_RESOLVED_VOID,\n messagesCallback: null,\n readQueuePromises: [],\n db\n };\n db.onclose = function() {\n state.closed = true;\n if (options.idb.onclose)\n options.idb.onclose();\n };\n _readLoop(state);\n return state;\n });\n}\nfunction _readLoop(state) {\n if (state.closed)\n return;\n readNewMessages(state).then(function() {\n return sleep(state.options.idb.fallbackInterval);\n }).then(function() {\n return _readLoop(state);\n });\n}\nfunction _filterMessage(msgObj, state) {\n if (msgObj.uuid === state.uuid)\n return false;\n if (state.eMIs.has(msgObj.id))\n return false;\n if (msgObj.data.time < state.messagesCallbackTime)\n return false;\n return true;\n}\nfunction readNewMessages(state) {\n if (state.closed)\n return PROMISE_RESOLVED_VOID;\n if (!state.messagesCallback)\n return PROMISE_RESOLVED_VOID;\n return getMessagesHigherThan(state.db, state.lastCursorId).then(function(newerMessages) {\n var useMessages = newerMessages.filter(function(msgObj) {\n return !!msgObj;\n }).map(function(msgObj) {\n if (msgObj.id > state.lastCursorId) {\n state.lastCursorId = msgObj.id;\n }\n return msgObj;\n }).filter(function(msgObj) {\n return _filterMessage(msgObj, state);\n }).sort(function(msgObjA, msgObjB) {\n return msgObjA.time - msgObjB.time;\n });\n useMessages.forEach(function(msgObj) {\n if (state.messagesCallback) {\n state.eMIs.add(msgObj.id);\n state.messagesCallback(msgObj.data);\n }\n });\n return PROMISE_RESOLVED_VOID;\n });\n}\nfunction close$2(channelState) {\n channelState.closed = true;\n channelState.db.close();\n}\nfunction postMessage$2(channelState, messageJson) {\n channelState.writeBlockPromise = channelState.writeBlockPromise.then(function() {\n return writeMessage(channelState.db, channelState.uuid, messageJson);\n }).then(function() {\n if (randomInt(0, 10) === 0) {\n cleanOldMessages(channelState);\n }\n });\n return channelState.writeBlockPromise;\n}\nfunction onMessage$2(channelState, fn, time) {\n channelState.messagesCallbackTime = time;\n channelState.messagesCallback = fn;\n readNewMessages(channelState);\n}\nfunction canBeUsed$2() {\n return !!getIdb();\n}\nfunction averageResponseTime$2(options) {\n return options.idb.fallbackInterval * 2;\n}\nvar IndexedDBMethod = {\n create: create$2,\n close: close$2,\n onMessage: onMessage$2,\n postMessage: postMessage$2,\n canBeUsed: canBeUsed$2,\n type: type$2,\n averageResponseTime: averageResponseTime$2,\n microSeconds: microSeconds$2\n};\nvar microSeconds$1 = microSeconds$4;\nvar KEY_PREFIX = \"pubkey.broadcastChannel-\";\nvar type$1 = \"localstorage\";\nfunction getLocalStorage() {\n var localStorage2;\n if (typeof window === \"undefined\")\n return null;\n try {\n localStorage2 = window.localStorage;\n localStorage2 = window[\"ie8-eventlistener/storage\"] || window.localStorage;\n } catch (e) {\n }\n return localStorage2;\n}\nfunction storageKey(channelName) {\n return KEY_PREFIX + channelName;\n}\nfunction postMessage$1(channelState, messageJson) {\n return new Promise(function(res) {\n sleep().then(function() {\n var key = storageKey(channelState.channelName);\n var writeObj = {\n token: randomToken(),\n time: (/* @__PURE__ */ new Date()).getTime(),\n data: messageJson,\n uuid: channelState.uuid\n };\n var value = JSON.stringify(writeObj);\n getLocalStorage().setItem(key, value);\n var ev = document.createEvent(\"Event\");\n ev.initEvent(\"storage\", true, true);\n ev.key = key;\n ev.newValue = value;\n window.dispatchEvent(ev);\n res();\n });\n });\n}\nfunction addStorageEventListener(channelName, fn) {\n var key = storageKey(channelName);\n var listener = function listener2(ev) {\n if (ev.key === key) {\n fn(JSON.parse(ev.newValue));\n }\n };\n window.addEventListener(\"storage\", listener);\n return listener;\n}\nfunction removeStorageEventListener(listener) {\n window.removeEventListener(\"storage\", listener);\n}\nfunction create$1(channelName, options) {\n options = fillOptionsWithDefaults(options);\n if (!canBeUsed$1()) {\n throw new Error(\"BroadcastChannel: localstorage cannot be used\");\n }\n var uuid = randomToken();\n var eMIs = new ObliviousSet(options.localstorage.removeTimeout);\n var state = {\n channelName,\n uuid,\n eMIs\n // emittedMessagesIds\n };\n state.listener = addStorageEventListener(channelName, function(msgObj) {\n if (!state.messagesCallback)\n return;\n if (msgObj.uuid === uuid)\n return;\n if (!msgObj.token || eMIs.has(msgObj.token))\n return;\n if (msgObj.data.time && msgObj.data.time < state.messagesCallbackTime)\n return;\n eMIs.add(msgObj.token);\n state.messagesCallback(msgObj.data);\n });\n return state;\n}\nfunction close$1(channelState) {\n removeStorageEventListener(channelState.listener);\n}\nfunction onMessage$1(channelState, fn, time) {\n channelState.messagesCallbackTime = time;\n channelState.messagesCallback = fn;\n}\nfunction canBeUsed$1() {\n var ls = getLocalStorage();\n if (!ls)\n return false;\n try {\n var key = \"__broadcastchannel_check\";\n ls.setItem(key, \"works\");\n ls.removeItem(key);\n } catch (e) {\n return false;\n }\n return true;\n}\nfunction averageResponseTime$1() {\n var defaultTime = 120;\n var userAgent = navigator.userAgent.toLowerCase();\n if (userAgent.includes(\"safari\") && !userAgent.includes(\"chrome\")) {\n return defaultTime * 2;\n }\n return defaultTime;\n}\nvar LocalstorageMethod = {\n create: create$1,\n close: close$1,\n onMessage: onMessage$1,\n postMessage: postMessage$1,\n canBeUsed: canBeUsed$1,\n type: type$1,\n averageResponseTime: averageResponseTime$1,\n microSeconds: microSeconds$1\n};\nvar microSeconds = microSeconds$4;\nvar type = \"simulate\";\nvar SIMULATE_CHANNELS = /* @__PURE__ */ new Set();\nfunction create(channelName) {\n var state = {\n name: channelName,\n messagesCallback: null\n };\n SIMULATE_CHANNELS.add(state);\n return state;\n}\nfunction close(channelState) {\n SIMULATE_CHANNELS[\"delete\"](channelState);\n}\nfunction postMessage(channelState, messageJson) {\n return new Promise(function(res) {\n return setTimeout(function() {\n var channelArray = Array.from(SIMULATE_CHANNELS);\n channelArray.filter(function(channel) {\n return channel.name === channelState.name;\n }).filter(function(channel) {\n return channel !== channelState;\n }).filter(function(channel) {\n return !!channel.messagesCallback;\n }).forEach(function(channel) {\n return channel.messagesCallback(messageJson);\n });\n res();\n }, 5);\n });\n}\nfunction onMessage(channelState, fn) {\n channelState.messagesCallback = fn;\n}\nfunction canBeUsed() {\n return true;\n}\nfunction averageResponseTime() {\n return 5;\n}\nvar SimulateMethod = {\n create,\n close,\n onMessage,\n postMessage,\n canBeUsed,\n type,\n averageResponseTime,\n microSeconds\n};\nvar METHODS = [\n NativeMethod,\n // fastest\n IndexedDBMethod,\n LocalstorageMethod\n];\nfunction chooseMethod(options) {\n var chooseMethods = [].concat(options.methods, METHODS).filter(Boolean);\n if (options.type) {\n if (options.type === \"simulate\") {\n return SimulateMethod;\n }\n var ret = chooseMethods.find(function(m2) {\n return m2.type === options.type;\n });\n if (!ret)\n throw new Error(\"method-type \" + options.type + \" not found\");\n else\n return ret;\n }\n if (!options.webWorkerSupport) {\n chooseMethods = chooseMethods.filter(function(m2) {\n return m2.type !== \"idb\";\n });\n }\n var useMethod = chooseMethods.find(function(method) {\n return method.canBeUsed();\n });\n if (!useMethod)\n throw new Error(\"No usable method found in \" + JSON.stringify(METHODS.map(function(m2) {\n return m2.type;\n })));\n else\n return useMethod;\n}\nvar OPEN_BROADCAST_CHANNELS = /* @__PURE__ */ new Set();\nvar lastId = 0;\nvar BroadcastChannel$1 = function BroadcastChannel2(name, options) {\n this.id = lastId++;\n OPEN_BROADCAST_CHANNELS.add(this);\n this.name = name;\n if (ENFORCED_OPTIONS) {\n options = ENFORCED_OPTIONS;\n }\n this.options = fillOptionsWithDefaults(options);\n this.method = chooseMethod(this.options);\n this._iL = false;\n this._onML = null;\n this._addEL = {\n message: [],\n internal: []\n };\n this._uMP = /* @__PURE__ */ new Set();\n this._befC = [];\n this._prepP = null;\n _prepareChannel(this);\n};\nBroadcastChannel$1._pubkey = true;\nvar ENFORCED_OPTIONS;\nBroadcastChannel$1.prototype = {\n postMessage: function postMessage2(msg) {\n if (this.closed) {\n throw new Error(\"BroadcastChannel.postMessage(): Cannot post message after channel has closed \" + /**\n * In the past when this error appeared, it was really hard to debug.\n * So now we log the msg together with the error so it at least\n * gives some clue about where in your application this happens.\n */\n JSON.stringify(msg));\n }\n return _post(this, \"message\", msg);\n },\n postInternal: function postInternal(msg) {\n return _post(this, \"internal\", msg);\n },\n set onmessage(fn) {\n var time = this.method.microSeconds();\n var listenObj = {\n time,\n fn\n };\n _removeListenerObject(this, \"message\", this._onML);\n if (fn && typeof fn === \"function\") {\n this._onML = listenObj;\n _addListenerObject(this, \"message\", listenObj);\n } else {\n this._onML = null;\n }\n },\n addEventListener: function addEventListener(type2, fn) {\n var time = this.method.microSeconds();\n var listenObj = {\n time,\n fn\n };\n _addListenerObject(this, type2, listenObj);\n },\n removeEventListener: function removeEventListener(type2, fn) {\n var obj = this._addEL[type2].find(function(obj2) {\n return obj2.fn === fn;\n });\n _removeListenerObject(this, type2, obj);\n },\n close: function close2() {\n var _this = this;\n if (this.closed) {\n return;\n }\n OPEN_BROADCAST_CHANNELS[\"delete\"](this);\n this.closed = true;\n var awaitPrepare = this._prepP ? this._prepP : PROMISE_RESOLVED_VOID;\n this._onML = null;\n this._addEL.message = [];\n return awaitPrepare.then(function() {\n return Promise.all(Array.from(_this._uMP));\n }).then(function() {\n return Promise.all(_this._befC.map(function(fn) {\n return fn();\n }));\n }).then(function() {\n return _this.method.close(_this._state);\n });\n },\n get type() {\n return this.method.type;\n },\n get isClosed() {\n return this.closed;\n }\n};\nfunction _post(broadcastChannel, type2, msg) {\n var time = broadcastChannel.method.microSeconds();\n var msgObj = {\n time,\n type: type2,\n data: msg\n };\n var awaitPrepare = broadcastChannel._prepP ? broadcastChannel._prepP : PROMISE_RESOLVED_VOID;\n return awaitPrepare.then(function() {\n var sendPromise = broadcastChannel.method.postMessage(broadcastChannel._state, msgObj);\n broadcastChannel._uMP.add(sendPromise);\n sendPromise[\"catch\"]().then(function() {\n return broadcastChannel._uMP[\"delete\"](sendPromise);\n });\n return sendPromise;\n });\n}\nfunction _prepareChannel(channel) {\n var maybePromise = channel.method.create(channel.name, channel.options);\n if (isPromise(maybePromise)) {\n channel._prepP = maybePromise;\n maybePromise.then(function(s) {\n channel._state = s;\n });\n } else {\n channel._state = maybePromise;\n }\n}\nfunction _hasMessageListeners(channel) {\n if (channel._addEL.message.length > 0)\n return true;\n if (channel._addEL.internal.length > 0)\n return true;\n return false;\n}\nfunction _addListenerObject(channel, type2, obj) {\n channel._addEL[type2].push(obj);\n _startListening(channel);\n}\nfunction _removeListenerObject(channel, type2, obj) {\n channel._addEL[type2] = channel._addEL[type2].filter(function(o) {\n return o !== obj;\n });\n _stopListening(channel);\n}\nfunction _startListening(channel) {\n if (!channel._iL && _hasMessageListeners(channel)) {\n var listenerFn = function listenerFn2(msgObj) {\n channel._addEL[msgObj.type].forEach(function(listenerObject) {\n var hundredMsInMicro = 100 * 1e3;\n var minMessageTime = listenerObject.time - hundredMsInMicro;\n if (msgObj.time >= minMessageTime) {\n listenerObject.fn(msgObj.data);\n }\n });\n };\n var time = channel.method.microSeconds();\n if (channel._prepP) {\n channel._prepP.then(function() {\n channel._iL = true;\n channel.method.onMessage(channel._state, listenerFn, time);\n });\n } else {\n channel._iL = true;\n channel.method.onMessage(channel._state, listenerFn, time);\n }\n }\n}\nfunction _stopListening(channel) {\n if (channel._iL && !_hasMessageListeners(channel)) {\n channel._iL = false;\n var time = channel.method.microSeconds();\n channel.method.onMessage(channel._state, null, time);\n }\n}\nconst escaped = {\n \"<\": \"\\\\u003C\",\n \">\": \"\\\\u003E\",\n \"/\": \"\\\\u002F\",\n \"\\\\\": \"\\\\\\\\\",\n \"\\b\": \"\\\\b\",\n \"\\f\": \"\\\\f\",\n \"\\n\": \"\\\\n\",\n \"\\r\": \"\\\\r\",\n \"\t\": \"\\\\t\",\n \"\\0\": \"\\\\u0000\",\n \"\\u2028\": \"\\\\u2028\",\n \"\\u2029\": \"\\\\u2029\"\n};\nclass DevalueError extends Error {\n /**\n * @param {string} message\n * @param {string[]} keys\n */\n constructor(message, keys) {\n super(message);\n this.name = \"DevalueError\";\n this.path = keys.join(\"\");\n }\n}\nfunction is_primitive(thing) {\n return Object(thing) !== thing;\n}\nconst object_proto_names = Object.getOwnPropertyNames(Object.prototype).sort().join(\"\\0\");\nfunction is_plain_object(thing) {\n const proto = Object.getPrototypeOf(thing);\n return proto === Object.prototype || proto === null || Object.getOwnPropertyNames(proto).sort().join(\"\\0\") === object_proto_names;\n}\nfunction get_type(thing) {\n return Object.prototype.toString.call(thing).slice(8, -1);\n}\nfunction stringify_string(str) {\n let result = '\"';\n for (let i = 0; i < str.length; i += 1) {\n const char = str.charAt(i);\n const code = char.charCodeAt(0);\n if (char === '\"') {\n result += '\\\\\"';\n } else if (char in escaped) {\n result += escaped[char];\n } else if (code <= 31) {\n result += `\\\\u${code.toString(16).toUpperCase().padStart(4, \"0\")}`;\n } else if (code >= 55296 && code <= 57343) {\n const next = str.charCodeAt(i + 1);\n if (code <= 56319 && next >= 56320 && next <= 57343) {\n result += char + str[++i];\n } else {\n result += `\\\\u${code.toString(16).toUpperCase()}`;\n }\n } else {\n result += char;\n }\n }\n result += '\"';\n return result;\n}\nconst UNDEFINED = -1;\nconst HOLE = -2;\nconst NAN = -3;\nconst POSITIVE_INFINITY = -4;\nconst NEGATIVE_INFINITY = -5;\nconst NEGATIVE_ZERO = -6;\nfunction parse(serialized, revivers) {\n return unflatten(JSON.parse(serialized), revivers);\n}\nfunction unflatten(parsed, revivers) {\n if (typeof parsed === \"number\")\n return hydrate(parsed, true);\n if (!Array.isArray(parsed) || parsed.length === 0) {\n throw new Error(\"Invalid input\");\n }\n const values = (\n /** @type {any[]} */\n parsed\n );\n const hydrated = Array(values.length);\n function hydrate(index2, standalone = false) {\n if (index2 === UNDEFINED)\n return void 0;\n if (index2 === NAN)\n return NaN;\n if (index2 === POSITIVE_INFINITY)\n return Infinity;\n if (index2 === NEGATIVE_INFINITY)\n return -Infinity;\n if (index2 === NEGATIVE_ZERO)\n return -0;\n if (standalone)\n throw new Error(`Invalid input`);\n if (index2 in hydrated)\n return hydrated[index2];\n const value = values[index2];\n if (!value || typeof value !== \"object\") {\n hydrated[index2] = value;\n } else if (Array.isArray(value)) {\n if (typeof value[0] === \"string\") {\n const type2 = value[0];\n const reviver = revivers == null ? void 0 : revivers[type2];\n if (reviver) {\n return hydrated[index2] = reviver(hydrate(value[1]));\n }\n switch (type2) {\n case \"Date\":\n hydrated[index2] = new Date(value[1]);\n break;\n case \"Set\":\n const set2 = /* @__PURE__ */ new Set();\n hydrated[index2] = set2;\n for (let i = 1; i < value.length; i += 1) {\n set2.add(hydrate(value[i]));\n }\n break;\n case \"Map\":\n const map = /* @__PURE__ */ new Map();\n hydrated[index2] = map;\n for (let i = 1; i < value.length; i += 2) {\n map.set(hydrate(value[i]), hydrate(value[i + 1]));\n }\n break;\n case \"RegExp\":\n hydrated[index2] = new RegExp(value[1], value[2]);\n break;\n case \"Object\":\n hydrated[index2] = Object(value[1]);\n break;\n case \"BigInt\":\n hydrated[index2] = BigInt(value[1]);\n break;\n case \"null\":\n const obj = /* @__PURE__ */ Object.create(null);\n hydrated[index2] = obj;\n for (let i = 1; i < value.length; i += 2) {\n obj[value[i]] = hydrate(value[i + 1]);\n }\n break;\n default:\n throw new Error(`Unknown type ${type2}`);\n }\n } else {\n const array = new Array(value.length);\n hydrated[index2] = array;\n for (let i = 0; i < value.length; i += 1) {\n const n = value[i];\n if (n === HOLE)\n continue;\n array[i] = hydrate(n);\n }\n }\n } else {\n const object = {};\n hydrated[index2] = object;\n for (const key in value) {\n const n = value[key];\n object[key] = hydrate(n);\n }\n }\n return hydrated[index2];\n }\n return hydrate(0);\n}\nfunction stringify(value, reducers) {\n const stringified = [];\n const indexes = /* @__PURE__ */ new Map();\n const custom = [];\n for (const key in reducers) {\n custom.push({ key, fn: reducers[key] });\n }\n const keys = [];\n let p = 0;\n function flatten(thing) {\n if (typeof thing === \"function\") {\n throw new DevalueError(`Cannot stringify a function`, keys);\n }\n if (indexes.has(thing))\n return indexes.get(thing);\n if (thing === void 0)\n return UNDEFINED;\n if (Number.isNaN(thing))\n return NAN;\n if (thing === Infinity)\n return POSITIVE_INFINITY;\n if (thing === -Infinity)\n return NEGATIVE_INFINITY;\n if (thing === 0 && 1 / thing < 0)\n return NEGATIVE_ZERO;\n const index3 = p++;\n indexes.set(thing, index3);\n for (const { key, fn } of custom) {\n const value2 = fn(thing);\n if (value2) {\n stringified[index3] = `[\"${key}\",${flatten(value2)}]`;\n return index3;\n }\n }\n let str = \"\";\n if (is_primitive(thing)) {\n str = stringify_primitive(thing);\n } else {\n const type2 = get_type(thing);\n switch (type2) {\n case \"Number\":\n case \"String\":\n case \"Boolean\":\n str = `[\"Object\",${stringify_primitive(thing)}]`;\n break;\n case \"BigInt\":\n str = `[\"BigInt\",${thing}]`;\n break;\n case \"Date\":\n str = `[\"Date\",\"${thing.toISOString()}\"]`;\n break;\n case \"RegExp\":\n const { source, flags } = thing;\n str = flags ? `[\"RegExp\",${stringify_string(source)},\"${flags}\"]` : `[\"RegExp\",${stringify_string(source)}]`;\n break;\n case \"Array\":\n str = \"[\";\n for (let i = 0; i < thing.length; i += 1) {\n if (i > 0)\n str += \",\";\n if (i in thing) {\n keys.push(`[${i}]`);\n str += flatten(thing[i]);\n keys.pop();\n } else {\n str += HOLE;\n }\n }\n str += \"]\";\n break;\n case \"Set\":\n str = '[\"Set\"';\n for (const value2 of thing) {\n str += `,${flatten(value2)}`;\n }\n str += \"]\";\n break;\n case \"Map\":\n str = '[\"Map\"';\n for (const [key, value2] of thing) {\n keys.push(\n `.get(${is_primitive(key) ? stringify_primitive(key) : \"...\"})`\n );\n str += `,${flatten(key)},${flatten(value2)}`;\n }\n str += \"]\";\n break;\n default:\n if (!is_plain_object(thing)) {\n throw new DevalueError(\n `Cannot stringify arbitrary non-POJOs`,\n keys\n );\n }\n if (Object.getOwnPropertySymbols(thing).length > 0) {\n throw new DevalueError(\n `Cannot stringify POJOs with symbolic keys`,\n keys\n );\n }\n if (Object.getPrototypeOf(thing) === null) {\n str = '[\"null\"';\n for (const key in thing) {\n keys.push(`.${key}`);\n str += `,${stringify_string(key)},${flatten(thing[key])}`;\n keys.pop();\n }\n str += \"]\";\n } else {\n str = \"{\";\n let started = false;\n for (const key in thing) {\n if (started)\n str += \",\";\n started = true;\n keys.push(`.${key}`);\n str += `${stringify_string(key)}:${flatten(thing[key])}`;\n keys.pop();\n }\n str += \"}\";\n }\n }\n }\n stringified[index3] = str;\n return index3;\n }\n const index2 = flatten(value);\n if (index2 < 0)\n return `${index2}`;\n return `[${stringified.join(\",\")}]`;\n}\nfunction stringify_primitive(thing) {\n const type2 = typeof thing;\n if (type2 === \"string\")\n return stringify_string(thing);\n if (thing instanceof String)\n return stringify_string(thing.toString());\n if (thing === void 0)\n return UNDEFINED.toString();\n if (thing === 0 && 1 / thing < 0)\n return NEGATIVE_ZERO.toString();\n if (type2 === \"bigint\")\n return `[\"BigInt\",\"${thing}\"]`;\n return String(thing);\n}\nfunction m(t, a, { initialize: d, type: r }) {\n let o = `${a.$id}-${t.toString()}`, n = new BroadcastChannel$1(o, { type: r }), l = false, e = 0;\n watch(() => a[t], (i) => {\n l || (e = Date.now(), n.postMessage({ timestamp: e, state: parse(stringify(i)) })), l = false;\n }, { deep: true }), n.onmessage = (i) => {\n if (i === void 0) {\n n.postMessage({ timestamp: e, state: parse(stringify(a[t])) });\n return;\n }\n i.timestamp <= e || (l = true, e = i.timestamp, a[t] = i.state);\n };\n let u = () => n.postMessage(void 0), p = () => n.close();\n return d && u(), { sync: u, unshare: p };\n}\nvar h = (t, a) => Object.keys(a).includes(t), g = ({ initialize: t = true, enable: a = true, type: d }) => ({ store: r, options: o }) => {\n var _a, _b;\n let n = ((_a = o == null ? void 0 : o.share) == null ? void 0 : _a.enable) ?? a, l = ((_b = o == null ? void 0 : o.share) == null ? void 0 : _b.omit) ?? [];\n !n || Object.keys(r.$state).forEach((e) => {\n var _a2;\n l.includes(e) || !h(e, r.$state) || m(e, r, { initialize: ((_a2 = o == null ? void 0 : o.share) == null ? void 0 : _a2.initialize) ?? t, type: d });\n });\n};\nconst pinia = createPinia();\npinia.use(\n g({\n enable: true,\n initialize: true\n })\n);\nconst index = {\n install: (app, options) => {\n const appRouter = (options == null ? void 0 : options.router) || router;\n app.use(appRouter);\n app.use(pinia);\n app.provide(\"$registry\", new Registry(appRouter, options == null ? void 0 : options.doctypeLoader));\n if (options == null ? void 0 : options.components) {\n for (const [tag, component] of Object.entries(options.components)) {\n app.component(tag, component);\n }\n }\n }\n};\nexport {\n DoctypeMeta,\n Registry,\n index as Stonecrop,\n useStonecrop\n};\n","\n\n\n","import { onMounted as ye, onBeforeUnmount as Ie, ref as E, watch as j, unref as s, getCurrentScope as _e, onScopeDispose as Ee, defineComponent as k, inject as O, computed as S, openBlock as p, createElementBlock as w, createBlock as P, resolveDynamicComponent as ie, mergeProps as V, toDisplayString as $, Fragment as L, createElementVNode as T, renderSlot as x, createCommentVNode as M, useCssVars as de, withDirectives as ce, vShow as ue, reactive as A, renderList as N, normalizeStyle as H, createTextVNode as ke, provide as Ce, nextTick as Ae, createVNode as z, withCtx as G } from \"vue\";\nvar J;\nconst pe = typeof window < \"u\", Te = (t) => typeof t == \"string\", $e = () => {\n};\npe && (J = window == null ? void 0 : window.navigator) != null && J.userAgent && /iP(ad|hone|od)/.test(window.navigator.userAgent);\nfunction fe(t) {\n return typeof t == \"function\" ? t() : s(t);\n}\nfunction Oe(t) {\n return t;\n}\nfunction De(t) {\n return _e() ? (Ee(t), !0) : !1;\n}\nfunction U(t) {\n var e;\n const n = fe(t);\n return (e = n == null ? void 0 : n.$el) != null ? e : n;\n}\nconst me = pe ? window : void 0;\nfunction Re(...t) {\n let e, n, o, l;\n if (Te(t[0]) || Array.isArray(t[0]) ? ([n, o, l] = t, e = me) : [e, n, o, l] = t, !e)\n return $e;\n Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]);\n const a = [], r = () => {\n a.forEach((d) => d()), a.length = 0;\n }, i = (d, h, v, m) => (d.addEventListener(h, v, m), () => d.removeEventListener(h, v, m)), c = j(() => [U(e), fe(l)], ([d, h]) => {\n r(), d && a.push(...n.flatMap((v) => o.map((m) => i(d, v, m, h))));\n }, { immediate: !0, flush: \"post\" }), u = () => {\n c(), r();\n };\n return De(u), u;\n}\nconst X = typeof globalThis < \"u\" ? globalThis : typeof window < \"u\" ? window : typeof global < \"u\" ? global : typeof self < \"u\" ? self : {}, Y = \"__vueuse_ssr_handlers__\";\nX[Y] = X[Y] || {};\nfunction Se(t, { window: e = me, scrollTarget: n } = {}) {\n const o = E(!1), l = () => {\n if (!e)\n return;\n const a = e.document, r = U(t);\n if (!r)\n o.value = !1;\n else {\n const i = r.getBoundingClientRect();\n o.value = i.top <= (e.innerHeight || a.documentElement.clientHeight) && i.left <= (e.innerWidth || a.documentElement.clientWidth) && i.bottom >= 0 && i.right >= 0;\n }\n };\n return j(() => U(t), () => l(), { immediate: !0, flush: \"post\" }), e && Re(n || e, \"scroll\", l, {\n capture: !1,\n passive: !0\n }), o;\n}\nvar Z;\n(function(t) {\n t.UP = \"UP\", t.RIGHT = \"RIGHT\", t.DOWN = \"DOWN\", t.LEFT = \"LEFT\", t.NONE = \"NONE\";\n})(Z || (Z = {}));\nvar Pe = Object.defineProperty, K = Object.getOwnPropertySymbols, He = Object.prototype.hasOwnProperty, Le = Object.prototype.propertyIsEnumerable, ee = (t, e, n) => e in t ? Pe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, Me = (t, e) => {\n for (var n in e || (e = {}))\n He.call(e, n) && ee(t, n, e[n]);\n if (K)\n for (var n of K(e))\n Le.call(e, n) && ee(t, n, e[n]);\n return t;\n};\nconst Ne = {\n easeInSine: [0.12, 0, 0.39, 0],\n easeOutSine: [0.61, 1, 0.88, 1],\n easeInOutSine: [0.37, 0, 0.63, 1],\n easeInQuad: [0.11, 0, 0.5, 0],\n easeOutQuad: [0.5, 1, 0.89, 1],\n easeInOutQuad: [0.45, 0, 0.55, 1],\n easeInCubic: [0.32, 0, 0.67, 0],\n easeOutCubic: [0.33, 1, 0.68, 1],\n easeInOutCubic: [0.65, 0, 0.35, 1],\n easeInQuart: [0.5, 0, 0.75, 0],\n easeOutQuart: [0.25, 1, 0.5, 1],\n easeInOutQuart: [0.76, 0, 0.24, 1],\n easeInQuint: [0.64, 0, 0.78, 0],\n easeOutQuint: [0.22, 1, 0.36, 1],\n easeInOutQuint: [0.83, 0, 0.17, 1],\n easeInExpo: [0.7, 0, 0.84, 0],\n easeOutExpo: [0.16, 1, 0.3, 1],\n easeInOutExpo: [0.87, 0, 0.13, 1],\n easeInCirc: [0.55, 0, 1, 0.45],\n easeOutCirc: [0, 0.55, 0.45, 1],\n easeInOutCirc: [0.85, 0, 0.15, 1],\n easeInBack: [0.36, 0, 0.66, -0.56],\n easeOutBack: [0.34, 1.56, 0.64, 1],\n easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\nMe({\n linear: Oe\n}, Ne);\nconst y = (t) => {\n let e = Se(t).value;\n return e = e && t.offsetHeight > 0, e;\n}, I = (t) => t.tabIndex >= 0, te = (t) => {\n const e = t.target;\n return W(e);\n}, W = (t) => {\n var e;\n let n;\n if (t instanceof HTMLTableCellElement) {\n const o = (e = t.parentElement) == null ? void 0 : e.previousElementSibling;\n if (o) {\n const l = Array.from(o.children)[t.cellIndex];\n l && (n = l);\n }\n } else if (t instanceof HTMLTableRowElement) {\n const o = t.previousElementSibling;\n o && (n = o);\n }\n return n && (!I(n) || !y(n)) ? W(n) : n;\n}, Ue = (t) => {\n var e;\n const n = t.target;\n let o;\n if (n instanceof HTMLTableCellElement) {\n const l = (e = n.parentElement) == null ? void 0 : e.parentElement;\n if (l) {\n const a = l.firstElementChild.children[n.cellIndex];\n a && (o = a);\n }\n } else if (n instanceof HTMLTableRowElement) {\n const l = n.parentElement;\n if (l) {\n const a = l.firstElementChild;\n a && (o = a);\n }\n }\n return o && (!I(o) || !y(o)) ? B(o) : o;\n}, ne = (t) => {\n const e = t.target;\n return B(e);\n}, B = (t) => {\n var e;\n let n;\n if (t instanceof HTMLTableCellElement) {\n const o = (e = t.parentElement) == null ? void 0 : e.nextElementSibling;\n if (o) {\n const l = Array.from(o.children)[t.cellIndex];\n l && (n = l);\n }\n } else if (t instanceof HTMLTableRowElement) {\n const o = t.nextElementSibling;\n o && (n = o);\n }\n return n && (!I(n) || !y(n)) ? B(n) : n;\n}, je = (t) => {\n var e;\n const n = t.target;\n let o;\n if (n instanceof HTMLTableCellElement) {\n const l = (e = n.parentElement) == null ? void 0 : e.parentElement;\n if (l) {\n const a = l.lastElementChild.children[n.cellIndex];\n a && (o = a);\n }\n } else if (n instanceof HTMLTableRowElement) {\n const l = n.parentElement;\n if (l) {\n const a = l.lastElementChild;\n a && (o = a);\n }\n }\n return o && (!I(o) || !y(o)) ? W(o) : o;\n}, oe = (t) => {\n const e = t.target;\n return Q(e);\n}, Q = (t) => {\n var e;\n let n;\n if (t.previousElementSibling)\n n = t.previousElementSibling;\n else {\n const o = (e = t.parentElement) == null ? void 0 : e.previousElementSibling;\n n = o == null ? void 0 : o.lastElementChild;\n }\n return n && (!I(n) || !y(n)) ? Q(n) : n;\n}, le = (t) => {\n const e = t.target;\n return F(e);\n}, F = (t) => {\n var e;\n let n;\n if (t.nextElementSibling)\n n = t.nextElementSibling;\n else {\n const o = (e = t.parentElement) == null ? void 0 : e.nextElementSibling;\n n = o == null ? void 0 : o.firstElementChild;\n }\n return n && (!I(n) || !y(n)) ? F(n) : n;\n}, ae = (t) => {\n const e = t.target.parentElement.firstElementChild;\n return e && (!I(e) || !y(e)) ? F(e) : e;\n}, re = (t) => {\n const e = t.target.parentElement.lastElementChild;\n return e && (!I(e) || !y(e)) ? Q(e) : e;\n}, D = [\"alt\", \"control\", \"shift\", \"meta\"], Ve = {\n ArrowUp: \"up\",\n ArrowDown: \"down\",\n ArrowLeft: \"left\",\n ArrowRight: \"right\"\n}, we = {\n \"keydown.up\": (t) => {\n const e = te(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.down\": (t) => {\n const e = ne(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.left\": (t) => {\n const e = oe(t);\n t.preventDefault(), t.stopPropagation(), e && e.focus();\n },\n \"keydown.right\": (t) => {\n const e = le(t);\n t.preventDefault(), t.stopPropagation(), e && e.focus();\n },\n \"keydown.control.up\": (t) => {\n const e = Ue(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.control.down\": (t) => {\n const e = je(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.control.left\": (t) => {\n const e = ae(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.control.right\": (t) => {\n const e = re(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.end\": (t) => {\n const e = re(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.enter\": (t) => {\n if (t.target instanceof HTMLTableCellElement) {\n t.preventDefault(), t.stopPropagation();\n const e = ne(t);\n e && e.focus();\n }\n },\n \"keydown.shift.enter\": (t) => {\n if (t.target instanceof HTMLTableCellElement) {\n t.preventDefault(), t.stopPropagation();\n const e = te(t);\n e && e.focus();\n }\n },\n \"keydown.home\": (t) => {\n const e = ae(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.tab\": (t) => {\n const e = le(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.shift.tab\": (t) => {\n const e = oe(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n }\n};\nfunction q(t) {\n const e = (o) => {\n let l = null;\n o.parent && (typeof o.parent == \"string\" ? l = document.querySelector(o.parent) : o.parent instanceof Element ? l = o.parent : l = o.parent.value);\n let a = [];\n if (o.selectors)\n if (typeof o.selectors == \"string\")\n a = l ? Array.from(l.querySelectorAll(o.selectors)) : Array.from(document.querySelectorAll(o.selectors));\n else if (o.selectors instanceof Element)\n a.push(o.selectors);\n else if (Array.isArray(o.selectors.value))\n for (const r of o.selectors.value)\n r instanceof Element ? a.push(r) : a.push(r.$el);\n else\n a.push(o.selectors.value);\n else\n a = Array.from(l.children).filter((r) => I(r) && y(r));\n return a;\n }, n = (o) => (l) => {\n const a = Ve[l.key] || l.key.toLowerCase();\n if (D.includes(a))\n return;\n const r = o.handlers || we;\n for (const i of Object.keys(r)) {\n const [c, ...u] = i.split(\".\");\n if (c === \"keydown\" && u.includes(a)) {\n const d = r[i], h = u.filter((m) => D.includes(m)), v = D.some((m) => {\n const _ = m.charAt(0).toUpperCase() + m.slice(1);\n return l.getModifierState(_);\n });\n if (h.length > 0) {\n if (v) {\n for (const m of D)\n if (u.includes(m)) {\n const _ = m.charAt(0).toUpperCase() + m.slice(1);\n l.getModifierState(_) && d(l);\n }\n }\n } else\n v || d(l);\n }\n }\n };\n ye(() => {\n for (const o of t) {\n const l = e(o);\n for (const a of l)\n a.addEventListener(\"keydown\", n(o));\n }\n }), Ie(() => {\n for (const o of t) {\n const l = e(o);\n for (const a of l)\n a.removeEventListener(\"keydown\", n(o));\n }\n });\n}\nconst We = [\"data-colindex\", \"data-rowindex\", \"data-editable\", \"contenteditable\", \"tabindex\"], Be = { key: 1 }, Qe = /* @__PURE__ */ k({\n __name: \"ACell\",\n props: {\n colIndex: null,\n rowIndex: null,\n tableid: null,\n addNavigation: { type: [Boolean, Object], default: !0 },\n tabIndex: { default: 0 },\n clickHandler: null\n },\n setup(t) {\n var _;\n const e = t, n = O(e.tableid), o = E(null);\n let l = E(!1);\n const a = S(() => {\n const b = n.cellData(e.colIndex, e.rowIndex);\n if (n.columns[e.colIndex].format) {\n const g = n.columns[e.colIndex].format;\n return typeof g == \"function\" ? g(b) : typeof g == \"string\" ? Function(`\"use strict\";return (${g})`)()(b) : b;\n } else\n return b;\n }), r = (b) => {\n if (e.clickHandler) {\n e.clickHandler(b);\n return;\n }\n if (n.columns[e.colIndex].mask, n.columns[e.colIndex].modalComponent) {\n const g = o.value.getBoundingClientRect();\n n.modal.visible = !0, n.modal.colIndex = e.colIndex, n.modal.rowIndex = e.rowIndex, n.modal.parent = o.value, n.modal.top = g.top + g.height, n.modal.left = g.left, n.modal.width = c.value, n.modal.component = n.columns[e.colIndex].modalComponent, n.modal.componentProps = n.columns[e.colIndex].modalComponentProps;\n }\n };\n if (e.addNavigation) {\n let b = {\n ...we,\n \"keydown.f2\": r,\n \"keydown.alt.up\": r,\n \"keydown.alt.down\": r,\n \"keydown.alt.left\": r,\n \"keydown.alt.right\": r\n };\n typeof e.addNavigation == \"object\" && (b = {\n ...b,\n ...e.addNavigation\n }), q([\n {\n selectors: o,\n handlers: b\n }\n ]);\n }\n const i = S(() => n.columns[e.colIndex].align || \"center\"), c = S(() => n.columns[e.colIndex].width || \"40ch\");\n let u = \"\";\n const d = () => {\n o.value && (u = o.value.innerText);\n }, h = () => {\n o.value && o.value.innerHTML !== u && (u = o.value.innerText, o.value.dispatchEvent(new Event(\"change\")), l.value = !0, n.columns[e.colIndex].format || n.setCellData(e.rowIndex, e.colIndex, u));\n }, v = (b, g) => g && b === 0 && g > 0 ? `${g}ch` : \"inherit\", m = {\n textAlign: i.value,\n width: c.value,\n backgroundColor: l.value ? \"var(--cell-modified-color)\" : \"inherit\",\n fontWeight: l.value ? \"bold\" : \"inherit\",\n paddingLeft: v(e.colIndex, (_ = n.display[e.rowIndex]) == null ? void 0 : _.indent)\n };\n return (b, g) => (p(), w(\"td\", {\n ref_key: \"cell\",\n ref: o,\n \"data-colindex\": t.colIndex,\n \"data-rowindex\": t.rowIndex,\n \"data-editable\": s(n).columns[t.colIndex].edit,\n contenteditable: s(n).columns[t.colIndex].edit,\n tabindex: t.tabIndex,\n spellcheck: !1,\n style: m,\n onFocus: d,\n onPaste: h,\n onBlur: h,\n onInput: h,\n onClick: r,\n onMousedown: r\n }, [\n s(n).columns[t.colIndex].cellComponent ? (p(), P(ie(s(n).columns[t.colIndex].cellComponent), V({\n key: 0,\n value: s(a)\n }, s(n).columns[t.colIndex].cellComponentProps), null, 16, [\"value\"])) : (p(), w(\"span\", Be, $(s(a)), 1))\n ], 40, We));\n }\n});\nconst C = (t, e) => {\n const n = t.__vccOpts || t;\n for (const [o, l] of e)\n n[o] = l;\n return n;\n}, he = /* @__PURE__ */ C(Qe, [[\"__scopeId\", \"data-v-1738c6fc\"]]), Fe = [\"tabindex\"], qe = [\"tabindex\"], ze = [\"colspan\"], Ge = /* @__PURE__ */ k({\n __name: \"AExpansionRow\",\n props: {\n row: null,\n rowIndex: null,\n tableid: null,\n tabIndex: { default: -1 },\n addNavigation: null\n },\n setup(t) {\n const e = t, n = O(e.tableid), o = E(null), l = E(null), a = () => n.display[e.rowIndex].expanded ? \"▼\" : \"►\";\n if (e.addNavigation !== void 0) {\n const r = Object.assign({}, e.addNavigation);\n r[\"keydown.control.g\"] = (i) => {\n i.stopPropagation(), i.preventDefault(), n.toggleRowExpand(e.rowIndex);\n }, q([\n {\n selectors: o,\n handlers: r\n }\n ]);\n }\n return (r, i) => (p(), w(L, null, [\n T(\"tr\", V(r.$attrs, {\n ref_key: \"rowEl\",\n ref: o,\n tabindex: t.tabIndex,\n class: \"expandable-row\"\n }), [\n T(\"td\", {\n tabIndex: -1,\n onClick: i[0] || (i[0] = (c) => s(n).toggleRowExpand(t.rowIndex)),\n class: \"row-index\"\n }, $(a()), 1),\n x(r.$slots, \"row\", {}, void 0, !0)\n ], 16, Fe),\n s(n).display[e.rowIndex].expanded ? (p(), w(\"tr\", {\n key: 0,\n ref_key: \"rowExpanded\",\n ref: l,\n tabindex: t.tabIndex,\n class: \"expanded-row\"\n }, [\n T(\"td\", {\n tabIndex: -1,\n colspan: s(n).columns.length + 1,\n class: \"expanded-row-content\"\n }, [\n x(r.$slots, \"content\", {}, void 0, !0)\n ], 8, ze)\n ], 8, qe)) : M(\"\", !0)\n ], 64));\n }\n});\nconst Je = /* @__PURE__ */ C(Ge, [[\"__scopeId\", \"data-v-2bb821ae\"]]), Xe = [\"tabindex\"], Ye = {\n key: 0,\n tabIndex: -1,\n class: \"list-index\"\n}, Ze = /* @__PURE__ */ k({\n __name: \"ARow\",\n props: {\n row: null,\n rowIndex: null,\n tableid: null,\n tabIndex: { default: -1 },\n addNavigation: null\n },\n setup(t) {\n const e = t;\n de((c) => ({\n \"6b10edcf\": s(l)\n }));\n const n = O(e.tableid), o = E(null), l = n.numberedRowWidth.value, a = () => n.config.view !== \"tree\" ? \"\" : n.display[e.rowIndex].isRoot || n.display[e.rowIndex].isParent ? n.display[e.rowIndex].childrenOpen ? \"-\" : \"+\" : \"\", r = () => n.config.view !== \"tree\" || n.display[e.rowIndex].isRoot || n.display[e.rowIndex].open, i = (c) => {\n n.toggleRowExpand(c);\n };\n return e.addNavigation && q([\n {\n selectors: o,\n handlers: e.addNavigation\n }\n ]), (c, u) => ce((p(), w(\"tr\", {\n ref_key: \"rowEl\",\n ref: o,\n tabindex: t.tabIndex,\n class: \"table-row\"\n }, [\n s(n).config.view === \"list\" ? (p(), w(\"td\", Ye, $(t.rowIndex + 1), 1)) : s(n).config.view === \"tree\" ? (p(), w(\"td\", {\n key: 1,\n tabIndex: -1,\n class: \"tree-index\",\n onClick: u[0] || (u[0] = (d) => i(t.rowIndex))\n }, $(a()), 1)) : x(c.$slots, \"indexCell\", { key: 2 }, void 0, !0),\n x(c.$slots, \"default\", {}, void 0, !0)\n ], 8, Xe)), [\n [ue, r()]\n ]);\n }\n});\nconst be = /* @__PURE__ */ C(Ze, [[\"__scopeId\", \"data-v-c758303d\"]]);\nlet R;\nconst Ke = new Uint8Array(16);\nfunction et() {\n if (!R && (R = typeof crypto < \"u\" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !R))\n throw new Error(\"crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported\");\n return R(Ke);\n}\nconst f = [];\nfor (let t = 0; t < 256; ++t)\n f.push((t + 256).toString(16).slice(1));\nfunction tt(t, e = 0) {\n return (f[t[e + 0]] + f[t[e + 1]] + f[t[e + 2]] + f[t[e + 3]] + \"-\" + f[t[e + 4]] + f[t[e + 5]] + \"-\" + f[t[e + 6]] + f[t[e + 7]] + \"-\" + f[t[e + 8]] + f[t[e + 9]] + \"-\" + f[t[e + 10]] + f[t[e + 11]] + f[t[e + 12]] + f[t[e + 13]] + f[t[e + 14]] + f[t[e + 15]]).toLowerCase();\n}\nconst nt = typeof crypto < \"u\" && crypto.randomUUID && crypto.randomUUID.bind(crypto), se = {\n randomUUID: nt\n};\nfunction ge(t, e, n) {\n if (se.randomUUID && !e && !t)\n return se.randomUUID();\n t = t || {};\n const o = t.random || (t.rng || et)();\n if (o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128, e) {\n n = n || 0;\n for (let l = 0; l < 16; ++l)\n e[n + l] = o[l];\n return e;\n }\n return tt(o);\n}\nclass ot {\n constructor(e, n, o, l, a, r) {\n this.id = e || ge(), this.rows = o, this.columns = A(n), this.config = A(l), this.table = a || A(this.createTableObject()), this.display = this.createDisplayObject(r), this.modal = A({ visible: !1 });\n }\n createTableObject() {\n const e = {};\n for (const [n, o] of this.columns.entries())\n for (const [l, a] of this.rows.entries())\n e[`${n}:${l}`] = a[o.name];\n return e;\n }\n createDisplayObject(e) {\n const n = [Object.assign({}, { modified: !1 })];\n if (e && \"0:0\" in e)\n return e;\n const o = /* @__PURE__ */ new Set();\n for (let l = this.rows.length - 1; l >= 0; l--) {\n const a = this.rows[l];\n a.parent && o.add(a.parent), n[l] = {\n childrenOpen: !1,\n expanded: !1,\n indent: a.indent || null,\n isParent: o.has(l),\n isRoot: a.parent === null || a.parent === void 0,\n modified: !1,\n open: a.parent === null || a.parent === void 0,\n parent: a.parent\n };\n }\n return A(n);\n }\n get zeroColumn() {\n return [\"list\", \"tree\", \"list-expansion\"].includes(this.config.view);\n }\n get numberedRowWidth() {\n return S(() => String(Math.ceil(this.rows.length / 100) + 1) + \"ch\");\n }\n cellData(e, n) {\n return this.table[`${e}:${n}`];\n }\n setCellData(e, n, o) {\n this.table[`${n}:${e}`] !== o && (this.display[e].modified = !0), this.table[`${n}:${e}`] = o;\n const l = this.columns[n];\n return this.rows[e][l.name] = o, this.table[`${n}:${e}`];\n }\n toggleRowExpand(e) {\n if (this.config.view === \"tree\") {\n this.display[e].childrenOpen = !this.display[e].childrenOpen;\n for (let n = this.rows.length - 1; n >= 0; n--)\n this.display[n].parent === e && (this.display[n].open = !this.display[n].open, this.display[n].childrenOpen && this.toggleRowExpand(n));\n } else\n this.config.view === \"list-expansion\" && (this.display[e].expanded = !this.display[e].expanded);\n }\n}\nconst lt = { key: 0 }, at = {\n class: \"atable-header-row\",\n tabindex: \"-1\"\n}, rt = {\n key: 0,\n id: \"header-index\"\n}, st = /* @__PURE__ */ k({\n __name: \"ATableHeader\",\n props: {\n columns: null,\n config: null,\n tableid: null\n },\n setup(t) {\n const e = t;\n de((a) => ({\n \"1cb0fcc9\": s(o)\n }));\n const n = O(e.tableid), o = n.numberedRowWidth.value, l = (a) => ({\n minWidth: a.width || \"40ch\",\n textAlign: a.align || \"center\",\n width: n.config.fullWidth ? \"auto\" : null\n });\n return (a, r) => t.columns.length ? (p(), w(\"thead\", lt, [\n T(\"tr\", at, [\n s(n).zeroColumn ? (p(), w(\"th\", rt)) : M(\"\", !0),\n (p(!0), w(L, null, N(t.columns, (i, c) => (p(), w(\"th\", {\n key: c,\n tabindex: \"-1\",\n style: H(l(i))\n }, [\n x(a.$slots, \"default\", {}, () => [\n ke($(i.label || String.fromCharCode(c + 97).toUpperCase()), 1)\n ], !0)\n ], 4))), 128))\n ])\n ])) : M(\"\", !0);\n }\n});\nconst xe = /* @__PURE__ */ C(st, [[\"__scopeId\", \"data-v-8a8d9cee\"]]), it = /* @__PURE__ */ k({\n __name: \"ATableModal\",\n props: {\n colIndex: null,\n rowIndex: null,\n tableid: null\n },\n setup(t) {\n O(t.tableid);\n const n = (o) => {\n o.stopPropagation();\n };\n return (o, l) => (p(), w(\"div\", {\n ref: \"amodal\",\n class: \"amodal\",\n tabindex: \"-1\",\n onClick: n,\n onInput: n\n }, [\n x(o.$slots, \"default\", {}, void 0, !0)\n ], 544));\n }\n});\nconst ve = /* @__PURE__ */ C(it, [[\"__scopeId\", \"data-v-8ac70767\"]]), dt = /* @__PURE__ */ k({\n __name: \"ATable\",\n props: {\n id: null,\n modelValue: null,\n columns: null,\n rows: { default: () => [] },\n config: { default: () => new Object() },\n tableid: null\n },\n emits: [\"update:modelValue\"],\n setup(t, { emit: e }) {\n const n = t;\n let o = n.modelValue ? n.modelValue : n.rows, l = new ot(n.id, n.columns, o, n.config);\n Ce(l.id, l), j(\n () => l.rows,\n (r, i) => {\n e(\"update:modelValue\", r);\n },\n { deep: !0 }\n );\n const a = (r) => {\n var i;\n (i = l.modal.parent) != null && i.contains(r.target) || l.modal.visible && (l.modal.visible = !1);\n };\n return window.addEventListener(\"click\", a), window.addEventListener(\"keydown\", (r) => {\n if (r.key === \"Escape\" && l.modal.visible) {\n l.modal.visible = !1;\n const i = l.modal.parent;\n i && Ae().then(() => {\n const c = i.dataset.rowindex, u = i.dataset.colindex, d = document.querySelectorAll(`[data-rowindex='${c}'][data-colindex='${u}']`);\n d && d[0].focus();\n });\n }\n }), (r, i) => (p(), w(\"table\", {\n class: \"atable\",\n style: H({ width: s(l).config.fullWidth ? \"100%\" : \"auto\" })\n }, [\n x(r.$slots, \"header\", { data: s(l) }, () => [\n z(xe, {\n columns: s(l).columns,\n config: s(l).config,\n tableid: s(l).id\n }, null, 8, [\"columns\", \"config\", \"tableid\"])\n ], !0),\n T(\"tbody\", null, [\n x(r.$slots, \"body\", { data: s(l) }, () => [\n (p(!0), w(L, null, N(s(l).rows, (c, u) => (p(), P(be, {\n key: c.id || s(ge)(),\n row: c,\n rowIndex: u,\n tableid: s(l).id\n }, {\n default: G(() => [\n (p(!0), w(L, null, N(s(l).columns, (d, h) => (p(), P(he, {\n key: `${h}:${u}`,\n tableid: s(l).id,\n col: d,\n spellcheck: \"false\",\n rowIndex: u,\n colIndex: h + (s(l).zeroColumn ? 0 : -1),\n component: d.cellComponent,\n style: H({\n textAlign: (d == null ? void 0 : d.align) || \"center\",\n minWidth: (d == null ? void 0 : d.width) || \"40ch\",\n width: s(l).config.fullWidth ? \"auto\" : null\n })\n }, null, 8, [\"tableid\", \"col\", \"rowIndex\", \"colIndex\", \"component\", \"style\"]))), 128))\n ]),\n _: 2\n }, 1032, [\"row\", \"rowIndex\", \"tableid\"]))), 128))\n ], !0)\n ]),\n x(r.$slots, \"footer\", { data: s(l) }, void 0, !0),\n x(r.$slots, \"modal\", { data: s(l) }, () => [\n ce(z(ve, {\n colIndex: s(l).modal.colIndex,\n rowIndex: s(l).modal.rowIndex,\n tableid: s(l).id,\n style: H({\n left: s(l).modal.left + \"px\",\n top: s(l).modal.top + \"px\",\n maxWidth: s(l).modal.width + \"px\"\n })\n }, {\n default: G(() => [\n (p(), P(ie(s(l).modal.component), V({\n key: `${s(l).modal.rowIndex}:${s(l).modal.colIndex}`,\n colIndex: s(l).modal.colIndex,\n rowIndex: s(l).modal.rowIndex,\n tableid: s(l).id\n }, s(l).modal.componentProps), null, 16, [\"colIndex\", \"rowIndex\", \"tableid\"]))\n ]),\n _: 1\n }, 8, [\"colIndex\", \"rowIndex\", \"tableid\", \"style\"]), [\n [ue, s(l).modal.visible]\n ])\n ], !0)\n ], 4));\n }\n});\nconst ct = /* @__PURE__ */ C(dt, [[\"__scopeId\", \"data-v-9137b4c3\"]]);\nfunction ft(t) {\n t.component(\"ACell\", he), t.component(\"AExpansionRow\", Je), t.component(\"ARow\", be), t.component(\"ATable\", ct), t.component(\"ATableHeader\", xe), t.component(\"ATableModal\", ve);\n}\nexport {\n he as ACell,\n Je as AExpansionRow,\n be as ARow,\n ct as ATable,\n xe as ATableHeader,\n ve as ATableModal,\n ot as TableDataStore,\n ft as install\n};\n//# sourceMappingURL=atable.js.map\n","\n\n\n","\n\n\n\n\n","import { App } from 'vue'\n\nimport ActionSet from '@/components/ActionSet.vue'\nimport CommandPalette from '@/components/CommandPalette.vue'\nimport Doctype from '@/components/Doctype.vue'\nimport Records from '@/components/Records.vue'\nimport SheetNav from '@/components/SheetNav.vue'\n\nexport default {\n\tinstall: (app: App) => {\n\t\tapp.component('ActionSet', ActionSet)\n\t\tapp.component('CommandPalette', CommandPalette)\n\t\tapp.component('Doctype', Doctype)\n\t\tapp.component('Records', Records)\n\t\tapp.component('SheetNav', SheetNav)\n\t},\n}\n"],"names":["_elements","ref","isOpen","timeout","hover","closeClicked","onMounted","props","closeDropdowns","element","onHover","onHoverLeave","toggleDropdown","index","showDropdown","_cache","C","l","n","o","Y","se","ze","j","W","G","Ze","z","et","tt","J","nt","lt","gt","w","y","s","r","i","a","x","m","g","O","$","B","xe","Ae","v","p","ce","le","xt","At","t","Ct","Mt","Tt","Se","Stonecrop","registry","store","schema","workflow","actions","doctype","doctypeRegistry","filters","data","id","action","initialState","action2","isVue2","set","target","key","val","del","getDevtoolsGlobalHook$1","getTarget$1","isProxyAvailable$1","HOOK_SETUP$1","HOOK_PLUGIN_SETTINGS_SET$1","supported$1","perf$1","isPerformanceSupported$1","_a","now$2","ApiProxy$1","plugin","hook","defaultSettings","item","localSettingsSaveId","currentSettings","raw","value","pluginId","_target","prop","args","resolve","setupDevtoolsPlugin$1","pluginDescriptor","setupFn","descriptor","enableProxy","proxy","activePinia","setActivePinia","pinia2","piniaSymbol","isPlainObject","MutationType","MutationType2","IS_CLIENT","USE_DEVTOOLS","_global","bom","blob","autoBom","download","url","name","opts","xhr","saveAs","corsEnabled","click","node","evt","_navigator","isMacOSWebView","downloadSaveAs","msSaveAs","fileSaverSaveAs","popup","force","isSafari","isChromeIOS","reader","toastMessage","message","type2","piniaMessage","isPinia","checkClipboardAccess","checkNotFocusedError","error","actionGlobalCopyState","actionGlobalPasteState","actionGlobalSaveState","fileInput","getFileOpener","openFile","reject","files","file","actionGlobalOpenStateFile","result","text","formatDisplay$1","display","PINIA_ROOT_LABEL","PINIA_ROOT_ID","formatStoreForInspectorTree","formatStoreForInspectorState","storeNames","storeMap","storeId","store2","getters","state","getterName","formatEventData","events","event","formatMutationType","isTimelineActive","componentStateTypes","MUTATIONS_LAYER_ID","INSPECTOR_ID","assign$1","getStoreType","registerPiniaDevtools","app","api","nodeId","payload","ctx","piniaStores","toRaw","stores","inspectedStore","path","addStoreToDevtools","now2","after","onError","groupId","runningActionId","activeAction","watch","unref","newValue","oldValue","eventData","hotUpdate","markRaw","newStore","$dispose","patchActionForGrouping","actionNames","storeActions","actionName","_actionId","trackedStore","devtoolsPlugin","options","originalHotUpdate","createPinia","scope","effectScope","_p","toBeInstalled","patchObject","newState","oldState","subPatch","targetValue","isRef","isReactive","noop$1","addSubscription","subscriptions","callback","detached","onCleanup","removeSubscription","idx","getCurrentScope","onScopeDispose","triggerSubscriptions","mergeReactiveObjects","patchToApply","skipHydrateSymbol","shouldHydrate","obj","assign$2","isComputed","createOptionsStore","hot","setup","localState","toRefs","computedGetters","computed","createSetupStore","$id","isOptionsStore","optionsForPlugin","$subscribeOptions","isListening","debuggerEvents","isSyncListening","actionSubscriptions","hotState","activeListener","$patch","partialStateOrMutator","subscriptionMutation","myListenerId","nextTick","$reset","$state","wrapAction","afterCallbackList","onErrorCallbackList","ret","_hmrPayload","partialStore","options2","stopWatcher","reactive","setupStore","toRef","actionValue","stateKey","newStateTarget","oldStateSource","getter","getterValue","nonEnumerable","extender","extensions","defineStore","idOrOptions","setupOptions","isSetupStore","useStore","currentInstance","getCurrentInstance","inject","hotId","vm","cache","useDataStore","records","record","useStonecrop","stonecrop","isReady","onBeforeMount","_b","route","doctypeSlug","recordId","getDevtoolsGlobalHook","getTarget","isProxyAvailable","HOOK_SETUP","HOOK_PLUGIN_SETTINGS_SET","supported","perf","isPerformanceSupported","now$1","ApiProxy2","setupDevtoolsPlugin","isBrowser","isESModule","assign","applyToParams","fn","params","newParams","isArray","noop","warn","msg","TRAILING_SLASH_RE","removeTrailingSlash","parseURL","parseQuery2","location2","currentLocation","query","searchString","hash","hashPos","searchPos","resolveRelativePath","stringifyURL","stringifyQuery2","stripBase","pathname","base","isSameRouteLocation","b","aLastIndex","bLastIndex","isSameRouteRecord","isSameRouteLocationParams","isSameRouteLocationParamsValue","isEquivalentArray","to","from","fromSegments","toSegments","position","toPosition","segment","NavigationType","NavigationType2","NavigationDirection","NavigationDirection2","normalizeBase","baseEl","BEFORE_HASH_RE","createHref","getElementPosition","el","offset","docRect","elRect","computeScrollPosition","scrollToPosition","scrollToOptions","positionEl","isIdSelector","foundEl","getScrollKey","delta","scrollPositions","saveScrollPosition","scrollPosition","getSavedScrollPosition","scroll","createBaseLocation","createCurrentLocation","search","slicePos","pathFromHash","useHistoryListeners","historyState","replace","listeners","teardowns","pauseState","popStateHandler","fromState","listener","pauseListeners","listen","teardown","index2","beforeUnloadListener","history2","destroy","buildState","back","current","forward","replaced","computeScroll","useHistoryStateNavigation","changeLocation","replace2","hashIndex","err","push","currentState","createWebHistory","historyNavigation","historyListeners","go","triggerListeners","routerHistory","isRouteLocation","isRouteName","START_LOCATION_NORMALIZED","NavigationFailureSymbol","NavigationFailureType","NavigationFailureType2","ErrorTypeMessages","stringifyRoute","createRouterError","isNavigationFailure","propertiesToLog","BASE_PARAM_PATTERN","BASE_PATH_PARSER_OPTIONS","REGEX_CHARS_RE","tokensToParser","segments","extraOptions","score","pattern","keys","segmentScores","tokenIndex","token","subSegmentScore","repeatable","optional","regexp","re2","subPattern","re","parse2","match","stringify2","avoidDuplicatedSlash","param","compareScoreArray","diff","comparePathParserScore","aScore","bScore","comp","isLastScoreNegative","last","ROOT_TOKEN","VALID_PARAM_RE","tokenizePath","crash","buffer","previousState","tokens","finalizeSegment","char","customRe","consumeBuffer","addCharToBuffer","createRouteRecordMatcher","parent","parser","existingKeys","matcher","createRouterMatcher","routes","globalOptions","matchers","matcherMap","mergeOptions","getRecordMatcher","addRoute","originalRecord","isRootAdd","mainNormalizedRecord","normalizeRouteRecord","checkChildMissingNameWithEmptyPath","normalizedRecords","aliases","alias","originalMatcher","normalizedRecord","parentPath","connectingSlash","checkMissingParamsInAbsolutePath","checkSameParams","isAliasRecord","removeRoute","children","insertMatcher","matcherRef","getRoutes","isRecordChildOf","invalidParams","paramName","k","paramsFromLocation","m2","matched","parentMatcher","mergeMetaFields","normalizeRecordProps","propsObject","meta","defaults","partialOptions","isSameParam","child","HASH_RE","AMPERSAND_RE","SLASH_RE","EQUAL_RE","IM_RE","PLUS_RE","ENC_BRACKET_OPEN_RE","ENC_BRACKET_CLOSE_RE","ENC_CARET_RE","ENC_BACKTICK_RE","ENC_CURLY_OPEN_RE","ENC_PIPE_RE","ENC_CURLY_CLOSE_RE","ENC_SPACE_RE","commonEncode","encodeHash","encodeQueryValue","encodeQueryKey","encodePath","encodeParam","decode","parseQuery","searchParams","searchParam","eqPos","currentValue","stringifyQuery","value2","normalizeQuery","normalizedQuery","matchedRouteKey","viewDepthKey","routerKey","routeLocationKey","routerViewLocationKey","useCallbacks","handlers","add","handler","reset","guardToPromiseFn","guard","enterCallbackArray","next","valid","guardReturn","canOnlyBeCalledOnce","guardCall","resolvedValue","called","extractComponentsGuards","guardType","guards","rawComponent","promise","isRouteComponent","componentPromise","resolved","resolvedComponent","component","useLink","router2","currentRoute","activeRecordIndex","length","routeMatched","currentMatched","parentRecordPath","getOriginalPath","isActive","includesParams","isExactActive","navigate","e","guardEvent","instance","linkContextDevtools","watchEffect","RouterLinkImpl","defineComponent","slots","link","elClass","getLinkClass","h$1","RouterLink","outer","inner","innerValue","outerValue","propClass","globalClass","defaultClass","RouterViewImpl","attrs","warnDeprecatedUsage","injectedRoute","routeToDisplay","injectedDepth","depth","initialDepth","matchedRoute","matchedRouteRef","provide","viewRef","oldInstance","oldName","currentName","ViewComponent","normalizeSlot","routePropsOption","routeProps","vnode","info","slot","slotContent","RouterView","parentName","formatRouteLocation","routeLocation","tooltip","copy","omit","formatDisplay","routerId","addDevtools","componentInstance","PINK_500","devtoolsData","backgroundColor","ORANGE_400","LIME_500","BLUE_600","refreshRoutesView","routerInspectorId","navigationsLayerId","navigationId","failure","activeRoutesPayload","resetMatchStateOnRouteRecord","isRouteMatching","markRouteRecordActive","formatRouteRecordForInspector","route2","formatRouteRecordMatcherForStateInspector","modifierForKey","fields","CYAN_400","DARK","tags","routeRecordId","EXTRACT_REGEXP_RE","childRoute","filter","found","decodedPath","createRouter","parseQuery$1","stringifyQuery$1","beforeGuards","beforeResolveGuards","afterGuards","shallowRef","pendingLocation","normalizeParams","paramValue","encodeParams","decodeParams","parentOrRoute","recordMatcher","routeMatcher","hasRoute","rawLocation","locationNormalized","matchedRoute2","href2","matcherLocation","targetParams","fullPath","href","locationAsObject","checkCanceledNavigation","pushWithRedirect","handleRedirectRecord","lastMatched","redirect","newTargetLocation","redirectedFrom","targetLocation","shouldRedirect","toLocation","handleScroll","markAsReady","triggerError","failure2","finalizeNavigation","triggerAfterEach","checkCanceledNavigationAndReject","leavingRecords","updatingRecords","enteringRecords","extractChangingRecords","canceledNavigationCheck","runGuardQueue","beforeEnter","isPush","isFirstNavigation","removeHistoryListener","setupListeners","_from","readyHandlers","errorHandlers","ready","list","resolve2","scrollBehavior","started","installedApps","router3","reactiveRoute","unmountApp","len","recordFrom","recordTo","isPromise","PROMISE_RESOLVED_VOID","sleep","time","resolveWith","res","randomInt","min","max","randomToken","lastMs","additional","microSeconds$4","ms","microSeconds$3","type$3","create$3","channelName","close$3","channelState","postMessage$3","messageJson","onMessage$3","canBeUsed$3","averageResponseTime$3","NativeMethod","ObliviousSet","ObliviousSet2","ttl","_this","now","removeTooOldValues","obliviousSet","olderThen","iterator","fillOptionsWithDefaults","originalOptions","microSeconds$2","DB_PREFIX","OBJECT_STORE_ID","TRANSACTION_SETTINGS","type$2","getIdb","commitIndexedDBTransaction","tx","createDatabase","IndexedDB","dbName","openRequest","ev","db","rej","writeMessage","readerUuid","writeObject","objectStore","getMessagesHigherThan","lastCursorId","keyRangeValue","getAllRequest","openCursor","openCursorRequest","cursor","removeMessagesById","ids","deleteRequest","getOldMessages","msgObk","cleanOldMessages","tooOld","create$2","_readLoop","readNewMessages","_filterMessage","msgObj","newerMessages","useMessages","msgObjA","msgObjB","close$2","postMessage$2","onMessage$2","canBeUsed$2","averageResponseTime$2","IndexedDBMethod","microSeconds$1","KEY_PREFIX","type$1","getLocalStorage","localStorage2","storageKey","postMessage$1","writeObj","addStorageEventListener","removeStorageEventListener","create$1","canBeUsed$1","uuid","eMIs","close$1","onMessage$1","ls","averageResponseTime$1","defaultTime","userAgent","LocalstorageMethod","microSeconds","type","SIMULATE_CHANNELS","create","close","postMessage","channelArray","channel","onMessage","canBeUsed","averageResponseTime","SimulateMethod","METHODS","chooseMethod","chooseMethods","useMethod","method","OPEN_BROADCAST_CHANNELS","lastId","BroadcastChannel$1","_prepareChannel","_post","listenObj","_removeListenerObject","_addListenerObject","obj2","awaitPrepare","broadcastChannel","sendPromise","maybePromise","_hasMessageListeners","_startListening","_stopListening","listenerFn","listenerObject","hundredMsInMicro","minMessageTime","escaped","DevalueError","is_primitive","thing","object_proto_names","is_plain_object","proto","get_type","stringify_string","str","code","UNDEFINED","HOLE","NAN","POSITIVE_INFINITY","NEGATIVE_INFINITY","NEGATIVE_ZERO","parse","serialized","revivers","unflatten","parsed","hydrate","values","hydrated","standalone","reviver","set2","map","array","object","stringify","reducers","stringified","indexes","custom","flatten","index3","stringify_primitive","source","flags","d","u","h","_a2","pinia","newSchema","fieldValue","pe","Te","$e","fe","Oe","De","_e","Ee","U","me","Re","c","X","E","Z","Pe","K","He","Le","ee","Me","Ne","I","te","Ue","ne","je","oe","Q","F","ae","D","Ve","we","q","_","ye","Ie","We","Be","Qe","S","P","ie","V","he","Xe","Ye","de","ue","be","R","Ke","f","ge","ot","A","at","rt","st","T","M","L","N","H","ke","it","ve","dt","Ce","ct","config","breadcrumbs","breadcrumbsVisibile","searchVisibile","searchText","searchinput","rotateHideTabIcon","toggleBreadcrumbs","toggleSearch","handleSearchInput","handleSearch","navigateHome","ActionSet","CommandPalette","Doctype","Records","SheetNav"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiFMA,IAAYC,EAAkB,CAAA,CAAE,GAChCC,IAASD,EAAI,EAAK,GAClBE,IAAUF,EAAoB,IAAI,GAClCG,IAAQH,EAAI,EAAK,GACjBI,IAAeJ,EAAI,EAAK;AAE9B,IAAAK,GAAU,MAAM;AACf,MAAAN,EAAU,QAAQO,EAAM,UACTC;IAAA,CACf;AAED,UAAMA,IAAiB,MAAM;AACnB,eAAAC,KAAWT,EAAU;AACzB,QAAAS,EAAQ,gBAAgB,eAC3BA,EAAQ,OAAO;AAAA,IAEjB,GAGKC,IAAU,MAAM;AACrB,MAAAN,EAAM,QAAQ,IACND,EAAA,QAAQ,WAAW,MAAM;AAChC,QAAIC,EAAM,UACTF,EAAO,QAAQ;AAAA,SAEd,GAAG;AAAA,IAAA,GAGDS,IAAe,MAAM;AAC1B,MAAAP,EAAM,QAAQ,IACdC,EAAa,QAAQ,IACrB,aAAaF,EAAQ,KAAK,GAC1BD,EAAO,QAAQ;AAAA,IAAA,GAGVU,IAAiB,CAACC,MAAkB;AACzC,YAAMC,IAAe,CAACd,EAA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AO,GAC5Bx1B,EAAA,UAAU,WAAWy1B,EAAO,GAC5Bz1B,EAAA,UAAU,YAAY01B,EAAQ;AAAA,EACnC;AACD;"} \ No newline at end of file +{"version":3,"file":"desktop.js","sources":["../src/components/ActionSet.vue","../src/components/CommandPalette.vue","../../aform/dist/aform.js","../../stonecrop/dist/stonecrop.js","../src/components/Doctype.vue","../../atable/dist/atable.js","../src/components/Records.vue","../src/components/SheetNav.vue","../src/plugins/index.ts"],"sourcesContent":["\n\n\n\n\n","\n\n\n","import { defineComponent as D, computed as M, openBlock as f, createElementBlock as _, createElementVNode as u, withDirectives as k, isRef as P, vModelCheckbox as me, unref as v, toDisplayString as x, vShow as S, resolveComponent as ve, createBlock as B, withCtx as ye, vModelText as H, onMounted as le, onBeforeUnmount as ge, ref as g, watch as q, getCurrentScope as _e, onScopeDispose as he, nextTick as be, Fragment as $, renderList as O, withModifiers as ke, normalizeClass as oe, pushScopeId as De, popScopeId as we, resolveDynamicComponent as Ee, mergeProps as xe, createTextVNode as Ae, createCommentVNode as Ce, renderSlot as Me, createVNode as Te, inject as Ie, resolveDirective as Se } from \"vue\";\nconst Ve = { id: \"checkbox-container\" }, $e = [\"id\", \"readonly\", \"required\"], Oe = { id: \"custom-checkbox\" }, Le = [\"for\"], Pe = [\"innerHTML\"], Be = /* @__PURE__ */ D({\n __name: \"ACheckbox\",\n props: {\n label: null,\n value: null,\n required: { type: Boolean },\n readOnly: { type: Boolean },\n uuid: null,\n validation: { default: () => ({ errorMessage: \" \" }) }\n },\n emits: [\"update:value\"],\n setup(e, { emit: t }) {\n const l = e, n = M({\n get() {\n return l.value;\n },\n set(o) {\n t(\"update:value\", o);\n }\n });\n return (o, a) => (f(), _(\"div\", null, [\n u(\"label\", Ve, [\n k(u(\"input\", {\n \"onUpdate:modelValue\": a[0] || (a[0] = (s) => P(n) ? n.value = s : null),\n type: \"checkbox\",\n id: e.uuid,\n class: \"checkbox\",\n readonly: e.readOnly,\n required: e.required\n }, null, 8, $e), [\n [me, v(n)]\n ]),\n u(\"span\", Oe, x(v(n)), 1)\n ]),\n u(\"label\", {\n for: e.uuid,\n id: \"checkbox-label\"\n }, x(e.label), 9, Le),\n k(u(\"p\", {\n innerHTML: e.validation.errorMessage\n }, null, 8, Pe), [\n [S, e.validation.errorMessage]\n ])\n ]));\n }\n});\nconst A = (e, t) => {\n const l = e.__vccOpts || e;\n for (const [n, o] of t)\n l[n] = o;\n return l;\n}, He = /* @__PURE__ */ A(Be, [[\"__scopeId\", \"data-v-743cd4db\"]]), qe = /* @__PURE__ */ u(\"div\", null, [\n /* @__PURE__ */ u(\"input\", { type: \"text\" }),\n /* @__PURE__ */ u(\"input\", { type: \"text\" }),\n /* @__PURE__ */ u(\"input\", { type: \"text\" })\n], -1), Fe = /* @__PURE__ */ D({\n __name: \"AComboBox\",\n props: [\"event\", \"cellData\", \"tableID\"],\n setup(e) {\n return (t, l) => {\n const n = ve(\"ATableModal\");\n return f(), B(n, {\n event: e.event,\n cellData: e.cellData,\n class: \"amodal\"\n }, {\n default: ye(() => [\n qe\n ]),\n _: 1\n }, 8, [\"event\", \"cellData\"]);\n };\n }\n}), Ue = [\"id\", \"disabled\", \"required\"], Re = [\"for\"], Ne = [\"innerHTML\"], Qe = /* @__PURE__ */ D({\n __name: \"ADate\",\n props: {\n label: null,\n modelValue: null,\n required: { type: Boolean },\n readonly: { type: Boolean },\n uuid: null,\n validation: { default: () => ({ errorMessage: \" \" }) }\n },\n emits: [\"update:modelValue\"],\n setup(e, { emit: t }) {\n const l = e, n = M({\n get: () => l.modelValue,\n set: (o) => {\n t(\"update:modelValue\", o);\n }\n });\n return (o, a) => (f(), _(\"div\", null, [\n k(u(\"input\", {\n \"onUpdate:modelValue\": a[0] || (a[0] = (s) => P(n) ? n.value = s : null),\n type: \"date\",\n id: e.uuid,\n disabled: e.readonly,\n required: e.required\n }, null, 8, Ue), [\n [H, v(n)]\n ]),\n u(\"label\", { for: e.uuid }, x(e.label), 9, Re),\n k(u(\"p\", {\n innerHTML: e.validation.errorMessage\n }, null, 8, Ne), [\n [S, e.validation.errorMessage]\n ])\n ]));\n }\n});\nconst Ye = /* @__PURE__ */ A(Qe, [[\"__scopeId\", \"data-v-91963706\"]]);\nvar Q;\nconst ae = typeof window < \"u\", je = (e) => typeof e == \"string\", We = () => {\n};\nae && (Q = window == null ? void 0 : window.navigator) != null && Q.userAgent && /iP(ad|hone|od)/.test(window.navigator.userAgent);\nfunction se(e) {\n return typeof e == \"function\" ? e() : v(e);\n}\nfunction Ge(e) {\n return e;\n}\nfunction ze(e) {\n return _e() ? (he(e), !0) : !1;\n}\nfunction L(e) {\n var t;\n const l = se(e);\n return (t = l == null ? void 0 : l.$el) != null ? t : l;\n}\nconst re = ae ? window : void 0;\nfunction Je(...e) {\n let t, l, n, o;\n if (je(e[0]) || Array.isArray(e[0]) ? ([l, n, o] = e, t = re) : [t, l, n, o] = e, !t)\n return We;\n Array.isArray(l) || (l = [l]), Array.isArray(n) || (n = [n]);\n const a = [], s = () => {\n a.forEach((p) => p()), a.length = 0;\n }, r = (p, b, h, d) => (p.addEventListener(b, h, d), () => p.removeEventListener(b, h, d)), i = q(() => [L(t), se(o)], ([p, b]) => {\n s(), p && a.push(...l.flatMap((h) => n.map((d) => r(p, h, d, b))));\n }, { immediate: !0, flush: \"post\" }), c = () => {\n i(), s();\n };\n return ze(c), c;\n}\nconst Y = typeof globalThis < \"u\" ? globalThis : typeof window < \"u\" ? window : typeof global < \"u\" ? global : typeof self < \"u\" ? self : {}, j = \"__vueuse_ssr_handlers__\";\nY[j] = Y[j] || {};\nfunction Ke(e, { window: t = re, scrollTarget: l } = {}) {\n const n = g(!1), o = () => {\n if (!t)\n return;\n const a = t.document, s = L(e);\n if (!s)\n n.value = !1;\n else {\n const r = s.getBoundingClientRect();\n n.value = r.top <= (t.innerHeight || a.documentElement.clientHeight) && r.left <= (t.innerWidth || a.documentElement.clientWidth) && r.bottom >= 0 && r.right >= 0;\n }\n };\n return q(() => L(e), () => o(), { immediate: !0, flush: \"post\" }), t && Je(l || t, \"scroll\", o, {\n capture: !1,\n passive: !0\n }), n;\n}\nvar W;\n(function(e) {\n e.UP = \"UP\", e.RIGHT = \"RIGHT\", e.DOWN = \"DOWN\", e.LEFT = \"LEFT\", e.NONE = \"NONE\";\n})(W || (W = {}));\nvar Xe = Object.defineProperty, G = Object.getOwnPropertySymbols, Ze = Object.prototype.hasOwnProperty, et = Object.prototype.propertyIsEnumerable, z = (e, t, l) => t in e ? Xe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: l }) : e[t] = l, tt = (e, t) => {\n for (var l in t || (t = {}))\n Ze.call(t, l) && z(e, l, t[l]);\n if (G)\n for (var l of G(t))\n et.call(t, l) && z(e, l, t[l]);\n return e;\n};\nconst nt = {\n easeInSine: [0.12, 0, 0.39, 0],\n easeOutSine: [0.61, 1, 0.88, 1],\n easeInOutSine: [0.37, 0, 0.63, 1],\n easeInQuad: [0.11, 0, 0.5, 0],\n easeOutQuad: [0.5, 1, 0.89, 1],\n easeInOutQuad: [0.45, 0, 0.55, 1],\n easeInCubic: [0.32, 0, 0.67, 0],\n easeOutCubic: [0.33, 1, 0.68, 1],\n easeInOutCubic: [0.65, 0, 0.35, 1],\n easeInQuart: [0.5, 0, 0.75, 0],\n easeOutQuart: [0.25, 1, 0.5, 1],\n easeInOutQuart: [0.76, 0, 0.24, 1],\n easeInQuint: [0.64, 0, 0.78, 0],\n easeOutQuint: [0.22, 1, 0.36, 1],\n easeInOutQuint: [0.83, 0, 0.17, 1],\n easeInExpo: [0.7, 0, 0.84, 0],\n easeOutExpo: [0.16, 1, 0.3, 1],\n easeInOutExpo: [0.87, 0, 0.13, 1],\n easeInCirc: [0.55, 0, 1, 0.45],\n easeOutCirc: [0, 0.55, 0.45, 1],\n easeInOutCirc: [0.85, 0, 0.15, 1],\n easeInBack: [0.36, 0, 0.66, -0.56],\n easeOutBack: [0.34, 1.56, 0.64, 1],\n easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\ntt({\n linear: Ge\n}, nt);\nconst w = (e) => {\n let t = Ke(e).value;\n return t = t && e.offsetHeight > 0, t;\n}, E = (e) => e.tabIndex >= 0, J = (e) => {\n const t = e.target;\n return F(t);\n}, F = (e) => {\n var t;\n let l;\n if (e instanceof HTMLTableCellElement) {\n const n = (t = e.parentElement) == null ? void 0 : t.previousElementSibling;\n if (n) {\n const o = Array.from(n.children)[e.cellIndex];\n o && (l = o);\n }\n } else if (e instanceof HTMLTableRowElement) {\n const n = e.previousElementSibling;\n n && (l = n);\n }\n return l && (!E(l) || !w(l)) ? F(l) : l;\n}, lt = (e) => {\n var t;\n const l = e.target;\n let n;\n if (l instanceof HTMLTableCellElement) {\n const o = (t = l.parentElement) == null ? void 0 : t.parentElement;\n if (o) {\n const a = o.firstElementChild.children[l.cellIndex];\n a && (n = a);\n }\n } else if (l instanceof HTMLTableRowElement) {\n const o = l.parentElement;\n if (o) {\n const a = o.firstElementChild;\n a && (n = a);\n }\n }\n return n && (!E(n) || !w(n)) ? U(n) : n;\n}, K = (e) => {\n const t = e.target;\n return U(t);\n}, U = (e) => {\n var t;\n let l;\n if (e instanceof HTMLTableCellElement) {\n const n = (t = e.parentElement) == null ? void 0 : t.nextElementSibling;\n if (n) {\n const o = Array.from(n.children)[e.cellIndex];\n o && (l = o);\n }\n } else if (e instanceof HTMLTableRowElement) {\n const n = e.nextElementSibling;\n n && (l = n);\n }\n return l && (!E(l) || !w(l)) ? U(l) : l;\n}, ot = (e) => {\n var t;\n const l = e.target;\n let n;\n if (l instanceof HTMLTableCellElement) {\n const o = (t = l.parentElement) == null ? void 0 : t.parentElement;\n if (o) {\n const a = o.lastElementChild.children[l.cellIndex];\n a && (n = a);\n }\n } else if (l instanceof HTMLTableRowElement) {\n const o = l.parentElement;\n if (o) {\n const a = o.lastElementChild;\n a && (n = a);\n }\n }\n return n && (!E(n) || !w(n)) ? F(n) : n;\n}, X = (e) => {\n const t = e.target;\n return R(t);\n}, R = (e) => {\n var t;\n let l;\n if (e.previousElementSibling)\n l = e.previousElementSibling;\n else {\n const n = (t = e.parentElement) == null ? void 0 : t.previousElementSibling;\n l = n == null ? void 0 : n.lastElementChild;\n }\n return l && (!E(l) || !w(l)) ? R(l) : l;\n}, Z = (e) => {\n const t = e.target;\n return N(t);\n}, N = (e) => {\n var t;\n let l;\n if (e.nextElementSibling)\n l = e.nextElementSibling;\n else {\n const n = (t = e.parentElement) == null ? void 0 : t.nextElementSibling;\n l = n == null ? void 0 : n.firstElementChild;\n }\n return l && (!E(l) || !w(l)) ? N(l) : l;\n}, ee = (e) => {\n const t = e.target.parentElement.firstElementChild;\n return t && (!E(t) || !w(t)) ? N(t) : t;\n}, te = (e) => {\n const t = e.target.parentElement.lastElementChild;\n return t && (!E(t) || !w(t)) ? R(t) : t;\n}, V = [\"alt\", \"control\", \"shift\", \"meta\"], at = {\n ArrowUp: \"up\",\n ArrowDown: \"down\",\n ArrowLeft: \"left\",\n ArrowRight: \"right\"\n}, ue = {\n \"keydown.up\": (e) => {\n const t = J(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.down\": (e) => {\n const t = K(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.left\": (e) => {\n const t = X(e);\n e.preventDefault(), e.stopPropagation(), t && t.focus();\n },\n \"keydown.right\": (e) => {\n const t = Z(e);\n e.preventDefault(), e.stopPropagation(), t && t.focus();\n },\n \"keydown.control.up\": (e) => {\n const t = lt(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.down\": (e) => {\n const t = ot(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.left\": (e) => {\n const t = ee(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.right\": (e) => {\n const t = te(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.end\": (e) => {\n const t = te(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.enter\": (e) => {\n if (e.target instanceof HTMLTableCellElement) {\n e.preventDefault(), e.stopPropagation();\n const t = K(e);\n t && t.focus();\n }\n },\n \"keydown.shift.enter\": (e) => {\n if (e.target instanceof HTMLTableCellElement) {\n e.preventDefault(), e.stopPropagation();\n const t = J(e);\n t && t.focus();\n }\n },\n \"keydown.home\": (e) => {\n const t = ee(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.tab\": (e) => {\n const t = Z(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.shift.tab\": (e) => {\n const t = X(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n }\n};\nfunction st(e) {\n const t = (n) => {\n let o = null;\n n.parent && (typeof n.parent == \"string\" ? o = document.querySelector(n.parent) : n.parent instanceof Element ? o = n.parent : o = n.parent.value);\n let a = [];\n if (n.selectors)\n if (typeof n.selectors == \"string\")\n a = o ? Array.from(o.querySelectorAll(n.selectors)) : Array.from(document.querySelectorAll(n.selectors));\n else if (n.selectors instanceof Element)\n a.push(n.selectors);\n else if (Array.isArray(n.selectors.value))\n for (const s of n.selectors.value)\n s instanceof Element ? a.push(s) : a.push(s.$el);\n else\n a.push(n.selectors.value);\n else\n a = Array.from(o.children).filter((s) => E(s) && w(s));\n return a;\n }, l = (n) => (o) => {\n const a = at[o.key] || o.key.toLowerCase();\n if (V.includes(a))\n return;\n const s = n.handlers || ue;\n for (const r of Object.keys(s)) {\n const [i, ...c] = r.split(\".\");\n if (i === \"keydown\" && c.includes(a)) {\n const p = s[r], b = c.filter((d) => V.includes(d)), h = V.some((d) => {\n const T = d.charAt(0).toUpperCase() + d.slice(1);\n return o.getModifierState(T);\n });\n if (b.length > 0) {\n if (h) {\n for (const d of V)\n if (c.includes(d)) {\n const T = d.charAt(0).toUpperCase() + d.slice(1);\n o.getModifierState(T) && p(o);\n }\n }\n } else\n h || p(o);\n }\n }\n };\n le(() => {\n for (const n of e) {\n const o = t(n);\n for (const a of o)\n a.addEventListener(\"keydown\", l(n));\n }\n }), ge(() => {\n for (const n of e) {\n const o = t(n);\n for (const a of o)\n a.removeEventListener(\"keydown\", l(n));\n }\n });\n}\nconst rt = (e) => (De(\"data-v-e1d2d140\"), e = e(), we(), e), ut = [\"event\"], it = { colspan: \"5\" }, ct = /* @__PURE__ */ rt(() => /* @__PURE__ */ u(\"tr\", null, [\n /* @__PURE__ */ u(\"td\", null, \"M\"),\n /* @__PURE__ */ u(\"td\", null, \"T\"),\n /* @__PURE__ */ u(\"td\", null, \"W\"),\n /* @__PURE__ */ u(\"td\", null, \"T\"),\n /* @__PURE__ */ u(\"td\", null, \"F\"),\n /* @__PURE__ */ u(\"td\", null, \"S\"),\n /* @__PURE__ */ u(\"td\", null, \"S\")\n], -1)), dt = [\"onClick\"], pt = /* @__PURE__ */ D({\n __name: \"ADatePicker\",\n props: {\n modelValue: null,\n event: null\n },\n emits: [\"update:modelValue\"],\n setup(e, { emit: t }) {\n const l = e, n = 6, o = 7, a = /* @__PURE__ */ new Date(), s = g(l.modelValue ? new Date(l.modelValue) : void 0), r = g(), i = g(), c = g([]);\n le(async () => {\n let m = /* @__PURE__ */ new Date();\n m ? (s.value = m, r.value = s.value.getMonth(), i.value = s.value.getFullYear()) : (r.value = a.getMonth(), i.value = a.getFullYear()), p(), await be();\n const I = document.getElementsByClassName(\"selectedDate\");\n if (I.length > 0)\n I[0].focus();\n else {\n const y = document.getElementsByClassName(\"todaysDate\");\n y.length > 0 && y[0].focus();\n }\n }), q([r, i], () => {\n p();\n });\n const p = () => {\n c.value = [];\n const m = new Date(i.value, r.value, 1), I = m.getDay(), y = m.setDate(m.getDate() - I);\n for (let C of Array(43).keys())\n c.value.push(y + C * 864e5);\n }, b = () => {\n i.value -= 1;\n }, h = () => {\n i.value += 1;\n }, d = () => {\n r.value == 0 ? (r.value = 11, b()) : r.value -= 1;\n }, T = () => {\n r.value == 11 ? (r.value = 0, h()) : r.value += 1;\n }, ce = (m) => {\n if (r.value === a.getMonth())\n return a.toDateString() === new Date(m).toDateString();\n }, de = (m) => new Date(m).toDateString() === new Date(s.value).toDateString(), pe = (m) => {\n s.value = new Date(c.value[m]), t(\"update:modelValue\", s.value.getTime());\n }, fe = M(() => new Date(i.value, r.value, 1).toLocaleDateString(void 0, {\n year: \"numeric\",\n month: \"long\"\n }));\n return st([\n {\n parent: \"table.adate\",\n selectors: \"td\",\n handlers: {\n ...ue,\n \"keydown.pageup\": d,\n \"keydown.shift.pageup\": b,\n \"keydown.pagedown\": T,\n \"keydown.shift.pagedown\": h\n }\n }\n ]), (m, I) => (f(), _(\"div\", {\n event: e.event,\n class: \"adatepicker\",\n tabindex: \"0\",\n ref: \"adatepicker\"\n }, [\n u(\"table\", null, [\n u(\"tr\", null, [\n u(\"td\", {\n onClick: d,\n tabindex: -1\n }, \"<\"),\n u(\"th\", it, x(v(fe)), 1),\n u(\"td\", {\n onClick: T,\n tabindex: -1\n }, \">\")\n ]),\n ct,\n (f(), _($, null, O(n, (y) => u(\"tr\", { key: y }, [\n (f(), _($, null, O(o, (C) => u(\"td\", {\n key: (y - 1) * o + C,\n contenteditable: !1,\n spellcheck: !1,\n tabindex: 0,\n onClick: ke((Lt) => pe((y - 1) * o + C), [\"prevent\", \"stop\"]),\n class: oe({\n todaysDate: ce(c.value[(y - 1) * o + C]),\n selectedDate: de(c.value[(y - 1) * o + C])\n })\n }, x(new Date(c.value[(y - 1) * o + C]).getDate()), 11, dt)), 64))\n ])), 64))\n ])\n ], 8, ut));\n }\n});\nconst ft = /* @__PURE__ */ A(pt, [[\"__scopeId\", \"data-v-e1d2d140\"]]), mt = /* @__PURE__ */ D({\n __name: \"CollapseButton\",\n props: {\n collapsed: { type: Boolean }\n },\n setup(e) {\n return (t, l) => (f(), _(\"button\", {\n class: oe([\"collapse-button\", e.collapsed ? \"rotated\" : \"unrotated\"])\n }, \"×\", 2));\n }\n});\nconst vt = /* @__PURE__ */ A(mt, [[\"__scopeId\", \"data-v-6f1c1b45\"]]), yt = /* @__PURE__ */ D({\n __name: \"AForm\",\n props: {\n modelValue: null,\n data: null,\n readonly: { type: Boolean }\n },\n emits: [\"update:modelValue\"],\n setup(e, { emit: t }) {\n const l = e, n = g(l.data || {}), o = (s) => {\n let r = {};\n for (const [i, c] of Object.entries(s))\n [\"component\", \"fieldtype\"].includes(i) || (r[i] = c), i === \"rows\" && c && c.length === 0 && (r.rows = n.value[s.fieldname]);\n return r;\n }, a = M({\n get: () => l.modelValue.map((s, r) => M({\n get() {\n return s.value;\n },\n set: (i) => {\n l.modelValue[r].value = i, t(\"update:modelValue\", l.modelValue);\n }\n })),\n set: () => {\n }\n });\n return (s, r) => (f(), _(\"form\", null, [\n (f(!0), _($, null, O(e.modelValue, (i, c) => (f(), B(Ee(i.component), xe({\n key: c,\n schema: i,\n modelValue: v(a)[c].value,\n \"onUpdate:modelValue\": (p) => v(a)[c].value = p,\n data: n.value[i.fieldname],\n readonly: e.readonly\n }, o(i)), null, 16, [\"schema\", \"modelValue\", \"onUpdate:modelValue\", \"data\", \"readonly\"]))), 128))\n ]));\n }\n});\nconst ie = /* @__PURE__ */ A(yt, [[\"__scopeId\", \"data-v-74d66cf2\"]]), gt = /* @__PURE__ */ D({\n __name: \"AFieldset\",\n props: {\n schema: null,\n label: null,\n collapsible: { type: Boolean },\n data: null\n },\n setup(e) {\n const t = e, l = g(t.data || []);\n let n = g(!1), o = g(t.collapsible);\n const a = g(t.schema);\n function s(r) {\n r.preventDefault(), o.value && (n.value = !n.value);\n }\n return (r, i) => (f(), _(\"fieldset\", null, [\n u(\"legend\", {\n onClick: s,\n onSubmit: s\n }, [\n Ae(x(e.label) + \" \", 1),\n v(o) ? (f(), B(vt, {\n key: 0,\n collapsed: v(n)\n }, null, 8, [\"collapsed\"])) : Ce(\"\", !0)\n ], 32),\n Me(r.$slots, \"default\", { collapsed: v(n) }, () => [\n k(Te(ie, {\n modelValue: a.value,\n \"onUpdate:modelValue\": i[0] || (i[0] = (c) => a.value = c),\n data: l.value\n }, null, 8, [\"modelValue\", \"data\"]), [\n [S, !v(n)]\n ])\n ], !0)\n ]));\n }\n});\nconst _t = /* @__PURE__ */ A(gt, [[\"__scopeId\", \"data-v-cad9b578\"]]), ht = [\"id\", \"disabled\", \"required\"], bt = [\"for\"], kt = [\"innerHTML\"], Dt = /* @__PURE__ */ D({\n __name: \"ANumericInput\",\n props: {\n label: null,\n modelValue: null,\n required: { type: Boolean },\n readonly: { type: Boolean },\n uuid: null,\n validation: { default: () => ({ errorMessage: \" \" }) }\n },\n emits: [\"update:modelValue\"],\n setup(e, { emit: t }) {\n const l = e, n = M({\n get: () => l.modelValue,\n set: (o) => {\n t(\"update:modelValue\", o);\n }\n });\n return (o, a) => (f(), _(\"div\", null, [\n k(u(\"input\", {\n \"onUpdate:modelValue\": a[0] || (a[0] = (s) => P(n) ? n.value = s : null),\n type: \"number\",\n id: e.uuid,\n disabled: e.readonly,\n required: e.required\n }, null, 8, ht), [\n [H, v(n)]\n ]),\n u(\"label\", { for: e.uuid }, x(e.label), 9, bt),\n k(u(\"p\", {\n innerHTML: e.validation.errorMessage\n }, null, 8, kt), [\n [S, e.validation.errorMessage]\n ])\n ]));\n }\n});\nconst wt = /* @__PURE__ */ A(Dt, [[\"__scopeId\", \"data-v-be33e6c4\"]]), ne = {\n date: \"##/##/####\",\n datetime: \"####/##/## ##:##\",\n time: \"##:##\",\n fulltime: \"##:##:##\",\n phone: \"(###) ### - ####\",\n card: \"#### #### #### ####\"\n};\nfunction Et(e) {\n try {\n return Function(`\"use strict\";return (${e})`)();\n } catch {\n }\n}\nfunction xt(e) {\n var l;\n let t = e.value;\n if (t) {\n const n = Et(t);\n if (n) {\n const o = e.instance.locale;\n t = n(o);\n }\n } else {\n const o = (l = e.instance.schema.fieldtype) == null ? void 0 : l.toLowerCase();\n o && ne[o] && (t = ne[o]);\n }\n return t;\n}\nfunction At(e, t) {\n t || (t = \"#\");\n let l = e;\n const n = [t, \"/\", \"-\", \"(\", \")\", \" \"];\n for (const o of n)\n l = l.replaceAll(o, \"\");\n return l;\n}\nfunction Ct(e, t, l) {\n l || (l = \"#\");\n let n = t;\n for (const o of e) {\n const a = n.indexOf(l);\n if (a !== -1) {\n const s = n.substring(0, a), r = n.substring(a + 1);\n n = s + o + r;\n }\n }\n return n.slice(0, t.length);\n}\nfunction Mt(e, t) {\n const l = xt(t);\n if (!l)\n return;\n const n = \"#\", o = e.value, a = At(o, n);\n if (a) {\n const s = Ct(a, l, n);\n t.instance.maskFilled && (t.instance.maskFilled = !s.includes(n)), e.value = s;\n } else\n e.value = l;\n}\nconst Tt = D({\n name: \"ATextInput\",\n props: {\n schema: {\n type: Object,\n required: !0\n },\n label: {\n type: String,\n required: !0\n },\n modelValue: {\n type: null\n },\n mask: {\n type: String\n },\n required: {\n type: Boolean\n },\n readonly: {\n type: Boolean\n },\n uuid: {\n type: String\n },\n validation: {\n type: Object,\n default: () => ({ errorMessage: \" \" })\n }\n },\n setup(e, t) {\n const l = g(!1), n = Ie(\"locale\", \"\");\n return { inputText: M({\n get() {\n return e.modelValue;\n },\n set(a) {\n t.emit(\"update:modelValue\", a);\n }\n }), locale: n, maskFilled: l };\n },\n directives: {\n mask: Mt\n }\n});\nconst It = [\"id\", \"disabled\", \"maxlength\", \"required\"], St = [\"for\"], Vt = [\"innerHTML\"];\nfunction $t(e, t, l, n, o, a) {\n const s = Se(\"mask\");\n return f(), _(\"div\", null, [\n k(u(\"input\", {\n \"onUpdate:modelValue\": t[0] || (t[0] = (r) => e.inputText = r),\n id: e.uuid,\n disabled: e.readonly,\n maxlength: e.mask ? e.maskFilled && e.mask.length : void 0,\n required: e.required\n }, null, 8, It), [\n [H, e.inputText],\n [s, e.mask]\n ]),\n u(\"label\", { for: e.uuid }, x(e.label), 9, St),\n k(u(\"p\", {\n innerHTML: e.validation.errorMessage\n }, null, 8, Vt), [\n [S, e.validation.errorMessage]\n ])\n ]);\n}\nconst Ot = /* @__PURE__ */ A(Tt, [[\"render\", $t], [\"__scopeId\", \"data-v-76dba9b8\"]]);\nfunction Bt(e) {\n e.component(\"ACheckbox\", He), e.component(\"ACombobox\", Fe), e.component(\"ADate\", Ye), e.component(\"ADatePicker\", ft), e.component(\"AFieldset\", _t), e.component(\"AForm\", ie), e.component(\"ANumericInput\", wt), e.component(\"ATextInput\", Ot);\n}\nexport {\n He as ACheckbox,\n Fe as AComboBox,\n Ye as ADate,\n ft as ADatePicker,\n _t as AFieldset,\n ie as AForm,\n wt as ANumericInput,\n Ot as ATextInput,\n Bt as install\n};\n//# sourceMappingURL=aform.js.map\n","import { effectScope, ref, markRaw, toRaw, getCurrentInstance, inject, watch, unref, reactive, isRef, isReactive, toRef, nextTick, computed, getCurrentScope, onScopeDispose, toRefs, onBeforeMount, shallowRef, defineComponent, h as h$1, provide, watchEffect } from \"vue\";\nclass Stonecrop {\n /**\n * @constructor\n * @param {Registry} registry - The immutable registry\n * @param {ReturnType} store - The mutable Pinia store\n * @param {Schema} [schema] - (optional) The Stonecrop schema\n * @param {ImmutableDoctype['workflow']} [workflow] - (optional) The Stonecrop workflow\n * @param {ImmutableDoctype['actions']} [actions] - (optional) The Stonecrop actions\n * @returns {Stonecrop} The Stonecrop instance\n */\n constructor(registry, store, schema, workflow, actions) {\n this.name = \"Stonecrop\";\n if (Stonecrop._root) {\n return Stonecrop._root;\n }\n Stonecrop._root = this;\n this.registry = registry;\n this.store = store;\n this.schema = schema;\n this.workflow = workflow;\n this.actions = actions;\n }\n /**\n * @method setup\n * @param {DoctypeMeta} doctype - The doctype to setup\n * @returns {void}\n * @description Sets up the Stonecrop instance with the given doctype\n * @example\n * const doctype = await registry.doctypeLoader('Task')\n * stonecrop.setup(doctype)\n */\n setup(doctype) {\n this.getMeta(doctype);\n this.getWorkflow(doctype);\n this.getActions(doctype);\n }\n /**\n * @method getMeta\n * @param {DoctypeMeta} doctype - The doctype to get meta for\n * @returns {void}\n * @description Gets the meta for the given doctype\n * @example\n * const doctype = await registry.doctypeLoader('Task')\n * stonecrop.getMeta(doctype)\n */\n getMeta(doctype) {\n this.schema = { doctype: doctype.doctype, schema: doctype.schema };\n }\n /**\n * @method getWorkflow\n * @param {DoctypeMeta} doctype - The doctype to get workflow for\n * @returns {void}\n * @description Gets the workflow for the given doctype\n * @example\n * const doctype = await registry.doctypeLoader('Task')\n * stonecrop.getWorkflow(doctype)\n */\n getWorkflow(doctype) {\n const doctypeRegistry = this.registry.registry[doctype.slug];\n this.workflow = doctypeRegistry.workflow;\n }\n /**\n * @method getActions\n * @param {DoctypeMeta} doctype - The doctype to get actions for\n * @returns {void}\n * @description Gets the actions for the given doctype\n * @example\n * const doctype = await registry.doctypeLoader('Task')\n * stonecrop.getActions(doctype)\n */\n getActions(doctype) {\n const doctypeRegistry = this.registry.registry[doctype.slug];\n this.actions = doctypeRegistry.actions;\n }\n /**\n * @method getRecords\n * @param {DoctypeMeta} doctype - The doctype to get records for\n * @param {RequestInit} [filters] - The filters to apply to the records\n * @returns {Promise}\n * @description Gets the records for the given doctype\n * @example\n * const doctype = await registry.doctypeLoader('Task')\n * await stonecrop.getRecords(doctype)\n * @example\n * const doctype = await registry.doctypeLoader('Task')\n * const filters = JSON.stringify({ status: 'Open' })\n * await stonecrop.getRecords(doctype, { body: filters })\n */\n async getRecords(doctype, filters) {\n this.store.$patch({ records: [] });\n const records = await fetch(`/${doctype.slug}`, filters);\n const data = await records.json();\n this.store.$patch({ records: data });\n }\n /**\n * @method getRecord\n * @param {DoctypeMeta} doctype - The doctype to get record for\n * @param {string} id - The id of the record to get\n * @returns {Promise}\n * @description Gets the record for the given doctype and id\n * @example\n * const doctype = await registry.doctypeLoader('Task')\n * await stonecrop.getRecord(doctype, 'TASK-00001')\n */\n async getRecord(doctype, id) {\n this.store.$patch({ record: {} });\n const record = await fetch(`/${doctype.slug}/${id}`);\n const data = await record.json();\n this.store.$patch({ record: data });\n }\n /**\n * @method runAction\n * @param {DoctypeMeta} doctype - The doctype to run action for\n * @param {string} action - The action to run\n * @param {string[]} [id] - The id(s) of the record(s) to run action on\n * @returns {void}\n * @description Runs the action for the given doctype and id\n * @example\n * const doctype = await registry.doctypeLoader('Task')\n * stonecrop.runAction(doctype, 'CREATE')\n * @example\n * const doctype = await registry.doctypeLoader('Task')\n * stonecrop.runAction(doctype, 'UPDATE', ['TASK-00001'])\n * @example\n * const doctype = await registry.doctypeLoader('Task')\n * stonecrop.runAction(doctype, 'DELETE', ['TASK-00001'])\n * @example\n * const doctype = await registry.doctypeLoader('Task')\n * stonecrop.runAction(doctype, 'TRANSITION', ['TASK-00001', 'TASK-00002'])\n */\n runAction(doctype, action, id) {\n const doctypeRegistry = this.registry.registry[doctype.slug];\n const actions = doctypeRegistry.actions.get(action);\n const { initialState } = this.workflow;\n this.workflow.transition(initialState, { type: action });\n if (actions.length > 0) {\n actions.forEach((action2) => {\n const actionFn = new Function(action2);\n actionFn(id);\n });\n }\n }\n}\nvar isVue2 = false;\nfunction set(target, key, val) {\n if (Array.isArray(target)) {\n target.length = Math.max(target.length, key);\n target.splice(key, 1, val);\n return val;\n }\n target[key] = val;\n return val;\n}\nfunction del(target, key) {\n if (Array.isArray(target)) {\n target.splice(key, 1);\n return;\n }\n delete target[key];\n}\nfunction getDevtoolsGlobalHook$1() {\n return getTarget$1().__VUE_DEVTOOLS_GLOBAL_HOOK__;\n}\nfunction getTarget$1() {\n return typeof navigator !== \"undefined\" && typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : {};\n}\nconst isProxyAvailable$1 = typeof Proxy === \"function\";\nconst HOOK_SETUP$1 = \"devtools-plugin:setup\";\nconst HOOK_PLUGIN_SETTINGS_SET$1 = \"plugin:settings:set\";\nlet supported$1;\nlet perf$1;\nfunction isPerformanceSupported$1() {\n var _a;\n if (supported$1 !== void 0) {\n return supported$1;\n }\n if (typeof window !== \"undefined\" && window.performance) {\n supported$1 = true;\n perf$1 = window.performance;\n } else if (typeof global !== \"undefined\" && ((_a = global.perf_hooks) === null || _a === void 0 ? void 0 : _a.performance)) {\n supported$1 = true;\n perf$1 = global.perf_hooks.performance;\n } else {\n supported$1 = false;\n }\n return supported$1;\n}\nfunction now$2() {\n return isPerformanceSupported$1() ? perf$1.now() : Date.now();\n}\nlet ApiProxy$1 = class ApiProxy {\n constructor(plugin, hook) {\n this.target = null;\n this.targetQueue = [];\n this.onQueue = [];\n this.plugin = plugin;\n this.hook = hook;\n const defaultSettings = {};\n if (plugin.settings) {\n for (const id in plugin.settings) {\n const item = plugin.settings[id];\n defaultSettings[id] = item.defaultValue;\n }\n }\n const localSettingsSaveId = `__vue-devtools-plugin-settings__${plugin.id}`;\n let currentSettings = Object.assign({}, defaultSettings);\n try {\n const raw = localStorage.getItem(localSettingsSaveId);\n const data = JSON.parse(raw);\n Object.assign(currentSettings, data);\n } catch (e) {\n }\n this.fallbacks = {\n getSettings() {\n return currentSettings;\n },\n setSettings(value) {\n try {\n localStorage.setItem(localSettingsSaveId, JSON.stringify(value));\n } catch (e) {\n }\n currentSettings = value;\n },\n now() {\n return now$2();\n }\n };\n if (hook) {\n hook.on(HOOK_PLUGIN_SETTINGS_SET$1, (pluginId, value) => {\n if (pluginId === this.plugin.id) {\n this.fallbacks.setSettings(value);\n }\n });\n }\n this.proxiedOn = new Proxy({}, {\n get: (_target, prop) => {\n if (this.target) {\n return this.target.on[prop];\n } else {\n return (...args) => {\n this.onQueue.push({\n method: prop,\n args\n });\n };\n }\n }\n });\n this.proxiedTarget = new Proxy({}, {\n get: (_target, prop) => {\n if (this.target) {\n return this.target[prop];\n } else if (prop === \"on\") {\n return this.proxiedOn;\n } else if (Object.keys(this.fallbacks).includes(prop)) {\n return (...args) => {\n this.targetQueue.push({\n method: prop,\n args,\n resolve: () => {\n }\n });\n return this.fallbacks[prop](...args);\n };\n } else {\n return (...args) => {\n return new Promise((resolve) => {\n this.targetQueue.push({\n method: prop,\n args,\n resolve\n });\n });\n };\n }\n }\n });\n }\n async setRealTarget(target) {\n this.target = target;\n for (const item of this.onQueue) {\n this.target.on[item.method](...item.args);\n }\n for (const item of this.targetQueue) {\n item.resolve(await this.target[item.method](...item.args));\n }\n }\n};\nfunction setupDevtoolsPlugin$1(pluginDescriptor, setupFn) {\n const descriptor = pluginDescriptor;\n const target = getTarget$1();\n const hook = getDevtoolsGlobalHook$1();\n const enableProxy = isProxyAvailable$1 && descriptor.enableEarlyProxy;\n if (hook && (target.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !enableProxy)) {\n hook.emit(HOOK_SETUP$1, pluginDescriptor, setupFn);\n } else {\n const proxy = enableProxy ? new ApiProxy$1(descriptor, hook) : null;\n const list = target.__VUE_DEVTOOLS_PLUGINS__ = target.__VUE_DEVTOOLS_PLUGINS__ || [];\n list.push({\n pluginDescriptor: descriptor,\n setupFn,\n proxy\n });\n if (proxy)\n setupFn(proxy.proxiedTarget);\n }\n}\n/*!\n * pinia v2.0.33\n * (c) 2023 Eduardo San Martin Morote\n * @license MIT\n */\nlet activePinia;\nconst setActivePinia = (pinia2) => activePinia = pinia2;\nconst piniaSymbol = process.env.NODE_ENV !== \"production\" ? Symbol(\"pinia\") : (\n /* istanbul ignore next */\n Symbol()\n);\nfunction isPlainObject(o) {\n return o && typeof o === \"object\" && Object.prototype.toString.call(o) === \"[object Object]\" && typeof o.toJSON !== \"function\";\n}\nvar MutationType;\n(function(MutationType2) {\n MutationType2[\"direct\"] = \"direct\";\n MutationType2[\"patchObject\"] = \"patch object\";\n MutationType2[\"patchFunction\"] = \"patch function\";\n})(MutationType || (MutationType = {}));\nconst IS_CLIENT = typeof window !== \"undefined\";\nconst USE_DEVTOOLS = (process.env.NODE_ENV !== \"production\" || false) && !(process.env.NODE_ENV === \"test\") && IS_CLIENT;\nconst _global = /* @__PURE__ */ (() => typeof window === \"object\" && window.window === window ? window : typeof self === \"object\" && self.self === self ? self : typeof global === \"object\" && global.global === global ? global : typeof globalThis === \"object\" ? globalThis : { HTMLElement: null })();\nfunction bom(blob, { autoBom = false } = {}) {\n if (autoBom && /^\\s*(?:text\\/\\S*|application\\/xml|\\S*\\/\\S*\\+xml)\\s*;.*charset\\s*=\\s*utf-8/i.test(blob.type)) {\n return new Blob([String.fromCharCode(65279), blob], { type: blob.type });\n }\n return blob;\n}\nfunction download(url, name, opts) {\n const xhr = new XMLHttpRequest();\n xhr.open(\"GET\", url);\n xhr.responseType = \"blob\";\n xhr.onload = function() {\n saveAs(xhr.response, name, opts);\n };\n xhr.onerror = function() {\n console.error(\"could not download file\");\n };\n xhr.send();\n}\nfunction corsEnabled(url) {\n const xhr = new XMLHttpRequest();\n xhr.open(\"HEAD\", url, false);\n try {\n xhr.send();\n } catch (e) {\n }\n return xhr.status >= 200 && xhr.status <= 299;\n}\nfunction click(node) {\n try {\n node.dispatchEvent(new MouseEvent(\"click\"));\n } catch (e) {\n const evt = document.createEvent(\"MouseEvents\");\n evt.initMouseEvent(\"click\", true, true, window, 0, 0, 0, 80, 20, false, false, false, false, 0, null);\n node.dispatchEvent(evt);\n }\n}\nconst _navigator = typeof navigator === \"object\" ? navigator : { userAgent: \"\" };\nconst isMacOSWebView = /* @__PURE__ */ (() => /Macintosh/.test(_navigator.userAgent) && /AppleWebKit/.test(_navigator.userAgent) && !/Safari/.test(_navigator.userAgent))();\nconst saveAs = !IS_CLIENT ? () => {\n} : (\n // Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program\n typeof HTMLAnchorElement !== \"undefined\" && \"download\" in HTMLAnchorElement.prototype && !isMacOSWebView ? downloadSaveAs : (\n // Use msSaveOrOpenBlob as a second approach\n \"msSaveOrOpenBlob\" in _navigator ? msSaveAs : (\n // Fallback to using FileReader and a popup\n fileSaverSaveAs\n )\n )\n);\nfunction downloadSaveAs(blob, name = \"download\", opts) {\n const a = document.createElement(\"a\");\n a.download = name;\n a.rel = \"noopener\";\n if (typeof blob === \"string\") {\n a.href = blob;\n if (a.origin !== location.origin) {\n if (corsEnabled(a.href)) {\n download(blob, name, opts);\n } else {\n a.target = \"_blank\";\n click(a);\n }\n } else {\n click(a);\n }\n } else {\n a.href = URL.createObjectURL(blob);\n setTimeout(function() {\n URL.revokeObjectURL(a.href);\n }, 4e4);\n setTimeout(function() {\n click(a);\n }, 0);\n }\n}\nfunction msSaveAs(blob, name = \"download\", opts) {\n if (typeof blob === \"string\") {\n if (corsEnabled(blob)) {\n download(blob, name, opts);\n } else {\n const a = document.createElement(\"a\");\n a.href = blob;\n a.target = \"_blank\";\n setTimeout(function() {\n click(a);\n });\n }\n } else {\n navigator.msSaveOrOpenBlob(bom(blob, opts), name);\n }\n}\nfunction fileSaverSaveAs(blob, name, opts, popup) {\n popup = popup || open(\"\", \"_blank\");\n if (popup) {\n popup.document.title = popup.document.body.innerText = \"downloading...\";\n }\n if (typeof blob === \"string\")\n return download(blob, name, opts);\n const force = blob.type === \"application/octet-stream\";\n const isSafari = /constructor/i.test(String(_global.HTMLElement)) || \"safari\" in _global;\n const isChromeIOS = /CriOS\\/[\\d]+/.test(navigator.userAgent);\n if ((isChromeIOS || force && isSafari || isMacOSWebView) && typeof FileReader !== \"undefined\") {\n const reader = new FileReader();\n reader.onloadend = function() {\n let url = reader.result;\n if (typeof url !== \"string\") {\n popup = null;\n throw new Error(\"Wrong reader.result type\");\n }\n url = isChromeIOS ? url : url.replace(/^data:[^;]*;/, \"data:attachment/file;\");\n if (popup) {\n popup.location.href = url;\n } else {\n location.assign(url);\n }\n popup = null;\n };\n reader.readAsDataURL(blob);\n } else {\n const url = URL.createObjectURL(blob);\n if (popup)\n popup.location.assign(url);\n else\n location.href = url;\n popup = null;\n setTimeout(function() {\n URL.revokeObjectURL(url);\n }, 4e4);\n }\n}\nfunction toastMessage(message, type2) {\n const piniaMessage = \"🍍 \" + message;\n if (typeof __VUE_DEVTOOLS_TOAST__ === \"function\") {\n __VUE_DEVTOOLS_TOAST__(piniaMessage, type2);\n } else if (type2 === \"error\") {\n console.error(piniaMessage);\n } else if (type2 === \"warn\") {\n console.warn(piniaMessage);\n } else {\n console.log(piniaMessage);\n }\n}\nfunction isPinia(o) {\n return \"_a\" in o && \"install\" in o;\n}\nfunction checkClipboardAccess() {\n if (!(\"clipboard\" in navigator)) {\n toastMessage(`Your browser doesn't support the Clipboard API`, \"error\");\n return true;\n }\n}\nfunction checkNotFocusedError(error) {\n if (error instanceof Error && error.message.toLowerCase().includes(\"document is not focused\")) {\n toastMessage('You need to activate the \"Emulate a focused page\" setting in the \"Rendering\" panel of devtools.', \"warn\");\n return true;\n }\n return false;\n}\nasync function actionGlobalCopyState(pinia2) {\n if (checkClipboardAccess())\n return;\n try {\n await navigator.clipboard.writeText(JSON.stringify(pinia2.state.value));\n toastMessage(\"Global state copied to clipboard.\");\n } catch (error) {\n if (checkNotFocusedError(error))\n return;\n toastMessage(`Failed to serialize the state. Check the console for more details.`, \"error\");\n console.error(error);\n }\n}\nasync function actionGlobalPasteState(pinia2) {\n if (checkClipboardAccess())\n return;\n try {\n pinia2.state.value = JSON.parse(await navigator.clipboard.readText());\n toastMessage(\"Global state pasted from clipboard.\");\n } catch (error) {\n if (checkNotFocusedError(error))\n return;\n toastMessage(`Failed to deserialize the state from clipboard. Check the console for more details.`, \"error\");\n console.error(error);\n }\n}\nasync function actionGlobalSaveState(pinia2) {\n try {\n saveAs(new Blob([JSON.stringify(pinia2.state.value)], {\n type: \"text/plain;charset=utf-8\"\n }), \"pinia-state.json\");\n } catch (error) {\n toastMessage(`Failed to export the state as JSON. Check the console for more details.`, \"error\");\n console.error(error);\n }\n}\nlet fileInput;\nfunction getFileOpener() {\n if (!fileInput) {\n fileInput = document.createElement(\"input\");\n fileInput.type = \"file\";\n fileInput.accept = \".json\";\n }\n function openFile() {\n return new Promise((resolve, reject) => {\n fileInput.onchange = async () => {\n const files = fileInput.files;\n if (!files)\n return resolve(null);\n const file = files.item(0);\n if (!file)\n return resolve(null);\n return resolve({ text: await file.text(), file });\n };\n fileInput.oncancel = () => resolve(null);\n fileInput.onerror = reject;\n fileInput.click();\n });\n }\n return openFile;\n}\nasync function actionGlobalOpenStateFile(pinia2) {\n try {\n const open2 = await getFileOpener();\n const result = await open2();\n if (!result)\n return;\n const { text, file } = result;\n pinia2.state.value = JSON.parse(text);\n toastMessage(`Global state imported from \"${file.name}\".`);\n } catch (error) {\n toastMessage(`Failed to export the state as JSON. Check the console for more details.`, \"error\");\n console.error(error);\n }\n}\nfunction formatDisplay$1(display) {\n return {\n _custom: {\n display\n }\n };\n}\nconst PINIA_ROOT_LABEL = \"🍍 Pinia (root)\";\nconst PINIA_ROOT_ID = \"_root\";\nfunction formatStoreForInspectorTree(store) {\n return isPinia(store) ? {\n id: PINIA_ROOT_ID,\n label: PINIA_ROOT_LABEL\n } : {\n id: store.$id,\n label: store.$id\n };\n}\nfunction formatStoreForInspectorState(store) {\n if (isPinia(store)) {\n const storeNames = Array.from(store._s.keys());\n const storeMap = store._s;\n const state2 = {\n state: storeNames.map((storeId) => ({\n editable: true,\n key: storeId,\n value: store.state.value[storeId]\n })),\n getters: storeNames.filter((id) => storeMap.get(id)._getters).map((id) => {\n const store2 = storeMap.get(id);\n return {\n editable: false,\n key: id,\n value: store2._getters.reduce((getters, key) => {\n getters[key] = store2[key];\n return getters;\n }, {})\n };\n })\n };\n return state2;\n }\n const state = {\n state: Object.keys(store.$state).map((key) => ({\n editable: true,\n key,\n value: store.$state[key]\n }))\n };\n if (store._getters && store._getters.length) {\n state.getters = store._getters.map((getterName) => ({\n editable: false,\n key: getterName,\n value: store[getterName]\n }));\n }\n if (store._customProperties.size) {\n state.customProperties = Array.from(store._customProperties).map((key) => ({\n editable: true,\n key,\n value: store[key]\n }));\n }\n return state;\n}\nfunction formatEventData(events) {\n if (!events)\n return {};\n if (Array.isArray(events)) {\n return events.reduce((data, event) => {\n data.keys.push(event.key);\n data.operations.push(event.type);\n data.oldValue[event.key] = event.oldValue;\n data.newValue[event.key] = event.newValue;\n return data;\n }, {\n oldValue: {},\n keys: [],\n operations: [],\n newValue: {}\n });\n } else {\n return {\n operation: formatDisplay$1(events.type),\n key: formatDisplay$1(events.key),\n oldValue: events.oldValue,\n newValue: events.newValue\n };\n }\n}\nfunction formatMutationType(type2) {\n switch (type2) {\n case MutationType.direct:\n return \"mutation\";\n case MutationType.patchFunction:\n return \"$patch\";\n case MutationType.patchObject:\n return \"$patch\";\n default:\n return \"unknown\";\n }\n}\nlet isTimelineActive = true;\nconst componentStateTypes = [];\nconst MUTATIONS_LAYER_ID = \"pinia:mutations\";\nconst INSPECTOR_ID = \"pinia\";\nconst { assign: assign$1 } = Object;\nconst getStoreType = (id) => \"🍍 \" + id;\nfunction registerPiniaDevtools(app, pinia2) {\n setupDevtoolsPlugin$1({\n id: \"dev.esm.pinia\",\n label: \"Pinia 🍍\",\n logo: \"https://pinia.vuejs.org/logo.svg\",\n packageName: \"pinia\",\n homepage: \"https://pinia.vuejs.org\",\n componentStateTypes,\n app\n }, (api) => {\n if (typeof api.now !== \"function\") {\n toastMessage(\"You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html.\");\n }\n api.addTimelineLayer({\n id: MUTATIONS_LAYER_ID,\n label: `Pinia 🍍`,\n color: 15064968\n });\n api.addInspector({\n id: INSPECTOR_ID,\n label: \"Pinia 🍍\",\n icon: \"storage\",\n treeFilterPlaceholder: \"Search stores\",\n actions: [\n {\n icon: \"content_copy\",\n action: () => {\n actionGlobalCopyState(pinia2);\n },\n tooltip: \"Serialize and copy the state\"\n },\n {\n icon: \"content_paste\",\n action: async () => {\n await actionGlobalPasteState(pinia2);\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n },\n tooltip: \"Replace the state with the content of your clipboard\"\n },\n {\n icon: \"save\",\n action: () => {\n actionGlobalSaveState(pinia2);\n },\n tooltip: \"Save the state as a JSON file\"\n },\n {\n icon: \"folder_open\",\n action: async () => {\n await actionGlobalOpenStateFile(pinia2);\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n },\n tooltip: \"Import the state from a JSON file\"\n }\n ],\n nodeActions: [\n {\n icon: \"restore\",\n tooltip: \"Reset the state (option store only)\",\n action: (nodeId) => {\n const store = pinia2._s.get(nodeId);\n if (!store) {\n toastMessage(`Cannot reset \"${nodeId}\" store because it wasn't found.`, \"warn\");\n } else if (!store._isOptionsAPI) {\n toastMessage(`Cannot reset \"${nodeId}\" store because it's a setup store.`, \"warn\");\n } else {\n store.$reset();\n toastMessage(`Store \"${nodeId}\" reset.`);\n }\n }\n }\n ]\n });\n api.on.inspectComponent((payload, ctx) => {\n const proxy = payload.componentInstance && payload.componentInstance.proxy;\n if (proxy && proxy._pStores) {\n const piniaStores = payload.componentInstance.proxy._pStores;\n Object.values(piniaStores).forEach((store) => {\n payload.instanceData.state.push({\n type: getStoreType(store.$id),\n key: \"state\",\n editable: true,\n value: store._isOptionsAPI ? {\n _custom: {\n value: toRaw(store.$state),\n actions: [\n {\n icon: \"restore\",\n tooltip: \"Reset the state of this store\",\n action: () => store.$reset()\n }\n ]\n }\n } : (\n // NOTE: workaround to unwrap transferred refs\n Object.keys(store.$state).reduce((state, key) => {\n state[key] = store.$state[key];\n return state;\n }, {})\n )\n });\n if (store._getters && store._getters.length) {\n payload.instanceData.state.push({\n type: getStoreType(store.$id),\n key: \"getters\",\n editable: false,\n value: store._getters.reduce((getters, key) => {\n try {\n getters[key] = store[key];\n } catch (error) {\n getters[key] = error;\n }\n return getters;\n }, {})\n });\n }\n });\n }\n });\n api.on.getInspectorTree((payload) => {\n if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {\n let stores = [pinia2];\n stores = stores.concat(Array.from(pinia2._s.values()));\n payload.rootNodes = (payload.filter ? stores.filter((store) => \"$id\" in store ? store.$id.toLowerCase().includes(payload.filter.toLowerCase()) : PINIA_ROOT_LABEL.toLowerCase().includes(payload.filter.toLowerCase())) : stores).map(formatStoreForInspectorTree);\n }\n });\n api.on.getInspectorState((payload) => {\n if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {\n const inspectedStore = payload.nodeId === PINIA_ROOT_ID ? pinia2 : pinia2._s.get(payload.nodeId);\n if (!inspectedStore) {\n return;\n }\n if (inspectedStore) {\n payload.state = formatStoreForInspectorState(inspectedStore);\n }\n }\n });\n api.on.editInspectorState((payload, ctx) => {\n if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {\n const inspectedStore = payload.nodeId === PINIA_ROOT_ID ? pinia2 : pinia2._s.get(payload.nodeId);\n if (!inspectedStore) {\n return toastMessage(`store \"${payload.nodeId}\" not found`, \"error\");\n }\n const { path } = payload;\n if (!isPinia(inspectedStore)) {\n if (path.length !== 1 || !inspectedStore._customProperties.has(path[0]) || path[0] in inspectedStore.$state) {\n path.unshift(\"$state\");\n }\n } else {\n path.unshift(\"state\");\n }\n isTimelineActive = false;\n payload.set(inspectedStore, path, payload.state.value);\n isTimelineActive = true;\n }\n });\n api.on.editComponentState((payload) => {\n if (payload.type.startsWith(\"🍍\")) {\n const storeId = payload.type.replace(/^🍍\\s*/, \"\");\n const store = pinia2._s.get(storeId);\n if (!store) {\n return toastMessage(`store \"${storeId}\" not found`, \"error\");\n }\n const { path } = payload;\n if (path[0] !== \"state\") {\n return toastMessage(`Invalid path for store \"${storeId}\":\n${path}\nOnly state can be modified.`);\n }\n path[0] = \"$state\";\n isTimelineActive = false;\n payload.set(store, path, payload.state.value);\n isTimelineActive = true;\n }\n });\n });\n}\nfunction addStoreToDevtools(app, store) {\n if (!componentStateTypes.includes(getStoreType(store.$id))) {\n componentStateTypes.push(getStoreType(store.$id));\n }\n setupDevtoolsPlugin$1({\n id: \"dev.esm.pinia\",\n label: \"Pinia 🍍\",\n logo: \"https://pinia.vuejs.org/logo.svg\",\n packageName: \"pinia\",\n homepage: \"https://pinia.vuejs.org\",\n componentStateTypes,\n app,\n settings: {\n logStoreChanges: {\n label: \"Notify about new/deleted stores\",\n type: \"boolean\",\n defaultValue: true\n }\n // useEmojis: {\n // label: 'Use emojis in messages ⚡️',\n // type: 'boolean',\n // defaultValue: true,\n // },\n }\n }, (api) => {\n const now2 = typeof api.now === \"function\" ? api.now.bind(api) : Date.now;\n store.$onAction(({ after, onError, name, args }) => {\n const groupId = runningActionId++;\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now2(),\n title: \"🛫 \" + name,\n subtitle: \"start\",\n data: {\n store: formatDisplay$1(store.$id),\n action: formatDisplay$1(name),\n args\n },\n groupId\n }\n });\n after((result) => {\n activeAction = void 0;\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now2(),\n title: \"🛬 \" + name,\n subtitle: \"end\",\n data: {\n store: formatDisplay$1(store.$id),\n action: formatDisplay$1(name),\n args,\n result\n },\n groupId\n }\n });\n });\n onError((error) => {\n activeAction = void 0;\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now2(),\n logType: \"error\",\n title: \"💥 \" + name,\n subtitle: \"end\",\n data: {\n store: formatDisplay$1(store.$id),\n action: formatDisplay$1(name),\n args,\n error\n },\n groupId\n }\n });\n });\n }, true);\n store._customProperties.forEach((name) => {\n watch(() => unref(store[name]), (newValue, oldValue) => {\n api.notifyComponentUpdate();\n api.sendInspectorState(INSPECTOR_ID);\n if (isTimelineActive) {\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now2(),\n title: \"Change\",\n subtitle: name,\n data: {\n newValue,\n oldValue\n },\n groupId: activeAction\n }\n });\n }\n }, { deep: true });\n });\n store.$subscribe(({ events, type: type2 }, state) => {\n api.notifyComponentUpdate();\n api.sendInspectorState(INSPECTOR_ID);\n if (!isTimelineActive)\n return;\n const eventData = {\n time: now2(),\n title: formatMutationType(type2),\n data: assign$1({ store: formatDisplay$1(store.$id) }, formatEventData(events)),\n groupId: activeAction\n };\n activeAction = void 0;\n if (type2 === MutationType.patchFunction) {\n eventData.subtitle = \"⤵️\";\n } else if (type2 === MutationType.patchObject) {\n eventData.subtitle = \"🧩\";\n } else if (events && !Array.isArray(events)) {\n eventData.subtitle = events.type;\n }\n if (events) {\n eventData.data[\"rawEvent(s)\"] = {\n _custom: {\n display: \"DebuggerEvent\",\n type: \"object\",\n tooltip: \"raw DebuggerEvent[]\",\n value: events\n }\n };\n }\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: eventData\n });\n }, { detached: true, flush: \"sync\" });\n const hotUpdate = store._hotUpdate;\n store._hotUpdate = markRaw((newStore) => {\n hotUpdate(newStore);\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now2(),\n title: \"🔥 \" + store.$id,\n subtitle: \"HMR update\",\n data: {\n store: formatDisplay$1(store.$id),\n info: formatDisplay$1(`HMR update`)\n }\n }\n });\n api.notifyComponentUpdate();\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n });\n const { $dispose } = store;\n store.$dispose = () => {\n $dispose();\n api.notifyComponentUpdate();\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n api.getSettings().logStoreChanges && toastMessage(`Disposed \"${store.$id}\" store 🗑`);\n };\n api.notifyComponentUpdate();\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n api.getSettings().logStoreChanges && toastMessage(`\"${store.$id}\" store installed 🆕`);\n });\n}\nlet runningActionId = 0;\nlet activeAction;\nfunction patchActionForGrouping(store, actionNames) {\n const actions = actionNames.reduce((storeActions, actionName) => {\n storeActions[actionName] = toRaw(store)[actionName];\n return storeActions;\n }, {});\n for (const actionName in actions) {\n store[actionName] = function() {\n const _actionId = runningActionId;\n const trackedStore = new Proxy(store, {\n get(...args) {\n activeAction = _actionId;\n return Reflect.get(...args);\n },\n set(...args) {\n activeAction = _actionId;\n return Reflect.set(...args);\n }\n });\n return actions[actionName].apply(trackedStore, arguments);\n };\n }\n}\nfunction devtoolsPlugin({ app, store, options }) {\n if (store.$id.startsWith(\"__hot:\")) {\n return;\n }\n if (options.state) {\n store._isOptionsAPI = true;\n }\n if (typeof options.state === \"function\") {\n patchActionForGrouping(\n // @ts-expect-error: can cast the store...\n store,\n Object.keys(options.actions)\n );\n const originalHotUpdate = store._hotUpdate;\n toRaw(store)._hotUpdate = function(newStore) {\n originalHotUpdate.apply(this, arguments);\n patchActionForGrouping(store, Object.keys(newStore._hmrPayload.actions));\n };\n }\n addStoreToDevtools(\n app,\n // FIXME: is there a way to allow the assignment from Store to StoreGeneric?\n store\n );\n}\nfunction createPinia() {\n const scope = effectScope(true);\n const state = scope.run(() => ref({}));\n let _p = [];\n let toBeInstalled = [];\n const pinia2 = markRaw({\n install(app) {\n setActivePinia(pinia2);\n {\n pinia2._a = app;\n app.provide(piniaSymbol, pinia2);\n app.config.globalProperties.$pinia = pinia2;\n if (USE_DEVTOOLS) {\n registerPiniaDevtools(app, pinia2);\n }\n toBeInstalled.forEach((plugin) => _p.push(plugin));\n toBeInstalled = [];\n }\n },\n use(plugin) {\n if (!this._a && !isVue2) {\n toBeInstalled.push(plugin);\n } else {\n _p.push(plugin);\n }\n return this;\n },\n _p,\n // it's actually undefined here\n // @ts-expect-error\n _a: null,\n _e: scope,\n _s: /* @__PURE__ */ new Map(),\n state\n });\n if (USE_DEVTOOLS && typeof Proxy !== \"undefined\") {\n pinia2.use(devtoolsPlugin);\n }\n return pinia2;\n}\nfunction patchObject(newState, oldState) {\n for (const key in oldState) {\n const subPatch = oldState[key];\n if (!(key in newState)) {\n continue;\n }\n const targetValue = newState[key];\n if (isPlainObject(targetValue) && isPlainObject(subPatch) && !isRef(subPatch) && !isReactive(subPatch)) {\n newState[key] = patchObject(targetValue, subPatch);\n } else {\n {\n newState[key] = subPatch;\n }\n }\n }\n return newState;\n}\nconst noop$1 = () => {\n};\nfunction addSubscription(subscriptions, callback, detached, onCleanup = noop$1) {\n subscriptions.push(callback);\n const removeSubscription = () => {\n const idx = subscriptions.indexOf(callback);\n if (idx > -1) {\n subscriptions.splice(idx, 1);\n onCleanup();\n }\n };\n if (!detached && getCurrentScope()) {\n onScopeDispose(removeSubscription);\n }\n return removeSubscription;\n}\nfunction triggerSubscriptions(subscriptions, ...args) {\n subscriptions.slice().forEach((callback) => {\n callback(...args);\n });\n}\nfunction mergeReactiveObjects(target, patchToApply) {\n if (target instanceof Map && patchToApply instanceof Map) {\n patchToApply.forEach((value, key) => target.set(key, value));\n }\n if (target instanceof Set && patchToApply instanceof Set) {\n patchToApply.forEach(target.add, target);\n }\n for (const key in patchToApply) {\n if (!patchToApply.hasOwnProperty(key))\n continue;\n const subPatch = patchToApply[key];\n const targetValue = target[key];\n if (isPlainObject(targetValue) && isPlainObject(subPatch) && target.hasOwnProperty(key) && !isRef(subPatch) && !isReactive(subPatch)) {\n target[key] = mergeReactiveObjects(targetValue, subPatch);\n } else {\n target[key] = subPatch;\n }\n }\n return target;\n}\nconst skipHydrateSymbol = process.env.NODE_ENV !== \"production\" ? Symbol(\"pinia:skipHydration\") : (\n /* istanbul ignore next */\n Symbol()\n);\nfunction shouldHydrate(obj) {\n return !isPlainObject(obj) || !obj.hasOwnProperty(skipHydrateSymbol);\n}\nconst { assign: assign$2 } = Object;\nfunction isComputed(o) {\n return !!(isRef(o) && o.effect);\n}\nfunction createOptionsStore(id, options, pinia2, hot) {\n const { state, actions, getters } = options;\n const initialState = pinia2.state.value[id];\n let store;\n function setup() {\n if (!initialState && (!(process.env.NODE_ENV !== \"production\") || !hot)) {\n {\n pinia2.state.value[id] = state ? state() : {};\n }\n }\n const localState = process.env.NODE_ENV !== \"production\" && hot ? (\n // use ref() to unwrap refs inside state TODO: check if this is still necessary\n toRefs(ref(state ? state() : {}).value)\n ) : toRefs(pinia2.state.value[id]);\n return assign$2(localState, actions, Object.keys(getters || {}).reduce((computedGetters, name) => {\n if (process.env.NODE_ENV !== \"production\" && name in localState) {\n console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with \"${name}\" in store \"${id}\".`);\n }\n computedGetters[name] = markRaw(computed(() => {\n setActivePinia(pinia2);\n const store2 = pinia2._s.get(id);\n return getters[name].call(store2, store2);\n }));\n return computedGetters;\n }, {}));\n }\n store = createSetupStore(id, setup, options, pinia2, hot, true);\n return store;\n}\nfunction createSetupStore($id, setup, options = {}, pinia2, hot, isOptionsStore) {\n let scope;\n const optionsForPlugin = assign$2({ actions: {} }, options);\n if (process.env.NODE_ENV !== \"production\" && !pinia2._e.active) {\n throw new Error(\"Pinia destroyed\");\n }\n const $subscribeOptions = {\n deep: true\n // flush: 'post',\n };\n if (process.env.NODE_ENV !== \"production\" && !isVue2) {\n $subscribeOptions.onTrigger = (event) => {\n if (isListening) {\n debuggerEvents = event;\n } else if (isListening == false && !store._hotUpdating) {\n if (Array.isArray(debuggerEvents)) {\n debuggerEvents.push(event);\n } else {\n console.error(\"🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug.\");\n }\n }\n };\n }\n let isListening;\n let isSyncListening;\n let subscriptions = markRaw([]);\n let actionSubscriptions = markRaw([]);\n let debuggerEvents;\n const initialState = pinia2.state.value[$id];\n if (!isOptionsStore && !initialState && (!(process.env.NODE_ENV !== \"production\") || !hot)) {\n {\n pinia2.state.value[$id] = {};\n }\n }\n const hotState = ref({});\n let activeListener;\n function $patch(partialStateOrMutator) {\n let subscriptionMutation;\n isListening = isSyncListening = false;\n if (process.env.NODE_ENV !== \"production\") {\n debuggerEvents = [];\n }\n if (typeof partialStateOrMutator === \"function\") {\n partialStateOrMutator(pinia2.state.value[$id]);\n subscriptionMutation = {\n type: MutationType.patchFunction,\n storeId: $id,\n events: debuggerEvents\n };\n } else {\n mergeReactiveObjects(pinia2.state.value[$id], partialStateOrMutator);\n subscriptionMutation = {\n type: MutationType.patchObject,\n payload: partialStateOrMutator,\n storeId: $id,\n events: debuggerEvents\n };\n }\n const myListenerId = activeListener = Symbol();\n nextTick().then(() => {\n if (activeListener === myListenerId) {\n isListening = true;\n }\n });\n isSyncListening = true;\n triggerSubscriptions(subscriptions, subscriptionMutation, pinia2.state.value[$id]);\n }\n const $reset = isOptionsStore ? function $reset2() {\n const { state } = options;\n const newState = state ? state() : {};\n this.$patch(($state) => {\n assign$2($state, newState);\n });\n } : (\n /* istanbul ignore next */\n process.env.NODE_ENV !== \"production\" ? () => {\n throw new Error(`🍍: Store \"${$id}\" is built using the setup syntax and does not implement $reset().`);\n } : noop$1\n );\n function $dispose() {\n scope.stop();\n subscriptions = [];\n actionSubscriptions = [];\n pinia2._s.delete($id);\n }\n function wrapAction(name, action) {\n return function() {\n setActivePinia(pinia2);\n const args = Array.from(arguments);\n const afterCallbackList = [];\n const onErrorCallbackList = [];\n function after(callback) {\n afterCallbackList.push(callback);\n }\n function onError(callback) {\n onErrorCallbackList.push(callback);\n }\n triggerSubscriptions(actionSubscriptions, {\n args,\n name,\n store,\n after,\n onError\n });\n let ret;\n try {\n ret = action.apply(this && this.$id === $id ? this : store, args);\n } catch (error) {\n triggerSubscriptions(onErrorCallbackList, error);\n throw error;\n }\n if (ret instanceof Promise) {\n return ret.then((value) => {\n triggerSubscriptions(afterCallbackList, value);\n return value;\n }).catch((error) => {\n triggerSubscriptions(onErrorCallbackList, error);\n return Promise.reject(error);\n });\n }\n triggerSubscriptions(afterCallbackList, ret);\n return ret;\n };\n }\n const _hmrPayload = /* @__PURE__ */ markRaw({\n actions: {},\n getters: {},\n state: [],\n hotState\n });\n const partialStore = {\n _p: pinia2,\n // _s: scope,\n $id,\n $onAction: addSubscription.bind(null, actionSubscriptions),\n $patch,\n $reset,\n $subscribe(callback, options2 = {}) {\n const removeSubscription = addSubscription(subscriptions, callback, options2.detached, () => stopWatcher());\n const stopWatcher = scope.run(() => watch(() => pinia2.state.value[$id], (state) => {\n if (options2.flush === \"sync\" ? isSyncListening : isListening) {\n callback({\n storeId: $id,\n type: MutationType.direct,\n events: debuggerEvents\n }, state);\n }\n }, assign$2({}, $subscribeOptions, options2)));\n return removeSubscription;\n },\n $dispose\n };\n const store = reactive(process.env.NODE_ENV !== \"production\" || USE_DEVTOOLS ? assign$2(\n {\n _hmrPayload,\n _customProperties: markRaw(/* @__PURE__ */ new Set())\n // devtools custom properties\n },\n partialStore\n // must be added later\n // setupStore\n ) : partialStore);\n pinia2._s.set($id, store);\n const setupStore = pinia2._e.run(() => {\n scope = effectScope();\n return scope.run(() => setup());\n });\n for (const key in setupStore) {\n const prop = setupStore[key];\n if (isRef(prop) && !isComputed(prop) || isReactive(prop)) {\n if (process.env.NODE_ENV !== \"production\" && hot) {\n set(hotState.value, key, toRef(setupStore, key));\n } else if (!isOptionsStore) {\n if (initialState && shouldHydrate(prop)) {\n if (isRef(prop)) {\n prop.value = initialState[key];\n } else {\n mergeReactiveObjects(prop, initialState[key]);\n }\n }\n {\n pinia2.state.value[$id][key] = prop;\n }\n }\n if (process.env.NODE_ENV !== \"production\") {\n _hmrPayload.state.push(key);\n }\n } else if (typeof prop === \"function\") {\n const actionValue = process.env.NODE_ENV !== \"production\" && hot ? prop : wrapAction(key, prop);\n {\n setupStore[key] = actionValue;\n }\n if (process.env.NODE_ENV !== \"production\") {\n _hmrPayload.actions[key] = prop;\n }\n optionsForPlugin.actions[key] = prop;\n } else if (process.env.NODE_ENV !== \"production\") {\n if (isComputed(prop)) {\n _hmrPayload.getters[key] = isOptionsStore ? (\n // @ts-expect-error\n options.getters[key]\n ) : prop;\n if (IS_CLIENT) {\n const getters = setupStore._getters || // @ts-expect-error: same\n (setupStore._getters = markRaw([]));\n getters.push(key);\n }\n }\n }\n }\n {\n assign$2(store, setupStore);\n assign$2(toRaw(store), setupStore);\n }\n Object.defineProperty(store, \"$state\", {\n get: () => process.env.NODE_ENV !== \"production\" && hot ? hotState.value : pinia2.state.value[$id],\n set: (state) => {\n if (process.env.NODE_ENV !== \"production\" && hot) {\n throw new Error(\"cannot set hotState\");\n }\n $patch(($state) => {\n assign$2($state, state);\n });\n }\n });\n if (process.env.NODE_ENV !== \"production\") {\n store._hotUpdate = markRaw((newStore) => {\n store._hotUpdating = true;\n newStore._hmrPayload.state.forEach((stateKey) => {\n if (stateKey in store.$state) {\n const newStateTarget = newStore.$state[stateKey];\n const oldStateSource = store.$state[stateKey];\n if (typeof newStateTarget === \"object\" && isPlainObject(newStateTarget) && isPlainObject(oldStateSource)) {\n patchObject(newStateTarget, oldStateSource);\n } else {\n newStore.$state[stateKey] = oldStateSource;\n }\n }\n set(store, stateKey, toRef(newStore.$state, stateKey));\n });\n Object.keys(store.$state).forEach((stateKey) => {\n if (!(stateKey in newStore.$state)) {\n del(store, stateKey);\n }\n });\n isListening = false;\n isSyncListening = false;\n pinia2.state.value[$id] = toRef(newStore._hmrPayload, \"hotState\");\n isSyncListening = true;\n nextTick().then(() => {\n isListening = true;\n });\n for (const actionName in newStore._hmrPayload.actions) {\n const action = newStore[actionName];\n set(store, actionName, wrapAction(actionName, action));\n }\n for (const getterName in newStore._hmrPayload.getters) {\n const getter = newStore._hmrPayload.getters[getterName];\n const getterValue = isOptionsStore ? (\n // special handling of options api\n computed(() => {\n setActivePinia(pinia2);\n return getter.call(store, store);\n })\n ) : getter;\n set(store, getterName, getterValue);\n }\n Object.keys(store._hmrPayload.getters).forEach((key) => {\n if (!(key in newStore._hmrPayload.getters)) {\n del(store, key);\n }\n });\n Object.keys(store._hmrPayload.actions).forEach((key) => {\n if (!(key in newStore._hmrPayload.actions)) {\n del(store, key);\n }\n });\n store._hmrPayload = newStore._hmrPayload;\n store._getters = newStore._getters;\n store._hotUpdating = false;\n });\n }\n if (USE_DEVTOOLS) {\n const nonEnumerable = {\n writable: true,\n configurable: true,\n // avoid warning on devtools trying to display this property\n enumerable: false\n };\n [\"_p\", \"_hmrPayload\", \"_getters\", \"_customProperties\"].forEach((p) => {\n Object.defineProperty(store, p, assign$2({ value: store[p] }, nonEnumerable));\n });\n }\n pinia2._p.forEach((extender) => {\n if (USE_DEVTOOLS) {\n const extensions = scope.run(() => extender({\n store,\n app: pinia2._a,\n pinia: pinia2,\n options: optionsForPlugin\n }));\n Object.keys(extensions || {}).forEach((key) => store._customProperties.add(key));\n assign$2(store, extensions);\n } else {\n assign$2(store, scope.run(() => extender({\n store,\n app: pinia2._a,\n pinia: pinia2,\n options: optionsForPlugin\n })));\n }\n });\n if (process.env.NODE_ENV !== \"production\" && store.$state && typeof store.$state === \"object\" && typeof store.$state.constructor === \"function\" && !store.$state.constructor.toString().includes(\"[native code]\")) {\n console.warn(`[🍍]: The \"state\" must be a plain object. It cannot be\n\tstate: () => new MyClass()\nFound in store \"${store.$id}\".`);\n }\n if (initialState && isOptionsStore && options.hydrate) {\n options.hydrate(store.$state, initialState);\n }\n isListening = true;\n isSyncListening = true;\n return store;\n}\nfunction defineStore(idOrOptions, setup, setupOptions) {\n let id;\n let options;\n const isSetupStore = typeof setup === \"function\";\n if (typeof idOrOptions === \"string\") {\n id = idOrOptions;\n options = isSetupStore ? setupOptions : setup;\n } else {\n options = idOrOptions;\n id = idOrOptions.id;\n }\n function useStore(pinia2, hot) {\n const currentInstance = getCurrentInstance();\n pinia2 = // in test mode, ignore the argument provided as we can always retrieve a\n // pinia instance with getActivePinia()\n (process.env.NODE_ENV === \"test\" && activePinia && activePinia._testing ? null : pinia2) || currentInstance && inject(piniaSymbol, null);\n if (pinia2)\n setActivePinia(pinia2);\n if (process.env.NODE_ENV !== \"production\" && !activePinia) {\n throw new Error(`[🍍]: getActivePinia was called with no active Pinia. Did you forget to install pinia?\n\tconst pinia = createPinia()\n\tapp.use(pinia)\nThis will fail in production.`);\n }\n pinia2 = activePinia;\n if (!pinia2._s.has(id)) {\n if (isSetupStore) {\n createSetupStore(id, setup, options, pinia2);\n } else {\n createOptionsStore(id, options, pinia2);\n }\n if (process.env.NODE_ENV !== \"production\") {\n useStore._pinia = pinia2;\n }\n }\n const store = pinia2._s.get(id);\n if (process.env.NODE_ENV !== \"production\" && hot) {\n const hotId = \"__hot:\" + id;\n const newStore = isSetupStore ? createSetupStore(hotId, setup, options, pinia2, true) : createOptionsStore(hotId, assign$2({}, options), pinia2, true);\n hot._hotUpdate(newStore);\n delete pinia2.state.value[hotId];\n pinia2._s.delete(hotId);\n }\n if (process.env.NODE_ENV !== \"production\" && IS_CLIENT && currentInstance && currentInstance.proxy && // avoid adding stores that are just built for hot module replacement\n !hot) {\n const vm = currentInstance.proxy;\n const cache = \"_pStores\" in vm ? vm._pStores : vm._pStores = {};\n cache[id] = store;\n }\n return store;\n }\n useStore.$id = id;\n return useStore;\n}\nconst useDataStore = defineStore(\"data\", () => {\n const records = ref([]);\n const record = ref({});\n return { records, record };\n});\nfunction useStonecrop(registry) {\n if (!registry) {\n registry = inject(\"$registry\");\n }\n const store = useDataStore();\n const stonecrop = ref(new Stonecrop(registry, store));\n const isReady = ref(false);\n onBeforeMount(async () => {\n var _a, _b;\n const route = registry.router.currentRoute.value;\n const doctypeSlug = (_a = route.params.records) == null ? void 0 : _a.toString().toLowerCase();\n const recordId = (_b = route.params.record) == null ? void 0 : _b.toString().toLowerCase();\n if (!doctypeSlug && !recordId) {\n return;\n }\n const doctype = await registry.doctypeLoader(doctypeSlug);\n registry.addDoctype(doctype);\n stonecrop.value.setup(doctype);\n if (doctypeSlug) {\n if (recordId) {\n await stonecrop.value.getRecord(doctype, recordId);\n } else {\n await stonecrop.value.getRecords(doctype);\n }\n }\n stonecrop.value.runAction(doctype, \"LOAD\", recordId ? [recordId] : void 0);\n isReady.value = true;\n });\n return { stonecrop, isReady };\n}\nclass DoctypeMeta {\n constructor(doctype, schema, workflow, actions, component) {\n this.doctype = doctype;\n this.schema = schema;\n this.workflow = workflow;\n this.actions = actions;\n this.component = component;\n }\n get slug() {\n return this.doctype.replace(/([a-z])([A-Z])/g, \"$1-$2\").replace(/[\\s_]+/g, \"-\").toLowerCase();\n }\n get __typename() {\n return this.doctype;\n }\n}\nclass Registry {\n constructor(router2, doctypeLoader = void 0) {\n if (Registry._root) {\n return Registry._root;\n }\n Registry._root = this;\n this.name = \"Registry\";\n this.router = router2;\n this.registry = {};\n this.doctypeLoader = doctypeLoader;\n }\n addDoctype(doctype) {\n if (!(doctype.doctype in Object.keys(this.registry))) {\n this.registry[doctype.slug] = doctype;\n }\n if (!this.router.hasRoute(doctype.doctype)) {\n this.router.addRoute({\n path: `/${doctype.slug}`,\n name: doctype.slug,\n component: doctype.component\n });\n }\n }\n}\nfunction getDevtoolsGlobalHook() {\n return getTarget().__VUE_DEVTOOLS_GLOBAL_HOOK__;\n}\nfunction getTarget() {\n return typeof navigator !== \"undefined\" && typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : {};\n}\nconst isProxyAvailable = typeof Proxy === \"function\";\nconst HOOK_SETUP = \"devtools-plugin:setup\";\nconst HOOK_PLUGIN_SETTINGS_SET = \"plugin:settings:set\";\nlet supported;\nlet perf;\nfunction isPerformanceSupported() {\n var _a;\n if (supported !== void 0) {\n return supported;\n }\n if (typeof window !== \"undefined\" && window.performance) {\n supported = true;\n perf = window.performance;\n } else if (typeof global !== \"undefined\" && ((_a = global.perf_hooks) === null || _a === void 0 ? void 0 : _a.performance)) {\n supported = true;\n perf = global.perf_hooks.performance;\n } else {\n supported = false;\n }\n return supported;\n}\nfunction now$1() {\n return isPerformanceSupported() ? perf.now() : Date.now();\n}\nclass ApiProxy2 {\n constructor(plugin, hook) {\n this.target = null;\n this.targetQueue = [];\n this.onQueue = [];\n this.plugin = plugin;\n this.hook = hook;\n const defaultSettings = {};\n if (plugin.settings) {\n for (const id in plugin.settings) {\n const item = plugin.settings[id];\n defaultSettings[id] = item.defaultValue;\n }\n }\n const localSettingsSaveId = `__vue-devtools-plugin-settings__${plugin.id}`;\n let currentSettings = Object.assign({}, defaultSettings);\n try {\n const raw = localStorage.getItem(localSettingsSaveId);\n const data = JSON.parse(raw);\n Object.assign(currentSettings, data);\n } catch (e) {\n }\n this.fallbacks = {\n getSettings() {\n return currentSettings;\n },\n setSettings(value) {\n try {\n localStorage.setItem(localSettingsSaveId, JSON.stringify(value));\n } catch (e) {\n }\n currentSettings = value;\n },\n now() {\n return now$1();\n }\n };\n if (hook) {\n hook.on(HOOK_PLUGIN_SETTINGS_SET, (pluginId, value) => {\n if (pluginId === this.plugin.id) {\n this.fallbacks.setSettings(value);\n }\n });\n }\n this.proxiedOn = new Proxy({}, {\n get: (_target, prop) => {\n if (this.target) {\n return this.target.on[prop];\n } else {\n return (...args) => {\n this.onQueue.push({\n method: prop,\n args\n });\n };\n }\n }\n });\n this.proxiedTarget = new Proxy({}, {\n get: (_target, prop) => {\n if (this.target) {\n return this.target[prop];\n } else if (prop === \"on\") {\n return this.proxiedOn;\n } else if (Object.keys(this.fallbacks).includes(prop)) {\n return (...args) => {\n this.targetQueue.push({\n method: prop,\n args,\n resolve: () => {\n }\n });\n return this.fallbacks[prop](...args);\n };\n } else {\n return (...args) => {\n return new Promise((resolve) => {\n this.targetQueue.push({\n method: prop,\n args,\n resolve\n });\n });\n };\n }\n }\n });\n }\n async setRealTarget(target) {\n this.target = target;\n for (const item of this.onQueue) {\n this.target.on[item.method](...item.args);\n }\n for (const item of this.targetQueue) {\n item.resolve(await this.target[item.method](...item.args));\n }\n }\n}\nfunction setupDevtoolsPlugin(pluginDescriptor, setupFn) {\n const descriptor = pluginDescriptor;\n const target = getTarget();\n const hook = getDevtoolsGlobalHook();\n const enableProxy = isProxyAvailable && descriptor.enableEarlyProxy;\n if (hook && (target.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !enableProxy)) {\n hook.emit(HOOK_SETUP, pluginDescriptor, setupFn);\n } else {\n const proxy = enableProxy ? new ApiProxy2(descriptor, hook) : null;\n const list = target.__VUE_DEVTOOLS_PLUGINS__ = target.__VUE_DEVTOOLS_PLUGINS__ || [];\n list.push({\n pluginDescriptor: descriptor,\n setupFn,\n proxy\n });\n if (proxy)\n setupFn(proxy.proxiedTarget);\n }\n}\n/*!\n * vue-router v4.1.6\n * (c) 2022 Eduardo San Martin Morote\n * @license MIT\n */\nconst isBrowser = typeof window !== \"undefined\";\nfunction isESModule(obj) {\n return obj.__esModule || obj[Symbol.toStringTag] === \"Module\";\n}\nconst assign = Object.assign;\nfunction applyToParams(fn, params) {\n const newParams = {};\n for (const key in params) {\n const value = params[key];\n newParams[key] = isArray(value) ? value.map(fn) : fn(value);\n }\n return newParams;\n}\nconst noop = () => {\n};\nconst isArray = Array.isArray;\nfunction warn(msg) {\n const args = Array.from(arguments).slice(1);\n console.warn.apply(console, [\"[Vue Router warn]: \" + msg].concat(args));\n}\nconst TRAILING_SLASH_RE = /\\/$/;\nconst removeTrailingSlash = (path) => path.replace(TRAILING_SLASH_RE, \"\");\nfunction parseURL(parseQuery2, location2, currentLocation = \"/\") {\n let path, query = {}, searchString = \"\", hash = \"\";\n const hashPos = location2.indexOf(\"#\");\n let searchPos = location2.indexOf(\"?\");\n if (hashPos < searchPos && hashPos >= 0) {\n searchPos = -1;\n }\n if (searchPos > -1) {\n path = location2.slice(0, searchPos);\n searchString = location2.slice(searchPos + 1, hashPos > -1 ? hashPos : location2.length);\n query = parseQuery2(searchString);\n }\n if (hashPos > -1) {\n path = path || location2.slice(0, hashPos);\n hash = location2.slice(hashPos, location2.length);\n }\n path = resolveRelativePath(path != null ? path : location2, currentLocation);\n return {\n fullPath: path + (searchString && \"?\") + searchString + hash,\n path,\n query,\n hash\n };\n}\nfunction stringifyURL(stringifyQuery2, location2) {\n const query = location2.query ? stringifyQuery2(location2.query) : \"\";\n return location2.path + (query && \"?\") + query + (location2.hash || \"\");\n}\nfunction stripBase(pathname, base) {\n if (!base || !pathname.toLowerCase().startsWith(base.toLowerCase()))\n return pathname;\n return pathname.slice(base.length) || \"/\";\n}\nfunction isSameRouteLocation(stringifyQuery2, a, b) {\n const aLastIndex = a.matched.length - 1;\n const bLastIndex = b.matched.length - 1;\n return aLastIndex > -1 && aLastIndex === bLastIndex && isSameRouteRecord(a.matched[aLastIndex], b.matched[bLastIndex]) && isSameRouteLocationParams(a.params, b.params) && stringifyQuery2(a.query) === stringifyQuery2(b.query) && a.hash === b.hash;\n}\nfunction isSameRouteRecord(a, b) {\n return (a.aliasOf || a) === (b.aliasOf || b);\n}\nfunction isSameRouteLocationParams(a, b) {\n if (Object.keys(a).length !== Object.keys(b).length)\n return false;\n for (const key in a) {\n if (!isSameRouteLocationParamsValue(a[key], b[key]))\n return false;\n }\n return true;\n}\nfunction isSameRouteLocationParamsValue(a, b) {\n return isArray(a) ? isEquivalentArray(a, b) : isArray(b) ? isEquivalentArray(b, a) : a === b;\n}\nfunction isEquivalentArray(a, b) {\n return isArray(b) ? a.length === b.length && a.every((value, i) => value === b[i]) : a.length === 1 && a[0] === b;\n}\nfunction resolveRelativePath(to, from) {\n if (to.startsWith(\"/\"))\n return to;\n if (process.env.NODE_ENV !== \"production\" && !from.startsWith(\"/\")) {\n warn(`Cannot resolve a relative location without an absolute path. Trying to resolve \"${to}\" from \"${from}\". It should look like \"/${from}\".`);\n return to;\n }\n if (!to)\n return from;\n const fromSegments = from.split(\"/\");\n const toSegments = to.split(\"/\");\n let position = fromSegments.length - 1;\n let toPosition;\n let segment;\n for (toPosition = 0; toPosition < toSegments.length; toPosition++) {\n segment = toSegments[toPosition];\n if (segment === \".\")\n continue;\n if (segment === \"..\") {\n if (position > 1)\n position--;\n } else\n break;\n }\n return fromSegments.slice(0, position).join(\"/\") + \"/\" + toSegments.slice(toPosition - (toPosition === toSegments.length ? 1 : 0)).join(\"/\");\n}\nvar NavigationType;\n(function(NavigationType2) {\n NavigationType2[\"pop\"] = \"pop\";\n NavigationType2[\"push\"] = \"push\";\n})(NavigationType || (NavigationType = {}));\nvar NavigationDirection;\n(function(NavigationDirection2) {\n NavigationDirection2[\"back\"] = \"back\";\n NavigationDirection2[\"forward\"] = \"forward\";\n NavigationDirection2[\"unknown\"] = \"\";\n})(NavigationDirection || (NavigationDirection = {}));\nfunction normalizeBase(base) {\n if (!base) {\n if (isBrowser) {\n const baseEl = document.querySelector(\"base\");\n base = baseEl && baseEl.getAttribute(\"href\") || \"/\";\n base = base.replace(/^\\w+:\\/\\/[^\\/]+/, \"\");\n } else {\n base = \"/\";\n }\n }\n if (base[0] !== \"/\" && base[0] !== \"#\")\n base = \"/\" + base;\n return removeTrailingSlash(base);\n}\nconst BEFORE_HASH_RE = /^[^#]+#/;\nfunction createHref(base, location2) {\n return base.replace(BEFORE_HASH_RE, \"#\") + location2;\n}\nfunction getElementPosition(el, offset) {\n const docRect = document.documentElement.getBoundingClientRect();\n const elRect = el.getBoundingClientRect();\n return {\n behavior: offset.behavior,\n left: elRect.left - docRect.left - (offset.left || 0),\n top: elRect.top - docRect.top - (offset.top || 0)\n };\n}\nconst computeScrollPosition = () => ({\n left: window.pageXOffset,\n top: window.pageYOffset\n});\nfunction scrollToPosition(position) {\n let scrollToOptions;\n if (\"el\" in position) {\n const positionEl = position.el;\n const isIdSelector = typeof positionEl === \"string\" && positionEl.startsWith(\"#\");\n if (process.env.NODE_ENV !== \"production\" && typeof position.el === \"string\") {\n if (!isIdSelector || !document.getElementById(position.el.slice(1))) {\n try {\n const foundEl = document.querySelector(position.el);\n if (isIdSelector && foundEl) {\n warn(`The selector \"${position.el}\" should be passed as \"el: document.querySelector('${position.el}')\" because it starts with \"#\".`);\n return;\n }\n } catch (err) {\n warn(`The selector \"${position.el}\" is invalid. If you are using an id selector, make sure to escape it. You can find more information about escaping characters in selectors at https://mathiasbynens.be/notes/css-escapes or use CSS.escape (https://developer.mozilla.org/en-US/docs/Web/API/CSS/escape).`);\n return;\n }\n }\n }\n const el = typeof positionEl === \"string\" ? isIdSelector ? document.getElementById(positionEl.slice(1)) : document.querySelector(positionEl) : positionEl;\n if (!el) {\n process.env.NODE_ENV !== \"production\" && warn(`Couldn't find element using selector \"${position.el}\" returned by scrollBehavior.`);\n return;\n }\n scrollToOptions = getElementPosition(el, position);\n } else {\n scrollToOptions = position;\n }\n if (\"scrollBehavior\" in document.documentElement.style)\n window.scrollTo(scrollToOptions);\n else {\n window.scrollTo(scrollToOptions.left != null ? scrollToOptions.left : window.pageXOffset, scrollToOptions.top != null ? scrollToOptions.top : window.pageYOffset);\n }\n}\nfunction getScrollKey(path, delta) {\n const position = history.state ? history.state.position - delta : -1;\n return position + path;\n}\nconst scrollPositions = /* @__PURE__ */ new Map();\nfunction saveScrollPosition(key, scrollPosition) {\n scrollPositions.set(key, scrollPosition);\n}\nfunction getSavedScrollPosition(key) {\n const scroll = scrollPositions.get(key);\n scrollPositions.delete(key);\n return scroll;\n}\nlet createBaseLocation = () => location.protocol + \"//\" + location.host;\nfunction createCurrentLocation(base, location2) {\n const { pathname, search, hash } = location2;\n const hashPos = base.indexOf(\"#\");\n if (hashPos > -1) {\n let slicePos = hash.includes(base.slice(hashPos)) ? base.slice(hashPos).length : 1;\n let pathFromHash = hash.slice(slicePos);\n if (pathFromHash[0] !== \"/\")\n pathFromHash = \"/\" + pathFromHash;\n return stripBase(pathFromHash, \"\");\n }\n const path = stripBase(pathname, base);\n return path + search + hash;\n}\nfunction useHistoryListeners(base, historyState, currentLocation, replace) {\n let listeners = [];\n let teardowns = [];\n let pauseState = null;\n const popStateHandler = ({ state }) => {\n const to = createCurrentLocation(base, location);\n const from = currentLocation.value;\n const fromState = historyState.value;\n let delta = 0;\n if (state) {\n currentLocation.value = to;\n historyState.value = state;\n if (pauseState && pauseState === from) {\n pauseState = null;\n return;\n }\n delta = fromState ? state.position - fromState.position : 0;\n } else {\n replace(to);\n }\n listeners.forEach((listener) => {\n listener(currentLocation.value, from, {\n delta,\n type: NavigationType.pop,\n direction: delta ? delta > 0 ? NavigationDirection.forward : NavigationDirection.back : NavigationDirection.unknown\n });\n });\n };\n function pauseListeners() {\n pauseState = currentLocation.value;\n }\n function listen(callback) {\n listeners.push(callback);\n const teardown = () => {\n const index2 = listeners.indexOf(callback);\n if (index2 > -1)\n listeners.splice(index2, 1);\n };\n teardowns.push(teardown);\n return teardown;\n }\n function beforeUnloadListener() {\n const { history: history2 } = window;\n if (!history2.state)\n return;\n history2.replaceState(assign({}, history2.state, { scroll: computeScrollPosition() }), \"\");\n }\n function destroy() {\n for (const teardown of teardowns)\n teardown();\n teardowns = [];\n window.removeEventListener(\"popstate\", popStateHandler);\n window.removeEventListener(\"beforeunload\", beforeUnloadListener);\n }\n window.addEventListener(\"popstate\", popStateHandler);\n window.addEventListener(\"beforeunload\", beforeUnloadListener);\n return {\n pauseListeners,\n listen,\n destroy\n };\n}\nfunction buildState(back, current, forward, replaced = false, computeScroll = false) {\n return {\n back,\n current,\n forward,\n replaced,\n position: window.history.length,\n scroll: computeScroll ? computeScrollPosition() : null\n };\n}\nfunction useHistoryStateNavigation(base) {\n const { history: history2, location: location2 } = window;\n const currentLocation = {\n value: createCurrentLocation(base, location2)\n };\n const historyState = { value: history2.state };\n if (!historyState.value) {\n changeLocation(currentLocation.value, {\n back: null,\n current: currentLocation.value,\n forward: null,\n // the length is off by one, we need to decrease it\n position: history2.length - 1,\n replaced: true,\n // don't add a scroll as the user may have an anchor, and we want\n // scrollBehavior to be triggered without a saved position\n scroll: null\n }, true);\n }\n function changeLocation(to, state, replace2) {\n const hashIndex = base.indexOf(\"#\");\n const url = hashIndex > -1 ? (location2.host && document.querySelector(\"base\") ? base : base.slice(hashIndex)) + to : createBaseLocation() + base + to;\n try {\n history2[replace2 ? \"replaceState\" : \"pushState\"](state, \"\", url);\n historyState.value = state;\n } catch (err) {\n if (process.env.NODE_ENV !== \"production\") {\n warn(\"Error with push/replace State\", err);\n } else {\n console.error(err);\n }\n location2[replace2 ? \"replace\" : \"assign\"](url);\n }\n }\n function replace(to, data) {\n const state = assign({}, history2.state, buildState(\n historyState.value.back,\n // keep back and forward entries but override current position\n to,\n historyState.value.forward,\n true\n ), data, { position: historyState.value.position });\n changeLocation(to, state, true);\n currentLocation.value = to;\n }\n function push(to, data) {\n const currentState = assign(\n {},\n // use current history state to gracefully handle a wrong call to\n // history.replaceState\n // https://github.com/vuejs/router/issues/366\n historyState.value,\n history2.state,\n {\n forward: to,\n scroll: computeScrollPosition()\n }\n );\n if (process.env.NODE_ENV !== \"production\" && !history2.state) {\n warn(`history.state seems to have been manually replaced without preserving the necessary values. Make sure to preserve existing history state if you are manually calling history.replaceState:\n\nhistory.replaceState(history.state, '', url)\n\nYou can find more information at https://next.router.vuejs.org/guide/migration/#usage-of-history-state.`);\n }\n changeLocation(currentState.current, currentState, true);\n const state = assign({}, buildState(currentLocation.value, to, null), { position: currentState.position + 1 }, data);\n changeLocation(to, state, false);\n currentLocation.value = to;\n }\n return {\n location: currentLocation,\n state: historyState,\n push,\n replace\n };\n}\nfunction createWebHistory(base) {\n base = normalizeBase(base);\n const historyNavigation = useHistoryStateNavigation(base);\n const historyListeners = useHistoryListeners(base, historyNavigation.state, historyNavigation.location, historyNavigation.replace);\n function go(delta, triggerListeners = true) {\n if (!triggerListeners)\n historyListeners.pauseListeners();\n history.go(delta);\n }\n const routerHistory = assign({\n // it's overridden right after\n location: \"\",\n base,\n go,\n createHref: createHref.bind(null, base)\n }, historyNavigation, historyListeners);\n Object.defineProperty(routerHistory, \"location\", {\n enumerable: true,\n get: () => historyNavigation.location.value\n });\n Object.defineProperty(routerHistory, \"state\", {\n enumerable: true,\n get: () => historyNavigation.state.value\n });\n return routerHistory;\n}\nfunction isRouteLocation(route) {\n return typeof route === \"string\" || route && typeof route === \"object\";\n}\nfunction isRouteName(name) {\n return typeof name === \"string\" || typeof name === \"symbol\";\n}\nconst START_LOCATION_NORMALIZED = {\n path: \"/\",\n name: void 0,\n params: {},\n query: {},\n hash: \"\",\n fullPath: \"/\",\n matched: [],\n meta: {},\n redirectedFrom: void 0\n};\nconst NavigationFailureSymbol = Symbol(process.env.NODE_ENV !== \"production\" ? \"navigation failure\" : \"\");\nvar NavigationFailureType;\n(function(NavigationFailureType2) {\n NavigationFailureType2[NavigationFailureType2[\"aborted\"] = 4] = \"aborted\";\n NavigationFailureType2[NavigationFailureType2[\"cancelled\"] = 8] = \"cancelled\";\n NavigationFailureType2[NavigationFailureType2[\"duplicated\"] = 16] = \"duplicated\";\n})(NavigationFailureType || (NavigationFailureType = {}));\nconst ErrorTypeMessages = {\n [\n 1\n /* ErrorTypes.MATCHER_NOT_FOUND */\n ]({ location: location2, currentLocation }) {\n return `No match for\n ${JSON.stringify(location2)}${currentLocation ? \"\\nwhile being at\\n\" + JSON.stringify(currentLocation) : \"\"}`;\n },\n [\n 2\n /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */\n ]({ from, to }) {\n return `Redirected from \"${from.fullPath}\" to \"${stringifyRoute(to)}\" via a navigation guard.`;\n },\n [\n 4\n /* ErrorTypes.NAVIGATION_ABORTED */\n ]({ from, to }) {\n return `Navigation aborted from \"${from.fullPath}\" to \"${to.fullPath}\" via a navigation guard.`;\n },\n [\n 8\n /* ErrorTypes.NAVIGATION_CANCELLED */\n ]({ from, to }) {\n return `Navigation cancelled from \"${from.fullPath}\" to \"${to.fullPath}\" with a new navigation.`;\n },\n [\n 16\n /* ErrorTypes.NAVIGATION_DUPLICATED */\n ]({ from, to }) {\n return `Avoided redundant navigation to current location: \"${from.fullPath}\".`;\n }\n};\nfunction createRouterError(type2, params) {\n if (process.env.NODE_ENV !== \"production\" || false) {\n return assign(new Error(ErrorTypeMessages[type2](params)), {\n type: type2,\n [NavigationFailureSymbol]: true\n }, params);\n } else {\n return assign(new Error(), {\n type: type2,\n [NavigationFailureSymbol]: true\n }, params);\n }\n}\nfunction isNavigationFailure(error, type2) {\n return error instanceof Error && NavigationFailureSymbol in error && (type2 == null || !!(error.type & type2));\n}\nconst propertiesToLog = [\"params\", \"query\", \"hash\"];\nfunction stringifyRoute(to) {\n if (typeof to === \"string\")\n return to;\n if (\"path\" in to)\n return to.path;\n const location2 = {};\n for (const key of propertiesToLog) {\n if (key in to)\n location2[key] = to[key];\n }\n return JSON.stringify(location2, null, 2);\n}\nconst BASE_PARAM_PATTERN = \"[^/]+?\";\nconst BASE_PATH_PARSER_OPTIONS = {\n sensitive: false,\n strict: false,\n start: true,\n end: true\n};\nconst REGEX_CHARS_RE = /[.+*?^${}()[\\]/\\\\]/g;\nfunction tokensToParser(segments, extraOptions) {\n const options = assign({}, BASE_PATH_PARSER_OPTIONS, extraOptions);\n const score = [];\n let pattern = options.start ? \"^\" : \"\";\n const keys = [];\n for (const segment of segments) {\n const segmentScores = segment.length ? [] : [\n 90\n /* PathScore.Root */\n ];\n if (options.strict && !segment.length)\n pattern += \"/\";\n for (let tokenIndex = 0; tokenIndex < segment.length; tokenIndex++) {\n const token = segment[tokenIndex];\n let subSegmentScore = 40 + (options.sensitive ? 0.25 : 0);\n if (token.type === 0) {\n if (!tokenIndex)\n pattern += \"/\";\n pattern += token.value.replace(REGEX_CHARS_RE, \"\\\\$&\");\n subSegmentScore += 40;\n } else if (token.type === 1) {\n const { value, repeatable, optional, regexp } = token;\n keys.push({\n name: value,\n repeatable,\n optional\n });\n const re2 = regexp ? regexp : BASE_PARAM_PATTERN;\n if (re2 !== BASE_PARAM_PATTERN) {\n subSegmentScore += 10;\n try {\n new RegExp(`(${re2})`);\n } catch (err) {\n throw new Error(`Invalid custom RegExp for param \"${value}\" (${re2}): ` + err.message);\n }\n }\n let subPattern = repeatable ? `((?:${re2})(?:/(?:${re2}))*)` : `(${re2})`;\n if (!tokenIndex)\n subPattern = // avoid an optional / if there are more segments e.g. /:p?-static\n // or /:p?-:p2\n optional && segment.length < 2 ? `(?:/${subPattern})` : \"/\" + subPattern;\n if (optional)\n subPattern += \"?\";\n pattern += subPattern;\n subSegmentScore += 20;\n if (optional)\n subSegmentScore += -8;\n if (repeatable)\n subSegmentScore += -20;\n if (re2 === \".*\")\n subSegmentScore += -50;\n }\n segmentScores.push(subSegmentScore);\n }\n score.push(segmentScores);\n }\n if (options.strict && options.end) {\n const i = score.length - 1;\n score[i][score[i].length - 1] += 0.7000000000000001;\n }\n if (!options.strict)\n pattern += \"/?\";\n if (options.end)\n pattern += \"$\";\n else if (options.strict)\n pattern += \"(?:/|$)\";\n const re = new RegExp(pattern, options.sensitive ? \"\" : \"i\");\n function parse2(path) {\n const match = path.match(re);\n const params = {};\n if (!match)\n return null;\n for (let i = 1; i < match.length; i++) {\n const value = match[i] || \"\";\n const key = keys[i - 1];\n params[key.name] = value && key.repeatable ? value.split(\"/\") : value;\n }\n return params;\n }\n function stringify2(params) {\n let path = \"\";\n let avoidDuplicatedSlash = false;\n for (const segment of segments) {\n if (!avoidDuplicatedSlash || !path.endsWith(\"/\"))\n path += \"/\";\n avoidDuplicatedSlash = false;\n for (const token of segment) {\n if (token.type === 0) {\n path += token.value;\n } else if (token.type === 1) {\n const { value, repeatable, optional } = token;\n const param = value in params ? params[value] : \"\";\n if (isArray(param) && !repeatable) {\n throw new Error(`Provided param \"${value}\" is an array but it is not repeatable (* or + modifiers)`);\n }\n const text = isArray(param) ? param.join(\"/\") : param;\n if (!text) {\n if (optional) {\n if (segment.length < 2) {\n if (path.endsWith(\"/\"))\n path = path.slice(0, -1);\n else\n avoidDuplicatedSlash = true;\n }\n } else\n throw new Error(`Missing required param \"${value}\"`);\n }\n path += text;\n }\n }\n }\n return path || \"/\";\n }\n return {\n re,\n score,\n keys,\n parse: parse2,\n stringify: stringify2\n };\n}\nfunction compareScoreArray(a, b) {\n let i = 0;\n while (i < a.length && i < b.length) {\n const diff = b[i] - a[i];\n if (diff)\n return diff;\n i++;\n }\n if (a.length < b.length) {\n return a.length === 1 && a[0] === 40 + 40 ? -1 : 1;\n } else if (a.length > b.length) {\n return b.length === 1 && b[0] === 40 + 40 ? 1 : -1;\n }\n return 0;\n}\nfunction comparePathParserScore(a, b) {\n let i = 0;\n const aScore = a.score;\n const bScore = b.score;\n while (i < aScore.length && i < bScore.length) {\n const comp = compareScoreArray(aScore[i], bScore[i]);\n if (comp)\n return comp;\n i++;\n }\n if (Math.abs(bScore.length - aScore.length) === 1) {\n if (isLastScoreNegative(aScore))\n return 1;\n if (isLastScoreNegative(bScore))\n return -1;\n }\n return bScore.length - aScore.length;\n}\nfunction isLastScoreNegative(score) {\n const last = score[score.length - 1];\n return score.length > 0 && last[last.length - 1] < 0;\n}\nconst ROOT_TOKEN = {\n type: 0,\n value: \"\"\n};\nconst VALID_PARAM_RE = /[a-zA-Z0-9_]/;\nfunction tokenizePath(path) {\n if (!path)\n return [[]];\n if (path === \"/\")\n return [[ROOT_TOKEN]];\n if (!path.startsWith(\"/\")) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `Route paths should start with a \"/\": \"${path}\" should be \"/${path}\".` : `Invalid path \"${path}\"`);\n }\n function crash(message) {\n throw new Error(`ERR (${state})/\"${buffer}\": ${message}`);\n }\n let state = 0;\n let previousState = state;\n const tokens = [];\n let segment;\n function finalizeSegment() {\n if (segment)\n tokens.push(segment);\n segment = [];\n }\n let i = 0;\n let char;\n let buffer = \"\";\n let customRe = \"\";\n function consumeBuffer() {\n if (!buffer)\n return;\n if (state === 0) {\n segment.push({\n type: 0,\n value: buffer\n });\n } else if (state === 1 || state === 2 || state === 3) {\n if (segment.length > 1 && (char === \"*\" || char === \"+\"))\n crash(`A repeatable param (${buffer}) must be alone in its segment. eg: '/:ids+.`);\n segment.push({\n type: 1,\n value: buffer,\n regexp: customRe,\n repeatable: char === \"*\" || char === \"+\",\n optional: char === \"*\" || char === \"?\"\n });\n } else {\n crash(\"Invalid state to consume buffer\");\n }\n buffer = \"\";\n }\n function addCharToBuffer() {\n buffer += char;\n }\n while (i < path.length) {\n char = path[i++];\n if (char === \"\\\\\" && state !== 2) {\n previousState = state;\n state = 4;\n continue;\n }\n switch (state) {\n case 0:\n if (char === \"/\") {\n if (buffer) {\n consumeBuffer();\n }\n finalizeSegment();\n } else if (char === \":\") {\n consumeBuffer();\n state = 1;\n } else {\n addCharToBuffer();\n }\n break;\n case 4:\n addCharToBuffer();\n state = previousState;\n break;\n case 1:\n if (char === \"(\") {\n state = 2;\n } else if (VALID_PARAM_RE.test(char)) {\n addCharToBuffer();\n } else {\n consumeBuffer();\n state = 0;\n if (char !== \"*\" && char !== \"?\" && char !== \"+\")\n i--;\n }\n break;\n case 2:\n if (char === \")\") {\n if (customRe[customRe.length - 1] == \"\\\\\")\n customRe = customRe.slice(0, -1) + char;\n else\n state = 3;\n } else {\n customRe += char;\n }\n break;\n case 3:\n consumeBuffer();\n state = 0;\n if (char !== \"*\" && char !== \"?\" && char !== \"+\")\n i--;\n customRe = \"\";\n break;\n default:\n crash(\"Unknown state\");\n break;\n }\n }\n if (state === 2)\n crash(`Unfinished custom RegExp for param \"${buffer}\"`);\n consumeBuffer();\n finalizeSegment();\n return tokens;\n}\nfunction createRouteRecordMatcher(record, parent, options) {\n const parser = tokensToParser(tokenizePath(record.path), options);\n if (process.env.NODE_ENV !== \"production\") {\n const existingKeys = /* @__PURE__ */ new Set();\n for (const key of parser.keys) {\n if (existingKeys.has(key.name))\n warn(`Found duplicated params with name \"${key.name}\" for path \"${record.path}\". Only the last one will be available on \"$route.params\".`);\n existingKeys.add(key.name);\n }\n }\n const matcher = assign(parser, {\n record,\n parent,\n // these needs to be populated by the parent\n children: [],\n alias: []\n });\n if (parent) {\n if (!matcher.record.aliasOf === !parent.record.aliasOf)\n parent.children.push(matcher);\n }\n return matcher;\n}\nfunction createRouterMatcher(routes, globalOptions) {\n const matchers = [];\n const matcherMap = /* @__PURE__ */ new Map();\n globalOptions = mergeOptions({ strict: false, end: true, sensitive: false }, globalOptions);\n function getRecordMatcher(name) {\n return matcherMap.get(name);\n }\n function addRoute(record, parent, originalRecord) {\n const isRootAdd = !originalRecord;\n const mainNormalizedRecord = normalizeRouteRecord(record);\n if (process.env.NODE_ENV !== \"production\") {\n checkChildMissingNameWithEmptyPath(mainNormalizedRecord, parent);\n }\n mainNormalizedRecord.aliasOf = originalRecord && originalRecord.record;\n const options = mergeOptions(globalOptions, record);\n const normalizedRecords = [\n mainNormalizedRecord\n ];\n if (\"alias\" in record) {\n const aliases = typeof record.alias === \"string\" ? [record.alias] : record.alias;\n for (const alias of aliases) {\n normalizedRecords.push(assign({}, mainNormalizedRecord, {\n // this allows us to hold a copy of the `components` option\n // so that async components cache is hold on the original record\n components: originalRecord ? originalRecord.record.components : mainNormalizedRecord.components,\n path: alias,\n // we might be the child of an alias\n aliasOf: originalRecord ? originalRecord.record : mainNormalizedRecord\n // the aliases are always of the same kind as the original since they\n // are defined on the same record\n }));\n }\n }\n let matcher;\n let originalMatcher;\n for (const normalizedRecord of normalizedRecords) {\n const { path } = normalizedRecord;\n if (parent && path[0] !== \"/\") {\n const parentPath = parent.record.path;\n const connectingSlash = parentPath[parentPath.length - 1] === \"/\" ? \"\" : \"/\";\n normalizedRecord.path = parent.record.path + (path && connectingSlash + path);\n }\n if (process.env.NODE_ENV !== \"production\" && normalizedRecord.path === \"*\") {\n throw new Error('Catch all routes (\"*\") must now be defined using a param with a custom regexp.\\nSee more at https://next.router.vuejs.org/guide/migration/#removed-star-or-catch-all-routes.');\n }\n matcher = createRouteRecordMatcher(normalizedRecord, parent, options);\n if (process.env.NODE_ENV !== \"production\" && parent && path[0] === \"/\")\n checkMissingParamsInAbsolutePath(matcher, parent);\n if (originalRecord) {\n originalRecord.alias.push(matcher);\n if (process.env.NODE_ENV !== \"production\") {\n checkSameParams(originalRecord, matcher);\n }\n } else {\n originalMatcher = originalMatcher || matcher;\n if (originalMatcher !== matcher)\n originalMatcher.alias.push(matcher);\n if (isRootAdd && record.name && !isAliasRecord(matcher))\n removeRoute(record.name);\n }\n if (mainNormalizedRecord.children) {\n const children = mainNormalizedRecord.children;\n for (let i = 0; i < children.length; i++) {\n addRoute(children[i], matcher, originalRecord && originalRecord.children[i]);\n }\n }\n originalRecord = originalRecord || matcher;\n if (matcher.record.components && Object.keys(matcher.record.components).length || matcher.record.name || matcher.record.redirect) {\n insertMatcher(matcher);\n }\n }\n return originalMatcher ? () => {\n removeRoute(originalMatcher);\n } : noop;\n }\n function removeRoute(matcherRef) {\n if (isRouteName(matcherRef)) {\n const matcher = matcherMap.get(matcherRef);\n if (matcher) {\n matcherMap.delete(matcherRef);\n matchers.splice(matchers.indexOf(matcher), 1);\n matcher.children.forEach(removeRoute);\n matcher.alias.forEach(removeRoute);\n }\n } else {\n const index2 = matchers.indexOf(matcherRef);\n if (index2 > -1) {\n matchers.splice(index2, 1);\n if (matcherRef.record.name)\n matcherMap.delete(matcherRef.record.name);\n matcherRef.children.forEach(removeRoute);\n matcherRef.alias.forEach(removeRoute);\n }\n }\n }\n function getRoutes() {\n return matchers;\n }\n function insertMatcher(matcher) {\n let i = 0;\n while (i < matchers.length && comparePathParserScore(matcher, matchers[i]) >= 0 && // Adding children with empty path should still appear before the parent\n // https://github.com/vuejs/router/issues/1124\n (matcher.record.path !== matchers[i].record.path || !isRecordChildOf(matcher, matchers[i])))\n i++;\n matchers.splice(i, 0, matcher);\n if (matcher.record.name && !isAliasRecord(matcher))\n matcherMap.set(matcher.record.name, matcher);\n }\n function resolve(location2, currentLocation) {\n let matcher;\n let params = {};\n let path;\n let name;\n if (\"name\" in location2 && location2.name) {\n matcher = matcherMap.get(location2.name);\n if (!matcher)\n throw createRouterError(1, {\n location: location2\n });\n if (process.env.NODE_ENV !== \"production\") {\n const invalidParams = Object.keys(location2.params || {}).filter((paramName) => !matcher.keys.find((k) => k.name === paramName));\n if (invalidParams.length) {\n warn(`Discarded invalid param(s) \"${invalidParams.join('\", \"')}\" when navigating. See https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 for more details.`);\n }\n }\n name = matcher.record.name;\n params = assign(\n // paramsFromLocation is a new object\n paramsFromLocation(\n currentLocation.params,\n // only keep params that exist in the resolved location\n // TODO: only keep optional params coming from a parent record\n matcher.keys.filter((k) => !k.optional).map((k) => k.name)\n ),\n // discard any existing params in the current location that do not exist here\n // #1497 this ensures better active/exact matching\n location2.params && paramsFromLocation(location2.params, matcher.keys.map((k) => k.name))\n );\n path = matcher.stringify(params);\n } else if (\"path\" in location2) {\n path = location2.path;\n if (process.env.NODE_ENV !== \"production\" && !path.startsWith(\"/\")) {\n warn(`The Matcher cannot resolve relative paths but received \"${path}\". Unless you directly called \\`matcher.resolve(\"${path}\")\\`, this is probably a bug in vue-router. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/router.`);\n }\n matcher = matchers.find((m2) => m2.re.test(path));\n if (matcher) {\n params = matcher.parse(path);\n name = matcher.record.name;\n }\n } else {\n matcher = currentLocation.name ? matcherMap.get(currentLocation.name) : matchers.find((m2) => m2.re.test(currentLocation.path));\n if (!matcher)\n throw createRouterError(1, {\n location: location2,\n currentLocation\n });\n name = matcher.record.name;\n params = assign({}, currentLocation.params, location2.params);\n path = matcher.stringify(params);\n }\n const matched = [];\n let parentMatcher = matcher;\n while (parentMatcher) {\n matched.unshift(parentMatcher.record);\n parentMatcher = parentMatcher.parent;\n }\n return {\n name,\n path,\n params,\n matched,\n meta: mergeMetaFields(matched)\n };\n }\n routes.forEach((route) => addRoute(route));\n return { addRoute, resolve, removeRoute, getRoutes, getRecordMatcher };\n}\nfunction paramsFromLocation(params, keys) {\n const newParams = {};\n for (const key of keys) {\n if (key in params)\n newParams[key] = params[key];\n }\n return newParams;\n}\nfunction normalizeRouteRecord(record) {\n return {\n path: record.path,\n redirect: record.redirect,\n name: record.name,\n meta: record.meta || {},\n aliasOf: void 0,\n beforeEnter: record.beforeEnter,\n props: normalizeRecordProps(record),\n children: record.children || [],\n instances: {},\n leaveGuards: /* @__PURE__ */ new Set(),\n updateGuards: /* @__PURE__ */ new Set(),\n enterCallbacks: {},\n components: \"components\" in record ? record.components || null : record.component && { default: record.component }\n };\n}\nfunction normalizeRecordProps(record) {\n const propsObject = {};\n const props = record.props || false;\n if (\"component\" in record) {\n propsObject.default = props;\n } else {\n for (const name in record.components)\n propsObject[name] = typeof props === \"boolean\" ? props : props[name];\n }\n return propsObject;\n}\nfunction isAliasRecord(record) {\n while (record) {\n if (record.record.aliasOf)\n return true;\n record = record.parent;\n }\n return false;\n}\nfunction mergeMetaFields(matched) {\n return matched.reduce((meta, record) => assign(meta, record.meta), {});\n}\nfunction mergeOptions(defaults, partialOptions) {\n const options = {};\n for (const key in defaults) {\n options[key] = key in partialOptions ? partialOptions[key] : defaults[key];\n }\n return options;\n}\nfunction isSameParam(a, b) {\n return a.name === b.name && a.optional === b.optional && a.repeatable === b.repeatable;\n}\nfunction checkSameParams(a, b) {\n for (const key of a.keys) {\n if (!key.optional && !b.keys.find(isSameParam.bind(null, key)))\n return warn(`Alias \"${b.record.path}\" and the original record: \"${a.record.path}\" must have the exact same param named \"${key.name}\"`);\n }\n for (const key of b.keys) {\n if (!key.optional && !a.keys.find(isSameParam.bind(null, key)))\n return warn(`Alias \"${b.record.path}\" and the original record: \"${a.record.path}\" must have the exact same param named \"${key.name}\"`);\n }\n}\nfunction checkChildMissingNameWithEmptyPath(mainNormalizedRecord, parent) {\n if (parent && parent.record.name && !mainNormalizedRecord.name && !mainNormalizedRecord.path) {\n warn(`The route named \"${String(parent.record.name)}\" has a child without a name and an empty path. Using that name won't render the empty path child so you probably want to move the name to the child instead. If this is intentional, add a name to the child route to remove the warning.`);\n }\n}\nfunction checkMissingParamsInAbsolutePath(record, parent) {\n for (const key of parent.keys) {\n if (!record.keys.find(isSameParam.bind(null, key)))\n return warn(`Absolute path \"${record.record.path}\" must have the exact same param named \"${key.name}\" as its parent \"${parent.record.path}\".`);\n }\n}\nfunction isRecordChildOf(record, parent) {\n return parent.children.some((child) => child === record || isRecordChildOf(record, child));\n}\nconst HASH_RE = /#/g;\nconst AMPERSAND_RE = /&/g;\nconst SLASH_RE = /\\//g;\nconst EQUAL_RE = /=/g;\nconst IM_RE = /\\?/g;\nconst PLUS_RE = /\\+/g;\nconst ENC_BRACKET_OPEN_RE = /%5B/g;\nconst ENC_BRACKET_CLOSE_RE = /%5D/g;\nconst ENC_CARET_RE = /%5E/g;\nconst ENC_BACKTICK_RE = /%60/g;\nconst ENC_CURLY_OPEN_RE = /%7B/g;\nconst ENC_PIPE_RE = /%7C/g;\nconst ENC_CURLY_CLOSE_RE = /%7D/g;\nconst ENC_SPACE_RE = /%20/g;\nfunction commonEncode(text) {\n return encodeURI(\"\" + text).replace(ENC_PIPE_RE, \"|\").replace(ENC_BRACKET_OPEN_RE, \"[\").replace(ENC_BRACKET_CLOSE_RE, \"]\");\n}\nfunction encodeHash(text) {\n return commonEncode(text).replace(ENC_CURLY_OPEN_RE, \"{\").replace(ENC_CURLY_CLOSE_RE, \"}\").replace(ENC_CARET_RE, \"^\");\n}\nfunction encodeQueryValue(text) {\n return commonEncode(text).replace(PLUS_RE, \"%2B\").replace(ENC_SPACE_RE, \"+\").replace(HASH_RE, \"%23\").replace(AMPERSAND_RE, \"%26\").replace(ENC_BACKTICK_RE, \"`\").replace(ENC_CURLY_OPEN_RE, \"{\").replace(ENC_CURLY_CLOSE_RE, \"}\").replace(ENC_CARET_RE, \"^\");\n}\nfunction encodeQueryKey(text) {\n return encodeQueryValue(text).replace(EQUAL_RE, \"%3D\");\n}\nfunction encodePath(text) {\n return commonEncode(text).replace(HASH_RE, \"%23\").replace(IM_RE, \"%3F\");\n}\nfunction encodeParam(text) {\n return text == null ? \"\" : encodePath(text).replace(SLASH_RE, \"%2F\");\n}\nfunction decode(text) {\n try {\n return decodeURIComponent(\"\" + text);\n } catch (err) {\n process.env.NODE_ENV !== \"production\" && warn(`Error decoding \"${text}\". Using original value`);\n }\n return \"\" + text;\n}\nfunction parseQuery(search) {\n const query = {};\n if (search === \"\" || search === \"?\")\n return query;\n const hasLeadingIM = search[0] === \"?\";\n const searchParams = (hasLeadingIM ? search.slice(1) : search).split(\"&\");\n for (let i = 0; i < searchParams.length; ++i) {\n const searchParam = searchParams[i].replace(PLUS_RE, \" \");\n const eqPos = searchParam.indexOf(\"=\");\n const key = decode(eqPos < 0 ? searchParam : searchParam.slice(0, eqPos));\n const value = eqPos < 0 ? null : decode(searchParam.slice(eqPos + 1));\n if (key in query) {\n let currentValue = query[key];\n if (!isArray(currentValue)) {\n currentValue = query[key] = [currentValue];\n }\n currentValue.push(value);\n } else {\n query[key] = value;\n }\n }\n return query;\n}\nfunction stringifyQuery(query) {\n let search = \"\";\n for (let key in query) {\n const value = query[key];\n key = encodeQueryKey(key);\n if (value == null) {\n if (value !== void 0) {\n search += (search.length ? \"&\" : \"\") + key;\n }\n continue;\n }\n const values = isArray(value) ? value.map((v) => v && encodeQueryValue(v)) : [value && encodeQueryValue(value)];\n values.forEach((value2) => {\n if (value2 !== void 0) {\n search += (search.length ? \"&\" : \"\") + key;\n if (value2 != null)\n search += \"=\" + value2;\n }\n });\n }\n return search;\n}\nfunction normalizeQuery(query) {\n const normalizedQuery = {};\n for (const key in query) {\n const value = query[key];\n if (value !== void 0) {\n normalizedQuery[key] = isArray(value) ? value.map((v) => v == null ? null : \"\" + v) : value == null ? value : \"\" + value;\n }\n }\n return normalizedQuery;\n}\nconst matchedRouteKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"router view location matched\" : \"\");\nconst viewDepthKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"router view depth\" : \"\");\nconst routerKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"router\" : \"\");\nconst routeLocationKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"route location\" : \"\");\nconst routerViewLocationKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"router view location\" : \"\");\nfunction useCallbacks() {\n let handlers = [];\n function add(handler) {\n handlers.push(handler);\n return () => {\n const i = handlers.indexOf(handler);\n if (i > -1)\n handlers.splice(i, 1);\n };\n }\n function reset() {\n handlers = [];\n }\n return {\n add,\n list: () => handlers,\n reset\n };\n}\nfunction guardToPromiseFn(guard, to, from, record, name) {\n const enterCallbackArray = record && // name is defined if record is because of the function overload\n (record.enterCallbacks[name] = record.enterCallbacks[name] || []);\n return () => new Promise((resolve, reject) => {\n const next = (valid) => {\n if (valid === false) {\n reject(createRouterError(4, {\n from,\n to\n }));\n } else if (valid instanceof Error) {\n reject(valid);\n } else if (isRouteLocation(valid)) {\n reject(createRouterError(2, {\n from: to,\n to: valid\n }));\n } else {\n if (enterCallbackArray && // since enterCallbackArray is truthy, both record and name also are\n record.enterCallbacks[name] === enterCallbackArray && typeof valid === \"function\") {\n enterCallbackArray.push(valid);\n }\n resolve();\n }\n };\n const guardReturn = guard.call(record && record.instances[name], to, from, process.env.NODE_ENV !== \"production\" ? canOnlyBeCalledOnce(next, to, from) : next);\n let guardCall = Promise.resolve(guardReturn);\n if (guard.length < 3)\n guardCall = guardCall.then(next);\n if (process.env.NODE_ENV !== \"production\" && guard.length > 2) {\n const message = `The \"next\" callback was never called inside of ${guard.name ? '\"' + guard.name + '\"' : \"\"}:\n${guard.toString()}\n. If you are returning a value instead of calling \"next\", make sure to remove the \"next\" parameter from your function.`;\n if (typeof guardReturn === \"object\" && \"then\" in guardReturn) {\n guardCall = guardCall.then((resolvedValue) => {\n if (!next._called) {\n warn(message);\n return Promise.reject(new Error(\"Invalid navigation guard\"));\n }\n return resolvedValue;\n });\n } else if (guardReturn !== void 0) {\n if (!next._called) {\n warn(message);\n reject(new Error(\"Invalid navigation guard\"));\n return;\n }\n }\n }\n guardCall.catch((err) => reject(err));\n });\n}\nfunction canOnlyBeCalledOnce(next, to, from) {\n let called = 0;\n return function() {\n if (called++ === 1)\n warn(`The \"next\" callback was called more than once in one navigation guard when going from \"${from.fullPath}\" to \"${to.fullPath}\". It should be called exactly one time in each navigation guard. This will fail in production.`);\n next._called = true;\n if (called === 1)\n next.apply(null, arguments);\n };\n}\nfunction extractComponentsGuards(matched, guardType, to, from) {\n const guards = [];\n for (const record of matched) {\n if (process.env.NODE_ENV !== \"production\" && !record.components && !record.children.length) {\n warn(`Record with path \"${record.path}\" is either missing a \"component(s)\" or \"children\" property.`);\n }\n for (const name in record.components) {\n let rawComponent = record.components[name];\n if (process.env.NODE_ENV !== \"production\") {\n if (!rawComponent || typeof rawComponent !== \"object\" && typeof rawComponent !== \"function\") {\n warn(`Component \"${name}\" in record with path \"${record.path}\" is not a valid component. Received \"${String(rawComponent)}\".`);\n throw new Error(\"Invalid route component\");\n } else if (\"then\" in rawComponent) {\n warn(`Component \"${name}\" in record with path \"${record.path}\" is a Promise instead of a function that returns a Promise. Did you write \"import('./MyPage.vue')\" instead of \"() => import('./MyPage.vue')\" ? This will break in production if not fixed.`);\n const promise = rawComponent;\n rawComponent = () => promise;\n } else if (rawComponent.__asyncLoader && // warn only once per component\n !rawComponent.__warnedDefineAsync) {\n rawComponent.__warnedDefineAsync = true;\n warn(`Component \"${name}\" in record with path \"${record.path}\" is defined using \"defineAsyncComponent()\". Write \"() => import('./MyPage.vue')\" instead of \"defineAsyncComponent(() => import('./MyPage.vue'))\".`);\n }\n }\n if (guardType !== \"beforeRouteEnter\" && !record.instances[name])\n continue;\n if (isRouteComponent(rawComponent)) {\n const options = rawComponent.__vccOpts || rawComponent;\n const guard = options[guardType];\n guard && guards.push(guardToPromiseFn(guard, to, from, record, name));\n } else {\n let componentPromise = rawComponent();\n if (process.env.NODE_ENV !== \"production\" && !(\"catch\" in componentPromise)) {\n warn(`Component \"${name}\" in record with path \"${record.path}\" is a function that does not return a Promise. If you were passing a functional component, make sure to add a \"displayName\" to the component. This will break in production if not fixed.`);\n componentPromise = Promise.resolve(componentPromise);\n }\n guards.push(() => componentPromise.then((resolved) => {\n if (!resolved)\n return Promise.reject(new Error(`Couldn't resolve component \"${name}\" at \"${record.path}\"`));\n const resolvedComponent = isESModule(resolved) ? resolved.default : resolved;\n record.components[name] = resolvedComponent;\n const options = resolvedComponent.__vccOpts || resolvedComponent;\n const guard = options[guardType];\n return guard && guardToPromiseFn(guard, to, from, record, name)();\n }));\n }\n }\n }\n return guards;\n}\nfunction isRouteComponent(component) {\n return typeof component === \"object\" || \"displayName\" in component || \"props\" in component || \"__vccOpts\" in component;\n}\nfunction useLink(props) {\n const router2 = inject(routerKey);\n const currentRoute = inject(routeLocationKey);\n const route = computed(() => router2.resolve(unref(props.to)));\n const activeRecordIndex = computed(() => {\n const { matched } = route.value;\n const { length } = matched;\n const routeMatched = matched[length - 1];\n const currentMatched = currentRoute.matched;\n if (!routeMatched || !currentMatched.length)\n return -1;\n const index2 = currentMatched.findIndex(isSameRouteRecord.bind(null, routeMatched));\n if (index2 > -1)\n return index2;\n const parentRecordPath = getOriginalPath(matched[length - 2]);\n return (\n // we are dealing with nested routes\n length > 1 && // if the parent and matched route have the same path, this link is\n // referring to the empty child. Or we currently are on a different\n // child of the same parent\n getOriginalPath(routeMatched) === parentRecordPath && // avoid comparing the child with its parent\n currentMatched[currentMatched.length - 1].path !== parentRecordPath ? currentMatched.findIndex(isSameRouteRecord.bind(null, matched[length - 2])) : index2\n );\n });\n const isActive = computed(() => activeRecordIndex.value > -1 && includesParams(currentRoute.params, route.value.params));\n const isExactActive = computed(() => activeRecordIndex.value > -1 && activeRecordIndex.value === currentRoute.matched.length - 1 && isSameRouteLocationParams(currentRoute.params, route.value.params));\n function navigate(e = {}) {\n if (guardEvent(e)) {\n return router2[unref(props.replace) ? \"replace\" : \"push\"](\n unref(props.to)\n // avoid uncaught errors are they are logged anyway\n ).catch(noop);\n }\n return Promise.resolve();\n }\n if ((process.env.NODE_ENV !== \"production\" || false) && isBrowser) {\n const instance = getCurrentInstance();\n if (instance) {\n const linkContextDevtools = {\n route: route.value,\n isActive: isActive.value,\n isExactActive: isExactActive.value\n };\n instance.__vrl_devtools = instance.__vrl_devtools || [];\n instance.__vrl_devtools.push(linkContextDevtools);\n watchEffect(() => {\n linkContextDevtools.route = route.value;\n linkContextDevtools.isActive = isActive.value;\n linkContextDevtools.isExactActive = isExactActive.value;\n }, { flush: \"post\" });\n }\n }\n return {\n route,\n href: computed(() => route.value.href),\n isActive,\n isExactActive,\n navigate\n };\n}\nconst RouterLinkImpl = /* @__PURE__ */ defineComponent({\n name: \"RouterLink\",\n compatConfig: { MODE: 3 },\n props: {\n to: {\n type: [String, Object],\n required: true\n },\n replace: Boolean,\n activeClass: String,\n // inactiveClass: String,\n exactActiveClass: String,\n custom: Boolean,\n ariaCurrentValue: {\n type: String,\n default: \"page\"\n }\n },\n useLink,\n setup(props, { slots }) {\n const link = reactive(useLink(props));\n const { options } = inject(routerKey);\n const elClass = computed(() => ({\n [getLinkClass(props.activeClass, options.linkActiveClass, \"router-link-active\")]: link.isActive,\n // [getLinkClass(\n // props.inactiveClass,\n // options.linkInactiveClass,\n // 'router-link-inactive'\n // )]: !link.isExactActive,\n [getLinkClass(props.exactActiveClass, options.linkExactActiveClass, \"router-link-exact-active\")]: link.isExactActive\n }));\n return () => {\n const children = slots.default && slots.default(link);\n return props.custom ? children : h$1(\"a\", {\n \"aria-current\": link.isExactActive ? props.ariaCurrentValue : null,\n href: link.href,\n // this would override user added attrs but Vue will still add\n // the listener, so we end up triggering both\n onClick: link.navigate,\n class: elClass.value\n }, children);\n };\n }\n});\nconst RouterLink = RouterLinkImpl;\nfunction guardEvent(e) {\n if (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey)\n return;\n if (e.defaultPrevented)\n return;\n if (e.button !== void 0 && e.button !== 0)\n return;\n if (e.currentTarget && e.currentTarget.getAttribute) {\n const target = e.currentTarget.getAttribute(\"target\");\n if (/\\b_blank\\b/i.test(target))\n return;\n }\n if (e.preventDefault)\n e.preventDefault();\n return true;\n}\nfunction includesParams(outer, inner) {\n for (const key in inner) {\n const innerValue = inner[key];\n const outerValue = outer[key];\n if (typeof innerValue === \"string\") {\n if (innerValue !== outerValue)\n return false;\n } else {\n if (!isArray(outerValue) || outerValue.length !== innerValue.length || innerValue.some((value, i) => value !== outerValue[i]))\n return false;\n }\n }\n return true;\n}\nfunction getOriginalPath(record) {\n return record ? record.aliasOf ? record.aliasOf.path : record.path : \"\";\n}\nconst getLinkClass = (propClass, globalClass, defaultClass) => propClass != null ? propClass : globalClass != null ? globalClass : defaultClass;\nconst RouterViewImpl = /* @__PURE__ */ defineComponent({\n name: \"RouterView\",\n // #674 we manually inherit them\n inheritAttrs: false,\n props: {\n name: {\n type: String,\n default: \"default\"\n },\n route: Object\n },\n // Better compat for @vue/compat users\n // https://github.com/vuejs/router/issues/1315\n compatConfig: { MODE: 3 },\n setup(props, { attrs, slots }) {\n process.env.NODE_ENV !== \"production\" && warnDeprecatedUsage();\n const injectedRoute = inject(routerViewLocationKey);\n const routeToDisplay = computed(() => props.route || injectedRoute.value);\n const injectedDepth = inject(viewDepthKey, 0);\n const depth = computed(() => {\n let initialDepth = unref(injectedDepth);\n const { matched } = routeToDisplay.value;\n let matchedRoute;\n while ((matchedRoute = matched[initialDepth]) && !matchedRoute.components) {\n initialDepth++;\n }\n return initialDepth;\n });\n const matchedRouteRef = computed(() => routeToDisplay.value.matched[depth.value]);\n provide(viewDepthKey, computed(() => depth.value + 1));\n provide(matchedRouteKey, matchedRouteRef);\n provide(routerViewLocationKey, routeToDisplay);\n const viewRef = ref();\n watch(() => [viewRef.value, matchedRouteRef.value, props.name], ([instance, to, name], [oldInstance, from, oldName]) => {\n if (to) {\n to.instances[name] = instance;\n if (from && from !== to && instance && instance === oldInstance) {\n if (!to.leaveGuards.size) {\n to.leaveGuards = from.leaveGuards;\n }\n if (!to.updateGuards.size) {\n to.updateGuards = from.updateGuards;\n }\n }\n }\n if (instance && to && // if there is no instance but to and from are the same this might be\n // the first visit\n (!from || !isSameRouteRecord(to, from) || !oldInstance)) {\n (to.enterCallbacks[name] || []).forEach((callback) => callback(instance));\n }\n }, { flush: \"post\" });\n return () => {\n const route = routeToDisplay.value;\n const currentName = props.name;\n const matchedRoute = matchedRouteRef.value;\n const ViewComponent = matchedRoute && matchedRoute.components[currentName];\n if (!ViewComponent) {\n return normalizeSlot(slots.default, { Component: ViewComponent, route });\n }\n const routePropsOption = matchedRoute.props[currentName];\n const routeProps = routePropsOption ? routePropsOption === true ? route.params : typeof routePropsOption === \"function\" ? routePropsOption(route) : routePropsOption : null;\n const onVnodeUnmounted = (vnode) => {\n if (vnode.component.isUnmounted) {\n matchedRoute.instances[currentName] = null;\n }\n };\n const component = h$1(ViewComponent, assign({}, routeProps, attrs, {\n onVnodeUnmounted,\n ref: viewRef\n }));\n if ((process.env.NODE_ENV !== \"production\" || false) && isBrowser && component.ref) {\n const info = {\n depth: depth.value,\n name: matchedRoute.name,\n path: matchedRoute.path,\n meta: matchedRoute.meta\n };\n const internalInstances = isArray(component.ref) ? component.ref.map((r) => r.i) : [component.ref.i];\n internalInstances.forEach((instance) => {\n instance.__vrv_devtools = info;\n });\n }\n return (\n // pass the vnode to the slot as a prop.\n // h and both accept vnodes\n normalizeSlot(slots.default, { Component: component, route }) || component\n );\n };\n }\n});\nfunction normalizeSlot(slot, data) {\n if (!slot)\n return null;\n const slotContent = slot(data);\n return slotContent.length === 1 ? slotContent[0] : slotContent;\n}\nconst RouterView = RouterViewImpl;\nfunction warnDeprecatedUsage() {\n const instance = getCurrentInstance();\n const parentName = instance.parent && instance.parent.type.name;\n if (parentName && (parentName === \"KeepAlive\" || parentName.includes(\"Transition\"))) {\n const comp = parentName === \"KeepAlive\" ? \"keep-alive\" : \"transition\";\n warn(` can no longer be used directly inside or .\nUse slot props instead:\n\n\n <${comp}>\n \n \n`);\n }\n}\nfunction formatRouteLocation(routeLocation, tooltip) {\n const copy = assign({}, routeLocation, {\n // remove variables that can contain vue instances\n matched: routeLocation.matched.map((matched) => omit(matched, [\"instances\", \"children\", \"aliasOf\"]))\n });\n return {\n _custom: {\n type: null,\n readOnly: true,\n display: routeLocation.fullPath,\n tooltip,\n value: copy\n }\n };\n}\nfunction formatDisplay(display) {\n return {\n _custom: {\n display\n }\n };\n}\nlet routerId = 0;\nfunction addDevtools(app, router2, matcher) {\n if (router2.__hasDevtools)\n return;\n router2.__hasDevtools = true;\n const id = routerId++;\n setupDevtoolsPlugin({\n id: \"org.vuejs.router\" + (id ? \".\" + id : \"\"),\n label: \"Vue Router\",\n packageName: \"vue-router\",\n homepage: \"https://router.vuejs.org\",\n logo: \"https://router.vuejs.org/logo.png\",\n componentStateTypes: [\"Routing\"],\n app\n }, (api) => {\n if (typeof api.now !== \"function\") {\n console.warn(\"[Vue Router]: You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html.\");\n }\n api.on.inspectComponent((payload, ctx) => {\n if (payload.instanceData) {\n payload.instanceData.state.push({\n type: \"Routing\",\n key: \"$route\",\n editable: false,\n value: formatRouteLocation(router2.currentRoute.value, \"Current Route\")\n });\n }\n });\n api.on.visitComponentTree(({ treeNode: node, componentInstance }) => {\n if (componentInstance.__vrv_devtools) {\n const info = componentInstance.__vrv_devtools;\n node.tags.push({\n label: (info.name ? `${info.name.toString()}: ` : \"\") + info.path,\n textColor: 0,\n tooltip: \"This component is rendered by <router-view>\",\n backgroundColor: PINK_500\n });\n }\n if (isArray(componentInstance.__vrl_devtools)) {\n componentInstance.__devtoolsApi = api;\n componentInstance.__vrl_devtools.forEach((devtoolsData) => {\n let backgroundColor = ORANGE_400;\n let tooltip = \"\";\n if (devtoolsData.isExactActive) {\n backgroundColor = LIME_500;\n tooltip = \"This is exactly active\";\n } else if (devtoolsData.isActive) {\n backgroundColor = BLUE_600;\n tooltip = \"This link is active\";\n }\n node.tags.push({\n label: devtoolsData.route.path,\n textColor: 0,\n tooltip,\n backgroundColor\n });\n });\n }\n });\n watch(router2.currentRoute, () => {\n refreshRoutesView();\n api.notifyComponentUpdate();\n api.sendInspectorTree(routerInspectorId);\n api.sendInspectorState(routerInspectorId);\n });\n const navigationsLayerId = \"router:navigations:\" + id;\n api.addTimelineLayer({\n id: navigationsLayerId,\n label: `Router${id ? \" \" + id : \"\"} Navigations`,\n color: 4237508\n });\n router2.onError((error, to) => {\n api.addTimelineEvent({\n layerId: navigationsLayerId,\n event: {\n title: \"Error during Navigation\",\n subtitle: to.fullPath,\n logType: \"error\",\n time: api.now(),\n data: { error },\n groupId: to.meta.__navigationId\n }\n });\n });\n let navigationId = 0;\n router2.beforeEach((to, from) => {\n const data = {\n guard: formatDisplay(\"beforeEach\"),\n from: formatRouteLocation(from, \"Current Location during this navigation\"),\n to: formatRouteLocation(to, \"Target location\")\n };\n Object.defineProperty(to.meta, \"__navigationId\", {\n value: navigationId++\n });\n api.addTimelineEvent({\n layerId: navigationsLayerId,\n event: {\n time: api.now(),\n title: \"Start of navigation\",\n subtitle: to.fullPath,\n data,\n groupId: to.meta.__navigationId\n }\n });\n });\n router2.afterEach((to, from, failure) => {\n const data = {\n guard: formatDisplay(\"afterEach\")\n };\n if (failure) {\n data.failure = {\n _custom: {\n type: Error,\n readOnly: true,\n display: failure ? failure.message : \"\",\n tooltip: \"Navigation Failure\",\n value: failure\n }\n };\n data.status = formatDisplay(\"❌\");\n } else {\n data.status = formatDisplay(\"✅\");\n }\n data.from = formatRouteLocation(from, \"Current Location during this navigation\");\n data.to = formatRouteLocation(to, \"Target location\");\n api.addTimelineEvent({\n layerId: navigationsLayerId,\n event: {\n title: \"End of navigation\",\n subtitle: to.fullPath,\n time: api.now(),\n data,\n logType: failure ? \"warning\" : \"default\",\n groupId: to.meta.__navigationId\n }\n });\n });\n const routerInspectorId = \"router-inspector:\" + id;\n api.addInspector({\n id: routerInspectorId,\n label: \"Routes\" + (id ? \" \" + id : \"\"),\n icon: \"book\",\n treeFilterPlaceholder: \"Search routes\"\n });\n function refreshRoutesView() {\n if (!activeRoutesPayload)\n return;\n const payload = activeRoutesPayload;\n let routes = matcher.getRoutes().filter((route) => !route.parent);\n routes.forEach(resetMatchStateOnRouteRecord);\n if (payload.filter) {\n routes = routes.filter((route) => (\n // save matches state based on the payload\n isRouteMatching(route, payload.filter.toLowerCase())\n ));\n }\n routes.forEach((route) => markRouteRecordActive(route, router2.currentRoute.value));\n payload.rootNodes = routes.map(formatRouteRecordForInspector);\n }\n let activeRoutesPayload;\n api.on.getInspectorTree((payload) => {\n activeRoutesPayload = payload;\n if (payload.app === app && payload.inspectorId === routerInspectorId) {\n refreshRoutesView();\n }\n });\n api.on.getInspectorState((payload) => {\n if (payload.app === app && payload.inspectorId === routerInspectorId) {\n const routes = matcher.getRoutes();\n const route = routes.find((route2) => route2.record.__vd_id === payload.nodeId);\n if (route) {\n payload.state = {\n options: formatRouteRecordMatcherForStateInspector(route)\n };\n }\n }\n });\n api.sendInspectorTree(routerInspectorId);\n api.sendInspectorState(routerInspectorId);\n });\n}\nfunction modifierForKey(key) {\n if (key.optional) {\n return key.repeatable ? \"*\" : \"?\";\n } else {\n return key.repeatable ? \"+\" : \"\";\n }\n}\nfunction formatRouteRecordMatcherForStateInspector(route) {\n const { record } = route;\n const fields = [\n { editable: false, key: \"path\", value: record.path }\n ];\n if (record.name != null) {\n fields.push({\n editable: false,\n key: \"name\",\n value: record.name\n });\n }\n fields.push({ editable: false, key: \"regexp\", value: route.re });\n if (route.keys.length) {\n fields.push({\n editable: false,\n key: \"keys\",\n value: {\n _custom: {\n type: null,\n readOnly: true,\n display: route.keys.map((key) => `${key.name}${modifierForKey(key)}`).join(\" \"),\n tooltip: \"Param keys\",\n value: route.keys\n }\n }\n });\n }\n if (record.redirect != null) {\n fields.push({\n editable: false,\n key: \"redirect\",\n value: record.redirect\n });\n }\n if (route.alias.length) {\n fields.push({\n editable: false,\n key: \"aliases\",\n value: route.alias.map((alias) => alias.record.path)\n });\n }\n if (Object.keys(route.record.meta).length) {\n fields.push({\n editable: false,\n key: \"meta\",\n value: route.record.meta\n });\n }\n fields.push({\n key: \"score\",\n editable: false,\n value: {\n _custom: {\n type: null,\n readOnly: true,\n display: route.score.map((score) => score.join(\", \")).join(\" | \"),\n tooltip: \"Score used to sort routes\",\n value: route.score\n }\n }\n });\n return fields;\n}\nconst PINK_500 = 15485081;\nconst BLUE_600 = 2450411;\nconst LIME_500 = 8702998;\nconst CYAN_400 = 2282478;\nconst ORANGE_400 = 16486972;\nconst DARK = 6710886;\nfunction formatRouteRecordForInspector(route) {\n const tags = [];\n const { record } = route;\n if (record.name != null) {\n tags.push({\n label: String(record.name),\n textColor: 0,\n backgroundColor: CYAN_400\n });\n }\n if (record.aliasOf) {\n tags.push({\n label: \"alias\",\n textColor: 0,\n backgroundColor: ORANGE_400\n });\n }\n if (route.__vd_match) {\n tags.push({\n label: \"matches\",\n textColor: 0,\n backgroundColor: PINK_500\n });\n }\n if (route.__vd_exactActive) {\n tags.push({\n label: \"exact\",\n textColor: 0,\n backgroundColor: LIME_500\n });\n }\n if (route.__vd_active) {\n tags.push({\n label: \"active\",\n textColor: 0,\n backgroundColor: BLUE_600\n });\n }\n if (record.redirect) {\n tags.push({\n label: typeof record.redirect === \"string\" ? `redirect: ${record.redirect}` : \"redirects\",\n textColor: 16777215,\n backgroundColor: DARK\n });\n }\n let id = record.__vd_id;\n if (id == null) {\n id = String(routeRecordId++);\n record.__vd_id = id;\n }\n return {\n id,\n label: record.path,\n tags,\n children: route.children.map(formatRouteRecordForInspector)\n };\n}\nlet routeRecordId = 0;\nconst EXTRACT_REGEXP_RE = /^\\/(.*)\\/([a-z]*)$/;\nfunction markRouteRecordActive(route, currentRoute) {\n const isExactActive = currentRoute.matched.length && isSameRouteRecord(currentRoute.matched[currentRoute.matched.length - 1], route.record);\n route.__vd_exactActive = route.__vd_active = isExactActive;\n if (!isExactActive) {\n route.__vd_active = currentRoute.matched.some((match) => isSameRouteRecord(match, route.record));\n }\n route.children.forEach((childRoute) => markRouteRecordActive(childRoute, currentRoute));\n}\nfunction resetMatchStateOnRouteRecord(route) {\n route.__vd_match = false;\n route.children.forEach(resetMatchStateOnRouteRecord);\n}\nfunction isRouteMatching(route, filter) {\n const found = String(route.re).match(EXTRACT_REGEXP_RE);\n route.__vd_match = false;\n if (!found || found.length < 3) {\n return false;\n }\n const nonEndingRE = new RegExp(found[1].replace(/\\$$/, \"\"), found[2]);\n if (nonEndingRE.test(filter)) {\n route.children.forEach((child) => isRouteMatching(child, filter));\n if (route.record.path !== \"/\" || filter === \"/\") {\n route.__vd_match = route.re.test(filter);\n return true;\n }\n return false;\n }\n const path = route.record.path.toLowerCase();\n const decodedPath = decode(path);\n if (!filter.startsWith(\"/\") && (decodedPath.includes(filter) || path.includes(filter)))\n return true;\n if (decodedPath.startsWith(filter) || path.startsWith(filter))\n return true;\n if (route.record.name && String(route.record.name).includes(filter))\n return true;\n return route.children.some((child) => isRouteMatching(child, filter));\n}\nfunction omit(obj, keys) {\n const ret = {};\n for (const key in obj) {\n if (!keys.includes(key)) {\n ret[key] = obj[key];\n }\n }\n return ret;\n}\nfunction createRouter(options) {\n const matcher = createRouterMatcher(options.routes, options);\n const parseQuery$1 = options.parseQuery || parseQuery;\n const stringifyQuery$1 = options.stringifyQuery || stringifyQuery;\n const routerHistory = options.history;\n if (process.env.NODE_ENV !== \"production\" && !routerHistory)\n throw new Error('Provide the \"history\" option when calling \"createRouter()\": https://next.router.vuejs.org/api/#history.');\n const beforeGuards = useCallbacks();\n const beforeResolveGuards = useCallbacks();\n const afterGuards = useCallbacks();\n const currentRoute = shallowRef(START_LOCATION_NORMALIZED);\n let pendingLocation = START_LOCATION_NORMALIZED;\n if (isBrowser && options.scrollBehavior && \"scrollRestoration\" in history) {\n history.scrollRestoration = \"manual\";\n }\n const normalizeParams = applyToParams.bind(null, (paramValue) => \"\" + paramValue);\n const encodeParams = applyToParams.bind(null, encodeParam);\n const decodeParams = (\n // @ts-expect-error: intentionally avoid the type check\n applyToParams.bind(null, decode)\n );\n function addRoute(parentOrRoute, route) {\n let parent;\n let record;\n if (isRouteName(parentOrRoute)) {\n parent = matcher.getRecordMatcher(parentOrRoute);\n record = route;\n } else {\n record = parentOrRoute;\n }\n return matcher.addRoute(record, parent);\n }\n function removeRoute(name) {\n const recordMatcher = matcher.getRecordMatcher(name);\n if (recordMatcher) {\n matcher.removeRoute(recordMatcher);\n } else if (process.env.NODE_ENV !== \"production\") {\n warn(`Cannot remove non-existent route \"${String(name)}\"`);\n }\n }\n function getRoutes() {\n return matcher.getRoutes().map((routeMatcher) => routeMatcher.record);\n }\n function hasRoute(name) {\n return !!matcher.getRecordMatcher(name);\n }\n function resolve(rawLocation, currentLocation) {\n currentLocation = assign({}, currentLocation || currentRoute.value);\n if (typeof rawLocation === \"string\") {\n const locationNormalized = parseURL(parseQuery$1, rawLocation, currentLocation.path);\n const matchedRoute2 = matcher.resolve({ path: locationNormalized.path }, currentLocation);\n const href2 = routerHistory.createHref(locationNormalized.fullPath);\n if (process.env.NODE_ENV !== \"production\") {\n if (href2.startsWith(\"//\"))\n warn(`Location \"${rawLocation}\" resolved to \"${href2}\". A resolved location cannot start with multiple slashes.`);\n else if (!matchedRoute2.matched.length) {\n warn(`No match found for location with path \"${rawLocation}\"`);\n }\n }\n return assign(locationNormalized, matchedRoute2, {\n params: decodeParams(matchedRoute2.params),\n hash: decode(locationNormalized.hash),\n redirectedFrom: void 0,\n href: href2\n });\n }\n let matcherLocation;\n if (\"path\" in rawLocation) {\n if (process.env.NODE_ENV !== \"production\" && \"params\" in rawLocation && !(\"name\" in rawLocation) && // @ts-expect-error: the type is never\n Object.keys(rawLocation.params).length) {\n warn(`Path \"${// @ts-expect-error: the type is never\n rawLocation.path}\" was passed with params but they will be ignored. Use a named route alongside params instead.`);\n }\n matcherLocation = assign({}, rawLocation, {\n path: parseURL(parseQuery$1, rawLocation.path, currentLocation.path).path\n });\n } else {\n const targetParams = assign({}, rawLocation.params);\n for (const key in targetParams) {\n if (targetParams[key] == null) {\n delete targetParams[key];\n }\n }\n matcherLocation = assign({}, rawLocation, {\n params: encodeParams(rawLocation.params)\n });\n currentLocation.params = encodeParams(currentLocation.params);\n }\n const matchedRoute = matcher.resolve(matcherLocation, currentLocation);\n const hash = rawLocation.hash || \"\";\n if (process.env.NODE_ENV !== \"production\" && hash && !hash.startsWith(\"#\")) {\n warn(`A \\`hash\\` should always start with the character \"#\". Replace \"${hash}\" with \"#${hash}\".`);\n }\n matchedRoute.params = normalizeParams(decodeParams(matchedRoute.params));\n const fullPath = stringifyURL(stringifyQuery$1, assign({}, rawLocation, {\n hash: encodeHash(hash),\n path: matchedRoute.path\n }));\n const href = routerHistory.createHref(fullPath);\n if (process.env.NODE_ENV !== \"production\") {\n if (href.startsWith(\"//\")) {\n warn(`Location \"${rawLocation}\" resolved to \"${href}\". A resolved location cannot start with multiple slashes.`);\n } else if (!matchedRoute.matched.length) {\n warn(`No match found for location with path \"${\"path\" in rawLocation ? rawLocation.path : rawLocation}\"`);\n }\n }\n return assign({\n fullPath,\n // keep the hash encoded so fullPath is effectively path + encodedQuery +\n // hash\n hash,\n query: (\n // if the user is using a custom query lib like qs, we might have\n // nested objects, so we keep the query as is, meaning it can contain\n // numbers at `$route.query`, but at the point, the user will have to\n // use their own type anyway.\n // https://github.com/vuejs/router/issues/328#issuecomment-649481567\n stringifyQuery$1 === stringifyQuery ? normalizeQuery(rawLocation.query) : rawLocation.query || {}\n )\n }, matchedRoute, {\n redirectedFrom: void 0,\n href\n });\n }\n function locationAsObject(to) {\n return typeof to === \"string\" ? parseURL(parseQuery$1, to, currentRoute.value.path) : assign({}, to);\n }\n function checkCanceledNavigation(to, from) {\n if (pendingLocation !== to) {\n return createRouterError(8, {\n from,\n to\n });\n }\n }\n function push(to) {\n return pushWithRedirect(to);\n }\n function replace(to) {\n return push(assign(locationAsObject(to), { replace: true }));\n }\n function handleRedirectRecord(to) {\n const lastMatched = to.matched[to.matched.length - 1];\n if (lastMatched && lastMatched.redirect) {\n const { redirect } = lastMatched;\n let newTargetLocation = typeof redirect === \"function\" ? redirect(to) : redirect;\n if (typeof newTargetLocation === \"string\") {\n newTargetLocation = newTargetLocation.includes(\"?\") || newTargetLocation.includes(\"#\") ? newTargetLocation = locationAsObject(newTargetLocation) : (\n // force empty params\n { path: newTargetLocation }\n );\n newTargetLocation.params = {};\n }\n if (process.env.NODE_ENV !== \"production\" && !(\"path\" in newTargetLocation) && !(\"name\" in newTargetLocation)) {\n warn(`Invalid redirect found:\n${JSON.stringify(newTargetLocation, null, 2)}\n when navigating to \"${to.fullPath}\". A redirect must contain a name or path. This will break in production.`);\n throw new Error(\"Invalid redirect\");\n }\n return assign({\n query: to.query,\n hash: to.hash,\n // avoid transferring params if the redirect has a path\n params: \"path\" in newTargetLocation ? {} : to.params\n }, newTargetLocation);\n }\n }\n function pushWithRedirect(to, redirectedFrom) {\n const targetLocation = pendingLocation = resolve(to);\n const from = currentRoute.value;\n const data = to.state;\n const force = to.force;\n const replace2 = to.replace === true;\n const shouldRedirect = handleRedirectRecord(targetLocation);\n if (shouldRedirect)\n return pushWithRedirect(\n assign(locationAsObject(shouldRedirect), {\n state: typeof shouldRedirect === \"object\" ? assign({}, data, shouldRedirect.state) : data,\n force,\n replace: replace2\n }),\n // keep original redirectedFrom if it exists\n redirectedFrom || targetLocation\n );\n const toLocation = targetLocation;\n toLocation.redirectedFrom = redirectedFrom;\n let failure;\n if (!force && isSameRouteLocation(stringifyQuery$1, from, targetLocation)) {\n failure = createRouterError(16, { to: toLocation, from });\n handleScroll(\n from,\n from,\n // this is a push, the only way for it to be triggered from a\n // history.listen is with a redirect, which makes it become a push\n true,\n // This cannot be the first navigation because the initial location\n // cannot be manually navigated to\n false\n );\n }\n return (failure ? Promise.resolve(failure) : navigate(toLocation, from)).catch((error) => isNavigationFailure(error) ? (\n // navigation redirects still mark the router as ready\n isNavigationFailure(\n error,\n 2\n /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */\n ) ? error : markAsReady(error)\n ) : (\n // reject any unknown error\n triggerError(error, toLocation, from)\n )).then((failure2) => {\n if (failure2) {\n if (isNavigationFailure(\n failure2,\n 2\n /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */\n )) {\n if (process.env.NODE_ENV !== \"production\" && // we are redirecting to the same location we were already at\n isSameRouteLocation(stringifyQuery$1, resolve(failure2.to), toLocation) && // and we have done it a couple of times\n redirectedFrom && // @ts-expect-error: added only in dev\n (redirectedFrom._count = redirectedFrom._count ? (\n // @ts-expect-error\n redirectedFrom._count + 1\n ) : 1) > 10) {\n warn(`Detected an infinite redirection in a navigation guard when going from \"${from.fullPath}\" to \"${toLocation.fullPath}\". Aborting to avoid a Stack Overflow. This will break in production if not fixed.`);\n return Promise.reject(new Error(\"Infinite redirect in navigation guard\"));\n }\n return pushWithRedirect(\n // keep options\n assign({\n // preserve an existing replacement but allow the redirect to override it\n replace: replace2\n }, locationAsObject(failure2.to), {\n state: typeof failure2.to === \"object\" ? assign({}, data, failure2.to.state) : data,\n force\n }),\n // preserve the original redirectedFrom if any\n redirectedFrom || toLocation\n );\n }\n } else {\n failure2 = finalizeNavigation(toLocation, from, true, replace2, data);\n }\n triggerAfterEach(toLocation, from, failure2);\n return failure2;\n });\n }\n function checkCanceledNavigationAndReject(to, from) {\n const error = checkCanceledNavigation(to, from);\n return error ? Promise.reject(error) : Promise.resolve();\n }\n function navigate(to, from) {\n let guards;\n const [leavingRecords, updatingRecords, enteringRecords] = extractChangingRecords(to, from);\n guards = extractComponentsGuards(leavingRecords.reverse(), \"beforeRouteLeave\", to, from);\n for (const record of leavingRecords) {\n record.leaveGuards.forEach((guard) => {\n guards.push(guardToPromiseFn(guard, to, from));\n });\n }\n const canceledNavigationCheck = checkCanceledNavigationAndReject.bind(null, to, from);\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards).then(() => {\n guards = [];\n for (const guard of beforeGuards.list()) {\n guards.push(guardToPromiseFn(guard, to, from));\n }\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards);\n }).then(() => {\n guards = extractComponentsGuards(updatingRecords, \"beforeRouteUpdate\", to, from);\n for (const record of updatingRecords) {\n record.updateGuards.forEach((guard) => {\n guards.push(guardToPromiseFn(guard, to, from));\n });\n }\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards);\n }).then(() => {\n guards = [];\n for (const record of to.matched) {\n if (record.beforeEnter && !from.matched.includes(record)) {\n if (isArray(record.beforeEnter)) {\n for (const beforeEnter of record.beforeEnter)\n guards.push(guardToPromiseFn(beforeEnter, to, from));\n } else {\n guards.push(guardToPromiseFn(record.beforeEnter, to, from));\n }\n }\n }\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards);\n }).then(() => {\n to.matched.forEach((record) => record.enterCallbacks = {});\n guards = extractComponentsGuards(enteringRecords, \"beforeRouteEnter\", to, from);\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards);\n }).then(() => {\n guards = [];\n for (const guard of beforeResolveGuards.list()) {\n guards.push(guardToPromiseFn(guard, to, from));\n }\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards);\n }).catch((err) => isNavigationFailure(\n err,\n 8\n /* ErrorTypes.NAVIGATION_CANCELLED */\n ) ? err : Promise.reject(err));\n }\n function triggerAfterEach(to, from, failure) {\n for (const guard of afterGuards.list())\n guard(to, from, failure);\n }\n function finalizeNavigation(toLocation, from, isPush, replace2, data) {\n const error = checkCanceledNavigation(toLocation, from);\n if (error)\n return error;\n const isFirstNavigation = from === START_LOCATION_NORMALIZED;\n const state = !isBrowser ? {} : history.state;\n if (isPush) {\n if (replace2 || isFirstNavigation)\n routerHistory.replace(toLocation.fullPath, assign({\n scroll: isFirstNavigation && state && state.scroll\n }, data));\n else\n routerHistory.push(toLocation.fullPath, data);\n }\n currentRoute.value = toLocation;\n handleScroll(toLocation, from, isPush, isFirstNavigation);\n markAsReady();\n }\n let removeHistoryListener;\n function setupListeners() {\n if (removeHistoryListener)\n return;\n removeHistoryListener = routerHistory.listen((to, _from, info) => {\n if (!router2.listening)\n return;\n const toLocation = resolve(to);\n const shouldRedirect = handleRedirectRecord(toLocation);\n if (shouldRedirect) {\n pushWithRedirect(assign(shouldRedirect, { replace: true }), toLocation).catch(noop);\n return;\n }\n pendingLocation = toLocation;\n const from = currentRoute.value;\n if (isBrowser) {\n saveScrollPosition(getScrollKey(from.fullPath, info.delta), computeScrollPosition());\n }\n navigate(toLocation, from).catch((error) => {\n if (isNavigationFailure(\n error,\n 4 | 8\n /* ErrorTypes.NAVIGATION_CANCELLED */\n )) {\n return error;\n }\n if (isNavigationFailure(\n error,\n 2\n /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */\n )) {\n pushWithRedirect(\n error.to,\n toLocation\n // avoid an uncaught rejection, let push call triggerError\n ).then((failure) => {\n if (isNavigationFailure(\n failure,\n 4 | 16\n /* ErrorTypes.NAVIGATION_DUPLICATED */\n ) && !info.delta && info.type === NavigationType.pop) {\n routerHistory.go(-1, false);\n }\n }).catch(noop);\n return Promise.reject();\n }\n if (info.delta) {\n routerHistory.go(-info.delta, false);\n }\n return triggerError(error, toLocation, from);\n }).then((failure) => {\n failure = failure || finalizeNavigation(\n // after navigation, all matched components are resolved\n toLocation,\n from,\n false\n );\n if (failure) {\n if (info.delta && // a new navigation has been triggered, so we do not want to revert, that will change the current history\n // entry while a different route is displayed\n !isNavigationFailure(\n failure,\n 8\n /* ErrorTypes.NAVIGATION_CANCELLED */\n )) {\n routerHistory.go(-info.delta, false);\n } else if (info.type === NavigationType.pop && isNavigationFailure(\n failure,\n 4 | 16\n /* ErrorTypes.NAVIGATION_DUPLICATED */\n )) {\n routerHistory.go(-1, false);\n }\n }\n triggerAfterEach(toLocation, from, failure);\n }).catch(noop);\n });\n }\n let readyHandlers = useCallbacks();\n let errorHandlers = useCallbacks();\n let ready;\n function triggerError(error, to, from) {\n markAsReady(error);\n const list = errorHandlers.list();\n if (list.length) {\n list.forEach((handler) => handler(error, to, from));\n } else {\n if (process.env.NODE_ENV !== \"production\") {\n warn(\"uncaught error during route navigation:\");\n }\n console.error(error);\n }\n return Promise.reject(error);\n }\n function isReady() {\n if (ready && currentRoute.value !== START_LOCATION_NORMALIZED)\n return Promise.resolve();\n return new Promise((resolve2, reject) => {\n readyHandlers.add([resolve2, reject]);\n });\n }\n function markAsReady(err) {\n if (!ready) {\n ready = !err;\n setupListeners();\n readyHandlers.list().forEach(([resolve2, reject]) => err ? reject(err) : resolve2());\n readyHandlers.reset();\n }\n return err;\n }\n function handleScroll(to, from, isPush, isFirstNavigation) {\n const { scrollBehavior } = options;\n if (!isBrowser || !scrollBehavior)\n return Promise.resolve();\n const scrollPosition = !isPush && getSavedScrollPosition(getScrollKey(to.fullPath, 0)) || (isFirstNavigation || !isPush) && history.state && history.state.scroll || null;\n return nextTick().then(() => scrollBehavior(to, from, scrollPosition)).then((position) => position && scrollToPosition(position)).catch((err) => triggerError(err, to, from));\n }\n const go = (delta) => routerHistory.go(delta);\n let started;\n const installedApps = /* @__PURE__ */ new Set();\n const router2 = {\n currentRoute,\n listening: true,\n addRoute,\n removeRoute,\n hasRoute,\n getRoutes,\n resolve,\n options,\n push,\n replace,\n go,\n back: () => go(-1),\n forward: () => go(1),\n beforeEach: beforeGuards.add,\n beforeResolve: beforeResolveGuards.add,\n afterEach: afterGuards.add,\n onError: errorHandlers.add,\n isReady,\n install(app) {\n const router3 = this;\n app.component(\"RouterLink\", RouterLink);\n app.component(\"RouterView\", RouterView);\n app.config.globalProperties.$router = router3;\n Object.defineProperty(app.config.globalProperties, \"$route\", {\n enumerable: true,\n get: () => unref(currentRoute)\n });\n if (isBrowser && // used for the initial navigation client side to avoid pushing\n // multiple times when the router is used in multiple apps\n !started && currentRoute.value === START_LOCATION_NORMALIZED) {\n started = true;\n push(routerHistory.location).catch((err) => {\n if (process.env.NODE_ENV !== \"production\")\n warn(\"Unexpected error when starting the router:\", err);\n });\n }\n const reactiveRoute = {};\n for (const key in START_LOCATION_NORMALIZED) {\n reactiveRoute[key] = computed(() => currentRoute.value[key]);\n }\n app.provide(routerKey, router3);\n app.provide(routeLocationKey, reactive(reactiveRoute));\n app.provide(routerViewLocationKey, currentRoute);\n const unmountApp = app.unmount;\n installedApps.add(app);\n app.unmount = function() {\n installedApps.delete(app);\n if (installedApps.size < 1) {\n pendingLocation = START_LOCATION_NORMALIZED;\n removeHistoryListener && removeHistoryListener();\n removeHistoryListener = null;\n currentRoute.value = START_LOCATION_NORMALIZED;\n started = false;\n ready = false;\n }\n unmountApp();\n };\n if ((process.env.NODE_ENV !== \"production\" || false) && isBrowser) {\n addDevtools(app, router3, matcher);\n }\n }\n };\n return router2;\n}\nfunction runGuardQueue(guards) {\n return guards.reduce((promise, guard) => promise.then(() => guard()), Promise.resolve());\n}\nfunction extractChangingRecords(to, from) {\n const leavingRecords = [];\n const updatingRecords = [];\n const enteringRecords = [];\n const len = Math.max(from.matched.length, to.matched.length);\n for (let i = 0; i < len; i++) {\n const recordFrom = from.matched[i];\n if (recordFrom) {\n if (to.matched.find((record) => isSameRouteRecord(record, recordFrom)))\n updatingRecords.push(recordFrom);\n else\n leavingRecords.push(recordFrom);\n }\n const recordTo = to.matched[i];\n if (recordTo) {\n if (!from.matched.find((record) => isSameRouteRecord(record, recordTo))) {\n enteringRecords.push(recordTo);\n }\n }\n }\n return [leavingRecords, updatingRecords, enteringRecords];\n}\nconst router = createRouter({\n history: createWebHistory(),\n routes: []\n});\nfunction isPromise(obj) {\n return obj && typeof obj.then === \"function\";\n}\nPromise.resolve(false);\nPromise.resolve(true);\nvar PROMISE_RESOLVED_VOID = Promise.resolve();\nfunction sleep(time, resolveWith) {\n if (!time)\n time = 0;\n return new Promise(function(res) {\n return setTimeout(function() {\n return res(resolveWith);\n }, time);\n });\n}\nfunction randomInt(min, max) {\n return Math.floor(Math.random() * (max - min + 1) + min);\n}\nfunction randomToken() {\n return Math.random().toString(36).substring(2);\n}\nvar lastMs = 0;\nvar additional = 0;\nfunction microSeconds$4() {\n var ms = (/* @__PURE__ */ new Date()).getTime();\n if (ms === lastMs) {\n additional++;\n return ms * 1e3 + additional;\n } else {\n lastMs = ms;\n additional = 0;\n return ms * 1e3;\n }\n}\nvar microSeconds$3 = microSeconds$4;\nvar type$3 = \"native\";\nfunction create$3(channelName) {\n var state = {\n messagesCallback: null,\n bc: new BroadcastChannel(channelName),\n subFns: []\n // subscriberFunctions\n };\n state.bc.onmessage = function(msg) {\n if (state.messagesCallback) {\n state.messagesCallback(msg.data);\n }\n };\n return state;\n}\nfunction close$3(channelState) {\n channelState.bc.close();\n channelState.subFns = [];\n}\nfunction postMessage$3(channelState, messageJson) {\n try {\n channelState.bc.postMessage(messageJson, false);\n return PROMISE_RESOLVED_VOID;\n } catch (err) {\n return Promise.reject(err);\n }\n}\nfunction onMessage$3(channelState, fn) {\n channelState.messagesCallback = fn;\n}\nfunction canBeUsed$3() {\n if (typeof window === \"undefined\") {\n return false;\n }\n if (typeof BroadcastChannel === \"function\") {\n if (BroadcastChannel._pubkey) {\n throw new Error(\"BroadcastChannel: Do not overwrite window.BroadcastChannel with this module, this is not a polyfill\");\n }\n return true;\n } else {\n return false;\n }\n}\nfunction averageResponseTime$3() {\n return 150;\n}\nvar NativeMethod = {\n create: create$3,\n close: close$3,\n onMessage: onMessage$3,\n postMessage: postMessage$3,\n canBeUsed: canBeUsed$3,\n type: type$3,\n averageResponseTime: averageResponseTime$3,\n microSeconds: microSeconds$3\n};\nvar ObliviousSet = (\n /** @class */\n function() {\n function ObliviousSet2(ttl) {\n this.ttl = ttl;\n this.map = /* @__PURE__ */ new Map();\n this._to = false;\n }\n ObliviousSet2.prototype.has = function(value) {\n return this.map.has(value);\n };\n ObliviousSet2.prototype.add = function(value) {\n var _this = this;\n this.map.set(value, now());\n if (!this._to) {\n this._to = true;\n setTimeout(function() {\n _this._to = false;\n removeTooOldValues(_this);\n }, 0);\n }\n };\n ObliviousSet2.prototype.clear = function() {\n this.map.clear();\n };\n return ObliviousSet2;\n }()\n);\nfunction removeTooOldValues(obliviousSet) {\n var olderThen = now() - obliviousSet.ttl;\n var iterator = obliviousSet.map[Symbol.iterator]();\n while (true) {\n var next = iterator.next().value;\n if (!next) {\n return;\n }\n var value = next[0];\n var time = next[1];\n if (time < olderThen) {\n obliviousSet.map.delete(value);\n } else {\n return;\n }\n }\n}\nfunction now() {\n return (/* @__PURE__ */ new Date()).getTime();\n}\nfunction fillOptionsWithDefaults() {\n var originalOptions = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};\n var options = JSON.parse(JSON.stringify(originalOptions));\n if (typeof options.webWorkerSupport === \"undefined\")\n options.webWorkerSupport = true;\n if (!options.idb)\n options.idb = {};\n if (!options.idb.ttl)\n options.idb.ttl = 1e3 * 45;\n if (!options.idb.fallbackInterval)\n options.idb.fallbackInterval = 150;\n if (originalOptions.idb && typeof originalOptions.idb.onclose === \"function\")\n options.idb.onclose = originalOptions.idb.onclose;\n if (!options.localstorage)\n options.localstorage = {};\n if (!options.localstorage.removeTimeout)\n options.localstorage.removeTimeout = 1e3 * 60;\n if (originalOptions.methods)\n options.methods = originalOptions.methods;\n if (!options.node)\n options.node = {};\n if (!options.node.ttl)\n options.node.ttl = 1e3 * 60 * 2;\n if (!options.node.maxParallelWrites)\n options.node.maxParallelWrites = 2048;\n if (typeof options.node.useFastPath === \"undefined\")\n options.node.useFastPath = true;\n return options;\n}\nvar microSeconds$2 = microSeconds$4;\nvar DB_PREFIX = \"pubkey.broadcast-channel-0-\";\nvar OBJECT_STORE_ID = \"messages\";\nvar TRANSACTION_SETTINGS = {\n durability: \"relaxed\"\n};\nvar type$2 = \"idb\";\nfunction getIdb() {\n if (typeof indexedDB !== \"undefined\")\n return indexedDB;\n if (typeof window !== \"undefined\") {\n if (typeof window.mozIndexedDB !== \"undefined\")\n return window.mozIndexedDB;\n if (typeof window.webkitIndexedDB !== \"undefined\")\n return window.webkitIndexedDB;\n if (typeof window.msIndexedDB !== \"undefined\")\n return window.msIndexedDB;\n }\n return false;\n}\nfunction commitIndexedDBTransaction(tx) {\n if (tx.commit) {\n tx.commit();\n }\n}\nfunction createDatabase(channelName) {\n var IndexedDB = getIdb();\n var dbName = DB_PREFIX + channelName;\n var openRequest = IndexedDB.open(dbName);\n openRequest.onupgradeneeded = function(ev) {\n var db = ev.target.result;\n db.createObjectStore(OBJECT_STORE_ID, {\n keyPath: \"id\",\n autoIncrement: true\n });\n };\n return new Promise(function(res, rej) {\n openRequest.onerror = function(ev) {\n return rej(ev);\n };\n openRequest.onsuccess = function() {\n res(openRequest.result);\n };\n });\n}\nfunction writeMessage(db, readerUuid, messageJson) {\n var time = (/* @__PURE__ */ new Date()).getTime();\n var writeObject = {\n uuid: readerUuid,\n time,\n data: messageJson\n };\n var tx = db.transaction([OBJECT_STORE_ID], \"readwrite\", TRANSACTION_SETTINGS);\n return new Promise(function(res, rej) {\n tx.oncomplete = function() {\n return res();\n };\n tx.onerror = function(ev) {\n return rej(ev);\n };\n var objectStore = tx.objectStore(OBJECT_STORE_ID);\n objectStore.add(writeObject);\n commitIndexedDBTransaction(tx);\n });\n}\nfunction getMessagesHigherThan(db, lastCursorId) {\n var tx = db.transaction(OBJECT_STORE_ID, \"readonly\", TRANSACTION_SETTINGS);\n var objectStore = tx.objectStore(OBJECT_STORE_ID);\n var ret = [];\n var keyRangeValue = IDBKeyRange.bound(lastCursorId + 1, Infinity);\n if (objectStore.getAll) {\n var getAllRequest = objectStore.getAll(keyRangeValue);\n return new Promise(function(res, rej) {\n getAllRequest.onerror = function(err) {\n return rej(err);\n };\n getAllRequest.onsuccess = function(e) {\n res(e.target.result);\n };\n });\n }\n function openCursor() {\n try {\n keyRangeValue = IDBKeyRange.bound(lastCursorId + 1, Infinity);\n return objectStore.openCursor(keyRangeValue);\n } catch (e) {\n return objectStore.openCursor();\n }\n }\n return new Promise(function(res, rej) {\n var openCursorRequest = openCursor();\n openCursorRequest.onerror = function(err) {\n return rej(err);\n };\n openCursorRequest.onsuccess = function(ev) {\n var cursor = ev.target.result;\n if (cursor) {\n if (cursor.value.id < lastCursorId + 1) {\n cursor[\"continue\"](lastCursorId + 1);\n } else {\n ret.push(cursor.value);\n cursor[\"continue\"]();\n }\n } else {\n commitIndexedDBTransaction(tx);\n res(ret);\n }\n };\n });\n}\nfunction removeMessagesById(channelState, ids) {\n if (channelState.closed) {\n return Promise.resolve([]);\n }\n var tx = channelState.db.transaction(OBJECT_STORE_ID, \"readwrite\", TRANSACTION_SETTINGS);\n var objectStore = tx.objectStore(OBJECT_STORE_ID);\n return Promise.all(ids.map(function(id) {\n var deleteRequest = objectStore[\"delete\"](id);\n return new Promise(function(res) {\n deleteRequest.onsuccess = function() {\n return res();\n };\n });\n }));\n}\nfunction getOldMessages(db, ttl) {\n var olderThen = (/* @__PURE__ */ new Date()).getTime() - ttl;\n var tx = db.transaction(OBJECT_STORE_ID, \"readonly\", TRANSACTION_SETTINGS);\n var objectStore = tx.objectStore(OBJECT_STORE_ID);\n var ret = [];\n return new Promise(function(res) {\n objectStore.openCursor().onsuccess = function(ev) {\n var cursor = ev.target.result;\n if (cursor) {\n var msgObk = cursor.value;\n if (msgObk.time < olderThen) {\n ret.push(msgObk);\n cursor[\"continue\"]();\n } else {\n commitIndexedDBTransaction(tx);\n res(ret);\n }\n } else {\n res(ret);\n }\n };\n });\n}\nfunction cleanOldMessages(channelState) {\n return getOldMessages(channelState.db, channelState.options.idb.ttl).then(function(tooOld) {\n return removeMessagesById(channelState, tooOld.map(function(msg) {\n return msg.id;\n }));\n });\n}\nfunction create$2(channelName, options) {\n options = fillOptionsWithDefaults(options);\n return createDatabase(channelName).then(function(db) {\n var state = {\n closed: false,\n lastCursorId: 0,\n channelName,\n options,\n uuid: randomToken(),\n /**\n * emittedMessagesIds\n * contains all messages that have been emitted before\n * @type {ObliviousSet}\n */\n eMIs: new ObliviousSet(options.idb.ttl * 2),\n // ensures we do not read messages in parallel\n writeBlockPromise: PROMISE_RESOLVED_VOID,\n messagesCallback: null,\n readQueuePromises: [],\n db\n };\n db.onclose = function() {\n state.closed = true;\n if (options.idb.onclose)\n options.idb.onclose();\n };\n _readLoop(state);\n return state;\n });\n}\nfunction _readLoop(state) {\n if (state.closed)\n return;\n readNewMessages(state).then(function() {\n return sleep(state.options.idb.fallbackInterval);\n }).then(function() {\n return _readLoop(state);\n });\n}\nfunction _filterMessage(msgObj, state) {\n if (msgObj.uuid === state.uuid)\n return false;\n if (state.eMIs.has(msgObj.id))\n return false;\n if (msgObj.data.time < state.messagesCallbackTime)\n return false;\n return true;\n}\nfunction readNewMessages(state) {\n if (state.closed)\n return PROMISE_RESOLVED_VOID;\n if (!state.messagesCallback)\n return PROMISE_RESOLVED_VOID;\n return getMessagesHigherThan(state.db, state.lastCursorId).then(function(newerMessages) {\n var useMessages = newerMessages.filter(function(msgObj) {\n return !!msgObj;\n }).map(function(msgObj) {\n if (msgObj.id > state.lastCursorId) {\n state.lastCursorId = msgObj.id;\n }\n return msgObj;\n }).filter(function(msgObj) {\n return _filterMessage(msgObj, state);\n }).sort(function(msgObjA, msgObjB) {\n return msgObjA.time - msgObjB.time;\n });\n useMessages.forEach(function(msgObj) {\n if (state.messagesCallback) {\n state.eMIs.add(msgObj.id);\n state.messagesCallback(msgObj.data);\n }\n });\n return PROMISE_RESOLVED_VOID;\n });\n}\nfunction close$2(channelState) {\n channelState.closed = true;\n channelState.db.close();\n}\nfunction postMessage$2(channelState, messageJson) {\n channelState.writeBlockPromise = channelState.writeBlockPromise.then(function() {\n return writeMessage(channelState.db, channelState.uuid, messageJson);\n }).then(function() {\n if (randomInt(0, 10) === 0) {\n cleanOldMessages(channelState);\n }\n });\n return channelState.writeBlockPromise;\n}\nfunction onMessage$2(channelState, fn, time) {\n channelState.messagesCallbackTime = time;\n channelState.messagesCallback = fn;\n readNewMessages(channelState);\n}\nfunction canBeUsed$2() {\n return !!getIdb();\n}\nfunction averageResponseTime$2(options) {\n return options.idb.fallbackInterval * 2;\n}\nvar IndexedDBMethod = {\n create: create$2,\n close: close$2,\n onMessage: onMessage$2,\n postMessage: postMessage$2,\n canBeUsed: canBeUsed$2,\n type: type$2,\n averageResponseTime: averageResponseTime$2,\n microSeconds: microSeconds$2\n};\nvar microSeconds$1 = microSeconds$4;\nvar KEY_PREFIX = \"pubkey.broadcastChannel-\";\nvar type$1 = \"localstorage\";\nfunction getLocalStorage() {\n var localStorage2;\n if (typeof window === \"undefined\")\n return null;\n try {\n localStorage2 = window.localStorage;\n localStorage2 = window[\"ie8-eventlistener/storage\"] || window.localStorage;\n } catch (e) {\n }\n return localStorage2;\n}\nfunction storageKey(channelName) {\n return KEY_PREFIX + channelName;\n}\nfunction postMessage$1(channelState, messageJson) {\n return new Promise(function(res) {\n sleep().then(function() {\n var key = storageKey(channelState.channelName);\n var writeObj = {\n token: randomToken(),\n time: (/* @__PURE__ */ new Date()).getTime(),\n data: messageJson,\n uuid: channelState.uuid\n };\n var value = JSON.stringify(writeObj);\n getLocalStorage().setItem(key, value);\n var ev = document.createEvent(\"Event\");\n ev.initEvent(\"storage\", true, true);\n ev.key = key;\n ev.newValue = value;\n window.dispatchEvent(ev);\n res();\n });\n });\n}\nfunction addStorageEventListener(channelName, fn) {\n var key = storageKey(channelName);\n var listener = function listener2(ev) {\n if (ev.key === key) {\n fn(JSON.parse(ev.newValue));\n }\n };\n window.addEventListener(\"storage\", listener);\n return listener;\n}\nfunction removeStorageEventListener(listener) {\n window.removeEventListener(\"storage\", listener);\n}\nfunction create$1(channelName, options) {\n options = fillOptionsWithDefaults(options);\n if (!canBeUsed$1()) {\n throw new Error(\"BroadcastChannel: localstorage cannot be used\");\n }\n var uuid = randomToken();\n var eMIs = new ObliviousSet(options.localstorage.removeTimeout);\n var state = {\n channelName,\n uuid,\n eMIs\n // emittedMessagesIds\n };\n state.listener = addStorageEventListener(channelName, function(msgObj) {\n if (!state.messagesCallback)\n return;\n if (msgObj.uuid === uuid)\n return;\n if (!msgObj.token || eMIs.has(msgObj.token))\n return;\n if (msgObj.data.time && msgObj.data.time < state.messagesCallbackTime)\n return;\n eMIs.add(msgObj.token);\n state.messagesCallback(msgObj.data);\n });\n return state;\n}\nfunction close$1(channelState) {\n removeStorageEventListener(channelState.listener);\n}\nfunction onMessage$1(channelState, fn, time) {\n channelState.messagesCallbackTime = time;\n channelState.messagesCallback = fn;\n}\nfunction canBeUsed$1() {\n var ls = getLocalStorage();\n if (!ls)\n return false;\n try {\n var key = \"__broadcastchannel_check\";\n ls.setItem(key, \"works\");\n ls.removeItem(key);\n } catch (e) {\n return false;\n }\n return true;\n}\nfunction averageResponseTime$1() {\n var defaultTime = 120;\n var userAgent = navigator.userAgent.toLowerCase();\n if (userAgent.includes(\"safari\") && !userAgent.includes(\"chrome\")) {\n return defaultTime * 2;\n }\n return defaultTime;\n}\nvar LocalstorageMethod = {\n create: create$1,\n close: close$1,\n onMessage: onMessage$1,\n postMessage: postMessage$1,\n canBeUsed: canBeUsed$1,\n type: type$1,\n averageResponseTime: averageResponseTime$1,\n microSeconds: microSeconds$1\n};\nvar microSeconds = microSeconds$4;\nvar type = \"simulate\";\nvar SIMULATE_CHANNELS = /* @__PURE__ */ new Set();\nfunction create(channelName) {\n var state = {\n name: channelName,\n messagesCallback: null\n };\n SIMULATE_CHANNELS.add(state);\n return state;\n}\nfunction close(channelState) {\n SIMULATE_CHANNELS[\"delete\"](channelState);\n}\nfunction postMessage(channelState, messageJson) {\n return new Promise(function(res) {\n return setTimeout(function() {\n var channelArray = Array.from(SIMULATE_CHANNELS);\n channelArray.filter(function(channel) {\n return channel.name === channelState.name;\n }).filter(function(channel) {\n return channel !== channelState;\n }).filter(function(channel) {\n return !!channel.messagesCallback;\n }).forEach(function(channel) {\n return channel.messagesCallback(messageJson);\n });\n res();\n }, 5);\n });\n}\nfunction onMessage(channelState, fn) {\n channelState.messagesCallback = fn;\n}\nfunction canBeUsed() {\n return true;\n}\nfunction averageResponseTime() {\n return 5;\n}\nvar SimulateMethod = {\n create,\n close,\n onMessage,\n postMessage,\n canBeUsed,\n type,\n averageResponseTime,\n microSeconds\n};\nvar METHODS = [\n NativeMethod,\n // fastest\n IndexedDBMethod,\n LocalstorageMethod\n];\nfunction chooseMethod(options) {\n var chooseMethods = [].concat(options.methods, METHODS).filter(Boolean);\n if (options.type) {\n if (options.type === \"simulate\") {\n return SimulateMethod;\n }\n var ret = chooseMethods.find(function(m2) {\n return m2.type === options.type;\n });\n if (!ret)\n throw new Error(\"method-type \" + options.type + \" not found\");\n else\n return ret;\n }\n if (!options.webWorkerSupport) {\n chooseMethods = chooseMethods.filter(function(m2) {\n return m2.type !== \"idb\";\n });\n }\n var useMethod = chooseMethods.find(function(method) {\n return method.canBeUsed();\n });\n if (!useMethod)\n throw new Error(\"No usable method found in \" + JSON.stringify(METHODS.map(function(m2) {\n return m2.type;\n })));\n else\n return useMethod;\n}\nvar OPEN_BROADCAST_CHANNELS = /* @__PURE__ */ new Set();\nvar lastId = 0;\nvar BroadcastChannel$1 = function BroadcastChannel2(name, options) {\n this.id = lastId++;\n OPEN_BROADCAST_CHANNELS.add(this);\n this.name = name;\n if (ENFORCED_OPTIONS) {\n options = ENFORCED_OPTIONS;\n }\n this.options = fillOptionsWithDefaults(options);\n this.method = chooseMethod(this.options);\n this._iL = false;\n this._onML = null;\n this._addEL = {\n message: [],\n internal: []\n };\n this._uMP = /* @__PURE__ */ new Set();\n this._befC = [];\n this._prepP = null;\n _prepareChannel(this);\n};\nBroadcastChannel$1._pubkey = true;\nvar ENFORCED_OPTIONS;\nBroadcastChannel$1.prototype = {\n postMessage: function postMessage2(msg) {\n if (this.closed) {\n throw new Error(\"BroadcastChannel.postMessage(): Cannot post message after channel has closed \" + /**\n * In the past when this error appeared, it was really hard to debug.\n * So now we log the msg together with the error so it at least\n * gives some clue about where in your application this happens.\n */\n JSON.stringify(msg));\n }\n return _post(this, \"message\", msg);\n },\n postInternal: function postInternal(msg) {\n return _post(this, \"internal\", msg);\n },\n set onmessage(fn) {\n var time = this.method.microSeconds();\n var listenObj = {\n time,\n fn\n };\n _removeListenerObject(this, \"message\", this._onML);\n if (fn && typeof fn === \"function\") {\n this._onML = listenObj;\n _addListenerObject(this, \"message\", listenObj);\n } else {\n this._onML = null;\n }\n },\n addEventListener: function addEventListener(type2, fn) {\n var time = this.method.microSeconds();\n var listenObj = {\n time,\n fn\n };\n _addListenerObject(this, type2, listenObj);\n },\n removeEventListener: function removeEventListener(type2, fn) {\n var obj = this._addEL[type2].find(function(obj2) {\n return obj2.fn === fn;\n });\n _removeListenerObject(this, type2, obj);\n },\n close: function close2() {\n var _this = this;\n if (this.closed) {\n return;\n }\n OPEN_BROADCAST_CHANNELS[\"delete\"](this);\n this.closed = true;\n var awaitPrepare = this._prepP ? this._prepP : PROMISE_RESOLVED_VOID;\n this._onML = null;\n this._addEL.message = [];\n return awaitPrepare.then(function() {\n return Promise.all(Array.from(_this._uMP));\n }).then(function() {\n return Promise.all(_this._befC.map(function(fn) {\n return fn();\n }));\n }).then(function() {\n return _this.method.close(_this._state);\n });\n },\n get type() {\n return this.method.type;\n },\n get isClosed() {\n return this.closed;\n }\n};\nfunction _post(broadcastChannel, type2, msg) {\n var time = broadcastChannel.method.microSeconds();\n var msgObj = {\n time,\n type: type2,\n data: msg\n };\n var awaitPrepare = broadcastChannel._prepP ? broadcastChannel._prepP : PROMISE_RESOLVED_VOID;\n return awaitPrepare.then(function() {\n var sendPromise = broadcastChannel.method.postMessage(broadcastChannel._state, msgObj);\n broadcastChannel._uMP.add(sendPromise);\n sendPromise[\"catch\"]().then(function() {\n return broadcastChannel._uMP[\"delete\"](sendPromise);\n });\n return sendPromise;\n });\n}\nfunction _prepareChannel(channel) {\n var maybePromise = channel.method.create(channel.name, channel.options);\n if (isPromise(maybePromise)) {\n channel._prepP = maybePromise;\n maybePromise.then(function(s) {\n channel._state = s;\n });\n } else {\n channel._state = maybePromise;\n }\n}\nfunction _hasMessageListeners(channel) {\n if (channel._addEL.message.length > 0)\n return true;\n if (channel._addEL.internal.length > 0)\n return true;\n return false;\n}\nfunction _addListenerObject(channel, type2, obj) {\n channel._addEL[type2].push(obj);\n _startListening(channel);\n}\nfunction _removeListenerObject(channel, type2, obj) {\n channel._addEL[type2] = channel._addEL[type2].filter(function(o) {\n return o !== obj;\n });\n _stopListening(channel);\n}\nfunction _startListening(channel) {\n if (!channel._iL && _hasMessageListeners(channel)) {\n var listenerFn = function listenerFn2(msgObj) {\n channel._addEL[msgObj.type].forEach(function(listenerObject) {\n var hundredMsInMicro = 100 * 1e3;\n var minMessageTime = listenerObject.time - hundredMsInMicro;\n if (msgObj.time >= minMessageTime) {\n listenerObject.fn(msgObj.data);\n }\n });\n };\n var time = channel.method.microSeconds();\n if (channel._prepP) {\n channel._prepP.then(function() {\n channel._iL = true;\n channel.method.onMessage(channel._state, listenerFn, time);\n });\n } else {\n channel._iL = true;\n channel.method.onMessage(channel._state, listenerFn, time);\n }\n }\n}\nfunction _stopListening(channel) {\n if (channel._iL && !_hasMessageListeners(channel)) {\n channel._iL = false;\n var time = channel.method.microSeconds();\n channel.method.onMessage(channel._state, null, time);\n }\n}\nconst escaped = {\n \"<\": \"\\\\u003C\",\n \">\": \"\\\\u003E\",\n \"/\": \"\\\\u002F\",\n \"\\\\\": \"\\\\\\\\\",\n \"\\b\": \"\\\\b\",\n \"\\f\": \"\\\\f\",\n \"\\n\": \"\\\\n\",\n \"\\r\": \"\\\\r\",\n \"\t\": \"\\\\t\",\n \"\\0\": \"\\\\u0000\",\n \"\\u2028\": \"\\\\u2028\",\n \"\\u2029\": \"\\\\u2029\"\n};\nclass DevalueError extends Error {\n /**\n * @param {string} message\n * @param {string[]} keys\n */\n constructor(message, keys) {\n super(message);\n this.name = \"DevalueError\";\n this.path = keys.join(\"\");\n }\n}\nfunction is_primitive(thing) {\n return Object(thing) !== thing;\n}\nconst object_proto_names = Object.getOwnPropertyNames(Object.prototype).sort().join(\"\\0\");\nfunction is_plain_object(thing) {\n const proto = Object.getPrototypeOf(thing);\n return proto === Object.prototype || proto === null || Object.getOwnPropertyNames(proto).sort().join(\"\\0\") === object_proto_names;\n}\nfunction get_type(thing) {\n return Object.prototype.toString.call(thing).slice(8, -1);\n}\nfunction stringify_string(str) {\n let result = '\"';\n for (let i = 0; i < str.length; i += 1) {\n const char = str.charAt(i);\n const code = char.charCodeAt(0);\n if (char === '\"') {\n result += '\\\\\"';\n } else if (char in escaped) {\n result += escaped[char];\n } else if (code <= 31) {\n result += `\\\\u${code.toString(16).toUpperCase().padStart(4, \"0\")}`;\n } else if (code >= 55296 && code <= 57343) {\n const next = str.charCodeAt(i + 1);\n if (code <= 56319 && next >= 56320 && next <= 57343) {\n result += char + str[++i];\n } else {\n result += `\\\\u${code.toString(16).toUpperCase()}`;\n }\n } else {\n result += char;\n }\n }\n result += '\"';\n return result;\n}\nconst UNDEFINED = -1;\nconst HOLE = -2;\nconst NAN = -3;\nconst POSITIVE_INFINITY = -4;\nconst NEGATIVE_INFINITY = -5;\nconst NEGATIVE_ZERO = -6;\nfunction parse(serialized, revivers) {\n return unflatten(JSON.parse(serialized), revivers);\n}\nfunction unflatten(parsed, revivers) {\n if (typeof parsed === \"number\")\n return hydrate(parsed, true);\n if (!Array.isArray(parsed) || parsed.length === 0) {\n throw new Error(\"Invalid input\");\n }\n const values = (\n /** @type {any[]} */\n parsed\n );\n const hydrated = Array(values.length);\n function hydrate(index2, standalone = false) {\n if (index2 === UNDEFINED)\n return void 0;\n if (index2 === NAN)\n return NaN;\n if (index2 === POSITIVE_INFINITY)\n return Infinity;\n if (index2 === NEGATIVE_INFINITY)\n return -Infinity;\n if (index2 === NEGATIVE_ZERO)\n return -0;\n if (standalone)\n throw new Error(`Invalid input`);\n if (index2 in hydrated)\n return hydrated[index2];\n const value = values[index2];\n if (!value || typeof value !== \"object\") {\n hydrated[index2] = value;\n } else if (Array.isArray(value)) {\n if (typeof value[0] === \"string\") {\n const type2 = value[0];\n const reviver = revivers == null ? void 0 : revivers[type2];\n if (reviver) {\n return hydrated[index2] = reviver(hydrate(value[1]));\n }\n switch (type2) {\n case \"Date\":\n hydrated[index2] = new Date(value[1]);\n break;\n case \"Set\":\n const set2 = /* @__PURE__ */ new Set();\n hydrated[index2] = set2;\n for (let i = 1; i < value.length; i += 1) {\n set2.add(hydrate(value[i]));\n }\n break;\n case \"Map\":\n const map = /* @__PURE__ */ new Map();\n hydrated[index2] = map;\n for (let i = 1; i < value.length; i += 2) {\n map.set(hydrate(value[i]), hydrate(value[i + 1]));\n }\n break;\n case \"RegExp\":\n hydrated[index2] = new RegExp(value[1], value[2]);\n break;\n case \"Object\":\n hydrated[index2] = Object(value[1]);\n break;\n case \"BigInt\":\n hydrated[index2] = BigInt(value[1]);\n break;\n case \"null\":\n const obj = /* @__PURE__ */ Object.create(null);\n hydrated[index2] = obj;\n for (let i = 1; i < value.length; i += 2) {\n obj[value[i]] = hydrate(value[i + 1]);\n }\n break;\n default:\n throw new Error(`Unknown type ${type2}`);\n }\n } else {\n const array = new Array(value.length);\n hydrated[index2] = array;\n for (let i = 0; i < value.length; i += 1) {\n const n = value[i];\n if (n === HOLE)\n continue;\n array[i] = hydrate(n);\n }\n }\n } else {\n const object = {};\n hydrated[index2] = object;\n for (const key in value) {\n const n = value[key];\n object[key] = hydrate(n);\n }\n }\n return hydrated[index2];\n }\n return hydrate(0);\n}\nfunction stringify(value, reducers) {\n const stringified = [];\n const indexes = /* @__PURE__ */ new Map();\n const custom = [];\n for (const key in reducers) {\n custom.push({ key, fn: reducers[key] });\n }\n const keys = [];\n let p = 0;\n function flatten(thing) {\n if (typeof thing === \"function\") {\n throw new DevalueError(`Cannot stringify a function`, keys);\n }\n if (indexes.has(thing))\n return indexes.get(thing);\n if (thing === void 0)\n return UNDEFINED;\n if (Number.isNaN(thing))\n return NAN;\n if (thing === Infinity)\n return POSITIVE_INFINITY;\n if (thing === -Infinity)\n return NEGATIVE_INFINITY;\n if (thing === 0 && 1 / thing < 0)\n return NEGATIVE_ZERO;\n const index3 = p++;\n indexes.set(thing, index3);\n for (const { key, fn } of custom) {\n const value2 = fn(thing);\n if (value2) {\n stringified[index3] = `[\"${key}\",${flatten(value2)}]`;\n return index3;\n }\n }\n let str = \"\";\n if (is_primitive(thing)) {\n str = stringify_primitive(thing);\n } else {\n const type2 = get_type(thing);\n switch (type2) {\n case \"Number\":\n case \"String\":\n case \"Boolean\":\n str = `[\"Object\",${stringify_primitive(thing)}]`;\n break;\n case \"BigInt\":\n str = `[\"BigInt\",${thing}]`;\n break;\n case \"Date\":\n str = `[\"Date\",\"${thing.toISOString()}\"]`;\n break;\n case \"RegExp\":\n const { source, flags } = thing;\n str = flags ? `[\"RegExp\",${stringify_string(source)},\"${flags}\"]` : `[\"RegExp\",${stringify_string(source)}]`;\n break;\n case \"Array\":\n str = \"[\";\n for (let i = 0; i < thing.length; i += 1) {\n if (i > 0)\n str += \",\";\n if (i in thing) {\n keys.push(`[${i}]`);\n str += flatten(thing[i]);\n keys.pop();\n } else {\n str += HOLE;\n }\n }\n str += \"]\";\n break;\n case \"Set\":\n str = '[\"Set\"';\n for (const value2 of thing) {\n str += `,${flatten(value2)}`;\n }\n str += \"]\";\n break;\n case \"Map\":\n str = '[\"Map\"';\n for (const [key, value2] of thing) {\n keys.push(\n `.get(${is_primitive(key) ? stringify_primitive(key) : \"...\"})`\n );\n str += `,${flatten(key)},${flatten(value2)}`;\n }\n str += \"]\";\n break;\n default:\n if (!is_plain_object(thing)) {\n throw new DevalueError(\n `Cannot stringify arbitrary non-POJOs`,\n keys\n );\n }\n if (Object.getOwnPropertySymbols(thing).length > 0) {\n throw new DevalueError(\n `Cannot stringify POJOs with symbolic keys`,\n keys\n );\n }\n if (Object.getPrototypeOf(thing) === null) {\n str = '[\"null\"';\n for (const key in thing) {\n keys.push(`.${key}`);\n str += `,${stringify_string(key)},${flatten(thing[key])}`;\n keys.pop();\n }\n str += \"]\";\n } else {\n str = \"{\";\n let started = false;\n for (const key in thing) {\n if (started)\n str += \",\";\n started = true;\n keys.push(`.${key}`);\n str += `${stringify_string(key)}:${flatten(thing[key])}`;\n keys.pop();\n }\n str += \"}\";\n }\n }\n }\n stringified[index3] = str;\n return index3;\n }\n const index2 = flatten(value);\n if (index2 < 0)\n return `${index2}`;\n return `[${stringified.join(\",\")}]`;\n}\nfunction stringify_primitive(thing) {\n const type2 = typeof thing;\n if (type2 === \"string\")\n return stringify_string(thing);\n if (thing instanceof String)\n return stringify_string(thing.toString());\n if (thing === void 0)\n return UNDEFINED.toString();\n if (thing === 0 && 1 / thing < 0)\n return NEGATIVE_ZERO.toString();\n if (type2 === \"bigint\")\n return `[\"BigInt\",\"${thing}\"]`;\n return String(thing);\n}\nfunction m(t, a, { initialize: d, type: r }) {\n let o = `${a.$id}-${t.toString()}`, n = new BroadcastChannel$1(o, { type: r }), l = false, e = 0;\n watch(() => a[t], (i) => {\n l || (e = Date.now(), n.postMessage({ timestamp: e, state: parse(stringify(i)) })), l = false;\n }, { deep: true }), n.onmessage = (i) => {\n if (i === void 0) {\n n.postMessage({ timestamp: e, state: parse(stringify(a[t])) });\n return;\n }\n i.timestamp <= e || (l = true, e = i.timestamp, a[t] = i.state);\n };\n let u = () => n.postMessage(void 0), p = () => n.close();\n return d && u(), { sync: u, unshare: p };\n}\nvar h = (t, a) => Object.keys(a).includes(t), g = ({ initialize: t = true, enable: a = true, type: d }) => ({ store: r, options: o }) => {\n var _a, _b;\n let n = ((_a = o == null ? void 0 : o.share) == null ? void 0 : _a.enable) ?? a, l = ((_b = o == null ? void 0 : o.share) == null ? void 0 : _b.omit) ?? [];\n !n || Object.keys(r.$state).forEach((e) => {\n var _a2;\n l.includes(e) || !h(e, r.$state) || m(e, r, { initialize: ((_a2 = o == null ? void 0 : o.share) == null ? void 0 : _a2.initialize) ?? t, type: d });\n });\n};\nconst pinia = createPinia();\npinia.use(\n g({\n enable: true,\n initialize: true\n })\n);\nconst index = {\n install: (app, options) => {\n const appRouter = (options == null ? void 0 : options.router) || router;\n app.use(appRouter);\n app.use(pinia);\n app.provide(\"$registry\", new Registry(appRouter, options == null ? void 0 : options.doctypeLoader));\n if (options == null ? void 0 : options.components) {\n for (const [tag, component] of Object.entries(options.components)) {\n app.component(tag, component);\n }\n }\n }\n};\nexport {\n DoctypeMeta,\n Registry,\n index as Stonecrop,\n useStonecrop\n};\n","\n\n\n","import { onMounted as ye, onBeforeUnmount as Ie, ref as E, watch as j, unref as s, getCurrentScope as _e, onScopeDispose as Ee, defineComponent as k, inject as O, computed as S, openBlock as p, createElementBlock as w, createBlock as P, resolveDynamicComponent as ie, mergeProps as V, toDisplayString as $, Fragment as L, createElementVNode as T, renderSlot as x, createCommentVNode as M, useCssVars as de, withDirectives as ce, vShow as ue, reactive as A, renderList as N, normalizeStyle as H, createTextVNode as ke, provide as Ce, nextTick as Ae, createVNode as z, withCtx as G } from \"vue\";\nvar J;\nconst pe = typeof window < \"u\", Te = (t) => typeof t == \"string\", $e = () => {\n};\npe && (J = window == null ? void 0 : window.navigator) != null && J.userAgent && /iP(ad|hone|od)/.test(window.navigator.userAgent);\nfunction fe(t) {\n return typeof t == \"function\" ? t() : s(t);\n}\nfunction Oe(t) {\n return t;\n}\nfunction De(t) {\n return _e() ? (Ee(t), !0) : !1;\n}\nfunction U(t) {\n var e;\n const n = fe(t);\n return (e = n == null ? void 0 : n.$el) != null ? e : n;\n}\nconst me = pe ? window : void 0;\nfunction Re(...t) {\n let e, n, o, l;\n if (Te(t[0]) || Array.isArray(t[0]) ? ([n, o, l] = t, e = me) : [e, n, o, l] = t, !e)\n return $e;\n Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]);\n const a = [], r = () => {\n a.forEach((d) => d()), a.length = 0;\n }, i = (d, h, v, m) => (d.addEventListener(h, v, m), () => d.removeEventListener(h, v, m)), c = j(() => [U(e), fe(l)], ([d, h]) => {\n r(), d && a.push(...n.flatMap((v) => o.map((m) => i(d, v, m, h))));\n }, { immediate: !0, flush: \"post\" }), u = () => {\n c(), r();\n };\n return De(u), u;\n}\nconst X = typeof globalThis < \"u\" ? globalThis : typeof window < \"u\" ? window : typeof global < \"u\" ? global : typeof self < \"u\" ? self : {}, Y = \"__vueuse_ssr_handlers__\";\nX[Y] = X[Y] || {};\nfunction Se(t, { window: e = me, scrollTarget: n } = {}) {\n const o = E(!1), l = () => {\n if (!e)\n return;\n const a = e.document, r = U(t);\n if (!r)\n o.value = !1;\n else {\n const i = r.getBoundingClientRect();\n o.value = i.top <= (e.innerHeight || a.documentElement.clientHeight) && i.left <= (e.innerWidth || a.documentElement.clientWidth) && i.bottom >= 0 && i.right >= 0;\n }\n };\n return j(() => U(t), () => l(), { immediate: !0, flush: \"post\" }), e && Re(n || e, \"scroll\", l, {\n capture: !1,\n passive: !0\n }), o;\n}\nvar Z;\n(function(t) {\n t.UP = \"UP\", t.RIGHT = \"RIGHT\", t.DOWN = \"DOWN\", t.LEFT = \"LEFT\", t.NONE = \"NONE\";\n})(Z || (Z = {}));\nvar Pe = Object.defineProperty, K = Object.getOwnPropertySymbols, He = Object.prototype.hasOwnProperty, Le = Object.prototype.propertyIsEnumerable, ee = (t, e, n) => e in t ? Pe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, Me = (t, e) => {\n for (var n in e || (e = {}))\n He.call(e, n) && ee(t, n, e[n]);\n if (K)\n for (var n of K(e))\n Le.call(e, n) && ee(t, n, e[n]);\n return t;\n};\nconst Ne = {\n easeInSine: [0.12, 0, 0.39, 0],\n easeOutSine: [0.61, 1, 0.88, 1],\n easeInOutSine: [0.37, 0, 0.63, 1],\n easeInQuad: [0.11, 0, 0.5, 0],\n easeOutQuad: [0.5, 1, 0.89, 1],\n easeInOutQuad: [0.45, 0, 0.55, 1],\n easeInCubic: [0.32, 0, 0.67, 0],\n easeOutCubic: [0.33, 1, 0.68, 1],\n easeInOutCubic: [0.65, 0, 0.35, 1],\n easeInQuart: [0.5, 0, 0.75, 0],\n easeOutQuart: [0.25, 1, 0.5, 1],\n easeInOutQuart: [0.76, 0, 0.24, 1],\n easeInQuint: [0.64, 0, 0.78, 0],\n easeOutQuint: [0.22, 1, 0.36, 1],\n easeInOutQuint: [0.83, 0, 0.17, 1],\n easeInExpo: [0.7, 0, 0.84, 0],\n easeOutExpo: [0.16, 1, 0.3, 1],\n easeInOutExpo: [0.87, 0, 0.13, 1],\n easeInCirc: [0.55, 0, 1, 0.45],\n easeOutCirc: [0, 0.55, 0.45, 1],\n easeInOutCirc: [0.85, 0, 0.15, 1],\n easeInBack: [0.36, 0, 0.66, -0.56],\n easeOutBack: [0.34, 1.56, 0.64, 1],\n easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\nMe({\n linear: Oe\n}, Ne);\nconst y = (t) => {\n let e = Se(t).value;\n return e = e && t.offsetHeight > 0, e;\n}, I = (t) => t.tabIndex >= 0, te = (t) => {\n const e = t.target;\n return W(e);\n}, W = (t) => {\n var e;\n let n;\n if (t instanceof HTMLTableCellElement) {\n const o = (e = t.parentElement) == null ? void 0 : e.previousElementSibling;\n if (o) {\n const l = Array.from(o.children)[t.cellIndex];\n l && (n = l);\n }\n } else if (t instanceof HTMLTableRowElement) {\n const o = t.previousElementSibling;\n o && (n = o);\n }\n return n && (!I(n) || !y(n)) ? W(n) : n;\n}, Ue = (t) => {\n var e;\n const n = t.target;\n let o;\n if (n instanceof HTMLTableCellElement) {\n const l = (e = n.parentElement) == null ? void 0 : e.parentElement;\n if (l) {\n const a = l.firstElementChild.children[n.cellIndex];\n a && (o = a);\n }\n } else if (n instanceof HTMLTableRowElement) {\n const l = n.parentElement;\n if (l) {\n const a = l.firstElementChild;\n a && (o = a);\n }\n }\n return o && (!I(o) || !y(o)) ? B(o) : o;\n}, ne = (t) => {\n const e = t.target;\n return B(e);\n}, B = (t) => {\n var e;\n let n;\n if (t instanceof HTMLTableCellElement) {\n const o = (e = t.parentElement) == null ? void 0 : e.nextElementSibling;\n if (o) {\n const l = Array.from(o.children)[t.cellIndex];\n l && (n = l);\n }\n } else if (t instanceof HTMLTableRowElement) {\n const o = t.nextElementSibling;\n o && (n = o);\n }\n return n && (!I(n) || !y(n)) ? B(n) : n;\n}, je = (t) => {\n var e;\n const n = t.target;\n let o;\n if (n instanceof HTMLTableCellElement) {\n const l = (e = n.parentElement) == null ? void 0 : e.parentElement;\n if (l) {\n const a = l.lastElementChild.children[n.cellIndex];\n a && (o = a);\n }\n } else if (n instanceof HTMLTableRowElement) {\n const l = n.parentElement;\n if (l) {\n const a = l.lastElementChild;\n a && (o = a);\n }\n }\n return o && (!I(o) || !y(o)) ? W(o) : o;\n}, oe = (t) => {\n const e = t.target;\n return Q(e);\n}, Q = (t) => {\n var e;\n let n;\n if (t.previousElementSibling)\n n = t.previousElementSibling;\n else {\n const o = (e = t.parentElement) == null ? void 0 : e.previousElementSibling;\n n = o == null ? void 0 : o.lastElementChild;\n }\n return n && (!I(n) || !y(n)) ? Q(n) : n;\n}, le = (t) => {\n const e = t.target;\n return F(e);\n}, F = (t) => {\n var e;\n let n;\n if (t.nextElementSibling)\n n = t.nextElementSibling;\n else {\n const o = (e = t.parentElement) == null ? void 0 : e.nextElementSibling;\n n = o == null ? void 0 : o.firstElementChild;\n }\n return n && (!I(n) || !y(n)) ? F(n) : n;\n}, ae = (t) => {\n const e = t.target.parentElement.firstElementChild;\n return e && (!I(e) || !y(e)) ? F(e) : e;\n}, re = (t) => {\n const e = t.target.parentElement.lastElementChild;\n return e && (!I(e) || !y(e)) ? Q(e) : e;\n}, D = [\"alt\", \"control\", \"shift\", \"meta\"], Ve = {\n ArrowUp: \"up\",\n ArrowDown: \"down\",\n ArrowLeft: \"left\",\n ArrowRight: \"right\"\n}, we = {\n \"keydown.up\": (t) => {\n const e = te(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.down\": (t) => {\n const e = ne(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.left\": (t) => {\n const e = oe(t);\n t.preventDefault(), t.stopPropagation(), e && e.focus();\n },\n \"keydown.right\": (t) => {\n const e = le(t);\n t.preventDefault(), t.stopPropagation(), e && e.focus();\n },\n \"keydown.control.up\": (t) => {\n const e = Ue(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.control.down\": (t) => {\n const e = je(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.control.left\": (t) => {\n const e = ae(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.control.right\": (t) => {\n const e = re(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.end\": (t) => {\n const e = re(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.enter\": (t) => {\n if (t.target instanceof HTMLTableCellElement) {\n t.preventDefault(), t.stopPropagation();\n const e = ne(t);\n e && e.focus();\n }\n },\n \"keydown.shift.enter\": (t) => {\n if (t.target instanceof HTMLTableCellElement) {\n t.preventDefault(), t.stopPropagation();\n const e = te(t);\n e && e.focus();\n }\n },\n \"keydown.home\": (t) => {\n const e = ae(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.tab\": (t) => {\n const e = le(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.shift.tab\": (t) => {\n const e = oe(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n }\n};\nfunction q(t) {\n const e = (o) => {\n let l = null;\n o.parent && (typeof o.parent == \"string\" ? l = document.querySelector(o.parent) : o.parent instanceof Element ? l = o.parent : l = o.parent.value);\n let a = [];\n if (o.selectors)\n if (typeof o.selectors == \"string\")\n a = l ? Array.from(l.querySelectorAll(o.selectors)) : Array.from(document.querySelectorAll(o.selectors));\n else if (o.selectors instanceof Element)\n a.push(o.selectors);\n else if (Array.isArray(o.selectors.value))\n for (const r of o.selectors.value)\n r instanceof Element ? a.push(r) : a.push(r.$el);\n else\n a.push(o.selectors.value);\n else\n a = Array.from(l.children).filter((r) => I(r) && y(r));\n return a;\n }, n = (o) => (l) => {\n const a = Ve[l.key] || l.key.toLowerCase();\n if (D.includes(a))\n return;\n const r = o.handlers || we;\n for (const i of Object.keys(r)) {\n const [c, ...u] = i.split(\".\");\n if (c === \"keydown\" && u.includes(a)) {\n const d = r[i], h = u.filter((m) => D.includes(m)), v = D.some((m) => {\n const _ = m.charAt(0).toUpperCase() + m.slice(1);\n return l.getModifierState(_);\n });\n if (h.length > 0) {\n if (v) {\n for (const m of D)\n if (u.includes(m)) {\n const _ = m.charAt(0).toUpperCase() + m.slice(1);\n l.getModifierState(_) && d(l);\n }\n }\n } else\n v || d(l);\n }\n }\n };\n ye(() => {\n for (const o of t) {\n const l = e(o);\n for (const a of l)\n a.addEventListener(\"keydown\", n(o));\n }\n }), Ie(() => {\n for (const o of t) {\n const l = e(o);\n for (const a of l)\n a.removeEventListener(\"keydown\", n(o));\n }\n });\n}\nconst We = [\"data-colindex\", \"data-rowindex\", \"data-editable\", \"contenteditable\", \"tabindex\"], Be = { key: 1 }, Qe = /* @__PURE__ */ k({\n __name: \"ACell\",\n props: {\n colIndex: null,\n rowIndex: null,\n tableid: null,\n addNavigation: { type: [Boolean, Object], default: !0 },\n tabIndex: { default: 0 },\n clickHandler: null\n },\n setup(t) {\n var _;\n const e = t, n = O(e.tableid), o = E(null);\n let l = E(!1);\n const a = S(() => {\n const b = n.cellData(e.colIndex, e.rowIndex);\n if (n.columns[e.colIndex].format) {\n const g = n.columns[e.colIndex].format;\n return typeof g == \"function\" ? g(b) : typeof g == \"string\" ? Function(`\"use strict\";return (${g})`)()(b) : b;\n } else\n return b;\n }), r = (b) => {\n if (e.clickHandler) {\n e.clickHandler(b);\n return;\n }\n if (n.columns[e.colIndex].mask, n.columns[e.colIndex].modalComponent) {\n const g = o.value.getBoundingClientRect();\n n.modal.visible = !0, n.modal.colIndex = e.colIndex, n.modal.rowIndex = e.rowIndex, n.modal.parent = o.value, n.modal.top = g.top + g.height, n.modal.left = g.left, n.modal.width = c.value, n.modal.component = n.columns[e.colIndex].modalComponent, n.modal.componentProps = n.columns[e.colIndex].modalComponentProps;\n }\n };\n if (e.addNavigation) {\n let b = {\n ...we,\n \"keydown.f2\": r,\n \"keydown.alt.up\": r,\n \"keydown.alt.down\": r,\n \"keydown.alt.left\": r,\n \"keydown.alt.right\": r\n };\n typeof e.addNavigation == \"object\" && (b = {\n ...b,\n ...e.addNavigation\n }), q([\n {\n selectors: o,\n handlers: b\n }\n ]);\n }\n const i = S(() => n.columns[e.colIndex].align || \"center\"), c = S(() => n.columns[e.colIndex].width || \"40ch\");\n let u = \"\";\n const d = () => {\n o.value && (u = o.value.innerText);\n }, h = () => {\n o.value && o.value.innerHTML !== u && (u = o.value.innerText, o.value.dispatchEvent(new Event(\"change\")), l.value = !0, n.columns[e.colIndex].format || n.setCellData(e.rowIndex, e.colIndex, u));\n }, v = (b, g) => g && b === 0 && g > 0 ? `${g}ch` : \"inherit\", m = {\n textAlign: i.value,\n width: c.value,\n backgroundColor: l.value ? \"var(--cell-modified-color)\" : \"inherit\",\n fontWeight: l.value ? \"bold\" : \"inherit\",\n paddingLeft: v(e.colIndex, (_ = n.display[e.rowIndex]) == null ? void 0 : _.indent)\n };\n return (b, g) => (p(), w(\"td\", {\n ref_key: \"cell\",\n ref: o,\n \"data-colindex\": t.colIndex,\n \"data-rowindex\": t.rowIndex,\n \"data-editable\": s(n).columns[t.colIndex].edit,\n contenteditable: s(n).columns[t.colIndex].edit,\n tabindex: t.tabIndex,\n spellcheck: !1,\n style: m,\n onFocus: d,\n onPaste: h,\n onBlur: h,\n onInput: h,\n onClick: r,\n onMousedown: r\n }, [\n s(n).columns[t.colIndex].cellComponent ? (p(), P(ie(s(n).columns[t.colIndex].cellComponent), V({\n key: 0,\n value: s(a)\n }, s(n).columns[t.colIndex].cellComponentProps), null, 16, [\"value\"])) : (p(), w(\"span\", Be, $(s(a)), 1))\n ], 40, We));\n }\n});\nconst C = (t, e) => {\n const n = t.__vccOpts || t;\n for (const [o, l] of e)\n n[o] = l;\n return n;\n}, he = /* @__PURE__ */ C(Qe, [[\"__scopeId\", \"data-v-1738c6fc\"]]), Fe = [\"tabindex\"], qe = [\"tabindex\"], ze = [\"colspan\"], Ge = /* @__PURE__ */ k({\n __name: \"AExpansionRow\",\n props: {\n row: null,\n rowIndex: null,\n tableid: null,\n tabIndex: { default: -1 },\n addNavigation: null\n },\n setup(t) {\n const e = t, n = O(e.tableid), o = E(null), l = E(null), a = () => n.display[e.rowIndex].expanded ? \"▼\" : \"►\";\n if (e.addNavigation !== void 0) {\n const r = Object.assign({}, e.addNavigation);\n r[\"keydown.control.g\"] = (i) => {\n i.stopPropagation(), i.preventDefault(), n.toggleRowExpand(e.rowIndex);\n }, q([\n {\n selectors: o,\n handlers: r\n }\n ]);\n }\n return (r, i) => (p(), w(L, null, [\n T(\"tr\", V(r.$attrs, {\n ref_key: \"rowEl\",\n ref: o,\n tabindex: t.tabIndex,\n class: \"expandable-row\"\n }), [\n T(\"td\", {\n tabIndex: -1,\n onClick: i[0] || (i[0] = (c) => s(n).toggleRowExpand(t.rowIndex)),\n class: \"row-index\"\n }, $(a()), 1),\n x(r.$slots, \"row\", {}, void 0, !0)\n ], 16, Fe),\n s(n).display[e.rowIndex].expanded ? (p(), w(\"tr\", {\n key: 0,\n ref_key: \"rowExpanded\",\n ref: l,\n tabindex: t.tabIndex,\n class: \"expanded-row\"\n }, [\n T(\"td\", {\n tabIndex: -1,\n colspan: s(n).columns.length + 1,\n class: \"expanded-row-content\"\n }, [\n x(r.$slots, \"content\", {}, void 0, !0)\n ], 8, ze)\n ], 8, qe)) : M(\"\", !0)\n ], 64));\n }\n});\nconst Je = /* @__PURE__ */ C(Ge, [[\"__scopeId\", \"data-v-2bb821ae\"]]), Xe = [\"tabindex\"], Ye = {\n key: 0,\n tabIndex: -1,\n class: \"list-index\"\n}, Ze = /* @__PURE__ */ k({\n __name: \"ARow\",\n props: {\n row: null,\n rowIndex: null,\n tableid: null,\n tabIndex: { default: -1 },\n addNavigation: null\n },\n setup(t) {\n const e = t;\n de((c) => ({\n \"6b10edcf\": s(l)\n }));\n const n = O(e.tableid), o = E(null), l = n.numberedRowWidth.value, a = () => n.config.view !== \"tree\" ? \"\" : n.display[e.rowIndex].isRoot || n.display[e.rowIndex].isParent ? n.display[e.rowIndex].childrenOpen ? \"-\" : \"+\" : \"\", r = () => n.config.view !== \"tree\" || n.display[e.rowIndex].isRoot || n.display[e.rowIndex].open, i = (c) => {\n n.toggleRowExpand(c);\n };\n return e.addNavigation && q([\n {\n selectors: o,\n handlers: e.addNavigation\n }\n ]), (c, u) => ce((p(), w(\"tr\", {\n ref_key: \"rowEl\",\n ref: o,\n tabindex: t.tabIndex,\n class: \"table-row\"\n }, [\n s(n).config.view === \"list\" ? (p(), w(\"td\", Ye, $(t.rowIndex + 1), 1)) : s(n).config.view === \"tree\" ? (p(), w(\"td\", {\n key: 1,\n tabIndex: -1,\n class: \"tree-index\",\n onClick: u[0] || (u[0] = (d) => i(t.rowIndex))\n }, $(a()), 1)) : x(c.$slots, \"indexCell\", { key: 2 }, void 0, !0),\n x(c.$slots, \"default\", {}, void 0, !0)\n ], 8, Xe)), [\n [ue, r()]\n ]);\n }\n});\nconst be = /* @__PURE__ */ C(Ze, [[\"__scopeId\", \"data-v-c758303d\"]]);\nlet R;\nconst Ke = new Uint8Array(16);\nfunction et() {\n if (!R && (R = typeof crypto < \"u\" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !R))\n throw new Error(\"crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported\");\n return R(Ke);\n}\nconst f = [];\nfor (let t = 0; t < 256; ++t)\n f.push((t + 256).toString(16).slice(1));\nfunction tt(t, e = 0) {\n return (f[t[e + 0]] + f[t[e + 1]] + f[t[e + 2]] + f[t[e + 3]] + \"-\" + f[t[e + 4]] + f[t[e + 5]] + \"-\" + f[t[e + 6]] + f[t[e + 7]] + \"-\" + f[t[e + 8]] + f[t[e + 9]] + \"-\" + f[t[e + 10]] + f[t[e + 11]] + f[t[e + 12]] + f[t[e + 13]] + f[t[e + 14]] + f[t[e + 15]]).toLowerCase();\n}\nconst nt = typeof crypto < \"u\" && crypto.randomUUID && crypto.randomUUID.bind(crypto), se = {\n randomUUID: nt\n};\nfunction ge(t, e, n) {\n if (se.randomUUID && !e && !t)\n return se.randomUUID();\n t = t || {};\n const o = t.random || (t.rng || et)();\n if (o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128, e) {\n n = n || 0;\n for (let l = 0; l < 16; ++l)\n e[n + l] = o[l];\n return e;\n }\n return tt(o);\n}\nclass ot {\n constructor(e, n, o, l, a, r) {\n this.id = e || ge(), this.rows = o, this.columns = A(n), this.config = A(l), this.table = a || A(this.createTableObject()), this.display = this.createDisplayObject(r), this.modal = A({ visible: !1 });\n }\n createTableObject() {\n const e = {};\n for (const [n, o] of this.columns.entries())\n for (const [l, a] of this.rows.entries())\n e[`${n}:${l}`] = a[o.name];\n return e;\n }\n createDisplayObject(e) {\n const n = [Object.assign({}, { modified: !1 })];\n if (e && \"0:0\" in e)\n return e;\n const o = /* @__PURE__ */ new Set();\n for (let l = this.rows.length - 1; l >= 0; l--) {\n const a = this.rows[l];\n a.parent && o.add(a.parent), n[l] = {\n childrenOpen: !1,\n expanded: !1,\n indent: a.indent || null,\n isParent: o.has(l),\n isRoot: a.parent === null || a.parent === void 0,\n modified: !1,\n open: a.parent === null || a.parent === void 0,\n parent: a.parent\n };\n }\n return A(n);\n }\n get zeroColumn() {\n return [\"list\", \"tree\", \"list-expansion\"].includes(this.config.view);\n }\n get numberedRowWidth() {\n return S(() => String(Math.ceil(this.rows.length / 100) + 1) + \"ch\");\n }\n cellData(e, n) {\n return this.table[`${e}:${n}`];\n }\n setCellData(e, n, o) {\n this.table[`${n}:${e}`] !== o && (this.display[e].modified = !0), this.table[`${n}:${e}`] = o;\n const l = this.columns[n];\n return this.rows[e][l.name] = o, this.table[`${n}:${e}`];\n }\n toggleRowExpand(e) {\n if (this.config.view === \"tree\") {\n this.display[e].childrenOpen = !this.display[e].childrenOpen;\n for (let n = this.rows.length - 1; n >= 0; n--)\n this.display[n].parent === e && (this.display[n].open = !this.display[n].open, this.display[n].childrenOpen && this.toggleRowExpand(n));\n } else\n this.config.view === \"list-expansion\" && (this.display[e].expanded = !this.display[e].expanded);\n }\n}\nconst lt = { key: 0 }, at = {\n class: \"atable-header-row\",\n tabindex: \"-1\"\n}, rt = {\n key: 0,\n id: \"header-index\"\n}, st = /* @__PURE__ */ k({\n __name: \"ATableHeader\",\n props: {\n columns: null,\n config: null,\n tableid: null\n },\n setup(t) {\n const e = t;\n de((a) => ({\n \"1cb0fcc9\": s(o)\n }));\n const n = O(e.tableid), o = n.numberedRowWidth.value, l = (a) => ({\n minWidth: a.width || \"40ch\",\n textAlign: a.align || \"center\",\n width: n.config.fullWidth ? \"auto\" : null\n });\n return (a, r) => t.columns.length ? (p(), w(\"thead\", lt, [\n T(\"tr\", at, [\n s(n).zeroColumn ? (p(), w(\"th\", rt)) : M(\"\", !0),\n (p(!0), w(L, null, N(t.columns, (i, c) => (p(), w(\"th\", {\n key: c,\n tabindex: \"-1\",\n style: H(l(i))\n }, [\n x(a.$slots, \"default\", {}, () => [\n ke($(i.label || String.fromCharCode(c + 97).toUpperCase()), 1)\n ], !0)\n ], 4))), 128))\n ])\n ])) : M(\"\", !0);\n }\n});\nconst xe = /* @__PURE__ */ C(st, [[\"__scopeId\", \"data-v-8a8d9cee\"]]), it = /* @__PURE__ */ k({\n __name: \"ATableModal\",\n props: {\n colIndex: null,\n rowIndex: null,\n tableid: null\n },\n setup(t) {\n O(t.tableid);\n const n = (o) => {\n o.stopPropagation();\n };\n return (o, l) => (p(), w(\"div\", {\n ref: \"amodal\",\n class: \"amodal\",\n tabindex: \"-1\",\n onClick: n,\n onInput: n\n }, [\n x(o.$slots, \"default\", {}, void 0, !0)\n ], 544));\n }\n});\nconst ve = /* @__PURE__ */ C(it, [[\"__scopeId\", \"data-v-8ac70767\"]]), dt = /* @__PURE__ */ k({\n __name: \"ATable\",\n props: {\n id: null,\n modelValue: null,\n columns: null,\n rows: { default: () => [] },\n config: { default: () => new Object() },\n tableid: null\n },\n emits: [\"update:modelValue\"],\n setup(t, { emit: e }) {\n const n = t;\n let o = n.modelValue ? n.modelValue : n.rows, l = new ot(n.id, n.columns, o, n.config);\n Ce(l.id, l), j(\n () => l.rows,\n (r, i) => {\n e(\"update:modelValue\", r);\n },\n { deep: !0 }\n );\n const a = (r) => {\n var i;\n (i = l.modal.parent) != null && i.contains(r.target) || l.modal.visible && (l.modal.visible = !1);\n };\n return window.addEventListener(\"click\", a), window.addEventListener(\"keydown\", (r) => {\n if (r.key === \"Escape\" && l.modal.visible) {\n l.modal.visible = !1;\n const i = l.modal.parent;\n i && Ae().then(() => {\n const c = i.dataset.rowindex, u = i.dataset.colindex, d = document.querySelectorAll(`[data-rowindex='${c}'][data-colindex='${u}']`);\n d && d[0].focus();\n });\n }\n }), (r, i) => (p(), w(\"table\", {\n class: \"atable\",\n style: H({ width: s(l).config.fullWidth ? \"100%\" : \"auto\" })\n }, [\n x(r.$slots, \"header\", { data: s(l) }, () => [\n z(xe, {\n columns: s(l).columns,\n config: s(l).config,\n tableid: s(l).id\n }, null, 8, [\"columns\", \"config\", \"tableid\"])\n ], !0),\n T(\"tbody\", null, [\n x(r.$slots, \"body\", { data: s(l) }, () => [\n (p(!0), w(L, null, N(s(l).rows, (c, u) => (p(), P(be, {\n key: c.id || s(ge)(),\n row: c,\n rowIndex: u,\n tableid: s(l).id\n }, {\n default: G(() => [\n (p(!0), w(L, null, N(s(l).columns, (d, h) => (p(), P(he, {\n key: `${h}:${u}`,\n tableid: s(l).id,\n col: d,\n spellcheck: \"false\",\n rowIndex: u,\n colIndex: h + (s(l).zeroColumn ? 0 : -1),\n component: d.cellComponent,\n style: H({\n textAlign: (d == null ? void 0 : d.align) || \"center\",\n minWidth: (d == null ? void 0 : d.width) || \"40ch\",\n width: s(l).config.fullWidth ? \"auto\" : null\n })\n }, null, 8, [\"tableid\", \"col\", \"rowIndex\", \"colIndex\", \"component\", \"style\"]))), 128))\n ]),\n _: 2\n }, 1032, [\"row\", \"rowIndex\", \"tableid\"]))), 128))\n ], !0)\n ]),\n x(r.$slots, \"footer\", { data: s(l) }, void 0, !0),\n x(r.$slots, \"modal\", { data: s(l) }, () => [\n ce(z(ve, {\n colIndex: s(l).modal.colIndex,\n rowIndex: s(l).modal.rowIndex,\n tableid: s(l).id,\n style: H({\n left: s(l).modal.left + \"px\",\n top: s(l).modal.top + \"px\",\n maxWidth: s(l).modal.width + \"px\"\n })\n }, {\n default: G(() => [\n (p(), P(ie(s(l).modal.component), V({\n key: `${s(l).modal.rowIndex}:${s(l).modal.colIndex}`,\n colIndex: s(l).modal.colIndex,\n rowIndex: s(l).modal.rowIndex,\n tableid: s(l).id\n }, s(l).modal.componentProps), null, 16, [\"colIndex\", \"rowIndex\", \"tableid\"]))\n ]),\n _: 1\n }, 8, [\"colIndex\", \"rowIndex\", \"tableid\", \"style\"]), [\n [ue, s(l).modal.visible]\n ])\n ], !0)\n ], 4));\n }\n});\nconst ct = /* @__PURE__ */ C(dt, [[\"__scopeId\", \"data-v-9137b4c3\"]]);\nfunction ft(t) {\n t.component(\"ACell\", he), t.component(\"AExpansionRow\", Je), t.component(\"ARow\", be), t.component(\"ATable\", ct), t.component(\"ATableHeader\", xe), t.component(\"ATableModal\", ve);\n}\nexport {\n he as ACell,\n Je as AExpansionRow,\n be as ARow,\n ct as ATable,\n xe as ATableHeader,\n ve as ATableModal,\n ot as TableDataStore,\n ft as install\n};\n//# sourceMappingURL=atable.js.map\n","\n\n\n","\n\n\n\n\n","import { App } from 'vue'\n\nimport ActionSet from '@/components/ActionSet.vue'\nimport CommandPalette from '@/components/CommandPalette.vue'\nimport Doctype from '@/components/Doctype.vue'\nimport Records from '@/components/Records.vue'\nimport SheetNav from '@/components/SheetNav.vue'\n\nexport default {\n\tinstall: (app: App) => {\n\t\tapp.component('ActionSet', ActionSet)\n\t\tapp.component('CommandPalette', CommandPalette)\n\t\tapp.component('Doctype', Doctype)\n\t\tapp.component('Records', Records)\n\t\tapp.component('SheetNav', SheetNav)\n\t},\n}\n"],"names":["_elements","ref","isOpen","timeout","hover","closeClicked","onMounted","props","closeDropdowns","element","onHover","onHoverLeave","toggleDropdown","index","showDropdown","_cache","A","l","n","o","Q","ae","Ge","Y","j","W","Xe","G","Ze","et","z","tt","nt","yt","D","g","s","r","i","a","M","f","_","$","O","B","Ee","xe","v","p","ie","ne","Et","xt","t","At","Ct","Mt","Ie","Stonecrop","registry","store","schema","workflow","actions","doctype","doctypeRegistry","filters","data","id","action","initialState","action2","isVue2","set","target","key","val","del","getDevtoolsGlobalHook$1","getTarget$1","isProxyAvailable$1","HOOK_SETUP$1","HOOK_PLUGIN_SETTINGS_SET$1","supported$1","perf$1","isPerformanceSupported$1","_a","now$2","ApiProxy$1","plugin","hook","defaultSettings","item","localSettingsSaveId","currentSettings","raw","value","pluginId","_target","prop","args","resolve","setupDevtoolsPlugin$1","pluginDescriptor","setupFn","descriptor","enableProxy","proxy","activePinia","setActivePinia","pinia2","piniaSymbol","isPlainObject","MutationType","MutationType2","IS_CLIENT","USE_DEVTOOLS","_global","bom","blob","autoBom","download","url","name","opts","xhr","saveAs","corsEnabled","click","node","evt","_navigator","isMacOSWebView","downloadSaveAs","msSaveAs","fileSaverSaveAs","popup","force","isSafari","isChromeIOS","reader","toastMessage","message","type2","piniaMessage","isPinia","checkClipboardAccess","checkNotFocusedError","error","actionGlobalCopyState","actionGlobalPasteState","actionGlobalSaveState","fileInput","getFileOpener","openFile","reject","files","file","actionGlobalOpenStateFile","result","text","formatDisplay$1","display","PINIA_ROOT_LABEL","PINIA_ROOT_ID","formatStoreForInspectorTree","formatStoreForInspectorState","storeNames","storeMap","storeId","store2","getters","state","getterName","formatEventData","events","event","formatMutationType","isTimelineActive","componentStateTypes","MUTATIONS_LAYER_ID","INSPECTOR_ID","assign$1","getStoreType","registerPiniaDevtools","app","api","nodeId","payload","ctx","piniaStores","toRaw","stores","inspectedStore","path","addStoreToDevtools","now2","after","onError","groupId","runningActionId","activeAction","watch","unref","newValue","oldValue","eventData","hotUpdate","markRaw","newStore","$dispose","patchActionForGrouping","actionNames","storeActions","actionName","_actionId","trackedStore","devtoolsPlugin","options","originalHotUpdate","createPinia","scope","effectScope","_p","toBeInstalled","patchObject","newState","oldState","subPatch","targetValue","isRef","isReactive","noop$1","addSubscription","subscriptions","callback","detached","onCleanup","removeSubscription","idx","getCurrentScope","onScopeDispose","triggerSubscriptions","mergeReactiveObjects","patchToApply","skipHydrateSymbol","shouldHydrate","obj","assign$2","isComputed","createOptionsStore","hot","setup","localState","toRefs","computedGetters","computed","createSetupStore","$id","isOptionsStore","optionsForPlugin","$subscribeOptions","isListening","debuggerEvents","isSyncListening","actionSubscriptions","hotState","activeListener","$patch","partialStateOrMutator","subscriptionMutation","myListenerId","nextTick","$reset","$state","wrapAction","afterCallbackList","onErrorCallbackList","ret","_hmrPayload","partialStore","options2","stopWatcher","reactive","setupStore","toRef","actionValue","stateKey","newStateTarget","oldStateSource","getter","getterValue","nonEnumerable","extender","extensions","defineStore","idOrOptions","setupOptions","isSetupStore","useStore","currentInstance","getCurrentInstance","inject","hotId","vm","cache","useDataStore","records","record","useStonecrop","stonecrop","isReady","onBeforeMount","_b","route","doctypeSlug","recordId","getDevtoolsGlobalHook","getTarget","isProxyAvailable","HOOK_SETUP","HOOK_PLUGIN_SETTINGS_SET","supported","perf","isPerformanceSupported","now$1","ApiProxy2","setupDevtoolsPlugin","isBrowser","isESModule","assign","applyToParams","fn","params","newParams","isArray","noop","warn","msg","TRAILING_SLASH_RE","removeTrailingSlash","parseURL","parseQuery2","location2","currentLocation","query","searchString","hash","hashPos","searchPos","resolveRelativePath","stringifyURL","stringifyQuery2","stripBase","pathname","base","isSameRouteLocation","b","aLastIndex","bLastIndex","isSameRouteRecord","isSameRouteLocationParams","isSameRouteLocationParamsValue","isEquivalentArray","to","from","fromSegments","toSegments","position","toPosition","segment","NavigationType","NavigationType2","NavigationDirection","NavigationDirection2","normalizeBase","baseEl","BEFORE_HASH_RE","createHref","getElementPosition","el","offset","docRect","elRect","computeScrollPosition","scrollToPosition","scrollToOptions","positionEl","isIdSelector","foundEl","getScrollKey","delta","scrollPositions","saveScrollPosition","scrollPosition","getSavedScrollPosition","scroll","createBaseLocation","createCurrentLocation","search","slicePos","pathFromHash","useHistoryListeners","historyState","replace","listeners","teardowns","pauseState","popStateHandler","fromState","listener","pauseListeners","listen","teardown","index2","beforeUnloadListener","history2","destroy","buildState","back","current","forward","replaced","computeScroll","useHistoryStateNavigation","changeLocation","replace2","hashIndex","err","push","currentState","createWebHistory","historyNavigation","historyListeners","go","triggerListeners","routerHistory","isRouteLocation","isRouteName","START_LOCATION_NORMALIZED","NavigationFailureSymbol","NavigationFailureType","NavigationFailureType2","ErrorTypeMessages","stringifyRoute","createRouterError","isNavigationFailure","propertiesToLog","BASE_PARAM_PATTERN","BASE_PATH_PARSER_OPTIONS","REGEX_CHARS_RE","tokensToParser","segments","extraOptions","score","pattern","keys","segmentScores","tokenIndex","token","subSegmentScore","repeatable","optional","regexp","re2","subPattern","re","parse2","match","stringify2","avoidDuplicatedSlash","param","compareScoreArray","diff","comparePathParserScore","aScore","bScore","comp","isLastScoreNegative","last","ROOT_TOKEN","VALID_PARAM_RE","tokenizePath","crash","buffer","previousState","tokens","finalizeSegment","char","customRe","consumeBuffer","addCharToBuffer","createRouteRecordMatcher","parent","parser","existingKeys","matcher","createRouterMatcher","routes","globalOptions","matchers","matcherMap","mergeOptions","getRecordMatcher","addRoute","originalRecord","isRootAdd","mainNormalizedRecord","normalizeRouteRecord","checkChildMissingNameWithEmptyPath","normalizedRecords","aliases","alias","originalMatcher","normalizedRecord","parentPath","connectingSlash","checkMissingParamsInAbsolutePath","checkSameParams","isAliasRecord","removeRoute","children","insertMatcher","matcherRef","getRoutes","isRecordChildOf","invalidParams","paramName","k","paramsFromLocation","m2","matched","parentMatcher","mergeMetaFields","normalizeRecordProps","propsObject","meta","defaults","partialOptions","isSameParam","child","HASH_RE","AMPERSAND_RE","SLASH_RE","EQUAL_RE","IM_RE","PLUS_RE","ENC_BRACKET_OPEN_RE","ENC_BRACKET_CLOSE_RE","ENC_CARET_RE","ENC_BACKTICK_RE","ENC_CURLY_OPEN_RE","ENC_PIPE_RE","ENC_CURLY_CLOSE_RE","ENC_SPACE_RE","commonEncode","encodeHash","encodeQueryValue","encodeQueryKey","encodePath","encodeParam","decode","parseQuery","searchParams","searchParam","eqPos","currentValue","stringifyQuery","value2","normalizeQuery","normalizedQuery","matchedRouteKey","viewDepthKey","routerKey","routeLocationKey","routerViewLocationKey","useCallbacks","handlers","add","handler","reset","guardToPromiseFn","guard","enterCallbackArray","next","valid","guardReturn","canOnlyBeCalledOnce","guardCall","resolvedValue","called","extractComponentsGuards","guardType","guards","rawComponent","promise","isRouteComponent","componentPromise","resolved","resolvedComponent","component","useLink","router2","currentRoute","activeRecordIndex","length","routeMatched","currentMatched","parentRecordPath","getOriginalPath","isActive","includesParams","isExactActive","navigate","e","guardEvent","instance","linkContextDevtools","watchEffect","RouterLinkImpl","defineComponent","slots","link","elClass","getLinkClass","h$1","RouterLink","outer","inner","innerValue","outerValue","propClass","globalClass","defaultClass","RouterViewImpl","attrs","warnDeprecatedUsage","injectedRoute","routeToDisplay","injectedDepth","depth","initialDepth","matchedRoute","matchedRouteRef","provide","viewRef","oldInstance","oldName","currentName","ViewComponent","normalizeSlot","routePropsOption","routeProps","vnode","info","slot","slotContent","RouterView","parentName","formatRouteLocation","routeLocation","tooltip","copy","omit","formatDisplay","routerId","addDevtools","componentInstance","PINK_500","devtoolsData","backgroundColor","ORANGE_400","LIME_500","BLUE_600","refreshRoutesView","routerInspectorId","navigationsLayerId","navigationId","failure","activeRoutesPayload","resetMatchStateOnRouteRecord","isRouteMatching","markRouteRecordActive","formatRouteRecordForInspector","route2","formatRouteRecordMatcherForStateInspector","modifierForKey","fields","CYAN_400","DARK","tags","routeRecordId","EXTRACT_REGEXP_RE","childRoute","filter","found","decodedPath","createRouter","parseQuery$1","stringifyQuery$1","beforeGuards","beforeResolveGuards","afterGuards","shallowRef","pendingLocation","normalizeParams","paramValue","encodeParams","decodeParams","parentOrRoute","recordMatcher","routeMatcher","hasRoute","rawLocation","locationNormalized","matchedRoute2","href2","matcherLocation","targetParams","fullPath","href","locationAsObject","checkCanceledNavigation","pushWithRedirect","handleRedirectRecord","lastMatched","redirect","newTargetLocation","redirectedFrom","targetLocation","shouldRedirect","toLocation","handleScroll","markAsReady","triggerError","failure2","finalizeNavigation","triggerAfterEach","checkCanceledNavigationAndReject","leavingRecords","updatingRecords","enteringRecords","extractChangingRecords","canceledNavigationCheck","runGuardQueue","beforeEnter","isPush","isFirstNavigation","removeHistoryListener","setupListeners","_from","readyHandlers","errorHandlers","ready","list","resolve2","scrollBehavior","started","installedApps","router3","reactiveRoute","unmountApp","len","recordFrom","recordTo","isPromise","PROMISE_RESOLVED_VOID","sleep","time","resolveWith","res","randomInt","min","max","randomToken","lastMs","additional","microSeconds$4","ms","microSeconds$3","type$3","create$3","channelName","close$3","channelState","postMessage$3","messageJson","onMessage$3","canBeUsed$3","averageResponseTime$3","NativeMethod","ObliviousSet","ObliviousSet2","ttl","_this","now","removeTooOldValues","obliviousSet","olderThen","iterator","fillOptionsWithDefaults","originalOptions","microSeconds$2","DB_PREFIX","OBJECT_STORE_ID","TRANSACTION_SETTINGS","type$2","getIdb","commitIndexedDBTransaction","tx","createDatabase","IndexedDB","dbName","openRequest","ev","db","rej","writeMessage","readerUuid","writeObject","objectStore","getMessagesHigherThan","lastCursorId","keyRangeValue","getAllRequest","openCursor","openCursorRequest","cursor","removeMessagesById","ids","deleteRequest","getOldMessages","msgObk","cleanOldMessages","tooOld","create$2","_readLoop","readNewMessages","_filterMessage","msgObj","newerMessages","useMessages","msgObjA","msgObjB","close$2","postMessage$2","onMessage$2","canBeUsed$2","averageResponseTime$2","IndexedDBMethod","microSeconds$1","KEY_PREFIX","type$1","getLocalStorage","localStorage2","storageKey","postMessage$1","writeObj","addStorageEventListener","removeStorageEventListener","create$1","canBeUsed$1","uuid","eMIs","close$1","onMessage$1","ls","averageResponseTime$1","defaultTime","userAgent","LocalstorageMethod","microSeconds","type","SIMULATE_CHANNELS","create","close","postMessage","channelArray","channel","onMessage","canBeUsed","averageResponseTime","SimulateMethod","METHODS","chooseMethod","chooseMethods","useMethod","method","OPEN_BROADCAST_CHANNELS","lastId","BroadcastChannel$1","_prepareChannel","_post","listenObj","_removeListenerObject","_addListenerObject","obj2","awaitPrepare","broadcastChannel","sendPromise","maybePromise","_hasMessageListeners","_startListening","_stopListening","listenerFn","listenerObject","hundredMsInMicro","minMessageTime","escaped","DevalueError","is_primitive","thing","object_proto_names","is_plain_object","proto","get_type","stringify_string","str","code","UNDEFINED","HOLE","NAN","POSITIVE_INFINITY","NEGATIVE_INFINITY","NEGATIVE_ZERO","parse","serialized","revivers","unflatten","parsed","hydrate","values","hydrated","standalone","reviver","set2","map","array","object","stringify","reducers","stringified","indexes","custom","flatten","index3","stringify_primitive","source","flags","m","d","u","h","_a2","pinia","newSchema","fieldValue","J","pe","Te","$e","fe","Oe","De","_e","U","me","Re","c","X","Se","E","Z","Pe","K","He","Le","ee","Me","Ne","y","I","te","Ue","je","oe","le","F","Ve","we","q","ye","We","Be","Qe","S","w","P","V","C","he","Ye","de","ce","x","ue","be","R","Ke","se","ge","ot","lt","at","rt","st","T","L","N","H","ke","it","ve","dt","Ce","Ae","ct","config","breadcrumbs","breadcrumbsVisibile","searchVisibile","searchText","searchinput","rotateHideTabIcon","toggleBreadcrumbs","toggleSearch","handleSearchInput","handleSearch","navigateHome","ActionSet","CommandPalette","Doctype","Records","SheetNav"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiFMA,IAAYC,EAAkB,CAAA,CAAE,GAChCC,IAASD,EAAI,EAAK,GAClBE,IAAUF,EAAoB,IAAI,GAClCG,IAAQH,EAAI,EAAK,GACjBI,IAAeJ,EAAI,EAAK;AAE9B,IAAAK,GAAU,MAAM;AACf,MAAAN,EAAU,QAAQO,EAAM,UACTC;IAAA,CACf;AAED,UAAMA,IAAiB,MAAM;AACnB,eAAAC,KAAWT,EAAU;AACzB,QAAAS,EAAQ,gBAAgB,eAC3BA,EAAQ,OAAO;AAAA,IAEjB,GAGKC,IAAU,MAAM;AACrB,MAAAN,EAAM,QAAQ,IACND,EAAA,QAAQ,WAAW,MAAM;AAChC,QAAIC,EAAM,UACTF,EAAO,QAAQ;AAAA,SAEd,GAAG;AAAA,IAAA,GAGDS,IAAe,MAAM;AAC1B,MAAAP,EAAM,QAAQ,IACdC,EAAa,QAAQ,IACrB,aAAaF,EAAQ,KAAK,GAC1BD,EAAO,QAAQ;AAAA,IAAA,GAGVU,IAAiB,CAACC,MAAkB;AACzC,YAAMC,IAAe,CAACd,EAAU,MAAMa,CAAK,EAAE;AAC9B,MAAAL,KACLR,EAAA,MAAMa,CAAK,EAAE,OAAOC;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eCtHbC,GAAA;;;qDC8CZC,KAAI,CAAC,GAAG,MAAM;AAClB,QAAMC,IAAI,EAAE,aAAa;AACzB,aAAW,CAACC,GAAGC,CAAC,KAAK;AACnB,IAAAF,EAAEC,CAAC,IAAIC;AACT,SAAOF;AACT;AA4DA,IAAIG;AACC,MAACC,KAAK,OAAO,SAAS;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IAAI,GAEnCygC,IAAoBzwB,EAAS,MAC3BqwB,EAAoB,QAAQ,cAAc,SACjD;AAED,IAAAhgC,GAAU,MAAM;AACH,MAAA+/B,EAAA,QAAQ9/B,EAAM,eAAe,CAAA;AAAA,IAAC,CAC1C;AAED,UAAMogC,IAAoB,MAAM;AACX,MAAAL,EAAA,QAAQ,CAACA,EAAoB;AAAA,IAAA,GAG5CM,IAAe,YAAY;AACjB,MAAAL,EAAA,QAAQ,CAACA,EAAe,OACvC,MAAMtvB,GAAS,MAAM;AACpB,QAAAwvB,EAAY,MAAM;MAAM,CACxB;AAAA,IAAA,GAGII,IAAoB,CAAC51B,MAA8B;AACxD,MAAAA,EAAM,eAAe,GACrBA,EAAM,gBAAgB;AAAA,IAAA,GAGjB61B,IAAe,OAAO71B,MAAsC;AACjE,MAAAA,EAAM,eAAe,GACrBA,EAAM,gBAAgB,GACtB,MAAM21B,EAAa;AAAA,IAAA,GAGdG,IAAe,MAA6C;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uEC9GnDlgC,KAAA;AAAA,EACd,SAAS,CAAC6K,MAAa;AAClB,IAAAA,EAAA,UAAU,aAAas1B,EAAS,GAChCt1B,EAAA,UAAU,kBAAkBu1B,EAAc,GAC1Cv1B,EAAA,UAAU,WAAWw1B,EAAO,GAC5Bx1B,EAAA,UAAU,WAAWy1B,EAAO,GAC5Bz1B,EAAA,UAAU,YAAY01B,EAAQ;AAAA,EACnC;AACD;"} \ No newline at end of file diff --git a/desktop/dist/desktop.umd.cjs b/desktop/dist/desktop.umd.cjs index 30a97e67..7bf39a3c 100644 --- a/desktop/dist/desktop.umd.cjs +++ b/desktop/dist/desktop.umd.cjs @@ -1,38 +1,38 @@ -(function(W,s){typeof exports=="object"&&typeof module<"u"?s(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],s):(W=typeof globalThis<"u"?globalThis:W||self,s(W["@agritheory/desktop"]={},W.Vue))})(this,function(W,s){"use strict";const ze=e=>(s.pushScopeId("data-v-b7fdfbec"),e=e(),s.popScopeId(),e),Vo={class:"action-menu-icon"},Bo=[ze(()=>s.createElementVNode("svg",{class:"leftBar",version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 100 100","xml:space":"preserve",width:"50",height:"50"},[s.createElementVNode("polygon",{points:"54.2,33.4 29.2,58.8 25,54.6 50,29.2 "})],-1)),ze(()=>s.createElementVNode("svg",{class:"rightBar",version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 100 100","xml:space":"preserve",width:"50",height:"50"},[s.createElementVNode("polygon",{points:"70.8,58.8 45.8,33.4 50,29.2 75,54.6 "})],-1))],Lo=ze(()=>s.createElementVNode("div",{style:{"margin-right":"30px"}},null,-1)),Mo=["onclick"],jo={key:1},Uo=["onClick"],Ho={class:"dropdown-container"},Fo={class:"dropdown"},Wo=["onclick"],zo=["href"],Go={class:"dropdown-item"},Qo=s.defineComponent({__name:"ActionSet",props:{elements:null},setup(e){const t=e,n=s.ref([]),o=s.ref(!1),r=s.ref(null),a=s.ref(!1),i=s.ref(!1);s.onMounted(()=>{n.value=t.elements,c()});const c=()=>{for(let f of n.value)f.elementType==="dropdown"&&(f.show=!1)},l=()=>{a.value=!0,r.value=setTimeout(()=>{a.value&&(o.value=!0)},500)},u=()=>{a.value=!1,i.value=!1,clearTimeout(r.value),o.value=!1},d=f=>{const p=!n.value[f].show;c(),n.value[f].show=p};return(f,p)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass([{"open-set":o.value,"hovered-and-closed":i.value},"action-set collapse"]),onMouseover:l,onMouseleave:u},[s.createElementVNode("div",Vo,[s.createElementVNode("div",{id:"chevron",onClick:p[0]||(p[0]=h=>i.value=!i.value)},Bo)]),Lo,(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(n.value,(h,g)=>(s.openBlock(),s.createElementBlock("div",{class:"action-element",key:g},[h.elementType=="button"?(s.openBlock(),s.createElementBlock("button",{key:0,onclick:h.action,class:"button-default"},s.toDisplayString(h.label),9,Mo)):s.createCommentVNode("",!0),h.elementType=="dropdown"?(s.openBlock(),s.createElementBlock("div",jo,[s.createElementVNode("button",{class:"button-default",onClick:y=>d(g)},s.toDisplayString(h.label),9,Uo),s.withDirectives(s.createElementVNode("div",Ho,[s.createElementVNode("div",Fo,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(h.actions,y=>(s.openBlock(),s.createElementBlock("div",{key:y.label},[y.action!=null?(s.openBlock(),s.createElementBlock("button",{key:0,onclick:y.action,class:"dropdown-item"},s.toDisplayString(y.label),9,Wo)):y.link!=null?(s.openBlock(),s.createElementBlock("a",{key:1,href:y.link},[s.createElementVNode("button",Go,s.toDisplayString(y.label),1)],8,zo)):s.createCommentVNode("",!0)]))),128))])],512),[[s.vShow,h.show]])])):s.createCommentVNode("",!0)]))),128))],34))}}),cc="",Ge=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},Ct=Ge(Qo,[["__scopeId","data-v-b7fdfbec"]]),Ko={};function qo(e,t){return s.openBlock(),s.createElementBlock("dialog")}const Rt=Ge(Ko,[["render",qo]]),Jo=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n};var Tt;typeof window<"u"&&(Tt=window==null?void 0:window.navigator)!=null&&Tt.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Yo(e){return e}const At=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Dt="__vueuse_ssr_handlers__";At[Dt]=At[Dt]||{};var Vt;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(Vt||(Vt={}));var Xo=Object.defineProperty,Bt=Object.getOwnPropertySymbols,Zo=Object.prototype.hasOwnProperty,er=Object.prototype.propertyIsEnumerable,Lt=(e,t,n)=>t in e?Xo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,tr=(e,t)=>{for(var n in t||(t={}))Zo.call(t,n)&&Lt(e,n,t[n]);if(Bt)for(var n of Bt(t))er.call(t,n)&&Lt(e,n,t[n]);return e};tr({linear:Yo},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]});const nr=Jo(s.defineComponent({__name:"AForm",props:{modelValue:null,data:null,readonly:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=s.ref(n.data||{}),r=i=>{let c={};for(const[l,u]of Object.entries(i))["component","fieldtype"].includes(l)||(c[l]=u),l==="rows"&&u&&u.length===0&&(c.rows=o.value[i.fieldname]);return c},a=s.computed({get:()=>n.modelValue.map((i,c)=>s.computed({get(){return i.value},set:l=>{n.modelValue[c].value=l,t("update:modelValue",n.modelValue)}})),set:()=>{}});return(i,c)=>(s.openBlock(),s.createElementBlock("form",null,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(e.modelValue,(l,u)=>(s.openBlock(),s.createBlock(s.resolveDynamicComponent(l.component),s.mergeProps({key:u,schema:l,modelValue:s.unref(a)[u].value,"onUpdate:modelValue":d=>s.unref(a)[u].value=d,data:o.value[l.fieldname],readonly:e.readonly},r(l)),null,16,["schema","modelValue","onUpdate:modelValue","data","readonly"]))),128))]))}}),[["__scopeId","data-v-74d66cf2"]]),Mt={date:"##/##/####",datetime:"####/##/## ##:##",time:"##:##",fulltime:"##:##:##",phone:"(###) ### - ####",card:"#### #### #### ####"};function or(e){try{return Function(`"use strict";return (${e})`)()}catch{}}function rr(e){var t;let n=e.value;if(n){const o=or(n);if(o){const r=e.instance.locale;n=o(r)}}else{const o=(t=e.instance.schema.fieldtype)==null?void 0:t.toLowerCase();o&&Mt[o]&&(n=Mt[o])}return n}function sr(e,t){t||(t="#");let n=e;const o=[t,"/","-","(",")"," "];for(const r of o)n=n.replaceAll(r,"");return n}function ar(e,t,n){n||(n="#");let o=t;for(const r of e){const a=o.indexOf(n);if(a!==-1){const i=o.substring(0,a),c=o.substring(a+1);o=i+r+c}}return o.slice(0,t.length)}function ir(e,t){const n=rr(t);if(!n)return;const o="#",r=e.value,a=sr(r,o);if(a){const i=ar(a,n,o);t.instance.maskFilled&&(t.instance.maskFilled=!i.includes(o)),e.value=i}else e.value=n}s.defineComponent({name:"ATextInput",props:{schema:{type:Object,required:!0},label:{type:String,required:!0},modelValue:{type:null},mask:{type:String},required:{type:Boolean},readonly:{type:Boolean},uuid:{type:String},validation:{type:Object,default:()=>({errorMessage:" "})}},setup(e,t){const n=s.ref(!1),o=s.inject("locale","");return{inputText:s.computed({get(){return e.modelValue},set(r){t.emit("update:modelValue",r)}}),locale:o,maskFilled:n}},directives:{mask:ir}});class ve{constructor(t,n,o,r,a){if(this.name="Stonecrop",ve._root)return ve._root;ve._root=this,this.registry=t,this.store=n,this.schema=o,this.workflow=r,this.actions=a}setup(t){this.getMeta(t),this.getWorkflow(t),this.getActions(t)}getMeta(t){this.schema={doctype:t.doctype,schema:t.schema}}getWorkflow(t){const n=this.registry.registry[t.slug];this.workflow=n.workflow}getActions(t){const n=this.registry.registry[t.slug];this.actions=n.actions}async getRecords(t,n){this.store.$patch({records:[]});const r=await(await fetch(`/${t.slug}`,n)).json();this.store.$patch({records:r})}async getRecord(t,n){this.store.$patch({record:{}});const r=await(await fetch(`/${t.slug}/${n}`)).json();this.store.$patch({record:r})}runAction(t,n,o){const a=this.registry.registry[t.slug].actions.get(n),{initialState:i}=this.workflow;this.workflow.transition(i,{type:n}),a.length>0&&a.forEach(c=>{new Function(c)(o)})}}var jt=!1;function Re(e,t,n){return Array.isArray(e)?(e.length=Math.max(e.length,t),e.splice(t,1,n),n):(e[t]=n,n)}function Qe(e,t){if(Array.isArray(e)){e.splice(t,1);return}delete e[t]}function cr(){return Ut().__VUE_DEVTOOLS_GLOBAL_HOOK__}function Ut(){return typeof navigator<"u"&&typeof window<"u"?window:typeof global<"u"?global:{}}const lr=typeof Proxy=="function",ur="devtools-plugin:setup",dr="plugin:settings:set";let pe,Ke;function fr(){var e;return pe!==void 0||(typeof window<"u"&&window.performance?(pe=!0,Ke=window.performance):typeof global<"u"&&(!((e=global.perf_hooks)===null||e===void 0)&&e.performance)?(pe=!0,Ke=global.perf_hooks.performance):pe=!1),pe}function pr(){return fr()?Ke.now():Date.now()}let hr=class{constructor(t,n){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=t,this.hook=n;const o={};if(t.settings)for(const i in t.settings){const c=t.settings[i];o[i]=c.defaultValue}const r=`__vue-devtools-plugin-settings__${t.id}`;let a=Object.assign({},o);try{const i=localStorage.getItem(r),c=JSON.parse(i);Object.assign(a,c)}catch{}this.fallbacks={getSettings(){return a},setSettings(i){try{localStorage.setItem(r,JSON.stringify(i))}catch{}a=i},now(){return pr()}},n&&n.on(dr,(i,c)=>{i===this.plugin.id&&this.fallbacks.setSettings(c)}),this.proxiedOn=new Proxy({},{get:(i,c)=>this.target?this.target.on[c]:(...l)=>{this.onQueue.push({method:c,args:l})}}),this.proxiedTarget=new Proxy({},{get:(i,c)=>this.target?this.target[c]:c==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(c)?(...l)=>(this.targetQueue.push({method:c,args:l,resolve:()=>{}}),this.fallbacks[c](...l)):(...l)=>new Promise(u=>{this.targetQueue.push({method:c,args:l,resolve:u})})})}async setRealTarget(t){this.target=t;for(const n of this.onQueue)this.target.on[n.method](...n.args);for(const n of this.targetQueue)n.resolve(await this.target[n.method](...n.args))}};function Ht(e,t){const n=e,o=Ut(),r=cr(),a=lr&&n.enableEarlyProxy;if(r&&(o.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!a))r.emit(ur,e,t);else{const i=a?new hr(n,r):null;(o.__VUE_DEVTOOLS_PLUGINS__=o.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:i}),i&&t(i.proxiedTarget)}}/*! +(function(G,s){typeof exports=="object"&&typeof module<"u"?s(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],s):(G=typeof globalThis<"u"?globalThis:G||self,s(G["@agritheory/desktop"]={},G.Vue))})(this,function(G,s){"use strict";const We=e=>(s.pushScopeId("data-v-b7fdfbec"),e=e(),s.popScopeId(),e),Vo={class:"action-menu-icon"},Bo=[We(()=>s.createElementVNode("svg",{class:"leftBar",version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 100 100","xml:space":"preserve",width:"50",height:"50"},[s.createElementVNode("polygon",{points:"54.2,33.4 29.2,58.8 25,54.6 50,29.2 "})],-1)),We(()=>s.createElementVNode("svg",{class:"rightBar",version:"1.1",id:"Layer_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 100 100","xml:space":"preserve",width:"50",height:"50"},[s.createElementVNode("polygon",{points:"70.8,58.8 45.8,33.4 50,29.2 75,54.6 "})],-1))],Lo=We(()=>s.createElementVNode("div",{style:{"margin-right":"30px"}},null,-1)),Mo=["onclick"],jo={key:1},Uo=["onClick"],Ho={class:"dropdown-container"},Fo={class:"dropdown"},Go=["onclick"],Wo=["href"],zo={class:"dropdown-item"},Qo=s.defineComponent({__name:"ActionSet",props:{elements:null},setup(e){const t=e,n=s.ref([]),o=s.ref(!1),r=s.ref(null),a=s.ref(!1),i=s.ref(!1);s.onMounted(()=>{n.value=t.elements,c()});const c=()=>{for(let f of n.value)f.elementType==="dropdown"&&(f.show=!1)},l=()=>{a.value=!0,r.value=setTimeout(()=>{a.value&&(o.value=!0)},500)},u=()=>{a.value=!1,i.value=!1,clearTimeout(r.value),o.value=!1},d=f=>{const p=!n.value[f].show;c(),n.value[f].show=p};return(f,p)=>(s.openBlock(),s.createElementBlock("div",{class:s.normalizeClass([{"open-set":o.value,"hovered-and-closed":i.value},"action-set collapse"]),onMouseover:l,onMouseleave:u},[s.createElementVNode("div",Vo,[s.createElementVNode("div",{id:"chevron",onClick:p[0]||(p[0]=h=>i.value=!i.value)},Bo)]),Lo,(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(n.value,(h,g)=>(s.openBlock(),s.createElementBlock("div",{class:"action-element",key:g},[h.elementType=="button"?(s.openBlock(),s.createElementBlock("button",{key:0,onclick:h.action,class:"button-default"},s.toDisplayString(h.label),9,Mo)):s.createCommentVNode("",!0),h.elementType=="dropdown"?(s.openBlock(),s.createElementBlock("div",jo,[s.createElementVNode("button",{class:"button-default",onClick:y=>d(g)},s.toDisplayString(h.label),9,Uo),s.withDirectives(s.createElementVNode("div",Ho,[s.createElementVNode("div",Fo,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(h.actions,y=>(s.openBlock(),s.createElementBlock("div",{key:y.label},[y.action!=null?(s.openBlock(),s.createElementBlock("button",{key:0,onclick:y.action,class:"dropdown-item"},s.toDisplayString(y.label),9,Go)):y.link!=null?(s.openBlock(),s.createElementBlock("a",{key:1,href:y.link},[s.createElementVNode("button",zo,s.toDisplayString(y.label),1)],8,Wo)):s.createCommentVNode("",!0)]))),128))])],512),[[s.vShow,h.show]])])):s.createCommentVNode("",!0)]))),128))],34))}}),cc="",ze=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},Ct=ze(Qo,[["__scopeId","data-v-b7fdfbec"]]),Ko={};function qo(e,t){return s.openBlock(),s.createElementBlock("dialog")}const Rt=ze(Ko,[["render",qo]]),Jo=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n};var Tt;typeof window<"u"&&(Tt=window==null?void 0:window.navigator)!=null&&Tt.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Yo(e){return e}const At=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Dt="__vueuse_ssr_handlers__";At[Dt]=At[Dt]||{};var Vt;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(Vt||(Vt={}));var Xo=Object.defineProperty,Bt=Object.getOwnPropertySymbols,Zo=Object.prototype.hasOwnProperty,er=Object.prototype.propertyIsEnumerable,Lt=(e,t,n)=>t in e?Xo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,tr=(e,t)=>{for(var n in t||(t={}))Zo.call(t,n)&&Lt(e,n,t[n]);if(Bt)for(var n of Bt(t))er.call(t,n)&&Lt(e,n,t[n]);return e};tr({linear:Yo},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]});const nr=Jo(s.defineComponent({__name:"AForm",props:{modelValue:null,data:null,readonly:{type:Boolean}},emits:["update:modelValue"],setup(e,{emit:t}){const n=e,o=s.ref(n.data||{}),r=i=>{let c={};for(const[l,u]of Object.entries(i))["component","fieldtype"].includes(l)||(c[l]=u),l==="rows"&&u&&u.length===0&&(c.rows=o.value[i.fieldname]);return c},a=s.computed({get:()=>n.modelValue.map((i,c)=>s.computed({get(){return i.value},set:l=>{n.modelValue[c].value=l,t("update:modelValue",n.modelValue)}})),set:()=>{}});return(i,c)=>(s.openBlock(),s.createElementBlock("form",null,[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(e.modelValue,(l,u)=>(s.openBlock(),s.createBlock(s.resolveDynamicComponent(l.component),s.mergeProps({key:u,schema:l,modelValue:s.unref(a)[u].value,"onUpdate:modelValue":d=>s.unref(a)[u].value=d,data:o.value[l.fieldname],readonly:e.readonly},r(l)),null,16,["schema","modelValue","onUpdate:modelValue","data","readonly"]))),128))]))}}),[["__scopeId","data-v-74d66cf2"]]),Mt={date:"##/##/####",datetime:"####/##/## ##:##",time:"##:##",fulltime:"##:##:##",phone:"(###) ### - ####",card:"#### #### #### ####"};function or(e){try{return Function(`"use strict";return (${e})`)()}catch{}}function rr(e){var t;let n=e.value;if(n){const o=or(n);if(o){const r=e.instance.locale;n=o(r)}}else{const o=(t=e.instance.schema.fieldtype)==null?void 0:t.toLowerCase();o&&Mt[o]&&(n=Mt[o])}return n}function sr(e,t){t||(t="#");let n=e;const o=[t,"/","-","(",")"," "];for(const r of o)n=n.replaceAll(r,"");return n}function ar(e,t,n){n||(n="#");let o=t;for(const r of e){const a=o.indexOf(n);if(a!==-1){const i=o.substring(0,a),c=o.substring(a+1);o=i+r+c}}return o.slice(0,t.length)}function ir(e,t){const n=rr(t);if(!n)return;const o="#",r=e.value,a=sr(r,o);if(a){const i=ar(a,n,o);t.instance.maskFilled&&(t.instance.maskFilled=!i.includes(o)),e.value=i}else e.value=n}s.defineComponent({name:"ATextInput",props:{schema:{type:Object,required:!0},label:{type:String,required:!0},modelValue:{type:null},mask:{type:String},required:{type:Boolean},readonly:{type:Boolean},uuid:{type:String},validation:{type:Object,default:()=>({errorMessage:" "})}},setup(e,t){const n=s.ref(!1),o=s.inject("locale","");return{inputText:s.computed({get(){return e.modelValue},set(r){t.emit("update:modelValue",r)}}),locale:o,maskFilled:n}},directives:{mask:ir}});class ve{constructor(t,n,o,r,a){if(this.name="Stonecrop",ve._root)return ve._root;ve._root=this,this.registry=t,this.store=n,this.schema=o,this.workflow=r,this.actions=a}setup(t){this.getMeta(t),this.getWorkflow(t),this.getActions(t)}getMeta(t){this.schema={doctype:t.doctype,schema:t.schema}}getWorkflow(t){const n=this.registry.registry[t.slug];this.workflow=n.workflow}getActions(t){const n=this.registry.registry[t.slug];this.actions=n.actions}async getRecords(t,n){this.store.$patch({records:[]});const r=await(await fetch(`/${t.slug}`,n)).json();this.store.$patch({records:r})}async getRecord(t,n){this.store.$patch({record:{}});const r=await(await fetch(`/${t.slug}/${n}`)).json();this.store.$patch({record:r})}runAction(t,n,o){const a=this.registry.registry[t.slug].actions.get(n),{initialState:i}=this.workflow;this.workflow.transition(i,{type:n}),a.length>0&&a.forEach(c=>{new Function(c)(o)})}}var jt=!1;function Re(e,t,n){return Array.isArray(e)?(e.length=Math.max(e.length,t),e.splice(t,1,n),n):(e[t]=n,n)}function Qe(e,t){if(Array.isArray(e)){e.splice(t,1);return}delete e[t]}function cr(){return Ut().__VUE_DEVTOOLS_GLOBAL_HOOK__}function Ut(){return typeof navigator<"u"&&typeof window<"u"?window:typeof global<"u"?global:{}}const lr=typeof Proxy=="function",ur="devtools-plugin:setup",dr="plugin:settings:set";let pe,Ke;function fr(){var e;return pe!==void 0||(typeof window<"u"&&window.performance?(pe=!0,Ke=window.performance):typeof global<"u"&&(!((e=global.perf_hooks)===null||e===void 0)&&e.performance)?(pe=!0,Ke=global.perf_hooks.performance):pe=!1),pe}function pr(){return fr()?Ke.now():Date.now()}let hr=class{constructor(t,n){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=t,this.hook=n;const o={};if(t.settings)for(const i in t.settings){const c=t.settings[i];o[i]=c.defaultValue}const r=`__vue-devtools-plugin-settings__${t.id}`;let a=Object.assign({},o);try{const i=localStorage.getItem(r),c=JSON.parse(i);Object.assign(a,c)}catch{}this.fallbacks={getSettings(){return a},setSettings(i){try{localStorage.setItem(r,JSON.stringify(i))}catch{}a=i},now(){return pr()}},n&&n.on(dr,(i,c)=>{i===this.plugin.id&&this.fallbacks.setSettings(c)}),this.proxiedOn=new Proxy({},{get:(i,c)=>this.target?this.target.on[c]:(...l)=>{this.onQueue.push({method:c,args:l})}}),this.proxiedTarget=new Proxy({},{get:(i,c)=>this.target?this.target[c]:c==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(c)?(...l)=>(this.targetQueue.push({method:c,args:l,resolve:()=>{}}),this.fallbacks[c](...l)):(...l)=>new Promise(u=>{this.targetQueue.push({method:c,args:l,resolve:u})})})}async setRealTarget(t){this.target=t;for(const n of this.onQueue)this.target.on[n.method](...n.args);for(const n of this.targetQueue)n.resolve(await this.target[n.method](...n.args))}};function Ht(e,t){const n=e,o=Ut(),r=cr(),a=lr&&n.enableEarlyProxy;if(r&&(o.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!a))r.emit(ur,e,t);else{const i=a?new hr(n,r):null;(o.__VUE_DEVTOOLS_PLUGINS__=o.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:i}),i&&t(i.proxiedTarget)}}/*! * pinia v2.0.33 * (c) 2023 Eduardo San Martin Morote * @license MIT - */let be;const Ee=e=>be=e,Ft=process.env.NODE_ENV!=="production"?Symbol("pinia"):Symbol();function ie(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var q;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(q||(q={}));const Te=typeof window<"u",ke=(process.env.NODE_ENV!=="production"||!1)&&process.env.NODE_ENV!=="test"&&Te,Wt=(()=>typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof global=="object"&&global.global===global?global:typeof globalThis=="object"?globalThis:{HTMLElement:null})();function mr(e,{autoBom:t=!1}={}){return t&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([String.fromCharCode(65279),e],{type:e.type}):e}function qe(e,t,n){const o=new XMLHttpRequest;o.open("GET",e),o.responseType="blob",o.onload=function(){Qt(o.response,t,n)},o.onerror=function(){console.error("could not download file")},o.send()}function zt(e){const t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function Ae(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{const n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(n)}}const De=typeof navigator=="object"?navigator:{userAgent:""},Gt=(()=>/Macintosh/.test(De.userAgent)&&/AppleWebKit/.test(De.userAgent)&&!/Safari/.test(De.userAgent))(),Qt=Te?typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype&&!Gt?gr:"msSaveOrOpenBlob"in De?yr:_r:()=>{};function gr(e,t="download",n){const o=document.createElement("a");o.download=t,o.rel="noopener",typeof e=="string"?(o.href=e,o.origin!==location.origin?zt(o.href)?qe(e,t,n):(o.target="_blank",Ae(o)):Ae(o)):(o.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(o.href)},4e4),setTimeout(function(){Ae(o)},0))}function yr(e,t="download",n){if(typeof e=="string")if(zt(e))qe(e,t,n);else{const o=document.createElement("a");o.href=e,o.target="_blank",setTimeout(function(){Ae(o)})}else navigator.msSaveOrOpenBlob(mr(e,n),t)}function _r(e,t,n,o){if(o=o||open("","_blank"),o&&(o.document.title=o.document.body.innerText="downloading..."),typeof e=="string")return qe(e,t,n);const r=e.type==="application/octet-stream",a=/constructor/i.test(String(Wt.HTMLElement))||"safari"in Wt,i=/CriOS\/[\d]+/.test(navigator.userAgent);if((i||r&&a||Gt)&&typeof FileReader<"u"){const c=new FileReader;c.onloadend=function(){let l=c.result;if(typeof l!="string")throw o=null,new Error("Wrong reader.result type");l=i?l:l.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=l:location.assign(l),o=null},c.readAsDataURL(e)}else{const c=URL.createObjectURL(e);o?o.location.assign(c):location.href=c,o=null,setTimeout(function(){URL.revokeObjectURL(c)},4e4)}}function B(e,t){const n="🍍 "+e;typeof __VUE_DEVTOOLS_TOAST__=="function"?__VUE_DEVTOOLS_TOAST__(n,t):t==="error"?console.error(n):t==="warn"?console.warn(n):console.log(n)}function Je(e){return"_a"in e&&"install"in e}function Kt(){if(!("clipboard"in navigator))return B("Your browser doesn't support the Clipboard API","error"),!0}function qt(e){return e instanceof Error&&e.message.toLowerCase().includes("document is not focused")?(B('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.',"warn"),!0):!1}async function wr(e){if(!Kt())try{await navigator.clipboard.writeText(JSON.stringify(e.state.value)),B("Global state copied to clipboard.")}catch(t){if(qt(t))return;B("Failed to serialize the state. Check the console for more details.","error"),console.error(t)}}async function vr(e){if(!Kt())try{e.state.value=JSON.parse(await navigator.clipboard.readText()),B("Global state pasted from clipboard.")}catch(t){if(qt(t))return;B("Failed to deserialize the state from clipboard. Check the console for more details.","error"),console.error(t)}}async function br(e){try{Qt(new Blob([JSON.stringify(e.state.value)],{type:"text/plain;charset=utf-8"}),"pinia-state.json")}catch(t){B("Failed to export the state as JSON. Check the console for more details.","error"),console.error(t)}}let X;function Er(){X||(X=document.createElement("input"),X.type="file",X.accept=".json");function e(){return new Promise((t,n)=>{X.onchange=async()=>{const o=X.files;if(!o)return t(null);const r=o.item(0);return t(r?{text:await r.text(),file:r}:null)},X.oncancel=()=>t(null),X.onerror=n,X.click()})}return e}async function kr(e){try{const n=await(await Er())();if(!n)return;const{text:o,file:r}=n;e.state.value=JSON.parse(o),B(`Global state imported from "${r.name}".`)}catch(t){B("Failed to export the state as JSON. Check the console for more details.","error"),console.error(t)}}function K(e){return{_custom:{display:e}}}const Jt="🍍 Pinia (root)",Ye="_root";function Sr(e){return Je(e)?{id:Ye,label:Jt}:{id:e.$id,label:e.$id}}function Or(e){if(Je(e)){const n=Array.from(e._s.keys()),o=e._s;return{state:n.map(a=>({editable:!0,key:a,value:e.state.value[a]})),getters:n.filter(a=>o.get(a)._getters).map(a=>{const i=o.get(a);return{editable:!1,key:a,value:i._getters.reduce((c,l)=>(c[l]=i[l],c),{})}})}}const t={state:Object.keys(e.$state).map(n=>({editable:!0,key:n,value:e.$state[n]}))};return e._getters&&e._getters.length&&(t.getters=e._getters.map(n=>({editable:!1,key:n,value:e[n]}))),e._customProperties.size&&(t.customProperties=Array.from(e._customProperties).map(n=>({editable:!0,key:n,value:e[n]}))),t}function Ir(e){return e?Array.isArray(e)?e.reduce((t,n)=>(t.keys.push(n.key),t.operations.push(n.type),t.oldValue[n.key]=n.oldValue,t.newValue[n.key]=n.newValue,t),{oldValue:{},keys:[],operations:[],newValue:{}}):{operation:K(e.type),key:K(e.key),oldValue:e.oldValue,newValue:e.newValue}:{}}function Nr(e){switch(e){case q.direct:return"mutation";case q.patchFunction:return"$patch";case q.patchObject:return"$patch";default:return"unknown"}}let he=!0;const Ve=[],ce="pinia:mutations",j="pinia",{assign:Pr}=Object,Be=e=>"🍍 "+e;function xr(e,t){Ht({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:Ve,app:e},n=>{typeof n.now!="function"&&B("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."),n.addTimelineLayer({id:ce,label:"Pinia 🍍",color:15064968}),n.addInspector({id:j,label:"Pinia 🍍",icon:"storage",treeFilterPlaceholder:"Search stores",actions:[{icon:"content_copy",action:()=>{wr(t)},tooltip:"Serialize and copy the state"},{icon:"content_paste",action:async()=>{await vr(t),n.sendInspectorTree(j),n.sendInspectorState(j)},tooltip:"Replace the state with the content of your clipboard"},{icon:"save",action:()=>{br(t)},tooltip:"Save the state as a JSON file"},{icon:"folder_open",action:async()=>{await kr(t),n.sendInspectorTree(j),n.sendInspectorState(j)},tooltip:"Import the state from a JSON file"}],nodeActions:[{icon:"restore",tooltip:"Reset the state (option store only)",action:o=>{const r=t._s.get(o);r?r._isOptionsAPI?(r.$reset(),B(`Store "${o}" reset.`)):B(`Cannot reset "${o}" store because it's a setup store.`,"warn"):B(`Cannot reset "${o}" store because it wasn't found.`,"warn")}}]}),n.on.inspectComponent((o,r)=>{const a=o.componentInstance&&o.componentInstance.proxy;if(a&&a._pStores){const i=o.componentInstance.proxy._pStores;Object.values(i).forEach(c=>{o.instanceData.state.push({type:Be(c.$id),key:"state",editable:!0,value:c._isOptionsAPI?{_custom:{value:s.toRaw(c.$state),actions:[{icon:"restore",tooltip:"Reset the state of this store",action:()=>c.$reset()}]}}:Object.keys(c.$state).reduce((l,u)=>(l[u]=c.$state[u],l),{})}),c._getters&&c._getters.length&&o.instanceData.state.push({type:Be(c.$id),key:"getters",editable:!1,value:c._getters.reduce((l,u)=>{try{l[u]=c[u]}catch(d){l[u]=d}return l},{})})})}}),n.on.getInspectorTree(o=>{if(o.app===e&&o.inspectorId===j){let r=[t];r=r.concat(Array.from(t._s.values())),o.rootNodes=(o.filter?r.filter(a=>"$id"in a?a.$id.toLowerCase().includes(o.filter.toLowerCase()):Jt.toLowerCase().includes(o.filter.toLowerCase())):r).map(Sr)}}),n.on.getInspectorState(o=>{if(o.app===e&&o.inspectorId===j){const r=o.nodeId===Ye?t:t._s.get(o.nodeId);if(!r)return;r&&(o.state=Or(r))}}),n.on.editInspectorState((o,r)=>{if(o.app===e&&o.inspectorId===j){const a=o.nodeId===Ye?t:t._s.get(o.nodeId);if(!a)return B(`store "${o.nodeId}" not found`,"error");const{path:i}=o;Je(a)?i.unshift("state"):(i.length!==1||!a._customProperties.has(i[0])||i[0]in a.$state)&&i.unshift("$state"),he=!1,o.set(a,i,o.state.value),he=!0}}),n.on.editComponentState(o=>{if(o.type.startsWith("🍍")){const r=o.type.replace(/^🍍\s*/,""),a=t._s.get(r);if(!a)return B(`store "${r}" not found`,"error");const{path:i}=o;if(i[0]!=="state")return B(`Invalid path for store "${r}": + */let be;const Ee=e=>be=e,Ft=process.env.NODE_ENV!=="production"?Symbol("pinia"):Symbol();function ie(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var q;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(q||(q={}));const Te=typeof window<"u",ke=(process.env.NODE_ENV!=="production"||!1)&&process.env.NODE_ENV!=="test"&&Te,Gt=(()=>typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof global=="object"&&global.global===global?global:typeof globalThis=="object"?globalThis:{HTMLElement:null})();function mr(e,{autoBom:t=!1}={}){return t&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([String.fromCharCode(65279),e],{type:e.type}):e}function qe(e,t,n){const o=new XMLHttpRequest;o.open("GET",e),o.responseType="blob",o.onload=function(){Qt(o.response,t,n)},o.onerror=function(){console.error("could not download file")},o.send()}function Wt(e){const t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function Ae(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{const n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(n)}}const De=typeof navigator=="object"?navigator:{userAgent:""},zt=(()=>/Macintosh/.test(De.userAgent)&&/AppleWebKit/.test(De.userAgent)&&!/Safari/.test(De.userAgent))(),Qt=Te?typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype&&!zt?gr:"msSaveOrOpenBlob"in De?yr:_r:()=>{};function gr(e,t="download",n){const o=document.createElement("a");o.download=t,o.rel="noopener",typeof e=="string"?(o.href=e,o.origin!==location.origin?Wt(o.href)?qe(e,t,n):(o.target="_blank",Ae(o)):Ae(o)):(o.href=URL.createObjectURL(e),setTimeout(function(){URL.revokeObjectURL(o.href)},4e4),setTimeout(function(){Ae(o)},0))}function yr(e,t="download",n){if(typeof e=="string")if(Wt(e))qe(e,t,n);else{const o=document.createElement("a");o.href=e,o.target="_blank",setTimeout(function(){Ae(o)})}else navigator.msSaveOrOpenBlob(mr(e,n),t)}function _r(e,t,n,o){if(o=o||open("","_blank"),o&&(o.document.title=o.document.body.innerText="downloading..."),typeof e=="string")return qe(e,t,n);const r=e.type==="application/octet-stream",a=/constructor/i.test(String(Gt.HTMLElement))||"safari"in Gt,i=/CriOS\/[\d]+/.test(navigator.userAgent);if((i||r&&a||zt)&&typeof FileReader<"u"){const c=new FileReader;c.onloadend=function(){let l=c.result;if(typeof l!="string")throw o=null,new Error("Wrong reader.result type");l=i?l:l.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=l:location.assign(l),o=null},c.readAsDataURL(e)}else{const c=URL.createObjectURL(e);o?o.location.assign(c):location.href=c,o=null,setTimeout(function(){URL.revokeObjectURL(c)},4e4)}}function B(e,t){const n="🍍 "+e;typeof __VUE_DEVTOOLS_TOAST__=="function"?__VUE_DEVTOOLS_TOAST__(n,t):t==="error"?console.error(n):t==="warn"?console.warn(n):console.log(n)}function Je(e){return"_a"in e&&"install"in e}function Kt(){if(!("clipboard"in navigator))return B("Your browser doesn't support the Clipboard API","error"),!0}function qt(e){return e instanceof Error&&e.message.toLowerCase().includes("document is not focused")?(B('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.',"warn"),!0):!1}async function wr(e){if(!Kt())try{await navigator.clipboard.writeText(JSON.stringify(e.state.value)),B("Global state copied to clipboard.")}catch(t){if(qt(t))return;B("Failed to serialize the state. Check the console for more details.","error"),console.error(t)}}async function vr(e){if(!Kt())try{e.state.value=JSON.parse(await navigator.clipboard.readText()),B("Global state pasted from clipboard.")}catch(t){if(qt(t))return;B("Failed to deserialize the state from clipboard. Check the console for more details.","error"),console.error(t)}}async function br(e){try{Qt(new Blob([JSON.stringify(e.state.value)],{type:"text/plain;charset=utf-8"}),"pinia-state.json")}catch(t){B("Failed to export the state as JSON. Check the console for more details.","error"),console.error(t)}}let X;function Er(){X||(X=document.createElement("input"),X.type="file",X.accept=".json");function e(){return new Promise((t,n)=>{X.onchange=async()=>{const o=X.files;if(!o)return t(null);const r=o.item(0);return t(r?{text:await r.text(),file:r}:null)},X.oncancel=()=>t(null),X.onerror=n,X.click()})}return e}async function kr(e){try{const n=await(await Er())();if(!n)return;const{text:o,file:r}=n;e.state.value=JSON.parse(o),B(`Global state imported from "${r.name}".`)}catch(t){B("Failed to export the state as JSON. Check the console for more details.","error"),console.error(t)}}function K(e){return{_custom:{display:e}}}const Jt="🍍 Pinia (root)",Ye="_root";function Sr(e){return Je(e)?{id:Ye,label:Jt}:{id:e.$id,label:e.$id}}function Or(e){if(Je(e)){const n=Array.from(e._s.keys()),o=e._s;return{state:n.map(a=>({editable:!0,key:a,value:e.state.value[a]})),getters:n.filter(a=>o.get(a)._getters).map(a=>{const i=o.get(a);return{editable:!1,key:a,value:i._getters.reduce((c,l)=>(c[l]=i[l],c),{})}})}}const t={state:Object.keys(e.$state).map(n=>({editable:!0,key:n,value:e.$state[n]}))};return e._getters&&e._getters.length&&(t.getters=e._getters.map(n=>({editable:!1,key:n,value:e[n]}))),e._customProperties.size&&(t.customProperties=Array.from(e._customProperties).map(n=>({editable:!0,key:n,value:e[n]}))),t}function Ir(e){return e?Array.isArray(e)?e.reduce((t,n)=>(t.keys.push(n.key),t.operations.push(n.type),t.oldValue[n.key]=n.oldValue,t.newValue[n.key]=n.newValue,t),{oldValue:{},keys:[],operations:[],newValue:{}}):{operation:K(e.type),key:K(e.key),oldValue:e.oldValue,newValue:e.newValue}:{}}function Nr(e){switch(e){case q.direct:return"mutation";case q.patchFunction:return"$patch";case q.patchObject:return"$patch";default:return"unknown"}}let he=!0;const Ve=[],ce="pinia:mutations",j="pinia",{assign:Pr}=Object,Be=e=>"🍍 "+e;function xr(e,t){Ht({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:Ve,app:e},n=>{typeof n.now!="function"&&B("You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."),n.addTimelineLayer({id:ce,label:"Pinia 🍍",color:15064968}),n.addInspector({id:j,label:"Pinia 🍍",icon:"storage",treeFilterPlaceholder:"Search stores",actions:[{icon:"content_copy",action:()=>{wr(t)},tooltip:"Serialize and copy the state"},{icon:"content_paste",action:async()=>{await vr(t),n.sendInspectorTree(j),n.sendInspectorState(j)},tooltip:"Replace the state with the content of your clipboard"},{icon:"save",action:()=>{br(t)},tooltip:"Save the state as a JSON file"},{icon:"folder_open",action:async()=>{await kr(t),n.sendInspectorTree(j),n.sendInspectorState(j)},tooltip:"Import the state from a JSON file"}],nodeActions:[{icon:"restore",tooltip:"Reset the state (option store only)",action:o=>{const r=t._s.get(o);r?r._isOptionsAPI?(r.$reset(),B(`Store "${o}" reset.`)):B(`Cannot reset "${o}" store because it's a setup store.`,"warn"):B(`Cannot reset "${o}" store because it wasn't found.`,"warn")}}]}),n.on.inspectComponent((o,r)=>{const a=o.componentInstance&&o.componentInstance.proxy;if(a&&a._pStores){const i=o.componentInstance.proxy._pStores;Object.values(i).forEach(c=>{o.instanceData.state.push({type:Be(c.$id),key:"state",editable:!0,value:c._isOptionsAPI?{_custom:{value:s.toRaw(c.$state),actions:[{icon:"restore",tooltip:"Reset the state of this store",action:()=>c.$reset()}]}}:Object.keys(c.$state).reduce((l,u)=>(l[u]=c.$state[u],l),{})}),c._getters&&c._getters.length&&o.instanceData.state.push({type:Be(c.$id),key:"getters",editable:!1,value:c._getters.reduce((l,u)=>{try{l[u]=c[u]}catch(d){l[u]=d}return l},{})})})}}),n.on.getInspectorTree(o=>{if(o.app===e&&o.inspectorId===j){let r=[t];r=r.concat(Array.from(t._s.values())),o.rootNodes=(o.filter?r.filter(a=>"$id"in a?a.$id.toLowerCase().includes(o.filter.toLowerCase()):Jt.toLowerCase().includes(o.filter.toLowerCase())):r).map(Sr)}}),n.on.getInspectorState(o=>{if(o.app===e&&o.inspectorId===j){const r=o.nodeId===Ye?t:t._s.get(o.nodeId);if(!r)return;r&&(o.state=Or(r))}}),n.on.editInspectorState((o,r)=>{if(o.app===e&&o.inspectorId===j){const a=o.nodeId===Ye?t:t._s.get(o.nodeId);if(!a)return B(`store "${o.nodeId}" not found`,"error");const{path:i}=o;Je(a)?i.unshift("state"):(i.length!==1||!a._customProperties.has(i[0])||i[0]in a.$state)&&i.unshift("$state"),he=!1,o.set(a,i,o.state.value),he=!0}}),n.on.editComponentState(o=>{if(o.type.startsWith("🍍")){const r=o.type.replace(/^🍍\s*/,""),a=t._s.get(r);if(!a)return B(`store "${r}" not found`,"error");const{path:i}=o;if(i[0]!=="state")return B(`Invalid path for store "${r}": ${i} -Only state can be modified.`);i[0]="$state",he=!1,o.set(a,i,o.state.value),he=!0}})})}function $r(e,t){Ve.includes(Be(t.$id))||Ve.push(Be(t.$id)),Ht({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:Ve,app:e,settings:{logStoreChanges:{label:"Notify about new/deleted stores",type:"boolean",defaultValue:!0}}},n=>{const o=typeof n.now=="function"?n.now.bind(n):Date.now;t.$onAction(({after:i,onError:c,name:l,args:u})=>{const d=Yt++;n.addTimelineEvent({layerId:ce,event:{time:o(),title:"🛫 "+l,subtitle:"start",data:{store:K(t.$id),action:K(l),args:u},groupId:d}}),i(f=>{le=void 0,n.addTimelineEvent({layerId:ce,event:{time:o(),title:"🛬 "+l,subtitle:"end",data:{store:K(t.$id),action:K(l),args:u,result:f},groupId:d}})}),c(f=>{le=void 0,n.addTimelineEvent({layerId:ce,event:{time:o(),logType:"error",title:"💥 "+l,subtitle:"end",data:{store:K(t.$id),action:K(l),args:u,error:f},groupId:d}})})},!0),t._customProperties.forEach(i=>{s.watch(()=>s.unref(t[i]),(c,l)=>{n.notifyComponentUpdate(),n.sendInspectorState(j),he&&n.addTimelineEvent({layerId:ce,event:{time:o(),title:"Change",subtitle:i,data:{newValue:c,oldValue:l},groupId:le}})},{deep:!0})}),t.$subscribe(({events:i,type:c},l)=>{if(n.notifyComponentUpdate(),n.sendInspectorState(j),!he)return;const u={time:o(),title:Nr(c),data:Pr({store:K(t.$id)},Ir(i)),groupId:le};le=void 0,c===q.patchFunction?u.subtitle="⤵️":c===q.patchObject?u.subtitle="🧩":i&&!Array.isArray(i)&&(u.subtitle=i.type),i&&(u.data["rawEvent(s)"]={_custom:{display:"DebuggerEvent",type:"object",tooltip:"raw DebuggerEvent[]",value:i}}),n.addTimelineEvent({layerId:ce,event:u})},{detached:!0,flush:"sync"});const r=t._hotUpdate;t._hotUpdate=s.markRaw(i=>{r(i),n.addTimelineEvent({layerId:ce,event:{time:o(),title:"🔥 "+t.$id,subtitle:"HMR update",data:{store:K(t.$id),info:K("HMR update")}}}),n.notifyComponentUpdate(),n.sendInspectorTree(j),n.sendInspectorState(j)});const{$dispose:a}=t;t.$dispose=()=>{a(),n.notifyComponentUpdate(),n.sendInspectorTree(j),n.sendInspectorState(j),n.getSettings().logStoreChanges&&B(`Disposed "${t.$id}" store 🗑`)},n.notifyComponentUpdate(),n.sendInspectorTree(j),n.sendInspectorState(j),n.getSettings().logStoreChanges&&B(`"${t.$id}" store installed 🆕`)})}let Yt=0,le;function Xt(e,t){const n=t.reduce((o,r)=>(o[r]=s.toRaw(e)[r],o),{});for(const o in n)e[o]=function(){const r=Yt,a=new Proxy(e,{get(...i){return le=r,Reflect.get(...i)},set(...i){return le=r,Reflect.set(...i)}});return n[o].apply(a,arguments)}}function Cr({app:e,store:t,options:n}){if(!t.$id.startsWith("__hot:")){if(n.state&&(t._isOptionsAPI=!0),typeof n.state=="function"){Xt(t,Object.keys(n.actions));const o=t._hotUpdate;s.toRaw(t)._hotUpdate=function(r){o.apply(this,arguments),Xt(t,Object.keys(r._hmrPayload.actions))}}$r(e,t)}}function Rr(){const e=s.effectScope(!0),t=e.run(()=>s.ref({}));let n=[],o=[];const r=s.markRaw({install(a){Ee(r),r._a=a,a.provide(Ft,r),a.config.globalProperties.$pinia=r,ke&&xr(a,r),o.forEach(i=>n.push(i)),o=[]},use(a){return!this._a&&!jt?o.push(a):n.push(a),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return ke&&typeof Proxy<"u"&&r.use(Cr),r}function Zt(e,t){for(const n in t){const o=t[n];if(!(n in e))continue;const r=e[n];ie(r)&&ie(o)&&!s.isRef(o)&&!s.isReactive(o)?e[n]=Zt(r,o):e[n]=o}return e}const en=()=>{};function tn(e,t,n,o=en){e.push(t);const r=()=>{const a=e.indexOf(t);a>-1&&(e.splice(a,1),o())};return!n&&s.getCurrentScope()&&s.onScopeDispose(r),r}function me(e,...t){e.slice().forEach(n=>{n(...t)})}function Xe(e,t){e instanceof Map&&t instanceof Map&&t.forEach((n,o)=>e.set(o,n)),e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const o=t[n],r=e[n];ie(r)&&ie(o)&&e.hasOwnProperty(n)&&!s.isRef(o)&&!s.isReactive(o)?e[n]=Xe(r,o):e[n]=o}return e}const Tr=process.env.NODE_ENV!=="production"?Symbol("pinia:skipHydration"):Symbol();function Ar(e){return!ie(e)||!e.hasOwnProperty(Tr)}const{assign:z}=Object;function nn(e){return!!(s.isRef(e)&&e.effect)}function on(e,t,n,o){const{state:r,actions:a,getters:i}=t,c=n.state.value[e];let l;function u(){!c&&(process.env.NODE_ENV==="production"||!o)&&(n.state.value[e]=r?r():{});const d=process.env.NODE_ENV!=="production"&&o?s.toRefs(s.ref(r?r():{}).value):s.toRefs(n.state.value[e]);return z(d,a,Object.keys(i||{}).reduce((f,p)=>(process.env.NODE_ENV!=="production"&&p in d&&console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${p}" in store "${e}".`),f[p]=s.markRaw(s.computed(()=>{Ee(n);const h=n._s.get(e);return i[p].call(h,h)})),f),{}))}return l=Ze(e,u,t,n,o,!0),l}function Ze(e,t,n={},o,r,a){let i;const c=z({actions:{}},n);if(process.env.NODE_ENV!=="production"&&!o._e.active)throw new Error("Pinia destroyed");const l={deep:!0};process.env.NODE_ENV!=="production"&&!jt&&(l.onTrigger=k=>{u?h=k:u==!1&&!S._hotUpdating&&(Array.isArray(h)?h.push(k):console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."))});let u,d,f=s.markRaw([]),p=s.markRaw([]),h;const g=o.state.value[e];!a&&!g&&(process.env.NODE_ENV==="production"||!r)&&(o.state.value[e]={});const y=s.ref({});let w;function O(k){let v;u=d=!1,process.env.NODE_ENV!=="production"&&(h=[]),typeof k=="function"?(k(o.state.value[e]),v={type:q.patchFunction,storeId:e,events:h}):(Xe(o.state.value[e],k),v={type:q.patchObject,payload:k,storeId:e,events:h});const R=w=Symbol();s.nextTick().then(()=>{w===R&&(u=!0)}),d=!0,me(f,v,o.state.value[e])}const I=a?function(){const{state:v}=n,R=v?v():{};this.$patch(D=>{z(D,R)})}:process.env.NODE_ENV!=="production"?()=>{throw new Error(`🍍: Store "${e}" is built using the setup syntax and does not implement $reset().`)}:en;function T(){i.stop(),f=[],p=[],o._s.delete(e)}function M(k,v){return function(){Ee(o);const R=Array.from(arguments),D=[],de=[];function Ce(U){D.push(U)}function We(U){de.push(U)}me(p,{args:R,name:k,store:S,after:Ce,onError:We});let Y;try{Y=v.apply(this&&this.$id===e?this:S,R)}catch(U){throw me(de,U),U}return Y instanceof Promise?Y.then(U=>(me(D,U),U)).catch(U=>(me(de,U),Promise.reject(U))):(me(D,Y),Y)}}const G=s.markRaw({actions:{},getters:{},state:[],hotState:y}),Q={_p:o,$id:e,$onAction:tn.bind(null,p),$patch:O,$reset:I,$subscribe(k,v={}){const R=tn(f,k,v.detached,()=>D()),D=i.run(()=>s.watch(()=>o.state.value[e],de=>{(v.flush==="sync"?d:u)&&k({storeId:e,type:q.direct,events:h},de)},z({},l,v)));return R},$dispose:T},S=s.reactive(process.env.NODE_ENV!=="production"||ke?z({_hmrPayload:G,_customProperties:s.markRaw(new Set)},Q):Q);o._s.set(e,S);const J=o._e.run(()=>(i=s.effectScope(),i.run(()=>t())));for(const k in J){const v=J[k];if(s.isRef(v)&&!nn(v)||s.isReactive(v))process.env.NODE_ENV!=="production"&&r?Re(y.value,k,s.toRef(J,k)):a||(g&&Ar(v)&&(s.isRef(v)?v.value=g[k]:Xe(v,g[k])),o.state.value[e][k]=v),process.env.NODE_ENV!=="production"&&G.state.push(k);else if(typeof v=="function"){const R=process.env.NODE_ENV!=="production"&&r?v:M(k,v);J[k]=R,process.env.NODE_ENV!=="production"&&(G.actions[k]=v),c.actions[k]=v}else process.env.NODE_ENV!=="production"&&nn(v)&&(G.getters[k]=a?n.getters[k]:v,Te&&(J._getters||(J._getters=s.markRaw([]))).push(k))}if(z(S,J),z(s.toRaw(S),J),Object.defineProperty(S,"$state",{get:()=>process.env.NODE_ENV!=="production"&&r?y.value:o.state.value[e],set:k=>{if(process.env.NODE_ENV!=="production"&&r)throw new Error("cannot set hotState");O(v=>{z(v,k)})}}),process.env.NODE_ENV!=="production"&&(S._hotUpdate=s.markRaw(k=>{S._hotUpdating=!0,k._hmrPayload.state.forEach(v=>{if(v in S.$state){const R=k.$state[v],D=S.$state[v];typeof R=="object"&&ie(R)&&ie(D)?Zt(R,D):k.$state[v]=D}Re(S,v,s.toRef(k.$state,v))}),Object.keys(S.$state).forEach(v=>{v in k.$state||Qe(S,v)}),u=!1,d=!1,o.state.value[e]=s.toRef(k._hmrPayload,"hotState"),d=!0,s.nextTick().then(()=>{u=!0});for(const v in k._hmrPayload.actions){const R=k[v];Re(S,v,M(v,R))}for(const v in k._hmrPayload.getters){const R=k._hmrPayload.getters[v],D=a?s.computed(()=>(Ee(o),R.call(S,S))):R;Re(S,v,D)}Object.keys(S._hmrPayload.getters).forEach(v=>{v in k._hmrPayload.getters||Qe(S,v)}),Object.keys(S._hmrPayload.actions).forEach(v=>{v in k._hmrPayload.actions||Qe(S,v)}),S._hmrPayload=k._hmrPayload,S._getters=k._getters,S._hotUpdating=!1})),ke){const k={writable:!0,configurable:!0,enumerable:!1};["_p","_hmrPayload","_getters","_customProperties"].forEach(v=>{Object.defineProperty(S,v,z({value:S[v]},k))})}return o._p.forEach(k=>{if(ke){const v=i.run(()=>k({store:S,app:o._a,pinia:o,options:c}));Object.keys(v||{}).forEach(R=>S._customProperties.add(R)),z(S,v)}else z(S,i.run(()=>k({store:S,app:o._a,pinia:o,options:c})))}),process.env.NODE_ENV!=="production"&&S.$state&&typeof S.$state=="object"&&typeof S.$state.constructor=="function"&&!S.$state.constructor.toString().includes("[native code]")&&console.warn(`[🍍]: The "state" must be a plain object. It cannot be +Only state can be modified.`);i[0]="$state",he=!1,o.set(a,i,o.state.value),he=!0}})})}function $r(e,t){Ve.includes(Be(t.$id))||Ve.push(Be(t.$id)),Ht({id:"dev.esm.pinia",label:"Pinia 🍍",logo:"https://pinia.vuejs.org/logo.svg",packageName:"pinia",homepage:"https://pinia.vuejs.org",componentStateTypes:Ve,app:e,settings:{logStoreChanges:{label:"Notify about new/deleted stores",type:"boolean",defaultValue:!0}}},n=>{const o=typeof n.now=="function"?n.now.bind(n):Date.now;t.$onAction(({after:i,onError:c,name:l,args:u})=>{const d=Yt++;n.addTimelineEvent({layerId:ce,event:{time:o(),title:"🛫 "+l,subtitle:"start",data:{store:K(t.$id),action:K(l),args:u},groupId:d}}),i(f=>{le=void 0,n.addTimelineEvent({layerId:ce,event:{time:o(),title:"🛬 "+l,subtitle:"end",data:{store:K(t.$id),action:K(l),args:u,result:f},groupId:d}})}),c(f=>{le=void 0,n.addTimelineEvent({layerId:ce,event:{time:o(),logType:"error",title:"💥 "+l,subtitle:"end",data:{store:K(t.$id),action:K(l),args:u,error:f},groupId:d}})})},!0),t._customProperties.forEach(i=>{s.watch(()=>s.unref(t[i]),(c,l)=>{n.notifyComponentUpdate(),n.sendInspectorState(j),he&&n.addTimelineEvent({layerId:ce,event:{time:o(),title:"Change",subtitle:i,data:{newValue:c,oldValue:l},groupId:le}})},{deep:!0})}),t.$subscribe(({events:i,type:c},l)=>{if(n.notifyComponentUpdate(),n.sendInspectorState(j),!he)return;const u={time:o(),title:Nr(c),data:Pr({store:K(t.$id)},Ir(i)),groupId:le};le=void 0,c===q.patchFunction?u.subtitle="⤵️":c===q.patchObject?u.subtitle="🧩":i&&!Array.isArray(i)&&(u.subtitle=i.type),i&&(u.data["rawEvent(s)"]={_custom:{display:"DebuggerEvent",type:"object",tooltip:"raw DebuggerEvent[]",value:i}}),n.addTimelineEvent({layerId:ce,event:u})},{detached:!0,flush:"sync"});const r=t._hotUpdate;t._hotUpdate=s.markRaw(i=>{r(i),n.addTimelineEvent({layerId:ce,event:{time:o(),title:"🔥 "+t.$id,subtitle:"HMR update",data:{store:K(t.$id),info:K("HMR update")}}}),n.notifyComponentUpdate(),n.sendInspectorTree(j),n.sendInspectorState(j)});const{$dispose:a}=t;t.$dispose=()=>{a(),n.notifyComponentUpdate(),n.sendInspectorTree(j),n.sendInspectorState(j),n.getSettings().logStoreChanges&&B(`Disposed "${t.$id}" store 🗑`)},n.notifyComponentUpdate(),n.sendInspectorTree(j),n.sendInspectorState(j),n.getSettings().logStoreChanges&&B(`"${t.$id}" store installed 🆕`)})}let Yt=0,le;function Xt(e,t){const n=t.reduce((o,r)=>(o[r]=s.toRaw(e)[r],o),{});for(const o in n)e[o]=function(){const r=Yt,a=new Proxy(e,{get(...i){return le=r,Reflect.get(...i)},set(...i){return le=r,Reflect.set(...i)}});return n[o].apply(a,arguments)}}function Cr({app:e,store:t,options:n}){if(!t.$id.startsWith("__hot:")){if(n.state&&(t._isOptionsAPI=!0),typeof n.state=="function"){Xt(t,Object.keys(n.actions));const o=t._hotUpdate;s.toRaw(t)._hotUpdate=function(r){o.apply(this,arguments),Xt(t,Object.keys(r._hmrPayload.actions))}}$r(e,t)}}function Rr(){const e=s.effectScope(!0),t=e.run(()=>s.ref({}));let n=[],o=[];const r=s.markRaw({install(a){Ee(r),r._a=a,a.provide(Ft,r),a.config.globalProperties.$pinia=r,ke&&xr(a,r),o.forEach(i=>n.push(i)),o=[]},use(a){return!this._a&&!jt?o.push(a):n.push(a),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return ke&&typeof Proxy<"u"&&r.use(Cr),r}function Zt(e,t){for(const n in t){const o=t[n];if(!(n in e))continue;const r=e[n];ie(r)&&ie(o)&&!s.isRef(o)&&!s.isReactive(o)?e[n]=Zt(r,o):e[n]=o}return e}const en=()=>{};function tn(e,t,n,o=en){e.push(t);const r=()=>{const a=e.indexOf(t);a>-1&&(e.splice(a,1),o())};return!n&&s.getCurrentScope()&&s.onScopeDispose(r),r}function me(e,...t){e.slice().forEach(n=>{n(...t)})}function Xe(e,t){e instanceof Map&&t instanceof Map&&t.forEach((n,o)=>e.set(o,n)),e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const o=t[n],r=e[n];ie(r)&&ie(o)&&e.hasOwnProperty(n)&&!s.isRef(o)&&!s.isReactive(o)?e[n]=Xe(r,o):e[n]=o}return e}const Tr=process.env.NODE_ENV!=="production"?Symbol("pinia:skipHydration"):Symbol();function Ar(e){return!ie(e)||!e.hasOwnProperty(Tr)}const{assign:W}=Object;function nn(e){return!!(s.isRef(e)&&e.effect)}function on(e,t,n,o){const{state:r,actions:a,getters:i}=t,c=n.state.value[e];let l;function u(){!c&&(process.env.NODE_ENV==="production"||!o)&&(n.state.value[e]=r?r():{});const d=process.env.NODE_ENV!=="production"&&o?s.toRefs(s.ref(r?r():{}).value):s.toRefs(n.state.value[e]);return W(d,a,Object.keys(i||{}).reduce((f,p)=>(process.env.NODE_ENV!=="production"&&p in d&&console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${p}" in store "${e}".`),f[p]=s.markRaw(s.computed(()=>{Ee(n);const h=n._s.get(e);return i[p].call(h,h)})),f),{}))}return l=Ze(e,u,t,n,o,!0),l}function Ze(e,t,n={},o,r,a){let i;const c=W({actions:{}},n);if(process.env.NODE_ENV!=="production"&&!o._e.active)throw new Error("Pinia destroyed");const l={deep:!0};process.env.NODE_ENV!=="production"&&!jt&&(l.onTrigger=k=>{u?h=k:u==!1&&!S._hotUpdating&&(Array.isArray(h)?h.push(k):console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."))});let u,d,f=s.markRaw([]),p=s.markRaw([]),h;const g=o.state.value[e];!a&&!g&&(process.env.NODE_ENV==="production"||!r)&&(o.state.value[e]={});const y=s.ref({});let w;function O(k){let v;u=d=!1,process.env.NODE_ENV!=="production"&&(h=[]),typeof k=="function"?(k(o.state.value[e]),v={type:q.patchFunction,storeId:e,events:h}):(Xe(o.state.value[e],k),v={type:q.patchObject,payload:k,storeId:e,events:h});const R=w=Symbol();s.nextTick().then(()=>{w===R&&(u=!0)}),d=!0,me(f,v,o.state.value[e])}const I=a?function(){const{state:v}=n,R=v?v():{};this.$patch(D=>{W(D,R)})}:process.env.NODE_ENV!=="production"?()=>{throw new Error(`🍍: Store "${e}" is built using the setup syntax and does not implement $reset().`)}:en;function T(){i.stop(),f=[],p=[],o._s.delete(e)}function M(k,v){return function(){Ee(o);const R=Array.from(arguments),D=[],de=[];function Ce(U){D.push(U)}function Ge(U){de.push(U)}me(p,{args:R,name:k,store:S,after:Ce,onError:Ge});let Y;try{Y=v.apply(this&&this.$id===e?this:S,R)}catch(U){throw me(de,U),U}return Y instanceof Promise?Y.then(U=>(me(D,U),U)).catch(U=>(me(de,U),Promise.reject(U))):(me(D,Y),Y)}}const z=s.markRaw({actions:{},getters:{},state:[],hotState:y}),Q={_p:o,$id:e,$onAction:tn.bind(null,p),$patch:O,$reset:I,$subscribe(k,v={}){const R=tn(f,k,v.detached,()=>D()),D=i.run(()=>s.watch(()=>o.state.value[e],de=>{(v.flush==="sync"?d:u)&&k({storeId:e,type:q.direct,events:h},de)},W({},l,v)));return R},$dispose:T},S=s.reactive(process.env.NODE_ENV!=="production"||ke?W({_hmrPayload:z,_customProperties:s.markRaw(new Set)},Q):Q);o._s.set(e,S);const J=o._e.run(()=>(i=s.effectScope(),i.run(()=>t())));for(const k in J){const v=J[k];if(s.isRef(v)&&!nn(v)||s.isReactive(v))process.env.NODE_ENV!=="production"&&r?Re(y.value,k,s.toRef(J,k)):a||(g&&Ar(v)&&(s.isRef(v)?v.value=g[k]:Xe(v,g[k])),o.state.value[e][k]=v),process.env.NODE_ENV!=="production"&&z.state.push(k);else if(typeof v=="function"){const R=process.env.NODE_ENV!=="production"&&r?v:M(k,v);J[k]=R,process.env.NODE_ENV!=="production"&&(z.actions[k]=v),c.actions[k]=v}else process.env.NODE_ENV!=="production"&&nn(v)&&(z.getters[k]=a?n.getters[k]:v,Te&&(J._getters||(J._getters=s.markRaw([]))).push(k))}if(W(S,J),W(s.toRaw(S),J),Object.defineProperty(S,"$state",{get:()=>process.env.NODE_ENV!=="production"&&r?y.value:o.state.value[e],set:k=>{if(process.env.NODE_ENV!=="production"&&r)throw new Error("cannot set hotState");O(v=>{W(v,k)})}}),process.env.NODE_ENV!=="production"&&(S._hotUpdate=s.markRaw(k=>{S._hotUpdating=!0,k._hmrPayload.state.forEach(v=>{if(v in S.$state){const R=k.$state[v],D=S.$state[v];typeof R=="object"&&ie(R)&&ie(D)?Zt(R,D):k.$state[v]=D}Re(S,v,s.toRef(k.$state,v))}),Object.keys(S.$state).forEach(v=>{v in k.$state||Qe(S,v)}),u=!1,d=!1,o.state.value[e]=s.toRef(k._hmrPayload,"hotState"),d=!0,s.nextTick().then(()=>{u=!0});for(const v in k._hmrPayload.actions){const R=k[v];Re(S,v,M(v,R))}for(const v in k._hmrPayload.getters){const R=k._hmrPayload.getters[v],D=a?s.computed(()=>(Ee(o),R.call(S,S))):R;Re(S,v,D)}Object.keys(S._hmrPayload.getters).forEach(v=>{v in k._hmrPayload.getters||Qe(S,v)}),Object.keys(S._hmrPayload.actions).forEach(v=>{v in k._hmrPayload.actions||Qe(S,v)}),S._hmrPayload=k._hmrPayload,S._getters=k._getters,S._hotUpdating=!1})),ke){const k={writable:!0,configurable:!0,enumerable:!1};["_p","_hmrPayload","_getters","_customProperties"].forEach(v=>{Object.defineProperty(S,v,W({value:S[v]},k))})}return o._p.forEach(k=>{if(ke){const v=i.run(()=>k({store:S,app:o._a,pinia:o,options:c}));Object.keys(v||{}).forEach(R=>S._customProperties.add(R)),W(S,v)}else W(S,i.run(()=>k({store:S,app:o._a,pinia:o,options:c})))}),process.env.NODE_ENV!=="production"&&S.$state&&typeof S.$state=="object"&&typeof S.$state.constructor=="function"&&!S.$state.constructor.toString().includes("[native code]")&&console.warn(`[🍍]: The "state" must be a plain object. It cannot be state: () => new MyClass() Found in store "${S.$id}".`),g&&a&&n.hydrate&&n.hydrate(S.$state,g),u=!0,d=!0,S}function Dr(e,t,n){let o,r;const a=typeof t=="function";typeof e=="string"?(o=e,r=a?n:t):(r=e,o=e.id);function i(c,l){const u=s.getCurrentInstance();if(c=(process.env.NODE_ENV==="test"&&be&&be._testing?null:c)||u&&s.inject(Ft,null),c&&Ee(c),process.env.NODE_ENV!=="production"&&!be)throw new Error(`[🍍]: getActivePinia was called with no active Pinia. Did you forget to install pinia? const pinia = createPinia() app.use(pinia) -This will fail in production.`);c=be,c._s.has(o)||(a?Ze(o,t,r,c):on(o,r,c),process.env.NODE_ENV!=="production"&&(i._pinia=c));const d=c._s.get(o);if(process.env.NODE_ENV!=="production"&&l){const f="__hot:"+o,p=a?Ze(f,t,r,c,!0):on(f,z({},r),c,!0);l._hotUpdate(p),delete c.state.value[f],c._s.delete(f)}if(process.env.NODE_ENV!=="production"&&Te&&u&&u.proxy&&!l){const f=u.proxy,p="_pStores"in f?f._pStores:f._pStores={};p[o]=d}return d}return i.$id=o,i}const Vr=Dr("data",()=>{const e=s.ref([]),t=s.ref({});return{records:e,record:t}});function rn(e){e||(e=s.inject("$registry"));const t=Vr(),n=s.ref(new ve(e,t)),o=s.ref(!1);return s.onBeforeMount(async()=>{var r,a;const i=e.router.currentRoute.value,c=(r=i.params.records)==null?void 0:r.toString().toLowerCase(),l=(a=i.params.record)==null?void 0:a.toString().toLowerCase();if(!c&&!l)return;const u=await e.doctypeLoader(c);e.addDoctype(u),n.value.setup(u),c&&(l?await n.value.getRecord(u,l):await n.value.getRecords(u)),n.value.runAction(u,"LOAD",l?[l]:void 0),o.value=!0}),{stonecrop:n,isReady:o}}function Br(){return sn().__VUE_DEVTOOLS_GLOBAL_HOOK__}function sn(){return typeof navigator<"u"&&typeof window<"u"?window:typeof global<"u"?global:{}}const Lr=typeof Proxy=="function",Mr="devtools-plugin:setup",jr="plugin:settings:set";let ge,et;function Ur(){var e;return ge!==void 0||(typeof window<"u"&&window.performance?(ge=!0,et=window.performance):typeof global<"u"&&(!((e=global.perf_hooks)===null||e===void 0)&&e.performance)?(ge=!0,et=global.perf_hooks.performance):ge=!1),ge}function Hr(){return Ur()?et.now():Date.now()}class Fr{constructor(t,n){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=t,this.hook=n;const o={};if(t.settings)for(const i in t.settings){const c=t.settings[i];o[i]=c.defaultValue}const r=`__vue-devtools-plugin-settings__${t.id}`;let a=Object.assign({},o);try{const i=localStorage.getItem(r),c=JSON.parse(i);Object.assign(a,c)}catch{}this.fallbacks={getSettings(){return a},setSettings(i){try{localStorage.setItem(r,JSON.stringify(i))}catch{}a=i},now(){return Hr()}},n&&n.on(jr,(i,c)=>{i===this.plugin.id&&this.fallbacks.setSettings(c)}),this.proxiedOn=new Proxy({},{get:(i,c)=>this.target?this.target.on[c]:(...l)=>{this.onQueue.push({method:c,args:l})}}),this.proxiedTarget=new Proxy({},{get:(i,c)=>this.target?this.target[c]:c==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(c)?(...l)=>(this.targetQueue.push({method:c,args:l,resolve:()=>{}}),this.fallbacks[c](...l)):(...l)=>new Promise(u=>{this.targetQueue.push({method:c,args:l,resolve:u})})})}async setRealTarget(t){this.target=t;for(const n of this.onQueue)this.target.on[n.method](...n.args);for(const n of this.targetQueue)n.resolve(await this.target[n.method](...n.args))}}function Wr(e,t){const n=e,o=sn(),r=Br(),a=Lr&&n.enableEarlyProxy;if(r&&(o.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!a))r.emit(Mr,e,t);else{const i=a?new Fr(n,r):null;(o.__VUE_DEVTOOLS_PLUGINS__=o.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:i}),i&&t(i.proxiedTarget)}}/*! +This will fail in production.`);c=be,c._s.has(o)||(a?Ze(o,t,r,c):on(o,r,c),process.env.NODE_ENV!=="production"&&(i._pinia=c));const d=c._s.get(o);if(process.env.NODE_ENV!=="production"&&l){const f="__hot:"+o,p=a?Ze(f,t,r,c,!0):on(f,W({},r),c,!0);l._hotUpdate(p),delete c.state.value[f],c._s.delete(f)}if(process.env.NODE_ENV!=="production"&&Te&&u&&u.proxy&&!l){const f=u.proxy,p="_pStores"in f?f._pStores:f._pStores={};p[o]=d}return d}return i.$id=o,i}const Vr=Dr("data",()=>{const e=s.ref([]),t=s.ref({});return{records:e,record:t}});function rn(e){e||(e=s.inject("$registry"));const t=Vr(),n=s.ref(new ve(e,t)),o=s.ref(!1);return s.onBeforeMount(async()=>{var r,a;const i=e.router.currentRoute.value,c=(r=i.params.records)==null?void 0:r.toString().toLowerCase(),l=(a=i.params.record)==null?void 0:a.toString().toLowerCase();if(!c&&!l)return;const u=await e.doctypeLoader(c);e.addDoctype(u),n.value.setup(u),c&&(l?await n.value.getRecord(u,l):await n.value.getRecords(u)),n.value.runAction(u,"LOAD",l?[l]:void 0),o.value=!0}),{stonecrop:n,isReady:o}}function Br(){return sn().__VUE_DEVTOOLS_GLOBAL_HOOK__}function sn(){return typeof navigator<"u"&&typeof window<"u"?window:typeof global<"u"?global:{}}const Lr=typeof Proxy=="function",Mr="devtools-plugin:setup",jr="plugin:settings:set";let ge,et;function Ur(){var e;return ge!==void 0||(typeof window<"u"&&window.performance?(ge=!0,et=window.performance):typeof global<"u"&&(!((e=global.perf_hooks)===null||e===void 0)&&e.performance)?(ge=!0,et=global.perf_hooks.performance):ge=!1),ge}function Hr(){return Ur()?et.now():Date.now()}class Fr{constructor(t,n){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=t,this.hook=n;const o={};if(t.settings)for(const i in t.settings){const c=t.settings[i];o[i]=c.defaultValue}const r=`__vue-devtools-plugin-settings__${t.id}`;let a=Object.assign({},o);try{const i=localStorage.getItem(r),c=JSON.parse(i);Object.assign(a,c)}catch{}this.fallbacks={getSettings(){return a},setSettings(i){try{localStorage.setItem(r,JSON.stringify(i))}catch{}a=i},now(){return Hr()}},n&&n.on(jr,(i,c)=>{i===this.plugin.id&&this.fallbacks.setSettings(c)}),this.proxiedOn=new Proxy({},{get:(i,c)=>this.target?this.target.on[c]:(...l)=>{this.onQueue.push({method:c,args:l})}}),this.proxiedTarget=new Proxy({},{get:(i,c)=>this.target?this.target[c]:c==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(c)?(...l)=>(this.targetQueue.push({method:c,args:l,resolve:()=>{}}),this.fallbacks[c](...l)):(...l)=>new Promise(u=>{this.targetQueue.push({method:c,args:l,resolve:u})})})}async setRealTarget(t){this.target=t;for(const n of this.onQueue)this.target.on[n.method](...n.args);for(const n of this.targetQueue)n.resolve(await this.target[n.method](...n.args))}}function Gr(e,t){const n=e,o=sn(),r=Br(),a=Lr&&n.enableEarlyProxy;if(r&&(o.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!a))r.emit(Mr,e,t);else{const i=a?new Fr(n,r):null;(o.__VUE_DEVTOOLS_PLUGINS__=o.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:t,proxy:i}),i&&t(i.proxiedTarget)}}/*! * vue-router v4.1.6 * (c) 2022 Eduardo San Martin Morote * @license MIT - */const Z=typeof window<"u";function zr(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const $=Object.assign;function tt(e,t){const n={};for(const o in t){const r=t[o];n[o]=F(r)?r.map(e):e(r)}return n}const Se=()=>{},F=Array.isArray;function x(e){const t=Array.from(arguments).slice(1);console.warn.apply(console,["[Vue Router warn]: "+e].concat(t))}const Gr=/\/$/,Qr=e=>e.replace(Gr,"");function nt(e,t,n="/"){let o,r={},a="",i="";const c=t.indexOf("#");let l=t.indexOf("?");return c=0&&(l=-1),l>-1&&(o=t.slice(0,l),a=t.slice(l+1,c>-1?c:t.length),r=e(a)),c>-1&&(o=o||t.slice(0,c),i=t.slice(c,t.length)),o=Jr(o??t,n),{fullPath:o+(a&&"?")+a+i,path:o,query:r,hash:i}}function Kr(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function an(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function cn(e,t,n){const o=t.matched.length-1,r=n.matched.length-1;return o>-1&&o===r&&re(t.matched[o],n.matched[r])&&ln(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function re(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function ln(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!qr(e[n],t[n]))return!1;return!0}function qr(e,t){return F(e)?un(e,t):F(t)?un(t,e):e===t}function un(e,t){return F(t)?e.length===t.length&&e.every((n,o)=>n===t[o]):e.length===1&&e[0]===t}function Jr(e,t){if(e.startsWith("/"))return e;if(process.env.NODE_ENV!=="production"&&!t.startsWith("/"))return x(`Cannot resolve a relative location without an absolute path. Trying to resolve "${e}" from "${t}". It should look like "/${t}".`),e;if(!e)return t;const n=t.split("/"),o=e.split("/");let r=n.length-1,a,i;for(a=0;a1&&r--;else break;return n.slice(0,r).join("/")+"/"+o.slice(a-(a===o.length?1:0)).join("/")}var Oe;(function(e){e.pop="pop",e.push="push"})(Oe||(Oe={}));var Ie;(function(e){e.back="back",e.forward="forward",e.unknown=""})(Ie||(Ie={}));function Yr(e){if(!e)if(Z){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Qr(e)}const Xr=/^[^#]+#/;function Zr(e,t){return e.replace(Xr,"#")+t}function es(e,t){const n=document.documentElement.getBoundingClientRect(),o=e.getBoundingClientRect();return{behavior:t.behavior,left:o.left-n.left-(t.left||0),top:o.top-n.top-(t.top||0)}}const Le=()=>({left:window.pageXOffset,top:window.pageYOffset});function ts(e){let t;if("el"in e){const n=e.el,o=typeof n=="string"&&n.startsWith("#");if(process.env.NODE_ENV!=="production"&&typeof e.el=="string"&&(!o||!document.getElementById(e.el.slice(1))))try{const a=document.querySelector(e.el);if(o&&a){x(`The selector "${e.el}" should be passed as "el: document.querySelector('${e.el}')" because it starts with "#".`);return}}catch{x(`The selector "${e.el}" is invalid. If you are using an id selector, make sure to escape it. You can find more information about escaping characters in selectors at https://mathiasbynens.be/notes/css-escapes or use CSS.escape (https://developer.mozilla.org/en-US/docs/Web/API/CSS/escape).`);return}const r=typeof n=="string"?o?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r){process.env.NODE_ENV!=="production"&&x(`Couldn't find element using selector "${e.el}" returned by scrollBehavior.`);return}t=es(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.pageXOffset,t.top!=null?t.top:window.pageYOffset)}function dn(e,t){return(history.state?history.state.position-t:-1)+e}const ot=new Map;function ns(e,t){ot.set(e,t)}function os(e){const t=ot.get(e);return ot.delete(e),t}let rs=()=>location.protocol+"//"+location.host;function fn(e,t){const{pathname:n,search:o,hash:r}=t,a=e.indexOf("#");if(a>-1){let c=r.includes(e.slice(a))?e.slice(a).length:1,l=r.slice(c);return l[0]!=="/"&&(l="/"+l),an(l,"")}return an(n,e)+o+r}function ss(e,t,n,o){let r=[],a=[],i=null;const c=({state:p})=>{const h=fn(e,location),g=n.value,y=t.value;let w=0;if(p){if(n.value=h,t.value=p,i&&i===g){i=null;return}w=y?p.position-y.position:0}else o(h);r.forEach(O=>{O(n.value,g,{delta:w,type:Oe.pop,direction:w?w>0?Ie.forward:Ie.back:Ie.unknown})})};function l(){i=n.value}function u(p){r.push(p);const h=()=>{const g=r.indexOf(p);g>-1&&r.splice(g,1)};return a.push(h),h}function d(){const{history:p}=window;p.state&&p.replaceState($({},p.state,{scroll:Le()}),"")}function f(){for(const p of a)p();a=[],window.removeEventListener("popstate",c),window.removeEventListener("beforeunload",d)}return window.addEventListener("popstate",c),window.addEventListener("beforeunload",d),{pauseListeners:l,listen:u,destroy:f}}function pn(e,t,n,o=!1,r=!1){return{back:e,current:t,forward:n,replaced:o,position:window.history.length,scroll:r?Le():null}}function as(e){const{history:t,location:n}=window,o={value:fn(e,n)},r={value:t.state};r.value||a(o.value,{back:null,current:o.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function a(l,u,d){const f=e.indexOf("#"),p=f>-1?(n.host&&document.querySelector("base")?e:e.slice(f))+l:rs()+e+l;try{t[d?"replaceState":"pushState"](u,"",p),r.value=u}catch(h){process.env.NODE_ENV!=="production"?x("Error with push/replace State",h):console.error(h),n[d?"replace":"assign"](p)}}function i(l,u){const d=$({},t.state,pn(r.value.back,l,r.value.forward,!0),u,{position:r.value.position});a(l,d,!0),o.value=l}function c(l,u){const d=$({},r.value,t.state,{forward:l,scroll:Le()});process.env.NODE_ENV!=="production"&&!t.state&&x(`history.state seems to have been manually replaced without preserving the necessary values. Make sure to preserve existing history state if you are manually calling history.replaceState: + */const Z=typeof window<"u";function Wr(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const $=Object.assign;function tt(e,t){const n={};for(const o in t){const r=t[o];n[o]=F(r)?r.map(e):e(r)}return n}const Se=()=>{},F=Array.isArray;function x(e){const t=Array.from(arguments).slice(1);console.warn.apply(console,["[Vue Router warn]: "+e].concat(t))}const zr=/\/$/,Qr=e=>e.replace(zr,"");function nt(e,t,n="/"){let o,r={},a="",i="";const c=t.indexOf("#");let l=t.indexOf("?");return c=0&&(l=-1),l>-1&&(o=t.slice(0,l),a=t.slice(l+1,c>-1?c:t.length),r=e(a)),c>-1&&(o=o||t.slice(0,c),i=t.slice(c,t.length)),o=Jr(o??t,n),{fullPath:o+(a&&"?")+a+i,path:o,query:r,hash:i}}function Kr(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function an(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function cn(e,t,n){const o=t.matched.length-1,r=n.matched.length-1;return o>-1&&o===r&&re(t.matched[o],n.matched[r])&&ln(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function re(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function ln(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!qr(e[n],t[n]))return!1;return!0}function qr(e,t){return F(e)?un(e,t):F(t)?un(t,e):e===t}function un(e,t){return F(t)?e.length===t.length&&e.every((n,o)=>n===t[o]):e.length===1&&e[0]===t}function Jr(e,t){if(e.startsWith("/"))return e;if(process.env.NODE_ENV!=="production"&&!t.startsWith("/"))return x(`Cannot resolve a relative location without an absolute path. Trying to resolve "${e}" from "${t}". It should look like "/${t}".`),e;if(!e)return t;const n=t.split("/"),o=e.split("/");let r=n.length-1,a,i;for(a=0;a1&&r--;else break;return n.slice(0,r).join("/")+"/"+o.slice(a-(a===o.length?1:0)).join("/")}var Oe;(function(e){e.pop="pop",e.push="push"})(Oe||(Oe={}));var Ie;(function(e){e.back="back",e.forward="forward",e.unknown=""})(Ie||(Ie={}));function Yr(e){if(!e)if(Z){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),Qr(e)}const Xr=/^[^#]+#/;function Zr(e,t){return e.replace(Xr,"#")+t}function es(e,t){const n=document.documentElement.getBoundingClientRect(),o=e.getBoundingClientRect();return{behavior:t.behavior,left:o.left-n.left-(t.left||0),top:o.top-n.top-(t.top||0)}}const Le=()=>({left:window.pageXOffset,top:window.pageYOffset});function ts(e){let t;if("el"in e){const n=e.el,o=typeof n=="string"&&n.startsWith("#");if(process.env.NODE_ENV!=="production"&&typeof e.el=="string"&&(!o||!document.getElementById(e.el.slice(1))))try{const a=document.querySelector(e.el);if(o&&a){x(`The selector "${e.el}" should be passed as "el: document.querySelector('${e.el}')" because it starts with "#".`);return}}catch{x(`The selector "${e.el}" is invalid. If you are using an id selector, make sure to escape it. You can find more information about escaping characters in selectors at https://mathiasbynens.be/notes/css-escapes or use CSS.escape (https://developer.mozilla.org/en-US/docs/Web/API/CSS/escape).`);return}const r=typeof n=="string"?o?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r){process.env.NODE_ENV!=="production"&&x(`Couldn't find element using selector "${e.el}" returned by scrollBehavior.`);return}t=es(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.pageXOffset,t.top!=null?t.top:window.pageYOffset)}function dn(e,t){return(history.state?history.state.position-t:-1)+e}const ot=new Map;function ns(e,t){ot.set(e,t)}function os(e){const t=ot.get(e);return ot.delete(e),t}let rs=()=>location.protocol+"//"+location.host;function fn(e,t){const{pathname:n,search:o,hash:r}=t,a=e.indexOf("#");if(a>-1){let c=r.includes(e.slice(a))?e.slice(a).length:1,l=r.slice(c);return l[0]!=="/"&&(l="/"+l),an(l,"")}return an(n,e)+o+r}function ss(e,t,n,o){let r=[],a=[],i=null;const c=({state:p})=>{const h=fn(e,location),g=n.value,y=t.value;let w=0;if(p){if(n.value=h,t.value=p,i&&i===g){i=null;return}w=y?p.position-y.position:0}else o(h);r.forEach(O=>{O(n.value,g,{delta:w,type:Oe.pop,direction:w?w>0?Ie.forward:Ie.back:Ie.unknown})})};function l(){i=n.value}function u(p){r.push(p);const h=()=>{const g=r.indexOf(p);g>-1&&r.splice(g,1)};return a.push(h),h}function d(){const{history:p}=window;p.state&&p.replaceState($({},p.state,{scroll:Le()}),"")}function f(){for(const p of a)p();a=[],window.removeEventListener("popstate",c),window.removeEventListener("beforeunload",d)}return window.addEventListener("popstate",c),window.addEventListener("beforeunload",d),{pauseListeners:l,listen:u,destroy:f}}function pn(e,t,n,o=!1,r=!1){return{back:e,current:t,forward:n,replaced:o,position:window.history.length,scroll:r?Le():null}}function as(e){const{history:t,location:n}=window,o={value:fn(e,n)},r={value:t.state};r.value||a(o.value,{back:null,current:o.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function a(l,u,d){const f=e.indexOf("#"),p=f>-1?(n.host&&document.querySelector("base")?e:e.slice(f))+l:rs()+e+l;try{t[d?"replaceState":"pushState"](u,"",p),r.value=u}catch(h){process.env.NODE_ENV!=="production"?x("Error with push/replace State",h):console.error(h),n[d?"replace":"assign"](p)}}function i(l,u){const d=$({},t.state,pn(r.value.back,l,r.value.forward,!0),u,{position:r.value.position});a(l,d,!0),o.value=l}function c(l,u){const d=$({},r.value,t.state,{forward:l,scroll:Le()});process.env.NODE_ENV!=="production"&&!t.state&&x(`history.state seems to have been manually replaced without preserving the necessary values. Make sure to preserve existing history state if you are manually calling history.replaceState: history.replaceState(history.state, '', url) You can find more information at https://next.router.vuejs.org/guide/migration/#usage-of-history-state.`),a(d.current,d,!0);const f=$({},pn(o.value,l,null),{position:d.position+1},u);a(l,f,!1),o.value=l}return{location:o,state:r,push:c,replace:i}}function is(e){e=Yr(e);const t=as(e),n=ss(e,t.state,t.location,t.replace);function o(a,i=!0){i||n.pauseListeners(),history.go(a)}const r=$({location:"",base:e,go:o,createHref:Zr.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}function cs(e){return typeof e=="string"||e&&typeof e=="object"}function hn(e){return typeof e=="string"||typeof e=="symbol"}const se={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},rt=Symbol(process.env.NODE_ENV!=="production"?"navigation failure":"");var mn;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(mn||(mn={}));const ls={[1]({location:e,currentLocation:t}){return`No match for ${JSON.stringify(e)}${t?` while being at -`+JSON.stringify(t):""}`},[2]({from:e,to:t}){return`Redirected from "${e.fullPath}" to "${ds(t)}" via a navigation guard.`},[4]({from:e,to:t}){return`Navigation aborted from "${e.fullPath}" to "${t.fullPath}" via a navigation guard.`},[8]({from:e,to:t}){return`Navigation cancelled from "${e.fullPath}" to "${t.fullPath}" with a new navigation.`},[16]({from:e,to:t}){return`Avoided redundant navigation to current location: "${e.fullPath}".`}};function ye(e,t){return process.env.NODE_ENV!=="production"?$(new Error(ls[e](t)),{type:e,[rt]:!0},t):$(new Error,{type:e,[rt]:!0},t)}function ee(e,t){return e instanceof Error&&rt in e&&(t==null||!!(e.type&t))}const us=["params","query","hash"];function ds(e){if(typeof e=="string")return e;if("path"in e)return e.path;const t={};for(const n of us)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}const gn="[^/]+?",fs={sensitive:!1,strict:!1,start:!0,end:!0},ps=/[.+*?^${}()[\]/\\]/g;function hs(e,t){const n=$({},fs,t),o=[];let r=n.start?"^":"";const a=[];for(const u of e){const d=u.length?[]:[90];n.strict&&!u.length&&(r+="/");for(let f=0;ft.length?t.length===1&&t[0]===40+40?1:-1:0}function gs(e,t){let n=0;const o=e.score,r=t.score;for(;n0&&t[t.length-1]<0}const ys={type:0,value:""},_s=/[a-zA-Z0-9_]/;function ws(e){if(!e)return[[]];if(e==="/")return[[ys]];if(!e.startsWith("/"))throw new Error(process.env.NODE_ENV!=="production"?`Route paths should start with a "/": "${e}" should be "/${e}".`:`Invalid path "${e}"`);function t(h){throw new Error(`ERR (${n})/"${u}": ${h}`)}let n=0,o=n;const r=[];let a;function i(){a&&r.push(a),a=[]}let c=0,l,u="",d="";function f(){u&&(n===0?a.push({type:0,value:u}):n===1||n===2||n===3?(a.length>1&&(l==="*"||l==="+")&&t(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`),a.push({type:1,value:u,regexp:d,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):t("Invalid state to consume buffer"),u="")}function p(){u+=l}for(;c{i(I)}:Se}function i(d){if(hn(d)){const f=o.get(d);f&&(o.delete(d),n.splice(n.indexOf(f),1),f.children.forEach(i),f.alias.forEach(i))}else{const f=n.indexOf(d);f>-1&&(n.splice(f,1),d.record.name&&o.delete(d.record.name),d.children.forEach(i),d.alias.forEach(i))}}function c(){return n}function l(d){let f=0;for(;f=0&&(d.record.path!==n[f].record.path||!bn(d,n[f]));)f++;n.splice(f,0,d),d.record.name&&!wn(d)&&o.set(d.record.name,d)}function u(d,f){let p,h={},g,y;if("name"in d&&d.name){if(p=o.get(d.name),!p)throw ye(1,{location:d});if(process.env.NODE_ENV!=="production"){const I=Object.keys(d.params||{}).filter(T=>!p.keys.find(M=>M.name===T));I.length&&x(`Discarded invalid param(s) "${I.join('", "')}" when navigating. See https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 for more details.`)}y=p.record.name,h=$(_n(f.params,p.keys.filter(I=>!I.optional).map(I=>I.name)),d.params&&_n(d.params,p.keys.map(I=>I.name))),g=p.stringify(h)}else if("path"in d)g=d.path,process.env.NODE_ENV!=="production"&&!g.startsWith("/")&&x(`The Matcher cannot resolve relative paths but received "${g}". Unless you directly called \`matcher.resolve("${g}")\`, this is probably a bug in vue-router. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/router.`),p=n.find(I=>I.re.test(g)),p&&(h=p.parse(g),y=p.record.name);else{if(p=f.name?o.get(f.name):n.find(I=>I.re.test(f.path)),!p)throw ye(1,{location:d,currentLocation:f});y=p.record.name,h=$({},f.params,d.params),g=p.stringify(h)}const w=[];let O=p;for(;O;)w.unshift(O.record),O=O.parent;return{name:y,path:g,params:h,matched:w,meta:Ss(w)}}return e.forEach(d=>a(d)),{addRoute:a,resolve:u,removeRoute:i,getRoutes:c,getRecordMatcher:r}}function _n(e,t){const n={};for(const o of t)o in e&&(n[o]=e[o]);return n}function Es(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:ks(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}function ks(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const o in e.components)t[o]=typeof n=="boolean"?n:n[o];return t}function wn(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Ss(e){return e.reduce((t,n)=>$(t,n.meta),{})}function vn(e,t){const n={};for(const o in e)n[o]=o in t?t[o]:e[o];return n}function st(e,t){return e.name===t.name&&e.optional===t.optional&&e.repeatable===t.repeatable}function Os(e,t){for(const n of e.keys)if(!n.optional&&!t.keys.find(st.bind(null,n)))return x(`Alias "${t.record.path}" and the original record: "${e.record.path}" must have the exact same param named "${n.name}"`);for(const n of t.keys)if(!n.optional&&!e.keys.find(st.bind(null,n)))return x(`Alias "${t.record.path}" and the original record: "${e.record.path}" must have the exact same param named "${n.name}"`)}function Is(e,t){t&&t.record.name&&!e.name&&!e.path&&x(`The route named "${String(t.record.name)}" has a child without a name and an empty path. Using that name won't render the empty path child so you probably want to move the name to the child instead. If this is intentional, add a name to the child route to remove the warning.`)}function Ns(e,t){for(const n of t.keys)if(!e.keys.find(st.bind(null,n)))return x(`Absolute path "${e.record.path}" must have the exact same param named "${n.name}" as its parent "${t.record.path}".`)}function bn(e,t){return t.children.some(n=>n===e||bn(e,n))}const En=/#/g,Ps=/&/g,xs=/\//g,$s=/=/g,Cs=/\?/g,kn=/\+/g,Rs=/%5B/g,Ts=/%5D/g,Sn=/%5E/g,As=/%60/g,On=/%7B/g,Ds=/%7C/g,In=/%7D/g,Vs=/%20/g;function at(e){return encodeURI(""+e).replace(Ds,"|").replace(Rs,"[").replace(Ts,"]")}function Bs(e){return at(e).replace(On,"{").replace(In,"}").replace(Sn,"^")}function it(e){return at(e).replace(kn,"%2B").replace(Vs,"+").replace(En,"%23").replace(Ps,"%26").replace(As,"`").replace(On,"{").replace(In,"}").replace(Sn,"^")}function Ls(e){return it(e).replace($s,"%3D")}function Ms(e){return at(e).replace(En,"%23").replace(Cs,"%3F")}function js(e){return e==null?"":Ms(e).replace(xs,"%2F")}function Ne(e){try{return decodeURIComponent(""+e)}catch{process.env.NODE_ENV!=="production"&&x(`Error decoding "${e}". Using original value`)}return""+e}function Us(e){const t={};if(e===""||e==="?")return t;const o=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;ra&&it(a)):[o&&it(o)]).forEach(a=>{a!==void 0&&(t+=(t.length?"&":"")+n,a!=null&&(t+="="+a))})}return t}function Hs(e){const t={};for(const n in e){const o=e[n];o!==void 0&&(t[n]=F(o)?o.map(r=>r==null?null:""+r):o==null?o:""+o)}return t}const Fs=Symbol(process.env.NODE_ENV!=="production"?"router view location matched":""),Pn=Symbol(process.env.NODE_ENV!=="production"?"router view depth":""),ct=Symbol(process.env.NODE_ENV!=="production"?"router":""),xn=Symbol(process.env.NODE_ENV!=="production"?"route location":""),lt=Symbol(process.env.NODE_ENV!=="production"?"router view location":"");function Pe(){let e=[];function t(o){return e.push(o),()=>{const r=e.indexOf(o);r>-1&&e.splice(r,1)}}function n(){e=[]}return{add:t,list:()=>e,reset:n}}function ae(e,t,n,o,r){const a=o&&(o.enterCallbacks[r]=o.enterCallbacks[r]||[]);return()=>new Promise((i,c)=>{const l=f=>{f===!1?c(ye(4,{from:n,to:t})):f instanceof Error?c(f):cs(f)?c(ye(2,{from:t,to:f})):(a&&o.enterCallbacks[r]===a&&typeof f=="function"&&a.push(f),i())},u=e.call(o&&o.instances[r],t,n,process.env.NODE_ENV!=="production"?Ws(l,t,n):l);let d=Promise.resolve(u);if(e.length<3&&(d=d.then(l)),process.env.NODE_ENV!=="production"&&e.length>2){const f=`The "next" callback was never called inside of ${e.name?'"'+e.name+'"':""}: +`+JSON.stringify(t):""}`},[2]({from:e,to:t}){return`Redirected from "${e.fullPath}" to "${ds(t)}" via a navigation guard.`},[4]({from:e,to:t}){return`Navigation aborted from "${e.fullPath}" to "${t.fullPath}" via a navigation guard.`},[8]({from:e,to:t}){return`Navigation cancelled from "${e.fullPath}" to "${t.fullPath}" with a new navigation.`},[16]({from:e,to:t}){return`Avoided redundant navigation to current location: "${e.fullPath}".`}};function ye(e,t){return process.env.NODE_ENV!=="production"?$(new Error(ls[e](t)),{type:e,[rt]:!0},t):$(new Error,{type:e,[rt]:!0},t)}function ee(e,t){return e instanceof Error&&rt in e&&(t==null||!!(e.type&t))}const us=["params","query","hash"];function ds(e){if(typeof e=="string")return e;if("path"in e)return e.path;const t={};for(const n of us)n in e&&(t[n]=e[n]);return JSON.stringify(t,null,2)}const gn="[^/]+?",fs={sensitive:!1,strict:!1,start:!0,end:!0},ps=/[.+*?^${}()[\]/\\]/g;function hs(e,t){const n=$({},fs,t),o=[];let r=n.start?"^":"";const a=[];for(const u of e){const d=u.length?[]:[90];n.strict&&!u.length&&(r+="/");for(let f=0;ft.length?t.length===1&&t[0]===40+40?1:-1:0}function gs(e,t){let n=0;const o=e.score,r=t.score;for(;n0&&t[t.length-1]<0}const ys={type:0,value:""},_s=/[a-zA-Z0-9_]/;function ws(e){if(!e)return[[]];if(e==="/")return[[ys]];if(!e.startsWith("/"))throw new Error(process.env.NODE_ENV!=="production"?`Route paths should start with a "/": "${e}" should be "/${e}".`:`Invalid path "${e}"`);function t(h){throw new Error(`ERR (${n})/"${u}": ${h}`)}let n=0,o=n;const r=[];let a;function i(){a&&r.push(a),a=[]}let c=0,l,u="",d="";function f(){u&&(n===0?a.push({type:0,value:u}):n===1||n===2||n===3?(a.length>1&&(l==="*"||l==="+")&&t(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`),a.push({type:1,value:u,regexp:d,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):t("Invalid state to consume buffer"),u="")}function p(){u+=l}for(;c{i(I)}:Se}function i(d){if(hn(d)){const f=o.get(d);f&&(o.delete(d),n.splice(n.indexOf(f),1),f.children.forEach(i),f.alias.forEach(i))}else{const f=n.indexOf(d);f>-1&&(n.splice(f,1),d.record.name&&o.delete(d.record.name),d.children.forEach(i),d.alias.forEach(i))}}function c(){return n}function l(d){let f=0;for(;f=0&&(d.record.path!==n[f].record.path||!bn(d,n[f]));)f++;n.splice(f,0,d),d.record.name&&!wn(d)&&o.set(d.record.name,d)}function u(d,f){let p,h={},g,y;if("name"in d&&d.name){if(p=o.get(d.name),!p)throw ye(1,{location:d});if(process.env.NODE_ENV!=="production"){const I=Object.keys(d.params||{}).filter(T=>!p.keys.find(M=>M.name===T));I.length&&x(`Discarded invalid param(s) "${I.join('", "')}" when navigating. See https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 for more details.`)}y=p.record.name,h=$(_n(f.params,p.keys.filter(I=>!I.optional).map(I=>I.name)),d.params&&_n(d.params,p.keys.map(I=>I.name))),g=p.stringify(h)}else if("path"in d)g=d.path,process.env.NODE_ENV!=="production"&&!g.startsWith("/")&&x(`The Matcher cannot resolve relative paths but received "${g}". Unless you directly called \`matcher.resolve("${g}")\`, this is probably a bug in vue-router. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/router.`),p=n.find(I=>I.re.test(g)),p&&(h=p.parse(g),y=p.record.name);else{if(p=f.name?o.get(f.name):n.find(I=>I.re.test(f.path)),!p)throw ye(1,{location:d,currentLocation:f});y=p.record.name,h=$({},f.params,d.params),g=p.stringify(h)}const w=[];let O=p;for(;O;)w.unshift(O.record),O=O.parent;return{name:y,path:g,params:h,matched:w,meta:Ss(w)}}return e.forEach(d=>a(d)),{addRoute:a,resolve:u,removeRoute:i,getRoutes:c,getRecordMatcher:r}}function _n(e,t){const n={};for(const o of t)o in e&&(n[o]=e[o]);return n}function Es(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:ks(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}function ks(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const o in e.components)t[o]=typeof n=="boolean"?n:n[o];return t}function wn(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Ss(e){return e.reduce((t,n)=>$(t,n.meta),{})}function vn(e,t){const n={};for(const o in e)n[o]=o in t?t[o]:e[o];return n}function st(e,t){return e.name===t.name&&e.optional===t.optional&&e.repeatable===t.repeatable}function Os(e,t){for(const n of e.keys)if(!n.optional&&!t.keys.find(st.bind(null,n)))return x(`Alias "${t.record.path}" and the original record: "${e.record.path}" must have the exact same param named "${n.name}"`);for(const n of t.keys)if(!n.optional&&!e.keys.find(st.bind(null,n)))return x(`Alias "${t.record.path}" and the original record: "${e.record.path}" must have the exact same param named "${n.name}"`)}function Is(e,t){t&&t.record.name&&!e.name&&!e.path&&x(`The route named "${String(t.record.name)}" has a child without a name and an empty path. Using that name won't render the empty path child so you probably want to move the name to the child instead. If this is intentional, add a name to the child route to remove the warning.`)}function Ns(e,t){for(const n of t.keys)if(!e.keys.find(st.bind(null,n)))return x(`Absolute path "${e.record.path}" must have the exact same param named "${n.name}" as its parent "${t.record.path}".`)}function bn(e,t){return t.children.some(n=>n===e||bn(e,n))}const En=/#/g,Ps=/&/g,xs=/\//g,$s=/=/g,Cs=/\?/g,kn=/\+/g,Rs=/%5B/g,Ts=/%5D/g,Sn=/%5E/g,As=/%60/g,On=/%7B/g,Ds=/%7C/g,In=/%7D/g,Vs=/%20/g;function at(e){return encodeURI(""+e).replace(Ds,"|").replace(Rs,"[").replace(Ts,"]")}function Bs(e){return at(e).replace(On,"{").replace(In,"}").replace(Sn,"^")}function it(e){return at(e).replace(kn,"%2B").replace(Vs,"+").replace(En,"%23").replace(Ps,"%26").replace(As,"`").replace(On,"{").replace(In,"}").replace(Sn,"^")}function Ls(e){return it(e).replace($s,"%3D")}function Ms(e){return at(e).replace(En,"%23").replace(Cs,"%3F")}function js(e){return e==null?"":Ms(e).replace(xs,"%2F")}function Ne(e){try{return decodeURIComponent(""+e)}catch{process.env.NODE_ENV!=="production"&&x(`Error decoding "${e}". Using original value`)}return""+e}function Us(e){const t={};if(e===""||e==="?")return t;const o=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;ra&&it(a)):[o&&it(o)]).forEach(a=>{a!==void 0&&(t+=(t.length?"&":"")+n,a!=null&&(t+="="+a))})}return t}function Hs(e){const t={};for(const n in e){const o=e[n];o!==void 0&&(t[n]=F(o)?o.map(r=>r==null?null:""+r):o==null?o:""+o)}return t}const Fs=Symbol(process.env.NODE_ENV!=="production"?"router view location matched":""),Pn=Symbol(process.env.NODE_ENV!=="production"?"router view depth":""),ct=Symbol(process.env.NODE_ENV!=="production"?"router":""),xn=Symbol(process.env.NODE_ENV!=="production"?"route location":""),lt=Symbol(process.env.NODE_ENV!=="production"?"router view location":"");function Pe(){let e=[];function t(o){return e.push(o),()=>{const r=e.indexOf(o);r>-1&&e.splice(r,1)}}function n(){e=[]}return{add:t,list:()=>e,reset:n}}function ae(e,t,n,o,r){const a=o&&(o.enterCallbacks[r]=o.enterCallbacks[r]||[]);return()=>new Promise((i,c)=>{const l=f=>{f===!1?c(ye(4,{from:n,to:t})):f instanceof Error?c(f):cs(f)?c(ye(2,{from:t,to:f})):(a&&o.enterCallbacks[r]===a&&typeof f=="function"&&a.push(f),i())},u=e.call(o&&o.instances[r],t,n,process.env.NODE_ENV!=="production"?Gs(l,t,n):l);let d=Promise.resolve(u);if(e.length<3&&(d=d.then(l)),process.env.NODE_ENV!=="production"&&e.length>2){const f=`The "next" callback was never called inside of ${e.name?'"'+e.name+'"':""}: ${e.toString()} -. If you are returning a value instead of calling "next", make sure to remove the "next" parameter from your function.`;if(typeof u=="object"&&"then"in u)d=d.then(p=>l._called?p:(x(f),Promise.reject(new Error("Invalid navigation guard"))));else if(u!==void 0&&!l._called){x(f),c(new Error("Invalid navigation guard"));return}}d.catch(f=>c(f))})}function Ws(e,t,n){let o=0;return function(){o++===1&&x(`The "next" callback was called more than once in one navigation guard when going from "${n.fullPath}" to "${t.fullPath}". It should be called exactly one time in each navigation guard. This will fail in production.`),e._called=!0,o===1&&e.apply(null,arguments)}}function ut(e,t,n,o){const r=[];for(const a of e){process.env.NODE_ENV!=="production"&&!a.components&&!a.children.length&&x(`Record with path "${a.path}" is either missing a "component(s)" or "children" property.`);for(const i in a.components){let c=a.components[i];if(process.env.NODE_ENV!=="production"){if(!c||typeof c!="object"&&typeof c!="function")throw x(`Component "${i}" in record with path "${a.path}" is not a valid component. Received "${String(c)}".`),new Error("Invalid route component");if("then"in c){x(`Component "${i}" in record with path "${a.path}" is a Promise instead of a function that returns a Promise. Did you write "import('./MyPage.vue')" instead of "() => import('./MyPage.vue')" ? This will break in production if not fixed.`);const l=c;c=()=>l}else c.__asyncLoader&&!c.__warnedDefineAsync&&(c.__warnedDefineAsync=!0,x(`Component "${i}" in record with path "${a.path}" is defined using "defineAsyncComponent()". Write "() => import('./MyPage.vue')" instead of "defineAsyncComponent(() => import('./MyPage.vue'))".`))}if(!(t!=="beforeRouteEnter"&&!a.instances[i]))if(zs(c)){const u=(c.__vccOpts||c)[t];u&&r.push(ae(u,n,o,a,i))}else{let l=c();process.env.NODE_ENV!=="production"&&!("catch"in l)&&(x(`Component "${i}" in record with path "${a.path}" is a function that does not return a Promise. If you were passing a functional component, make sure to add a "displayName" to the component. This will break in production if not fixed.`),l=Promise.resolve(l)),r.push(()=>l.then(u=>{if(!u)return Promise.reject(new Error(`Couldn't resolve component "${i}" at "${a.path}"`));const d=zr(u)?u.default:u;a.components[i]=d;const p=(d.__vccOpts||d)[t];return p&&ae(p,n,o,a,i)()}))}}}return r}function zs(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function $n(e){const t=s.inject(ct),n=s.inject(xn),o=s.computed(()=>t.resolve(s.unref(e.to))),r=s.computed(()=>{const{matched:l}=o.value,{length:u}=l,d=l[u-1],f=n.matched;if(!d||!f.length)return-1;const p=f.findIndex(re.bind(null,d));if(p>-1)return p;const h=Cn(l[u-2]);return u>1&&Cn(d)===h&&f[f.length-1].path!==h?f.findIndex(re.bind(null,l[u-2])):p}),a=s.computed(()=>r.value>-1&&Ks(n.params,o.value.params)),i=s.computed(()=>r.value>-1&&r.value===n.matched.length-1&&ln(n.params,o.value.params));function c(l={}){return Qs(l)?t[s.unref(e.replace)?"replace":"push"](s.unref(e.to)).catch(Se):Promise.resolve()}if(process.env.NODE_ENV!=="production"&&Z){const l=s.getCurrentInstance();if(l){const u={route:o.value,isActive:a.value,isExactActive:i.value};l.__vrl_devtools=l.__vrl_devtools||[],l.__vrl_devtools.push(u),s.watchEffect(()=>{u.route=o.value,u.isActive=a.value,u.isExactActive=i.value},{flush:"post"})}}return{route:o,href:s.computed(()=>o.value.href),isActive:a,isExactActive:i,navigate:c}}const Gs=s.defineComponent({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:$n,setup(e,{slots:t}){const n=s.reactive($n(e)),{options:o}=s.inject(ct),r=s.computed(()=>({[Rn(e.activeClass,o.linkActiveClass,"router-link-active")]:n.isActive,[Rn(e.exactActiveClass,o.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const a=t.default&&t.default(n);return e.custom?a:s.h("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},a)}}});function Qs(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Ks(e,t){for(const n in t){const o=t[n],r=e[n];if(typeof o=="string"){if(o!==r)return!1}else if(!F(r)||r.length!==o.length||o.some((a,i)=>a!==r[i]))return!1}return!0}function Cn(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Rn=(e,t,n)=>e??t??n,qs=s.defineComponent({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){process.env.NODE_ENV!=="production"&&Ys();const o=s.inject(lt),r=s.computed(()=>e.route||o.value),a=s.inject(Pn,0),i=s.computed(()=>{let u=s.unref(a);const{matched:d}=r.value;let f;for(;(f=d[u])&&!f.components;)u++;return u}),c=s.computed(()=>r.value.matched[i.value]);s.provide(Pn,s.computed(()=>i.value+1)),s.provide(Fs,c),s.provide(lt,r);const l=s.ref();return s.watch(()=>[l.value,c.value,e.name],([u,d,f],[p,h,g])=>{d&&(d.instances[f]=u,h&&h!==d&&u&&u===p&&(d.leaveGuards.size||(d.leaveGuards=h.leaveGuards),d.updateGuards.size||(d.updateGuards=h.updateGuards))),u&&d&&(!h||!re(d,h)||!p)&&(d.enterCallbacks[f]||[]).forEach(y=>y(u))},{flush:"post"}),()=>{const u=r.value,d=e.name,f=c.value,p=f&&f.components[d];if(!p)return Tn(n.default,{Component:p,route:u});const h=f.props[d],g=h?h===!0?u.params:typeof h=="function"?h(u):h:null,y=O=>{O.component.isUnmounted&&(f.instances[d]=null)},w=s.h(p,$({},g,t,{onVnodeUnmounted:y,ref:l}));if(process.env.NODE_ENV!=="production"&&Z&&w.ref){const O={depth:i.value,name:f.name,path:f.path,meta:f.meta};(F(w.ref)?w.ref.map(T=>T.i):[w.ref.i]).forEach(T=>{T.__vrv_devtools=O})}return Tn(n.default,{Component:w,route:u})||w}}});function Tn(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const Js=qs;function Ys(){const e=s.getCurrentInstance(),t=e.parent&&e.parent.type.name;if(t&&(t==="KeepAlive"||t.includes("Transition"))){const n=t==="KeepAlive"?"keep-alive":"transition";x(` can no longer be used directly inside or . +. If you are returning a value instead of calling "next", make sure to remove the "next" parameter from your function.`;if(typeof u=="object"&&"then"in u)d=d.then(p=>l._called?p:(x(f),Promise.reject(new Error("Invalid navigation guard"))));else if(u!==void 0&&!l._called){x(f),c(new Error("Invalid navigation guard"));return}}d.catch(f=>c(f))})}function Gs(e,t,n){let o=0;return function(){o++===1&&x(`The "next" callback was called more than once in one navigation guard when going from "${n.fullPath}" to "${t.fullPath}". It should be called exactly one time in each navigation guard. This will fail in production.`),e._called=!0,o===1&&e.apply(null,arguments)}}function ut(e,t,n,o){const r=[];for(const a of e){process.env.NODE_ENV!=="production"&&!a.components&&!a.children.length&&x(`Record with path "${a.path}" is either missing a "component(s)" or "children" property.`);for(const i in a.components){let c=a.components[i];if(process.env.NODE_ENV!=="production"){if(!c||typeof c!="object"&&typeof c!="function")throw x(`Component "${i}" in record with path "${a.path}" is not a valid component. Received "${String(c)}".`),new Error("Invalid route component");if("then"in c){x(`Component "${i}" in record with path "${a.path}" is a Promise instead of a function that returns a Promise. Did you write "import('./MyPage.vue')" instead of "() => import('./MyPage.vue')" ? This will break in production if not fixed.`);const l=c;c=()=>l}else c.__asyncLoader&&!c.__warnedDefineAsync&&(c.__warnedDefineAsync=!0,x(`Component "${i}" in record with path "${a.path}" is defined using "defineAsyncComponent()". Write "() => import('./MyPage.vue')" instead of "defineAsyncComponent(() => import('./MyPage.vue'))".`))}if(!(t!=="beforeRouteEnter"&&!a.instances[i]))if(Ws(c)){const u=(c.__vccOpts||c)[t];u&&r.push(ae(u,n,o,a,i))}else{let l=c();process.env.NODE_ENV!=="production"&&!("catch"in l)&&(x(`Component "${i}" in record with path "${a.path}" is a function that does not return a Promise. If you were passing a functional component, make sure to add a "displayName" to the component. This will break in production if not fixed.`),l=Promise.resolve(l)),r.push(()=>l.then(u=>{if(!u)return Promise.reject(new Error(`Couldn't resolve component "${i}" at "${a.path}"`));const d=Wr(u)?u.default:u;a.components[i]=d;const p=(d.__vccOpts||d)[t];return p&&ae(p,n,o,a,i)()}))}}}return r}function Ws(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function $n(e){const t=s.inject(ct),n=s.inject(xn),o=s.computed(()=>t.resolve(s.unref(e.to))),r=s.computed(()=>{const{matched:l}=o.value,{length:u}=l,d=l[u-1],f=n.matched;if(!d||!f.length)return-1;const p=f.findIndex(re.bind(null,d));if(p>-1)return p;const h=Cn(l[u-2]);return u>1&&Cn(d)===h&&f[f.length-1].path!==h?f.findIndex(re.bind(null,l[u-2])):p}),a=s.computed(()=>r.value>-1&&Ks(n.params,o.value.params)),i=s.computed(()=>r.value>-1&&r.value===n.matched.length-1&&ln(n.params,o.value.params));function c(l={}){return Qs(l)?t[s.unref(e.replace)?"replace":"push"](s.unref(e.to)).catch(Se):Promise.resolve()}if(process.env.NODE_ENV!=="production"&&Z){const l=s.getCurrentInstance();if(l){const u={route:o.value,isActive:a.value,isExactActive:i.value};l.__vrl_devtools=l.__vrl_devtools||[],l.__vrl_devtools.push(u),s.watchEffect(()=>{u.route=o.value,u.isActive=a.value,u.isExactActive=i.value},{flush:"post"})}}return{route:o,href:s.computed(()=>o.value.href),isActive:a,isExactActive:i,navigate:c}}const zs=s.defineComponent({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:$n,setup(e,{slots:t}){const n=s.reactive($n(e)),{options:o}=s.inject(ct),r=s.computed(()=>({[Rn(e.activeClass,o.linkActiveClass,"router-link-active")]:n.isActive,[Rn(e.exactActiveClass,o.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const a=t.default&&t.default(n);return e.custom?a:s.h("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},a)}}});function Qs(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Ks(e,t){for(const n in t){const o=t[n],r=e[n];if(typeof o=="string"){if(o!==r)return!1}else if(!F(r)||r.length!==o.length||o.some((a,i)=>a!==r[i]))return!1}return!0}function Cn(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Rn=(e,t,n)=>e??t??n,qs=s.defineComponent({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){process.env.NODE_ENV!=="production"&&Ys();const o=s.inject(lt),r=s.computed(()=>e.route||o.value),a=s.inject(Pn,0),i=s.computed(()=>{let u=s.unref(a);const{matched:d}=r.value;let f;for(;(f=d[u])&&!f.components;)u++;return u}),c=s.computed(()=>r.value.matched[i.value]);s.provide(Pn,s.computed(()=>i.value+1)),s.provide(Fs,c),s.provide(lt,r);const l=s.ref();return s.watch(()=>[l.value,c.value,e.name],([u,d,f],[p,h,g])=>{d&&(d.instances[f]=u,h&&h!==d&&u&&u===p&&(d.leaveGuards.size||(d.leaveGuards=h.leaveGuards),d.updateGuards.size||(d.updateGuards=h.updateGuards))),u&&d&&(!h||!re(d,h)||!p)&&(d.enterCallbacks[f]||[]).forEach(y=>y(u))},{flush:"post"}),()=>{const u=r.value,d=e.name,f=c.value,p=f&&f.components[d];if(!p)return Tn(n.default,{Component:p,route:u});const h=f.props[d],g=h?h===!0?u.params:typeof h=="function"?h(u):h:null,y=O=>{O.component.isUnmounted&&(f.instances[d]=null)},w=s.h(p,$({},g,t,{onVnodeUnmounted:y,ref:l}));if(process.env.NODE_ENV!=="production"&&Z&&w.ref){const O={depth:i.value,name:f.name,path:f.path,meta:f.meta};(F(w.ref)?w.ref.map(T=>T.i):[w.ref.i]).forEach(T=>{T.__vrv_devtools=O})}return Tn(n.default,{Component:w,route:u})||w}}});function Tn(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const Js=qs;function Ys(){const e=s.getCurrentInstance(),t=e.parent&&e.parent.type.name;if(t&&(t==="KeepAlive"||t.includes("Transition"))){const n=t==="KeepAlive"?"keep-alive":"transition";x(` can no longer be used directly inside or . Use slot props instead: <${n}> -`)}}function xe(e,t){const n=$({},e,{matched:e.matched.map(o=>aa(o,["instances","children","aliasOf"]))});return{_custom:{type:null,readOnly:!0,display:e.fullPath,tooltip:t,value:n}}}function Me(e){return{_custom:{display:e}}}let Xs=0;function Zs(e,t,n){if(t.__hasDevtools)return;t.__hasDevtools=!0;const o=Xs++;Wr({id:"org.vuejs.router"+(o?"."+o:""),label:"Vue Router",packageName:"vue-router",homepage:"https://router.vuejs.org",logo:"https://router.vuejs.org/logo.png",componentStateTypes:["Routing"],app:e},r=>{typeof r.now!="function"&&console.warn("[Vue Router]: You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."),r.on.inspectComponent((d,f)=>{d.instanceData&&d.instanceData.state.push({type:"Routing",key:"$route",editable:!1,value:xe(t.currentRoute.value,"Current Route")})}),r.on.visitComponentTree(({treeNode:d,componentInstance:f})=>{if(f.__vrv_devtools){const p=f.__vrv_devtools;d.tags.push({label:(p.name?`${p.name.toString()}: `:"")+p.path,textColor:0,tooltip:"This component is rendered by <router-view>",backgroundColor:An})}F(f.__vrl_devtools)&&(f.__devtoolsApi=r,f.__vrl_devtools.forEach(p=>{let h=Bn,g="";p.isExactActive?(h=Vn,g="This is exactly active"):p.isActive&&(h=Dn,g="This link is active"),d.tags.push({label:p.route.path,textColor:0,tooltip:g,backgroundColor:h})}))}),s.watch(t.currentRoute,()=>{l(),r.notifyComponentUpdate(),r.sendInspectorTree(c),r.sendInspectorState(c)});const a="router:navigations:"+o;r.addTimelineLayer({id:a,label:`Router${o?" "+o:""} Navigations`,color:4237508}),t.onError((d,f)=>{r.addTimelineEvent({layerId:a,event:{title:"Error during Navigation",subtitle:f.fullPath,logType:"error",time:r.now(),data:{error:d},groupId:f.meta.__navigationId}})});let i=0;t.beforeEach((d,f)=>{const p={guard:Me("beforeEach"),from:xe(f,"Current Location during this navigation"),to:xe(d,"Target location")};Object.defineProperty(d.meta,"__navigationId",{value:i++}),r.addTimelineEvent({layerId:a,event:{time:r.now(),title:"Start of navigation",subtitle:d.fullPath,data:p,groupId:d.meta.__navigationId}})}),t.afterEach((d,f,p)=>{const h={guard:Me("afterEach")};p?(h.failure={_custom:{type:Error,readOnly:!0,display:p?p.message:"",tooltip:"Navigation Failure",value:p}},h.status=Me("❌")):h.status=Me("✅"),h.from=xe(f,"Current Location during this navigation"),h.to=xe(d,"Target location"),r.addTimelineEvent({layerId:a,event:{title:"End of navigation",subtitle:d.fullPath,time:r.now(),data:h,logType:p?"warning":"default",groupId:d.meta.__navigationId}})});const c="router-inspector:"+o;r.addInspector({id:c,label:"Routes"+(o?" "+o:""),icon:"book",treeFilterPlaceholder:"Search routes"});function l(){if(!u)return;const d=u;let f=n.getRoutes().filter(p=>!p.parent);f.forEach(jn),d.filter&&(f=f.filter(p=>dt(p,d.filter.toLowerCase()))),f.forEach(p=>Mn(p,t.currentRoute.value)),d.rootNodes=f.map(Ln)}let u;r.on.getInspectorTree(d=>{u=d,d.app===e&&d.inspectorId===c&&l()}),r.on.getInspectorState(d=>{if(d.app===e&&d.inspectorId===c){const p=n.getRoutes().find(h=>h.record.__vd_id===d.nodeId);p&&(d.state={options:ta(p)})}}),r.sendInspectorTree(c),r.sendInspectorState(c)})}function ea(e){return e.optional?e.repeatable?"*":"?":e.repeatable?"+":""}function ta(e){const{record:t}=e,n=[{editable:!1,key:"path",value:t.path}];return t.name!=null&&n.push({editable:!1,key:"name",value:t.name}),n.push({editable:!1,key:"regexp",value:e.re}),e.keys.length&&n.push({editable:!1,key:"keys",value:{_custom:{type:null,readOnly:!0,display:e.keys.map(o=>`${o.name}${ea(o)}`).join(" "),tooltip:"Param keys",value:e.keys}}}),t.redirect!=null&&n.push({editable:!1,key:"redirect",value:t.redirect}),e.alias.length&&n.push({editable:!1,key:"aliases",value:e.alias.map(o=>o.record.path)}),Object.keys(e.record.meta).length&&n.push({editable:!1,key:"meta",value:e.record.meta}),n.push({key:"score",editable:!1,value:{_custom:{type:null,readOnly:!0,display:e.score.map(o=>o.join(", ")).join(" | "),tooltip:"Score used to sort routes",value:e.score}}}),n}const An=15485081,Dn=2450411,Vn=8702998,na=2282478,Bn=16486972,oa=6710886;function Ln(e){const t=[],{record:n}=e;n.name!=null&&t.push({label:String(n.name),textColor:0,backgroundColor:na}),n.aliasOf&&t.push({label:"alias",textColor:0,backgroundColor:Bn}),e.__vd_match&&t.push({label:"matches",textColor:0,backgroundColor:An}),e.__vd_exactActive&&t.push({label:"exact",textColor:0,backgroundColor:Vn}),e.__vd_active&&t.push({label:"active",textColor:0,backgroundColor:Dn}),n.redirect&&t.push({label:typeof n.redirect=="string"?`redirect: ${n.redirect}`:"redirects",textColor:16777215,backgroundColor:oa});let o=n.__vd_id;return o==null&&(o=String(ra++),n.__vd_id=o),{id:o,label:n.path,tags:t,children:e.children.map(Ln)}}let ra=0;const sa=/^\/(.*)\/([a-z]*)$/;function Mn(e,t){const n=t.matched.length&&re(t.matched[t.matched.length-1],e.record);e.__vd_exactActive=e.__vd_active=n,n||(e.__vd_active=t.matched.some(o=>re(o,e.record))),e.children.forEach(o=>Mn(o,t))}function jn(e){e.__vd_match=!1,e.children.forEach(jn)}function dt(e,t){const n=String(e.re).match(sa);if(e.__vd_match=!1,!n||n.length<3)return!1;if(new RegExp(n[1].replace(/\$$/,""),n[2]).test(t))return e.children.forEach(i=>dt(i,t)),e.record.path!=="/"||t==="/"?(e.__vd_match=e.re.test(t),!0):!1;const r=e.record.path.toLowerCase(),a=Ne(r);return!t.startsWith("/")&&(a.includes(t)||r.includes(t))||a.startsWith(t)||r.startsWith(t)||e.record.name&&String(e.record.name).includes(t)?!0:e.children.some(i=>dt(i,t))}function aa(e,t){const n={};for(const o in e)t.includes(o)||(n[o]=e[o]);return n}function ia(e){const t=bs(e.routes,e),n=e.parseQuery||Us,o=e.stringifyQuery||Nn,r=e.history;if(process.env.NODE_ENV!=="production"&&!r)throw new Error('Provide the "history" option when calling "createRouter()": https://next.router.vuejs.org/api/#history.');const a=Pe(),i=Pe(),c=Pe(),l=s.shallowRef(se);let u=se;Z&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const d=tt.bind(null,m=>""+m),f=tt.bind(null,js),p=tt.bind(null,Ne);function h(m,b){let _,E;return hn(m)?(_=t.getRecordMatcher(m),E=b):E=m,t.addRoute(E,_)}function g(m){const b=t.getRecordMatcher(m);b?t.removeRoute(b):process.env.NODE_ENV!=="production"&&x(`Cannot remove non-existent route "${String(m)}"`)}function y(){return t.getRoutes().map(m=>m.record)}function w(m){return!!t.getRecordMatcher(m)}function O(m,b){if(b=$({},b||l.value),typeof m=="string"){const N=nt(n,m,b.path),A=t.resolve({path:N.path},b),fe=r.createHref(N.fullPath);return process.env.NODE_ENV!=="production"&&(fe.startsWith("//")?x(`Location "${m}" resolved to "${fe}". A resolved location cannot start with multiple slashes.`):A.matched.length||x(`No match found for location with path "${m}"`)),$(N,A,{params:p(A.params),hash:Ne(N.hash),redirectedFrom:void 0,href:fe})}let _;if("path"in m)process.env.NODE_ENV!=="production"&&"params"in m&&!("name"in m)&&Object.keys(m.params).length&&x(`Path "${m.path}" was passed with params but they will be ignored. Use a named route alongside params instead.`),_=$({},m,{path:nt(n,m.path,b.path).path});else{const N=$({},m.params);for(const A in N)N[A]==null&&delete N[A];_=$({},m,{params:f(m.params)}),b.params=f(b.params)}const E=t.resolve(_,b),C=m.hash||"";process.env.NODE_ENV!=="production"&&C&&!C.startsWith("#")&&x(`A \`hash\` should always start with the character "#". Replace "${C}" with "#${C}".`),E.params=d(p(E.params));const V=Kr(o,$({},m,{hash:Bs(C),path:E.path})),P=r.createHref(V);return process.env.NODE_ENV!=="production"&&(P.startsWith("//")?x(`Location "${m}" resolved to "${P}". A resolved location cannot start with multiple slashes.`):E.matched.length||x(`No match found for location with path "${"path"in m?m.path:m}"`)),$({fullPath:V,hash:C,query:o===Nn?Hs(m.query):m.query||{}},E,{redirectedFrom:void 0,href:P})}function I(m){return typeof m=="string"?nt(n,m,l.value.path):$({},m)}function T(m,b){if(u!==m)return ye(8,{from:b,to:m})}function M(m){return S(m)}function G(m){return M($(I(m),{replace:!0}))}function Q(m){const b=m.matched[m.matched.length-1];if(b&&b.redirect){const{redirect:_}=b;let E=typeof _=="function"?_(m):_;if(typeof E=="string"&&(E=E.includes("?")||E.includes("#")?E=I(E):{path:E},E.params={}),process.env.NODE_ENV!=="production"&&!("path"in E)&&!("name"in E))throw x(`Invalid redirect found: +`)}}function xe(e,t){const n=$({},e,{matched:e.matched.map(o=>aa(o,["instances","children","aliasOf"]))});return{_custom:{type:null,readOnly:!0,display:e.fullPath,tooltip:t,value:n}}}function Me(e){return{_custom:{display:e}}}let Xs=0;function Zs(e,t,n){if(t.__hasDevtools)return;t.__hasDevtools=!0;const o=Xs++;Gr({id:"org.vuejs.router"+(o?"."+o:""),label:"Vue Router",packageName:"vue-router",homepage:"https://router.vuejs.org",logo:"https://router.vuejs.org/logo.png",componentStateTypes:["Routing"],app:e},r=>{typeof r.now!="function"&&console.warn("[Vue Router]: You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."),r.on.inspectComponent((d,f)=>{d.instanceData&&d.instanceData.state.push({type:"Routing",key:"$route",editable:!1,value:xe(t.currentRoute.value,"Current Route")})}),r.on.visitComponentTree(({treeNode:d,componentInstance:f})=>{if(f.__vrv_devtools){const p=f.__vrv_devtools;d.tags.push({label:(p.name?`${p.name.toString()}: `:"")+p.path,textColor:0,tooltip:"This component is rendered by <router-view>",backgroundColor:An})}F(f.__vrl_devtools)&&(f.__devtoolsApi=r,f.__vrl_devtools.forEach(p=>{let h=Bn,g="";p.isExactActive?(h=Vn,g="This is exactly active"):p.isActive&&(h=Dn,g="This link is active"),d.tags.push({label:p.route.path,textColor:0,tooltip:g,backgroundColor:h})}))}),s.watch(t.currentRoute,()=>{l(),r.notifyComponentUpdate(),r.sendInspectorTree(c),r.sendInspectorState(c)});const a="router:navigations:"+o;r.addTimelineLayer({id:a,label:`Router${o?" "+o:""} Navigations`,color:4237508}),t.onError((d,f)=>{r.addTimelineEvent({layerId:a,event:{title:"Error during Navigation",subtitle:f.fullPath,logType:"error",time:r.now(),data:{error:d},groupId:f.meta.__navigationId}})});let i=0;t.beforeEach((d,f)=>{const p={guard:Me("beforeEach"),from:xe(f,"Current Location during this navigation"),to:xe(d,"Target location")};Object.defineProperty(d.meta,"__navigationId",{value:i++}),r.addTimelineEvent({layerId:a,event:{time:r.now(),title:"Start of navigation",subtitle:d.fullPath,data:p,groupId:d.meta.__navigationId}})}),t.afterEach((d,f,p)=>{const h={guard:Me("afterEach")};p?(h.failure={_custom:{type:Error,readOnly:!0,display:p?p.message:"",tooltip:"Navigation Failure",value:p}},h.status=Me("❌")):h.status=Me("✅"),h.from=xe(f,"Current Location during this navigation"),h.to=xe(d,"Target location"),r.addTimelineEvent({layerId:a,event:{title:"End of navigation",subtitle:d.fullPath,time:r.now(),data:h,logType:p?"warning":"default",groupId:d.meta.__navigationId}})});const c="router-inspector:"+o;r.addInspector({id:c,label:"Routes"+(o?" "+o:""),icon:"book",treeFilterPlaceholder:"Search routes"});function l(){if(!u)return;const d=u;let f=n.getRoutes().filter(p=>!p.parent);f.forEach(jn),d.filter&&(f=f.filter(p=>dt(p,d.filter.toLowerCase()))),f.forEach(p=>Mn(p,t.currentRoute.value)),d.rootNodes=f.map(Ln)}let u;r.on.getInspectorTree(d=>{u=d,d.app===e&&d.inspectorId===c&&l()}),r.on.getInspectorState(d=>{if(d.app===e&&d.inspectorId===c){const p=n.getRoutes().find(h=>h.record.__vd_id===d.nodeId);p&&(d.state={options:ta(p)})}}),r.sendInspectorTree(c),r.sendInspectorState(c)})}function ea(e){return e.optional?e.repeatable?"*":"?":e.repeatable?"+":""}function ta(e){const{record:t}=e,n=[{editable:!1,key:"path",value:t.path}];return t.name!=null&&n.push({editable:!1,key:"name",value:t.name}),n.push({editable:!1,key:"regexp",value:e.re}),e.keys.length&&n.push({editable:!1,key:"keys",value:{_custom:{type:null,readOnly:!0,display:e.keys.map(o=>`${o.name}${ea(o)}`).join(" "),tooltip:"Param keys",value:e.keys}}}),t.redirect!=null&&n.push({editable:!1,key:"redirect",value:t.redirect}),e.alias.length&&n.push({editable:!1,key:"aliases",value:e.alias.map(o=>o.record.path)}),Object.keys(e.record.meta).length&&n.push({editable:!1,key:"meta",value:e.record.meta}),n.push({key:"score",editable:!1,value:{_custom:{type:null,readOnly:!0,display:e.score.map(o=>o.join(", ")).join(" | "),tooltip:"Score used to sort routes",value:e.score}}}),n}const An=15485081,Dn=2450411,Vn=8702998,na=2282478,Bn=16486972,oa=6710886;function Ln(e){const t=[],{record:n}=e;n.name!=null&&t.push({label:String(n.name),textColor:0,backgroundColor:na}),n.aliasOf&&t.push({label:"alias",textColor:0,backgroundColor:Bn}),e.__vd_match&&t.push({label:"matches",textColor:0,backgroundColor:An}),e.__vd_exactActive&&t.push({label:"exact",textColor:0,backgroundColor:Vn}),e.__vd_active&&t.push({label:"active",textColor:0,backgroundColor:Dn}),n.redirect&&t.push({label:typeof n.redirect=="string"?`redirect: ${n.redirect}`:"redirects",textColor:16777215,backgroundColor:oa});let o=n.__vd_id;return o==null&&(o=String(ra++),n.__vd_id=o),{id:o,label:n.path,tags:t,children:e.children.map(Ln)}}let ra=0;const sa=/^\/(.*)\/([a-z]*)$/;function Mn(e,t){const n=t.matched.length&&re(t.matched[t.matched.length-1],e.record);e.__vd_exactActive=e.__vd_active=n,n||(e.__vd_active=t.matched.some(o=>re(o,e.record))),e.children.forEach(o=>Mn(o,t))}function jn(e){e.__vd_match=!1,e.children.forEach(jn)}function dt(e,t){const n=String(e.re).match(sa);if(e.__vd_match=!1,!n||n.length<3)return!1;if(new RegExp(n[1].replace(/\$$/,""),n[2]).test(t))return e.children.forEach(i=>dt(i,t)),e.record.path!=="/"||t==="/"?(e.__vd_match=e.re.test(t),!0):!1;const r=e.record.path.toLowerCase(),a=Ne(r);return!t.startsWith("/")&&(a.includes(t)||r.includes(t))||a.startsWith(t)||r.startsWith(t)||e.record.name&&String(e.record.name).includes(t)?!0:e.children.some(i=>dt(i,t))}function aa(e,t){const n={};for(const o in e)t.includes(o)||(n[o]=e[o]);return n}function ia(e){const t=bs(e.routes,e),n=e.parseQuery||Us,o=e.stringifyQuery||Nn,r=e.history;if(process.env.NODE_ENV!=="production"&&!r)throw new Error('Provide the "history" option when calling "createRouter()": https://next.router.vuejs.org/api/#history.');const a=Pe(),i=Pe(),c=Pe(),l=s.shallowRef(se);let u=se;Z&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const d=tt.bind(null,m=>""+m),f=tt.bind(null,js),p=tt.bind(null,Ne);function h(m,b){let _,E;return hn(m)?(_=t.getRecordMatcher(m),E=b):E=m,t.addRoute(E,_)}function g(m){const b=t.getRecordMatcher(m);b?t.removeRoute(b):process.env.NODE_ENV!=="production"&&x(`Cannot remove non-existent route "${String(m)}"`)}function y(){return t.getRoutes().map(m=>m.record)}function w(m){return!!t.getRecordMatcher(m)}function O(m,b){if(b=$({},b||l.value),typeof m=="string"){const N=nt(n,m,b.path),A=t.resolve({path:N.path},b),fe=r.createHref(N.fullPath);return process.env.NODE_ENV!=="production"&&(fe.startsWith("//")?x(`Location "${m}" resolved to "${fe}". A resolved location cannot start with multiple slashes.`):A.matched.length||x(`No match found for location with path "${m}"`)),$(N,A,{params:p(A.params),hash:Ne(N.hash),redirectedFrom:void 0,href:fe})}let _;if("path"in m)process.env.NODE_ENV!=="production"&&"params"in m&&!("name"in m)&&Object.keys(m.params).length&&x(`Path "${m.path}" was passed with params but they will be ignored. Use a named route alongside params instead.`),_=$({},m,{path:nt(n,m.path,b.path).path});else{const N=$({},m.params);for(const A in N)N[A]==null&&delete N[A];_=$({},m,{params:f(m.params)}),b.params=f(b.params)}const E=t.resolve(_,b),C=m.hash||"";process.env.NODE_ENV!=="production"&&C&&!C.startsWith("#")&&x(`A \`hash\` should always start with the character "#". Replace "${C}" with "#${C}".`),E.params=d(p(E.params));const V=Kr(o,$({},m,{hash:Bs(C),path:E.path})),P=r.createHref(V);return process.env.NODE_ENV!=="production"&&(P.startsWith("//")?x(`Location "${m}" resolved to "${P}". A resolved location cannot start with multiple slashes.`):E.matched.length||x(`No match found for location with path "${"path"in m?m.path:m}"`)),$({fullPath:V,hash:C,query:o===Nn?Hs(m.query):m.query||{}},E,{redirectedFrom:void 0,href:P})}function I(m){return typeof m=="string"?nt(n,m,l.value.path):$({},m)}function T(m,b){if(u!==m)return ye(8,{from:b,to:m})}function M(m){return S(m)}function z(m){return M($(I(m),{replace:!0}))}function Q(m){const b=m.matched[m.matched.length-1];if(b&&b.redirect){const{redirect:_}=b;let E=typeof _=="function"?_(m):_;if(typeof E=="string"&&(E=E.includes("?")||E.includes("#")?E=I(E):{path:E},E.params={}),process.env.NODE_ENV!=="production"&&!("path"in E)&&!("name"in E))throw x(`Invalid redirect found: ${JSON.stringify(E,null,2)} - when navigating to "${m.fullPath}". A redirect must contain a name or path. This will break in production.`),new Error("Invalid redirect");return $({query:m.query,hash:m.hash,params:"path"in E?{}:m.params},E)}}function S(m,b){const _=u=O(m),E=l.value,C=m.state,V=m.force,P=m.replace===!0,N=Q(_);if(N)return S($(I(N),{state:typeof N=="object"?$({},C,N.state):C,force:V,replace:P}),b||_);const A=_;A.redirectedFrom=b;let fe;return!V&&cn(o,E,_)&&(fe=ye(16,{to:A,from:E}),Do(E,E,!0,!1)),(fe?Promise.resolve(fe):k(A,E)).catch(H=>ee(H)?ee(H,2)?H:Nt(H):U(H,A,E)).then(H=>{if(H){if(ee(H,2))return process.env.NODE_ENV!=="production"&&cn(o,O(H.to),A)&&b&&(b._count=b._count?b._count+1:1)>10?(x(`Detected an infinite redirection in a navigation guard when going from "${E.fullPath}" to "${A.fullPath}". Aborting to avoid a Stack Overflow. This will break in production if not fixed.`),Promise.reject(new Error("Infinite redirect in navigation guard"))):S($({replace:P},I(H.to),{state:typeof H.to=="object"?$({},C,H.to.state):C,force:V}),b||A)}else H=R(A,E,!0,P,C);return v(A,E,H),H})}function J(m,b){const _=T(m,b);return _?Promise.reject(_):Promise.resolve()}function k(m,b){let _;const[E,C,V]=ca(m,b);_=ut(E.reverse(),"beforeRouteLeave",m,b);for(const N of E)N.leaveGuards.forEach(A=>{_.push(ae(A,m,b))});const P=J.bind(null,m,b);return _.push(P),_e(_).then(()=>{_=[];for(const N of a.list())_.push(ae(N,m,b));return _.push(P),_e(_)}).then(()=>{_=ut(C,"beforeRouteUpdate",m,b);for(const N of C)N.updateGuards.forEach(A=>{_.push(ae(A,m,b))});return _.push(P),_e(_)}).then(()=>{_=[];for(const N of m.matched)if(N.beforeEnter&&!b.matched.includes(N))if(F(N.beforeEnter))for(const A of N.beforeEnter)_.push(ae(A,m,b));else _.push(ae(N.beforeEnter,m,b));return _.push(P),_e(_)}).then(()=>(m.matched.forEach(N=>N.enterCallbacks={}),_=ut(V,"beforeRouteEnter",m,b),_.push(P),_e(_))).then(()=>{_=[];for(const N of i.list())_.push(ae(N,m,b));return _.push(P),_e(_)}).catch(N=>ee(N,8)?N:Promise.reject(N))}function v(m,b,_){for(const E of c.list())E(m,b,_)}function R(m,b,_,E,C){const V=T(m,b);if(V)return V;const P=b===se,N=Z?history.state:{};_&&(E||P?r.replace(m.fullPath,$({scroll:P&&N&&N.scroll},C)):r.push(m.fullPath,C)),l.value=m,Do(m,b,_,P),Nt()}let D;function de(){D||(D=r.listen((m,b,_)=>{const E=O(m),C=Q(E);if(C){S($(C,{replace:!0}),E).catch(Se);return}u=E;const V=l.value;Z&&ns(dn(V.fullPath,_.delta),Le()),k(E,V).catch(P=>ee(P,12)?P:ee(P,2)?(S(P.to,E).then(N=>{ee(N,20)&&!_.delta&&_.type===Oe.pop&&r.go(-1,!1)}).catch(Se),Promise.reject()):(_.delta&&r.go(-_.delta,!1),U(P,E,V))).then(P=>{P=P||R(E,V,!1),P&&(_.delta&&!ee(P,8)?r.go(-_.delta,!1):_.type===Oe.pop&&ee(P,20)&&r.go(-1,!1)),v(E,V,P)}).catch(Se)}))}let Ce=Pe(),We=Pe(),Y;function U(m,b,_){Nt(m);const E=We.list();return E.length?E.forEach(C=>C(m,b,_)):(process.env.NODE_ENV!=="production"&&x("uncaught error during route navigation:"),console.error(m)),Promise.reject(m)}function sc(){return Y&&l.value!==se?Promise.resolve():new Promise((m,b)=>{Ce.add([m,b])})}function Nt(m){return Y||(Y=!m,de(),Ce.list().forEach(([b,_])=>m?_(m):b()),Ce.reset()),m}function Do(m,b,_,E){const{scrollBehavior:C}=e;if(!Z||!C)return Promise.resolve();const V=!_&&os(dn(m.fullPath,0))||(E||!_)&&history.state&&history.state.scroll||null;return s.nextTick().then(()=>C(m,b,V)).then(P=>P&&ts(P)).catch(P=>U(P,m,b))}const Pt=m=>r.go(m);let xt;const $t=new Set;return{currentRoute:l,listening:!0,addRoute:h,removeRoute:g,hasRoute:w,getRoutes:y,resolve:O,options:e,push:M,replace:G,go:Pt,back:()=>Pt(-1),forward:()=>Pt(1),beforeEach:a.add,beforeResolve:i.add,afterEach:c.add,onError:We.add,isReady:sc,install(m){const b=this;m.component("RouterLink",Gs),m.component("RouterView",Js),m.config.globalProperties.$router=b,Object.defineProperty(m.config.globalProperties,"$route",{enumerable:!0,get:()=>s.unref(l)}),Z&&!xt&&l.value===se&&(xt=!0,M(r.location).catch(C=>{process.env.NODE_ENV!=="production"&&x("Unexpected error when starting the router:",C)}));const _={};for(const C in se)_[C]=s.computed(()=>l.value[C]);m.provide(ct,b),m.provide(xn,s.reactive(_)),m.provide(lt,l);const E=m.unmount;$t.add(m),m.unmount=function(){$t.delete(m),$t.size<1&&(u=se,D&&D(),D=null,l.value=se,xt=!1,Y=!1),E()},process.env.NODE_ENV!=="production"&&Z&&Zs(m,b,t)}}}function _e(e){return e.reduce((t,n)=>t.then(()=>n()),Promise.resolve())}function ca(e,t){const n=[],o=[],r=[],a=Math.max(t.matched.length,e.matched.length);for(let i=0;ire(u,c))?o.push(c):n.push(c));const l=e.matched[i];l&&(t.matched.find(u=>re(u,l))||r.push(l))}return[n,o,r]}ia({history:is(),routes:[]});function la(e){return e&&typeof e.then=="function"}Promise.resolve(!1),Promise.resolve(!0);var ue=Promise.resolve();function Un(e,t){return e||(e=0),new Promise(function(n){return setTimeout(function(){return n(t)},e)})}function ua(e,t){return Math.floor(Math.random()*(t-e+1)+e)}function ft(){return Math.random().toString(36).substring(2)}var Hn=0,pt=0;function je(){var e=new Date().getTime();return e===Hn?(pt++,e*1e3+pt):(Hn=e,pt=0,e*1e3)}var da=je,fa="native";function pa(e){var t={messagesCallback:null,bc:new BroadcastChannel(e),subFns:[]};return t.bc.onmessage=function(n){t.messagesCallback&&t.messagesCallback(n.data)},t}function ha(e){e.bc.close(),e.subFns=[]}function ma(e,t){try{return e.bc.postMessage(t,!1),ue}catch(n){return Promise.reject(n)}}function ga(e,t){e.messagesCallback=t}function ya(){if(typeof window>"u")return!1;if(typeof BroadcastChannel=="function"){if(BroadcastChannel._pubkey)throw new Error("BroadcastChannel: Do not overwrite window.BroadcastChannel with this module, this is not a polyfill");return!0}else return!1}function _a(){return 150}var wa={create:pa,close:ha,onMessage:ga,postMessage:ma,canBeUsed:ya,type:fa,averageResponseTime:_a,microSeconds:da},Fn=function(){function e(t){this.ttl=t,this.map=new Map,this._to=!1}return e.prototype.has=function(t){return this.map.has(t)},e.prototype.add=function(t){var n=this;this.map.set(t,Wn()),this._to||(this._to=!0,setTimeout(function(){n._to=!1,va(n)},0))},e.prototype.clear=function(){this.map.clear()},e}();function va(e){for(var t=Wn()-e.ttl,n=e.map[Symbol.iterator]();;){var o=n.next().value;if(!o)return;var r=o[0],a=o[1];if(a0&&arguments[0]!==void 0?arguments[0]:{},t=JSON.parse(JSON.stringify(e));return typeof t.webWorkerSupport>"u"&&(t.webWorkerSupport=!0),t.idb||(t.idb={}),t.idb.ttl||(t.idb.ttl=1e3*45),t.idb.fallbackInterval||(t.idb.fallbackInterval=150),e.idb&&typeof e.idb.onclose=="function"&&(t.idb.onclose=e.idb.onclose),t.localstorage||(t.localstorage={}),t.localstorage.removeTimeout||(t.localstorage.removeTimeout=1e3*60),e.methods&&(t.methods=e.methods),t.node||(t.node={}),t.node.ttl||(t.node.ttl=1e3*60*2),t.node.maxParallelWrites||(t.node.maxParallelWrites=2048),typeof t.node.useFastPath>"u"&&(t.node.useFastPath=!0),t}var ba=je,Ea="pubkey.broadcast-channel-0-",te="messages",Ue={durability:"relaxed"},ka="idb";function zn(){if(typeof indexedDB<"u")return indexedDB;if(typeof window<"u"){if(typeof window.mozIndexedDB<"u")return window.mozIndexedDB;if(typeof window.webkitIndexedDB<"u")return window.webkitIndexedDB;if(typeof window.msIndexedDB<"u")return window.msIndexedDB}return!1}function mt(e){e.commit&&e.commit()}function Sa(e){var t=zn(),n=Ea+e,o=t.open(n);return o.onupgradeneeded=function(r){var a=r.target.result;a.createObjectStore(te,{keyPath:"id",autoIncrement:!0})},new Promise(function(r,a){o.onerror=function(i){return a(i)},o.onsuccess=function(){r(o.result)}})}function Oa(e,t,n){var o=new Date().getTime(),r={uuid:t,time:o,data:n},a=e.transaction([te],"readwrite",Ue);return new Promise(function(i,c){a.oncomplete=function(){return i()},a.onerror=function(u){return c(u)};var l=a.objectStore(te);l.add(r),mt(a)})}function Ia(e,t){var n=e.transaction(te,"readonly",Ue),o=n.objectStore(te),r=[],a=IDBKeyRange.bound(t+1,1/0);if(o.getAll){var i=o.getAll(a);return new Promise(function(l,u){i.onerror=function(d){return u(d)},i.onsuccess=function(d){l(d.target.result)}})}function c(){try{return a=IDBKeyRange.bound(t+1,1/0),o.openCursor(a)}catch{return o.openCursor()}}return new Promise(function(l,u){var d=c();d.onerror=function(f){return u(f)},d.onsuccess=function(f){var p=f.target.result;p?p.value.ide.lastCursorId&&(e.lastCursorId=o.id),o}).filter(function(o){return Ca(o,e)}).sort(function(o,r){return o.time-r.time});return n.forEach(function(o){e.messagesCallback&&(e.eMIs.add(o.id),e.messagesCallback(o.data))}),ue})}function Ra(e){e.closed=!0,e.db.close()}function Ta(e,t){return e.writeBlockPromise=e.writeBlockPromise.then(function(){return Oa(e.db,e.uuid,t)}).then(function(){ua(0,10)===0&&xa(e)}),e.writeBlockPromise}function Aa(e,t,n){e.messagesCallbackTime=n,e.messagesCallback=t,Qn(e)}function Da(){return!!zn()}function Va(e){return e.idb.fallbackInterval*2}var Ba={create:$a,close:Ra,onMessage:Aa,postMessage:Ta,canBeUsed:Da,type:ka,averageResponseTime:Va,microSeconds:ba},La=je,Ma="pubkey.broadcastChannel-",ja="localstorage";function Kn(){var e;if(typeof window>"u")return null;try{e=window.localStorage,e=window["ie8-eventlistener/storage"]||window.localStorage}catch{}return e}function qn(e){return Ma+e}function Ua(e,t){return new Promise(function(n){Un().then(function(){var o=qn(e.channelName),r={token:ft(),time:new Date().getTime(),data:t,uuid:e.uuid},a=JSON.stringify(r);Kn().setItem(o,a);var i=document.createEvent("Event");i.initEvent("storage",!0,!0),i.key=o,i.newValue=a,window.dispatchEvent(i),n()})})}function Ha(e,t){var n=qn(e),o=function(a){a.key===n&&t(JSON.parse(a.newValue))};return window.addEventListener("storage",o),o}function Fa(e){window.removeEventListener("storage",e)}function Wa(e,t){if(t=ht(t),!Jn())throw new Error("BroadcastChannel: localstorage cannot be used");var n=ft(),o=new Fn(t.localstorage.removeTimeout),r={channelName:e,uuid:n,eMIs:o};return r.listener=Ha(e,function(a){r.messagesCallback&&a.uuid!==n&&(!a.token||o.has(a.token)||a.data.time&&a.data.time0||e._addEL.internal.length>0}function to(e,t,n){e._addEL[t].push(n),ii(e)}function no(e,t,n){e._addEL[t]=e._addEL[t].filter(function(o){return o!==n}),ci(e)}function ii(e){if(!e._iL&&eo(e)){var t=function(r){e._addEL[r.type].forEach(function(a){var i=1e5,c=a.time-i;r.time>=c&&a.fn(r.data)})},n=e.method.microSeconds();e._prepP?e._prepP.then(function(){e._iL=!0,e.method.onMessage(e._state,t,n)}):(e._iL=!0,e.method.onMessage(e._state,t,n))}}function ci(e){if(e._iL&&!eo(e)){e._iL=!1;var t=e.method.microSeconds();e.method.onMessage(e._state,null,t)}}const oo={"<":"\\u003C",">":"\\u003E","/":"\\u002F","\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\0":"\\u0000","\u2028":"\\u2028","\u2029":"\\u2029"};class _t extends Error{constructor(t,n){super(t),this.name="DevalueError",this.path=n.join("")}}function ro(e){return Object(e)!==e}const li=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function ui(e){const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join("\0")===li}function di(e){return Object.prototype.toString.call(e).slice(8,-1)}function we(e){let t='"';for(let n=0;n=55296&&r<=57343){const a=e.charCodeAt(n+1);r<=56319&&a>=56320&&a<=57343?t+=o+e[++n]:t+=`\\u${r.toString(16).toUpperCase()}`}else t+=o}return t+='"',t}const wt=-1,so=-2,ao=-3,io=-4,co=-5,vt=-6;function lo(e,t){return fi(JSON.parse(e),t)}function fi(e,t){if(typeof e=="number")return r(e,!0);if(!Array.isArray(e)||e.length===0)throw new Error("Invalid input");const n=e,o=Array(n.length);function r(a,i=!1){if(a===wt)return;if(a===ao)return NaN;if(a===io)return 1/0;if(a===co)return-1/0;if(a===vt)return-0;if(i)throw new Error("Invalid input");if(a in o)return o[a];const c=n[a];if(!c||typeof c!="object")o[a]=c;else if(Array.isArray(c))if(typeof c[0]=="string"){const l=c[0],u=t==null?void 0:t[l];if(u)return o[a]=u(r(c[1]));switch(l){case"Date":o[a]=new Date(c[1]);break;case"Set":const d=new Set;o[a]=d;for(let h=1;h0&&(f+=","),y in u?(a.push(`[${y}]`),f+=c(u[y]),a.pop()):f+=so;f+="]";break;case"Set":f='["Set"';for(const y of u)f+=`,${c(y)}`;f+="]";break;case"Map":f='["Map"';for(const[y,w]of u)a.push(`.get(${ro(y)?bt(y):"..."})`),f+=`,${c(y)},${c(w)}`;f+="]";break;default:if(!ui(u))throw new _t("Cannot stringify arbitrary non-POJOs",a);if(Object.getOwnPropertySymbols(u).length>0)throw new _t("Cannot stringify POJOs with symbolic keys",a);if(Object.getPrototypeOf(u)===null){f='["null"';for(const y in u)a.push(`.${y}`),f+=`,${we(y)},${c(u[y])}`,a.pop();f+="]"}else{f="{";let y=!1;for(const w in u)y&&(f+=","),y=!0,a.push(`.${w}`),f+=`${we(w)}:${c(u[w])}`,a.pop();f+="}"}}return n[d]=f,d}const l=c(e);return l<0?`${l}`:`[${n.join(",")}]`}function bt(e){const t=typeof e;return t==="string"?we(e):e instanceof String?we(e.toString()):e===void 0?wt.toString():e===0&&1/e<0?vt.toString():t==="bigint"?`["BigInt","${e}"]`:String(e)}function pi(e,t,{initialize:n,type:o}){let r=`${t.$id}-${e.toString()}`,a=new yt(r,{type:o}),i=!1,c=0;s.watch(()=>t[e],d=>{i||(c=Date.now(),a.postMessage({timestamp:c,state:lo(uo(d))})),i=!1},{deep:!0}),a.onmessage=d=>{if(d===void 0){a.postMessage({timestamp:c,state:lo(uo(t[e]))});return}d.timestamp<=c||(i=!0,c=d.timestamp,t[e]=d.state)};let l=()=>a.postMessage(void 0),u=()=>a.close();return n&&l(),{sync:l,unshare:u}}var hi=(e,t)=>Object.keys(t).includes(e),mi=({initialize:e=!0,enable:t=!0,type:n})=>({store:o,options:r})=>{var a,i;let c=((a=r==null?void 0:r.share)==null?void 0:a.enable)??t,l=((i=r==null?void 0:r.share)==null?void 0:i.omit)??[];!c||Object.keys(o.$state).forEach(u=>{var d;l.includes(u)||!hi(u,o.$state)||pi(u,o,{initialize:((d=r==null?void 0:r.share)==null?void 0:d.initialize)??e,type:n})})};Rr().use(mi({enable:!0,initialize:!0}));const fo=s.defineComponent({__name:"Doctype",setup(e){const{stonecrop:t,isReady:n}=rn(),o=s.ref([]);return s.watch(n,()=>{if(n.value){let r=t.value.schema.schema.toArray();r.forEach((a,i)=>{const l=t.value.store.record[a.fieldname];r[i].value=l}),o.value=r}}),(r,a)=>s.unref(n)?(s.openBlock(),s.createBlock(s.unref(nr),{key:0,class:"aform-main",modelValue:o.value,"onUpdate:modelValue":a[0]||(a[0]=i=>o.value=i)},null,8,["modelValue"])):s.createCommentVNode("",!0)}});var po;const ho=typeof window<"u",gi=e=>typeof e=="string",yi=()=>{};ho&&(po=window==null?void 0:window.navigator)!=null&&po.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function mo(e){return typeof e=="function"?e():s.unref(e)}function _i(e){return e}function wi(e){return s.getCurrentScope()?(s.onScopeDispose(e),!0):!1}function Et(e){var t;const n=mo(e);return(t=n==null?void 0:n.$el)!=null?t:n}const go=ho?window:void 0;function vi(...e){let t,n,o,r;if(gi(e[0])||Array.isArray(e[0])?([n,o,r]=e,t=go):[t,n,o,r]=e,!t)return yi;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const a=[],i=()=>{a.forEach(d=>d()),a.length=0},c=(d,f,p,h)=>(d.addEventListener(f,p,h),()=>d.removeEventListener(f,p,h)),l=s.watch(()=>[Et(t),mo(r)],([d,f])=>{i(),d&&a.push(...n.flatMap(p=>o.map(h=>c(d,p,h,f))))},{immediate:!0,flush:"post"}),u=()=>{l(),i()};return wi(u),u}const yo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},_o="__vueuse_ssr_handlers__";yo[_o]=yo[_o]||{};function bi(e,{window:t=go,scrollTarget:n}={}){const o=s.ref(!1),r=()=>{if(!t)return;const a=t.document,i=Et(e);if(!i)o.value=!1;else{const c=i.getBoundingClientRect();o.value=c.top<=(t.innerHeight||a.documentElement.clientHeight)&&c.left<=(t.innerWidth||a.documentElement.clientWidth)&&c.bottom>=0&&c.right>=0}};return s.watch(()=>Et(e),()=>r(),{immediate:!0,flush:"post"}),t&&vi(n||t,"scroll",r,{capture:!1,passive:!0}),o}var wo;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(wo||(wo={}));var Ei=Object.defineProperty,vo=Object.getOwnPropertySymbols,ki=Object.prototype.hasOwnProperty,Si=Object.prototype.propertyIsEnumerable,bo=(e,t,n)=>t in e?Ei(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Oi=(e,t)=>{for(var n in t||(t={}))ki.call(t,n)&&bo(e,n,t[n]);if(vo)for(var n of vo(t))Si.call(t,n)&&bo(e,n,t[n]);return e};Oi({linear:_i},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]});const ne=e=>{let t=bi(e).value;return t=t&&e.offsetHeight>0,t},oe=e=>e.tabIndex>=0,Eo=e=>{const t=e.target;return kt(t)},kt=e=>{var t;let n;if(e instanceof HTMLTableCellElement){const o=(t=e.parentElement)==null?void 0:t.previousElementSibling;if(o){const r=Array.from(o.children)[e.cellIndex];r&&(n=r)}}else if(e instanceof HTMLTableRowElement){const o=e.previousElementSibling;o&&(n=o)}return n&&(!oe(n)||!ne(n))?kt(n):n},Ii=e=>{var t;const n=e.target;let o;if(n instanceof HTMLTableCellElement){const r=(t=n.parentElement)==null?void 0:t.parentElement;if(r){const a=r.firstElementChild.children[n.cellIndex];a&&(o=a)}}else if(n instanceof HTMLTableRowElement){const r=n.parentElement;if(r){const a=r.firstElementChild;a&&(o=a)}}return o&&(!oe(o)||!ne(o))?St(o):o},ko=e=>{const t=e.target;return St(t)},St=e=>{var t;let n;if(e instanceof HTMLTableCellElement){const o=(t=e.parentElement)==null?void 0:t.nextElementSibling;if(o){const r=Array.from(o.children)[e.cellIndex];r&&(n=r)}}else if(e instanceof HTMLTableRowElement){const o=e.nextElementSibling;o&&(n=o)}return n&&(!oe(n)||!ne(n))?St(n):n},Ni=e=>{var t;const n=e.target;let o;if(n instanceof HTMLTableCellElement){const r=(t=n.parentElement)==null?void 0:t.parentElement;if(r){const a=r.lastElementChild.children[n.cellIndex];a&&(o=a)}}else if(n instanceof HTMLTableRowElement){const r=n.parentElement;if(r){const a=r.lastElementChild;a&&(o=a)}}return o&&(!oe(o)||!ne(o))?kt(o):o},So=e=>{const t=e.target;return Ot(t)},Ot=e=>{var t;let n;if(e.previousElementSibling)n=e.previousElementSibling;else{const o=(t=e.parentElement)==null?void 0:t.previousElementSibling;n=o==null?void 0:o.lastElementChild}return n&&(!oe(n)||!ne(n))?Ot(n):n},Oo=e=>{const t=e.target;return It(t)},It=e=>{var t;let n;if(e.nextElementSibling)n=e.nextElementSibling;else{const o=(t=e.parentElement)==null?void 0:t.nextElementSibling;n=o==null?void 0:o.firstElementChild}return n&&(!oe(n)||!ne(n))?It(n):n},Io=e=>{const t=e.target.parentElement.firstElementChild;return t&&(!oe(t)||!ne(t))?It(t):t},No=e=>{const t=e.target.parentElement.lastElementChild;return t&&(!oe(t)||!ne(t))?Ot(t):t},He=["alt","control","shift","meta"],Pi={ArrowUp:"up",ArrowDown:"down",ArrowLeft:"left",ArrowRight:"right"},Po={"keydown.up":e=>{const t=Eo(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.down":e=>{const t=ko(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.left":e=>{const t=So(e);e.preventDefault(),e.stopPropagation(),t&&t.focus()},"keydown.right":e=>{const t=Oo(e);e.preventDefault(),e.stopPropagation(),t&&t.focus()},"keydown.control.up":e=>{const t=Ii(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.control.down":e=>{const t=Ni(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.control.left":e=>{const t=Io(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.control.right":e=>{const t=No(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.end":e=>{const t=No(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.enter":e=>{if(e.target instanceof HTMLTableCellElement){e.preventDefault(),e.stopPropagation();const t=ko(e);t&&t.focus()}},"keydown.shift.enter":e=>{if(e.target instanceof HTMLTableCellElement){e.preventDefault(),e.stopPropagation();const t=Eo(e);t&&t.focus()}},"keydown.home":e=>{const t=Io(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.tab":e=>{const t=Oo(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.shift.tab":e=>{const t=So(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())}};function xo(e){const t=o=>{let r=null;o.parent&&(typeof o.parent=="string"?r=document.querySelector(o.parent):o.parent instanceof Element?r=o.parent:r=o.parent.value);let a=[];if(o.selectors)if(typeof o.selectors=="string")a=r?Array.from(r.querySelectorAll(o.selectors)):Array.from(document.querySelectorAll(o.selectors));else if(o.selectors instanceof Element)a.push(o.selectors);else if(Array.isArray(o.selectors.value))for(const i of o.selectors.value)i instanceof Element?a.push(i):a.push(i.$el);else a.push(o.selectors.value);else a=Array.from(r.children).filter(i=>oe(i)&&ne(i));return a},n=o=>r=>{const a=Pi[r.key]||r.key.toLowerCase();if(He.includes(a))return;const i=o.handlers||Po;for(const c of Object.keys(i)){const[l,...u]=c.split(".");if(l==="keydown"&&u.includes(a)){const d=i[c],f=u.filter(h=>He.includes(h)),p=He.some(h=>{const g=h.charAt(0).toUpperCase()+h.slice(1);return r.getModifierState(g)});if(f.length>0){if(p){for(const h of He)if(u.includes(h)){const g=h.charAt(0).toUpperCase()+h.slice(1);r.getModifierState(g)&&d(r)}}}else p||d(r)}}};s.onMounted(()=>{for(const o of e){const r=t(o);for(const a of r)a.addEventListener("keydown",n(o))}}),s.onBeforeUnmount(()=>{for(const o of e){const r=t(o);for(const a of r)a.removeEventListener("keydown",n(o))}})}const xi=["data-colindex","data-rowindex","data-editable","contenteditable","tabindex"],$i={key:1},Ci=s.defineComponent({__name:"ACell",props:{colIndex:null,rowIndex:null,tableid:null,addNavigation:{type:[Boolean,Object],default:!0},tabIndex:{default:0},clickHandler:null},setup(e){var t;const n=e,o=s.inject(n.tableid),r=s.ref(null);let a=s.ref(!1);const i=s.computed(()=>{const y=o.cellData(n.colIndex,n.rowIndex);if(o.columns[n.colIndex].format){const w=o.columns[n.colIndex].format;return typeof w=="function"?w(y):typeof w=="string"?Function(`"use strict";return (${w})`)()(y):y}else return y}),c=y=>{if(n.clickHandler){n.clickHandler(y);return}if(o.columns[n.colIndex].mask,o.columns[n.colIndex].modalComponent){const w=r.value.getBoundingClientRect();o.modal.visible=!0,o.modal.colIndex=n.colIndex,o.modal.rowIndex=n.rowIndex,o.modal.parent=r.value,o.modal.top=w.top+w.height,o.modal.left=w.left,o.modal.width=u.value,o.modal.component=o.columns[n.colIndex].modalComponent,o.modal.componentProps=o.columns[n.colIndex].modalComponentProps}};if(n.addNavigation){let y={...Po,"keydown.f2":c,"keydown.alt.up":c,"keydown.alt.down":c,"keydown.alt.left":c,"keydown.alt.right":c};typeof n.addNavigation=="object"&&(y={...y,...n.addNavigation}),xo([{selectors:r,handlers:y}])}const l=s.computed(()=>o.columns[n.colIndex].align||"center"),u=s.computed(()=>o.columns[n.colIndex].width||"40ch");let d="";const f=()=>{r.value&&(d=r.value.innerText)},p=()=>{r.value&&r.value.innerHTML!==d&&(d=r.value.innerText,r.value.dispatchEvent(new Event("change")),a.value=!0,o.columns[n.colIndex].format||o.setCellData(n.rowIndex,n.colIndex,d))},h=(y,w)=>w&&y===0&&w>0?`${w}ch`:"inherit",g={textAlign:l.value,width:u.value,backgroundColor:a.value?"var(--cell-modified-color)":"inherit",fontWeight:a.value?"bold":"inherit",paddingLeft:h(n.colIndex,(t=o.display[n.rowIndex])==null?void 0:t.indent)};return(y,w)=>(s.openBlock(),s.createElementBlock("td",{ref_key:"cell",ref:r,"data-colindex":e.colIndex,"data-rowindex":e.rowIndex,"data-editable":s.unref(o).columns[e.colIndex].edit,contenteditable:s.unref(o).columns[e.colIndex].edit,tabindex:e.tabIndex,spellcheck:!1,style:g,onFocus:f,onPaste:p,onBlur:p,onInput:p,onClick:c,onMousedown:c},[s.unref(o).columns[e.colIndex].cellComponent?(s.openBlock(),s.createBlock(s.resolveDynamicComponent(s.unref(o).columns[e.colIndex].cellComponent),s.mergeProps({key:0,value:s.unref(i)},s.unref(o).columns[e.colIndex].cellComponentProps),null,16,["value"])):(s.openBlock(),s.createElementBlock("span",$i,s.toDisplayString(s.unref(i)),1))],40,xi))}}),$e=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},Ri=$e(Ci,[["__scopeId","data-v-1738c6fc"]]),Ti=["tabindex"],Ai={key:0,tabIndex:-1,class:"list-index"},Di=$e(s.defineComponent({__name:"ARow",props:{row:null,rowIndex:null,tableid:null,tabIndex:{default:-1},addNavigation:null},setup(e){const t=e;s.useCssVars(l=>({"6b10edcf":s.unref(r)}));const n=s.inject(t.tableid),o=s.ref(null),r=n.numberedRowWidth.value,a=()=>n.config.view!=="tree"?"":n.display[t.rowIndex].isRoot||n.display[t.rowIndex].isParent?n.display[t.rowIndex].childrenOpen?"-":"+":"",i=()=>n.config.view!=="tree"||n.display[t.rowIndex].isRoot||n.display[t.rowIndex].open,c=l=>{n.toggleRowExpand(l)};return t.addNavigation&&xo([{selectors:o,handlers:t.addNavigation}]),(l,u)=>s.withDirectives((s.openBlock(),s.createElementBlock("tr",{ref_key:"rowEl",ref:o,tabindex:e.tabIndex,class:"table-row"},[s.unref(n).config.view==="list"?(s.openBlock(),s.createElementBlock("td",Ai,s.toDisplayString(e.rowIndex+1),1)):s.unref(n).config.view==="tree"?(s.openBlock(),s.createElementBlock("td",{key:1,tabIndex:-1,class:"tree-index",onClick:u[0]||(u[0]=d=>c(e.rowIndex))},s.toDisplayString(a()),1)):s.renderSlot(l.$slots,"indexCell",{key:2},void 0,!0),s.renderSlot(l.$slots,"default",{},void 0,!0)],8,Ti)),[[s.vShow,i()]])}}),[["__scopeId","data-v-c758303d"]]);let Fe;const Vi=new Uint8Array(16);function Bi(){if(!Fe&&(Fe=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Fe))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Fe(Vi)}const L=[];for(let e=0;e<256;++e)L.push((e+256).toString(16).slice(1));function Li(e,t=0){return(L[e[t+0]]+L[e[t+1]]+L[e[t+2]]+L[e[t+3]]+"-"+L[e[t+4]]+L[e[t+5]]+"-"+L[e[t+6]]+L[e[t+7]]+"-"+L[e[t+8]]+L[e[t+9]]+"-"+L[e[t+10]]+L[e[t+11]]+L[e[t+12]]+L[e[t+13]]+L[e[t+14]]+L[e[t+15]]).toLowerCase()}const Mi=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),$o={randomUUID:Mi};function Co(e,t,n){if($o.randomUUID&&!t&&!e)return $o.randomUUID();e=e||{};const o=e.random||(e.rng||Bi)();if(o[6]=o[6]&15|64,o[8]=o[8]&63|128,t){n=n||0;for(let r=0;r<16;++r)t[n+r]=o[r];return t}return Li(o)}class ji{constructor(t,n,o,r,a,i){this.id=t||Co(),this.rows=o,this.columns=s.reactive(n),this.config=s.reactive(r),this.table=a||s.reactive(this.createTableObject()),this.display=this.createDisplayObject(i),this.modal=s.reactive({visible:!1})}createTableObject(){const t={};for(const[n,o]of this.columns.entries())for(const[r,a]of this.rows.entries())t[`${n}:${r}`]=a[o.name];return t}createDisplayObject(t){const n=[Object.assign({},{modified:!1})];if(t&&"0:0"in t)return t;const o=new Set;for(let r=this.rows.length-1;r>=0;r--){const a=this.rows[r];a.parent&&o.add(a.parent),n[r]={childrenOpen:!1,expanded:!1,indent:a.indent||null,isParent:o.has(r),isRoot:a.parent===null||a.parent===void 0,modified:!1,open:a.parent===null||a.parent===void 0,parent:a.parent}}return s.reactive(n)}get zeroColumn(){return["list","tree","list-expansion"].includes(this.config.view)}get numberedRowWidth(){return s.computed(()=>String(Math.ceil(this.rows.length/100)+1)+"ch")}cellData(t,n){return this.table[`${t}:${n}`]}setCellData(t,n,o){this.table[`${n}:${t}`]!==o&&(this.display[t].modified=!0),this.table[`${n}:${t}`]=o;const r=this.columns[n];return this.rows[t][r.name]=o,this.table[`${n}:${t}`]}toggleRowExpand(t){if(this.config.view==="tree"){this.display[t].childrenOpen=!this.display[t].childrenOpen;for(let n=this.rows.length-1;n>=0;n--)this.display[n].parent===t&&(this.display[n].open=!this.display[n].open,this.display[n].childrenOpen&&this.toggleRowExpand(n))}else this.config.view==="list-expansion"&&(this.display[t].expanded=!this.display[t].expanded)}}const Ui={key:0},Hi={class:"atable-header-row",tabindex:"-1"},Fi={key:0,id:"header-index"},Wi=$e(s.defineComponent({__name:"ATableHeader",props:{columns:null,config:null,tableid:null},setup(e){const t=e;s.useCssVars(a=>({"1cb0fcc9":s.unref(o)}));const n=s.inject(t.tableid),o=n.numberedRowWidth.value,r=a=>({minWidth:a.width||"40ch",textAlign:a.align||"center",width:n.config.fullWidth?"auto":null});return(a,i)=>e.columns.length?(s.openBlock(),s.createElementBlock("thead",Ui,[s.createElementVNode("tr",Hi,[s.unref(n).zeroColumn?(s.openBlock(),s.createElementBlock("th",Fi)):s.createCommentVNode("",!0),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(e.columns,(c,l)=>(s.openBlock(),s.createElementBlock("th",{key:l,tabindex:"-1",style:s.normalizeStyle(r(c))},[s.renderSlot(a.$slots,"default",{},()=>[s.createTextVNode(s.toDisplayString(c.label||String.fromCharCode(l+97).toUpperCase()),1)],!0)],4))),128))])])):s.createCommentVNode("",!0)}}),[["__scopeId","data-v-8a8d9cee"]]),zi=$e(s.defineComponent({__name:"ATableModal",props:{colIndex:null,rowIndex:null,tableid:null},setup(e){s.inject(e.tableid);const t=n=>{n.stopPropagation()};return(n,o)=>(s.openBlock(),s.createElementBlock("div",{ref:"amodal",class:"amodal",tabindex:"-1",onClick:t,onInput:t},[s.renderSlot(n.$slots,"default",{},void 0,!0)],544))}}),[["__scopeId","data-v-8ac70767"]]),Gi=$e(s.defineComponent({__name:"ATable",props:{id:null,modelValue:null,columns:null,rows:{default:()=>[]},config:{default:()=>new Object},tableid:null},emits:["update:modelValue"],setup(e,{emit:t}){const n=e;let o=n.modelValue?n.modelValue:n.rows,r=new ji(n.id,n.columns,o,n.config);s.provide(r.id,r),s.watch(()=>r.rows,(i,c)=>{t("update:modelValue",i)},{deep:!0});const a=i=>{var c;(c=r.modal.parent)!=null&&c.contains(i.target)||r.modal.visible&&(r.modal.visible=!1)};return window.addEventListener("click",a),window.addEventListener("keydown",i=>{if(i.key==="Escape"&&r.modal.visible){r.modal.visible=!1;const c=r.modal.parent;c&&s.nextTick().then(()=>{const l=c.dataset.rowindex,u=c.dataset.colindex,d=document.querySelectorAll(`[data-rowindex='${l}'][data-colindex='${u}']`);d&&d[0].focus()})}}),(i,c)=>(s.openBlock(),s.createElementBlock("table",{class:"atable",style:s.normalizeStyle({width:s.unref(r).config.fullWidth?"100%":"auto"})},[s.renderSlot(i.$slots,"header",{data:s.unref(r)},()=>[s.createVNode(Wi,{columns:s.unref(r).columns,config:s.unref(r).config,tableid:s.unref(r).id},null,8,["columns","config","tableid"])],!0),s.createElementVNode("tbody",null,[s.renderSlot(i.$slots,"body",{data:s.unref(r)},()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(r).rows,(l,u)=>(s.openBlock(),s.createBlock(Di,{key:l.id||s.unref(Co)(),row:l,rowIndex:u,tableid:s.unref(r).id},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(r).columns,(d,f)=>(s.openBlock(),s.createBlock(Ri,{key:`${f}:${u}`,tableid:s.unref(r).id,col:d,spellcheck:"false",rowIndex:u,colIndex:f+(s.unref(r).zeroColumn?0:-1),component:d.cellComponent,style:s.normalizeStyle({textAlign:(d==null?void 0:d.align)||"center",minWidth:(d==null?void 0:d.width)||"40ch",width:s.unref(r).config.fullWidth?"auto":null})},null,8,["tableid","col","rowIndex","colIndex","component","style"]))),128))]),_:2},1032,["row","rowIndex","tableid"]))),128))],!0)]),s.renderSlot(i.$slots,"footer",{data:s.unref(r)},void 0,!0),s.renderSlot(i.$slots,"modal",{data:s.unref(r)},()=>[s.withDirectives(s.createVNode(zi,{colIndex:s.unref(r).modal.colIndex,rowIndex:s.unref(r).modal.rowIndex,tableid:s.unref(r).id,style:s.normalizeStyle({left:s.unref(r).modal.left+"px",top:s.unref(r).modal.top+"px",maxWidth:s.unref(r).modal.width+"px"})},{default:s.withCtx(()=>[(s.openBlock(),s.createBlock(s.resolveDynamicComponent(s.unref(r).modal.component),s.mergeProps({key:`${s.unref(r).modal.rowIndex}:${s.unref(r).modal.colIndex}`,colIndex:s.unref(r).modal.colIndex,rowIndex:s.unref(r).modal.rowIndex,tableid:s.unref(r).id},s.unref(r).modal.componentProps),null,16,["colIndex","rowIndex","tableid"]))]),_:1},8,["colIndex","rowIndex","tableid","style"]),[[s.vShow,s.unref(r).modal.visible]])],!0)],4))}}),[["__scopeId","data-v-9137b4c3"]]),Ro=s.defineComponent({__name:"Records",setup(e){const{stonecrop:t,isReady:n}=rn(),o={view:"list"};return(r,a)=>s.unref(n)?(s.openBlock(),s.createBlock(s.unref(Gi),{key:0,columns:s.unref(t).schema.schema.toArray(),rows:s.unref(t).store.records,config:o},null,8,["columns","rows"])):s.createCommentVNode("",!0)}}),To=e=>(s.pushScopeId("data-v-18bfde6e"),e=e(),s.popScopeId(),e),Qi={class:"tabs"},Ki=["onKeydown"],qi={tabindex:"0"},Ji=["onKeydown"],Yi={version:"1.1",id:"Capa_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 424.098 424.098",style:{"enable-background":"new 0 0 424.098 424.098"},"xml:space":"preserve"},Xi=[To(()=>s.createElementVNode("g",null,[s.createElementVNode("path",{style:{fill:"#010002"},d:`M351.191,401.923H72.901c-4.487,0-8.129-3.633-8.129-8.129V242.262l-56.664-0.114 + when navigating to "${m.fullPath}". A redirect must contain a name or path. This will break in production.`),new Error("Invalid redirect");return $({query:m.query,hash:m.hash,params:"path"in E?{}:m.params},E)}}function S(m,b){const _=u=O(m),E=l.value,C=m.state,V=m.force,P=m.replace===!0,N=Q(_);if(N)return S($(I(N),{state:typeof N=="object"?$({},C,N.state):C,force:V,replace:P}),b||_);const A=_;A.redirectedFrom=b;let fe;return!V&&cn(o,E,_)&&(fe=ye(16,{to:A,from:E}),Do(E,E,!0,!1)),(fe?Promise.resolve(fe):k(A,E)).catch(H=>ee(H)?ee(H,2)?H:Nt(H):U(H,A,E)).then(H=>{if(H){if(ee(H,2))return process.env.NODE_ENV!=="production"&&cn(o,O(H.to),A)&&b&&(b._count=b._count?b._count+1:1)>10?(x(`Detected an infinite redirection in a navigation guard when going from "${E.fullPath}" to "${A.fullPath}". Aborting to avoid a Stack Overflow. This will break in production if not fixed.`),Promise.reject(new Error("Infinite redirect in navigation guard"))):S($({replace:P},I(H.to),{state:typeof H.to=="object"?$({},C,H.to.state):C,force:V}),b||A)}else H=R(A,E,!0,P,C);return v(A,E,H),H})}function J(m,b){const _=T(m,b);return _?Promise.reject(_):Promise.resolve()}function k(m,b){let _;const[E,C,V]=ca(m,b);_=ut(E.reverse(),"beforeRouteLeave",m,b);for(const N of E)N.leaveGuards.forEach(A=>{_.push(ae(A,m,b))});const P=J.bind(null,m,b);return _.push(P),_e(_).then(()=>{_=[];for(const N of a.list())_.push(ae(N,m,b));return _.push(P),_e(_)}).then(()=>{_=ut(C,"beforeRouteUpdate",m,b);for(const N of C)N.updateGuards.forEach(A=>{_.push(ae(A,m,b))});return _.push(P),_e(_)}).then(()=>{_=[];for(const N of m.matched)if(N.beforeEnter&&!b.matched.includes(N))if(F(N.beforeEnter))for(const A of N.beforeEnter)_.push(ae(A,m,b));else _.push(ae(N.beforeEnter,m,b));return _.push(P),_e(_)}).then(()=>(m.matched.forEach(N=>N.enterCallbacks={}),_=ut(V,"beforeRouteEnter",m,b),_.push(P),_e(_))).then(()=>{_=[];for(const N of i.list())_.push(ae(N,m,b));return _.push(P),_e(_)}).catch(N=>ee(N,8)?N:Promise.reject(N))}function v(m,b,_){for(const E of c.list())E(m,b,_)}function R(m,b,_,E,C){const V=T(m,b);if(V)return V;const P=b===se,N=Z?history.state:{};_&&(E||P?r.replace(m.fullPath,$({scroll:P&&N&&N.scroll},C)):r.push(m.fullPath,C)),l.value=m,Do(m,b,_,P),Nt()}let D;function de(){D||(D=r.listen((m,b,_)=>{const E=O(m),C=Q(E);if(C){S($(C,{replace:!0}),E).catch(Se);return}u=E;const V=l.value;Z&&ns(dn(V.fullPath,_.delta),Le()),k(E,V).catch(P=>ee(P,12)?P:ee(P,2)?(S(P.to,E).then(N=>{ee(N,20)&&!_.delta&&_.type===Oe.pop&&r.go(-1,!1)}).catch(Se),Promise.reject()):(_.delta&&r.go(-_.delta,!1),U(P,E,V))).then(P=>{P=P||R(E,V,!1),P&&(_.delta&&!ee(P,8)?r.go(-_.delta,!1):_.type===Oe.pop&&ee(P,20)&&r.go(-1,!1)),v(E,V,P)}).catch(Se)}))}let Ce=Pe(),Ge=Pe(),Y;function U(m,b,_){Nt(m);const E=Ge.list();return E.length?E.forEach(C=>C(m,b,_)):(process.env.NODE_ENV!=="production"&&x("uncaught error during route navigation:"),console.error(m)),Promise.reject(m)}function sc(){return Y&&l.value!==se?Promise.resolve():new Promise((m,b)=>{Ce.add([m,b])})}function Nt(m){return Y||(Y=!m,de(),Ce.list().forEach(([b,_])=>m?_(m):b()),Ce.reset()),m}function Do(m,b,_,E){const{scrollBehavior:C}=e;if(!Z||!C)return Promise.resolve();const V=!_&&os(dn(m.fullPath,0))||(E||!_)&&history.state&&history.state.scroll||null;return s.nextTick().then(()=>C(m,b,V)).then(P=>P&&ts(P)).catch(P=>U(P,m,b))}const Pt=m=>r.go(m);let xt;const $t=new Set;return{currentRoute:l,listening:!0,addRoute:h,removeRoute:g,hasRoute:w,getRoutes:y,resolve:O,options:e,push:M,replace:z,go:Pt,back:()=>Pt(-1),forward:()=>Pt(1),beforeEach:a.add,beforeResolve:i.add,afterEach:c.add,onError:Ge.add,isReady:sc,install(m){const b=this;m.component("RouterLink",zs),m.component("RouterView",Js),m.config.globalProperties.$router=b,Object.defineProperty(m.config.globalProperties,"$route",{enumerable:!0,get:()=>s.unref(l)}),Z&&!xt&&l.value===se&&(xt=!0,M(r.location).catch(C=>{process.env.NODE_ENV!=="production"&&x("Unexpected error when starting the router:",C)}));const _={};for(const C in se)_[C]=s.computed(()=>l.value[C]);m.provide(ct,b),m.provide(xn,s.reactive(_)),m.provide(lt,l);const E=m.unmount;$t.add(m),m.unmount=function(){$t.delete(m),$t.size<1&&(u=se,D&&D(),D=null,l.value=se,xt=!1,Y=!1),E()},process.env.NODE_ENV!=="production"&&Z&&Zs(m,b,t)}}}function _e(e){return e.reduce((t,n)=>t.then(()=>n()),Promise.resolve())}function ca(e,t){const n=[],o=[],r=[],a=Math.max(t.matched.length,e.matched.length);for(let i=0;ire(u,c))?o.push(c):n.push(c));const l=e.matched[i];l&&(t.matched.find(u=>re(u,l))||r.push(l))}return[n,o,r]}ia({history:is(),routes:[]});function la(e){return e&&typeof e.then=="function"}Promise.resolve(!1),Promise.resolve(!0);var ue=Promise.resolve();function Un(e,t){return e||(e=0),new Promise(function(n){return setTimeout(function(){return n(t)},e)})}function ua(e,t){return Math.floor(Math.random()*(t-e+1)+e)}function ft(){return Math.random().toString(36).substring(2)}var Hn=0,pt=0;function je(){var e=new Date().getTime();return e===Hn?(pt++,e*1e3+pt):(Hn=e,pt=0,e*1e3)}var da=je,fa="native";function pa(e){var t={messagesCallback:null,bc:new BroadcastChannel(e),subFns:[]};return t.bc.onmessage=function(n){t.messagesCallback&&t.messagesCallback(n.data)},t}function ha(e){e.bc.close(),e.subFns=[]}function ma(e,t){try{return e.bc.postMessage(t,!1),ue}catch(n){return Promise.reject(n)}}function ga(e,t){e.messagesCallback=t}function ya(){if(typeof window>"u")return!1;if(typeof BroadcastChannel=="function"){if(BroadcastChannel._pubkey)throw new Error("BroadcastChannel: Do not overwrite window.BroadcastChannel with this module, this is not a polyfill");return!0}else return!1}function _a(){return 150}var wa={create:pa,close:ha,onMessage:ga,postMessage:ma,canBeUsed:ya,type:fa,averageResponseTime:_a,microSeconds:da},Fn=function(){function e(t){this.ttl=t,this.map=new Map,this._to=!1}return e.prototype.has=function(t){return this.map.has(t)},e.prototype.add=function(t){var n=this;this.map.set(t,Gn()),this._to||(this._to=!0,setTimeout(function(){n._to=!1,va(n)},0))},e.prototype.clear=function(){this.map.clear()},e}();function va(e){for(var t=Gn()-e.ttl,n=e.map[Symbol.iterator]();;){var o=n.next().value;if(!o)return;var r=o[0],a=o[1];if(a0&&arguments[0]!==void 0?arguments[0]:{},t=JSON.parse(JSON.stringify(e));return typeof t.webWorkerSupport>"u"&&(t.webWorkerSupport=!0),t.idb||(t.idb={}),t.idb.ttl||(t.idb.ttl=1e3*45),t.idb.fallbackInterval||(t.idb.fallbackInterval=150),e.idb&&typeof e.idb.onclose=="function"&&(t.idb.onclose=e.idb.onclose),t.localstorage||(t.localstorage={}),t.localstorage.removeTimeout||(t.localstorage.removeTimeout=1e3*60),e.methods&&(t.methods=e.methods),t.node||(t.node={}),t.node.ttl||(t.node.ttl=1e3*60*2),t.node.maxParallelWrites||(t.node.maxParallelWrites=2048),typeof t.node.useFastPath>"u"&&(t.node.useFastPath=!0),t}var ba=je,Ea="pubkey.broadcast-channel-0-",te="messages",Ue={durability:"relaxed"},ka="idb";function Wn(){if(typeof indexedDB<"u")return indexedDB;if(typeof window<"u"){if(typeof window.mozIndexedDB<"u")return window.mozIndexedDB;if(typeof window.webkitIndexedDB<"u")return window.webkitIndexedDB;if(typeof window.msIndexedDB<"u")return window.msIndexedDB}return!1}function mt(e){e.commit&&e.commit()}function Sa(e){var t=Wn(),n=Ea+e,o=t.open(n);return o.onupgradeneeded=function(r){var a=r.target.result;a.createObjectStore(te,{keyPath:"id",autoIncrement:!0})},new Promise(function(r,a){o.onerror=function(i){return a(i)},o.onsuccess=function(){r(o.result)}})}function Oa(e,t,n){var o=new Date().getTime(),r={uuid:t,time:o,data:n},a=e.transaction([te],"readwrite",Ue);return new Promise(function(i,c){a.oncomplete=function(){return i()},a.onerror=function(u){return c(u)};var l=a.objectStore(te);l.add(r),mt(a)})}function Ia(e,t){var n=e.transaction(te,"readonly",Ue),o=n.objectStore(te),r=[],a=IDBKeyRange.bound(t+1,1/0);if(o.getAll){var i=o.getAll(a);return new Promise(function(l,u){i.onerror=function(d){return u(d)},i.onsuccess=function(d){l(d.target.result)}})}function c(){try{return a=IDBKeyRange.bound(t+1,1/0),o.openCursor(a)}catch{return o.openCursor()}}return new Promise(function(l,u){var d=c();d.onerror=function(f){return u(f)},d.onsuccess=function(f){var p=f.target.result;p?p.value.ide.lastCursorId&&(e.lastCursorId=o.id),o}).filter(function(o){return Ca(o,e)}).sort(function(o,r){return o.time-r.time});return n.forEach(function(o){e.messagesCallback&&(e.eMIs.add(o.id),e.messagesCallback(o.data))}),ue})}function Ra(e){e.closed=!0,e.db.close()}function Ta(e,t){return e.writeBlockPromise=e.writeBlockPromise.then(function(){return Oa(e.db,e.uuid,t)}).then(function(){ua(0,10)===0&&xa(e)}),e.writeBlockPromise}function Aa(e,t,n){e.messagesCallbackTime=n,e.messagesCallback=t,Qn(e)}function Da(){return!!Wn()}function Va(e){return e.idb.fallbackInterval*2}var Ba={create:$a,close:Ra,onMessage:Aa,postMessage:Ta,canBeUsed:Da,type:ka,averageResponseTime:Va,microSeconds:ba},La=je,Ma="pubkey.broadcastChannel-",ja="localstorage";function Kn(){var e;if(typeof window>"u")return null;try{e=window.localStorage,e=window["ie8-eventlistener/storage"]||window.localStorage}catch{}return e}function qn(e){return Ma+e}function Ua(e,t){return new Promise(function(n){Un().then(function(){var o=qn(e.channelName),r={token:ft(),time:new Date().getTime(),data:t,uuid:e.uuid},a=JSON.stringify(r);Kn().setItem(o,a);var i=document.createEvent("Event");i.initEvent("storage",!0,!0),i.key=o,i.newValue=a,window.dispatchEvent(i),n()})})}function Ha(e,t){var n=qn(e),o=function(a){a.key===n&&t(JSON.parse(a.newValue))};return window.addEventListener("storage",o),o}function Fa(e){window.removeEventListener("storage",e)}function Ga(e,t){if(t=ht(t),!Jn())throw new Error("BroadcastChannel: localstorage cannot be used");var n=ft(),o=new Fn(t.localstorage.removeTimeout),r={channelName:e,uuid:n,eMIs:o};return r.listener=Ha(e,function(a){r.messagesCallback&&a.uuid!==n&&(!a.token||o.has(a.token)||a.data.time&&a.data.time0||e._addEL.internal.length>0}function to(e,t,n){e._addEL[t].push(n),ii(e)}function no(e,t,n){e._addEL[t]=e._addEL[t].filter(function(o){return o!==n}),ci(e)}function ii(e){if(!e._iL&&eo(e)){var t=function(r){e._addEL[r.type].forEach(function(a){var i=1e5,c=a.time-i;r.time>=c&&a.fn(r.data)})},n=e.method.microSeconds();e._prepP?e._prepP.then(function(){e._iL=!0,e.method.onMessage(e._state,t,n)}):(e._iL=!0,e.method.onMessage(e._state,t,n))}}function ci(e){if(e._iL&&!eo(e)){e._iL=!1;var t=e.method.microSeconds();e.method.onMessage(e._state,null,t)}}const oo={"<":"\\u003C",">":"\\u003E","/":"\\u002F","\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t","\0":"\\u0000","\u2028":"\\u2028","\u2029":"\\u2029"};class _t extends Error{constructor(t,n){super(t),this.name="DevalueError",this.path=n.join("")}}function ro(e){return Object(e)!==e}const li=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function ui(e){const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join("\0")===li}function di(e){return Object.prototype.toString.call(e).slice(8,-1)}function we(e){let t='"';for(let n=0;n=55296&&r<=57343){const a=e.charCodeAt(n+1);r<=56319&&a>=56320&&a<=57343?t+=o+e[++n]:t+=`\\u${r.toString(16).toUpperCase()}`}else t+=o}return t+='"',t}const wt=-1,so=-2,ao=-3,io=-4,co=-5,vt=-6;function lo(e,t){return fi(JSON.parse(e),t)}function fi(e,t){if(typeof e=="number")return r(e,!0);if(!Array.isArray(e)||e.length===0)throw new Error("Invalid input");const n=e,o=Array(n.length);function r(a,i=!1){if(a===wt)return;if(a===ao)return NaN;if(a===io)return 1/0;if(a===co)return-1/0;if(a===vt)return-0;if(i)throw new Error("Invalid input");if(a in o)return o[a];const c=n[a];if(!c||typeof c!="object")o[a]=c;else if(Array.isArray(c))if(typeof c[0]=="string"){const l=c[0],u=t==null?void 0:t[l];if(u)return o[a]=u(r(c[1]));switch(l){case"Date":o[a]=new Date(c[1]);break;case"Set":const d=new Set;o[a]=d;for(let h=1;h0&&(f+=","),y in u?(a.push(`[${y}]`),f+=c(u[y]),a.pop()):f+=so;f+="]";break;case"Set":f='["Set"';for(const y of u)f+=`,${c(y)}`;f+="]";break;case"Map":f='["Map"';for(const[y,w]of u)a.push(`.get(${ro(y)?bt(y):"..."})`),f+=`,${c(y)},${c(w)}`;f+="]";break;default:if(!ui(u))throw new _t("Cannot stringify arbitrary non-POJOs",a);if(Object.getOwnPropertySymbols(u).length>0)throw new _t("Cannot stringify POJOs with symbolic keys",a);if(Object.getPrototypeOf(u)===null){f='["null"';for(const y in u)a.push(`.${y}`),f+=`,${we(y)},${c(u[y])}`,a.pop();f+="]"}else{f="{";let y=!1;for(const w in u)y&&(f+=","),y=!0,a.push(`.${w}`),f+=`${we(w)}:${c(u[w])}`,a.pop();f+="}"}}return n[d]=f,d}const l=c(e);return l<0?`${l}`:`[${n.join(",")}]`}function bt(e){const t=typeof e;return t==="string"?we(e):e instanceof String?we(e.toString()):e===void 0?wt.toString():e===0&&1/e<0?vt.toString():t==="bigint"?`["BigInt","${e}"]`:String(e)}function pi(e,t,{initialize:n,type:o}){let r=`${t.$id}-${e.toString()}`,a=new yt(r,{type:o}),i=!1,c=0;s.watch(()=>t[e],d=>{i||(c=Date.now(),a.postMessage({timestamp:c,state:lo(uo(d))})),i=!1},{deep:!0}),a.onmessage=d=>{if(d===void 0){a.postMessage({timestamp:c,state:lo(uo(t[e]))});return}d.timestamp<=c||(i=!0,c=d.timestamp,t[e]=d.state)};let l=()=>a.postMessage(void 0),u=()=>a.close();return n&&l(),{sync:l,unshare:u}}var hi=(e,t)=>Object.keys(t).includes(e),mi=({initialize:e=!0,enable:t=!0,type:n})=>({store:o,options:r})=>{var a,i;let c=((a=r==null?void 0:r.share)==null?void 0:a.enable)??t,l=((i=r==null?void 0:r.share)==null?void 0:i.omit)??[];!c||Object.keys(o.$state).forEach(u=>{var d;l.includes(u)||!hi(u,o.$state)||pi(u,o,{initialize:((d=r==null?void 0:r.share)==null?void 0:d.initialize)??e,type:n})})};Rr().use(mi({enable:!0,initialize:!0}));const fo=s.defineComponent({__name:"Doctype",setup(e){const{stonecrop:t,isReady:n}=rn(),o=s.ref([]);return s.watch(n,()=>{if(n.value){let r=t.value.schema.schema.toArray();r.forEach((a,i)=>{const l=t.value.store.record[a.fieldname];r[i].value=l}),o.value=r}}),(r,a)=>s.unref(n)?(s.openBlock(),s.createBlock(s.unref(nr),{key:0,class:"aform-main",modelValue:o.value,"onUpdate:modelValue":a[0]||(a[0]=i=>o.value=i)},null,8,["modelValue"])):s.createCommentVNode("",!0)}});var po;const ho=typeof window<"u",gi=e=>typeof e=="string",yi=()=>{};ho&&(po=window==null?void 0:window.navigator)!=null&&po.userAgent&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function mo(e){return typeof e=="function"?e():s.unref(e)}function _i(e){return e}function wi(e){return s.getCurrentScope()?(s.onScopeDispose(e),!0):!1}function Et(e){var t;const n=mo(e);return(t=n==null?void 0:n.$el)!=null?t:n}const go=ho?window:void 0;function vi(...e){let t,n,o,r;if(gi(e[0])||Array.isArray(e[0])?([n,o,r]=e,t=go):[t,n,o,r]=e,!t)return yi;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const a=[],i=()=>{a.forEach(d=>d()),a.length=0},c=(d,f,p,h)=>(d.addEventListener(f,p,h),()=>d.removeEventListener(f,p,h)),l=s.watch(()=>[Et(t),mo(r)],([d,f])=>{i(),d&&a.push(...n.flatMap(p=>o.map(h=>c(d,p,h,f))))},{immediate:!0,flush:"post"}),u=()=>{l(),i()};return wi(u),u}const yo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},_o="__vueuse_ssr_handlers__";yo[_o]=yo[_o]||{};function bi(e,{window:t=go,scrollTarget:n}={}){const o=s.ref(!1),r=()=>{if(!t)return;const a=t.document,i=Et(e);if(!i)o.value=!1;else{const c=i.getBoundingClientRect();o.value=c.top<=(t.innerHeight||a.documentElement.clientHeight)&&c.left<=(t.innerWidth||a.documentElement.clientWidth)&&c.bottom>=0&&c.right>=0}};return s.watch(()=>Et(e),()=>r(),{immediate:!0,flush:"post"}),t&&vi(n||t,"scroll",r,{capture:!1,passive:!0}),o}var wo;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(wo||(wo={}));var Ei=Object.defineProperty,vo=Object.getOwnPropertySymbols,ki=Object.prototype.hasOwnProperty,Si=Object.prototype.propertyIsEnumerable,bo=(e,t,n)=>t in e?Ei(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Oi=(e,t)=>{for(var n in t||(t={}))ki.call(t,n)&&bo(e,n,t[n]);if(vo)for(var n of vo(t))Si.call(t,n)&&bo(e,n,t[n]);return e};Oi({linear:_i},{easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]});const ne=e=>{let t=bi(e).value;return t=t&&e.offsetHeight>0,t},oe=e=>e.tabIndex>=0,Eo=e=>{const t=e.target;return kt(t)},kt=e=>{var t;let n;if(e instanceof HTMLTableCellElement){const o=(t=e.parentElement)==null?void 0:t.previousElementSibling;if(o){const r=Array.from(o.children)[e.cellIndex];r&&(n=r)}}else if(e instanceof HTMLTableRowElement){const o=e.previousElementSibling;o&&(n=o)}return n&&(!oe(n)||!ne(n))?kt(n):n},Ii=e=>{var t;const n=e.target;let o;if(n instanceof HTMLTableCellElement){const r=(t=n.parentElement)==null?void 0:t.parentElement;if(r){const a=r.firstElementChild.children[n.cellIndex];a&&(o=a)}}else if(n instanceof HTMLTableRowElement){const r=n.parentElement;if(r){const a=r.firstElementChild;a&&(o=a)}}return o&&(!oe(o)||!ne(o))?St(o):o},ko=e=>{const t=e.target;return St(t)},St=e=>{var t;let n;if(e instanceof HTMLTableCellElement){const o=(t=e.parentElement)==null?void 0:t.nextElementSibling;if(o){const r=Array.from(o.children)[e.cellIndex];r&&(n=r)}}else if(e instanceof HTMLTableRowElement){const o=e.nextElementSibling;o&&(n=o)}return n&&(!oe(n)||!ne(n))?St(n):n},Ni=e=>{var t;const n=e.target;let o;if(n instanceof HTMLTableCellElement){const r=(t=n.parentElement)==null?void 0:t.parentElement;if(r){const a=r.lastElementChild.children[n.cellIndex];a&&(o=a)}}else if(n instanceof HTMLTableRowElement){const r=n.parentElement;if(r){const a=r.lastElementChild;a&&(o=a)}}return o&&(!oe(o)||!ne(o))?kt(o):o},So=e=>{const t=e.target;return Ot(t)},Ot=e=>{var t;let n;if(e.previousElementSibling)n=e.previousElementSibling;else{const o=(t=e.parentElement)==null?void 0:t.previousElementSibling;n=o==null?void 0:o.lastElementChild}return n&&(!oe(n)||!ne(n))?Ot(n):n},Oo=e=>{const t=e.target;return It(t)},It=e=>{var t;let n;if(e.nextElementSibling)n=e.nextElementSibling;else{const o=(t=e.parentElement)==null?void 0:t.nextElementSibling;n=o==null?void 0:o.firstElementChild}return n&&(!oe(n)||!ne(n))?It(n):n},Io=e=>{const t=e.target.parentElement.firstElementChild;return t&&(!oe(t)||!ne(t))?It(t):t},No=e=>{const t=e.target.parentElement.lastElementChild;return t&&(!oe(t)||!ne(t))?Ot(t):t},He=["alt","control","shift","meta"],Pi={ArrowUp:"up",ArrowDown:"down",ArrowLeft:"left",ArrowRight:"right"},Po={"keydown.up":e=>{const t=Eo(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.down":e=>{const t=ko(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.left":e=>{const t=So(e);e.preventDefault(),e.stopPropagation(),t&&t.focus()},"keydown.right":e=>{const t=Oo(e);e.preventDefault(),e.stopPropagation(),t&&t.focus()},"keydown.control.up":e=>{const t=Ii(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.control.down":e=>{const t=Ni(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.control.left":e=>{const t=Io(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.control.right":e=>{const t=No(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.end":e=>{const t=No(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.enter":e=>{if(e.target instanceof HTMLTableCellElement){e.preventDefault(),e.stopPropagation();const t=ko(e);t&&t.focus()}},"keydown.shift.enter":e=>{if(e.target instanceof HTMLTableCellElement){e.preventDefault(),e.stopPropagation();const t=Eo(e);t&&t.focus()}},"keydown.home":e=>{const t=Io(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.tab":e=>{const t=Oo(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())},"keydown.shift.tab":e=>{const t=So(e);t&&(e.preventDefault(),e.stopPropagation(),t.focus())}};function xo(e){const t=o=>{let r=null;o.parent&&(typeof o.parent=="string"?r=document.querySelector(o.parent):o.parent instanceof Element?r=o.parent:r=o.parent.value);let a=[];if(o.selectors)if(typeof o.selectors=="string")a=r?Array.from(r.querySelectorAll(o.selectors)):Array.from(document.querySelectorAll(o.selectors));else if(o.selectors instanceof Element)a.push(o.selectors);else if(Array.isArray(o.selectors.value))for(const i of o.selectors.value)i instanceof Element?a.push(i):a.push(i.$el);else a.push(o.selectors.value);else a=Array.from(r.children).filter(i=>oe(i)&&ne(i));return a},n=o=>r=>{const a=Pi[r.key]||r.key.toLowerCase();if(He.includes(a))return;const i=o.handlers||Po;for(const c of Object.keys(i)){const[l,...u]=c.split(".");if(l==="keydown"&&u.includes(a)){const d=i[c],f=u.filter(h=>He.includes(h)),p=He.some(h=>{const g=h.charAt(0).toUpperCase()+h.slice(1);return r.getModifierState(g)});if(f.length>0){if(p){for(const h of He)if(u.includes(h)){const g=h.charAt(0).toUpperCase()+h.slice(1);r.getModifierState(g)&&d(r)}}}else p||d(r)}}};s.onMounted(()=>{for(const o of e){const r=t(o);for(const a of r)a.addEventListener("keydown",n(o))}}),s.onBeforeUnmount(()=>{for(const o of e){const r=t(o);for(const a of r)a.removeEventListener("keydown",n(o))}})}const xi=["data-colindex","data-rowindex","data-editable","contenteditable","tabindex"],$i={key:1},Ci=s.defineComponent({__name:"ACell",props:{colIndex:null,rowIndex:null,tableid:null,addNavigation:{type:[Boolean,Object],default:!0},tabIndex:{default:0},clickHandler:null},setup(e){var t;const n=e,o=s.inject(n.tableid),r=s.ref(null);let a=s.ref(!1);const i=s.computed(()=>{const y=o.cellData(n.colIndex,n.rowIndex);if(o.columns[n.colIndex].format){const w=o.columns[n.colIndex].format;return typeof w=="function"?w(y):typeof w=="string"?Function(`"use strict";return (${w})`)()(y):y}else return y}),c=y=>{if(n.clickHandler){n.clickHandler(y);return}if(o.columns[n.colIndex].mask,o.columns[n.colIndex].modalComponent){const w=r.value.getBoundingClientRect();o.modal.visible=!0,o.modal.colIndex=n.colIndex,o.modal.rowIndex=n.rowIndex,o.modal.parent=r.value,o.modal.top=w.top+w.height,o.modal.left=w.left,o.modal.width=u.value,o.modal.component=o.columns[n.colIndex].modalComponent,o.modal.componentProps=o.columns[n.colIndex].modalComponentProps}};if(n.addNavigation){let y={...Po,"keydown.f2":c,"keydown.alt.up":c,"keydown.alt.down":c,"keydown.alt.left":c,"keydown.alt.right":c};typeof n.addNavigation=="object"&&(y={...y,...n.addNavigation}),xo([{selectors:r,handlers:y}])}const l=s.computed(()=>o.columns[n.colIndex].align||"center"),u=s.computed(()=>o.columns[n.colIndex].width||"40ch");let d="";const f=()=>{r.value&&(d=r.value.innerText)},p=()=>{r.value&&r.value.innerHTML!==d&&(d=r.value.innerText,r.value.dispatchEvent(new Event("change")),a.value=!0,o.columns[n.colIndex].format||o.setCellData(n.rowIndex,n.colIndex,d))},h=(y,w)=>w&&y===0&&w>0?`${w}ch`:"inherit",g={textAlign:l.value,width:u.value,backgroundColor:a.value?"var(--cell-modified-color)":"inherit",fontWeight:a.value?"bold":"inherit",paddingLeft:h(n.colIndex,(t=o.display[n.rowIndex])==null?void 0:t.indent)};return(y,w)=>(s.openBlock(),s.createElementBlock("td",{ref_key:"cell",ref:r,"data-colindex":e.colIndex,"data-rowindex":e.rowIndex,"data-editable":s.unref(o).columns[e.colIndex].edit,contenteditable:s.unref(o).columns[e.colIndex].edit,tabindex:e.tabIndex,spellcheck:!1,style:g,onFocus:f,onPaste:p,onBlur:p,onInput:p,onClick:c,onMousedown:c},[s.unref(o).columns[e.colIndex].cellComponent?(s.openBlock(),s.createBlock(s.resolveDynamicComponent(s.unref(o).columns[e.colIndex].cellComponent),s.mergeProps({key:0,value:s.unref(i)},s.unref(o).columns[e.colIndex].cellComponentProps),null,16,["value"])):(s.openBlock(),s.createElementBlock("span",$i,s.toDisplayString(s.unref(i)),1))],40,xi))}}),$e=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},Ri=$e(Ci,[["__scopeId","data-v-1738c6fc"]]),Ti=["tabindex"],Ai={key:0,tabIndex:-1,class:"list-index"},Di=$e(s.defineComponent({__name:"ARow",props:{row:null,rowIndex:null,tableid:null,tabIndex:{default:-1},addNavigation:null},setup(e){const t=e;s.useCssVars(l=>({"6b10edcf":s.unref(r)}));const n=s.inject(t.tableid),o=s.ref(null),r=n.numberedRowWidth.value,a=()=>n.config.view!=="tree"?"":n.display[t.rowIndex].isRoot||n.display[t.rowIndex].isParent?n.display[t.rowIndex].childrenOpen?"-":"+":"",i=()=>n.config.view!=="tree"||n.display[t.rowIndex].isRoot||n.display[t.rowIndex].open,c=l=>{n.toggleRowExpand(l)};return t.addNavigation&&xo([{selectors:o,handlers:t.addNavigation}]),(l,u)=>s.withDirectives((s.openBlock(),s.createElementBlock("tr",{ref_key:"rowEl",ref:o,tabindex:e.tabIndex,class:"table-row"},[s.unref(n).config.view==="list"?(s.openBlock(),s.createElementBlock("td",Ai,s.toDisplayString(e.rowIndex+1),1)):s.unref(n).config.view==="tree"?(s.openBlock(),s.createElementBlock("td",{key:1,tabIndex:-1,class:"tree-index",onClick:u[0]||(u[0]=d=>c(e.rowIndex))},s.toDisplayString(a()),1)):s.renderSlot(l.$slots,"indexCell",{key:2},void 0,!0),s.renderSlot(l.$slots,"default",{},void 0,!0)],8,Ti)),[[s.vShow,i()]])}}),[["__scopeId","data-v-c758303d"]]);let Fe;const Vi=new Uint8Array(16);function Bi(){if(!Fe&&(Fe=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Fe))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Fe(Vi)}const L=[];for(let e=0;e<256;++e)L.push((e+256).toString(16).slice(1));function Li(e,t=0){return(L[e[t+0]]+L[e[t+1]]+L[e[t+2]]+L[e[t+3]]+"-"+L[e[t+4]]+L[e[t+5]]+"-"+L[e[t+6]]+L[e[t+7]]+"-"+L[e[t+8]]+L[e[t+9]]+"-"+L[e[t+10]]+L[e[t+11]]+L[e[t+12]]+L[e[t+13]]+L[e[t+14]]+L[e[t+15]]).toLowerCase()}const Mi=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),$o={randomUUID:Mi};function Co(e,t,n){if($o.randomUUID&&!t&&!e)return $o.randomUUID();e=e||{};const o=e.random||(e.rng||Bi)();if(o[6]=o[6]&15|64,o[8]=o[8]&63|128,t){n=n||0;for(let r=0;r<16;++r)t[n+r]=o[r];return t}return Li(o)}class ji{constructor(t,n,o,r,a,i){this.id=t||Co(),this.rows=o,this.columns=s.reactive(n),this.config=s.reactive(r),this.table=a||s.reactive(this.createTableObject()),this.display=this.createDisplayObject(i),this.modal=s.reactive({visible:!1})}createTableObject(){const t={};for(const[n,o]of this.columns.entries())for(const[r,a]of this.rows.entries())t[`${n}:${r}`]=a[o.name];return t}createDisplayObject(t){const n=[Object.assign({},{modified:!1})];if(t&&"0:0"in t)return t;const o=new Set;for(let r=this.rows.length-1;r>=0;r--){const a=this.rows[r];a.parent&&o.add(a.parent),n[r]={childrenOpen:!1,expanded:!1,indent:a.indent||null,isParent:o.has(r),isRoot:a.parent===null||a.parent===void 0,modified:!1,open:a.parent===null||a.parent===void 0,parent:a.parent}}return s.reactive(n)}get zeroColumn(){return["list","tree","list-expansion"].includes(this.config.view)}get numberedRowWidth(){return s.computed(()=>String(Math.ceil(this.rows.length/100)+1)+"ch")}cellData(t,n){return this.table[`${t}:${n}`]}setCellData(t,n,o){this.table[`${n}:${t}`]!==o&&(this.display[t].modified=!0),this.table[`${n}:${t}`]=o;const r=this.columns[n];return this.rows[t][r.name]=o,this.table[`${n}:${t}`]}toggleRowExpand(t){if(this.config.view==="tree"){this.display[t].childrenOpen=!this.display[t].childrenOpen;for(let n=this.rows.length-1;n>=0;n--)this.display[n].parent===t&&(this.display[n].open=!this.display[n].open,this.display[n].childrenOpen&&this.toggleRowExpand(n))}else this.config.view==="list-expansion"&&(this.display[t].expanded=!this.display[t].expanded)}}const Ui={key:0},Hi={class:"atable-header-row",tabindex:"-1"},Fi={key:0,id:"header-index"},Gi=$e(s.defineComponent({__name:"ATableHeader",props:{columns:null,config:null,tableid:null},setup(e){const t=e;s.useCssVars(a=>({"1cb0fcc9":s.unref(o)}));const n=s.inject(t.tableid),o=n.numberedRowWidth.value,r=a=>({minWidth:a.width||"40ch",textAlign:a.align||"center",width:n.config.fullWidth?"auto":null});return(a,i)=>e.columns.length?(s.openBlock(),s.createElementBlock("thead",Ui,[s.createElementVNode("tr",Hi,[s.unref(n).zeroColumn?(s.openBlock(),s.createElementBlock("th",Fi)):s.createCommentVNode("",!0),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(e.columns,(c,l)=>(s.openBlock(),s.createElementBlock("th",{key:l,tabindex:"-1",style:s.normalizeStyle(r(c))},[s.renderSlot(a.$slots,"default",{},()=>[s.createTextVNode(s.toDisplayString(c.label||String.fromCharCode(l+97).toUpperCase()),1)],!0)],4))),128))])])):s.createCommentVNode("",!0)}}),[["__scopeId","data-v-8a8d9cee"]]),Wi=$e(s.defineComponent({__name:"ATableModal",props:{colIndex:null,rowIndex:null,tableid:null},setup(e){s.inject(e.tableid);const t=n=>{n.stopPropagation()};return(n,o)=>(s.openBlock(),s.createElementBlock("div",{ref:"amodal",class:"amodal",tabindex:"-1",onClick:t,onInput:t},[s.renderSlot(n.$slots,"default",{},void 0,!0)],544))}}),[["__scopeId","data-v-8ac70767"]]),zi=$e(s.defineComponent({__name:"ATable",props:{id:null,modelValue:null,columns:null,rows:{default:()=>[]},config:{default:()=>new Object},tableid:null},emits:["update:modelValue"],setup(e,{emit:t}){const n=e;let o=n.modelValue?n.modelValue:n.rows,r=new ji(n.id,n.columns,o,n.config);s.provide(r.id,r),s.watch(()=>r.rows,(i,c)=>{t("update:modelValue",i)},{deep:!0});const a=i=>{var c;(c=r.modal.parent)!=null&&c.contains(i.target)||r.modal.visible&&(r.modal.visible=!1)};return window.addEventListener("click",a),window.addEventListener("keydown",i=>{if(i.key==="Escape"&&r.modal.visible){r.modal.visible=!1;const c=r.modal.parent;c&&s.nextTick().then(()=>{const l=c.dataset.rowindex,u=c.dataset.colindex,d=document.querySelectorAll(`[data-rowindex='${l}'][data-colindex='${u}']`);d&&d[0].focus()})}}),(i,c)=>(s.openBlock(),s.createElementBlock("table",{class:"atable",style:s.normalizeStyle({width:s.unref(r).config.fullWidth?"100%":"auto"})},[s.renderSlot(i.$slots,"header",{data:s.unref(r)},()=>[s.createVNode(Gi,{columns:s.unref(r).columns,config:s.unref(r).config,tableid:s.unref(r).id},null,8,["columns","config","tableid"])],!0),s.createElementVNode("tbody",null,[s.renderSlot(i.$slots,"body",{data:s.unref(r)},()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(r).rows,(l,u)=>(s.openBlock(),s.createBlock(Di,{key:l.id||s.unref(Co)(),row:l,rowIndex:u,tableid:s.unref(r).id},{default:s.withCtx(()=>[(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(s.unref(r).columns,(d,f)=>(s.openBlock(),s.createBlock(Ri,{key:`${f}:${u}`,tableid:s.unref(r).id,col:d,spellcheck:"false",rowIndex:u,colIndex:f+(s.unref(r).zeroColumn?0:-1),component:d.cellComponent,style:s.normalizeStyle({textAlign:(d==null?void 0:d.align)||"center",minWidth:(d==null?void 0:d.width)||"40ch",width:s.unref(r).config.fullWidth?"auto":null})},null,8,["tableid","col","rowIndex","colIndex","component","style"]))),128))]),_:2},1032,["row","rowIndex","tableid"]))),128))],!0)]),s.renderSlot(i.$slots,"footer",{data:s.unref(r)},void 0,!0),s.renderSlot(i.$slots,"modal",{data:s.unref(r)},()=>[s.withDirectives(s.createVNode(Wi,{colIndex:s.unref(r).modal.colIndex,rowIndex:s.unref(r).modal.rowIndex,tableid:s.unref(r).id,style:s.normalizeStyle({left:s.unref(r).modal.left+"px",top:s.unref(r).modal.top+"px",maxWidth:s.unref(r).modal.width+"px"})},{default:s.withCtx(()=>[(s.openBlock(),s.createBlock(s.resolveDynamicComponent(s.unref(r).modal.component),s.mergeProps({key:`${s.unref(r).modal.rowIndex}:${s.unref(r).modal.colIndex}`,colIndex:s.unref(r).modal.colIndex,rowIndex:s.unref(r).modal.rowIndex,tableid:s.unref(r).id},s.unref(r).modal.componentProps),null,16,["colIndex","rowIndex","tableid"]))]),_:1},8,["colIndex","rowIndex","tableid","style"]),[[s.vShow,s.unref(r).modal.visible]])],!0)],4))}}),[["__scopeId","data-v-9137b4c3"]]),Ro=s.defineComponent({__name:"Records",setup(e){const{stonecrop:t,isReady:n}=rn(),o={view:"list"};return(r,a)=>s.unref(n)?(s.openBlock(),s.createBlock(s.unref(zi),{key:0,columns:s.unref(t).schema.schema.toArray(),rows:s.unref(t).store.records,config:o},null,8,["columns","rows"])):s.createCommentVNode("",!0)}}),To=e=>(s.pushScopeId("data-v-18bfde6e"),e=e(),s.popScopeId(),e),Qi={class:"tabs"},Ki=["onKeydown"],qi={tabindex:"0"},Ji=["onKeydown"],Yi={version:"1.1",id:"Capa_1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 424.098 424.098",style:{"enable-background":"new 0 0 424.098 424.098"},"xml:space":"preserve"},Xi=[To(()=>s.createElementVNode("g",null,[s.createElementVNode("path",{style:{fill:"#010002"},d:`M351.191,401.923H72.901c-4.487,0-8.129-3.633-8.129-8.129V242.262l-56.664-0.114 c-3.284-0.008-6.243-1.992-7.495-5.023c-1.252-3.04-0.553-6.527,1.764-8.852L206.104,24.546c1.853-1.845,4.503-2.666,7.047-2.276 c2.414,0.39,4.511,1.845,5.731,3.942l47.43,47.43V58.499c0-4.487,3.633-8.129,8.129-8.129h47.755c4.495,0,8.129,3.642,8.129,8.129 v79.156l91.39,91.398c2.325,2.325,3.024,5.828,1.764,8.868c-1.26,3.032-4.227,5.007-7.511,5.007c-0.008,0-0.008,0-0.016,0 @@ -40,5 +40,5 @@ ${JSON.stringify(E,null,2)} c0-2.162,0.854-4.235,2.39-5.755c1.528-1.52,3.585-2.374,5.739-2.374c0.008,0,0.008,0,0.016,0l45.105,0.089l-79.855-79.863 c-1.528-1.528-2.382-3.593-2.382-5.747V66.628h-31.498v26.645c0,3.284-1.975,6.251-5.015,7.511 c-3.032,1.268-6.527,0.569-8.86-1.764l-57.038-57.038l-183.95,183.95l45.203,0.089c4.487,0.008,8.112,3.642,8.112,8.129 - C81.03,234.149,81.03,385.666,81.03,385.666z`})],-1))],Zi=["onKeydown"],ec={tabindex:"0"},tc={style:{width:"11pt"}},nc=[To(()=>s.createElementVNode("g",{transform:"matrix(-0.08088215,0,0,0.08088215,9.8016177,3.1263021e-6)"},[s.createElementVNode("path",{d:"M 93.148438,80.832031 C 109.5,57.742188 104.03125,25.769531 80.941406,9.421875 57.851562,-6.925781 25.878906,-1.460938 9.53125,21.632812 -6.816406,44.722656 -1.351562,76.691406 21.742188,93.039062 38.222656,104.70703 60.011719,105.60547 77.394531,95.339844 l 37.769529,37.542966 c 4.07813,4.29297 10.86328,4.46485 15.15625,0.38672 4.29297,-4.07422 4.46485,-10.85937 0.39063,-15.15234 -0.12891,-0.13672 -0.25391,-0.26172 -0.39063,-0.39063 z m -41.839844,3.5 C 33.0625,84.335938 18.269531,69.554688 18.257812,51.308594 18.253906,33.0625 33.035156,18.269531 51.285156,18.261719 c 18.222656,-0.0078 33.007813,14.75 33.042969,32.972656 0.03125,18.25 -14.742187,33.066406 -32.996094,33.097656 -0.0078,0 -0.01172,0 -0.02344,0 z m 0,0",style:{fill:"#000000","fill-opacity":"1","fill-rule":"nonzero",stroke:"none"},id:"path2"})],-1))],oc=s.defineComponent({__name:"SheetNav",props:{breadcrumbs:null},setup(e){const t=e,n=s.ref([]),o=s.ref(!0),r=s.ref(!1),a=s.ref(""),i=s.ref(null),c=s.computed(()=>o.value?"unrotated":"rotated");s.onMounted(()=>{n.value=t.breadcrumbs||[]});const l=()=>{o.value=!o.value},u=async()=>{r.value=!r.value,await s.nextTick(()=>{i.value.focus()})},d=h=>{h.preventDefault(),h.stopPropagation()},f=async h=>{h.preventDefault(),h.stopPropagation(),await u()},p=()=>{};return(h,g)=>{const y=s.resolveComponent("router-link");return s.openBlock(),s.createElementBlock("footer",null,[s.createElementVNode("ul",Qi,[s.createElementVNode("li",{class:"hidebreadcrumbs",onClick:l,onKeydown:s.withKeys(l,["enter"])},[s.createElementVNode("a",qi,[s.createElementVNode("div",{class:s.normalizeClass(s.unref(c))},"×",2)])],40,Ki),s.createElementVNode("li",{class:"hometab",onClick:p,onKeydown:s.withKeys(p,["enter"]),style:s.normalizeStyle({display:o.value?"block":"none"})},[s.createVNode(y,{to:"/home",tabindex:"0"},{default:s.withCtx(()=>[(s.openBlock(),s.createElementBlock("svg",Yi,Xi))]),_:1})],44,Ji),s.createElementVNode("li",{class:"searchtab",onClick:u,onKeydown:s.withKeys(u,["enter"]),style:s.normalizeStyle({display:o.value?"block":"none"})},[s.createElementVNode("a",ec,[s.createElementVNode("span",{style:s.normalizeStyle({display:r.value?"none":"block"})},[(s.openBlock(),s.createElementBlock("svg",tc,nc))],4),s.withDirectives(s.createElementVNode("input",{"onUpdate:modelValue":g[0]||(g[0]=w=>a.value=w),ref_key:"searchinput",ref:i,style:s.normalizeStyle({display:r.value?"block":"none"}),onClick:g[1]||(g[1]=w=>d(w)),onInput:g[2]||(g[2]=w=>d(w)),onBlur:g[3]||(g[3]=w=>f(w)),onKeydown:g[4]||(g[4]=s.withKeys(w=>f(w),["enter"])),type:"text"},null,36),[[s.vModelText,a.value]])])],44,Zi),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(n.value,(w,O)=>(s.openBlock(),s.createElementBlock("li",{key:O,style:s.normalizeStyle({display:o.value?"block":"none"})},[s.createVNode(y,{tabindex:"0",to:w.to},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(w.title),1)]),_:2},1032,["to"])],4))),128))])])}}}),bc="",Ao=Ge(oc,[["__scopeId","data-v-18bfde6e"]]),rc={install:e=>{e.component("ActionSet",Ct),e.component("CommandPalette",Rt),e.component("Doctype",fo),e.component("Records",Ro),e.component("SheetNav",Ao)}};W.ActionSet=Ct,W.CommandPalette=Rt,W.Doctype=fo,W.Records=Ro,W.SheetNav=Ao,W.StonecropDesktop=rc,Object.defineProperty(W,Symbol.toStringTag,{value:"Module"})}); + C81.03,234.149,81.03,385.666,81.03,385.666z`})],-1))],Zi=["onKeydown"],ec={tabindex:"0"},tc={style:{width:"11pt"}},nc=[To(()=>s.createElementVNode("g",{transform:"matrix(-0.08088215,0,0,0.08088215,9.8016177,3.1263021e-6)"},[s.createElementVNode("path",{d:"M 93.148438,80.832031 C 109.5,57.742188 104.03125,25.769531 80.941406,9.421875 57.851562,-6.925781 25.878906,-1.460938 9.53125,21.632812 -6.816406,44.722656 -1.351562,76.691406 21.742188,93.039062 38.222656,104.70703 60.011719,105.60547 77.394531,95.339844 l 37.769529,37.542966 c 4.07813,4.29297 10.86328,4.46485 15.15625,0.38672 4.29297,-4.07422 4.46485,-10.85937 0.39063,-15.15234 -0.12891,-0.13672 -0.25391,-0.26172 -0.39063,-0.39063 z m -41.839844,3.5 C 33.0625,84.335938 18.269531,69.554688 18.257812,51.308594 18.253906,33.0625 33.035156,18.269531 51.285156,18.261719 c 18.222656,-0.0078 33.007813,14.75 33.042969,32.972656 0.03125,18.25 -14.742187,33.066406 -32.996094,33.097656 -0.0078,0 -0.01172,0 -0.02344,0 z m 0,0",style:{fill:"#000000","fill-opacity":"1","fill-rule":"nonzero",stroke:"none"},id:"path2"})],-1))],oc=s.defineComponent({__name:"SheetNav",props:{breadcrumbs:null},setup(e){const t=e,n=s.ref([]),o=s.ref(!0),r=s.ref(!1),a=s.ref(""),i=s.ref(null),c=s.computed(()=>o.value?"unrotated":"rotated");s.onMounted(()=>{n.value=t.breadcrumbs||[]});const l=()=>{o.value=!o.value},u=async()=>{r.value=!r.value,await s.nextTick(()=>{i.value.focus()})},d=h=>{h.preventDefault(),h.stopPropagation()},f=async h=>{h.preventDefault(),h.stopPropagation(),await u()},p=()=>{};return(h,g)=>{const y=s.resolveComponent("router-link");return s.openBlock(),s.createElementBlock("footer",null,[s.createElementVNode("ul",Qi,[s.createElementVNode("li",{class:"hidebreadcrumbs",onClick:l,onKeydown:s.withKeys(l,["enter"])},[s.createElementVNode("a",qi,[s.createElementVNode("div",{class:s.normalizeClass(s.unref(c))},"×",2)])],40,Ki),s.createElementVNode("li",{class:"hometab",onClick:p,onKeydown:s.withKeys(p,["enter"]),style:s.normalizeStyle({display:o.value?"block":"none"})},[s.createVNode(y,{to:"/home",tabindex:"0"},{default:s.withCtx(()=>[(s.openBlock(),s.createElementBlock("svg",Yi,Xi))]),_:1})],44,Ji),s.createElementVNode("li",{class:"searchtab",onClick:u,onKeydown:s.withKeys(u,["enter"]),style:s.normalizeStyle({display:o.value?"block":"none"})},[s.createElementVNode("a",ec,[s.createElementVNode("span",{style:s.normalizeStyle({display:r.value?"none":"block"})},[(s.openBlock(),s.createElementBlock("svg",tc,nc))],4),s.withDirectives(s.createElementVNode("input",{"onUpdate:modelValue":g[0]||(g[0]=w=>a.value=w),ref_key:"searchinput",ref:i,style:s.normalizeStyle({display:r.value?"block":"none"}),onClick:g[1]||(g[1]=w=>d(w)),onInput:g[2]||(g[2]=w=>d(w)),onBlur:g[3]||(g[3]=w=>f(w)),onKeydown:g[4]||(g[4]=s.withKeys(w=>f(w),["enter"])),type:"text"},null,36),[[s.vModelText,a.value]])])],44,Zi),(s.openBlock(!0),s.createElementBlock(s.Fragment,null,s.renderList(n.value,(w,O)=>(s.openBlock(),s.createElementBlock("li",{key:O,style:s.normalizeStyle({display:o.value?"block":"none"})},[s.createVNode(y,{tabindex:"0",to:w.to},{default:s.withCtx(()=>[s.createTextVNode(s.toDisplayString(w.title),1)]),_:2},1032,["to"])],4))),128))])])}}}),bc="",Ao=ze(oc,[["__scopeId","data-v-18bfde6e"]]),rc={install:e=>{e.component("ActionSet",Ct),e.component("CommandPalette",Rt),e.component("Doctype",fo),e.component("Records",Ro),e.component("SheetNav",Ao)}};G.ActionSet=Ct,G.CommandPalette=Rt,G.Doctype=fo,G.Records=Ro,G.SheetNav=Ao,G.StonecropDesktop=rc,Object.defineProperty(G,Symbol.toStringTag,{value:"Module"})}); //# sourceMappingURL=desktop.umd.cjs.map diff --git a/desktop/dist/desktop.umd.cjs.map b/desktop/dist/desktop.umd.cjs.map index 738dec92..9ba9fbff 100644 --- a/desktop/dist/desktop.umd.cjs.map +++ b/desktop/dist/desktop.umd.cjs.map @@ -1 +1 @@ -{"version":3,"file":"desktop.umd.cjs","sources":["../src/components/ActionSet.vue","../src/components/CommandPalette.vue","../../aform/dist/aform.js","../../stonecrop/dist/stonecrop.js","../src/components/Doctype.vue","../../atable/dist/atable.js","../src/components/Records.vue","../src/components/SheetNav.vue","../src/plugins/index.ts"],"sourcesContent":["\n\n\n\n\n","\n\n\n","import { defineComponent as w, computed as x, openBlock as m, createElementBlock as g, createElementVNode as u, withDirectives as k, isRef as P, vModelCheckbox as ve, unref as v, toDisplayString as A, vShow as S, resolveComponent as ye, createBlock as B, withCtx as ge, vModelText as H, onMounted as oe, onBeforeUnmount as he, ref as y, watch as q, getCurrentScope as _e, onScopeDispose as be, nextTick as ke, Fragment as O, renderList as $, withModifiers as we, normalizeClass as ae, pushScopeId as De, popScopeId as Ee, resolveDynamicComponent as xe, mergeProps as Ae, createTextVNode as Ce, createCommentVNode as Me, renderSlot as Te, createVNode as Ie, inject as Se, resolveDirective as Ve } from \"vue\";\nconst Oe = { id: \"checkbox-container\" }, $e = [\"id\", \"readonly\", \"required\"], Le = { id: \"custom-checkbox\" }, Pe = [\"for\"], Be = [\"innerHTML\"], He = /* @__PURE__ */ w({\n __name: \"ACheckbox\",\n props: {\n label: null,\n value: null,\n required: { type: Boolean },\n readOnly: { type: Boolean },\n uuid: null,\n validation: { default: () => ({ errorMessage: \" \" }) }\n },\n emits: [\"update:value\"],\n setup(e, { emit: t }) {\n const l = e, n = x({\n get() {\n return l.value;\n },\n set(o) {\n t(\"update:value\", o);\n }\n });\n return (o, a) => (m(), g(\"div\", null, [\n u(\"label\", Oe, [\n k(u(\"input\", {\n \"onUpdate:modelValue\": a[0] || (a[0] = (s) => P(n) ? n.value = s : null),\n type: \"checkbox\",\n id: e.uuid,\n class: \"checkbox\",\n readonly: e.readOnly,\n required: e.required\n }, null, 8, $e), [\n [ve, v(n)]\n ]),\n u(\"span\", Le, A(v(n)), 1)\n ]),\n u(\"label\", {\n for: e.uuid,\n id: \"checkbox-label\"\n }, A(e.label), 9, Pe),\n k(u(\"p\", {\n innerHTML: e.validation.errorMessage\n }, null, 8, Be), [\n [S, e.validation.errorMessage]\n ])\n ]));\n }\n});\nconst C = (e, t) => {\n const l = e.__vccOpts || e;\n for (const [n, o] of t)\n l[n] = o;\n return l;\n}, qe = /* @__PURE__ */ C(He, [[\"__scopeId\", \"data-v-743cd4db\"]]), Fe = /* @__PURE__ */ u(\"div\", null, [\n /* @__PURE__ */ u(\"input\", { type: \"text\" }),\n /* @__PURE__ */ u(\"input\", { type: \"text\" }),\n /* @__PURE__ */ u(\"input\", { type: \"text\" })\n], -1), Ue = /* @__PURE__ */ w({\n __name: \"AComboBox\",\n props: [\"event\", \"cellData\", \"tableID\"],\n setup(e) {\n return (t, l) => {\n const n = ye(\"ATableModal\");\n return m(), B(n, {\n event: e.event,\n cellData: e.cellData,\n class: \"amodal\"\n }, {\n default: ge(() => [\n Fe\n ]),\n _: 1\n }, 8, [\"event\", \"cellData\"]);\n };\n }\n}), Ne = [\"id\", \"disabled\", \"required\"], Re = [\"for\"], Qe = [\"innerHTML\"], Ye = /* @__PURE__ */ w({\n __name: \"ADate\",\n props: {\n label: null,\n modelValue: null,\n required: { type: Boolean },\n readonly: { type: Boolean },\n uuid: null,\n validation: { default: () => ({ errorMessage: \" \" }) }\n },\n emits: [\"update:modelValue\"],\n setup(e, { emit: t }) {\n const l = e, n = x({\n get: () => l.modelValue,\n set: (o) => {\n t(\"update:modelValue\", o);\n }\n });\n return (o, a) => (m(), g(\"div\", null, [\n k(u(\"input\", {\n \"onUpdate:modelValue\": a[0] || (a[0] = (s) => P(n) ? n.value = s : null),\n type: \"date\",\n id: e.uuid,\n disabled: e.readonly,\n required: e.required\n }, null, 8, Ne), [\n [H, v(n)]\n ]),\n u(\"label\", { for: e.uuid }, A(e.label), 9, Re),\n k(u(\"p\", {\n innerHTML: e.validation.errorMessage\n }, null, 8, Qe), [\n [S, e.validation.errorMessage]\n ])\n ]));\n }\n});\nconst je = /* @__PURE__ */ C(Ye, [[\"__scopeId\", \"data-v-5ae6697e\"]]);\nvar Y;\nconst se = typeof window < \"u\", We = (e) => typeof e == \"string\", Ge = () => {\n};\nse && (Y = window == null ? void 0 : window.navigator) != null && Y.userAgent && /iP(ad|hone|od)/.test(window.navigator.userAgent);\nfunction re(e) {\n return typeof e == \"function\" ? e() : v(e);\n}\nfunction ze(e) {\n return e;\n}\nfunction Je(e) {\n return _e() ? (be(e), !0) : !1;\n}\nfunction L(e) {\n var t;\n const l = re(e);\n return (t = l == null ? void 0 : l.$el) != null ? t : l;\n}\nconst ue = se ? window : void 0;\nfunction Ke(...e) {\n let t, l, n, o;\n if (We(e[0]) || Array.isArray(e[0]) ? ([l, n, o] = e, t = ue) : [t, l, n, o] = e, !t)\n return Ge;\n Array.isArray(l) || (l = [l]), Array.isArray(n) || (n = [n]);\n const a = [], s = () => {\n a.forEach((p) => p()), a.length = 0;\n }, r = (p, b, h, d) => (p.addEventListener(b, h, d), () => p.removeEventListener(b, h, d)), i = q(() => [L(t), re(o)], ([p, b]) => {\n s(), p && a.push(...l.flatMap((h) => n.map((d) => r(p, h, d, b))));\n }, { immediate: !0, flush: \"post\" }), c = () => {\n i(), s();\n };\n return Je(c), c;\n}\nconst j = typeof globalThis < \"u\" ? globalThis : typeof window < \"u\" ? window : typeof global < \"u\" ? global : typeof self < \"u\" ? self : {}, W = \"__vueuse_ssr_handlers__\";\nj[W] = j[W] || {};\nfunction Xe(e, { window: t = ue, scrollTarget: l } = {}) {\n const n = y(!1), o = () => {\n if (!t)\n return;\n const a = t.document, s = L(e);\n if (!s)\n n.value = !1;\n else {\n const r = s.getBoundingClientRect();\n n.value = r.top <= (t.innerHeight || a.documentElement.clientHeight) && r.left <= (t.innerWidth || a.documentElement.clientWidth) && r.bottom >= 0 && r.right >= 0;\n }\n };\n return q(() => L(e), () => o(), { immediate: !0, flush: \"post\" }), t && Ke(l || t, \"scroll\", o, {\n capture: !1,\n passive: !0\n }), n;\n}\nvar G;\n(function(e) {\n e.UP = \"UP\", e.RIGHT = \"RIGHT\", e.DOWN = \"DOWN\", e.LEFT = \"LEFT\", e.NONE = \"NONE\";\n})(G || (G = {}));\nvar Ze = Object.defineProperty, z = Object.getOwnPropertySymbols, et = Object.prototype.hasOwnProperty, tt = Object.prototype.propertyIsEnumerable, J = (e, t, l) => t in e ? Ze(e, t, { enumerable: !0, configurable: !0, writable: !0, value: l }) : e[t] = l, nt = (e, t) => {\n for (var l in t || (t = {}))\n et.call(t, l) && J(e, l, t[l]);\n if (z)\n for (var l of z(t))\n tt.call(t, l) && J(e, l, t[l]);\n return e;\n};\nconst lt = {\n easeInSine: [0.12, 0, 0.39, 0],\n easeOutSine: [0.61, 1, 0.88, 1],\n easeInOutSine: [0.37, 0, 0.63, 1],\n easeInQuad: [0.11, 0, 0.5, 0],\n easeOutQuad: [0.5, 1, 0.89, 1],\n easeInOutQuad: [0.45, 0, 0.55, 1],\n easeInCubic: [0.32, 0, 0.67, 0],\n easeOutCubic: [0.33, 1, 0.68, 1],\n easeInOutCubic: [0.65, 0, 0.35, 1],\n easeInQuart: [0.5, 0, 0.75, 0],\n easeOutQuart: [0.25, 1, 0.5, 1],\n easeInOutQuart: [0.76, 0, 0.24, 1],\n easeInQuint: [0.64, 0, 0.78, 0],\n easeOutQuint: [0.22, 1, 0.36, 1],\n easeInOutQuint: [0.83, 0, 0.17, 1],\n easeInExpo: [0.7, 0, 0.84, 0],\n easeOutExpo: [0.16, 1, 0.3, 1],\n easeInOutExpo: [0.87, 0, 0.13, 1],\n easeInCirc: [0.55, 0, 1, 0.45],\n easeOutCirc: [0, 0.55, 0.45, 1],\n easeInOutCirc: [0.85, 0, 0.15, 1],\n easeInBack: [0.36, 0, 0.66, -0.56],\n easeOutBack: [0.34, 1.56, 0.64, 1],\n easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\nnt({\n linear: ze\n}, lt);\nconst D = (e) => {\n let t = Xe(e).value;\n return t = t && e.offsetHeight > 0, t;\n}, E = (e) => e.tabIndex >= 0, K = (e) => {\n const t = e.target;\n return F(t);\n}, F = (e) => {\n var t;\n let l;\n if (e instanceof HTMLTableCellElement) {\n const n = (t = e.parentElement) == null ? void 0 : t.previousElementSibling;\n if (n) {\n const o = Array.from(n.children)[e.cellIndex];\n o && (l = o);\n }\n } else if (e instanceof HTMLTableRowElement) {\n const n = e.previousElementSibling;\n n && (l = n);\n }\n return l && (!E(l) || !D(l)) ? F(l) : l;\n}, ot = (e) => {\n var t;\n const l = e.target;\n let n;\n if (l instanceof HTMLTableCellElement) {\n const o = (t = l.parentElement) == null ? void 0 : t.parentElement;\n if (o) {\n const a = o.firstElementChild.children[l.cellIndex];\n a && (n = a);\n }\n } else if (l instanceof HTMLTableRowElement) {\n const o = l.parentElement;\n if (o) {\n const a = o.firstElementChild;\n a && (n = a);\n }\n }\n return n && (!E(n) || !D(n)) ? U(n) : n;\n}, X = (e) => {\n const t = e.target;\n return U(t);\n}, U = (e) => {\n var t;\n let l;\n if (e instanceof HTMLTableCellElement) {\n const n = (t = e.parentElement) == null ? void 0 : t.nextElementSibling;\n if (n) {\n const o = Array.from(n.children)[e.cellIndex];\n o && (l = o);\n }\n } else if (e instanceof HTMLTableRowElement) {\n const n = e.nextElementSibling;\n n && (l = n);\n }\n return l && (!E(l) || !D(l)) ? U(l) : l;\n}, at = (e) => {\n var t;\n const l = e.target;\n let n;\n if (l instanceof HTMLTableCellElement) {\n const o = (t = l.parentElement) == null ? void 0 : t.parentElement;\n if (o) {\n const a = o.lastElementChild.children[l.cellIndex];\n a && (n = a);\n }\n } else if (l instanceof HTMLTableRowElement) {\n const o = l.parentElement;\n if (o) {\n const a = o.lastElementChild;\n a && (n = a);\n }\n }\n return n && (!E(n) || !D(n)) ? F(n) : n;\n}, Z = (e) => {\n const t = e.target;\n return N(t);\n}, N = (e) => {\n var t;\n let l;\n if (e.previousElementSibling)\n l = e.previousElementSibling;\n else {\n const n = (t = e.parentElement) == null ? void 0 : t.previousElementSibling;\n l = n == null ? void 0 : n.lastElementChild;\n }\n return l && (!E(l) || !D(l)) ? N(l) : l;\n}, ee = (e) => {\n const t = e.target;\n return R(t);\n}, R = (e) => {\n var t;\n let l;\n if (e.nextElementSibling)\n l = e.nextElementSibling;\n else {\n const n = (t = e.parentElement) == null ? void 0 : t.nextElementSibling;\n l = n == null ? void 0 : n.firstElementChild;\n }\n return l && (!E(l) || !D(l)) ? R(l) : l;\n}, te = (e) => {\n const t = e.target.parentElement.firstElementChild;\n return t && (!E(t) || !D(t)) ? R(t) : t;\n}, ne = (e) => {\n const t = e.target.parentElement.lastElementChild;\n return t && (!E(t) || !D(t)) ? N(t) : t;\n}, V = [\"alt\", \"control\", \"shift\", \"meta\"], st = {\n ArrowUp: \"up\",\n ArrowDown: \"down\",\n ArrowLeft: \"left\",\n ArrowRight: \"right\"\n}, ie = {\n \"keydown.up\": (e) => {\n const t = K(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.down\": (e) => {\n const t = X(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.left\": (e) => {\n const t = Z(e);\n e.preventDefault(), e.stopPropagation(), t && t.focus();\n },\n \"keydown.right\": (e) => {\n const t = ee(e);\n e.preventDefault(), e.stopPropagation(), t && t.focus();\n },\n \"keydown.control.up\": (e) => {\n const t = ot(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.down\": (e) => {\n const t = at(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.left\": (e) => {\n const t = te(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.right\": (e) => {\n const t = ne(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.end\": (e) => {\n const t = ne(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.enter\": (e) => {\n if (e.target instanceof HTMLTableCellElement) {\n e.preventDefault(), e.stopPropagation();\n const t = X(e);\n t && t.focus();\n }\n },\n \"keydown.shift.enter\": (e) => {\n if (e.target instanceof HTMLTableCellElement) {\n e.preventDefault(), e.stopPropagation();\n const t = K(e);\n t && t.focus();\n }\n },\n \"keydown.home\": (e) => {\n const t = te(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.tab\": (e) => {\n const t = ee(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.shift.tab\": (e) => {\n const t = Z(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n }\n};\nfunction rt(e) {\n const t = (n) => {\n let o = null;\n n.parent && (typeof n.parent == \"string\" ? o = document.querySelector(n.parent) : n.parent instanceof Element ? o = n.parent : o = n.parent.value);\n let a = [];\n if (n.selectors)\n if (typeof n.selectors == \"string\")\n a = o ? Array.from(o.querySelectorAll(n.selectors)) : Array.from(document.querySelectorAll(n.selectors));\n else if (n.selectors instanceof Element)\n a.push(n.selectors);\n else if (Array.isArray(n.selectors.value))\n for (const s of n.selectors.value)\n s instanceof Element ? a.push(s) : a.push(s.$el);\n else\n a.push(n.selectors.value);\n else\n a = Array.from(o.children).filter((s) => E(s) && D(s));\n return a;\n }, l = (n) => (o) => {\n const a = st[o.key] || o.key.toLowerCase();\n if (V.includes(a))\n return;\n const s = n.handlers || ie;\n for (const r of Object.keys(s)) {\n const [i, ...c] = r.split(\".\");\n if (i === \"keydown\" && c.includes(a)) {\n const p = s[r], b = c.filter((d) => V.includes(d)), h = V.some((d) => {\n const M = d.charAt(0).toUpperCase() + d.slice(1);\n return o.getModifierState(M);\n });\n if (b.length > 0) {\n if (h) {\n for (const d of V)\n if (c.includes(d)) {\n const M = d.charAt(0).toUpperCase() + d.slice(1);\n o.getModifierState(M) && p(o);\n }\n }\n } else\n h || p(o);\n }\n }\n };\n oe(() => {\n for (const n of e) {\n const o = t(n);\n for (const a of o)\n a.addEventListener(\"keydown\", l(n));\n }\n }), he(() => {\n for (const n of e) {\n const o = t(n);\n for (const a of o)\n a.removeEventListener(\"keydown\", l(n));\n }\n });\n}\nconst ut = (e) => (De(\"data-v-0d8a7adf\"), e = e(), Ee(), e), it = [\"event\"], ct = { colspan: \"5\" }, dt = /* @__PURE__ */ ut(() => /* @__PURE__ */ u(\"tr\", null, [\n /* @__PURE__ */ u(\"td\", null, \"M\"),\n /* @__PURE__ */ u(\"td\", null, \"T\"),\n /* @__PURE__ */ u(\"td\", null, \"W\"),\n /* @__PURE__ */ u(\"td\", null, \"T\"),\n /* @__PURE__ */ u(\"td\", null, \"F\"),\n /* @__PURE__ */ u(\"td\", null, \"S\"),\n /* @__PURE__ */ u(\"td\", null, \"S\")\n], -1)), pt = [\"onClick\"], ft = /* @__PURE__ */ w({\n __name: \"ADatePicker\",\n props: {\n modelValue: null,\n event: null\n },\n emits: [\"modelValue\"],\n setup(e, { emit: t }) {\n const l = e, n = 6, o = 7, a = /* @__PURE__ */ new Date(), s = y(l.modelValue || void 0), r = y(), i = y(), c = y([]);\n oe(async () => {\n let f = /* @__PURE__ */ new Date();\n f ? (s.value = f, r.value = s.value.getMonth(), i.value = s.value.getFullYear()) : (r.value = a.getMonth(), i.value = a.getFullYear()), p(), await ke();\n const I = document.getElementsByClassName(\"selecteddate\");\n if (I.length > 0)\n I[0].focus();\n else {\n const _ = document.getElementsByClassName(\"todaysdate\");\n _.length > 0 && _[0].focus();\n }\n }), q([r, i], () => {\n p();\n });\n const p = () => {\n c.value = [];\n const f = new Date(i.value, r.value, 1), I = f.getDay(), _ = f.setDate(f.getDate() - I);\n for (let T of Array(43).keys())\n c.value.push(_ + T * 864e5);\n }, b = () => {\n i.value -= 1;\n }, h = () => {\n i.value += 1;\n }, d = () => {\n r.value == 0 ? (r.value = 11, b()) : r.value -= 1;\n }, M = () => {\n r.value == 11 ? (r.value = 0, h()) : r.value += 1;\n }, de = (f) => {\n if (r.value === a.getMonth())\n return a.toDateString() === new Date(f).toDateString();\n }, pe = (f) => new Date(f).toDateString() === new Date(s.value).toDateString();\n x({\n get: () => modelValue.value,\n set: (f) => {\n Q(f);\n }\n });\n const Q = (f) => {\n s.value = new Date(c.value[f]), t(\"modelValue\", s.value.getTime());\n }, fe = x(() => new Date(i.value, r.value, 1).toLocaleDateString(void 0, {\n year: \"numeric\",\n month: \"long\"\n }));\n return rt([\n {\n parent: \"table.adate\",\n selectors: \"td\",\n handlers: {\n ...ie,\n \"keydown.pageup\": d,\n \"keydown.shift.pageup\": b,\n \"keydown.pagedown\": M,\n \"keydown.shift.pagedown\": h,\n // 'keydown.tab': selectDate // select this date\n // 'keydown.enter': selectDate // select this date\n \"keydown.shift.tab\": () => {\n },\n // disable - not working\n \"keydown.shift.enter\": () => {\n }\n }\n }\n ]), (f, I) => (m(), g(\"div\", {\n event: e.event,\n class: \"adatepicker\",\n tabindex: \"0\",\n ref: \"adatepicker\"\n }, [\n u(\"table\", null, [\n u(\"tr\", null, [\n u(\"td\", {\n onClick: d,\n tabindex: -1\n }, \"<\"),\n u(\"th\", ct, A(v(fe)), 1),\n u(\"td\", {\n onClick: M,\n tabindex: -1\n }, \">\")\n ]),\n dt,\n (m(), g(O, null, $(n, (_) => u(\"tr\", { key: _ }, [\n (m(), g(O, null, $(o, (T) => u(\"td\", {\n key: (_ - 1) * o + T,\n contenteditable: !1,\n spellcheck: !1,\n tabindex: 0,\n onClick: we((me) => Q(me), [\"prevent\", \"stop\"]),\n class: ae({\n todaysDate: de(c.value[(_ - 1) * o + T]),\n selectedDate: pe(c.value[(_ - 1) * o + T])\n })\n }, A(new Date(c.value[(_ - 1) * o + T]).getDate()), 11, pt)), 64))\n ])), 64))\n ])\n ], 8, it));\n }\n});\nconst mt = /* @__PURE__ */ C(ft, [[\"__scopeId\", \"data-v-0d8a7adf\"]]), vt = /* @__PURE__ */ w({\n __name: \"CollapseButton\",\n props: {\n collapsed: { type: Boolean }\n },\n setup(e) {\n return (t, l) => (m(), g(\"button\", {\n class: ae([\"collapse-button\", e.collapsed ? \"rotated\" : \"unrotated\"])\n }, \"×\", 2));\n }\n});\nconst yt = /* @__PURE__ */ C(vt, [[\"__scopeId\", \"data-v-6f1c1b45\"]]), gt = /* @__PURE__ */ w({\n __name: \"AForm\",\n props: {\n modelValue: null,\n data: null,\n readonly: { type: Boolean }\n },\n emits: [\"update:modelValue\"],\n setup(e, { emit: t }) {\n const l = e, n = y(l.data || {}), o = (s) => {\n let r = {};\n for (const [i, c] of Object.entries(s))\n [\"component\", \"fieldtype\"].includes(i) || (r[i] = c), i === \"rows\" && c && c.length === 0 && (r.rows = n.value[s.fieldname]);\n return r;\n }, a = x({\n get: () => l.modelValue.map((s, r) => x({\n get() {\n return s.value;\n },\n set: (i) => {\n l.modelValue[r].value = i, t(\"update:modelValue\", l.modelValue);\n }\n })),\n set: () => {\n }\n });\n return (s, r) => (m(), g(\"form\", null, [\n (m(!0), g(O, null, $(e.modelValue, (i, c) => (m(), B(xe(i.component), Ae({\n key: c,\n schema: i,\n modelValue: v(a)[c].value,\n \"onUpdate:modelValue\": (p) => v(a)[c].value = p,\n data: n.value[i.fieldname],\n readonly: e.readonly\n }, o(i)), null, 16, [\"schema\", \"modelValue\", \"onUpdate:modelValue\", \"data\", \"readonly\"]))), 128))\n ]));\n }\n});\nconst ce = /* @__PURE__ */ C(gt, [[\"__scopeId\", \"data-v-74d66cf2\"]]), ht = /* @__PURE__ */ w({\n __name: \"AFieldset\",\n props: {\n schema: null,\n label: null,\n collapsible: { type: Boolean },\n data: null\n },\n setup(e) {\n const t = e, l = y(t.data || []);\n let n = y(!1), o = y(t.collapsible);\n const a = y(t.schema);\n function s(r) {\n r.preventDefault(), o.value && (n.value = !n.value);\n }\n return (r, i) => (m(), g(\"fieldset\", null, [\n u(\"legend\", {\n onClick: s,\n onSubmit: s\n }, [\n Ce(A(e.label) + \" \", 1),\n v(o) ? (m(), B(yt, {\n key: 0,\n collapsed: v(n)\n }, null, 8, [\"collapsed\"])) : Me(\"\", !0)\n ], 32),\n Te(r.$slots, \"default\", { collapsed: v(n) }, () => [\n k(Ie(ce, {\n modelValue: a.value,\n \"onUpdate:modelValue\": i[0] || (i[0] = (c) => a.value = c),\n data: l.value\n }, null, 8, [\"modelValue\", \"data\"]), [\n [S, !v(n)]\n ])\n ], !0)\n ]));\n }\n});\nconst _t = /* @__PURE__ */ C(ht, [[\"__scopeId\", \"data-v-cad9b578\"]]), bt = [\"id\", \"disabled\", \"required\"], kt = [\"for\"], wt = [\"innerHTML\"], Dt = /* @__PURE__ */ w({\n __name: \"ANumericInput\",\n props: {\n label: null,\n modelValue: null,\n required: { type: Boolean },\n readonly: { type: Boolean },\n uuid: null,\n validation: { default: () => ({ errorMessage: \" \" }) }\n },\n emits: [\"update:modelValue\"],\n setup(e, { emit: t }) {\n const l = e, n = x({\n get: () => l.modelValue,\n set: (o) => {\n t(\"update:modelValue\", o);\n }\n });\n return (o, a) => (m(), g(\"div\", null, [\n k(u(\"input\", {\n \"onUpdate:modelValue\": a[0] || (a[0] = (s) => P(n) ? n.value = s : null),\n type: \"number\",\n id: e.uuid,\n disabled: e.readonly,\n required: e.required\n }, null, 8, bt), [\n [H, v(n)]\n ]),\n u(\"label\", { for: e.uuid }, A(e.label), 9, kt),\n k(u(\"p\", {\n innerHTML: e.validation.errorMessage\n }, null, 8, wt), [\n [S, e.validation.errorMessage]\n ])\n ]));\n }\n});\nconst Et = /* @__PURE__ */ C(Dt, [[\"__scopeId\", \"data-v-be33e6c4\"]]), le = {\n date: \"##/##/####\",\n datetime: \"####/##/## ##:##\",\n time: \"##:##\",\n fulltime: \"##:##:##\",\n phone: \"(###) ### - ####\",\n card: \"#### #### #### ####\"\n};\nfunction xt(e) {\n try {\n return Function(`\"use strict\";return (${e})`)();\n } catch {\n }\n}\nfunction At(e) {\n var l;\n let t = e.value;\n if (t) {\n const n = xt(t);\n if (n) {\n const o = e.instance.locale;\n t = n(o);\n }\n } else {\n const o = (l = e.instance.schema.fieldtype) == null ? void 0 : l.toLowerCase();\n o && le[o] && (t = le[o]);\n }\n return t;\n}\nfunction Ct(e, t) {\n t || (t = \"#\");\n let l = e;\n const n = [t, \"/\", \"-\", \"(\", \")\", \" \"];\n for (const o of n)\n l = l.replaceAll(o, \"\");\n return l;\n}\nfunction Mt(e, t, l) {\n l || (l = \"#\");\n let n = t;\n for (const o of e) {\n const a = n.indexOf(l);\n if (a !== -1) {\n const s = n.substring(0, a), r = n.substring(a + 1);\n n = s + o + r;\n }\n }\n return n.slice(0, t.length);\n}\nfunction Tt(e, t) {\n const l = At(t);\n if (!l)\n return;\n const n = \"#\", o = e.value, a = Ct(o, n);\n if (a) {\n const s = Mt(a, l, n);\n t.instance.maskFilled && (t.instance.maskFilled = !s.includes(n)), e.value = s;\n } else\n e.value = l;\n}\nconst It = w({\n name: \"ATextInput\",\n props: {\n schema: {\n type: Object,\n required: !0\n },\n label: {\n type: String,\n required: !0\n },\n modelValue: {\n type: null\n },\n mask: {\n type: String\n },\n required: {\n type: Boolean\n },\n readonly: {\n type: Boolean\n },\n uuid: {\n type: String\n },\n validation: {\n type: Object,\n default: () => ({ errorMessage: \" \" })\n }\n },\n setup(e, t) {\n const l = y(!1), n = Se(\"locale\", \"\");\n return { inputText: x({\n get() {\n return e.modelValue;\n },\n set(a) {\n t.emit(\"update:modelValue\", a);\n }\n }), locale: n, maskFilled: l };\n },\n directives: {\n mask: Tt\n }\n});\nconst St = [\"id\", \"disabled\", \"maxlength\", \"required\"], Vt = [\"for\"], Ot = [\"innerHTML\"];\nfunction $t(e, t, l, n, o, a) {\n const s = Ve(\"mask\");\n return m(), g(\"div\", null, [\n k(u(\"input\", {\n \"onUpdate:modelValue\": t[0] || (t[0] = (r) => e.inputText = r),\n id: e.uuid,\n disabled: e.readonly,\n maxlength: e.mask ? e.maskFilled && e.mask.length : void 0,\n required: e.required\n }, null, 8, St), [\n [H, e.inputText],\n [s, e.mask]\n ]),\n u(\"label\", { for: e.uuid }, A(e.label), 9, Vt),\n k(u(\"p\", {\n innerHTML: e.validation.errorMessage\n }, null, 8, Ot), [\n [S, e.validation.errorMessage]\n ])\n ]);\n}\nconst Lt = /* @__PURE__ */ C(It, [[\"render\", $t], [\"__scopeId\", \"data-v-76dba9b8\"]]);\nfunction Bt(e) {\n e.component(\"ACheckbox\", qe), e.component(\"ACombobox\", Ue), e.component(\"ADate\", je), e.component(\"ADatePicker\", mt), e.component(\"AFieldset\", _t), e.component(\"AForm\", ce), e.component(\"ANumericInput\", Et), e.component(\"ATextInput\", Lt);\n}\nexport {\n qe as ACheckbox,\n Ue as AComboBox,\n je as ADate,\n mt as ADatePicker,\n _t as AFieldset,\n ce as AForm,\n Et as ANumericInput,\n Lt as ATextInput,\n Bt as install\n};\n//# sourceMappingURL=aform.js.map\n","import { effectScope, ref, markRaw, toRaw, getCurrentInstance, inject, watch, unref, reactive, isRef, isReactive, toRef, nextTick, computed, getCurrentScope, onScopeDispose, toRefs, onBeforeMount, shallowRef, defineComponent, h as h$1, provide, watchEffect } from \"vue\";\nclass Stonecrop {\n /**\n * @constructor\n * @param {Registry} registry - The immutable registry\n * @param {ReturnType} store - The mutable Pinia store\n * @param {Schema} [schema] - (optional) The Stonecrop schema\n * @param {ImmutableDoctype['workflow']} [workflow] - (optional) The Stonecrop workflow\n * @param {ImmutableDoctype['actions']} [actions] - (optional) The Stonecrop actions\n * @returns {Stonecrop} The Stonecrop instance\n */\n constructor(registry, store, schema, workflow, actions) {\n this.name = \"Stonecrop\";\n if (Stonecrop._root) {\n return Stonecrop._root;\n }\n Stonecrop._root = this;\n this.registry = registry;\n this.store = store;\n this.schema = schema;\n this.workflow = workflow;\n this.actions = actions;\n }\n /**\n * @method setup\n * @param {DoctypeMeta} doctype - The doctype to setup\n * @returns {void}\n * @description Sets up the Stonecrop instance with the given doctype\n * @example\n * const doctype = await registry.doctypeLoader('Task')\n * stonecrop.setup(doctype)\n */\n setup(doctype) {\n this.getMeta(doctype);\n this.getWorkflow(doctype);\n this.getActions(doctype);\n }\n /**\n * @method getMeta\n * @param {DoctypeMeta} doctype - The doctype to get meta for\n * @returns {void}\n * @description Gets the meta for the given doctype\n * @example\n * const doctype = await registry.doctypeLoader('Task')\n * stonecrop.getMeta(doctype)\n */\n getMeta(doctype) {\n this.schema = { doctype: doctype.doctype, schema: doctype.schema };\n }\n /**\n * @method getWorkflow\n * @param {DoctypeMeta} doctype - The doctype to get workflow for\n * @returns {void}\n * @description Gets the workflow for the given doctype\n * @example\n * const doctype = await registry.doctypeLoader('Task')\n * stonecrop.getWorkflow(doctype)\n */\n getWorkflow(doctype) {\n const doctypeRegistry = this.registry.registry[doctype.slug];\n this.workflow = doctypeRegistry.workflow;\n }\n /**\n * @method getActions\n * @param {DoctypeMeta} doctype - The doctype to get actions for\n * @returns {void}\n * @description Gets the actions for the given doctype\n * @example\n * const doctype = await registry.doctypeLoader('Task')\n * stonecrop.getActions(doctype)\n */\n getActions(doctype) {\n const doctypeRegistry = this.registry.registry[doctype.slug];\n this.actions = doctypeRegistry.actions;\n }\n /**\n * @method getRecords\n * @param {DoctypeMeta} doctype - The doctype to get records for\n * @param {RequestInit} [filters] - The filters to apply to the records\n * @returns {Promise}\n * @description Gets the records for the given doctype\n * @example\n * const doctype = await registry.doctypeLoader('Task')\n * await stonecrop.getRecords(doctype)\n * @example\n * const doctype = await registry.doctypeLoader('Task')\n * const filters = JSON.stringify({ status: 'Open' })\n * await stonecrop.getRecords(doctype, { body: filters })\n */\n async getRecords(doctype, filters) {\n this.store.$patch({ records: [] });\n const records = await fetch(`/${doctype.slug}`, filters);\n const data = await records.json();\n this.store.$patch({ records: data });\n }\n /**\n * @method getRecord\n * @param {DoctypeMeta} doctype - The doctype to get record for\n * @param {string} id - The id of the record to get\n * @returns {Promise}\n * @description Gets the record for the given doctype and id\n * @example\n * const doctype = await registry.doctypeLoader('Task')\n * await stonecrop.getRecord(doctype, 'TASK-00001')\n */\n async getRecord(doctype, id) {\n this.store.$patch({ record: {} });\n const record = await fetch(`/${doctype.slug}/${id}`);\n const data = await record.json();\n this.store.$patch({ record: data });\n }\n /**\n * @method runAction\n * @param {DoctypeMeta} doctype - The doctype to run action for\n * @param {string} action - The action to run\n * @param {string[]} [id] - The id(s) of the record(s) to run action on\n * @returns {void}\n * @description Runs the action for the given doctype and id\n * @example\n * const doctype = await registry.doctypeLoader('Task')\n * stonecrop.runAction(doctype, 'CREATE')\n * @example\n * const doctype = await registry.doctypeLoader('Task')\n * stonecrop.runAction(doctype, 'UPDATE', ['TASK-00001'])\n * @example\n * const doctype = await registry.doctypeLoader('Task')\n * stonecrop.runAction(doctype, 'DELETE', ['TASK-00001'])\n * @example\n * const doctype = await registry.doctypeLoader('Task')\n * stonecrop.runAction(doctype, 'TRANSITION', ['TASK-00001', 'TASK-00002'])\n */\n runAction(doctype, action, id) {\n const doctypeRegistry = this.registry.registry[doctype.slug];\n const actions = doctypeRegistry.actions.get(action);\n const { initialState } = this.workflow;\n this.workflow.transition(initialState, { type: action });\n if (actions.length > 0) {\n actions.forEach((action2) => {\n const actionFn = new Function(action2);\n actionFn(id);\n });\n }\n }\n}\nvar isVue2 = false;\nfunction set(target, key, val) {\n if (Array.isArray(target)) {\n target.length = Math.max(target.length, key);\n target.splice(key, 1, val);\n return val;\n }\n target[key] = val;\n return val;\n}\nfunction del(target, key) {\n if (Array.isArray(target)) {\n target.splice(key, 1);\n return;\n }\n delete target[key];\n}\nfunction getDevtoolsGlobalHook$1() {\n return getTarget$1().__VUE_DEVTOOLS_GLOBAL_HOOK__;\n}\nfunction getTarget$1() {\n return typeof navigator !== \"undefined\" && typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : {};\n}\nconst isProxyAvailable$1 = typeof Proxy === \"function\";\nconst HOOK_SETUP$1 = \"devtools-plugin:setup\";\nconst HOOK_PLUGIN_SETTINGS_SET$1 = \"plugin:settings:set\";\nlet supported$1;\nlet perf$1;\nfunction isPerformanceSupported$1() {\n var _a;\n if (supported$1 !== void 0) {\n return supported$1;\n }\n if (typeof window !== \"undefined\" && window.performance) {\n supported$1 = true;\n perf$1 = window.performance;\n } else if (typeof global !== \"undefined\" && ((_a = global.perf_hooks) === null || _a === void 0 ? void 0 : _a.performance)) {\n supported$1 = true;\n perf$1 = global.perf_hooks.performance;\n } else {\n supported$1 = false;\n }\n return supported$1;\n}\nfunction now$2() {\n return isPerformanceSupported$1() ? perf$1.now() : Date.now();\n}\nlet ApiProxy$1 = class ApiProxy {\n constructor(plugin, hook) {\n this.target = null;\n this.targetQueue = [];\n this.onQueue = [];\n this.plugin = plugin;\n this.hook = hook;\n const defaultSettings = {};\n if (plugin.settings) {\n for (const id in plugin.settings) {\n const item = plugin.settings[id];\n defaultSettings[id] = item.defaultValue;\n }\n }\n const localSettingsSaveId = `__vue-devtools-plugin-settings__${plugin.id}`;\n let currentSettings = Object.assign({}, defaultSettings);\n try {\n const raw = localStorage.getItem(localSettingsSaveId);\n const data = JSON.parse(raw);\n Object.assign(currentSettings, data);\n } catch (e) {\n }\n this.fallbacks = {\n getSettings() {\n return currentSettings;\n },\n setSettings(value) {\n try {\n localStorage.setItem(localSettingsSaveId, JSON.stringify(value));\n } catch (e) {\n }\n currentSettings = value;\n },\n now() {\n return now$2();\n }\n };\n if (hook) {\n hook.on(HOOK_PLUGIN_SETTINGS_SET$1, (pluginId, value) => {\n if (pluginId === this.plugin.id) {\n this.fallbacks.setSettings(value);\n }\n });\n }\n this.proxiedOn = new Proxy({}, {\n get: (_target, prop) => {\n if (this.target) {\n return this.target.on[prop];\n } else {\n return (...args) => {\n this.onQueue.push({\n method: prop,\n args\n });\n };\n }\n }\n });\n this.proxiedTarget = new Proxy({}, {\n get: (_target, prop) => {\n if (this.target) {\n return this.target[prop];\n } else if (prop === \"on\") {\n return this.proxiedOn;\n } else if (Object.keys(this.fallbacks).includes(prop)) {\n return (...args) => {\n this.targetQueue.push({\n method: prop,\n args,\n resolve: () => {\n }\n });\n return this.fallbacks[prop](...args);\n };\n } else {\n return (...args) => {\n return new Promise((resolve) => {\n this.targetQueue.push({\n method: prop,\n args,\n resolve\n });\n });\n };\n }\n }\n });\n }\n async setRealTarget(target) {\n this.target = target;\n for (const item of this.onQueue) {\n this.target.on[item.method](...item.args);\n }\n for (const item of this.targetQueue) {\n item.resolve(await this.target[item.method](...item.args));\n }\n }\n};\nfunction setupDevtoolsPlugin$1(pluginDescriptor, setupFn) {\n const descriptor = pluginDescriptor;\n const target = getTarget$1();\n const hook = getDevtoolsGlobalHook$1();\n const enableProxy = isProxyAvailable$1 && descriptor.enableEarlyProxy;\n if (hook && (target.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !enableProxy)) {\n hook.emit(HOOK_SETUP$1, pluginDescriptor, setupFn);\n } else {\n const proxy = enableProxy ? new ApiProxy$1(descriptor, hook) : null;\n const list = target.__VUE_DEVTOOLS_PLUGINS__ = target.__VUE_DEVTOOLS_PLUGINS__ || [];\n list.push({\n pluginDescriptor: descriptor,\n setupFn,\n proxy\n });\n if (proxy)\n setupFn(proxy.proxiedTarget);\n }\n}\n/*!\n * pinia v2.0.33\n * (c) 2023 Eduardo San Martin Morote\n * @license MIT\n */\nlet activePinia;\nconst setActivePinia = (pinia2) => activePinia = pinia2;\nconst piniaSymbol = process.env.NODE_ENV !== \"production\" ? Symbol(\"pinia\") : (\n /* istanbul ignore next */\n Symbol()\n);\nfunction isPlainObject(o) {\n return o && typeof o === \"object\" && Object.prototype.toString.call(o) === \"[object Object]\" && typeof o.toJSON !== \"function\";\n}\nvar MutationType;\n(function(MutationType2) {\n MutationType2[\"direct\"] = \"direct\";\n MutationType2[\"patchObject\"] = \"patch object\";\n MutationType2[\"patchFunction\"] = \"patch function\";\n})(MutationType || (MutationType = {}));\nconst IS_CLIENT = typeof window !== \"undefined\";\nconst USE_DEVTOOLS = (process.env.NODE_ENV !== \"production\" || false) && !(process.env.NODE_ENV === \"test\") && IS_CLIENT;\nconst _global = /* @__PURE__ */ (() => typeof window === \"object\" && window.window === window ? window : typeof self === \"object\" && self.self === self ? self : typeof global === \"object\" && global.global === global ? global : typeof globalThis === \"object\" ? globalThis : { HTMLElement: null })();\nfunction bom(blob, { autoBom = false } = {}) {\n if (autoBom && /^\\s*(?:text\\/\\S*|application\\/xml|\\S*\\/\\S*\\+xml)\\s*;.*charset\\s*=\\s*utf-8/i.test(blob.type)) {\n return new Blob([String.fromCharCode(65279), blob], { type: blob.type });\n }\n return blob;\n}\nfunction download(url, name, opts) {\n const xhr = new XMLHttpRequest();\n xhr.open(\"GET\", url);\n xhr.responseType = \"blob\";\n xhr.onload = function() {\n saveAs(xhr.response, name, opts);\n };\n xhr.onerror = function() {\n console.error(\"could not download file\");\n };\n xhr.send();\n}\nfunction corsEnabled(url) {\n const xhr = new XMLHttpRequest();\n xhr.open(\"HEAD\", url, false);\n try {\n xhr.send();\n } catch (e) {\n }\n return xhr.status >= 200 && xhr.status <= 299;\n}\nfunction click(node) {\n try {\n node.dispatchEvent(new MouseEvent(\"click\"));\n } catch (e) {\n const evt = document.createEvent(\"MouseEvents\");\n evt.initMouseEvent(\"click\", true, true, window, 0, 0, 0, 80, 20, false, false, false, false, 0, null);\n node.dispatchEvent(evt);\n }\n}\nconst _navigator = typeof navigator === \"object\" ? navigator : { userAgent: \"\" };\nconst isMacOSWebView = /* @__PURE__ */ (() => /Macintosh/.test(_navigator.userAgent) && /AppleWebKit/.test(_navigator.userAgent) && !/Safari/.test(_navigator.userAgent))();\nconst saveAs = !IS_CLIENT ? () => {\n} : (\n // Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program\n typeof HTMLAnchorElement !== \"undefined\" && \"download\" in HTMLAnchorElement.prototype && !isMacOSWebView ? downloadSaveAs : (\n // Use msSaveOrOpenBlob as a second approach\n \"msSaveOrOpenBlob\" in _navigator ? msSaveAs : (\n // Fallback to using FileReader and a popup\n fileSaverSaveAs\n )\n )\n);\nfunction downloadSaveAs(blob, name = \"download\", opts) {\n const a = document.createElement(\"a\");\n a.download = name;\n a.rel = \"noopener\";\n if (typeof blob === \"string\") {\n a.href = blob;\n if (a.origin !== location.origin) {\n if (corsEnabled(a.href)) {\n download(blob, name, opts);\n } else {\n a.target = \"_blank\";\n click(a);\n }\n } else {\n click(a);\n }\n } else {\n a.href = URL.createObjectURL(blob);\n setTimeout(function() {\n URL.revokeObjectURL(a.href);\n }, 4e4);\n setTimeout(function() {\n click(a);\n }, 0);\n }\n}\nfunction msSaveAs(blob, name = \"download\", opts) {\n if (typeof blob === \"string\") {\n if (corsEnabled(blob)) {\n download(blob, name, opts);\n } else {\n const a = document.createElement(\"a\");\n a.href = blob;\n a.target = \"_blank\";\n setTimeout(function() {\n click(a);\n });\n }\n } else {\n navigator.msSaveOrOpenBlob(bom(blob, opts), name);\n }\n}\nfunction fileSaverSaveAs(blob, name, opts, popup) {\n popup = popup || open(\"\", \"_blank\");\n if (popup) {\n popup.document.title = popup.document.body.innerText = \"downloading...\";\n }\n if (typeof blob === \"string\")\n return download(blob, name, opts);\n const force = blob.type === \"application/octet-stream\";\n const isSafari = /constructor/i.test(String(_global.HTMLElement)) || \"safari\" in _global;\n const isChromeIOS = /CriOS\\/[\\d]+/.test(navigator.userAgent);\n if ((isChromeIOS || force && isSafari || isMacOSWebView) && typeof FileReader !== \"undefined\") {\n const reader = new FileReader();\n reader.onloadend = function() {\n let url = reader.result;\n if (typeof url !== \"string\") {\n popup = null;\n throw new Error(\"Wrong reader.result type\");\n }\n url = isChromeIOS ? url : url.replace(/^data:[^;]*;/, \"data:attachment/file;\");\n if (popup) {\n popup.location.href = url;\n } else {\n location.assign(url);\n }\n popup = null;\n };\n reader.readAsDataURL(blob);\n } else {\n const url = URL.createObjectURL(blob);\n if (popup)\n popup.location.assign(url);\n else\n location.href = url;\n popup = null;\n setTimeout(function() {\n URL.revokeObjectURL(url);\n }, 4e4);\n }\n}\nfunction toastMessage(message, type2) {\n const piniaMessage = \"🍍 \" + message;\n if (typeof __VUE_DEVTOOLS_TOAST__ === \"function\") {\n __VUE_DEVTOOLS_TOAST__(piniaMessage, type2);\n } else if (type2 === \"error\") {\n console.error(piniaMessage);\n } else if (type2 === \"warn\") {\n console.warn(piniaMessage);\n } else {\n console.log(piniaMessage);\n }\n}\nfunction isPinia(o) {\n return \"_a\" in o && \"install\" in o;\n}\nfunction checkClipboardAccess() {\n if (!(\"clipboard\" in navigator)) {\n toastMessage(`Your browser doesn't support the Clipboard API`, \"error\");\n return true;\n }\n}\nfunction checkNotFocusedError(error) {\n if (error instanceof Error && error.message.toLowerCase().includes(\"document is not focused\")) {\n toastMessage('You need to activate the \"Emulate a focused page\" setting in the \"Rendering\" panel of devtools.', \"warn\");\n return true;\n }\n return false;\n}\nasync function actionGlobalCopyState(pinia2) {\n if (checkClipboardAccess())\n return;\n try {\n await navigator.clipboard.writeText(JSON.stringify(pinia2.state.value));\n toastMessage(\"Global state copied to clipboard.\");\n } catch (error) {\n if (checkNotFocusedError(error))\n return;\n toastMessage(`Failed to serialize the state. Check the console for more details.`, \"error\");\n console.error(error);\n }\n}\nasync function actionGlobalPasteState(pinia2) {\n if (checkClipboardAccess())\n return;\n try {\n pinia2.state.value = JSON.parse(await navigator.clipboard.readText());\n toastMessage(\"Global state pasted from clipboard.\");\n } catch (error) {\n if (checkNotFocusedError(error))\n return;\n toastMessage(`Failed to deserialize the state from clipboard. Check the console for more details.`, \"error\");\n console.error(error);\n }\n}\nasync function actionGlobalSaveState(pinia2) {\n try {\n saveAs(new Blob([JSON.stringify(pinia2.state.value)], {\n type: \"text/plain;charset=utf-8\"\n }), \"pinia-state.json\");\n } catch (error) {\n toastMessage(`Failed to export the state as JSON. Check the console for more details.`, \"error\");\n console.error(error);\n }\n}\nlet fileInput;\nfunction getFileOpener() {\n if (!fileInput) {\n fileInput = document.createElement(\"input\");\n fileInput.type = \"file\";\n fileInput.accept = \".json\";\n }\n function openFile() {\n return new Promise((resolve, reject) => {\n fileInput.onchange = async () => {\n const files = fileInput.files;\n if (!files)\n return resolve(null);\n const file = files.item(0);\n if (!file)\n return resolve(null);\n return resolve({ text: await file.text(), file });\n };\n fileInput.oncancel = () => resolve(null);\n fileInput.onerror = reject;\n fileInput.click();\n });\n }\n return openFile;\n}\nasync function actionGlobalOpenStateFile(pinia2) {\n try {\n const open2 = await getFileOpener();\n const result = await open2();\n if (!result)\n return;\n const { text, file } = result;\n pinia2.state.value = JSON.parse(text);\n toastMessage(`Global state imported from \"${file.name}\".`);\n } catch (error) {\n toastMessage(`Failed to export the state as JSON. Check the console for more details.`, \"error\");\n console.error(error);\n }\n}\nfunction formatDisplay$1(display) {\n return {\n _custom: {\n display\n }\n };\n}\nconst PINIA_ROOT_LABEL = \"🍍 Pinia (root)\";\nconst PINIA_ROOT_ID = \"_root\";\nfunction formatStoreForInspectorTree(store) {\n return isPinia(store) ? {\n id: PINIA_ROOT_ID,\n label: PINIA_ROOT_LABEL\n } : {\n id: store.$id,\n label: store.$id\n };\n}\nfunction formatStoreForInspectorState(store) {\n if (isPinia(store)) {\n const storeNames = Array.from(store._s.keys());\n const storeMap = store._s;\n const state2 = {\n state: storeNames.map((storeId) => ({\n editable: true,\n key: storeId,\n value: store.state.value[storeId]\n })),\n getters: storeNames.filter((id) => storeMap.get(id)._getters).map((id) => {\n const store2 = storeMap.get(id);\n return {\n editable: false,\n key: id,\n value: store2._getters.reduce((getters, key) => {\n getters[key] = store2[key];\n return getters;\n }, {})\n };\n })\n };\n return state2;\n }\n const state = {\n state: Object.keys(store.$state).map((key) => ({\n editable: true,\n key,\n value: store.$state[key]\n }))\n };\n if (store._getters && store._getters.length) {\n state.getters = store._getters.map((getterName) => ({\n editable: false,\n key: getterName,\n value: store[getterName]\n }));\n }\n if (store._customProperties.size) {\n state.customProperties = Array.from(store._customProperties).map((key) => ({\n editable: true,\n key,\n value: store[key]\n }));\n }\n return state;\n}\nfunction formatEventData(events) {\n if (!events)\n return {};\n if (Array.isArray(events)) {\n return events.reduce((data, event) => {\n data.keys.push(event.key);\n data.operations.push(event.type);\n data.oldValue[event.key] = event.oldValue;\n data.newValue[event.key] = event.newValue;\n return data;\n }, {\n oldValue: {},\n keys: [],\n operations: [],\n newValue: {}\n });\n } else {\n return {\n operation: formatDisplay$1(events.type),\n key: formatDisplay$1(events.key),\n oldValue: events.oldValue,\n newValue: events.newValue\n };\n }\n}\nfunction formatMutationType(type2) {\n switch (type2) {\n case MutationType.direct:\n return \"mutation\";\n case MutationType.patchFunction:\n return \"$patch\";\n case MutationType.patchObject:\n return \"$patch\";\n default:\n return \"unknown\";\n }\n}\nlet isTimelineActive = true;\nconst componentStateTypes = [];\nconst MUTATIONS_LAYER_ID = \"pinia:mutations\";\nconst INSPECTOR_ID = \"pinia\";\nconst { assign: assign$1 } = Object;\nconst getStoreType = (id) => \"🍍 \" + id;\nfunction registerPiniaDevtools(app, pinia2) {\n setupDevtoolsPlugin$1({\n id: \"dev.esm.pinia\",\n label: \"Pinia 🍍\",\n logo: \"https://pinia.vuejs.org/logo.svg\",\n packageName: \"pinia\",\n homepage: \"https://pinia.vuejs.org\",\n componentStateTypes,\n app\n }, (api) => {\n if (typeof api.now !== \"function\") {\n toastMessage(\"You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html.\");\n }\n api.addTimelineLayer({\n id: MUTATIONS_LAYER_ID,\n label: `Pinia 🍍`,\n color: 15064968\n });\n api.addInspector({\n id: INSPECTOR_ID,\n label: \"Pinia 🍍\",\n icon: \"storage\",\n treeFilterPlaceholder: \"Search stores\",\n actions: [\n {\n icon: \"content_copy\",\n action: () => {\n actionGlobalCopyState(pinia2);\n },\n tooltip: \"Serialize and copy the state\"\n },\n {\n icon: \"content_paste\",\n action: async () => {\n await actionGlobalPasteState(pinia2);\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n },\n tooltip: \"Replace the state with the content of your clipboard\"\n },\n {\n icon: \"save\",\n action: () => {\n actionGlobalSaveState(pinia2);\n },\n tooltip: \"Save the state as a JSON file\"\n },\n {\n icon: \"folder_open\",\n action: async () => {\n await actionGlobalOpenStateFile(pinia2);\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n },\n tooltip: \"Import the state from a JSON file\"\n }\n ],\n nodeActions: [\n {\n icon: \"restore\",\n tooltip: \"Reset the state (option store only)\",\n action: (nodeId) => {\n const store = pinia2._s.get(nodeId);\n if (!store) {\n toastMessage(`Cannot reset \"${nodeId}\" store because it wasn't found.`, \"warn\");\n } else if (!store._isOptionsAPI) {\n toastMessage(`Cannot reset \"${nodeId}\" store because it's a setup store.`, \"warn\");\n } else {\n store.$reset();\n toastMessage(`Store \"${nodeId}\" reset.`);\n }\n }\n }\n ]\n });\n api.on.inspectComponent((payload, ctx) => {\n const proxy = payload.componentInstance && payload.componentInstance.proxy;\n if (proxy && proxy._pStores) {\n const piniaStores = payload.componentInstance.proxy._pStores;\n Object.values(piniaStores).forEach((store) => {\n payload.instanceData.state.push({\n type: getStoreType(store.$id),\n key: \"state\",\n editable: true,\n value: store._isOptionsAPI ? {\n _custom: {\n value: toRaw(store.$state),\n actions: [\n {\n icon: \"restore\",\n tooltip: \"Reset the state of this store\",\n action: () => store.$reset()\n }\n ]\n }\n } : (\n // NOTE: workaround to unwrap transferred refs\n Object.keys(store.$state).reduce((state, key) => {\n state[key] = store.$state[key];\n return state;\n }, {})\n )\n });\n if (store._getters && store._getters.length) {\n payload.instanceData.state.push({\n type: getStoreType(store.$id),\n key: \"getters\",\n editable: false,\n value: store._getters.reduce((getters, key) => {\n try {\n getters[key] = store[key];\n } catch (error) {\n getters[key] = error;\n }\n return getters;\n }, {})\n });\n }\n });\n }\n });\n api.on.getInspectorTree((payload) => {\n if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {\n let stores = [pinia2];\n stores = stores.concat(Array.from(pinia2._s.values()));\n payload.rootNodes = (payload.filter ? stores.filter((store) => \"$id\" in store ? store.$id.toLowerCase().includes(payload.filter.toLowerCase()) : PINIA_ROOT_LABEL.toLowerCase().includes(payload.filter.toLowerCase())) : stores).map(formatStoreForInspectorTree);\n }\n });\n api.on.getInspectorState((payload) => {\n if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {\n const inspectedStore = payload.nodeId === PINIA_ROOT_ID ? pinia2 : pinia2._s.get(payload.nodeId);\n if (!inspectedStore) {\n return;\n }\n if (inspectedStore) {\n payload.state = formatStoreForInspectorState(inspectedStore);\n }\n }\n });\n api.on.editInspectorState((payload, ctx) => {\n if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {\n const inspectedStore = payload.nodeId === PINIA_ROOT_ID ? pinia2 : pinia2._s.get(payload.nodeId);\n if (!inspectedStore) {\n return toastMessage(`store \"${payload.nodeId}\" not found`, \"error\");\n }\n const { path } = payload;\n if (!isPinia(inspectedStore)) {\n if (path.length !== 1 || !inspectedStore._customProperties.has(path[0]) || path[0] in inspectedStore.$state) {\n path.unshift(\"$state\");\n }\n } else {\n path.unshift(\"state\");\n }\n isTimelineActive = false;\n payload.set(inspectedStore, path, payload.state.value);\n isTimelineActive = true;\n }\n });\n api.on.editComponentState((payload) => {\n if (payload.type.startsWith(\"🍍\")) {\n const storeId = payload.type.replace(/^🍍\\s*/, \"\");\n const store = pinia2._s.get(storeId);\n if (!store) {\n return toastMessage(`store \"${storeId}\" not found`, \"error\");\n }\n const { path } = payload;\n if (path[0] !== \"state\") {\n return toastMessage(`Invalid path for store \"${storeId}\":\n${path}\nOnly state can be modified.`);\n }\n path[0] = \"$state\";\n isTimelineActive = false;\n payload.set(store, path, payload.state.value);\n isTimelineActive = true;\n }\n });\n });\n}\nfunction addStoreToDevtools(app, store) {\n if (!componentStateTypes.includes(getStoreType(store.$id))) {\n componentStateTypes.push(getStoreType(store.$id));\n }\n setupDevtoolsPlugin$1({\n id: \"dev.esm.pinia\",\n label: \"Pinia 🍍\",\n logo: \"https://pinia.vuejs.org/logo.svg\",\n packageName: \"pinia\",\n homepage: \"https://pinia.vuejs.org\",\n componentStateTypes,\n app,\n settings: {\n logStoreChanges: {\n label: \"Notify about new/deleted stores\",\n type: \"boolean\",\n defaultValue: true\n }\n // useEmojis: {\n // label: 'Use emojis in messages ⚡️',\n // type: 'boolean',\n // defaultValue: true,\n // },\n }\n }, (api) => {\n const now2 = typeof api.now === \"function\" ? api.now.bind(api) : Date.now;\n store.$onAction(({ after, onError, name, args }) => {\n const groupId = runningActionId++;\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now2(),\n title: \"🛫 \" + name,\n subtitle: \"start\",\n data: {\n store: formatDisplay$1(store.$id),\n action: formatDisplay$1(name),\n args\n },\n groupId\n }\n });\n after((result) => {\n activeAction = void 0;\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now2(),\n title: \"🛬 \" + name,\n subtitle: \"end\",\n data: {\n store: formatDisplay$1(store.$id),\n action: formatDisplay$1(name),\n args,\n result\n },\n groupId\n }\n });\n });\n onError((error) => {\n activeAction = void 0;\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now2(),\n logType: \"error\",\n title: \"💥 \" + name,\n subtitle: \"end\",\n data: {\n store: formatDisplay$1(store.$id),\n action: formatDisplay$1(name),\n args,\n error\n },\n groupId\n }\n });\n });\n }, true);\n store._customProperties.forEach((name) => {\n watch(() => unref(store[name]), (newValue, oldValue) => {\n api.notifyComponentUpdate();\n api.sendInspectorState(INSPECTOR_ID);\n if (isTimelineActive) {\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now2(),\n title: \"Change\",\n subtitle: name,\n data: {\n newValue,\n oldValue\n },\n groupId: activeAction\n }\n });\n }\n }, { deep: true });\n });\n store.$subscribe(({ events, type: type2 }, state) => {\n api.notifyComponentUpdate();\n api.sendInspectorState(INSPECTOR_ID);\n if (!isTimelineActive)\n return;\n const eventData = {\n time: now2(),\n title: formatMutationType(type2),\n data: assign$1({ store: formatDisplay$1(store.$id) }, formatEventData(events)),\n groupId: activeAction\n };\n activeAction = void 0;\n if (type2 === MutationType.patchFunction) {\n eventData.subtitle = \"⤵️\";\n } else if (type2 === MutationType.patchObject) {\n eventData.subtitle = \"🧩\";\n } else if (events && !Array.isArray(events)) {\n eventData.subtitle = events.type;\n }\n if (events) {\n eventData.data[\"rawEvent(s)\"] = {\n _custom: {\n display: \"DebuggerEvent\",\n type: \"object\",\n tooltip: \"raw DebuggerEvent[]\",\n value: events\n }\n };\n }\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: eventData\n });\n }, { detached: true, flush: \"sync\" });\n const hotUpdate = store._hotUpdate;\n store._hotUpdate = markRaw((newStore) => {\n hotUpdate(newStore);\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now2(),\n title: \"🔥 \" + store.$id,\n subtitle: \"HMR update\",\n data: {\n store: formatDisplay$1(store.$id),\n info: formatDisplay$1(`HMR update`)\n }\n }\n });\n api.notifyComponentUpdate();\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n });\n const { $dispose } = store;\n store.$dispose = () => {\n $dispose();\n api.notifyComponentUpdate();\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n api.getSettings().logStoreChanges && toastMessage(`Disposed \"${store.$id}\" store 🗑`);\n };\n api.notifyComponentUpdate();\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n api.getSettings().logStoreChanges && toastMessage(`\"${store.$id}\" store installed 🆕`);\n });\n}\nlet runningActionId = 0;\nlet activeAction;\nfunction patchActionForGrouping(store, actionNames) {\n const actions = actionNames.reduce((storeActions, actionName) => {\n storeActions[actionName] = toRaw(store)[actionName];\n return storeActions;\n }, {});\n for (const actionName in actions) {\n store[actionName] = function() {\n const _actionId = runningActionId;\n const trackedStore = new Proxy(store, {\n get(...args) {\n activeAction = _actionId;\n return Reflect.get(...args);\n },\n set(...args) {\n activeAction = _actionId;\n return Reflect.set(...args);\n }\n });\n return actions[actionName].apply(trackedStore, arguments);\n };\n }\n}\nfunction devtoolsPlugin({ app, store, options }) {\n if (store.$id.startsWith(\"__hot:\")) {\n return;\n }\n if (options.state) {\n store._isOptionsAPI = true;\n }\n if (typeof options.state === \"function\") {\n patchActionForGrouping(\n // @ts-expect-error: can cast the store...\n store,\n Object.keys(options.actions)\n );\n const originalHotUpdate = store._hotUpdate;\n toRaw(store)._hotUpdate = function(newStore) {\n originalHotUpdate.apply(this, arguments);\n patchActionForGrouping(store, Object.keys(newStore._hmrPayload.actions));\n };\n }\n addStoreToDevtools(\n app,\n // FIXME: is there a way to allow the assignment from Store to StoreGeneric?\n store\n );\n}\nfunction createPinia() {\n const scope = effectScope(true);\n const state = scope.run(() => ref({}));\n let _p = [];\n let toBeInstalled = [];\n const pinia2 = markRaw({\n install(app) {\n setActivePinia(pinia2);\n {\n pinia2._a = app;\n app.provide(piniaSymbol, pinia2);\n app.config.globalProperties.$pinia = pinia2;\n if (USE_DEVTOOLS) {\n registerPiniaDevtools(app, pinia2);\n }\n toBeInstalled.forEach((plugin) => _p.push(plugin));\n toBeInstalled = [];\n }\n },\n use(plugin) {\n if (!this._a && !isVue2) {\n toBeInstalled.push(plugin);\n } else {\n _p.push(plugin);\n }\n return this;\n },\n _p,\n // it's actually undefined here\n // @ts-expect-error\n _a: null,\n _e: scope,\n _s: /* @__PURE__ */ new Map(),\n state\n });\n if (USE_DEVTOOLS && typeof Proxy !== \"undefined\") {\n pinia2.use(devtoolsPlugin);\n }\n return pinia2;\n}\nfunction patchObject(newState, oldState) {\n for (const key in oldState) {\n const subPatch = oldState[key];\n if (!(key in newState)) {\n continue;\n }\n const targetValue = newState[key];\n if (isPlainObject(targetValue) && isPlainObject(subPatch) && !isRef(subPatch) && !isReactive(subPatch)) {\n newState[key] = patchObject(targetValue, subPatch);\n } else {\n {\n newState[key] = subPatch;\n }\n }\n }\n return newState;\n}\nconst noop$1 = () => {\n};\nfunction addSubscription(subscriptions, callback, detached, onCleanup = noop$1) {\n subscriptions.push(callback);\n const removeSubscription = () => {\n const idx = subscriptions.indexOf(callback);\n if (idx > -1) {\n subscriptions.splice(idx, 1);\n onCleanup();\n }\n };\n if (!detached && getCurrentScope()) {\n onScopeDispose(removeSubscription);\n }\n return removeSubscription;\n}\nfunction triggerSubscriptions(subscriptions, ...args) {\n subscriptions.slice().forEach((callback) => {\n callback(...args);\n });\n}\nfunction mergeReactiveObjects(target, patchToApply) {\n if (target instanceof Map && patchToApply instanceof Map) {\n patchToApply.forEach((value, key) => target.set(key, value));\n }\n if (target instanceof Set && patchToApply instanceof Set) {\n patchToApply.forEach(target.add, target);\n }\n for (const key in patchToApply) {\n if (!patchToApply.hasOwnProperty(key))\n continue;\n const subPatch = patchToApply[key];\n const targetValue = target[key];\n if (isPlainObject(targetValue) && isPlainObject(subPatch) && target.hasOwnProperty(key) && !isRef(subPatch) && !isReactive(subPatch)) {\n target[key] = mergeReactiveObjects(targetValue, subPatch);\n } else {\n target[key] = subPatch;\n }\n }\n return target;\n}\nconst skipHydrateSymbol = process.env.NODE_ENV !== \"production\" ? Symbol(\"pinia:skipHydration\") : (\n /* istanbul ignore next */\n Symbol()\n);\nfunction shouldHydrate(obj) {\n return !isPlainObject(obj) || !obj.hasOwnProperty(skipHydrateSymbol);\n}\nconst { assign: assign$2 } = Object;\nfunction isComputed(o) {\n return !!(isRef(o) && o.effect);\n}\nfunction createOptionsStore(id, options, pinia2, hot) {\n const { state, actions, getters } = options;\n const initialState = pinia2.state.value[id];\n let store;\n function setup() {\n if (!initialState && (!(process.env.NODE_ENV !== \"production\") || !hot)) {\n {\n pinia2.state.value[id] = state ? state() : {};\n }\n }\n const localState = process.env.NODE_ENV !== \"production\" && hot ? (\n // use ref() to unwrap refs inside state TODO: check if this is still necessary\n toRefs(ref(state ? state() : {}).value)\n ) : toRefs(pinia2.state.value[id]);\n return assign$2(localState, actions, Object.keys(getters || {}).reduce((computedGetters, name) => {\n if (process.env.NODE_ENV !== \"production\" && name in localState) {\n console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with \"${name}\" in store \"${id}\".`);\n }\n computedGetters[name] = markRaw(computed(() => {\n setActivePinia(pinia2);\n const store2 = pinia2._s.get(id);\n return getters[name].call(store2, store2);\n }));\n return computedGetters;\n }, {}));\n }\n store = createSetupStore(id, setup, options, pinia2, hot, true);\n return store;\n}\nfunction createSetupStore($id, setup, options = {}, pinia2, hot, isOptionsStore) {\n let scope;\n const optionsForPlugin = assign$2({ actions: {} }, options);\n if (process.env.NODE_ENV !== \"production\" && !pinia2._e.active) {\n throw new Error(\"Pinia destroyed\");\n }\n const $subscribeOptions = {\n deep: true\n // flush: 'post',\n };\n if (process.env.NODE_ENV !== \"production\" && !isVue2) {\n $subscribeOptions.onTrigger = (event) => {\n if (isListening) {\n debuggerEvents = event;\n } else if (isListening == false && !store._hotUpdating) {\n if (Array.isArray(debuggerEvents)) {\n debuggerEvents.push(event);\n } else {\n console.error(\"🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug.\");\n }\n }\n };\n }\n let isListening;\n let isSyncListening;\n let subscriptions = markRaw([]);\n let actionSubscriptions = markRaw([]);\n let debuggerEvents;\n const initialState = pinia2.state.value[$id];\n if (!isOptionsStore && !initialState && (!(process.env.NODE_ENV !== \"production\") || !hot)) {\n {\n pinia2.state.value[$id] = {};\n }\n }\n const hotState = ref({});\n let activeListener;\n function $patch(partialStateOrMutator) {\n let subscriptionMutation;\n isListening = isSyncListening = false;\n if (process.env.NODE_ENV !== \"production\") {\n debuggerEvents = [];\n }\n if (typeof partialStateOrMutator === \"function\") {\n partialStateOrMutator(pinia2.state.value[$id]);\n subscriptionMutation = {\n type: MutationType.patchFunction,\n storeId: $id,\n events: debuggerEvents\n };\n } else {\n mergeReactiveObjects(pinia2.state.value[$id], partialStateOrMutator);\n subscriptionMutation = {\n type: MutationType.patchObject,\n payload: partialStateOrMutator,\n storeId: $id,\n events: debuggerEvents\n };\n }\n const myListenerId = activeListener = Symbol();\n nextTick().then(() => {\n if (activeListener === myListenerId) {\n isListening = true;\n }\n });\n isSyncListening = true;\n triggerSubscriptions(subscriptions, subscriptionMutation, pinia2.state.value[$id]);\n }\n const $reset = isOptionsStore ? function $reset2() {\n const { state } = options;\n const newState = state ? state() : {};\n this.$patch(($state) => {\n assign$2($state, newState);\n });\n } : (\n /* istanbul ignore next */\n process.env.NODE_ENV !== \"production\" ? () => {\n throw new Error(`🍍: Store \"${$id}\" is built using the setup syntax and does not implement $reset().`);\n } : noop$1\n );\n function $dispose() {\n scope.stop();\n subscriptions = [];\n actionSubscriptions = [];\n pinia2._s.delete($id);\n }\n function wrapAction(name, action) {\n return function() {\n setActivePinia(pinia2);\n const args = Array.from(arguments);\n const afterCallbackList = [];\n const onErrorCallbackList = [];\n function after(callback) {\n afterCallbackList.push(callback);\n }\n function onError(callback) {\n onErrorCallbackList.push(callback);\n }\n triggerSubscriptions(actionSubscriptions, {\n args,\n name,\n store,\n after,\n onError\n });\n let ret;\n try {\n ret = action.apply(this && this.$id === $id ? this : store, args);\n } catch (error) {\n triggerSubscriptions(onErrorCallbackList, error);\n throw error;\n }\n if (ret instanceof Promise) {\n return ret.then((value) => {\n triggerSubscriptions(afterCallbackList, value);\n return value;\n }).catch((error) => {\n triggerSubscriptions(onErrorCallbackList, error);\n return Promise.reject(error);\n });\n }\n triggerSubscriptions(afterCallbackList, ret);\n return ret;\n };\n }\n const _hmrPayload = /* @__PURE__ */ markRaw({\n actions: {},\n getters: {},\n state: [],\n hotState\n });\n const partialStore = {\n _p: pinia2,\n // _s: scope,\n $id,\n $onAction: addSubscription.bind(null, actionSubscriptions),\n $patch,\n $reset,\n $subscribe(callback, options2 = {}) {\n const removeSubscription = addSubscription(subscriptions, callback, options2.detached, () => stopWatcher());\n const stopWatcher = scope.run(() => watch(() => pinia2.state.value[$id], (state) => {\n if (options2.flush === \"sync\" ? isSyncListening : isListening) {\n callback({\n storeId: $id,\n type: MutationType.direct,\n events: debuggerEvents\n }, state);\n }\n }, assign$2({}, $subscribeOptions, options2)));\n return removeSubscription;\n },\n $dispose\n };\n const store = reactive(process.env.NODE_ENV !== \"production\" || USE_DEVTOOLS ? assign$2(\n {\n _hmrPayload,\n _customProperties: markRaw(/* @__PURE__ */ new Set())\n // devtools custom properties\n },\n partialStore\n // must be added later\n // setupStore\n ) : partialStore);\n pinia2._s.set($id, store);\n const setupStore = pinia2._e.run(() => {\n scope = effectScope();\n return scope.run(() => setup());\n });\n for (const key in setupStore) {\n const prop = setupStore[key];\n if (isRef(prop) && !isComputed(prop) || isReactive(prop)) {\n if (process.env.NODE_ENV !== \"production\" && hot) {\n set(hotState.value, key, toRef(setupStore, key));\n } else if (!isOptionsStore) {\n if (initialState && shouldHydrate(prop)) {\n if (isRef(prop)) {\n prop.value = initialState[key];\n } else {\n mergeReactiveObjects(prop, initialState[key]);\n }\n }\n {\n pinia2.state.value[$id][key] = prop;\n }\n }\n if (process.env.NODE_ENV !== \"production\") {\n _hmrPayload.state.push(key);\n }\n } else if (typeof prop === \"function\") {\n const actionValue = process.env.NODE_ENV !== \"production\" && hot ? prop : wrapAction(key, prop);\n {\n setupStore[key] = actionValue;\n }\n if (process.env.NODE_ENV !== \"production\") {\n _hmrPayload.actions[key] = prop;\n }\n optionsForPlugin.actions[key] = prop;\n } else if (process.env.NODE_ENV !== \"production\") {\n if (isComputed(prop)) {\n _hmrPayload.getters[key] = isOptionsStore ? (\n // @ts-expect-error\n options.getters[key]\n ) : prop;\n if (IS_CLIENT) {\n const getters = setupStore._getters || // @ts-expect-error: same\n (setupStore._getters = markRaw([]));\n getters.push(key);\n }\n }\n }\n }\n {\n assign$2(store, setupStore);\n assign$2(toRaw(store), setupStore);\n }\n Object.defineProperty(store, \"$state\", {\n get: () => process.env.NODE_ENV !== \"production\" && hot ? hotState.value : pinia2.state.value[$id],\n set: (state) => {\n if (process.env.NODE_ENV !== \"production\" && hot) {\n throw new Error(\"cannot set hotState\");\n }\n $patch(($state) => {\n assign$2($state, state);\n });\n }\n });\n if (process.env.NODE_ENV !== \"production\") {\n store._hotUpdate = markRaw((newStore) => {\n store._hotUpdating = true;\n newStore._hmrPayload.state.forEach((stateKey) => {\n if (stateKey in store.$state) {\n const newStateTarget = newStore.$state[stateKey];\n const oldStateSource = store.$state[stateKey];\n if (typeof newStateTarget === \"object\" && isPlainObject(newStateTarget) && isPlainObject(oldStateSource)) {\n patchObject(newStateTarget, oldStateSource);\n } else {\n newStore.$state[stateKey] = oldStateSource;\n }\n }\n set(store, stateKey, toRef(newStore.$state, stateKey));\n });\n Object.keys(store.$state).forEach((stateKey) => {\n if (!(stateKey in newStore.$state)) {\n del(store, stateKey);\n }\n });\n isListening = false;\n isSyncListening = false;\n pinia2.state.value[$id] = toRef(newStore._hmrPayload, \"hotState\");\n isSyncListening = true;\n nextTick().then(() => {\n isListening = true;\n });\n for (const actionName in newStore._hmrPayload.actions) {\n const action = newStore[actionName];\n set(store, actionName, wrapAction(actionName, action));\n }\n for (const getterName in newStore._hmrPayload.getters) {\n const getter = newStore._hmrPayload.getters[getterName];\n const getterValue = isOptionsStore ? (\n // special handling of options api\n computed(() => {\n setActivePinia(pinia2);\n return getter.call(store, store);\n })\n ) : getter;\n set(store, getterName, getterValue);\n }\n Object.keys(store._hmrPayload.getters).forEach((key) => {\n if (!(key in newStore._hmrPayload.getters)) {\n del(store, key);\n }\n });\n Object.keys(store._hmrPayload.actions).forEach((key) => {\n if (!(key in newStore._hmrPayload.actions)) {\n del(store, key);\n }\n });\n store._hmrPayload = newStore._hmrPayload;\n store._getters = newStore._getters;\n store._hotUpdating = false;\n });\n }\n if (USE_DEVTOOLS) {\n const nonEnumerable = {\n writable: true,\n configurable: true,\n // avoid warning on devtools trying to display this property\n enumerable: false\n };\n [\"_p\", \"_hmrPayload\", \"_getters\", \"_customProperties\"].forEach((p) => {\n Object.defineProperty(store, p, assign$2({ value: store[p] }, nonEnumerable));\n });\n }\n pinia2._p.forEach((extender) => {\n if (USE_DEVTOOLS) {\n const extensions = scope.run(() => extender({\n store,\n app: pinia2._a,\n pinia: pinia2,\n options: optionsForPlugin\n }));\n Object.keys(extensions || {}).forEach((key) => store._customProperties.add(key));\n assign$2(store, extensions);\n } else {\n assign$2(store, scope.run(() => extender({\n store,\n app: pinia2._a,\n pinia: pinia2,\n options: optionsForPlugin\n })));\n }\n });\n if (process.env.NODE_ENV !== \"production\" && store.$state && typeof store.$state === \"object\" && typeof store.$state.constructor === \"function\" && !store.$state.constructor.toString().includes(\"[native code]\")) {\n console.warn(`[🍍]: The \"state\" must be a plain object. It cannot be\n\tstate: () => new MyClass()\nFound in store \"${store.$id}\".`);\n }\n if (initialState && isOptionsStore && options.hydrate) {\n options.hydrate(store.$state, initialState);\n }\n isListening = true;\n isSyncListening = true;\n return store;\n}\nfunction defineStore(idOrOptions, setup, setupOptions) {\n let id;\n let options;\n const isSetupStore = typeof setup === \"function\";\n if (typeof idOrOptions === \"string\") {\n id = idOrOptions;\n options = isSetupStore ? setupOptions : setup;\n } else {\n options = idOrOptions;\n id = idOrOptions.id;\n }\n function useStore(pinia2, hot) {\n const currentInstance = getCurrentInstance();\n pinia2 = // in test mode, ignore the argument provided as we can always retrieve a\n // pinia instance with getActivePinia()\n (process.env.NODE_ENV === \"test\" && activePinia && activePinia._testing ? null : pinia2) || currentInstance && inject(piniaSymbol, null);\n if (pinia2)\n setActivePinia(pinia2);\n if (process.env.NODE_ENV !== \"production\" && !activePinia) {\n throw new Error(`[🍍]: getActivePinia was called with no active Pinia. Did you forget to install pinia?\n\tconst pinia = createPinia()\n\tapp.use(pinia)\nThis will fail in production.`);\n }\n pinia2 = activePinia;\n if (!pinia2._s.has(id)) {\n if (isSetupStore) {\n createSetupStore(id, setup, options, pinia2);\n } else {\n createOptionsStore(id, options, pinia2);\n }\n if (process.env.NODE_ENV !== \"production\") {\n useStore._pinia = pinia2;\n }\n }\n const store = pinia2._s.get(id);\n if (process.env.NODE_ENV !== \"production\" && hot) {\n const hotId = \"__hot:\" + id;\n const newStore = isSetupStore ? createSetupStore(hotId, setup, options, pinia2, true) : createOptionsStore(hotId, assign$2({}, options), pinia2, true);\n hot._hotUpdate(newStore);\n delete pinia2.state.value[hotId];\n pinia2._s.delete(hotId);\n }\n if (process.env.NODE_ENV !== \"production\" && IS_CLIENT && currentInstance && currentInstance.proxy && // avoid adding stores that are just built for hot module replacement\n !hot) {\n const vm = currentInstance.proxy;\n const cache = \"_pStores\" in vm ? vm._pStores : vm._pStores = {};\n cache[id] = store;\n }\n return store;\n }\n useStore.$id = id;\n return useStore;\n}\nconst useDataStore = defineStore(\"data\", () => {\n const records = ref([]);\n const record = ref({});\n return { records, record };\n});\nfunction useStonecrop(registry) {\n if (!registry) {\n registry = inject(\"$registry\");\n }\n const store = useDataStore();\n const stonecrop = ref(new Stonecrop(registry, store));\n const isReady = ref(false);\n onBeforeMount(async () => {\n var _a, _b;\n const route = registry.router.currentRoute.value;\n const doctypeSlug = (_a = route.params.records) == null ? void 0 : _a.toString().toLowerCase();\n const recordId = (_b = route.params.record) == null ? void 0 : _b.toString().toLowerCase();\n if (!doctypeSlug && !recordId) {\n return;\n }\n const doctype = await registry.doctypeLoader(doctypeSlug);\n registry.addDoctype(doctype);\n stonecrop.value.setup(doctype);\n if (doctypeSlug) {\n if (recordId) {\n await stonecrop.value.getRecord(doctype, recordId);\n } else {\n await stonecrop.value.getRecords(doctype);\n }\n }\n stonecrop.value.runAction(doctype, \"LOAD\", recordId ? [recordId] : void 0);\n isReady.value = true;\n });\n return { stonecrop, isReady };\n}\nclass DoctypeMeta {\n constructor(doctype, schema, workflow, actions, component) {\n this.doctype = doctype;\n this.schema = schema;\n this.workflow = workflow;\n this.actions = actions;\n this.component = component;\n }\n get slug() {\n return this.doctype.replace(/([a-z])([A-Z])/g, \"$1-$2\").replace(/[\\s_]+/g, \"-\").toLowerCase();\n }\n get __typename() {\n return this.doctype;\n }\n}\nclass Registry {\n constructor(router2, doctypeLoader = void 0) {\n if (Registry._root) {\n return Registry._root;\n }\n Registry._root = this;\n this.name = \"Registry\";\n this.router = router2;\n this.registry = {};\n this.doctypeLoader = doctypeLoader;\n }\n addDoctype(doctype) {\n if (!(doctype.doctype in Object.keys(this.registry))) {\n this.registry[doctype.slug] = doctype;\n }\n if (!this.router.hasRoute(doctype.doctype)) {\n this.router.addRoute({\n path: `/${doctype.slug}`,\n name: doctype.slug,\n component: doctype.component\n });\n }\n }\n}\nfunction getDevtoolsGlobalHook() {\n return getTarget().__VUE_DEVTOOLS_GLOBAL_HOOK__;\n}\nfunction getTarget() {\n return typeof navigator !== \"undefined\" && typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : {};\n}\nconst isProxyAvailable = typeof Proxy === \"function\";\nconst HOOK_SETUP = \"devtools-plugin:setup\";\nconst HOOK_PLUGIN_SETTINGS_SET = \"plugin:settings:set\";\nlet supported;\nlet perf;\nfunction isPerformanceSupported() {\n var _a;\n if (supported !== void 0) {\n return supported;\n }\n if (typeof window !== \"undefined\" && window.performance) {\n supported = true;\n perf = window.performance;\n } else if (typeof global !== \"undefined\" && ((_a = global.perf_hooks) === null || _a === void 0 ? void 0 : _a.performance)) {\n supported = true;\n perf = global.perf_hooks.performance;\n } else {\n supported = false;\n }\n return supported;\n}\nfunction now$1() {\n return isPerformanceSupported() ? perf.now() : Date.now();\n}\nclass ApiProxy2 {\n constructor(plugin, hook) {\n this.target = null;\n this.targetQueue = [];\n this.onQueue = [];\n this.plugin = plugin;\n this.hook = hook;\n const defaultSettings = {};\n if (plugin.settings) {\n for (const id in plugin.settings) {\n const item = plugin.settings[id];\n defaultSettings[id] = item.defaultValue;\n }\n }\n const localSettingsSaveId = `__vue-devtools-plugin-settings__${plugin.id}`;\n let currentSettings = Object.assign({}, defaultSettings);\n try {\n const raw = localStorage.getItem(localSettingsSaveId);\n const data = JSON.parse(raw);\n Object.assign(currentSettings, data);\n } catch (e) {\n }\n this.fallbacks = {\n getSettings() {\n return currentSettings;\n },\n setSettings(value) {\n try {\n localStorage.setItem(localSettingsSaveId, JSON.stringify(value));\n } catch (e) {\n }\n currentSettings = value;\n },\n now() {\n return now$1();\n }\n };\n if (hook) {\n hook.on(HOOK_PLUGIN_SETTINGS_SET, (pluginId, value) => {\n if (pluginId === this.plugin.id) {\n this.fallbacks.setSettings(value);\n }\n });\n }\n this.proxiedOn = new Proxy({}, {\n get: (_target, prop) => {\n if (this.target) {\n return this.target.on[prop];\n } else {\n return (...args) => {\n this.onQueue.push({\n method: prop,\n args\n });\n };\n }\n }\n });\n this.proxiedTarget = new Proxy({}, {\n get: (_target, prop) => {\n if (this.target) {\n return this.target[prop];\n } else if (prop === \"on\") {\n return this.proxiedOn;\n } else if (Object.keys(this.fallbacks).includes(prop)) {\n return (...args) => {\n this.targetQueue.push({\n method: prop,\n args,\n resolve: () => {\n }\n });\n return this.fallbacks[prop](...args);\n };\n } else {\n return (...args) => {\n return new Promise((resolve) => {\n this.targetQueue.push({\n method: prop,\n args,\n resolve\n });\n });\n };\n }\n }\n });\n }\n async setRealTarget(target) {\n this.target = target;\n for (const item of this.onQueue) {\n this.target.on[item.method](...item.args);\n }\n for (const item of this.targetQueue) {\n item.resolve(await this.target[item.method](...item.args));\n }\n }\n}\nfunction setupDevtoolsPlugin(pluginDescriptor, setupFn) {\n const descriptor = pluginDescriptor;\n const target = getTarget();\n const hook = getDevtoolsGlobalHook();\n const enableProxy = isProxyAvailable && descriptor.enableEarlyProxy;\n if (hook && (target.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !enableProxy)) {\n hook.emit(HOOK_SETUP, pluginDescriptor, setupFn);\n } else {\n const proxy = enableProxy ? new ApiProxy2(descriptor, hook) : null;\n const list = target.__VUE_DEVTOOLS_PLUGINS__ = target.__VUE_DEVTOOLS_PLUGINS__ || [];\n list.push({\n pluginDescriptor: descriptor,\n setupFn,\n proxy\n });\n if (proxy)\n setupFn(proxy.proxiedTarget);\n }\n}\n/*!\n * vue-router v4.1.6\n * (c) 2022 Eduardo San Martin Morote\n * @license MIT\n */\nconst isBrowser = typeof window !== \"undefined\";\nfunction isESModule(obj) {\n return obj.__esModule || obj[Symbol.toStringTag] === \"Module\";\n}\nconst assign = Object.assign;\nfunction applyToParams(fn, params) {\n const newParams = {};\n for (const key in params) {\n const value = params[key];\n newParams[key] = isArray(value) ? value.map(fn) : fn(value);\n }\n return newParams;\n}\nconst noop = () => {\n};\nconst isArray = Array.isArray;\nfunction warn(msg) {\n const args = Array.from(arguments).slice(1);\n console.warn.apply(console, [\"[Vue Router warn]: \" + msg].concat(args));\n}\nconst TRAILING_SLASH_RE = /\\/$/;\nconst removeTrailingSlash = (path) => path.replace(TRAILING_SLASH_RE, \"\");\nfunction parseURL(parseQuery2, location2, currentLocation = \"/\") {\n let path, query = {}, searchString = \"\", hash = \"\";\n const hashPos = location2.indexOf(\"#\");\n let searchPos = location2.indexOf(\"?\");\n if (hashPos < searchPos && hashPos >= 0) {\n searchPos = -1;\n }\n if (searchPos > -1) {\n path = location2.slice(0, searchPos);\n searchString = location2.slice(searchPos + 1, hashPos > -1 ? hashPos : location2.length);\n query = parseQuery2(searchString);\n }\n if (hashPos > -1) {\n path = path || location2.slice(0, hashPos);\n hash = location2.slice(hashPos, location2.length);\n }\n path = resolveRelativePath(path != null ? path : location2, currentLocation);\n return {\n fullPath: path + (searchString && \"?\") + searchString + hash,\n path,\n query,\n hash\n };\n}\nfunction stringifyURL(stringifyQuery2, location2) {\n const query = location2.query ? stringifyQuery2(location2.query) : \"\";\n return location2.path + (query && \"?\") + query + (location2.hash || \"\");\n}\nfunction stripBase(pathname, base) {\n if (!base || !pathname.toLowerCase().startsWith(base.toLowerCase()))\n return pathname;\n return pathname.slice(base.length) || \"/\";\n}\nfunction isSameRouteLocation(stringifyQuery2, a, b) {\n const aLastIndex = a.matched.length - 1;\n const bLastIndex = b.matched.length - 1;\n return aLastIndex > -1 && aLastIndex === bLastIndex && isSameRouteRecord(a.matched[aLastIndex], b.matched[bLastIndex]) && isSameRouteLocationParams(a.params, b.params) && stringifyQuery2(a.query) === stringifyQuery2(b.query) && a.hash === b.hash;\n}\nfunction isSameRouteRecord(a, b) {\n return (a.aliasOf || a) === (b.aliasOf || b);\n}\nfunction isSameRouteLocationParams(a, b) {\n if (Object.keys(a).length !== Object.keys(b).length)\n return false;\n for (const key in a) {\n if (!isSameRouteLocationParamsValue(a[key], b[key]))\n return false;\n }\n return true;\n}\nfunction isSameRouteLocationParamsValue(a, b) {\n return isArray(a) ? isEquivalentArray(a, b) : isArray(b) ? isEquivalentArray(b, a) : a === b;\n}\nfunction isEquivalentArray(a, b) {\n return isArray(b) ? a.length === b.length && a.every((value, i) => value === b[i]) : a.length === 1 && a[0] === b;\n}\nfunction resolveRelativePath(to, from) {\n if (to.startsWith(\"/\"))\n return to;\n if (process.env.NODE_ENV !== \"production\" && !from.startsWith(\"/\")) {\n warn(`Cannot resolve a relative location without an absolute path. Trying to resolve \"${to}\" from \"${from}\". It should look like \"/${from}\".`);\n return to;\n }\n if (!to)\n return from;\n const fromSegments = from.split(\"/\");\n const toSegments = to.split(\"/\");\n let position = fromSegments.length - 1;\n let toPosition;\n let segment;\n for (toPosition = 0; toPosition < toSegments.length; toPosition++) {\n segment = toSegments[toPosition];\n if (segment === \".\")\n continue;\n if (segment === \"..\") {\n if (position > 1)\n position--;\n } else\n break;\n }\n return fromSegments.slice(0, position).join(\"/\") + \"/\" + toSegments.slice(toPosition - (toPosition === toSegments.length ? 1 : 0)).join(\"/\");\n}\nvar NavigationType;\n(function(NavigationType2) {\n NavigationType2[\"pop\"] = \"pop\";\n NavigationType2[\"push\"] = \"push\";\n})(NavigationType || (NavigationType = {}));\nvar NavigationDirection;\n(function(NavigationDirection2) {\n NavigationDirection2[\"back\"] = \"back\";\n NavigationDirection2[\"forward\"] = \"forward\";\n NavigationDirection2[\"unknown\"] = \"\";\n})(NavigationDirection || (NavigationDirection = {}));\nfunction normalizeBase(base) {\n if (!base) {\n if (isBrowser) {\n const baseEl = document.querySelector(\"base\");\n base = baseEl && baseEl.getAttribute(\"href\") || \"/\";\n base = base.replace(/^\\w+:\\/\\/[^\\/]+/, \"\");\n } else {\n base = \"/\";\n }\n }\n if (base[0] !== \"/\" && base[0] !== \"#\")\n base = \"/\" + base;\n return removeTrailingSlash(base);\n}\nconst BEFORE_HASH_RE = /^[^#]+#/;\nfunction createHref(base, location2) {\n return base.replace(BEFORE_HASH_RE, \"#\") + location2;\n}\nfunction getElementPosition(el, offset) {\n const docRect = document.documentElement.getBoundingClientRect();\n const elRect = el.getBoundingClientRect();\n return {\n behavior: offset.behavior,\n left: elRect.left - docRect.left - (offset.left || 0),\n top: elRect.top - docRect.top - (offset.top || 0)\n };\n}\nconst computeScrollPosition = () => ({\n left: window.pageXOffset,\n top: window.pageYOffset\n});\nfunction scrollToPosition(position) {\n let scrollToOptions;\n if (\"el\" in position) {\n const positionEl = position.el;\n const isIdSelector = typeof positionEl === \"string\" && positionEl.startsWith(\"#\");\n if (process.env.NODE_ENV !== \"production\" && typeof position.el === \"string\") {\n if (!isIdSelector || !document.getElementById(position.el.slice(1))) {\n try {\n const foundEl = document.querySelector(position.el);\n if (isIdSelector && foundEl) {\n warn(`The selector \"${position.el}\" should be passed as \"el: document.querySelector('${position.el}')\" because it starts with \"#\".`);\n return;\n }\n } catch (err) {\n warn(`The selector \"${position.el}\" is invalid. If you are using an id selector, make sure to escape it. You can find more information about escaping characters in selectors at https://mathiasbynens.be/notes/css-escapes or use CSS.escape (https://developer.mozilla.org/en-US/docs/Web/API/CSS/escape).`);\n return;\n }\n }\n }\n const el = typeof positionEl === \"string\" ? isIdSelector ? document.getElementById(positionEl.slice(1)) : document.querySelector(positionEl) : positionEl;\n if (!el) {\n process.env.NODE_ENV !== \"production\" && warn(`Couldn't find element using selector \"${position.el}\" returned by scrollBehavior.`);\n return;\n }\n scrollToOptions = getElementPosition(el, position);\n } else {\n scrollToOptions = position;\n }\n if (\"scrollBehavior\" in document.documentElement.style)\n window.scrollTo(scrollToOptions);\n else {\n window.scrollTo(scrollToOptions.left != null ? scrollToOptions.left : window.pageXOffset, scrollToOptions.top != null ? scrollToOptions.top : window.pageYOffset);\n }\n}\nfunction getScrollKey(path, delta) {\n const position = history.state ? history.state.position - delta : -1;\n return position + path;\n}\nconst scrollPositions = /* @__PURE__ */ new Map();\nfunction saveScrollPosition(key, scrollPosition) {\n scrollPositions.set(key, scrollPosition);\n}\nfunction getSavedScrollPosition(key) {\n const scroll = scrollPositions.get(key);\n scrollPositions.delete(key);\n return scroll;\n}\nlet createBaseLocation = () => location.protocol + \"//\" + location.host;\nfunction createCurrentLocation(base, location2) {\n const { pathname, search, hash } = location2;\n const hashPos = base.indexOf(\"#\");\n if (hashPos > -1) {\n let slicePos = hash.includes(base.slice(hashPos)) ? base.slice(hashPos).length : 1;\n let pathFromHash = hash.slice(slicePos);\n if (pathFromHash[0] !== \"/\")\n pathFromHash = \"/\" + pathFromHash;\n return stripBase(pathFromHash, \"\");\n }\n const path = stripBase(pathname, base);\n return path + search + hash;\n}\nfunction useHistoryListeners(base, historyState, currentLocation, replace) {\n let listeners = [];\n let teardowns = [];\n let pauseState = null;\n const popStateHandler = ({ state }) => {\n const to = createCurrentLocation(base, location);\n const from = currentLocation.value;\n const fromState = historyState.value;\n let delta = 0;\n if (state) {\n currentLocation.value = to;\n historyState.value = state;\n if (pauseState && pauseState === from) {\n pauseState = null;\n return;\n }\n delta = fromState ? state.position - fromState.position : 0;\n } else {\n replace(to);\n }\n listeners.forEach((listener) => {\n listener(currentLocation.value, from, {\n delta,\n type: NavigationType.pop,\n direction: delta ? delta > 0 ? NavigationDirection.forward : NavigationDirection.back : NavigationDirection.unknown\n });\n });\n };\n function pauseListeners() {\n pauseState = currentLocation.value;\n }\n function listen(callback) {\n listeners.push(callback);\n const teardown = () => {\n const index2 = listeners.indexOf(callback);\n if (index2 > -1)\n listeners.splice(index2, 1);\n };\n teardowns.push(teardown);\n return teardown;\n }\n function beforeUnloadListener() {\n const { history: history2 } = window;\n if (!history2.state)\n return;\n history2.replaceState(assign({}, history2.state, { scroll: computeScrollPosition() }), \"\");\n }\n function destroy() {\n for (const teardown of teardowns)\n teardown();\n teardowns = [];\n window.removeEventListener(\"popstate\", popStateHandler);\n window.removeEventListener(\"beforeunload\", beforeUnloadListener);\n }\n window.addEventListener(\"popstate\", popStateHandler);\n window.addEventListener(\"beforeunload\", beforeUnloadListener);\n return {\n pauseListeners,\n listen,\n destroy\n };\n}\nfunction buildState(back, current, forward, replaced = false, computeScroll = false) {\n return {\n back,\n current,\n forward,\n replaced,\n position: window.history.length,\n scroll: computeScroll ? computeScrollPosition() : null\n };\n}\nfunction useHistoryStateNavigation(base) {\n const { history: history2, location: location2 } = window;\n const currentLocation = {\n value: createCurrentLocation(base, location2)\n };\n const historyState = { value: history2.state };\n if (!historyState.value) {\n changeLocation(currentLocation.value, {\n back: null,\n current: currentLocation.value,\n forward: null,\n // the length is off by one, we need to decrease it\n position: history2.length - 1,\n replaced: true,\n // don't add a scroll as the user may have an anchor, and we want\n // scrollBehavior to be triggered without a saved position\n scroll: null\n }, true);\n }\n function changeLocation(to, state, replace2) {\n const hashIndex = base.indexOf(\"#\");\n const url = hashIndex > -1 ? (location2.host && document.querySelector(\"base\") ? base : base.slice(hashIndex)) + to : createBaseLocation() + base + to;\n try {\n history2[replace2 ? \"replaceState\" : \"pushState\"](state, \"\", url);\n historyState.value = state;\n } catch (err) {\n if (process.env.NODE_ENV !== \"production\") {\n warn(\"Error with push/replace State\", err);\n } else {\n console.error(err);\n }\n location2[replace2 ? \"replace\" : \"assign\"](url);\n }\n }\n function replace(to, data) {\n const state = assign({}, history2.state, buildState(\n historyState.value.back,\n // keep back and forward entries but override current position\n to,\n historyState.value.forward,\n true\n ), data, { position: historyState.value.position });\n changeLocation(to, state, true);\n currentLocation.value = to;\n }\n function push(to, data) {\n const currentState = assign(\n {},\n // use current history state to gracefully handle a wrong call to\n // history.replaceState\n // https://github.com/vuejs/router/issues/366\n historyState.value,\n history2.state,\n {\n forward: to,\n scroll: computeScrollPosition()\n }\n );\n if (process.env.NODE_ENV !== \"production\" && !history2.state) {\n warn(`history.state seems to have been manually replaced without preserving the necessary values. Make sure to preserve existing history state if you are manually calling history.replaceState:\n\nhistory.replaceState(history.state, '', url)\n\nYou can find more information at https://next.router.vuejs.org/guide/migration/#usage-of-history-state.`);\n }\n changeLocation(currentState.current, currentState, true);\n const state = assign({}, buildState(currentLocation.value, to, null), { position: currentState.position + 1 }, data);\n changeLocation(to, state, false);\n currentLocation.value = to;\n }\n return {\n location: currentLocation,\n state: historyState,\n push,\n replace\n };\n}\nfunction createWebHistory(base) {\n base = normalizeBase(base);\n const historyNavigation = useHistoryStateNavigation(base);\n const historyListeners = useHistoryListeners(base, historyNavigation.state, historyNavigation.location, historyNavigation.replace);\n function go(delta, triggerListeners = true) {\n if (!triggerListeners)\n historyListeners.pauseListeners();\n history.go(delta);\n }\n const routerHistory = assign({\n // it's overridden right after\n location: \"\",\n base,\n go,\n createHref: createHref.bind(null, base)\n }, historyNavigation, historyListeners);\n Object.defineProperty(routerHistory, \"location\", {\n enumerable: true,\n get: () => historyNavigation.location.value\n });\n Object.defineProperty(routerHistory, \"state\", {\n enumerable: true,\n get: () => historyNavigation.state.value\n });\n return routerHistory;\n}\nfunction isRouteLocation(route) {\n return typeof route === \"string\" || route && typeof route === \"object\";\n}\nfunction isRouteName(name) {\n return typeof name === \"string\" || typeof name === \"symbol\";\n}\nconst START_LOCATION_NORMALIZED = {\n path: \"/\",\n name: void 0,\n params: {},\n query: {},\n hash: \"\",\n fullPath: \"/\",\n matched: [],\n meta: {},\n redirectedFrom: void 0\n};\nconst NavigationFailureSymbol = Symbol(process.env.NODE_ENV !== \"production\" ? \"navigation failure\" : \"\");\nvar NavigationFailureType;\n(function(NavigationFailureType2) {\n NavigationFailureType2[NavigationFailureType2[\"aborted\"] = 4] = \"aborted\";\n NavigationFailureType2[NavigationFailureType2[\"cancelled\"] = 8] = \"cancelled\";\n NavigationFailureType2[NavigationFailureType2[\"duplicated\"] = 16] = \"duplicated\";\n})(NavigationFailureType || (NavigationFailureType = {}));\nconst ErrorTypeMessages = {\n [\n 1\n /* ErrorTypes.MATCHER_NOT_FOUND */\n ]({ location: location2, currentLocation }) {\n return `No match for\n ${JSON.stringify(location2)}${currentLocation ? \"\\nwhile being at\\n\" + JSON.stringify(currentLocation) : \"\"}`;\n },\n [\n 2\n /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */\n ]({ from, to }) {\n return `Redirected from \"${from.fullPath}\" to \"${stringifyRoute(to)}\" via a navigation guard.`;\n },\n [\n 4\n /* ErrorTypes.NAVIGATION_ABORTED */\n ]({ from, to }) {\n return `Navigation aborted from \"${from.fullPath}\" to \"${to.fullPath}\" via a navigation guard.`;\n },\n [\n 8\n /* ErrorTypes.NAVIGATION_CANCELLED */\n ]({ from, to }) {\n return `Navigation cancelled from \"${from.fullPath}\" to \"${to.fullPath}\" with a new navigation.`;\n },\n [\n 16\n /* ErrorTypes.NAVIGATION_DUPLICATED */\n ]({ from, to }) {\n return `Avoided redundant navigation to current location: \"${from.fullPath}\".`;\n }\n};\nfunction createRouterError(type2, params) {\n if (process.env.NODE_ENV !== \"production\" || false) {\n return assign(new Error(ErrorTypeMessages[type2](params)), {\n type: type2,\n [NavigationFailureSymbol]: true\n }, params);\n } else {\n return assign(new Error(), {\n type: type2,\n [NavigationFailureSymbol]: true\n }, params);\n }\n}\nfunction isNavigationFailure(error, type2) {\n return error instanceof Error && NavigationFailureSymbol in error && (type2 == null || !!(error.type & type2));\n}\nconst propertiesToLog = [\"params\", \"query\", \"hash\"];\nfunction stringifyRoute(to) {\n if (typeof to === \"string\")\n return to;\n if (\"path\" in to)\n return to.path;\n const location2 = {};\n for (const key of propertiesToLog) {\n if (key in to)\n location2[key] = to[key];\n }\n return JSON.stringify(location2, null, 2);\n}\nconst BASE_PARAM_PATTERN = \"[^/]+?\";\nconst BASE_PATH_PARSER_OPTIONS = {\n sensitive: false,\n strict: false,\n start: true,\n end: true\n};\nconst REGEX_CHARS_RE = /[.+*?^${}()[\\]/\\\\]/g;\nfunction tokensToParser(segments, extraOptions) {\n const options = assign({}, BASE_PATH_PARSER_OPTIONS, extraOptions);\n const score = [];\n let pattern = options.start ? \"^\" : \"\";\n const keys = [];\n for (const segment of segments) {\n const segmentScores = segment.length ? [] : [\n 90\n /* PathScore.Root */\n ];\n if (options.strict && !segment.length)\n pattern += \"/\";\n for (let tokenIndex = 0; tokenIndex < segment.length; tokenIndex++) {\n const token = segment[tokenIndex];\n let subSegmentScore = 40 + (options.sensitive ? 0.25 : 0);\n if (token.type === 0) {\n if (!tokenIndex)\n pattern += \"/\";\n pattern += token.value.replace(REGEX_CHARS_RE, \"\\\\$&\");\n subSegmentScore += 40;\n } else if (token.type === 1) {\n const { value, repeatable, optional, regexp } = token;\n keys.push({\n name: value,\n repeatable,\n optional\n });\n const re2 = regexp ? regexp : BASE_PARAM_PATTERN;\n if (re2 !== BASE_PARAM_PATTERN) {\n subSegmentScore += 10;\n try {\n new RegExp(`(${re2})`);\n } catch (err) {\n throw new Error(`Invalid custom RegExp for param \"${value}\" (${re2}): ` + err.message);\n }\n }\n let subPattern = repeatable ? `((?:${re2})(?:/(?:${re2}))*)` : `(${re2})`;\n if (!tokenIndex)\n subPattern = // avoid an optional / if there are more segments e.g. /:p?-static\n // or /:p?-:p2\n optional && segment.length < 2 ? `(?:/${subPattern})` : \"/\" + subPattern;\n if (optional)\n subPattern += \"?\";\n pattern += subPattern;\n subSegmentScore += 20;\n if (optional)\n subSegmentScore += -8;\n if (repeatable)\n subSegmentScore += -20;\n if (re2 === \".*\")\n subSegmentScore += -50;\n }\n segmentScores.push(subSegmentScore);\n }\n score.push(segmentScores);\n }\n if (options.strict && options.end) {\n const i = score.length - 1;\n score[i][score[i].length - 1] += 0.7000000000000001;\n }\n if (!options.strict)\n pattern += \"/?\";\n if (options.end)\n pattern += \"$\";\n else if (options.strict)\n pattern += \"(?:/|$)\";\n const re = new RegExp(pattern, options.sensitive ? \"\" : \"i\");\n function parse2(path) {\n const match = path.match(re);\n const params = {};\n if (!match)\n return null;\n for (let i = 1; i < match.length; i++) {\n const value = match[i] || \"\";\n const key = keys[i - 1];\n params[key.name] = value && key.repeatable ? value.split(\"/\") : value;\n }\n return params;\n }\n function stringify2(params) {\n let path = \"\";\n let avoidDuplicatedSlash = false;\n for (const segment of segments) {\n if (!avoidDuplicatedSlash || !path.endsWith(\"/\"))\n path += \"/\";\n avoidDuplicatedSlash = false;\n for (const token of segment) {\n if (token.type === 0) {\n path += token.value;\n } else if (token.type === 1) {\n const { value, repeatable, optional } = token;\n const param = value in params ? params[value] : \"\";\n if (isArray(param) && !repeatable) {\n throw new Error(`Provided param \"${value}\" is an array but it is not repeatable (* or + modifiers)`);\n }\n const text = isArray(param) ? param.join(\"/\") : param;\n if (!text) {\n if (optional) {\n if (segment.length < 2) {\n if (path.endsWith(\"/\"))\n path = path.slice(0, -1);\n else\n avoidDuplicatedSlash = true;\n }\n } else\n throw new Error(`Missing required param \"${value}\"`);\n }\n path += text;\n }\n }\n }\n return path || \"/\";\n }\n return {\n re,\n score,\n keys,\n parse: parse2,\n stringify: stringify2\n };\n}\nfunction compareScoreArray(a, b) {\n let i = 0;\n while (i < a.length && i < b.length) {\n const diff = b[i] - a[i];\n if (diff)\n return diff;\n i++;\n }\n if (a.length < b.length) {\n return a.length === 1 && a[0] === 40 + 40 ? -1 : 1;\n } else if (a.length > b.length) {\n return b.length === 1 && b[0] === 40 + 40 ? 1 : -1;\n }\n return 0;\n}\nfunction comparePathParserScore(a, b) {\n let i = 0;\n const aScore = a.score;\n const bScore = b.score;\n while (i < aScore.length && i < bScore.length) {\n const comp = compareScoreArray(aScore[i], bScore[i]);\n if (comp)\n return comp;\n i++;\n }\n if (Math.abs(bScore.length - aScore.length) === 1) {\n if (isLastScoreNegative(aScore))\n return 1;\n if (isLastScoreNegative(bScore))\n return -1;\n }\n return bScore.length - aScore.length;\n}\nfunction isLastScoreNegative(score) {\n const last = score[score.length - 1];\n return score.length > 0 && last[last.length - 1] < 0;\n}\nconst ROOT_TOKEN = {\n type: 0,\n value: \"\"\n};\nconst VALID_PARAM_RE = /[a-zA-Z0-9_]/;\nfunction tokenizePath(path) {\n if (!path)\n return [[]];\n if (path === \"/\")\n return [[ROOT_TOKEN]];\n if (!path.startsWith(\"/\")) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `Route paths should start with a \"/\": \"${path}\" should be \"/${path}\".` : `Invalid path \"${path}\"`);\n }\n function crash(message) {\n throw new Error(`ERR (${state})/\"${buffer}\": ${message}`);\n }\n let state = 0;\n let previousState = state;\n const tokens = [];\n let segment;\n function finalizeSegment() {\n if (segment)\n tokens.push(segment);\n segment = [];\n }\n let i = 0;\n let char;\n let buffer = \"\";\n let customRe = \"\";\n function consumeBuffer() {\n if (!buffer)\n return;\n if (state === 0) {\n segment.push({\n type: 0,\n value: buffer\n });\n } else if (state === 1 || state === 2 || state === 3) {\n if (segment.length > 1 && (char === \"*\" || char === \"+\"))\n crash(`A repeatable param (${buffer}) must be alone in its segment. eg: '/:ids+.`);\n segment.push({\n type: 1,\n value: buffer,\n regexp: customRe,\n repeatable: char === \"*\" || char === \"+\",\n optional: char === \"*\" || char === \"?\"\n });\n } else {\n crash(\"Invalid state to consume buffer\");\n }\n buffer = \"\";\n }\n function addCharToBuffer() {\n buffer += char;\n }\n while (i < path.length) {\n char = path[i++];\n if (char === \"\\\\\" && state !== 2) {\n previousState = state;\n state = 4;\n continue;\n }\n switch (state) {\n case 0:\n if (char === \"/\") {\n if (buffer) {\n consumeBuffer();\n }\n finalizeSegment();\n } else if (char === \":\") {\n consumeBuffer();\n state = 1;\n } else {\n addCharToBuffer();\n }\n break;\n case 4:\n addCharToBuffer();\n state = previousState;\n break;\n case 1:\n if (char === \"(\") {\n state = 2;\n } else if (VALID_PARAM_RE.test(char)) {\n addCharToBuffer();\n } else {\n consumeBuffer();\n state = 0;\n if (char !== \"*\" && char !== \"?\" && char !== \"+\")\n i--;\n }\n break;\n case 2:\n if (char === \")\") {\n if (customRe[customRe.length - 1] == \"\\\\\")\n customRe = customRe.slice(0, -1) + char;\n else\n state = 3;\n } else {\n customRe += char;\n }\n break;\n case 3:\n consumeBuffer();\n state = 0;\n if (char !== \"*\" && char !== \"?\" && char !== \"+\")\n i--;\n customRe = \"\";\n break;\n default:\n crash(\"Unknown state\");\n break;\n }\n }\n if (state === 2)\n crash(`Unfinished custom RegExp for param \"${buffer}\"`);\n consumeBuffer();\n finalizeSegment();\n return tokens;\n}\nfunction createRouteRecordMatcher(record, parent, options) {\n const parser = tokensToParser(tokenizePath(record.path), options);\n if (process.env.NODE_ENV !== \"production\") {\n const existingKeys = /* @__PURE__ */ new Set();\n for (const key of parser.keys) {\n if (existingKeys.has(key.name))\n warn(`Found duplicated params with name \"${key.name}\" for path \"${record.path}\". Only the last one will be available on \"$route.params\".`);\n existingKeys.add(key.name);\n }\n }\n const matcher = assign(parser, {\n record,\n parent,\n // these needs to be populated by the parent\n children: [],\n alias: []\n });\n if (parent) {\n if (!matcher.record.aliasOf === !parent.record.aliasOf)\n parent.children.push(matcher);\n }\n return matcher;\n}\nfunction createRouterMatcher(routes, globalOptions) {\n const matchers = [];\n const matcherMap = /* @__PURE__ */ new Map();\n globalOptions = mergeOptions({ strict: false, end: true, sensitive: false }, globalOptions);\n function getRecordMatcher(name) {\n return matcherMap.get(name);\n }\n function addRoute(record, parent, originalRecord) {\n const isRootAdd = !originalRecord;\n const mainNormalizedRecord = normalizeRouteRecord(record);\n if (process.env.NODE_ENV !== \"production\") {\n checkChildMissingNameWithEmptyPath(mainNormalizedRecord, parent);\n }\n mainNormalizedRecord.aliasOf = originalRecord && originalRecord.record;\n const options = mergeOptions(globalOptions, record);\n const normalizedRecords = [\n mainNormalizedRecord\n ];\n if (\"alias\" in record) {\n const aliases = typeof record.alias === \"string\" ? [record.alias] : record.alias;\n for (const alias of aliases) {\n normalizedRecords.push(assign({}, mainNormalizedRecord, {\n // this allows us to hold a copy of the `components` option\n // so that async components cache is hold on the original record\n components: originalRecord ? originalRecord.record.components : mainNormalizedRecord.components,\n path: alias,\n // we might be the child of an alias\n aliasOf: originalRecord ? originalRecord.record : mainNormalizedRecord\n // the aliases are always of the same kind as the original since they\n // are defined on the same record\n }));\n }\n }\n let matcher;\n let originalMatcher;\n for (const normalizedRecord of normalizedRecords) {\n const { path } = normalizedRecord;\n if (parent && path[0] !== \"/\") {\n const parentPath = parent.record.path;\n const connectingSlash = parentPath[parentPath.length - 1] === \"/\" ? \"\" : \"/\";\n normalizedRecord.path = parent.record.path + (path && connectingSlash + path);\n }\n if (process.env.NODE_ENV !== \"production\" && normalizedRecord.path === \"*\") {\n throw new Error('Catch all routes (\"*\") must now be defined using a param with a custom regexp.\\nSee more at https://next.router.vuejs.org/guide/migration/#removed-star-or-catch-all-routes.');\n }\n matcher = createRouteRecordMatcher(normalizedRecord, parent, options);\n if (process.env.NODE_ENV !== \"production\" && parent && path[0] === \"/\")\n checkMissingParamsInAbsolutePath(matcher, parent);\n if (originalRecord) {\n originalRecord.alias.push(matcher);\n if (process.env.NODE_ENV !== \"production\") {\n checkSameParams(originalRecord, matcher);\n }\n } else {\n originalMatcher = originalMatcher || matcher;\n if (originalMatcher !== matcher)\n originalMatcher.alias.push(matcher);\n if (isRootAdd && record.name && !isAliasRecord(matcher))\n removeRoute(record.name);\n }\n if (mainNormalizedRecord.children) {\n const children = mainNormalizedRecord.children;\n for (let i = 0; i < children.length; i++) {\n addRoute(children[i], matcher, originalRecord && originalRecord.children[i]);\n }\n }\n originalRecord = originalRecord || matcher;\n if (matcher.record.components && Object.keys(matcher.record.components).length || matcher.record.name || matcher.record.redirect) {\n insertMatcher(matcher);\n }\n }\n return originalMatcher ? () => {\n removeRoute(originalMatcher);\n } : noop;\n }\n function removeRoute(matcherRef) {\n if (isRouteName(matcherRef)) {\n const matcher = matcherMap.get(matcherRef);\n if (matcher) {\n matcherMap.delete(matcherRef);\n matchers.splice(matchers.indexOf(matcher), 1);\n matcher.children.forEach(removeRoute);\n matcher.alias.forEach(removeRoute);\n }\n } else {\n const index2 = matchers.indexOf(matcherRef);\n if (index2 > -1) {\n matchers.splice(index2, 1);\n if (matcherRef.record.name)\n matcherMap.delete(matcherRef.record.name);\n matcherRef.children.forEach(removeRoute);\n matcherRef.alias.forEach(removeRoute);\n }\n }\n }\n function getRoutes() {\n return matchers;\n }\n function insertMatcher(matcher) {\n let i = 0;\n while (i < matchers.length && comparePathParserScore(matcher, matchers[i]) >= 0 && // Adding children with empty path should still appear before the parent\n // https://github.com/vuejs/router/issues/1124\n (matcher.record.path !== matchers[i].record.path || !isRecordChildOf(matcher, matchers[i])))\n i++;\n matchers.splice(i, 0, matcher);\n if (matcher.record.name && !isAliasRecord(matcher))\n matcherMap.set(matcher.record.name, matcher);\n }\n function resolve(location2, currentLocation) {\n let matcher;\n let params = {};\n let path;\n let name;\n if (\"name\" in location2 && location2.name) {\n matcher = matcherMap.get(location2.name);\n if (!matcher)\n throw createRouterError(1, {\n location: location2\n });\n if (process.env.NODE_ENV !== \"production\") {\n const invalidParams = Object.keys(location2.params || {}).filter((paramName) => !matcher.keys.find((k) => k.name === paramName));\n if (invalidParams.length) {\n warn(`Discarded invalid param(s) \"${invalidParams.join('\", \"')}\" when navigating. See https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 for more details.`);\n }\n }\n name = matcher.record.name;\n params = assign(\n // paramsFromLocation is a new object\n paramsFromLocation(\n currentLocation.params,\n // only keep params that exist in the resolved location\n // TODO: only keep optional params coming from a parent record\n matcher.keys.filter((k) => !k.optional).map((k) => k.name)\n ),\n // discard any existing params in the current location that do not exist here\n // #1497 this ensures better active/exact matching\n location2.params && paramsFromLocation(location2.params, matcher.keys.map((k) => k.name))\n );\n path = matcher.stringify(params);\n } else if (\"path\" in location2) {\n path = location2.path;\n if (process.env.NODE_ENV !== \"production\" && !path.startsWith(\"/\")) {\n warn(`The Matcher cannot resolve relative paths but received \"${path}\". Unless you directly called \\`matcher.resolve(\"${path}\")\\`, this is probably a bug in vue-router. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/router.`);\n }\n matcher = matchers.find((m2) => m2.re.test(path));\n if (matcher) {\n params = matcher.parse(path);\n name = matcher.record.name;\n }\n } else {\n matcher = currentLocation.name ? matcherMap.get(currentLocation.name) : matchers.find((m2) => m2.re.test(currentLocation.path));\n if (!matcher)\n throw createRouterError(1, {\n location: location2,\n currentLocation\n });\n name = matcher.record.name;\n params = assign({}, currentLocation.params, location2.params);\n path = matcher.stringify(params);\n }\n const matched = [];\n let parentMatcher = matcher;\n while (parentMatcher) {\n matched.unshift(parentMatcher.record);\n parentMatcher = parentMatcher.parent;\n }\n return {\n name,\n path,\n params,\n matched,\n meta: mergeMetaFields(matched)\n };\n }\n routes.forEach((route) => addRoute(route));\n return { addRoute, resolve, removeRoute, getRoutes, getRecordMatcher };\n}\nfunction paramsFromLocation(params, keys) {\n const newParams = {};\n for (const key of keys) {\n if (key in params)\n newParams[key] = params[key];\n }\n return newParams;\n}\nfunction normalizeRouteRecord(record) {\n return {\n path: record.path,\n redirect: record.redirect,\n name: record.name,\n meta: record.meta || {},\n aliasOf: void 0,\n beforeEnter: record.beforeEnter,\n props: normalizeRecordProps(record),\n children: record.children || [],\n instances: {},\n leaveGuards: /* @__PURE__ */ new Set(),\n updateGuards: /* @__PURE__ */ new Set(),\n enterCallbacks: {},\n components: \"components\" in record ? record.components || null : record.component && { default: record.component }\n };\n}\nfunction normalizeRecordProps(record) {\n const propsObject = {};\n const props = record.props || false;\n if (\"component\" in record) {\n propsObject.default = props;\n } else {\n for (const name in record.components)\n propsObject[name] = typeof props === \"boolean\" ? props : props[name];\n }\n return propsObject;\n}\nfunction isAliasRecord(record) {\n while (record) {\n if (record.record.aliasOf)\n return true;\n record = record.parent;\n }\n return false;\n}\nfunction mergeMetaFields(matched) {\n return matched.reduce((meta, record) => assign(meta, record.meta), {});\n}\nfunction mergeOptions(defaults, partialOptions) {\n const options = {};\n for (const key in defaults) {\n options[key] = key in partialOptions ? partialOptions[key] : defaults[key];\n }\n return options;\n}\nfunction isSameParam(a, b) {\n return a.name === b.name && a.optional === b.optional && a.repeatable === b.repeatable;\n}\nfunction checkSameParams(a, b) {\n for (const key of a.keys) {\n if (!key.optional && !b.keys.find(isSameParam.bind(null, key)))\n return warn(`Alias \"${b.record.path}\" and the original record: \"${a.record.path}\" must have the exact same param named \"${key.name}\"`);\n }\n for (const key of b.keys) {\n if (!key.optional && !a.keys.find(isSameParam.bind(null, key)))\n return warn(`Alias \"${b.record.path}\" and the original record: \"${a.record.path}\" must have the exact same param named \"${key.name}\"`);\n }\n}\nfunction checkChildMissingNameWithEmptyPath(mainNormalizedRecord, parent) {\n if (parent && parent.record.name && !mainNormalizedRecord.name && !mainNormalizedRecord.path) {\n warn(`The route named \"${String(parent.record.name)}\" has a child without a name and an empty path. Using that name won't render the empty path child so you probably want to move the name to the child instead. If this is intentional, add a name to the child route to remove the warning.`);\n }\n}\nfunction checkMissingParamsInAbsolutePath(record, parent) {\n for (const key of parent.keys) {\n if (!record.keys.find(isSameParam.bind(null, key)))\n return warn(`Absolute path \"${record.record.path}\" must have the exact same param named \"${key.name}\" as its parent \"${parent.record.path}\".`);\n }\n}\nfunction isRecordChildOf(record, parent) {\n return parent.children.some((child) => child === record || isRecordChildOf(record, child));\n}\nconst HASH_RE = /#/g;\nconst AMPERSAND_RE = /&/g;\nconst SLASH_RE = /\\//g;\nconst EQUAL_RE = /=/g;\nconst IM_RE = /\\?/g;\nconst PLUS_RE = /\\+/g;\nconst ENC_BRACKET_OPEN_RE = /%5B/g;\nconst ENC_BRACKET_CLOSE_RE = /%5D/g;\nconst ENC_CARET_RE = /%5E/g;\nconst ENC_BACKTICK_RE = /%60/g;\nconst ENC_CURLY_OPEN_RE = /%7B/g;\nconst ENC_PIPE_RE = /%7C/g;\nconst ENC_CURLY_CLOSE_RE = /%7D/g;\nconst ENC_SPACE_RE = /%20/g;\nfunction commonEncode(text) {\n return encodeURI(\"\" + text).replace(ENC_PIPE_RE, \"|\").replace(ENC_BRACKET_OPEN_RE, \"[\").replace(ENC_BRACKET_CLOSE_RE, \"]\");\n}\nfunction encodeHash(text) {\n return commonEncode(text).replace(ENC_CURLY_OPEN_RE, \"{\").replace(ENC_CURLY_CLOSE_RE, \"}\").replace(ENC_CARET_RE, \"^\");\n}\nfunction encodeQueryValue(text) {\n return commonEncode(text).replace(PLUS_RE, \"%2B\").replace(ENC_SPACE_RE, \"+\").replace(HASH_RE, \"%23\").replace(AMPERSAND_RE, \"%26\").replace(ENC_BACKTICK_RE, \"`\").replace(ENC_CURLY_OPEN_RE, \"{\").replace(ENC_CURLY_CLOSE_RE, \"}\").replace(ENC_CARET_RE, \"^\");\n}\nfunction encodeQueryKey(text) {\n return encodeQueryValue(text).replace(EQUAL_RE, \"%3D\");\n}\nfunction encodePath(text) {\n return commonEncode(text).replace(HASH_RE, \"%23\").replace(IM_RE, \"%3F\");\n}\nfunction encodeParam(text) {\n return text == null ? \"\" : encodePath(text).replace(SLASH_RE, \"%2F\");\n}\nfunction decode(text) {\n try {\n return decodeURIComponent(\"\" + text);\n } catch (err) {\n process.env.NODE_ENV !== \"production\" && warn(`Error decoding \"${text}\". Using original value`);\n }\n return \"\" + text;\n}\nfunction parseQuery(search) {\n const query = {};\n if (search === \"\" || search === \"?\")\n return query;\n const hasLeadingIM = search[0] === \"?\";\n const searchParams = (hasLeadingIM ? search.slice(1) : search).split(\"&\");\n for (let i = 0; i < searchParams.length; ++i) {\n const searchParam = searchParams[i].replace(PLUS_RE, \" \");\n const eqPos = searchParam.indexOf(\"=\");\n const key = decode(eqPos < 0 ? searchParam : searchParam.slice(0, eqPos));\n const value = eqPos < 0 ? null : decode(searchParam.slice(eqPos + 1));\n if (key in query) {\n let currentValue = query[key];\n if (!isArray(currentValue)) {\n currentValue = query[key] = [currentValue];\n }\n currentValue.push(value);\n } else {\n query[key] = value;\n }\n }\n return query;\n}\nfunction stringifyQuery(query) {\n let search = \"\";\n for (let key in query) {\n const value = query[key];\n key = encodeQueryKey(key);\n if (value == null) {\n if (value !== void 0) {\n search += (search.length ? \"&\" : \"\") + key;\n }\n continue;\n }\n const values = isArray(value) ? value.map((v) => v && encodeQueryValue(v)) : [value && encodeQueryValue(value)];\n values.forEach((value2) => {\n if (value2 !== void 0) {\n search += (search.length ? \"&\" : \"\") + key;\n if (value2 != null)\n search += \"=\" + value2;\n }\n });\n }\n return search;\n}\nfunction normalizeQuery(query) {\n const normalizedQuery = {};\n for (const key in query) {\n const value = query[key];\n if (value !== void 0) {\n normalizedQuery[key] = isArray(value) ? value.map((v) => v == null ? null : \"\" + v) : value == null ? value : \"\" + value;\n }\n }\n return normalizedQuery;\n}\nconst matchedRouteKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"router view location matched\" : \"\");\nconst viewDepthKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"router view depth\" : \"\");\nconst routerKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"router\" : \"\");\nconst routeLocationKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"route location\" : \"\");\nconst routerViewLocationKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"router view location\" : \"\");\nfunction useCallbacks() {\n let handlers = [];\n function add(handler) {\n handlers.push(handler);\n return () => {\n const i = handlers.indexOf(handler);\n if (i > -1)\n handlers.splice(i, 1);\n };\n }\n function reset() {\n handlers = [];\n }\n return {\n add,\n list: () => handlers,\n reset\n };\n}\nfunction guardToPromiseFn(guard, to, from, record, name) {\n const enterCallbackArray = record && // name is defined if record is because of the function overload\n (record.enterCallbacks[name] = record.enterCallbacks[name] || []);\n return () => new Promise((resolve, reject) => {\n const next = (valid) => {\n if (valid === false) {\n reject(createRouterError(4, {\n from,\n to\n }));\n } else if (valid instanceof Error) {\n reject(valid);\n } else if (isRouteLocation(valid)) {\n reject(createRouterError(2, {\n from: to,\n to: valid\n }));\n } else {\n if (enterCallbackArray && // since enterCallbackArray is truthy, both record and name also are\n record.enterCallbacks[name] === enterCallbackArray && typeof valid === \"function\") {\n enterCallbackArray.push(valid);\n }\n resolve();\n }\n };\n const guardReturn = guard.call(record && record.instances[name], to, from, process.env.NODE_ENV !== \"production\" ? canOnlyBeCalledOnce(next, to, from) : next);\n let guardCall = Promise.resolve(guardReturn);\n if (guard.length < 3)\n guardCall = guardCall.then(next);\n if (process.env.NODE_ENV !== \"production\" && guard.length > 2) {\n const message = `The \"next\" callback was never called inside of ${guard.name ? '\"' + guard.name + '\"' : \"\"}:\n${guard.toString()}\n. If you are returning a value instead of calling \"next\", make sure to remove the \"next\" parameter from your function.`;\n if (typeof guardReturn === \"object\" && \"then\" in guardReturn) {\n guardCall = guardCall.then((resolvedValue) => {\n if (!next._called) {\n warn(message);\n return Promise.reject(new Error(\"Invalid navigation guard\"));\n }\n return resolvedValue;\n });\n } else if (guardReturn !== void 0) {\n if (!next._called) {\n warn(message);\n reject(new Error(\"Invalid navigation guard\"));\n return;\n }\n }\n }\n guardCall.catch((err) => reject(err));\n });\n}\nfunction canOnlyBeCalledOnce(next, to, from) {\n let called = 0;\n return function() {\n if (called++ === 1)\n warn(`The \"next\" callback was called more than once in one navigation guard when going from \"${from.fullPath}\" to \"${to.fullPath}\". It should be called exactly one time in each navigation guard. This will fail in production.`);\n next._called = true;\n if (called === 1)\n next.apply(null, arguments);\n };\n}\nfunction extractComponentsGuards(matched, guardType, to, from) {\n const guards = [];\n for (const record of matched) {\n if (process.env.NODE_ENV !== \"production\" && !record.components && !record.children.length) {\n warn(`Record with path \"${record.path}\" is either missing a \"component(s)\" or \"children\" property.`);\n }\n for (const name in record.components) {\n let rawComponent = record.components[name];\n if (process.env.NODE_ENV !== \"production\") {\n if (!rawComponent || typeof rawComponent !== \"object\" && typeof rawComponent !== \"function\") {\n warn(`Component \"${name}\" in record with path \"${record.path}\" is not a valid component. Received \"${String(rawComponent)}\".`);\n throw new Error(\"Invalid route component\");\n } else if (\"then\" in rawComponent) {\n warn(`Component \"${name}\" in record with path \"${record.path}\" is a Promise instead of a function that returns a Promise. Did you write \"import('./MyPage.vue')\" instead of \"() => import('./MyPage.vue')\" ? This will break in production if not fixed.`);\n const promise = rawComponent;\n rawComponent = () => promise;\n } else if (rawComponent.__asyncLoader && // warn only once per component\n !rawComponent.__warnedDefineAsync) {\n rawComponent.__warnedDefineAsync = true;\n warn(`Component \"${name}\" in record with path \"${record.path}\" is defined using \"defineAsyncComponent()\". Write \"() => import('./MyPage.vue')\" instead of \"defineAsyncComponent(() => import('./MyPage.vue'))\".`);\n }\n }\n if (guardType !== \"beforeRouteEnter\" && !record.instances[name])\n continue;\n if (isRouteComponent(rawComponent)) {\n const options = rawComponent.__vccOpts || rawComponent;\n const guard = options[guardType];\n guard && guards.push(guardToPromiseFn(guard, to, from, record, name));\n } else {\n let componentPromise = rawComponent();\n if (process.env.NODE_ENV !== \"production\" && !(\"catch\" in componentPromise)) {\n warn(`Component \"${name}\" in record with path \"${record.path}\" is a function that does not return a Promise. If you were passing a functional component, make sure to add a \"displayName\" to the component. This will break in production if not fixed.`);\n componentPromise = Promise.resolve(componentPromise);\n }\n guards.push(() => componentPromise.then((resolved) => {\n if (!resolved)\n return Promise.reject(new Error(`Couldn't resolve component \"${name}\" at \"${record.path}\"`));\n const resolvedComponent = isESModule(resolved) ? resolved.default : resolved;\n record.components[name] = resolvedComponent;\n const options = resolvedComponent.__vccOpts || resolvedComponent;\n const guard = options[guardType];\n return guard && guardToPromiseFn(guard, to, from, record, name)();\n }));\n }\n }\n }\n return guards;\n}\nfunction isRouteComponent(component) {\n return typeof component === \"object\" || \"displayName\" in component || \"props\" in component || \"__vccOpts\" in component;\n}\nfunction useLink(props) {\n const router2 = inject(routerKey);\n const currentRoute = inject(routeLocationKey);\n const route = computed(() => router2.resolve(unref(props.to)));\n const activeRecordIndex = computed(() => {\n const { matched } = route.value;\n const { length } = matched;\n const routeMatched = matched[length - 1];\n const currentMatched = currentRoute.matched;\n if (!routeMatched || !currentMatched.length)\n return -1;\n const index2 = currentMatched.findIndex(isSameRouteRecord.bind(null, routeMatched));\n if (index2 > -1)\n return index2;\n const parentRecordPath = getOriginalPath(matched[length - 2]);\n return (\n // we are dealing with nested routes\n length > 1 && // if the parent and matched route have the same path, this link is\n // referring to the empty child. Or we currently are on a different\n // child of the same parent\n getOriginalPath(routeMatched) === parentRecordPath && // avoid comparing the child with its parent\n currentMatched[currentMatched.length - 1].path !== parentRecordPath ? currentMatched.findIndex(isSameRouteRecord.bind(null, matched[length - 2])) : index2\n );\n });\n const isActive = computed(() => activeRecordIndex.value > -1 && includesParams(currentRoute.params, route.value.params));\n const isExactActive = computed(() => activeRecordIndex.value > -1 && activeRecordIndex.value === currentRoute.matched.length - 1 && isSameRouteLocationParams(currentRoute.params, route.value.params));\n function navigate(e = {}) {\n if (guardEvent(e)) {\n return router2[unref(props.replace) ? \"replace\" : \"push\"](\n unref(props.to)\n // avoid uncaught errors are they are logged anyway\n ).catch(noop);\n }\n return Promise.resolve();\n }\n if ((process.env.NODE_ENV !== \"production\" || false) && isBrowser) {\n const instance = getCurrentInstance();\n if (instance) {\n const linkContextDevtools = {\n route: route.value,\n isActive: isActive.value,\n isExactActive: isExactActive.value\n };\n instance.__vrl_devtools = instance.__vrl_devtools || [];\n instance.__vrl_devtools.push(linkContextDevtools);\n watchEffect(() => {\n linkContextDevtools.route = route.value;\n linkContextDevtools.isActive = isActive.value;\n linkContextDevtools.isExactActive = isExactActive.value;\n }, { flush: \"post\" });\n }\n }\n return {\n route,\n href: computed(() => route.value.href),\n isActive,\n isExactActive,\n navigate\n };\n}\nconst RouterLinkImpl = /* @__PURE__ */ defineComponent({\n name: \"RouterLink\",\n compatConfig: { MODE: 3 },\n props: {\n to: {\n type: [String, Object],\n required: true\n },\n replace: Boolean,\n activeClass: String,\n // inactiveClass: String,\n exactActiveClass: String,\n custom: Boolean,\n ariaCurrentValue: {\n type: String,\n default: \"page\"\n }\n },\n useLink,\n setup(props, { slots }) {\n const link = reactive(useLink(props));\n const { options } = inject(routerKey);\n const elClass = computed(() => ({\n [getLinkClass(props.activeClass, options.linkActiveClass, \"router-link-active\")]: link.isActive,\n // [getLinkClass(\n // props.inactiveClass,\n // options.linkInactiveClass,\n // 'router-link-inactive'\n // )]: !link.isExactActive,\n [getLinkClass(props.exactActiveClass, options.linkExactActiveClass, \"router-link-exact-active\")]: link.isExactActive\n }));\n return () => {\n const children = slots.default && slots.default(link);\n return props.custom ? children : h$1(\"a\", {\n \"aria-current\": link.isExactActive ? props.ariaCurrentValue : null,\n href: link.href,\n // this would override user added attrs but Vue will still add\n // the listener, so we end up triggering both\n onClick: link.navigate,\n class: elClass.value\n }, children);\n };\n }\n});\nconst RouterLink = RouterLinkImpl;\nfunction guardEvent(e) {\n if (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey)\n return;\n if (e.defaultPrevented)\n return;\n if (e.button !== void 0 && e.button !== 0)\n return;\n if (e.currentTarget && e.currentTarget.getAttribute) {\n const target = e.currentTarget.getAttribute(\"target\");\n if (/\\b_blank\\b/i.test(target))\n return;\n }\n if (e.preventDefault)\n e.preventDefault();\n return true;\n}\nfunction includesParams(outer, inner) {\n for (const key in inner) {\n const innerValue = inner[key];\n const outerValue = outer[key];\n if (typeof innerValue === \"string\") {\n if (innerValue !== outerValue)\n return false;\n } else {\n if (!isArray(outerValue) || outerValue.length !== innerValue.length || innerValue.some((value, i) => value !== outerValue[i]))\n return false;\n }\n }\n return true;\n}\nfunction getOriginalPath(record) {\n return record ? record.aliasOf ? record.aliasOf.path : record.path : \"\";\n}\nconst getLinkClass = (propClass, globalClass, defaultClass) => propClass != null ? propClass : globalClass != null ? globalClass : defaultClass;\nconst RouterViewImpl = /* @__PURE__ */ defineComponent({\n name: \"RouterView\",\n // #674 we manually inherit them\n inheritAttrs: false,\n props: {\n name: {\n type: String,\n default: \"default\"\n },\n route: Object\n },\n // Better compat for @vue/compat users\n // https://github.com/vuejs/router/issues/1315\n compatConfig: { MODE: 3 },\n setup(props, { attrs, slots }) {\n process.env.NODE_ENV !== \"production\" && warnDeprecatedUsage();\n const injectedRoute = inject(routerViewLocationKey);\n const routeToDisplay = computed(() => props.route || injectedRoute.value);\n const injectedDepth = inject(viewDepthKey, 0);\n const depth = computed(() => {\n let initialDepth = unref(injectedDepth);\n const { matched } = routeToDisplay.value;\n let matchedRoute;\n while ((matchedRoute = matched[initialDepth]) && !matchedRoute.components) {\n initialDepth++;\n }\n return initialDepth;\n });\n const matchedRouteRef = computed(() => routeToDisplay.value.matched[depth.value]);\n provide(viewDepthKey, computed(() => depth.value + 1));\n provide(matchedRouteKey, matchedRouteRef);\n provide(routerViewLocationKey, routeToDisplay);\n const viewRef = ref();\n watch(() => [viewRef.value, matchedRouteRef.value, props.name], ([instance, to, name], [oldInstance, from, oldName]) => {\n if (to) {\n to.instances[name] = instance;\n if (from && from !== to && instance && instance === oldInstance) {\n if (!to.leaveGuards.size) {\n to.leaveGuards = from.leaveGuards;\n }\n if (!to.updateGuards.size) {\n to.updateGuards = from.updateGuards;\n }\n }\n }\n if (instance && to && // if there is no instance but to and from are the same this might be\n // the first visit\n (!from || !isSameRouteRecord(to, from) || !oldInstance)) {\n (to.enterCallbacks[name] || []).forEach((callback) => callback(instance));\n }\n }, { flush: \"post\" });\n return () => {\n const route = routeToDisplay.value;\n const currentName = props.name;\n const matchedRoute = matchedRouteRef.value;\n const ViewComponent = matchedRoute && matchedRoute.components[currentName];\n if (!ViewComponent) {\n return normalizeSlot(slots.default, { Component: ViewComponent, route });\n }\n const routePropsOption = matchedRoute.props[currentName];\n const routeProps = routePropsOption ? routePropsOption === true ? route.params : typeof routePropsOption === \"function\" ? routePropsOption(route) : routePropsOption : null;\n const onVnodeUnmounted = (vnode) => {\n if (vnode.component.isUnmounted) {\n matchedRoute.instances[currentName] = null;\n }\n };\n const component = h$1(ViewComponent, assign({}, routeProps, attrs, {\n onVnodeUnmounted,\n ref: viewRef\n }));\n if ((process.env.NODE_ENV !== \"production\" || false) && isBrowser && component.ref) {\n const info = {\n depth: depth.value,\n name: matchedRoute.name,\n path: matchedRoute.path,\n meta: matchedRoute.meta\n };\n const internalInstances = isArray(component.ref) ? component.ref.map((r) => r.i) : [component.ref.i];\n internalInstances.forEach((instance) => {\n instance.__vrv_devtools = info;\n });\n }\n return (\n // pass the vnode to the slot as a prop.\n // h and both accept vnodes\n normalizeSlot(slots.default, { Component: component, route }) || component\n );\n };\n }\n});\nfunction normalizeSlot(slot, data) {\n if (!slot)\n return null;\n const slotContent = slot(data);\n return slotContent.length === 1 ? slotContent[0] : slotContent;\n}\nconst RouterView = RouterViewImpl;\nfunction warnDeprecatedUsage() {\n const instance = getCurrentInstance();\n const parentName = instance.parent && instance.parent.type.name;\n if (parentName && (parentName === \"KeepAlive\" || parentName.includes(\"Transition\"))) {\n const comp = parentName === \"KeepAlive\" ? \"keep-alive\" : \"transition\";\n warn(` can no longer be used directly inside or .\nUse slot props instead:\n\n\n <${comp}>\n \n \n`);\n }\n}\nfunction formatRouteLocation(routeLocation, tooltip) {\n const copy = assign({}, routeLocation, {\n // remove variables that can contain vue instances\n matched: routeLocation.matched.map((matched) => omit(matched, [\"instances\", \"children\", \"aliasOf\"]))\n });\n return {\n _custom: {\n type: null,\n readOnly: true,\n display: routeLocation.fullPath,\n tooltip,\n value: copy\n }\n };\n}\nfunction formatDisplay(display) {\n return {\n _custom: {\n display\n }\n };\n}\nlet routerId = 0;\nfunction addDevtools(app, router2, matcher) {\n if (router2.__hasDevtools)\n return;\n router2.__hasDevtools = true;\n const id = routerId++;\n setupDevtoolsPlugin({\n id: \"org.vuejs.router\" + (id ? \".\" + id : \"\"),\n label: \"Vue Router\",\n packageName: \"vue-router\",\n homepage: \"https://router.vuejs.org\",\n logo: \"https://router.vuejs.org/logo.png\",\n componentStateTypes: [\"Routing\"],\n app\n }, (api) => {\n if (typeof api.now !== \"function\") {\n console.warn(\"[Vue Router]: You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html.\");\n }\n api.on.inspectComponent((payload, ctx) => {\n if (payload.instanceData) {\n payload.instanceData.state.push({\n type: \"Routing\",\n key: \"$route\",\n editable: false,\n value: formatRouteLocation(router2.currentRoute.value, \"Current Route\")\n });\n }\n });\n api.on.visitComponentTree(({ treeNode: node, componentInstance }) => {\n if (componentInstance.__vrv_devtools) {\n const info = componentInstance.__vrv_devtools;\n node.tags.push({\n label: (info.name ? `${info.name.toString()}: ` : \"\") + info.path,\n textColor: 0,\n tooltip: \"This component is rendered by <router-view>\",\n backgroundColor: PINK_500\n });\n }\n if (isArray(componentInstance.__vrl_devtools)) {\n componentInstance.__devtoolsApi = api;\n componentInstance.__vrl_devtools.forEach((devtoolsData) => {\n let backgroundColor = ORANGE_400;\n let tooltip = \"\";\n if (devtoolsData.isExactActive) {\n backgroundColor = LIME_500;\n tooltip = \"This is exactly active\";\n } else if (devtoolsData.isActive) {\n backgroundColor = BLUE_600;\n tooltip = \"This link is active\";\n }\n node.tags.push({\n label: devtoolsData.route.path,\n textColor: 0,\n tooltip,\n backgroundColor\n });\n });\n }\n });\n watch(router2.currentRoute, () => {\n refreshRoutesView();\n api.notifyComponentUpdate();\n api.sendInspectorTree(routerInspectorId);\n api.sendInspectorState(routerInspectorId);\n });\n const navigationsLayerId = \"router:navigations:\" + id;\n api.addTimelineLayer({\n id: navigationsLayerId,\n label: `Router${id ? \" \" + id : \"\"} Navigations`,\n color: 4237508\n });\n router2.onError((error, to) => {\n api.addTimelineEvent({\n layerId: navigationsLayerId,\n event: {\n title: \"Error during Navigation\",\n subtitle: to.fullPath,\n logType: \"error\",\n time: api.now(),\n data: { error },\n groupId: to.meta.__navigationId\n }\n });\n });\n let navigationId = 0;\n router2.beforeEach((to, from) => {\n const data = {\n guard: formatDisplay(\"beforeEach\"),\n from: formatRouteLocation(from, \"Current Location during this navigation\"),\n to: formatRouteLocation(to, \"Target location\")\n };\n Object.defineProperty(to.meta, \"__navigationId\", {\n value: navigationId++\n });\n api.addTimelineEvent({\n layerId: navigationsLayerId,\n event: {\n time: api.now(),\n title: \"Start of navigation\",\n subtitle: to.fullPath,\n data,\n groupId: to.meta.__navigationId\n }\n });\n });\n router2.afterEach((to, from, failure) => {\n const data = {\n guard: formatDisplay(\"afterEach\")\n };\n if (failure) {\n data.failure = {\n _custom: {\n type: Error,\n readOnly: true,\n display: failure ? failure.message : \"\",\n tooltip: \"Navigation Failure\",\n value: failure\n }\n };\n data.status = formatDisplay(\"❌\");\n } else {\n data.status = formatDisplay(\"✅\");\n }\n data.from = formatRouteLocation(from, \"Current Location during this navigation\");\n data.to = formatRouteLocation(to, \"Target location\");\n api.addTimelineEvent({\n layerId: navigationsLayerId,\n event: {\n title: \"End of navigation\",\n subtitle: to.fullPath,\n time: api.now(),\n data,\n logType: failure ? \"warning\" : \"default\",\n groupId: to.meta.__navigationId\n }\n });\n });\n const routerInspectorId = \"router-inspector:\" + id;\n api.addInspector({\n id: routerInspectorId,\n label: \"Routes\" + (id ? \" \" + id : \"\"),\n icon: \"book\",\n treeFilterPlaceholder: \"Search routes\"\n });\n function refreshRoutesView() {\n if (!activeRoutesPayload)\n return;\n const payload = activeRoutesPayload;\n let routes = matcher.getRoutes().filter((route) => !route.parent);\n routes.forEach(resetMatchStateOnRouteRecord);\n if (payload.filter) {\n routes = routes.filter((route) => (\n // save matches state based on the payload\n isRouteMatching(route, payload.filter.toLowerCase())\n ));\n }\n routes.forEach((route) => markRouteRecordActive(route, router2.currentRoute.value));\n payload.rootNodes = routes.map(formatRouteRecordForInspector);\n }\n let activeRoutesPayload;\n api.on.getInspectorTree((payload) => {\n activeRoutesPayload = payload;\n if (payload.app === app && payload.inspectorId === routerInspectorId) {\n refreshRoutesView();\n }\n });\n api.on.getInspectorState((payload) => {\n if (payload.app === app && payload.inspectorId === routerInspectorId) {\n const routes = matcher.getRoutes();\n const route = routes.find((route2) => route2.record.__vd_id === payload.nodeId);\n if (route) {\n payload.state = {\n options: formatRouteRecordMatcherForStateInspector(route)\n };\n }\n }\n });\n api.sendInspectorTree(routerInspectorId);\n api.sendInspectorState(routerInspectorId);\n });\n}\nfunction modifierForKey(key) {\n if (key.optional) {\n return key.repeatable ? \"*\" : \"?\";\n } else {\n return key.repeatable ? \"+\" : \"\";\n }\n}\nfunction formatRouteRecordMatcherForStateInspector(route) {\n const { record } = route;\n const fields = [\n { editable: false, key: \"path\", value: record.path }\n ];\n if (record.name != null) {\n fields.push({\n editable: false,\n key: \"name\",\n value: record.name\n });\n }\n fields.push({ editable: false, key: \"regexp\", value: route.re });\n if (route.keys.length) {\n fields.push({\n editable: false,\n key: \"keys\",\n value: {\n _custom: {\n type: null,\n readOnly: true,\n display: route.keys.map((key) => `${key.name}${modifierForKey(key)}`).join(\" \"),\n tooltip: \"Param keys\",\n value: route.keys\n }\n }\n });\n }\n if (record.redirect != null) {\n fields.push({\n editable: false,\n key: \"redirect\",\n value: record.redirect\n });\n }\n if (route.alias.length) {\n fields.push({\n editable: false,\n key: \"aliases\",\n value: route.alias.map((alias) => alias.record.path)\n });\n }\n if (Object.keys(route.record.meta).length) {\n fields.push({\n editable: false,\n key: \"meta\",\n value: route.record.meta\n });\n }\n fields.push({\n key: \"score\",\n editable: false,\n value: {\n _custom: {\n type: null,\n readOnly: true,\n display: route.score.map((score) => score.join(\", \")).join(\" | \"),\n tooltip: \"Score used to sort routes\",\n value: route.score\n }\n }\n });\n return fields;\n}\nconst PINK_500 = 15485081;\nconst BLUE_600 = 2450411;\nconst LIME_500 = 8702998;\nconst CYAN_400 = 2282478;\nconst ORANGE_400 = 16486972;\nconst DARK = 6710886;\nfunction formatRouteRecordForInspector(route) {\n const tags = [];\n const { record } = route;\n if (record.name != null) {\n tags.push({\n label: String(record.name),\n textColor: 0,\n backgroundColor: CYAN_400\n });\n }\n if (record.aliasOf) {\n tags.push({\n label: \"alias\",\n textColor: 0,\n backgroundColor: ORANGE_400\n });\n }\n if (route.__vd_match) {\n tags.push({\n label: \"matches\",\n textColor: 0,\n backgroundColor: PINK_500\n });\n }\n if (route.__vd_exactActive) {\n tags.push({\n label: \"exact\",\n textColor: 0,\n backgroundColor: LIME_500\n });\n }\n if (route.__vd_active) {\n tags.push({\n label: \"active\",\n textColor: 0,\n backgroundColor: BLUE_600\n });\n }\n if (record.redirect) {\n tags.push({\n label: typeof record.redirect === \"string\" ? `redirect: ${record.redirect}` : \"redirects\",\n textColor: 16777215,\n backgroundColor: DARK\n });\n }\n let id = record.__vd_id;\n if (id == null) {\n id = String(routeRecordId++);\n record.__vd_id = id;\n }\n return {\n id,\n label: record.path,\n tags,\n children: route.children.map(formatRouteRecordForInspector)\n };\n}\nlet routeRecordId = 0;\nconst EXTRACT_REGEXP_RE = /^\\/(.*)\\/([a-z]*)$/;\nfunction markRouteRecordActive(route, currentRoute) {\n const isExactActive = currentRoute.matched.length && isSameRouteRecord(currentRoute.matched[currentRoute.matched.length - 1], route.record);\n route.__vd_exactActive = route.__vd_active = isExactActive;\n if (!isExactActive) {\n route.__vd_active = currentRoute.matched.some((match) => isSameRouteRecord(match, route.record));\n }\n route.children.forEach((childRoute) => markRouteRecordActive(childRoute, currentRoute));\n}\nfunction resetMatchStateOnRouteRecord(route) {\n route.__vd_match = false;\n route.children.forEach(resetMatchStateOnRouteRecord);\n}\nfunction isRouteMatching(route, filter) {\n const found = String(route.re).match(EXTRACT_REGEXP_RE);\n route.__vd_match = false;\n if (!found || found.length < 3) {\n return false;\n }\n const nonEndingRE = new RegExp(found[1].replace(/\\$$/, \"\"), found[2]);\n if (nonEndingRE.test(filter)) {\n route.children.forEach((child) => isRouteMatching(child, filter));\n if (route.record.path !== \"/\" || filter === \"/\") {\n route.__vd_match = route.re.test(filter);\n return true;\n }\n return false;\n }\n const path = route.record.path.toLowerCase();\n const decodedPath = decode(path);\n if (!filter.startsWith(\"/\") && (decodedPath.includes(filter) || path.includes(filter)))\n return true;\n if (decodedPath.startsWith(filter) || path.startsWith(filter))\n return true;\n if (route.record.name && String(route.record.name).includes(filter))\n return true;\n return route.children.some((child) => isRouteMatching(child, filter));\n}\nfunction omit(obj, keys) {\n const ret = {};\n for (const key in obj) {\n if (!keys.includes(key)) {\n ret[key] = obj[key];\n }\n }\n return ret;\n}\nfunction createRouter(options) {\n const matcher = createRouterMatcher(options.routes, options);\n const parseQuery$1 = options.parseQuery || parseQuery;\n const stringifyQuery$1 = options.stringifyQuery || stringifyQuery;\n const routerHistory = options.history;\n if (process.env.NODE_ENV !== \"production\" && !routerHistory)\n throw new Error('Provide the \"history\" option when calling \"createRouter()\": https://next.router.vuejs.org/api/#history.');\n const beforeGuards = useCallbacks();\n const beforeResolveGuards = useCallbacks();\n const afterGuards = useCallbacks();\n const currentRoute = shallowRef(START_LOCATION_NORMALIZED);\n let pendingLocation = START_LOCATION_NORMALIZED;\n if (isBrowser && options.scrollBehavior && \"scrollRestoration\" in history) {\n history.scrollRestoration = \"manual\";\n }\n const normalizeParams = applyToParams.bind(null, (paramValue) => \"\" + paramValue);\n const encodeParams = applyToParams.bind(null, encodeParam);\n const decodeParams = (\n // @ts-expect-error: intentionally avoid the type check\n applyToParams.bind(null, decode)\n );\n function addRoute(parentOrRoute, route) {\n let parent;\n let record;\n if (isRouteName(parentOrRoute)) {\n parent = matcher.getRecordMatcher(parentOrRoute);\n record = route;\n } else {\n record = parentOrRoute;\n }\n return matcher.addRoute(record, parent);\n }\n function removeRoute(name) {\n const recordMatcher = matcher.getRecordMatcher(name);\n if (recordMatcher) {\n matcher.removeRoute(recordMatcher);\n } else if (process.env.NODE_ENV !== \"production\") {\n warn(`Cannot remove non-existent route \"${String(name)}\"`);\n }\n }\n function getRoutes() {\n return matcher.getRoutes().map((routeMatcher) => routeMatcher.record);\n }\n function hasRoute(name) {\n return !!matcher.getRecordMatcher(name);\n }\n function resolve(rawLocation, currentLocation) {\n currentLocation = assign({}, currentLocation || currentRoute.value);\n if (typeof rawLocation === \"string\") {\n const locationNormalized = parseURL(parseQuery$1, rawLocation, currentLocation.path);\n const matchedRoute2 = matcher.resolve({ path: locationNormalized.path }, currentLocation);\n const href2 = routerHistory.createHref(locationNormalized.fullPath);\n if (process.env.NODE_ENV !== \"production\") {\n if (href2.startsWith(\"//\"))\n warn(`Location \"${rawLocation}\" resolved to \"${href2}\". A resolved location cannot start with multiple slashes.`);\n else if (!matchedRoute2.matched.length) {\n warn(`No match found for location with path \"${rawLocation}\"`);\n }\n }\n return assign(locationNormalized, matchedRoute2, {\n params: decodeParams(matchedRoute2.params),\n hash: decode(locationNormalized.hash),\n redirectedFrom: void 0,\n href: href2\n });\n }\n let matcherLocation;\n if (\"path\" in rawLocation) {\n if (process.env.NODE_ENV !== \"production\" && \"params\" in rawLocation && !(\"name\" in rawLocation) && // @ts-expect-error: the type is never\n Object.keys(rawLocation.params).length) {\n warn(`Path \"${// @ts-expect-error: the type is never\n rawLocation.path}\" was passed with params but they will be ignored. Use a named route alongside params instead.`);\n }\n matcherLocation = assign({}, rawLocation, {\n path: parseURL(parseQuery$1, rawLocation.path, currentLocation.path).path\n });\n } else {\n const targetParams = assign({}, rawLocation.params);\n for (const key in targetParams) {\n if (targetParams[key] == null) {\n delete targetParams[key];\n }\n }\n matcherLocation = assign({}, rawLocation, {\n params: encodeParams(rawLocation.params)\n });\n currentLocation.params = encodeParams(currentLocation.params);\n }\n const matchedRoute = matcher.resolve(matcherLocation, currentLocation);\n const hash = rawLocation.hash || \"\";\n if (process.env.NODE_ENV !== \"production\" && hash && !hash.startsWith(\"#\")) {\n warn(`A \\`hash\\` should always start with the character \"#\". Replace \"${hash}\" with \"#${hash}\".`);\n }\n matchedRoute.params = normalizeParams(decodeParams(matchedRoute.params));\n const fullPath = stringifyURL(stringifyQuery$1, assign({}, rawLocation, {\n hash: encodeHash(hash),\n path: matchedRoute.path\n }));\n const href = routerHistory.createHref(fullPath);\n if (process.env.NODE_ENV !== \"production\") {\n if (href.startsWith(\"//\")) {\n warn(`Location \"${rawLocation}\" resolved to \"${href}\". A resolved location cannot start with multiple slashes.`);\n } else if (!matchedRoute.matched.length) {\n warn(`No match found for location with path \"${\"path\" in rawLocation ? rawLocation.path : rawLocation}\"`);\n }\n }\n return assign({\n fullPath,\n // keep the hash encoded so fullPath is effectively path + encodedQuery +\n // hash\n hash,\n query: (\n // if the user is using a custom query lib like qs, we might have\n // nested objects, so we keep the query as is, meaning it can contain\n // numbers at `$route.query`, but at the point, the user will have to\n // use their own type anyway.\n // https://github.com/vuejs/router/issues/328#issuecomment-649481567\n stringifyQuery$1 === stringifyQuery ? normalizeQuery(rawLocation.query) : rawLocation.query || {}\n )\n }, matchedRoute, {\n redirectedFrom: void 0,\n href\n });\n }\n function locationAsObject(to) {\n return typeof to === \"string\" ? parseURL(parseQuery$1, to, currentRoute.value.path) : assign({}, to);\n }\n function checkCanceledNavigation(to, from) {\n if (pendingLocation !== to) {\n return createRouterError(8, {\n from,\n to\n });\n }\n }\n function push(to) {\n return pushWithRedirect(to);\n }\n function replace(to) {\n return push(assign(locationAsObject(to), { replace: true }));\n }\n function handleRedirectRecord(to) {\n const lastMatched = to.matched[to.matched.length - 1];\n if (lastMatched && lastMatched.redirect) {\n const { redirect } = lastMatched;\n let newTargetLocation = typeof redirect === \"function\" ? redirect(to) : redirect;\n if (typeof newTargetLocation === \"string\") {\n newTargetLocation = newTargetLocation.includes(\"?\") || newTargetLocation.includes(\"#\") ? newTargetLocation = locationAsObject(newTargetLocation) : (\n // force empty params\n { path: newTargetLocation }\n );\n newTargetLocation.params = {};\n }\n if (process.env.NODE_ENV !== \"production\" && !(\"path\" in newTargetLocation) && !(\"name\" in newTargetLocation)) {\n warn(`Invalid redirect found:\n${JSON.stringify(newTargetLocation, null, 2)}\n when navigating to \"${to.fullPath}\". A redirect must contain a name or path. This will break in production.`);\n throw new Error(\"Invalid redirect\");\n }\n return assign({\n query: to.query,\n hash: to.hash,\n // avoid transferring params if the redirect has a path\n params: \"path\" in newTargetLocation ? {} : to.params\n }, newTargetLocation);\n }\n }\n function pushWithRedirect(to, redirectedFrom) {\n const targetLocation = pendingLocation = resolve(to);\n const from = currentRoute.value;\n const data = to.state;\n const force = to.force;\n const replace2 = to.replace === true;\n const shouldRedirect = handleRedirectRecord(targetLocation);\n if (shouldRedirect)\n return pushWithRedirect(\n assign(locationAsObject(shouldRedirect), {\n state: typeof shouldRedirect === \"object\" ? assign({}, data, shouldRedirect.state) : data,\n force,\n replace: replace2\n }),\n // keep original redirectedFrom if it exists\n redirectedFrom || targetLocation\n );\n const toLocation = targetLocation;\n toLocation.redirectedFrom = redirectedFrom;\n let failure;\n if (!force && isSameRouteLocation(stringifyQuery$1, from, targetLocation)) {\n failure = createRouterError(16, { to: toLocation, from });\n handleScroll(\n from,\n from,\n // this is a push, the only way for it to be triggered from a\n // history.listen is with a redirect, which makes it become a push\n true,\n // This cannot be the first navigation because the initial location\n // cannot be manually navigated to\n false\n );\n }\n return (failure ? Promise.resolve(failure) : navigate(toLocation, from)).catch((error) => isNavigationFailure(error) ? (\n // navigation redirects still mark the router as ready\n isNavigationFailure(\n error,\n 2\n /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */\n ) ? error : markAsReady(error)\n ) : (\n // reject any unknown error\n triggerError(error, toLocation, from)\n )).then((failure2) => {\n if (failure2) {\n if (isNavigationFailure(\n failure2,\n 2\n /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */\n )) {\n if (process.env.NODE_ENV !== \"production\" && // we are redirecting to the same location we were already at\n isSameRouteLocation(stringifyQuery$1, resolve(failure2.to), toLocation) && // and we have done it a couple of times\n redirectedFrom && // @ts-expect-error: added only in dev\n (redirectedFrom._count = redirectedFrom._count ? (\n // @ts-expect-error\n redirectedFrom._count + 1\n ) : 1) > 10) {\n warn(`Detected an infinite redirection in a navigation guard when going from \"${from.fullPath}\" to \"${toLocation.fullPath}\". Aborting to avoid a Stack Overflow. This will break in production if not fixed.`);\n return Promise.reject(new Error(\"Infinite redirect in navigation guard\"));\n }\n return pushWithRedirect(\n // keep options\n assign({\n // preserve an existing replacement but allow the redirect to override it\n replace: replace2\n }, locationAsObject(failure2.to), {\n state: typeof failure2.to === \"object\" ? assign({}, data, failure2.to.state) : data,\n force\n }),\n // preserve the original redirectedFrom if any\n redirectedFrom || toLocation\n );\n }\n } else {\n failure2 = finalizeNavigation(toLocation, from, true, replace2, data);\n }\n triggerAfterEach(toLocation, from, failure2);\n return failure2;\n });\n }\n function checkCanceledNavigationAndReject(to, from) {\n const error = checkCanceledNavigation(to, from);\n return error ? Promise.reject(error) : Promise.resolve();\n }\n function navigate(to, from) {\n let guards;\n const [leavingRecords, updatingRecords, enteringRecords] = extractChangingRecords(to, from);\n guards = extractComponentsGuards(leavingRecords.reverse(), \"beforeRouteLeave\", to, from);\n for (const record of leavingRecords) {\n record.leaveGuards.forEach((guard) => {\n guards.push(guardToPromiseFn(guard, to, from));\n });\n }\n const canceledNavigationCheck = checkCanceledNavigationAndReject.bind(null, to, from);\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards).then(() => {\n guards = [];\n for (const guard of beforeGuards.list()) {\n guards.push(guardToPromiseFn(guard, to, from));\n }\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards);\n }).then(() => {\n guards = extractComponentsGuards(updatingRecords, \"beforeRouteUpdate\", to, from);\n for (const record of updatingRecords) {\n record.updateGuards.forEach((guard) => {\n guards.push(guardToPromiseFn(guard, to, from));\n });\n }\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards);\n }).then(() => {\n guards = [];\n for (const record of to.matched) {\n if (record.beforeEnter && !from.matched.includes(record)) {\n if (isArray(record.beforeEnter)) {\n for (const beforeEnter of record.beforeEnter)\n guards.push(guardToPromiseFn(beforeEnter, to, from));\n } else {\n guards.push(guardToPromiseFn(record.beforeEnter, to, from));\n }\n }\n }\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards);\n }).then(() => {\n to.matched.forEach((record) => record.enterCallbacks = {});\n guards = extractComponentsGuards(enteringRecords, \"beforeRouteEnter\", to, from);\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards);\n }).then(() => {\n guards = [];\n for (const guard of beforeResolveGuards.list()) {\n guards.push(guardToPromiseFn(guard, to, from));\n }\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards);\n }).catch((err) => isNavigationFailure(\n err,\n 8\n /* ErrorTypes.NAVIGATION_CANCELLED */\n ) ? err : Promise.reject(err));\n }\n function triggerAfterEach(to, from, failure) {\n for (const guard of afterGuards.list())\n guard(to, from, failure);\n }\n function finalizeNavigation(toLocation, from, isPush, replace2, data) {\n const error = checkCanceledNavigation(toLocation, from);\n if (error)\n return error;\n const isFirstNavigation = from === START_LOCATION_NORMALIZED;\n const state = !isBrowser ? {} : history.state;\n if (isPush) {\n if (replace2 || isFirstNavigation)\n routerHistory.replace(toLocation.fullPath, assign({\n scroll: isFirstNavigation && state && state.scroll\n }, data));\n else\n routerHistory.push(toLocation.fullPath, data);\n }\n currentRoute.value = toLocation;\n handleScroll(toLocation, from, isPush, isFirstNavigation);\n markAsReady();\n }\n let removeHistoryListener;\n function setupListeners() {\n if (removeHistoryListener)\n return;\n removeHistoryListener = routerHistory.listen((to, _from, info) => {\n if (!router2.listening)\n return;\n const toLocation = resolve(to);\n const shouldRedirect = handleRedirectRecord(toLocation);\n if (shouldRedirect) {\n pushWithRedirect(assign(shouldRedirect, { replace: true }), toLocation).catch(noop);\n return;\n }\n pendingLocation = toLocation;\n const from = currentRoute.value;\n if (isBrowser) {\n saveScrollPosition(getScrollKey(from.fullPath, info.delta), computeScrollPosition());\n }\n navigate(toLocation, from).catch((error) => {\n if (isNavigationFailure(\n error,\n 4 | 8\n /* ErrorTypes.NAVIGATION_CANCELLED */\n )) {\n return error;\n }\n if (isNavigationFailure(\n error,\n 2\n /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */\n )) {\n pushWithRedirect(\n error.to,\n toLocation\n // avoid an uncaught rejection, let push call triggerError\n ).then((failure) => {\n if (isNavigationFailure(\n failure,\n 4 | 16\n /* ErrorTypes.NAVIGATION_DUPLICATED */\n ) && !info.delta && info.type === NavigationType.pop) {\n routerHistory.go(-1, false);\n }\n }).catch(noop);\n return Promise.reject();\n }\n if (info.delta) {\n routerHistory.go(-info.delta, false);\n }\n return triggerError(error, toLocation, from);\n }).then((failure) => {\n failure = failure || finalizeNavigation(\n // after navigation, all matched components are resolved\n toLocation,\n from,\n false\n );\n if (failure) {\n if (info.delta && // a new navigation has been triggered, so we do not want to revert, that will change the current history\n // entry while a different route is displayed\n !isNavigationFailure(\n failure,\n 8\n /* ErrorTypes.NAVIGATION_CANCELLED */\n )) {\n routerHistory.go(-info.delta, false);\n } else if (info.type === NavigationType.pop && isNavigationFailure(\n failure,\n 4 | 16\n /* ErrorTypes.NAVIGATION_DUPLICATED */\n )) {\n routerHistory.go(-1, false);\n }\n }\n triggerAfterEach(toLocation, from, failure);\n }).catch(noop);\n });\n }\n let readyHandlers = useCallbacks();\n let errorHandlers = useCallbacks();\n let ready;\n function triggerError(error, to, from) {\n markAsReady(error);\n const list = errorHandlers.list();\n if (list.length) {\n list.forEach((handler) => handler(error, to, from));\n } else {\n if (process.env.NODE_ENV !== \"production\") {\n warn(\"uncaught error during route navigation:\");\n }\n console.error(error);\n }\n return Promise.reject(error);\n }\n function isReady() {\n if (ready && currentRoute.value !== START_LOCATION_NORMALIZED)\n return Promise.resolve();\n return new Promise((resolve2, reject) => {\n readyHandlers.add([resolve2, reject]);\n });\n }\n function markAsReady(err) {\n if (!ready) {\n ready = !err;\n setupListeners();\n readyHandlers.list().forEach(([resolve2, reject]) => err ? reject(err) : resolve2());\n readyHandlers.reset();\n }\n return err;\n }\n function handleScroll(to, from, isPush, isFirstNavigation) {\n const { scrollBehavior } = options;\n if (!isBrowser || !scrollBehavior)\n return Promise.resolve();\n const scrollPosition = !isPush && getSavedScrollPosition(getScrollKey(to.fullPath, 0)) || (isFirstNavigation || !isPush) && history.state && history.state.scroll || null;\n return nextTick().then(() => scrollBehavior(to, from, scrollPosition)).then((position) => position && scrollToPosition(position)).catch((err) => triggerError(err, to, from));\n }\n const go = (delta) => routerHistory.go(delta);\n let started;\n const installedApps = /* @__PURE__ */ new Set();\n const router2 = {\n currentRoute,\n listening: true,\n addRoute,\n removeRoute,\n hasRoute,\n getRoutes,\n resolve,\n options,\n push,\n replace,\n go,\n back: () => go(-1),\n forward: () => go(1),\n beforeEach: beforeGuards.add,\n beforeResolve: beforeResolveGuards.add,\n afterEach: afterGuards.add,\n onError: errorHandlers.add,\n isReady,\n install(app) {\n const router3 = this;\n app.component(\"RouterLink\", RouterLink);\n app.component(\"RouterView\", RouterView);\n app.config.globalProperties.$router = router3;\n Object.defineProperty(app.config.globalProperties, \"$route\", {\n enumerable: true,\n get: () => unref(currentRoute)\n });\n if (isBrowser && // used for the initial navigation client side to avoid pushing\n // multiple times when the router is used in multiple apps\n !started && currentRoute.value === START_LOCATION_NORMALIZED) {\n started = true;\n push(routerHistory.location).catch((err) => {\n if (process.env.NODE_ENV !== \"production\")\n warn(\"Unexpected error when starting the router:\", err);\n });\n }\n const reactiveRoute = {};\n for (const key in START_LOCATION_NORMALIZED) {\n reactiveRoute[key] = computed(() => currentRoute.value[key]);\n }\n app.provide(routerKey, router3);\n app.provide(routeLocationKey, reactive(reactiveRoute));\n app.provide(routerViewLocationKey, currentRoute);\n const unmountApp = app.unmount;\n installedApps.add(app);\n app.unmount = function() {\n installedApps.delete(app);\n if (installedApps.size < 1) {\n pendingLocation = START_LOCATION_NORMALIZED;\n removeHistoryListener && removeHistoryListener();\n removeHistoryListener = null;\n currentRoute.value = START_LOCATION_NORMALIZED;\n started = false;\n ready = false;\n }\n unmountApp();\n };\n if ((process.env.NODE_ENV !== \"production\" || false) && isBrowser) {\n addDevtools(app, router3, matcher);\n }\n }\n };\n return router2;\n}\nfunction runGuardQueue(guards) {\n return guards.reduce((promise, guard) => promise.then(() => guard()), Promise.resolve());\n}\nfunction extractChangingRecords(to, from) {\n const leavingRecords = [];\n const updatingRecords = [];\n const enteringRecords = [];\n const len = Math.max(from.matched.length, to.matched.length);\n for (let i = 0; i < len; i++) {\n const recordFrom = from.matched[i];\n if (recordFrom) {\n if (to.matched.find((record) => isSameRouteRecord(record, recordFrom)))\n updatingRecords.push(recordFrom);\n else\n leavingRecords.push(recordFrom);\n }\n const recordTo = to.matched[i];\n if (recordTo) {\n if (!from.matched.find((record) => isSameRouteRecord(record, recordTo))) {\n enteringRecords.push(recordTo);\n }\n }\n }\n return [leavingRecords, updatingRecords, enteringRecords];\n}\nconst router = createRouter({\n history: createWebHistory(),\n routes: []\n});\nfunction isPromise(obj) {\n return obj && typeof obj.then === \"function\";\n}\nPromise.resolve(false);\nPromise.resolve(true);\nvar PROMISE_RESOLVED_VOID = Promise.resolve();\nfunction sleep(time, resolveWith) {\n if (!time)\n time = 0;\n return new Promise(function(res) {\n return setTimeout(function() {\n return res(resolveWith);\n }, time);\n });\n}\nfunction randomInt(min, max) {\n return Math.floor(Math.random() * (max - min + 1) + min);\n}\nfunction randomToken() {\n return Math.random().toString(36).substring(2);\n}\nvar lastMs = 0;\nvar additional = 0;\nfunction microSeconds$4() {\n var ms = (/* @__PURE__ */ new Date()).getTime();\n if (ms === lastMs) {\n additional++;\n return ms * 1e3 + additional;\n } else {\n lastMs = ms;\n additional = 0;\n return ms * 1e3;\n }\n}\nvar microSeconds$3 = microSeconds$4;\nvar type$3 = \"native\";\nfunction create$3(channelName) {\n var state = {\n messagesCallback: null,\n bc: new BroadcastChannel(channelName),\n subFns: []\n // subscriberFunctions\n };\n state.bc.onmessage = function(msg) {\n if (state.messagesCallback) {\n state.messagesCallback(msg.data);\n }\n };\n return state;\n}\nfunction close$3(channelState) {\n channelState.bc.close();\n channelState.subFns = [];\n}\nfunction postMessage$3(channelState, messageJson) {\n try {\n channelState.bc.postMessage(messageJson, false);\n return PROMISE_RESOLVED_VOID;\n } catch (err) {\n return Promise.reject(err);\n }\n}\nfunction onMessage$3(channelState, fn) {\n channelState.messagesCallback = fn;\n}\nfunction canBeUsed$3() {\n if (typeof window === \"undefined\") {\n return false;\n }\n if (typeof BroadcastChannel === \"function\") {\n if (BroadcastChannel._pubkey) {\n throw new Error(\"BroadcastChannel: Do not overwrite window.BroadcastChannel with this module, this is not a polyfill\");\n }\n return true;\n } else {\n return false;\n }\n}\nfunction averageResponseTime$3() {\n return 150;\n}\nvar NativeMethod = {\n create: create$3,\n close: close$3,\n onMessage: onMessage$3,\n postMessage: postMessage$3,\n canBeUsed: canBeUsed$3,\n type: type$3,\n averageResponseTime: averageResponseTime$3,\n microSeconds: microSeconds$3\n};\nvar ObliviousSet = (\n /** @class */\n function() {\n function ObliviousSet2(ttl) {\n this.ttl = ttl;\n this.map = /* @__PURE__ */ new Map();\n this._to = false;\n }\n ObliviousSet2.prototype.has = function(value) {\n return this.map.has(value);\n };\n ObliviousSet2.prototype.add = function(value) {\n var _this = this;\n this.map.set(value, now());\n if (!this._to) {\n this._to = true;\n setTimeout(function() {\n _this._to = false;\n removeTooOldValues(_this);\n }, 0);\n }\n };\n ObliviousSet2.prototype.clear = function() {\n this.map.clear();\n };\n return ObliviousSet2;\n }()\n);\nfunction removeTooOldValues(obliviousSet) {\n var olderThen = now() - obliviousSet.ttl;\n var iterator = obliviousSet.map[Symbol.iterator]();\n while (true) {\n var next = iterator.next().value;\n if (!next) {\n return;\n }\n var value = next[0];\n var time = next[1];\n if (time < olderThen) {\n obliviousSet.map.delete(value);\n } else {\n return;\n }\n }\n}\nfunction now() {\n return (/* @__PURE__ */ new Date()).getTime();\n}\nfunction fillOptionsWithDefaults() {\n var originalOptions = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};\n var options = JSON.parse(JSON.stringify(originalOptions));\n if (typeof options.webWorkerSupport === \"undefined\")\n options.webWorkerSupport = true;\n if (!options.idb)\n options.idb = {};\n if (!options.idb.ttl)\n options.idb.ttl = 1e3 * 45;\n if (!options.idb.fallbackInterval)\n options.idb.fallbackInterval = 150;\n if (originalOptions.idb && typeof originalOptions.idb.onclose === \"function\")\n options.idb.onclose = originalOptions.idb.onclose;\n if (!options.localstorage)\n options.localstorage = {};\n if (!options.localstorage.removeTimeout)\n options.localstorage.removeTimeout = 1e3 * 60;\n if (originalOptions.methods)\n options.methods = originalOptions.methods;\n if (!options.node)\n options.node = {};\n if (!options.node.ttl)\n options.node.ttl = 1e3 * 60 * 2;\n if (!options.node.maxParallelWrites)\n options.node.maxParallelWrites = 2048;\n if (typeof options.node.useFastPath === \"undefined\")\n options.node.useFastPath = true;\n return options;\n}\nvar microSeconds$2 = microSeconds$4;\nvar DB_PREFIX = \"pubkey.broadcast-channel-0-\";\nvar OBJECT_STORE_ID = \"messages\";\nvar TRANSACTION_SETTINGS = {\n durability: \"relaxed\"\n};\nvar type$2 = \"idb\";\nfunction getIdb() {\n if (typeof indexedDB !== \"undefined\")\n return indexedDB;\n if (typeof window !== \"undefined\") {\n if (typeof window.mozIndexedDB !== \"undefined\")\n return window.mozIndexedDB;\n if (typeof window.webkitIndexedDB !== \"undefined\")\n return window.webkitIndexedDB;\n if (typeof window.msIndexedDB !== \"undefined\")\n return window.msIndexedDB;\n }\n return false;\n}\nfunction commitIndexedDBTransaction(tx) {\n if (tx.commit) {\n tx.commit();\n }\n}\nfunction createDatabase(channelName) {\n var IndexedDB = getIdb();\n var dbName = DB_PREFIX + channelName;\n var openRequest = IndexedDB.open(dbName);\n openRequest.onupgradeneeded = function(ev) {\n var db = ev.target.result;\n db.createObjectStore(OBJECT_STORE_ID, {\n keyPath: \"id\",\n autoIncrement: true\n });\n };\n return new Promise(function(res, rej) {\n openRequest.onerror = function(ev) {\n return rej(ev);\n };\n openRequest.onsuccess = function() {\n res(openRequest.result);\n };\n });\n}\nfunction writeMessage(db, readerUuid, messageJson) {\n var time = (/* @__PURE__ */ new Date()).getTime();\n var writeObject = {\n uuid: readerUuid,\n time,\n data: messageJson\n };\n var tx = db.transaction([OBJECT_STORE_ID], \"readwrite\", TRANSACTION_SETTINGS);\n return new Promise(function(res, rej) {\n tx.oncomplete = function() {\n return res();\n };\n tx.onerror = function(ev) {\n return rej(ev);\n };\n var objectStore = tx.objectStore(OBJECT_STORE_ID);\n objectStore.add(writeObject);\n commitIndexedDBTransaction(tx);\n });\n}\nfunction getMessagesHigherThan(db, lastCursorId) {\n var tx = db.transaction(OBJECT_STORE_ID, \"readonly\", TRANSACTION_SETTINGS);\n var objectStore = tx.objectStore(OBJECT_STORE_ID);\n var ret = [];\n var keyRangeValue = IDBKeyRange.bound(lastCursorId + 1, Infinity);\n if (objectStore.getAll) {\n var getAllRequest = objectStore.getAll(keyRangeValue);\n return new Promise(function(res, rej) {\n getAllRequest.onerror = function(err) {\n return rej(err);\n };\n getAllRequest.onsuccess = function(e) {\n res(e.target.result);\n };\n });\n }\n function openCursor() {\n try {\n keyRangeValue = IDBKeyRange.bound(lastCursorId + 1, Infinity);\n return objectStore.openCursor(keyRangeValue);\n } catch (e) {\n return objectStore.openCursor();\n }\n }\n return new Promise(function(res, rej) {\n var openCursorRequest = openCursor();\n openCursorRequest.onerror = function(err) {\n return rej(err);\n };\n openCursorRequest.onsuccess = function(ev) {\n var cursor = ev.target.result;\n if (cursor) {\n if (cursor.value.id < lastCursorId + 1) {\n cursor[\"continue\"](lastCursorId + 1);\n } else {\n ret.push(cursor.value);\n cursor[\"continue\"]();\n }\n } else {\n commitIndexedDBTransaction(tx);\n res(ret);\n }\n };\n });\n}\nfunction removeMessagesById(channelState, ids) {\n if (channelState.closed) {\n return Promise.resolve([]);\n }\n var tx = channelState.db.transaction(OBJECT_STORE_ID, \"readwrite\", TRANSACTION_SETTINGS);\n var objectStore = tx.objectStore(OBJECT_STORE_ID);\n return Promise.all(ids.map(function(id) {\n var deleteRequest = objectStore[\"delete\"](id);\n return new Promise(function(res) {\n deleteRequest.onsuccess = function() {\n return res();\n };\n });\n }));\n}\nfunction getOldMessages(db, ttl) {\n var olderThen = (/* @__PURE__ */ new Date()).getTime() - ttl;\n var tx = db.transaction(OBJECT_STORE_ID, \"readonly\", TRANSACTION_SETTINGS);\n var objectStore = tx.objectStore(OBJECT_STORE_ID);\n var ret = [];\n return new Promise(function(res) {\n objectStore.openCursor().onsuccess = function(ev) {\n var cursor = ev.target.result;\n if (cursor) {\n var msgObk = cursor.value;\n if (msgObk.time < olderThen) {\n ret.push(msgObk);\n cursor[\"continue\"]();\n } else {\n commitIndexedDBTransaction(tx);\n res(ret);\n }\n } else {\n res(ret);\n }\n };\n });\n}\nfunction cleanOldMessages(channelState) {\n return getOldMessages(channelState.db, channelState.options.idb.ttl).then(function(tooOld) {\n return removeMessagesById(channelState, tooOld.map(function(msg) {\n return msg.id;\n }));\n });\n}\nfunction create$2(channelName, options) {\n options = fillOptionsWithDefaults(options);\n return createDatabase(channelName).then(function(db) {\n var state = {\n closed: false,\n lastCursorId: 0,\n channelName,\n options,\n uuid: randomToken(),\n /**\n * emittedMessagesIds\n * contains all messages that have been emitted before\n * @type {ObliviousSet}\n */\n eMIs: new ObliviousSet(options.idb.ttl * 2),\n // ensures we do not read messages in parallel\n writeBlockPromise: PROMISE_RESOLVED_VOID,\n messagesCallback: null,\n readQueuePromises: [],\n db\n };\n db.onclose = function() {\n state.closed = true;\n if (options.idb.onclose)\n options.idb.onclose();\n };\n _readLoop(state);\n return state;\n });\n}\nfunction _readLoop(state) {\n if (state.closed)\n return;\n readNewMessages(state).then(function() {\n return sleep(state.options.idb.fallbackInterval);\n }).then(function() {\n return _readLoop(state);\n });\n}\nfunction _filterMessage(msgObj, state) {\n if (msgObj.uuid === state.uuid)\n return false;\n if (state.eMIs.has(msgObj.id))\n return false;\n if (msgObj.data.time < state.messagesCallbackTime)\n return false;\n return true;\n}\nfunction readNewMessages(state) {\n if (state.closed)\n return PROMISE_RESOLVED_VOID;\n if (!state.messagesCallback)\n return PROMISE_RESOLVED_VOID;\n return getMessagesHigherThan(state.db, state.lastCursorId).then(function(newerMessages) {\n var useMessages = newerMessages.filter(function(msgObj) {\n return !!msgObj;\n }).map(function(msgObj) {\n if (msgObj.id > state.lastCursorId) {\n state.lastCursorId = msgObj.id;\n }\n return msgObj;\n }).filter(function(msgObj) {\n return _filterMessage(msgObj, state);\n }).sort(function(msgObjA, msgObjB) {\n return msgObjA.time - msgObjB.time;\n });\n useMessages.forEach(function(msgObj) {\n if (state.messagesCallback) {\n state.eMIs.add(msgObj.id);\n state.messagesCallback(msgObj.data);\n }\n });\n return PROMISE_RESOLVED_VOID;\n });\n}\nfunction close$2(channelState) {\n channelState.closed = true;\n channelState.db.close();\n}\nfunction postMessage$2(channelState, messageJson) {\n channelState.writeBlockPromise = channelState.writeBlockPromise.then(function() {\n return writeMessage(channelState.db, channelState.uuid, messageJson);\n }).then(function() {\n if (randomInt(0, 10) === 0) {\n cleanOldMessages(channelState);\n }\n });\n return channelState.writeBlockPromise;\n}\nfunction onMessage$2(channelState, fn, time) {\n channelState.messagesCallbackTime = time;\n channelState.messagesCallback = fn;\n readNewMessages(channelState);\n}\nfunction canBeUsed$2() {\n return !!getIdb();\n}\nfunction averageResponseTime$2(options) {\n return options.idb.fallbackInterval * 2;\n}\nvar IndexedDBMethod = {\n create: create$2,\n close: close$2,\n onMessage: onMessage$2,\n postMessage: postMessage$2,\n canBeUsed: canBeUsed$2,\n type: type$2,\n averageResponseTime: averageResponseTime$2,\n microSeconds: microSeconds$2\n};\nvar microSeconds$1 = microSeconds$4;\nvar KEY_PREFIX = \"pubkey.broadcastChannel-\";\nvar type$1 = \"localstorage\";\nfunction getLocalStorage() {\n var localStorage2;\n if (typeof window === \"undefined\")\n return null;\n try {\n localStorage2 = window.localStorage;\n localStorage2 = window[\"ie8-eventlistener/storage\"] || window.localStorage;\n } catch (e) {\n }\n return localStorage2;\n}\nfunction storageKey(channelName) {\n return KEY_PREFIX + channelName;\n}\nfunction postMessage$1(channelState, messageJson) {\n return new Promise(function(res) {\n sleep().then(function() {\n var key = storageKey(channelState.channelName);\n var writeObj = {\n token: randomToken(),\n time: (/* @__PURE__ */ new Date()).getTime(),\n data: messageJson,\n uuid: channelState.uuid\n };\n var value = JSON.stringify(writeObj);\n getLocalStorage().setItem(key, value);\n var ev = document.createEvent(\"Event\");\n ev.initEvent(\"storage\", true, true);\n ev.key = key;\n ev.newValue = value;\n window.dispatchEvent(ev);\n res();\n });\n });\n}\nfunction addStorageEventListener(channelName, fn) {\n var key = storageKey(channelName);\n var listener = function listener2(ev) {\n if (ev.key === key) {\n fn(JSON.parse(ev.newValue));\n }\n };\n window.addEventListener(\"storage\", listener);\n return listener;\n}\nfunction removeStorageEventListener(listener) {\n window.removeEventListener(\"storage\", listener);\n}\nfunction create$1(channelName, options) {\n options = fillOptionsWithDefaults(options);\n if (!canBeUsed$1()) {\n throw new Error(\"BroadcastChannel: localstorage cannot be used\");\n }\n var uuid = randomToken();\n var eMIs = new ObliviousSet(options.localstorage.removeTimeout);\n var state = {\n channelName,\n uuid,\n eMIs\n // emittedMessagesIds\n };\n state.listener = addStorageEventListener(channelName, function(msgObj) {\n if (!state.messagesCallback)\n return;\n if (msgObj.uuid === uuid)\n return;\n if (!msgObj.token || eMIs.has(msgObj.token))\n return;\n if (msgObj.data.time && msgObj.data.time < state.messagesCallbackTime)\n return;\n eMIs.add(msgObj.token);\n state.messagesCallback(msgObj.data);\n });\n return state;\n}\nfunction close$1(channelState) {\n removeStorageEventListener(channelState.listener);\n}\nfunction onMessage$1(channelState, fn, time) {\n channelState.messagesCallbackTime = time;\n channelState.messagesCallback = fn;\n}\nfunction canBeUsed$1() {\n var ls = getLocalStorage();\n if (!ls)\n return false;\n try {\n var key = \"__broadcastchannel_check\";\n ls.setItem(key, \"works\");\n ls.removeItem(key);\n } catch (e) {\n return false;\n }\n return true;\n}\nfunction averageResponseTime$1() {\n var defaultTime = 120;\n var userAgent = navigator.userAgent.toLowerCase();\n if (userAgent.includes(\"safari\") && !userAgent.includes(\"chrome\")) {\n return defaultTime * 2;\n }\n return defaultTime;\n}\nvar LocalstorageMethod = {\n create: create$1,\n close: close$1,\n onMessage: onMessage$1,\n postMessage: postMessage$1,\n canBeUsed: canBeUsed$1,\n type: type$1,\n averageResponseTime: averageResponseTime$1,\n microSeconds: microSeconds$1\n};\nvar microSeconds = microSeconds$4;\nvar type = \"simulate\";\nvar SIMULATE_CHANNELS = /* @__PURE__ */ new Set();\nfunction create(channelName) {\n var state = {\n name: channelName,\n messagesCallback: null\n };\n SIMULATE_CHANNELS.add(state);\n return state;\n}\nfunction close(channelState) {\n SIMULATE_CHANNELS[\"delete\"](channelState);\n}\nfunction postMessage(channelState, messageJson) {\n return new Promise(function(res) {\n return setTimeout(function() {\n var channelArray = Array.from(SIMULATE_CHANNELS);\n channelArray.filter(function(channel) {\n return channel.name === channelState.name;\n }).filter(function(channel) {\n return channel !== channelState;\n }).filter(function(channel) {\n return !!channel.messagesCallback;\n }).forEach(function(channel) {\n return channel.messagesCallback(messageJson);\n });\n res();\n }, 5);\n });\n}\nfunction onMessage(channelState, fn) {\n channelState.messagesCallback = fn;\n}\nfunction canBeUsed() {\n return true;\n}\nfunction averageResponseTime() {\n return 5;\n}\nvar SimulateMethod = {\n create,\n close,\n onMessage,\n postMessage,\n canBeUsed,\n type,\n averageResponseTime,\n microSeconds\n};\nvar METHODS = [\n NativeMethod,\n // fastest\n IndexedDBMethod,\n LocalstorageMethod\n];\nfunction chooseMethod(options) {\n var chooseMethods = [].concat(options.methods, METHODS).filter(Boolean);\n if (options.type) {\n if (options.type === \"simulate\") {\n return SimulateMethod;\n }\n var ret = chooseMethods.find(function(m2) {\n return m2.type === options.type;\n });\n if (!ret)\n throw new Error(\"method-type \" + options.type + \" not found\");\n else\n return ret;\n }\n if (!options.webWorkerSupport) {\n chooseMethods = chooseMethods.filter(function(m2) {\n return m2.type !== \"idb\";\n });\n }\n var useMethod = chooseMethods.find(function(method) {\n return method.canBeUsed();\n });\n if (!useMethod)\n throw new Error(\"No usable method found in \" + JSON.stringify(METHODS.map(function(m2) {\n return m2.type;\n })));\n else\n return useMethod;\n}\nvar OPEN_BROADCAST_CHANNELS = /* @__PURE__ */ new Set();\nvar lastId = 0;\nvar BroadcastChannel$1 = function BroadcastChannel2(name, options) {\n this.id = lastId++;\n OPEN_BROADCAST_CHANNELS.add(this);\n this.name = name;\n if (ENFORCED_OPTIONS) {\n options = ENFORCED_OPTIONS;\n }\n this.options = fillOptionsWithDefaults(options);\n this.method = chooseMethod(this.options);\n this._iL = false;\n this._onML = null;\n this._addEL = {\n message: [],\n internal: []\n };\n this._uMP = /* @__PURE__ */ new Set();\n this._befC = [];\n this._prepP = null;\n _prepareChannel(this);\n};\nBroadcastChannel$1._pubkey = true;\nvar ENFORCED_OPTIONS;\nBroadcastChannel$1.prototype = {\n postMessage: function postMessage2(msg) {\n if (this.closed) {\n throw new Error(\"BroadcastChannel.postMessage(): Cannot post message after channel has closed \" + /**\n * In the past when this error appeared, it was really hard to debug.\n * So now we log the msg together with the error so it at least\n * gives some clue about where in your application this happens.\n */\n JSON.stringify(msg));\n }\n return _post(this, \"message\", msg);\n },\n postInternal: function postInternal(msg) {\n return _post(this, \"internal\", msg);\n },\n set onmessage(fn) {\n var time = this.method.microSeconds();\n var listenObj = {\n time,\n fn\n };\n _removeListenerObject(this, \"message\", this._onML);\n if (fn && typeof fn === \"function\") {\n this._onML = listenObj;\n _addListenerObject(this, \"message\", listenObj);\n } else {\n this._onML = null;\n }\n },\n addEventListener: function addEventListener(type2, fn) {\n var time = this.method.microSeconds();\n var listenObj = {\n time,\n fn\n };\n _addListenerObject(this, type2, listenObj);\n },\n removeEventListener: function removeEventListener(type2, fn) {\n var obj = this._addEL[type2].find(function(obj2) {\n return obj2.fn === fn;\n });\n _removeListenerObject(this, type2, obj);\n },\n close: function close2() {\n var _this = this;\n if (this.closed) {\n return;\n }\n OPEN_BROADCAST_CHANNELS[\"delete\"](this);\n this.closed = true;\n var awaitPrepare = this._prepP ? this._prepP : PROMISE_RESOLVED_VOID;\n this._onML = null;\n this._addEL.message = [];\n return awaitPrepare.then(function() {\n return Promise.all(Array.from(_this._uMP));\n }).then(function() {\n return Promise.all(_this._befC.map(function(fn) {\n return fn();\n }));\n }).then(function() {\n return _this.method.close(_this._state);\n });\n },\n get type() {\n return this.method.type;\n },\n get isClosed() {\n return this.closed;\n }\n};\nfunction _post(broadcastChannel, type2, msg) {\n var time = broadcastChannel.method.microSeconds();\n var msgObj = {\n time,\n type: type2,\n data: msg\n };\n var awaitPrepare = broadcastChannel._prepP ? broadcastChannel._prepP : PROMISE_RESOLVED_VOID;\n return awaitPrepare.then(function() {\n var sendPromise = broadcastChannel.method.postMessage(broadcastChannel._state, msgObj);\n broadcastChannel._uMP.add(sendPromise);\n sendPromise[\"catch\"]().then(function() {\n return broadcastChannel._uMP[\"delete\"](sendPromise);\n });\n return sendPromise;\n });\n}\nfunction _prepareChannel(channel) {\n var maybePromise = channel.method.create(channel.name, channel.options);\n if (isPromise(maybePromise)) {\n channel._prepP = maybePromise;\n maybePromise.then(function(s) {\n channel._state = s;\n });\n } else {\n channel._state = maybePromise;\n }\n}\nfunction _hasMessageListeners(channel) {\n if (channel._addEL.message.length > 0)\n return true;\n if (channel._addEL.internal.length > 0)\n return true;\n return false;\n}\nfunction _addListenerObject(channel, type2, obj) {\n channel._addEL[type2].push(obj);\n _startListening(channel);\n}\nfunction _removeListenerObject(channel, type2, obj) {\n channel._addEL[type2] = channel._addEL[type2].filter(function(o) {\n return o !== obj;\n });\n _stopListening(channel);\n}\nfunction _startListening(channel) {\n if (!channel._iL && _hasMessageListeners(channel)) {\n var listenerFn = function listenerFn2(msgObj) {\n channel._addEL[msgObj.type].forEach(function(listenerObject) {\n var hundredMsInMicro = 100 * 1e3;\n var minMessageTime = listenerObject.time - hundredMsInMicro;\n if (msgObj.time >= minMessageTime) {\n listenerObject.fn(msgObj.data);\n }\n });\n };\n var time = channel.method.microSeconds();\n if (channel._prepP) {\n channel._prepP.then(function() {\n channel._iL = true;\n channel.method.onMessage(channel._state, listenerFn, time);\n });\n } else {\n channel._iL = true;\n channel.method.onMessage(channel._state, listenerFn, time);\n }\n }\n}\nfunction _stopListening(channel) {\n if (channel._iL && !_hasMessageListeners(channel)) {\n channel._iL = false;\n var time = channel.method.microSeconds();\n channel.method.onMessage(channel._state, null, time);\n }\n}\nconst escaped = {\n \"<\": \"\\\\u003C\",\n \">\": \"\\\\u003E\",\n \"/\": \"\\\\u002F\",\n \"\\\\\": \"\\\\\\\\\",\n \"\\b\": \"\\\\b\",\n \"\\f\": \"\\\\f\",\n \"\\n\": \"\\\\n\",\n \"\\r\": \"\\\\r\",\n \"\t\": \"\\\\t\",\n \"\\0\": \"\\\\u0000\",\n \"\\u2028\": \"\\\\u2028\",\n \"\\u2029\": \"\\\\u2029\"\n};\nclass DevalueError extends Error {\n /**\n * @param {string} message\n * @param {string[]} keys\n */\n constructor(message, keys) {\n super(message);\n this.name = \"DevalueError\";\n this.path = keys.join(\"\");\n }\n}\nfunction is_primitive(thing) {\n return Object(thing) !== thing;\n}\nconst object_proto_names = Object.getOwnPropertyNames(Object.prototype).sort().join(\"\\0\");\nfunction is_plain_object(thing) {\n const proto = Object.getPrototypeOf(thing);\n return proto === Object.prototype || proto === null || Object.getOwnPropertyNames(proto).sort().join(\"\\0\") === object_proto_names;\n}\nfunction get_type(thing) {\n return Object.prototype.toString.call(thing).slice(8, -1);\n}\nfunction stringify_string(str) {\n let result = '\"';\n for (let i = 0; i < str.length; i += 1) {\n const char = str.charAt(i);\n const code = char.charCodeAt(0);\n if (char === '\"') {\n result += '\\\\\"';\n } else if (char in escaped) {\n result += escaped[char];\n } else if (code <= 31) {\n result += `\\\\u${code.toString(16).toUpperCase().padStart(4, \"0\")}`;\n } else if (code >= 55296 && code <= 57343) {\n const next = str.charCodeAt(i + 1);\n if (code <= 56319 && next >= 56320 && next <= 57343) {\n result += char + str[++i];\n } else {\n result += `\\\\u${code.toString(16).toUpperCase()}`;\n }\n } else {\n result += char;\n }\n }\n result += '\"';\n return result;\n}\nconst UNDEFINED = -1;\nconst HOLE = -2;\nconst NAN = -3;\nconst POSITIVE_INFINITY = -4;\nconst NEGATIVE_INFINITY = -5;\nconst NEGATIVE_ZERO = -6;\nfunction parse(serialized, revivers) {\n return unflatten(JSON.parse(serialized), revivers);\n}\nfunction unflatten(parsed, revivers) {\n if (typeof parsed === \"number\")\n return hydrate(parsed, true);\n if (!Array.isArray(parsed) || parsed.length === 0) {\n throw new Error(\"Invalid input\");\n }\n const values = (\n /** @type {any[]} */\n parsed\n );\n const hydrated = Array(values.length);\n function hydrate(index2, standalone = false) {\n if (index2 === UNDEFINED)\n return void 0;\n if (index2 === NAN)\n return NaN;\n if (index2 === POSITIVE_INFINITY)\n return Infinity;\n if (index2 === NEGATIVE_INFINITY)\n return -Infinity;\n if (index2 === NEGATIVE_ZERO)\n return -0;\n if (standalone)\n throw new Error(`Invalid input`);\n if (index2 in hydrated)\n return hydrated[index2];\n const value = values[index2];\n if (!value || typeof value !== \"object\") {\n hydrated[index2] = value;\n } else if (Array.isArray(value)) {\n if (typeof value[0] === \"string\") {\n const type2 = value[0];\n const reviver = revivers == null ? void 0 : revivers[type2];\n if (reviver) {\n return hydrated[index2] = reviver(hydrate(value[1]));\n }\n switch (type2) {\n case \"Date\":\n hydrated[index2] = new Date(value[1]);\n break;\n case \"Set\":\n const set2 = /* @__PURE__ */ new Set();\n hydrated[index2] = set2;\n for (let i = 1; i < value.length; i += 1) {\n set2.add(hydrate(value[i]));\n }\n break;\n case \"Map\":\n const map = /* @__PURE__ */ new Map();\n hydrated[index2] = map;\n for (let i = 1; i < value.length; i += 2) {\n map.set(hydrate(value[i]), hydrate(value[i + 1]));\n }\n break;\n case \"RegExp\":\n hydrated[index2] = new RegExp(value[1], value[2]);\n break;\n case \"Object\":\n hydrated[index2] = Object(value[1]);\n break;\n case \"BigInt\":\n hydrated[index2] = BigInt(value[1]);\n break;\n case \"null\":\n const obj = /* @__PURE__ */ Object.create(null);\n hydrated[index2] = obj;\n for (let i = 1; i < value.length; i += 2) {\n obj[value[i]] = hydrate(value[i + 1]);\n }\n break;\n default:\n throw new Error(`Unknown type ${type2}`);\n }\n } else {\n const array = new Array(value.length);\n hydrated[index2] = array;\n for (let i = 0; i < value.length; i += 1) {\n const n = value[i];\n if (n === HOLE)\n continue;\n array[i] = hydrate(n);\n }\n }\n } else {\n const object = {};\n hydrated[index2] = object;\n for (const key in value) {\n const n = value[key];\n object[key] = hydrate(n);\n }\n }\n return hydrated[index2];\n }\n return hydrate(0);\n}\nfunction stringify(value, reducers) {\n const stringified = [];\n const indexes = /* @__PURE__ */ new Map();\n const custom = [];\n for (const key in reducers) {\n custom.push({ key, fn: reducers[key] });\n }\n const keys = [];\n let p = 0;\n function flatten(thing) {\n if (typeof thing === \"function\") {\n throw new DevalueError(`Cannot stringify a function`, keys);\n }\n if (indexes.has(thing))\n return indexes.get(thing);\n if (thing === void 0)\n return UNDEFINED;\n if (Number.isNaN(thing))\n return NAN;\n if (thing === Infinity)\n return POSITIVE_INFINITY;\n if (thing === -Infinity)\n return NEGATIVE_INFINITY;\n if (thing === 0 && 1 / thing < 0)\n return NEGATIVE_ZERO;\n const index3 = p++;\n indexes.set(thing, index3);\n for (const { key, fn } of custom) {\n const value2 = fn(thing);\n if (value2) {\n stringified[index3] = `[\"${key}\",${flatten(value2)}]`;\n return index3;\n }\n }\n let str = \"\";\n if (is_primitive(thing)) {\n str = stringify_primitive(thing);\n } else {\n const type2 = get_type(thing);\n switch (type2) {\n case \"Number\":\n case \"String\":\n case \"Boolean\":\n str = `[\"Object\",${stringify_primitive(thing)}]`;\n break;\n case \"BigInt\":\n str = `[\"BigInt\",${thing}]`;\n break;\n case \"Date\":\n str = `[\"Date\",\"${thing.toISOString()}\"]`;\n break;\n case \"RegExp\":\n const { source, flags } = thing;\n str = flags ? `[\"RegExp\",${stringify_string(source)},\"${flags}\"]` : `[\"RegExp\",${stringify_string(source)}]`;\n break;\n case \"Array\":\n str = \"[\";\n for (let i = 0; i < thing.length; i += 1) {\n if (i > 0)\n str += \",\";\n if (i in thing) {\n keys.push(`[${i}]`);\n str += flatten(thing[i]);\n keys.pop();\n } else {\n str += HOLE;\n }\n }\n str += \"]\";\n break;\n case \"Set\":\n str = '[\"Set\"';\n for (const value2 of thing) {\n str += `,${flatten(value2)}`;\n }\n str += \"]\";\n break;\n case \"Map\":\n str = '[\"Map\"';\n for (const [key, value2] of thing) {\n keys.push(\n `.get(${is_primitive(key) ? stringify_primitive(key) : \"...\"})`\n );\n str += `,${flatten(key)},${flatten(value2)}`;\n }\n str += \"]\";\n break;\n default:\n if (!is_plain_object(thing)) {\n throw new DevalueError(\n `Cannot stringify arbitrary non-POJOs`,\n keys\n );\n }\n if (Object.getOwnPropertySymbols(thing).length > 0) {\n throw new DevalueError(\n `Cannot stringify POJOs with symbolic keys`,\n keys\n );\n }\n if (Object.getPrototypeOf(thing) === null) {\n str = '[\"null\"';\n for (const key in thing) {\n keys.push(`.${key}`);\n str += `,${stringify_string(key)},${flatten(thing[key])}`;\n keys.pop();\n }\n str += \"]\";\n } else {\n str = \"{\";\n let started = false;\n for (const key in thing) {\n if (started)\n str += \",\";\n started = true;\n keys.push(`.${key}`);\n str += `${stringify_string(key)}:${flatten(thing[key])}`;\n keys.pop();\n }\n str += \"}\";\n }\n }\n }\n stringified[index3] = str;\n return index3;\n }\n const index2 = flatten(value);\n if (index2 < 0)\n return `${index2}`;\n return `[${stringified.join(\",\")}]`;\n}\nfunction stringify_primitive(thing) {\n const type2 = typeof thing;\n if (type2 === \"string\")\n return stringify_string(thing);\n if (thing instanceof String)\n return stringify_string(thing.toString());\n if (thing === void 0)\n return UNDEFINED.toString();\n if (thing === 0 && 1 / thing < 0)\n return NEGATIVE_ZERO.toString();\n if (type2 === \"bigint\")\n return `[\"BigInt\",\"${thing}\"]`;\n return String(thing);\n}\nfunction m(t, a, { initialize: d, type: r }) {\n let o = `${a.$id}-${t.toString()}`, n = new BroadcastChannel$1(o, { type: r }), l = false, e = 0;\n watch(() => a[t], (i) => {\n l || (e = Date.now(), n.postMessage({ timestamp: e, state: parse(stringify(i)) })), l = false;\n }, { deep: true }), n.onmessage = (i) => {\n if (i === void 0) {\n n.postMessage({ timestamp: e, state: parse(stringify(a[t])) });\n return;\n }\n i.timestamp <= e || (l = true, e = i.timestamp, a[t] = i.state);\n };\n let u = () => n.postMessage(void 0), p = () => n.close();\n return d && u(), { sync: u, unshare: p };\n}\nvar h = (t, a) => Object.keys(a).includes(t), g = ({ initialize: t = true, enable: a = true, type: d }) => ({ store: r, options: o }) => {\n var _a, _b;\n let n = ((_a = o == null ? void 0 : o.share) == null ? void 0 : _a.enable) ?? a, l = ((_b = o == null ? void 0 : o.share) == null ? void 0 : _b.omit) ?? [];\n !n || Object.keys(r.$state).forEach((e) => {\n var _a2;\n l.includes(e) || !h(e, r.$state) || m(e, r, { initialize: ((_a2 = o == null ? void 0 : o.share) == null ? void 0 : _a2.initialize) ?? t, type: d });\n });\n};\nconst pinia = createPinia();\npinia.use(\n g({\n enable: true,\n initialize: true\n })\n);\nconst index = {\n install: (app, options) => {\n const appRouter = (options == null ? void 0 : options.router) || router;\n app.use(appRouter);\n app.use(pinia);\n app.provide(\"$registry\", new Registry(appRouter, options == null ? void 0 : options.doctypeLoader));\n if (options == null ? void 0 : options.components) {\n for (const [tag, component] of Object.entries(options.components)) {\n app.component(tag, component);\n }\n }\n }\n};\nexport {\n DoctypeMeta,\n Registry,\n index as Stonecrop,\n useStonecrop\n};\n","\n\n\n","import { onMounted as ye, onBeforeUnmount as Ie, ref as E, watch as j, unref as s, getCurrentScope as _e, onScopeDispose as Ee, defineComponent as k, inject as O, computed as S, openBlock as p, createElementBlock as w, createBlock as P, resolveDynamicComponent as ie, mergeProps as V, toDisplayString as $, Fragment as L, createElementVNode as T, renderSlot as x, createCommentVNode as M, useCssVars as de, withDirectives as ce, vShow as ue, reactive as A, renderList as N, normalizeStyle as H, createTextVNode as ke, provide as Ce, nextTick as Ae, createVNode as z, withCtx as G } from \"vue\";\nvar J;\nconst pe = typeof window < \"u\", Te = (t) => typeof t == \"string\", $e = () => {\n};\npe && (J = window == null ? void 0 : window.navigator) != null && J.userAgent && /iP(ad|hone|od)/.test(window.navigator.userAgent);\nfunction fe(t) {\n return typeof t == \"function\" ? t() : s(t);\n}\nfunction Oe(t) {\n return t;\n}\nfunction De(t) {\n return _e() ? (Ee(t), !0) : !1;\n}\nfunction U(t) {\n var e;\n const n = fe(t);\n return (e = n == null ? void 0 : n.$el) != null ? e : n;\n}\nconst me = pe ? window : void 0;\nfunction Re(...t) {\n let e, n, o, l;\n if (Te(t[0]) || Array.isArray(t[0]) ? ([n, o, l] = t, e = me) : [e, n, o, l] = t, !e)\n return $e;\n Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]);\n const a = [], r = () => {\n a.forEach((d) => d()), a.length = 0;\n }, i = (d, h, v, m) => (d.addEventListener(h, v, m), () => d.removeEventListener(h, v, m)), c = j(() => [U(e), fe(l)], ([d, h]) => {\n r(), d && a.push(...n.flatMap((v) => o.map((m) => i(d, v, m, h))));\n }, { immediate: !0, flush: \"post\" }), u = () => {\n c(), r();\n };\n return De(u), u;\n}\nconst X = typeof globalThis < \"u\" ? globalThis : typeof window < \"u\" ? window : typeof global < \"u\" ? global : typeof self < \"u\" ? self : {}, Y = \"__vueuse_ssr_handlers__\";\nX[Y] = X[Y] || {};\nfunction Se(t, { window: e = me, scrollTarget: n } = {}) {\n const o = E(!1), l = () => {\n if (!e)\n return;\n const a = e.document, r = U(t);\n if (!r)\n o.value = !1;\n else {\n const i = r.getBoundingClientRect();\n o.value = i.top <= (e.innerHeight || a.documentElement.clientHeight) && i.left <= (e.innerWidth || a.documentElement.clientWidth) && i.bottom >= 0 && i.right >= 0;\n }\n };\n return j(() => U(t), () => l(), { immediate: !0, flush: \"post\" }), e && Re(n || e, \"scroll\", l, {\n capture: !1,\n passive: !0\n }), o;\n}\nvar Z;\n(function(t) {\n t.UP = \"UP\", t.RIGHT = \"RIGHT\", t.DOWN = \"DOWN\", t.LEFT = \"LEFT\", t.NONE = \"NONE\";\n})(Z || (Z = {}));\nvar Pe = Object.defineProperty, K = Object.getOwnPropertySymbols, He = Object.prototype.hasOwnProperty, Le = Object.prototype.propertyIsEnumerable, ee = (t, e, n) => e in t ? Pe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, Me = (t, e) => {\n for (var n in e || (e = {}))\n He.call(e, n) && ee(t, n, e[n]);\n if (K)\n for (var n of K(e))\n Le.call(e, n) && ee(t, n, e[n]);\n return t;\n};\nconst Ne = {\n easeInSine: [0.12, 0, 0.39, 0],\n easeOutSine: [0.61, 1, 0.88, 1],\n easeInOutSine: [0.37, 0, 0.63, 1],\n easeInQuad: [0.11, 0, 0.5, 0],\n easeOutQuad: [0.5, 1, 0.89, 1],\n easeInOutQuad: [0.45, 0, 0.55, 1],\n easeInCubic: [0.32, 0, 0.67, 0],\n easeOutCubic: [0.33, 1, 0.68, 1],\n easeInOutCubic: [0.65, 0, 0.35, 1],\n easeInQuart: [0.5, 0, 0.75, 0],\n easeOutQuart: [0.25, 1, 0.5, 1],\n easeInOutQuart: [0.76, 0, 0.24, 1],\n easeInQuint: [0.64, 0, 0.78, 0],\n easeOutQuint: [0.22, 1, 0.36, 1],\n easeInOutQuint: [0.83, 0, 0.17, 1],\n easeInExpo: [0.7, 0, 0.84, 0],\n easeOutExpo: [0.16, 1, 0.3, 1],\n easeInOutExpo: [0.87, 0, 0.13, 1],\n easeInCirc: [0.55, 0, 1, 0.45],\n easeOutCirc: [0, 0.55, 0.45, 1],\n easeInOutCirc: [0.85, 0, 0.15, 1],\n easeInBack: [0.36, 0, 0.66, -0.56],\n easeOutBack: [0.34, 1.56, 0.64, 1],\n easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\nMe({\n linear: Oe\n}, Ne);\nconst y = (t) => {\n let e = Se(t).value;\n return e = e && t.offsetHeight > 0, e;\n}, I = (t) => t.tabIndex >= 0, te = (t) => {\n const e = t.target;\n return W(e);\n}, W = (t) => {\n var e;\n let n;\n if (t instanceof HTMLTableCellElement) {\n const o = (e = t.parentElement) == null ? void 0 : e.previousElementSibling;\n if (o) {\n const l = Array.from(o.children)[t.cellIndex];\n l && (n = l);\n }\n } else if (t instanceof HTMLTableRowElement) {\n const o = t.previousElementSibling;\n o && (n = o);\n }\n return n && (!I(n) || !y(n)) ? W(n) : n;\n}, Ue = (t) => {\n var e;\n const n = t.target;\n let o;\n if (n instanceof HTMLTableCellElement) {\n const l = (e = n.parentElement) == null ? void 0 : e.parentElement;\n if (l) {\n const a = l.firstElementChild.children[n.cellIndex];\n a && (o = a);\n }\n } else if (n instanceof HTMLTableRowElement) {\n const l = n.parentElement;\n if (l) {\n const a = l.firstElementChild;\n a && (o = a);\n }\n }\n return o && (!I(o) || !y(o)) ? B(o) : o;\n}, ne = (t) => {\n const e = t.target;\n return B(e);\n}, B = (t) => {\n var e;\n let n;\n if (t instanceof HTMLTableCellElement) {\n const o = (e = t.parentElement) == null ? void 0 : e.nextElementSibling;\n if (o) {\n const l = Array.from(o.children)[t.cellIndex];\n l && (n = l);\n }\n } else if (t instanceof HTMLTableRowElement) {\n const o = t.nextElementSibling;\n o && (n = o);\n }\n return n && (!I(n) || !y(n)) ? B(n) : n;\n}, je = (t) => {\n var e;\n const n = t.target;\n let o;\n if (n instanceof HTMLTableCellElement) {\n const l = (e = n.parentElement) == null ? void 0 : e.parentElement;\n if (l) {\n const a = l.lastElementChild.children[n.cellIndex];\n a && (o = a);\n }\n } else if (n instanceof HTMLTableRowElement) {\n const l = n.parentElement;\n if (l) {\n const a = l.lastElementChild;\n a && (o = a);\n }\n }\n return o && (!I(o) || !y(o)) ? W(o) : o;\n}, oe = (t) => {\n const e = t.target;\n return Q(e);\n}, Q = (t) => {\n var e;\n let n;\n if (t.previousElementSibling)\n n = t.previousElementSibling;\n else {\n const o = (e = t.parentElement) == null ? void 0 : e.previousElementSibling;\n n = o == null ? void 0 : o.lastElementChild;\n }\n return n && (!I(n) || !y(n)) ? Q(n) : n;\n}, le = (t) => {\n const e = t.target;\n return F(e);\n}, F = (t) => {\n var e;\n let n;\n if (t.nextElementSibling)\n n = t.nextElementSibling;\n else {\n const o = (e = t.parentElement) == null ? void 0 : e.nextElementSibling;\n n = o == null ? void 0 : o.firstElementChild;\n }\n return n && (!I(n) || !y(n)) ? F(n) : n;\n}, ae = (t) => {\n const e = t.target.parentElement.firstElementChild;\n return e && (!I(e) || !y(e)) ? F(e) : e;\n}, re = (t) => {\n const e = t.target.parentElement.lastElementChild;\n return e && (!I(e) || !y(e)) ? Q(e) : e;\n}, D = [\"alt\", \"control\", \"shift\", \"meta\"], Ve = {\n ArrowUp: \"up\",\n ArrowDown: \"down\",\n ArrowLeft: \"left\",\n ArrowRight: \"right\"\n}, we = {\n \"keydown.up\": (t) => {\n const e = te(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.down\": (t) => {\n const e = ne(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.left\": (t) => {\n const e = oe(t);\n t.preventDefault(), t.stopPropagation(), e && e.focus();\n },\n \"keydown.right\": (t) => {\n const e = le(t);\n t.preventDefault(), t.stopPropagation(), e && e.focus();\n },\n \"keydown.control.up\": (t) => {\n const e = Ue(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.control.down\": (t) => {\n const e = je(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.control.left\": (t) => {\n const e = ae(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.control.right\": (t) => {\n const e = re(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.end\": (t) => {\n const e = re(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.enter\": (t) => {\n if (t.target instanceof HTMLTableCellElement) {\n t.preventDefault(), t.stopPropagation();\n const e = ne(t);\n e && e.focus();\n }\n },\n \"keydown.shift.enter\": (t) => {\n if (t.target instanceof HTMLTableCellElement) {\n t.preventDefault(), t.stopPropagation();\n const e = te(t);\n e && e.focus();\n }\n },\n \"keydown.home\": (t) => {\n const e = ae(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.tab\": (t) => {\n const e = le(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.shift.tab\": (t) => {\n const e = oe(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n }\n};\nfunction q(t) {\n const e = (o) => {\n let l = null;\n o.parent && (typeof o.parent == \"string\" ? l = document.querySelector(o.parent) : o.parent instanceof Element ? l = o.parent : l = o.parent.value);\n let a = [];\n if (o.selectors)\n if (typeof o.selectors == \"string\")\n a = l ? Array.from(l.querySelectorAll(o.selectors)) : Array.from(document.querySelectorAll(o.selectors));\n else if (o.selectors instanceof Element)\n a.push(o.selectors);\n else if (Array.isArray(o.selectors.value))\n for (const r of o.selectors.value)\n r instanceof Element ? a.push(r) : a.push(r.$el);\n else\n a.push(o.selectors.value);\n else\n a = Array.from(l.children).filter((r) => I(r) && y(r));\n return a;\n }, n = (o) => (l) => {\n const a = Ve[l.key] || l.key.toLowerCase();\n if (D.includes(a))\n return;\n const r = o.handlers || we;\n for (const i of Object.keys(r)) {\n const [c, ...u] = i.split(\".\");\n if (c === \"keydown\" && u.includes(a)) {\n const d = r[i], h = u.filter((m) => D.includes(m)), v = D.some((m) => {\n const _ = m.charAt(0).toUpperCase() + m.slice(1);\n return l.getModifierState(_);\n });\n if (h.length > 0) {\n if (v) {\n for (const m of D)\n if (u.includes(m)) {\n const _ = m.charAt(0).toUpperCase() + m.slice(1);\n l.getModifierState(_) && d(l);\n }\n }\n } else\n v || d(l);\n }\n }\n };\n ye(() => {\n for (const o of t) {\n const l = e(o);\n for (const a of l)\n a.addEventListener(\"keydown\", n(o));\n }\n }), Ie(() => {\n for (const o of t) {\n const l = e(o);\n for (const a of l)\n a.removeEventListener(\"keydown\", n(o));\n }\n });\n}\nconst We = [\"data-colindex\", \"data-rowindex\", \"data-editable\", \"contenteditable\", \"tabindex\"], Be = { key: 1 }, Qe = /* @__PURE__ */ k({\n __name: \"ACell\",\n props: {\n colIndex: null,\n rowIndex: null,\n tableid: null,\n addNavigation: { type: [Boolean, Object], default: !0 },\n tabIndex: { default: 0 },\n clickHandler: null\n },\n setup(t) {\n var _;\n const e = t, n = O(e.tableid), o = E(null);\n let l = E(!1);\n const a = S(() => {\n const b = n.cellData(e.colIndex, e.rowIndex);\n if (n.columns[e.colIndex].format) {\n const g = n.columns[e.colIndex].format;\n return typeof g == \"function\" ? g(b) : typeof g == \"string\" ? Function(`\"use strict\";return (${g})`)()(b) : b;\n } else\n return b;\n }), r = (b) => {\n if (e.clickHandler) {\n e.clickHandler(b);\n return;\n }\n if (n.columns[e.colIndex].mask, n.columns[e.colIndex].modalComponent) {\n const g = o.value.getBoundingClientRect();\n n.modal.visible = !0, n.modal.colIndex = e.colIndex, n.modal.rowIndex = e.rowIndex, n.modal.parent = o.value, n.modal.top = g.top + g.height, n.modal.left = g.left, n.modal.width = c.value, n.modal.component = n.columns[e.colIndex].modalComponent, n.modal.componentProps = n.columns[e.colIndex].modalComponentProps;\n }\n };\n if (e.addNavigation) {\n let b = {\n ...we,\n \"keydown.f2\": r,\n \"keydown.alt.up\": r,\n \"keydown.alt.down\": r,\n \"keydown.alt.left\": r,\n \"keydown.alt.right\": r\n };\n typeof e.addNavigation == \"object\" && (b = {\n ...b,\n ...e.addNavigation\n }), q([\n {\n selectors: o,\n handlers: b\n }\n ]);\n }\n const i = S(() => n.columns[e.colIndex].align || \"center\"), c = S(() => n.columns[e.colIndex].width || \"40ch\");\n let u = \"\";\n const d = () => {\n o.value && (u = o.value.innerText);\n }, h = () => {\n o.value && o.value.innerHTML !== u && (u = o.value.innerText, o.value.dispatchEvent(new Event(\"change\")), l.value = !0, n.columns[e.colIndex].format || n.setCellData(e.rowIndex, e.colIndex, u));\n }, v = (b, g) => g && b === 0 && g > 0 ? `${g}ch` : \"inherit\", m = {\n textAlign: i.value,\n width: c.value,\n backgroundColor: l.value ? \"var(--cell-modified-color)\" : \"inherit\",\n fontWeight: l.value ? \"bold\" : \"inherit\",\n paddingLeft: v(e.colIndex, (_ = n.display[e.rowIndex]) == null ? void 0 : _.indent)\n };\n return (b, g) => (p(), w(\"td\", {\n ref_key: \"cell\",\n ref: o,\n \"data-colindex\": t.colIndex,\n \"data-rowindex\": t.rowIndex,\n \"data-editable\": s(n).columns[t.colIndex].edit,\n contenteditable: s(n).columns[t.colIndex].edit,\n tabindex: t.tabIndex,\n spellcheck: !1,\n style: m,\n onFocus: d,\n onPaste: h,\n onBlur: h,\n onInput: h,\n onClick: r,\n onMousedown: r\n }, [\n s(n).columns[t.colIndex].cellComponent ? (p(), P(ie(s(n).columns[t.colIndex].cellComponent), V({\n key: 0,\n value: s(a)\n }, s(n).columns[t.colIndex].cellComponentProps), null, 16, [\"value\"])) : (p(), w(\"span\", Be, $(s(a)), 1))\n ], 40, We));\n }\n});\nconst C = (t, e) => {\n const n = t.__vccOpts || t;\n for (const [o, l] of e)\n n[o] = l;\n return n;\n}, he = /* @__PURE__ */ C(Qe, [[\"__scopeId\", \"data-v-1738c6fc\"]]), Fe = [\"tabindex\"], qe = [\"tabindex\"], ze = [\"colspan\"], Ge = /* @__PURE__ */ k({\n __name: \"AExpansionRow\",\n props: {\n row: null,\n rowIndex: null,\n tableid: null,\n tabIndex: { default: -1 },\n addNavigation: null\n },\n setup(t) {\n const e = t, n = O(e.tableid), o = E(null), l = E(null), a = () => n.display[e.rowIndex].expanded ? \"▼\" : \"►\";\n if (e.addNavigation !== void 0) {\n const r = Object.assign({}, e.addNavigation);\n r[\"keydown.control.g\"] = (i) => {\n i.stopPropagation(), i.preventDefault(), n.toggleRowExpand(e.rowIndex);\n }, q([\n {\n selectors: o,\n handlers: r\n }\n ]);\n }\n return (r, i) => (p(), w(L, null, [\n T(\"tr\", V(r.$attrs, {\n ref_key: \"rowEl\",\n ref: o,\n tabindex: t.tabIndex,\n class: \"expandable-row\"\n }), [\n T(\"td\", {\n tabIndex: -1,\n onClick: i[0] || (i[0] = (c) => s(n).toggleRowExpand(t.rowIndex)),\n class: \"row-index\"\n }, $(a()), 1),\n x(r.$slots, \"row\", {}, void 0, !0)\n ], 16, Fe),\n s(n).display[e.rowIndex].expanded ? (p(), w(\"tr\", {\n key: 0,\n ref_key: \"rowExpanded\",\n ref: l,\n tabindex: t.tabIndex,\n class: \"expanded-row\"\n }, [\n T(\"td\", {\n tabIndex: -1,\n colspan: s(n).columns.length + 1,\n class: \"expanded-row-content\"\n }, [\n x(r.$slots, \"content\", {}, void 0, !0)\n ], 8, ze)\n ], 8, qe)) : M(\"\", !0)\n ], 64));\n }\n});\nconst Je = /* @__PURE__ */ C(Ge, [[\"__scopeId\", \"data-v-2bb821ae\"]]), Xe = [\"tabindex\"], Ye = {\n key: 0,\n tabIndex: -1,\n class: \"list-index\"\n}, Ze = /* @__PURE__ */ k({\n __name: \"ARow\",\n props: {\n row: null,\n rowIndex: null,\n tableid: null,\n tabIndex: { default: -1 },\n addNavigation: null\n },\n setup(t) {\n const e = t;\n de((c) => ({\n \"6b10edcf\": s(l)\n }));\n const n = O(e.tableid), o = E(null), l = n.numberedRowWidth.value, a = () => n.config.view !== \"tree\" ? \"\" : n.display[e.rowIndex].isRoot || n.display[e.rowIndex].isParent ? n.display[e.rowIndex].childrenOpen ? \"-\" : \"+\" : \"\", r = () => n.config.view !== \"tree\" || n.display[e.rowIndex].isRoot || n.display[e.rowIndex].open, i = (c) => {\n n.toggleRowExpand(c);\n };\n return e.addNavigation && q([\n {\n selectors: o,\n handlers: e.addNavigation\n }\n ]), (c, u) => ce((p(), w(\"tr\", {\n ref_key: \"rowEl\",\n ref: o,\n tabindex: t.tabIndex,\n class: \"table-row\"\n }, [\n s(n).config.view === \"list\" ? (p(), w(\"td\", Ye, $(t.rowIndex + 1), 1)) : s(n).config.view === \"tree\" ? (p(), w(\"td\", {\n key: 1,\n tabIndex: -1,\n class: \"tree-index\",\n onClick: u[0] || (u[0] = (d) => i(t.rowIndex))\n }, $(a()), 1)) : x(c.$slots, \"indexCell\", { key: 2 }, void 0, !0),\n x(c.$slots, \"default\", {}, void 0, !0)\n ], 8, Xe)), [\n [ue, r()]\n ]);\n }\n});\nconst be = /* @__PURE__ */ C(Ze, [[\"__scopeId\", \"data-v-c758303d\"]]);\nlet R;\nconst Ke = new Uint8Array(16);\nfunction et() {\n if (!R && (R = typeof crypto < \"u\" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !R))\n throw new Error(\"crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported\");\n return R(Ke);\n}\nconst f = [];\nfor (let t = 0; t < 256; ++t)\n f.push((t + 256).toString(16).slice(1));\nfunction tt(t, e = 0) {\n return (f[t[e + 0]] + f[t[e + 1]] + f[t[e + 2]] + f[t[e + 3]] + \"-\" + f[t[e + 4]] + f[t[e + 5]] + \"-\" + f[t[e + 6]] + f[t[e + 7]] + \"-\" + f[t[e + 8]] + f[t[e + 9]] + \"-\" + f[t[e + 10]] + f[t[e + 11]] + f[t[e + 12]] + f[t[e + 13]] + f[t[e + 14]] + f[t[e + 15]]).toLowerCase();\n}\nconst nt = typeof crypto < \"u\" && crypto.randomUUID && crypto.randomUUID.bind(crypto), se = {\n randomUUID: nt\n};\nfunction ge(t, e, n) {\n if (se.randomUUID && !e && !t)\n return se.randomUUID();\n t = t || {};\n const o = t.random || (t.rng || et)();\n if (o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128, e) {\n n = n || 0;\n for (let l = 0; l < 16; ++l)\n e[n + l] = o[l];\n return e;\n }\n return tt(o);\n}\nclass ot {\n constructor(e, n, o, l, a, r) {\n this.id = e || ge(), this.rows = o, this.columns = A(n), this.config = A(l), this.table = a || A(this.createTableObject()), this.display = this.createDisplayObject(r), this.modal = A({ visible: !1 });\n }\n createTableObject() {\n const e = {};\n for (const [n, o] of this.columns.entries())\n for (const [l, a] of this.rows.entries())\n e[`${n}:${l}`] = a[o.name];\n return e;\n }\n createDisplayObject(e) {\n const n = [Object.assign({}, { modified: !1 })];\n if (e && \"0:0\" in e)\n return e;\n const o = /* @__PURE__ */ new Set();\n for (let l = this.rows.length - 1; l >= 0; l--) {\n const a = this.rows[l];\n a.parent && o.add(a.parent), n[l] = {\n childrenOpen: !1,\n expanded: !1,\n indent: a.indent || null,\n isParent: o.has(l),\n isRoot: a.parent === null || a.parent === void 0,\n modified: !1,\n open: a.parent === null || a.parent === void 0,\n parent: a.parent\n };\n }\n return A(n);\n }\n get zeroColumn() {\n return [\"list\", \"tree\", \"list-expansion\"].includes(this.config.view);\n }\n get numberedRowWidth() {\n return S(() => String(Math.ceil(this.rows.length / 100) + 1) + \"ch\");\n }\n cellData(e, n) {\n return this.table[`${e}:${n}`];\n }\n setCellData(e, n, o) {\n this.table[`${n}:${e}`] !== o && (this.display[e].modified = !0), this.table[`${n}:${e}`] = o;\n const l = this.columns[n];\n return this.rows[e][l.name] = o, this.table[`${n}:${e}`];\n }\n toggleRowExpand(e) {\n if (this.config.view === \"tree\") {\n this.display[e].childrenOpen = !this.display[e].childrenOpen;\n for (let n = this.rows.length - 1; n >= 0; n--)\n this.display[n].parent === e && (this.display[n].open = !this.display[n].open, this.display[n].childrenOpen && this.toggleRowExpand(n));\n } else\n this.config.view === \"list-expansion\" && (this.display[e].expanded = !this.display[e].expanded);\n }\n}\nconst lt = { key: 0 }, at = {\n class: \"atable-header-row\",\n tabindex: \"-1\"\n}, rt = {\n key: 0,\n id: \"header-index\"\n}, st = /* @__PURE__ */ k({\n __name: \"ATableHeader\",\n props: {\n columns: null,\n config: null,\n tableid: null\n },\n setup(t) {\n const e = t;\n de((a) => ({\n \"1cb0fcc9\": s(o)\n }));\n const n = O(e.tableid), o = n.numberedRowWidth.value, l = (a) => ({\n minWidth: a.width || \"40ch\",\n textAlign: a.align || \"center\",\n width: n.config.fullWidth ? \"auto\" : null\n });\n return (a, r) => t.columns.length ? (p(), w(\"thead\", lt, [\n T(\"tr\", at, [\n s(n).zeroColumn ? (p(), w(\"th\", rt)) : M(\"\", !0),\n (p(!0), w(L, null, N(t.columns, (i, c) => (p(), w(\"th\", {\n key: c,\n tabindex: \"-1\",\n style: H(l(i))\n }, [\n x(a.$slots, \"default\", {}, () => [\n ke($(i.label || String.fromCharCode(c + 97).toUpperCase()), 1)\n ], !0)\n ], 4))), 128))\n ])\n ])) : M(\"\", !0);\n }\n});\nconst xe = /* @__PURE__ */ C(st, [[\"__scopeId\", \"data-v-8a8d9cee\"]]), it = /* @__PURE__ */ k({\n __name: \"ATableModal\",\n props: {\n colIndex: null,\n rowIndex: null,\n tableid: null\n },\n setup(t) {\n O(t.tableid);\n const n = (o) => {\n o.stopPropagation();\n };\n return (o, l) => (p(), w(\"div\", {\n ref: \"amodal\",\n class: \"amodal\",\n tabindex: \"-1\",\n onClick: n,\n onInput: n\n }, [\n x(o.$slots, \"default\", {}, void 0, !0)\n ], 544));\n }\n});\nconst ve = /* @__PURE__ */ C(it, [[\"__scopeId\", \"data-v-8ac70767\"]]), dt = /* @__PURE__ */ k({\n __name: \"ATable\",\n props: {\n id: null,\n modelValue: null,\n columns: null,\n rows: { default: () => [] },\n config: { default: () => new Object() },\n tableid: null\n },\n emits: [\"update:modelValue\"],\n setup(t, { emit: e }) {\n const n = t;\n let o = n.modelValue ? n.modelValue : n.rows, l = new ot(n.id, n.columns, o, n.config);\n Ce(l.id, l), j(\n () => l.rows,\n (r, i) => {\n e(\"update:modelValue\", r);\n },\n { deep: !0 }\n );\n const a = (r) => {\n var i;\n (i = l.modal.parent) != null && i.contains(r.target) || l.modal.visible && (l.modal.visible = !1);\n };\n return window.addEventListener(\"click\", a), window.addEventListener(\"keydown\", (r) => {\n if (r.key === \"Escape\" && l.modal.visible) {\n l.modal.visible = !1;\n const i = l.modal.parent;\n i && Ae().then(() => {\n const c = i.dataset.rowindex, u = i.dataset.colindex, d = document.querySelectorAll(`[data-rowindex='${c}'][data-colindex='${u}']`);\n d && d[0].focus();\n });\n }\n }), (r, i) => (p(), w(\"table\", {\n class: \"atable\",\n style: H({ width: s(l).config.fullWidth ? \"100%\" : \"auto\" })\n }, [\n x(r.$slots, \"header\", { data: s(l) }, () => [\n z(xe, {\n columns: s(l).columns,\n config: s(l).config,\n tableid: s(l).id\n }, null, 8, [\"columns\", \"config\", \"tableid\"])\n ], !0),\n T(\"tbody\", null, [\n x(r.$slots, \"body\", { data: s(l) }, () => [\n (p(!0), w(L, null, N(s(l).rows, (c, u) => (p(), P(be, {\n key: c.id || s(ge)(),\n row: c,\n rowIndex: u,\n tableid: s(l).id\n }, {\n default: G(() => [\n (p(!0), w(L, null, N(s(l).columns, (d, h) => (p(), P(he, {\n key: `${h}:${u}`,\n tableid: s(l).id,\n col: d,\n spellcheck: \"false\",\n rowIndex: u,\n colIndex: h + (s(l).zeroColumn ? 0 : -1),\n component: d.cellComponent,\n style: H({\n textAlign: (d == null ? void 0 : d.align) || \"center\",\n minWidth: (d == null ? void 0 : d.width) || \"40ch\",\n width: s(l).config.fullWidth ? \"auto\" : null\n })\n }, null, 8, [\"tableid\", \"col\", \"rowIndex\", \"colIndex\", \"component\", \"style\"]))), 128))\n ]),\n _: 2\n }, 1032, [\"row\", \"rowIndex\", \"tableid\"]))), 128))\n ], !0)\n ]),\n x(r.$slots, \"footer\", { data: s(l) }, void 0, !0),\n x(r.$slots, \"modal\", { data: s(l) }, () => [\n ce(z(ve, {\n colIndex: s(l).modal.colIndex,\n rowIndex: s(l).modal.rowIndex,\n tableid: s(l).id,\n style: H({\n left: s(l).modal.left + \"px\",\n top: s(l).modal.top + \"px\",\n maxWidth: s(l).modal.width + \"px\"\n })\n }, {\n default: G(() => [\n (p(), P(ie(s(l).modal.component), V({\n key: `${s(l).modal.rowIndex}:${s(l).modal.colIndex}`,\n colIndex: s(l).modal.colIndex,\n rowIndex: s(l).modal.rowIndex,\n tableid: s(l).id\n }, s(l).modal.componentProps), null, 16, [\"colIndex\", \"rowIndex\", \"tableid\"]))\n ]),\n _: 1\n }, 8, [\"colIndex\", \"rowIndex\", \"tableid\", \"style\"]), [\n [ue, s(l).modal.visible]\n ])\n ], !0)\n ], 4));\n }\n});\nconst ct = /* @__PURE__ */ C(dt, [[\"__scopeId\", \"data-v-9137b4c3\"]]);\nfunction ft(t) {\n t.component(\"ACell\", he), t.component(\"AExpansionRow\", Je), t.component(\"ARow\", be), t.component(\"ATable\", ct), t.component(\"ATableHeader\", xe), t.component(\"ATableModal\", ve);\n}\nexport {\n he as ACell,\n Je as AExpansionRow,\n be as ARow,\n ct as ATable,\n xe as ATableHeader,\n ve as ATableModal,\n ot as TableDataStore,\n ft as install\n};\n//# sourceMappingURL=atable.js.map\n","\n\n\n","\n\n\n\n\n","import { App } from 'vue'\n\nimport ActionSet from '@/components/ActionSet.vue'\nimport CommandPalette from '@/components/CommandPalette.vue'\nimport Doctype from '@/components/Doctype.vue'\nimport Records from '@/components/Records.vue'\nimport SheetNav from '@/components/SheetNav.vue'\n\nexport default {\n\tinstall: (app: App) => {\n\t\tapp.component('ActionSet', ActionSet)\n\t\tapp.component('CommandPalette', CommandPalette)\n\t\tapp.component('Doctype', Doctype)\n\t\tapp.component('Records', Records)\n\t\tapp.component('SheetNav', SheetNav)\n\t},\n}\n"],"names":["_elements","ref","isOpen","timeout","hover","closeClicked","onMounted","props","closeDropdowns","element","onHover","onHoverLeave","toggleDropdown","index","showDropdown","_cache","C","l","n","o","Y","ze","j","W","G","Ze","z","et","tt","J","nt","ce","w","y","s","r","i","c","x","m","g","O","$","B","xe","Ae","v","p","le","xt","At","t","Ct","Mt","Tt","Se","a","Stonecrop","registry","store","schema","workflow","actions","doctype","doctypeRegistry","filters","data","id","action","initialState","action2","isVue2","set","target","key","val","del","getDevtoolsGlobalHook$1","getTarget$1","isProxyAvailable$1","HOOK_SETUP$1","HOOK_PLUGIN_SETTINGS_SET$1","supported$1","perf$1","isPerformanceSupported$1","_a","now$2","ApiProxy$1","plugin","hook","defaultSettings","item","localSettingsSaveId","currentSettings","raw","value","pluginId","_target","prop","args","resolve","setupDevtoolsPlugin$1","pluginDescriptor","setupFn","descriptor","enableProxy","proxy","activePinia","setActivePinia","pinia2","piniaSymbol","isPlainObject","MutationType","MutationType2","IS_CLIENT","USE_DEVTOOLS","_global","bom","blob","autoBom","download","url","name","opts","xhr","saveAs","corsEnabled","click","node","evt","_navigator","isMacOSWebView","downloadSaveAs","msSaveAs","fileSaverSaveAs","popup","force","isSafari","isChromeIOS","reader","toastMessage","message","type2","piniaMessage","isPinia","checkClipboardAccess","checkNotFocusedError","error","actionGlobalCopyState","actionGlobalPasteState","actionGlobalSaveState","fileInput","getFileOpener","openFile","reject","files","file","actionGlobalOpenStateFile","result","text","formatDisplay$1","display","PINIA_ROOT_LABEL","PINIA_ROOT_ID","formatStoreForInspectorTree","formatStoreForInspectorState","storeNames","storeMap","storeId","store2","getters","state","getterName","formatEventData","events","event","formatMutationType","isTimelineActive","componentStateTypes","MUTATIONS_LAYER_ID","INSPECTOR_ID","assign$1","getStoreType","registerPiniaDevtools","app","api","nodeId","payload","ctx","piniaStores","toRaw","stores","inspectedStore","path","addStoreToDevtools","now2","after","onError","groupId","runningActionId","activeAction","watch","unref","newValue","oldValue","eventData","hotUpdate","markRaw","newStore","$dispose","patchActionForGrouping","actionNames","storeActions","actionName","_actionId","trackedStore","devtoolsPlugin","options","originalHotUpdate","createPinia","scope","effectScope","_p","toBeInstalled","patchObject","newState","oldState","subPatch","targetValue","isRef","isReactive","noop$1","addSubscription","subscriptions","callback","detached","onCleanup","removeSubscription","idx","getCurrentScope","onScopeDispose","triggerSubscriptions","mergeReactiveObjects","patchToApply","skipHydrateSymbol","shouldHydrate","obj","assign$2","isComputed","createOptionsStore","hot","setup","localState","toRefs","computedGetters","computed","createSetupStore","$id","isOptionsStore","optionsForPlugin","$subscribeOptions","isListening","debuggerEvents","isSyncListening","actionSubscriptions","hotState","activeListener","$patch","partialStateOrMutator","subscriptionMutation","myListenerId","nextTick","$reset","$state","wrapAction","afterCallbackList","onErrorCallbackList","ret","_hmrPayload","partialStore","options2","stopWatcher","reactive","setupStore","toRef","actionValue","stateKey","newStateTarget","oldStateSource","getter","getterValue","nonEnumerable","extender","extensions","defineStore","idOrOptions","setupOptions","isSetupStore","useStore","currentInstance","getCurrentInstance","inject","hotId","vm","cache","useDataStore","records","record","useStonecrop","stonecrop","isReady","onBeforeMount","_b","route","doctypeSlug","recordId","getDevtoolsGlobalHook","getTarget","isProxyAvailable","HOOK_SETUP","HOOK_PLUGIN_SETTINGS_SET","supported","perf","isPerformanceSupported","now$1","ApiProxy2","setupDevtoolsPlugin","isBrowser","isESModule","assign","applyToParams","fn","params","newParams","isArray","noop","warn","msg","TRAILING_SLASH_RE","removeTrailingSlash","parseURL","parseQuery2","location2","currentLocation","query","searchString","hash","hashPos","searchPos","resolveRelativePath","stringifyURL","stringifyQuery2","stripBase","pathname","base","isSameRouteLocation","b","aLastIndex","bLastIndex","isSameRouteRecord","isSameRouteLocationParams","isSameRouteLocationParamsValue","isEquivalentArray","to","from","fromSegments","toSegments","position","toPosition","segment","NavigationType","NavigationType2","NavigationDirection","NavigationDirection2","normalizeBase","baseEl","BEFORE_HASH_RE","createHref","getElementPosition","el","offset","docRect","elRect","computeScrollPosition","scrollToPosition","scrollToOptions","positionEl","isIdSelector","foundEl","getScrollKey","delta","scrollPositions","saveScrollPosition","scrollPosition","getSavedScrollPosition","scroll","createBaseLocation","createCurrentLocation","search","slicePos","pathFromHash","useHistoryListeners","historyState","replace","listeners","teardowns","pauseState","popStateHandler","fromState","listener","pauseListeners","listen","teardown","index2","beforeUnloadListener","history2","destroy","buildState","back","current","forward","replaced","computeScroll","useHistoryStateNavigation","changeLocation","replace2","hashIndex","err","push","currentState","createWebHistory","historyNavigation","historyListeners","go","triggerListeners","routerHistory","isRouteLocation","isRouteName","START_LOCATION_NORMALIZED","NavigationFailureSymbol","NavigationFailureType","NavigationFailureType2","ErrorTypeMessages","stringifyRoute","createRouterError","isNavigationFailure","propertiesToLog","BASE_PARAM_PATTERN","BASE_PATH_PARSER_OPTIONS","REGEX_CHARS_RE","tokensToParser","segments","extraOptions","score","pattern","keys","segmentScores","tokenIndex","token","subSegmentScore","repeatable","optional","regexp","re2","subPattern","re","parse2","match","stringify2","avoidDuplicatedSlash","param","compareScoreArray","diff","comparePathParserScore","aScore","bScore","comp","isLastScoreNegative","last","ROOT_TOKEN","VALID_PARAM_RE","tokenizePath","crash","buffer","previousState","tokens","finalizeSegment","char","customRe","consumeBuffer","addCharToBuffer","createRouteRecordMatcher","parent","parser","existingKeys","matcher","createRouterMatcher","routes","globalOptions","matchers","matcherMap","mergeOptions","getRecordMatcher","addRoute","originalRecord","isRootAdd","mainNormalizedRecord","normalizeRouteRecord","checkChildMissingNameWithEmptyPath","normalizedRecords","aliases","alias","originalMatcher","normalizedRecord","parentPath","connectingSlash","checkMissingParamsInAbsolutePath","checkSameParams","isAliasRecord","removeRoute","children","insertMatcher","matcherRef","getRoutes","isRecordChildOf","invalidParams","paramName","k","paramsFromLocation","m2","matched","parentMatcher","mergeMetaFields","normalizeRecordProps","propsObject","meta","defaults","partialOptions","isSameParam","child","HASH_RE","AMPERSAND_RE","SLASH_RE","EQUAL_RE","IM_RE","PLUS_RE","ENC_BRACKET_OPEN_RE","ENC_BRACKET_CLOSE_RE","ENC_CARET_RE","ENC_BACKTICK_RE","ENC_CURLY_OPEN_RE","ENC_PIPE_RE","ENC_CURLY_CLOSE_RE","ENC_SPACE_RE","commonEncode","encodeHash","encodeQueryValue","encodeQueryKey","encodePath","encodeParam","decode","parseQuery","searchParams","searchParam","eqPos","currentValue","stringifyQuery","value2","normalizeQuery","normalizedQuery","matchedRouteKey","viewDepthKey","routerKey","routeLocationKey","routerViewLocationKey","useCallbacks","handlers","add","handler","reset","guardToPromiseFn","guard","enterCallbackArray","next","valid","guardReturn","canOnlyBeCalledOnce","guardCall","resolvedValue","called","extractComponentsGuards","guardType","guards","rawComponent","promise","isRouteComponent","componentPromise","resolved","resolvedComponent","component","useLink","router2","currentRoute","activeRecordIndex","length","routeMatched","currentMatched","parentRecordPath","getOriginalPath","isActive","includesParams","isExactActive","navigate","e","guardEvent","instance","linkContextDevtools","watchEffect","RouterLink","defineComponent","slots","link","elClass","getLinkClass","h$1","outer","inner","innerValue","outerValue","propClass","globalClass","defaultClass","RouterViewImpl","attrs","warnDeprecatedUsage","injectedRoute","routeToDisplay","injectedDepth","depth","initialDepth","matchedRoute","matchedRouteRef","provide","viewRef","oldInstance","oldName","currentName","ViewComponent","normalizeSlot","routePropsOption","routeProps","onVnodeUnmounted","vnode","info","slot","slotContent","RouterView","parentName","formatRouteLocation","routeLocation","tooltip","copy","omit","formatDisplay","routerId","addDevtools","componentInstance","PINK_500","devtoolsData","backgroundColor","ORANGE_400","LIME_500","BLUE_600","refreshRoutesView","routerInspectorId","navigationsLayerId","navigationId","failure","activeRoutesPayload","resetMatchStateOnRouteRecord","isRouteMatching","markRouteRecordActive","formatRouteRecordForInspector","route2","formatRouteRecordMatcherForStateInspector","modifierForKey","fields","CYAN_400","DARK","tags","routeRecordId","EXTRACT_REGEXP_RE","childRoute","filter","found","decodedPath","createRouter","parseQuery$1","stringifyQuery$1","beforeGuards","beforeResolveGuards","afterGuards","shallowRef","pendingLocation","normalizeParams","paramValue","encodeParams","decodeParams","parentOrRoute","recordMatcher","routeMatcher","hasRoute","rawLocation","locationNormalized","matchedRoute2","href2","matcherLocation","targetParams","fullPath","href","locationAsObject","checkCanceledNavigation","pushWithRedirect","handleRedirectRecord","lastMatched","redirect","newTargetLocation","redirectedFrom","targetLocation","shouldRedirect","toLocation","handleScroll","markAsReady","triggerError","failure2","finalizeNavigation","triggerAfterEach","checkCanceledNavigationAndReject","leavingRecords","updatingRecords","enteringRecords","extractChangingRecords","canceledNavigationCheck","runGuardQueue","beforeEnter","isPush","isFirstNavigation","removeHistoryListener","setupListeners","_from","readyHandlers","errorHandlers","ready","list","resolve2","scrollBehavior","started","installedApps","router3","reactiveRoute","unmountApp","len","recordFrom","recordTo","isPromise","PROMISE_RESOLVED_VOID","sleep","time","resolveWith","res","randomInt","min","max","randomToken","lastMs","additional","microSeconds$4","ms","microSeconds$3","type$3","create$3","channelName","close$3","channelState","postMessage$3","messageJson","onMessage$3","canBeUsed$3","averageResponseTime$3","NativeMethod","ObliviousSet","ObliviousSet2","ttl","_this","now","removeTooOldValues","obliviousSet","olderThen","iterator","fillOptionsWithDefaults","originalOptions","microSeconds$2","DB_PREFIX","OBJECT_STORE_ID","TRANSACTION_SETTINGS","type$2","getIdb","commitIndexedDBTransaction","tx","createDatabase","IndexedDB","dbName","openRequest","ev","db","rej","writeMessage","readerUuid","writeObject","objectStore","getMessagesHigherThan","lastCursorId","keyRangeValue","getAllRequest","openCursor","openCursorRequest","cursor","removeMessagesById","ids","deleteRequest","getOldMessages","msgObk","cleanOldMessages","tooOld","create$2","_readLoop","readNewMessages","_filterMessage","msgObj","newerMessages","useMessages","msgObjA","msgObjB","close$2","postMessage$2","onMessage$2","canBeUsed$2","averageResponseTime$2","IndexedDBMethod","microSeconds$1","KEY_PREFIX","type$1","getLocalStorage","localStorage2","storageKey","postMessage$1","writeObj","addStorageEventListener","removeStorageEventListener","create$1","canBeUsed$1","uuid","eMIs","close$1","onMessage$1","ls","averageResponseTime$1","defaultTime","userAgent","LocalstorageMethod","microSeconds","type","SIMULATE_CHANNELS","create","close","postMessage","channelArray","channel","onMessage","canBeUsed","averageResponseTime","SimulateMethod","METHODS","chooseMethod","chooseMethods","useMethod","method","OPEN_BROADCAST_CHANNELS","lastId","BroadcastChannel$1","_prepareChannel","_post","listenObj","_removeListenerObject","_addListenerObject","obj2","awaitPrepare","broadcastChannel","sendPromise","maybePromise","_hasMessageListeners","_startListening","_stopListening","listenerFn","listenerObject","hundredMsInMicro","minMessageTime","escaped","DevalueError","is_primitive","thing","object_proto_names","is_plain_object","proto","get_type","stringify_string","str","code","UNDEFINED","HOLE","NAN","POSITIVE_INFINITY","NEGATIVE_INFINITY","NEGATIVE_ZERO","parse","serialized","revivers","unflatten","parsed","hydrate","values","hydrated","standalone","reviver","set2","map","array","object","stringify","reducers","stringified","indexes","custom","flatten","index3","stringify_primitive","source","flags","d","u","h","_a2","newSchema","fieldValue","pe","Te","$e","fe","Oe","De","_e","Ee","U","me","Re","X","E","Z","Pe","K","He","Le","ee","Me","I","te","Ue","ne","je","oe","Q","F","ae","D","Ve","we","q","_","ye","Ie","We","Be","Qe","S","P","ie","V","he","Xe","Ye","be","de","ue","R","Ke","f","se","ge","ot","A","lt","at","rt","T","M","L","N","H","ke","ve","ct","Ce","config","breadcrumbs","breadcrumbsVisibile","searchVisibile","searchText","searchinput","rotateHideTabIcon","toggleBreadcrumbs","toggleSearch","handleSearchInput","handleSearch","navigateHome","ActionSet","CommandPalette","Doctype","Records","SheetNav"],"mappings":"+zCAiFMA,EAAYC,MAAkB,CAAA,CAAE,EAChCC,EAASD,MAAI,EAAK,EAClBE,EAAUF,MAAoB,IAAI,EAClCG,EAAQH,MAAI,EAAK,EACjBI,EAAeJ,MAAI,EAAK,EAE9BK,EAAAA,UAAU,IAAM,CACfN,EAAU,MAAQO,EAAM,SACTC,GAAA,CACf,EAED,MAAMA,EAAiB,IAAM,CACnB,QAAAC,KAAWT,EAAU,MACzBS,EAAQ,cAAgB,aAC3BA,EAAQ,KAAO,GAEjB,EAGKC,EAAU,IAAM,CACrBN,EAAM,MAAQ,GACND,EAAA,MAAQ,WAAW,IAAM,CAC5BC,EAAM,QACTF,EAAO,MAAQ,KAEd,GAAG,CAAA,EAGDS,EAAe,IAAM,CAC1BP,EAAM,MAAQ,GACdC,EAAa,MAAQ,GACrB,aAAaF,E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AAO,EAC5Bp1B,EAAA,UAAU,UAAWq1B,EAAO,EAC5Br1B,EAAA,UAAU,WAAYs1B,EAAQ,CACnC,CACD"} \ No newline at end of file +{"version":3,"file":"desktop.umd.cjs","sources":["../src/components/ActionSet.vue","../src/components/CommandPalette.vue","../../aform/dist/aform.js","../../stonecrop/dist/stonecrop.js","../src/components/Doctype.vue","../../atable/dist/atable.js","../src/components/Records.vue","../src/components/SheetNav.vue","../src/plugins/index.ts"],"sourcesContent":["\n\n\n\n\n","\n\n\n","import { defineComponent as D, computed as M, openBlock as f, createElementBlock as _, createElementVNode as u, withDirectives as k, isRef as P, vModelCheckbox as me, unref as v, toDisplayString as x, vShow as S, resolveComponent as ve, createBlock as B, withCtx as ye, vModelText as H, onMounted as le, onBeforeUnmount as ge, ref as g, watch as q, getCurrentScope as _e, onScopeDispose as he, nextTick as be, Fragment as $, renderList as O, withModifiers as ke, normalizeClass as oe, pushScopeId as De, popScopeId as we, resolveDynamicComponent as Ee, mergeProps as xe, createTextVNode as Ae, createCommentVNode as Ce, renderSlot as Me, createVNode as Te, inject as Ie, resolveDirective as Se } from \"vue\";\nconst Ve = { id: \"checkbox-container\" }, $e = [\"id\", \"readonly\", \"required\"], Oe = { id: \"custom-checkbox\" }, Le = [\"for\"], Pe = [\"innerHTML\"], Be = /* @__PURE__ */ D({\n __name: \"ACheckbox\",\n props: {\n label: null,\n value: null,\n required: { type: Boolean },\n readOnly: { type: Boolean },\n uuid: null,\n validation: { default: () => ({ errorMessage: \" \" }) }\n },\n emits: [\"update:value\"],\n setup(e, { emit: t }) {\n const l = e, n = M({\n get() {\n return l.value;\n },\n set(o) {\n t(\"update:value\", o);\n }\n });\n return (o, a) => (f(), _(\"div\", null, [\n u(\"label\", Ve, [\n k(u(\"input\", {\n \"onUpdate:modelValue\": a[0] || (a[0] = (s) => P(n) ? n.value = s : null),\n type: \"checkbox\",\n id: e.uuid,\n class: \"checkbox\",\n readonly: e.readOnly,\n required: e.required\n }, null, 8, $e), [\n [me, v(n)]\n ]),\n u(\"span\", Oe, x(v(n)), 1)\n ]),\n u(\"label\", {\n for: e.uuid,\n id: \"checkbox-label\"\n }, x(e.label), 9, Le),\n k(u(\"p\", {\n innerHTML: e.validation.errorMessage\n }, null, 8, Pe), [\n [S, e.validation.errorMessage]\n ])\n ]));\n }\n});\nconst A = (e, t) => {\n const l = e.__vccOpts || e;\n for (const [n, o] of t)\n l[n] = o;\n return l;\n}, He = /* @__PURE__ */ A(Be, [[\"__scopeId\", \"data-v-743cd4db\"]]), qe = /* @__PURE__ */ u(\"div\", null, [\n /* @__PURE__ */ u(\"input\", { type: \"text\" }),\n /* @__PURE__ */ u(\"input\", { type: \"text\" }),\n /* @__PURE__ */ u(\"input\", { type: \"text\" })\n], -1), Fe = /* @__PURE__ */ D({\n __name: \"AComboBox\",\n props: [\"event\", \"cellData\", \"tableID\"],\n setup(e) {\n return (t, l) => {\n const n = ve(\"ATableModal\");\n return f(), B(n, {\n event: e.event,\n cellData: e.cellData,\n class: \"amodal\"\n }, {\n default: ye(() => [\n qe\n ]),\n _: 1\n }, 8, [\"event\", \"cellData\"]);\n };\n }\n}), Ue = [\"id\", \"disabled\", \"required\"], Re = [\"for\"], Ne = [\"innerHTML\"], Qe = /* @__PURE__ */ D({\n __name: \"ADate\",\n props: {\n label: null,\n modelValue: null,\n required: { type: Boolean },\n readonly: { type: Boolean },\n uuid: null,\n validation: { default: () => ({ errorMessage: \" \" }) }\n },\n emits: [\"update:modelValue\"],\n setup(e, { emit: t }) {\n const l = e, n = M({\n get: () => l.modelValue,\n set: (o) => {\n t(\"update:modelValue\", o);\n }\n });\n return (o, a) => (f(), _(\"div\", null, [\n k(u(\"input\", {\n \"onUpdate:modelValue\": a[0] || (a[0] = (s) => P(n) ? n.value = s : null),\n type: \"date\",\n id: e.uuid,\n disabled: e.readonly,\n required: e.required\n }, null, 8, Ue), [\n [H, v(n)]\n ]),\n u(\"label\", { for: e.uuid }, x(e.label), 9, Re),\n k(u(\"p\", {\n innerHTML: e.validation.errorMessage\n }, null, 8, Ne), [\n [S, e.validation.errorMessage]\n ])\n ]));\n }\n});\nconst Ye = /* @__PURE__ */ A(Qe, [[\"__scopeId\", \"data-v-91963706\"]]);\nvar Q;\nconst ae = typeof window < \"u\", je = (e) => typeof e == \"string\", We = () => {\n};\nae && (Q = window == null ? void 0 : window.navigator) != null && Q.userAgent && /iP(ad|hone|od)/.test(window.navigator.userAgent);\nfunction se(e) {\n return typeof e == \"function\" ? e() : v(e);\n}\nfunction Ge(e) {\n return e;\n}\nfunction ze(e) {\n return _e() ? (he(e), !0) : !1;\n}\nfunction L(e) {\n var t;\n const l = se(e);\n return (t = l == null ? void 0 : l.$el) != null ? t : l;\n}\nconst re = ae ? window : void 0;\nfunction Je(...e) {\n let t, l, n, o;\n if (je(e[0]) || Array.isArray(e[0]) ? ([l, n, o] = e, t = re) : [t, l, n, o] = e, !t)\n return We;\n Array.isArray(l) || (l = [l]), Array.isArray(n) || (n = [n]);\n const a = [], s = () => {\n a.forEach((p) => p()), a.length = 0;\n }, r = (p, b, h, d) => (p.addEventListener(b, h, d), () => p.removeEventListener(b, h, d)), i = q(() => [L(t), se(o)], ([p, b]) => {\n s(), p && a.push(...l.flatMap((h) => n.map((d) => r(p, h, d, b))));\n }, { immediate: !0, flush: \"post\" }), c = () => {\n i(), s();\n };\n return ze(c), c;\n}\nconst Y = typeof globalThis < \"u\" ? globalThis : typeof window < \"u\" ? window : typeof global < \"u\" ? global : typeof self < \"u\" ? self : {}, j = \"__vueuse_ssr_handlers__\";\nY[j] = Y[j] || {};\nfunction Ke(e, { window: t = re, scrollTarget: l } = {}) {\n const n = g(!1), o = () => {\n if (!t)\n return;\n const a = t.document, s = L(e);\n if (!s)\n n.value = !1;\n else {\n const r = s.getBoundingClientRect();\n n.value = r.top <= (t.innerHeight || a.documentElement.clientHeight) && r.left <= (t.innerWidth || a.documentElement.clientWidth) && r.bottom >= 0 && r.right >= 0;\n }\n };\n return q(() => L(e), () => o(), { immediate: !0, flush: \"post\" }), t && Je(l || t, \"scroll\", o, {\n capture: !1,\n passive: !0\n }), n;\n}\nvar W;\n(function(e) {\n e.UP = \"UP\", e.RIGHT = \"RIGHT\", e.DOWN = \"DOWN\", e.LEFT = \"LEFT\", e.NONE = \"NONE\";\n})(W || (W = {}));\nvar Xe = Object.defineProperty, G = Object.getOwnPropertySymbols, Ze = Object.prototype.hasOwnProperty, et = Object.prototype.propertyIsEnumerable, z = (e, t, l) => t in e ? Xe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: l }) : e[t] = l, tt = (e, t) => {\n for (var l in t || (t = {}))\n Ze.call(t, l) && z(e, l, t[l]);\n if (G)\n for (var l of G(t))\n et.call(t, l) && z(e, l, t[l]);\n return e;\n};\nconst nt = {\n easeInSine: [0.12, 0, 0.39, 0],\n easeOutSine: [0.61, 1, 0.88, 1],\n easeInOutSine: [0.37, 0, 0.63, 1],\n easeInQuad: [0.11, 0, 0.5, 0],\n easeOutQuad: [0.5, 1, 0.89, 1],\n easeInOutQuad: [0.45, 0, 0.55, 1],\n easeInCubic: [0.32, 0, 0.67, 0],\n easeOutCubic: [0.33, 1, 0.68, 1],\n easeInOutCubic: [0.65, 0, 0.35, 1],\n easeInQuart: [0.5, 0, 0.75, 0],\n easeOutQuart: [0.25, 1, 0.5, 1],\n easeInOutQuart: [0.76, 0, 0.24, 1],\n easeInQuint: [0.64, 0, 0.78, 0],\n easeOutQuint: [0.22, 1, 0.36, 1],\n easeInOutQuint: [0.83, 0, 0.17, 1],\n easeInExpo: [0.7, 0, 0.84, 0],\n easeOutExpo: [0.16, 1, 0.3, 1],\n easeInOutExpo: [0.87, 0, 0.13, 1],\n easeInCirc: [0.55, 0, 1, 0.45],\n easeOutCirc: [0, 0.55, 0.45, 1],\n easeInOutCirc: [0.85, 0, 0.15, 1],\n easeInBack: [0.36, 0, 0.66, -0.56],\n easeOutBack: [0.34, 1.56, 0.64, 1],\n easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\ntt({\n linear: Ge\n}, nt);\nconst w = (e) => {\n let t = Ke(e).value;\n return t = t && e.offsetHeight > 0, t;\n}, E = (e) => e.tabIndex >= 0, J = (e) => {\n const t = e.target;\n return F(t);\n}, F = (e) => {\n var t;\n let l;\n if (e instanceof HTMLTableCellElement) {\n const n = (t = e.parentElement) == null ? void 0 : t.previousElementSibling;\n if (n) {\n const o = Array.from(n.children)[e.cellIndex];\n o && (l = o);\n }\n } else if (e instanceof HTMLTableRowElement) {\n const n = e.previousElementSibling;\n n && (l = n);\n }\n return l && (!E(l) || !w(l)) ? F(l) : l;\n}, lt = (e) => {\n var t;\n const l = e.target;\n let n;\n if (l instanceof HTMLTableCellElement) {\n const o = (t = l.parentElement) == null ? void 0 : t.parentElement;\n if (o) {\n const a = o.firstElementChild.children[l.cellIndex];\n a && (n = a);\n }\n } else if (l instanceof HTMLTableRowElement) {\n const o = l.parentElement;\n if (o) {\n const a = o.firstElementChild;\n a && (n = a);\n }\n }\n return n && (!E(n) || !w(n)) ? U(n) : n;\n}, K = (e) => {\n const t = e.target;\n return U(t);\n}, U = (e) => {\n var t;\n let l;\n if (e instanceof HTMLTableCellElement) {\n const n = (t = e.parentElement) == null ? void 0 : t.nextElementSibling;\n if (n) {\n const o = Array.from(n.children)[e.cellIndex];\n o && (l = o);\n }\n } else if (e instanceof HTMLTableRowElement) {\n const n = e.nextElementSibling;\n n && (l = n);\n }\n return l && (!E(l) || !w(l)) ? U(l) : l;\n}, ot = (e) => {\n var t;\n const l = e.target;\n let n;\n if (l instanceof HTMLTableCellElement) {\n const o = (t = l.parentElement) == null ? void 0 : t.parentElement;\n if (o) {\n const a = o.lastElementChild.children[l.cellIndex];\n a && (n = a);\n }\n } else if (l instanceof HTMLTableRowElement) {\n const o = l.parentElement;\n if (o) {\n const a = o.lastElementChild;\n a && (n = a);\n }\n }\n return n && (!E(n) || !w(n)) ? F(n) : n;\n}, X = (e) => {\n const t = e.target;\n return R(t);\n}, R = (e) => {\n var t;\n let l;\n if (e.previousElementSibling)\n l = e.previousElementSibling;\n else {\n const n = (t = e.parentElement) == null ? void 0 : t.previousElementSibling;\n l = n == null ? void 0 : n.lastElementChild;\n }\n return l && (!E(l) || !w(l)) ? R(l) : l;\n}, Z = (e) => {\n const t = e.target;\n return N(t);\n}, N = (e) => {\n var t;\n let l;\n if (e.nextElementSibling)\n l = e.nextElementSibling;\n else {\n const n = (t = e.parentElement) == null ? void 0 : t.nextElementSibling;\n l = n == null ? void 0 : n.firstElementChild;\n }\n return l && (!E(l) || !w(l)) ? N(l) : l;\n}, ee = (e) => {\n const t = e.target.parentElement.firstElementChild;\n return t && (!E(t) || !w(t)) ? N(t) : t;\n}, te = (e) => {\n const t = e.target.parentElement.lastElementChild;\n return t && (!E(t) || !w(t)) ? R(t) : t;\n}, V = [\"alt\", \"control\", \"shift\", \"meta\"], at = {\n ArrowUp: \"up\",\n ArrowDown: \"down\",\n ArrowLeft: \"left\",\n ArrowRight: \"right\"\n}, ue = {\n \"keydown.up\": (e) => {\n const t = J(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.down\": (e) => {\n const t = K(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.left\": (e) => {\n const t = X(e);\n e.preventDefault(), e.stopPropagation(), t && t.focus();\n },\n \"keydown.right\": (e) => {\n const t = Z(e);\n e.preventDefault(), e.stopPropagation(), t && t.focus();\n },\n \"keydown.control.up\": (e) => {\n const t = lt(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.down\": (e) => {\n const t = ot(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.left\": (e) => {\n const t = ee(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.control.right\": (e) => {\n const t = te(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.end\": (e) => {\n const t = te(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.enter\": (e) => {\n if (e.target instanceof HTMLTableCellElement) {\n e.preventDefault(), e.stopPropagation();\n const t = K(e);\n t && t.focus();\n }\n },\n \"keydown.shift.enter\": (e) => {\n if (e.target instanceof HTMLTableCellElement) {\n e.preventDefault(), e.stopPropagation();\n const t = J(e);\n t && t.focus();\n }\n },\n \"keydown.home\": (e) => {\n const t = ee(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.tab\": (e) => {\n const t = Z(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n },\n \"keydown.shift.tab\": (e) => {\n const t = X(e);\n t && (e.preventDefault(), e.stopPropagation(), t.focus());\n }\n};\nfunction st(e) {\n const t = (n) => {\n let o = null;\n n.parent && (typeof n.parent == \"string\" ? o = document.querySelector(n.parent) : n.parent instanceof Element ? o = n.parent : o = n.parent.value);\n let a = [];\n if (n.selectors)\n if (typeof n.selectors == \"string\")\n a = o ? Array.from(o.querySelectorAll(n.selectors)) : Array.from(document.querySelectorAll(n.selectors));\n else if (n.selectors instanceof Element)\n a.push(n.selectors);\n else if (Array.isArray(n.selectors.value))\n for (const s of n.selectors.value)\n s instanceof Element ? a.push(s) : a.push(s.$el);\n else\n a.push(n.selectors.value);\n else\n a = Array.from(o.children).filter((s) => E(s) && w(s));\n return a;\n }, l = (n) => (o) => {\n const a = at[o.key] || o.key.toLowerCase();\n if (V.includes(a))\n return;\n const s = n.handlers || ue;\n for (const r of Object.keys(s)) {\n const [i, ...c] = r.split(\".\");\n if (i === \"keydown\" && c.includes(a)) {\n const p = s[r], b = c.filter((d) => V.includes(d)), h = V.some((d) => {\n const T = d.charAt(0).toUpperCase() + d.slice(1);\n return o.getModifierState(T);\n });\n if (b.length > 0) {\n if (h) {\n for (const d of V)\n if (c.includes(d)) {\n const T = d.charAt(0).toUpperCase() + d.slice(1);\n o.getModifierState(T) && p(o);\n }\n }\n } else\n h || p(o);\n }\n }\n };\n le(() => {\n for (const n of e) {\n const o = t(n);\n for (const a of o)\n a.addEventListener(\"keydown\", l(n));\n }\n }), ge(() => {\n for (const n of e) {\n const o = t(n);\n for (const a of o)\n a.removeEventListener(\"keydown\", l(n));\n }\n });\n}\nconst rt = (e) => (De(\"data-v-e1d2d140\"), e = e(), we(), e), ut = [\"event\"], it = { colspan: \"5\" }, ct = /* @__PURE__ */ rt(() => /* @__PURE__ */ u(\"tr\", null, [\n /* @__PURE__ */ u(\"td\", null, \"M\"),\n /* @__PURE__ */ u(\"td\", null, \"T\"),\n /* @__PURE__ */ u(\"td\", null, \"W\"),\n /* @__PURE__ */ u(\"td\", null, \"T\"),\n /* @__PURE__ */ u(\"td\", null, \"F\"),\n /* @__PURE__ */ u(\"td\", null, \"S\"),\n /* @__PURE__ */ u(\"td\", null, \"S\")\n], -1)), dt = [\"onClick\"], pt = /* @__PURE__ */ D({\n __name: \"ADatePicker\",\n props: {\n modelValue: null,\n event: null\n },\n emits: [\"update:modelValue\"],\n setup(e, { emit: t }) {\n const l = e, n = 6, o = 7, a = /* @__PURE__ */ new Date(), s = g(l.modelValue ? new Date(l.modelValue) : void 0), r = g(), i = g(), c = g([]);\n le(async () => {\n let m = /* @__PURE__ */ new Date();\n m ? (s.value = m, r.value = s.value.getMonth(), i.value = s.value.getFullYear()) : (r.value = a.getMonth(), i.value = a.getFullYear()), p(), await be();\n const I = document.getElementsByClassName(\"selectedDate\");\n if (I.length > 0)\n I[0].focus();\n else {\n const y = document.getElementsByClassName(\"todaysDate\");\n y.length > 0 && y[0].focus();\n }\n }), q([r, i], () => {\n p();\n });\n const p = () => {\n c.value = [];\n const m = new Date(i.value, r.value, 1), I = m.getDay(), y = m.setDate(m.getDate() - I);\n for (let C of Array(43).keys())\n c.value.push(y + C * 864e5);\n }, b = () => {\n i.value -= 1;\n }, h = () => {\n i.value += 1;\n }, d = () => {\n r.value == 0 ? (r.value = 11, b()) : r.value -= 1;\n }, T = () => {\n r.value == 11 ? (r.value = 0, h()) : r.value += 1;\n }, ce = (m) => {\n if (r.value === a.getMonth())\n return a.toDateString() === new Date(m).toDateString();\n }, de = (m) => new Date(m).toDateString() === new Date(s.value).toDateString(), pe = (m) => {\n s.value = new Date(c.value[m]), t(\"update:modelValue\", s.value.getTime());\n }, fe = M(() => new Date(i.value, r.value, 1).toLocaleDateString(void 0, {\n year: \"numeric\",\n month: \"long\"\n }));\n return st([\n {\n parent: \"table.adate\",\n selectors: \"td\",\n handlers: {\n ...ue,\n \"keydown.pageup\": d,\n \"keydown.shift.pageup\": b,\n \"keydown.pagedown\": T,\n \"keydown.shift.pagedown\": h\n }\n }\n ]), (m, I) => (f(), _(\"div\", {\n event: e.event,\n class: \"adatepicker\",\n tabindex: \"0\",\n ref: \"adatepicker\"\n }, [\n u(\"table\", null, [\n u(\"tr\", null, [\n u(\"td\", {\n onClick: d,\n tabindex: -1\n }, \"<\"),\n u(\"th\", it, x(v(fe)), 1),\n u(\"td\", {\n onClick: T,\n tabindex: -1\n }, \">\")\n ]),\n ct,\n (f(), _($, null, O(n, (y) => u(\"tr\", { key: y }, [\n (f(), _($, null, O(o, (C) => u(\"td\", {\n key: (y - 1) * o + C,\n contenteditable: !1,\n spellcheck: !1,\n tabindex: 0,\n onClick: ke((Lt) => pe((y - 1) * o + C), [\"prevent\", \"stop\"]),\n class: oe({\n todaysDate: ce(c.value[(y - 1) * o + C]),\n selectedDate: de(c.value[(y - 1) * o + C])\n })\n }, x(new Date(c.value[(y - 1) * o + C]).getDate()), 11, dt)), 64))\n ])), 64))\n ])\n ], 8, ut));\n }\n});\nconst ft = /* @__PURE__ */ A(pt, [[\"__scopeId\", \"data-v-e1d2d140\"]]), mt = /* @__PURE__ */ D({\n __name: \"CollapseButton\",\n props: {\n collapsed: { type: Boolean }\n },\n setup(e) {\n return (t, l) => (f(), _(\"button\", {\n class: oe([\"collapse-button\", e.collapsed ? \"rotated\" : \"unrotated\"])\n }, \"×\", 2));\n }\n});\nconst vt = /* @__PURE__ */ A(mt, [[\"__scopeId\", \"data-v-6f1c1b45\"]]), yt = /* @__PURE__ */ D({\n __name: \"AForm\",\n props: {\n modelValue: null,\n data: null,\n readonly: { type: Boolean }\n },\n emits: [\"update:modelValue\"],\n setup(e, { emit: t }) {\n const l = e, n = g(l.data || {}), o = (s) => {\n let r = {};\n for (const [i, c] of Object.entries(s))\n [\"component\", \"fieldtype\"].includes(i) || (r[i] = c), i === \"rows\" && c && c.length === 0 && (r.rows = n.value[s.fieldname]);\n return r;\n }, a = M({\n get: () => l.modelValue.map((s, r) => M({\n get() {\n return s.value;\n },\n set: (i) => {\n l.modelValue[r].value = i, t(\"update:modelValue\", l.modelValue);\n }\n })),\n set: () => {\n }\n });\n return (s, r) => (f(), _(\"form\", null, [\n (f(!0), _($, null, O(e.modelValue, (i, c) => (f(), B(Ee(i.component), xe({\n key: c,\n schema: i,\n modelValue: v(a)[c].value,\n \"onUpdate:modelValue\": (p) => v(a)[c].value = p,\n data: n.value[i.fieldname],\n readonly: e.readonly\n }, o(i)), null, 16, [\"schema\", \"modelValue\", \"onUpdate:modelValue\", \"data\", \"readonly\"]))), 128))\n ]));\n }\n});\nconst ie = /* @__PURE__ */ A(yt, [[\"__scopeId\", \"data-v-74d66cf2\"]]), gt = /* @__PURE__ */ D({\n __name: \"AFieldset\",\n props: {\n schema: null,\n label: null,\n collapsible: { type: Boolean },\n data: null\n },\n setup(e) {\n const t = e, l = g(t.data || []);\n let n = g(!1), o = g(t.collapsible);\n const a = g(t.schema);\n function s(r) {\n r.preventDefault(), o.value && (n.value = !n.value);\n }\n return (r, i) => (f(), _(\"fieldset\", null, [\n u(\"legend\", {\n onClick: s,\n onSubmit: s\n }, [\n Ae(x(e.label) + \" \", 1),\n v(o) ? (f(), B(vt, {\n key: 0,\n collapsed: v(n)\n }, null, 8, [\"collapsed\"])) : Ce(\"\", !0)\n ], 32),\n Me(r.$slots, \"default\", { collapsed: v(n) }, () => [\n k(Te(ie, {\n modelValue: a.value,\n \"onUpdate:modelValue\": i[0] || (i[0] = (c) => a.value = c),\n data: l.value\n }, null, 8, [\"modelValue\", \"data\"]), [\n [S, !v(n)]\n ])\n ], !0)\n ]));\n }\n});\nconst _t = /* @__PURE__ */ A(gt, [[\"__scopeId\", \"data-v-cad9b578\"]]), ht = [\"id\", \"disabled\", \"required\"], bt = [\"for\"], kt = [\"innerHTML\"], Dt = /* @__PURE__ */ D({\n __name: \"ANumericInput\",\n props: {\n label: null,\n modelValue: null,\n required: { type: Boolean },\n readonly: { type: Boolean },\n uuid: null,\n validation: { default: () => ({ errorMessage: \" \" }) }\n },\n emits: [\"update:modelValue\"],\n setup(e, { emit: t }) {\n const l = e, n = M({\n get: () => l.modelValue,\n set: (o) => {\n t(\"update:modelValue\", o);\n }\n });\n return (o, a) => (f(), _(\"div\", null, [\n k(u(\"input\", {\n \"onUpdate:modelValue\": a[0] || (a[0] = (s) => P(n) ? n.value = s : null),\n type: \"number\",\n id: e.uuid,\n disabled: e.readonly,\n required: e.required\n }, null, 8, ht), [\n [H, v(n)]\n ]),\n u(\"label\", { for: e.uuid }, x(e.label), 9, bt),\n k(u(\"p\", {\n innerHTML: e.validation.errorMessage\n }, null, 8, kt), [\n [S, e.validation.errorMessage]\n ])\n ]));\n }\n});\nconst wt = /* @__PURE__ */ A(Dt, [[\"__scopeId\", \"data-v-be33e6c4\"]]), ne = {\n date: \"##/##/####\",\n datetime: \"####/##/## ##:##\",\n time: \"##:##\",\n fulltime: \"##:##:##\",\n phone: \"(###) ### - ####\",\n card: \"#### #### #### ####\"\n};\nfunction Et(e) {\n try {\n return Function(`\"use strict\";return (${e})`)();\n } catch {\n }\n}\nfunction xt(e) {\n var l;\n let t = e.value;\n if (t) {\n const n = Et(t);\n if (n) {\n const o = e.instance.locale;\n t = n(o);\n }\n } else {\n const o = (l = e.instance.schema.fieldtype) == null ? void 0 : l.toLowerCase();\n o && ne[o] && (t = ne[o]);\n }\n return t;\n}\nfunction At(e, t) {\n t || (t = \"#\");\n let l = e;\n const n = [t, \"/\", \"-\", \"(\", \")\", \" \"];\n for (const o of n)\n l = l.replaceAll(o, \"\");\n return l;\n}\nfunction Ct(e, t, l) {\n l || (l = \"#\");\n let n = t;\n for (const o of e) {\n const a = n.indexOf(l);\n if (a !== -1) {\n const s = n.substring(0, a), r = n.substring(a + 1);\n n = s + o + r;\n }\n }\n return n.slice(0, t.length);\n}\nfunction Mt(e, t) {\n const l = xt(t);\n if (!l)\n return;\n const n = \"#\", o = e.value, a = At(o, n);\n if (a) {\n const s = Ct(a, l, n);\n t.instance.maskFilled && (t.instance.maskFilled = !s.includes(n)), e.value = s;\n } else\n e.value = l;\n}\nconst Tt = D({\n name: \"ATextInput\",\n props: {\n schema: {\n type: Object,\n required: !0\n },\n label: {\n type: String,\n required: !0\n },\n modelValue: {\n type: null\n },\n mask: {\n type: String\n },\n required: {\n type: Boolean\n },\n readonly: {\n type: Boolean\n },\n uuid: {\n type: String\n },\n validation: {\n type: Object,\n default: () => ({ errorMessage: \" \" })\n }\n },\n setup(e, t) {\n const l = g(!1), n = Ie(\"locale\", \"\");\n return { inputText: M({\n get() {\n return e.modelValue;\n },\n set(a) {\n t.emit(\"update:modelValue\", a);\n }\n }), locale: n, maskFilled: l };\n },\n directives: {\n mask: Mt\n }\n});\nconst It = [\"id\", \"disabled\", \"maxlength\", \"required\"], St = [\"for\"], Vt = [\"innerHTML\"];\nfunction $t(e, t, l, n, o, a) {\n const s = Se(\"mask\");\n return f(), _(\"div\", null, [\n k(u(\"input\", {\n \"onUpdate:modelValue\": t[0] || (t[0] = (r) => e.inputText = r),\n id: e.uuid,\n disabled: e.readonly,\n maxlength: e.mask ? e.maskFilled && e.mask.length : void 0,\n required: e.required\n }, null, 8, It), [\n [H, e.inputText],\n [s, e.mask]\n ]),\n u(\"label\", { for: e.uuid }, x(e.label), 9, St),\n k(u(\"p\", {\n innerHTML: e.validation.errorMessage\n }, null, 8, Vt), [\n [S, e.validation.errorMessage]\n ])\n ]);\n}\nconst Ot = /* @__PURE__ */ A(Tt, [[\"render\", $t], [\"__scopeId\", \"data-v-76dba9b8\"]]);\nfunction Bt(e) {\n e.component(\"ACheckbox\", He), e.component(\"ACombobox\", Fe), e.component(\"ADate\", Ye), e.component(\"ADatePicker\", ft), e.component(\"AFieldset\", _t), e.component(\"AForm\", ie), e.component(\"ANumericInput\", wt), e.component(\"ATextInput\", Ot);\n}\nexport {\n He as ACheckbox,\n Fe as AComboBox,\n Ye as ADate,\n ft as ADatePicker,\n _t as AFieldset,\n ie as AForm,\n wt as ANumericInput,\n Ot as ATextInput,\n Bt as install\n};\n//# sourceMappingURL=aform.js.map\n","import { effectScope, ref, markRaw, toRaw, getCurrentInstance, inject, watch, unref, reactive, isRef, isReactive, toRef, nextTick, computed, getCurrentScope, onScopeDispose, toRefs, onBeforeMount, shallowRef, defineComponent, h as h$1, provide, watchEffect } from \"vue\";\nclass Stonecrop {\n /**\n * @constructor\n * @param {Registry} registry - The immutable registry\n * @param {ReturnType} store - The mutable Pinia store\n * @param {Schema} [schema] - (optional) The Stonecrop schema\n * @param {ImmutableDoctype['workflow']} [workflow] - (optional) The Stonecrop workflow\n * @param {ImmutableDoctype['actions']} [actions] - (optional) The Stonecrop actions\n * @returns {Stonecrop} The Stonecrop instance\n */\n constructor(registry, store, schema, workflow, actions) {\n this.name = \"Stonecrop\";\n if (Stonecrop._root) {\n return Stonecrop._root;\n }\n Stonecrop._root = this;\n this.registry = registry;\n this.store = store;\n this.schema = schema;\n this.workflow = workflow;\n this.actions = actions;\n }\n /**\n * @method setup\n * @param {DoctypeMeta} doctype - The doctype to setup\n * @returns {void}\n * @description Sets up the Stonecrop instance with the given doctype\n * @example\n * const doctype = await registry.doctypeLoader('Task')\n * stonecrop.setup(doctype)\n */\n setup(doctype) {\n this.getMeta(doctype);\n this.getWorkflow(doctype);\n this.getActions(doctype);\n }\n /**\n * @method getMeta\n * @param {DoctypeMeta} doctype - The doctype to get meta for\n * @returns {void}\n * @description Gets the meta for the given doctype\n * @example\n * const doctype = await registry.doctypeLoader('Task')\n * stonecrop.getMeta(doctype)\n */\n getMeta(doctype) {\n this.schema = { doctype: doctype.doctype, schema: doctype.schema };\n }\n /**\n * @method getWorkflow\n * @param {DoctypeMeta} doctype - The doctype to get workflow for\n * @returns {void}\n * @description Gets the workflow for the given doctype\n * @example\n * const doctype = await registry.doctypeLoader('Task')\n * stonecrop.getWorkflow(doctype)\n */\n getWorkflow(doctype) {\n const doctypeRegistry = this.registry.registry[doctype.slug];\n this.workflow = doctypeRegistry.workflow;\n }\n /**\n * @method getActions\n * @param {DoctypeMeta} doctype - The doctype to get actions for\n * @returns {void}\n * @description Gets the actions for the given doctype\n * @example\n * const doctype = await registry.doctypeLoader('Task')\n * stonecrop.getActions(doctype)\n */\n getActions(doctype) {\n const doctypeRegistry = this.registry.registry[doctype.slug];\n this.actions = doctypeRegistry.actions;\n }\n /**\n * @method getRecords\n * @param {DoctypeMeta} doctype - The doctype to get records for\n * @param {RequestInit} [filters] - The filters to apply to the records\n * @returns {Promise}\n * @description Gets the records for the given doctype\n * @example\n * const doctype = await registry.doctypeLoader('Task')\n * await stonecrop.getRecords(doctype)\n * @example\n * const doctype = await registry.doctypeLoader('Task')\n * const filters = JSON.stringify({ status: 'Open' })\n * await stonecrop.getRecords(doctype, { body: filters })\n */\n async getRecords(doctype, filters) {\n this.store.$patch({ records: [] });\n const records = await fetch(`/${doctype.slug}`, filters);\n const data = await records.json();\n this.store.$patch({ records: data });\n }\n /**\n * @method getRecord\n * @param {DoctypeMeta} doctype - The doctype to get record for\n * @param {string} id - The id of the record to get\n * @returns {Promise}\n * @description Gets the record for the given doctype and id\n * @example\n * const doctype = await registry.doctypeLoader('Task')\n * await stonecrop.getRecord(doctype, 'TASK-00001')\n */\n async getRecord(doctype, id) {\n this.store.$patch({ record: {} });\n const record = await fetch(`/${doctype.slug}/${id}`);\n const data = await record.json();\n this.store.$patch({ record: data });\n }\n /**\n * @method runAction\n * @param {DoctypeMeta} doctype - The doctype to run action for\n * @param {string} action - The action to run\n * @param {string[]} [id] - The id(s) of the record(s) to run action on\n * @returns {void}\n * @description Runs the action for the given doctype and id\n * @example\n * const doctype = await registry.doctypeLoader('Task')\n * stonecrop.runAction(doctype, 'CREATE')\n * @example\n * const doctype = await registry.doctypeLoader('Task')\n * stonecrop.runAction(doctype, 'UPDATE', ['TASK-00001'])\n * @example\n * const doctype = await registry.doctypeLoader('Task')\n * stonecrop.runAction(doctype, 'DELETE', ['TASK-00001'])\n * @example\n * const doctype = await registry.doctypeLoader('Task')\n * stonecrop.runAction(doctype, 'TRANSITION', ['TASK-00001', 'TASK-00002'])\n */\n runAction(doctype, action, id) {\n const doctypeRegistry = this.registry.registry[doctype.slug];\n const actions = doctypeRegistry.actions.get(action);\n const { initialState } = this.workflow;\n this.workflow.transition(initialState, { type: action });\n if (actions.length > 0) {\n actions.forEach((action2) => {\n const actionFn = new Function(action2);\n actionFn(id);\n });\n }\n }\n}\nvar isVue2 = false;\nfunction set(target, key, val) {\n if (Array.isArray(target)) {\n target.length = Math.max(target.length, key);\n target.splice(key, 1, val);\n return val;\n }\n target[key] = val;\n return val;\n}\nfunction del(target, key) {\n if (Array.isArray(target)) {\n target.splice(key, 1);\n return;\n }\n delete target[key];\n}\nfunction getDevtoolsGlobalHook$1() {\n return getTarget$1().__VUE_DEVTOOLS_GLOBAL_HOOK__;\n}\nfunction getTarget$1() {\n return typeof navigator !== \"undefined\" && typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : {};\n}\nconst isProxyAvailable$1 = typeof Proxy === \"function\";\nconst HOOK_SETUP$1 = \"devtools-plugin:setup\";\nconst HOOK_PLUGIN_SETTINGS_SET$1 = \"plugin:settings:set\";\nlet supported$1;\nlet perf$1;\nfunction isPerformanceSupported$1() {\n var _a;\n if (supported$1 !== void 0) {\n return supported$1;\n }\n if (typeof window !== \"undefined\" && window.performance) {\n supported$1 = true;\n perf$1 = window.performance;\n } else if (typeof global !== \"undefined\" && ((_a = global.perf_hooks) === null || _a === void 0 ? void 0 : _a.performance)) {\n supported$1 = true;\n perf$1 = global.perf_hooks.performance;\n } else {\n supported$1 = false;\n }\n return supported$1;\n}\nfunction now$2() {\n return isPerformanceSupported$1() ? perf$1.now() : Date.now();\n}\nlet ApiProxy$1 = class ApiProxy {\n constructor(plugin, hook) {\n this.target = null;\n this.targetQueue = [];\n this.onQueue = [];\n this.plugin = plugin;\n this.hook = hook;\n const defaultSettings = {};\n if (plugin.settings) {\n for (const id in plugin.settings) {\n const item = plugin.settings[id];\n defaultSettings[id] = item.defaultValue;\n }\n }\n const localSettingsSaveId = `__vue-devtools-plugin-settings__${plugin.id}`;\n let currentSettings = Object.assign({}, defaultSettings);\n try {\n const raw = localStorage.getItem(localSettingsSaveId);\n const data = JSON.parse(raw);\n Object.assign(currentSettings, data);\n } catch (e) {\n }\n this.fallbacks = {\n getSettings() {\n return currentSettings;\n },\n setSettings(value) {\n try {\n localStorage.setItem(localSettingsSaveId, JSON.stringify(value));\n } catch (e) {\n }\n currentSettings = value;\n },\n now() {\n return now$2();\n }\n };\n if (hook) {\n hook.on(HOOK_PLUGIN_SETTINGS_SET$1, (pluginId, value) => {\n if (pluginId === this.plugin.id) {\n this.fallbacks.setSettings(value);\n }\n });\n }\n this.proxiedOn = new Proxy({}, {\n get: (_target, prop) => {\n if (this.target) {\n return this.target.on[prop];\n } else {\n return (...args) => {\n this.onQueue.push({\n method: prop,\n args\n });\n };\n }\n }\n });\n this.proxiedTarget = new Proxy({}, {\n get: (_target, prop) => {\n if (this.target) {\n return this.target[prop];\n } else if (prop === \"on\") {\n return this.proxiedOn;\n } else if (Object.keys(this.fallbacks).includes(prop)) {\n return (...args) => {\n this.targetQueue.push({\n method: prop,\n args,\n resolve: () => {\n }\n });\n return this.fallbacks[prop](...args);\n };\n } else {\n return (...args) => {\n return new Promise((resolve) => {\n this.targetQueue.push({\n method: prop,\n args,\n resolve\n });\n });\n };\n }\n }\n });\n }\n async setRealTarget(target) {\n this.target = target;\n for (const item of this.onQueue) {\n this.target.on[item.method](...item.args);\n }\n for (const item of this.targetQueue) {\n item.resolve(await this.target[item.method](...item.args));\n }\n }\n};\nfunction setupDevtoolsPlugin$1(pluginDescriptor, setupFn) {\n const descriptor = pluginDescriptor;\n const target = getTarget$1();\n const hook = getDevtoolsGlobalHook$1();\n const enableProxy = isProxyAvailable$1 && descriptor.enableEarlyProxy;\n if (hook && (target.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !enableProxy)) {\n hook.emit(HOOK_SETUP$1, pluginDescriptor, setupFn);\n } else {\n const proxy = enableProxy ? new ApiProxy$1(descriptor, hook) : null;\n const list = target.__VUE_DEVTOOLS_PLUGINS__ = target.__VUE_DEVTOOLS_PLUGINS__ || [];\n list.push({\n pluginDescriptor: descriptor,\n setupFn,\n proxy\n });\n if (proxy)\n setupFn(proxy.proxiedTarget);\n }\n}\n/*!\n * pinia v2.0.33\n * (c) 2023 Eduardo San Martin Morote\n * @license MIT\n */\nlet activePinia;\nconst setActivePinia = (pinia2) => activePinia = pinia2;\nconst piniaSymbol = process.env.NODE_ENV !== \"production\" ? Symbol(\"pinia\") : (\n /* istanbul ignore next */\n Symbol()\n);\nfunction isPlainObject(o) {\n return o && typeof o === \"object\" && Object.prototype.toString.call(o) === \"[object Object]\" && typeof o.toJSON !== \"function\";\n}\nvar MutationType;\n(function(MutationType2) {\n MutationType2[\"direct\"] = \"direct\";\n MutationType2[\"patchObject\"] = \"patch object\";\n MutationType2[\"patchFunction\"] = \"patch function\";\n})(MutationType || (MutationType = {}));\nconst IS_CLIENT = typeof window !== \"undefined\";\nconst USE_DEVTOOLS = (process.env.NODE_ENV !== \"production\" || false) && !(process.env.NODE_ENV === \"test\") && IS_CLIENT;\nconst _global = /* @__PURE__ */ (() => typeof window === \"object\" && window.window === window ? window : typeof self === \"object\" && self.self === self ? self : typeof global === \"object\" && global.global === global ? global : typeof globalThis === \"object\" ? globalThis : { HTMLElement: null })();\nfunction bom(blob, { autoBom = false } = {}) {\n if (autoBom && /^\\s*(?:text\\/\\S*|application\\/xml|\\S*\\/\\S*\\+xml)\\s*;.*charset\\s*=\\s*utf-8/i.test(blob.type)) {\n return new Blob([String.fromCharCode(65279), blob], { type: blob.type });\n }\n return blob;\n}\nfunction download(url, name, opts) {\n const xhr = new XMLHttpRequest();\n xhr.open(\"GET\", url);\n xhr.responseType = \"blob\";\n xhr.onload = function() {\n saveAs(xhr.response, name, opts);\n };\n xhr.onerror = function() {\n console.error(\"could not download file\");\n };\n xhr.send();\n}\nfunction corsEnabled(url) {\n const xhr = new XMLHttpRequest();\n xhr.open(\"HEAD\", url, false);\n try {\n xhr.send();\n } catch (e) {\n }\n return xhr.status >= 200 && xhr.status <= 299;\n}\nfunction click(node) {\n try {\n node.dispatchEvent(new MouseEvent(\"click\"));\n } catch (e) {\n const evt = document.createEvent(\"MouseEvents\");\n evt.initMouseEvent(\"click\", true, true, window, 0, 0, 0, 80, 20, false, false, false, false, 0, null);\n node.dispatchEvent(evt);\n }\n}\nconst _navigator = typeof navigator === \"object\" ? navigator : { userAgent: \"\" };\nconst isMacOSWebView = /* @__PURE__ */ (() => /Macintosh/.test(_navigator.userAgent) && /AppleWebKit/.test(_navigator.userAgent) && !/Safari/.test(_navigator.userAgent))();\nconst saveAs = !IS_CLIENT ? () => {\n} : (\n // Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program\n typeof HTMLAnchorElement !== \"undefined\" && \"download\" in HTMLAnchorElement.prototype && !isMacOSWebView ? downloadSaveAs : (\n // Use msSaveOrOpenBlob as a second approach\n \"msSaveOrOpenBlob\" in _navigator ? msSaveAs : (\n // Fallback to using FileReader and a popup\n fileSaverSaveAs\n )\n )\n);\nfunction downloadSaveAs(blob, name = \"download\", opts) {\n const a = document.createElement(\"a\");\n a.download = name;\n a.rel = \"noopener\";\n if (typeof blob === \"string\") {\n a.href = blob;\n if (a.origin !== location.origin) {\n if (corsEnabled(a.href)) {\n download(blob, name, opts);\n } else {\n a.target = \"_blank\";\n click(a);\n }\n } else {\n click(a);\n }\n } else {\n a.href = URL.createObjectURL(blob);\n setTimeout(function() {\n URL.revokeObjectURL(a.href);\n }, 4e4);\n setTimeout(function() {\n click(a);\n }, 0);\n }\n}\nfunction msSaveAs(blob, name = \"download\", opts) {\n if (typeof blob === \"string\") {\n if (corsEnabled(blob)) {\n download(blob, name, opts);\n } else {\n const a = document.createElement(\"a\");\n a.href = blob;\n a.target = \"_blank\";\n setTimeout(function() {\n click(a);\n });\n }\n } else {\n navigator.msSaveOrOpenBlob(bom(blob, opts), name);\n }\n}\nfunction fileSaverSaveAs(blob, name, opts, popup) {\n popup = popup || open(\"\", \"_blank\");\n if (popup) {\n popup.document.title = popup.document.body.innerText = \"downloading...\";\n }\n if (typeof blob === \"string\")\n return download(blob, name, opts);\n const force = blob.type === \"application/octet-stream\";\n const isSafari = /constructor/i.test(String(_global.HTMLElement)) || \"safari\" in _global;\n const isChromeIOS = /CriOS\\/[\\d]+/.test(navigator.userAgent);\n if ((isChromeIOS || force && isSafari || isMacOSWebView) && typeof FileReader !== \"undefined\") {\n const reader = new FileReader();\n reader.onloadend = function() {\n let url = reader.result;\n if (typeof url !== \"string\") {\n popup = null;\n throw new Error(\"Wrong reader.result type\");\n }\n url = isChromeIOS ? url : url.replace(/^data:[^;]*;/, \"data:attachment/file;\");\n if (popup) {\n popup.location.href = url;\n } else {\n location.assign(url);\n }\n popup = null;\n };\n reader.readAsDataURL(blob);\n } else {\n const url = URL.createObjectURL(blob);\n if (popup)\n popup.location.assign(url);\n else\n location.href = url;\n popup = null;\n setTimeout(function() {\n URL.revokeObjectURL(url);\n }, 4e4);\n }\n}\nfunction toastMessage(message, type2) {\n const piniaMessage = \"🍍 \" + message;\n if (typeof __VUE_DEVTOOLS_TOAST__ === \"function\") {\n __VUE_DEVTOOLS_TOAST__(piniaMessage, type2);\n } else if (type2 === \"error\") {\n console.error(piniaMessage);\n } else if (type2 === \"warn\") {\n console.warn(piniaMessage);\n } else {\n console.log(piniaMessage);\n }\n}\nfunction isPinia(o) {\n return \"_a\" in o && \"install\" in o;\n}\nfunction checkClipboardAccess() {\n if (!(\"clipboard\" in navigator)) {\n toastMessage(`Your browser doesn't support the Clipboard API`, \"error\");\n return true;\n }\n}\nfunction checkNotFocusedError(error) {\n if (error instanceof Error && error.message.toLowerCase().includes(\"document is not focused\")) {\n toastMessage('You need to activate the \"Emulate a focused page\" setting in the \"Rendering\" panel of devtools.', \"warn\");\n return true;\n }\n return false;\n}\nasync function actionGlobalCopyState(pinia2) {\n if (checkClipboardAccess())\n return;\n try {\n await navigator.clipboard.writeText(JSON.stringify(pinia2.state.value));\n toastMessage(\"Global state copied to clipboard.\");\n } catch (error) {\n if (checkNotFocusedError(error))\n return;\n toastMessage(`Failed to serialize the state. Check the console for more details.`, \"error\");\n console.error(error);\n }\n}\nasync function actionGlobalPasteState(pinia2) {\n if (checkClipboardAccess())\n return;\n try {\n pinia2.state.value = JSON.parse(await navigator.clipboard.readText());\n toastMessage(\"Global state pasted from clipboard.\");\n } catch (error) {\n if (checkNotFocusedError(error))\n return;\n toastMessage(`Failed to deserialize the state from clipboard. Check the console for more details.`, \"error\");\n console.error(error);\n }\n}\nasync function actionGlobalSaveState(pinia2) {\n try {\n saveAs(new Blob([JSON.stringify(pinia2.state.value)], {\n type: \"text/plain;charset=utf-8\"\n }), \"pinia-state.json\");\n } catch (error) {\n toastMessage(`Failed to export the state as JSON. Check the console for more details.`, \"error\");\n console.error(error);\n }\n}\nlet fileInput;\nfunction getFileOpener() {\n if (!fileInput) {\n fileInput = document.createElement(\"input\");\n fileInput.type = \"file\";\n fileInput.accept = \".json\";\n }\n function openFile() {\n return new Promise((resolve, reject) => {\n fileInput.onchange = async () => {\n const files = fileInput.files;\n if (!files)\n return resolve(null);\n const file = files.item(0);\n if (!file)\n return resolve(null);\n return resolve({ text: await file.text(), file });\n };\n fileInput.oncancel = () => resolve(null);\n fileInput.onerror = reject;\n fileInput.click();\n });\n }\n return openFile;\n}\nasync function actionGlobalOpenStateFile(pinia2) {\n try {\n const open2 = await getFileOpener();\n const result = await open2();\n if (!result)\n return;\n const { text, file } = result;\n pinia2.state.value = JSON.parse(text);\n toastMessage(`Global state imported from \"${file.name}\".`);\n } catch (error) {\n toastMessage(`Failed to export the state as JSON. Check the console for more details.`, \"error\");\n console.error(error);\n }\n}\nfunction formatDisplay$1(display) {\n return {\n _custom: {\n display\n }\n };\n}\nconst PINIA_ROOT_LABEL = \"🍍 Pinia (root)\";\nconst PINIA_ROOT_ID = \"_root\";\nfunction formatStoreForInspectorTree(store) {\n return isPinia(store) ? {\n id: PINIA_ROOT_ID,\n label: PINIA_ROOT_LABEL\n } : {\n id: store.$id,\n label: store.$id\n };\n}\nfunction formatStoreForInspectorState(store) {\n if (isPinia(store)) {\n const storeNames = Array.from(store._s.keys());\n const storeMap = store._s;\n const state2 = {\n state: storeNames.map((storeId) => ({\n editable: true,\n key: storeId,\n value: store.state.value[storeId]\n })),\n getters: storeNames.filter((id) => storeMap.get(id)._getters).map((id) => {\n const store2 = storeMap.get(id);\n return {\n editable: false,\n key: id,\n value: store2._getters.reduce((getters, key) => {\n getters[key] = store2[key];\n return getters;\n }, {})\n };\n })\n };\n return state2;\n }\n const state = {\n state: Object.keys(store.$state).map((key) => ({\n editable: true,\n key,\n value: store.$state[key]\n }))\n };\n if (store._getters && store._getters.length) {\n state.getters = store._getters.map((getterName) => ({\n editable: false,\n key: getterName,\n value: store[getterName]\n }));\n }\n if (store._customProperties.size) {\n state.customProperties = Array.from(store._customProperties).map((key) => ({\n editable: true,\n key,\n value: store[key]\n }));\n }\n return state;\n}\nfunction formatEventData(events) {\n if (!events)\n return {};\n if (Array.isArray(events)) {\n return events.reduce((data, event) => {\n data.keys.push(event.key);\n data.operations.push(event.type);\n data.oldValue[event.key] = event.oldValue;\n data.newValue[event.key] = event.newValue;\n return data;\n }, {\n oldValue: {},\n keys: [],\n operations: [],\n newValue: {}\n });\n } else {\n return {\n operation: formatDisplay$1(events.type),\n key: formatDisplay$1(events.key),\n oldValue: events.oldValue,\n newValue: events.newValue\n };\n }\n}\nfunction formatMutationType(type2) {\n switch (type2) {\n case MutationType.direct:\n return \"mutation\";\n case MutationType.patchFunction:\n return \"$patch\";\n case MutationType.patchObject:\n return \"$patch\";\n default:\n return \"unknown\";\n }\n}\nlet isTimelineActive = true;\nconst componentStateTypes = [];\nconst MUTATIONS_LAYER_ID = \"pinia:mutations\";\nconst INSPECTOR_ID = \"pinia\";\nconst { assign: assign$1 } = Object;\nconst getStoreType = (id) => \"🍍 \" + id;\nfunction registerPiniaDevtools(app, pinia2) {\n setupDevtoolsPlugin$1({\n id: \"dev.esm.pinia\",\n label: \"Pinia 🍍\",\n logo: \"https://pinia.vuejs.org/logo.svg\",\n packageName: \"pinia\",\n homepage: \"https://pinia.vuejs.org\",\n componentStateTypes,\n app\n }, (api) => {\n if (typeof api.now !== \"function\") {\n toastMessage(\"You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html.\");\n }\n api.addTimelineLayer({\n id: MUTATIONS_LAYER_ID,\n label: `Pinia 🍍`,\n color: 15064968\n });\n api.addInspector({\n id: INSPECTOR_ID,\n label: \"Pinia 🍍\",\n icon: \"storage\",\n treeFilterPlaceholder: \"Search stores\",\n actions: [\n {\n icon: \"content_copy\",\n action: () => {\n actionGlobalCopyState(pinia2);\n },\n tooltip: \"Serialize and copy the state\"\n },\n {\n icon: \"content_paste\",\n action: async () => {\n await actionGlobalPasteState(pinia2);\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n },\n tooltip: \"Replace the state with the content of your clipboard\"\n },\n {\n icon: \"save\",\n action: () => {\n actionGlobalSaveState(pinia2);\n },\n tooltip: \"Save the state as a JSON file\"\n },\n {\n icon: \"folder_open\",\n action: async () => {\n await actionGlobalOpenStateFile(pinia2);\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n },\n tooltip: \"Import the state from a JSON file\"\n }\n ],\n nodeActions: [\n {\n icon: \"restore\",\n tooltip: \"Reset the state (option store only)\",\n action: (nodeId) => {\n const store = pinia2._s.get(nodeId);\n if (!store) {\n toastMessage(`Cannot reset \"${nodeId}\" store because it wasn't found.`, \"warn\");\n } else if (!store._isOptionsAPI) {\n toastMessage(`Cannot reset \"${nodeId}\" store because it's a setup store.`, \"warn\");\n } else {\n store.$reset();\n toastMessage(`Store \"${nodeId}\" reset.`);\n }\n }\n }\n ]\n });\n api.on.inspectComponent((payload, ctx) => {\n const proxy = payload.componentInstance && payload.componentInstance.proxy;\n if (proxy && proxy._pStores) {\n const piniaStores = payload.componentInstance.proxy._pStores;\n Object.values(piniaStores).forEach((store) => {\n payload.instanceData.state.push({\n type: getStoreType(store.$id),\n key: \"state\",\n editable: true,\n value: store._isOptionsAPI ? {\n _custom: {\n value: toRaw(store.$state),\n actions: [\n {\n icon: \"restore\",\n tooltip: \"Reset the state of this store\",\n action: () => store.$reset()\n }\n ]\n }\n } : (\n // NOTE: workaround to unwrap transferred refs\n Object.keys(store.$state).reduce((state, key) => {\n state[key] = store.$state[key];\n return state;\n }, {})\n )\n });\n if (store._getters && store._getters.length) {\n payload.instanceData.state.push({\n type: getStoreType(store.$id),\n key: \"getters\",\n editable: false,\n value: store._getters.reduce((getters, key) => {\n try {\n getters[key] = store[key];\n } catch (error) {\n getters[key] = error;\n }\n return getters;\n }, {})\n });\n }\n });\n }\n });\n api.on.getInspectorTree((payload) => {\n if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {\n let stores = [pinia2];\n stores = stores.concat(Array.from(pinia2._s.values()));\n payload.rootNodes = (payload.filter ? stores.filter((store) => \"$id\" in store ? store.$id.toLowerCase().includes(payload.filter.toLowerCase()) : PINIA_ROOT_LABEL.toLowerCase().includes(payload.filter.toLowerCase())) : stores).map(formatStoreForInspectorTree);\n }\n });\n api.on.getInspectorState((payload) => {\n if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {\n const inspectedStore = payload.nodeId === PINIA_ROOT_ID ? pinia2 : pinia2._s.get(payload.nodeId);\n if (!inspectedStore) {\n return;\n }\n if (inspectedStore) {\n payload.state = formatStoreForInspectorState(inspectedStore);\n }\n }\n });\n api.on.editInspectorState((payload, ctx) => {\n if (payload.app === app && payload.inspectorId === INSPECTOR_ID) {\n const inspectedStore = payload.nodeId === PINIA_ROOT_ID ? pinia2 : pinia2._s.get(payload.nodeId);\n if (!inspectedStore) {\n return toastMessage(`store \"${payload.nodeId}\" not found`, \"error\");\n }\n const { path } = payload;\n if (!isPinia(inspectedStore)) {\n if (path.length !== 1 || !inspectedStore._customProperties.has(path[0]) || path[0] in inspectedStore.$state) {\n path.unshift(\"$state\");\n }\n } else {\n path.unshift(\"state\");\n }\n isTimelineActive = false;\n payload.set(inspectedStore, path, payload.state.value);\n isTimelineActive = true;\n }\n });\n api.on.editComponentState((payload) => {\n if (payload.type.startsWith(\"🍍\")) {\n const storeId = payload.type.replace(/^🍍\\s*/, \"\");\n const store = pinia2._s.get(storeId);\n if (!store) {\n return toastMessage(`store \"${storeId}\" not found`, \"error\");\n }\n const { path } = payload;\n if (path[0] !== \"state\") {\n return toastMessage(`Invalid path for store \"${storeId}\":\n${path}\nOnly state can be modified.`);\n }\n path[0] = \"$state\";\n isTimelineActive = false;\n payload.set(store, path, payload.state.value);\n isTimelineActive = true;\n }\n });\n });\n}\nfunction addStoreToDevtools(app, store) {\n if (!componentStateTypes.includes(getStoreType(store.$id))) {\n componentStateTypes.push(getStoreType(store.$id));\n }\n setupDevtoolsPlugin$1({\n id: \"dev.esm.pinia\",\n label: \"Pinia 🍍\",\n logo: \"https://pinia.vuejs.org/logo.svg\",\n packageName: \"pinia\",\n homepage: \"https://pinia.vuejs.org\",\n componentStateTypes,\n app,\n settings: {\n logStoreChanges: {\n label: \"Notify about new/deleted stores\",\n type: \"boolean\",\n defaultValue: true\n }\n // useEmojis: {\n // label: 'Use emojis in messages ⚡️',\n // type: 'boolean',\n // defaultValue: true,\n // },\n }\n }, (api) => {\n const now2 = typeof api.now === \"function\" ? api.now.bind(api) : Date.now;\n store.$onAction(({ after, onError, name, args }) => {\n const groupId = runningActionId++;\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now2(),\n title: \"🛫 \" + name,\n subtitle: \"start\",\n data: {\n store: formatDisplay$1(store.$id),\n action: formatDisplay$1(name),\n args\n },\n groupId\n }\n });\n after((result) => {\n activeAction = void 0;\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now2(),\n title: \"🛬 \" + name,\n subtitle: \"end\",\n data: {\n store: formatDisplay$1(store.$id),\n action: formatDisplay$1(name),\n args,\n result\n },\n groupId\n }\n });\n });\n onError((error) => {\n activeAction = void 0;\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now2(),\n logType: \"error\",\n title: \"💥 \" + name,\n subtitle: \"end\",\n data: {\n store: formatDisplay$1(store.$id),\n action: formatDisplay$1(name),\n args,\n error\n },\n groupId\n }\n });\n });\n }, true);\n store._customProperties.forEach((name) => {\n watch(() => unref(store[name]), (newValue, oldValue) => {\n api.notifyComponentUpdate();\n api.sendInspectorState(INSPECTOR_ID);\n if (isTimelineActive) {\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now2(),\n title: \"Change\",\n subtitle: name,\n data: {\n newValue,\n oldValue\n },\n groupId: activeAction\n }\n });\n }\n }, { deep: true });\n });\n store.$subscribe(({ events, type: type2 }, state) => {\n api.notifyComponentUpdate();\n api.sendInspectorState(INSPECTOR_ID);\n if (!isTimelineActive)\n return;\n const eventData = {\n time: now2(),\n title: formatMutationType(type2),\n data: assign$1({ store: formatDisplay$1(store.$id) }, formatEventData(events)),\n groupId: activeAction\n };\n activeAction = void 0;\n if (type2 === MutationType.patchFunction) {\n eventData.subtitle = \"⤵️\";\n } else if (type2 === MutationType.patchObject) {\n eventData.subtitle = \"🧩\";\n } else if (events && !Array.isArray(events)) {\n eventData.subtitle = events.type;\n }\n if (events) {\n eventData.data[\"rawEvent(s)\"] = {\n _custom: {\n display: \"DebuggerEvent\",\n type: \"object\",\n tooltip: \"raw DebuggerEvent[]\",\n value: events\n }\n };\n }\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: eventData\n });\n }, { detached: true, flush: \"sync\" });\n const hotUpdate = store._hotUpdate;\n store._hotUpdate = markRaw((newStore) => {\n hotUpdate(newStore);\n api.addTimelineEvent({\n layerId: MUTATIONS_LAYER_ID,\n event: {\n time: now2(),\n title: \"🔥 \" + store.$id,\n subtitle: \"HMR update\",\n data: {\n store: formatDisplay$1(store.$id),\n info: formatDisplay$1(`HMR update`)\n }\n }\n });\n api.notifyComponentUpdate();\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n });\n const { $dispose } = store;\n store.$dispose = () => {\n $dispose();\n api.notifyComponentUpdate();\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n api.getSettings().logStoreChanges && toastMessage(`Disposed \"${store.$id}\" store 🗑`);\n };\n api.notifyComponentUpdate();\n api.sendInspectorTree(INSPECTOR_ID);\n api.sendInspectorState(INSPECTOR_ID);\n api.getSettings().logStoreChanges && toastMessage(`\"${store.$id}\" store installed 🆕`);\n });\n}\nlet runningActionId = 0;\nlet activeAction;\nfunction patchActionForGrouping(store, actionNames) {\n const actions = actionNames.reduce((storeActions, actionName) => {\n storeActions[actionName] = toRaw(store)[actionName];\n return storeActions;\n }, {});\n for (const actionName in actions) {\n store[actionName] = function() {\n const _actionId = runningActionId;\n const trackedStore = new Proxy(store, {\n get(...args) {\n activeAction = _actionId;\n return Reflect.get(...args);\n },\n set(...args) {\n activeAction = _actionId;\n return Reflect.set(...args);\n }\n });\n return actions[actionName].apply(trackedStore, arguments);\n };\n }\n}\nfunction devtoolsPlugin({ app, store, options }) {\n if (store.$id.startsWith(\"__hot:\")) {\n return;\n }\n if (options.state) {\n store._isOptionsAPI = true;\n }\n if (typeof options.state === \"function\") {\n patchActionForGrouping(\n // @ts-expect-error: can cast the store...\n store,\n Object.keys(options.actions)\n );\n const originalHotUpdate = store._hotUpdate;\n toRaw(store)._hotUpdate = function(newStore) {\n originalHotUpdate.apply(this, arguments);\n patchActionForGrouping(store, Object.keys(newStore._hmrPayload.actions));\n };\n }\n addStoreToDevtools(\n app,\n // FIXME: is there a way to allow the assignment from Store to StoreGeneric?\n store\n );\n}\nfunction createPinia() {\n const scope = effectScope(true);\n const state = scope.run(() => ref({}));\n let _p = [];\n let toBeInstalled = [];\n const pinia2 = markRaw({\n install(app) {\n setActivePinia(pinia2);\n {\n pinia2._a = app;\n app.provide(piniaSymbol, pinia2);\n app.config.globalProperties.$pinia = pinia2;\n if (USE_DEVTOOLS) {\n registerPiniaDevtools(app, pinia2);\n }\n toBeInstalled.forEach((plugin) => _p.push(plugin));\n toBeInstalled = [];\n }\n },\n use(plugin) {\n if (!this._a && !isVue2) {\n toBeInstalled.push(plugin);\n } else {\n _p.push(plugin);\n }\n return this;\n },\n _p,\n // it's actually undefined here\n // @ts-expect-error\n _a: null,\n _e: scope,\n _s: /* @__PURE__ */ new Map(),\n state\n });\n if (USE_DEVTOOLS && typeof Proxy !== \"undefined\") {\n pinia2.use(devtoolsPlugin);\n }\n return pinia2;\n}\nfunction patchObject(newState, oldState) {\n for (const key in oldState) {\n const subPatch = oldState[key];\n if (!(key in newState)) {\n continue;\n }\n const targetValue = newState[key];\n if (isPlainObject(targetValue) && isPlainObject(subPatch) && !isRef(subPatch) && !isReactive(subPatch)) {\n newState[key] = patchObject(targetValue, subPatch);\n } else {\n {\n newState[key] = subPatch;\n }\n }\n }\n return newState;\n}\nconst noop$1 = () => {\n};\nfunction addSubscription(subscriptions, callback, detached, onCleanup = noop$1) {\n subscriptions.push(callback);\n const removeSubscription = () => {\n const idx = subscriptions.indexOf(callback);\n if (idx > -1) {\n subscriptions.splice(idx, 1);\n onCleanup();\n }\n };\n if (!detached && getCurrentScope()) {\n onScopeDispose(removeSubscription);\n }\n return removeSubscription;\n}\nfunction triggerSubscriptions(subscriptions, ...args) {\n subscriptions.slice().forEach((callback) => {\n callback(...args);\n });\n}\nfunction mergeReactiveObjects(target, patchToApply) {\n if (target instanceof Map && patchToApply instanceof Map) {\n patchToApply.forEach((value, key) => target.set(key, value));\n }\n if (target instanceof Set && patchToApply instanceof Set) {\n patchToApply.forEach(target.add, target);\n }\n for (const key in patchToApply) {\n if (!patchToApply.hasOwnProperty(key))\n continue;\n const subPatch = patchToApply[key];\n const targetValue = target[key];\n if (isPlainObject(targetValue) && isPlainObject(subPatch) && target.hasOwnProperty(key) && !isRef(subPatch) && !isReactive(subPatch)) {\n target[key] = mergeReactiveObjects(targetValue, subPatch);\n } else {\n target[key] = subPatch;\n }\n }\n return target;\n}\nconst skipHydrateSymbol = process.env.NODE_ENV !== \"production\" ? Symbol(\"pinia:skipHydration\") : (\n /* istanbul ignore next */\n Symbol()\n);\nfunction shouldHydrate(obj) {\n return !isPlainObject(obj) || !obj.hasOwnProperty(skipHydrateSymbol);\n}\nconst { assign: assign$2 } = Object;\nfunction isComputed(o) {\n return !!(isRef(o) && o.effect);\n}\nfunction createOptionsStore(id, options, pinia2, hot) {\n const { state, actions, getters } = options;\n const initialState = pinia2.state.value[id];\n let store;\n function setup() {\n if (!initialState && (!(process.env.NODE_ENV !== \"production\") || !hot)) {\n {\n pinia2.state.value[id] = state ? state() : {};\n }\n }\n const localState = process.env.NODE_ENV !== \"production\" && hot ? (\n // use ref() to unwrap refs inside state TODO: check if this is still necessary\n toRefs(ref(state ? state() : {}).value)\n ) : toRefs(pinia2.state.value[id]);\n return assign$2(localState, actions, Object.keys(getters || {}).reduce((computedGetters, name) => {\n if (process.env.NODE_ENV !== \"production\" && name in localState) {\n console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with \"${name}\" in store \"${id}\".`);\n }\n computedGetters[name] = markRaw(computed(() => {\n setActivePinia(pinia2);\n const store2 = pinia2._s.get(id);\n return getters[name].call(store2, store2);\n }));\n return computedGetters;\n }, {}));\n }\n store = createSetupStore(id, setup, options, pinia2, hot, true);\n return store;\n}\nfunction createSetupStore($id, setup, options = {}, pinia2, hot, isOptionsStore) {\n let scope;\n const optionsForPlugin = assign$2({ actions: {} }, options);\n if (process.env.NODE_ENV !== \"production\" && !pinia2._e.active) {\n throw new Error(\"Pinia destroyed\");\n }\n const $subscribeOptions = {\n deep: true\n // flush: 'post',\n };\n if (process.env.NODE_ENV !== \"production\" && !isVue2) {\n $subscribeOptions.onTrigger = (event) => {\n if (isListening) {\n debuggerEvents = event;\n } else if (isListening == false && !store._hotUpdating) {\n if (Array.isArray(debuggerEvents)) {\n debuggerEvents.push(event);\n } else {\n console.error(\"🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug.\");\n }\n }\n };\n }\n let isListening;\n let isSyncListening;\n let subscriptions = markRaw([]);\n let actionSubscriptions = markRaw([]);\n let debuggerEvents;\n const initialState = pinia2.state.value[$id];\n if (!isOptionsStore && !initialState && (!(process.env.NODE_ENV !== \"production\") || !hot)) {\n {\n pinia2.state.value[$id] = {};\n }\n }\n const hotState = ref({});\n let activeListener;\n function $patch(partialStateOrMutator) {\n let subscriptionMutation;\n isListening = isSyncListening = false;\n if (process.env.NODE_ENV !== \"production\") {\n debuggerEvents = [];\n }\n if (typeof partialStateOrMutator === \"function\") {\n partialStateOrMutator(pinia2.state.value[$id]);\n subscriptionMutation = {\n type: MutationType.patchFunction,\n storeId: $id,\n events: debuggerEvents\n };\n } else {\n mergeReactiveObjects(pinia2.state.value[$id], partialStateOrMutator);\n subscriptionMutation = {\n type: MutationType.patchObject,\n payload: partialStateOrMutator,\n storeId: $id,\n events: debuggerEvents\n };\n }\n const myListenerId = activeListener = Symbol();\n nextTick().then(() => {\n if (activeListener === myListenerId) {\n isListening = true;\n }\n });\n isSyncListening = true;\n triggerSubscriptions(subscriptions, subscriptionMutation, pinia2.state.value[$id]);\n }\n const $reset = isOptionsStore ? function $reset2() {\n const { state } = options;\n const newState = state ? state() : {};\n this.$patch(($state) => {\n assign$2($state, newState);\n });\n } : (\n /* istanbul ignore next */\n process.env.NODE_ENV !== \"production\" ? () => {\n throw new Error(`🍍: Store \"${$id}\" is built using the setup syntax and does not implement $reset().`);\n } : noop$1\n );\n function $dispose() {\n scope.stop();\n subscriptions = [];\n actionSubscriptions = [];\n pinia2._s.delete($id);\n }\n function wrapAction(name, action) {\n return function() {\n setActivePinia(pinia2);\n const args = Array.from(arguments);\n const afterCallbackList = [];\n const onErrorCallbackList = [];\n function after(callback) {\n afterCallbackList.push(callback);\n }\n function onError(callback) {\n onErrorCallbackList.push(callback);\n }\n triggerSubscriptions(actionSubscriptions, {\n args,\n name,\n store,\n after,\n onError\n });\n let ret;\n try {\n ret = action.apply(this && this.$id === $id ? this : store, args);\n } catch (error) {\n triggerSubscriptions(onErrorCallbackList, error);\n throw error;\n }\n if (ret instanceof Promise) {\n return ret.then((value) => {\n triggerSubscriptions(afterCallbackList, value);\n return value;\n }).catch((error) => {\n triggerSubscriptions(onErrorCallbackList, error);\n return Promise.reject(error);\n });\n }\n triggerSubscriptions(afterCallbackList, ret);\n return ret;\n };\n }\n const _hmrPayload = /* @__PURE__ */ markRaw({\n actions: {},\n getters: {},\n state: [],\n hotState\n });\n const partialStore = {\n _p: pinia2,\n // _s: scope,\n $id,\n $onAction: addSubscription.bind(null, actionSubscriptions),\n $patch,\n $reset,\n $subscribe(callback, options2 = {}) {\n const removeSubscription = addSubscription(subscriptions, callback, options2.detached, () => stopWatcher());\n const stopWatcher = scope.run(() => watch(() => pinia2.state.value[$id], (state) => {\n if (options2.flush === \"sync\" ? isSyncListening : isListening) {\n callback({\n storeId: $id,\n type: MutationType.direct,\n events: debuggerEvents\n }, state);\n }\n }, assign$2({}, $subscribeOptions, options2)));\n return removeSubscription;\n },\n $dispose\n };\n const store = reactive(process.env.NODE_ENV !== \"production\" || USE_DEVTOOLS ? assign$2(\n {\n _hmrPayload,\n _customProperties: markRaw(/* @__PURE__ */ new Set())\n // devtools custom properties\n },\n partialStore\n // must be added later\n // setupStore\n ) : partialStore);\n pinia2._s.set($id, store);\n const setupStore = pinia2._e.run(() => {\n scope = effectScope();\n return scope.run(() => setup());\n });\n for (const key in setupStore) {\n const prop = setupStore[key];\n if (isRef(prop) && !isComputed(prop) || isReactive(prop)) {\n if (process.env.NODE_ENV !== \"production\" && hot) {\n set(hotState.value, key, toRef(setupStore, key));\n } else if (!isOptionsStore) {\n if (initialState && shouldHydrate(prop)) {\n if (isRef(prop)) {\n prop.value = initialState[key];\n } else {\n mergeReactiveObjects(prop, initialState[key]);\n }\n }\n {\n pinia2.state.value[$id][key] = prop;\n }\n }\n if (process.env.NODE_ENV !== \"production\") {\n _hmrPayload.state.push(key);\n }\n } else if (typeof prop === \"function\") {\n const actionValue = process.env.NODE_ENV !== \"production\" && hot ? prop : wrapAction(key, prop);\n {\n setupStore[key] = actionValue;\n }\n if (process.env.NODE_ENV !== \"production\") {\n _hmrPayload.actions[key] = prop;\n }\n optionsForPlugin.actions[key] = prop;\n } else if (process.env.NODE_ENV !== \"production\") {\n if (isComputed(prop)) {\n _hmrPayload.getters[key] = isOptionsStore ? (\n // @ts-expect-error\n options.getters[key]\n ) : prop;\n if (IS_CLIENT) {\n const getters = setupStore._getters || // @ts-expect-error: same\n (setupStore._getters = markRaw([]));\n getters.push(key);\n }\n }\n }\n }\n {\n assign$2(store, setupStore);\n assign$2(toRaw(store), setupStore);\n }\n Object.defineProperty(store, \"$state\", {\n get: () => process.env.NODE_ENV !== \"production\" && hot ? hotState.value : pinia2.state.value[$id],\n set: (state) => {\n if (process.env.NODE_ENV !== \"production\" && hot) {\n throw new Error(\"cannot set hotState\");\n }\n $patch(($state) => {\n assign$2($state, state);\n });\n }\n });\n if (process.env.NODE_ENV !== \"production\") {\n store._hotUpdate = markRaw((newStore) => {\n store._hotUpdating = true;\n newStore._hmrPayload.state.forEach((stateKey) => {\n if (stateKey in store.$state) {\n const newStateTarget = newStore.$state[stateKey];\n const oldStateSource = store.$state[stateKey];\n if (typeof newStateTarget === \"object\" && isPlainObject(newStateTarget) && isPlainObject(oldStateSource)) {\n patchObject(newStateTarget, oldStateSource);\n } else {\n newStore.$state[stateKey] = oldStateSource;\n }\n }\n set(store, stateKey, toRef(newStore.$state, stateKey));\n });\n Object.keys(store.$state).forEach((stateKey) => {\n if (!(stateKey in newStore.$state)) {\n del(store, stateKey);\n }\n });\n isListening = false;\n isSyncListening = false;\n pinia2.state.value[$id] = toRef(newStore._hmrPayload, \"hotState\");\n isSyncListening = true;\n nextTick().then(() => {\n isListening = true;\n });\n for (const actionName in newStore._hmrPayload.actions) {\n const action = newStore[actionName];\n set(store, actionName, wrapAction(actionName, action));\n }\n for (const getterName in newStore._hmrPayload.getters) {\n const getter = newStore._hmrPayload.getters[getterName];\n const getterValue = isOptionsStore ? (\n // special handling of options api\n computed(() => {\n setActivePinia(pinia2);\n return getter.call(store, store);\n })\n ) : getter;\n set(store, getterName, getterValue);\n }\n Object.keys(store._hmrPayload.getters).forEach((key) => {\n if (!(key in newStore._hmrPayload.getters)) {\n del(store, key);\n }\n });\n Object.keys(store._hmrPayload.actions).forEach((key) => {\n if (!(key in newStore._hmrPayload.actions)) {\n del(store, key);\n }\n });\n store._hmrPayload = newStore._hmrPayload;\n store._getters = newStore._getters;\n store._hotUpdating = false;\n });\n }\n if (USE_DEVTOOLS) {\n const nonEnumerable = {\n writable: true,\n configurable: true,\n // avoid warning on devtools trying to display this property\n enumerable: false\n };\n [\"_p\", \"_hmrPayload\", \"_getters\", \"_customProperties\"].forEach((p) => {\n Object.defineProperty(store, p, assign$2({ value: store[p] }, nonEnumerable));\n });\n }\n pinia2._p.forEach((extender) => {\n if (USE_DEVTOOLS) {\n const extensions = scope.run(() => extender({\n store,\n app: pinia2._a,\n pinia: pinia2,\n options: optionsForPlugin\n }));\n Object.keys(extensions || {}).forEach((key) => store._customProperties.add(key));\n assign$2(store, extensions);\n } else {\n assign$2(store, scope.run(() => extender({\n store,\n app: pinia2._a,\n pinia: pinia2,\n options: optionsForPlugin\n })));\n }\n });\n if (process.env.NODE_ENV !== \"production\" && store.$state && typeof store.$state === \"object\" && typeof store.$state.constructor === \"function\" && !store.$state.constructor.toString().includes(\"[native code]\")) {\n console.warn(`[🍍]: The \"state\" must be a plain object. It cannot be\n\tstate: () => new MyClass()\nFound in store \"${store.$id}\".`);\n }\n if (initialState && isOptionsStore && options.hydrate) {\n options.hydrate(store.$state, initialState);\n }\n isListening = true;\n isSyncListening = true;\n return store;\n}\nfunction defineStore(idOrOptions, setup, setupOptions) {\n let id;\n let options;\n const isSetupStore = typeof setup === \"function\";\n if (typeof idOrOptions === \"string\") {\n id = idOrOptions;\n options = isSetupStore ? setupOptions : setup;\n } else {\n options = idOrOptions;\n id = idOrOptions.id;\n }\n function useStore(pinia2, hot) {\n const currentInstance = getCurrentInstance();\n pinia2 = // in test mode, ignore the argument provided as we can always retrieve a\n // pinia instance with getActivePinia()\n (process.env.NODE_ENV === \"test\" && activePinia && activePinia._testing ? null : pinia2) || currentInstance && inject(piniaSymbol, null);\n if (pinia2)\n setActivePinia(pinia2);\n if (process.env.NODE_ENV !== \"production\" && !activePinia) {\n throw new Error(`[🍍]: getActivePinia was called with no active Pinia. Did you forget to install pinia?\n\tconst pinia = createPinia()\n\tapp.use(pinia)\nThis will fail in production.`);\n }\n pinia2 = activePinia;\n if (!pinia2._s.has(id)) {\n if (isSetupStore) {\n createSetupStore(id, setup, options, pinia2);\n } else {\n createOptionsStore(id, options, pinia2);\n }\n if (process.env.NODE_ENV !== \"production\") {\n useStore._pinia = pinia2;\n }\n }\n const store = pinia2._s.get(id);\n if (process.env.NODE_ENV !== \"production\" && hot) {\n const hotId = \"__hot:\" + id;\n const newStore = isSetupStore ? createSetupStore(hotId, setup, options, pinia2, true) : createOptionsStore(hotId, assign$2({}, options), pinia2, true);\n hot._hotUpdate(newStore);\n delete pinia2.state.value[hotId];\n pinia2._s.delete(hotId);\n }\n if (process.env.NODE_ENV !== \"production\" && IS_CLIENT && currentInstance && currentInstance.proxy && // avoid adding stores that are just built for hot module replacement\n !hot) {\n const vm = currentInstance.proxy;\n const cache = \"_pStores\" in vm ? vm._pStores : vm._pStores = {};\n cache[id] = store;\n }\n return store;\n }\n useStore.$id = id;\n return useStore;\n}\nconst useDataStore = defineStore(\"data\", () => {\n const records = ref([]);\n const record = ref({});\n return { records, record };\n});\nfunction useStonecrop(registry) {\n if (!registry) {\n registry = inject(\"$registry\");\n }\n const store = useDataStore();\n const stonecrop = ref(new Stonecrop(registry, store));\n const isReady = ref(false);\n onBeforeMount(async () => {\n var _a, _b;\n const route = registry.router.currentRoute.value;\n const doctypeSlug = (_a = route.params.records) == null ? void 0 : _a.toString().toLowerCase();\n const recordId = (_b = route.params.record) == null ? void 0 : _b.toString().toLowerCase();\n if (!doctypeSlug && !recordId) {\n return;\n }\n const doctype = await registry.doctypeLoader(doctypeSlug);\n registry.addDoctype(doctype);\n stonecrop.value.setup(doctype);\n if (doctypeSlug) {\n if (recordId) {\n await stonecrop.value.getRecord(doctype, recordId);\n } else {\n await stonecrop.value.getRecords(doctype);\n }\n }\n stonecrop.value.runAction(doctype, \"LOAD\", recordId ? [recordId] : void 0);\n isReady.value = true;\n });\n return { stonecrop, isReady };\n}\nclass DoctypeMeta {\n constructor(doctype, schema, workflow, actions, component) {\n this.doctype = doctype;\n this.schema = schema;\n this.workflow = workflow;\n this.actions = actions;\n this.component = component;\n }\n get slug() {\n return this.doctype.replace(/([a-z])([A-Z])/g, \"$1-$2\").replace(/[\\s_]+/g, \"-\").toLowerCase();\n }\n get __typename() {\n return this.doctype;\n }\n}\nclass Registry {\n constructor(router2, doctypeLoader = void 0) {\n if (Registry._root) {\n return Registry._root;\n }\n Registry._root = this;\n this.name = \"Registry\";\n this.router = router2;\n this.registry = {};\n this.doctypeLoader = doctypeLoader;\n }\n addDoctype(doctype) {\n if (!(doctype.doctype in Object.keys(this.registry))) {\n this.registry[doctype.slug] = doctype;\n }\n if (!this.router.hasRoute(doctype.doctype)) {\n this.router.addRoute({\n path: `/${doctype.slug}`,\n name: doctype.slug,\n component: doctype.component\n });\n }\n }\n}\nfunction getDevtoolsGlobalHook() {\n return getTarget().__VUE_DEVTOOLS_GLOBAL_HOOK__;\n}\nfunction getTarget() {\n return typeof navigator !== \"undefined\" && typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : {};\n}\nconst isProxyAvailable = typeof Proxy === \"function\";\nconst HOOK_SETUP = \"devtools-plugin:setup\";\nconst HOOK_PLUGIN_SETTINGS_SET = \"plugin:settings:set\";\nlet supported;\nlet perf;\nfunction isPerformanceSupported() {\n var _a;\n if (supported !== void 0) {\n return supported;\n }\n if (typeof window !== \"undefined\" && window.performance) {\n supported = true;\n perf = window.performance;\n } else if (typeof global !== \"undefined\" && ((_a = global.perf_hooks) === null || _a === void 0 ? void 0 : _a.performance)) {\n supported = true;\n perf = global.perf_hooks.performance;\n } else {\n supported = false;\n }\n return supported;\n}\nfunction now$1() {\n return isPerformanceSupported() ? perf.now() : Date.now();\n}\nclass ApiProxy2 {\n constructor(plugin, hook) {\n this.target = null;\n this.targetQueue = [];\n this.onQueue = [];\n this.plugin = plugin;\n this.hook = hook;\n const defaultSettings = {};\n if (plugin.settings) {\n for (const id in plugin.settings) {\n const item = plugin.settings[id];\n defaultSettings[id] = item.defaultValue;\n }\n }\n const localSettingsSaveId = `__vue-devtools-plugin-settings__${plugin.id}`;\n let currentSettings = Object.assign({}, defaultSettings);\n try {\n const raw = localStorage.getItem(localSettingsSaveId);\n const data = JSON.parse(raw);\n Object.assign(currentSettings, data);\n } catch (e) {\n }\n this.fallbacks = {\n getSettings() {\n return currentSettings;\n },\n setSettings(value) {\n try {\n localStorage.setItem(localSettingsSaveId, JSON.stringify(value));\n } catch (e) {\n }\n currentSettings = value;\n },\n now() {\n return now$1();\n }\n };\n if (hook) {\n hook.on(HOOK_PLUGIN_SETTINGS_SET, (pluginId, value) => {\n if (pluginId === this.plugin.id) {\n this.fallbacks.setSettings(value);\n }\n });\n }\n this.proxiedOn = new Proxy({}, {\n get: (_target, prop) => {\n if (this.target) {\n return this.target.on[prop];\n } else {\n return (...args) => {\n this.onQueue.push({\n method: prop,\n args\n });\n };\n }\n }\n });\n this.proxiedTarget = new Proxy({}, {\n get: (_target, prop) => {\n if (this.target) {\n return this.target[prop];\n } else if (prop === \"on\") {\n return this.proxiedOn;\n } else if (Object.keys(this.fallbacks).includes(prop)) {\n return (...args) => {\n this.targetQueue.push({\n method: prop,\n args,\n resolve: () => {\n }\n });\n return this.fallbacks[prop](...args);\n };\n } else {\n return (...args) => {\n return new Promise((resolve) => {\n this.targetQueue.push({\n method: prop,\n args,\n resolve\n });\n });\n };\n }\n }\n });\n }\n async setRealTarget(target) {\n this.target = target;\n for (const item of this.onQueue) {\n this.target.on[item.method](...item.args);\n }\n for (const item of this.targetQueue) {\n item.resolve(await this.target[item.method](...item.args));\n }\n }\n}\nfunction setupDevtoolsPlugin(pluginDescriptor, setupFn) {\n const descriptor = pluginDescriptor;\n const target = getTarget();\n const hook = getDevtoolsGlobalHook();\n const enableProxy = isProxyAvailable && descriptor.enableEarlyProxy;\n if (hook && (target.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !enableProxy)) {\n hook.emit(HOOK_SETUP, pluginDescriptor, setupFn);\n } else {\n const proxy = enableProxy ? new ApiProxy2(descriptor, hook) : null;\n const list = target.__VUE_DEVTOOLS_PLUGINS__ = target.__VUE_DEVTOOLS_PLUGINS__ || [];\n list.push({\n pluginDescriptor: descriptor,\n setupFn,\n proxy\n });\n if (proxy)\n setupFn(proxy.proxiedTarget);\n }\n}\n/*!\n * vue-router v4.1.6\n * (c) 2022 Eduardo San Martin Morote\n * @license MIT\n */\nconst isBrowser = typeof window !== \"undefined\";\nfunction isESModule(obj) {\n return obj.__esModule || obj[Symbol.toStringTag] === \"Module\";\n}\nconst assign = Object.assign;\nfunction applyToParams(fn, params) {\n const newParams = {};\n for (const key in params) {\n const value = params[key];\n newParams[key] = isArray(value) ? value.map(fn) : fn(value);\n }\n return newParams;\n}\nconst noop = () => {\n};\nconst isArray = Array.isArray;\nfunction warn(msg) {\n const args = Array.from(arguments).slice(1);\n console.warn.apply(console, [\"[Vue Router warn]: \" + msg].concat(args));\n}\nconst TRAILING_SLASH_RE = /\\/$/;\nconst removeTrailingSlash = (path) => path.replace(TRAILING_SLASH_RE, \"\");\nfunction parseURL(parseQuery2, location2, currentLocation = \"/\") {\n let path, query = {}, searchString = \"\", hash = \"\";\n const hashPos = location2.indexOf(\"#\");\n let searchPos = location2.indexOf(\"?\");\n if (hashPos < searchPos && hashPos >= 0) {\n searchPos = -1;\n }\n if (searchPos > -1) {\n path = location2.slice(0, searchPos);\n searchString = location2.slice(searchPos + 1, hashPos > -1 ? hashPos : location2.length);\n query = parseQuery2(searchString);\n }\n if (hashPos > -1) {\n path = path || location2.slice(0, hashPos);\n hash = location2.slice(hashPos, location2.length);\n }\n path = resolveRelativePath(path != null ? path : location2, currentLocation);\n return {\n fullPath: path + (searchString && \"?\") + searchString + hash,\n path,\n query,\n hash\n };\n}\nfunction stringifyURL(stringifyQuery2, location2) {\n const query = location2.query ? stringifyQuery2(location2.query) : \"\";\n return location2.path + (query && \"?\") + query + (location2.hash || \"\");\n}\nfunction stripBase(pathname, base) {\n if (!base || !pathname.toLowerCase().startsWith(base.toLowerCase()))\n return pathname;\n return pathname.slice(base.length) || \"/\";\n}\nfunction isSameRouteLocation(stringifyQuery2, a, b) {\n const aLastIndex = a.matched.length - 1;\n const bLastIndex = b.matched.length - 1;\n return aLastIndex > -1 && aLastIndex === bLastIndex && isSameRouteRecord(a.matched[aLastIndex], b.matched[bLastIndex]) && isSameRouteLocationParams(a.params, b.params) && stringifyQuery2(a.query) === stringifyQuery2(b.query) && a.hash === b.hash;\n}\nfunction isSameRouteRecord(a, b) {\n return (a.aliasOf || a) === (b.aliasOf || b);\n}\nfunction isSameRouteLocationParams(a, b) {\n if (Object.keys(a).length !== Object.keys(b).length)\n return false;\n for (const key in a) {\n if (!isSameRouteLocationParamsValue(a[key], b[key]))\n return false;\n }\n return true;\n}\nfunction isSameRouteLocationParamsValue(a, b) {\n return isArray(a) ? isEquivalentArray(a, b) : isArray(b) ? isEquivalentArray(b, a) : a === b;\n}\nfunction isEquivalentArray(a, b) {\n return isArray(b) ? a.length === b.length && a.every((value, i) => value === b[i]) : a.length === 1 && a[0] === b;\n}\nfunction resolveRelativePath(to, from) {\n if (to.startsWith(\"/\"))\n return to;\n if (process.env.NODE_ENV !== \"production\" && !from.startsWith(\"/\")) {\n warn(`Cannot resolve a relative location without an absolute path. Trying to resolve \"${to}\" from \"${from}\". It should look like \"/${from}\".`);\n return to;\n }\n if (!to)\n return from;\n const fromSegments = from.split(\"/\");\n const toSegments = to.split(\"/\");\n let position = fromSegments.length - 1;\n let toPosition;\n let segment;\n for (toPosition = 0; toPosition < toSegments.length; toPosition++) {\n segment = toSegments[toPosition];\n if (segment === \".\")\n continue;\n if (segment === \"..\") {\n if (position > 1)\n position--;\n } else\n break;\n }\n return fromSegments.slice(0, position).join(\"/\") + \"/\" + toSegments.slice(toPosition - (toPosition === toSegments.length ? 1 : 0)).join(\"/\");\n}\nvar NavigationType;\n(function(NavigationType2) {\n NavigationType2[\"pop\"] = \"pop\";\n NavigationType2[\"push\"] = \"push\";\n})(NavigationType || (NavigationType = {}));\nvar NavigationDirection;\n(function(NavigationDirection2) {\n NavigationDirection2[\"back\"] = \"back\";\n NavigationDirection2[\"forward\"] = \"forward\";\n NavigationDirection2[\"unknown\"] = \"\";\n})(NavigationDirection || (NavigationDirection = {}));\nfunction normalizeBase(base) {\n if (!base) {\n if (isBrowser) {\n const baseEl = document.querySelector(\"base\");\n base = baseEl && baseEl.getAttribute(\"href\") || \"/\";\n base = base.replace(/^\\w+:\\/\\/[^\\/]+/, \"\");\n } else {\n base = \"/\";\n }\n }\n if (base[0] !== \"/\" && base[0] !== \"#\")\n base = \"/\" + base;\n return removeTrailingSlash(base);\n}\nconst BEFORE_HASH_RE = /^[^#]+#/;\nfunction createHref(base, location2) {\n return base.replace(BEFORE_HASH_RE, \"#\") + location2;\n}\nfunction getElementPosition(el, offset) {\n const docRect = document.documentElement.getBoundingClientRect();\n const elRect = el.getBoundingClientRect();\n return {\n behavior: offset.behavior,\n left: elRect.left - docRect.left - (offset.left || 0),\n top: elRect.top - docRect.top - (offset.top || 0)\n };\n}\nconst computeScrollPosition = () => ({\n left: window.pageXOffset,\n top: window.pageYOffset\n});\nfunction scrollToPosition(position) {\n let scrollToOptions;\n if (\"el\" in position) {\n const positionEl = position.el;\n const isIdSelector = typeof positionEl === \"string\" && positionEl.startsWith(\"#\");\n if (process.env.NODE_ENV !== \"production\" && typeof position.el === \"string\") {\n if (!isIdSelector || !document.getElementById(position.el.slice(1))) {\n try {\n const foundEl = document.querySelector(position.el);\n if (isIdSelector && foundEl) {\n warn(`The selector \"${position.el}\" should be passed as \"el: document.querySelector('${position.el}')\" because it starts with \"#\".`);\n return;\n }\n } catch (err) {\n warn(`The selector \"${position.el}\" is invalid. If you are using an id selector, make sure to escape it. You can find more information about escaping characters in selectors at https://mathiasbynens.be/notes/css-escapes or use CSS.escape (https://developer.mozilla.org/en-US/docs/Web/API/CSS/escape).`);\n return;\n }\n }\n }\n const el = typeof positionEl === \"string\" ? isIdSelector ? document.getElementById(positionEl.slice(1)) : document.querySelector(positionEl) : positionEl;\n if (!el) {\n process.env.NODE_ENV !== \"production\" && warn(`Couldn't find element using selector \"${position.el}\" returned by scrollBehavior.`);\n return;\n }\n scrollToOptions = getElementPosition(el, position);\n } else {\n scrollToOptions = position;\n }\n if (\"scrollBehavior\" in document.documentElement.style)\n window.scrollTo(scrollToOptions);\n else {\n window.scrollTo(scrollToOptions.left != null ? scrollToOptions.left : window.pageXOffset, scrollToOptions.top != null ? scrollToOptions.top : window.pageYOffset);\n }\n}\nfunction getScrollKey(path, delta) {\n const position = history.state ? history.state.position - delta : -1;\n return position + path;\n}\nconst scrollPositions = /* @__PURE__ */ new Map();\nfunction saveScrollPosition(key, scrollPosition) {\n scrollPositions.set(key, scrollPosition);\n}\nfunction getSavedScrollPosition(key) {\n const scroll = scrollPositions.get(key);\n scrollPositions.delete(key);\n return scroll;\n}\nlet createBaseLocation = () => location.protocol + \"//\" + location.host;\nfunction createCurrentLocation(base, location2) {\n const { pathname, search, hash } = location2;\n const hashPos = base.indexOf(\"#\");\n if (hashPos > -1) {\n let slicePos = hash.includes(base.slice(hashPos)) ? base.slice(hashPos).length : 1;\n let pathFromHash = hash.slice(slicePos);\n if (pathFromHash[0] !== \"/\")\n pathFromHash = \"/\" + pathFromHash;\n return stripBase(pathFromHash, \"\");\n }\n const path = stripBase(pathname, base);\n return path + search + hash;\n}\nfunction useHistoryListeners(base, historyState, currentLocation, replace) {\n let listeners = [];\n let teardowns = [];\n let pauseState = null;\n const popStateHandler = ({ state }) => {\n const to = createCurrentLocation(base, location);\n const from = currentLocation.value;\n const fromState = historyState.value;\n let delta = 0;\n if (state) {\n currentLocation.value = to;\n historyState.value = state;\n if (pauseState && pauseState === from) {\n pauseState = null;\n return;\n }\n delta = fromState ? state.position - fromState.position : 0;\n } else {\n replace(to);\n }\n listeners.forEach((listener) => {\n listener(currentLocation.value, from, {\n delta,\n type: NavigationType.pop,\n direction: delta ? delta > 0 ? NavigationDirection.forward : NavigationDirection.back : NavigationDirection.unknown\n });\n });\n };\n function pauseListeners() {\n pauseState = currentLocation.value;\n }\n function listen(callback) {\n listeners.push(callback);\n const teardown = () => {\n const index2 = listeners.indexOf(callback);\n if (index2 > -1)\n listeners.splice(index2, 1);\n };\n teardowns.push(teardown);\n return teardown;\n }\n function beforeUnloadListener() {\n const { history: history2 } = window;\n if (!history2.state)\n return;\n history2.replaceState(assign({}, history2.state, { scroll: computeScrollPosition() }), \"\");\n }\n function destroy() {\n for (const teardown of teardowns)\n teardown();\n teardowns = [];\n window.removeEventListener(\"popstate\", popStateHandler);\n window.removeEventListener(\"beforeunload\", beforeUnloadListener);\n }\n window.addEventListener(\"popstate\", popStateHandler);\n window.addEventListener(\"beforeunload\", beforeUnloadListener);\n return {\n pauseListeners,\n listen,\n destroy\n };\n}\nfunction buildState(back, current, forward, replaced = false, computeScroll = false) {\n return {\n back,\n current,\n forward,\n replaced,\n position: window.history.length,\n scroll: computeScroll ? computeScrollPosition() : null\n };\n}\nfunction useHistoryStateNavigation(base) {\n const { history: history2, location: location2 } = window;\n const currentLocation = {\n value: createCurrentLocation(base, location2)\n };\n const historyState = { value: history2.state };\n if (!historyState.value) {\n changeLocation(currentLocation.value, {\n back: null,\n current: currentLocation.value,\n forward: null,\n // the length is off by one, we need to decrease it\n position: history2.length - 1,\n replaced: true,\n // don't add a scroll as the user may have an anchor, and we want\n // scrollBehavior to be triggered without a saved position\n scroll: null\n }, true);\n }\n function changeLocation(to, state, replace2) {\n const hashIndex = base.indexOf(\"#\");\n const url = hashIndex > -1 ? (location2.host && document.querySelector(\"base\") ? base : base.slice(hashIndex)) + to : createBaseLocation() + base + to;\n try {\n history2[replace2 ? \"replaceState\" : \"pushState\"](state, \"\", url);\n historyState.value = state;\n } catch (err) {\n if (process.env.NODE_ENV !== \"production\") {\n warn(\"Error with push/replace State\", err);\n } else {\n console.error(err);\n }\n location2[replace2 ? \"replace\" : \"assign\"](url);\n }\n }\n function replace(to, data) {\n const state = assign({}, history2.state, buildState(\n historyState.value.back,\n // keep back and forward entries but override current position\n to,\n historyState.value.forward,\n true\n ), data, { position: historyState.value.position });\n changeLocation(to, state, true);\n currentLocation.value = to;\n }\n function push(to, data) {\n const currentState = assign(\n {},\n // use current history state to gracefully handle a wrong call to\n // history.replaceState\n // https://github.com/vuejs/router/issues/366\n historyState.value,\n history2.state,\n {\n forward: to,\n scroll: computeScrollPosition()\n }\n );\n if (process.env.NODE_ENV !== \"production\" && !history2.state) {\n warn(`history.state seems to have been manually replaced without preserving the necessary values. Make sure to preserve existing history state if you are manually calling history.replaceState:\n\nhistory.replaceState(history.state, '', url)\n\nYou can find more information at https://next.router.vuejs.org/guide/migration/#usage-of-history-state.`);\n }\n changeLocation(currentState.current, currentState, true);\n const state = assign({}, buildState(currentLocation.value, to, null), { position: currentState.position + 1 }, data);\n changeLocation(to, state, false);\n currentLocation.value = to;\n }\n return {\n location: currentLocation,\n state: historyState,\n push,\n replace\n };\n}\nfunction createWebHistory(base) {\n base = normalizeBase(base);\n const historyNavigation = useHistoryStateNavigation(base);\n const historyListeners = useHistoryListeners(base, historyNavigation.state, historyNavigation.location, historyNavigation.replace);\n function go(delta, triggerListeners = true) {\n if (!triggerListeners)\n historyListeners.pauseListeners();\n history.go(delta);\n }\n const routerHistory = assign({\n // it's overridden right after\n location: \"\",\n base,\n go,\n createHref: createHref.bind(null, base)\n }, historyNavigation, historyListeners);\n Object.defineProperty(routerHistory, \"location\", {\n enumerable: true,\n get: () => historyNavigation.location.value\n });\n Object.defineProperty(routerHistory, \"state\", {\n enumerable: true,\n get: () => historyNavigation.state.value\n });\n return routerHistory;\n}\nfunction isRouteLocation(route) {\n return typeof route === \"string\" || route && typeof route === \"object\";\n}\nfunction isRouteName(name) {\n return typeof name === \"string\" || typeof name === \"symbol\";\n}\nconst START_LOCATION_NORMALIZED = {\n path: \"/\",\n name: void 0,\n params: {},\n query: {},\n hash: \"\",\n fullPath: \"/\",\n matched: [],\n meta: {},\n redirectedFrom: void 0\n};\nconst NavigationFailureSymbol = Symbol(process.env.NODE_ENV !== \"production\" ? \"navigation failure\" : \"\");\nvar NavigationFailureType;\n(function(NavigationFailureType2) {\n NavigationFailureType2[NavigationFailureType2[\"aborted\"] = 4] = \"aborted\";\n NavigationFailureType2[NavigationFailureType2[\"cancelled\"] = 8] = \"cancelled\";\n NavigationFailureType2[NavigationFailureType2[\"duplicated\"] = 16] = \"duplicated\";\n})(NavigationFailureType || (NavigationFailureType = {}));\nconst ErrorTypeMessages = {\n [\n 1\n /* ErrorTypes.MATCHER_NOT_FOUND */\n ]({ location: location2, currentLocation }) {\n return `No match for\n ${JSON.stringify(location2)}${currentLocation ? \"\\nwhile being at\\n\" + JSON.stringify(currentLocation) : \"\"}`;\n },\n [\n 2\n /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */\n ]({ from, to }) {\n return `Redirected from \"${from.fullPath}\" to \"${stringifyRoute(to)}\" via a navigation guard.`;\n },\n [\n 4\n /* ErrorTypes.NAVIGATION_ABORTED */\n ]({ from, to }) {\n return `Navigation aborted from \"${from.fullPath}\" to \"${to.fullPath}\" via a navigation guard.`;\n },\n [\n 8\n /* ErrorTypes.NAVIGATION_CANCELLED */\n ]({ from, to }) {\n return `Navigation cancelled from \"${from.fullPath}\" to \"${to.fullPath}\" with a new navigation.`;\n },\n [\n 16\n /* ErrorTypes.NAVIGATION_DUPLICATED */\n ]({ from, to }) {\n return `Avoided redundant navigation to current location: \"${from.fullPath}\".`;\n }\n};\nfunction createRouterError(type2, params) {\n if (process.env.NODE_ENV !== \"production\" || false) {\n return assign(new Error(ErrorTypeMessages[type2](params)), {\n type: type2,\n [NavigationFailureSymbol]: true\n }, params);\n } else {\n return assign(new Error(), {\n type: type2,\n [NavigationFailureSymbol]: true\n }, params);\n }\n}\nfunction isNavigationFailure(error, type2) {\n return error instanceof Error && NavigationFailureSymbol in error && (type2 == null || !!(error.type & type2));\n}\nconst propertiesToLog = [\"params\", \"query\", \"hash\"];\nfunction stringifyRoute(to) {\n if (typeof to === \"string\")\n return to;\n if (\"path\" in to)\n return to.path;\n const location2 = {};\n for (const key of propertiesToLog) {\n if (key in to)\n location2[key] = to[key];\n }\n return JSON.stringify(location2, null, 2);\n}\nconst BASE_PARAM_PATTERN = \"[^/]+?\";\nconst BASE_PATH_PARSER_OPTIONS = {\n sensitive: false,\n strict: false,\n start: true,\n end: true\n};\nconst REGEX_CHARS_RE = /[.+*?^${}()[\\]/\\\\]/g;\nfunction tokensToParser(segments, extraOptions) {\n const options = assign({}, BASE_PATH_PARSER_OPTIONS, extraOptions);\n const score = [];\n let pattern = options.start ? \"^\" : \"\";\n const keys = [];\n for (const segment of segments) {\n const segmentScores = segment.length ? [] : [\n 90\n /* PathScore.Root */\n ];\n if (options.strict && !segment.length)\n pattern += \"/\";\n for (let tokenIndex = 0; tokenIndex < segment.length; tokenIndex++) {\n const token = segment[tokenIndex];\n let subSegmentScore = 40 + (options.sensitive ? 0.25 : 0);\n if (token.type === 0) {\n if (!tokenIndex)\n pattern += \"/\";\n pattern += token.value.replace(REGEX_CHARS_RE, \"\\\\$&\");\n subSegmentScore += 40;\n } else if (token.type === 1) {\n const { value, repeatable, optional, regexp } = token;\n keys.push({\n name: value,\n repeatable,\n optional\n });\n const re2 = regexp ? regexp : BASE_PARAM_PATTERN;\n if (re2 !== BASE_PARAM_PATTERN) {\n subSegmentScore += 10;\n try {\n new RegExp(`(${re2})`);\n } catch (err) {\n throw new Error(`Invalid custom RegExp for param \"${value}\" (${re2}): ` + err.message);\n }\n }\n let subPattern = repeatable ? `((?:${re2})(?:/(?:${re2}))*)` : `(${re2})`;\n if (!tokenIndex)\n subPattern = // avoid an optional / if there are more segments e.g. /:p?-static\n // or /:p?-:p2\n optional && segment.length < 2 ? `(?:/${subPattern})` : \"/\" + subPattern;\n if (optional)\n subPattern += \"?\";\n pattern += subPattern;\n subSegmentScore += 20;\n if (optional)\n subSegmentScore += -8;\n if (repeatable)\n subSegmentScore += -20;\n if (re2 === \".*\")\n subSegmentScore += -50;\n }\n segmentScores.push(subSegmentScore);\n }\n score.push(segmentScores);\n }\n if (options.strict && options.end) {\n const i = score.length - 1;\n score[i][score[i].length - 1] += 0.7000000000000001;\n }\n if (!options.strict)\n pattern += \"/?\";\n if (options.end)\n pattern += \"$\";\n else if (options.strict)\n pattern += \"(?:/|$)\";\n const re = new RegExp(pattern, options.sensitive ? \"\" : \"i\");\n function parse2(path) {\n const match = path.match(re);\n const params = {};\n if (!match)\n return null;\n for (let i = 1; i < match.length; i++) {\n const value = match[i] || \"\";\n const key = keys[i - 1];\n params[key.name] = value && key.repeatable ? value.split(\"/\") : value;\n }\n return params;\n }\n function stringify2(params) {\n let path = \"\";\n let avoidDuplicatedSlash = false;\n for (const segment of segments) {\n if (!avoidDuplicatedSlash || !path.endsWith(\"/\"))\n path += \"/\";\n avoidDuplicatedSlash = false;\n for (const token of segment) {\n if (token.type === 0) {\n path += token.value;\n } else if (token.type === 1) {\n const { value, repeatable, optional } = token;\n const param = value in params ? params[value] : \"\";\n if (isArray(param) && !repeatable) {\n throw new Error(`Provided param \"${value}\" is an array but it is not repeatable (* or + modifiers)`);\n }\n const text = isArray(param) ? param.join(\"/\") : param;\n if (!text) {\n if (optional) {\n if (segment.length < 2) {\n if (path.endsWith(\"/\"))\n path = path.slice(0, -1);\n else\n avoidDuplicatedSlash = true;\n }\n } else\n throw new Error(`Missing required param \"${value}\"`);\n }\n path += text;\n }\n }\n }\n return path || \"/\";\n }\n return {\n re,\n score,\n keys,\n parse: parse2,\n stringify: stringify2\n };\n}\nfunction compareScoreArray(a, b) {\n let i = 0;\n while (i < a.length && i < b.length) {\n const diff = b[i] - a[i];\n if (diff)\n return diff;\n i++;\n }\n if (a.length < b.length) {\n return a.length === 1 && a[0] === 40 + 40 ? -1 : 1;\n } else if (a.length > b.length) {\n return b.length === 1 && b[0] === 40 + 40 ? 1 : -1;\n }\n return 0;\n}\nfunction comparePathParserScore(a, b) {\n let i = 0;\n const aScore = a.score;\n const bScore = b.score;\n while (i < aScore.length && i < bScore.length) {\n const comp = compareScoreArray(aScore[i], bScore[i]);\n if (comp)\n return comp;\n i++;\n }\n if (Math.abs(bScore.length - aScore.length) === 1) {\n if (isLastScoreNegative(aScore))\n return 1;\n if (isLastScoreNegative(bScore))\n return -1;\n }\n return bScore.length - aScore.length;\n}\nfunction isLastScoreNegative(score) {\n const last = score[score.length - 1];\n return score.length > 0 && last[last.length - 1] < 0;\n}\nconst ROOT_TOKEN = {\n type: 0,\n value: \"\"\n};\nconst VALID_PARAM_RE = /[a-zA-Z0-9_]/;\nfunction tokenizePath(path) {\n if (!path)\n return [[]];\n if (path === \"/\")\n return [[ROOT_TOKEN]];\n if (!path.startsWith(\"/\")) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `Route paths should start with a \"/\": \"${path}\" should be \"/${path}\".` : `Invalid path \"${path}\"`);\n }\n function crash(message) {\n throw new Error(`ERR (${state})/\"${buffer}\": ${message}`);\n }\n let state = 0;\n let previousState = state;\n const tokens = [];\n let segment;\n function finalizeSegment() {\n if (segment)\n tokens.push(segment);\n segment = [];\n }\n let i = 0;\n let char;\n let buffer = \"\";\n let customRe = \"\";\n function consumeBuffer() {\n if (!buffer)\n return;\n if (state === 0) {\n segment.push({\n type: 0,\n value: buffer\n });\n } else if (state === 1 || state === 2 || state === 3) {\n if (segment.length > 1 && (char === \"*\" || char === \"+\"))\n crash(`A repeatable param (${buffer}) must be alone in its segment. eg: '/:ids+.`);\n segment.push({\n type: 1,\n value: buffer,\n regexp: customRe,\n repeatable: char === \"*\" || char === \"+\",\n optional: char === \"*\" || char === \"?\"\n });\n } else {\n crash(\"Invalid state to consume buffer\");\n }\n buffer = \"\";\n }\n function addCharToBuffer() {\n buffer += char;\n }\n while (i < path.length) {\n char = path[i++];\n if (char === \"\\\\\" && state !== 2) {\n previousState = state;\n state = 4;\n continue;\n }\n switch (state) {\n case 0:\n if (char === \"/\") {\n if (buffer) {\n consumeBuffer();\n }\n finalizeSegment();\n } else if (char === \":\") {\n consumeBuffer();\n state = 1;\n } else {\n addCharToBuffer();\n }\n break;\n case 4:\n addCharToBuffer();\n state = previousState;\n break;\n case 1:\n if (char === \"(\") {\n state = 2;\n } else if (VALID_PARAM_RE.test(char)) {\n addCharToBuffer();\n } else {\n consumeBuffer();\n state = 0;\n if (char !== \"*\" && char !== \"?\" && char !== \"+\")\n i--;\n }\n break;\n case 2:\n if (char === \")\") {\n if (customRe[customRe.length - 1] == \"\\\\\")\n customRe = customRe.slice(0, -1) + char;\n else\n state = 3;\n } else {\n customRe += char;\n }\n break;\n case 3:\n consumeBuffer();\n state = 0;\n if (char !== \"*\" && char !== \"?\" && char !== \"+\")\n i--;\n customRe = \"\";\n break;\n default:\n crash(\"Unknown state\");\n break;\n }\n }\n if (state === 2)\n crash(`Unfinished custom RegExp for param \"${buffer}\"`);\n consumeBuffer();\n finalizeSegment();\n return tokens;\n}\nfunction createRouteRecordMatcher(record, parent, options) {\n const parser = tokensToParser(tokenizePath(record.path), options);\n if (process.env.NODE_ENV !== \"production\") {\n const existingKeys = /* @__PURE__ */ new Set();\n for (const key of parser.keys) {\n if (existingKeys.has(key.name))\n warn(`Found duplicated params with name \"${key.name}\" for path \"${record.path}\". Only the last one will be available on \"$route.params\".`);\n existingKeys.add(key.name);\n }\n }\n const matcher = assign(parser, {\n record,\n parent,\n // these needs to be populated by the parent\n children: [],\n alias: []\n });\n if (parent) {\n if (!matcher.record.aliasOf === !parent.record.aliasOf)\n parent.children.push(matcher);\n }\n return matcher;\n}\nfunction createRouterMatcher(routes, globalOptions) {\n const matchers = [];\n const matcherMap = /* @__PURE__ */ new Map();\n globalOptions = mergeOptions({ strict: false, end: true, sensitive: false }, globalOptions);\n function getRecordMatcher(name) {\n return matcherMap.get(name);\n }\n function addRoute(record, parent, originalRecord) {\n const isRootAdd = !originalRecord;\n const mainNormalizedRecord = normalizeRouteRecord(record);\n if (process.env.NODE_ENV !== \"production\") {\n checkChildMissingNameWithEmptyPath(mainNormalizedRecord, parent);\n }\n mainNormalizedRecord.aliasOf = originalRecord && originalRecord.record;\n const options = mergeOptions(globalOptions, record);\n const normalizedRecords = [\n mainNormalizedRecord\n ];\n if (\"alias\" in record) {\n const aliases = typeof record.alias === \"string\" ? [record.alias] : record.alias;\n for (const alias of aliases) {\n normalizedRecords.push(assign({}, mainNormalizedRecord, {\n // this allows us to hold a copy of the `components` option\n // so that async components cache is hold on the original record\n components: originalRecord ? originalRecord.record.components : mainNormalizedRecord.components,\n path: alias,\n // we might be the child of an alias\n aliasOf: originalRecord ? originalRecord.record : mainNormalizedRecord\n // the aliases are always of the same kind as the original since they\n // are defined on the same record\n }));\n }\n }\n let matcher;\n let originalMatcher;\n for (const normalizedRecord of normalizedRecords) {\n const { path } = normalizedRecord;\n if (parent && path[0] !== \"/\") {\n const parentPath = parent.record.path;\n const connectingSlash = parentPath[parentPath.length - 1] === \"/\" ? \"\" : \"/\";\n normalizedRecord.path = parent.record.path + (path && connectingSlash + path);\n }\n if (process.env.NODE_ENV !== \"production\" && normalizedRecord.path === \"*\") {\n throw new Error('Catch all routes (\"*\") must now be defined using a param with a custom regexp.\\nSee more at https://next.router.vuejs.org/guide/migration/#removed-star-or-catch-all-routes.');\n }\n matcher = createRouteRecordMatcher(normalizedRecord, parent, options);\n if (process.env.NODE_ENV !== \"production\" && parent && path[0] === \"/\")\n checkMissingParamsInAbsolutePath(matcher, parent);\n if (originalRecord) {\n originalRecord.alias.push(matcher);\n if (process.env.NODE_ENV !== \"production\") {\n checkSameParams(originalRecord, matcher);\n }\n } else {\n originalMatcher = originalMatcher || matcher;\n if (originalMatcher !== matcher)\n originalMatcher.alias.push(matcher);\n if (isRootAdd && record.name && !isAliasRecord(matcher))\n removeRoute(record.name);\n }\n if (mainNormalizedRecord.children) {\n const children = mainNormalizedRecord.children;\n for (let i = 0; i < children.length; i++) {\n addRoute(children[i], matcher, originalRecord && originalRecord.children[i]);\n }\n }\n originalRecord = originalRecord || matcher;\n if (matcher.record.components && Object.keys(matcher.record.components).length || matcher.record.name || matcher.record.redirect) {\n insertMatcher(matcher);\n }\n }\n return originalMatcher ? () => {\n removeRoute(originalMatcher);\n } : noop;\n }\n function removeRoute(matcherRef) {\n if (isRouteName(matcherRef)) {\n const matcher = matcherMap.get(matcherRef);\n if (matcher) {\n matcherMap.delete(matcherRef);\n matchers.splice(matchers.indexOf(matcher), 1);\n matcher.children.forEach(removeRoute);\n matcher.alias.forEach(removeRoute);\n }\n } else {\n const index2 = matchers.indexOf(matcherRef);\n if (index2 > -1) {\n matchers.splice(index2, 1);\n if (matcherRef.record.name)\n matcherMap.delete(matcherRef.record.name);\n matcherRef.children.forEach(removeRoute);\n matcherRef.alias.forEach(removeRoute);\n }\n }\n }\n function getRoutes() {\n return matchers;\n }\n function insertMatcher(matcher) {\n let i = 0;\n while (i < matchers.length && comparePathParserScore(matcher, matchers[i]) >= 0 && // Adding children with empty path should still appear before the parent\n // https://github.com/vuejs/router/issues/1124\n (matcher.record.path !== matchers[i].record.path || !isRecordChildOf(matcher, matchers[i])))\n i++;\n matchers.splice(i, 0, matcher);\n if (matcher.record.name && !isAliasRecord(matcher))\n matcherMap.set(matcher.record.name, matcher);\n }\n function resolve(location2, currentLocation) {\n let matcher;\n let params = {};\n let path;\n let name;\n if (\"name\" in location2 && location2.name) {\n matcher = matcherMap.get(location2.name);\n if (!matcher)\n throw createRouterError(1, {\n location: location2\n });\n if (process.env.NODE_ENV !== \"production\") {\n const invalidParams = Object.keys(location2.params || {}).filter((paramName) => !matcher.keys.find((k) => k.name === paramName));\n if (invalidParams.length) {\n warn(`Discarded invalid param(s) \"${invalidParams.join('\", \"')}\" when navigating. See https://github.com/vuejs/router/blob/main/packages/router/CHANGELOG.md#414-2022-08-22 for more details.`);\n }\n }\n name = matcher.record.name;\n params = assign(\n // paramsFromLocation is a new object\n paramsFromLocation(\n currentLocation.params,\n // only keep params that exist in the resolved location\n // TODO: only keep optional params coming from a parent record\n matcher.keys.filter((k) => !k.optional).map((k) => k.name)\n ),\n // discard any existing params in the current location that do not exist here\n // #1497 this ensures better active/exact matching\n location2.params && paramsFromLocation(location2.params, matcher.keys.map((k) => k.name))\n );\n path = matcher.stringify(params);\n } else if (\"path\" in location2) {\n path = location2.path;\n if (process.env.NODE_ENV !== \"production\" && !path.startsWith(\"/\")) {\n warn(`The Matcher cannot resolve relative paths but received \"${path}\". Unless you directly called \\`matcher.resolve(\"${path}\")\\`, this is probably a bug in vue-router. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/router.`);\n }\n matcher = matchers.find((m2) => m2.re.test(path));\n if (matcher) {\n params = matcher.parse(path);\n name = matcher.record.name;\n }\n } else {\n matcher = currentLocation.name ? matcherMap.get(currentLocation.name) : matchers.find((m2) => m2.re.test(currentLocation.path));\n if (!matcher)\n throw createRouterError(1, {\n location: location2,\n currentLocation\n });\n name = matcher.record.name;\n params = assign({}, currentLocation.params, location2.params);\n path = matcher.stringify(params);\n }\n const matched = [];\n let parentMatcher = matcher;\n while (parentMatcher) {\n matched.unshift(parentMatcher.record);\n parentMatcher = parentMatcher.parent;\n }\n return {\n name,\n path,\n params,\n matched,\n meta: mergeMetaFields(matched)\n };\n }\n routes.forEach((route) => addRoute(route));\n return { addRoute, resolve, removeRoute, getRoutes, getRecordMatcher };\n}\nfunction paramsFromLocation(params, keys) {\n const newParams = {};\n for (const key of keys) {\n if (key in params)\n newParams[key] = params[key];\n }\n return newParams;\n}\nfunction normalizeRouteRecord(record) {\n return {\n path: record.path,\n redirect: record.redirect,\n name: record.name,\n meta: record.meta || {},\n aliasOf: void 0,\n beforeEnter: record.beforeEnter,\n props: normalizeRecordProps(record),\n children: record.children || [],\n instances: {},\n leaveGuards: /* @__PURE__ */ new Set(),\n updateGuards: /* @__PURE__ */ new Set(),\n enterCallbacks: {},\n components: \"components\" in record ? record.components || null : record.component && { default: record.component }\n };\n}\nfunction normalizeRecordProps(record) {\n const propsObject = {};\n const props = record.props || false;\n if (\"component\" in record) {\n propsObject.default = props;\n } else {\n for (const name in record.components)\n propsObject[name] = typeof props === \"boolean\" ? props : props[name];\n }\n return propsObject;\n}\nfunction isAliasRecord(record) {\n while (record) {\n if (record.record.aliasOf)\n return true;\n record = record.parent;\n }\n return false;\n}\nfunction mergeMetaFields(matched) {\n return matched.reduce((meta, record) => assign(meta, record.meta), {});\n}\nfunction mergeOptions(defaults, partialOptions) {\n const options = {};\n for (const key in defaults) {\n options[key] = key in partialOptions ? partialOptions[key] : defaults[key];\n }\n return options;\n}\nfunction isSameParam(a, b) {\n return a.name === b.name && a.optional === b.optional && a.repeatable === b.repeatable;\n}\nfunction checkSameParams(a, b) {\n for (const key of a.keys) {\n if (!key.optional && !b.keys.find(isSameParam.bind(null, key)))\n return warn(`Alias \"${b.record.path}\" and the original record: \"${a.record.path}\" must have the exact same param named \"${key.name}\"`);\n }\n for (const key of b.keys) {\n if (!key.optional && !a.keys.find(isSameParam.bind(null, key)))\n return warn(`Alias \"${b.record.path}\" and the original record: \"${a.record.path}\" must have the exact same param named \"${key.name}\"`);\n }\n}\nfunction checkChildMissingNameWithEmptyPath(mainNormalizedRecord, parent) {\n if (parent && parent.record.name && !mainNormalizedRecord.name && !mainNormalizedRecord.path) {\n warn(`The route named \"${String(parent.record.name)}\" has a child without a name and an empty path. Using that name won't render the empty path child so you probably want to move the name to the child instead. If this is intentional, add a name to the child route to remove the warning.`);\n }\n}\nfunction checkMissingParamsInAbsolutePath(record, parent) {\n for (const key of parent.keys) {\n if (!record.keys.find(isSameParam.bind(null, key)))\n return warn(`Absolute path \"${record.record.path}\" must have the exact same param named \"${key.name}\" as its parent \"${parent.record.path}\".`);\n }\n}\nfunction isRecordChildOf(record, parent) {\n return parent.children.some((child) => child === record || isRecordChildOf(record, child));\n}\nconst HASH_RE = /#/g;\nconst AMPERSAND_RE = /&/g;\nconst SLASH_RE = /\\//g;\nconst EQUAL_RE = /=/g;\nconst IM_RE = /\\?/g;\nconst PLUS_RE = /\\+/g;\nconst ENC_BRACKET_OPEN_RE = /%5B/g;\nconst ENC_BRACKET_CLOSE_RE = /%5D/g;\nconst ENC_CARET_RE = /%5E/g;\nconst ENC_BACKTICK_RE = /%60/g;\nconst ENC_CURLY_OPEN_RE = /%7B/g;\nconst ENC_PIPE_RE = /%7C/g;\nconst ENC_CURLY_CLOSE_RE = /%7D/g;\nconst ENC_SPACE_RE = /%20/g;\nfunction commonEncode(text) {\n return encodeURI(\"\" + text).replace(ENC_PIPE_RE, \"|\").replace(ENC_BRACKET_OPEN_RE, \"[\").replace(ENC_BRACKET_CLOSE_RE, \"]\");\n}\nfunction encodeHash(text) {\n return commonEncode(text).replace(ENC_CURLY_OPEN_RE, \"{\").replace(ENC_CURLY_CLOSE_RE, \"}\").replace(ENC_CARET_RE, \"^\");\n}\nfunction encodeQueryValue(text) {\n return commonEncode(text).replace(PLUS_RE, \"%2B\").replace(ENC_SPACE_RE, \"+\").replace(HASH_RE, \"%23\").replace(AMPERSAND_RE, \"%26\").replace(ENC_BACKTICK_RE, \"`\").replace(ENC_CURLY_OPEN_RE, \"{\").replace(ENC_CURLY_CLOSE_RE, \"}\").replace(ENC_CARET_RE, \"^\");\n}\nfunction encodeQueryKey(text) {\n return encodeQueryValue(text).replace(EQUAL_RE, \"%3D\");\n}\nfunction encodePath(text) {\n return commonEncode(text).replace(HASH_RE, \"%23\").replace(IM_RE, \"%3F\");\n}\nfunction encodeParam(text) {\n return text == null ? \"\" : encodePath(text).replace(SLASH_RE, \"%2F\");\n}\nfunction decode(text) {\n try {\n return decodeURIComponent(\"\" + text);\n } catch (err) {\n process.env.NODE_ENV !== \"production\" && warn(`Error decoding \"${text}\". Using original value`);\n }\n return \"\" + text;\n}\nfunction parseQuery(search) {\n const query = {};\n if (search === \"\" || search === \"?\")\n return query;\n const hasLeadingIM = search[0] === \"?\";\n const searchParams = (hasLeadingIM ? search.slice(1) : search).split(\"&\");\n for (let i = 0; i < searchParams.length; ++i) {\n const searchParam = searchParams[i].replace(PLUS_RE, \" \");\n const eqPos = searchParam.indexOf(\"=\");\n const key = decode(eqPos < 0 ? searchParam : searchParam.slice(0, eqPos));\n const value = eqPos < 0 ? null : decode(searchParam.slice(eqPos + 1));\n if (key in query) {\n let currentValue = query[key];\n if (!isArray(currentValue)) {\n currentValue = query[key] = [currentValue];\n }\n currentValue.push(value);\n } else {\n query[key] = value;\n }\n }\n return query;\n}\nfunction stringifyQuery(query) {\n let search = \"\";\n for (let key in query) {\n const value = query[key];\n key = encodeQueryKey(key);\n if (value == null) {\n if (value !== void 0) {\n search += (search.length ? \"&\" : \"\") + key;\n }\n continue;\n }\n const values = isArray(value) ? value.map((v) => v && encodeQueryValue(v)) : [value && encodeQueryValue(value)];\n values.forEach((value2) => {\n if (value2 !== void 0) {\n search += (search.length ? \"&\" : \"\") + key;\n if (value2 != null)\n search += \"=\" + value2;\n }\n });\n }\n return search;\n}\nfunction normalizeQuery(query) {\n const normalizedQuery = {};\n for (const key in query) {\n const value = query[key];\n if (value !== void 0) {\n normalizedQuery[key] = isArray(value) ? value.map((v) => v == null ? null : \"\" + v) : value == null ? value : \"\" + value;\n }\n }\n return normalizedQuery;\n}\nconst matchedRouteKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"router view location matched\" : \"\");\nconst viewDepthKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"router view depth\" : \"\");\nconst routerKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"router\" : \"\");\nconst routeLocationKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"route location\" : \"\");\nconst routerViewLocationKey = Symbol(process.env.NODE_ENV !== \"production\" ? \"router view location\" : \"\");\nfunction useCallbacks() {\n let handlers = [];\n function add(handler) {\n handlers.push(handler);\n return () => {\n const i = handlers.indexOf(handler);\n if (i > -1)\n handlers.splice(i, 1);\n };\n }\n function reset() {\n handlers = [];\n }\n return {\n add,\n list: () => handlers,\n reset\n };\n}\nfunction guardToPromiseFn(guard, to, from, record, name) {\n const enterCallbackArray = record && // name is defined if record is because of the function overload\n (record.enterCallbacks[name] = record.enterCallbacks[name] || []);\n return () => new Promise((resolve, reject) => {\n const next = (valid) => {\n if (valid === false) {\n reject(createRouterError(4, {\n from,\n to\n }));\n } else if (valid instanceof Error) {\n reject(valid);\n } else if (isRouteLocation(valid)) {\n reject(createRouterError(2, {\n from: to,\n to: valid\n }));\n } else {\n if (enterCallbackArray && // since enterCallbackArray is truthy, both record and name also are\n record.enterCallbacks[name] === enterCallbackArray && typeof valid === \"function\") {\n enterCallbackArray.push(valid);\n }\n resolve();\n }\n };\n const guardReturn = guard.call(record && record.instances[name], to, from, process.env.NODE_ENV !== \"production\" ? canOnlyBeCalledOnce(next, to, from) : next);\n let guardCall = Promise.resolve(guardReturn);\n if (guard.length < 3)\n guardCall = guardCall.then(next);\n if (process.env.NODE_ENV !== \"production\" && guard.length > 2) {\n const message = `The \"next\" callback was never called inside of ${guard.name ? '\"' + guard.name + '\"' : \"\"}:\n${guard.toString()}\n. If you are returning a value instead of calling \"next\", make sure to remove the \"next\" parameter from your function.`;\n if (typeof guardReturn === \"object\" && \"then\" in guardReturn) {\n guardCall = guardCall.then((resolvedValue) => {\n if (!next._called) {\n warn(message);\n return Promise.reject(new Error(\"Invalid navigation guard\"));\n }\n return resolvedValue;\n });\n } else if (guardReturn !== void 0) {\n if (!next._called) {\n warn(message);\n reject(new Error(\"Invalid navigation guard\"));\n return;\n }\n }\n }\n guardCall.catch((err) => reject(err));\n });\n}\nfunction canOnlyBeCalledOnce(next, to, from) {\n let called = 0;\n return function() {\n if (called++ === 1)\n warn(`The \"next\" callback was called more than once in one navigation guard when going from \"${from.fullPath}\" to \"${to.fullPath}\". It should be called exactly one time in each navigation guard. This will fail in production.`);\n next._called = true;\n if (called === 1)\n next.apply(null, arguments);\n };\n}\nfunction extractComponentsGuards(matched, guardType, to, from) {\n const guards = [];\n for (const record of matched) {\n if (process.env.NODE_ENV !== \"production\" && !record.components && !record.children.length) {\n warn(`Record with path \"${record.path}\" is either missing a \"component(s)\" or \"children\" property.`);\n }\n for (const name in record.components) {\n let rawComponent = record.components[name];\n if (process.env.NODE_ENV !== \"production\") {\n if (!rawComponent || typeof rawComponent !== \"object\" && typeof rawComponent !== \"function\") {\n warn(`Component \"${name}\" in record with path \"${record.path}\" is not a valid component. Received \"${String(rawComponent)}\".`);\n throw new Error(\"Invalid route component\");\n } else if (\"then\" in rawComponent) {\n warn(`Component \"${name}\" in record with path \"${record.path}\" is a Promise instead of a function that returns a Promise. Did you write \"import('./MyPage.vue')\" instead of \"() => import('./MyPage.vue')\" ? This will break in production if not fixed.`);\n const promise = rawComponent;\n rawComponent = () => promise;\n } else if (rawComponent.__asyncLoader && // warn only once per component\n !rawComponent.__warnedDefineAsync) {\n rawComponent.__warnedDefineAsync = true;\n warn(`Component \"${name}\" in record with path \"${record.path}\" is defined using \"defineAsyncComponent()\". Write \"() => import('./MyPage.vue')\" instead of \"defineAsyncComponent(() => import('./MyPage.vue'))\".`);\n }\n }\n if (guardType !== \"beforeRouteEnter\" && !record.instances[name])\n continue;\n if (isRouteComponent(rawComponent)) {\n const options = rawComponent.__vccOpts || rawComponent;\n const guard = options[guardType];\n guard && guards.push(guardToPromiseFn(guard, to, from, record, name));\n } else {\n let componentPromise = rawComponent();\n if (process.env.NODE_ENV !== \"production\" && !(\"catch\" in componentPromise)) {\n warn(`Component \"${name}\" in record with path \"${record.path}\" is a function that does not return a Promise. If you were passing a functional component, make sure to add a \"displayName\" to the component. This will break in production if not fixed.`);\n componentPromise = Promise.resolve(componentPromise);\n }\n guards.push(() => componentPromise.then((resolved) => {\n if (!resolved)\n return Promise.reject(new Error(`Couldn't resolve component \"${name}\" at \"${record.path}\"`));\n const resolvedComponent = isESModule(resolved) ? resolved.default : resolved;\n record.components[name] = resolvedComponent;\n const options = resolvedComponent.__vccOpts || resolvedComponent;\n const guard = options[guardType];\n return guard && guardToPromiseFn(guard, to, from, record, name)();\n }));\n }\n }\n }\n return guards;\n}\nfunction isRouteComponent(component) {\n return typeof component === \"object\" || \"displayName\" in component || \"props\" in component || \"__vccOpts\" in component;\n}\nfunction useLink(props) {\n const router2 = inject(routerKey);\n const currentRoute = inject(routeLocationKey);\n const route = computed(() => router2.resolve(unref(props.to)));\n const activeRecordIndex = computed(() => {\n const { matched } = route.value;\n const { length } = matched;\n const routeMatched = matched[length - 1];\n const currentMatched = currentRoute.matched;\n if (!routeMatched || !currentMatched.length)\n return -1;\n const index2 = currentMatched.findIndex(isSameRouteRecord.bind(null, routeMatched));\n if (index2 > -1)\n return index2;\n const parentRecordPath = getOriginalPath(matched[length - 2]);\n return (\n // we are dealing with nested routes\n length > 1 && // if the parent and matched route have the same path, this link is\n // referring to the empty child. Or we currently are on a different\n // child of the same parent\n getOriginalPath(routeMatched) === parentRecordPath && // avoid comparing the child with its parent\n currentMatched[currentMatched.length - 1].path !== parentRecordPath ? currentMatched.findIndex(isSameRouteRecord.bind(null, matched[length - 2])) : index2\n );\n });\n const isActive = computed(() => activeRecordIndex.value > -1 && includesParams(currentRoute.params, route.value.params));\n const isExactActive = computed(() => activeRecordIndex.value > -1 && activeRecordIndex.value === currentRoute.matched.length - 1 && isSameRouteLocationParams(currentRoute.params, route.value.params));\n function navigate(e = {}) {\n if (guardEvent(e)) {\n return router2[unref(props.replace) ? \"replace\" : \"push\"](\n unref(props.to)\n // avoid uncaught errors are they are logged anyway\n ).catch(noop);\n }\n return Promise.resolve();\n }\n if ((process.env.NODE_ENV !== \"production\" || false) && isBrowser) {\n const instance = getCurrentInstance();\n if (instance) {\n const linkContextDevtools = {\n route: route.value,\n isActive: isActive.value,\n isExactActive: isExactActive.value\n };\n instance.__vrl_devtools = instance.__vrl_devtools || [];\n instance.__vrl_devtools.push(linkContextDevtools);\n watchEffect(() => {\n linkContextDevtools.route = route.value;\n linkContextDevtools.isActive = isActive.value;\n linkContextDevtools.isExactActive = isExactActive.value;\n }, { flush: \"post\" });\n }\n }\n return {\n route,\n href: computed(() => route.value.href),\n isActive,\n isExactActive,\n navigate\n };\n}\nconst RouterLinkImpl = /* @__PURE__ */ defineComponent({\n name: \"RouterLink\",\n compatConfig: { MODE: 3 },\n props: {\n to: {\n type: [String, Object],\n required: true\n },\n replace: Boolean,\n activeClass: String,\n // inactiveClass: String,\n exactActiveClass: String,\n custom: Boolean,\n ariaCurrentValue: {\n type: String,\n default: \"page\"\n }\n },\n useLink,\n setup(props, { slots }) {\n const link = reactive(useLink(props));\n const { options } = inject(routerKey);\n const elClass = computed(() => ({\n [getLinkClass(props.activeClass, options.linkActiveClass, \"router-link-active\")]: link.isActive,\n // [getLinkClass(\n // props.inactiveClass,\n // options.linkInactiveClass,\n // 'router-link-inactive'\n // )]: !link.isExactActive,\n [getLinkClass(props.exactActiveClass, options.linkExactActiveClass, \"router-link-exact-active\")]: link.isExactActive\n }));\n return () => {\n const children = slots.default && slots.default(link);\n return props.custom ? children : h$1(\"a\", {\n \"aria-current\": link.isExactActive ? props.ariaCurrentValue : null,\n href: link.href,\n // this would override user added attrs but Vue will still add\n // the listener, so we end up triggering both\n onClick: link.navigate,\n class: elClass.value\n }, children);\n };\n }\n});\nconst RouterLink = RouterLinkImpl;\nfunction guardEvent(e) {\n if (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey)\n return;\n if (e.defaultPrevented)\n return;\n if (e.button !== void 0 && e.button !== 0)\n return;\n if (e.currentTarget && e.currentTarget.getAttribute) {\n const target = e.currentTarget.getAttribute(\"target\");\n if (/\\b_blank\\b/i.test(target))\n return;\n }\n if (e.preventDefault)\n e.preventDefault();\n return true;\n}\nfunction includesParams(outer, inner) {\n for (const key in inner) {\n const innerValue = inner[key];\n const outerValue = outer[key];\n if (typeof innerValue === \"string\") {\n if (innerValue !== outerValue)\n return false;\n } else {\n if (!isArray(outerValue) || outerValue.length !== innerValue.length || innerValue.some((value, i) => value !== outerValue[i]))\n return false;\n }\n }\n return true;\n}\nfunction getOriginalPath(record) {\n return record ? record.aliasOf ? record.aliasOf.path : record.path : \"\";\n}\nconst getLinkClass = (propClass, globalClass, defaultClass) => propClass != null ? propClass : globalClass != null ? globalClass : defaultClass;\nconst RouterViewImpl = /* @__PURE__ */ defineComponent({\n name: \"RouterView\",\n // #674 we manually inherit them\n inheritAttrs: false,\n props: {\n name: {\n type: String,\n default: \"default\"\n },\n route: Object\n },\n // Better compat for @vue/compat users\n // https://github.com/vuejs/router/issues/1315\n compatConfig: { MODE: 3 },\n setup(props, { attrs, slots }) {\n process.env.NODE_ENV !== \"production\" && warnDeprecatedUsage();\n const injectedRoute = inject(routerViewLocationKey);\n const routeToDisplay = computed(() => props.route || injectedRoute.value);\n const injectedDepth = inject(viewDepthKey, 0);\n const depth = computed(() => {\n let initialDepth = unref(injectedDepth);\n const { matched } = routeToDisplay.value;\n let matchedRoute;\n while ((matchedRoute = matched[initialDepth]) && !matchedRoute.components) {\n initialDepth++;\n }\n return initialDepth;\n });\n const matchedRouteRef = computed(() => routeToDisplay.value.matched[depth.value]);\n provide(viewDepthKey, computed(() => depth.value + 1));\n provide(matchedRouteKey, matchedRouteRef);\n provide(routerViewLocationKey, routeToDisplay);\n const viewRef = ref();\n watch(() => [viewRef.value, matchedRouteRef.value, props.name], ([instance, to, name], [oldInstance, from, oldName]) => {\n if (to) {\n to.instances[name] = instance;\n if (from && from !== to && instance && instance === oldInstance) {\n if (!to.leaveGuards.size) {\n to.leaveGuards = from.leaveGuards;\n }\n if (!to.updateGuards.size) {\n to.updateGuards = from.updateGuards;\n }\n }\n }\n if (instance && to && // if there is no instance but to and from are the same this might be\n // the first visit\n (!from || !isSameRouteRecord(to, from) || !oldInstance)) {\n (to.enterCallbacks[name] || []).forEach((callback) => callback(instance));\n }\n }, { flush: \"post\" });\n return () => {\n const route = routeToDisplay.value;\n const currentName = props.name;\n const matchedRoute = matchedRouteRef.value;\n const ViewComponent = matchedRoute && matchedRoute.components[currentName];\n if (!ViewComponent) {\n return normalizeSlot(slots.default, { Component: ViewComponent, route });\n }\n const routePropsOption = matchedRoute.props[currentName];\n const routeProps = routePropsOption ? routePropsOption === true ? route.params : typeof routePropsOption === \"function\" ? routePropsOption(route) : routePropsOption : null;\n const onVnodeUnmounted = (vnode) => {\n if (vnode.component.isUnmounted) {\n matchedRoute.instances[currentName] = null;\n }\n };\n const component = h$1(ViewComponent, assign({}, routeProps, attrs, {\n onVnodeUnmounted,\n ref: viewRef\n }));\n if ((process.env.NODE_ENV !== \"production\" || false) && isBrowser && component.ref) {\n const info = {\n depth: depth.value,\n name: matchedRoute.name,\n path: matchedRoute.path,\n meta: matchedRoute.meta\n };\n const internalInstances = isArray(component.ref) ? component.ref.map((r) => r.i) : [component.ref.i];\n internalInstances.forEach((instance) => {\n instance.__vrv_devtools = info;\n });\n }\n return (\n // pass the vnode to the slot as a prop.\n // h and both accept vnodes\n normalizeSlot(slots.default, { Component: component, route }) || component\n );\n };\n }\n});\nfunction normalizeSlot(slot, data) {\n if (!slot)\n return null;\n const slotContent = slot(data);\n return slotContent.length === 1 ? slotContent[0] : slotContent;\n}\nconst RouterView = RouterViewImpl;\nfunction warnDeprecatedUsage() {\n const instance = getCurrentInstance();\n const parentName = instance.parent && instance.parent.type.name;\n if (parentName && (parentName === \"KeepAlive\" || parentName.includes(\"Transition\"))) {\n const comp = parentName === \"KeepAlive\" ? \"keep-alive\" : \"transition\";\n warn(` can no longer be used directly inside or .\nUse slot props instead:\n\n\n <${comp}>\n \n \n`);\n }\n}\nfunction formatRouteLocation(routeLocation, tooltip) {\n const copy = assign({}, routeLocation, {\n // remove variables that can contain vue instances\n matched: routeLocation.matched.map((matched) => omit(matched, [\"instances\", \"children\", \"aliasOf\"]))\n });\n return {\n _custom: {\n type: null,\n readOnly: true,\n display: routeLocation.fullPath,\n tooltip,\n value: copy\n }\n };\n}\nfunction formatDisplay(display) {\n return {\n _custom: {\n display\n }\n };\n}\nlet routerId = 0;\nfunction addDevtools(app, router2, matcher) {\n if (router2.__hasDevtools)\n return;\n router2.__hasDevtools = true;\n const id = routerId++;\n setupDevtoolsPlugin({\n id: \"org.vuejs.router\" + (id ? \".\" + id : \"\"),\n label: \"Vue Router\",\n packageName: \"vue-router\",\n homepage: \"https://router.vuejs.org\",\n logo: \"https://router.vuejs.org/logo.png\",\n componentStateTypes: [\"Routing\"],\n app\n }, (api) => {\n if (typeof api.now !== \"function\") {\n console.warn(\"[Vue Router]: You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html.\");\n }\n api.on.inspectComponent((payload, ctx) => {\n if (payload.instanceData) {\n payload.instanceData.state.push({\n type: \"Routing\",\n key: \"$route\",\n editable: false,\n value: formatRouteLocation(router2.currentRoute.value, \"Current Route\")\n });\n }\n });\n api.on.visitComponentTree(({ treeNode: node, componentInstance }) => {\n if (componentInstance.__vrv_devtools) {\n const info = componentInstance.__vrv_devtools;\n node.tags.push({\n label: (info.name ? `${info.name.toString()}: ` : \"\") + info.path,\n textColor: 0,\n tooltip: \"This component is rendered by <router-view>\",\n backgroundColor: PINK_500\n });\n }\n if (isArray(componentInstance.__vrl_devtools)) {\n componentInstance.__devtoolsApi = api;\n componentInstance.__vrl_devtools.forEach((devtoolsData) => {\n let backgroundColor = ORANGE_400;\n let tooltip = \"\";\n if (devtoolsData.isExactActive) {\n backgroundColor = LIME_500;\n tooltip = \"This is exactly active\";\n } else if (devtoolsData.isActive) {\n backgroundColor = BLUE_600;\n tooltip = \"This link is active\";\n }\n node.tags.push({\n label: devtoolsData.route.path,\n textColor: 0,\n tooltip,\n backgroundColor\n });\n });\n }\n });\n watch(router2.currentRoute, () => {\n refreshRoutesView();\n api.notifyComponentUpdate();\n api.sendInspectorTree(routerInspectorId);\n api.sendInspectorState(routerInspectorId);\n });\n const navigationsLayerId = \"router:navigations:\" + id;\n api.addTimelineLayer({\n id: navigationsLayerId,\n label: `Router${id ? \" \" + id : \"\"} Navigations`,\n color: 4237508\n });\n router2.onError((error, to) => {\n api.addTimelineEvent({\n layerId: navigationsLayerId,\n event: {\n title: \"Error during Navigation\",\n subtitle: to.fullPath,\n logType: \"error\",\n time: api.now(),\n data: { error },\n groupId: to.meta.__navigationId\n }\n });\n });\n let navigationId = 0;\n router2.beforeEach((to, from) => {\n const data = {\n guard: formatDisplay(\"beforeEach\"),\n from: formatRouteLocation(from, \"Current Location during this navigation\"),\n to: formatRouteLocation(to, \"Target location\")\n };\n Object.defineProperty(to.meta, \"__navigationId\", {\n value: navigationId++\n });\n api.addTimelineEvent({\n layerId: navigationsLayerId,\n event: {\n time: api.now(),\n title: \"Start of navigation\",\n subtitle: to.fullPath,\n data,\n groupId: to.meta.__navigationId\n }\n });\n });\n router2.afterEach((to, from, failure) => {\n const data = {\n guard: formatDisplay(\"afterEach\")\n };\n if (failure) {\n data.failure = {\n _custom: {\n type: Error,\n readOnly: true,\n display: failure ? failure.message : \"\",\n tooltip: \"Navigation Failure\",\n value: failure\n }\n };\n data.status = formatDisplay(\"❌\");\n } else {\n data.status = formatDisplay(\"✅\");\n }\n data.from = formatRouteLocation(from, \"Current Location during this navigation\");\n data.to = formatRouteLocation(to, \"Target location\");\n api.addTimelineEvent({\n layerId: navigationsLayerId,\n event: {\n title: \"End of navigation\",\n subtitle: to.fullPath,\n time: api.now(),\n data,\n logType: failure ? \"warning\" : \"default\",\n groupId: to.meta.__navigationId\n }\n });\n });\n const routerInspectorId = \"router-inspector:\" + id;\n api.addInspector({\n id: routerInspectorId,\n label: \"Routes\" + (id ? \" \" + id : \"\"),\n icon: \"book\",\n treeFilterPlaceholder: \"Search routes\"\n });\n function refreshRoutesView() {\n if (!activeRoutesPayload)\n return;\n const payload = activeRoutesPayload;\n let routes = matcher.getRoutes().filter((route) => !route.parent);\n routes.forEach(resetMatchStateOnRouteRecord);\n if (payload.filter) {\n routes = routes.filter((route) => (\n // save matches state based on the payload\n isRouteMatching(route, payload.filter.toLowerCase())\n ));\n }\n routes.forEach((route) => markRouteRecordActive(route, router2.currentRoute.value));\n payload.rootNodes = routes.map(formatRouteRecordForInspector);\n }\n let activeRoutesPayload;\n api.on.getInspectorTree((payload) => {\n activeRoutesPayload = payload;\n if (payload.app === app && payload.inspectorId === routerInspectorId) {\n refreshRoutesView();\n }\n });\n api.on.getInspectorState((payload) => {\n if (payload.app === app && payload.inspectorId === routerInspectorId) {\n const routes = matcher.getRoutes();\n const route = routes.find((route2) => route2.record.__vd_id === payload.nodeId);\n if (route) {\n payload.state = {\n options: formatRouteRecordMatcherForStateInspector(route)\n };\n }\n }\n });\n api.sendInspectorTree(routerInspectorId);\n api.sendInspectorState(routerInspectorId);\n });\n}\nfunction modifierForKey(key) {\n if (key.optional) {\n return key.repeatable ? \"*\" : \"?\";\n } else {\n return key.repeatable ? \"+\" : \"\";\n }\n}\nfunction formatRouteRecordMatcherForStateInspector(route) {\n const { record } = route;\n const fields = [\n { editable: false, key: \"path\", value: record.path }\n ];\n if (record.name != null) {\n fields.push({\n editable: false,\n key: \"name\",\n value: record.name\n });\n }\n fields.push({ editable: false, key: \"regexp\", value: route.re });\n if (route.keys.length) {\n fields.push({\n editable: false,\n key: \"keys\",\n value: {\n _custom: {\n type: null,\n readOnly: true,\n display: route.keys.map((key) => `${key.name}${modifierForKey(key)}`).join(\" \"),\n tooltip: \"Param keys\",\n value: route.keys\n }\n }\n });\n }\n if (record.redirect != null) {\n fields.push({\n editable: false,\n key: \"redirect\",\n value: record.redirect\n });\n }\n if (route.alias.length) {\n fields.push({\n editable: false,\n key: \"aliases\",\n value: route.alias.map((alias) => alias.record.path)\n });\n }\n if (Object.keys(route.record.meta).length) {\n fields.push({\n editable: false,\n key: \"meta\",\n value: route.record.meta\n });\n }\n fields.push({\n key: \"score\",\n editable: false,\n value: {\n _custom: {\n type: null,\n readOnly: true,\n display: route.score.map((score) => score.join(\", \")).join(\" | \"),\n tooltip: \"Score used to sort routes\",\n value: route.score\n }\n }\n });\n return fields;\n}\nconst PINK_500 = 15485081;\nconst BLUE_600 = 2450411;\nconst LIME_500 = 8702998;\nconst CYAN_400 = 2282478;\nconst ORANGE_400 = 16486972;\nconst DARK = 6710886;\nfunction formatRouteRecordForInspector(route) {\n const tags = [];\n const { record } = route;\n if (record.name != null) {\n tags.push({\n label: String(record.name),\n textColor: 0,\n backgroundColor: CYAN_400\n });\n }\n if (record.aliasOf) {\n tags.push({\n label: \"alias\",\n textColor: 0,\n backgroundColor: ORANGE_400\n });\n }\n if (route.__vd_match) {\n tags.push({\n label: \"matches\",\n textColor: 0,\n backgroundColor: PINK_500\n });\n }\n if (route.__vd_exactActive) {\n tags.push({\n label: \"exact\",\n textColor: 0,\n backgroundColor: LIME_500\n });\n }\n if (route.__vd_active) {\n tags.push({\n label: \"active\",\n textColor: 0,\n backgroundColor: BLUE_600\n });\n }\n if (record.redirect) {\n tags.push({\n label: typeof record.redirect === \"string\" ? `redirect: ${record.redirect}` : \"redirects\",\n textColor: 16777215,\n backgroundColor: DARK\n });\n }\n let id = record.__vd_id;\n if (id == null) {\n id = String(routeRecordId++);\n record.__vd_id = id;\n }\n return {\n id,\n label: record.path,\n tags,\n children: route.children.map(formatRouteRecordForInspector)\n };\n}\nlet routeRecordId = 0;\nconst EXTRACT_REGEXP_RE = /^\\/(.*)\\/([a-z]*)$/;\nfunction markRouteRecordActive(route, currentRoute) {\n const isExactActive = currentRoute.matched.length && isSameRouteRecord(currentRoute.matched[currentRoute.matched.length - 1], route.record);\n route.__vd_exactActive = route.__vd_active = isExactActive;\n if (!isExactActive) {\n route.__vd_active = currentRoute.matched.some((match) => isSameRouteRecord(match, route.record));\n }\n route.children.forEach((childRoute) => markRouteRecordActive(childRoute, currentRoute));\n}\nfunction resetMatchStateOnRouteRecord(route) {\n route.__vd_match = false;\n route.children.forEach(resetMatchStateOnRouteRecord);\n}\nfunction isRouteMatching(route, filter) {\n const found = String(route.re).match(EXTRACT_REGEXP_RE);\n route.__vd_match = false;\n if (!found || found.length < 3) {\n return false;\n }\n const nonEndingRE = new RegExp(found[1].replace(/\\$$/, \"\"), found[2]);\n if (nonEndingRE.test(filter)) {\n route.children.forEach((child) => isRouteMatching(child, filter));\n if (route.record.path !== \"/\" || filter === \"/\") {\n route.__vd_match = route.re.test(filter);\n return true;\n }\n return false;\n }\n const path = route.record.path.toLowerCase();\n const decodedPath = decode(path);\n if (!filter.startsWith(\"/\") && (decodedPath.includes(filter) || path.includes(filter)))\n return true;\n if (decodedPath.startsWith(filter) || path.startsWith(filter))\n return true;\n if (route.record.name && String(route.record.name).includes(filter))\n return true;\n return route.children.some((child) => isRouteMatching(child, filter));\n}\nfunction omit(obj, keys) {\n const ret = {};\n for (const key in obj) {\n if (!keys.includes(key)) {\n ret[key] = obj[key];\n }\n }\n return ret;\n}\nfunction createRouter(options) {\n const matcher = createRouterMatcher(options.routes, options);\n const parseQuery$1 = options.parseQuery || parseQuery;\n const stringifyQuery$1 = options.stringifyQuery || stringifyQuery;\n const routerHistory = options.history;\n if (process.env.NODE_ENV !== \"production\" && !routerHistory)\n throw new Error('Provide the \"history\" option when calling \"createRouter()\": https://next.router.vuejs.org/api/#history.');\n const beforeGuards = useCallbacks();\n const beforeResolveGuards = useCallbacks();\n const afterGuards = useCallbacks();\n const currentRoute = shallowRef(START_LOCATION_NORMALIZED);\n let pendingLocation = START_LOCATION_NORMALIZED;\n if (isBrowser && options.scrollBehavior && \"scrollRestoration\" in history) {\n history.scrollRestoration = \"manual\";\n }\n const normalizeParams = applyToParams.bind(null, (paramValue) => \"\" + paramValue);\n const encodeParams = applyToParams.bind(null, encodeParam);\n const decodeParams = (\n // @ts-expect-error: intentionally avoid the type check\n applyToParams.bind(null, decode)\n );\n function addRoute(parentOrRoute, route) {\n let parent;\n let record;\n if (isRouteName(parentOrRoute)) {\n parent = matcher.getRecordMatcher(parentOrRoute);\n record = route;\n } else {\n record = parentOrRoute;\n }\n return matcher.addRoute(record, parent);\n }\n function removeRoute(name) {\n const recordMatcher = matcher.getRecordMatcher(name);\n if (recordMatcher) {\n matcher.removeRoute(recordMatcher);\n } else if (process.env.NODE_ENV !== \"production\") {\n warn(`Cannot remove non-existent route \"${String(name)}\"`);\n }\n }\n function getRoutes() {\n return matcher.getRoutes().map((routeMatcher) => routeMatcher.record);\n }\n function hasRoute(name) {\n return !!matcher.getRecordMatcher(name);\n }\n function resolve(rawLocation, currentLocation) {\n currentLocation = assign({}, currentLocation || currentRoute.value);\n if (typeof rawLocation === \"string\") {\n const locationNormalized = parseURL(parseQuery$1, rawLocation, currentLocation.path);\n const matchedRoute2 = matcher.resolve({ path: locationNormalized.path }, currentLocation);\n const href2 = routerHistory.createHref(locationNormalized.fullPath);\n if (process.env.NODE_ENV !== \"production\") {\n if (href2.startsWith(\"//\"))\n warn(`Location \"${rawLocation}\" resolved to \"${href2}\". A resolved location cannot start with multiple slashes.`);\n else if (!matchedRoute2.matched.length) {\n warn(`No match found for location with path \"${rawLocation}\"`);\n }\n }\n return assign(locationNormalized, matchedRoute2, {\n params: decodeParams(matchedRoute2.params),\n hash: decode(locationNormalized.hash),\n redirectedFrom: void 0,\n href: href2\n });\n }\n let matcherLocation;\n if (\"path\" in rawLocation) {\n if (process.env.NODE_ENV !== \"production\" && \"params\" in rawLocation && !(\"name\" in rawLocation) && // @ts-expect-error: the type is never\n Object.keys(rawLocation.params).length) {\n warn(`Path \"${// @ts-expect-error: the type is never\n rawLocation.path}\" was passed with params but they will be ignored. Use a named route alongside params instead.`);\n }\n matcherLocation = assign({}, rawLocation, {\n path: parseURL(parseQuery$1, rawLocation.path, currentLocation.path).path\n });\n } else {\n const targetParams = assign({}, rawLocation.params);\n for (const key in targetParams) {\n if (targetParams[key] == null) {\n delete targetParams[key];\n }\n }\n matcherLocation = assign({}, rawLocation, {\n params: encodeParams(rawLocation.params)\n });\n currentLocation.params = encodeParams(currentLocation.params);\n }\n const matchedRoute = matcher.resolve(matcherLocation, currentLocation);\n const hash = rawLocation.hash || \"\";\n if (process.env.NODE_ENV !== \"production\" && hash && !hash.startsWith(\"#\")) {\n warn(`A \\`hash\\` should always start with the character \"#\". Replace \"${hash}\" with \"#${hash}\".`);\n }\n matchedRoute.params = normalizeParams(decodeParams(matchedRoute.params));\n const fullPath = stringifyURL(stringifyQuery$1, assign({}, rawLocation, {\n hash: encodeHash(hash),\n path: matchedRoute.path\n }));\n const href = routerHistory.createHref(fullPath);\n if (process.env.NODE_ENV !== \"production\") {\n if (href.startsWith(\"//\")) {\n warn(`Location \"${rawLocation}\" resolved to \"${href}\". A resolved location cannot start with multiple slashes.`);\n } else if (!matchedRoute.matched.length) {\n warn(`No match found for location with path \"${\"path\" in rawLocation ? rawLocation.path : rawLocation}\"`);\n }\n }\n return assign({\n fullPath,\n // keep the hash encoded so fullPath is effectively path + encodedQuery +\n // hash\n hash,\n query: (\n // if the user is using a custom query lib like qs, we might have\n // nested objects, so we keep the query as is, meaning it can contain\n // numbers at `$route.query`, but at the point, the user will have to\n // use their own type anyway.\n // https://github.com/vuejs/router/issues/328#issuecomment-649481567\n stringifyQuery$1 === stringifyQuery ? normalizeQuery(rawLocation.query) : rawLocation.query || {}\n )\n }, matchedRoute, {\n redirectedFrom: void 0,\n href\n });\n }\n function locationAsObject(to) {\n return typeof to === \"string\" ? parseURL(parseQuery$1, to, currentRoute.value.path) : assign({}, to);\n }\n function checkCanceledNavigation(to, from) {\n if (pendingLocation !== to) {\n return createRouterError(8, {\n from,\n to\n });\n }\n }\n function push(to) {\n return pushWithRedirect(to);\n }\n function replace(to) {\n return push(assign(locationAsObject(to), { replace: true }));\n }\n function handleRedirectRecord(to) {\n const lastMatched = to.matched[to.matched.length - 1];\n if (lastMatched && lastMatched.redirect) {\n const { redirect } = lastMatched;\n let newTargetLocation = typeof redirect === \"function\" ? redirect(to) : redirect;\n if (typeof newTargetLocation === \"string\") {\n newTargetLocation = newTargetLocation.includes(\"?\") || newTargetLocation.includes(\"#\") ? newTargetLocation = locationAsObject(newTargetLocation) : (\n // force empty params\n { path: newTargetLocation }\n );\n newTargetLocation.params = {};\n }\n if (process.env.NODE_ENV !== \"production\" && !(\"path\" in newTargetLocation) && !(\"name\" in newTargetLocation)) {\n warn(`Invalid redirect found:\n${JSON.stringify(newTargetLocation, null, 2)}\n when navigating to \"${to.fullPath}\". A redirect must contain a name or path. This will break in production.`);\n throw new Error(\"Invalid redirect\");\n }\n return assign({\n query: to.query,\n hash: to.hash,\n // avoid transferring params if the redirect has a path\n params: \"path\" in newTargetLocation ? {} : to.params\n }, newTargetLocation);\n }\n }\n function pushWithRedirect(to, redirectedFrom) {\n const targetLocation = pendingLocation = resolve(to);\n const from = currentRoute.value;\n const data = to.state;\n const force = to.force;\n const replace2 = to.replace === true;\n const shouldRedirect = handleRedirectRecord(targetLocation);\n if (shouldRedirect)\n return pushWithRedirect(\n assign(locationAsObject(shouldRedirect), {\n state: typeof shouldRedirect === \"object\" ? assign({}, data, shouldRedirect.state) : data,\n force,\n replace: replace2\n }),\n // keep original redirectedFrom if it exists\n redirectedFrom || targetLocation\n );\n const toLocation = targetLocation;\n toLocation.redirectedFrom = redirectedFrom;\n let failure;\n if (!force && isSameRouteLocation(stringifyQuery$1, from, targetLocation)) {\n failure = createRouterError(16, { to: toLocation, from });\n handleScroll(\n from,\n from,\n // this is a push, the only way for it to be triggered from a\n // history.listen is with a redirect, which makes it become a push\n true,\n // This cannot be the first navigation because the initial location\n // cannot be manually navigated to\n false\n );\n }\n return (failure ? Promise.resolve(failure) : navigate(toLocation, from)).catch((error) => isNavigationFailure(error) ? (\n // navigation redirects still mark the router as ready\n isNavigationFailure(\n error,\n 2\n /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */\n ) ? error : markAsReady(error)\n ) : (\n // reject any unknown error\n triggerError(error, toLocation, from)\n )).then((failure2) => {\n if (failure2) {\n if (isNavigationFailure(\n failure2,\n 2\n /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */\n )) {\n if (process.env.NODE_ENV !== \"production\" && // we are redirecting to the same location we were already at\n isSameRouteLocation(stringifyQuery$1, resolve(failure2.to), toLocation) && // and we have done it a couple of times\n redirectedFrom && // @ts-expect-error: added only in dev\n (redirectedFrom._count = redirectedFrom._count ? (\n // @ts-expect-error\n redirectedFrom._count + 1\n ) : 1) > 10) {\n warn(`Detected an infinite redirection in a navigation guard when going from \"${from.fullPath}\" to \"${toLocation.fullPath}\". Aborting to avoid a Stack Overflow. This will break in production if not fixed.`);\n return Promise.reject(new Error(\"Infinite redirect in navigation guard\"));\n }\n return pushWithRedirect(\n // keep options\n assign({\n // preserve an existing replacement but allow the redirect to override it\n replace: replace2\n }, locationAsObject(failure2.to), {\n state: typeof failure2.to === \"object\" ? assign({}, data, failure2.to.state) : data,\n force\n }),\n // preserve the original redirectedFrom if any\n redirectedFrom || toLocation\n );\n }\n } else {\n failure2 = finalizeNavigation(toLocation, from, true, replace2, data);\n }\n triggerAfterEach(toLocation, from, failure2);\n return failure2;\n });\n }\n function checkCanceledNavigationAndReject(to, from) {\n const error = checkCanceledNavigation(to, from);\n return error ? Promise.reject(error) : Promise.resolve();\n }\n function navigate(to, from) {\n let guards;\n const [leavingRecords, updatingRecords, enteringRecords] = extractChangingRecords(to, from);\n guards = extractComponentsGuards(leavingRecords.reverse(), \"beforeRouteLeave\", to, from);\n for (const record of leavingRecords) {\n record.leaveGuards.forEach((guard) => {\n guards.push(guardToPromiseFn(guard, to, from));\n });\n }\n const canceledNavigationCheck = checkCanceledNavigationAndReject.bind(null, to, from);\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards).then(() => {\n guards = [];\n for (const guard of beforeGuards.list()) {\n guards.push(guardToPromiseFn(guard, to, from));\n }\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards);\n }).then(() => {\n guards = extractComponentsGuards(updatingRecords, \"beforeRouteUpdate\", to, from);\n for (const record of updatingRecords) {\n record.updateGuards.forEach((guard) => {\n guards.push(guardToPromiseFn(guard, to, from));\n });\n }\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards);\n }).then(() => {\n guards = [];\n for (const record of to.matched) {\n if (record.beforeEnter && !from.matched.includes(record)) {\n if (isArray(record.beforeEnter)) {\n for (const beforeEnter of record.beforeEnter)\n guards.push(guardToPromiseFn(beforeEnter, to, from));\n } else {\n guards.push(guardToPromiseFn(record.beforeEnter, to, from));\n }\n }\n }\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards);\n }).then(() => {\n to.matched.forEach((record) => record.enterCallbacks = {});\n guards = extractComponentsGuards(enteringRecords, \"beforeRouteEnter\", to, from);\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards);\n }).then(() => {\n guards = [];\n for (const guard of beforeResolveGuards.list()) {\n guards.push(guardToPromiseFn(guard, to, from));\n }\n guards.push(canceledNavigationCheck);\n return runGuardQueue(guards);\n }).catch((err) => isNavigationFailure(\n err,\n 8\n /* ErrorTypes.NAVIGATION_CANCELLED */\n ) ? err : Promise.reject(err));\n }\n function triggerAfterEach(to, from, failure) {\n for (const guard of afterGuards.list())\n guard(to, from, failure);\n }\n function finalizeNavigation(toLocation, from, isPush, replace2, data) {\n const error = checkCanceledNavigation(toLocation, from);\n if (error)\n return error;\n const isFirstNavigation = from === START_LOCATION_NORMALIZED;\n const state = !isBrowser ? {} : history.state;\n if (isPush) {\n if (replace2 || isFirstNavigation)\n routerHistory.replace(toLocation.fullPath, assign({\n scroll: isFirstNavigation && state && state.scroll\n }, data));\n else\n routerHistory.push(toLocation.fullPath, data);\n }\n currentRoute.value = toLocation;\n handleScroll(toLocation, from, isPush, isFirstNavigation);\n markAsReady();\n }\n let removeHistoryListener;\n function setupListeners() {\n if (removeHistoryListener)\n return;\n removeHistoryListener = routerHistory.listen((to, _from, info) => {\n if (!router2.listening)\n return;\n const toLocation = resolve(to);\n const shouldRedirect = handleRedirectRecord(toLocation);\n if (shouldRedirect) {\n pushWithRedirect(assign(shouldRedirect, { replace: true }), toLocation).catch(noop);\n return;\n }\n pendingLocation = toLocation;\n const from = currentRoute.value;\n if (isBrowser) {\n saveScrollPosition(getScrollKey(from.fullPath, info.delta), computeScrollPosition());\n }\n navigate(toLocation, from).catch((error) => {\n if (isNavigationFailure(\n error,\n 4 | 8\n /* ErrorTypes.NAVIGATION_CANCELLED */\n )) {\n return error;\n }\n if (isNavigationFailure(\n error,\n 2\n /* ErrorTypes.NAVIGATION_GUARD_REDIRECT */\n )) {\n pushWithRedirect(\n error.to,\n toLocation\n // avoid an uncaught rejection, let push call triggerError\n ).then((failure) => {\n if (isNavigationFailure(\n failure,\n 4 | 16\n /* ErrorTypes.NAVIGATION_DUPLICATED */\n ) && !info.delta && info.type === NavigationType.pop) {\n routerHistory.go(-1, false);\n }\n }).catch(noop);\n return Promise.reject();\n }\n if (info.delta) {\n routerHistory.go(-info.delta, false);\n }\n return triggerError(error, toLocation, from);\n }).then((failure) => {\n failure = failure || finalizeNavigation(\n // after navigation, all matched components are resolved\n toLocation,\n from,\n false\n );\n if (failure) {\n if (info.delta && // a new navigation has been triggered, so we do not want to revert, that will change the current history\n // entry while a different route is displayed\n !isNavigationFailure(\n failure,\n 8\n /* ErrorTypes.NAVIGATION_CANCELLED */\n )) {\n routerHistory.go(-info.delta, false);\n } else if (info.type === NavigationType.pop && isNavigationFailure(\n failure,\n 4 | 16\n /* ErrorTypes.NAVIGATION_DUPLICATED */\n )) {\n routerHistory.go(-1, false);\n }\n }\n triggerAfterEach(toLocation, from, failure);\n }).catch(noop);\n });\n }\n let readyHandlers = useCallbacks();\n let errorHandlers = useCallbacks();\n let ready;\n function triggerError(error, to, from) {\n markAsReady(error);\n const list = errorHandlers.list();\n if (list.length) {\n list.forEach((handler) => handler(error, to, from));\n } else {\n if (process.env.NODE_ENV !== \"production\") {\n warn(\"uncaught error during route navigation:\");\n }\n console.error(error);\n }\n return Promise.reject(error);\n }\n function isReady() {\n if (ready && currentRoute.value !== START_LOCATION_NORMALIZED)\n return Promise.resolve();\n return new Promise((resolve2, reject) => {\n readyHandlers.add([resolve2, reject]);\n });\n }\n function markAsReady(err) {\n if (!ready) {\n ready = !err;\n setupListeners();\n readyHandlers.list().forEach(([resolve2, reject]) => err ? reject(err) : resolve2());\n readyHandlers.reset();\n }\n return err;\n }\n function handleScroll(to, from, isPush, isFirstNavigation) {\n const { scrollBehavior } = options;\n if (!isBrowser || !scrollBehavior)\n return Promise.resolve();\n const scrollPosition = !isPush && getSavedScrollPosition(getScrollKey(to.fullPath, 0)) || (isFirstNavigation || !isPush) && history.state && history.state.scroll || null;\n return nextTick().then(() => scrollBehavior(to, from, scrollPosition)).then((position) => position && scrollToPosition(position)).catch((err) => triggerError(err, to, from));\n }\n const go = (delta) => routerHistory.go(delta);\n let started;\n const installedApps = /* @__PURE__ */ new Set();\n const router2 = {\n currentRoute,\n listening: true,\n addRoute,\n removeRoute,\n hasRoute,\n getRoutes,\n resolve,\n options,\n push,\n replace,\n go,\n back: () => go(-1),\n forward: () => go(1),\n beforeEach: beforeGuards.add,\n beforeResolve: beforeResolveGuards.add,\n afterEach: afterGuards.add,\n onError: errorHandlers.add,\n isReady,\n install(app) {\n const router3 = this;\n app.component(\"RouterLink\", RouterLink);\n app.component(\"RouterView\", RouterView);\n app.config.globalProperties.$router = router3;\n Object.defineProperty(app.config.globalProperties, \"$route\", {\n enumerable: true,\n get: () => unref(currentRoute)\n });\n if (isBrowser && // used for the initial navigation client side to avoid pushing\n // multiple times when the router is used in multiple apps\n !started && currentRoute.value === START_LOCATION_NORMALIZED) {\n started = true;\n push(routerHistory.location).catch((err) => {\n if (process.env.NODE_ENV !== \"production\")\n warn(\"Unexpected error when starting the router:\", err);\n });\n }\n const reactiveRoute = {};\n for (const key in START_LOCATION_NORMALIZED) {\n reactiveRoute[key] = computed(() => currentRoute.value[key]);\n }\n app.provide(routerKey, router3);\n app.provide(routeLocationKey, reactive(reactiveRoute));\n app.provide(routerViewLocationKey, currentRoute);\n const unmountApp = app.unmount;\n installedApps.add(app);\n app.unmount = function() {\n installedApps.delete(app);\n if (installedApps.size < 1) {\n pendingLocation = START_LOCATION_NORMALIZED;\n removeHistoryListener && removeHistoryListener();\n removeHistoryListener = null;\n currentRoute.value = START_LOCATION_NORMALIZED;\n started = false;\n ready = false;\n }\n unmountApp();\n };\n if ((process.env.NODE_ENV !== \"production\" || false) && isBrowser) {\n addDevtools(app, router3, matcher);\n }\n }\n };\n return router2;\n}\nfunction runGuardQueue(guards) {\n return guards.reduce((promise, guard) => promise.then(() => guard()), Promise.resolve());\n}\nfunction extractChangingRecords(to, from) {\n const leavingRecords = [];\n const updatingRecords = [];\n const enteringRecords = [];\n const len = Math.max(from.matched.length, to.matched.length);\n for (let i = 0; i < len; i++) {\n const recordFrom = from.matched[i];\n if (recordFrom) {\n if (to.matched.find((record) => isSameRouteRecord(record, recordFrom)))\n updatingRecords.push(recordFrom);\n else\n leavingRecords.push(recordFrom);\n }\n const recordTo = to.matched[i];\n if (recordTo) {\n if (!from.matched.find((record) => isSameRouteRecord(record, recordTo))) {\n enteringRecords.push(recordTo);\n }\n }\n }\n return [leavingRecords, updatingRecords, enteringRecords];\n}\nconst router = createRouter({\n history: createWebHistory(),\n routes: []\n});\nfunction isPromise(obj) {\n return obj && typeof obj.then === \"function\";\n}\nPromise.resolve(false);\nPromise.resolve(true);\nvar PROMISE_RESOLVED_VOID = Promise.resolve();\nfunction sleep(time, resolveWith) {\n if (!time)\n time = 0;\n return new Promise(function(res) {\n return setTimeout(function() {\n return res(resolveWith);\n }, time);\n });\n}\nfunction randomInt(min, max) {\n return Math.floor(Math.random() * (max - min + 1) + min);\n}\nfunction randomToken() {\n return Math.random().toString(36).substring(2);\n}\nvar lastMs = 0;\nvar additional = 0;\nfunction microSeconds$4() {\n var ms = (/* @__PURE__ */ new Date()).getTime();\n if (ms === lastMs) {\n additional++;\n return ms * 1e3 + additional;\n } else {\n lastMs = ms;\n additional = 0;\n return ms * 1e3;\n }\n}\nvar microSeconds$3 = microSeconds$4;\nvar type$3 = \"native\";\nfunction create$3(channelName) {\n var state = {\n messagesCallback: null,\n bc: new BroadcastChannel(channelName),\n subFns: []\n // subscriberFunctions\n };\n state.bc.onmessage = function(msg) {\n if (state.messagesCallback) {\n state.messagesCallback(msg.data);\n }\n };\n return state;\n}\nfunction close$3(channelState) {\n channelState.bc.close();\n channelState.subFns = [];\n}\nfunction postMessage$3(channelState, messageJson) {\n try {\n channelState.bc.postMessage(messageJson, false);\n return PROMISE_RESOLVED_VOID;\n } catch (err) {\n return Promise.reject(err);\n }\n}\nfunction onMessage$3(channelState, fn) {\n channelState.messagesCallback = fn;\n}\nfunction canBeUsed$3() {\n if (typeof window === \"undefined\") {\n return false;\n }\n if (typeof BroadcastChannel === \"function\") {\n if (BroadcastChannel._pubkey) {\n throw new Error(\"BroadcastChannel: Do not overwrite window.BroadcastChannel with this module, this is not a polyfill\");\n }\n return true;\n } else {\n return false;\n }\n}\nfunction averageResponseTime$3() {\n return 150;\n}\nvar NativeMethod = {\n create: create$3,\n close: close$3,\n onMessage: onMessage$3,\n postMessage: postMessage$3,\n canBeUsed: canBeUsed$3,\n type: type$3,\n averageResponseTime: averageResponseTime$3,\n microSeconds: microSeconds$3\n};\nvar ObliviousSet = (\n /** @class */\n function() {\n function ObliviousSet2(ttl) {\n this.ttl = ttl;\n this.map = /* @__PURE__ */ new Map();\n this._to = false;\n }\n ObliviousSet2.prototype.has = function(value) {\n return this.map.has(value);\n };\n ObliviousSet2.prototype.add = function(value) {\n var _this = this;\n this.map.set(value, now());\n if (!this._to) {\n this._to = true;\n setTimeout(function() {\n _this._to = false;\n removeTooOldValues(_this);\n }, 0);\n }\n };\n ObliviousSet2.prototype.clear = function() {\n this.map.clear();\n };\n return ObliviousSet2;\n }()\n);\nfunction removeTooOldValues(obliviousSet) {\n var olderThen = now() - obliviousSet.ttl;\n var iterator = obliviousSet.map[Symbol.iterator]();\n while (true) {\n var next = iterator.next().value;\n if (!next) {\n return;\n }\n var value = next[0];\n var time = next[1];\n if (time < olderThen) {\n obliviousSet.map.delete(value);\n } else {\n return;\n }\n }\n}\nfunction now() {\n return (/* @__PURE__ */ new Date()).getTime();\n}\nfunction fillOptionsWithDefaults() {\n var originalOptions = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};\n var options = JSON.parse(JSON.stringify(originalOptions));\n if (typeof options.webWorkerSupport === \"undefined\")\n options.webWorkerSupport = true;\n if (!options.idb)\n options.idb = {};\n if (!options.idb.ttl)\n options.idb.ttl = 1e3 * 45;\n if (!options.idb.fallbackInterval)\n options.idb.fallbackInterval = 150;\n if (originalOptions.idb && typeof originalOptions.idb.onclose === \"function\")\n options.idb.onclose = originalOptions.idb.onclose;\n if (!options.localstorage)\n options.localstorage = {};\n if (!options.localstorage.removeTimeout)\n options.localstorage.removeTimeout = 1e3 * 60;\n if (originalOptions.methods)\n options.methods = originalOptions.methods;\n if (!options.node)\n options.node = {};\n if (!options.node.ttl)\n options.node.ttl = 1e3 * 60 * 2;\n if (!options.node.maxParallelWrites)\n options.node.maxParallelWrites = 2048;\n if (typeof options.node.useFastPath === \"undefined\")\n options.node.useFastPath = true;\n return options;\n}\nvar microSeconds$2 = microSeconds$4;\nvar DB_PREFIX = \"pubkey.broadcast-channel-0-\";\nvar OBJECT_STORE_ID = \"messages\";\nvar TRANSACTION_SETTINGS = {\n durability: \"relaxed\"\n};\nvar type$2 = \"idb\";\nfunction getIdb() {\n if (typeof indexedDB !== \"undefined\")\n return indexedDB;\n if (typeof window !== \"undefined\") {\n if (typeof window.mozIndexedDB !== \"undefined\")\n return window.mozIndexedDB;\n if (typeof window.webkitIndexedDB !== \"undefined\")\n return window.webkitIndexedDB;\n if (typeof window.msIndexedDB !== \"undefined\")\n return window.msIndexedDB;\n }\n return false;\n}\nfunction commitIndexedDBTransaction(tx) {\n if (tx.commit) {\n tx.commit();\n }\n}\nfunction createDatabase(channelName) {\n var IndexedDB = getIdb();\n var dbName = DB_PREFIX + channelName;\n var openRequest = IndexedDB.open(dbName);\n openRequest.onupgradeneeded = function(ev) {\n var db = ev.target.result;\n db.createObjectStore(OBJECT_STORE_ID, {\n keyPath: \"id\",\n autoIncrement: true\n });\n };\n return new Promise(function(res, rej) {\n openRequest.onerror = function(ev) {\n return rej(ev);\n };\n openRequest.onsuccess = function() {\n res(openRequest.result);\n };\n });\n}\nfunction writeMessage(db, readerUuid, messageJson) {\n var time = (/* @__PURE__ */ new Date()).getTime();\n var writeObject = {\n uuid: readerUuid,\n time,\n data: messageJson\n };\n var tx = db.transaction([OBJECT_STORE_ID], \"readwrite\", TRANSACTION_SETTINGS);\n return new Promise(function(res, rej) {\n tx.oncomplete = function() {\n return res();\n };\n tx.onerror = function(ev) {\n return rej(ev);\n };\n var objectStore = tx.objectStore(OBJECT_STORE_ID);\n objectStore.add(writeObject);\n commitIndexedDBTransaction(tx);\n });\n}\nfunction getMessagesHigherThan(db, lastCursorId) {\n var tx = db.transaction(OBJECT_STORE_ID, \"readonly\", TRANSACTION_SETTINGS);\n var objectStore = tx.objectStore(OBJECT_STORE_ID);\n var ret = [];\n var keyRangeValue = IDBKeyRange.bound(lastCursorId + 1, Infinity);\n if (objectStore.getAll) {\n var getAllRequest = objectStore.getAll(keyRangeValue);\n return new Promise(function(res, rej) {\n getAllRequest.onerror = function(err) {\n return rej(err);\n };\n getAllRequest.onsuccess = function(e) {\n res(e.target.result);\n };\n });\n }\n function openCursor() {\n try {\n keyRangeValue = IDBKeyRange.bound(lastCursorId + 1, Infinity);\n return objectStore.openCursor(keyRangeValue);\n } catch (e) {\n return objectStore.openCursor();\n }\n }\n return new Promise(function(res, rej) {\n var openCursorRequest = openCursor();\n openCursorRequest.onerror = function(err) {\n return rej(err);\n };\n openCursorRequest.onsuccess = function(ev) {\n var cursor = ev.target.result;\n if (cursor) {\n if (cursor.value.id < lastCursorId + 1) {\n cursor[\"continue\"](lastCursorId + 1);\n } else {\n ret.push(cursor.value);\n cursor[\"continue\"]();\n }\n } else {\n commitIndexedDBTransaction(tx);\n res(ret);\n }\n };\n });\n}\nfunction removeMessagesById(channelState, ids) {\n if (channelState.closed) {\n return Promise.resolve([]);\n }\n var tx = channelState.db.transaction(OBJECT_STORE_ID, \"readwrite\", TRANSACTION_SETTINGS);\n var objectStore = tx.objectStore(OBJECT_STORE_ID);\n return Promise.all(ids.map(function(id) {\n var deleteRequest = objectStore[\"delete\"](id);\n return new Promise(function(res) {\n deleteRequest.onsuccess = function() {\n return res();\n };\n });\n }));\n}\nfunction getOldMessages(db, ttl) {\n var olderThen = (/* @__PURE__ */ new Date()).getTime() - ttl;\n var tx = db.transaction(OBJECT_STORE_ID, \"readonly\", TRANSACTION_SETTINGS);\n var objectStore = tx.objectStore(OBJECT_STORE_ID);\n var ret = [];\n return new Promise(function(res) {\n objectStore.openCursor().onsuccess = function(ev) {\n var cursor = ev.target.result;\n if (cursor) {\n var msgObk = cursor.value;\n if (msgObk.time < olderThen) {\n ret.push(msgObk);\n cursor[\"continue\"]();\n } else {\n commitIndexedDBTransaction(tx);\n res(ret);\n }\n } else {\n res(ret);\n }\n };\n });\n}\nfunction cleanOldMessages(channelState) {\n return getOldMessages(channelState.db, channelState.options.idb.ttl).then(function(tooOld) {\n return removeMessagesById(channelState, tooOld.map(function(msg) {\n return msg.id;\n }));\n });\n}\nfunction create$2(channelName, options) {\n options = fillOptionsWithDefaults(options);\n return createDatabase(channelName).then(function(db) {\n var state = {\n closed: false,\n lastCursorId: 0,\n channelName,\n options,\n uuid: randomToken(),\n /**\n * emittedMessagesIds\n * contains all messages that have been emitted before\n * @type {ObliviousSet}\n */\n eMIs: new ObliviousSet(options.idb.ttl * 2),\n // ensures we do not read messages in parallel\n writeBlockPromise: PROMISE_RESOLVED_VOID,\n messagesCallback: null,\n readQueuePromises: [],\n db\n };\n db.onclose = function() {\n state.closed = true;\n if (options.idb.onclose)\n options.idb.onclose();\n };\n _readLoop(state);\n return state;\n });\n}\nfunction _readLoop(state) {\n if (state.closed)\n return;\n readNewMessages(state).then(function() {\n return sleep(state.options.idb.fallbackInterval);\n }).then(function() {\n return _readLoop(state);\n });\n}\nfunction _filterMessage(msgObj, state) {\n if (msgObj.uuid === state.uuid)\n return false;\n if (state.eMIs.has(msgObj.id))\n return false;\n if (msgObj.data.time < state.messagesCallbackTime)\n return false;\n return true;\n}\nfunction readNewMessages(state) {\n if (state.closed)\n return PROMISE_RESOLVED_VOID;\n if (!state.messagesCallback)\n return PROMISE_RESOLVED_VOID;\n return getMessagesHigherThan(state.db, state.lastCursorId).then(function(newerMessages) {\n var useMessages = newerMessages.filter(function(msgObj) {\n return !!msgObj;\n }).map(function(msgObj) {\n if (msgObj.id > state.lastCursorId) {\n state.lastCursorId = msgObj.id;\n }\n return msgObj;\n }).filter(function(msgObj) {\n return _filterMessage(msgObj, state);\n }).sort(function(msgObjA, msgObjB) {\n return msgObjA.time - msgObjB.time;\n });\n useMessages.forEach(function(msgObj) {\n if (state.messagesCallback) {\n state.eMIs.add(msgObj.id);\n state.messagesCallback(msgObj.data);\n }\n });\n return PROMISE_RESOLVED_VOID;\n });\n}\nfunction close$2(channelState) {\n channelState.closed = true;\n channelState.db.close();\n}\nfunction postMessage$2(channelState, messageJson) {\n channelState.writeBlockPromise = channelState.writeBlockPromise.then(function() {\n return writeMessage(channelState.db, channelState.uuid, messageJson);\n }).then(function() {\n if (randomInt(0, 10) === 0) {\n cleanOldMessages(channelState);\n }\n });\n return channelState.writeBlockPromise;\n}\nfunction onMessage$2(channelState, fn, time) {\n channelState.messagesCallbackTime = time;\n channelState.messagesCallback = fn;\n readNewMessages(channelState);\n}\nfunction canBeUsed$2() {\n return !!getIdb();\n}\nfunction averageResponseTime$2(options) {\n return options.idb.fallbackInterval * 2;\n}\nvar IndexedDBMethod = {\n create: create$2,\n close: close$2,\n onMessage: onMessage$2,\n postMessage: postMessage$2,\n canBeUsed: canBeUsed$2,\n type: type$2,\n averageResponseTime: averageResponseTime$2,\n microSeconds: microSeconds$2\n};\nvar microSeconds$1 = microSeconds$4;\nvar KEY_PREFIX = \"pubkey.broadcastChannel-\";\nvar type$1 = \"localstorage\";\nfunction getLocalStorage() {\n var localStorage2;\n if (typeof window === \"undefined\")\n return null;\n try {\n localStorage2 = window.localStorage;\n localStorage2 = window[\"ie8-eventlistener/storage\"] || window.localStorage;\n } catch (e) {\n }\n return localStorage2;\n}\nfunction storageKey(channelName) {\n return KEY_PREFIX + channelName;\n}\nfunction postMessage$1(channelState, messageJson) {\n return new Promise(function(res) {\n sleep().then(function() {\n var key = storageKey(channelState.channelName);\n var writeObj = {\n token: randomToken(),\n time: (/* @__PURE__ */ new Date()).getTime(),\n data: messageJson,\n uuid: channelState.uuid\n };\n var value = JSON.stringify(writeObj);\n getLocalStorage().setItem(key, value);\n var ev = document.createEvent(\"Event\");\n ev.initEvent(\"storage\", true, true);\n ev.key = key;\n ev.newValue = value;\n window.dispatchEvent(ev);\n res();\n });\n });\n}\nfunction addStorageEventListener(channelName, fn) {\n var key = storageKey(channelName);\n var listener = function listener2(ev) {\n if (ev.key === key) {\n fn(JSON.parse(ev.newValue));\n }\n };\n window.addEventListener(\"storage\", listener);\n return listener;\n}\nfunction removeStorageEventListener(listener) {\n window.removeEventListener(\"storage\", listener);\n}\nfunction create$1(channelName, options) {\n options = fillOptionsWithDefaults(options);\n if (!canBeUsed$1()) {\n throw new Error(\"BroadcastChannel: localstorage cannot be used\");\n }\n var uuid = randomToken();\n var eMIs = new ObliviousSet(options.localstorage.removeTimeout);\n var state = {\n channelName,\n uuid,\n eMIs\n // emittedMessagesIds\n };\n state.listener = addStorageEventListener(channelName, function(msgObj) {\n if (!state.messagesCallback)\n return;\n if (msgObj.uuid === uuid)\n return;\n if (!msgObj.token || eMIs.has(msgObj.token))\n return;\n if (msgObj.data.time && msgObj.data.time < state.messagesCallbackTime)\n return;\n eMIs.add(msgObj.token);\n state.messagesCallback(msgObj.data);\n });\n return state;\n}\nfunction close$1(channelState) {\n removeStorageEventListener(channelState.listener);\n}\nfunction onMessage$1(channelState, fn, time) {\n channelState.messagesCallbackTime = time;\n channelState.messagesCallback = fn;\n}\nfunction canBeUsed$1() {\n var ls = getLocalStorage();\n if (!ls)\n return false;\n try {\n var key = \"__broadcastchannel_check\";\n ls.setItem(key, \"works\");\n ls.removeItem(key);\n } catch (e) {\n return false;\n }\n return true;\n}\nfunction averageResponseTime$1() {\n var defaultTime = 120;\n var userAgent = navigator.userAgent.toLowerCase();\n if (userAgent.includes(\"safari\") && !userAgent.includes(\"chrome\")) {\n return defaultTime * 2;\n }\n return defaultTime;\n}\nvar LocalstorageMethod = {\n create: create$1,\n close: close$1,\n onMessage: onMessage$1,\n postMessage: postMessage$1,\n canBeUsed: canBeUsed$1,\n type: type$1,\n averageResponseTime: averageResponseTime$1,\n microSeconds: microSeconds$1\n};\nvar microSeconds = microSeconds$4;\nvar type = \"simulate\";\nvar SIMULATE_CHANNELS = /* @__PURE__ */ new Set();\nfunction create(channelName) {\n var state = {\n name: channelName,\n messagesCallback: null\n };\n SIMULATE_CHANNELS.add(state);\n return state;\n}\nfunction close(channelState) {\n SIMULATE_CHANNELS[\"delete\"](channelState);\n}\nfunction postMessage(channelState, messageJson) {\n return new Promise(function(res) {\n return setTimeout(function() {\n var channelArray = Array.from(SIMULATE_CHANNELS);\n channelArray.filter(function(channel) {\n return channel.name === channelState.name;\n }).filter(function(channel) {\n return channel !== channelState;\n }).filter(function(channel) {\n return !!channel.messagesCallback;\n }).forEach(function(channel) {\n return channel.messagesCallback(messageJson);\n });\n res();\n }, 5);\n });\n}\nfunction onMessage(channelState, fn) {\n channelState.messagesCallback = fn;\n}\nfunction canBeUsed() {\n return true;\n}\nfunction averageResponseTime() {\n return 5;\n}\nvar SimulateMethod = {\n create,\n close,\n onMessage,\n postMessage,\n canBeUsed,\n type,\n averageResponseTime,\n microSeconds\n};\nvar METHODS = [\n NativeMethod,\n // fastest\n IndexedDBMethod,\n LocalstorageMethod\n];\nfunction chooseMethod(options) {\n var chooseMethods = [].concat(options.methods, METHODS).filter(Boolean);\n if (options.type) {\n if (options.type === \"simulate\") {\n return SimulateMethod;\n }\n var ret = chooseMethods.find(function(m2) {\n return m2.type === options.type;\n });\n if (!ret)\n throw new Error(\"method-type \" + options.type + \" not found\");\n else\n return ret;\n }\n if (!options.webWorkerSupport) {\n chooseMethods = chooseMethods.filter(function(m2) {\n return m2.type !== \"idb\";\n });\n }\n var useMethod = chooseMethods.find(function(method) {\n return method.canBeUsed();\n });\n if (!useMethod)\n throw new Error(\"No usable method found in \" + JSON.stringify(METHODS.map(function(m2) {\n return m2.type;\n })));\n else\n return useMethod;\n}\nvar OPEN_BROADCAST_CHANNELS = /* @__PURE__ */ new Set();\nvar lastId = 0;\nvar BroadcastChannel$1 = function BroadcastChannel2(name, options) {\n this.id = lastId++;\n OPEN_BROADCAST_CHANNELS.add(this);\n this.name = name;\n if (ENFORCED_OPTIONS) {\n options = ENFORCED_OPTIONS;\n }\n this.options = fillOptionsWithDefaults(options);\n this.method = chooseMethod(this.options);\n this._iL = false;\n this._onML = null;\n this._addEL = {\n message: [],\n internal: []\n };\n this._uMP = /* @__PURE__ */ new Set();\n this._befC = [];\n this._prepP = null;\n _prepareChannel(this);\n};\nBroadcastChannel$1._pubkey = true;\nvar ENFORCED_OPTIONS;\nBroadcastChannel$1.prototype = {\n postMessage: function postMessage2(msg) {\n if (this.closed) {\n throw new Error(\"BroadcastChannel.postMessage(): Cannot post message after channel has closed \" + /**\n * In the past when this error appeared, it was really hard to debug.\n * So now we log the msg together with the error so it at least\n * gives some clue about where in your application this happens.\n */\n JSON.stringify(msg));\n }\n return _post(this, \"message\", msg);\n },\n postInternal: function postInternal(msg) {\n return _post(this, \"internal\", msg);\n },\n set onmessage(fn) {\n var time = this.method.microSeconds();\n var listenObj = {\n time,\n fn\n };\n _removeListenerObject(this, \"message\", this._onML);\n if (fn && typeof fn === \"function\") {\n this._onML = listenObj;\n _addListenerObject(this, \"message\", listenObj);\n } else {\n this._onML = null;\n }\n },\n addEventListener: function addEventListener(type2, fn) {\n var time = this.method.microSeconds();\n var listenObj = {\n time,\n fn\n };\n _addListenerObject(this, type2, listenObj);\n },\n removeEventListener: function removeEventListener(type2, fn) {\n var obj = this._addEL[type2].find(function(obj2) {\n return obj2.fn === fn;\n });\n _removeListenerObject(this, type2, obj);\n },\n close: function close2() {\n var _this = this;\n if (this.closed) {\n return;\n }\n OPEN_BROADCAST_CHANNELS[\"delete\"](this);\n this.closed = true;\n var awaitPrepare = this._prepP ? this._prepP : PROMISE_RESOLVED_VOID;\n this._onML = null;\n this._addEL.message = [];\n return awaitPrepare.then(function() {\n return Promise.all(Array.from(_this._uMP));\n }).then(function() {\n return Promise.all(_this._befC.map(function(fn) {\n return fn();\n }));\n }).then(function() {\n return _this.method.close(_this._state);\n });\n },\n get type() {\n return this.method.type;\n },\n get isClosed() {\n return this.closed;\n }\n};\nfunction _post(broadcastChannel, type2, msg) {\n var time = broadcastChannel.method.microSeconds();\n var msgObj = {\n time,\n type: type2,\n data: msg\n };\n var awaitPrepare = broadcastChannel._prepP ? broadcastChannel._prepP : PROMISE_RESOLVED_VOID;\n return awaitPrepare.then(function() {\n var sendPromise = broadcastChannel.method.postMessage(broadcastChannel._state, msgObj);\n broadcastChannel._uMP.add(sendPromise);\n sendPromise[\"catch\"]().then(function() {\n return broadcastChannel._uMP[\"delete\"](sendPromise);\n });\n return sendPromise;\n });\n}\nfunction _prepareChannel(channel) {\n var maybePromise = channel.method.create(channel.name, channel.options);\n if (isPromise(maybePromise)) {\n channel._prepP = maybePromise;\n maybePromise.then(function(s) {\n channel._state = s;\n });\n } else {\n channel._state = maybePromise;\n }\n}\nfunction _hasMessageListeners(channel) {\n if (channel._addEL.message.length > 0)\n return true;\n if (channel._addEL.internal.length > 0)\n return true;\n return false;\n}\nfunction _addListenerObject(channel, type2, obj) {\n channel._addEL[type2].push(obj);\n _startListening(channel);\n}\nfunction _removeListenerObject(channel, type2, obj) {\n channel._addEL[type2] = channel._addEL[type2].filter(function(o) {\n return o !== obj;\n });\n _stopListening(channel);\n}\nfunction _startListening(channel) {\n if (!channel._iL && _hasMessageListeners(channel)) {\n var listenerFn = function listenerFn2(msgObj) {\n channel._addEL[msgObj.type].forEach(function(listenerObject) {\n var hundredMsInMicro = 100 * 1e3;\n var minMessageTime = listenerObject.time - hundredMsInMicro;\n if (msgObj.time >= minMessageTime) {\n listenerObject.fn(msgObj.data);\n }\n });\n };\n var time = channel.method.microSeconds();\n if (channel._prepP) {\n channel._prepP.then(function() {\n channel._iL = true;\n channel.method.onMessage(channel._state, listenerFn, time);\n });\n } else {\n channel._iL = true;\n channel.method.onMessage(channel._state, listenerFn, time);\n }\n }\n}\nfunction _stopListening(channel) {\n if (channel._iL && !_hasMessageListeners(channel)) {\n channel._iL = false;\n var time = channel.method.microSeconds();\n channel.method.onMessage(channel._state, null, time);\n }\n}\nconst escaped = {\n \"<\": \"\\\\u003C\",\n \">\": \"\\\\u003E\",\n \"/\": \"\\\\u002F\",\n \"\\\\\": \"\\\\\\\\\",\n \"\\b\": \"\\\\b\",\n \"\\f\": \"\\\\f\",\n \"\\n\": \"\\\\n\",\n \"\\r\": \"\\\\r\",\n \"\t\": \"\\\\t\",\n \"\\0\": \"\\\\u0000\",\n \"\\u2028\": \"\\\\u2028\",\n \"\\u2029\": \"\\\\u2029\"\n};\nclass DevalueError extends Error {\n /**\n * @param {string} message\n * @param {string[]} keys\n */\n constructor(message, keys) {\n super(message);\n this.name = \"DevalueError\";\n this.path = keys.join(\"\");\n }\n}\nfunction is_primitive(thing) {\n return Object(thing) !== thing;\n}\nconst object_proto_names = Object.getOwnPropertyNames(Object.prototype).sort().join(\"\\0\");\nfunction is_plain_object(thing) {\n const proto = Object.getPrototypeOf(thing);\n return proto === Object.prototype || proto === null || Object.getOwnPropertyNames(proto).sort().join(\"\\0\") === object_proto_names;\n}\nfunction get_type(thing) {\n return Object.prototype.toString.call(thing).slice(8, -1);\n}\nfunction stringify_string(str) {\n let result = '\"';\n for (let i = 0; i < str.length; i += 1) {\n const char = str.charAt(i);\n const code = char.charCodeAt(0);\n if (char === '\"') {\n result += '\\\\\"';\n } else if (char in escaped) {\n result += escaped[char];\n } else if (code <= 31) {\n result += `\\\\u${code.toString(16).toUpperCase().padStart(4, \"0\")}`;\n } else if (code >= 55296 && code <= 57343) {\n const next = str.charCodeAt(i + 1);\n if (code <= 56319 && next >= 56320 && next <= 57343) {\n result += char + str[++i];\n } else {\n result += `\\\\u${code.toString(16).toUpperCase()}`;\n }\n } else {\n result += char;\n }\n }\n result += '\"';\n return result;\n}\nconst UNDEFINED = -1;\nconst HOLE = -2;\nconst NAN = -3;\nconst POSITIVE_INFINITY = -4;\nconst NEGATIVE_INFINITY = -5;\nconst NEGATIVE_ZERO = -6;\nfunction parse(serialized, revivers) {\n return unflatten(JSON.parse(serialized), revivers);\n}\nfunction unflatten(parsed, revivers) {\n if (typeof parsed === \"number\")\n return hydrate(parsed, true);\n if (!Array.isArray(parsed) || parsed.length === 0) {\n throw new Error(\"Invalid input\");\n }\n const values = (\n /** @type {any[]} */\n parsed\n );\n const hydrated = Array(values.length);\n function hydrate(index2, standalone = false) {\n if (index2 === UNDEFINED)\n return void 0;\n if (index2 === NAN)\n return NaN;\n if (index2 === POSITIVE_INFINITY)\n return Infinity;\n if (index2 === NEGATIVE_INFINITY)\n return -Infinity;\n if (index2 === NEGATIVE_ZERO)\n return -0;\n if (standalone)\n throw new Error(`Invalid input`);\n if (index2 in hydrated)\n return hydrated[index2];\n const value = values[index2];\n if (!value || typeof value !== \"object\") {\n hydrated[index2] = value;\n } else if (Array.isArray(value)) {\n if (typeof value[0] === \"string\") {\n const type2 = value[0];\n const reviver = revivers == null ? void 0 : revivers[type2];\n if (reviver) {\n return hydrated[index2] = reviver(hydrate(value[1]));\n }\n switch (type2) {\n case \"Date\":\n hydrated[index2] = new Date(value[1]);\n break;\n case \"Set\":\n const set2 = /* @__PURE__ */ new Set();\n hydrated[index2] = set2;\n for (let i = 1; i < value.length; i += 1) {\n set2.add(hydrate(value[i]));\n }\n break;\n case \"Map\":\n const map = /* @__PURE__ */ new Map();\n hydrated[index2] = map;\n for (let i = 1; i < value.length; i += 2) {\n map.set(hydrate(value[i]), hydrate(value[i + 1]));\n }\n break;\n case \"RegExp\":\n hydrated[index2] = new RegExp(value[1], value[2]);\n break;\n case \"Object\":\n hydrated[index2] = Object(value[1]);\n break;\n case \"BigInt\":\n hydrated[index2] = BigInt(value[1]);\n break;\n case \"null\":\n const obj = /* @__PURE__ */ Object.create(null);\n hydrated[index2] = obj;\n for (let i = 1; i < value.length; i += 2) {\n obj[value[i]] = hydrate(value[i + 1]);\n }\n break;\n default:\n throw new Error(`Unknown type ${type2}`);\n }\n } else {\n const array = new Array(value.length);\n hydrated[index2] = array;\n for (let i = 0; i < value.length; i += 1) {\n const n = value[i];\n if (n === HOLE)\n continue;\n array[i] = hydrate(n);\n }\n }\n } else {\n const object = {};\n hydrated[index2] = object;\n for (const key in value) {\n const n = value[key];\n object[key] = hydrate(n);\n }\n }\n return hydrated[index2];\n }\n return hydrate(0);\n}\nfunction stringify(value, reducers) {\n const stringified = [];\n const indexes = /* @__PURE__ */ new Map();\n const custom = [];\n for (const key in reducers) {\n custom.push({ key, fn: reducers[key] });\n }\n const keys = [];\n let p = 0;\n function flatten(thing) {\n if (typeof thing === \"function\") {\n throw new DevalueError(`Cannot stringify a function`, keys);\n }\n if (indexes.has(thing))\n return indexes.get(thing);\n if (thing === void 0)\n return UNDEFINED;\n if (Number.isNaN(thing))\n return NAN;\n if (thing === Infinity)\n return POSITIVE_INFINITY;\n if (thing === -Infinity)\n return NEGATIVE_INFINITY;\n if (thing === 0 && 1 / thing < 0)\n return NEGATIVE_ZERO;\n const index3 = p++;\n indexes.set(thing, index3);\n for (const { key, fn } of custom) {\n const value2 = fn(thing);\n if (value2) {\n stringified[index3] = `[\"${key}\",${flatten(value2)}]`;\n return index3;\n }\n }\n let str = \"\";\n if (is_primitive(thing)) {\n str = stringify_primitive(thing);\n } else {\n const type2 = get_type(thing);\n switch (type2) {\n case \"Number\":\n case \"String\":\n case \"Boolean\":\n str = `[\"Object\",${stringify_primitive(thing)}]`;\n break;\n case \"BigInt\":\n str = `[\"BigInt\",${thing}]`;\n break;\n case \"Date\":\n str = `[\"Date\",\"${thing.toISOString()}\"]`;\n break;\n case \"RegExp\":\n const { source, flags } = thing;\n str = flags ? `[\"RegExp\",${stringify_string(source)},\"${flags}\"]` : `[\"RegExp\",${stringify_string(source)}]`;\n break;\n case \"Array\":\n str = \"[\";\n for (let i = 0; i < thing.length; i += 1) {\n if (i > 0)\n str += \",\";\n if (i in thing) {\n keys.push(`[${i}]`);\n str += flatten(thing[i]);\n keys.pop();\n } else {\n str += HOLE;\n }\n }\n str += \"]\";\n break;\n case \"Set\":\n str = '[\"Set\"';\n for (const value2 of thing) {\n str += `,${flatten(value2)}`;\n }\n str += \"]\";\n break;\n case \"Map\":\n str = '[\"Map\"';\n for (const [key, value2] of thing) {\n keys.push(\n `.get(${is_primitive(key) ? stringify_primitive(key) : \"...\"})`\n );\n str += `,${flatten(key)},${flatten(value2)}`;\n }\n str += \"]\";\n break;\n default:\n if (!is_plain_object(thing)) {\n throw new DevalueError(\n `Cannot stringify arbitrary non-POJOs`,\n keys\n );\n }\n if (Object.getOwnPropertySymbols(thing).length > 0) {\n throw new DevalueError(\n `Cannot stringify POJOs with symbolic keys`,\n keys\n );\n }\n if (Object.getPrototypeOf(thing) === null) {\n str = '[\"null\"';\n for (const key in thing) {\n keys.push(`.${key}`);\n str += `,${stringify_string(key)},${flatten(thing[key])}`;\n keys.pop();\n }\n str += \"]\";\n } else {\n str = \"{\";\n let started = false;\n for (const key in thing) {\n if (started)\n str += \",\";\n started = true;\n keys.push(`.${key}`);\n str += `${stringify_string(key)}:${flatten(thing[key])}`;\n keys.pop();\n }\n str += \"}\";\n }\n }\n }\n stringified[index3] = str;\n return index3;\n }\n const index2 = flatten(value);\n if (index2 < 0)\n return `${index2}`;\n return `[${stringified.join(\",\")}]`;\n}\nfunction stringify_primitive(thing) {\n const type2 = typeof thing;\n if (type2 === \"string\")\n return stringify_string(thing);\n if (thing instanceof String)\n return stringify_string(thing.toString());\n if (thing === void 0)\n return UNDEFINED.toString();\n if (thing === 0 && 1 / thing < 0)\n return NEGATIVE_ZERO.toString();\n if (type2 === \"bigint\")\n return `[\"BigInt\",\"${thing}\"]`;\n return String(thing);\n}\nfunction m(t, a, { initialize: d, type: r }) {\n let o = `${a.$id}-${t.toString()}`, n = new BroadcastChannel$1(o, { type: r }), l = false, e = 0;\n watch(() => a[t], (i) => {\n l || (e = Date.now(), n.postMessage({ timestamp: e, state: parse(stringify(i)) })), l = false;\n }, { deep: true }), n.onmessage = (i) => {\n if (i === void 0) {\n n.postMessage({ timestamp: e, state: parse(stringify(a[t])) });\n return;\n }\n i.timestamp <= e || (l = true, e = i.timestamp, a[t] = i.state);\n };\n let u = () => n.postMessage(void 0), p = () => n.close();\n return d && u(), { sync: u, unshare: p };\n}\nvar h = (t, a) => Object.keys(a).includes(t), g = ({ initialize: t = true, enable: a = true, type: d }) => ({ store: r, options: o }) => {\n var _a, _b;\n let n = ((_a = o == null ? void 0 : o.share) == null ? void 0 : _a.enable) ?? a, l = ((_b = o == null ? void 0 : o.share) == null ? void 0 : _b.omit) ?? [];\n !n || Object.keys(r.$state).forEach((e) => {\n var _a2;\n l.includes(e) || !h(e, r.$state) || m(e, r, { initialize: ((_a2 = o == null ? void 0 : o.share) == null ? void 0 : _a2.initialize) ?? t, type: d });\n });\n};\nconst pinia = createPinia();\npinia.use(\n g({\n enable: true,\n initialize: true\n })\n);\nconst index = {\n install: (app, options) => {\n const appRouter = (options == null ? void 0 : options.router) || router;\n app.use(appRouter);\n app.use(pinia);\n app.provide(\"$registry\", new Registry(appRouter, options == null ? void 0 : options.doctypeLoader));\n if (options == null ? void 0 : options.components) {\n for (const [tag, component] of Object.entries(options.components)) {\n app.component(tag, component);\n }\n }\n }\n};\nexport {\n DoctypeMeta,\n Registry,\n index as Stonecrop,\n useStonecrop\n};\n","\n\n\n","import { onMounted as ye, onBeforeUnmount as Ie, ref as E, watch as j, unref as s, getCurrentScope as _e, onScopeDispose as Ee, defineComponent as k, inject as O, computed as S, openBlock as p, createElementBlock as w, createBlock as P, resolveDynamicComponent as ie, mergeProps as V, toDisplayString as $, Fragment as L, createElementVNode as T, renderSlot as x, createCommentVNode as M, useCssVars as de, withDirectives as ce, vShow as ue, reactive as A, renderList as N, normalizeStyle as H, createTextVNode as ke, provide as Ce, nextTick as Ae, createVNode as z, withCtx as G } from \"vue\";\nvar J;\nconst pe = typeof window < \"u\", Te = (t) => typeof t == \"string\", $e = () => {\n};\npe && (J = window == null ? void 0 : window.navigator) != null && J.userAgent && /iP(ad|hone|od)/.test(window.navigator.userAgent);\nfunction fe(t) {\n return typeof t == \"function\" ? t() : s(t);\n}\nfunction Oe(t) {\n return t;\n}\nfunction De(t) {\n return _e() ? (Ee(t), !0) : !1;\n}\nfunction U(t) {\n var e;\n const n = fe(t);\n return (e = n == null ? void 0 : n.$el) != null ? e : n;\n}\nconst me = pe ? window : void 0;\nfunction Re(...t) {\n let e, n, o, l;\n if (Te(t[0]) || Array.isArray(t[0]) ? ([n, o, l] = t, e = me) : [e, n, o, l] = t, !e)\n return $e;\n Array.isArray(n) || (n = [n]), Array.isArray(o) || (o = [o]);\n const a = [], r = () => {\n a.forEach((d) => d()), a.length = 0;\n }, i = (d, h, v, m) => (d.addEventListener(h, v, m), () => d.removeEventListener(h, v, m)), c = j(() => [U(e), fe(l)], ([d, h]) => {\n r(), d && a.push(...n.flatMap((v) => o.map((m) => i(d, v, m, h))));\n }, { immediate: !0, flush: \"post\" }), u = () => {\n c(), r();\n };\n return De(u), u;\n}\nconst X = typeof globalThis < \"u\" ? globalThis : typeof window < \"u\" ? window : typeof global < \"u\" ? global : typeof self < \"u\" ? self : {}, Y = \"__vueuse_ssr_handlers__\";\nX[Y] = X[Y] || {};\nfunction Se(t, { window: e = me, scrollTarget: n } = {}) {\n const o = E(!1), l = () => {\n if (!e)\n return;\n const a = e.document, r = U(t);\n if (!r)\n o.value = !1;\n else {\n const i = r.getBoundingClientRect();\n o.value = i.top <= (e.innerHeight || a.documentElement.clientHeight) && i.left <= (e.innerWidth || a.documentElement.clientWidth) && i.bottom >= 0 && i.right >= 0;\n }\n };\n return j(() => U(t), () => l(), { immediate: !0, flush: \"post\" }), e && Re(n || e, \"scroll\", l, {\n capture: !1,\n passive: !0\n }), o;\n}\nvar Z;\n(function(t) {\n t.UP = \"UP\", t.RIGHT = \"RIGHT\", t.DOWN = \"DOWN\", t.LEFT = \"LEFT\", t.NONE = \"NONE\";\n})(Z || (Z = {}));\nvar Pe = Object.defineProperty, K = Object.getOwnPropertySymbols, He = Object.prototype.hasOwnProperty, Le = Object.prototype.propertyIsEnumerable, ee = (t, e, n) => e in t ? Pe(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, Me = (t, e) => {\n for (var n in e || (e = {}))\n He.call(e, n) && ee(t, n, e[n]);\n if (K)\n for (var n of K(e))\n Le.call(e, n) && ee(t, n, e[n]);\n return t;\n};\nconst Ne = {\n easeInSine: [0.12, 0, 0.39, 0],\n easeOutSine: [0.61, 1, 0.88, 1],\n easeInOutSine: [0.37, 0, 0.63, 1],\n easeInQuad: [0.11, 0, 0.5, 0],\n easeOutQuad: [0.5, 1, 0.89, 1],\n easeInOutQuad: [0.45, 0, 0.55, 1],\n easeInCubic: [0.32, 0, 0.67, 0],\n easeOutCubic: [0.33, 1, 0.68, 1],\n easeInOutCubic: [0.65, 0, 0.35, 1],\n easeInQuart: [0.5, 0, 0.75, 0],\n easeOutQuart: [0.25, 1, 0.5, 1],\n easeInOutQuart: [0.76, 0, 0.24, 1],\n easeInQuint: [0.64, 0, 0.78, 0],\n easeOutQuint: [0.22, 1, 0.36, 1],\n easeInOutQuint: [0.83, 0, 0.17, 1],\n easeInExpo: [0.7, 0, 0.84, 0],\n easeOutExpo: [0.16, 1, 0.3, 1],\n easeInOutExpo: [0.87, 0, 0.13, 1],\n easeInCirc: [0.55, 0, 1, 0.45],\n easeOutCirc: [0, 0.55, 0.45, 1],\n easeInOutCirc: [0.85, 0, 0.15, 1],\n easeInBack: [0.36, 0, 0.66, -0.56],\n easeOutBack: [0.34, 1.56, 0.64, 1],\n easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\nMe({\n linear: Oe\n}, Ne);\nconst y = (t) => {\n let e = Se(t).value;\n return e = e && t.offsetHeight > 0, e;\n}, I = (t) => t.tabIndex >= 0, te = (t) => {\n const e = t.target;\n return W(e);\n}, W = (t) => {\n var e;\n let n;\n if (t instanceof HTMLTableCellElement) {\n const o = (e = t.parentElement) == null ? void 0 : e.previousElementSibling;\n if (o) {\n const l = Array.from(o.children)[t.cellIndex];\n l && (n = l);\n }\n } else if (t instanceof HTMLTableRowElement) {\n const o = t.previousElementSibling;\n o && (n = o);\n }\n return n && (!I(n) || !y(n)) ? W(n) : n;\n}, Ue = (t) => {\n var e;\n const n = t.target;\n let o;\n if (n instanceof HTMLTableCellElement) {\n const l = (e = n.parentElement) == null ? void 0 : e.parentElement;\n if (l) {\n const a = l.firstElementChild.children[n.cellIndex];\n a && (o = a);\n }\n } else if (n instanceof HTMLTableRowElement) {\n const l = n.parentElement;\n if (l) {\n const a = l.firstElementChild;\n a && (o = a);\n }\n }\n return o && (!I(o) || !y(o)) ? B(o) : o;\n}, ne = (t) => {\n const e = t.target;\n return B(e);\n}, B = (t) => {\n var e;\n let n;\n if (t instanceof HTMLTableCellElement) {\n const o = (e = t.parentElement) == null ? void 0 : e.nextElementSibling;\n if (o) {\n const l = Array.from(o.children)[t.cellIndex];\n l && (n = l);\n }\n } else if (t instanceof HTMLTableRowElement) {\n const o = t.nextElementSibling;\n o && (n = o);\n }\n return n && (!I(n) || !y(n)) ? B(n) : n;\n}, je = (t) => {\n var e;\n const n = t.target;\n let o;\n if (n instanceof HTMLTableCellElement) {\n const l = (e = n.parentElement) == null ? void 0 : e.parentElement;\n if (l) {\n const a = l.lastElementChild.children[n.cellIndex];\n a && (o = a);\n }\n } else if (n instanceof HTMLTableRowElement) {\n const l = n.parentElement;\n if (l) {\n const a = l.lastElementChild;\n a && (o = a);\n }\n }\n return o && (!I(o) || !y(o)) ? W(o) : o;\n}, oe = (t) => {\n const e = t.target;\n return Q(e);\n}, Q = (t) => {\n var e;\n let n;\n if (t.previousElementSibling)\n n = t.previousElementSibling;\n else {\n const o = (e = t.parentElement) == null ? void 0 : e.previousElementSibling;\n n = o == null ? void 0 : o.lastElementChild;\n }\n return n && (!I(n) || !y(n)) ? Q(n) : n;\n}, le = (t) => {\n const e = t.target;\n return F(e);\n}, F = (t) => {\n var e;\n let n;\n if (t.nextElementSibling)\n n = t.nextElementSibling;\n else {\n const o = (e = t.parentElement) == null ? void 0 : e.nextElementSibling;\n n = o == null ? void 0 : o.firstElementChild;\n }\n return n && (!I(n) || !y(n)) ? F(n) : n;\n}, ae = (t) => {\n const e = t.target.parentElement.firstElementChild;\n return e && (!I(e) || !y(e)) ? F(e) : e;\n}, re = (t) => {\n const e = t.target.parentElement.lastElementChild;\n return e && (!I(e) || !y(e)) ? Q(e) : e;\n}, D = [\"alt\", \"control\", \"shift\", \"meta\"], Ve = {\n ArrowUp: \"up\",\n ArrowDown: \"down\",\n ArrowLeft: \"left\",\n ArrowRight: \"right\"\n}, we = {\n \"keydown.up\": (t) => {\n const e = te(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.down\": (t) => {\n const e = ne(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.left\": (t) => {\n const e = oe(t);\n t.preventDefault(), t.stopPropagation(), e && e.focus();\n },\n \"keydown.right\": (t) => {\n const e = le(t);\n t.preventDefault(), t.stopPropagation(), e && e.focus();\n },\n \"keydown.control.up\": (t) => {\n const e = Ue(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.control.down\": (t) => {\n const e = je(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.control.left\": (t) => {\n const e = ae(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.control.right\": (t) => {\n const e = re(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.end\": (t) => {\n const e = re(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.enter\": (t) => {\n if (t.target instanceof HTMLTableCellElement) {\n t.preventDefault(), t.stopPropagation();\n const e = ne(t);\n e && e.focus();\n }\n },\n \"keydown.shift.enter\": (t) => {\n if (t.target instanceof HTMLTableCellElement) {\n t.preventDefault(), t.stopPropagation();\n const e = te(t);\n e && e.focus();\n }\n },\n \"keydown.home\": (t) => {\n const e = ae(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.tab\": (t) => {\n const e = le(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n },\n \"keydown.shift.tab\": (t) => {\n const e = oe(t);\n e && (t.preventDefault(), t.stopPropagation(), e.focus());\n }\n};\nfunction q(t) {\n const e = (o) => {\n let l = null;\n o.parent && (typeof o.parent == \"string\" ? l = document.querySelector(o.parent) : o.parent instanceof Element ? l = o.parent : l = o.parent.value);\n let a = [];\n if (o.selectors)\n if (typeof o.selectors == \"string\")\n a = l ? Array.from(l.querySelectorAll(o.selectors)) : Array.from(document.querySelectorAll(o.selectors));\n else if (o.selectors instanceof Element)\n a.push(o.selectors);\n else if (Array.isArray(o.selectors.value))\n for (const r of o.selectors.value)\n r instanceof Element ? a.push(r) : a.push(r.$el);\n else\n a.push(o.selectors.value);\n else\n a = Array.from(l.children).filter((r) => I(r) && y(r));\n return a;\n }, n = (o) => (l) => {\n const a = Ve[l.key] || l.key.toLowerCase();\n if (D.includes(a))\n return;\n const r = o.handlers || we;\n for (const i of Object.keys(r)) {\n const [c, ...u] = i.split(\".\");\n if (c === \"keydown\" && u.includes(a)) {\n const d = r[i], h = u.filter((m) => D.includes(m)), v = D.some((m) => {\n const _ = m.charAt(0).toUpperCase() + m.slice(1);\n return l.getModifierState(_);\n });\n if (h.length > 0) {\n if (v) {\n for (const m of D)\n if (u.includes(m)) {\n const _ = m.charAt(0).toUpperCase() + m.slice(1);\n l.getModifierState(_) && d(l);\n }\n }\n } else\n v || d(l);\n }\n }\n };\n ye(() => {\n for (const o of t) {\n const l = e(o);\n for (const a of l)\n a.addEventListener(\"keydown\", n(o));\n }\n }), Ie(() => {\n for (const o of t) {\n const l = e(o);\n for (const a of l)\n a.removeEventListener(\"keydown\", n(o));\n }\n });\n}\nconst We = [\"data-colindex\", \"data-rowindex\", \"data-editable\", \"contenteditable\", \"tabindex\"], Be = { key: 1 }, Qe = /* @__PURE__ */ k({\n __name: \"ACell\",\n props: {\n colIndex: null,\n rowIndex: null,\n tableid: null,\n addNavigation: { type: [Boolean, Object], default: !0 },\n tabIndex: { default: 0 },\n clickHandler: null\n },\n setup(t) {\n var _;\n const e = t, n = O(e.tableid), o = E(null);\n let l = E(!1);\n const a = S(() => {\n const b = n.cellData(e.colIndex, e.rowIndex);\n if (n.columns[e.colIndex].format) {\n const g = n.columns[e.colIndex].format;\n return typeof g == \"function\" ? g(b) : typeof g == \"string\" ? Function(`\"use strict\";return (${g})`)()(b) : b;\n } else\n return b;\n }), r = (b) => {\n if (e.clickHandler) {\n e.clickHandler(b);\n return;\n }\n if (n.columns[e.colIndex].mask, n.columns[e.colIndex].modalComponent) {\n const g = o.value.getBoundingClientRect();\n n.modal.visible = !0, n.modal.colIndex = e.colIndex, n.modal.rowIndex = e.rowIndex, n.modal.parent = o.value, n.modal.top = g.top + g.height, n.modal.left = g.left, n.modal.width = c.value, n.modal.component = n.columns[e.colIndex].modalComponent, n.modal.componentProps = n.columns[e.colIndex].modalComponentProps;\n }\n };\n if (e.addNavigation) {\n let b = {\n ...we,\n \"keydown.f2\": r,\n \"keydown.alt.up\": r,\n \"keydown.alt.down\": r,\n \"keydown.alt.left\": r,\n \"keydown.alt.right\": r\n };\n typeof e.addNavigation == \"object\" && (b = {\n ...b,\n ...e.addNavigation\n }), q([\n {\n selectors: o,\n handlers: b\n }\n ]);\n }\n const i = S(() => n.columns[e.colIndex].align || \"center\"), c = S(() => n.columns[e.colIndex].width || \"40ch\");\n let u = \"\";\n const d = () => {\n o.value && (u = o.value.innerText);\n }, h = () => {\n o.value && o.value.innerHTML !== u && (u = o.value.innerText, o.value.dispatchEvent(new Event(\"change\")), l.value = !0, n.columns[e.colIndex].format || n.setCellData(e.rowIndex, e.colIndex, u));\n }, v = (b, g) => g && b === 0 && g > 0 ? `${g}ch` : \"inherit\", m = {\n textAlign: i.value,\n width: c.value,\n backgroundColor: l.value ? \"var(--cell-modified-color)\" : \"inherit\",\n fontWeight: l.value ? \"bold\" : \"inherit\",\n paddingLeft: v(e.colIndex, (_ = n.display[e.rowIndex]) == null ? void 0 : _.indent)\n };\n return (b, g) => (p(), w(\"td\", {\n ref_key: \"cell\",\n ref: o,\n \"data-colindex\": t.colIndex,\n \"data-rowindex\": t.rowIndex,\n \"data-editable\": s(n).columns[t.colIndex].edit,\n contenteditable: s(n).columns[t.colIndex].edit,\n tabindex: t.tabIndex,\n spellcheck: !1,\n style: m,\n onFocus: d,\n onPaste: h,\n onBlur: h,\n onInput: h,\n onClick: r,\n onMousedown: r\n }, [\n s(n).columns[t.colIndex].cellComponent ? (p(), P(ie(s(n).columns[t.colIndex].cellComponent), V({\n key: 0,\n value: s(a)\n }, s(n).columns[t.colIndex].cellComponentProps), null, 16, [\"value\"])) : (p(), w(\"span\", Be, $(s(a)), 1))\n ], 40, We));\n }\n});\nconst C = (t, e) => {\n const n = t.__vccOpts || t;\n for (const [o, l] of e)\n n[o] = l;\n return n;\n}, he = /* @__PURE__ */ C(Qe, [[\"__scopeId\", \"data-v-1738c6fc\"]]), Fe = [\"tabindex\"], qe = [\"tabindex\"], ze = [\"colspan\"], Ge = /* @__PURE__ */ k({\n __name: \"AExpansionRow\",\n props: {\n row: null,\n rowIndex: null,\n tableid: null,\n tabIndex: { default: -1 },\n addNavigation: null\n },\n setup(t) {\n const e = t, n = O(e.tableid), o = E(null), l = E(null), a = () => n.display[e.rowIndex].expanded ? \"▼\" : \"►\";\n if (e.addNavigation !== void 0) {\n const r = Object.assign({}, e.addNavigation);\n r[\"keydown.control.g\"] = (i) => {\n i.stopPropagation(), i.preventDefault(), n.toggleRowExpand(e.rowIndex);\n }, q([\n {\n selectors: o,\n handlers: r\n }\n ]);\n }\n return (r, i) => (p(), w(L, null, [\n T(\"tr\", V(r.$attrs, {\n ref_key: \"rowEl\",\n ref: o,\n tabindex: t.tabIndex,\n class: \"expandable-row\"\n }), [\n T(\"td\", {\n tabIndex: -1,\n onClick: i[0] || (i[0] = (c) => s(n).toggleRowExpand(t.rowIndex)),\n class: \"row-index\"\n }, $(a()), 1),\n x(r.$slots, \"row\", {}, void 0, !0)\n ], 16, Fe),\n s(n).display[e.rowIndex].expanded ? (p(), w(\"tr\", {\n key: 0,\n ref_key: \"rowExpanded\",\n ref: l,\n tabindex: t.tabIndex,\n class: \"expanded-row\"\n }, [\n T(\"td\", {\n tabIndex: -1,\n colspan: s(n).columns.length + 1,\n class: \"expanded-row-content\"\n }, [\n x(r.$slots, \"content\", {}, void 0, !0)\n ], 8, ze)\n ], 8, qe)) : M(\"\", !0)\n ], 64));\n }\n});\nconst Je = /* @__PURE__ */ C(Ge, [[\"__scopeId\", \"data-v-2bb821ae\"]]), Xe = [\"tabindex\"], Ye = {\n key: 0,\n tabIndex: -1,\n class: \"list-index\"\n}, Ze = /* @__PURE__ */ k({\n __name: \"ARow\",\n props: {\n row: null,\n rowIndex: null,\n tableid: null,\n tabIndex: { default: -1 },\n addNavigation: null\n },\n setup(t) {\n const e = t;\n de((c) => ({\n \"6b10edcf\": s(l)\n }));\n const n = O(e.tableid), o = E(null), l = n.numberedRowWidth.value, a = () => n.config.view !== \"tree\" ? \"\" : n.display[e.rowIndex].isRoot || n.display[e.rowIndex].isParent ? n.display[e.rowIndex].childrenOpen ? \"-\" : \"+\" : \"\", r = () => n.config.view !== \"tree\" || n.display[e.rowIndex].isRoot || n.display[e.rowIndex].open, i = (c) => {\n n.toggleRowExpand(c);\n };\n return e.addNavigation && q([\n {\n selectors: o,\n handlers: e.addNavigation\n }\n ]), (c, u) => ce((p(), w(\"tr\", {\n ref_key: \"rowEl\",\n ref: o,\n tabindex: t.tabIndex,\n class: \"table-row\"\n }, [\n s(n).config.view === \"list\" ? (p(), w(\"td\", Ye, $(t.rowIndex + 1), 1)) : s(n).config.view === \"tree\" ? (p(), w(\"td\", {\n key: 1,\n tabIndex: -1,\n class: \"tree-index\",\n onClick: u[0] || (u[0] = (d) => i(t.rowIndex))\n }, $(a()), 1)) : x(c.$slots, \"indexCell\", { key: 2 }, void 0, !0),\n x(c.$slots, \"default\", {}, void 0, !0)\n ], 8, Xe)), [\n [ue, r()]\n ]);\n }\n});\nconst be = /* @__PURE__ */ C(Ze, [[\"__scopeId\", \"data-v-c758303d\"]]);\nlet R;\nconst Ke = new Uint8Array(16);\nfunction et() {\n if (!R && (R = typeof crypto < \"u\" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !R))\n throw new Error(\"crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported\");\n return R(Ke);\n}\nconst f = [];\nfor (let t = 0; t < 256; ++t)\n f.push((t + 256).toString(16).slice(1));\nfunction tt(t, e = 0) {\n return (f[t[e + 0]] + f[t[e + 1]] + f[t[e + 2]] + f[t[e + 3]] + \"-\" + f[t[e + 4]] + f[t[e + 5]] + \"-\" + f[t[e + 6]] + f[t[e + 7]] + \"-\" + f[t[e + 8]] + f[t[e + 9]] + \"-\" + f[t[e + 10]] + f[t[e + 11]] + f[t[e + 12]] + f[t[e + 13]] + f[t[e + 14]] + f[t[e + 15]]).toLowerCase();\n}\nconst nt = typeof crypto < \"u\" && crypto.randomUUID && crypto.randomUUID.bind(crypto), se = {\n randomUUID: nt\n};\nfunction ge(t, e, n) {\n if (se.randomUUID && !e && !t)\n return se.randomUUID();\n t = t || {};\n const o = t.random || (t.rng || et)();\n if (o[6] = o[6] & 15 | 64, o[8] = o[8] & 63 | 128, e) {\n n = n || 0;\n for (let l = 0; l < 16; ++l)\n e[n + l] = o[l];\n return e;\n }\n return tt(o);\n}\nclass ot {\n constructor(e, n, o, l, a, r) {\n this.id = e || ge(), this.rows = o, this.columns = A(n), this.config = A(l), this.table = a || A(this.createTableObject()), this.display = this.createDisplayObject(r), this.modal = A({ visible: !1 });\n }\n createTableObject() {\n const e = {};\n for (const [n, o] of this.columns.entries())\n for (const [l, a] of this.rows.entries())\n e[`${n}:${l}`] = a[o.name];\n return e;\n }\n createDisplayObject(e) {\n const n = [Object.assign({}, { modified: !1 })];\n if (e && \"0:0\" in e)\n return e;\n const o = /* @__PURE__ */ new Set();\n for (let l = this.rows.length - 1; l >= 0; l--) {\n const a = this.rows[l];\n a.parent && o.add(a.parent), n[l] = {\n childrenOpen: !1,\n expanded: !1,\n indent: a.indent || null,\n isParent: o.has(l),\n isRoot: a.parent === null || a.parent === void 0,\n modified: !1,\n open: a.parent === null || a.parent === void 0,\n parent: a.parent\n };\n }\n return A(n);\n }\n get zeroColumn() {\n return [\"list\", \"tree\", \"list-expansion\"].includes(this.config.view);\n }\n get numberedRowWidth() {\n return S(() => String(Math.ceil(this.rows.length / 100) + 1) + \"ch\");\n }\n cellData(e, n) {\n return this.table[`${e}:${n}`];\n }\n setCellData(e, n, o) {\n this.table[`${n}:${e}`] !== o && (this.display[e].modified = !0), this.table[`${n}:${e}`] = o;\n const l = this.columns[n];\n return this.rows[e][l.name] = o, this.table[`${n}:${e}`];\n }\n toggleRowExpand(e) {\n if (this.config.view === \"tree\") {\n this.display[e].childrenOpen = !this.display[e].childrenOpen;\n for (let n = this.rows.length - 1; n >= 0; n--)\n this.display[n].parent === e && (this.display[n].open = !this.display[n].open, this.display[n].childrenOpen && this.toggleRowExpand(n));\n } else\n this.config.view === \"list-expansion\" && (this.display[e].expanded = !this.display[e].expanded);\n }\n}\nconst lt = { key: 0 }, at = {\n class: \"atable-header-row\",\n tabindex: \"-1\"\n}, rt = {\n key: 0,\n id: \"header-index\"\n}, st = /* @__PURE__ */ k({\n __name: \"ATableHeader\",\n props: {\n columns: null,\n config: null,\n tableid: null\n },\n setup(t) {\n const e = t;\n de((a) => ({\n \"1cb0fcc9\": s(o)\n }));\n const n = O(e.tableid), o = n.numberedRowWidth.value, l = (a) => ({\n minWidth: a.width || \"40ch\",\n textAlign: a.align || \"center\",\n width: n.config.fullWidth ? \"auto\" : null\n });\n return (a, r) => t.columns.length ? (p(), w(\"thead\", lt, [\n T(\"tr\", at, [\n s(n).zeroColumn ? (p(), w(\"th\", rt)) : M(\"\", !0),\n (p(!0), w(L, null, N(t.columns, (i, c) => (p(), w(\"th\", {\n key: c,\n tabindex: \"-1\",\n style: H(l(i))\n }, [\n x(a.$slots, \"default\", {}, () => [\n ke($(i.label || String.fromCharCode(c + 97).toUpperCase()), 1)\n ], !0)\n ], 4))), 128))\n ])\n ])) : M(\"\", !0);\n }\n});\nconst xe = /* @__PURE__ */ C(st, [[\"__scopeId\", \"data-v-8a8d9cee\"]]), it = /* @__PURE__ */ k({\n __name: \"ATableModal\",\n props: {\n colIndex: null,\n rowIndex: null,\n tableid: null\n },\n setup(t) {\n O(t.tableid);\n const n = (o) => {\n o.stopPropagation();\n };\n return (o, l) => (p(), w(\"div\", {\n ref: \"amodal\",\n class: \"amodal\",\n tabindex: \"-1\",\n onClick: n,\n onInput: n\n }, [\n x(o.$slots, \"default\", {}, void 0, !0)\n ], 544));\n }\n});\nconst ve = /* @__PURE__ */ C(it, [[\"__scopeId\", \"data-v-8ac70767\"]]), dt = /* @__PURE__ */ k({\n __name: \"ATable\",\n props: {\n id: null,\n modelValue: null,\n columns: null,\n rows: { default: () => [] },\n config: { default: () => new Object() },\n tableid: null\n },\n emits: [\"update:modelValue\"],\n setup(t, { emit: e }) {\n const n = t;\n let o = n.modelValue ? n.modelValue : n.rows, l = new ot(n.id, n.columns, o, n.config);\n Ce(l.id, l), j(\n () => l.rows,\n (r, i) => {\n e(\"update:modelValue\", r);\n },\n { deep: !0 }\n );\n const a = (r) => {\n var i;\n (i = l.modal.parent) != null && i.contains(r.target) || l.modal.visible && (l.modal.visible = !1);\n };\n return window.addEventListener(\"click\", a), window.addEventListener(\"keydown\", (r) => {\n if (r.key === \"Escape\" && l.modal.visible) {\n l.modal.visible = !1;\n const i = l.modal.parent;\n i && Ae().then(() => {\n const c = i.dataset.rowindex, u = i.dataset.colindex, d = document.querySelectorAll(`[data-rowindex='${c}'][data-colindex='${u}']`);\n d && d[0].focus();\n });\n }\n }), (r, i) => (p(), w(\"table\", {\n class: \"atable\",\n style: H({ width: s(l).config.fullWidth ? \"100%\" : \"auto\" })\n }, [\n x(r.$slots, \"header\", { data: s(l) }, () => [\n z(xe, {\n columns: s(l).columns,\n config: s(l).config,\n tableid: s(l).id\n }, null, 8, [\"columns\", \"config\", \"tableid\"])\n ], !0),\n T(\"tbody\", null, [\n x(r.$slots, \"body\", { data: s(l) }, () => [\n (p(!0), w(L, null, N(s(l).rows, (c, u) => (p(), P(be, {\n key: c.id || s(ge)(),\n row: c,\n rowIndex: u,\n tableid: s(l).id\n }, {\n default: G(() => [\n (p(!0), w(L, null, N(s(l).columns, (d, h) => (p(), P(he, {\n key: `${h}:${u}`,\n tableid: s(l).id,\n col: d,\n spellcheck: \"false\",\n rowIndex: u,\n colIndex: h + (s(l).zeroColumn ? 0 : -1),\n component: d.cellComponent,\n style: H({\n textAlign: (d == null ? void 0 : d.align) || \"center\",\n minWidth: (d == null ? void 0 : d.width) || \"40ch\",\n width: s(l).config.fullWidth ? \"auto\" : null\n })\n }, null, 8, [\"tableid\", \"col\", \"rowIndex\", \"colIndex\", \"component\", \"style\"]))), 128))\n ]),\n _: 2\n }, 1032, [\"row\", \"rowIndex\", \"tableid\"]))), 128))\n ], !0)\n ]),\n x(r.$slots, \"footer\", { data: s(l) }, void 0, !0),\n x(r.$slots, \"modal\", { data: s(l) }, () => [\n ce(z(ve, {\n colIndex: s(l).modal.colIndex,\n rowIndex: s(l).modal.rowIndex,\n tableid: s(l).id,\n style: H({\n left: s(l).modal.left + \"px\",\n top: s(l).modal.top + \"px\",\n maxWidth: s(l).modal.width + \"px\"\n })\n }, {\n default: G(() => [\n (p(), P(ie(s(l).modal.component), V({\n key: `${s(l).modal.rowIndex}:${s(l).modal.colIndex}`,\n colIndex: s(l).modal.colIndex,\n rowIndex: s(l).modal.rowIndex,\n tableid: s(l).id\n }, s(l).modal.componentProps), null, 16, [\"colIndex\", \"rowIndex\", \"tableid\"]))\n ]),\n _: 1\n }, 8, [\"colIndex\", \"rowIndex\", \"tableid\", \"style\"]), [\n [ue, s(l).modal.visible]\n ])\n ], !0)\n ], 4));\n }\n});\nconst ct = /* @__PURE__ */ C(dt, [[\"__scopeId\", \"data-v-9137b4c3\"]]);\nfunction ft(t) {\n t.component(\"ACell\", he), t.component(\"AExpansionRow\", Je), t.component(\"ARow\", be), t.component(\"ATable\", ct), t.component(\"ATableHeader\", xe), t.component(\"ATableModal\", ve);\n}\nexport {\n he as ACell,\n Je as AExpansionRow,\n be as ARow,\n ct as ATable,\n xe as ATableHeader,\n ve as ATableModal,\n ot as TableDataStore,\n ft as install\n};\n//# sourceMappingURL=atable.js.map\n","\n\n\n","\n\n\n\n\n","import { App } from 'vue'\n\nimport ActionSet from '@/components/ActionSet.vue'\nimport CommandPalette from '@/components/CommandPalette.vue'\nimport Doctype from '@/components/Doctype.vue'\nimport Records from '@/components/Records.vue'\nimport SheetNav from '@/components/SheetNav.vue'\n\nexport default {\n\tinstall: (app: App) => {\n\t\tapp.component('ActionSet', ActionSet)\n\t\tapp.component('CommandPalette', CommandPalette)\n\t\tapp.component('Doctype', Doctype)\n\t\tapp.component('Records', Records)\n\t\tapp.component('SheetNav', SheetNav)\n\t},\n}\n"],"names":["_elements","ref","isOpen","timeout","hover","closeClicked","onMounted","props","closeDropdowns","element","onHover","onHoverLeave","toggleDropdown","index","showDropdown","_cache","A","l","n","o","Q","Ge","Y","j","Y$1","W","Xe","G","Ze","et","z","tt","ie","D","g","s","r","i","c","M","f","_","$","O","B","Ee","xe","v","p","ne","Et","xt","t","At","Ct","Mt","Ie","a","Stonecrop","registry","store","schema","workflow","actions","doctype","doctypeRegistry","filters","data","id","action","initialState","action2","isVue2","set","target","key","val","del","getDevtoolsGlobalHook$1","getTarget$1","isProxyAvailable$1","HOOK_SETUP$1","HOOK_PLUGIN_SETTINGS_SET$1","supported$1","perf$1","isPerformanceSupported$1","_a","now$2","ApiProxy$1","plugin","hook","defaultSettings","item","localSettingsSaveId","currentSettings","raw","value","pluginId","_target","prop","args","resolve","setupDevtoolsPlugin$1","pluginDescriptor","setupFn","descriptor","enableProxy","proxy","activePinia","setActivePinia","pinia2","piniaSymbol","isPlainObject","MutationType","MutationType2","IS_CLIENT","USE_DEVTOOLS","_global","bom","blob","autoBom","download","url","name","opts","xhr","saveAs","corsEnabled","click","node","evt","_navigator","isMacOSWebView","downloadSaveAs","msSaveAs","fileSaverSaveAs","popup","force","isSafari","isChromeIOS","reader","toastMessage","message","type2","piniaMessage","isPinia","checkClipboardAccess","checkNotFocusedError","error","actionGlobalCopyState","actionGlobalPasteState","actionGlobalSaveState","fileInput","getFileOpener","openFile","reject","files","file","actionGlobalOpenStateFile","result","text","formatDisplay$1","display","PINIA_ROOT_LABEL","PINIA_ROOT_ID","formatStoreForInspectorTree","formatStoreForInspectorState","storeNames","storeMap","storeId","store2","getters","state","getterName","formatEventData","events","event","formatMutationType","isTimelineActive","componentStateTypes","MUTATIONS_LAYER_ID","INSPECTOR_ID","assign$1","getStoreType","registerPiniaDevtools","app","api","nodeId","payload","ctx","piniaStores","toRaw","stores","inspectedStore","path","addStoreToDevtools","now2","after","onError","groupId","runningActionId","activeAction","watch","unref","newValue","oldValue","eventData","hotUpdate","markRaw","newStore","$dispose","patchActionForGrouping","actionNames","storeActions","actionName","_actionId","trackedStore","devtoolsPlugin","options","originalHotUpdate","createPinia","scope","effectScope","_p","toBeInstalled","patchObject","newState","oldState","subPatch","targetValue","isRef","isReactive","noop$1","addSubscription","subscriptions","callback","detached","onCleanup","removeSubscription","idx","getCurrentScope","onScopeDispose","triggerSubscriptions","mergeReactiveObjects","patchToApply","skipHydrateSymbol","shouldHydrate","obj","assign$2","isComputed","createOptionsStore","hot","setup","localState","toRefs","computedGetters","computed","createSetupStore","$id","isOptionsStore","optionsForPlugin","$subscribeOptions","isListening","debuggerEvents","isSyncListening","actionSubscriptions","hotState","activeListener","$patch","partialStateOrMutator","subscriptionMutation","myListenerId","nextTick","$reset","$state","wrapAction","afterCallbackList","onErrorCallbackList","ret","_hmrPayload","partialStore","options2","stopWatcher","reactive","setupStore","toRef","actionValue","stateKey","newStateTarget","oldStateSource","getter","getterValue","nonEnumerable","extender","extensions","defineStore","idOrOptions","setupOptions","isSetupStore","useStore","currentInstance","getCurrentInstance","inject","hotId","vm","cache","useDataStore","records","record","useStonecrop","stonecrop","isReady","onBeforeMount","_b","route","doctypeSlug","recordId","getDevtoolsGlobalHook","getTarget","isProxyAvailable","HOOK_SETUP","HOOK_PLUGIN_SETTINGS_SET","supported","perf","isPerformanceSupported","now$1","ApiProxy2","setupDevtoolsPlugin","isBrowser","isESModule","assign","applyToParams","fn","params","newParams","isArray","noop","warn","msg","TRAILING_SLASH_RE","removeTrailingSlash","parseURL","parseQuery2","location2","currentLocation","query","searchString","hash","hashPos","searchPos","resolveRelativePath","stringifyURL","stringifyQuery2","stripBase","pathname","base","isSameRouteLocation","b","aLastIndex","bLastIndex","isSameRouteRecord","isSameRouteLocationParams","isSameRouteLocationParamsValue","isEquivalentArray","to","from","fromSegments","toSegments","position","toPosition","segment","NavigationType","NavigationType2","NavigationDirection","NavigationDirection2","normalizeBase","baseEl","BEFORE_HASH_RE","createHref","getElementPosition","el","offset","docRect","elRect","computeScrollPosition","scrollToPosition","scrollToOptions","positionEl","isIdSelector","foundEl","getScrollKey","delta","scrollPositions","saveScrollPosition","scrollPosition","getSavedScrollPosition","scroll","createBaseLocation","createCurrentLocation","search","slicePos","pathFromHash","useHistoryListeners","historyState","replace","listeners","teardowns","pauseState","popStateHandler","fromState","listener","pauseListeners","listen","teardown","index2","beforeUnloadListener","history2","destroy","buildState","back","current","forward","replaced","computeScroll","useHistoryStateNavigation","changeLocation","replace2","hashIndex","err","push","currentState","createWebHistory","historyNavigation","historyListeners","go","triggerListeners","routerHistory","isRouteLocation","isRouteName","START_LOCATION_NORMALIZED","NavigationFailureSymbol","NavigationFailureType","NavigationFailureType2","ErrorTypeMessages","stringifyRoute","createRouterError","isNavigationFailure","propertiesToLog","BASE_PARAM_PATTERN","BASE_PATH_PARSER_OPTIONS","REGEX_CHARS_RE","tokensToParser","segments","extraOptions","score","pattern","keys","segmentScores","tokenIndex","token","subSegmentScore","repeatable","optional","regexp","re2","subPattern","re","parse2","match","stringify2","avoidDuplicatedSlash","param","compareScoreArray","diff","comparePathParserScore","aScore","bScore","comp","isLastScoreNegative","last","ROOT_TOKEN","VALID_PARAM_RE","tokenizePath","crash","buffer","previousState","tokens","finalizeSegment","char","customRe","consumeBuffer","addCharToBuffer","createRouteRecordMatcher","parent","parser","existingKeys","matcher","createRouterMatcher","routes","globalOptions","matchers","matcherMap","mergeOptions","getRecordMatcher","addRoute","originalRecord","isRootAdd","mainNormalizedRecord","normalizeRouteRecord","checkChildMissingNameWithEmptyPath","normalizedRecords","aliases","alias","originalMatcher","normalizedRecord","parentPath","connectingSlash","checkMissingParamsInAbsolutePath","checkSameParams","isAliasRecord","removeRoute","children","insertMatcher","matcherRef","getRoutes","isRecordChildOf","invalidParams","paramName","k","paramsFromLocation","m2","matched","parentMatcher","mergeMetaFields","normalizeRecordProps","propsObject","meta","defaults","partialOptions","isSameParam","child","HASH_RE","AMPERSAND_RE","SLASH_RE","EQUAL_RE","IM_RE","PLUS_RE","ENC_BRACKET_OPEN_RE","ENC_BRACKET_CLOSE_RE","ENC_CARET_RE","ENC_BACKTICK_RE","ENC_CURLY_OPEN_RE","ENC_PIPE_RE","ENC_CURLY_CLOSE_RE","ENC_SPACE_RE","commonEncode","encodeHash","encodeQueryValue","encodeQueryKey","encodePath","encodeParam","decode","parseQuery","searchParams","searchParam","eqPos","currentValue","stringifyQuery","value2","normalizeQuery","normalizedQuery","matchedRouteKey","viewDepthKey","routerKey","routeLocationKey","routerViewLocationKey","useCallbacks","handlers","add","handler","reset","guardToPromiseFn","guard","enterCallbackArray","next","valid","guardReturn","canOnlyBeCalledOnce","guardCall","resolvedValue","called","extractComponentsGuards","guardType","guards","rawComponent","promise","isRouteComponent","componentPromise","resolved","resolvedComponent","component","useLink","router2","currentRoute","activeRecordIndex","length","routeMatched","currentMatched","parentRecordPath","getOriginalPath","isActive","includesParams","isExactActive","navigate","e","guardEvent","instance","linkContextDevtools","watchEffect","RouterLink","defineComponent","slots","link","elClass","getLinkClass","h$1","outer","inner","innerValue","outerValue","propClass","globalClass","defaultClass","RouterViewImpl","attrs","warnDeprecatedUsage","injectedRoute","routeToDisplay","injectedDepth","depth","initialDepth","matchedRoute","matchedRouteRef","provide","viewRef","oldInstance","oldName","currentName","ViewComponent","normalizeSlot","routePropsOption","routeProps","onVnodeUnmounted","vnode","info","slot","slotContent","RouterView","parentName","formatRouteLocation","routeLocation","tooltip","copy","omit","formatDisplay","routerId","addDevtools","componentInstance","PINK_500","devtoolsData","backgroundColor","ORANGE_400","LIME_500","BLUE_600","refreshRoutesView","routerInspectorId","navigationsLayerId","navigationId","failure","activeRoutesPayload","resetMatchStateOnRouteRecord","isRouteMatching","markRouteRecordActive","formatRouteRecordForInspector","route2","formatRouteRecordMatcherForStateInspector","modifierForKey","fields","CYAN_400","DARK","tags","routeRecordId","EXTRACT_REGEXP_RE","childRoute","filter","found","decodedPath","createRouter","parseQuery$1","stringifyQuery$1","beforeGuards","beforeResolveGuards","afterGuards","shallowRef","pendingLocation","normalizeParams","paramValue","encodeParams","decodeParams","parentOrRoute","recordMatcher","routeMatcher","hasRoute","rawLocation","locationNormalized","matchedRoute2","href2","matcherLocation","targetParams","fullPath","href","locationAsObject","checkCanceledNavigation","pushWithRedirect","handleRedirectRecord","lastMatched","redirect","newTargetLocation","redirectedFrom","targetLocation","shouldRedirect","toLocation","handleScroll","markAsReady","triggerError","failure2","finalizeNavigation","triggerAfterEach","checkCanceledNavigationAndReject","leavingRecords","updatingRecords","enteringRecords","extractChangingRecords","canceledNavigationCheck","runGuardQueue","beforeEnter","isPush","isFirstNavigation","removeHistoryListener","setupListeners","_from","readyHandlers","errorHandlers","ready","list","resolve2","scrollBehavior","started","installedApps","router3","reactiveRoute","unmountApp","len","recordFrom","recordTo","isPromise","PROMISE_RESOLVED_VOID","sleep","time","resolveWith","res","randomInt","min","max","randomToken","lastMs","additional","microSeconds$4","ms","microSeconds$3","type$3","create$3","channelName","close$3","channelState","postMessage$3","messageJson","onMessage$3","canBeUsed$3","averageResponseTime$3","NativeMethod","ObliviousSet","ObliviousSet2","ttl","_this","now","removeTooOldValues","obliviousSet","olderThen","iterator","fillOptionsWithDefaults","originalOptions","microSeconds$2","DB_PREFIX","OBJECT_STORE_ID","TRANSACTION_SETTINGS","type$2","getIdb","commitIndexedDBTransaction","tx","createDatabase","IndexedDB","dbName","openRequest","ev","db","rej","writeMessage","readerUuid","writeObject","objectStore","getMessagesHigherThan","lastCursorId","keyRangeValue","getAllRequest","openCursor","openCursorRequest","cursor","removeMessagesById","ids","deleteRequest","getOldMessages","msgObk","cleanOldMessages","tooOld","create$2","_readLoop","readNewMessages","_filterMessage","msgObj","newerMessages","useMessages","msgObjA","msgObjB","close$2","postMessage$2","onMessage$2","canBeUsed$2","averageResponseTime$2","IndexedDBMethod","microSeconds$1","KEY_PREFIX","type$1","getLocalStorage","localStorage2","storageKey","postMessage$1","writeObj","addStorageEventListener","removeStorageEventListener","create$1","canBeUsed$1","uuid","eMIs","close$1","onMessage$1","ls","averageResponseTime$1","defaultTime","userAgent","LocalstorageMethod","microSeconds","type","SIMULATE_CHANNELS","create","close","postMessage","channelArray","channel","onMessage","canBeUsed","averageResponseTime","SimulateMethod","METHODS","chooseMethod","chooseMethods","useMethod","method","OPEN_BROADCAST_CHANNELS","lastId","BroadcastChannel$1","_prepareChannel","_post","listenObj","_removeListenerObject","_addListenerObject","obj2","awaitPrepare","broadcastChannel","sendPromise","maybePromise","_hasMessageListeners","_startListening","_stopListening","listenerFn","listenerObject","hundredMsInMicro","minMessageTime","escaped","DevalueError","is_primitive","thing","object_proto_names","is_plain_object","proto","get_type","stringify_string","str","code","UNDEFINED","HOLE","NAN","POSITIVE_INFINITY","NEGATIVE_INFINITY","NEGATIVE_ZERO","parse","serialized","revivers","unflatten","parsed","hydrate","values","hydrated","standalone","reviver","set2","map","array","object","stringify","reducers","stringified","indexes","custom","flatten","index3","stringify_primitive","source","flags","m","d","u","h","_a2","newSchema","fieldValue","J","pe","Te","$e","fe","Oe","De","_e","U","me","Re","X","Se","E","Z","Pe","K","He","Le","ee","Me","y","I","te","Ue","je","oe","le","F","ae","Ve","we","q","ye","We","Be","Qe","S","w","P","V","C","he","Ye","be","de","ce","x","ue","R","Ke","nt","se","ge","ot","lt","at","rt","T","L","N","H","ke","ve","ct","Ce","Ae","config","breadcrumbs","breadcrumbsVisibile","searchVisibile","searchText","searchinput","rotateHideTabIcon","toggleBreadcrumbs","toggleSearch","handleSearchInput","handleSearch","navigateHome","ActionSet","CommandPalette","Doctype","Records","SheetNav"],"mappings":"+zCAiFMA,EAAYC,MAAkB,CAAA,CAAE,EAChCC,EAASD,MAAI,EAAK,EAClBE,EAAUF,MAAoB,IAAI,EAClCG,EAAQH,MAAI,EAAK,EACjBI,EAAeJ,MAAI,EAAK,EAE9BK,EAAAA,UAAU,IAAM,CACfN,EAAU,MAAQO,EAAM,SACTC,GAAA,CACf,EAED,MAAMA,EAAiB,IAAM,CACnB,QAAAC,KAAWT,EAAU,MACzBS,EAAQ,cAAgB,aAC3BA,EAAQ,KAAO,GAEjB,EAGKC,EAAU,IAAM,CACrBN,EAAM,MAAQ,GACND,EAAA,MAAQ,WAAW,IAAM,CAC5BC,EAAM,QACTF,EAAO,MAAQ,KAEd,GAAG,CAAA,EAGDS,EAAe,IAAM,CAC1BP,EAAM,MAAQ,GACdC,EAAa,MAAQ,GACrB,aAAaF,EAAQ,KAAK,EAC1BD,EAAO,MAAQ,EAAA,EAGVU,EAAkBC,GAAkB,CACzC,MAAMC,EAAe,CAACd,EAAU,MAAMa,CAAK,EAAE,KAC9BL,IACLR,EAAA,MAAMa,CAAK,EAAE,KAAOC,CAAA,2iDCtHbC,EAAA,qFC8CZC,GAAI,CAAC,EAAG,IAAM,CAClB,MAAMC,EAAI,EAAE,WAAa,EACzB,SAAW,CAACC,EAAGC,CAAC,IAAK,EACnBF,EAAEC,CAAC,EAAIC,EACT,OAAOF,CACT,EA4DA,IAAIG,GACO,OAAO,OAAS,MAEpBA,GAAI,QAAU,KAAO,OAAS,OAAO,YAAc,MAAQA,GAAE,WAAa,iBAAiB,KAAK,OAAO,UAAU,SAAS,EAIjI,SAASC,GAAG,EAAG,CACb,OAAO,CACT,CAwBA,MAAMC,GAAI,OAAO,WAAa,IAAM,WAAa,OAAO,OAAS,IAAM,OAAS,OAAO,OA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MAAiB,IAAI,EAEnCogC,EAAoBrwB,EAAAA,SAAS,IAC3BiwB,EAAoB,MAAQ,YAAc,SACjD,EAED3/B,EAAAA,UAAU,IAAM,CACH0/B,EAAA,MAAQz/B,EAAM,aAAe,CAAA,CAAC,CAC1C,EAED,MAAM+/B,EAAoB,IAAM,CACXL,EAAA,MAAQ,CAACA,EAAoB,KAAA,EAG5CM,EAAe,SAAY,CACjBL,EAAA,MAAQ,CAACA,EAAe,MACvC,MAAMlvB,WAAS,IAAM,CACpBovB,EAAY,MAAM,OAAM,CACxB,CAAA,EAGII,EAAqBx1B,GAA8B,CACxDA,EAAM,eAAe,EACrBA,EAAM,gBAAgB,CAAA,EAGjBy1B,EAAe,MAAOz1B,GAAsC,CACjEA,EAAM,eAAe,EACrBA,EAAM,gBAAgB,EACtB,MAAMu1B,EAAa,CAAA,EAGdG,EAAe,IAA6C,CAAA,orDC9GnD7/B,GAAA,CACd,QAAU4K,GAAa,CAClBA,EAAA,UAAU,YAAak1B,EAAS,EAChCl1B,EAAA,UAAU,iBAAkBm1B,EAAc,EAC1Cn1B,EAAA,UAAU,UAAWo1B,EAAO,EAC5Bp1B,EAAA,UAAU,UAAWq1B,EAAO,EAC5Br1B,EAAA,UAAU,WAAYs1B,EAAQ,CACnC,CACD"} \ No newline at end of file diff --git a/desktop/package.json b/desktop/package.json index 6065e9ca..5a425044 100644 --- a/desktop/package.json +++ b/desktop/package.json @@ -45,7 +45,9 @@ "miragejs": "^0.1.47", "typescript": "^5.0.4", "vite": "^4.3.5", - "vue-router": "^4" + "vue-router": "^4", + "histoire": "0.17.0", + "@histoire/plugin-vue": "0.17.1" }, "engines": { "node": ">=16.19.1" diff --git a/examples/package.json b/examples/package.json index d7e78863..cf6d1827 100644 --- a/examples/package.json +++ b/examples/package.json @@ -37,7 +37,9 @@ "eslint": "^8.40.0", "eslint-plugin-vue": "^9.11.1", "typescript": "^5.0.4", - "vue-router": "^4" + "vue-router": "^4", + "histoire": "0.17.0", + "@histoire/plugin-vue": "0.17.1" }, "engines": { "node": ">=16.19.1" diff --git a/graphql_client/package.json b/graphql_client/package.json index cf012874..7345b344 100644 --- a/graphql_client/package.json +++ b/graphql_client/package.json @@ -43,7 +43,9 @@ "typescript": "^5.0.4", "vite": "^4.3.5", "vue": "^3.2.47", - "vue-router": "^4" + "vue-router": "^4", + "histoire": "0.17.0", + "@histoire/plugin-vue": "0.17.1" }, "engines": { "node": ">=16.19.1" diff --git a/node_editor/package.json b/node_editor/package.json index e5252ed5..49891d6e 100644 --- a/node_editor/package.json +++ b/node_editor/package.json @@ -31,9 +31,9 @@ "xstate": "~4.37.2" }, "devDependencies": { - "@histoire/plugin-vue": "^0.16.1", + "@histoire/plugin-vue": "0.17.1", "@vitejs/plugin-vue": "^4.2.1", - "histoire": "^0.16.1", + "histoire": "0.17.0", "vite": "^4.3.5" }, "engines": { diff --git a/stonecrop/package.json b/stonecrop/package.json index e5f69a51..83dd0d2d 100644 --- a/stonecrop/package.json +++ b/stonecrop/package.json @@ -44,7 +44,9 @@ "eslint-config-prettier": "^8.8.0", "eslint-plugin-vue": "^9.11.1", "typescript": "^5.0.4", - "vite": "^4.3.5" + "vite": "^4.3.5", + "histoire": "0.17.0", + "@histoire/plugin-vue": "0.17.1" }, "engines": { "node": ">=16.19.1" diff --git a/themes/package.json b/themes/package.json index 5aea5aa0..22b4494e 100644 --- a/themes/package.json +++ b/themes/package.json @@ -10,7 +10,9 @@ "devDependencies": { "@vitejs/plugin-vue": "^4.2.1", "vite": "^4.3.5", - "vue": "^3.2.47" + "vue": "^3.2.47", + "histoire": "0.17.0", + "@histoire/plugin-vue": "0.17.1" }, "engines": { "node": ">=16.19.1" diff --git a/utilities/package.json b/utilities/package.json index 7ffed430..14b7c372 100644 --- a/utilities/package.json +++ b/utilities/package.json @@ -29,7 +29,7 @@ "vue": "^3.2.47" }, "devDependencies": { - "@histoire/plugin-vue": "^0.16.1", + "@histoire/plugin-vue": "0.17.1", "@typescript-eslint/eslint-plugin": "^5.59.5", "@typescript-eslint/parser": "^5.59.5", "@vitejs/plugin-vue": "^4.2.1", @@ -38,7 +38,7 @@ "eslint": "^8.40.0", "eslint-config-prettier": "^8.8.0", "eslint-plugin-vue": "^9.11.1", - "histoire": "^0.16.1", + "histoire": "0.17.0", "typescript": "^5.0.4", "vite": "^4.3.5", "vue-router": "^4"