@devkitvue/form
Version:
Devkit Base Components is a Vue plugin offering a collection of reusable, headless components designed to streamline your Vue.js development workflow. Built for flexibility and maintainability, this library gives you complete control over styling and beha
1,367 lines (1,348 loc) • 1.28 MB
JavaScript
var Zf = Object.defineProperty;
var qf = (e, t, n) => t in e ? Zf(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
var Fn = (e, t, n) => qf(e, typeof t != "symbol" ? t + "" : t, n);
import { ref as Qe, computed as Ot, readonly as Xf, getCurrentInstance as Js, onMounted as Jf, nextTick as Qf, watch as eh, useId as th, mergeProps as b, createElementBlock as I, openBlock as m, createElementVNode as j, renderSlot as z, createTextVNode as nt, toDisplayString as fe, resolveComponent as Q, resolveDirective as xt, withDirectives as et, createBlock as R, resolveDynamicComponent as re, withCtx as ne, createCommentVNode as N, normalizeClass as pe, Teleport as nh, Transition as sr, Fragment as ue, renderList as Ae, createVNode as ge, createSlots as xn, defineComponent as ct, inject as ot, unref as Je, withAsyncContext as gs, h as le, onBeforeUnmount as Bd, Suspense as Vd, vShow as Ta, onBeforeMount as rh, normalizeStyle as _d, withKeys as Me, onErrorCaptured as oh, normalizeProps as Ii, withModifiers as bs, useSlots as Nd, toHandlers as Ro, watchEffect as ih } from "vue";
import { defineStore as ah, getActivePinia as sh } from "pinia";
import { useDebounceFn as zd, useMemoize as lh } from "@vueuse/core";
import { useFormKitContextById as uh, useFormKitNodeById as dh, useFormKitContext as ch, createInput as gr, defaultConfig as ph } from "@formkit/vue";
import { ObjectEntries as Ma, resolveApiEndpoint as Nt, ObjectKeys as Dr } from "@devkitvue/apiclient";
import { AppBtn as $t, makeGridWrapperClassName as fh, NumberToDate as Ui, DateToNumber as Qs, AppIcon as vs } from "@devkitvue/base-components";
import { useRoute as hh, useRouter as Hd } from "vue-router";
import { useDialog as mh, useToast as gh, Skeleton as bh, SelectButton as vh, MultiSelect as yh, ToggleSwitch as wh } from "primevue";
import { useQueryClient as kh, useMutation as $h, useQuery as Ch } from "@tanstack/vue-query";
import Sh, { UIPlugin as xh } from "@uppy/core";
import { Dashboard as Ih } from "@uppy/vue";
import Ph from "@uppy/tus";
import Dh from "@uppy/image-editor";
import Oh from "@uppy/compressor";
import { h as It } from "preact";
import { createMessage as lr, warn as Th, isDOM as oi, isComponent as el, error as Mh } from "@formkit/core";
import { defaultIcon as Ie, localize as Oe, options as ur, disablesChildren as Lh, icon as Eh, isSlotCondition as Kd, isSchemaObject as Rh, extendSchema as tl, normalizeOptions as nl } from "@formkit/inputs";
import Fh from "dexie";
import { useI18n as jd } from "vue-i18n";
const ys = () => {
const [e, t] = history.state.current.split("?"), n = new URLSearchParams(t || "");
return { currentPath: e, currentQueryParams: n };
}, Ud = (e, t) => {
const n = t.toString(), r = `${e}?${n}`, i = { ...history.state };
i.current = r, history.pushState(i, "", r);
}, rl = (e, t) => {
const { currentPath: n, currentQueryParams: r } = ys();
r.set(e, String(t)), Ud(n, r);
}, Ah = (e) => {
const { currentPath: t, currentQueryParams: n } = ys();
return n.delete(e), Ud(t, n), n;
}, Bh = (e) => {
const { currentQueryParams: t } = ys();
return console.log("cuirreeen params", t), t.get(e);
}, Vh = ({
context: e
}) => ah(`app-form-${e.formKey}`, () => {
const t = {}, n = {}, r = Qe({}), i = 1e3, o = uh(e.formKey), a = dh(e.formKey), s = zd(($) => {
if (typeof $ == "object") {
rl(e.formKey, JSON.stringify($));
return;
}
rl(e.formKey, $);
}, i), l = () => {
a.value && a.value.reset();
}, u = () => {
a.value && a.value.reset({});
}, d = Ot(() => {
if (!a.value || !a.value._value || !a.value.value) return "";
try {
const $ = JSON.stringify(a.value._value);
return $ == "{}" ? "" : $;
} catch ($) {
return console.error("error happened while converting value: ", $), "";
}
}), c = async ($) => {
a.value && a.value.reset($);
}, p = async ($, g) => {
if (!a.value) return;
const v = {};
v[$] = g, console.log("new obj is", v), a.value.input(v);
}, f = async ($) => {
if (!a.value) return;
const g = a.value.find($, "name");
g && "forceReload" in g.props && g.props.forceReload();
}, h = async ($) => {
p($, null);
}, y = () => {
a.value && localStorage.setItem(e.formKey, d.value);
}, k = Ot(() => {
const $ = {};
return !a || !a.value || !a.value._value ? $ : a.value._value;
}), w = Ot(() => {
const $ = {};
console.log("formvalue", k.value);
for (const [g, v] of Ma(k.value))
console.log("formvalue", k.value), v && ($[g] = v);
return $;
});
return {
//state
initialFormValue: t,
setFormValue: c,
formValue: k,
presistForm: y,
formValueString: d,
clearInput: h,
activeInputs: w,
refetchDropdownInput: f,
setInputValue: p,
resetForm: l,
formElementNode: a,
formElementContext: o,
formData: r,
debouncedRouteQueryAppend: s,
clearForm: u,
formOptions: n
//methos
};
}), ws = (e) => Vh(e)(), f7 = (e) => {
const t = sh();
if (!t) throw new Error("Pinia not installed");
if (!(`app-form-${e}` in t.state.value)) throw new Error("store is not defined");
return ws({
context: {
sections: {},
formKey: e,
title: "formKey",
submitHandler: { endpoint: "" }
}
});
};
function at(e) {
return e == null || e === "" || Array.isArray(e) && e.length === 0 || !(e instanceof Date) && typeof e == "object" && Object.keys(e).length === 0;
}
function _h(e, t, n, r = 1) {
let i = -1;
const o = at(e), a = at(t);
return o && a ? i = 0 : o ? i = r : a ? i = -r : typeof e == "string" && typeof t == "string" ? i = n(e, t) : i = e < t ? -1 : e > t ? 1 : 0, i;
}
function La(e, t, n = /* @__PURE__ */ new WeakSet()) {
if (e === t) return !0;
if (!e || !t || typeof e != "object" || typeof t != "object" || n.has(e) || n.has(t)) return !1;
n.add(e).add(t);
const r = Array.isArray(e), i = Array.isArray(t);
let o, a, s;
if (r && i) {
if (a = e.length, a != t.length) return !1;
for (o = a; o-- !== 0; ) if (!La(e[o], t[o], n)) return !1;
return !0;
}
if (r != i) return !1;
const l = e instanceof Date, u = t instanceof Date;
if (l != u) return !1;
if (l && u) return e.getTime() == t.getTime();
const d = e instanceof RegExp, c = t instanceof RegExp;
if (d != c) return !1;
if (d && c) return e.toString() == t.toString();
const p = Object.keys(e);
if (a = p.length, a !== Object.keys(t).length) return !1;
for (o = a; o-- !== 0; ) if (!Object.prototype.hasOwnProperty.call(t, p[o])) return !1;
for (o = a; o-- !== 0; )
if (s = p[o], !La(e[s], t[s], n)) return !1;
return !0;
}
function Nh(e, t) {
return La(e, t);
}
function Pi(e) {
return typeof e == "function" && "call" in e && "apply" in e;
}
function de(e) {
return !at(e);
}
function we(e, t) {
if (!e || !t)
return null;
try {
const n = e[t];
if (de(n)) return n;
} catch {
}
if (Object.keys(e).length) {
if (Pi(t))
return t(e);
if (t.indexOf(".") === -1)
return e[t];
{
const n = t.split(".");
let r = e;
for (let i = 0, o = n.length; i < o; ++i) {
if (r == null)
return null;
r = r[n[i]];
}
return r;
}
}
return null;
}
function Mn(e, t, n) {
return n ? we(e, n) === we(t, n) : Nh(e, t);
}
function zh(e, t) {
if (e != null && t && t.length) {
for (const n of t)
if (Mn(e, n)) return !0;
}
return !1;
}
function In(e, t = !0) {
return e instanceof Object && e.constructor === Object && (t || Object.keys(e).length !== 0);
}
function Gi(e, t) {
let n = -1;
if (t) {
for (let r = 0; r < t.length; r++)
if (t[r] === e) {
n = r;
break;
}
}
return n;
}
function ii(e, t) {
let n = -1;
if (de(e))
try {
n = e.findLastIndex(t);
} catch {
n = e.lastIndexOf([...e].reverse().find(t));
}
return n;
}
function it(e, ...t) {
return Pi(e) ? e(...t) : e;
}
function yt(e, t = !0) {
return typeof e == "string" && (t || e !== "");
}
function At(e) {
return yt(e) ? e.replace(/(-|_)/g, "").toLowerCase() : e;
}
function ks(e, t = "", n = {}) {
const r = At(t).split("."), i = r.shift();
if (i) {
if (In(e)) {
const o = Object.keys(e).find((a) => At(a) === i) || "";
return ks(it(e[o], n), r.join("."), n);
}
return;
}
return it(e, n);
}
function Gd(e, t = !0) {
return Array.isArray(e) && (t || e.length !== 0);
}
function Hh(e) {
return de(e) && !isNaN(e);
}
function Wd(e = "") {
return de(e) && e.length === 1 && !!e.match(/\S| /);
}
function Ea() {
return new Intl.Collator(void 0, { numeric: !0 }).compare;
}
function Gn(e, t) {
if (t) {
const n = t.test(e);
return t.lastIndex = 0, n;
}
return !1;
}
function Lr(e) {
return e && e.replace(/\/\*(?:(?!\*\/)[\s\S])*\*\/|[\r\n\t]+/g, "").replace(/ {2,}/g, " ").replace(/ ([{:}]) /g, "$1").replace(/([;,]) /g, "$1").replace(/ !/g, "!").replace(/: /g, ":").trim();
}
function kt(e) {
if (e && /[\xC0-\xFF\u0100-\u017E]/.test(e)) {
const n = {
A: /[\xC0-\xC5\u0100\u0102\u0104]/g,
AE: /[\xC6]/g,
C: /[\xC7\u0106\u0108\u010A\u010C]/g,
D: /[\xD0\u010E\u0110]/g,
E: /[\xC8-\xCB\u0112\u0114\u0116\u0118\u011A]/g,
G: /[\u011C\u011E\u0120\u0122]/g,
H: /[\u0124\u0126]/g,
I: /[\xCC-\xCF\u0128\u012A\u012C\u012E\u0130]/g,
IJ: /[\u0132]/g,
J: /[\u0134]/g,
K: /[\u0136]/g,
L: /[\u0139\u013B\u013D\u013F\u0141]/g,
N: /[\xD1\u0143\u0145\u0147\u014A]/g,
O: /[\xD2-\xD6\xD8\u014C\u014E\u0150]/g,
OE: /[\u0152]/g,
R: /[\u0154\u0156\u0158]/g,
S: /[\u015A\u015C\u015E\u0160]/g,
T: /[\u0162\u0164\u0166]/g,
U: /[\xD9-\xDC\u0168\u016A\u016C\u016E\u0170\u0172]/g,
W: /[\u0174]/g,
Y: /[\xDD\u0176\u0178]/g,
Z: /[\u0179\u017B\u017D]/g,
a: /[\xE0-\xE5\u0101\u0103\u0105]/g,
ae: /[\xE6]/g,
c: /[\xE7\u0107\u0109\u010B\u010D]/g,
d: /[\u010F\u0111]/g,
e: /[\xE8-\xEB\u0113\u0115\u0117\u0119\u011B]/g,
g: /[\u011D\u011F\u0121\u0123]/g,
i: /[\xEC-\xEF\u0129\u012B\u012D\u012F\u0131]/g,
ij: /[\u0133]/g,
j: /[\u0135]/g,
k: /[\u0137,\u0138]/g,
l: /[\u013A\u013C\u013E\u0140\u0142]/g,
n: /[\xF1\u0144\u0146\u0148\u014B]/g,
p: /[\xFE]/g,
o: /[\xF2-\xF6\xF8\u014D\u014F\u0151]/g,
oe: /[\u0153]/g,
r: /[\u0155\u0157\u0159]/g,
s: /[\u015B\u015D\u015F\u0161]/g,
t: /[\u0163\u0165\u0167]/g,
u: /[\xF9-\xFC\u0169\u016B\u016D\u016F\u0171\u0173]/g,
w: /[\u0175]/g,
y: /[\xFD\xFF\u0177]/g,
z: /[\u017A\u017C\u017E]/g
};
for (const r in n)
e = e.replace(n[r], r);
}
return e;
}
function ol(e, t, n) {
e && t !== n && (n >= e.length && (n %= e.length, t %= e.length), e.splice(n, 0, e.splice(t, 1)[0]));
}
function il(e, t, n = 1, r, i = 1) {
const o = _h(e, t, r, n);
let a = n;
return (at(e) || at(t)) && (a = i === 1 ? n : i), a * o;
}
function Kh(e) {
return yt(e, !1) ? e[0].toUpperCase() + e.slice(1) : e;
}
function Yd(e) {
return yt(e) ? e.replace(/(_)/g, "-").replace(/[A-Z]/g, (t, n) => n === 0 ? t : "-" + t.toLowerCase()).toLowerCase() : e;
}
function $s() {
const e = /* @__PURE__ */ new Map();
return {
on(t, n) {
let r = e.get(t);
return r ? r.push(n) : r = [n], e.set(t, r), this;
},
off(t, n) {
const r = e.get(t);
return r && r.splice(r.indexOf(n) >>> 0, 1), this;
},
emit(t, n) {
const r = e.get(t);
r && r.forEach((i) => {
i(n);
});
},
clear() {
e.clear();
}
};
}
function He(...e) {
if (e) {
let t = [];
for (let n = 0; n < e.length; n++) {
const r = e[n];
if (!r)
continue;
const i = typeof r;
if (i === "string" || i === "number")
t.push(r);
else if (i === "object") {
const o = Array.isArray(r) ? [He(...r)] : Object.entries(r).map(([a, s]) => s ? a : void 0);
t = o.length ? t.concat(o.filter((a) => !!a)) : t;
}
}
return t.join(" ").trim();
}
}
function jh(e, t) {
return e ? e.classList ? e.classList.contains(t) : new RegExp("(^| )" + t + "( |$)", "gi").test(e.className) : !1;
}
function Or(e, t) {
if (e && t) {
const n = (r) => {
jh(e, r) || (e.classList ? e.classList.add(r) : e.className += " " + r);
};
[t].flat().filter(Boolean).forEach((r) => r.split(" ").forEach(n));
}
}
function Uh(e) {
if (e) {
const t = document.createElement("a");
if (t.download !== void 0) {
const { name: n, src: r } = e;
return t.setAttribute("href", r), t.setAttribute("download", n), t.style.display = "none", document.body.appendChild(t), t.click(), document.body.removeChild(t), !0;
}
}
return !1;
}
function Gh(e, t) {
const n = new Blob([e], {
type: "application/csv;charset=utf-8;"
});
window.navigator.msSaveOrOpenBlob ? navigator.msSaveOrOpenBlob(n, t + ".csv") : Uh({ name: t + ".csv", src: URL.createObjectURL(n) }) || (e = "data:text/csv;charset=utf-8," + e, window.open(encodeURI(e)));
}
function sn(e, t) {
if (e && t) {
const n = (r) => {
e.classList ? e.classList.remove(r) : e.className = e.className.replace(new RegExp("(^|\\b)" + r.split(" ").join("|") + "(\\b|$)", "gi"), " ");
};
[t].flat().filter(Boolean).forEach((r) => r.split(" ").forEach(n));
}
}
function ai(e) {
for (const t of document == null ? void 0 : document.styleSheets)
try {
for (const n of t == null ? void 0 : t.cssRules)
for (const r of n == null ? void 0 : n.style)
if (e.test(r))
return { name: r, value: n.style.getPropertyValue(r).trim() };
} catch {
}
return null;
}
function Zd(e) {
const t = { width: 0, height: 0 };
return e && (e.style.visibility = "hidden", e.style.display = "block", t.width = e.offsetWidth, t.height = e.offsetHeight, e.style.display = "none", e.style.visibility = "visible"), t;
}
function Cs() {
const e = window, t = document, n = t.documentElement, r = t.getElementsByTagName("body")[0], i = e.innerWidth || n.clientWidth || r.clientWidth, o = e.innerHeight || n.clientHeight || r.clientHeight;
return { width: i, height: o };
}
function Ra(e) {
return e ? Math.abs(e.scrollLeft) : 0;
}
function Wh() {
const e = document.documentElement;
return (window.pageXOffset || Ra(e)) - (e.clientLeft || 0);
}
function Yh() {
const e = document.documentElement;
return (window.pageYOffset || e.scrollTop) - (e.clientTop || 0);
}
function qd(e) {
return e ? getComputedStyle(e).direction === "rtl" : !1;
}
function Di(e, t, n = !0) {
var r, i, o, a;
if (e) {
const s = e.offsetParent ? { width: e.offsetWidth, height: e.offsetHeight } : Zd(e), l = s.height, u = s.width, d = t.offsetHeight, c = t.offsetWidth, p = t.getBoundingClientRect(), f = Yh(), h = Wh(), y = Cs();
let k, w, $ = "top";
p.top + d + l > y.height ? (k = p.top + f - l, $ = "bottom", k < 0 && (k = f)) : k = d + p.top + f, p.left + u > y.width ? w = Math.max(0, p.left + h + c - u) : w = p.left + h, qd(e) ? e.style.insetInlineEnd = w + "px" : e.style.insetInlineStart = w + "px", e.style.top = k + "px", e.style.transformOrigin = $, n && (e.style.marginTop = $ === "bottom" ? `calc(${(i = (r = ai(/-anchor-gutter$/)) == null ? void 0 : r.value) != null ? i : "2px"} * -1)` : (a = (o = ai(/-anchor-gutter$/)) == null ? void 0 : o.value) != null ? a : "");
}
}
function Pn(e, t) {
e && (typeof t == "string" ? e.style.cssText = t : Object.entries(t || {}).forEach(([n, r]) => e.style[n] = r));
}
function Ue(e, t) {
return e instanceof HTMLElement ? e.offsetWidth : 0;
}
function Xd(e, t, n = !0) {
var r, i, o, a;
if (e) {
const s = e.offsetParent ? { width: e.offsetWidth, height: e.offsetHeight } : Zd(e), l = t.offsetHeight, u = t.getBoundingClientRect(), d = Cs();
let c, p, f = "top";
u.top + l + s.height > d.height ? (c = -1 * s.height, f = "bottom", u.top + c < 0 && (c = -1 * u.top)) : c = l, s.width > d.width ? p = u.left * -1 : u.left + s.width > d.width ? p = (u.left + s.width - d.width) * -1 : p = 0, e.style.top = c + "px", e.style.insetInlineStart = p + "px", e.style.transformOrigin = f, n && (e.style.marginTop = f === "bottom" ? `calc(${(i = (r = ai(/-anchor-gutter$/)) == null ? void 0 : r.value) != null ? i : "2px"} * -1)` : (a = (o = ai(/-anchor-gutter$/)) == null ? void 0 : o.value) != null ? a : "");
}
}
function Ss(e) {
if (e) {
let t = e.parentNode;
return t && t instanceof ShadowRoot && t.host && (t = t.host), t;
}
return null;
}
function Zh(e) {
return !!(e !== null && typeof e < "u" && e.nodeName && Ss(e));
}
function Ln(e) {
return typeof Element < "u" ? e instanceof Element : e !== null && typeof e == "object" && e.nodeType === 1 && typeof e.nodeName == "string";
}
var Wi = void 0;
function al(e) {
{
if (Wi != null) return Wi;
const t = document.createElement("div");
Pn(t, {
width: "100px",
height: "100px",
overflow: "scroll",
position: "absolute",
top: "-9999px"
}), document.body.appendChild(t);
const n = t.offsetWidth - t.clientWidth;
return document.body.removeChild(t), Wi = n, n;
}
}
function Jo() {
if (window.getSelection) {
const e = window.getSelection() || {};
e.empty ? e.empty() : e.removeAllRanges && e.rangeCount > 0 && e.getRangeAt(0).getClientRects().length > 0 && e.removeAllRanges();
}
}
function si(e, t = {}) {
if (Ln(e)) {
const n = (r, i) => {
var o, a;
const s = (o = e == null ? void 0 : e.$attrs) != null && o[r] ? [(a = e == null ? void 0 : e.$attrs) == null ? void 0 : a[r]] : [];
return [i].flat().reduce((l, u) => {
if (u != null) {
const d = typeof u;
if (d === "string" || d === "number")
l.push(u);
else if (d === "object") {
const c = Array.isArray(u) ? n(r, u) : Object.entries(u).map(([p, f]) => r === "style" && (f || f === 0) ? `${p.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase()}:${f}` : f ? p : void 0);
l = c.length ? l.concat(c.filter((p) => !!p)) : l;
}
}
return l;
}, s);
};
Object.entries(t).forEach(([r, i]) => {
if (i != null) {
const o = r.match(/^on(.+)/);
o ? e.addEventListener(o[1].toLowerCase(), i) : r === "p-bind" || r === "pBind" ? si(e, i) : (i = r === "class" ? [...new Set(n("class", i))].join(" ").trim() : r === "style" ? n("style", i).join(";").trim() : i, (e.$attrs = e.$attrs || {}) && (e.$attrs[r] = i), e.setAttribute(r, i));
}
});
}
}
function Jd(e, t = {}, ...n) {
{
const r = document.createElement(e);
return si(r, t), r.append(...n), r;
}
}
function gt(e, t) {
return Ln(e) ? Array.from(e.querySelectorAll(t)) : [];
}
function Ye(e, t) {
return Ln(e) ? e.matches(t) ? e : e.querySelector(t) : null;
}
function je(e, t) {
e && document.activeElement !== e && e.focus(t);
}
function Ve(e, t) {
if (Ln(e)) {
const n = e.getAttribute(t);
return isNaN(n) ? n === "true" || n === "false" ? n === "true" : n : +n;
}
}
function Br(e, t = "") {
const n = gt(
e,
`button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},
[href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},
input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},
select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},
textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},
[tabIndex]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},
[contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t}`
), r = [];
for (const i of n)
getComputedStyle(i).display != "none" && getComputedStyle(i).visibility != "hidden" && r.push(i);
return r;
}
function vn(e, t) {
const n = Br(e, t);
return n.length > 0 ? n[0] : null;
}
function yn(e) {
if (e) {
let t = e.offsetHeight;
const n = getComputedStyle(e);
return t -= parseFloat(n.paddingTop) + parseFloat(n.paddingBottom) + parseFloat(n.borderTopWidth) + parseFloat(n.borderBottomWidth), t;
}
return 0;
}
function Qd(e) {
if (e) {
e.style.visibility = "hidden", e.style.display = "block";
const t = e.offsetHeight;
return e.style.display = "none", e.style.visibility = "visible", t;
}
return 0;
}
function ec(e) {
if (e) {
e.style.visibility = "hidden", e.style.display = "block";
const t = e.offsetWidth;
return e.style.display = "none", e.style.visibility = "visible", t;
}
return 0;
}
function Yt(e) {
var t;
if (e) {
const n = (t = Ss(e)) == null ? void 0 : t.childNodes;
let r = 0;
if (n)
for (let i = 0; i < n.length; i++) {
if (n[i] === e) return r;
n[i].nodeType === 1 && r++;
}
}
return -1;
}
function tc(e, t) {
const n = Br(e, t);
return n.length > 0 ? n[n.length - 1] : null;
}
function Oi(e, t) {
let n = e.nextElementSibling;
for (; n; ) {
if (n.matches(t))
return n;
n = n.nextElementSibling;
}
return null;
}
function wn(e) {
if (e) {
const t = e.getBoundingClientRect();
return {
top: t.top + (window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0),
left: t.left + (window.pageXOffset || Ra(document.documentElement) || Ra(document.body) || 0)
};
}
return {
top: "auto",
left: "auto"
};
}
function Vr(e, t) {
return e ? e.offsetHeight : 0;
}
function nc(e, t = []) {
const n = Ss(e);
return n === null ? t : nc(n, t.concat([n]));
}
function Ti(e, t) {
let n = e.previousElementSibling;
for (; n; ) {
if (n.matches(t))
return n;
n = n.previousElementSibling;
}
return null;
}
function qh(e) {
const t = [];
if (e) {
const n = nc(e), r = /(auto|scroll)/, i = (o) => {
try {
const a = window.getComputedStyle(o, null);
return r.test(a.getPropertyValue("overflow")) || r.test(a.getPropertyValue("overflowX")) || r.test(a.getPropertyValue("overflowY"));
} catch {
return !1;
}
};
for (const o of n) {
const a = o.nodeType === 1 && o.dataset.scrollselectors;
if (a) {
const s = a.split(",");
for (const l of s) {
const u = Ye(o, l);
u && i(u) && t.push(u);
}
}
o.nodeType !== 9 && i(o) && t.push(o);
}
}
return t;
}
function sl() {
if (window.getSelection) return window.getSelection().toString();
if (document.getSelection) return document.getSelection().toString();
}
function kn(e) {
if (e) {
let t = e.offsetWidth;
const n = getComputedStyle(e);
return t -= parseFloat(n.paddingLeft) + parseFloat(n.paddingRight) + parseFloat(n.borderLeftWidth) + parseFloat(n.borderRightWidth), t;
}
return 0;
}
function ll(e, t, n) {
const r = e[t];
typeof r == "function" && r.apply(e, []);
}
function Xh() {
return /(android)/i.test(navigator.userAgent);
}
function Yi(e) {
if (e) {
const t = e.nodeName, n = e.parentElement && e.parentElement.nodeName;
return t === "INPUT" || t === "TEXTAREA" || t === "BUTTON" || t === "A" || n === "INPUT" || n === "TEXTAREA" || n === "BUTTON" || n === "A" || !!e.closest(".p-button, .p-checkbox, .p-radiobutton");
}
return !1;
}
function rc() {
return !!(typeof window < "u" && window.document && window.document.createElement);
}
function ul(e, t = "") {
return Ln(e) ? e.matches(`button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},
[href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},
input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},
select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},
textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},
[tabIndex]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t},
[contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])${t}`) : !1;
}
function li(e) {
return !!(e && e.offsetParent != null);
}
function Mi() {
return "ontouchstart" in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0;
}
function Jh(e, t) {
var n, r;
if (e) {
const i = e.parentElement, o = wn(i), a = Cs(), s = e.offsetParent ? e.offsetWidth : ec(e), l = e.offsetParent ? e.offsetHeight : Qd(e), u = Ue((n = i == null ? void 0 : i.children) == null ? void 0 : n[0]), d = Vr((r = i == null ? void 0 : i.children) == null ? void 0 : r[0]);
let c = "", p = "";
o.left + u + s > a.width - al() ? o.left < s ? t % 2 === 1 ? c = o.left ? "-" + o.left + "px" : "100%" : t % 2 === 0 && (c = a.width - s - al() + "px") : c = "-100%" : c = "100%", e.getBoundingClientRect().top + d + l > a.height ? p = `-${l - d}px` : p = "0px", e.style.top = p, e.style.insetInlineStart = c;
}
}
function Li(e, t = "", n) {
Ln(e) && n !== null && n !== void 0 && e.setAttribute(t, n);
}
var Fo = {};
function Qh(e = "pui_id_") {
return Object.hasOwn(Fo, e) || (Fo[e] = 0), Fo[e]++, `${e}${Fo[e]}`;
}
function em() {
let e = [];
const t = (a, s, l = 999) => {
const u = i(a, s, l), d = u.value + (u.key === a ? 0 : l) + 1;
return e.push({ key: a, value: d }), d;
}, n = (a) => {
e = e.filter((s) => s.value !== a);
}, r = (a, s) => i(a).value, i = (a, s, l = 0) => [...e].reverse().find((u) => !0) || { key: a, value: l }, o = (a) => a && parseInt(a.style.zIndex, 10) || 0;
return {
get: o,
set: (a, s, l) => {
s && (s.style.zIndex = String(t(a, !0, l)));
},
clear: (a) => {
a && (n(o(a)), a.style.zIndex = "");
},
getCurrent: (a) => r(a)
};
}
var Ct = em(), tm = Object.defineProperty, nm = Object.defineProperties, rm = Object.getOwnPropertyDescriptors, ui = Object.getOwnPropertySymbols, oc = Object.prototype.hasOwnProperty, ic = Object.prototype.propertyIsEnumerable, dl = (e, t, n) => t in e ? tm(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Dt = (e, t) => {
for (var n in t || (t = {}))
oc.call(t, n) && dl(e, n, t[n]);
if (ui)
for (var n of ui(t))
ic.call(t, n) && dl(e, n, t[n]);
return e;
}, Zi = (e, t) => nm(e, rm(t)), Gt = (e, t) => {
var n = {};
for (var r in e)
oc.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
if (e != null && ui)
for (var r of ui(e))
t.indexOf(r) < 0 && ic.call(e, r) && (n[r] = e[r]);
return n;
}, om = $s(), rt = om, Fa = /{([^}]*)}/g, im = /(\d+\s+[\+\-\*\/]\s+\d+)/g, am = /var\([^)]+\)/g;
function sm(e) {
return In(e) && e.hasOwnProperty("$value") && e.hasOwnProperty("$type") ? e.$value : e;
}
function lm(e) {
return e.replaceAll(/ /g, "").replace(/[^\w]/g, "-");
}
function Aa(e = "", t = "") {
return lm(`${yt(e, !1) && yt(t, !1) ? `${e}-` : e}${t}`);
}
function ac(e = "", t = "") {
return `--${Aa(e, t)}`;
}
function um(e = "") {
const t = (e.match(/{/g) || []).length, n = (e.match(/}/g) || []).length;
return (t + n) % 2 !== 0;
}
function sc(e, t = "", n = "", r = [], i) {
if (yt(e)) {
const o = e.trim();
if (um(o))
return;
if (Gn(o, Fa)) {
const a = o.replaceAll(Fa, (s) => {
const u = s.replace(/{|}/g, "").split(".").filter((d) => !r.some((c) => Gn(d, c)));
return `var(${ac(n, Yd(u.join("-")))}${de(i) ? `, ${i}` : ""})`;
});
return Gn(a.replace(am, "0"), im) ? `calc(${a})` : a;
}
return o;
} else if (Hh(e))
return e;
}
function dm(e, t, n) {
yt(t, !1) && e.push(`${t}:${n};`);
}
function zn(e, t) {
return e ? `${e}{${t}}` : "";
}
function lc(e, t) {
if (e.indexOf("dt(") === -1) return e;
function n(a, s) {
const l = [];
let u = 0, d = "", c = null, p = 0;
for (; u <= a.length; ) {
const f = a[u];
if ((f === '"' || f === "'" || f === "`") && a[u - 1] !== "\\" && (c = c === f ? null : f), !c && (f === "(" && p++, f === ")" && p--, (f === "," || u === a.length) && p === 0)) {
const h = d.trim();
h.startsWith("dt(") ? l.push(lc(h, s)) : l.push(r(h)), d = "", u++;
continue;
}
f !== void 0 && (d += f), u++;
}
return l;
}
function r(a) {
const s = a[0];
if ((s === '"' || s === "'" || s === "`") && a[a.length - 1] === s)
return a.slice(1, -1);
const l = Number(a);
return isNaN(l) ? a : l;
}
const i = [], o = [];
for (let a = 0; a < e.length; a++)
if (e[a] === "d" && e.slice(a, a + 3) === "dt(")
o.push(a), a += 2;
else if (e[a] === ")" && o.length > 0) {
const s = o.pop();
o.length === 0 && i.push([s, a]);
}
if (!i.length) return e;
for (let a = i.length - 1; a >= 0; a--) {
const [s, l] = i[a], u = e.slice(s + 3, l), d = n(u, t), c = t(...d);
e = e.slice(0, s) + c + e.slice(l + 1);
}
return e;
}
var Cn = (...e) => cm(Fe.getTheme(), ...e), cm = (e = {}, t, n, r) => {
if (t) {
const { variable: i, options: o } = Fe.defaults || {}, { prefix: a, transform: s } = (e == null ? void 0 : e.options) || o || {}, l = Gn(t, Fa) ? t : `{${t}}`;
return r === "value" || at(r) && s === "strict" ? Fe.getTokenValue(t) : sc(l, void 0, a, [i.excludedKeyRegex], n);
}
return "";
};
function Ao(e, ...t) {
if (e instanceof Array) {
const n = e.reduce((r, i, o) => {
var a;
return r + i + ((a = it(t[o], { dt: Cn })) != null ? a : "");
}, "");
return lc(n, Cn);
}
return it(e, { dt: Cn });
}
function pm(e, t = {}) {
const n = Fe.defaults.variable, { prefix: r = n.prefix, selector: i = n.selector, excludedKeyRegex: o = n.excludedKeyRegex } = t, a = [], s = [], l = [{ node: e, path: r }];
for (; l.length; ) {
const { node: d, path: c } = l.pop();
for (const p in d) {
const f = d[p], h = sm(f), k = Gn(p, o) ? Aa(c) : Aa(c, Yd(p));
if (In(h))
l.push({ node: h, path: k });
else {
const w = ac(k), $ = sc(h, k, r, [o]);
dm(s, w, $);
let g = k;
r && g.startsWith(r + "-") && (g = g.slice(r.length + 1)), a.push(g.replace(/-/g, "."));
}
}
}
const u = s.join("");
return {
value: s,
tokens: a,
declarations: u,
css: zn(i, u)
};
}
var Pt = {
regex: {
rules: {
class: {
pattern: /^\.([a-zA-Z][\w-]*)$/,
resolve(e) {
return { type: "class", selector: e, matched: this.pattern.test(e.trim()) };
}
},
attr: {
pattern: /^\[(.*)\]$/,
resolve(e) {
return { type: "attr", selector: `:root${e}`, matched: this.pattern.test(e.trim()) };
}
},
media: {
pattern: /^@media (.*)$/,
resolve(e) {
return { type: "media", selector: `${e}{:root{[CSS]}}`, matched: this.pattern.test(e.trim()) };
}
},
system: {
pattern: /^system$/,
resolve(e) {
return { type: "system", selector: "@media (prefers-color-scheme: dark){:root{[CSS]}}", matched: this.pattern.test(e.trim()) };
}
},
custom: {
resolve(e) {
return { type: "custom", selector: e, matched: !0 };
}
}
},
resolve(e) {
const t = Object.keys(this.rules).filter((n) => n !== "custom").map((n) => this.rules[n]);
return [e].flat().map((n) => {
var r;
return (r = t.map((i) => i.resolve(n)).find((i) => i.matched)) != null ? r : this.rules.custom.resolve(n);
});
}
},
_toVariables(e, t) {
return pm(e, { prefix: t == null ? void 0 : t.prefix });
},
getCommon({ name: e = "", theme: t = {}, params: n, set: r, defaults: i }) {
var o, a, s, l, u, d, c;
const { preset: p, options: f } = t;
let h, y, k, w, $, g, v;
if (de(p) && f.transform !== "strict") {
const { primitive: P, semantic: T, extend: L } = p, C = T || {}, { colorScheme: O } = C, x = Gt(C, ["colorScheme"]), S = L || {}, { colorScheme: M } = S, K = Gt(S, ["colorScheme"]), A = O || {}, { dark: G } = A, J = Gt(A, ["dark"]), q = M || {}, { dark: me } = q, De = Gt(q, ["dark"]), Le = de(P) ? this._toVariables({ primitive: P }, f) : {}, he = de(x) ? this._toVariables({ semantic: x }, f) : {}, ae = de(J) ? this._toVariables({ light: J }, f) : {}, E = de(G) ? this._toVariables({ dark: G }, f) : {}, W = de(K) ? this._toVariables({ semantic: K }, f) : {}, D = de(De) ? this._toVariables({ light: De }, f) : {}, F = de(me) ? this._toVariables({ dark: me }, f) : {}, [B, H] = [(o = Le.declarations) != null ? o : "", Le.tokens], [Y, V] = [(a = he.declarations) != null ? a : "", he.tokens || []], [_, U] = [(s = ae.declarations) != null ? s : "", ae.tokens || []], [ee, oe] = [(l = E.declarations) != null ? l : "", E.tokens || []], [se, Re] = [(u = W.declarations) != null ? u : "", W.tokens || []], [Xe, _e] = [(d = D.declarations) != null ? d : "", D.tokens || []], [Ne, tt] = [(c = F.declarations) != null ? c : "", F.tokens || []];
h = this.transformCSS(e, B, "light", "variable", f, r, i), y = H;
const wt = this.transformCSS(e, `${Y}${_}`, "light", "variable", f, r, i), nn = this.transformCSS(e, `${ee}`, "dark", "variable", f, r, i);
k = `${wt}${nn}`, w = [.../* @__PURE__ */ new Set([...V, ...U, ...oe])];
const pn = this.transformCSS(e, `${se}${Xe}color-scheme:light`, "light", "variable", f, r, i), mr = this.transformCSS(e, `${Ne}color-scheme:dark`, "dark", "variable", f, r, i);
$ = `${pn}${mr}`, g = [.../* @__PURE__ */ new Set([...Re, ..._e, ...tt])], v = it(p.css, { dt: Cn });
}
return {
primitive: {
css: h,
tokens: y
},
semantic: {
css: k,
tokens: w
},
global: {
css: $,
tokens: g
},
style: v
};
},
getPreset({ name: e = "", preset: t = {}, options: n, params: r, set: i, defaults: o, selector: a }) {
var s, l, u;
let d, c, p;
if (de(t) && n.transform !== "strict") {
const f = e.replace("-directive", ""), h = t, { colorScheme: y, extend: k, css: w } = h, $ = Gt(h, ["colorScheme", "extend", "css"]), g = k || {}, { colorScheme: v } = g, P = Gt(g, ["colorScheme"]), T = y || {}, { dark: L } = T, C = Gt(T, ["dark"]), O = v || {}, { dark: x } = O, S = Gt(O, ["dark"]), M = de($) ? this._toVariables({ [f]: Dt(Dt({}, $), P) }, n) : {}, K = de(C) ? this._toVariables({ [f]: Dt(Dt({}, C), S) }, n) : {}, A = de(L) ? this._toVariables({ [f]: Dt(Dt({}, L), x) }, n) : {}, [G, J] = [(s = M.declarations) != null ? s : "", M.tokens || []], [q, me] = [(l = K.declarations) != null ? l : "", K.tokens || []], [De, Le] = [(u = A.declarations) != null ? u : "", A.tokens || []], he = this.transformCSS(f, `${G}${q}`, "light", "variable", n, i, o, a), ae = this.transformCSS(f, De, "dark", "variable", n, i, o, a);
d = `${he}${ae}`, c = [.../* @__PURE__ */ new Set([...J, ...me, ...Le])], p = it(w, { dt: Cn });
}
return {
css: d,
tokens: c,
style: p
};
},
getPresetC({ name: e = "", theme: t = {}, params: n, set: r, defaults: i }) {
var o;
const { preset: a, options: s } = t, l = (o = a == null ? void 0 : a.components) == null ? void 0 : o[e];
return this.getPreset({ name: e, preset: l, options: s, params: n, set: r, defaults: i });
},
// @deprecated - use getPresetC instead
getPresetD({ name: e = "", theme: t = {}, params: n, set: r, defaults: i }) {
var o, a;
const s = e.replace("-directive", ""), { preset: l, options: u } = t, d = ((o = l == null ? void 0 : l.components) == null ? void 0 : o[s]) || ((a = l == null ? void 0 : l.directives) == null ? void 0 : a[s]);
return this.getPreset({ name: s, preset: d, options: u, params: n, set: r, defaults: i });
},
applyDarkColorScheme(e) {
return !(e.darkModeSelector === "none" || e.darkModeSelector === !1);
},
getColorSchemeOption(e, t) {
var n;
return this.applyDarkColorScheme(e) ? this.regex.resolve(e.darkModeSelector === !0 ? t.options.darkModeSelector : (n = e.darkModeSelector) != null ? n : t.options.darkModeSelector) : [];
},
getLayerOrder(e, t = {}, n, r) {
const { cssLayer: i } = t;
return i ? `@layer ${it(i.order || "primeui", n)}` : "";
},
getCommonStyleSheet({ name: e = "", theme: t = {}, params: n, props: r = {}, set: i, defaults: o }) {
const a = this.getCommon({ name: e, theme: t, params: n, set: i, defaults: o }), s = Object.entries(r).reduce((l, [u, d]) => l.push(`${u}="${d}"`) && l, []).join(" ");
return Object.entries(a || {}).reduce((l, [u, d]) => {
if (In(d) && Object.hasOwn(d, "css")) {
const c = Lr(d.css), p = `${u}-variables`;
l.push(`<style type="text/css" data-primevue-style-id="${p}" ${s}>${c}</style>`);
}
return l;
}, []).join("");
},
getStyleSheet({ name: e = "", theme: t = {}, params: n, props: r = {}, set: i, defaults: o }) {
var a;
const s = { name: e, theme: t, params: n, set: i, defaults: o }, l = (a = e.includes("-directive") ? this.getPresetD(s) : this.getPresetC(s)) == null ? void 0 : a.css, u = Object.entries(r).reduce((d, [c, p]) => d.push(`${c}="${p}"`) && d, []).join(" ");
return l ? `<style type="text/css" data-primevue-style-id="${e}-variables" ${u}>${Lr(l)}</style>` : "";
},
createTokens(e = {}, t, n = "", r = "", i = {}) {
return {};
},
getTokenValue(e, t, n) {
var r;
const o = ((l) => l.split(".").filter((d) => !Gn(d.toLowerCase(), n.variable.excludedKeyRegex)).join("."))(t), a = t.includes("colorScheme.light") ? "light" : t.includes("colorScheme.dark") ? "dark" : void 0, s = [(r = e[o]) == null ? void 0 : r.computed(a)].flat().filter((l) => l);
return s.length === 1 ? s[0].value : s.reduce((l = {}, u) => {
const d = u, { colorScheme: c } = d, p = Gt(d, ["colorScheme"]);
return l[c] = p, l;
}, void 0);
},
getSelectorRule(e, t, n, r) {
return n === "class" || n === "attr" ? zn(de(t) ? `${e}${t},${e} ${t}` : e, r) : zn(e, de(t) ? zn(t, r) : r);
},
transformCSS(e, t, n, r, i = {}, o, a, s) {
if (de(t)) {
const { cssLayer: l } = i;
if (r !== "style") {
const u = this.getColorSchemeOption(i, a);
t = n === "dark" ? u.reduce((d, { type: c, selector: p }) => (de(p) && (d += p.includes("[CSS]") ? p.replace("[CSS]", t) : this.getSelectorRule(p, s, c, t)), d), "") : zn(s ?? ":root", t);
}
if (l) {
const u = {
name: "primeui"
};
In(l) && (u.name = it(l.name, { name: e, type: r })), de(u.name) && (t = zn(`@layer ${u.name}`, t), o == null || o.layerNames(u.name));
}
return t;
}
return "";
}
}, Fe = {
defaults: {
variable: {
prefix: "p",
selector: ":root",
excludedKeyRegex: /^(primitive|semantic|components|directives|variables|colorscheme|light|dark|common|root|states|extend|css)$/gi
},
options: {
prefix: "p",
darkModeSelector: "system",
cssLayer: !1
}
},
_theme: void 0,
_layerNames: /* @__PURE__ */ new Set(),
_loadedStyleNames: /* @__PURE__ */ new Set(),
_loadingStyles: /* @__PURE__ */ new Set(),
_tokens: {},
update(e = {}) {
const { theme: t } = e;
t && (this._theme = Zi(Dt({}, t), {
options: Dt(Dt({}, this.defaults.options), t.options)
}), this._tokens = Pt.createTokens(this.preset, this.defaults), this.clearLoadedStyleNames());
},
get theme() {
return this._theme;
},
get preset() {
var e;
return ((e = this.theme) == null ? void 0 : e.preset) || {};
},
get options() {
var e;
return ((e = this.theme) == null ? void 0 : e.options) || {};
},
get tokens() {
return this._tokens;
},
getTheme() {
return this.theme;
},
setTheme(e) {
this.update({ theme: e }), rt.emit("theme:change", e);
},
getPreset() {
return this.preset;
},
setPreset(e) {
this._theme = Zi(Dt({}, this.theme), { preset: e }), this._tokens = Pt.createTokens(e, this.defaults), this.clearLoadedStyleNames(), rt.emit("preset:change", e), rt.emit("theme:change", this.theme);
},
getOptions() {
return this.options;
},
setOptions(e) {
this._theme = Zi(Dt({}, this.theme), { options: e }), this.clearLoadedStyleNames(), rt.emit("options:change", e), rt.emit("theme:change", this.theme);
},
getLayerNames() {
return [...this._layerNames];
},
setLayerNames(e) {
this._layerNames.add(e);
},
getLoadedStyleNames() {
return this._loadedStyleNames;
},
isStyleNameLoaded(e) {
return this._loadedStyleNames.has(e);
},
setLoadedStyleName(e) {
this._loadedStyleNames.add(e);
},
deleteLoadedStyleName(e) {
this._loadedStyleNames.delete(e);
},
clearLoadedStyleNames() {
this._loadedStyleNames.clear();
},
getTokenValue(e) {
return Pt.getTokenValue(this.tokens, e, this.defaults);
},
getCommon(e = "", t) {
return Pt.getCommon({ name: e, theme: this.theme, params: t, defaults: this.defaults, set: { layerNames: this.setLayerNames.bind(this) } });
},
getComponent(e = "", t) {
const n = { name: e, theme: this.theme, params: t, defaults: this.defaults, set: { layerNames: this.setLayerNames.bind(this) } };
return Pt.getPresetC(n);
},
// @deprecated - use getComponent instead
getDirective(e = "", t) {
const n = { name: e, theme: this.theme, params: t, defaults: this.defaults, set: { layerNames: this.setLayerNames.bind(this) } };
return Pt.getPresetD(n);
},
getCustomPreset(e = "", t, n, r) {
const i = { name: e, preset: t, options: this.options, selector: n, params: r, defaults: this.defaults, set: { layerNames: this.setLayerNames.bind(this) } };
return Pt.getPreset(i);
},
getLayerOrderCSS(e = "") {
return Pt.getLayerOrder(e, this.options, { names: this.getLayerNames() }, this.defaults);
},
transformCSS(e = "", t, n = "style", r) {
return Pt.transformCSS(e, t, r, n, this.options, { layerNames: this.setLayerNames.bind(this) }, this.defaults);
},
getCommonStyleSheet(e = "", t, n = {}) {
return Pt.getCommonStyleSheet({ name: e, theme: this.theme, params: t, props: n, defaults: this.defaults, set: { layerNames: this.setLayerNames.bind(this) } });
},
getStyleSheet(e, t, n = {}) {
return Pt.getStyleSheet({ name: e, theme: this.theme, params: t, props: n, defaults: this.defaults, set: { layerNames: this.setLayerNames.bind(this) } });
},
onStyleMounted(e) {
this._loadingStyles.add(e);
},
onStyleUpdated(e) {
this._loadingStyles.add(e);
},
onStyleLoaded(e, { name: t }) {
this._loadingStyles.size && (this._loadingStyles.delete(t), rt.emit(`theme:${t}:load`, e), !this._loadingStyles.size && rt.emit("theme:load"));
}
}, ln = {
_loadedStyleNames: /* @__PURE__ */ new Set(),
getLoadedStyleNames: function() {
return this._loadedStyleNames;
},
isStyleNameLoaded: function(t) {
return this._loadedStyleNames.has(t);
},
setLoadedStyleName: function(t) {
this._loadedStyleNames.add(t);
},
deleteLoadedStyleName: function(t) {
this._loadedStyleNames.delete(t);
},
clearLoadedStyleNames: function() {
this._loadedStyleNames.clear();
}
}, fm = `
*,
::before,
::after {
box-sizing: border-box;
}
/* Non vue overlay animations */
.p-connected-overlay {
opacity: 0;
transform: scaleY(0.8);
transition:
transform 0.12s cubic-bezier(0, 0, 0.2, 1),
opacity 0.12s cubic-bezier(0, 0, 0.2, 1);
}
.p-connected-overlay-visible {
opacity: 1;
transform: scaleY(1);
}
.p-connected-overlay-hidden {
opacity: 0;
transform: scaleY(1);
transition: opacity 0.1s linear;
}
/* Vue based overlay animations */
.p-connected-overlay-enter-from {
opacity: 0;
transform: scaleY(0.8);
}
.p-connected-overlay-leave-to {
opacity: 0;
}
.p-connected-overlay-enter-active {
transition:
transform 0.12s cubic-bezier(0, 0, 0.2, 1),
opacity 0.12s cubic-bezier(0, 0, 0.2, 1);
}
.p-connected-overlay-leave-active {
transition: opacity 0.1s linear;
}
/* Toggleable Content */
.p-toggleable-content-enter-from,
.p-toggleable-content-leave-to {
max-height: 0;
}
.p-toggleable-content-enter-to,
.p-toggleable-content-leave-from {
max-height: 1000px;
}
.p-toggleable-content-leave-active {
overflow: hidden;
transition: max-height 0.45s cubic-bezier(0, 1, 0, 1);
}
.p-toggleable-content-enter-active {
overflow: hidden;
transition: max-height 1s ease-in-out;
}
.p-disabled,
.p-disabled * {
cursor: default;
pointer-events: none;
user-select: none;
}
.p-disabled,
.p-component:disabled {
opacity: dt('disabled.opacity');
}
.pi {
font-size: dt('icon.size');
}
.p-icon {
width: dt('icon.size');
height: dt('icon.size');
}
.p-overlay-mask {
background: dt('mask.background');
color: dt('mask.color');
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.p-overlay-mask-enter {
animation: p-overlay-mask-enter-animation dt('mask.transition.duration') forwards;
}
.p-overlay-mask-leave {
animation: p-overlay-mask-leave-animation dt('mask.transition.duration') forwards;
}
@keyframes p-overlay-mask-enter-animation {
from {
background: transparent;
}
to {
background: dt('mask.background');
}
}
@keyframes p-overlay-mask-leave-animation {
from {
background: dt('mask.background');
}
to {
background: transparent;
}
}
`;
function _r(e) {
"@babel/helpers - typeof";
return _r = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
return typeof t;
} : function(t) {
return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
}, _r(e);
}
function cl(e, t) {
var n = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var r = Object.getOwnPropertySymbols(e);
t && (r = r.filter(function(i) {
return Object.getOwnPropertyDescriptor(e, i).enumerable;
})), n.push.apply(n, r);
}
return n;
}
function pl(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] != null ? arguments[t] : {};
t % 2 ? cl(Object(n), !0).forEach(function(r) {
hm(e, r, n[r]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : cl(Object(n)).forEach(function(r) {
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(n, r));
});
}
return e;
}
function hm(e, t, n) {
return (t = mm(t)) in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
function mm(e) {
var t = gm(e, "string");
return _r(t) == "symbol" ? t : t + "";
}
function gm(e, t) {
if (_r(e) != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
var r = n.call(e, t);
if (_r(r) != "object") return r;
throw new TypeError("@@toPrimitive must return a primitive value.");
}
return (t === "string" ? String : Number)(e);
}
function bm(e) {
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
Js() && Js().components ? Jf(e) : t ? e() : Qf(e);
}
var vm = 0;
function ym(e) {
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = Qe(!1), r = Qe(e), i = Qe(null), o = rc() ? window.document : void 0, a = t.document, s = a === void 0 ? o : a, l = t.immediate, u = l === void 0 ? !0 : l, d = t.manual, c = d === void 0 ? !1 : d, p = t.name, f = p === void 0 ? "style_".concat(++vm) : p, h = t.id, y = h === void 0 ? void 0 : h, k = t.media, w = k === void 0 ? void 0 : k, $ = t.nonce, g = $ === void 0 ? void 0 : $, v = t.first, P = v === void 0 ? !1 : v, T = t.onMounted, L = T === void 0 ? void 0 : T, C = t.onUpdated, O = C === void 0 ? void 0 : C, x = t.onLoad, S = x === void 0 ? void 0 : x, M = t.props, K = M === void 0 ? {} : M, A = function() {
}, G = function(me) {
var De = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
if (s) {
var Le = pl(pl({}, K), De), he = Le.name || f, ae = Le.id || y, E = Le.nonce || g;
i.value = s.querySelector('style[data-primevue-style-id="'.concat(he, '"]')) || s.getElementById(ae) || s.createElement("style"), i.value.isConnected || (r.value = me || e, si(i.value, {
type: "text/css",
id: ae,
media: w,
nonce: E
}), P ? s.head.prepend(i.value) : s.head.appendChild(i.value), Li(i.value, "data-primevue-style-id", he), si(i.value, Le), i.value.onload = function(W) {
return S == null ? void 0 : S(W, {
name: he
});
}, L == null || L(he)), !n.value && (A = eh(r, function(W) {
i.value.textContent = W, O == null || O(he);
}, {
immediate: !0
}), n.value = !0);
}
}, J = function() {
!s || !n.value || (A(), Zh(i.value) && s.head.removeChild(i.value), n.value = !1, i.value = null);
};
return u && !c && bm(G), {
id: y,
name: f,
el: i,
css: r,
unload: J,
load: G,
isLoaded: Xf(n)
};