@axewo/cnsframework
Version:
一个免费开源的中后台管理系统基础解决方案,基于 Vue3、TypeScript、Element Plus、Pinia 和 Vite 等主流技术
1,571 lines • 168 kB
JavaScript
import { effectScope as Wr, ref as H, markRaw as Se, toRaw as ot, hasInjectionContext as bs, inject as ge, getCurrentInstance as Sn, watch as Ue, unref as Ie, reactive as Gr, isRef as ke, isReactive as Ot, toRef as pt, nextTick as Zt, computed as X, getCurrentScope as _s, onScopeDispose as ws, toRefs as Wn, watchEffect as On, onBeforeUnmount as Jr, shallowRef as Ss, shallowReactive as Os, defineComponent as Kr, h as Yr, provide as Mt, createApp as Rs } from "vue";
import { ElMessage as Ft } from "element-plus";
var Qr = !1;
function lt(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 Bt(e, t) {
if (Array.isArray(e)) {
e.splice(t, 1);
return;
}
delete e[t];
}
function Ts() {
return Xr().__VUE_DEVTOOLS_GLOBAL_HOOK__;
}
function Xr() {
return typeof navigator < "u" && typeof window < "u" ? window : typeof global < "u" ? global : {};
}
const As = typeof Proxy == "function", Cs = "devtools-plugin:setup", Ps = "plugin:settings:set";
let Pe, en;
function Ns() {
var e;
return Pe !== void 0 || (typeof window < "u" && window.performance ? (Pe = !0, en = window.performance) : typeof global < "u" && (!((e = global.perf_hooks) === null || e === void 0) && e.performance) ? (Pe = !0, en = global.perf_hooks.performance) : Pe = !1), Pe;
}
function xs() {
return Ns() ? en.now() : Date.now();
}
class $s {
constructor(t, n) {
this.target = null, this.targetQueue = [], this.onQueue = [], this.plugin = t, this.hook = n;
const r = {};
if (t.settings)
for (const i in t.settings) {
const a = t.settings[i];
r[i] = a.defaultValue;
}
const o = `__vue-devtools-plugin-settings__${t.id}`;
let s = Object.assign({}, r);
try {
const i = localStorage.getItem(o), a = JSON.parse(i);
Object.assign(s, a);
} catch {
}
this.fallbacks = {
getSettings() {
return s;
},
setSettings(i) {
try {
localStorage.setItem(o, JSON.stringify(i));
} catch {
}
s = i;
},
now() {
return xs();
}
}, n && n.on(Ps, (i, a) => {
i === this.plugin.id && this.fallbacks.setSettings(a);
}), this.proxiedOn = new Proxy({}, {
get: (i, a) => this.target ? this.target.on[a] : (...u) => {
this.onQueue.push({
method: a,
args: u
});
}
}), this.proxiedTarget = new Proxy({}, {
get: (i, a) => this.target ? this.target[a] : a === "on" ? this.proxiedOn : Object.keys(this.fallbacks).includes(a) ? (...u) => (this.targetQueue.push({
method: a,
args: u,
resolve: () => {
}
}), this.fallbacks[a](...u)) : (...u) => new Promise((f) => {
this.targetQueue.push({
method: a,
args: u,
resolve: f
});
})
});
}
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 Rn(e, t) {
const n = e, r = Xr(), o = Ts(), s = As && n.enableEarlyProxy;
if (o && (r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !s))
o.emit(Cs, e, t);
else {
const i = s ? new $s(n, o) : null;
(r.__VUE_DEVTOOLS_PLUGINS__ = r.__VUE_DEVTOOLS_PLUGINS__ || []).push({
pluginDescriptor: n,
setupFn: t,
proxy: i
}), i && t(i.proxiedTarget);
}
}
/*!
* pinia v2.1.7
* (c) 2023 Eduardo San Martin Morote
* @license MIT
*/
let Je;
const Ze = (e) => Je = e, Zr = process.env.NODE_ENV !== "production" ? Symbol("pinia") : (
/* istanbul ignore next */
Symbol()
);
function Oe(e) {
return e && typeof e == "object" && Object.prototype.toString.call(e) === "[object Object]" && typeof e.toJSON != "function";
}
var re;
(function(e) {
e.direct = "direct", e.patchObject = "patch object", e.patchFunction = "patch function";
})(re || (re = {}));
const Rt = typeof window < "u", Ke = (process.env.NODE_ENV !== "production" || !1) && process.env.NODE_ENV !== "test" && Rt, Gn = /* @__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 })();
function Is(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 Tn(e, t, n) {
const r = new XMLHttpRequest();
r.open("GET", e), r.responseType = "blob", r.onload = function() {
no(r.response, t, n);
}, r.onerror = function() {
console.error("could not download file");
}, r.send();
}
function eo(e) {
const t = new XMLHttpRequest();
t.open("HEAD", e, !1);
try {
t.send();
} catch {
}
return t.status >= 200 && t.status <= 299;
}
function mt(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 gt = typeof navigator == "object" ? navigator : { userAgent: "" }, to = /* @__PURE__ */ (() => /Macintosh/.test(gt.userAgent) && /AppleWebKit/.test(gt.userAgent) && !/Safari/.test(gt.userAgent))(), no = Rt ? (
// Use download attribute first if possible (#193 Lumia mobile) unless this is a macOS WebView or mini program
typeof HTMLAnchorElement < "u" && "download" in HTMLAnchorElement.prototype && !to ? ks : (
// Use msSaveOrOpenBlob as a second approach
"msSaveOrOpenBlob" in gt ? js : (
// Fallback to using FileReader and a popup
Ds
)
)
) : () => {
};
function ks(e, t = "download", n) {
const r = document.createElement("a");
r.download = t, r.rel = "noopener", typeof e == "string" ? (r.href = e, r.origin !== location.origin ? eo(r.href) ? Tn(e, t, n) : (r.target = "_blank", mt(r)) : mt(r)) : (r.href = URL.createObjectURL(e), setTimeout(function() {
URL.revokeObjectURL(r.href);
}, 4e4), setTimeout(function() {
mt(r);
}, 0));
}
function js(e, t = "download", n) {
if (typeof e == "string")
if (eo(e))
Tn(e, t, n);
else {
const r = document.createElement("a");
r.href = e, r.target = "_blank", setTimeout(function() {
mt(r);
});
}
else
navigator.msSaveOrOpenBlob(Is(e, n), t);
}
function Ds(e, t, n, r) {
if (r = r || open("", "_blank"), r && (r.document.title = r.document.body.innerText = "downloading..."), typeof e == "string")
return Tn(e, t, n);
const o = e.type === "application/octet-stream", s = /constructor/i.test(String(Gn.HTMLElement)) || "safari" in Gn, i = /CriOS\/[\d]+/.test(navigator.userAgent);
if ((i || o && s || to) && typeof FileReader < "u") {
const a = new FileReader();
a.onloadend = function() {
let u = a.result;
if (typeof u != "string")
throw r = null, new Error("Wrong reader.result type");
u = i ? u : u.replace(/^data:[^;]*;/, "data:attachment/file;"), r ? r.location.href = u : location.assign(u), r = null;
}, a.readAsDataURL(e);
} else {
const a = URL.createObjectURL(e);
r ? r.location.assign(a) : location.href = a, r = null, setTimeout(function() {
URL.revokeObjectURL(a);
}, 4e4);
}
}
function z(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 An(e) {
return "_a" in e && "install" in e;
}
function ro() {
if (!("clipboard" in navigator))
return z("Your browser doesn't support the Clipboard API", "error"), !0;
}
function oo(e) {
return e instanceof Error && e.message.toLowerCase().includes("document is not focused") ? (z('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.', "warn"), !0) : !1;
}
async function Vs(e) {
if (!ro())
try {
await navigator.clipboard.writeText(JSON.stringify(e.state.value)), z("Global state copied to clipboard.");
} catch (t) {
if (oo(t))
return;
z("Failed to serialize the state. Check the console for more details.", "error"), console.error(t);
}
}
async function Ls(e) {
if (!ro())
try {
so(e, JSON.parse(await navigator.clipboard.readText())), z("Global state pasted from clipboard.");
} catch (t) {
if (oo(t))
return;
z("Failed to deserialize the state from clipboard. Check the console for more details.", "error"), console.error(t);
}
}
async function Us(e) {
try {
no(new Blob([JSON.stringify(e.state.value)], {
type: "text/plain;charset=utf-8"
}), "pinia-state.json");
} catch (t) {
z("Failed to export the state as JSON. Check the console for more details.", "error"), console.error(t);
}
}
let ie;
function Ms() {
ie || (ie = document.createElement("input"), ie.type = "file", ie.accept = ".json");
function e() {
return new Promise((t, n) => {
ie.onchange = async () => {
const r = ie.files;
if (!r)
return t(null);
const o = r.item(0);
return t(o ? { text: await o.text(), file: o } : null);
}, ie.oncancel = () => t(null), ie.onerror = n, ie.click();
});
}
return e;
}
async function Fs(e) {
try {
const n = await Ms()();
if (!n)
return;
const { text: r, file: o } = n;
so(e, JSON.parse(r)), z(`Global state imported from "${o.name}".`);
} catch (t) {
z("Failed to import the state from JSON. Check the console for more details.", "error"), console.error(t);
}
}
function so(e, t) {
for (const n in t) {
const r = e.state.value[n];
r ? Object.assign(r, t[n]) : e.state.value[n] = t[n];
}
}
function ee(e) {
return {
_custom: {
display: e
}
};
}
const io = "🍍 Pinia (root)", tn = "_root";
function Bs(e) {
return An(e) ? {
id: tn,
label: io
} : {
id: e.$id,
label: e.$id
};
}
function Hs(e) {
if (An(e)) {
const n = Array.from(e._s.keys()), r = e._s;
return {
state: n.map((s) => ({
editable: !0,
key: s,
value: e.state.value[s]
})),
getters: n.filter((s) => r.get(s)._getters).map((s) => {
const i = r.get(s);
return {
editable: !1,
key: s,
value: i._getters.reduce((a, u) => (a[u] = i[u], a), {})
};
})
};
}
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 zs(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: ee(e.type),
key: ee(e.key),
oldValue: e.oldValue,
newValue: e.newValue
} : {};
}
function qs(e) {
switch (e) {
case re.direct:
return "mutation";
case re.patchFunction:
return "$patch";
case re.patchObject:
return "$patch";
default:
return "unknown";
}
}
let $e = !0;
const yt = [], we = "pinia:mutations", W = "pinia", { assign: Ws } = Object, _t = (e) => "🍍 " + e;
function Gs(e, t) {
Rn({
id: "dev.esm.pinia",
label: "Pinia 🍍",
logo: "https://pinia.vuejs.org/logo.svg",
packageName: "pinia",
homepage: "https://pinia.vuejs.org",
componentStateTypes: yt,
app: e
}, (n) => {
typeof n.now != "function" && z("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: we,
label: "Pinia 🍍",
color: 15064968
}), n.addInspector({
id: W,
label: "Pinia 🍍",
icon: "storage",
treeFilterPlaceholder: "Search stores",
actions: [
{
icon: "content_copy",
action: () => {
Vs(t);
},
tooltip: "Serialize and copy the state"
},
{
icon: "content_paste",
action: async () => {
await Ls(t), n.sendInspectorTree(W), n.sendInspectorState(W);
},
tooltip: "Replace the state with the content of your clipboard"
},
{
icon: "save",
action: () => {
Us(t);
},
tooltip: "Save the state as a JSON file"
},
{
icon: "folder_open",
action: async () => {
await Fs(t), n.sendInspectorTree(W), n.sendInspectorState(W);
},
tooltip: "Import the state from a JSON file"
}
],
nodeActions: [
{
icon: "restore",
tooltip: 'Reset the state (with "$reset")',
action: (r) => {
const o = t._s.get(r);
o ? typeof o.$reset != "function" ? z(`Cannot reset "${r}" store because it doesn't have a "$reset" method implemented.`, "warn") : (o.$reset(), z(`Store "${r}" reset.`)) : z(`Cannot reset "${r}" store because it wasn't found.`, "warn");
}
}
]
}), n.on.inspectComponent((r, o) => {
const s = r.componentInstance && r.componentInstance.proxy;
if (s && s._pStores) {
const i = r.componentInstance.proxy._pStores;
Object.values(i).forEach((a) => {
r.instanceData.state.push({
type: _t(a.$id),
key: "state",
editable: !0,
value: a._isOptionsAPI ? {
_custom: {
value: ot(a.$state),
actions: [
{
icon: "restore",
tooltip: "Reset the state of this store",
action: () => a.$reset()
}
]
}
} : (
// NOTE: workaround to unwrap transferred refs
Object.keys(a.$state).reduce((u, f) => (u[f] = a.$state[f], u), {})
)
}), a._getters && a._getters.length && r.instanceData.state.push({
type: _t(a.$id),
key: "getters",
editable: !1,
value: a._getters.reduce((u, f) => {
try {
u[f] = a[f];
} catch (c) {
u[f] = c;
}
return u;
}, {})
});
});
}
}), n.on.getInspectorTree((r) => {
if (r.app === e && r.inspectorId === W) {
let o = [t];
o = o.concat(Array.from(t._s.values())), r.rootNodes = (r.filter ? o.filter((s) => "$id" in s ? s.$id.toLowerCase().includes(r.filter.toLowerCase()) : io.toLowerCase().includes(r.filter.toLowerCase())) : o).map(Bs);
}
}), n.on.getInspectorState((r) => {
if (r.app === e && r.inspectorId === W) {
const o = r.nodeId === tn ? t : t._s.get(r.nodeId);
if (!o)
return;
o && (r.state = Hs(o));
}
}), n.on.editInspectorState((r, o) => {
if (r.app === e && r.inspectorId === W) {
const s = r.nodeId === tn ? t : t._s.get(r.nodeId);
if (!s)
return z(`store "${r.nodeId}" not found`, "error");
const { path: i } = r;
An(s) ? i.unshift("state") : (i.length !== 1 || !s._customProperties.has(i[0]) || i[0] in s.$state) && i.unshift("$state"), $e = !1, r.set(s, i, r.state.value), $e = !0;
}
}), n.on.editComponentState((r) => {
if (r.type.startsWith("🍍")) {
const o = r.type.replace(/^🍍\s*/, ""), s = t._s.get(o);
if (!s)
return z(`store "${o}" not found`, "error");
const { path: i } = r;
if (i[0] !== "state")
return z(`Invalid path for store "${o}":
${i}
Only state can be modified.`);
i[0] = "$state", $e = !1, r.set(s, i, r.state.value), $e = !0;
}
});
});
}
function Js(e, t) {
yt.includes(_t(t.$id)) || yt.push(_t(t.$id)), Rn({
id: "dev.esm.pinia",
label: "Pinia 🍍",
logo: "https://pinia.vuejs.org/logo.svg",
packageName: "pinia",
homepage: "https://pinia.vuejs.org",
componentStateTypes: yt,
app: e,
settings: {
logStoreChanges: {
label: "Notify about new/deleted stores",
type: "boolean",
defaultValue: !0
}
// useEmojis: {
// label: 'Use emojis in messages ⚡️',
// type: 'boolean',
// defaultValue: true,
// },
}
}, (n) => {
const r = typeof n.now == "function" ? n.now.bind(n) : Date.now;
t.$onAction(({ after: i, onError: a, name: u, args: f }) => {
const c = ao++;
n.addTimelineEvent({
layerId: we,
event: {
time: r(),
title: "🛫 " + u,
subtitle: "start",
data: {
store: ee(t.$id),
action: ee(u),
args: f
},
groupId: c
}
}), i((l) => {
me = void 0, n.addTimelineEvent({
layerId: we,
event: {
time: r(),
title: "🛬 " + u,
subtitle: "end",
data: {
store: ee(t.$id),
action: ee(u),
args: f,
result: l
},
groupId: c
}
});
}), a((l) => {
me = void 0, n.addTimelineEvent({
layerId: we,
event: {
time: r(),
logType: "error",
title: "💥 " + u,
subtitle: "end",
data: {
store: ee(t.$id),
action: ee(u),
args: f,
error: l
},
groupId: c
}
});
});
}, !0), t._customProperties.forEach((i) => {
Ue(() => Ie(t[i]), (a, u) => {
n.notifyComponentUpdate(), n.sendInspectorState(W), $e && n.addTimelineEvent({
layerId: we,
event: {
time: r(),
title: "Change",
subtitle: i,
data: {
newValue: a,
oldValue: u
},
groupId: me
}
});
}, { deep: !0 });
}), t.$subscribe(({ events: i, type: a }, u) => {
if (n.notifyComponentUpdate(), n.sendInspectorState(W), !$e)
return;
const f = {
time: r(),
title: qs(a),
data: Ws({ store: ee(t.$id) }, zs(i)),
groupId: me
};
a === re.patchFunction ? f.subtitle = "⤵️" : a === re.patchObject ? f.subtitle = "🧩" : i && !Array.isArray(i) && (f.subtitle = i.type), i && (f.data["rawEvent(s)"] = {
_custom: {
display: "DebuggerEvent",
type: "object",
tooltip: "raw DebuggerEvent[]",
value: i
}
}), n.addTimelineEvent({
layerId: we,
event: f
});
}, { detached: !0, flush: "sync" });
const o = t._hotUpdate;
t._hotUpdate = Se((i) => {
o(i), n.addTimelineEvent({
layerId: we,
event: {
time: r(),
title: "🔥 " + t.$id,
subtitle: "HMR update",
data: {
store: ee(t.$id),
info: ee("HMR update")
}
}
}), n.notifyComponentUpdate(), n.sendInspectorTree(W), n.sendInspectorState(W);
});
const { $dispose: s } = t;
t.$dispose = () => {
s(), n.notifyComponentUpdate(), n.sendInspectorTree(W), n.sendInspectorState(W), n.getSettings().logStoreChanges && z(`Disposed "${t.$id}" store 🗑`);
}, n.notifyComponentUpdate(), n.sendInspectorTree(W), n.sendInspectorState(W), n.getSettings().logStoreChanges && z(`"${t.$id}" store installed 🆕`);
});
}
let ao = 0, me;
function Jn(e, t, n) {
const r = t.reduce((o, s) => (o[s] = ot(e)[s], o), {});
for (const o in r)
e[o] = function() {
const s = ao, i = n ? new Proxy(e, {
get(...u) {
return me = s, Reflect.get(...u);
},
set(...u) {
return me = s, Reflect.set(...u);
}
}) : e;
me = s;
const a = r[o].apply(i, arguments);
return me = void 0, a;
};
}
function Ks({ app: e, store: t, options: n }) {
if (t.$id.startsWith("__hot:"))
return;
t._isOptionsAPI = !!n.state, Jn(t, Object.keys(n.actions), t._isOptionsAPI);
const r = t._hotUpdate;
ot(t)._hotUpdate = function(o) {
r.apply(this, arguments), Jn(t, Object.keys(o._hmrPayload.actions), !!t._isOptionsAPI);
}, Js(
e,
// FIXME: is there a way to allow the assignment from Store<Id, S, G, A> to StoreGeneric?
t
);
}
function Ys() {
const e = Wr(!0), t = e.run(() => H({}));
let n = [], r = [];
const o = Se({
install(s) {
Ze(o), o._a = s, s.provide(Zr, o), s.config.globalProperties.$pinia = o, Ke && Gs(s, o), r.forEach((i) => n.push(i)), r = [];
},
use(s) {
return !this._a && !Qr ? r.push(s) : n.push(s), this;
},
_p: n,
// it's actually undefined here
// @ts-expect-error
_a: null,
_e: e,
_s: /* @__PURE__ */ new Map(),
state: t
});
return Ke && typeof Proxy < "u" && o.use(Ks), o;
}
function co(e, t) {
for (const n in t) {
const r = t[n];
if (!(n in e))
continue;
const o = e[n];
Oe(o) && Oe(r) && !ke(r) && !Ot(r) ? e[n] = co(o, r) : e[n] = r;
}
return e;
}
const uo = () => {
};
function Kn(e, t, n, r = uo) {
e.push(t);
const o = () => {
const s = e.indexOf(t);
s > -1 && (e.splice(s, 1), r());
};
return !n && _s() && ws(o), o;
}
function Ne(e, ...t) {
e.slice().forEach((n) => {
n(...t);
});
}
const Qs = (e) => e();
function nn(e, t) {
e instanceof Map && t instanceof Map && t.forEach((n, r) => e.set(r, n)), e instanceof Set && t instanceof Set && t.forEach(e.add, e);
for (const n in t) {
if (!t.hasOwnProperty(n))
continue;
const r = t[n], o = e[n];
Oe(o) && Oe(r) && e.hasOwnProperty(n) && !ke(r) && !Ot(r) ? e[n] = nn(o, r) : e[n] = r;
}
return e;
}
const Xs = process.env.NODE_ENV !== "production" ? Symbol("pinia:skipHydration") : (
/* istanbul ignore next */
Symbol()
);
function Zs(e) {
return !Oe(e) || !e.hasOwnProperty(Xs);
}
const { assign: Q } = Object;
function Yn(e) {
return !!(ke(e) && e.effect);
}
function Qn(e, t, n, r) {
const { state: o, actions: s, getters: i } = t, a = n.state.value[e];
let u;
function f() {
!a && (process.env.NODE_ENV === "production" || !r) && (n.state.value[e] = o ? o() : {});
const c = process.env.NODE_ENV !== "production" && r ? (
// use ref() to unwrap refs inside state TODO: check if this is still necessary
Wn(H(o ? o() : {}).value)
) : Wn(n.state.value[e]);
return Q(c, s, Object.keys(i || {}).reduce((l, d) => (process.env.NODE_ENV !== "production" && d in c && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${d}" in store "${e}".`), l[d] = Se(X(() => {
Ze(n);
const h = n._s.get(e);
return i[d].call(h, h);
})), l), {}));
}
return u = rn(e, f, t, n, r, !0), u;
}
function rn(e, t, n = {}, r, o, s) {
let i;
const a = Q({ actions: {} }, n);
if (process.env.NODE_ENV !== "production" && !r._e.active)
throw new Error("Pinia destroyed");
const u = {
deep: !0
// flush: 'post',
};
process.env.NODE_ENV !== "production" && !Qr && (u.onTrigger = (T) => {
f ? h = T : f == !1 && !S._hotUpdating && (Array.isArray(h) ? h.push(T) : console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."));
});
let f, c, l = [], d = [], h;
const p = r.state.value[e];
!s && !p && (process.env.NODE_ENV === "production" || !o) && (r.state.value[e] = {});
const y = H({});
let O;
function E(T) {
let w;
f = c = !1, process.env.NODE_ENV !== "production" && (h = []), typeof T == "function" ? (T(r.state.value[e]), w = {
type: re.patchFunction,
storeId: e,
events: h
}) : (nn(r.state.value[e], T), w = {
type: re.patchObject,
payload: T,
storeId: e,
events: h
});
const j = O = Symbol();
Zt().then(() => {
O === j && (f = !0);
}), c = !0, Ne(l, w, r.state.value[e]);
}
const _ = s ? function() {
const { state: w } = n, j = w ? w() : {};
this.$patch((B) => {
Q(B, j);
});
} : (
/* istanbul ignore next */
process.env.NODE_ENV !== "production" ? () => {
throw new Error(`🍍: Store "${e}" is built using the setup syntax and does not implement $reset().`);
} : uo
);
function P() {
i.stop(), l = [], d = [], r._s.delete(e);
}
function V(T, w) {
return function() {
Ze(r);
const j = Array.from(arguments), B = [], be = [];
function He(q) {
B.push(q);
}
function ct(q) {
be.push(q);
}
Ne(d, {
args: j,
name: T,
store: S,
after: He,
onError: ct
});
let te;
try {
te = w.apply(this && this.$id === e ? this : S, j);
} catch (q) {
throw Ne(be, q), q;
}
return te instanceof Promise ? te.then((q) => (Ne(B, q), q)).catch((q) => (Ne(be, q), Promise.reject(q))) : (Ne(B, te), te);
};
}
const F = /* @__PURE__ */ Se({
actions: {},
getters: {},
state: [],
hotState: y
}), C = {
_p: r,
// _s: scope,
$id: e,
$onAction: Kn.bind(null, d),
$patch: E,
$reset: _,
$subscribe(T, w = {}) {
const j = Kn(l, T, w.detached, () => B()), B = i.run(() => Ue(() => r.state.value[e], (be) => {
(w.flush === "sync" ? c : f) && T({
storeId: e,
type: re.direct,
events: h
}, be);
}, Q({}, u, w)));
return j;
},
$dispose: P
}, S = Gr(process.env.NODE_ENV !== "production" || Ke ? Q(
{
_hmrPayload: F,
_customProperties: Se(/* @__PURE__ */ new Set())
// devtools custom properties
},
C
// must be added later
// setupStore
) : C);
r._s.set(e, S);
const J = (r._a && r._a.runWithContext || Qs)(() => r._e.run(() => (i = Wr()).run(t)));
for (const T in J) {
const w = J[T];
if (ke(w) && !Yn(w) || Ot(w))
process.env.NODE_ENV !== "production" && o ? lt(y.value, T, pt(J, T)) : s || (p && Zs(w) && (ke(w) ? w.value = p[T] : nn(w, p[T])), r.state.value[e][T] = w), process.env.NODE_ENV !== "production" && F.state.push(T);
else if (typeof w == "function") {
const j = process.env.NODE_ENV !== "production" && o ? w : V(T, w);
J[T] = j, process.env.NODE_ENV !== "production" && (F.actions[T] = w), a.actions[T] = w;
} else
process.env.NODE_ENV !== "production" && Yn(w) && (F.getters[T] = s ? (
// @ts-expect-error
n.getters[T]
) : w, Rt && (J._getters || // @ts-expect-error: same
(J._getters = Se([]))).push(T));
}
if (Q(S, J), Q(ot(S), J), Object.defineProperty(S, "$state", {
get: () => process.env.NODE_ENV !== "production" && o ? y.value : r.state.value[e],
set: (T) => {
if (process.env.NODE_ENV !== "production" && o)
throw new Error("cannot set hotState");
E((w) => {
Q(w, T);
});
}
}), process.env.NODE_ENV !== "production" && (S._hotUpdate = Se((T) => {
S._hotUpdating = !0, T._hmrPayload.state.forEach((w) => {
if (w in S.$state) {
const j = T.$state[w], B = S.$state[w];
typeof j == "object" && Oe(j) && Oe(B) ? co(j, B) : T.$state[w] = B;
}
lt(S, w, pt(T.$state, w));
}), Object.keys(S.$state).forEach((w) => {
w in T.$state || Bt(S, w);
}), f = !1, c = !1, r.state.value[e] = pt(T._hmrPayload, "hotState"), c = !0, Zt().then(() => {
f = !0;
});
for (const w in T._hmrPayload.actions) {
const j = T[w];
lt(S, w, V(w, j));
}
for (const w in T._hmrPayload.getters) {
const j = T._hmrPayload.getters[w], B = s ? (
// special handling of options api
X(() => (Ze(r), j.call(S, S)))
) : j;
lt(S, w, B);
}
Object.keys(S._hmrPayload.getters).forEach((w) => {
w in T._hmrPayload.getters || Bt(S, w);
}), Object.keys(S._hmrPayload.actions).forEach((w) => {
w in T._hmrPayload.actions || Bt(S, w);
}), S._hmrPayload = T._hmrPayload, S._getters = T._getters, S._hotUpdating = !1;
})), Ke) {
const T = {
writable: !0,
configurable: !0,
// avoid warning on devtools trying to display this property
enumerable: !1
};
["_p", "_hmrPayload", "_getters", "_customProperties"].forEach((w) => {
Object.defineProperty(S, w, Q({ value: S[w] }, T));
});
}
return r._p.forEach((T) => {
if (Ke) {
const w = i.run(() => T({
store: S,
app: r._a,
pinia: r,
options: a
}));
Object.keys(w || {}).forEach((j) => S._customProperties.add(j)), Q(S, w);
} else
Q(S, i.run(() => T({
store: S,
app: r._a,
pinia: r,
options: a
})));
}), 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}".`), p && s && n.hydrate && n.hydrate(S.$state, p), f = !0, c = !0, S;
}
function ve(e, t, n) {
let r, o;
const s = typeof t == "function";
if (typeof e == "string")
r = e, o = s ? n : t;
else if (o = e, r = e.id, process.env.NODE_ENV !== "production" && typeof r != "string")
throw new Error('[🍍]: "defineStore()" must be passed a store id as its first argument.');
function i(a, u) {
const f = bs();
if (a = // in test mode, ignore the argument provided as we can always retrieve a
// pinia instance with getActivePinia()
(process.env.NODE_ENV === "test" && Je && Je._testing ? null : a) || (f ? ge(Zr, null) : null), a && Ze(a), process.env.NODE_ENV !== "production" && !Je)
throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
This will fail in production.`);
a = Je, a._s.has(r) || (s ? rn(r, t, o, a) : Qn(r, o, a), process.env.NODE_ENV !== "production" && (i._pinia = a));
const c = a._s.get(r);
if (process.env.NODE_ENV !== "production" && u) {
const l = "__hot:" + r, d = s ? rn(l, t, o, a, !0) : Qn(l, Q({}, o), a, !0);
u._hotUpdate(d), delete a.state.value[l], a._s.delete(l);
}
if (process.env.NODE_ENV !== "production" && Rt) {
const l = Sn();
if (l && l.proxy && // avoid adding stores that are just built for hot module replacement
!u) {
const d = l.proxy, h = "_pStores" in d ? d._pStores : d._pStores = {};
h[r] = c;
}
}
return c;
}
return i.$id = r, i;
}
function ei(e) {
{
e = ot(e);
const t = {};
for (const n in e) {
const r = e[n];
(ke(r) || Ot(r)) && (t[n] = // ---
pt(e, n));
}
return t;
}
}
const Te = Ys(), xe = "admin";
class Y {
static TOKEN = `${xe}-token-key`;
static CONFIG_LAYOUT = `${xe}-config-layout-key`;
static SIDEBAR_STATUS = `${xe}-sidebar-status-key`;
static ACTIVE_THEME_NAME = `${xe}-active-theme-name-key`;
static VISITED_VIEWS = `${xe}-visited-views-key`;
static CACHED_VIEWS = `${xe}-cached-views-key`;
}
/*! js-cookie v3.0.5 | MIT */
function ft(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t];
for (var r in n)
e[r] = n[r];
}
return e;
}
var ti = {
read: function(e) {
return e[0] === '"' && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
},
write: function(e) {
return encodeURIComponent(e).replace(
/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
decodeURIComponent
);
}
};
function on(e, t) {
function n(o, s, i) {
if (!(typeof document > "u")) {
i = ft({}, t, i), typeof i.expires == "number" && (i.expires = new Date(Date.now() + i.expires * 864e5)), i.expires && (i.expires = i.expires.toUTCString()), o = encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
var a = "";
for (var u in i)
i[u] && (a += "; " + u, i[u] !== !0 && (a += "=" + i[u].split(";")[0]));
return document.cookie = o + "=" + e.write(s, o) + a;
}
}
function r(o) {
if (!(typeof document > "u" || arguments.length && !o)) {
for (var s = document.cookie ? document.cookie.split("; ") : [], i = {}, a = 0; a < s.length; a++) {
var u = s[a].split("="), f = u.slice(1).join("=");
try {
var c = decodeURIComponent(u[0]);
if (i[c] = e.read(f, c), o === c)
break;
} catch {
}
}
return o ? i[o] : i;
}
}
return Object.create(
{
set: n,
get: r,
remove: function(o, s) {
n(
o,
"",
ft({}, s, {
expires: -1
})
);
},
withAttributes: function(o) {
return on(this.converter, ft({}, this.attributes, o));
},
withConverter: function(o) {
return on(ft({}, this.converter, o), this.attributes);
}
},
{
attributes: { value: Object.freeze(t) },
converter: { value: Object.freeze(e) }
}
);
}
var lo = on(ti, { path: "/" });
const fo = () => lo.get(Y.TOKEN), Xn = () => {
lo.remove(Y.TOKEN);
}, ho = ve("requestConfig", () => {
const e = H({});
return { setRequestConfig: (n) => {
e.value = n;
}, requestConfig: e };
}), po = ve("systemConfig", () => {
const e = H({});
return { setSystemConfig: (n) => {
e.value = n;
}, systemConfig: e };
}), ni = ve("CNSRoute", () => {
const e = H();
return { setRouter: (n) => {
e.value = n;
}, router: e };
});
function ri() {
return ni(Te);
}
function oi() {
return ho(Te);
}
function mo(e, t) {
return function() {
return e.apply(t, arguments);
};
}
const { toString: si } = Object.prototype, { getPrototypeOf: Cn } = Object, Tt = ((e) => (t) => {
const n = si.call(t);
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
})(/* @__PURE__ */ Object.create(null)), se = (e) => (e = e.toLowerCase(), (t) => Tt(t) === e), At = (e) => (t) => typeof t === e, { isArray: Me } = Array, et = At("undefined");
function ii(e) {
return e !== null && !et(e) && e.constructor !== null && !et(e.constructor) && Z(e.constructor.isBuffer) && e.constructor.isBuffer(e);
}
const go = se("ArrayBuffer");
function ai(e) {
let t;
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && go(e.buffer), t;
}
const ci = At("string"), Z = At("function"), yo = At("number"), Ct = (e) => e !== null && typeof e == "object", ui = (e) => e === !0 || e === !1, vt = (e) => {
if (Tt(e) !== "object")
return !1;
const t = Cn(e);
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
}, li = se("Date"), fi = se("File"), di = se("Blob"), hi = se("FileList"), pi = (e) => Ct(e) && Z(e.pipe), mi = (e) => {
let t;
return e && (typeof FormData == "function" && e instanceof FormData || Z(e.append) && ((t = Tt(e)) === "formdata" || // detect form-data instance
t === "object" && Z(e.toString) && e.toString() === "[object FormData]"));
}, gi = se("URLSearchParams"), yi = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
function st(e, t, { allOwnKeys: n = !1 } = {}) {
if (e === null || typeof e > "u")
return;
let r, o;
if (typeof e != "object" && (e = [e]), Me(e))
for (r = 0, o = e.length; r < o; r++)
t.call(null, e[r], r, e);
else {
const s = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = s.length;
let a;
for (r = 0; r < i; r++)
a = s[r], t.call(null, e[a], a, e);
}
}
function vo(e, t) {
t = t.toLowerCase();
const n = Object.keys(e);
let r = n.length, o;
for (; r-- > 0; )
if (o = n[r], t === o.toLowerCase())
return o;
return null;
}
const Eo = (() => typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global)(), bo = (e) => !et(e) && e !== Eo;
function sn() {
const { caseless: e } = bo(this) && this || {}, t = {}, n = (r, o) => {
const s = e && vo(t, o) || o;
vt(t[s]) && vt(r) ? t[s] = sn(t[s], r) : vt(r) ? t[s] = sn({}, r) : Me(r) ? t[s] = r.slice() : t[s] = r;
};
for (let r = 0, o = arguments.length; r < o; r++)
arguments[r] && st(arguments[r], n);
return t;
}
const vi = (e, t, n, { allOwnKeys: r } = {}) => (st(t, (o, s) => {
n && Z(o) ? e[s] = mo(o, n) : e[s] = o;
}, { allOwnKeys: r }), e), Ei = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), bi = (e, t, n, r) => {
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
value: t.prototype
}), n && Object.assign(e.prototype, n);
}, _i = (e, t, n, r) => {
let o, s, i;
const a = {};
if (t = t || {}, e == null)
return t;
do {
for (o = Object.getOwnPropertyNames(e), s = o.length; s-- > 0; )
i = o[s], (!r || r(i, e, t)) && !a[i] && (t[i] = e[i], a[i] = !0);
e = n !== !1 && Cn(e);
} while (e && (!n || n(e, t)) && e !== Object.prototype);
return t;
}, wi = (e, t, n) => {
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
const r = e.indexOf(t, n);
return r !== -1 && r === n;
}, Si = (e) => {
if (!e)
return null;
if (Me(e))
return e;
let t = e.length;
if (!yo(t))
return null;
const n = new Array(t);
for (; t-- > 0; )
n[t] = e[t];
return n;
}, Oi = ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Cn(Uint8Array)), Ri = (e, t) => {
const r = (e && e[Symbol.iterator]).call(e);
let o;
for (; (o = r.next()) && !o.done; ) {
const s = o.value;
t.call(e, s[0], s[1]);
}
}, Ti = (e, t) => {
let n;
const r = [];
for (; (n = e.exec(t)) !== null; )
r.push(n);
return r;
}, Ai = se("HTMLFormElement"), Ci = (e) => e.toLowerCase().replace(
/[-_\s]([a-z\d])(\w*)/g,
function(n, r, o) {
return r.toUpperCase() + o;
}
), Zn = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Pi = se("RegExp"), _o = (e, t) => {
const n = Object.getOwnPropertyDescriptors(e), r = {};
st(n, (o, s) => {
let i;
(i = t(o, s, e)) !== !1 && (r[s] = i || o);
}), Object.defineProperties(e, r);
}, Ni = (e) => {
_o(e, (t, n) => {
if (Z(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
return !1;
const r = e[n];
if (Z(r)) {
if (t.enumerable = !1, "writable" in t) {
t.writable = !1;
return;
}
t.set || (t.set = () => {
throw Error("Can not rewrite read-only method '" + n + "'");
});
}
});
}, xi = (e, t) => {
const n = {}, r = (o) => {
o.forEach((s) => {
n[s] = !0;
});
};
return Me(e) ? r(e) : r(String(e).split(t)), n;
}, $i = () => {
}, Ii = (e, t) => (e = +e, Number.isFinite(e) ? e : t), Ht = "abcdefghijklmnopqrstuvwxyz", er = "0123456789", wo = {
DIGIT: er,
ALPHA: Ht,
ALPHA_DIGIT: Ht + Ht.toUpperCase() + er
}, ki = (e = 16, t = wo.ALPHA_DIGIT) => {
let n = "";
const { length: r } = t;
for (; e--; )
n += t[Math.random() * r | 0];
return n;
};
function ji(e) {
return !!(e && Z(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
}
const Di = (e) => {
const t = new Array(10), n = (r, o) => {
if (Ct(r)) {
if (t.indexOf(r) >= 0)
return;
if (!("toJSON" in r)) {
t[o] = r;
const s = Me(r) ? [] : {};
return st(r, (i, a) => {
const u = n(i, o + 1);
!et(u) && (s[a] = u);
}), t[o] = void 0, s;
}
}
return r;
};
return n(e, 0);
}, Vi = se("AsyncFunction"), Li = (e) => e && (Ct(e) || Z(e)) && Z(e.then) && Z(e.catch), g = {
isArray: Me,
isArrayBuffer: go,
isBuffer: ii,
isFormData: mi,
isArrayBufferView: ai,
isString: ci,
isNumber: yo,
isBoolean: ui,
isObject: Ct,
isPlainObject: vt,
isUndefined: et,
isDate: li,
isFile: fi,
isBlob: di,
isRegExp: Pi,
isFunction: Z,
isStream: pi,
isURLSearchParams: gi,
isTypedArray: Oi,
isFileList: hi,
forEach: st,
merge: sn,
extend: vi,
trim: yi,
stripBOM: Ei,
inherits: bi,
toFlatObject: _i,
kindOf: Tt,
kindOfTest: se,
endsWith: wi,
toArray: Si,
forEachEntry: Ri,
matchAll: Ti,
isHTMLForm: Ai,
hasOwnProperty: Zn,
hasOwnProp: Zn,
// an alias to avoid ESLint no-prototype-builtins detection
reduceDescriptors: _o,
freezeMethods: Ni,
toObjectSet: xi,
toCamelCase: Ci,
noop: $i,
toFiniteNumber: Ii,
findKey: vo,
global: Eo,
isContextDefined: bo,
ALPHABET: wo,
generateString: ki,
isSpecCompliantForm: ji,
toJSONObject: Di,
isAsyncFn: Vi,
isThenable: Li
};
function $(e, t, n, r, o) {
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), o && (this.response = o);
}
g.inherits($, Error, {
toJSON: function() {
return {
// Standard
message: this.message,
name: this.name,
// Microsoft
description: this.description,
number: this.number,
// Mozilla
fileName: this.fileName,
lineNumber: this.lineNumber,
columnNumber: this.columnNumber,
stack: this.stack,
// Axios
config: g.toJSONObject(this.config),
code: this.code,
status: this.response && this.response.status ? this.response.status : null
};
}
});
const So = $.prototype, Oo = {};
[
"ERR_BAD_OPTION_VALUE",
"ERR_BAD_OPTION",
"ECONNABORTED",
"ETIMEDOUT",
"ERR_NETWORK",
"ERR_FR_TOO_MANY_REDIRECTS",
"ERR_DEPRECATED",
"ERR_BAD_RESPONSE",
"ERR_BAD_REQUEST",
"ERR_CANCELED",
"ERR_NOT_SUPPORT",
"ERR_INVALID_URL"
// eslint-disable-next-line func-names
].forEach((e) => {
Oo[e] = { value: e };
});
Object.defineProperties($, Oo);
Object.defineProperty(So, "isAxiosError", { value: !0 });
$.from = (e, t, n, r, o, s) => {
const i = Object.create(So);
return g.toFlatObject(e, i, function(u) {
return u !== Error.prototype;
}, (a) => a !== "isAxiosError"), $.call(i, e.message, t, n, r, o), i.cause = e, i.name = e.name, s && Object.assign(i, s), i;
};
const Ui = null;
function an(e) {
return g.isPlainObject(e) || g.isArray(e);
}
function Ro(e) {
return g.endsWith(e, "[]") ? e.slice(0, -2) : e;
}
function tr(e, t, n) {
return e ? e.concat(t).map(function(o, s) {
return o = Ro(o), !n && s ? "[" + o + "]" : o;
}).join(n ? "." : "") : t;
}
function Mi(e) {
return g.isArray(e) && !e.some(an);
}
const Fi = g.toFlatObject(g, {}, null, function(t) {
return /^is[A-Z]/.test(t);
});
function Pt(e, t, n) {
if (!g.isObject(e))
throw new TypeError("target must be an object");
t = t || new FormData(), n = g.toFlatObject(n, {
metaTokens: !0,
dots: !1,
indexes: !1
}, !1, function(y, O) {
return !g.isUndefined(O[y]);
});
const r = n.metaTokens, o = n.visitor || c, s = n.dots, i = n.indexes, u = (n.Blob || typeof Blob < "u" && Blob) && g.isSpecCompliantForm(t);
if (!g.isFunction(o))
throw new TypeError("visitor must be a function");
function f(p) {
if (p === null)
return "";
if (g.isDate(p))
return p.toISOString();
if (!u && g.isBlob(p))
throw new $("Blob is not supported. Use a Buffer instead.");
return g.isArrayBuffer(p) || g.isTypedArray(p) ? u && typeof Blob == "function" ? new Blob([p]) : Buffer.from(p) : p;
}
function c(p, y, O) {
let E = p;
if (p && !O && typeof p == "object") {
if (g.endsWith(y, "{}"))
y = r ? y : y.slice(0, -2), p = JSON.stringify(p);
else if (g.isArray(p) && Mi(p) || (g.isFileList(p) || g.endsWith(y, "[]")) && (E = g.toArray(p)))
return y = Ro(y), E.forEach(function(P, V) {
!(g.isUndefined(P) || P === null) && t.append(
// eslint-disable-next-line no-nested-ternary
i === !0 ? tr([y], V, s) : i === null ? y : y + "[]",
f(P)
);
}), !1;
}
return an(p) ? !0 : (t.append(tr(O, y, s), f(p)), !1);
}
const l = [], d = Object.assign(Fi, {
defaultVisitor: c,
convertValue: f,
isVisitable: an
});
function h(p, y) {
if (!g.isUndefined(p)) {
if (l.indexOf(p) !== -1)
throw Error("Circular reference detected in " + y.join("."));
l.push(p), g.forEach(p, function(E, _) {
(!(g.isUndefined(E) || E === null) && o.call(
t,
E,
g.isString(_) ? _.trim() : _,
y,
d
)) === !0 && h(E, y ? y.concat(_) : [_]);
}), l.pop();
}
}
if (!g.isObject(e))
throw new TypeError("data must be an object");
return h(e), t;
}
function nr(e) {
const t = {
"!": "%21",
"'": "%27",
"(": "%28",
")": "%29",
"~": "%7E",
"%20": "+",
"%00": "\0"
};
return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(r) {
return t[r];
});
}
function Pn(e, t) {
this._pairs = [], e && Pt(e, this, t);
}
const To = Pn.prototype;
To.append = function(t, n) {
this._pairs.push([t, n]);
};
To.toString = function(t) {
const n = t ? function(r) {
return t.call(this, r, nr);
} : nr;
return this._pairs.map(function(o) {
return n(o[0]) + "=" + n(o[1]);
}, "").join("&");
};
function Bi(e) {
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
}
function Ao(e, t, n) {
if (!t)
return e;
const r = n && n.encode || Bi, o = n && n.serialize;
let s;
if (o ? s = o(t, n) : s = g.isURLSearchParams(t) ? t.toString() : new Pn(t, n).toString(r), s) {
const i = e.indexOf("#");
i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + s;
}
return e;
}
class Hi {
constructor() {
this.handlers = [];
}
/**
* Add a new interceptor to the stack
*
* @param {Function} fulfilled The function to handle `then` for a `Promise`
* @param {Function} rejected The function to handle `reject` for a `Promise`
*
* @return {Number} An ID used to remove interceptor later
*/
use(t, n, r) {
return this.handlers.push({
fulfilled: t,
rejected: n,
synchronous: r ? r.synchronous : !1,
runWhen: r ? r.runWhen : null
}), this.handlers.length - 1;
}
/**
* Remove an interceptor from the stack
*
* @param {Number} id The ID that was returned by `use`
*
* @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
*/
eject(t) {
this.handlers[t] && (this.handlers[t] = null);
}
/**
* Clear all interceptors from the stack
*
* @returns {void}
*/
clear() {
this.handlers && (this.handlers = []);
}
/**
* Iterate over all the registered interceptors
*
* This method is particularly useful for skipping over any
* interceptors that may have become `null` calling `eject`.
*
* @param {Function} fn The function to call for each interceptor
*
* @returns {void}
*/
forEach(t) {
g.forEach(this.handlers, function(r) {
r !== null && t(r);
});
}
}
const rr = Hi, Co = {
silentJSONParsing: !0,
forcedJSONParsing: !0,
clarifyTimeoutError: !1
}, zi = typeof URLSearchParams < "u" ? URLSearchParams : Pn, qi = typeof FormData < "u" ? FormData : null, Wi = typeof Blob < "u" ? Blob : null, Gi = (() => {
let e;
return typeof navigator < "u" && ((e = navigator.product) === "ReactNative" || e === "NativeScript" || e === "NS") ? !1 : typeof window < "u" && typeof document < "u";
})(), Ji = (() => typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
self instanceof WorkerGlobalScope && typeof self.importScripts == "function")(), ne = {
isBrowser: !0,
classes: {
URLSearchParams: zi,
FormData: qi,
Blob: Wi
},
isStandardBrowserEnv: Gi,
isStandardBrowserWebWorkerEnv: Ji,
protocols: ["http", "https", "file", "blob", "url", "data"]
};
function Ki(e, t) {
return Pt(e, new ne.classes.URLSearchParams(), Object.assign({
visitor: function(n, r, o, s) {
return ne.isNode && g.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : s.defaultVisitor.apply(this, arguments);
}
}, t));
}
function Yi(e) {
return g.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
}
function Qi(e) {
const t = {}, n = Object.keys(e);
let r;
const o = n.length;
let s;
for (r = 0; r < o; r++)
s = n[r], t[s] = e[s];
return t;
}
function Po(e) {
function t(n, r, o, s) {
let i = n[s++];
const a = Number.isFinite(+i), u = s >= n.length;
return i = !i && g.isArray(o) ? o.length : i, u ? (g.hasOwnProp(o, i) ? o[i] = [o[i], r] : o[i] = r, !a) : ((!o[i] || !g.isObject(o[i])) && (o[i] = []), t(n, r, o[i], s) && g.isArray(o[i]) && (o[i] = Qi(o[i])), !a);
}
if