UNPKG

vue-component-toolkit

Version:

A Vue3 component toolkit library

1,809 lines 216 kB
var zs = Object.defineProperty; var Js = (e, t, r) => t in e ? zs(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r; var Ee = (e, t, r) => Js(e, typeof t != "symbol" ? t + "" : t, r); import { useSlots as It, ref as F, onMounted as Ue, openBlock as y, createElementBlock as C, renderSlot as J, createCommentVNode as D, Fragment as ee, renderList as ie, createBlock as q, resolveDynamicComponent as Ae, mergeProps as pt, computed as j, normalizeStyle as Q, normalizeClass as Z, createElementVNode as k, createTextVNode as Fe, toDisplayString as B, defineComponent as Kn, h as Qr, getCurrentInstance as Xn, inject as Zr, onUnmounted as es, watch as xn, shallowRef as Qs, createVNode as de, Text as Zs, render as eo, toRaw as Ge, mergeModels as zt, useModel as ts, withCtx as Oe, withKeys as ut, withModifiers as to, Teleport as ns, provide as rs, resolveComponent as no, unref as et, nextTick as ro, useTemplateRef as so, onBeforeUnmount as oo, useAttrs as ao, withDirectives as lo, vShow as io, normalizeProps as co } from "vue"; const uo = { class: "comp-accordion bg-gray-100 p-4 rounded-lg shadow-md flex flex-col" }, Af = { __name: "Accordion", props: { selected: { type: Number, default: 0 } }, setup(e) { const t = e, r = It(), n = F(null), s = F(t.selected), o = (a) => { s.value = a; }; return Ue(() => { var a; n.value = (a = r.default) == null ? void 0 : a.call(r); }), (a, l) => (y(), C("div", uo, [ n.value ? D("", !0) : J(a.$slots, "default", { key: 0 }), n.value ? (y(!0), C(ee, { key: 1 }, ie(n.value, (i, u) => (y(), q(Ae(i), pt({ key: u, ref_for: !0 }, i.props, { id: u, selected: u === s.value, onSelect: o }), null, 16, ["id", "selected"]))), 128)) : D("", !0) ])); } }, H = (e, t) => { const r = e.__vccOpts || e; for (const [n, s] of t) r[n] = s; return r; }, fo = ["disabled"], po = { class: "horizontal" }, mo = { __name: "Button", props: { variant: { type: String, default: "primary" // Options: 'primary', 'secondary', 'danger' }, size: { type: String, default: "md" // Options: 'sm', 'md', 'lg' }, disabled: { type: Boolean, default: !1 }, off: { type: Boolean, default: !1 }, text: { type: String }, onClick: { type: Function }, icon: { type: Object }, style: { type: Object } }, setup(e) { const t = e, r = j(() => t.style), n = j(() => t.text ? "px-4" : "px-2"), s = j(() => { const a = { primary: "bg-blue-500 text-white hover:bg-blue-600 active:bg-blue-700 focus:ring-blue-500", secondary: "bg-gray-500 text-white hover:bg-gray-600 active:bg-gray-700 focus:ring-gray-500", danger: "bg-red-500 text-white hover:bg-red-600 active:bg-red-700 focus:ring-red-500" }; return a[t.variant] || a.primary; }), o = j(() => { const a = { sm: "text-sm", md: "text-base", lg: "text-lg" }; return a[t.size] || a.md; }); return (a, l) => (y(), C("button", { style: Q(r.value), class: Z([ "py-2 rounded-lg font-medium rounded-md transition-colors duration-300 active:opacity-80 active:scale-95", n.value, s.value, o.value, { "opacity-50 cursor-not-allowed": e.disabled }, { "opacity-50 ": e.off } ]), disabled: e.disabled, onClick: l[0] || (l[0] = (i) => !e.disabled && a.$emit("click")) }, [ k("div", po, [ Fe(B(e.text) + " ", 1), e.icon ? (y(), q(Ae(e.icon), { key: 0, class: "px-1" })) : D("", !0) ]) ], 14, fo)); } }, If = /* @__PURE__ */ H(mo, [["__scopeId", "data-v-b0896a09"]]), ho = { class: "comp-card w-full p-6 border rounded-lg bg-gray-100 shadow flex flex-col" }, _o = { key: 0, class: "text-xl font-semibold text-gray-800" }, go = { key: 1, class: "text-gray-600 mt-2" }, yo = { __name: "Card", props: { title: { type: String, required: !1 }, description: { type: String, required: !1 } }, setup(e) { const t = e; return (r, n) => (y(), C("div", ho, [ t.title ? (y(), C("h3", _o, B(t.title), 1)) : D("", !0), t.description ? (y(), C("p", go, B(t.description), 1)) : D("", !0), k("div", { class: "slot", style: Q(t.title || t.description ? { "margin-top": "16px" } : {}) }, [ J(r.$slots, "default", {}, void 0, !0) ], 4) ])); } }, Rf = /* @__PURE__ */ H(yo, [["__scopeId", "data-v-55aff5c1"]]), vo = { class: "flex flex-col items-center w-full" }, bo = { class: "relative w-40 h-40" }, Eo = { class: "w-full h-full transform -rotate-90" }, wo = ["stroke-dasharray", "stroke-dashoffset"], No = { class: "absolute inset-0 flex flex-col items-center justify-center" }, Oo = { class: "text-2xl font-bold text-gray-800" }, To = { class: "mt-4 flex items-center gap-4" }, bn = 100, ko = "°C", Co = 40, So = "#00C853", Lo = "#D32F2F", Df = { __name: "CircularGauge", setup(e) { const t = F(50), r = j(() => 2 * Math.PI * Co), n = (l, i, u, d, h) => { const f = (l - i) / (u - i), v = (c, _) => Math.round(c + (_ - c) * f).toString(16).padStart(2, "0"), E = v(parseInt(d.slice(1, 3), 16), parseInt(h.slice(1, 3), 16)), w = v(parseInt(d.slice(3, 5), 16), parseInt(h.slice(3, 5), 16)), g = v(parseInt(d.slice(5, 7), 16), parseInt(h.slice(5, 7), 16)); return `#${E}${w}${g}`; }, s = j(() => n(t.value, 0, bn, So, Lo)), o = () => { t.value < bn && (t.value += 5); }, a = () => { t.value > 0 && (t.value -= 5); }; return (l, i) => (y(), C("div", vo, [ k("div", bo, [ (y(), C("svg", Eo, [ i[0] || (i[0] = k("circle", { class: "text-gray-300", stroke: "currentColor", "stroke-width": "10", fill: "transparent", r: "40", cx: "50%", cy: "50%" }, null, -1)), k("circle", { style: Q({ stroke: s.value }), class: "transition-all duration-300", "stroke-dasharray": r.value, "stroke-dashoffset": r.value - t.value / bn * r.value, "stroke-width": "10", fill: "transparent", r: "40", cx: "50%", cy: "50%" }, null, 12, wo) ])), k("div", No, [ k("span", Oo, B(t.value), 1), k("span", { class: "text-sm text-gray-500" }, B(ko)) ]) ]), k("div", To, [ k("button", { onClick: a, class: "px-4 py-2 bg-gray-300 rounded-full hover:bg-gray-400 transition" }, " - "), k("button", { onClick: o, class: "px-4 py-2 text-white rounded-full transition", style: Q({ backgroundColor: s.value }) }, " + ", 4) ]) ])); } }, xo = { class: "flex flex-col items-center w-full" }, Ao = { class: "relative w-40 h-40" }, Io = { class: "w-full h-full", viewBox: "0 0 100 100" }, Ro = ["x", "y"], Do = ["x2", "y2"], Po = ["x2", "y2"], Mo = ["x2", "y2"], $o = { class: "mt-4 text-xl font-semibold text-gray-800" }, Pf = { __name: "Clock", setup(e) { const t = F(/* @__PURE__ */ new Date()), r = () => { t.value = /* @__PURE__ */ new Date(); }; Ue(() => { setInterval(r, 1e3); }); const n = (f, v) => { const E = (f - 90) * (Math.PI / 180); return { x: 50 + v * Math.cos(E), y: 50 + v * Math.sin(E) }; }, s = (f) => 50 + 38 * Math.cos((f * 30 - 90) * (Math.PI / 180)), o = (f) => 50 + 38 * Math.sin((f * 30 - 90) * (Math.PI / 180)) + 2, a = F({}), l = F({}), i = F({}), u = () => { const f = t.value, v = f.getHours() % 12, E = f.getMinutes(), w = f.getSeconds(); a.value = n((v + E / 60) * 30, 20), l.value = n(E * 6, 30), i.value = n(w * 6, 38); }; u(), setInterval(u, 1e3); const d = F(""); return setInterval(() => { d.value = t.value.toLocaleTimeString(); }, 1e3), (f, v) => (y(), C("div", xo, [ k("div", Ao, [ (y(), C("svg", Io, [ v[0] || (v[0] = k("circle", { cx: "50", cy: "50", r: "48", stroke: "currentColor", "stroke-width": "4", fill: "transparent", class: "text-gray-300" }, null, -1)), (y(), C(ee, null, ie(12, (E) => k("text", { key: E, x: s(E), y: o(E), "text-anchor": "middle", class: "text-sm font-bold text-gray-800" }, B(E), 9, Ro)), 64)), k("line", { x1: 50, y1: 50, x2: a.value.x, y2: a.value.y, stroke: "currentColor", "stroke-width": "4", class: "text-gray-700 transition-all duration-300" }, null, 8, Do), k("line", { x1: 50, y1: 50, x2: l.value.x, y2: l.value.y, stroke: "currentColor", "stroke-width": "3", class: "text-gray-900 transition-all duration-300" }, null, 8, Po), k("line", { x1: 50, y1: 50, x2: i.value.x, y2: i.value.y, stroke: "red", "stroke-width": "2", class: "transition-all duration-100" }, null, 8, Mo), v[1] || (v[1] = k("circle", { cx: "50", cy: "50", r: "2", fill: "black" }, null, -1)) ])) ]), k("div", $o, B(d.value), 1) ])); } }; /*! * shared v11.0.0-beta.2 * (c) 2024 kazuya kawaguchi * Released under the MIT License. */ const qe = typeof window < "u"; let Te, ot; if (process.env.NODE_ENV !== "production") { const e = qe && window.performance; e && e.mark && e.measure && e.clearMarks && // @ts-ignore browser compat e.clearMeasures && (Te = (t) => { e.mark(t); }, ot = (t, r, n) => { e.measure(t, r, n), e.clearMarks(r), e.clearMarks(n); }); } const Fo = /\{([0-9a-zA-Z]+)\}/g; function rn(e, ...t) { return t.length === 1 && X(t[0]) && (t = t[0]), (!t || !t.hasOwnProperty) && (t = {}), e.replace(Fo, (r, n) => t.hasOwnProperty(n) ? t[n] : ""); } const je = (e, t = !1) => t ? Symbol.for(e) : Symbol(e), Uo = (e, t, r) => Vo({ l: e, k: t, s: r }), Vo = (e) => JSON.stringify(e).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029").replace(/\u0027/g, "\\u0027"), pe = (e) => typeof e == "number" && isFinite(e), Bo = (e) => zn(e) === "[object Date]", Jt = (e) => zn(e) === "[object RegExp]", sn = (e) => K(e) && Object.keys(e).length === 0, me = Object.assign, qo = Object.create, te = (e = null) => qo(e); let ur; const tt = () => ur || (ur = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : te()); function dr(e) { return e.replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&apos;"); } const jo = Object.prototype.hasOwnProperty; function De(e, t) { return jo.call(e, t); } const fe = Array.isArray, re = (e) => typeof e == "function", R = (e) => typeof e == "string", le = (e) => typeof e == "boolean", X = (e) => e !== null && typeof e == "object", Ho = (e) => X(e) && re(e.then) && re(e.catch), ss = Object.prototype.toString, zn = (e) => ss.call(e), K = (e) => zn(e) === "[object Object]", Wo = (e) => e == null ? "" : fe(e) || K(e) && e.toString === ss ? JSON.stringify(e, null, 2) : String(e); function Jn(e, t = "") { return e.reduce((r, n, s) => s === 0 ? r + n : r + t + n, ""); } const fr = 2; function Go(e, t = 0, r = e.length) { const n = e.split(/\r?\n/); let s = 0; const o = []; for (let a = 0; a < n.length; a++) if (s += n[a].length + 1, s >= t) { for (let l = a - fr; l <= a + fr || r > s; l++) { if (l < 0 || l >= n.length) continue; const i = l + 1; o.push(`${i}${" ".repeat(3 - String(i).length)}| ${n[l]}`); const u = n[l].length; if (l === a) { const d = t - (s - u) + 1, h = Math.max(1, r > s ? u - d : r - t); o.push(" | " + " ".repeat(d) + "^".repeat(h)); } else if (l > a) { if (r > s) { const d = Math.max(Math.min(r - s, u), 1); o.push(" | " + "^".repeat(d)); } s += u + 1; } } break; } return o.join(` `); } function Ye(e, t) { typeof console < "u" && (console.warn("[intlify] " + e), t && console.warn(t.stack)); } const pr = {}; function Yo(e) { pr[e] || (pr[e] = !0, Ye(e)); } function Ko() { const e = /* @__PURE__ */ new Map(); return { events: e, on(r, n) { const s = e.get(r); s && s.push(n) || e.set(r, [n]); }, off(r, n) { const s = e.get(r); s && s.splice(s.indexOf(n) >>> 0, 1); }, emit(r, n) { (e.get(r) || []).slice().map((s) => s(n)), (e.get("*") || []).slice().map((s) => s(r, n)); } }; } const Ft = (e) => !X(e) || fe(e); function Wt(e, t) { if (Ft(e) || Ft(t)) throw new Error("Invalid value"); const r = [{ src: e, des: t }]; for (; r.length; ) { const { src: n, des: s } = r.pop(); Object.keys(n).forEach((o) => { o !== "__proto__" && (X(n[o]) && !X(s[o]) && (s[o] = Array.isArray(n[o]) ? [] : te()), Ft(s[o]) || Ft(n[o]) ? s[o] = n[o] : r.push({ src: n[o], des: s[o] })); }); } } /*! * message-compiler v11.0.0-beta.2 * (c) 2024 kazuya kawaguchi * Released under the MIT License. */ function Xo(e, t, r) { return { line: e, column: t, offset: r }; } function An(e, t, r) { return { start: e, end: t }; } const U = { // tokenizer error codes EXPECTED_TOKEN: 1, INVALID_TOKEN_IN_PLACEHOLDER: 2, UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER: 3, UNKNOWN_ESCAPE_SEQUENCE: 4, INVALID_UNICODE_ESCAPE_SEQUENCE: 5, UNBALANCED_CLOSING_BRACE: 6, UNTERMINATED_CLOSING_BRACE: 7, EMPTY_PLACEHOLDER: 8, NOT_ALLOW_NEST_PLACEHOLDER: 9, INVALID_LINKED_FORMAT: 10, // parser error codes MUST_HAVE_MESSAGES_IN_PLURAL: 11, UNEXPECTED_EMPTY_LINKED_MODIFIER: 12, UNEXPECTED_EMPTY_LINKED_KEY: 13, UNEXPECTED_LEXICAL_ANALYSIS: 14, // generator error codes UNHANDLED_CODEGEN_NODE_TYPE: 15, // minifier error codes UNHANDLED_MINIFIER_NODE_TYPE: 16 }, zo = 17, Jo = { // tokenizer error messages [U.EXPECTED_TOKEN]: "Expected token: '{0}'", [U.INVALID_TOKEN_IN_PLACEHOLDER]: "Invalid token in placeholder: '{0}'", [U.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER]: "Unterminated single quote in placeholder", [U.UNKNOWN_ESCAPE_SEQUENCE]: "Unknown escape sequence: \\{0}", [U.INVALID_UNICODE_ESCAPE_SEQUENCE]: "Invalid unicode escape sequence: {0}", [U.UNBALANCED_CLOSING_BRACE]: "Unbalanced closing brace", [U.UNTERMINATED_CLOSING_BRACE]: "Unterminated closing brace", [U.EMPTY_PLACEHOLDER]: "Empty placeholder", [U.NOT_ALLOW_NEST_PLACEHOLDER]: "Not allowed nest placeholder", [U.INVALID_LINKED_FORMAT]: "Invalid linked format", // parser error messages [U.MUST_HAVE_MESSAGES_IN_PLURAL]: "Plural must have messages", [U.UNEXPECTED_EMPTY_LINKED_MODIFIER]: "Unexpected empty linked modifier", [U.UNEXPECTED_EMPTY_LINKED_KEY]: "Unexpected empty linked key", [U.UNEXPECTED_LEXICAL_ANALYSIS]: "Unexpected lexical analysis in token: '{0}'", // generator error messages [U.UNHANDLED_CODEGEN_NODE_TYPE]: "unhandled codegen node type: '{0}'", // minimizer error messages [U.UNHANDLED_MINIFIER_NODE_TYPE]: "unhandled mimifier node type: '{0}'" }; function ht(e, t, r = {}) { const { domain: n, messages: s, args: o } = r, a = process.env.NODE_ENV !== "production" ? rn((s || Jo)[e] || "", ...o || []) : e, l = new SyntaxError(String(a)); return l.code = e, t && (l.location = t), l.domain = n, l; } function Qo(e) { throw e; } const Zo = /<\/?[\w\s="/.':;#-\/]+>/, ea = (e) => Zo.test(e), Ve = " ", ta = "\r", be = ` `, na = "\u2028", ra = "\u2029"; function sa(e) { const t = e; let r = 0, n = 1, s = 1, o = 0; const a = (T) => t[T] === ta && t[T + 1] === be, l = (T) => t[T] === be, i = (T) => t[T] === ra, u = (T) => t[T] === na, d = (T) => a(T) || l(T) || i(T) || u(T), h = () => r, f = () => n, v = () => s, E = () => o, w = (T) => a(T) || i(T) || u(T) ? be : t[T], g = () => w(r), c = () => w(r + o); function _() { return o = 0, d(r) && (n++, s = 0), a(r) && r++, r++, s++, t[r]; } function b() { return a(r + o) && o++, o++, t[r + o]; } function O() { r = 0, n = 1, s = 1, o = 0; } function A(T = 0) { o = T; } function L() { const T = r + o; for (; T !== r; ) _(); o = 0; } return { index: h, line: f, column: v, peekOffset: E, charAt: w, currentChar: g, currentPeek: c, next: _, peek: b, reset: O, resetPeek: A, skipToPeek: L }; } const We = void 0, oa = ".", mr = "'", aa = "tokenizer"; function la(e, t = {}) { const r = t.location !== !1, n = sa(e), s = () => n.index(), o = () => Xo(n.line(), n.column(), n.index()), a = o(), l = s(), i = { currentType: 13, offset: l, startLoc: a, endLoc: a, lastType: 13, lastOffset: l, lastStartLoc: a, lastEndLoc: a, braceNest: 0, inLinked: !1, text: "" }, u = () => i, { onError: d } = t; function h(p, m, x, ...M) { const se = u(); if (m.column += x, m.offset += x, d) { const oe = r ? An(se.startLoc, m) : null, Y = ht(p, oe, { domain: aa, args: M }); d(Y); } } function f(p, m, x) { p.endLoc = o(), p.currentType = m; const M = { type: m }; return r && (M.loc = An(p.startLoc, p.endLoc)), x != null && (M.value = x), M; } const v = (p) => f( p, 13 /* TokenTypes.EOF */ ); function E(p, m) { return p.currentChar() === m ? (p.next(), m) : (h(U.EXPECTED_TOKEN, o(), 0, m), ""); } function w(p) { let m = ""; for (; p.currentPeek() === Ve || p.currentPeek() === be; ) m += p.currentPeek(), p.peek(); return m; } function g(p) { const m = w(p); return p.skipToPeek(), m; } function c(p) { if (p === We) return !1; const m = p.charCodeAt(0); return m >= 97 && m <= 122 || // a-z m >= 65 && m <= 90 || // A-Z m === 95; } function _(p) { if (p === We) return !1; const m = p.charCodeAt(0); return m >= 48 && m <= 57; } function b(p, m) { const { currentType: x } = m; if (x !== 2) return !1; w(p); const M = c(p.currentPeek()); return p.resetPeek(), M; } function O(p, m) { const { currentType: x } = m; if (x !== 2) return !1; w(p); const M = p.currentPeek() === "-" ? p.peek() : p.currentPeek(), se = _(M); return p.resetPeek(), se; } function A(p, m) { const { currentType: x } = m; if (x !== 2) return !1; w(p); const M = p.currentPeek() === mr; return p.resetPeek(), M; } function L(p, m) { const { currentType: x } = m; if (x !== 7) return !1; w(p); const M = p.currentPeek() === "."; return p.resetPeek(), M; } function T(p, m) { const { currentType: x } = m; if (x !== 8) return !1; w(p); const M = c(p.currentPeek()); return p.resetPeek(), M; } function P(p, m) { const { currentType: x } = m; if (!(x === 7 || x === 11)) return !1; w(p); const M = p.currentPeek() === ":"; return p.resetPeek(), M; } function W(p, m) { const { currentType: x } = m; if (x !== 9) return !1; const M = () => { const oe = p.currentPeek(); return oe === "{" ? c(p.peek()) : oe === "@" || oe === "|" || oe === ":" || oe === "." || oe === Ve || !oe ? !1 : oe === be ? (p.peek(), M()) : ue(p, !1); }, se = M(); return p.resetPeek(), se; } function G(p) { w(p); const m = p.currentPeek() === "|"; return p.resetPeek(), m; } function ue(p, m = !0) { const x = (se = !1, oe = "") => { const Y = p.currentPeek(); return Y === "{" || Y === "@" || !Y ? se : Y === "|" ? !(oe === Ve || oe === be) : Y === Ve ? (p.peek(), x(!0, Ve)) : Y === be ? (p.peek(), x(!0, be)) : !0; }, M = x(); return m && p.resetPeek(), M; } function ne(p, m) { const x = p.currentChar(); return x === We ? We : m(x) ? (p.next(), x) : null; } function _e(p) { const m = p.charCodeAt(0); return m >= 97 && m <= 122 || // a-z m >= 65 && m <= 90 || // A-Z m >= 48 && m <= 57 || // 0-9 m === 95 || // _ m === 36; } function Se(p) { return ne(p, _e); } function Ie(p) { const m = p.charCodeAt(0); return m >= 97 && m <= 122 || // a-z m >= 65 && m <= 90 || // A-Z m >= 48 && m <= 57 || // 0-9 m === 95 || // _ m === 36 || // $ m === 45; } function He(p) { return ne(p, Ie); } function $(p) { const m = p.charCodeAt(0); return m >= 48 && m <= 57; } function ve(p) { return ne(p, $); } function Le(p) { const m = p.charCodeAt(0); return m >= 48 && m <= 57 || // 0-9 m >= 65 && m <= 70 || // A-F m >= 97 && m <= 102; } function Re(p) { return ne(p, Le); } function ze(p) { let m = "", x = ""; for (; m = ve(p); ) x += m; return x; } function yt(p) { let m = ""; for (; ; ) { const x = p.currentChar(); if (x === "{" || x === "}" || x === "@" || x === "|" || !x) break; if (x === Ve || x === be) if (ue(p)) m += x, p.next(); else { if (G(p)) break; m += x, p.next(); } else m += x, p.next(); } return m; } function vt(p) { g(p); let m = "", x = ""; for (; m = He(p); ) x += m; return p.currentChar() === We && h(U.UNTERMINATED_CLOSING_BRACE, o(), 0), x; } function bt(p) { g(p); let m = ""; return p.currentChar() === "-" ? (p.next(), m += `-${ze(p)}`) : m += ze(p), p.currentChar() === We && h(U.UNTERMINATED_CLOSING_BRACE, o(), 0), m; } function Et(p) { return p !== mr && p !== be; } function ir(p) { g(p), E(p, "'"); let m = "", x = ""; for (; m = ne(p, Et); ) m === "\\" ? x += mn(p) : x += m; const M = p.currentChar(); return M === be || M === We ? (h(U.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER, o(), 0), M === be && (p.next(), E(p, "'")), x) : (E(p, "'"), x); } function mn(p) { const m = p.currentChar(); switch (m) { case "\\": case "'": return p.next(), `\\${m}`; case "u": return Mt(p, m, 4); case "U": return Mt(p, m, 6); default: return h(U.UNKNOWN_ESCAPE_SEQUENCE, o(), 0, m), ""; } } function Mt(p, m, x) { E(p, m); let M = ""; for (let se = 0; se < x; se++) { const oe = Re(p); if (!oe) { h(U.INVALID_UNICODE_ESCAPE_SEQUENCE, o(), 0, `\\${m}${M}${p.currentChar()}`); break; } M += oe; } return `\\${m}${M}`; } function hn(p) { return p !== "{" && p !== "}" && p !== Ve && p !== be; } function _n(p) { g(p); let m = "", x = ""; for (; m = ne(p, hn); ) x += m; return x; } function gn(p) { let m = "", x = ""; for (; m = Se(p); ) x += m; return x; } function yn(p) { const m = (x) => { const M = p.currentChar(); return M === "{" || M === "@" || M === "|" || M === "(" || M === ")" || !M || M === Ve ? x : (x += M, p.next(), m(x)); }; return m(""); } function wt(p) { g(p); const m = E( p, "|" /* TokenChars.Pipe */ ); return g(p), m; } function Nt(p, m) { let x = null; switch (p.currentChar()) { case "{": return m.braceNest >= 1 && h(U.NOT_ALLOW_NEST_PLACEHOLDER, o(), 0), p.next(), x = f( m, 2, "{" /* TokenChars.BraceLeft */ ), g(p), m.braceNest++, x; case "}": return m.braceNest > 0 && m.currentType === 2 && h(U.EMPTY_PLACEHOLDER, o(), 0), p.next(), x = f( m, 3, "}" /* TokenChars.BraceRight */ ), m.braceNest--, m.braceNest > 0 && g(p), m.inLinked && m.braceNest === 0 && (m.inLinked = !1), x; case "@": return m.braceNest > 0 && h(U.UNTERMINATED_CLOSING_BRACE, o(), 0), x = Je(p, m) || v(m), m.braceNest = 0, x; default: { let se = !0, oe = !0, Y = !0; if (G(p)) return m.braceNest > 0 && h(U.UNTERMINATED_CLOSING_BRACE, o(), 0), x = f(m, 1, wt(p)), m.braceNest = 0, m.inLinked = !1, x; if (m.braceNest > 0 && (m.currentType === 4 || m.currentType === 5 || m.currentType === 6)) return h(U.UNTERMINATED_CLOSING_BRACE, o(), 0), m.braceNest = 0, Ot(p, m); if (se = b(p, m)) return x = f(m, 4, vt(p)), g(p), x; if (oe = O(p, m)) return x = f(m, 5, bt(p)), g(p), x; if (Y = A(p, m)) return x = f(m, 6, ir(p)), g(p), x; if (!se && !oe && !Y) return x = f(m, 12, _n(p)), h(U.INVALID_TOKEN_IN_PLACEHOLDER, o(), 0, x.value), g(p), x; break; } } return x; } function Je(p, m) { const { currentType: x } = m; let M = null; const se = p.currentChar(); switch ((x === 7 || x === 8 || x === 11 || x === 9) && (se === be || se === Ve) && h(U.INVALID_LINKED_FORMAT, o(), 0), se) { case "@": return p.next(), M = f( m, 7, "@" /* TokenChars.LinkedAlias */ ), m.inLinked = !0, M; case ".": return g(p), p.next(), f( m, 8, "." /* TokenChars.LinkedDot */ ); case ":": return g(p), p.next(), f( m, 9, ":" /* TokenChars.LinkedDelimiter */ ); default: return G(p) ? (M = f(m, 1, wt(p)), m.braceNest = 0, m.inLinked = !1, M) : L(p, m) || P(p, m) ? (g(p), Je(p, m)) : T(p, m) ? (g(p), f(m, 11, gn(p))) : W(p, m) ? (g(p), se === "{" ? Nt(p, m) || M : f(m, 10, yn(p))) : (x === 7 && h(U.INVALID_LINKED_FORMAT, o(), 0), m.braceNest = 0, m.inLinked = !1, Ot(p, m)); } } function Ot(p, m) { let x = { type: 13 /* TokenTypes.EOF */ }; if (m.braceNest > 0) return Nt(p, m) || v(m); if (m.inLinked) return Je(p, m) || v(m); switch (p.currentChar()) { case "{": return Nt(p, m) || v(m); case "}": return h(U.UNBALANCED_CLOSING_BRACE, o(), 0), p.next(), f( m, 3, "}" /* TokenChars.BraceRight */ ); case "@": return Je(p, m) || v(m); default: { if (G(p)) return x = f(m, 1, wt(p)), m.braceNest = 0, m.inLinked = !1, x; if (ue(p)) return f(m, 0, yt(p)); break; } } return x; } function vn() { const { currentType: p, offset: m, startLoc: x, endLoc: M } = i; return i.lastType = p, i.lastOffset = m, i.lastStartLoc = x, i.lastEndLoc = M, i.offset = s(), i.startLoc = o(), n.currentChar() === We ? f( i, 13 /* TokenTypes.EOF */ ) : Ot(n, i); } return { nextToken: vn, currentOffset: s, currentPosition: o, context: u }; } const ia = "parser", ca = /(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g; function ua(e, t, r) { switch (e) { case "\\\\": return "\\"; case "\\'": return "'"; default: { const n = parseInt(t || r, 16); return n <= 55295 || n >= 57344 ? String.fromCodePoint(n) : "�"; } } } function da(e = {}) { const t = e.location !== !1, { onError: r } = e; function n(c, _, b, O, ...A) { const L = c.currentPosition(); if (L.offset += O, L.column += O, r) { const T = t ? An(b, L) : null, P = ht(_, T, { domain: ia, args: A }); r(P); } } function s(c, _, b) { const O = { type: c }; return t && (O.start = _, O.end = _, O.loc = { start: b, end: b }), O; } function o(c, _, b, O) { t && (c.end = _, c.loc && (c.loc.end = b)); } function a(c, _) { const b = c.context(), O = s(3, b.offset, b.startLoc); return O.value = _, o(O, c.currentOffset(), c.currentPosition()), O; } function l(c, _) { const b = c.context(), { lastOffset: O, lastStartLoc: A } = b, L = s(5, O, A); return L.index = parseInt(_, 10), c.nextToken(), o(L, c.currentOffset(), c.currentPosition()), L; } function i(c, _) { const b = c.context(), { lastOffset: O, lastStartLoc: A } = b, L = s(4, O, A); return L.key = _, c.nextToken(), o(L, c.currentOffset(), c.currentPosition()), L; } function u(c, _) { const b = c.context(), { lastOffset: O, lastStartLoc: A } = b, L = s(9, O, A); return L.value = _.replace(ca, ua), c.nextToken(), o(L, c.currentOffset(), c.currentPosition()), L; } function d(c) { const _ = c.nextToken(), b = c.context(), { lastOffset: O, lastStartLoc: A } = b, L = s(8, O, A); return _.type !== 11 ? (n(c, U.UNEXPECTED_EMPTY_LINKED_MODIFIER, b.lastStartLoc, 0), L.value = "", o(L, O, A), { nextConsumeToken: _, node: L }) : (_.value == null && n(c, U.UNEXPECTED_LEXICAL_ANALYSIS, b.lastStartLoc, 0, Me(_)), L.value = _.value || "", o(L, c.currentOffset(), c.currentPosition()), { node: L }); } function h(c, _) { const b = c.context(), O = s(7, b.offset, b.startLoc); return O.value = _, o(O, c.currentOffset(), c.currentPosition()), O; } function f(c) { const _ = c.context(), b = s(6, _.offset, _.startLoc); let O = c.nextToken(); if (O.type === 8) { const A = d(c); b.modifier = A.node, O = A.nextConsumeToken || c.nextToken(); } switch (O.type !== 9 && n(c, U.UNEXPECTED_LEXICAL_ANALYSIS, _.lastStartLoc, 0, Me(O)), O = c.nextToken(), O.type === 2 && (O = c.nextToken()), O.type) { case 10: O.value == null && n(c, U.UNEXPECTED_LEXICAL_ANALYSIS, _.lastStartLoc, 0, Me(O)), b.key = h(c, O.value || ""); break; case 4: O.value == null && n(c, U.UNEXPECTED_LEXICAL_ANALYSIS, _.lastStartLoc, 0, Me(O)), b.key = i(c, O.value || ""); break; case 5: O.value == null && n(c, U.UNEXPECTED_LEXICAL_ANALYSIS, _.lastStartLoc, 0, Me(O)), b.key = l(c, O.value || ""); break; case 6: O.value == null && n(c, U.UNEXPECTED_LEXICAL_ANALYSIS, _.lastStartLoc, 0, Me(O)), b.key = u(c, O.value || ""); break; default: { n(c, U.UNEXPECTED_EMPTY_LINKED_KEY, _.lastStartLoc, 0); const A = c.context(), L = s(7, A.offset, A.startLoc); return L.value = "", o(L, A.offset, A.startLoc), b.key = L, o(b, A.offset, A.startLoc), { nextConsumeToken: O, node: b }; } } return o(b, c.currentOffset(), c.currentPosition()), { node: b }; } function v(c) { const _ = c.context(), b = _.currentType === 1 ? c.currentOffset() : _.offset, O = _.currentType === 1 ? _.endLoc : _.startLoc, A = s(2, b, O); A.items = []; let L = null; do { const W = L || c.nextToken(); switch (L = null, W.type) { case 0: W.value == null && n(c, U.UNEXPECTED_LEXICAL_ANALYSIS, _.lastStartLoc, 0, Me(W)), A.items.push(a(c, W.value || "")); break; case 5: W.value == null && n(c, U.UNEXPECTED_LEXICAL_ANALYSIS, _.lastStartLoc, 0, Me(W)), A.items.push(l(c, W.value || "")); break; case 4: W.value == null && n(c, U.UNEXPECTED_LEXICAL_ANALYSIS, _.lastStartLoc, 0, Me(W)), A.items.push(i(c, W.value || "")); break; case 6: W.value == null && n(c, U.UNEXPECTED_LEXICAL_ANALYSIS, _.lastStartLoc, 0, Me(W)), A.items.push(u(c, W.value || "")); break; case 7: { const G = f(c); A.items.push(G.node), L = G.nextConsumeToken || null; break; } } } while (_.currentType !== 13 && _.currentType !== 1); const T = _.currentType === 1 ? _.lastOffset : c.currentOffset(), P = _.currentType === 1 ? _.lastEndLoc : c.currentPosition(); return o(A, T, P), A; } function E(c, _, b, O) { const A = c.context(); let L = O.items.length === 0; const T = s(1, _, b); T.cases = [], T.cases.push(O); do { const P = v(c); L || (L = P.items.length === 0), T.cases.push(P); } while (A.currentType !== 13); return L && n(c, U.MUST_HAVE_MESSAGES_IN_PLURAL, b, 0), o(T, c.currentOffset(), c.currentPosition()), T; } function w(c) { const _ = c.context(), { offset: b, startLoc: O } = _, A = v(c); return _.currentType === 13 ? A : E(c, b, O, A); } function g(c) { const _ = la(c, me({}, e)), b = _.context(), O = s(0, b.offset, b.startLoc); return t && O.loc && (O.loc.source = c), O.body = w(_), e.onCacheKey && (O.cacheKey = e.onCacheKey(c)), b.currentType !== 13 && n(_, U.UNEXPECTED_LEXICAL_ANALYSIS, b.lastStartLoc, 0, c[b.offset] || ""), o(O, _.currentOffset(), _.currentPosition()), O; } return { parse: g }; } function Me(e) { if (e.type === 13) return "EOF"; const t = (e.value || "").replace(/\r?\n/gu, "\\n"); return t.length > 10 ? t.slice(0, 9) + "…" : t; } function fa(e, t = {}) { const r = { ast: e, helpers: /* @__PURE__ */ new Set() }; return { context: () => r, helper: (o) => (r.helpers.add(o), o) }; } function hr(e, t) { for (let r = 0; r < e.length; r++) Qn(e[r], t); } function Qn(e, t) { switch (e.type) { case 1: hr(e.cases, t), t.helper( "plural" /* HelperNameMap.PLURAL */ ); break; case 2: hr(e.items, t); break; case 6: { Qn(e.key, t), t.helper( "linked" /* HelperNameMap.LINKED */ ), t.helper( "type" /* HelperNameMap.TYPE */ ); break; } case 5: t.helper( "interpolate" /* HelperNameMap.INTERPOLATE */ ), t.helper( "list" /* HelperNameMap.LIST */ ); break; case 4: t.helper( "interpolate" /* HelperNameMap.INTERPOLATE */ ), t.helper( "named" /* HelperNameMap.NAMED */ ); break; } } function pa(e, t = {}) { const r = fa(e); r.helper( "normalize" /* HelperNameMap.NORMALIZE */ ), e.body && Qn(e.body, r); const n = r.context(); e.helpers = Array.from(n.helpers); } function ma(e) { const t = e.body; return t.type === 2 ? _r(t) : t.cases.forEach((r) => _r(r)), e; } function _r(e) { if (e.items.length === 1) { const t = e.items[0]; (t.type === 3 || t.type === 9) && (e.static = t.value, delete t.value); } else { const t = []; for (let r = 0; r < e.items.length; r++) { const n = e.items[r]; if (!(n.type === 3 || n.type === 9) || n.value == null) break; t.push(n.value); } if (t.length === e.items.length) { e.static = Jn(t); for (let r = 0; r < e.items.length; r++) { const n = e.items[r]; (n.type === 3 || n.type === 9) && delete n.value; } } } } const ha = "minifier"; function dt(e) { switch (e.t = e.type, e.type) { case 0: { const t = e; dt(t.body), t.b = t.body, delete t.body; break; } case 1: { const t = e, r = t.cases; for (let n = 0; n < r.length; n++) dt(r[n]); t.c = r, delete t.cases; break; } case 2: { const t = e, r = t.items; for (let n = 0; n < r.length; n++) dt(r[n]); t.i = r, delete t.items, t.static && (t.s = t.static, delete t.static); break; } case 3: case 9: case 8: case 7: { const t = e; t.value && (t.v = t.value, delete t.value); break; } case 6: { const t = e; dt(t.key), t.k = t.key, delete t.key, t.modifier && (dt(t.modifier), t.m = t.modifier, delete t.modifier); break; } case 5: { const t = e; t.i = t.index, delete t.index; break; } case 4: { const t = e; t.k = t.key, delete t.key; break; } default: if (process.env.NODE_ENV !== "production") throw ht(U.UNHANDLED_MINIFIER_NODE_TYPE, null, { domain: ha, args: [e.type] }); } delete e.type; } const _a = "parser"; function ga(e, t) { const { sourceMap: r, filename: n, breakLineCode: s, needIndent: o } = t, a = t.location !== !1, l = { filename: n, code: "", column: 1, line: 1, offset: 0, map: void 0, breakLineCode: s, needIndent: o, indentLevel: 0 }; a && e.loc && (l.source = e.loc.source); const i = () => l; function u(g, c) { l.code += g; } function d(g, c = !0) { const _ = c ? s : ""; u(o ? _ + " ".repeat(g) : _); } function h(g = !0) { const c = ++l.indentLevel; g && d(c); } function f(g = !0) { const c = --l.indentLevel; g && d(c); } function v() { d(l.indentLevel); } return { context: i, push: u, indent: h, deindent: f, newline: v, helper: (g) => `_${g}`, needIndent: () => l.needIndent }; } function ya(e, t) { const { helper: r } = e; e.push(`${r( "linked" /* HelperNameMap.LINKED */ )}(`), mt(e, t.key), t.modifier ? (e.push(", "), mt(e, t.modifier), e.push(", _type")) : e.push(", undefined, _type"), e.push(")"); } function va(e, t) { const { helper: r, needIndent: n } = e; e.push(`${r( "normalize" /* HelperNameMap.NORMALIZE */ )}([`), e.indent(n()); const s = t.items.length; for (let o = 0; o < s && (mt(e, t.items[o]), o !== s - 1); o++) e.push(", "); e.deindent(n()), e.push("])"); } function ba(e, t) { const { helper: r, needIndent: n } = e; if (t.cases.length > 1) { e.push(`${r( "plural" /* HelperNameMap.PLURAL */ )}([`), e.indent(n()); const s = t.cases.length; for (let o = 0; o < s && (mt(e, t.cases[o]), o !== s - 1); o++) e.push(", "); e.deindent(n()), e.push("])"); } } function Ea(e, t) { t.body ? mt(e, t.body) : e.push("null"); } function mt(e, t) { const { helper: r } = e; switch (t.type) { case 0: Ea(e, t); break; case 1: ba(e, t); break; case 2: va(e, t); break; case 6: ya(e, t); break; case 8: e.push(JSON.stringify(t.value), t); break; case 7: e.push(JSON.stringify(t.value), t); break; case 5: e.push(`${r( "interpolate" /* HelperNameMap.INTERPOLATE */ )}(${r( "list" /* HelperNameMap.LIST */ )}(${t.index}))`, t); break; case 4: e.push(`${r( "interpolate" /* HelperNameMap.INTERPOLATE */ )}(${r( "named" /* HelperNameMap.NAMED */ )}(${JSON.stringify(t.key)}))`, t); break; case 9: e.push(JSON.stringify(t.value), t); break; case 3: e.push(JSON.stringify(t.value), t); break; default: if (process.env.NODE_ENV !== "production") throw ht(U.UNHANDLED_CODEGEN_NODE_TYPE, null, { domain: _a, args: [t.type] }); } } const wa = (e, t = {}) => { const r = R(t.mode) ? t.mode : "normal", n = R(t.filename) ? t.filename : "message.intl", s = !!t.sourceMap, o = t.breakLineCode != null ? t.breakLineCode : r === "arrow" ? ";" : ` `, a = t.needIndent ? t.needIndent : r !== "arrow", l = e.helpers || [], i = ga(e, { mode: r, filename: n, sourceMap: s, breakLineCode: o, needIndent: a }); i.push(r === "normal" ? "function __msg__ (ctx) {" : "(ctx) => {"), i.indent(a), l.length > 0 && (i.push(`const { ${Jn(l.map((h) => `${h}: _${h}`), ", ")} } = ctx`), i.newline()), i.push("return "), mt(i, e), i.deindent(a), i.push("}"), delete e.helpers; const { code: u, map: d } = i.context(); return { ast: e, code: u, map: d ? d.toJSON() : void 0 // eslint-disable-line @typescript-eslint/no-explicit-any }; }; function Na(e, t = {}) { const r = me({}, t), n = !!r.jit, s = !!r.minify, o = r.optimize == null ? !0 : r.optimize, l = da(r).parse(e); return n ? (o && ma(l), s && dt(l), { ast: l, code: "" }) : (pa(l, r), wa(l, r)); } /*! * core-base v11.0.0-beta.2 * (c) 2024 kazuya kawaguchi * Released under the MIT License. */ function Oa() { typeof __INTLIFY_PROD_DEVTOOLS__ != "boolean" && (tt().__INTLIFY_PROD_DEVTOOLS__ = !1), typeof __INTLIFY_DROP_MESSAGE_COMPILER__ != "boolean" && (tt().__INTLIFY_DROP_MESSAGE_COMPILER__ = !1); } function En(e) { return (r) => Ta(r, e); } function Ta(e, t) { const r = Ca(t); if (r == null) throw Ct( 0 /* NodeTypes.Resource */ ); if (Zn(r) === 1) { const o = La(r); return e.plural(o.reduce((a, l) => [ ...a, gr(e, l) ], [])); } else return gr(e, r); } const ka = ["b", "body"]; function Ca(e) { return Ke(e, ka); } const Sa = ["c", "cases"]; function La(e) { return Ke(e, Sa, []); } function gr(e, t) { const r = Aa(t); if (r != null) return e.type === "text" ? r : e.normalize([r]); { const n = Ra(t).reduce((s, o) => [...s, In(e, o)], []); return e.normalize(n); } } const xa = ["s", "static"]; function Aa(e) { return Ke(e, xa); } const Ia = ["i", "items"]; function Ra(e) { return Ke(e, Ia, []); } function In(e, t) { const r = Zn(t); switch (r) { case 3: return Ut(t, r); case 9: return Ut(t, r); case 4: { const n = t; if (De(n, "k") && n.k) return e.interpolate(e.named(n.k)); if (De(n, "key") && n.key) return e.interpolate(e.named(n.key)); throw Ct(r); } case 5: { const n = t; if (De(n, "i") && pe(n.i)) return e.interpolate(e.list(n.i)); if (De(n, "index") && pe(n.index)) return e.interpolate(e.list(n.index)); throw Ct(r); } case 6: { const n = t, s = $a(n), o = Ua(n); return e.linked(In(e, o), s ? In(e, s) : void 0, e.type); } case 7: return Ut(t, r); case 8: return Ut(t, r); default: throw new Error(`unhandled node on format message part: ${r}`); } } const Da = ["t", "type"]; function Zn(e) { return Ke(e, Da); } const Pa = ["v", "value"]; function Ut(e, t) { const r = Ke(e, Pa); if (r) return r; throw Ct(t); } const Ma = ["m", "modifier"]; function $a(e) { return Ke(e, Ma); } const Fa = ["k", "key"]; function Ua(e) { const t = Ke(e, Fa); if (t) return t; throw Ct( 6 /* NodeTypes.Linked */ ); } function Ke(e, t, r) { for (let n = 0; n < t.length; n++) { const s = t[n]; if (De(e, s) && e[s] != null) return e[s]; } return r; } function Ct(e) { return new Error(`unhandled node type: ${e}`); } const Va = "Detected HTML in '{source}' message. Recommend not using HTML messages to avoid XSS."; function Ba(e, t) { t && ea(e) && Ye(rn(Va, { source: e })); } const qa = (e) => e; let Vt = te(); function at(e) { return X(e) && Zn(e) === 0 && (De(e, "b") || De(e, "body")); } function ja(e, t = {}) { let r = !1; const n = t.onError || Qo; return t.onError = (s) => { r = !0, n(s); }, { ...Na(e, t), detectError: r }; } // @__NO_SIDE_EFFECTS__ function Ha(e, t) { if (!__INTLIFY_DROP_MESSAGE_COMPILER__ && R(e)) { const r = le(t.warnHtmlMessage) ? t.warnHtmlMessage : !0; process.env.NODE_ENV !== "production" && Ba(e, r); const s = (t.onCacheKey || qa)(e), o = Vt[s]; if (o) return o; const { ast: a, detectError: l } = ja(e, { ...t, location: process.env.NODE_ENV !== "production", jit: !0 }), i = En(a); return l ? i : Vt[s] = i; } else { if (process.env.NODE_ENV !== "production" && !at(e)) return Ye(`the message that is resolve with key '${t.key}' is not supported for jit compilation`), () => e; const r = e.cacheKey; if (r) { const n = Vt[r]; return n || (Vt[r] = En(e)); } else return En(e); } } let St = null; function Wa(e) { St = e; } function Ga(e, t, r) { St && St.emit("i18n:init", { timestamp: Date.now(), i18n: e, version: t, meta: r }); } const Ya = /* @__PURE__ */ Ka("function:translate"); function Ka(e) { return (t) => St && St.emit(e, t); } const ge = { INVALID_ARGUMENT: zo, // 17 INVALID_DATE_ARGUMENT: 18, INVALID_ISO_DATE_ARGUMENT: 19, NOT_SUPPORT_NON_STRING_MESSAGE: 20, NOT_SUPPORT_LOCALE_PROMISE_VALUE: 21, NOT_SUPPORT_LOCALE_ASYNC_FUNCTION: 22, NOT_SUPPORT_LOCALE_TYPE: 23 }, Xa = 24; function Be(e) { return ht(e, null, process.env.NODE_ENV !== "production" ? { messages: za } : void 0); } const za = { [ge.INVALID_ARGUMENT]: "Invalid arguments", [ge.INVALID_DATE_ARGUMENT]: "The date provided is an invalid Date object.Make sure your Date represents a valid date.", [ge.INVALID_ISO_DATE_ARGUMENT]: "The argument provided is not a valid ISO date string", [ge.NOT_SUPPORT_NON_STRING_MESSAGE]: "Not support non-string message", [ge.NOT_SUPPORT_LOCALE_PROMISE_VALUE]: "cannot support promise value", [ge.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION]: "cannot support async function", [ge.NOT_SUPPORT_LOCALE_TYPE]: "cannot support locale type" }; function er(e, t) { return t.locale != null ? yr(t.locale) : yr(e.locale); } let wn; function yr(e) { if (R(e)) return e; if (re(e)) { if (e.resolvedOnce && wn != null) return wn; if (e.constructor.name === "Function") { const t = e(); if (Ho(t)) throw Be(ge.NOT_SUPPORT_LOCALE_PROMISE_VALUE); return wn = t; } else throw Be(ge.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION); } else throw Be(ge.NOT_SUPPORT_LOCALE_TYPE); } function Ja(e, t, r) { return [.../* @__PURE__ */ new Set([ r, ...fe(t) ? t : X(t) ? Object.keys(t) : R(t) ? [t] : [r] ])]; } function os(e, t, r) { const n = R(r) ? r : Qt, s = e; s.__localeChainCache || (s.__localeChainCache = /* @__PURE__ */ new Map()); let o = s.__localeChainCache.get(n); if (!o) { o = []; let a = [r]; for (; fe(a); ) a = vr(o, a, t); const l = fe(t) || !K(t) ? t : t.default ? t.default : null; a = R(l) ? [l] : l, fe(a) && vr(o, a, !1), s.__localeChainCache.set(n, o); } return o; } function vr(e, t, r) { let n = !0; for (let s = 0; s < t.length && le(n); s++) { const o = t[s]; R(o) && (n = Qa(e, t[s], r)); } return n; } function Qa(e, t, r) { let n; const s = t.split("-"); do { const o = s.join("-"); n = Za(e, o, r), s.splice(-1, 1); } while (s.length && n === !0); return n; } function Za(e, t, r) { let n = !1; if (!e.includes(t) && (n = !0, t)) { n = t[t.length - 1] !== "!"; const s = t.replace(/!/g, ""); e.push(s), (fe(r) || K(r)) && r[s] && (n = r[s]); } return n; } const Xe = []; Xe[ 0 /* States.BEFORE_PATH */ ] = { w: [ 0 /* States.BEFORE_PATH */ ], i: [ 3, 0 /* Actions.APPEND */ ], "[": [ 4 /* States.IN_SUB_PATH */ ], o: [ 7 /* States.AFTER_PATH */ ] }; Xe[ 1 /* States.IN_PATH */ ] = { w: [ 1 /* States.IN_PATH */ ], ".": [ 2 /* States.BEFORE_IDENT */ ], "[": [ 4 /* States.IN_SUB_PATH */ ], o: [ 7 /* States.AFTER_PATH */ ] }; Xe[ 2 /* States.BEFORE_IDENT */ ] = { w: [ 2 /* States.BEFORE_IDENT */ ], i: [ 3, 0 /* Actions.APPEND */ ], 0: [ 3, 0 /* Actions.APPEND */ ] }; Xe[ 3 /* States.IN_IDENT */ ] = { i: [ 3, 0 /* Actions.APPEND */ ], 0: [ 3, 0 /* Actions.APPEND */ ], w: [ 1, 1 /* Actions.PUSH */ ], ".": [ 2, 1 /* Actions.PUSH */ ], "[": [ 4, 1 /* Actions.PUSH */ ], o: [ 7, 1 /* Actions.PUSH */ ] }; Xe[ 4 /* States.IN_SUB_PATH */ ] = { "'": [ 5, 0 /* Actions.APPEND */ ], '"': [ 6, 0 /* Actions.APPEND */ ], "[": [ 4, 2 /* Actions.INC_SUB_PATH_DEPTH */ ], "]": [ 1, 3 /* Actions.PUSH_SUB_PATH */ ], o: 8, l: [ 4, 0 /* Actions.APPEND */ ] }; Xe[ 5 /* States.IN_SINGLE_QUOTE */ ] = { "'": [ 4, 0 /* Actions.APPEND */ ], o: 8, l: [ 5, 0 /* Actions.APPEND */ ] }; Xe[ 6 /* States.IN_DOUBLE_QUOTE */ ] = { '"': [ 4, 0 /* Actions.APPEND */ ], o: 8, l: [ 6, 0 /* Actions.APPEND */ ] }; const el = /^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/; function tl(e) { return el.test(e); } function nl(e) { const t = e.charCodeAt(0), r = e.charCodeAt(e.length - 1); return t === r && (t === 34 || t === 39) ? e.slice(1, -1) : e; } function rl(e) { if (e == null) return "o"; switch (e.charCodeAt(0)) { case 91: case 93: case 46: case 34: case 39: return e; case 95: case 36: case 45: return "i"; case 9: case 10: case 13: case 160: case 65279: case 8232: case 8233: return "w"; } return "i"; } function sl(e) { const t = e.trim(); return e.charAt(0) === "0" && isNaN(parseInt(e)) ? !1 : tl(t) ? nl(t) : "*" + t; } function ol(e) { const t = []; let r = -1, n = 0, s = 0, o, a, l, i, u, d, h; const f = []; f[ 0 /* Actions.APPEND */ ] = () => { a === void 0 ? a = l : a += l; }, f[ 1 /* Actions.PUSH */ ] = () => { a !== void 0 && (t.push(a), a = void 0); }, f[ 2 /* Actions.INC_SUB_PATH_DEPTH */ ] = () => { f[ 0 /* Actions.APPEND */ ](), s++; }, f[ 3 /* Actions.PUSH_SUB_PATH */ ] = () => { if (s > 0) s--, n = 4, f[ 0 /*