kodama-ui
Version:
Kodama UI is a Vue 3 component library that provides a set of components & funcionality to build your application.
1,496 lines โข 1.64 MB
JavaScript
import { effectScope as jb, ref as re, markRaw as gr, getCurrentInstance as qo, inject as pi, toRaw as wn, watch as Ct, reactive as Qt, isRef as Bt, isReactive as Vs, toRef as xo, nextTick as Vn, computed as L, unref as W, getCurrentScope as Ub, onScopeDispose as Wb, toRefs as Gh, defineComponent as be, onMounted as st, h as jt, shallowRef as Yb, onUnmounted as Fo, isVNode as ip, createApp as Tl, onBeforeUnmount as Ja, resolveComponent as he, openBlock as C, createBlock as oe, createElementBlock as P, createElementVNode as U, toDisplayString as Se, createVNode as J, createTextVNode as Oe, withCtx as ne, createCommentVNode as F, shallowReactive as C6, provide as ci, watchEffect as ma, normalizeClass as se, renderSlot as X, Fragment as Ee, renderList as nt, normalizeStyle as Xe, mergeProps as dt, cloneVNode as O6, useSlots as op, createSlots as kn, normalizeProps as At, guardReactiveProps as hn, Teleport as Kb, withKeys as He, withModifiers as et, Transition as zn, resolveDynamicComponent as So, withDirectives as Qe, vShow as xn, onBeforeUpdate as A6, vModelText as ap, pushScopeId as Gb, popScopeId as Jb, customRef as M6, resolveDirective as Xb, onBeforeMount as D6, createStaticVNode as Qb } from "vue";
var Zb = !1;
function _u(t, e, n) {
return Array.isArray(t) ? (t.length = Math.max(t.length, e), t.splice(e, 1, n), n) : (t[e] = n, n);
}
function Ed(t, e) {
if (Array.isArray(t)) {
t.splice(e, 1);
return;
}
delete t[e];
}
function $6() {
return ev().__VUE_DEVTOOLS_GLOBAL_HOOK__;
}
function ev() {
return typeof navigator < "u" && typeof window < "u" ? window : typeof global < "u" ? global : {};
}
const N6 = typeof Proxy == "function", P6 = "devtools-plugin:setup", I6 = "plugin:settings:set";
let Yo, $f;
function L6() {
var t;
return Yo !== void 0 || (typeof window < "u" && window.performance ? (Yo = !0, $f = window.performance) : typeof global < "u" && (!((t = global.perf_hooks) === null || t === void 0) && t.performance) ? (Yo = !0, $f = global.perf_hooks.performance) : Yo = !1), Yo;
}
function R6() {
return L6() ? $f.now() : Date.now();
}
class B6 {
constructor(e, n) {
this.target = null, this.targetQueue = [], this.onQueue = [], this.plugin = e, this.hook = n;
const r = {};
if (e.settings)
for (const a in e.settings) {
const s = e.settings[a];
r[a] = s.defaultValue;
}
const i = `__vue-devtools-plugin-settings__${e.id}`;
let o = Object.assign({}, r);
try {
const a = localStorage.getItem(i), s = JSON.parse(a);
Object.assign(o, s);
} catch {
}
this.fallbacks = {
getSettings() {
return o;
},
setSettings(a) {
try {
localStorage.setItem(i, JSON.stringify(a));
} catch {
}
o = a;
},
now() {
return R6();
}
}, n && n.on(I6, (a, s) => {
a === this.plugin.id && this.fallbacks.setSettings(s);
}), this.proxiedOn = new Proxy({}, {
get: (a, s) => this.target ? this.target.on[s] : (...u) => {
this.onQueue.push({
method: s,
args: u
});
}
}), this.proxiedTarget = new Proxy({}, {
get: (a, s) => this.target ? this.target[s] : s === "on" ? this.proxiedOn : Object.keys(this.fallbacks).includes(s) ? (...u) => (this.targetQueue.push({
method: s,
args: u,
resolve: () => {
}
}), this.fallbacks[s](...u)) : (...u) => new Promise((l) => {
this.targetQueue.push({
method: s,
args: u,
resolve: l
});
})
});
}
async setRealTarget(e) {
this.target = e;
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 sp(t, e) {
const n = t, r = ev(), i = $6(), o = N6 && n.enableEarlyProxy;
if (i && (r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !o))
i.emit(P6, t, e);
else {
const a = o ? new B6(n, i) : null;
(r.__VUE_DEVTOOLS_PLUGINS__ = r.__VUE_DEVTOOLS_PLUGINS__ || []).push({
pluginDescriptor: n,
setupFn: e,
proxy: a
}), a && e(a.proxiedTarget);
}
}
/*!
* pinia v2.0.35
* (c) 2023 Eduardo San Martin Morote
* @license MIT
*/
let ds;
const zs = (t) => ds = t, tv = process.env.NODE_ENV !== "production" ? Symbol("pinia") : (
/* istanbul ignore next */
Symbol()
);
function Po(t) {
return t && typeof t == "object" && Object.prototype.toString.call(t) === "[object Object]" && typeof t.toJSON != "function";
}
var Br;
(function(t) {
t.direct = "direct", t.patchObject = "patch object", t.patchFunction = "patch function";
})(Br || (Br = {}));
const Rc = typeof window < "u", bs = (process.env.NODE_ENV !== "production" || !1) && process.env.NODE_ENV !== "test" && Rc, Jh = /* @__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 V6(t, { autoBom: e = !1 } = {}) {
return e && /^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type) ? new Blob([String.fromCharCode(65279), t], { type: t.type }) : t;
}
function up(t, e, n) {
const r = new XMLHttpRequest();
r.open("GET", t), r.responseType = "blob", r.onload = function() {
iv(r.response, e, n);
}, r.onerror = function() {
console.error("could not download file");
}, r.send();
}
function nv(t) {
const e = new XMLHttpRequest();
e.open("HEAD", t, !1);
try {
e.send();
} catch {
}
return e.status >= 200 && e.status <= 299;
}
function ol(t) {
try {
t.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), t.dispatchEvent(n);
}
}
const al = typeof navigator == "object" ? navigator : { userAgent: "" }, rv = /* @__PURE__ */ (() => /Macintosh/.test(al.userAgent) && /AppleWebKit/.test(al.userAgent) && !/Safari/.test(al.userAgent))(), iv = Rc ? (
// 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 && !rv ? z6 : (
// Use msSaveOrOpenBlob as a second approach
"msSaveOrOpenBlob" in al ? H6 : (
// Fallback to using FileReader and a popup
q6
)
)
) : () => {
};
function z6(t, e = "download", n) {
const r = document.createElement("a");
r.download = e, r.rel = "noopener", typeof t == "string" ? (r.href = t, r.origin !== location.origin ? nv(r.href) ? up(t, e, n) : (r.target = "_blank", ol(r)) : ol(r)) : (r.href = URL.createObjectURL(t), setTimeout(function() {
URL.revokeObjectURL(r.href);
}, 4e4), setTimeout(function() {
ol(r);
}, 0));
}
function H6(t, e = "download", n) {
if (typeof t == "string")
if (nv(t))
up(t, e, n);
else {
const r = document.createElement("a");
r.href = t, r.target = "_blank", setTimeout(function() {
ol(r);
});
}
else
navigator.msSaveOrOpenBlob(V6(t, n), e);
}
function q6(t, e, n, r) {
if (r = r || open("", "_blank"), r && (r.document.title = r.document.body.innerText = "downloading..."), typeof t == "string")
return up(t, e, n);
const i = t.type === "application/octet-stream", o = /constructor/i.test(String(Jh.HTMLElement)) || "safari" in Jh, a = /CriOS\/[\d]+/.test(navigator.userAgent);
if ((a || i && o || rv) && typeof FileReader < "u") {
const s = new FileReader();
s.onloadend = function() {
let u = s.result;
if (typeof u != "string")
throw r = null, new Error("Wrong reader.result type");
u = a ? u : u.replace(/^data:[^;]*;/, "data:attachment/file;"), r ? r.location.href = u : location.assign(u), r = null;
}, s.readAsDataURL(t);
} else {
const s = URL.createObjectURL(t);
r ? r.location.assign(s) : location.href = s, r = null, setTimeout(function() {
URL.revokeObjectURL(s);
}, 4e4);
}
}
function Kt(t, e) {
const n = "๐ " + t;
typeof __VUE_DEVTOOLS_TOAST__ == "function" ? __VUE_DEVTOOLS_TOAST__(n, e) : e === "error" ? console.error(n) : e === "warn" ? console.warn(n) : console.log(n);
}
function lp(t) {
return "_a" in t && "install" in t;
}
function ov() {
if (!("clipboard" in navigator))
return Kt("Your browser doesn't support the Clipboard API", "error"), !0;
}
function av(t) {
return t instanceof Error && t.message.toLowerCase().includes("document is not focused") ? (Kt('You need to activate the "Emulate a focused page" setting in the "Rendering" panel of devtools.', "warn"), !0) : !1;
}
async function F6(t) {
if (!ov())
try {
await navigator.clipboard.writeText(JSON.stringify(t.state.value)), Kt("Global state copied to clipboard.");
} catch (e) {
if (av(e))
return;
Kt("Failed to serialize the state. Check the console for more details.", "error"), console.error(e);
}
}
async function j6(t) {
if (!ov())
try {
t.state.value = JSON.parse(await navigator.clipboard.readText()), Kt("Global state pasted from clipboard.");
} catch (e) {
if (av(e))
return;
Kt("Failed to deserialize the state from clipboard. Check the console for more details.", "error"), console.error(e);
}
}
async function U6(t) {
try {
iv(new Blob([JSON.stringify(t.state.value)], {
type: "text/plain;charset=utf-8"
}), "pinia-state.json");
} catch (e) {
Kt("Failed to export the state as JSON. Check the console for more details.", "error"), console.error(e);
}
}
let Zr;
function W6() {
Zr || (Zr = document.createElement("input"), Zr.type = "file", Zr.accept = ".json");
function t() {
return new Promise((e, n) => {
Zr.onchange = async () => {
const r = Zr.files;
if (!r)
return e(null);
const i = r.item(0);
return e(i ? { text: await i.text(), file: i } : null);
}, Zr.oncancel = () => e(null), Zr.onerror = n, Zr.click();
});
}
return t;
}
async function Y6(t) {
try {
const n = await (await W6())();
if (!n)
return;
const { text: r, file: i } = n;
t.state.value = JSON.parse(r), Kt(`Global state imported from "${i.name}".`);
} catch (e) {
Kt("Failed to export the state as JSON. Check the console for more details.", "error"), console.error(e);
}
}
function mr(t) {
return {
_custom: {
display: t
}
};
}
const sv = "๐ Pinia (root)", Nf = "_root";
function K6(t) {
return lp(t) ? {
id: Nf,
label: sv
} : {
id: t.$id,
label: t.$id
};
}
function G6(t) {
if (lp(t)) {
const n = Array.from(t._s.keys()), r = t._s;
return {
state: n.map((o) => ({
editable: !0,
key: o,
value: t.state.value[o]
})),
getters: n.filter((o) => r.get(o)._getters).map((o) => {
const a = r.get(o);
return {
editable: !1,
key: o,
value: a._getters.reduce((s, u) => (s[u] = a[u], s), {})
};
})
};
}
const e = {
state: Object.keys(t.$state).map((n) => ({
editable: !0,
key: n,
value: t.$state[n]
}))
};
return t._getters && t._getters.length && (e.getters = t._getters.map((n) => ({
editable: !1,
key: n,
value: t[n]
}))), t._customProperties.size && (e.customProperties = Array.from(t._customProperties).map((n) => ({
editable: !0,
key: n,
value: t[n]
}))), e;
}
function J6(t) {
return t ? Array.isArray(t) ? t.reduce((e, n) => (e.keys.push(n.key), e.operations.push(n.type), e.oldValue[n.key] = n.oldValue, e.newValue[n.key] = n.newValue, e), {
oldValue: {},
keys: [],
operations: [],
newValue: {}
}) : {
operation: mr(t.type),
key: mr(t.key),
oldValue: t.oldValue,
newValue: t.newValue
} : {};
}
function X6(t) {
switch (t) {
case Br.direct:
return "mutation";
case Br.patchFunction:
return "$patch";
case Br.patchObject:
return "$patch";
default:
return "unknown";
}
}
let sa = !0;
const sl = [], ro = "pinia:mutations", dn = "pinia", { assign: Q6 } = Object, Cl = (t) => "๐ " + t;
function Z6(t, e) {
sp({
id: "dev.esm.pinia",
label: "Pinia ๐",
logo: "https://pinia.vuejs.org/logo.svg",
packageName: "pinia",
homepage: "https://pinia.vuejs.org",
componentStateTypes: sl,
app: t
}, (n) => {
typeof n.now != "function" && Kt("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: ro,
label: "Pinia ๐",
color: 15064968
}), n.addInspector({
id: dn,
label: "Pinia ๐",
icon: "storage",
treeFilterPlaceholder: "Search stores",
actions: [
{
icon: "content_copy",
action: () => {
F6(e);
},
tooltip: "Serialize and copy the state"
},
{
icon: "content_paste",
action: async () => {
await j6(e), n.sendInspectorTree(dn), n.sendInspectorState(dn);
},
tooltip: "Replace the state with the content of your clipboard"
},
{
icon: "save",
action: () => {
U6(e);
},
tooltip: "Save the state as a JSON file"
},
{
icon: "folder_open",
action: async () => {
await Y6(e), n.sendInspectorTree(dn), n.sendInspectorState(dn);
},
tooltip: "Import the state from a JSON file"
}
],
nodeActions: [
{
icon: "restore",
tooltip: "Reset the state (option store only)",
action: (r) => {
const i = e._s.get(r);
i ? i._isOptionsAPI ? (i.$reset(), Kt(`Store "${r}" reset.`)) : Kt(`Cannot reset "${r}" store because it's a setup store.`, "warn") : Kt(`Cannot reset "${r}" store because it wasn't found.`, "warn");
}
}
]
}), n.on.inspectComponent((r, i) => {
const o = r.componentInstance && r.componentInstance.proxy;
if (o && o._pStores) {
const a = r.componentInstance.proxy._pStores;
Object.values(a).forEach((s) => {
r.instanceData.state.push({
type: Cl(s.$id),
key: "state",
editable: !0,
value: s._isOptionsAPI ? {
_custom: {
value: wn(s.$state),
actions: [
{
icon: "restore",
tooltip: "Reset the state of this store",
action: () => s.$reset()
}
]
}
} : (
// NOTE: workaround to unwrap transferred refs
Object.keys(s.$state).reduce((u, l) => (u[l] = s.$state[l], u), {})
)
}), s._getters && s._getters.length && r.instanceData.state.push({
type: Cl(s.$id),
key: "getters",
editable: !1,
value: s._getters.reduce((u, l) => {
try {
u[l] = s[l];
} catch (c) {
u[l] = c;
}
return u;
}, {})
});
});
}
}), n.on.getInspectorTree((r) => {
if (r.app === t && r.inspectorId === dn) {
let i = [e];
i = i.concat(Array.from(e._s.values())), r.rootNodes = (r.filter ? i.filter((o) => "$id" in o ? o.$id.toLowerCase().includes(r.filter.toLowerCase()) : sv.toLowerCase().includes(r.filter.toLowerCase())) : i).map(K6);
}
}), n.on.getInspectorState((r) => {
if (r.app === t && r.inspectorId === dn) {
const i = r.nodeId === Nf ? e : e._s.get(r.nodeId);
if (!i)
return;
i && (r.state = G6(i));
}
}), n.on.editInspectorState((r, i) => {
if (r.app === t && r.inspectorId === dn) {
const o = r.nodeId === Nf ? e : e._s.get(r.nodeId);
if (!o)
return Kt(`store "${r.nodeId}" not found`, "error");
const { path: a } = r;
lp(o) ? a.unshift("state") : (a.length !== 1 || !o._customProperties.has(a[0]) || a[0] in o.$state) && a.unshift("$state"), sa = !1, r.set(o, a, r.state.value), sa = !0;
}
}), n.on.editComponentState((r) => {
if (r.type.startsWith("๐")) {
const i = r.type.replace(/^๐\s*/, ""), o = e._s.get(i);
if (!o)
return Kt(`store "${i}" not found`, "error");
const { path: a } = r;
if (a[0] !== "state")
return Kt(`Invalid path for store "${i}":
${a}
Only state can be modified.`);
a[0] = "$state", sa = !1, r.set(o, a, r.state.value), sa = !0;
}
});
});
}
function e4(t, e) {
sl.includes(Cl(e.$id)) || sl.push(Cl(e.$id)), sp({
id: "dev.esm.pinia",
label: "Pinia ๐",
logo: "https://pinia.vuejs.org/logo.svg",
packageName: "pinia",
homepage: "https://pinia.vuejs.org",
componentStateTypes: sl,
app: t,
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;
e.$onAction(({ after: a, onError: s, name: u, args: l }) => {
const c = uv++;
n.addTimelineEvent({
layerId: ro,
event: {
time: r(),
title: "๐ซ " + u,
subtitle: "start",
data: {
store: mr(e.$id),
action: mr(u),
args: l
},
groupId: c
}
}), a((f) => {
uo = void 0, n.addTimelineEvent({
layerId: ro,
event: {
time: r(),
title: "๐ฌ " + u,
subtitle: "end",
data: {
store: mr(e.$id),
action: mr(u),
args: l,
result: f
},
groupId: c
}
});
}), s((f) => {
uo = void 0, n.addTimelineEvent({
layerId: ro,
event: {
time: r(),
logType: "error",
title: "๐ฅ " + u,
subtitle: "end",
data: {
store: mr(e.$id),
action: mr(u),
args: l,
error: f
},
groupId: c
}
});
});
}, !0), e._customProperties.forEach((a) => {
Ct(() => W(e[a]), (s, u) => {
n.notifyComponentUpdate(), n.sendInspectorState(dn), sa && n.addTimelineEvent({
layerId: ro,
event: {
time: r(),
title: "Change",
subtitle: a,
data: {
newValue: s,
oldValue: u
},
groupId: uo
}
});
}, { deep: !0 });
}), e.$subscribe(({ events: a, type: s }, u) => {
if (n.notifyComponentUpdate(), n.sendInspectorState(dn), !sa)
return;
const l = {
time: r(),
title: X6(s),
data: Q6({ store: mr(e.$id) }, J6(a)),
groupId: uo
};
uo = void 0, s === Br.patchFunction ? l.subtitle = "โคต๏ธ" : s === Br.patchObject ? l.subtitle = "๐งฉ" : a && !Array.isArray(a) && (l.subtitle = a.type), a && (l.data["rawEvent(s)"] = {
_custom: {
display: "DebuggerEvent",
type: "object",
tooltip: "raw DebuggerEvent[]",
value: a
}
}), n.addTimelineEvent({
layerId: ro,
event: l
});
}, { detached: !0, flush: "sync" });
const i = e._hotUpdate;
e._hotUpdate = gr((a) => {
i(a), n.addTimelineEvent({
layerId: ro,
event: {
time: r(),
title: "๐ฅ " + e.$id,
subtitle: "HMR update",
data: {
store: mr(e.$id),
info: mr("HMR update")
}
}
}), n.notifyComponentUpdate(), n.sendInspectorTree(dn), n.sendInspectorState(dn);
});
const { $dispose: o } = e;
e.$dispose = () => {
o(), n.notifyComponentUpdate(), n.sendInspectorTree(dn), n.sendInspectorState(dn), n.getSettings().logStoreChanges && Kt(`Disposed "${e.$id}" store ๐`);
}, n.notifyComponentUpdate(), n.sendInspectorTree(dn), n.sendInspectorState(dn), n.getSettings().logStoreChanges && Kt(`"${e.$id}" store installed ๐`);
});
}
let uv = 0, uo;
function Xh(t, e) {
const n = e.reduce((r, i) => (r[i] = wn(t)[i], r), {});
for (const r in n)
t[r] = function() {
const i = uv, o = new Proxy(t, {
get(...a) {
return uo = i, Reflect.get(...a);
},
set(...a) {
return uo = i, Reflect.set(...a);
}
});
return n[r].apply(o, arguments);
};
}
function t4({ app: t, store: e, options: n }) {
if (!e.$id.startsWith("__hot:")) {
if (n.state && (e._isOptionsAPI = !0), typeof n.state == "function") {
Xh(
// @ts-expect-error: can cast the store...
e,
Object.keys(n.actions)
);
const r = e._hotUpdate;
wn(e)._hotUpdate = function(i) {
r.apply(this, arguments), Xh(e, Object.keys(i._hmrPayload.actions));
};
}
e4(
t,
// FIXME: is there a way to allow the assignment from Store<Id, S, G, A> to StoreGeneric?
e
);
}
}
function n4() {
const t = jb(!0), e = t.run(() => re({}));
let n = [], r = [];
const i = gr({
install(o) {
zs(i), i._a = o, o.provide(tv, i), o.config.globalProperties.$pinia = i, bs && Z6(o, i), r.forEach((a) => n.push(a)), r = [];
},
use(o) {
return !this._a && !Zb ? r.push(o) : n.push(o), this;
},
_p: n,
// it's actually undefined here
// @ts-expect-error
_a: null,
_e: t,
_s: /* @__PURE__ */ new Map(),
state: e
});
return bs && typeof Proxy < "u" && i.use(t4), i;
}
function lv(t, e) {
for (const n in e) {
const r = e[n];
if (!(n in t))
continue;
const i = t[n];
Po(i) && Po(r) && !Bt(r) && !Vs(r) ? t[n] = lv(i, r) : t[n] = r;
}
return t;
}
const cv = () => {
};
function Qh(t, e, n, r = cv) {
t.push(e);
const i = () => {
const o = t.indexOf(e);
o > -1 && (t.splice(o, 1), r());
};
return !n && Ub() && Wb(i), i;
}
function Ko(t, ...e) {
t.slice().forEach((n) => {
n(...e);
});
}
function Pf(t, e) {
t instanceof Map && e instanceof Map && e.forEach((n, r) => t.set(r, n)), t instanceof Set && e instanceof Set && e.forEach(t.add, t);
for (const n in e) {
if (!e.hasOwnProperty(n))
continue;
const r = e[n], i = t[n];
Po(i) && Po(r) && t.hasOwnProperty(n) && !Bt(r) && !Vs(r) ? t[n] = Pf(i, r) : t[n] = r;
}
return t;
}
const r4 = process.env.NODE_ENV !== "production" ? Symbol("pinia:skipHydration") : (
/* istanbul ignore next */
Symbol()
);
function i4(t) {
return !Po(t) || !t.hasOwnProperty(r4);
}
const { assign: rr } = Object;
function Zh(t) {
return !!(Bt(t) && t.effect);
}
function em(t, e, n, r) {
const { state: i, actions: o, getters: a } = e, s = n.state.value[t];
let u;
function l() {
!s && (process.env.NODE_ENV === "production" || !r) && (n.state.value[t] = i ? i() : {});
const c = process.env.NODE_ENV !== "production" && r ? (
// use ref() to unwrap refs inside state TODO: check if this is still necessary
Gh(re(i ? i() : {}).value)
) : Gh(n.state.value[t]);
return rr(c, o, Object.keys(a || {}).reduce((f, 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 "${t}".`), f[d] = gr(L(() => {
zs(n);
const p = n._s.get(t);
return a[d].call(p, p);
})), f), {}));
}
return u = If(t, l, e, n, r, !0), u;
}
function If(t, e, n = {}, r, i, o) {
let a;
const s = rr({ 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" && !Zb && (u.onTrigger = (N) => {
l ? p = N : l == !1 && !S._hotUpdating && (Array.isArray(p) ? p.push(N) : console.error("๐ debuggerEvents should be an array. This is most likely an internal Pinia bug."));
});
let l, c, f = gr([]), d = gr([]), p;
const h = r.state.value[t];
!o && !h && (process.env.NODE_ENV === "production" || !i) && (r.state.value[t] = {});
const m = re({});
let v;
function y(N) {
let R;
l = c = !1, process.env.NODE_ENV !== "production" && (p = []), typeof N == "function" ? (N(r.state.value[t]), R = {
type: Br.patchFunction,
storeId: t,
events: p
}) : (Pf(r.state.value[t], N), R = {
type: Br.patchObject,
payload: N,
storeId: t,
events: p
});
const w = v = Symbol();
Vn().then(() => {
v === w && (l = !0);
}), c = !0, Ko(f, R, r.state.value[t]);
}
const k = o ? function() {
const { state: R } = n, w = R ? R() : {};
this.$patch((A) => {
rr(A, w);
});
} : (
/* istanbul ignore next */
process.env.NODE_ENV !== "production" ? () => {
throw new Error(`๐: Store "${t}" is built using the setup syntax and does not implement $reset().`);
} : cv
);
function T() {
a.stop(), f = [], d = [], r._s.delete(t);
}
function b(N, R) {
return function() {
zs(r);
const w = Array.from(arguments), A = [], $ = [];
function I(g) {
A.push(g);
}
function E(g) {
$.push(g);
}
Ko(d, {
args: w,
name: N,
store: S,
after: I,
onError: E
});
let O;
try {
O = R.apply(this && this.$id === t ? this : S, w);
} catch (g) {
throw Ko($, g), g;
}
return O instanceof Promise ? O.then((g) => (Ko(A, g), g)).catch((g) => (Ko($, g), Promise.reject(g))) : (Ko(A, O), O);
};
}
const D = /* @__PURE__ */ gr({
actions: {},
getters: {},
state: [],
hotState: m
}), x = {
_p: r,
// _s: scope,
$id: t,
$onAction: Qh.bind(null, d),
$patch: y,
$reset: k,
$subscribe(N, R = {}) {
const w = Qh(f, N, R.detached, () => A()), A = a.run(() => Ct(() => r.state.value[t], ($) => {
(R.flush === "sync" ? c : l) && N({
storeId: t,
type: Br.direct,
events: p
}, $);
}, rr({}, u, R)));
return w;
},
$dispose: T
}, S = Qt(process.env.NODE_ENV !== "production" || bs ? rr(
{
_hmrPayload: D,
_customProperties: gr(/* @__PURE__ */ new Set())
// devtools custom properties
},
x
// must be added later
// setupStore
) : x);
r._s.set(t, S);
const _ = r._e.run(() => (a = jb(), a.run(() => e())));
for (const N in _) {
const R = _[N];
if (Bt(R) && !Zh(R) || Vs(R))
process.env.NODE_ENV !== "production" && i ? _u(m.value, N, xo(_, N)) : o || (h && i4(R) && (Bt(R) ? R.value = h[N] : Pf(R, h[N])), r.state.value[t][N] = R), process.env.NODE_ENV !== "production" && D.state.push(N);
else if (typeof R == "function") {
const w = process.env.NODE_ENV !== "production" && i ? R : b(N, R);
_[N] = w, process.env.NODE_ENV !== "production" && (D.actions[N] = R), s.actions[N] = R;
} else
process.env.NODE_ENV !== "production" && Zh(R) && (D.getters[N] = o ? (
// @ts-expect-error
n.getters[N]
) : R, Rc && (_._getters || // @ts-expect-error: same
(_._getters = gr([]))).push(N));
}
if (rr(S, _), rr(wn(S), _), Object.defineProperty(S, "$state", {
get: () => process.env.NODE_ENV !== "production" && i ? m.value : r.state.value[t],
set: (N) => {
if (process.env.NODE_ENV !== "production" && i)
throw new Error("cannot set hotState");
y((R) => {
rr(R, N);
});
}
}), process.env.NODE_ENV !== "production" && (S._hotUpdate = gr((N) => {
S._hotUpdating = !0, N._hmrPayload.state.forEach((R) => {
if (R in S.$state) {
const w = N.$state[R], A = S.$state[R];
typeof w == "object" && Po(w) && Po(A) ? lv(w, A) : N.$state[R] = A;
}
_u(S, R, xo(N.$state, R));
}), Object.keys(S.$state).forEach((R) => {
R in N.$state || Ed(S, R);
}), l = !1, c = !1, r.state.value[t] = xo(N._hmrPayload, "hotState"), c = !0, Vn().then(() => {
l = !0;
});
for (const R in N._hmrPayload.actions) {
const w = N[R];
_u(S, R, b(R, w));
}
for (const R in N._hmrPayload.getters) {
const w = N._hmrPayload.getters[R], A = o ? (
// special handling of options api
L(() => (zs(r), w.call(S, S)))
) : w;
_u(S, R, A);
}
Object.keys(S._hmrPayload.getters).forEach((R) => {
R in N._hmrPayload.getters || Ed(S, R);
}), Object.keys(S._hmrPayload.actions).forEach((R) => {
R in N._hmrPayload.actions || Ed(S, R);
}), S._hmrPayload = N._hmrPayload, S._getters = N._getters, S._hotUpdating = !1;
})), bs) {
const N = {
writable: !0,
configurable: !0,
// avoid warning on devtools trying to display this property
enumerable: !1
};
["_p", "_hmrPayload", "_getters", "_customProperties"].forEach((R) => {
Object.defineProperty(S, R, rr({ value: S[R] }, N));
});
}
return r._p.forEach((N) => {
if (bs) {
const R = a.run(() => N({
store: S,
app: r._a,
pinia: r,
options: s
}));
Object.keys(R || {}).forEach((w) => S._customProperties.add(w)), rr(S, R);
} else
rr(S, a.run(() => N({
store: S,
app: r._a,
pinia: r,
options: s
})));
}), 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}".`), h && o && n.hydrate && n.hydrate(S.$state, h), l = !0, c = !0, S;
}
function dv(t, e, n) {
let r, i;
const o = typeof e == "function";
typeof t == "string" ? (r = t, i = o ? n : e) : (i = t, r = t.id);
function a(s, u) {
const l = qo();
if (s = // in test mode, ignore the argument provided as we can always retrieve a
// pinia instance with getActivePinia()
(process.env.NODE_ENV === "test" && ds && ds._testing ? null : s) || l && pi(tv, null), s && zs(s), process.env.NODE_ENV !== "production" && !ds)
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.`);
s = ds, s._s.has(r) || (o ? If(r, e, i, s) : em(r, i, s), process.env.NODE_ENV !== "production" && (a._pinia = s));
const c = s._s.get(r);
if (process.env.NODE_ENV !== "production" && u) {
const f = "__hot:" + r, d = o ? If(f, e, i, s, !0) : em(f, rr({}, i), s, !0);
u._hotUpdate(d), delete s.state.value[f], s._s.delete(f);
}
if (process.env.NODE_ENV !== "production" && Rc && l && l.proxy && // avoid adding stores that are just built for hot module replacement
!u) {
const f = l.proxy, d = "_pStores" in f ? f._pStores : f._pStores = {};
d[r] = c;
}
return c;
}
return a.$id = r, a;
}
/*!
* vue-tippy v6.6.0
* (c) 2024
* @license MIT
*/
var Nn = "top", lr = "bottom", cr = "right", Pn = "left", cp = "auto", fu = [Nn, lr, cr, Pn], xa = "start", Hs = "end", o4 = "clippingParents", fv = "viewport", Za = "popper", a4 = "reference", tm = /* @__PURE__ */ fu.reduce(function(t, e) {
return t.concat([e + "-" + xa, e + "-" + Hs]);
}, []), pv = /* @__PURE__ */ [].concat(fu, [cp]).reduce(function(t, e) {
return t.concat([e, e + "-" + xa, e + "-" + Hs]);
}, []), s4 = "beforeRead", u4 = "read", l4 = "afterRead", c4 = "beforeMain", d4 = "main", f4 = "afterMain", p4 = "beforeWrite", h4 = "write", m4 = "afterWrite", g4 = [s4, u4, l4, c4, d4, f4, p4, h4, m4];
function Fr(t) {
return t ? (t.nodeName || "").toLowerCase() : null;
}
function Sr(t) {
if (t == null)
return window;
if (t.toString() !== "[object Window]") {
var e = t.ownerDocument;
return e && e.defaultView || window;
}
return t;
}
function Sa(t) {
var e = Sr(t).Element;
return t instanceof e || t instanceof Element;
}
function ar(t) {
var e = Sr(t).HTMLElement;
return t instanceof e || t instanceof HTMLElement;
}
function hv(t) {
if (typeof ShadowRoot > "u")
return !1;
var e = Sr(t).ShadowRoot;
return t instanceof e || t instanceof ShadowRoot;
}
function b4(t) {
var e = t.state;
Object.keys(e.elements).forEach(function(n) {
var r = e.styles[n] || {}, i = e.attributes[n] || {}, o = e.elements[n];
!ar(o) || !Fr(o) || (Object.assign(o.style, r), Object.keys(i).forEach(function(a) {
var s = i[a];
s === !1 ? o.removeAttribute(a) : o.setAttribute(a, s === !0 ? "" : s);
}));
});
}
function v4(t) {
var e = t.state, n = {
popper: {
position: e.options.strategy,
left: "0",
top: "0",
margin: "0"
},
arrow: {
position: "absolute"
},
reference: {}
};
return Object.assign(e.elements.popper.style, n.popper), e.styles = n, e.elements.arrow && Object.assign(e.elements.arrow.style, n.arrow), function() {
Object.keys(e.elements).forEach(function(r) {
var i = e.elements[r], o = e.attributes[r] || {}, a = Object.keys(e.styles.hasOwnProperty(r) ? e.styles[r] : n[r]), s = a.reduce(function(u, l) {
return u[l] = "", u;
}, {});
!ar(i) || !Fr(i) || (Object.assign(i.style, s), Object.keys(o).forEach(function(u) {
i.removeAttribute(u);
}));
});
};
}
var mv = {
name: "applyStyles",
enabled: !0,
phase: "write",
fn: b4,
effect: v4,
requires: ["computeStyles"]
};
function Vr(t) {
return t.split("-")[0];
}
var Eo = Math.max, Ol = Math.min, Ea = Math.round;
function _a(t, e) {
e === void 0 && (e = !1);
var n = t.getBoundingClientRect(), r = 1, i = 1;
if (ar(t) && e) {
var o = t.offsetHeight, a = t.offsetWidth;
a > 0 && (r = Ea(n.width) / a || 1), o > 0 && (i = Ea(n.height) / o || 1);
}
return {
width: n.width / r,
height: n.height / i,
top: n.top / i,
right: n.right / r,
bottom: n.bottom / i,
left: n.left / r,
x: n.left / r,
y: n.top / i
};
}
function dp(t) {
var e = _a(t), n = t.offsetWidth, r = t.offsetHeight;
return Math.abs(e.width - n) <= 1 && (n = e.width), Math.abs(e.height - r) <= 1 && (r = e.height), {
x: t.offsetLeft,
y: t.offsetTop,
width: n,
height: r
};
}
function gv(t, e) {
var n = e.getRootNode && e.getRootNode();
if (t.contains(e))
return !0;
if (n && hv(n)) {
var r = e;
do {
if (r && t.isSameNode(r))
return !0;
r = r.parentNode || r.host;
} while (r);
}
return !1;
}
function jr(t) {
return Sr(t).getComputedStyle(t);
}
function y4(t) {
return ["table", "td", "th"].indexOf(Fr(t)) >= 0;
}
function qi(t) {
return ((Sa(t) ? t.ownerDocument : (
// $FlowFixMe[prop-missing]
t.document
)) || window.document).documentElement;
}
function Bc(t) {
return Fr(t) === "html" ? t : (
// this is a quicker (but less type safe) way to save quite some bytes from the bundle
// $FlowFixMe[incompatible-return]
// $FlowFixMe[prop-missing]
t.assignedSlot || // step into the shadow DOM of the parent of a slotted node
t.parentNode || // DOM Element detected
(hv(t) ? t.host : null) || // ShadowRoot detected
// $FlowFixMe[incompatible-call]: HTMLElement is a Node
qi(t)
);
}
function nm(t) {
return !ar(t) || // https://github.com/popperjs/popper-core/issues/837
jr(t).position === "fixed" ? null : t.offsetParent;
}
function w4(t) {
var e = navigator.userAgent.toLowerCase().indexOf("firefox") !== -1, n = navigator.userAgent.indexOf("Trident") !== -1;
if (n && ar(t)) {
var r = jr(t);
if (r.position === "fixed")
return null;
}
for (var i = Bc(t); ar(i) && ["html", "body"].indexOf(Fr(i)) < 0; ) {
var o = jr(i);
if (o.transform !== "none" || o.perspective !== "none" || o.contain === "paint" || ["transform", "perspective"].indexOf(o.willChange) !== -1 || e && o.willChange === "filter" || e && o.filter && o.filter !== "none")
return i;
i = i.parentNode;
}
return null;
}
function pu(t) {
for (var e = Sr(t), n = nm(t); n && y4(n) && jr(n).position === "static"; )
n = nm(n);
return n && (Fr(n) === "html" || Fr(n) === "body" && jr(n).position === "static") ? e : n || w4(t) || e;
}
function fp(t) {
return ["top", "bottom"].indexOf(t) >= 0 ? "x" : "y";
}
function vs(t, e, n) {
return Eo(t, Ol(e, n));
}
function k4(t, e, n) {
var r = vs(t, e, n);
return r > n ? n : r;
}
function bv() {
return {
top: 0,
right: 0,
bottom: 0,
left: 0
};
}
function vv(t) {
return Object.assign({}, bv(), t);
}
function yv(t, e) {
return e.reduce(function(n, r) {
return n[r] = t, n;
}, {});
}
var x4 = function(e, n) {
return e = typeof e == "function" ? e(Object.assign({}, n.rects, {
placement: n.placement
})) : e, vv(typeof e != "number" ? e : yv(e, fu));
};
function S4(t) {
var e, n = t.state, r = t.name, i = t.options, o = n.elements.arrow, a = n.modifiersData.popperOffsets, s = Vr(n.placement), u = fp(s), l = [Pn, cr].indexOf(s) >= 0, c = l ? "height" : "width";
if (!(!o || !a)) {
var f = x4(i.padding, n), d = dp(o), p = u === "y" ? Nn : Pn, h = u === "y" ? lr : cr, m = n.rects.reference[c] + n.rects.reference[u] - a[u] - n.rects.popper[c], v = a[u] - n.rects.reference[u], y = pu(o), k = y ? u === "y" ? y.clientHeight || 0 : y.clientWidth || 0 : 0, T = m / 2 - v / 2, b = f[p], D = k - d[c] - f[h], x = k / 2 - d[c] / 2 + T, S = vs(b, x, D), _ = u;
n.modifiersData[r] = (e = {}, e[_] = S, e.centerOffset = S - x, e);
}
}
function E4(t) {
var e = t.state, n = t.options, r = n.element, i = r === void 0 ? "[data-popper-arrow]" : r;
i != null && (typeof i == "string" && (i = e.elements.popper.querySelector(i), !i) || gv(e.elements.popper, i) && (e.elements.arrow = i));
}
var _4 = {
name: "arrow",
enabled: !0,
phase: "main",
fn: S4,
effect: E4,
requires: ["popperOffsets"],
requiresIfExists: ["preventOverflow"]
};
function Ta(t) {
return t.split("-")[1];
}
var T4 = {
top: "auto",
right: "auto",
bottom: "auto",
left: "auto"
};
function C4(t) {
var e = t.x, n = t.y, r = window, i = r.devicePixelRatio || 1;
return {
x: Ea(e * i) / i || 0,
y: Ea(n * i) / i || 0
};
}
function rm(t) {
var e, n = t.popper, r = t.popperRect, i = t.placement, o = t.variation, a = t.offsets, s = t.position, u = t.gpuAcceleration, l = t.adaptive, c = t.roundOffsets, f = t.isFixed, d = c === !0 ? C4(a) : typeof c == "function" ? c(a) : a, p = d.x, h = p === void 0 ? 0 : p, m = d.y, v = m === void 0 ? 0 : m, y = a.hasOwnProperty("x"), k = a.hasOwnProperty("y"), T = Pn, b = Nn, D = window;
if (l) {
var x = pu(n), S = "clientHeight", _ = "clientWidth";
if (x === Sr(n) && (x = qi(n), jr(x).position !== "static" && s === "absolute" && (S = "scrollHeight", _ = "scrollWidth")), x = x, i === Nn || (i === Pn || i === cr) && o === Hs) {
b = lr;
var N = f && D.visualViewport ? D.visualViewport.height : (
// $FlowFixMe[prop-missing]
x[S]
);
v -= N - r.height, v *= u ? 1 : -1;
}
if (i === Pn || (i === Nn || i === lr) && o === Hs) {
T = cr;
var R = f && D.visualViewport ? D.visualViewport.width : (
// $FlowFixMe[prop-missing]
x[_]
);
h -= R - r.width, h *= u ? 1 : -1;
}
}
var w = Object.assign({
position: s
}, l && T4);
if (u) {
var A;
return Object.assign({}, w, (A = {}, A[b] = k ? "0" : "", A[T] = y ? "0" : "", A.transform = (D.devicePixelRatio || 1) <= 1 ? "translate(" + h + "px, " + v + "px)" : "translate3d(" + h + "px, " + v + "px, 0)", A));
}
return Object.assign({}, w, (e = {}, e[b] = k ? v + "px" : "", e[T] = y ? h + "px" : "", e.transform = "", e));
}
function O4(t) {
var e = t.state, n = t.options, r = n.gpuAcceleration, i = r === void 0 ? !0 : r, o = n.adaptive, a = o === void 0 ? !0 : o, s = n.roundOffsets, u = s === void 0 ? !0 : s, l = {
placement: Vr(e.placement),
variation: Ta(e.placement),
popper: e.elements.popper,
popperRect: e.rects.popper,
gpuAcceleration: i,
isFixed: e.options.strategy === "fixed"
};
e.modifiersData.popperOffsets != null && (e.styles.popper = Object.assign({}, e.styles.popper, rm(Object.assign({}, l, {
offsets: e.modifiersData.popperOffsets,
position: e.options.strategy,
adaptive: a,
roundOffsets: u
})))), e.modifiersData.arrow != null && (e.styles.arrow = Object.assign({}, e.styles.arrow, rm(Object.assign({}, l, {
offsets: e.modifiersData.arrow,
position: "absolute",
adaptive: !1,
roundOffsets: u
})))), e.attributes.popper = Object.assign({}, e.attributes.popper, {
"data-popper-placement": e.placement
});
}
var A4 = {
name: "computeStyles",
enabled: !0,
phase: "beforeWrite",
fn: O4,
data: {}
}, Tu = {
passive: !0
};
function M4(t) {
var e = t.state, n = t.instance, r = t.options, i = r.scroll, o = i === void 0 ? !0 : i, a = r.resize, s = a === void 0 ? !0 : a, u = Sr(e.elements.popper), l = [].concat(e.scrollParents.reference, e.scrollParents.popper);
return o && l.forEach(function(c) {
c.addEventListener("scroll", n.update, Tu);
}), s && u.addEventListener("resize", n.update, Tu), function() {
o && l.forEach(function(c) {
c.removeEventListener("scroll", n.update, Tu);
}), s && u.removeEventListener("resize", n.update, Tu);
};
}
var D4 = {
name: "eventListeners",
enabled: !0,
phase: "write",
fn: function() {
},
effect: M4,
data: {}
}, $4 = {
left: "right",
right: "left",
bottom: "top",
top: "bottom"
};
function ul(t) {
return t.replace(/left|right|bottom|top/g, function(e) {
return $4[e];
});
}
var N4 = {
start: "end",
end: "start"
};
function im(t) {
return t.replace(/start|end/g, function(e) {
return N4[e];
});
}
function pp(t) {
var e = Sr(t), n = e.pageXOffset, r = e.pageYOffset;
return {
scrollLeft: n,
scrollTop: r
};
}
function hp(t) {
return _a(qi(t)).left + pp(t).scrollLeft;
}
function P4(t) {
var e = Sr(t), n = qi(t), r = e.visualViewport, i = n.clientWidth, o = n.clientHeight, a = 0, s = 0;
return r && (i = r.width, o = r.height, /^((?!chrome|android).)*safari/i.test(navigator.userAgent) || (a = r.offsetLeft, s = r.offsetTop)), {
width: i,
height: o,
x: a + hp(t),
y: s
};
}
function I4(t) {
var e, n = qi(t), r = pp(t), i = (e = t.ownerDocument) == null ? void 0 : e.body, o = Eo(n.scrollWidth, n.clientWidth, i ? i.scrollWidth : 0, i ? i.clientWidth : 0), a = Eo(n.scrollHeight, n.clientHeight, i ? i.scrollHeight : 0, i ? i.clientHeight : 0), s = -r.scrollLeft + hp(t), u = -r.scrollTop;
return jr(i || n).direction === "rtl" && (s += Eo(n.clientWidth, i ? i.clientWidth : 0) - o), {
width: o,
height: a,
x: s,
y: u
};
}
function mp(t) {
var e = jr(t), n = e.overflow, r = e.overflowX, i = e.overflowY;
return /auto|scroll|overlay|hidden/.test(n + i + r);
}
function wv(t) {
return ["html", "body", "#document"].indexOf(Fr(t)) >= 0 ? t.ownerDocument.body : ar(t) && mp(t) ? t : wv(Bc(t));
}
function ys(t, e) {
var n;
e === void 0 && (e = []);
var r = wv(t), i = r === ((n = t.ownerDocument) == null ? void 0 : n.body), o = Sr(r), a = i ? [o].concat(o.visualViewport || [], mp(r) ? r : []) : r, s = e.concat(a);
return i ? s : (
// $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
s.concat(ys(Bc(a)))
);
}
function Lf(t) {
return Object.assign({}, t, {
left: t.x,
top: t.y,
right: t.x + t.width,
bottom: t.y + t.height
});
}
function L4(t) {
var e = _a(t);
return e.top = e.top + t.clientTop, e.left = e.left + t.clientLeft, e.bottom = e.top + t.clientHeight, e.right = e.left + t.clientWidth, e.width = t.clientWidth, e.height = t.clientHeight, e.x = e.left, e.y = e.top, e;
}
function om(t, e) {
return e === fv ? Lf(P4(t)) : Sa(e) ? L4(e) : Lf(I4(qi(t)));
}
function R4(t) {
var e = ys(Bc(t)), n = ["absolute", "fixed"].indexOf(jr(t).position) >= 0, r = n && ar(t) ? pu(t) : t;
return Sa(r) ? e.filter(function(i) {
return Sa(i) && gv(i, r) && Fr(i) !== "body" && (n ? jr(i).position !== "static" : !0);
}) : [];
}
function B4(t, e, n) {
var r = e === "clippingParents" ? R4(t) : [].concat(e), i = [].concat(r, [n]), o = i[0], a = i.reduce(function(s, u) {
var l = om(t, u);
return s.top = Eo(l.top, s.top), s.right = Ol(l.right, s.right), s.bottom = Ol(l.bottom, s.bottom), s.left = Eo(l.left, s.left), s;
}, om(t, o));
return a.width = a.right - a.left, a.height = a.bottom - a.top, a.x = a.left, a.y = a.top, a;
}
function kv(t) {
var e = t.reference, n = t.element, r = t.placement, i = r ? Vr(r) : null, o = r ? Ta(r) : null, a = e.x + e.width / 2 - n.width / 2, s = e.y + e.height / 2 - n.height / 2, u;
switch (i) {
case Nn:
u = {
x: a,
y: e.y - n.height
};
break;
case lr:
u = {
x: a,
y: e.y + e.height
};
break;
case cr:
u = {
x: e.x + e.width,
y: s
};
break;
case Pn:
u = {
x: e.x - n.width,
y: s
};
break;
default:
u = {
x: e.x,
y: e.y
};
}
var l = i ? fp(i) : null;
if (l != null) {
var c = l === "y" ? "height" : "width";
switch (o) {
case xa:
u[l] = u[l] - (e[c] / 2 - n[c] / 2);
break;
case Hs:
u[l] = u[l] + (e[c] / 2 - n[c] / 2);
break;
}
}
return u;
}
function qs(t, e) {
e === void 0 && (e = {});
var n = e, r = n.placement, i = r === void 0 ? t.placement : r, o = n.boundary, a = o === void 0 ? o4 : o, s = n.rootBoundary, u = s === void 0 ? fv : s, l = n.elementContext, c = l === void 0 ? Za : l, f = n.altBoundary, d = f === void 0 ? !1 : f, p = n.padding, h = p === void 0 ? 0 : p, m = vv(typeof h != "number" ? h : yv(h, fu)), v = c === Za ? a4 : Za, y = t.rects.popper, k = t.elements[d ? v : c], T = B4(Sa(k) ? k : k.contextElement || qi(t.elements.popper), a, u), b = _a(t.elements.reference), D = kv({
reference: b,
element: y,
strategy: "absolute",
placement: i
}), x = Lf(Object.assign({}, y, D)), S = c === Za ? x : b, _ = {
top: T.top - S.top + m.top,
bottom: S.bottom - T.bottom + m.bottom,
left: T.left - S.left + m.left,
right: S.right - T.right + m.right
}, N = t.modifiersData.offset;
if (c === Za && N) {
var R = N[i];
Object.keys(_).forEach(function(w) {
var A = [cr, lr].indexOf(w) >= 0 ? 1 : -1, $ = [Nn, lr].indexOf(w) >= 0 ? "y" : "x";
_[w] += R[$] * A;
});
}
return _;
}
function V4(t, e) {
e === void 0 && (e = {});
var n = e, r = n.placement, i = n.boundary, o = n.rootBoundary, a = n.padding, s = n.flipVariations, u = n.allowedAutoPlacements, l = u === void 0 ? pv : u, c = Ta(r), f = c ? s ? tm : tm.filter(function(h) {
return Ta(h) === c;
}) : fu, d = f.filter(function(h) {
return l.indexOf(h) >= 0;
});
d.length === 0 && (d = f);
var p = d.reduce(function(h, m) {
return h[m] = qs(t, {
placement: m,
boundary: i,
rootBoundary: o,
padding: a
})[Vr(m)], h;
}, {});
return Object.keys(p).sort(function(h, m) {
return p[h] - p[m];
});
}
function z4(t) {
if (Vr(t) === cp)
return [];
var e = ul(t);
return [im(t), e, im(e)];
}
function H4(t) {
var e = t.state, n = t.options, r = t.name;
if (!e.modifiersData[r]._skip) {
for (var i = n.mainAxis, o = i === void 0 ? !0 : i, a = n.altAxis, s = a === void 0 ? !0 : a, u = n.fallbackPlacements, l = n.padding, c = n.boundary, f = n.rootBoundary, d = n.altBoundary, p = n.flipVariations, h = p === void 0 ? !0 : p, m = n.allowedAutoPlacements, v = e.options.placement, y = Vr(v), k = y === v, T = u || (k || !h ? [ul(v)] : z4(v)), b = [v].concat(T).reduce(function(q, V) {
return q.concat(Vr(V) === cp ? V4(e, {
placement: V,
boundary: c,
rootBoundary: f,
padding: l,
flipVariations: h,
allowedAutoPlacements: m
}) : V);
}, []), D = e.rects.reference, x = e.rects.popper, S = /* @__PURE__ */ new Map(), _ = !0, N = b[0], R = 0; R < b.length; R++) {
var w = b[R], A = Vr(w), $ = Ta(w) === xa, I = [Nn, lr].indexOf(A) >= 0, E = I ? "width" : "height", O = qs(e, {
placement: w,
boundary: c,
rootBoundary: f,
altBoundary: d,
padding: l
}), g = I ? $ ? cr : Pn : $ ? lr : Nn;
D[E] > x[E] && (g = ul(g));
var M = ul(g), H = [];
if (o && H.push(O[A] <= 0), s && H.push(O[g] <= 0, O[M] <= 0), H.every(function(q) {
return q;
})) {
N = w, _ = !1;
break;
}
S.set(w, H);
}
if (_)
for (var z = h ? 3 : 1, Y = function(V) {
var te = b.find(function(K) {
var Q = S.get(K);
if (Q)
return Q.slice(0, V).every(function(Z) {
return Z;
});
});
if (te)
return N