cmms/frontend/node_modules/@vexip-ui/utils/dist/index.mjs

1794 lines
46 KiB
JavaScript

const y = typeof window < "u";
var Ot;
const yn = y && ((Ot = window == null ? void 0 : window.navigator) == null ? void 0 : Ot.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent), re = Object.prototype.toString, oe = Object.prototype.hasOwnProperty;
function B(t, e) {
return re.call(t) === `[object ${e}]`;
}
function Mn(t, e) {
return oe.call(t, e);
}
function M(t) {
return t != null;
}
function ie(t) {
return t == null;
}
function Sn(t) {
return typeof t == "number";
}
function se(t) {
return Number.isNaN(t);
}
function wn(t) {
return typeof t == "string";
}
function En(t) {
return typeof t == "boolean";
}
function An(t) {
return t === !0;
}
function Nn(t) {
return t === !1;
}
function Fn(t) {
return typeof t == "symbol";
}
function On(t) {
return typeof t == "bigint";
}
function $n(t) {
return Array.isArray(t);
}
function Y(t) {
return B(t, "Object");
}
function Tn(t) {
return !!t && typeof t.then == "function" && typeof t.catch == "function";
}
function $t(t) {
return typeof t == "function";
}
function Cn(t) {
return B(t, "Set");
}
function Rn(t) {
return B(t, "Map");
}
function _n(t) {
return B(t, "Date");
}
function kn(t) {
return B(t, "RegExp");
}
function xn(t) {
return Array.isArray(t) || typeof t == "string" ? t.length === 0 : t instanceof Map || t instanceof Set ? t.size === 0 : Y(t) ? Object.keys(t).length === 0 : typeof t == "number" ? se(t) : ie(t);
}
function Dn(t, e = !1) {
return !e && !y ? !1 : !!(t && "nodeType" in t);
}
function G(t) {
return M(t) && typeof t[Symbol.iterator] == "function";
}
function it() {
}
function ce() {
return !0;
}
function In() {
return !1;
}
function Ln(t, e = 1, n = 1) {
const r = [];
for (let o = 0; o < t; ++o)
r.push(e + o * n);
return r;
}
function ae(t) {
return Object.prototype.toString.call(t).slice(8, -1);
}
function Hn(t = 16) {
const e = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890", n = e.length;
let r = "";
for (; t--; )
r += e.charAt(Math.floor(Math.random() * n));
return r;
}
async function Pn(t, e = {}) {
if (t.length) {
for (const [n, r] of t)
if (typeof n == "function" ? n() : n)
return typeof e.beforeMatchAny == "function" && await e.beforeMatchAny(), await r(), typeof e.afterMatchAny == "function" && await e.afterMatchAny(), !0;
}
return !1;
}
async function Bn(t) {
if (!y) return !1;
try {
return await navigator.clipboard.writeText(t), !0;
} catch {
let e = !1;
const n = document.createElement("textarea"), r = document.activeElement;
n.value = t, n.setAttribute("readonly", ""), n.style.contain = "strict", n.style.position = "absolute", n.style.height = "0", n.style.fontSize = "12pt";
const o = document.getSelection(), i = o ? o.rangeCount > 0 && o.getRangeAt(0) : null;
return document.body.appendChild(n), n.select(), n.selectionStart = 0, n.selectionEnd = t.length, e = document.execCommand("copy"), document.body.removeChild(n), i && (o.removeAllRanges(), o.addRange(i)), r && r.focus(), e;
}
}
const fe = "[-\\+]?\\d+%?", ue = "[-\\+]?\\d*\\.\\d+%?", F = `(?:${ue})|(?:${fe})`, le = `[\\s|\\(]+(${F})[,|\\s]+(${F})[,|\\s]+(${F})\\s*\\)?`, U = `[\\s|\\(]+(${F})[,|\\s]+(${F})[,|\\s]+(${F})[,|\\s]+(${F})\\s*\\)?`, Tt = new RegExp(`rgb${le}`), Ct = new RegExp(`rgba${U}`), Rt = new RegExp(`hsl${U}`), _t = new RegExp(`hsla${U}`), kt = new RegExp(`hsv${U}`), xt = new RegExp(`hsva${U}`), Dt = /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, It = /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/, Lt = /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/, Ht = /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/, W = Object.freeze({
aliceblue: "f0f8ff",
antiquewhite: "faebd7",
aqua: "0ff",
aquamarine: "7fffd4",
azure: "f0ffff",
beige: "f5f5dc",
bisque: "ffe4c4",
black: "000",
blanchedalmond: "ffebcd",
blue: "00f",
blueviolet: "8a2be2",
brown: "a52a2a",
burlywood: "deb887",
burntsienna: "ea7e5d",
cadetblue: "5f9ea0",
chartreuse: "7fff00",
chocolate: "d2691e",
coral: "ff7f50",
cornflowerblue: "6495ed",
cornsilk: "fff8dc",
crimson: "dc143c",
cyan: "0ff",
darkblue: "00008b",
darkcyan: "008b8b",
darkgoldenrod: "b8860b",
darkgray: "a9a9a9",
darkgreen: "006400",
darkgrey: "a9a9a9",
darkkhaki: "bdb76b",
darkmagenta: "8b008b",
darkolivegreen: "556b2f",
darkorange: "ff8c00",
darkorchid: "9932cc",
darkred: "8b0000",
darksalmon: "e9967a",
darkseagreen: "8fbc8f",
darkslateblue: "483d8b",
darkslategray: "2f4f4f",
darkslategrey: "2f4f4f",
darkturquoise: "00ced1",
darkviolet: "9400d3",
deeppink: "ff1493",
deepskyblue: "00bfff",
dimgray: "696969",
dimgrey: "696969",
dodgerblue: "1e90ff",
firebrick: "b22222",
floralwhite: "fffaf0",
forestgreen: "228b22",
fuchsia: "f0f",
gainsboro: "dcdcdc",
ghostwhite: "f8f8ff",
gold: "ffd700",
goldenrod: "daa520",
gray: "808080",
green: "008000",
greenyellow: "adff2f",
grey: "808080",
honeydew: "f0fff0",
hotpink: "ff69b4",
indianred: "cd5c5c",
indigo: "4b0082",
ivory: "fffff0",
khaki: "f0e68c",
lavender: "e6e6fa",
lavenderblush: "fff0f5",
lawngreen: "7cfc00",
lemonchiffon: "fffacd",
lightblue: "add8e6",
lightcoral: "f08080",
lightcyan: "e0ffff",
lightgoldenrodyellow: "fafad2",
lightgray: "d3d3d3",
lightgreen: "90ee90",
lightgrey: "d3d3d3",
lightpink: "ffb6c1",
lightsalmon: "ffa07a",
lightseagreen: "20b2aa",
lightskyblue: "87cefa",
lightslategray: "789",
lightslategrey: "789",
lightsteelblue: "b0c4de",
lightyellow: "ffffe0",
lime: "0f0",
limegreen: "32cd32",
linen: "faf0e6",
magenta: "f0f",
maroon: "800000",
mediumaquamarine: "66cdaa",
mediumblue: "0000cd",
mediumorchid: "ba55d3",
mediumpurple: "9370db",
mediumseagreen: "3cb371",
mediumslateblue: "7b68ee",
mediumspringgreen: "00fa9a",
mediumturquoise: "48d1cc",
mediumvioletred: "c71585",
midnightblue: "191970",
mintcream: "f5fffa",
mistyrose: "ffe4e1",
moccasin: "ffe4b5",
navajowhite: "ffdead",
navy: "000080",
oldlace: "fdf5e6",
olive: "808000",
olivedrab: "6b8e23",
orange: "ffa500",
orangered: "ff4500",
orchid: "da70d6",
palegoldenrod: "eee8aa",
palegreen: "98fb98",
paleturquoise: "afeeee",
palevioletred: "db7093",
papayawhip: "ffefd5",
peachpuff: "ffdab9",
peru: "cd853f",
pink: "ffc0cb",
plum: "dda0dd",
powderblue: "b0e0e6",
purple: "800080",
rebeccapurple: "663399",
red: "f00",
rosybrown: "bc8f8f",
royalblue: "4169e1",
saddlebrown: "8b4513",
salmon: "fa8072",
sandybrown: "f4a460",
seagreen: "2e8b57",
seashell: "fff5ee",
sienna: "a0522d",
silver: "c0c0c0",
skyblue: "87ceeb",
slateblue: "6a5acd",
slategray: "708090",
slategrey: "708090",
snow: "fffafa",
springgreen: "00ff7f",
steelblue: "4682b4",
tan: "d2b48c",
teal: "008080",
thistle: "d8bfd8",
tomato: "ff6347",
turquoise: "40e0d0",
violet: "ee82ee",
wheat: "f5deb3",
white: "fff",
whitesmoke: "f5f5f5",
yellow: "ff0",
yellowgreen: "9acd32"
}), de = Object.freeze(new Set(Object.keys(W)));
function Un(t) {
return t = String(t).trim().toLowerCase(), t ? t === "transparent" || W[t] ? !0 : t === "transparent" || de.has(t) || Tt.test(t) || Ct.test(t) || Rt.test(t) || _t.test(t) || kt.test(t) || xt.test(t) || Dt.test(t) || It.test(t) || Lt.test(t) || Ht.test(t) : !1;
}
function he(t) {
if (t = t.toString().trim().toLowerCase(), t === "transparent")
return { r: 0, g: 0, b: 0, a: 0, format: "name", toString: S };
let e = !1;
W[t] && (t = W[t], e = !0);
let n;
if (n = Tt.exec(t)) {
const { r, g: o, b: i } = R(n[1], n[2], n[3]);
return {
r: r * 255,
g: o * 255,
b: i * 255,
format: "rgb",
toString: S
};
}
if (n = Ct.exec(t)) {
const { r, g: o, b: i } = R(n[1], n[2], n[3]);
return {
r: r * 255,
g: o * 255,
b: i * 255,
a: C(n[4]),
format: "rgba",
toString: S
};
}
if (n = Rt.exec(t)) {
const { h: r, s: o, l: i } = z(n[0], n[1], n[3]);
return { h: r * 360, s: o, l: i, format: "hsl", toString: H };
}
if (n = _t.exec(t)) {
const { h: r, s: o, l: i } = z(n[0], n[1], n[3]);
return {
h: r * 360,
s: o,
l: i,
a: C(n[4]),
format: "hsla",
toString: H
};
}
if (n = kt.exec(t)) {
const { h: r, s: o, v: i } = j(n[0], n[1], n[3]);
return { h: r * 360, s: o, v: i, format: "hsv", toString: q };
}
if (n = xt.exec(t)) {
const { h: r, s: o, v: i } = j(n[0], n[1], n[3]);
return {
h: r * 360,
s: o,
v: i,
a: C(n[4]),
format: "hsva",
toString: q
};
}
return (n = Dt.exec(t)) ? {
r: parseInt(`${n[1]}${n[1]}`, 16),
g: parseInt(`${n[2]}${n[2]}`, 16),
b: parseInt(`${n[3]}${n[3]}`, 16),
format: e ? "name" : "hex3",
toString: S
} : (n = It.exec(t)) ? {
r: parseInt(`${n[1]}${n[1]}`, 16),
g: parseInt(`${n[2]}${n[2]}`, 16),
b: parseInt(`${n[3]}${n[3]}`, 16),
a: mt(`${n[4]}${n[4]}`),
format: e ? "name" : "hex4",
toString: S
} : (n = Lt.exec(t)) ? {
r: parseInt(n[1], 16),
g: parseInt(n[2], 16),
b: parseInt(n[3], 16),
format: e ? "name" : "hex6",
toString: S
} : (n = Ht.exec(t)) ? {
r: parseInt(n[1], 16),
g: parseInt(n[2], 16),
b: parseInt(n[3], 16),
a: mt(n[4]),
format: e ? "name" : "hex8",
toString: S
} : null;
}
function Yn(t) {
const { a: e, ...n } = O(t);
delete n.format;
const r = Bt(n.r, n.g, n.b), o = Ut(n.r, n.g, n.b), i = st(n.r, n.g, n.b), s = ct(n.r, n.g, n.b, e);
return {
rgb: n,
hsl: r,
hsv: o,
hex: i,
alpha: e,
rgba: { ...n, a: e, format: "rgba" },
hsla: { ...r, a: e, format: "hsla" },
hsva: { ...o, a: e, format: "hsva" },
hex8: s,
gray: Gt(n),
origin: t
};
}
function O(t) {
let e = { r: 0, g: 0, b: 0 }, n = 1, r;
return typeof t == "string" ? r = he(t) : r = t, r !== null && typeof r == "object" && ("l" in r ? e = Pt(r.h, r.s, r.l) : "v" in r && (e = pe(r.h, r.s, r.v)), "a" in r && (n = C(r.a ?? 1), Number.isNaN(n) && (n = 1)), e = r), { ...e, a: n, format: "rgba", toString: S };
}
function z(t, e, n) {
return {
h: w(t, 0, 360) / 360,
s: w(I(e) ? L(e) : e, 0, 1),
l: w(I(n) ? L(n) : n, 0, 1)
};
}
function R(t, e, n) {
return {
r: w(t, 0, 255) / 255,
g: w(e, 0, 255) / 255,
b: w(n, 0, 255) / 255
};
}
function j(t, e, n) {
return {
h: w(t, 0, 360) / 360,
s: w(I(e) ? L(e) : e, 0, 1),
v: w(I(n) ? L(n) : n, 0, 1)
};
}
function C(t) {
return w(I(t) ? L(t) : t, 0, 1);
}
function Pt(t, e, n) {
let r, o, i;
if ({ h: t, s: e, l: n } = z(t, e, n), e === 0)
r = o = i = n;
else {
const s = n < 0.5 ? 1 * (1 + e) : n + e - n * e, c = 2 * n - s;
r = tt(c, s, t + 1 / 3), o = tt(c, s, t), i = tt(c, s, t - 1 / 3);
}
return r *= 255, o *= 255, i *= 255, { r, g: o, b: i, toString: S };
}
function Bt(t, e, n) {
({ r: t, g: e, b: n } = R(t, e, n));
const r = Math.max(t, e, n), o = Math.min(t, e, n);
let i, s;
const c = (r + o) / 2;
if (r === o)
i = s = 0;
else {
const a = r - o;
switch (s = c > 0.5 ? a / (2 - r - o) : a / (r + o), r) {
case t: {
i = (e - n) / a + (e < n ? 6 : 0);
break;
}
case e: {
i = (n - t) / a + 2;
break;
}
case n: {
i = (t - e) / a + 4;
break;
}
default:
i = 0;
}
i *= 60;
}
return { h: i, s, l: c, toString: H };
}
function ge(t, e, n) {
({ h: t, s: e, l: n } = z(t, e, n));
const r = 0.5 * (2 * n + e * (1 - Math.abs(2 * n - 1)));
return e = 2 * (r - n) / r, { h: t * 360, s: e, v: r, toString: q };
}
function Gn(t, e, n) {
({ h: t, s: e, v: n } = j(t, e, n));
const r = 0.5 * n * (2 - e);
return e = n * e / (1 - Math.abs(2 * r - 1)), { h: t * 360, s: e, l: r, toString: H };
}
function pe(t, e, n) {
({ h: t, s: e, v: n } = j(t, e, n)), t *= 6;
const r = Math.floor(t), o = t - r, i = n * (1 - e), s = n * (1 - o * e), c = n * (1 - (1 - o) * e), a = r % 6;
let f = [n, s, i, i, c, n][a], u = [c, n, n, s, i, i][a], d = [i, i, c, n, n, s][a];
return f *= 255, u *= 255, d *= 255, { r: f, g: u, b: d, toString: S };
}
function Ut(t, e, n) {
({ r: t, g: e, b: n } = R(t, e, n));
const r = Math.max(t, e, n), o = Math.min(t, e, n);
let i;
const s = r, c = r - o, a = r === 0 ? 0 : c / r;
if (r === o)
i = 0;
else {
switch (r) {
case t: {
i = (e - n) / c + (e < n ? 6 : 0);
break;
}
case e: {
i = (n - t) / c + 2;
break;
}
case n: {
i = (t - e) / c + 4;
break;
}
default:
i = 0;
}
i *= 60;
}
return { h: i, s: a, v: s, toString: q };
}
function st(t, e, n, r = !1) {
({ r: t, g: e, b: n } = R(t, e, n));
const o = [
$(Math.round(t * 255).toString(16)),
$(Math.round(e * 255).toString(16)),
$(Math.round(n * 255).toString(16))
];
return r && T(o[0]) && T(o[1]) && T(o[2]) ? o[0].charAt(0) + o[1].charAt(0) + o[2].charAt(0) : "#" + o.join("");
}
function ct(t, e, n, r, o = !1) {
({ r: t, g: e, b: n } = R(t, e, n));
const i = [
$(Math.round(t * 255).toString(16)),
$(Math.round(e * 255).toString(16)),
$(Math.round(n * 255).toString(16)),
$(me(C(r)))
];
return o && T(i[0]) && T(i[1]) && T(i[2]) && T(i[3]) ? i[0].charAt(0) + i[1].charAt(0) + i[2].charAt(0) + i[3].charAt(0) : "#" + i.join("");
}
function Wn(t, e, n = 0.5) {
if (!t && !e) return { r: 0, g: 0, b: 0, a: 1 };
if (!t) return O(e);
if (!e) return O(t);
const r = O(t), o = O(e), i = w(n, 0, 1), s = i * 2 - 1, c = r.a - o.a, f = ((s * c === -1 ? s : (s + c) / (1 + s * c)) + 1) / 2, u = 1 - f;
return {
r: Math.round(r.r * f + o.r * u),
g: Math.round(r.g * f + o.g * u),
b: Math.round(r.b * f + o.b * u),
a: Math.round(r.a * i + o.a * (1 - i)),
format: "rgba",
toString: S
};
}
function zn(t, e) {
const n = O(t);
return n.a = C(e), n;
}
function jn(t = !1, e = "hex") {
const n = Math.round(Math.random() * 255), r = Math.round(Math.random() * 255), o = Math.round(Math.random() * 255);
if (e === "hex")
return t ? ct(n, r, o, Math.random()) : st(n, r, o);
let i;
return e === "hsl" ? i = Bt(n, r, o) : e === "hsv" ? i = Ut(n, r, o) : i = /* @__PURE__ */ Object.create({ r: n, g: r, b: o, toString: S }), t && (i.a = Math.random()), i.toString();
}
function Yt(t, e = !1, n = "hex") {
const r = Math.round(Math.random() * 360), o = Math.round(t === "hard" ? 80 + Math.random() * 20 : 20 + Math.random() * 70) / 100, i = Math.round(t === "hard" ? 40 + Math.random() * 20 : 80 + Math.random() * 15) / 100;
if (n === "hsl")
return H.bind({ h: r, s: o, l: i })();
let s;
if (n === "hex" || n === "rgb") {
if (s = Pt(r, o, i), n === "hex") {
const { r: c, g: a, b: f } = s;
return e ? ct(c, a, f, Math.random()) : st(c, a, f);
}
} else n === "hsv" && (s = ge(r, o, i));
return e && (s.a = Math.random()), s.toString();
}
function qn(t = !1, e = "hex") {
return Yt("hard", t, e);
}
function Kn(t = !1, e = "hex") {
return Yt("soft", t, e);
}
function Qn(t) {
return Gt(O(t));
}
function $(t) {
return t.length === 1 ? `0${t}` : t.toString();
}
function T(t) {
return t.charAt(0) === t.charAt(1);
}
function me(t) {
return Math.round(parseFloat(t) * 255).toString(16);
}
function mt(t) {
return parseInt(t, 16) / 255;
}
function w(t, e, n) {
return Math.max(e, Math.min(n, parseFloat(t)));
}
function tt(t, e, n) {
return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? t + (e - t) * 6 * n : n < 1 / 2 ? e : n < 2 / 3 ? t + (e - t) * (2 / 3 - n) * 6 : t;
}
function I(t) {
return String(t).trim().includes("%");
}
function L(t) {
const e = parseFloat(t) / 100;
return Number.isNaN(e) ? 0 : e;
}
function S() {
return M(this.a) && this.a >= 0 && this.a < 1 ? `rgba(${this.r}, ${this.g}, ${this.b}, ${this.a})` : `rgb(${this.r}, ${this.g}, ${this.b})`;
}
function H() {
const t = `${this.s * 100}%`, e = `${this.l * 100}%`;
return M(this.a) && this.a >= 0 && this.a < 1 ? `hsla(${this.h}, ${t}, ${e}, ${this.a})` : `hsl(${this.h}, ${t}, ${e})`;
}
function q() {
const t = `${this.s * 100}%`, e = `${this.v * 100}%`;
return M(this.a) && this.a >= 0 && this.a < 1 ? `hsva(${this.h}, ${t}, ${e}, ${this.a})` : `hsv(${this.h}, ${t}, ${e})`;
}
function Gt(t) {
return (t.r * 0.2126 + t.g * 0.7152 + t.b * 0.0722) / 255;
}
let Wt = 0;
function Xn() {
return Wt++;
}
function Vn(t) {
Wt = Math.round(t);
}
function Zn(t = 0) {
return {
getCount: () => t++,
setCount: (e) => {
t = e;
}
};
}
function bt(t) {
return t & -t;
}
function Jn(t, e = 0) {
const n = new Array(t + 1).fill(0);
function r(c, a) {
if (!(!a || c >= t))
for (c += 1; c <= t; )
n[c] += a, c += bt(c);
}
function o(c = t) {
if (c <= 0) return 0;
c > t && (c = t);
let a = c * e;
for (; c > 0; )
a += n[c], c -= bt(c);
return a;
}
function i(c) {
return o(c + 1) - o(c);
}
function s(c) {
let a = 0, f = t;
for (; f > a; ) {
const u = Math.floor((a + f) / 2), d = o(u);
if (d > c) {
f = u;
continue;
} else if (d < c) {
if (a === u)
return o(a + 1) <= c ? a + 1 : a;
a = u;
} else
return u;
}
return a;
}
return { tree: n, add: r, sum: o, get: i, boundIndex: s };
}
const be = /^\s*[+-]?\d*\.?\d+(?:[eE][+-]?\d+)?\s*$/;
function ye(t, e = !1) {
return typeof t == "number" ? !Number.isNaN(t) : e ? be.test(String(t)) : !Number.isNaN(parseFloat(t)) || !Number.isNaN(Number(t));
}
function Me(t) {
let e = parseFloat(t);
return Number.isNaN(e) && (e = Number(t)), Number.isNaN(e) ? 0 : e;
}
function Se(t, e) {
return e <= 0 ? t.toString() : `${t < 0 ? "-" : ""}${String(Math.abs(Math.round(t))).padStart(e, "0")}`;
}
function A(t) {
return Se(t, 2);
}
function E(t) {
const e = t.toString().split(/[eE]/), n = (e[0].split(".")[1] || "").length - +(e[1] || 0);
return n > 0 ? n : 0;
}
function vn(t) {
return E(t);
}
function tr(t, e = 3, n = ",") {
if (typeof t != "number" && (t = parseFloat(t)), Number.isNaN(t)) return "0";
let [r, o] = String(t).split(".");
const i = new RegExp(`(\\d+)(\\d{${e}})`);
for (; i.test(r); )
r = r.replace(i, `$1${n}$2`);
return o = o ? `.${o}` : "", `${r}${o}`;
}
function zt(t, e) {
e = Math.max(Math.round(e), 0);
let n = t.toFixed(E(t));
const r = n.indexOf(".");
if (r === -1) return t;
const o = n.replace(".", "").split(""), i = r + e;
return o[i] ? (n.charAt(i + 1) === "5" ? n = n.substring(0, i + 1) + "6" : n = n.substring(0, i + 2), parseFloat(Number(n).toFixed(e))) : t;
}
function er(t, e, n) {
return zt(t * e, n);
}
function nr(t, e) {
if (e < 0 || e > 1)
return Math.round(t);
const n = Math.ceil(t);
return t + 1 - e >= n ? n : Math.floor(t);
}
function rr(t, e, n) {
return Math.max(e, Math.min(n, parseFloat(t)));
}
function or(t, e, n = 0) {
if (t <= 0 || e <= 1) return [t];
n < 1 && (n = 1 / 0);
const r = [];
let o = 0;
for (; t >= e && o < n; )
r.push(t % e), t = Math.floor(t / e), ++o;
return r.push(t), r.reverse();
}
const et = ["th", "st", "nd", "rd"];
function ir(t) {
if (t = Math.round(t), t <= 0) return `${t}th`;
const e = t % 100 > 10 && t % 100 < 14 ? et[0] : et[t % 10] || et[0];
return `${t}${e}`;
}
const yt = Object.freeze([
"B",
"KB",
"MB",
"GB",
"TB",
"AUTO"
]);
function sr(t, e = "AUTO", n = !1, r) {
typeof r > "u" && (typeof n == "number" ? (r = n, n = !1) : r = 2);
let o = e.toUpperCase();
o = yt.includes(o) ? o : "AUTO";
let i;
switch (o) {
case "AUTO":
i = 0;
break;
case "KB":
i = 1;
break;
case "MB":
i = 2;
break;
case "GB":
i = 3;
break;
case "TB":
i = 4;
break;
default:
return t;
}
let s;
if (i)
s = t / 1024 ** i;
else
for (s = t; s > 1024 && !(i > 4); ++i)
s = s / 1024;
return s = zt(s, r), n ? `${s}${o === "AUTO" ? yt[Math.min(i, 4)] : o}` : s;
}
function cr(t, e = 0) {
return e === t ? e : (e > t && ([e, t] = [t, e]), Math.random() * (t - e) + e);
}
function jt(t, e = 15) {
return +parseFloat(Number(t).toPrecision(e));
}
function K(t) {
const e = String(t);
if (!e.includes("e"))
return Number(e.replace(".", ""));
const n = E(t);
return n > 0 ? jt(Number(t) * 10 ** n) : Number(t);
}
function Q(t) {
return (...e) => {
let n = e[0];
for (let r = 1, o = e.length; r < o; ++r)
n = t(n, e[r]);
return n;
};
}
const P = Q((t, e) => {
const n = K(t), r = K(e), o = E(t) + E(e);
return n * r / 10 ** o;
}), ar = Q((t, e) => {
const n = 10 ** Math.max(E(t), E(e));
return (P(t, n) + P(e, n)) / n;
}), fr = Q((t, e) => {
const n = 10 ** Math.max(E(t), E(e));
return (P(t, n) - P(e, n)) / n;
}), ur = Q((t, e) => {
const n = K(t), r = K(e);
return P(n / r, jt(10 ** (E(e) - E(t))));
}), we = 1e3, N = 1e3, k = 60, Ee = k * N, lr = k * N, X = 60, qt = X * k, Ae = qt * N, dr = qt * N, Kt = 24, Ne = Kt * X, Qt = Ne * k, Fe = Qt * N, hr = Qt * N, at = 7, Oe = at * Kt, $e = Oe * X, Xt = $e * k, Te = Xt * N, gr = Xt * N, Vt = 3, Ce = 4, Re = Ce * Vt, _e = {
y(t, e) {
const n = t.getFullYear();
return e.length === 4 ? n : n % 1e3 % 100;
},
M(t, e) {
const n = t.getMonth() + 1;
return e.length === 2 ? A(n) : n;
},
d(t, e) {
const n = t.getDate();
return e.length === 2 ? A(n) : n;
},
H(t, e) {
const n = t.getHours();
return e.length === 2 ? A(n) : n;
},
m(t, e) {
const n = t.getMinutes();
return e.length === 2 ? A(n) : n;
},
s(t, e) {
const n = t.getSeconds();
return e.length === 2 ? A(n) : n;
},
q(t, e) {
const n = Math.ceil((t.getMonth() + 1) / 3);
return e.length === 2 ? A(n) : n;
}
}, ke = /[yMdHmsq](\w)*|./g, xe = /'(.+?)'/g;
function h(t, e = !1) {
const n = new Date(t);
if (e && Number.isNaN(+n))
throw new RangeError("Invalid date value");
return typeof t == "string" && !t.includes(":") && (n.setHours(0), n.setMinutes(0), n.setSeconds(0)), n;
}
function pr(t, e = "yyyy-MM-dd HH:mm:ss") {
t = h(t);
const n = e.match(ke), r = n == null ? void 0 : n.length;
if (!r)
return e;
let o = 0, i = "";
for (; o < r; ) {
const s = n[o], c = s[0], a = _e[c];
a ? i += a(t, s) : i += s, ++o;
}
return i.replace(xe, "$1");
}
function mr(t) {
return t = h(t), `${A(t.getHours())}:${A(t.getMinutes())}:${A(
t.getSeconds()
)}`;
}
function ot(t) {
return t = h(t), Math.floor(t.getMonth() / 3) + 1;
}
const De = ["日", "一", "二", "三", "四", "五", "六"];
function br(t) {
return De[t.getDay()];
}
function Ie(t, e) {
return t = h(t), t.setTime(t.getTime() + e), t;
}
function Le(t, e) {
return e *= N, Ie(t, e);
}
function He(t, e) {
return e *= k, Le(t, e);
}
function Pe(t, e) {
return e *= X, He(t, e);
}
function yr(t, e) {
return e *= 12, Pe(t, e);
}
function ft(t, e) {
return t = h(t), e = ~~e, t.setDate(t.getDate() + e), t;
}
function Mr(t, e) {
return e *= at, ft(t, e);
}
function ut(t, e) {
return t = h(t), e = ~~e, t.setMonth(t.getMonth() + e), t;
}
function Sr(t, e) {
return e *= Vt, ut(t, e);
}
function wr(t, e) {
return e *= Re, ut(t, e);
}
function Er(t, e = 42, n = 1) {
t = h(t);
const r = [];
for (let o = 0; o < e; ++o)
r.push(ft(t, o * n));
return r;
}
function Ar(t, e = 12, n = 1) {
t = h(t);
const r = [];
for (let o = 0; o < e; ++o)
r.push(ut(t, o * n));
return r;
}
function Nr(t) {
const e = t.getDay() ?? 7;
return ft(t, -e);
}
function Mt(t) {
return t = h(t), t.setMilliseconds(0), t;
}
function St(t) {
return t = h(t), t.setSeconds(0, 0), t;
}
function wt(t) {
return t = h(t), t.setMinutes(0, 0, 0), t;
}
function Et(t) {
return t = h(t), t.setHours(0, 0, 0, 0), t;
}
function Fr(t) {
return t = h(t), t.setHours(23, 59, 59, 999), t;
}
function At(t, e = 0) {
e = e % 7, e < 0 && (e += 7), t = h(t);
const n = t.getDay(), r = (n < e ? 7 : 0) + n - e;
return t.setDate(t.getDate() - r), t.setHours(0, 0, 0, 0), t;
}
function Be(t) {
return t % 4 === 0 && t % 100 !== 0 || t % 400 === 0;
}
function Ue(t, e) {
let n;
return e < 7 ? e !== 2 ? n = 30 + e % 2 : Be(t) ? n = 29 : n = 28 : n = 31 - e % 2, n;
}
function Or(t, e = 1) {
t = h(t);
const n = t.getFullYear(), r = t.getMonth() + 1, o = t.getDate(), i = Ue(n, r);
return e = e % i, e < 0 && (e += i), o < e && t.setMonth(r - 1), t.setDate(e), t.setHours(0, 0, 0, 0), t;
}
function $r(t) {
t = h(t);
const e = ot(t);
return t.setDate(1), t.setHours(0, 0, 0, 0), t.setMonth((e - 1) * 3), t;
}
function Tr(t, e = 0) {
e = e % 11, e < 0 && (e += 11), t = h(t);
const n = t.getMonth(), r = (n < e ? 11 : 0) + n - e;
return t.setMonth(t.getMonth() - r), t.setDate(1), t.setHours(0, 0, 0, 0), t;
}
function lt(t, e) {
return t = h(t), e = h(e), e.getTime() - t.getTime();
}
function Ye(t, e) {
const n = lt(t, e) / we;
return n > 0 ? Math.floor(n) : Math.ceil(n);
}
function Ge(t, e) {
const n = lt(t, e) / Ee;
return n > 0 ? Math.floor(n) : Math.ceil(n);
}
function We(t, e) {
const n = lt(t, e) / Ae;
return n > 0 ? Math.floor(n) : Math.ceil(n);
}
function ze(t, e) {
return t = Et(t), e = Et(e), (e.getTime() - t.getTime()) / Fe;
}
function Cr(t, e, n = 0) {
return t = At(t, n), e = At(e, n), (e.getTime() - t.getTime()) / Te;
}
function je(t, e) {
t = h(t), e = h(e);
const n = e.getFullYear() - t.getFullYear(), r = e.getMonth() - t.getMonth();
return n * 12 + r;
}
function Rr(t, e) {
t = h(t), e = h(e);
const n = e.getFullYear() - t.getFullYear(), r = ot(e) - ot(t);
return n * 4 + r;
}
function qe(t, e) {
return t = h(t), e = h(e), e.getFullYear() - t.getFullYear();
}
function Ke(t, e) {
t = h(t), e = h(e);
const n = t.getTime() - e.getTime();
return n < 0 ? -1 : n > 0 ? 1 : n;
}
function _(t, e) {
return -Ke(t, e);
}
function _r(t, e) {
return t = Mt(t), e = Mt(e), Ye(t, e);
}
function kr(t, e) {
return t = St(t), e = St(e), Ge(t, e);
}
function xr(t, e) {
return t = wt(t), e = wt(e), We(t, e);
}
function Qe(t, e) {
const n = _(t, e), r = Math.abs(ze(t, e));
t = h(t), t.setDate(t.getDate() + n * r);
const o = _(t, e) === -n;
return n * (r - (o ? 1 : 0));
}
function Dr(t, e) {
const n = Qe(t, e) / at;
return n > 0 ? Math.floor(n) : Math.ceil(n);
}
function Xe(t, e) {
const n = _(t, e), r = Math.abs(je(t, e));
t = h(t), t.setMonth(t.getMonth() + n * r);
const o = _(t, e) === -n;
return n * (r - (o ? 1 : 0));
}
function Ir(t, e) {
const n = Xe(t, e) / 3;
return n > 0 ? Math.floor(n) : Math.ceil(n);
}
function Lr(t, e) {
const n = _(t, e), r = Math.abs(qe(t, e));
t = h(t), t.setFullYear(t.getFullYear() + n * r);
const o = _(t, e) === -n;
return n * (r - (o ? 1 : 0));
}
function Ve(t, e = {}) {
if (t == null || typeof t != "object")
return t;
const { cloneObject: n = it } = e, r = /* @__PURE__ */ Object.create(null), o = [
{
parent: r,
prop: "root",
data: t
}
], i = /* @__PURE__ */ new WeakMap(), s = [], c = [];
for (; o.length; ) {
const { parent: a, prop: f, data: u } = o.pop();
if (!a) continue;
const d = ae(u);
if (d === "Date") {
a[f] = new Date(u);
continue;
}
if (d !== "Array") {
const l = n(d, u);
if (l != null) {
a[f] = l;
continue;
}
}
const g = a[f] = d === "Array" || d === "Set" || d === "Map" ? [] : /* @__PURE__ */ Object.create(null);
if (d === "Set" || d === "Map") {
let l = 0;
if (d === "Set") {
for (const p of u)
i.has(p) ? g[l] = i.get(p) : p !== null && typeof p == "object" ? o.push({
parent: g,
prop: l,
data: p
}) : g[l] = p, ++l;
s.push({ parent: a, prop: f });
} else {
for (const p of u) {
const b = [];
l = 0;
for (const m of p)
i.has(m) ? b[l] = i.get(m) : m !== null && typeof m == "object" ? o.push({
parent: b,
prop: l,
data: m
}) : b[l] = m, ++l;
g.push(b);
}
c.push({ parent: a, prop: f });
}
} else
for (const l of Object.keys(u)) {
const p = u[l];
i.has(p) ? g[l] = i.get(p) : p !== null && typeof p == "object" ? o.push({
parent: g,
prop: l,
data: p
}) : g[l] = p;
}
i.set(u, g);
}
for (const { parent: a, prop: f } of s)
a[f] = new Set(a[f]);
for (const { parent: a, prop: f } of c)
a[f] = new Map(a[f]);
return r.root;
}
const Ze = "This object was destroyed, do not use it anywhere", Je = () => !0;
function Hr(t, e = Ze) {
const n = () => {
throw new Error(e);
};
Object.keys(t).forEach((r) => {
typeof t[r] == "function" ? t[r] = n.bind(t) : t[r] = null;
}), Object.getOwnPropertyNames(t.constructor.prototype).forEach((r) => {
r !== "constructor" && typeof t[r] == "function" && (t[r] = n.bind(t));
}), t.isDestroyed = Je;
}
const ve = y && ("ontouchstart" in window || tn() > 0), Pr = ve ? "pointerdown" : "click";
function tn() {
return typeof navigator < "u" && (navigator.maxTouchPoints || navigator.msMaxTouchPoints) || 0;
}
function Br(t, e, n = window.Event) {
const { type: r, bubbles: o = !1, cancelable: i = !1, ...s } = e;
if (!M(r) || r === "") return !1;
let c;
return M(n) ? c = new n(r, { bubbles: o, cancelable: i }) : (c = document.createEvent("HTMLEvents"), c.initEvent(r, o, i)), Object.assign(c, s), t.dispatchEvent(c);
}
const en = [
"button",
"[href]:not(.disabled)",
"input",
"select",
"textarea",
"[tabindex]",
"[contenteditable]"
].map((t) => `${t}:not(:disabled):not([disabled])`).join(", ");
function V(t) {
return !!t && t.nodeType === 1;
}
function nn(t) {
return V(t) ? t : document.body;
}
function rn(t, e) {
return !y || !t ? [] : Array.from(nn(e).querySelectorAll(t));
}
function Ur(t) {
if (!y) return !1;
const e = document.activeElement;
return !V(t) || !e ? !1 : t === e || Zt(e, t);
}
function Zt(t, e) {
if (!t || !e) return !1;
const n = e.__transferElement;
return e.contains(t) || !!n && (n === t || n.contains(t));
}
function on(t) {
if (!y || !V(t) || !t.parentNode || !Zt(t, document.body) || t.style.display === "none")
return !0;
const e = t.getBoundingClientRect();
return !(e && e.width > 0 && e.height > 0);
}
function sn(t) {
return !on(t);
}
function cn(t) {
return !V(t) || t.hasAttribute("disabled") && t.getAttribute("disabled") !== "false" || t.disabled;
}
function Yr(t, e = !1) {
const n = e ? () => !1 : cn;
return rn(en, t).filter(
(r) => sn(r) && r.tabIndex > -1 && !n(r)
);
}
function an(t) {
if (!y || !t) return 0;
const e = getComputedStyle(t);
return parseFloat(e.paddingLeft) + parseFloat(e.paddingRight) || 0;
}
function Gr(t) {
if (!y || !t) return 0;
const e = getComputedStyle(t);
return parseFloat(e.paddingTop) + parseFloat(e.paddingBottom) || 0;
}
function Wr(t) {
if (!y || !t) return 0;
const e = getComputedStyle(t);
return parseFloat(e.marginLeft) + parseFloat(e.marginRight) || 0;
}
function zr(t) {
if (!y || !t) return 0;
const e = getComputedStyle(t);
return parseFloat(e.marginTop) + parseFloat(e.marginBottom) || 0;
}
function jr(t) {
if (!y || !t) return 0;
const e = getComputedStyle(t);
return parseFloat(e.borderLeftWidth) + parseFloat(e.borderRightWidth) || 0;
}
function qr(t) {
if (!y || !t) return 0;
const e = getComputedStyle(t);
return parseFloat(e.borderTopWidth) + parseFloat(e.borderBottomWidth) || 0;
}
function Kr(t) {
if (!y || !t) return 0;
const e = document.createRange();
e.setStart(t, 0), e.setEnd(t, t.childNodes.length);
const n = e.getBoundingClientRect().width, r = an(t);
return n + r;
}
function Qr(t) {
return ye(t, !0) ? `${Me(t)}px` : String(t).trim();
}
function Xr(t) {
return M(t) && t !== !1 ? String(t) : void 0;
}
const fn = /["'&<>]/;
function Vr(t) {
const e = "" + t, n = fn.exec(e);
if (!n)
return e;
let r = "", o, i, s = 0;
for (i = n.index; i < e.length; i++) {
switch (e.charCodeAt(i)) {
case 34:
o = "&quot;";
break;
case 38:
o = "&amp;";
break;
case 39:
o = "&#39;";
break;
case 60:
o = "&lt;";
break;
case 62:
o = "&gt;";
break;
default:
continue;
}
s !== i && (r += e.substring(s, i)), s = i + 1, r += o;
}
return s !== i ? r + e.substring(s, i) : r;
}
function Zr() {
const t = /* @__PURE__ */ new Map();
return {
on(e, n) {
const r = t.get(e);
(r == null ? void 0 : r.add(n)) || t.set(e, /* @__PURE__ */ new Set([n]));
},
off(e, n) {
const r = t.get(e);
r && r.delete(n);
},
clear(e) {
const n = t.get(e);
n && n.clear();
},
clearAll() {
t.clear();
},
emit(e, ...n) {
const r = t.get(e);
r && r.forEach((o) => {
o(...n);
});
}
};
}
function dt(t, e, n) {
t && !e.has(t) && (n(t), e.add(t));
}
const un = /* @__PURE__ */ new Set();
function Jr(t, e = console.info) {
dt(t, un, e);
}
const ln = /* @__PURE__ */ new Set();
function vr(t, e = console.warn) {
dt(t, ln, e);
}
const dn = /* @__PURE__ */ new Set();
function to(t, e = console.warn) {
dt(t, dn, e);
}
const ht = y ? requestAnimationFrame : (t) => {
setTimeout(t, 16);
};
function eo(t, e = 16) {
if (typeof t != "function")
return it;
const n = (...i) => {
t(...i);
};
if (e <= 0)
return Jt(n);
let r = 0, o;
return function(...i) {
const s = Date.now(), c = s - r;
clearTimeout(o), c >= e ? (r = s, n(...i)) : o = setTimeout(
() => {
r = Date.now(), n(...i);
},
Math.max(0, e - c)
);
};
}
function no(t, e = 100) {
if (typeof t != "function")
return it;
const n = (...o) => {
t(...o);
};
if (e <= 0)
return Jt(n);
let r;
return function(...o) {
clearTimeout(r), r = setTimeout(() => {
n(...o);
}, e);
};
}
function Jt(t) {
if (typeof t != "function")
return t;
let e = !1, n, r;
return function(...o) {
return n = o, e || (e = !0, r = Promise.resolve().then(() => (e = !1, r = void 0, t(...n)))), r;
};
}
function ro(t) {
if (typeof t != "function")
return t;
let e = !1, n, r;
return function(...o) {
return n = o, e || (e = !0, r = new Promise(
(i) => ht(() => {
e = !1, r = void 0, i(t(...n));
})
)), r;
};
}
const x = /* @__PURE__ */ new Set(), vt = /* @__PURE__ */ new WeakMap();
function hn() {
x.forEach((t) => {
t(...vt.get(t));
}), x.clear();
}
function oo(t, ...e) {
if (typeof t != "function")
return t;
vt.set(t, e), !x.has(t) && (x.add(t), x.size === 1 && Promise.resolve().then(hn));
}
const D = /* @__PURE__ */ new Set(), te = /* @__PURE__ */ new WeakMap();
function gn() {
D.forEach((t) => {
t(...te.get(t));
}), D.clear();
}
function io(t, ...e) {
if (typeof t != "function")
return t;
te.set(t, e), !D.has(t) && (D.add(t), D.size === 1 && ht(gn));
}
async function so(t, e, n) {
const r = [], o = [];
for (const i of e) {
const s = Promise.resolve().then(() => n(i, e));
if (r.push(s), t <= e.length) {
const c = s.then(() => o.splice(o.indexOf(c), 1));
o.push(c), o.length >= t && await Promise.race(o);
}
}
return Promise.all(r);
}
let nt = null;
function co() {
if (!y)
return !0;
if (nt === null) {
const t = document.createElement("div");
t.style.display = "flex", t.style.flexDirection = "column", t.style.rowGap = "1px", t.appendChild(document.createElement("div")), t.appendChild(document.createElement("div")), document.body.appendChild(t), nt = t.scrollHeight === 1, document.body.removeChild(t);
}
return nt;
}
let rt = null;
function ao() {
return y ? (rt === null && (rt = "loading" in document.createElement("img")), rt) : !1;
}
function fo(t) {
return Array.isArray(t) ? t : [t];
}
function uo(t, ...e) {
return $t(t) ? t(...e) : t;
}
function lo(t) {
return t.replace(/[\\/]+/g, "/");
}
function ho(t) {
return t[t.length - 1];
}
const Nt = (t) => t;
function go(t, e, n, r) {
let o;
typeof n != "function" && r === void 0 ? (r = !!n, o = Nt) : o = typeof n == "function" ? n : Nt;
const i = r ? /* @__PURE__ */ new Map() : {};
if (!M(e)) return i;
const s = r ? (a, f) => i.set(a, f) : (a, f) => i[a] = f, c = $t(e) ? e : (a) => a[e];
return t.forEach((a) => {
if (!M(a)) return;
const f = c(a);
M(f) && s(f, o(a));
}), i;
}
function po(t, e, n = !1) {
let r = -1;
return n || typeof e != "function" ? r = t.findIndex((o) => o === e) : r = t.findIndex(e), ~r ? t.splice(r, 1)[0] : null;
}
function mo(t, e = []) {
(typeof e == "string" || typeof e == "function") && (e = [e]);
const n = e.length, r = {};
for (const o of t) {
let i;
for (let s = 0; s < n; ++s) {
const c = s === n - 1, a = e[s], f = typeof a == "function" ? a(o) : o[a];
i ? (i[f] || (i[f] = c ? [] : {}), i = i[f]) : (r[f] || (r[f] = c ? [] : {}), i = r[f]);
}
i.push(o);
}
return r;
}
function bo(t, e = {}) {
const {
keyField: n = "id",
childField: r = "children",
parentField: o = "parent",
rootId: i = null
} = e, s = M(i) && i !== "", c = [], a = /* @__PURE__ */ new Map();
for (let f = 0, u = t.length; f < u; ++f) {
const d = t[f], g = d[n];
if (!(s ? g === i : !M(g)))
if (a.has(g) ? d[r] = a.get(g) : (d[r] = [], a.set(g, d[r])), d[o] && (!s || d[o] !== i)) {
const l = d[o];
a.has(l) || a.set(l, []), a.get(l).push(d);
} else
c.push(d);
}
return c;
}
function yo(t, e = {}) {
const {
keyField: n = "id",
childField: r = "children",
parentField: o = "parent",
rootId: i = null,
depthFirst: s = !1,
injectId: c = !0,
buildId: a = (m) => m,
filter: f = ce,
cascaded: u = !1,
forceInject: d = !1
} = e;
let g = 1;
const l = M(i) && i !== "", p = [], b = [...t];
for (; b.length; ) {
const m = b.shift(), Z = m[r], J = Array.isArray(Z) && Z.length ? Z : [];
c && (d || !m[n]) && (m[n] = a(g++));
const ee = m[n];
c && o && (l ? m[o] === i : !m[o]) && (m[o] = i);
const gt = f(m);
if (gt && p.push(m), gt || !u) {
for (let v = 0, ne = J.length; v < ne; ++v) {
const pt = J[v];
c && o && (pt[o] = ee), !s && b.push(pt);
}
s && b.unshift(...J);
}
}
return p;
}
function Mo(t, e, n = {}) {
const { childField: r = "children", depthFirst: o = !1 } = n, i = [...t.map((s) => ({ item: s, depth: 0, parent: null }))];
for (; i.length; ) {
const { item: s, depth: c, parent: a } = i.shift(), f = s[r];
e(s, c, a), G(f) && i[o ? "unshift" : "push"](
...Array.from(f).map((u) => ({ item: u, depth: c + 1, parent: s }))
);
}
}
function So(t, e, n = {}) {
const { childField: r = "children", depthFirst: o = !1, clearChildren: i = !0 } = n, s = [], c = [...t.map((a) => ({ item: a, depth: 0, parent: null, result: s }))];
for (; c.length; ) {
const { item: a, depth: f, parent: u, result: d } = c.shift(), g = a[r], l = e(a, f, u) ?? {};
i && (l[r] = []), d.push(l), G(g) && Array.from(g).length && (l[r] = [], c[o ? "unshift" : "push"](
...Array.from(g).map((b) => ({
item: b,
depth: f + 1,
parent: a,
result: l[r]
}))
));
}
return s;
}
function wo(t, e, n = {}) {
const {
childField: r = "children",
leafOnly: o = !1,
isLeaf: i = (c) => !G(c[r])
} = n, s = (c, a, f) => c.map((u) => ({ ...u })).filter((u) => {
const d = u[r], g = i(u), l = G(d) && Array.from(d);
if (o && !g) {
if (l && l.length) {
const b = s(l, a + 1, u);
return u[r] = b, !!b.length;
}
return !1;
}
const p = e(u, a, f);
if (g) return p;
if (!o && p) return !0;
if (l && l.length) {
const b = s(l, a + 1, u);
return u[r] = b, !!b.length;
}
return p;
});
return s(t, 0, null);
}
const Ft = (t, e) => Number.isNaN(Number(t) - Number(e)) ? String(t).localeCompare(e) : t - e;
function Eo(t, e) {
if (!t.sort || Y(e) && !e.key || !e.length)
return t;
const n = Array.from(t);
Array.isArray(e) || (e = [e]);
const r = e.map(
(o) => typeof o == "string" ? {
key: o,
method: Ft,
type: "asc"
} : o
).map((o) => (typeof o.accessor != "function" && (o.accessor = (i) => i[o.key]), typeof o.method != "function" && (o.method = Ft), o.params = Array.isArray(o.params) ? o.params : [], o));
return n.sort((o, i) => {
let s = 0;
for (const c of r) {
const { method: a, type: f, accessor: u, params: d } = c, g = f === "desc", l = a(u(o, ...d), u(i, ...d));
if (s = g ? -l : l, s) break;
}
return s;
}), n;
}
function Ao(t, e, n = !0) {
t = n ? Ve(t) : t;
const r = [
{
source: t,
target: e
}
];
for (; r.length; ) {
const { source: o, target: i } = r.pop();
Object.keys(i).forEach((s) => {
Y(i[s]) ? (Y(o[s]) || (o[s] = /* @__PURE__ */ Object.create(null)), r.push({
source: o[s],
target: i[s]
})) : Array.isArray(i[s]) ? (Array.isArray(o[s]) || (o[s] = []), r.push({
source: o[s],
target: i[s]
})) : o[s] = i[s];
});
}
return t;
}
function No(t) {
t = Array.from(t);
let e = !1;
const n = () => {
var r;
e || ((r = t.shift()) == null || r(), t.length && ht(n));
};
return n(), () => e = !0;
}
function pn(t) {
const e = t.match(/[A-Z]+/);
return e && e[0] === t;
}
const mn = /\B([A-Z])(?=[^A-Z_-])/g;
function Fo(t) {
return t.replace(mn, "-$1").toLowerCase();
}
function bn(t) {
return t = t.trim().replace(/\s+/g, "-"), t = t.replace(/-+(\w)/g, (e, n) => n ? n.toUpperCase() : ""), (t.charAt(0).toLocaleUpperCase() + t.slice(1)).replace(
/[^\w]/g,
""
);
}
function Oo(t) {
const e = bn(t);
return pn(e) ? e.toLocaleLowerCase() : e.charAt(0).toLowerCase() + e.slice(1);
}
export {
Pr as CLICK_TYPE,
de as COLOR_NAMES,
Kt as DAY_ON_HOURS,
hr as DAY_ON_MILLISECONDS,
Fe as DAY_ON_MILLS,
Ne as DAY_ON_MINUTES,
Qt as DAY_ON_SECONDS,
Dt as HEX_REG_3,
It as HEX_REG_4,
Lt as HEX_REG_6,
Ht as HEX_REG_8,
dr as HOUR_ON_MILLISECONDS,
Ae as HOUR_ON_MILLS,
X as HOUR_ON_MINUTES,
qt as HOUR_ON_SECONDS,
_t as HSLA_REG,
Rt as HSL_REG,
xt as HSVA_REG,
kt as HSV_REG,
lr as MINUTE_ON_MILLISECONDS,
Ee as MINUTE_ON_MILLS,
k as MINUTE_ON_SECONDS,
W as NAMED_COLORS,
Vt as QUARTER_ON_MONTHS,
Ct as RGBA_REG,
Tt as RGB_REG,
N as SECOND_ON_MILLISECONDS,
we as SECOND_ON_MILLS,
ve as USE_TOUCH,
at as WEEK_ON_DAYS,
Oe as WEEK_ON_HOURS,
gr as WEEK_ON_MILLISECONDS,
Te as WEEK_ON_MILLS,
$e as WEEK_ON_MINUTES,
Xt as WEEK_ON_SECONDS,
Re as YEAR_ON_MONTHS,
Ce as YEAR_ON_QUARTERS,
ft as addDays,
yr as addHalfDays,
Pe as addHours,
Ie as addMilliseconds,
He as addMinutes,
ut as addMonths,
Sr as addQuarters,
Le as addSeconds,
Mr as addWeeks,
wr as addYears,
zn as adjustAlpha,
rr as boundRange,
bo as buildTree,
uo as callIfFunc,
Ke as compareAsc,
_ as compareDesc,
Zt as contains,
Jn as createBITree,
Zn as createCounter,
Zr as createEventEmitter,
no as debounce,
ro as debounceFrame,
Jt as debounceMinor,
Pn as decide,
E as decimalLength,
Ve as deepClone,
Hr as destroyObject,
ze as differenceDays,
Qe as differenceFullDays,
xr as differenceFullHours,
kr as differenceFullMinutes,
Xe as differenceFullMonths,
Ir as differenceFullQuarters,
_r as differenceFullSeconds,
Dr as differenceFullWeeks,
Lr as differenceFullYears,
We as differenceHours,
lt as differenceMilliseconds,
Ge as differenceMinutes,
je as differenceMonths,
Rr as differenceQuarters,
Ye as differenceSeconds,
Cr as differenceWeeks,
qe as differenceYears,
vn as digitLength,
Br as dispatchEvent,
ur as divide,
A as doubleDigits,
Fr as endOfDay,
fo as ensureArray,
to as errorOnce,
Vr as escapeHtml,
wo as filterTree,
yo as flatTree,
pr as format,
sr as formatByteSize,
br as getChineseWeek,
Xn as getGlobalCount,
ho as getLast,
Ue as getLastDayOfMonth,
Nr as getLastSunday,
ot as getQuarter,
Kr as getRangeWidth,
mr as getTime,
ae as getType,
jr as getXBorder,
Wr as getXMargin,
an as getXPadding,
qr as getYBorder,
zr as getYMargin,
Gr as getYPadding,
mo as groupByProps,
Mn as has,
ge as hslToHsv,
Pt as hslToRgb,
Gn as hsvToHsl,
pe as hsvToRgb,
Jr as infoOnce,
B as is,
$n as isArray,
On as isBigInt,
En as isBoolean,
y as isClient,
Un as isColor,
_n as isDate,
M as isDefined,
cn as isDisabled,
Dn as isElement,
xn as isEmpty,
Nn as isFalse,
Ur as isFocusIn,
$t as isFunction,
on as isHidden,
yn as isIOS,
G as isIterable,
Be as isLeapYear,
Rn as isMap,
se as isNaN,
ie as isNull,
Sn as isNumber,
Y as isObject,
Tn as isPromise,
kn as isRegExp,
Cn as isSet,
wn as isString,
Fn as isSymbol,
An as isTrue,
ye as isValidNumber,
sn as isVisible,
or as leaveNumber,
go as listToMap,
So as mapTree,
Ao as mergeObjects,
fr as minus,
Wn as mixColor,
er as multipleFixed,
io as nextFrameOnce,
oo as nextTickOnce,
it as noop,
C as normalizeAlpha,
z as normalizeHsl,
j as normalizeHsv,
lo as normalizePath,
R as normalizeRgb,
be as numberRE,
ir as ordinalNumber,
Se as padStartZeros,
Yn as parseColor,
O as parseColorToRgba,
he as parseStringColor,
ar as plus,
rn as queryAll,
Yr as queryTabables,
ht as raf,
cr as random,
jn as randomColor,
qn as randomHardColor,
Yt as randomPreferColor,
Kn as randomSoftColor,
Hn as randomString,
Ln as range,
Er as rangeDate,
Ar as rangeMonth,
po as removeArrayItem,
st as rgbToHex,
Bt as rgbToHsl,
Ut as rgbToHsv,
ct as rgbaToHex,
nr as round,
so as runParallel,
No as runQueueFrame,
tr as segmentNumber,
Vn as setGlobalCount,
Eo as sortByProps,
Et as startOfDay,
wt as startOfHour,
St as startOfMinute,
Or as startOfMonth,
$r as startOfQuarter,
Mt as startOfSecond,
At as startOfWeek,
Tr as startOfYear,
co as supportFlexGap,
ao as supportImgLoading,
eo as throttle,
P as times,
Xr as toAttrValue,
Oo as toCamelCase,
bn as toCapitalCase,
Qr as toCssSize,
h as toDate,
In as toFalse,
zt as toFixed,
Qn as toGrayScale,
Fo as toKebabCase,
Me as toNumber,
jt as toPrecision,
ce as toTrue,
go as transformListToMap,
bo as transformTree,
Mo as walkTree,
vr as warnOnce,
Bn as writeClipboard
};
//# sourceMappingURL=index.mjs.map