@devkitvue/admin
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,426 lines (1,406 loc) • 121 kB
JavaScript
import yn, { AppBtn as ze, AppThemeToggler as at, AppLocaleToggler as lt, AppIcon as bn, AppBreadcrumb as _n, setupI18n as Sn, AppMenu as $n } from "@devkitvue/base-components";
import kn from "@devkitvue/datalist";
import On from "@devkitvue/filemanager";
import Pn from "@devkitvue/form";
import wn from "@devkitvue/dataview";
import { renderSlot as M, createBlock as le, createCommentVNode as G, openBlock as P, Teleport as Cn, ref as z, readonly as Tn, getCurrentInstance as ut, onMounted as Et, nextTick as Nt, watch as Ln, useId as xn, mergeProps as L, resolveDirective as In, createElementBlock as T, createElementVNode as j, withDirectives as jn, resolveDynamicComponent as Fe, normalizeClass as An, toDisplayString as Dt, resolveComponent as dt, withCtx as De, createVNode as x, Transition as En, Fragment as W, renderList as ae, createTextVNode as Nn, defineComponent as Qe, inject as Dn, withAsyncContext as Vn, onBeforeUnmount as Rn, unref as I, useSlots as Mn, computed as Bn, h as ct } from "vue";
import { useRouter as mt } from "vue-router";
function zn(e, { apiClient: t, locales: n, baseImageUrl: r, fallbackImageUrl: i, fallbackImageSvg: o, iconFindApi: a }) {
const l = {
apiClient: t,
locales: n,
fallbackImageSvg: o,
fallbackImageUrl: i,
baseImageUrl: r,
iconFindApi: a
};
e.use(yn, l);
}
function Kn(e, { apiClient: t, authHandler: n, filesHandler: r }) {
const i = {
apiClient: t,
authHandler: n,
filesHandler: r
};
e.use(kn, i);
}
function Un(e, { apiClient: t, filesHandler: n }) {
const r = {
apiClient: t,
filesHandler: n
};
e.use(On, r);
}
function Hn(e, { apiClient: t, authHandler: n, filesHandler: r }) {
const i = {
apiClient: t,
authHandler: n,
filesHandler: r
};
e.use(Pn, i);
}
function Wn(e, { apiClient: t }) {
const n = {
apiClient: t
};
e.use(wn, n);
}
function Be(...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) ? [Be(...r)] : Object.entries(r).map(([a, l]) => l ? a : void 0);
t = o.length ? t.concat(o.filter((a) => !!a)) : t;
}
}
return t.join(" ").trim();
}
}
function Fn(e, t) {
return e ? e.classList ? e.classList.contains(t) : new RegExp("(^| )" + t + "( |$)", "gi").test(e.className) : !1;
}
function Zn(e, t) {
if (e && t) {
const n = (r) => {
Fn(e, r) || (e.classList ? e.classList.add(r) : e.className += " " + r);
};
[t].flat().filter(Boolean).forEach((r) => r.split(" ").forEach(n));
}
}
function Ke(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 ft(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 Xn(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 Gn() {
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 Ze(e) {
return e ? Math.abs(e.scrollLeft) : 0;
}
function Yn() {
const e = document.documentElement;
return (window.pageXOffset || Ze(e)) - (e.clientLeft || 0);
}
function qn() {
const e = document.documentElement;
return (window.pageYOffset || e.scrollTop) - (e.clientTop || 0);
}
function Jn(e) {
return e ? getComputedStyle(e).direction === "rtl" : !1;
}
function Qn(e, t, n = !0) {
var r, i, o, a;
if (e) {
const l = e.offsetParent ? { width: e.offsetWidth, height: e.offsetHeight } : Xn(e), s = l.height, u = l.width, d = t.offsetHeight, c = t.offsetWidth, m = t.getBoundingClientRect(), f = qn(), h = Yn(), b = Gn();
let g, $, v = "top";
m.top + d + s > b.height ? (g = m.top + f - s, v = "bottom", g < 0 && (g = f)) : g = d + m.top + f, m.left + u > b.width ? $ = Math.max(0, m.left + h + c - u) : $ = m.left + h, Jn(e) ? e.style.insetInlineEnd = $ + "px" : e.style.insetInlineStart = $ + "px", e.style.top = g + "px", e.style.transformOrigin = v, n && (e.style.marginTop = v === "bottom" ? `calc(${(i = (r = ft(/-anchor-gutter$/)) == null ? void 0 : r.value) != null ? i : "2px"} * -1)` : (a = (o = ft(/-anchor-gutter$/)) == null ? void 0 : o.value) != null ? a : "");
}
}
function er(e, t) {
e && (typeof t == "string" ? e.style.cssText = t : Object.entries(t || {}).forEach(([n, r]) => e.style[n] = r));
}
function Ne(e, t) {
return e instanceof HTMLElement ? e.offsetWidth : 0;
}
function Vt(e) {
if (e) {
let t = e.parentNode;
return t && t instanceof ShadowRoot && t.host && (t = t.host), t;
}
return null;
}
function tr(e) {
return !!(e !== null && typeof e < "u" && e.nodeName && Vt(e));
}
function ve(e) {
return typeof Element < "u" ? e instanceof Element : e !== null && typeof e == "object" && e.nodeType === 1 && typeof e.nodeName == "string";
}
function Ve(e, t = {}) {
if (ve(e)) {
const n = (r, i) => {
var o, a;
const l = (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((s, u) => {
if (u != null) {
const d = typeof u;
if (d === "string" || d === "number")
s.push(u);
else if (d === "object") {
const c = Array.isArray(u) ? n(r, u) : Object.entries(u).map(([m, f]) => r === "style" && (f || f === 0) ? `${m.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase()}:${f}` : f ? m : void 0);
s = c.length ? s.concat(c.filter((m) => !!m)) : s;
}
}
return s;
}, l);
};
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" ? Ve(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 nr(e, t = {}, ...n) {
{
const r = document.createElement(e);
return Ve(r, t), r.append(...n), r;
}
}
function Le(e, t) {
return ve(e) ? Array.from(e.querySelectorAll(t)) : [];
}
function Re(e, t) {
return ve(e) ? e.matches(t) ? e : e.querySelector(t) : null;
}
function xe(e, t) {
e && document.activeElement !== e && e.focus(t);
}
function rr(e, t) {
if (ve(e)) {
const n = e.getAttribute(t);
return isNaN(n) ? n === "true" || n === "false" ? n === "true" : n : +n;
}
}
function pt(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 ir(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 || Ze(document.documentElement) || Ze(document.body) || 0)
};
}
return {
top: "auto",
left: "auto"
};
}
function or(e, t) {
return e ? e.offsetHeight : 0;
}
function Rt(e, t = []) {
const n = Vt(e);
return n === null ? t : Rt(n, t.concat([n]));
}
function sr(e) {
const t = [];
if (e) {
const n = Rt(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 l = a.split(",");
for (const s of l) {
const u = Re(o, s);
u && i(u) && t.push(u);
}
}
o.nodeType !== 9 && i(o) && t.push(o);
}
}
return t;
}
function ht(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 Mt() {
return !!(typeof window < "u" && window.document && window.document.createElement);
}
function ar() {
return "ontouchstart" in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0;
}
function lr(e, t = "", n) {
ve(e) && n !== null && n !== void 0 && e.setAttribute(t, n);
}
function et() {
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 tt(e) {
return e == null || e === "" || Array.isArray(e) && e.length === 0 || !(e instanceof Date) && typeof e == "object" && Object.keys(e).length === 0;
}
function nt(e) {
return typeof e == "function" && "call" in e && "apply" in e;
}
function C(e) {
return !tt(e);
}
function de(e, t = !0) {
return e instanceof Object && e.constructor === Object && (t || Object.keys(e).length !== 0);
}
function D(e, ...t) {
return nt(e) ? e(...t) : e;
}
function V(e, t = !0) {
return typeof e == "string" && (t || e !== "");
}
function F(e) {
return V(e) ? e.replace(/(-|_)/g, "").toLowerCase() : e;
}
function rt(e, t = "", n = {}) {
const r = F(t).split("."), i = r.shift();
if (i) {
if (de(e)) {
const o = Object.keys(e).find((a) => F(a) === i) || "";
return rt(D(e[o], n), r.join("."), n);
}
return;
}
return D(e, n);
}
function Bt(e, t = !0) {
return Array.isArray(e) && (t || e.length !== 0);
}
function ur(e) {
return C(e) && !isNaN(e);
}
function ge(e, t) {
if (t) {
const n = t.test(e);
return t.lastIndex = 0, n;
}
return !1;
}
function _e(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 dr(e) {
return V(e, !1) ? e[0].toUpperCase() + e.slice(1) : e;
}
function zt(e) {
return V(e) ? e.replace(/(_)/g, "-").replace(/[A-Z]/g, (t, n) => n === 0 ? t : "-" + t.toLowerCase()).toLowerCase() : e;
}
var Ie = {};
function cr(e = "pui_id_") {
return Object.hasOwn(Ie, e) || (Ie[e] = 0), Ie[e]++, `${e}${Ie[e]}`;
}
function mr() {
let e = [];
const t = (a, l, s = 999) => {
const u = i(a, l, s), d = u.value + (u.key === a ? 0 : s) + 1;
return e.push({ key: a, value: d }), d;
}, n = (a) => {
e = e.filter((l) => l.value !== a);
}, r = (a, l) => i(a).value, i = (a, l, s = 0) => [...e].reverse().find((u) => !0) || { key: a, value: s }, o = (a) => a && parseInt(a.style.zIndex, 10) || 0;
return {
get: o,
set: (a, l, s) => {
l && (l.style.zIndex = String(t(a, !0, s)));
},
clear: (a) => {
a && (n(o(a)), a.style.zIndex = "");
},
getCurrent: (a) => r(a)
};
}
var Ue = mr();
function Se(e) {
"@babel/helpers - typeof";
return Se = 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;
}, Se(e);
}
function fr(e, t) {
if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
}
function pr(e, t) {
for (var n = 0; n < t.length; n++) {
var r = t[n];
r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, gr(r.key), r);
}
}
function hr(e, t, n) {
return t && pr(e.prototype, t), Object.defineProperty(e, "prototype", { writable: !1 }), e;
}
function gr(e) {
var t = vr(e, "string");
return Se(t) == "symbol" ? t : t + "";
}
function vr(e, t) {
if (Se(e) != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
var r = n.call(e, t);
if (Se(r) != "object") return r;
throw new TypeError("@@toPrimitive must return a primitive value.");
}
return String(e);
}
var yr = /* @__PURE__ */ function() {
function e(t) {
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : function() {
};
fr(this, e), this.element = t, this.listener = n;
}
return hr(e, [{
key: "bindScrollListener",
value: function() {
this.scrollableParents = sr(this.element);
for (var n = 0; n < this.scrollableParents.length; n++)
this.scrollableParents[n].addEventListener("scroll", this.listener);
}
}, {
key: "unbindScrollListener",
value: function() {
if (this.scrollableParents)
for (var n = 0; n < this.scrollableParents.length; n++)
this.scrollableParents[n].removeEventListener("scroll", this.listener);
}
}, {
key: "destroy",
value: function() {
this.unbindScrollListener(), this.element = null, this.listener = null, this.scrollableParents = null;
}
}]);
}(), br = et(), Kt = {
name: "Portal",
props: {
appendTo: {
type: [String, Object],
default: "body"
},
disabled: {
type: Boolean,
default: !1
}
},
data: function() {
return {
mounted: !1
};
},
mounted: function() {
this.mounted = Mt();
},
computed: {
inline: function() {
return this.disabled || this.appendTo === "self";
}
}
};
function _r(e, t, n, r, i, o) {
return o.inline ? M(e.$slots, "default", {
key: 0
}) : i.mounted ? (P(), le(Cn, {
key: 1,
to: n.appendTo
}, [M(e.$slots, "default")], 8, ["to"])) : G("", !0);
}
Kt.render = _r;
var Sr = Object.defineProperty, $r = Object.defineProperties, kr = Object.getOwnPropertyDescriptors, Me = Object.getOwnPropertySymbols, Ut = Object.prototype.hasOwnProperty, Ht = Object.prototype.propertyIsEnumerable, gt = (e, t, n) => t in e ? Sr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, K = (e, t) => {
for (var n in t || (t = {}))
Ut.call(t, n) && gt(e, n, t[n]);
if (Me)
for (var n of Me(t))
Ht.call(t, n) && gt(e, n, t[n]);
return e;
}, He = (e, t) => $r(e, kr(t)), X = (e, t) => {
var n = {};
for (var r in e)
Ut.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
if (e != null && Me)
for (var r of Me(e))
t.indexOf(r) < 0 && Ht.call(e, r) && (n[r] = e[r]);
return n;
}, Or = et(), N = Or, Xe = /{([^}]*)}/g, Pr = /(\d+\s+[\+\-\*\/]\s+\d+)/g, wr = /var\([^)]+\)/g;
function Cr(e) {
return de(e) && e.hasOwnProperty("$value") && e.hasOwnProperty("$type") ? e.$value : e;
}
function Tr(e) {
return e.replaceAll(/ /g, "").replace(/[^\w]/g, "-");
}
function Ge(e = "", t = "") {
return Tr(`${V(e, !1) && V(t, !1) ? `${e}-` : e}${t}`);
}
function Wt(e = "", t = "") {
return `--${Ge(e, t)}`;
}
function Lr(e = "") {
const t = (e.match(/{/g) || []).length, n = (e.match(/}/g) || []).length;
return (t + n) % 2 !== 0;
}
function Ft(e, t = "", n = "", r = [], i) {
if (V(e)) {
const o = e.trim();
if (Lr(o))
return;
if (ge(o, Xe)) {
const a = o.replaceAll(Xe, (l) => {
const u = l.replace(/{|}/g, "").split(".").filter((d) => !r.some((c) => ge(d, c)));
return `var(${Wt(n, zt(u.join("-")))}${C(i) ? `, ${i}` : ""})`;
});
return ge(a.replace(wr, "0"), Pr) ? `calc(${a})` : a;
}
return o;
} else if (ur(e))
return e;
}
function xr(e, t, n) {
V(t, !1) && e.push(`${t}:${n};`);
}
function he(e, t) {
return e ? `${e}{${t}}` : "";
}
function Zt(e, t) {
if (e.indexOf("dt(") === -1) return e;
function n(a, l) {
const s = [];
let u = 0, d = "", c = null, m = 0;
for (; u <= a.length; ) {
const f = a[u];
if ((f === '"' || f === "'" || f === "`") && a[u - 1] !== "\\" && (c = c === f ? null : f), !c && (f === "(" && m++, f === ")" && m--, (f === "," || u === a.length) && m === 0)) {
const h = d.trim();
h.startsWith("dt(") ? s.push(Zt(h, l)) : s.push(r(h)), d = "", u++;
continue;
}
f !== void 0 && (d += f), u++;
}
return s;
}
function r(a) {
const l = a[0];
if ((l === '"' || l === "'" || l === "`") && a[a.length - 1] === l)
return a.slice(1, -1);
const s = Number(a);
return isNaN(s) ? a : s;
}
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 l = o.pop();
o.length === 0 && i.push([l, a]);
}
if (!i.length) return e;
for (let a = i.length - 1; a >= 0; a--) {
const [l, s] = i[a], u = e.slice(l + 3, s), d = n(u, t), c = t(...d);
e = e.slice(0, l) + c + e.slice(s + 1);
}
return e;
}
var ue = (...e) => Ir(w.getTheme(), ...e), Ir = (e = {}, t, n, r) => {
if (t) {
const { variable: i, options: o } = w.defaults || {}, { prefix: a, transform: l } = (e == null ? void 0 : e.options) || o || {}, s = ge(t, Xe) ? t : `{${t}}`;
return r === "value" || tt(r) && l === "strict" ? w.getTokenValue(t) : Ft(s, void 0, a, [i.excludedKeyRegex], n);
}
return "";
};
function je(e, ...t) {
if (e instanceof Array) {
const n = e.reduce((r, i, o) => {
var a;
return r + i + ((a = D(t[o], { dt: ue })) != null ? a : "");
}, "");
return Zt(n, ue);
}
return D(e, { dt: ue });
}
function jr(e, t = {}) {
const n = w.defaults.variable, { prefix: r = n.prefix, selector: i = n.selector, excludedKeyRegex: o = n.excludedKeyRegex } = t, a = [], l = [], s = [{ node: e, path: r }];
for (; s.length; ) {
const { node: d, path: c } = s.pop();
for (const m in d) {
const f = d[m], h = Cr(f), g = ge(m, o) ? Ge(c) : Ge(c, zt(m));
if (de(h))
s.push({ node: h, path: g });
else {
const $ = Wt(g), v = Ft(h, g, r, [o]);
xr(l, $, v);
let y = g;
r && y.startsWith(r + "-") && (y = y.slice(r.length + 1)), a.push(y.replace(/-/g, "."));
}
}
}
const u = l.join("");
return {
value: l,
tokens: a,
declarations: u,
css: he(i, u)
};
}
var B = {
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 jr(e, { prefix: t == null ? void 0 : t.prefix });
},
getCommon({ name: e = "", theme: t = {}, params: n, set: r, defaults: i }) {
var o, a, l, s, u, d, c;
const { preset: m, options: f } = t;
let h, b, g, $, v, y, p;
if (C(m) && f.transform !== "strict") {
const { primitive: _, semantic: A, extend: R } = m, Y = A || {}, { colorScheme: q } = Y, te = X(Y, ["colorScheme"]), J = R || {}, { colorScheme: ne } = J, re = X(J, ["colorScheme"]), Q = q || {}, { dark: ie } = Q, ce = X(Q, ["dark"]), oe = ne || {}, { dark: me } = oe, fe = X(oe, ["dark"]), Z = C(_) ? this._toVariables({ primitive: _ }, f) : {}, U = C(te) ? this._toVariables({ semantic: te }, f) : {}, se = C(ce) ? this._toVariables({ light: ce }, f) : {}, Te = C(ie) ? this._toVariables({ dark: ie }, f) : {}, pe = C(re) ? this._toVariables({ semantic: re }, f) : {}, ot = C(fe) ? this._toVariables({ light: fe }, f) : {}, st = C(me) ? this._toVariables({ dark: me }, f) : {}, [Qt, en] = [(o = Z.declarations) != null ? o : "", Z.tokens], [tn, nn] = [(a = U.declarations) != null ? a : "", U.tokens || []], [rn, on] = [(l = se.declarations) != null ? l : "", se.tokens || []], [sn, an] = [(s = Te.declarations) != null ? s : "", Te.tokens || []], [ln, un] = [(u = pe.declarations) != null ? u : "", pe.tokens || []], [dn, cn] = [(d = ot.declarations) != null ? d : "", ot.tokens || []], [mn, fn] = [(c = st.declarations) != null ? c : "", st.tokens || []];
h = this.transformCSS(e, Qt, "light", "variable", f, r, i), b = en;
const pn = this.transformCSS(e, `${tn}${rn}`, "light", "variable", f, r, i), hn = this.transformCSS(e, `${sn}`, "dark", "variable", f, r, i);
g = `${pn}${hn}`, $ = [.../* @__PURE__ */ new Set([...nn, ...on, ...an])];
const gn = this.transformCSS(e, `${ln}${dn}color-scheme:light`, "light", "variable", f, r, i), vn = this.transformCSS(e, `${mn}color-scheme:dark`, "dark", "variable", f, r, i);
v = `${gn}${vn}`, y = [.../* @__PURE__ */ new Set([...un, ...cn, ...fn])], p = D(m.css, { dt: ue });
}
return {
primitive: {
css: h,
tokens: b
},
semantic: {
css: g,
tokens: $
},
global: {
css: v,
tokens: y
},
style: p
};
},
getPreset({ name: e = "", preset: t = {}, options: n, params: r, set: i, defaults: o, selector: a }) {
var l, s, u;
let d, c, m;
if (C(t) && n.transform !== "strict") {
const f = e.replace("-directive", ""), h = t, { colorScheme: b, extend: g, css: $ } = h, v = X(h, ["colorScheme", "extend", "css"]), y = g || {}, { colorScheme: p } = y, _ = X(y, ["colorScheme"]), A = b || {}, { dark: R } = A, Y = X(A, ["dark"]), q = p || {}, { dark: te } = q, J = X(q, ["dark"]), ne = C(v) ? this._toVariables({ [f]: K(K({}, v), _) }, n) : {}, re = C(Y) ? this._toVariables({ [f]: K(K({}, Y), J) }, n) : {}, Q = C(R) ? this._toVariables({ [f]: K(K({}, R), te) }, n) : {}, [ie, ce] = [(l = ne.declarations) != null ? l : "", ne.tokens || []], [oe, me] = [(s = re.declarations) != null ? s : "", re.tokens || []], [fe, Z] = [(u = Q.declarations) != null ? u : "", Q.tokens || []], U = this.transformCSS(f, `${ie}${oe}`, "light", "variable", n, i, o, a), se = this.transformCSS(f, fe, "dark", "variable", n, i, o, a);
d = `${U}${se}`, c = [.../* @__PURE__ */ new Set([...ce, ...me, ...Z])], m = D($, { dt: ue });
}
return {
css: d,
tokens: c,
style: m
};
},
getPresetC({ name: e = "", theme: t = {}, params: n, set: r, defaults: i }) {
var o;
const { preset: a, options: l } = t, s = (o = a == null ? void 0 : a.components) == null ? void 0 : o[e];
return this.getPreset({ name: e, preset: s, options: l, 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 l = e.replace("-directive", ""), { preset: s, options: u } = t, d = ((o = s == null ? void 0 : s.components) == null ? void 0 : o[l]) || ((a = s == null ? void 0 : s.directives) == null ? void 0 : a[l]);
return this.getPreset({ name: l, 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 ${D(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 }), l = Object.entries(r).reduce((s, [u, d]) => s.push(`${u}="${d}"`) && s, []).join(" ");
return Object.entries(a || {}).reduce((s, [u, d]) => {
if (de(d) && Object.hasOwn(d, "css")) {
const c = _e(d.css), m = `${u}-variables`;
s.push(`<style type="text/css" data-primevue-style-id="${m}" ${l}>${c}</style>`);
}
return s;
}, []).join("");
},
getStyleSheet({ name: e = "", theme: t = {}, params: n, props: r = {}, set: i, defaults: o }) {
var a;
const l = { name: e, theme: t, params: n, set: i, defaults: o }, s = (a = e.includes("-directive") ? this.getPresetD(l) : this.getPresetC(l)) == null ? void 0 : a.css, u = Object.entries(r).reduce((d, [c, m]) => d.push(`${c}="${m}"`) && d, []).join(" ");
return s ? `<style type="text/css" data-primevue-style-id="${e}-variables" ${u}>${_e(s)}</style>` : "";
},
createTokens(e = {}, t, n = "", r = "", i = {}) {
return {};
},
getTokenValue(e, t, n) {
var r;
const o = ((s) => s.split(".").filter((d) => !ge(d.toLowerCase(), n.variable.excludedKeyRegex)).join("."))(t), a = t.includes("colorScheme.light") ? "light" : t.includes("colorScheme.dark") ? "dark" : void 0, l = [(r = e[o]) == null ? void 0 : r.computed(a)].flat().filter((s) => s);
return l.length === 1 ? l[0].value : l.reduce((s = {}, u) => {
const d = u, { colorScheme: c } = d, m = X(d, ["colorScheme"]);
return s[c] = m, s;
}, void 0);
},
getSelectorRule(e, t, n, r) {
return n === "class" || n === "attr" ? he(C(t) ? `${e}${t},${e} ${t}` : e, r) : he(e, C(t) ? he(t, r) : r);
},
transformCSS(e, t, n, r, i = {}, o, a, l) {
if (C(t)) {
const { cssLayer: s } = i;
if (r !== "style") {
const u = this.getColorSchemeOption(i, a);
t = n === "dark" ? u.reduce((d, { type: c, selector: m }) => (C(m) && (d += m.includes("[CSS]") ? m.replace("[CSS]", t) : this.getSelectorRule(m, l, c, t)), d), "") : he(l ?? ":root", t);
}
if (s) {
const u = {
name: "primeui"
};
de(s) && (u.name = D(s.name, { name: e, type: r })), C(u.name) && (t = he(`@layer ${u.name}`, t), o == null || o.layerNames(u.name));
}
return t;
}
return "";
}
}, w = {
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 = He(K({}, t), {
options: K(K({}, this.defaults.options), t.options)
}), this._tokens = B.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 }), N.emit("theme:change", e);
},
getPreset() {
return this.preset;
},
setPreset(e) {
this._theme = He(K({}, this.theme), { preset: e }), this._tokens = B.createTokens(e, this.defaults), this.clearLoadedStyleNames(), N.emit("preset:change", e), N.emit("theme:change", this.theme);
},
getOptions() {
return this.options;
},
setOptions(e) {
this._theme = He(K({}, this.theme), { options: e }), this.clearLoadedStyleNames(), N.emit("options:change", e), N.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 B.getTokenValue(this.tokens, e, this.defaults);
},
getCommon(e = "", t) {
return B.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 B.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 B.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 B.getPreset(i);
},
getLayerOrderCSS(e = "") {
return B.getLayerOrder(e, this.options, { names: this.getLayerNames() }, this.defaults);
},
transformCSS(e = "", t, n = "style", r) {
return B.transformCSS(e, t, r, n, this.options, { layerNames: this.setLayerNames.bind(this) }, this.defaults);
},
getCommonStyleSheet(e = "", t, n = {}) {
return B.getCommonStyleSheet({ name: e, theme: this.theme, params: t, props: n, defaults: this.defaults, set: { layerNames: this.setLayerNames.bind(this) } });
},
getStyleSheet(e, t, n = {}) {
return B.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), N.emit(`theme:${t}:load`, e), !this._loadingStyles.size && N.emit("theme:load"));
}
}, ee = {
_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();
}
}, Ar = `
*,
::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 $e(e) {
"@babel/helpers - typeof";
return $e = 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;
}, $e(e);
}
function vt(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 yt(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] != null ? arguments[t] : {};
t % 2 ? vt(Object(n), !0).forEach(function(r) {
Er(e, r, n[r]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : vt(Object(n)).forEach(function(r) {
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(n, r));
});
}
return e;
}
function Er(e, t, n) {
return (t = Nr(t)) in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
function Nr(e) {
var t = Dr(e, "string");
return $e(t) == "symbol" ? t : t + "";
}
function Dr(e, t) {
if ($e(e) != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
var r = n.call(e, t);
if ($e(r) != "object") return r;
throw new TypeError("@@toPrimitive must return a primitive value.");
}
return (t === "string" ? String : Number)(e);
}
function Vr(e) {
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
ut() && ut().components ? Et(e) : t ? e() : Nt(e);
}
var Rr = 0;
function Mr(e) {
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = z(!1), r = z(e), i = z(null), o = Mt() ? window.document : void 0, a = t.document, l = a === void 0 ? o : a, s = t.immediate, u = s === void 0 ? !0 : s, d = t.manual, c = d === void 0 ? !1 : d, m = t.name, f = m === void 0 ? "style_".concat(++Rr) : m, h = t.id, b = h === void 0 ? void 0 : h, g = t.media, $ = g === void 0 ? void 0 : g, v = t.nonce, y = v === void 0 ? void 0 : v, p = t.first, _ = p === void 0 ? !1 : p, A = t.onMounted, R = A === void 0 ? void 0 : A, Y = t.onUpdated, q = Y === void 0 ? void 0 : Y, te = t.onLoad, J = te === void 0 ? void 0 : te, ne = t.props, re = ne === void 0 ? {} : ne, Q = function() {
}, ie = function(me) {
var fe = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
if (l) {
var Z = yt(yt({}, re), fe), U = Z.name || f, se = Z.id || b, Te = Z.nonce || y;
i.value = l.querySelector('style[data-primevue-style-id="'.concat(U, '"]')) || l.getElementById(se) || l.createElement("style"), i.value.isConnected || (r.value = me || e, Ve(i.value, {
type: "text/css",
id: se,
media: $,
nonce: Te
}), _ ? l.head.prepend(i.value) : l.head.appendChild(i.value), lr(i.value, "data-primevue-style-id", U), Ve(i.value, Z), i.value.onload = function(pe) {
return J == null ? void 0 : J(pe, {
name: U
});
}, R == null || R(U)), !n.value && (Q = Ln(r, function(pe) {
i.value.textContent = pe, q == null || q(U);
}, {
immediate: !0
}), n.value = !0);
}
}, ce = function() {
!l || !n.value || (Q(), tr(i.value) && l.head.removeChild(i.value), n.value = !1, i.value = null);
};
return u && !c && Vr(ie), {
id: b,
name: f,
el: i,
css: r,
unload: ce,
load: ie,
isLoaded: Tn(n)
};
}
function ke(e) {
"@babel/helpers - typeof";
return ke = 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;
}, ke(e);
}
var bt, _t, St, $t;
function kt(e, t) {
return Ur(e) || Kr(e, t) || zr(e, t) || Br();
}
function Br() {
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
function zr(e, t) {
if (e) {
if (typeof e == "string") return Ot(e, t);
var n = {}.toString.call(e).slice(8, -1);
return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? Ot(e, t) : void 0;
}
}
function Ot(e, t) {
(t == null || t > e.length) && (t = e.length);
for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
return r;
}
function Kr(e, t) {
var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
if (n != null) {
var r, i, o, a, l = [], s = !0, u = !1;
try {
if (o = (n = n.call(e)).next, t !== 0) for (; !(s = (r = o.call(n)).done) && (l.push(r.value), l.length !== t); s = !0) ;
} catch (d) {
u = !0, i = d;
} finally {
try {
if (!s && n.return != null && (a = n.return(), Object(a) !== a)) return;
} finally {
if (u) throw i;
}
}
return l;
}
}
function Ur(e) {
if (Array.isArray(e)) return e;
}
function Pt(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 We(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] != null ? arguments[t] : {};
t % 2 ? Pt(Object(n), !0).forEach(function(r) {
Hr(e, r, n[r]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Pt(Object(n)).forEach(function(r) {
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(n, r));
});
}
return e;
}
function Hr(e, t, n) {
return (t = Wr(t)) in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
function Wr(e) {
var t = Fr(e, "string");
return ke(t) == "symbol" ? t : t + "";
}
function Fr(e, t) {
if (ke(e) != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
var r = n.call(e, t);
if (ke(r) != "object") return r;
throw new TypeError("@@toPrimitive must return a primitive value.");
}
return (t === "string" ? String : Number)(e);
}
function Ae(e, t) {
return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } }));
}
var Zr = function(t) {
var n = t.dt;
return `
.p-hidden-accessible {
border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
opacity: 0;
overflow: hidden;
padding: 0;
pointer-events: none;
position: absolute;
white-space: nowrap;
width: 1px;
}
.p-overflow-hidden {
overflow: hidden;
padding-right: `.concat(n("scrollbar.width"), `;
}
`);
}, Xr = {}, Gr = {}, E = {
name: "base",
css: Zr,
style: Ar,
classes: Xr,
inlineStyles: Gr,
load: function(t) {
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : function(o) {
return o;
}, i = r(je(bt || (bt = Ae(["", ""])), t));
return C(i) ? Mr(_e(i), We({
name: this.name
}, n)) : {};
},
loadCSS: function() {
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
return this.load(this.css, t);
},
loadStyle: function() {
var t = this, n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
return this.load(this.style, n, function() {
var i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
return w.transformCSS(n.name || t.name, "".concat(i).concat(je(_t || (_t = Ae(["", ""])), r)));
});
},
getCommonTheme: function(t) {
return w.getCommon(this.name, t);
},
getComponentTheme: function(t) {
return w.getComponent(this.name, t);
},
getDirectiveTheme: function(t) {
return w.getDirective(this.name, t);
},
getPresetTheme: function(t, n, r) {
return w.getCustomPreset(this.name, t, n, r);
},
getLayerOrderThemeCSS: function() {
return w.getLayerOrderCSS(this.name);
},
getStyleSheet: function() {
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "", n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
if (this.css) {
var r = D(this.css, {
dt: ue
}) || "", i = _e(je(St || (St = Ae(["", "", ""])), r, t)), o = Object.entries(n).reduce(function(a, l) {
var s = kt(l, 2), u = s[0], d = s[1];
return a.push("".concat(u, '="').concat(d, '"')) && a;
}, []).join(" ");
return C(i) ? '<style type="text/css" data-primevue-style-id="'.concat(this.name, '" ').concat(o, ">").concat(i, "</style>") : "";
}
return "";
},
getCommonThemeStyleSheet: function(t) {
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
return w.getCommonStyleSheet(this.name, t, n);
},
getThemeStyleSheet: function(t) {
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = [w.getStyleSheet(this.name, t, n)];
if (this.style) {
var i = this.name === "base" ? "global-style" : "".concat(this.name, "-style"), o = je($t || ($t = Ae(["", ""])), D(this.style, {
dt: ue
})), a = _e(w.transformCSS(i, o)), l = Object.entries(n).reduce(function(s, u) {
var d = kt(u, 2), c = d[0], m = d[1];
return s.push("".concat(c, '="').concat(m, '"')) && s;
}, []).join(" ");
C(a) && r.push('<style type="text/css" data-primevue-style-id="'.concat(i, '" ').concat(l, ">").concat(a, "</style>"));
}
return r.join("");
},
extend: function(t) {
return We(We({}, this), {}, {
css: void 0,
style: void 0
}, t);
}
};
function Yr() {
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "pc", t = xn();
return "".concat(e).concat(t.replace("v-", "").replaceAll("-", "_"));
}
var wt = E.extend({
name: "common"
});
function Oe(e) {
"@babel/helpers - typeof";
return Oe = 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;
}, Oe(e);
}
function qr(e) {
return Yt(e) || Jr(e) || Gt(e) || Xt();
}
function Jr(e) {
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
}
function ye(e, t) {
return Yt(e) || Qr(e, t) || Gt(e, t) || Xt();
}
function Xt() {
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
}
function Gt(e, t) {
if (e) {
if (typeof e == "string") return Ct(e, t);
var n = {}.toString.call(e).slice(8, -1);
return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? Ct(e, t) : void 0;
}
}
function Ct(e, t) {
(t == null || t > e.length) && (t = e.length);
for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n];
return r;
}
function Qr(e, t) {
var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
if (n != null) {
var r, i, o, a, l = [], s = !0, u = !1;
try {
if (o = (n = n.call(e)).next, t === 0) {
if (Object(n) !== n) return;
s = !1;
} else for (; !(s = (r = o.call(n)).done) && (l.push(r.value), l.length !== t); s = !0) ;
} catch (d) {
u = !0, i = d;
} finally {
try {
if (!s && n.return != null && (a = n.return(), Object(a) !== a)) return;
} finally {
if (u) throw i;
}
}
return l;
}
}
function Yt(e) {
if (Array.isArray(e)) return e;
}
function Tt(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 k(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t] != null ? arguments[t] : {};
t % 2 ? Tt(Object(n), !0).forEach(function(r) {
be(e, r, n[r]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Tt(Object(n)).forEach(function(r) {
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(n, r));
});
}
return e;
}
function be(e, t, n) {
return (t = ei(t)) in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
}
function ei(e) {
var t = ti(e, "string");
return Oe(t) == "symbol" ? t : t + "";
}
function ti(e, t) {
if (Oe(e) != "object" || !e) return e;
var n = e[Symbol.toPrimitive];
if (n !== void 0) {
var r = n.call(e, t);
if (Oe(r) != "object") return r;
throw new TypeError("@@toPrimitive must return a primitive value.");
}
return (t === "string" ? String : Number)(e);
}
var it = {
name: "BaseComponent",
props: {
pt: {
type: Object,
default: void 0
},
ptOptions: {
type: Object,
default: void 0
},
unstyled: {
type: Boolean,
default: void 0
},
dt: {
type: Object,
default: void 0
}
},
inject: {
$parentInstance: {
default: void 0
}
},
watch: {
isUnstyled: {
immediate: !0,
handler: function(t) {
N.off("theme:change", this._loadCoreStyles), t || (this._loadCoreStyles(), this._themeChangeListener(this._loadCoreStyles));
}
},
dt: {
immediate: !0,
handler: function(t, n) {
var r = this;
N.off("theme:change", this._themeScopedListener), t ? (this._loadScopedThemeStyles(t), this._themeScopedListener = function() {
return r._loadScopedThemeStyles(t);
}, this._themeChangeListener(this._themeScopedListener)) : this._unloadScopedThemeStyles();
}
}
},
scopedStyleEl: void 0,
rootEl: void 0,
uid: void 0,
$attrSelector: void 0,
beforeCreate: function() {
var t, n, r, i, o, a, l, s, u, d, c, m = (t = this.pt) === null || t === void 0 ? void 0 : t._usept, f = m ? (n = this.pt) === null || n === void 0 || (n = n.originalValue) === null || n === void 0 ? void 0 : n[this.$.type.name] : void 0, h = m ? (r = this.pt) === null || r === void 0 || (r = r.value) === null || r === void 0 ? void 0 : r[this.$.type.name] : this.pt;
(i = h || f) === null || i === void 0 || (i = i.hooks) === null || i === void 0 || (o = i.onBeforeCreate) === null || o === void 0 || o.call(i);
var b = (a = this.$primevueConfig) === null || a === void 0 ||