@memobit/libs 1.0.65 → 1.0.66
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +1 -1
- package/dist/index.d.ts +12 -3
- package/dist/index.esm.js +1009 -1010
- package/dist/version.json +4 -4
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import w1, { Component as s4, Fragment as
|
|
1
|
+
import w1, { Component as s4, Fragment as h3, createContext as R0, forwardRef as z1, useCallback as D, useContext as B0, useEffect as Y, useId as A0, useImperativeHandle as m3, useLayoutEffect as D2, useMemo as l1, useRef as F, useState as R } from "react";
|
|
2
2
|
import { Fragment as h1, jsx as e, jsxs as n } from "react/jsx-runtime";
|
|
3
|
-
import { createPortal as
|
|
3
|
+
import { createPortal as Y1 } from "react-dom";
|
|
4
4
|
var d4 = /* @__PURE__ */ n("svg", {
|
|
5
5
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6
6
|
viewBox: "0 0 24 24",
|
|
@@ -1292,7 +1292,7 @@ var d4 = /* @__PURE__ */ n("svg", {
|
|
|
1292
1292
|
width: "1em",
|
|
1293
1293
|
height: "1em",
|
|
1294
1294
|
children: /* @__PURE__ */ e("path", { d: "M20 8c0-2.21-3.58-4-8-4S4 5.79 4 8c0 .93.47 1.77 1.23 2.45C4.47 11.12 4 12 4 13v6a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-6c0-1-.47-1.88-1.23-2.55C19.53 9.77 20 8.93 20 8zm-8-2c3.31 0 6 .9 6 2s-2.69 2-6 2-6-.9-6-2 2.69-2 6-2zm6 11H6v-4h12v4zm0-6H6v-.18C7.33 11.55 9.53 12 12 12s4.67-.45 6-1.18V11z" })
|
|
1295
|
-
}),
|
|
1295
|
+
}), p3 = /* @__PURE__ */ e("svg", {
|
|
1296
1296
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1297
1297
|
viewBox: "0 0 24 24",
|
|
1298
1298
|
fill: "currentColor",
|
|
@@ -9511,7 +9511,7 @@ var d4 = /* @__PURE__ */ n("svg", {
|
|
|
9511
9511
|
clipRule: "evenodd",
|
|
9512
9512
|
d: "M21.58 7.19a2.82 2.82 0 0 0-1.98-2C17.85 4.72 12 4.72 12 4.72s-5.85 0-7.6.47a2.82 2.82 0 0 0-1.98 2A29.26 29.26 0 0 0 1.95 12c0 1.68.16 3.37.47 4.81a2.82 2.82 0 0 0 1.98 2c1.75.47 7.6.47 7.6.47s5.85 0 7.6-.47a2.82 2.82 0 0 0 1.98-2c.31-1.44.47-3.13.47-4.81s-.16-3.37-.47-4.81zM10 15.43V8.57L16 12l-6 3.43z"
|
|
9513
9513
|
})
|
|
9514
|
-
}),
|
|
9514
|
+
}), u3 = {
|
|
9515
9515
|
"arrow-down": x4,
|
|
9516
9516
|
"arrow-left": L4,
|
|
9517
9517
|
"arrow-right": z4,
|
|
@@ -9527,7 +9527,7 @@ var d4 = /* @__PURE__ */ n("svg", {
|
|
|
9527
9527
|
"calendar-month": be,
|
|
9528
9528
|
"calendar-week": _e,
|
|
9529
9529
|
"calendar-year": Me,
|
|
9530
|
-
"caret-down":
|
|
9530
|
+
"caret-down": p3,
|
|
9531
9531
|
"caret-left": Ve,
|
|
9532
9532
|
"caret-right": Se,
|
|
9533
9533
|
"caret-up": He,
|
|
@@ -10006,7 +10006,7 @@ var d4 = /* @__PURE__ */ n("svg", {
|
|
|
10006
10006
|
d ? "icon--pulse-hover" : "",
|
|
10007
10007
|
t
|
|
10008
10008
|
].filter(Boolean).join(" "),
|
|
10009
|
-
children:
|
|
10009
|
+
children: u3[l]
|
|
10010
10010
|
}), b2 = "other", _2 = [
|
|
10011
10011
|
{
|
|
10012
10012
|
id: "navigation",
|
|
@@ -10652,10 +10652,10 @@ var d4 = /* @__PURE__ */ n("svg", {
|
|
|
10652
10652
|
icons: []
|
|
10653
10653
|
}, lc = new Map(_2.map((t) => [t.id, t]));
|
|
10654
10654
|
lc.set(b2, cc);
|
|
10655
|
-
var
|
|
10655
|
+
var v3 = /* @__PURE__ */ new Map();
|
|
10656
10656
|
_2.forEach((t) => {
|
|
10657
10657
|
t.icons.forEach((r) => {
|
|
10658
|
-
|
|
10658
|
+
v3.set(r, t.id);
|
|
10659
10659
|
});
|
|
10660
10660
|
});
|
|
10661
10661
|
var Ta = ({ items: t, allowMultiple: r = !1, defaultExpanded: c = [], onChange: l, className: o = "" }) => {
|
|
@@ -10728,7 +10728,7 @@ var Ta = ({ items: t, allowMultiple: r = !1, defaultExpanded: c = [], onChange:
|
|
|
10728
10728
|
})
|
|
10729
10729
|
})]
|
|
10730
10730
|
});
|
|
10731
|
-
},
|
|
10731
|
+
}, g3 = (t) => {
|
|
10732
10732
|
const r = F(null);
|
|
10733
10733
|
Y(() => {
|
|
10734
10734
|
const c = () => {
|
|
@@ -10754,12 +10754,12 @@ var Ta = ({ items: t, allowMultiple: r = !1, defaultExpanded: c = [], onChange:
|
|
|
10754
10754
|
c();
|
|
10755
10755
|
};
|
|
10756
10756
|
}, [t]);
|
|
10757
|
-
},
|
|
10758
|
-
const t = B0(
|
|
10757
|
+
}, w3 = R0(void 0), f3 = () => {
|
|
10758
|
+
const t = B0(w3);
|
|
10759
10759
|
if (t === void 0) throw new Error("useTheme must be used within a ThemeProvider");
|
|
10760
10760
|
return t;
|
|
10761
|
-
},
|
|
10762
|
-
const { effects: r } =
|
|
10761
|
+
}, C3 = (t) => {
|
|
10762
|
+
const { effects: r } = f3();
|
|
10763
10763
|
return r.effect && r.components.includes(t) ? r.effect : "";
|
|
10764
10764
|
}, U = w1.forwardRef(({ borders: t = "rounded", children: r, className: c, disabled: l = !1, fullWidth: o = !1, icon: d, iconVariant: s = "default", loading: m = !1, onClick: a, emojiIcon: i, size: h = "medium", style: p, sufixIcon: u, title: g, type: v = "button", variant: w = "default" }, f) => /* @__PURE__ */ e("button", {
|
|
10765
10765
|
ref: f,
|
|
@@ -10791,32 +10791,32 @@ var c1 = ({ title: t, position: r = "top", delay: c = 200, children: l, disabled
|
|
|
10791
10791
|
left: 0
|
|
10792
10792
|
}), u = F(null), g = F(null), v = F(null), w = F(null), f = F(!1), y = m !== void 0, _ = y ? 150 : 0, C = () => {
|
|
10793
10793
|
if (!v.current || !w.current) return;
|
|
10794
|
-
const
|
|
10795
|
-
let
|
|
10796
|
-
if (
|
|
10794
|
+
const M = v.current.firstElementChild?.getBoundingClientRect();
|
|
10795
|
+
let N = M && M.width > 0 ? M : v.current.getBoundingClientRect();
|
|
10796
|
+
if (N.width === 0 && N.height === 0) {
|
|
10797
10797
|
const J = document.createRange();
|
|
10798
10798
|
J.selectNodeContents(v.current);
|
|
10799
10799
|
const A = J.getBoundingClientRect();
|
|
10800
|
-
(A.width > 0 || A.height > 0) && (
|
|
10800
|
+
(A.width > 0 || A.height > 0) && (N = A);
|
|
10801
10801
|
}
|
|
10802
|
-
const
|
|
10802
|
+
const x = w.current.getBoundingClientRect(), B = 8;
|
|
10803
10803
|
let H = 0, E = 0;
|
|
10804
10804
|
switch (r) {
|
|
10805
10805
|
case "top":
|
|
10806
|
-
H =
|
|
10806
|
+
H = N.top - x.height - B, E = N.left + N.width / 2 - x.width / 2;
|
|
10807
10807
|
break;
|
|
10808
10808
|
case "bottom":
|
|
10809
|
-
H =
|
|
10809
|
+
H = N.bottom + B, E = N.left + N.width / 2 - x.width / 2;
|
|
10810
10810
|
break;
|
|
10811
10811
|
case "left":
|
|
10812
|
-
H =
|
|
10812
|
+
H = N.top + N.height / 2 - x.height / 2, E = N.left - x.width - B;
|
|
10813
10813
|
break;
|
|
10814
10814
|
case "right":
|
|
10815
|
-
H =
|
|
10815
|
+
H = N.top + N.height / 2 - x.height / 2, E = N.right + B;
|
|
10816
10816
|
break;
|
|
10817
10817
|
}
|
|
10818
10818
|
const P = 8;
|
|
10819
|
-
E < P && (E = P), E +
|
|
10819
|
+
E < P && (E = P), E + x.width > window.innerWidth - P && (E = window.innerWidth - x.width - P), H < P && (H = P), H + x.height > window.innerHeight - P && (H = window.innerHeight - x.height - P), p({
|
|
10820
10820
|
top: H,
|
|
10821
10821
|
left: E
|
|
10822
10822
|
});
|
|
@@ -10826,23 +10826,23 @@ var c1 = ({ title: t, position: r = "top", delay: c = 200, children: l, disabled
|
|
|
10826
10826
|
}, c));
|
|
10827
10827
|
}, z = () => {
|
|
10828
10828
|
f.current || (u.current && clearTimeout(u.current), _ > 0 ? g.current = setTimeout(() => i(!1), _) : i(!1));
|
|
10829
|
-
},
|
|
10830
|
-
|
|
10829
|
+
}, V = (M) => {
|
|
10830
|
+
M.pointerType !== "touch" && M.pointerType !== "pen" || o || (f.current = !0, u.current && (clearTimeout(u.current), u.current = null), M.stopPropagation(), i((N) => !N));
|
|
10831
10831
|
};
|
|
10832
10832
|
Y(() => (a && (C(), window.addEventListener("scroll", C, !0), window.addEventListener("resize", C)), () => {
|
|
10833
10833
|
window.removeEventListener("scroll", C, !0), window.removeEventListener("resize", C);
|
|
10834
10834
|
}), [a]), Y(() => {
|
|
10835
10835
|
if (!a) return;
|
|
10836
|
-
const
|
|
10837
|
-
v.current?.contains(
|
|
10836
|
+
const M = (N) => {
|
|
10837
|
+
v.current?.contains(N.target) || w.current?.contains(N.target) || i(!1);
|
|
10838
10838
|
};
|
|
10839
|
-
return document.addEventListener("pointerdown",
|
|
10840
|
-
document.removeEventListener("pointerdown",
|
|
10839
|
+
return document.addEventListener("pointerdown", M), () => {
|
|
10840
|
+
document.removeEventListener("pointerdown", M), f.current = !1;
|
|
10841
10841
|
};
|
|
10842
10842
|
}, [a]), Y(() => () => {
|
|
10843
10843
|
u.current && clearTimeout(u.current), g.current && clearTimeout(g.current);
|
|
10844
10844
|
}, []);
|
|
10845
|
-
const
|
|
10845
|
+
const k = () => {
|
|
10846
10846
|
y && g.current && (clearTimeout(g.current), g.current = null);
|
|
10847
10847
|
}, b = () => {
|
|
10848
10848
|
y && (g.current = setTimeout(() => i(!1), _));
|
|
@@ -10854,9 +10854,9 @@ var c1 = ({ title: t, position: r = "top", delay: c = 200, children: l, disabled
|
|
|
10854
10854
|
onMouseLeave: z,
|
|
10855
10855
|
onFocus: L,
|
|
10856
10856
|
onBlur: z,
|
|
10857
|
-
onPointerDown:
|
|
10857
|
+
onPointerDown: V,
|
|
10858
10858
|
children: l
|
|
10859
|
-
}), a && t &&
|
|
10859
|
+
}), a && t && Y1(/* @__PURE__ */ n("div", {
|
|
10860
10860
|
ref: w,
|
|
10861
10861
|
className: `tooltip tooltip--${r} ${y ? "tooltip--scrollable" : ""} ${d}`,
|
|
10862
10862
|
style: {
|
|
@@ -10865,13 +10865,13 @@ var c1 = ({ title: t, position: r = "top", delay: c = 200, children: l, disabled
|
|
|
10865
10865
|
...s !== void 0 && { maxWidth: typeof s == "number" ? `${s}px` : s },
|
|
10866
10866
|
...m !== void 0 && { maxHeight: typeof m == "number" ? `${m}px` : m }
|
|
10867
10867
|
},
|
|
10868
|
-
onMouseEnter:
|
|
10868
|
+
onMouseEnter: k,
|
|
10869
10869
|
onMouseLeave: b,
|
|
10870
10870
|
children: [t, /* @__PURE__ */ e("div", { className: `tooltip__arrow tooltip__arrow--${r}` })]
|
|
10871
10871
|
}), document.body)] });
|
|
10872
|
-
},
|
|
10873
|
-
const v =
|
|
10874
|
-
|
|
10872
|
+
}, q1 = ({ children: t, className: r, fullHeight: c = !1, isOpen: l, noPadding: o = !1, onClose: d, onOverlayClick: s, primary: m, secondary: a, size: i = "auto", tertiary: h, title: p, titleIcon: u, usePortal: g = !1 }) => {
|
|
10873
|
+
const v = C3("Modal");
|
|
10874
|
+
g3(l);
|
|
10875
10875
|
const w = F(null), f = F(null);
|
|
10876
10876
|
if (Y(() => {
|
|
10877
10877
|
if (!l) return;
|
|
@@ -10941,8 +10941,8 @@ var c1 = ({ title: t, position: r = "top", delay: c = 200, children: l, disabled
|
|
|
10941
10941
|
]
|
|
10942
10942
|
})
|
|
10943
10943
|
});
|
|
10944
|
-
return g ?
|
|
10945
|
-
}, Pa = ({ isOpen: t = !1, message: r, primary: c, title: l }) => /* @__PURE__ */ e(
|
|
10944
|
+
return g ? Y1(_, document.body) : _;
|
|
10945
|
+
}, Pa = ({ isOpen: t = !1, message: r, primary: c, title: l }) => /* @__PURE__ */ e(q1, {
|
|
10946
10946
|
isOpen: t,
|
|
10947
10947
|
title: l,
|
|
10948
10948
|
onClose: c?.onClick ? () => c.onClick() : void 0,
|
|
@@ -10985,7 +10985,7 @@ var c1 = ({ title: t, position: r = "top", delay: c = 200, children: l, disabled
|
|
|
10985
10985
|
}
|
|
10986
10986
|
y === "minutes" && l && L("seconds");
|
|
10987
10987
|
}
|
|
10988
|
-
},
|
|
10988
|
+
}, V = l1(() => {
|
|
10989
10989
|
if (y === "hours") {
|
|
10990
10990
|
if (c === "12h") return Array.from({ length: 12 }, (O, Z) => {
|
|
10991
10991
|
const W = Z + 1;
|
|
@@ -11035,7 +11035,7 @@ var c1 = ({ title: t, position: r = "top", delay: c = 200, children: l, disabled
|
|
|
11035
11035
|
t.hours,
|
|
11036
11036
|
t.minutes,
|
|
11037
11037
|
t.seconds
|
|
11038
|
-
]),
|
|
11038
|
+
]), k = l1(() => y === "hours" ? {
|
|
11039
11039
|
degrees: t.hours % 12 * 30,
|
|
11040
11040
|
radius: c === "24h" && ac(t.hours) ? C.innerRadius : C.outerRadius
|
|
11041
11041
|
} : {
|
|
@@ -11049,7 +11049,7 @@ var c1 = ({ title: t, position: r = "top", delay: c = 200, children: l, disabled
|
|
|
11049
11049
|
t.hours,
|
|
11050
11050
|
t.minutes,
|
|
11051
11051
|
t.seconds
|
|
11052
|
-
]), b = E0(C.center,
|
|
11052
|
+
]), b = E0(C.center, k.radius, k.degrees), M = (S, $) => {
|
|
11053
11053
|
const e1 = w.current?.getBoundingClientRect();
|
|
11054
11054
|
if (!e1 || e1.width === 0) return;
|
|
11055
11055
|
const O = s / e1.width, Z = (S - e1.left) * O - C.center, W = ($ - e1.top) * O - C.center, q = Math.sqrt(Z * Z + W * W);
|
|
@@ -11077,15 +11077,15 @@ var c1 = ({ title: t, position: r = "top", delay: c = 200, children: l, disabled
|
|
|
11077
11077
|
...t,
|
|
11078
11078
|
seconds: C1
|
|
11079
11079
|
};
|
|
11080
|
-
},
|
|
11081
|
-
const $ =
|
|
11080
|
+
}, N = (S) => {
|
|
11081
|
+
const $ = M(S.clientX, S.clientY);
|
|
11082
11082
|
$ && r($);
|
|
11083
|
-
},
|
|
11084
|
-
m || (f.current = !0, S.currentTarget.setPointerCapture(S.pointerId),
|
|
11083
|
+
}, x = (S) => {
|
|
11084
|
+
m || (f.current = !0, S.currentTarget.setPointerCapture(S.pointerId), N(S));
|
|
11085
11085
|
}, B = (S) => {
|
|
11086
|
-
m || !f.current ||
|
|
11086
|
+
m || !f.current || N(S);
|
|
11087
11087
|
}, H = (S) => {
|
|
11088
|
-
m || !f.current || (f.current = !1, S.currentTarget.releasePointerCapture(S.pointerId),
|
|
11088
|
+
m || !f.current || (f.current = !1, S.currentTarget.releasePointerCapture(S.pointerId), N(S), z());
|
|
11089
11089
|
}, E = (S) => {
|
|
11090
11090
|
if (y === "hours") {
|
|
11091
11091
|
if (c === "12h") {
|
|
@@ -11190,7 +11190,7 @@ var c1 = ({ title: t, position: r = "top", delay: c = 200, children: l, disabled
|
|
|
11190
11190
|
height: s,
|
|
11191
11191
|
viewBox: `0 0 ${s} ${s}`,
|
|
11192
11192
|
tabIndex: m ? -1 : 0,
|
|
11193
|
-
onPointerDown:
|
|
11193
|
+
onPointerDown: x,
|
|
11194
11194
|
onPointerMove: B,
|
|
11195
11195
|
onPointerUp: H,
|
|
11196
11196
|
onKeyDown: P,
|
|
@@ -11230,7 +11230,7 @@ var c1 = ({ title: t, position: r = "top", delay: c = 200, children: l, disabled
|
|
|
11230
11230
|
cy: C.center,
|
|
11231
11231
|
r: s * 0.017
|
|
11232
11232
|
}),
|
|
11233
|
-
|
|
11233
|
+
V.map((S) => {
|
|
11234
11234
|
const $ = E0(C.center, S.inner ? C.innerRadius : C.outerRadius, S.degrees);
|
|
11235
11235
|
return /* @__PURE__ */ e("text", {
|
|
11236
11236
|
className: `analog-clock__number${S.inner ? " analog-clock__number--inner" : ""}${S.selected ? " analog-clock__number--selected" : ""}`,
|
|
@@ -11244,47 +11244,47 @@ var c1 = ({ title: t, position: r = "top", delay: c = 200, children: l, disabled
|
|
|
11244
11244
|
]
|
|
11245
11245
|
})]
|
|
11246
11246
|
});
|
|
11247
|
-
}, m0 = 42, G1 = 50,
|
|
11248
|
-
x: G1 + r * Math.sin(
|
|
11249
|
-
y: G1 - r * Math.cos(
|
|
11247
|
+
}, m0 = 42, G1 = 50, E2 = 2 * Math.PI * m0, e2 = 360, T2 = (t) => t * Math.PI / 180, t2 = (t, r) => ({
|
|
11248
|
+
x: G1 + r * Math.sin(T2(t)),
|
|
11249
|
+
y: G1 - r * Math.cos(T2(t))
|
|
11250
11250
|
}), Ia = ({ disabled: t = !1, label: r, max: c = e2, min: l = 0, onChange: o, size: d = 120, step: s = 1, tickStep: m = 45, keyboardStep: a, showValue: i = !0, value: h, variant: p = "accent" }) => {
|
|
11251
|
-
const u = F(null), g = F(!1), v = Math.max(1, c - l), w = D((
|
|
11252
|
-
const
|
|
11253
|
-
return Math.min(c, Math.max(l,
|
|
11251
|
+
const u = F(null), g = F(!1), v = Math.max(1, c - l), w = D((M) => {
|
|
11252
|
+
const N = s > 0 ? Math.round(M / s) * s : M;
|
|
11253
|
+
return Math.min(c, Math.max(l, N));
|
|
11254
11254
|
}, [
|
|
11255
11255
|
c,
|
|
11256
11256
|
l,
|
|
11257
11257
|
s
|
|
11258
|
-
]), f = D((
|
|
11259
|
-
const
|
|
11260
|
-
if (!
|
|
11261
|
-
const B =
|
|
11258
|
+
]), f = D((M, N) => {
|
|
11259
|
+
const x = u.current;
|
|
11260
|
+
if (!x) return null;
|
|
11261
|
+
const B = x.getBoundingClientRect(), H = M - (B.left + B.width / 2), E = N - (B.top + B.height / 2);
|
|
11262
11262
|
return H === 0 && E === 0 ? null : (Math.atan2(H, -E) * 180 / Math.PI + e2) % e2;
|
|
11263
|
-
}, []), y = D((
|
|
11264
|
-
const
|
|
11265
|
-
|
|
11263
|
+
}, []), y = D((M, N) => {
|
|
11264
|
+
const x = f(M, N);
|
|
11265
|
+
x !== null && o(w(x));
|
|
11266
11266
|
}, [
|
|
11267
11267
|
f,
|
|
11268
11268
|
w,
|
|
11269
11269
|
o
|
|
11270
|
-
]), _ = D((
|
|
11271
|
-
t || (
|
|
11272
|
-
}, [t, y]), C = D((
|
|
11273
|
-
!g.current || t || y(
|
|
11274
|
-
}, [t, y]), L = D((
|
|
11275
|
-
g.current && (
|
|
11276
|
-
}, []), z = D((
|
|
11270
|
+
]), _ = D((M) => {
|
|
11271
|
+
t || (M.preventDefault(), M.currentTarget.setPointerCapture(M.pointerId), g.current = !0, y(M.clientX, M.clientY));
|
|
11272
|
+
}, [t, y]), C = D((M) => {
|
|
11273
|
+
!g.current || t || y(M.clientX, M.clientY);
|
|
11274
|
+
}, [t, y]), L = D((M) => {
|
|
11275
|
+
g.current && (M.currentTarget.releasePointerCapture(M.pointerId), g.current = !1);
|
|
11276
|
+
}, []), z = D((M) => {
|
|
11277
11277
|
if (t) return;
|
|
11278
|
-
const
|
|
11279
|
-
if (
|
|
11280
|
-
|
|
11278
|
+
const N = a ?? (s > 0 ? s : 1), x = M.key === "PageUp" ? N * 10 : M.key === "PageDown" ? -N * 10 : 0, B = M.key === "ArrowRight" || M.key === "ArrowUp" ? N : M.key === "ArrowLeft" || M.key === "ArrowDown" ? -N : 0;
|
|
11279
|
+
if (M.key === "Home") {
|
|
11280
|
+
M.preventDefault(), o(l);
|
|
11281
11281
|
return;
|
|
11282
11282
|
}
|
|
11283
|
-
if (
|
|
11284
|
-
|
|
11283
|
+
if (M.key === "End") {
|
|
11284
|
+
M.preventDefault(), o(c);
|
|
11285
11285
|
return;
|
|
11286
11286
|
}
|
|
11287
|
-
|
|
11287
|
+
x === 0 && B === 0 || (M.preventDefault(), o(w(h + x + B)));
|
|
11288
11288
|
}, [
|
|
11289
11289
|
w,
|
|
11290
11290
|
t,
|
|
@@ -11294,16 +11294,16 @@ var c1 = ({ title: t, position: r = "top", delay: c = 200, children: l, disabled
|
|
|
11294
11294
|
o,
|
|
11295
11295
|
s,
|
|
11296
11296
|
h
|
|
11297
|
-
]),
|
|
11297
|
+
]), V = l1(() => {
|
|
11298
11298
|
if (!m || m <= 0) return [];
|
|
11299
|
-
const
|
|
11300
|
-
for (let
|
|
11301
|
-
return
|
|
11299
|
+
const M = [];
|
|
11300
|
+
for (let N = l; N < l + v; N += m) M.push(N);
|
|
11301
|
+
return M;
|
|
11302
11302
|
}, [
|
|
11303
11303
|
l,
|
|
11304
11304
|
v,
|
|
11305
11305
|
m
|
|
11306
|
-
]),
|
|
11306
|
+
]), k = (Math.min(c, Math.max(l, h)) - l) / v, b = t2(h, m0);
|
|
11307
11307
|
return /* @__PURE__ */ n("div", {
|
|
11308
11308
|
className: [
|
|
11309
11309
|
"angle-slider",
|
|
@@ -11328,22 +11328,22 @@ var c1 = ({ title: t, position: r = "top", delay: c = 200, children: l, disabled
|
|
|
11328
11328
|
cy: G1,
|
|
11329
11329
|
r: m0
|
|
11330
11330
|
}),
|
|
11331
|
-
|
|
11332
|
-
const
|
|
11331
|
+
V.map((M) => {
|
|
11332
|
+
const N = t2(M, m0), x = t2(M, m0 - 6);
|
|
11333
11333
|
return /* @__PURE__ */ e("line", {
|
|
11334
11334
|
className: "angle-slider__tick",
|
|
11335
|
-
x1:
|
|
11336
|
-
x2:
|
|
11337
|
-
y1:
|
|
11338
|
-
y2:
|
|
11339
|
-
},
|
|
11335
|
+
x1: x.x,
|
|
11336
|
+
x2: N.x,
|
|
11337
|
+
y1: x.y,
|
|
11338
|
+
y2: N.y
|
|
11339
|
+
}, M);
|
|
11340
11340
|
}),
|
|
11341
11341
|
/* @__PURE__ */ e("circle", {
|
|
11342
11342
|
className: "angle-slider__progress",
|
|
11343
11343
|
cx: G1,
|
|
11344
11344
|
cy: G1,
|
|
11345
11345
|
r: m0,
|
|
11346
|
-
strokeDasharray: `${
|
|
11346
|
+
strokeDasharray: `${E2 * k} ${E2}`,
|
|
11347
11347
|
transform: `rotate(-90 ${G1} ${G1})`
|
|
11348
11348
|
}),
|
|
11349
11349
|
/* @__PURE__ */ e("line", {
|
|
@@ -11402,7 +11402,7 @@ var c1 = ({ title: t, position: r = "top", delay: c = 200, children: l, disabled
|
|
|
11402
11402
|
className: m,
|
|
11403
11403
|
style: a
|
|
11404
11404
|
});
|
|
11405
|
-
},
|
|
11405
|
+
}, y3 = ({ emoji: t, icon: r, svg: c, appName: l, heading: o, onClick: d, className: s = "", showSeparator: m = !0 }) => /* @__PURE__ */ n(h1, { children: [/* @__PURE__ */ n("div", {
|
|
11406
11406
|
className: [
|
|
11407
11407
|
"app-header",
|
|
11408
11408
|
d ? "app-header--clickable" : "",
|
|
@@ -11436,7 +11436,7 @@ var c1 = ({ title: t, position: r = "top", delay: c = 200, children: l, disabled
|
|
|
11436
11436
|
}), m && /* @__PURE__ */ e(u0, {
|
|
11437
11437
|
className: "app-header__separator",
|
|
11438
11438
|
spacing: 0
|
|
11439
|
-
})] }),
|
|
11439
|
+
})] }), b3 = [
|
|
11440
11440
|
{
|
|
11441
11441
|
background: "#f6a821",
|
|
11442
11442
|
color: "#1a1a1a"
|
|
@@ -11485,10 +11485,10 @@ function oc(t) {
|
|
|
11485
11485
|
function sc(t) {
|
|
11486
11486
|
let r = 0;
|
|
11487
11487
|
for (const c of t) r += c.charCodeAt(0);
|
|
11488
|
-
return r %
|
|
11488
|
+
return r % b3.length;
|
|
11489
11489
|
}
|
|
11490
11490
|
var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = "" }) => {
|
|
11491
|
-
const o = oc(t), { background: d, color: s } =
|
|
11491
|
+
const o = oc(t), { background: d, color: s } = b3[sc(o)];
|
|
11492
11492
|
return /* @__PURE__ */ e("div", {
|
|
11493
11493
|
className: `avatar-initials avatar-initials--${r} avatar-initials--${c} ${l}`,
|
|
11494
11494
|
style: {
|
|
@@ -11994,7 +11994,7 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
11994
11994
|
"Oct",
|
|
11995
11995
|
"Nov",
|
|
11996
11996
|
"Dec"
|
|
11997
|
-
],
|
|
11997
|
+
], O1 = (t, r) => {
|
|
11998
11998
|
const c = t.getFullYear(), l = t.getMonth(), o = String(l + 1).padStart(2, "0"), d = fc[l], s = String(t.getDate()).padStart(2, "0"), m = String(t.getHours()).padStart(2, "0"), a = String(t.getMinutes()).padStart(2, "0"), i = String(t.getSeconds()).padStart(2, "0");
|
|
11999
11999
|
return r.replace("YYYY", String(c)).replace("MMM", d).replace("MM", o).replace("DD", s).replace("HH", m).replace("mm", a).replace("ss", i);
|
|
12000
12000
|
}, Xa = (t) => {
|
|
@@ -12005,17 +12005,17 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
12005
12005
|
return (/* @__PURE__ */ new Date(t.getTime() - t.getTimezoneOffset() * 6e4)).toISOString().slice(0, 10);
|
|
12006
12006
|
}, Cc = "DD MMM YYYY", yc = "DD MMM YYYY HH:mm", Qa = (t) => {
|
|
12007
12007
|
const [r, c, l] = t.split("-").map(Number);
|
|
12008
|
-
return
|
|
12008
|
+
return O1(new Date(r, c - 1, l), Cc);
|
|
12009
12009
|
}, Ja = (t) => {
|
|
12010
12010
|
const r = new Date(t.replace(" ", "T"));
|
|
12011
|
-
return isNaN(r.getTime()) ? t :
|
|
12011
|
+
return isNaN(r.getTime()) ? t : O1(r, yc);
|
|
12012
12012
|
}, ei = (t) => {
|
|
12013
12013
|
const r = Math.floor(t / 365), c = Math.round((t - r * 365) / 30);
|
|
12014
12014
|
return r > 0 && c > 0 ? `${r}y ${c}m` : r > 0 ? `${r}y` : `${c}m`;
|
|
12015
12015
|
}, Z1 = (t, r) => t.getFullYear() === r.getFullYear() && t.getMonth() === r.getMonth() && t.getDate() === r.getDate(), ti = (t, r, c) => {
|
|
12016
12016
|
const l = t.getTime();
|
|
12017
12017
|
return l >= r.getTime() && l <= c.getTime();
|
|
12018
|
-
}, ri = (t, r) => new Date(t, r + 1, 0).getDate(),
|
|
12018
|
+
}, ri = (t, r) => new Date(t, r + 1, 0).getDate(), _3 = (t, r, c = 0) => {
|
|
12019
12019
|
const l = new Date(t, r, 1), o = new Date(t, r + 1, 0).getDate();
|
|
12020
12020
|
let d = l.getDay();
|
|
12021
12021
|
c === 1 && (d = d === 0 ? 6 : d - 1);
|
|
@@ -12102,7 +12102,7 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
12102
12102
|
}), [y, _] = R("days"), [C, L] = R(() => {
|
|
12103
12103
|
const I = (h ?? w).getFullYear();
|
|
12104
12104
|
return Math.floor(I / Q1) * Q1;
|
|
12105
|
-
}), [z,
|
|
12105
|
+
}), [z, V] = R(null), k = h ?? w, b = g ?? z, M = l1(() => _3(k.getFullYear(), k.getMonth(), s), [k, s]), N = s === 1 ? kc : Mc, x = (I) => l && r2(I, l) || o && _c(I, o) ? !0 : d ? typeof d == "function" ? d(I) : d.some((K) => Z1(K, I)) : !1, B = (I) => {
|
|
12106
12106
|
if (!t) return !1;
|
|
12107
12107
|
if (c === "single" && t instanceof Date) return Z1(I, t);
|
|
12108
12108
|
if (c === "range") {
|
|
@@ -12116,16 +12116,16 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
12116
12116
|
return v1 > K.getTime() && v1 < d1.getTime();
|
|
12117
12117
|
}
|
|
12118
12118
|
return !1;
|
|
12119
|
-
}, E = (I) => c === "range" && b ? I.getTime() > b.getTime() : !1, P = (I) => I.getMonth() ===
|
|
12120
|
-
if (!
|
|
12119
|
+
}, E = (I) => c === "range" && b ? I.getTime() > b.getTime() : !1, P = (I) => I.getMonth() === k.getMonth(), J = (I) => {
|
|
12120
|
+
if (!x(I)) {
|
|
12121
12121
|
if (c === "single") r?.(I);
|
|
12122
|
-
else if (c === "range") if (!b) v ? v(I) : (
|
|
12122
|
+
else if (c === "range") if (!b) v ? v(I) : (V(I), r?.(void 0));
|
|
12123
12123
|
else {
|
|
12124
12124
|
const K = r2(I, b) ? I : b, d1 = r2(I, b) ? b : I;
|
|
12125
12125
|
r?.({
|
|
12126
12126
|
start: K,
|
|
12127
12127
|
end: d1
|
|
12128
|
-
}), v ? v(null) :
|
|
12128
|
+
}), v ? v(null) : V(null);
|
|
12129
12129
|
}
|
|
12130
12130
|
else if (c === "multiple") {
|
|
12131
12131
|
const K = Array.isArray(t) ? t : [], d1 = K.findIndex((v1) => Z1(v1, I));
|
|
@@ -12136,10 +12136,10 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
12136
12136
|
}
|
|
12137
12137
|
}
|
|
12138
12138
|
}, A = () => {
|
|
12139
|
-
const I = C0(
|
|
12139
|
+
const I = C0(k, -1);
|
|
12140
12140
|
p ? p(I) : f(I);
|
|
12141
12141
|
}, T = () => {
|
|
12142
|
-
const I = C0(
|
|
12142
|
+
const I = C0(k, 1);
|
|
12143
12143
|
p ? p(I) : f(I);
|
|
12144
12144
|
}, S = () => {
|
|
12145
12145
|
const I = /* @__PURE__ */ new Date(), K = new Date(I.getFullYear(), I.getMonth(), 1);
|
|
@@ -12147,22 +12147,22 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
12147
12147
|
}, $ = () => {
|
|
12148
12148
|
u && _("months");
|
|
12149
12149
|
}, e1 = () => {
|
|
12150
|
-
u && (L(Math.floor(
|
|
12150
|
+
u && (L(Math.floor(k.getFullYear() / Q1) * Q1), _("years"));
|
|
12151
12151
|
}, O = (I) => {
|
|
12152
|
-
const K = new Date(
|
|
12152
|
+
const K = new Date(k.getFullYear(), I, 1);
|
|
12153
12153
|
p ? p(K) : f(K), _("days");
|
|
12154
12154
|
}, Z = (I) => {
|
|
12155
|
-
const K = new Date(I,
|
|
12155
|
+
const K = new Date(I, k.getMonth(), 1);
|
|
12156
12156
|
p ? p(K) : f(K), _("months");
|
|
12157
12157
|
}, W = () => {
|
|
12158
12158
|
L(C - Q1);
|
|
12159
12159
|
}, q = () => {
|
|
12160
12160
|
L(C + Q1);
|
|
12161
12161
|
}, m1 = () => {
|
|
12162
|
-
const I = new Date(
|
|
12162
|
+
const I = new Date(k.getFullYear() - 1, k.getMonth(), 1);
|
|
12163
12163
|
p ? p(I) : f(I);
|
|
12164
12164
|
}, t1 = () => {
|
|
12165
|
-
const I = new Date(
|
|
12165
|
+
const I = new Date(k.getFullYear() + 1, k.getMonth(), 1);
|
|
12166
12166
|
p ? p(I) : f(I);
|
|
12167
12167
|
}, C1 = () => {
|
|
12168
12168
|
const I = [];
|
|
@@ -12170,7 +12170,7 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
12170
12170
|
return I;
|
|
12171
12171
|
}, f1 = (I) => {
|
|
12172
12172
|
const K = ["calendar__day"];
|
|
12173
|
-
return P(I) ? (B(I) && K.push("calendar__day--selected"), H(I) && K.push("calendar__day--in-range"), E(I) && K.push("calendar__day--hover-range")) : K.push("calendar__day--other-month"), Z0(I) && K.push("calendar__day--today"), M2(I) && K.push("calendar__day--weekend"),
|
|
12173
|
+
return P(I) ? (B(I) && K.push("calendar__day--selected"), H(I) && K.push("calendar__day--in-range"), E(I) && K.push("calendar__day--hover-range")) : K.push("calendar__day--other-month"), Z0(I) && K.push("calendar__day--today"), M2(I) && K.push("calendar__day--weekend"), x(I) && K.push("calendar__day--disabled"), K.join(" ");
|
|
12174
12174
|
}, A1 = () => y === "years" ? /* @__PURE__ */ n("div", {
|
|
12175
12175
|
className: "calendar__header",
|
|
12176
12176
|
children: [
|
|
@@ -12217,7 +12217,7 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
12217
12217
|
type: "button",
|
|
12218
12218
|
className: "calendar__header-button",
|
|
12219
12219
|
onClick: e1,
|
|
12220
|
-
children:
|
|
12220
|
+
children: k.getFullYear()
|
|
12221
12221
|
}),
|
|
12222
12222
|
/* @__PURE__ */ e(c1, {
|
|
12223
12223
|
title: "Next year",
|
|
@@ -12245,17 +12245,17 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
12245
12245
|
className: "calendar__month-year",
|
|
12246
12246
|
children: a ? /* @__PURE__ */ e("span", {
|
|
12247
12247
|
className: "calendar__header-label",
|
|
12248
|
-
children: c2[
|
|
12248
|
+
children: c2[k.getMonth()]
|
|
12249
12249
|
}) : /* @__PURE__ */ n(h1, { children: [/* @__PURE__ */ e("button", {
|
|
12250
12250
|
type: "button",
|
|
12251
12251
|
className: "calendar__header-button",
|
|
12252
12252
|
onClick: $,
|
|
12253
|
-
children: c2[
|
|
12253
|
+
children: c2[k.getMonth()]
|
|
12254
12254
|
}), /* @__PURE__ */ e("button", {
|
|
12255
12255
|
type: "button",
|
|
12256
12256
|
className: "calendar__header-button",
|
|
12257
12257
|
onClick: e1,
|
|
12258
|
-
children:
|
|
12258
|
+
children: k.getFullYear()
|
|
12259
12259
|
})] })
|
|
12260
12260
|
}),
|
|
12261
12261
|
/* @__PURE__ */ e(c1, {
|
|
@@ -12269,7 +12269,7 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
12269
12269
|
})
|
|
12270
12270
|
]
|
|
12271
12271
|
}), a1 = () => {
|
|
12272
|
-
const I = C1(), K = (/* @__PURE__ */ new Date()).getFullYear(), d1 =
|
|
12272
|
+
const I = C1(), K = (/* @__PURE__ */ new Date()).getFullYear(), d1 = k.getFullYear();
|
|
12273
12273
|
return /* @__PURE__ */ e("div", {
|
|
12274
12274
|
className: "calendar__years-grid",
|
|
12275
12275
|
children: I.map((v1) => /* @__PURE__ */ e("button", {
|
|
@@ -12280,12 +12280,12 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
12280
12280
|
}, v1))
|
|
12281
12281
|
});
|
|
12282
12282
|
}, u1 = () => {
|
|
12283
|
-
const I = (/* @__PURE__ */ new Date()).getMonth(), K = (/* @__PURE__ */ new Date()).getFullYear(), d1 =
|
|
12283
|
+
const I = (/* @__PURE__ */ new Date()).getMonth(), K = (/* @__PURE__ */ new Date()).getFullYear(), d1 = k.getMonth(), v1 = k.getFullYear();
|
|
12284
12284
|
return /* @__PURE__ */ e("div", {
|
|
12285
12285
|
className: "calendar__months-grid",
|
|
12286
12286
|
children: c2.map((k1, M1) => /* @__PURE__ */ e("button", {
|
|
12287
12287
|
type: "button",
|
|
12288
|
-
className: `calendar__month-item ${M1 === d1 && v1 ===
|
|
12288
|
+
className: `calendar__month-item ${M1 === d1 && v1 === k.getFullYear() ? "calendar__month-item--selected" : ""} ${M1 === I && K === k.getFullYear() ? "calendar__month-item--current" : ""}`,
|
|
12289
12289
|
onClick: () => O(M1),
|
|
12290
12290
|
children: k1.substring(0, 3)
|
|
12291
12291
|
}, k1))
|
|
@@ -12309,20 +12309,20 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
12309
12309
|
}),
|
|
12310
12310
|
/* @__PURE__ */ e("div", {
|
|
12311
12311
|
className: "calendar__weekdays",
|
|
12312
|
-
children:
|
|
12312
|
+
children: N.map((I) => /* @__PURE__ */ e("div", {
|
|
12313
12313
|
className: "calendar__weekday",
|
|
12314
12314
|
children: I
|
|
12315
12315
|
}, I))
|
|
12316
12316
|
}),
|
|
12317
12317
|
/* @__PURE__ */ e("div", {
|
|
12318
12318
|
className: "calendar__days",
|
|
12319
|
-
children:
|
|
12319
|
+
children: M.map((I, K) => /* @__PURE__ */ e("div", {
|
|
12320
12320
|
className: "calendar__week",
|
|
12321
12321
|
children: I.map((d1, v1) => /* @__PURE__ */ e("button", {
|
|
12322
12322
|
type: "button",
|
|
12323
12323
|
className: f1(d1),
|
|
12324
12324
|
onClick: () => J(d1),
|
|
12325
|
-
disabled:
|
|
12325
|
+
disabled: x(d1),
|
|
12326
12326
|
title: d1.toDateString(),
|
|
12327
12327
|
children: d1.getDate()
|
|
12328
12328
|
}, v1))
|
|
@@ -12382,7 +12382,7 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
12382
12382
|
children: u ?? ""
|
|
12383
12383
|
}, g))]
|
|
12384
12384
|
}),
|
|
12385
|
-
xc.map((u, g) => /* @__PURE__ */ e(
|
|
12385
|
+
xc.map((u, g) => /* @__PURE__ */ e(h3, { children: /* @__PURE__ */ n("div", {
|
|
12386
12386
|
className: "calendar-heatmap__row",
|
|
12387
12387
|
children: [/* @__PURE__ */ e("div", {
|
|
12388
12388
|
className: "calendar-heatmap__day-label",
|
|
@@ -12414,8 +12414,8 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
12414
12414
|
})
|
|
12415
12415
|
]
|
|
12416
12416
|
});
|
|
12417
|
-
},
|
|
12418
|
-
const [u, g] = R(o || !1), v =
|
|
12417
|
+
}, M3 = ({ children: t, className: r, footerContent: c, icon: l, isCollapsed: o, isCollapsible: d, isFooterCollapsible: s = !0, isHighlighted: m, noPadding: a, onClick: i, title: h, variant: p = "default" }) => {
|
|
12418
|
+
const [u, g] = R(o || !1), v = C3("Card");
|
|
12419
12419
|
Y(() => {
|
|
12420
12420
|
typeof o == "boolean" && g(o);
|
|
12421
12421
|
}, [o]);
|
|
@@ -12501,15 +12501,15 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
12501
12501
|
]
|
|
12502
12502
|
}), ni = ({ children: t, className: r = "", defaultCollapsed: c = !1, icon: l, isCollapsed: o, onToggle: d, rightDetails: s, title: m, toggleAccent: a, toggleHighlight: i, toggleMiddleIcon: h, toggleSize: p, toggleSpaceBetween: u, toggleSwap: g, toggleTint: v = "plain", toggleVariant: w, withCard: f = !1 }) => {
|
|
12503
12503
|
const [y, _] = R(c), C = o !== void 0, L = C ? o : y, z = () => {
|
|
12504
|
-
const
|
|
12505
|
-
C || _(
|
|
12506
|
-
},
|
|
12504
|
+
const k = !L;
|
|
12505
|
+
C || _(k), d?.(k);
|
|
12506
|
+
}, V = !!s;
|
|
12507
12507
|
return /* @__PURE__ */ n("div", {
|
|
12508
12508
|
className: `collapsible-section ${f ? "collapsible-section--with-card" : ""} ${r} ${L ? "collapsible-section__collapsed" : ""}`,
|
|
12509
12509
|
children: [m && /* @__PURE__ */ e("div", {
|
|
12510
|
-
className: `collapsible-section__header ${
|
|
12511
|
-
onClick:
|
|
12512
|
-
children:
|
|
12510
|
+
className: `collapsible-section__header ${V ? "" : "collapsible-section__header--inline"} ${u ? "collapsible-section__header--space-between" : ""} ${g ? "collapsible-section__header--swap" : ""} ${i ? "collapsible-section__header--highlight" : ""} ${a ? "collapsible-section__header--accent" : ""} ${p ? `collapsible-section__header--size-${p}` : ""} ${w ? `collapsible-section__header--variant-${w}` : ""} ${v !== "plain" ? `collapsible-section__header--tint-${v}` : ""}`,
|
|
12511
|
+
onClick: V ? z : void 0,
|
|
12512
|
+
children: V ? /* @__PURE__ */ n(h1, { children: [
|
|
12513
12513
|
/* @__PURE__ */ n("div", {
|
|
12514
12514
|
className: "collapsible-section__label",
|
|
12515
12515
|
children: [
|
|
@@ -12561,8 +12561,8 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
12561
12561
|
}, D1 = z1(({ autoComplete: t = "on", autoFocus: r, disabled: c, error: l, hideNativeControls: o, highlighted: d, id: s, label: m, onChange: a, onClick: i, onKeyDown: h, required: p, success: u, value: g, min: v, max: w, placeholder: f, step: y }, _) => {
|
|
12562
12562
|
const C = (z) => {
|
|
12563
12563
|
if (z === void 0) return;
|
|
12564
|
-
let
|
|
12565
|
-
return v !== void 0 &&
|
|
12564
|
+
let V = z;
|
|
12565
|
+
return v !== void 0 && V < v && (V = v), w !== void 0 && V > w && (V = w), V;
|
|
12566
12566
|
};
|
|
12567
12567
|
return /* @__PURE__ */ n("div", {
|
|
12568
12568
|
className: `input-number-wrapper${d ? " input-number-highlighted" : ""}`,
|
|
@@ -12658,11 +12658,11 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
12658
12658
|
g: l >> 8 & 255,
|
|
12659
12659
|
b: l & 255
|
|
12660
12660
|
};
|
|
12661
|
-
},
|
|
12661
|
+
}, P2 = ({ r: t, g: r, b: c }) => `#${[
|
|
12662
12662
|
t,
|
|
12663
12663
|
r,
|
|
12664
12664
|
c
|
|
12665
|
-
].map((l) => p0(Math.round(l), 0, 255).toString(16).padStart(2, "0")).join("")}`,
|
|
12665
|
+
].map((l) => p0(Math.round(l), 0, 255).toString(16).padStart(2, "0")).join("")}`, U1 = ({ r: t, g: r, b: c }) => {
|
|
12666
12666
|
const l = t / 255, o = r / 255, d = c / 255, s = Math.max(l, o, d), m = s - Math.min(l, o, d);
|
|
12667
12667
|
let a = 0;
|
|
12668
12668
|
m !== 0 && (s === l ? a = (o - d) / m % 6 : s === o ? a = (d - l) / m + 2 : a = (l - o) / m + 4, a = Math.round(a * 60), a < 0 && (a += 360));
|
|
@@ -12672,7 +12672,7 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
12672
12672
|
s: Math.round(i * 100),
|
|
12673
12673
|
v: Math.round(h * 100)
|
|
12674
12674
|
};
|
|
12675
|
-
},
|
|
12675
|
+
}, I2 = ({ h: t, s: r, v: c }) => {
|
|
12676
12676
|
const l = r / 100, o = c / 100, d = o * l, s = d * (1 - Math.abs(t / 60 % 2 - 1)), m = o - d;
|
|
12677
12677
|
let a = 0, i = 0, h = 0;
|
|
12678
12678
|
return t < 60 ? (a = d, i = s) : t < 120 ? (a = s, i = d) : t < 180 ? (i = d, h = s) : t < 240 ? (i = s, h = d) : t < 300 ? (a = s, h = d) : (a = d, h = s), {
|
|
@@ -12705,11 +12705,11 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
12705
12705
|
g: 121,
|
|
12706
12706
|
b: 167
|
|
12707
12707
|
};
|
|
12708
|
-
return
|
|
12708
|
+
return U1(g);
|
|
12709
12709
|
}), s = F(null);
|
|
12710
12710
|
Y(() => {
|
|
12711
12711
|
const g = l2(t);
|
|
12712
|
-
g && d(
|
|
12712
|
+
g && d(U1(g));
|
|
12713
12713
|
}, [t]);
|
|
12714
12714
|
const m = (g) => {
|
|
12715
12715
|
const v = {
|
|
@@ -12718,7 +12718,7 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
12718
12718
|
v: p0(g.v, 0, 100)
|
|
12719
12719
|
};
|
|
12720
12720
|
d(v);
|
|
12721
|
-
const w =
|
|
12721
|
+
const w = P2(I2(v));
|
|
12722
12722
|
r?.(w);
|
|
12723
12723
|
}, a = (g) => {
|
|
12724
12724
|
const v = s.current?.getBoundingClientRect();
|
|
@@ -12735,7 +12735,7 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
12735
12735
|
window.removeEventListener("mousemove", v), window.removeEventListener("mouseup", w);
|
|
12736
12736
|
};
|
|
12737
12737
|
window.addEventListener("mousemove", v), window.addEventListener("mouseup", w);
|
|
12738
|
-
}, h =
|
|
12738
|
+
}, h = I2(o), p = P2(h), u = Nc(h);
|
|
12739
12739
|
return /* @__PURE__ */ n("div", {
|
|
12740
12740
|
className: "color-picker",
|
|
12741
12741
|
children: [
|
|
@@ -12805,7 +12805,7 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
12805
12805
|
value: p,
|
|
12806
12806
|
onChange: (g) => {
|
|
12807
12807
|
const v = l2(g);
|
|
12808
|
-
v && m(
|
|
12808
|
+
v && m(U1(v));
|
|
12809
12809
|
}
|
|
12810
12810
|
})
|
|
12811
12811
|
}),
|
|
@@ -12817,7 +12817,7 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
12817
12817
|
min: 0,
|
|
12818
12818
|
max: 255,
|
|
12819
12819
|
value: h.r,
|
|
12820
|
-
onChange: (g) => m(
|
|
12820
|
+
onChange: (g) => m(U1({
|
|
12821
12821
|
...h,
|
|
12822
12822
|
r: g ?? 0
|
|
12823
12823
|
}))
|
|
@@ -12827,7 +12827,7 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
12827
12827
|
min: 0,
|
|
12828
12828
|
max: 255,
|
|
12829
12829
|
value: h.g,
|
|
12830
|
-
onChange: (g) => m(
|
|
12830
|
+
onChange: (g) => m(U1({
|
|
12831
12831
|
...h,
|
|
12832
12832
|
g: g ?? 0
|
|
12833
12833
|
}))
|
|
@@ -12837,7 +12837,7 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
12837
12837
|
min: 0,
|
|
12838
12838
|
max: 255,
|
|
12839
12839
|
value: h.b,
|
|
12840
|
-
onChange: (g) => m(
|
|
12840
|
+
onChange: (g) => m(U1({
|
|
12841
12841
|
...h,
|
|
12842
12842
|
b: g ?? 0
|
|
12843
12843
|
}))
|
|
@@ -12857,7 +12857,7 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
12857
12857
|
...u,
|
|
12858
12858
|
h: g ?? 0
|
|
12859
12859
|
});
|
|
12860
|
-
m(
|
|
12860
|
+
m(U1(v));
|
|
12861
12861
|
}
|
|
12862
12862
|
}),
|
|
12863
12863
|
/* @__PURE__ */ e(D1, {
|
|
@@ -12870,7 +12870,7 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
12870
12870
|
...u,
|
|
12871
12871
|
s: g ?? 0
|
|
12872
12872
|
});
|
|
12873
|
-
m(
|
|
12873
|
+
m(U1(v));
|
|
12874
12874
|
}
|
|
12875
12875
|
}),
|
|
12876
12876
|
/* @__PURE__ */ e(D1, {
|
|
@@ -12883,7 +12883,7 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
12883
12883
|
...u,
|
|
12884
12884
|
l: g ?? 0
|
|
12885
12885
|
});
|
|
12886
|
-
m(
|
|
12886
|
+
m(U1(v));
|
|
12887
12887
|
}
|
|
12888
12888
|
})
|
|
12889
12889
|
]
|
|
@@ -13004,7 +13004,7 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
13004
13004
|
}, k2 = () => {
|
|
13005
13005
|
const t = Math.random();
|
|
13006
13006
|
return t < 0.5 ? "rect" : t < 0.8 ? "circle" : "star";
|
|
13007
|
-
}, U0 = (t) => t[Math.floor(Math.random() * t.length)],
|
|
13007
|
+
}, U0 = (t) => t[Math.floor(Math.random() * t.length)], G2 = (t, r, c) => ({
|
|
13008
13008
|
x: Math.random() * t,
|
|
13009
13009
|
y: -10 - Math.random() * 40,
|
|
13010
13010
|
vx: (Math.random() - 0.5) * 2,
|
|
@@ -13029,7 +13029,7 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
13029
13029
|
opacity: 1,
|
|
13030
13030
|
shape: k2()
|
|
13031
13031
|
};
|
|
13032
|
-
},
|
|
13032
|
+
}, Z2 = (t, r, c) => ({
|
|
13033
13033
|
x: t * 0.2 + Math.random() * t * 0.6,
|
|
13034
13034
|
y: r + 20,
|
|
13035
13035
|
vx: (Math.random() - 0.5) * 1.5,
|
|
@@ -13096,35 +13096,35 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
13096
13096
|
const w = g.width, f = g.height, y = Sc(t), _ = o ?? h[l];
|
|
13097
13097
|
i.current = !0, a.current = performance.now();
|
|
13098
13098
|
let C = [];
|
|
13099
|
-
if (l === "confetti") C = Array.from({ length: _ }, () =>
|
|
13099
|
+
if (l === "confetti") C = Array.from({ length: _ }, () => G2(w, f, y));
|
|
13100
13100
|
else if (l === "burst") {
|
|
13101
|
-
const z = w / 2,
|
|
13102
|
-
C = Array.from({ length: _ }, () => Hc(z,
|
|
13103
|
-
} else l === "fireworks" && (C = Array.from({ length: _ }, () =>
|
|
13101
|
+
const z = w / 2, V = f / 2;
|
|
13102
|
+
C = Array.from({ length: _ }, () => Hc(z, V, y));
|
|
13103
|
+
} else l === "fireworks" && (C = Array.from({ length: _ }, () => Z2(w, f, y)));
|
|
13104
13104
|
const L = (z) => {
|
|
13105
13105
|
if (!i.current) return;
|
|
13106
|
-
const
|
|
13107
|
-
if (v.clearRect(0, 0, w, f), l === "confetti" ? (
|
|
13108
|
-
b.x += b.vx, b.y += b.vy, b.vy += 0.08, b.vx += (Math.random() - 0.5) * 0.1, b.angle += b.spin,
|
|
13106
|
+
const V = z - a.current, k = Math.min(V / r, 1);
|
|
13107
|
+
if (v.clearRect(0, 0, w, f), l === "confetti" ? (k < 0.6 && Math.random() < 0.3 && C.push(G2(w, f, y)), C = C.filter((b) => b.opacity > 0 && b.y < f + 20), C.forEach((b) => {
|
|
13108
|
+
b.x += b.vx, b.y += b.vy, b.vy += 0.08, b.vx += (Math.random() - 0.5) * 0.1, b.angle += b.spin, k > 0.6 && (b.opacity -= 0.015), a2(v, b);
|
|
13109
13109
|
})) : l === "burst" ? (C = C.filter((b) => b.opacity > 0), C.forEach((b) => {
|
|
13110
13110
|
b.x += b.vx, b.y += b.vy, b.vy += 0.15, b.vx *= 0.98, b.angle += b.spin, b.opacity -= 0.012, a2(v, b);
|
|
13111
|
-
})) : l === "fireworks" && (
|
|
13111
|
+
})) : l === "fireworks" && (k < 0.85 && Math.random() < 0.04 && C.push(Z2(w, f, y)), C = C.filter((b) => b.exploded ? b.children?.some((M) => M.opacity > 0) ?? !1 : b.y > -f * 0.1), C.forEach((b) => {
|
|
13112
13112
|
if (b.exploded)
|
|
13113
|
-
b.children?.forEach((
|
|
13114
|
-
|
|
13113
|
+
b.children?.forEach((M) => {
|
|
13114
|
+
M.x += M.vx, M.y += M.vy, M.vy += 0.06, M.vx *= 0.97, M.angle += M.spin, M.opacity -= 0.014, a2(v, M);
|
|
13115
13115
|
});
|
|
13116
13116
|
else if (b.trail?.push({
|
|
13117
13117
|
x: b.x,
|
|
13118
13118
|
y: b.y
|
|
13119
|
-
}), (b.trail?.length ?? 0) > 12 && b.trail?.shift(), b.trail?.forEach((
|
|
13120
|
-
const
|
|
13121
|
-
v.save(), v.globalAlpha =
|
|
13119
|
+
}), (b.trail?.length ?? 0) > 12 && b.trail?.shift(), b.trail?.forEach((M, N) => {
|
|
13120
|
+
const x = (N + 1) / (b.trail?.length ?? 1) * 0.6;
|
|
13121
|
+
v.save(), v.globalAlpha = x, v.fillStyle = b.color, v.beginPath(), v.arc(M.x, M.y, 2, 0, Math.PI * 2), v.fill(), v.restore();
|
|
13122
13122
|
}), v.save(), v.globalAlpha = 1, v.fillStyle = b.color, v.beginPath(), v.arc(b.x, b.y, 3, 0, Math.PI * 2), v.fill(), v.restore(), b.x += b.vx, b.y += b.vy, b.vy += 0.18, b.vy >= 0) {
|
|
13123
13123
|
b.exploded = !0;
|
|
13124
|
-
const
|
|
13125
|
-
b.children = Array.from({ length:
|
|
13124
|
+
const M = 60 + Math.floor(Math.random() * 40);
|
|
13125
|
+
b.children = Array.from({ length: M }, () => Rc(b.x, b.y, y)), v.save(), v.globalAlpha = 0.8, v.fillStyle = "#ffffff", v.beginPath(), v.arc(b.x, b.y, 12, 0, Math.PI * 2), v.fill(), v.restore();
|
|
13126
13126
|
}
|
|
13127
|
-
})),
|
|
13127
|
+
})), k >= 1 || C.length === 0) {
|
|
13128
13128
|
p();
|
|
13129
13129
|
return;
|
|
13130
13130
|
}
|
|
@@ -13138,7 +13138,7 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
13138
13138
|
o,
|
|
13139
13139
|
p
|
|
13140
13140
|
]);
|
|
13141
|
-
return
|
|
13141
|
+
return m3(d, () => ({ trigger: u }), [u]), Y(() => () => {
|
|
13142
13142
|
cancelAnimationFrame(m.current);
|
|
13143
13143
|
}, []), /* @__PURE__ */ e("canvas", {
|
|
13144
13144
|
ref: s,
|
|
@@ -13152,7 +13152,7 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
13152
13152
|
disabled: o?.disabled,
|
|
13153
13153
|
text: o?.text || "Cancel"
|
|
13154
13154
|
};
|
|
13155
|
-
return /* @__PURE__ */ e(
|
|
13155
|
+
return /* @__PURE__ */ e(q1, {
|
|
13156
13156
|
isOpen: t,
|
|
13157
13157
|
title: c,
|
|
13158
13158
|
onClose: o?.onClick ? () => o.onClick() : void 0,
|
|
@@ -13200,7 +13200,7 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
13200
13200
|
isVisible: (m) => t[m]?.visible || !1,
|
|
13201
13201
|
getAnchorEl: (m) => t[m]?.anchorEl || null
|
|
13202
13202
|
};
|
|
13203
|
-
}, R1 = 20,
|
|
13203
|
+
}, R1 = 20, j2 = 16, Ac = 8, x2 = ({ children: t, visible: r, onClose: c, anchorEl: l, offset: o = Ac, placement: d = "auto" }) => {
|
|
13204
13204
|
const s = F(null), m = F(null), [a, i] = R({
|
|
13205
13205
|
top: 0,
|
|
13206
13206
|
left: 0,
|
|
@@ -13211,7 +13211,7 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
13211
13211
|
const p = l.getBoundingClientRect(), u = s.current.getBoundingClientRect(), g = {
|
|
13212
13212
|
width: window.innerWidth,
|
|
13213
13213
|
height: window.innerHeight
|
|
13214
|
-
}, v = (
|
|
13214
|
+
}, v = (k, b) => k >= R1 && b >= R1 && k + u.height <= g.height - R1 && b + u.width <= g.width - R1, w = {
|
|
13215
13215
|
bottom: {
|
|
13216
13216
|
top: p.bottom + o,
|
|
13217
13217
|
left: p.left + (p.width - u.width) / 2
|
|
@@ -13236,29 +13236,29 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
13236
13236
|
"top",
|
|
13237
13237
|
"right",
|
|
13238
13238
|
"left"
|
|
13239
|
-
].find((
|
|
13240
|
-
const b = w[
|
|
13239
|
+
].find((k) => {
|
|
13240
|
+
const b = w[k];
|
|
13241
13241
|
return v(b.top, b.left);
|
|
13242
13242
|
}) || "bottom", { top: y, left: _ } = w[f];
|
|
13243
13243
|
else {
|
|
13244
|
-
const
|
|
13245
|
-
v(
|
|
13244
|
+
const k = w[d];
|
|
13245
|
+
v(k.top, k.left) ? (f = d, { top: y, left: _ } = k) : (f = [
|
|
13246
13246
|
"bottom",
|
|
13247
13247
|
"top",
|
|
13248
13248
|
"right",
|
|
13249
13249
|
"left"
|
|
13250
13250
|
].filter((b) => b !== d).find((b) => {
|
|
13251
|
-
const
|
|
13252
|
-
return v(
|
|
13251
|
+
const M = w[b];
|
|
13252
|
+
return v(M.top, M.left);
|
|
13253
13253
|
}) || d, { top: y, left: _ } = w[f]);
|
|
13254
13254
|
}
|
|
13255
13255
|
(f === "top" || f === "bottom") && (_ < R1 && (_ = R1), _ + u.width > g.width - R1 && (_ = g.width - u.width - R1)), (f === "left" || f === "right") && (y < R1 && (y = R1), y + u.height > g.height - R1 && (y = g.height - u.height - R1));
|
|
13256
|
-
const C = f === "top" || f === "bottom", L = C ? p.left + p.width / 2 - _ : p.top + p.height / 2 - y, z = C ? u.width : u.height,
|
|
13256
|
+
const C = f === "top" || f === "bottom", L = C ? p.left + p.width / 2 - _ : p.top + p.height / 2 - y, z = C ? u.width : u.height, V = Math.min(Math.max(L, j2), z - j2);
|
|
13257
13257
|
i({
|
|
13258
13258
|
top: y,
|
|
13259
13259
|
left: _,
|
|
13260
13260
|
placement: f,
|
|
13261
|
-
arrowOffset:
|
|
13261
|
+
arrowOffset: V
|
|
13262
13262
|
});
|
|
13263
13263
|
}, [
|
|
13264
13264
|
l,
|
|
@@ -13283,7 +13283,7 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
13283
13283
|
c,
|
|
13284
13284
|
l,
|
|
13285
13285
|
h
|
|
13286
|
-
]), !r || !l ? null :
|
|
13286
|
+
]), !r || !l ? null : Y1(/* @__PURE__ */ n("div", {
|
|
13287
13287
|
ref: s,
|
|
13288
13288
|
className: `simple-popover simple-popover--${a.placement}`,
|
|
13289
13289
|
style: {
|
|
@@ -13374,7 +13374,7 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
13374
13374
|
const i = (h) => {
|
|
13375
13375
|
l && r?.();
|
|
13376
13376
|
};
|
|
13377
|
-
return t ?
|
|
13377
|
+
return t ? Y1(/* @__PURE__ */ n(h1, { children: [/* @__PURE__ */ e("div", {
|
|
13378
13378
|
style: {
|
|
13379
13379
|
position: "fixed",
|
|
13380
13380
|
inset: 0,
|
|
@@ -13389,8 +13389,8 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
13389
13389
|
onClick: i,
|
|
13390
13390
|
children: c
|
|
13391
13391
|
})] }), document.body) : null;
|
|
13392
|
-
},
|
|
13393
|
-
const t = B0(
|
|
13392
|
+
}, k3 = R0(null), Ec = () => {
|
|
13393
|
+
const t = B0(k3);
|
|
13394
13394
|
if (!t) throw new Error("useToast must be used within a ToastProvider");
|
|
13395
13395
|
return t;
|
|
13396
13396
|
}, Tc = ({ id: t, message: r, type: c = "info", action: l, onClose: o, showDismissButton: d = !0, timeout: s = 2e3 }) => {
|
|
@@ -13469,7 +13469,7 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
13469
13469
|
o,
|
|
13470
13470
|
l
|
|
13471
13471
|
]);
|
|
13472
|
-
return /* @__PURE__ */ e(
|
|
13472
|
+
return /* @__PURE__ */ e(k3.Provider, {
|
|
13473
13473
|
value: d,
|
|
13474
13474
|
children: t
|
|
13475
13475
|
});
|
|
@@ -13532,7 +13532,7 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
13532
13532
|
isAtLeast: o,
|
|
13533
13533
|
isAtMost: d
|
|
13534
13534
|
};
|
|
13535
|
-
},
|
|
13535
|
+
}, x3 = R0(null), L2 = () => B0(x3), pi = () => {
|
|
13536
13536
|
const t = L2();
|
|
13537
13537
|
if (!t) throw new Error("useControlPanel must be used within a ControlPanelProvider");
|
|
13538
13538
|
return t;
|
|
@@ -13550,7 +13550,7 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
13550
13550
|
d,
|
|
13551
13551
|
s
|
|
13552
13552
|
]);
|
|
13553
|
-
return /* @__PURE__ */ e(
|
|
13553
|
+
return /* @__PURE__ */ e(x3.Provider, {
|
|
13554
13554
|
value: m,
|
|
13555
13555
|
children: t
|
|
13556
13556
|
});
|
|
@@ -13606,13 +13606,13 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
13606
13606
|
})]
|
|
13607
13607
|
})]
|
|
13608
13608
|
});
|
|
13609
|
-
},
|
|
13609
|
+
}, L3 = ({ className: t = "", clockSize: r = 208, collapsibleClock: c = !0, disabled: l = !1, format: o = "24h", label: d = "Time", minuteStep: s = 1, onChange: m, value: a, withClock: i = !1, withSeconds: h = !1 }) => {
|
|
13610
13610
|
const [p, u] = R("hours"), [g, v] = R(!0), w = a.hours >= 12, f = i && (!c || g), y = i && c, _ = !!d || y, C = (z) => {
|
|
13611
13611
|
if (o === "12h") {
|
|
13612
|
-
const
|
|
13612
|
+
const V = z % 12;
|
|
13613
13613
|
m({
|
|
13614
13614
|
...a,
|
|
13615
|
-
hours: w ?
|
|
13615
|
+
hours: w ? V + 12 : V
|
|
13616
13616
|
});
|
|
13617
13617
|
return;
|
|
13618
13618
|
}
|
|
@@ -13718,10 +13718,10 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
13718
13718
|
hours: 0,
|
|
13719
13719
|
minutes: 0,
|
|
13720
13720
|
seconds: 0
|
|
13721
|
-
}), [L, z] = R(null), [
|
|
13721
|
+
}), [L, z] = R(null), [V, k] = R({
|
|
13722
13722
|
position: "fixed",
|
|
13723
13723
|
visibility: "hidden"
|
|
13724
|
-
}), b = F(null),
|
|
13724
|
+
}), b = F(null), M = F(null);
|
|
13725
13725
|
Y(() => {
|
|
13726
13726
|
l && t instanceof Date && C({
|
|
13727
13727
|
hours: t.getHours(),
|
|
@@ -13729,50 +13729,50 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
13729
13729
|
seconds: t.getSeconds()
|
|
13730
13730
|
});
|
|
13731
13731
|
}, [t, l]);
|
|
13732
|
-
const
|
|
13732
|
+
const N = v ? !p : f;
|
|
13733
13733
|
Y(() => {
|
|
13734
13734
|
if (v) return;
|
|
13735
13735
|
const S = ($) => {
|
|
13736
|
-
|
|
13736
|
+
N && b.current && M.current && !b.current.contains($.target) && !M.current.contains($.target) && (z(null), y(!1));
|
|
13737
13737
|
};
|
|
13738
13738
|
return document.addEventListener("mousedown", S), () => document.removeEventListener("mousedown", S);
|
|
13739
|
-
}, [v,
|
|
13740
|
-
const
|
|
13741
|
-
if (v || !
|
|
13742
|
-
const S = b.current.getBoundingClientRect(), $ =
|
|
13743
|
-
|
|
13739
|
+
}, [v, N]);
|
|
13740
|
+
const x = D(() => {
|
|
13741
|
+
if (v || !N || !b.current || !M.current) return;
|
|
13742
|
+
const S = b.current.getBoundingClientRect(), $ = M.current.getBoundingClientRect(), e1 = 16, O = 8, Z = window.innerHeight - S.bottom - e1, W = S.top - e1, q = Z < $.height && W > $.height ? S.top - $.height - O : S.bottom + O, m1 = Math.max(e1, Math.min(q, window.innerHeight - $.height - e1)), t1 = Math.max(e1, Math.min(S.left, window.innerWidth - $.width - e1));
|
|
13743
|
+
k({
|
|
13744
13744
|
position: "fixed",
|
|
13745
13745
|
top: `${m1}px`,
|
|
13746
13746
|
left: `${t1}px`,
|
|
13747
13747
|
zIndex: 1100
|
|
13748
13748
|
});
|
|
13749
|
-
}, [v,
|
|
13749
|
+
}, [v, N]);
|
|
13750
13750
|
Y(() => {
|
|
13751
|
-
if (v || !
|
|
13752
|
-
|
|
13751
|
+
if (v || !N) {
|
|
13752
|
+
k({
|
|
13753
13753
|
position: "fixed",
|
|
13754
13754
|
visibility: "hidden"
|
|
13755
13755
|
});
|
|
13756
13756
|
return;
|
|
13757
13757
|
}
|
|
13758
|
-
const S = requestAnimationFrame(() => requestAnimationFrame(
|
|
13759
|
-
window.addEventListener("resize",
|
|
13760
|
-
const $ = new ResizeObserver(() =>
|
|
13761
|
-
return
|
|
13762
|
-
cancelAnimationFrame(S), $.disconnect(), window.removeEventListener("resize",
|
|
13758
|
+
const S = requestAnimationFrame(() => requestAnimationFrame(x));
|
|
13759
|
+
window.addEventListener("resize", x), window.addEventListener("scroll", x, !0);
|
|
13760
|
+
const $ = new ResizeObserver(() => x());
|
|
13761
|
+
return M.current && $.observe(M.current), () => {
|
|
13762
|
+
cancelAnimationFrame(S), $.disconnect(), window.removeEventListener("resize", x), window.removeEventListener("scroll", x, !0);
|
|
13763
13763
|
};
|
|
13764
13764
|
}, [
|
|
13765
13765
|
v,
|
|
13766
|
-
|
|
13767
|
-
|
|
13766
|
+
N,
|
|
13767
|
+
x
|
|
13768
13768
|
]);
|
|
13769
13769
|
const B = () => {
|
|
13770
13770
|
if (!t) return "";
|
|
13771
13771
|
if (c === "single" && t instanceof Date) {
|
|
13772
|
-
const S =
|
|
13773
|
-
return l ? `${S} ${d ?
|
|
13772
|
+
const S = O1(t, i);
|
|
13773
|
+
return l ? `${S} ${d ? O1(t, "HH:mm:ss") : O1(t, "HH:mm")}` : S;
|
|
13774
13774
|
}
|
|
13775
|
-
return c === "range" && t && "start" in t ? `${
|
|
13775
|
+
return c === "range" && t && "start" in t ? `${O1(t.start, i)} - ${O1(t.end, i)}` : c === "multiple" && Array.isArray(t) ? t.map((S) => O1(S, i)).join(", ") : "";
|
|
13776
13776
|
}, H = (S) => {
|
|
13777
13777
|
if (!l || !(S instanceof Date)) {
|
|
13778
13778
|
r?.(S), g && c !== "multiple" && !v && y(!1);
|
|
@@ -13797,7 +13797,7 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
13797
13797
|
onRangeStartChange: c === "range" ? z : w.onRangeStartChange
|
|
13798
13798
|
}), l && c === "single" && t instanceof Date && /* @__PURE__ */ e("div", {
|
|
13799
13799
|
className: "datepicker__time",
|
|
13800
|
-
children: /* @__PURE__ */ e(
|
|
13800
|
+
children: /* @__PURE__ */ e(L3, {
|
|
13801
13801
|
clockSize: m,
|
|
13802
13802
|
format: o,
|
|
13803
13803
|
minuteStep: a,
|
|
@@ -13811,9 +13811,9 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
13811
13811
|
className: "datepicker",
|
|
13812
13812
|
children: [/* @__PURE__ */ n("div", {
|
|
13813
13813
|
ref: b,
|
|
13814
|
-
className: `datepicker__input ${p ? "datepicker__input--disabled" : ""} ${
|
|
13814
|
+
className: `datepicker__input ${p ? "datepicker__input--disabled" : ""} ${N ? "datepicker__input--open" : ""}`,
|
|
13815
13815
|
onClick: () => {
|
|
13816
|
-
p || v || (
|
|
13816
|
+
p || v || (N && z(null), y(!N));
|
|
13817
13817
|
},
|
|
13818
13818
|
children: [/* @__PURE__ */ e("span", {
|
|
13819
13819
|
className: `datepicker__value ${A ? "" : "datepicker__value--placeholder"}`,
|
|
@@ -13833,14 +13833,14 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
13833
13833
|
children: /* @__PURE__ */ e(j, { name: "calendar" })
|
|
13834
13834
|
})]
|
|
13835
13835
|
})]
|
|
13836
|
-
}),
|
|
13837
|
-
ref:
|
|
13836
|
+
}), N && (v ? /* @__PURE__ */ e("div", {
|
|
13837
|
+
ref: M,
|
|
13838
13838
|
className: "datepicker__dropdown datepicker__dropdown--inline",
|
|
13839
13839
|
children: T()
|
|
13840
|
-
}) :
|
|
13841
|
-
ref:
|
|
13840
|
+
}) : Y1(/* @__PURE__ */ n("div", {
|
|
13841
|
+
ref: M,
|
|
13842
13842
|
className: "datepicker__dropdown",
|
|
13843
|
-
style:
|
|
13843
|
+
style: V,
|
|
13844
13844
|
children: [/* @__PURE__ */ e("button", {
|
|
13845
13845
|
type: "button",
|
|
13846
13846
|
className: "datepicker__dropdown-close",
|
|
@@ -13850,7 +13850,7 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
13850
13850
|
}), T()]
|
|
13851
13851
|
}), document.body))]
|
|
13852
13852
|
});
|
|
13853
|
-
}, Zc = /[̀-ͯ]/g,
|
|
13853
|
+
}, Zc = /[̀-ͯ]/g, W2 = (t) => t.normalize("NFD").replace(Zc, "").toLowerCase(), vi = (t, r) => {
|
|
13854
13854
|
const c = t.toLowerCase(), l = r.toLowerCase();
|
|
13855
13855
|
if (c.includes(l)) return !0;
|
|
13856
13856
|
const o = 1 - 1 / Math.max(l.length, 4);
|
|
@@ -13860,8 +13860,8 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
13860
13860
|
s < c.length && (d++, s++);
|
|
13861
13861
|
}
|
|
13862
13862
|
return d / l.length >= o;
|
|
13863
|
-
}, $0 = ({ allowCustomValue: t = !1, autofocus: r = !1, className: c = "", disabled: l = !1, error: o, highlighted: d = !1, id: s, label: m, maxVisibleSelectedLabels: a = 1, multilineChips: i = !1, multiple: h = !1, name: p, onChange: u, onSearchChange: g, options: v, placeholder: w = "Select an option", searchable: f = !0, searchValue: y, selectedCountDisplay: _ = "inline", showChips: C = !1, sortSelectedFirst: L = !1, success: z, usePortal:
|
|
13864
|
-
const [
|
|
13863
|
+
}, $0 = ({ allowCustomValue: t = !1, autofocus: r = !1, className: c = "", disabled: l = !1, error: o, highlighted: d = !1, id: s, label: m, maxVisibleSelectedLabels: a = 1, multilineChips: i = !1, multiple: h = !1, name: p, onChange: u, onSearchChange: g, options: v, placeholder: w = "Select an option", searchable: f = !0, searchValue: y, selectedCountDisplay: _ = "inline", showChips: C = !1, sortSelectedFirst: L = !1, success: z, usePortal: V = !0, value: k, valueAsChip: b = !0 }) => {
|
|
13864
|
+
const [M, N] = R(!1), [x, B] = R(y || ""), [H, E] = R(v), [P, J] = R(-1), [A, T] = R([]), [S, $] = R({
|
|
13865
13865
|
top: 0,
|
|
13866
13866
|
bottom: 0,
|
|
13867
13867
|
left: 0,
|
|
@@ -13869,73 +13869,73 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
13869
13869
|
maxHeight: 300
|
|
13870
13870
|
}), [e1, O] = R(!1), Z = F(null), W = F([]), q = F(null), m1 = F(null), t1 = A0(), C1 = s ?? `dropdown-${t1}`, f1 = F(null);
|
|
13871
13871
|
Y(() => {
|
|
13872
|
-
if (
|
|
13872
|
+
if (M && L && h) {
|
|
13873
13873
|
const Q = new Set(A.map((o1) => o1.value)), X = [], r1 = [];
|
|
13874
13874
|
v.forEach((o1) => (Q.has(o1.value) ? X : r1).push(o1)), f1.current = [...X, ...r1];
|
|
13875
|
-
} else
|
|
13875
|
+
} else M || (f1.current = null);
|
|
13876
13876
|
}, [
|
|
13877
|
-
|
|
13877
|
+
M,
|
|
13878
13878
|
L,
|
|
13879
13879
|
h,
|
|
13880
13880
|
v
|
|
13881
13881
|
]), Y(() => {
|
|
13882
13882
|
const Q = f1.current ?? v;
|
|
13883
|
-
if (!f || !
|
|
13883
|
+
if (!f || !x) E(Q);
|
|
13884
13884
|
else {
|
|
13885
|
-
const X =
|
|
13885
|
+
const X = W2(x), r1 = Q.filter((o1) => W2(o1.label).includes(X));
|
|
13886
13886
|
E(r1);
|
|
13887
13887
|
}
|
|
13888
13888
|
J(-1);
|
|
13889
13889
|
}, [
|
|
13890
|
-
|
|
13890
|
+
x,
|
|
13891
13891
|
v,
|
|
13892
13892
|
f,
|
|
13893
|
-
|
|
13893
|
+
M
|
|
13894
13894
|
]);
|
|
13895
|
-
const A1 = F(
|
|
13895
|
+
const A1 = F(k);
|
|
13896
13896
|
Y(() => {
|
|
13897
13897
|
const Q = A1.current;
|
|
13898
|
-
A1.current =
|
|
13899
|
-
const X = !Object.is(Q,
|
|
13900
|
-
if (
|
|
13898
|
+
A1.current = k;
|
|
13899
|
+
const X = !Object.is(Q, k);
|
|
13900
|
+
if (k == null) {
|
|
13901
13901
|
X && (T([]), B(""));
|
|
13902
13902
|
return;
|
|
13903
13903
|
}
|
|
13904
|
-
if (h && Array.isArray(
|
|
13904
|
+
if (h && Array.isArray(k) && k.length === 0) {
|
|
13905
13905
|
X && (T([]), B(""));
|
|
13906
13906
|
return;
|
|
13907
13907
|
}
|
|
13908
|
-
if (!h &&
|
|
13908
|
+
if (!h && k === "") {
|
|
13909
13909
|
X && (T([]), B(""));
|
|
13910
13910
|
return;
|
|
13911
13911
|
}
|
|
13912
13912
|
if (v.length > 0) {
|
|
13913
|
-
if (h && Array.isArray(
|
|
13914
|
-
const r1 = v.filter((o1) => typeof o1.value == "number" ?
|
|
13913
|
+
if (h && Array.isArray(k)) {
|
|
13914
|
+
const r1 = v.filter((o1) => typeof o1.value == "number" ? k.includes(o1.value) : k.includes(o1.value.toString()));
|
|
13915
13915
|
T(r1), X && B("");
|
|
13916
|
-
} else if (!h && (typeof
|
|
13917
|
-
const r1 = v.find((o1) => typeof o1.value == "number" && typeof
|
|
13916
|
+
} else if (!h && (typeof k == "string" || typeof k == "number")) {
|
|
13917
|
+
const r1 = v.find((o1) => typeof o1.value == "number" && typeof k == "number" ? o1.value === k : o1.value.toString() === k.toString());
|
|
13918
13918
|
if (r1)
|
|
13919
13919
|
T([r1]), X && B(r1.label);
|
|
13920
|
-
else if (t && typeof
|
|
13920
|
+
else if (t && typeof k == "string" && k.trim()) {
|
|
13921
13921
|
const o1 = {
|
|
13922
|
-
label:
|
|
13923
|
-
value:
|
|
13922
|
+
label: k.trim(),
|
|
13923
|
+
value: k.trim(),
|
|
13924
13924
|
className: "custom-option"
|
|
13925
13925
|
};
|
|
13926
|
-
T([o1]), X && B(
|
|
13926
|
+
T([o1]), X && B(k.trim());
|
|
13927
13927
|
} else X && (T([]), B(""));
|
|
13928
13928
|
}
|
|
13929
|
-
} else if (t && !h && typeof
|
|
13929
|
+
} else if (t && !h && typeof k == "string" && k.trim()) {
|
|
13930
13930
|
const r1 = {
|
|
13931
|
-
label:
|
|
13932
|
-
value:
|
|
13931
|
+
label: k.trim(),
|
|
13932
|
+
value: k.trim(),
|
|
13933
13933
|
className: "custom-option"
|
|
13934
13934
|
};
|
|
13935
|
-
T([r1]), X && B(
|
|
13935
|
+
T([r1]), X && B(k.trim());
|
|
13936
13936
|
} else X && (T([]), B(""));
|
|
13937
13937
|
}, [
|
|
13938
|
-
|
|
13938
|
+
k,
|
|
13939
13939
|
v,
|
|
13940
13940
|
h,
|
|
13941
13941
|
f,
|
|
@@ -13943,18 +13943,18 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
13943
13943
|
]), Y(() => {
|
|
13944
13944
|
f && y !== void 0 && B(y);
|
|
13945
13945
|
}, [y, f]), Y(() => {
|
|
13946
|
-
if (!
|
|
13946
|
+
if (!M || !Z.current) return;
|
|
13947
13947
|
const Q = () => {
|
|
13948
13948
|
if (!Z.current) return;
|
|
13949
|
-
const r1 = Z.current.getBoundingClientRect(), o1 = window.visualViewport, K1 = o1?.offsetTop ?? 0, D0 = K1 + (o1?.height ?? window.innerHeight),
|
|
13950
|
-
if (O(s0),
|
|
13949
|
+
const r1 = Z.current.getBoundingClientRect(), o1 = window.visualViewport, K1 = o1?.offsetTop ?? 0, D0 = K1 + (o1?.height ?? window.innerHeight), F1 = 300, Y0 = 8, _0 = D0 - r1.bottom, M0 = r1.top - K1, s0 = _0 < F1 && M0 > _0;
|
|
13950
|
+
if (O(s0), V) {
|
|
13951
13951
|
const q0 = Math.max(0, (s0 ? M0 : _0) - Y0);
|
|
13952
13952
|
$({
|
|
13953
13953
|
top: r1.bottom,
|
|
13954
13954
|
bottom: window.innerHeight - r1.top,
|
|
13955
13955
|
left: r1.left,
|
|
13956
13956
|
width: r1.width,
|
|
13957
|
-
maxHeight: Math.min(
|
|
13957
|
+
maxHeight: Math.min(F1, q0)
|
|
13958
13958
|
});
|
|
13959
13959
|
}
|
|
13960
13960
|
};
|
|
@@ -13963,23 +13963,23 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
13963
13963
|
return window.addEventListener("scroll", Q, !0), window.addEventListener("resize", Q), X?.addEventListener("resize", Q), X?.addEventListener("scroll", Q), () => {
|
|
13964
13964
|
window.removeEventListener("scroll", Q, !0), window.removeEventListener("resize", Q), X?.removeEventListener("resize", Q), X?.removeEventListener("scroll", Q);
|
|
13965
13965
|
};
|
|
13966
|
-
}, [
|
|
13966
|
+
}, [M, V]), Y(() => {
|
|
13967
13967
|
const Q = (X) => {
|
|
13968
13968
|
if (Z.current && !Z.current.contains(X.target)) {
|
|
13969
|
-
if (
|
|
13969
|
+
if (V && M) {
|
|
13970
13970
|
const r1 = document.querySelector(".dropdown-menu--portal");
|
|
13971
13971
|
if (r1 && r1.contains(X.target)) return;
|
|
13972
13972
|
}
|
|
13973
|
-
if (t && !h &&
|
|
13974
|
-
const r1 = v.find((o1) => o1.label.toLowerCase() ===
|
|
13975
|
-
label:
|
|
13976
|
-
value:
|
|
13973
|
+
if (t && !h && x.trim() && !(A.length > 0 && A[0].label.toLowerCase() === x.trim().toLowerCase())) {
|
|
13974
|
+
const r1 = v.find((o1) => o1.label.toLowerCase() === x.toLowerCase() || o1.value.toString() === x) || {
|
|
13975
|
+
label: x.trim(),
|
|
13976
|
+
value: x.trim(),
|
|
13977
13977
|
className: "custom-option"
|
|
13978
13978
|
};
|
|
13979
|
-
T([r1]), B(r1.label),
|
|
13979
|
+
T([r1]), B(r1.label), N(!1), u && u(r1, p);
|
|
13980
13980
|
return;
|
|
13981
13981
|
}
|
|
13982
|
-
|
|
13982
|
+
N(!1), !h && A.length > 0 ? B(A[0].label) : h && f && B("");
|
|
13983
13983
|
}
|
|
13984
13984
|
};
|
|
13985
13985
|
return document.addEventListener("mousedown", Q), () => {
|
|
@@ -13987,15 +13987,15 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
13987
13987
|
};
|
|
13988
13988
|
}, [
|
|
13989
13989
|
t,
|
|
13990
|
-
k,
|
|
13991
13990
|
x,
|
|
13991
|
+
M,
|
|
13992
13992
|
h,
|
|
13993
13993
|
p,
|
|
13994
13994
|
u,
|
|
13995
13995
|
v,
|
|
13996
13996
|
f,
|
|
13997
13997
|
A,
|
|
13998
|
-
|
|
13998
|
+
V
|
|
13999
13999
|
]);
|
|
14000
14000
|
const a1 = (Q) => {
|
|
14001
14001
|
if (!Q.disabled)
|
|
@@ -14004,84 +14004,84 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
14004
14004
|
let r1;
|
|
14005
14005
|
X ? r1 = A.filter((o1) => o1.value !== Q.value) : r1 = [...A, Q], T(r1), f && B(""), u && u(r1, p);
|
|
14006
14006
|
} else
|
|
14007
|
-
B(Q.label), T([Q]),
|
|
14007
|
+
B(Q.label), T([Q]), N(!1), u && u(Q, p);
|
|
14008
14008
|
}, u1 = () => {
|
|
14009
|
-
if (!t || !
|
|
14010
|
-
const Q = v.find((r1) => r1.label.toLowerCase() ===
|
|
14009
|
+
if (!t || !x.trim()) return;
|
|
14010
|
+
const Q = v.find((r1) => r1.label.toLowerCase() === x.toLowerCase() || r1.value.toString() === x);
|
|
14011
14011
|
if (Q) {
|
|
14012
14012
|
a1(Q);
|
|
14013
14013
|
return;
|
|
14014
14014
|
}
|
|
14015
14015
|
const X = {
|
|
14016
|
-
label:
|
|
14017
|
-
value:
|
|
14016
|
+
label: x.trim(),
|
|
14017
|
+
value: x.trim(),
|
|
14018
14018
|
className: "custom-option"
|
|
14019
14019
|
};
|
|
14020
14020
|
if (h) {
|
|
14021
14021
|
const r1 = [...A, X];
|
|
14022
14022
|
T(r1), B(""), u && u(r1, p);
|
|
14023
14023
|
} else
|
|
14024
|
-
T([X]), B(X.label),
|
|
14024
|
+
T([X]), B(X.label), N(!1), u && u(X, p);
|
|
14025
14025
|
}, I = (Q) => {
|
|
14026
14026
|
const X = A.filter((r1) => r1.value !== Q.value);
|
|
14027
14027
|
T(X), u && (h ? u(X, p) : (u(null, p), f || B("")));
|
|
14028
14028
|
}, K = () => {
|
|
14029
|
-
T([]), (!f || !h) && B(""),
|
|
14029
|
+
T([]), (!f || !h) && B(""), N(!1), u && u(h ? [] : null, p);
|
|
14030
14030
|
}, d1 = (Q) => {
|
|
14031
|
-
B(Q),
|
|
14031
|
+
B(Q), M || N(!0), g?.(Q);
|
|
14032
14032
|
}, v1 = () => {
|
|
14033
|
-
l || (
|
|
14033
|
+
l || (N(!0), !h && f && A.length > 0 && B(""), (h || f) && q.current?.focus());
|
|
14034
14034
|
}, k1 = () => {
|
|
14035
|
-
l || (
|
|
14035
|
+
l || (N(!M), M || (J(-1), !h && f && A.length > 0 && B(""), (h || f) && q.current?.focus()));
|
|
14036
14036
|
}, M1 = (Q) => {
|
|
14037
14037
|
if (!l) {
|
|
14038
|
-
if (!
|
|
14039
|
-
(Q.key === "ArrowDown" || Q.key === "Enter") && (
|
|
14038
|
+
if (!M) {
|
|
14039
|
+
(Q.key === "ArrowDown" || Q.key === "Enter") && (N(!0), Q.preventDefault());
|
|
14040
14040
|
return;
|
|
14041
14041
|
}
|
|
14042
14042
|
switch (Q.key) {
|
|
14043
14043
|
case "ArrowDown":
|
|
14044
|
-
if (Q.preventDefault(), t &&
|
|
14044
|
+
if (Q.preventDefault(), t && x && H.length === 0) return;
|
|
14045
14045
|
J((X) => {
|
|
14046
|
-
const r1 = X < (t &&
|
|
14046
|
+
const r1 = X < (t && x && !H.some((o1) => o1.label.toLowerCase() === x.toLowerCase()) ? H.length : H.length - 1) ? X + 1 : 0;
|
|
14047
14047
|
return r1 < H.length && W.current[r1] && W.current[r1]?.scrollIntoView({ block: "nearest" }), r1;
|
|
14048
14048
|
});
|
|
14049
14049
|
break;
|
|
14050
14050
|
case "ArrowUp":
|
|
14051
|
-
if (Q.preventDefault(), t &&
|
|
14051
|
+
if (Q.preventDefault(), t && x && H.length === 0) return;
|
|
14052
14052
|
J((X) => {
|
|
14053
|
-
const r1 = t &&
|
|
14053
|
+
const r1 = t && x && !H.some((K1) => K1.label.toLowerCase() === x.toLowerCase()) ? H.length : H.length - 1, o1 = X > 0 ? X - 1 : r1;
|
|
14054
14054
|
return o1 < H.length && W.current[o1] && W.current[o1]?.scrollIntoView({ block: "nearest" }), o1;
|
|
14055
14055
|
});
|
|
14056
14056
|
break;
|
|
14057
14057
|
case "Enter":
|
|
14058
|
-
Q.preventDefault(), P >= 0 && P < H.length ? a1(H[P]) : (t &&
|
|
14058
|
+
Q.preventDefault(), P >= 0 && P < H.length ? a1(H[P]) : (t && x && P === H.length || t && x && H.length === 0) && u1();
|
|
14059
14059
|
break;
|
|
14060
14060
|
case "Escape":
|
|
14061
|
-
Q.preventDefault(),
|
|
14061
|
+
Q.preventDefault(), N(!1), !h && A.length > 0 ? B(A[0].label) : h && f && B("");
|
|
14062
14062
|
break;
|
|
14063
14063
|
case "Backspace":
|
|
14064
|
-
h &&
|
|
14064
|
+
h && x === "" && A.length > 0 && (Q.preventDefault(), I(A[A.length - 1]));
|
|
14065
14065
|
break;
|
|
14066
14066
|
default:
|
|
14067
14067
|
break;
|
|
14068
14068
|
}
|
|
14069
14069
|
}
|
|
14070
|
-
}, T1 = (Q) => A.some((X) => X.value === Q.value),
|
|
14070
|
+
}, T1 = (Q) => A.some((X) => X.value === Q.value), j1 = () => {
|
|
14071
14071
|
if (A.length === 0) return "";
|
|
14072
14072
|
const Q = Math.max(1, a);
|
|
14073
14073
|
if (A.length <= Q) return A.map((o1) => o1.label).join(", ");
|
|
14074
14074
|
const X = A.slice(0, Q).map((o1) => o1.label).join(", "), r1 = A.length - Q;
|
|
14075
14075
|
return `${X} (+${r1} ${r1 === 1 ? "other" : "others"})`;
|
|
14076
|
-
}, r0 = () => h && C || f &&
|
|
14076
|
+
}, r0 = () => h && C || f && M ? x : A.length > 0 ? h ? j1() : A[0].label : "", V1 = () => h && C ? A.length > 0 ? "" : w : M && f ? w : A.length > 0 ? "" : w, S1 = () => !h || A.length === 0 || _ === "none" ? null : _ === "floating" ? /* @__PURE__ */ n("div", {
|
|
14077
14077
|
className: "dropdown-selected-count",
|
|
14078
14078
|
children: [A.length, " selected"]
|
|
14079
|
-
}) : null,
|
|
14080
|
-
if (!
|
|
14079
|
+
}) : null, W1 = () => !!(t && x && x.trim() && !H.some((Q) => Q.label.toLowerCase() === x.toLowerCase() || Q.value.toString() === x)), o0 = () => {
|
|
14080
|
+
if (!M || l) return null;
|
|
14081
14081
|
const Q = /* @__PURE__ */ e("div", {
|
|
14082
14082
|
ref: m1,
|
|
14083
|
-
className: `dropdown-menu ${
|
|
14084
|
-
style:
|
|
14083
|
+
className: `dropdown-menu ${V ? "dropdown-menu--portal" : ""} ${e1 ? "dropdown-menu--upward" : ""}`,
|
|
14084
|
+
style: V ? {
|
|
14085
14085
|
position: "fixed",
|
|
14086
14086
|
top: e1 ? "auto" : `${S.top}px`,
|
|
14087
14087
|
bottom: e1 ? `${S.bottom}px` : "auto",
|
|
@@ -14090,7 +14090,7 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
14090
14090
|
maxHeight: `${S.maxHeight}px`,
|
|
14091
14091
|
zIndex: 9999
|
|
14092
14092
|
} : void 0,
|
|
14093
|
-
children: H.length > 0 ||
|
|
14093
|
+
children: H.length > 0 || W1() ? /* @__PURE__ */ n("ul", {
|
|
14094
14094
|
className: "dropdown-options-list",
|
|
14095
14095
|
children: [H.map((X, r1) => /* @__PURE__ */ n("li", {
|
|
14096
14096
|
ref: (o1) => {
|
|
@@ -14136,7 +14136,7 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
14136
14136
|
children: X.details
|
|
14137
14137
|
})]
|
|
14138
14138
|
})]
|
|
14139
|
-
}, `dd-option-${t1}-${r1}`)),
|
|
14139
|
+
}, `dd-option-${t1}-${r1}`)), W1() && /* @__PURE__ */ e("li", {
|
|
14140
14140
|
ref: (X) => {
|
|
14141
14141
|
W.current[H.length] = X;
|
|
14142
14142
|
},
|
|
@@ -14149,7 +14149,7 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
14149
14149
|
className: "dropdown-option-label",
|
|
14150
14150
|
children: [/* @__PURE__ */ e(j, { name: "plus" }), /* @__PURE__ */ n("span", { children: [
|
|
14151
14151
|
"Create “",
|
|
14152
|
-
|
|
14152
|
+
x,
|
|
14153
14153
|
"”"
|
|
14154
14154
|
] })]
|
|
14155
14155
|
})
|
|
@@ -14160,8 +14160,8 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
14160
14160
|
children: "No options found"
|
|
14161
14161
|
})
|
|
14162
14162
|
});
|
|
14163
|
-
return
|
|
14164
|
-
}, L1 = !h && A.length === 1 ? A[0] : null, P1 = b && !
|
|
14163
|
+
return V ? Y1(Q, document.body) : Q;
|
|
14164
|
+
}, L1 = !h && A.length === 1 ? A[0] : null, P1 = b && !M && !h && A.length > 0, X1 = !!(L1?.icon && !x && !P1), c0 = !!(L1?.suffixIcon && !P1), l0 = h && C;
|
|
14165
14165
|
return /* @__PURE__ */ n("div", {
|
|
14166
14166
|
className: `dropdown-container ${o ? "dropdown-error" : ""} ${z ? "dropdown-success" : ""} ${d ? "dropdown-highlighted" : ""} ${h ? "multiple" : ""} ${l ? "disabled" : ""} ${h ? `count-display-${_}` : ""} ${c}`,
|
|
14167
14167
|
ref: Z,
|
|
@@ -14234,12 +14234,12 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
14234
14234
|
})
|
|
14235
14235
|
}),
|
|
14236
14236
|
/* @__PURE__ */ e("span", {
|
|
14237
|
-
className: `dropdown-action-button dropdown-toggle-button ${
|
|
14237
|
+
className: `dropdown-action-button dropdown-toggle-button ${M ? "open" : ""}`,
|
|
14238
14238
|
children: /* @__PURE__ */ e(U, {
|
|
14239
14239
|
variant: "plain",
|
|
14240
14240
|
onClick: k1,
|
|
14241
14241
|
disabled: l,
|
|
14242
|
-
children:
|
|
14242
|
+
children: p3
|
|
14243
14243
|
})
|
|
14244
14244
|
})
|
|
14245
14245
|
]
|
|
@@ -14259,7 +14259,7 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
14259
14259
|
]
|
|
14260
14260
|
});
|
|
14261
14261
|
}, jc = z1(({ autoComplete: t = "on", autoFocus: r, clearable: c, disabled: l, error: o, highlighted: d, id: s, label: m, max: a, min: i, onBlur: h, onChange: p, onClick: u, onKeyDown: g, onKeyUp: v, readOnly: w = !1, required: f = !1, success: y, type: _ = "date", value: C }, L) => {
|
|
14262
|
-
const z = c && C && !l && !w,
|
|
14262
|
+
const z = c && C && !l && !w, V = F(null);
|
|
14263
14263
|
return /* @__PURE__ */ n("div", {
|
|
14264
14264
|
className: `input-date-wrapper${d ? " input-date-highlighted" : ""}`,
|
|
14265
14265
|
children: [
|
|
@@ -14282,12 +14282,12 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
14282
14282
|
id: s,
|
|
14283
14283
|
max: a,
|
|
14284
14284
|
min: i,
|
|
14285
|
-
ref: (
|
|
14286
|
-
|
|
14285
|
+
ref: (M) => {
|
|
14286
|
+
V.current = M, typeof L == "function" ? L(M) : L && (L.current = M);
|
|
14287
14287
|
},
|
|
14288
14288
|
value: C ?? "",
|
|
14289
14289
|
onBlur: h,
|
|
14290
|
-
onChange: (
|
|
14290
|
+
onChange: (M) => p?.(M.target.value || void 0),
|
|
14291
14291
|
onClick: u,
|
|
14292
14292
|
onKeyDown: g,
|
|
14293
14293
|
onKeyUp: v,
|
|
@@ -14312,8 +14312,8 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
14312
14312
|
type: "button",
|
|
14313
14313
|
className: "input-date-picker",
|
|
14314
14314
|
onClick: () => {
|
|
14315
|
-
const
|
|
14316
|
-
|
|
14315
|
+
const M = V.current;
|
|
14316
|
+
M && !l && !w && M.showPicker();
|
|
14317
14317
|
},
|
|
14318
14318
|
disabled: l || w,
|
|
14319
14319
|
tabIndex: -1,
|
|
@@ -14382,7 +14382,7 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
14382
14382
|
info: "var(--rating-color-info)",
|
|
14383
14383
|
warning: "var(--rating-color-warning)",
|
|
14384
14384
|
danger: "var(--rating-color-danger)"
|
|
14385
|
-
}, Fc = 7.5, Uc = 16.5, s2 = 15.5,
|
|
14385
|
+
}, Fc = 7.5, Uc = 16.5, s2 = 15.5, F2 = -4, Oc = 4.5, h0 = ({ type: t, filled: r, variant: c, size: l = 16, mood: o = 1 }) => {
|
|
14386
14386
|
const d = `rating-grad-${A0()}`, s = Wc[c], m = "var(--rating-empty-color)", a = r === "full" ? s : r === "half" ? `url(#${d})` : m, i = () => r === "half" ? /* @__PURE__ */ e("defs", { children: /* @__PURE__ */ n("linearGradient", {
|
|
14387
14387
|
id: d,
|
|
14388
14388
|
x1: "0",
|
|
@@ -14420,7 +14420,7 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
14420
14420
|
})]
|
|
14421
14421
|
});
|
|
14422
14422
|
if (t === "emoji") {
|
|
14423
|
-
const h = s2 + (
|
|
14423
|
+
const h = s2 + (F2 + (Oc - F2) * Math.min(1, Math.max(0, o))), p = "var(--card-background-color)";
|
|
14424
14424
|
return /* @__PURE__ */ n("svg", {
|
|
14425
14425
|
width: l,
|
|
14426
14426
|
height: l,
|
|
@@ -14629,9 +14629,9 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
14629
14629
|
label: "90d",
|
|
14630
14630
|
days: 90
|
|
14631
14631
|
}
|
|
14632
|
-
], Kc = 3,
|
|
14632
|
+
], Kc = 3, z3 = (t) => Array.isArray(t) ? t : t == null || typeof t == "boolean" ? [] : [t], U2 = (t) => t.every((r) => typeof r == "number") ? t : t.map(String), d2 = 2, Qc = (t) => {
|
|
14633
14633
|
const r = t.options ?? [];
|
|
14634
|
-
return
|
|
14634
|
+
return z3(t.value).map((c) => r.find((l) => l.value === c)?.label ?? String(c));
|
|
14635
14635
|
}, Jc = (t) => {
|
|
14636
14636
|
const { type: r, value: c } = t;
|
|
14637
14637
|
if (c == null || c === "") return;
|
|
@@ -14698,7 +14698,7 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
14698
14698
|
value: l
|
|
14699
14699
|
});
|
|
14700
14700
|
}, rl = ({ filter: t, onChange: r }) => {
|
|
14701
|
-
const c =
|
|
14701
|
+
const c = z3(t.value), l = t.options ?? [], [o, d] = R("");
|
|
14702
14702
|
if (t.type === "checkbox") return /* @__PURE__ */ e(v0, {
|
|
14703
14703
|
count: t.count,
|
|
14704
14704
|
selected: t.value === !0,
|
|
@@ -14895,7 +14895,7 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
14895
14895
|
r({
|
|
14896
14896
|
filterId: t.id,
|
|
14897
14897
|
type: t.type,
|
|
14898
|
-
value: Array.isArray(s) ?
|
|
14898
|
+
value: Array.isArray(s) ? U2(s.map((a) => a.value)) : s?.value ?? null,
|
|
14899
14899
|
option: Array.isArray(s) ? null : s,
|
|
14900
14900
|
options: m
|
|
14901
14901
|
});
|
|
@@ -14937,7 +14937,7 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
14937
14937
|
r({
|
|
14938
14938
|
filterId: t.id,
|
|
14939
14939
|
type: t.type,
|
|
14940
|
-
value: h ? p[0] ?? null :
|
|
14940
|
+
value: h ? p[0] ?? null : U2(p),
|
|
14941
14941
|
option: a,
|
|
14942
14942
|
options: l.filter((u) => p.includes(u.value))
|
|
14943
14943
|
});
|
|
@@ -14998,10 +14998,10 @@ var Ga = ({ name: t, size: r = "medium", shape: c = "rounded", className: l = ""
|
|
|
14998
14998
|
const c = t.some((l) => (l.children?.length ?? 0) > 0);
|
|
14999
14999
|
return /* @__PURE__ */ e("nav", {
|
|
15000
15000
|
className: "control-panel__nav",
|
|
15001
|
-
children: t.map((l) =>
|
|
15001
|
+
children: t.map((l) => N3(l, c, r))
|
|
15002
15002
|
});
|
|
15003
15003
|
};
|
|
15004
|
-
function
|
|
15004
|
+
function N3(t, r, c, l = 0) {
|
|
15005
15005
|
const o = t.children ?? [], d = o.length > 0, s = t.isOpen ?? !1, m = [
|
|
15006
15006
|
"control-panel__nav-item",
|
|
15007
15007
|
t.isActive ? "control-panel__nav-item--active" : "",
|
|
@@ -15058,7 +15058,7 @@ function z3(t, r, c, l = 0) {
|
|
|
15058
15058
|
})]
|
|
15059
15059
|
}), d && /* @__PURE__ */ e("div", {
|
|
15060
15060
|
className: `control-panel__nav-children${s ? " control-panel__nav-children--open" : ""}`,
|
|
15061
|
-
children: o.map((h) =>
|
|
15061
|
+
children: o.map((h) => N3(h, r, c, l + 1))
|
|
15062
15062
|
})]
|
|
15063
15063
|
}, t.id);
|
|
15064
15064
|
}
|
|
@@ -15280,45 +15280,45 @@ var ll = (t) => !Number.isFinite(t) || t >= 1 ? 0 : String(t).split(".")[1]?.len
|
|
|
15280
15280
|
}, s.id ?? s.label ?? m))
|
|
15281
15281
|
]
|
|
15282
15282
|
}), gi = ({ width: t = "280px", className: r = "", isOpen: c, onClose: l, isMobile: o, showOverlay: d = !0, contained: s = !1, flush: m = !1, shadow: a = "none", header: i, navigation: h = [], actions: p = [], filters: u = [], filtersCount: g, collapsibleFilters: v = !1, onFilterChange: w, onClearFilters: f, options: y = [], onOptionChange: _, viewToggle: C, groupBy: L, visibleColumns: z }) => {
|
|
15283
|
-
const
|
|
15284
|
-
}),
|
|
15283
|
+
const V = L2(), k = o ?? V?.isMobile ?? !1, b = c ?? (k ? V?.isOpen ?? !1 : !0), M = l ?? V?.close ?? (() => {
|
|
15284
|
+
}), N = [
|
|
15285
15285
|
"control-panel",
|
|
15286
15286
|
b ? "control-panel--open" : "control-panel--closed",
|
|
15287
|
-
|
|
15287
|
+
k ? "control-panel--mobile" : "",
|
|
15288
15288
|
s ? "control-panel--contained" : "",
|
|
15289
15289
|
m ? "control-panel--flush" : "",
|
|
15290
15290
|
r
|
|
15291
|
-
].filter(Boolean).join(" "),
|
|
15291
|
+
].filter(Boolean).join(" "), x = ["control-panel__overlay", s ? "control-panel__overlay--contained" : ""].filter(Boolean).join(" "), B = {
|
|
15292
15292
|
"--control-panel-width": t,
|
|
15293
15293
|
"--control-panel-shadow": a
|
|
15294
15294
|
}, H = y.length === 0 ? [] : "type" in y[0] ? [{ options: y }] : y, E = !!(C || L || z || H.length > 0), P = u.length > 0 || g !== void 0 && g > 0, J = typeof v == "number" ? v : v ? 1 : 1 / 0, A = u.length >= J, T = ["control-panel__filters", A ? "control-panel__filters--collapsible" : ""].filter(Boolean).join(" ");
|
|
15295
|
-
return /* @__PURE__ */ n(h1, { children: [d &&
|
|
15296
|
-
className:
|
|
15297
|
-
onClick:
|
|
15295
|
+
return /* @__PURE__ */ n(h1, { children: [d && k && b && /* @__PURE__ */ e("div", {
|
|
15296
|
+
className: x,
|
|
15297
|
+
onClick: M
|
|
15298
15298
|
}), /* @__PURE__ */ n("aside", {
|
|
15299
|
-
className:
|
|
15299
|
+
className: N,
|
|
15300
15300
|
style: B,
|
|
15301
15301
|
children: [
|
|
15302
|
-
i && /* @__PURE__ */ e(
|
|
15302
|
+
i && /* @__PURE__ */ e(y3, {
|
|
15303
15303
|
icon: i.icon,
|
|
15304
15304
|
emoji: i.emoji,
|
|
15305
15305
|
svg: i.svg,
|
|
15306
15306
|
appName: i.appName ?? i.siteName,
|
|
15307
15307
|
heading: i.heading,
|
|
15308
15308
|
onClick: i.onClick ? () => {
|
|
15309
|
-
i.onClick?.(),
|
|
15309
|
+
i.onClick?.(), k && M();
|
|
15310
15310
|
} : void 0
|
|
15311
15311
|
}),
|
|
15312
15312
|
p.length > 0 && /* @__PURE__ */ e("div", {
|
|
15313
15313
|
className: "control-panel__actions",
|
|
15314
15314
|
children: p.map((S) => /* @__PURE__ */ e(sl, {
|
|
15315
15315
|
action: S,
|
|
15316
|
-
onActionComplete:
|
|
15316
|
+
onActionComplete: k ? M : void 0
|
|
15317
15317
|
}, S.id))
|
|
15318
15318
|
}),
|
|
15319
15319
|
h.length > 0 && /* @__PURE__ */ e(cl, {
|
|
15320
15320
|
navigation: h,
|
|
15321
|
-
onNavigate:
|
|
15321
|
+
onNavigate: k ? M : void 0
|
|
15322
15322
|
}),
|
|
15323
15323
|
P && /* @__PURE__ */ n("div", {
|
|
15324
15324
|
className: T,
|
|
@@ -15347,7 +15347,7 @@ var ll = (t) => !Number.isFinite(t) || t >= 1 ? 0 : String(t).split(".")[1]?.len
|
|
|
15347
15347
|
normalizedOptionGroups: H,
|
|
15348
15348
|
onOptionChange: _,
|
|
15349
15349
|
viewToggle: C,
|
|
15350
|
-
onViewToggleComplete:
|
|
15350
|
+
onViewToggleComplete: k ? M : void 0,
|
|
15351
15351
|
groupBy: L,
|
|
15352
15352
|
visibleColumns: z
|
|
15353
15353
|
})
|
|
@@ -15515,13 +15515,13 @@ var ll = (t) => !Number.isFinite(t) || t >= 1 ? 0 : String(t).split(".")[1]?.len
|
|
|
15515
15515
|
})
|
|
15516
15516
|
]
|
|
15517
15517
|
});
|
|
15518
|
-
}, pl = 45, ul = 120, vl = 45, gl = 45,
|
|
15518
|
+
}, pl = 45, ul = 120, vl = 45, gl = 45, O2 = 8, wl = 4, Y2 = ({ currentPage: t, totalPages: r, totalItems: c, onPageChange: l, showPagesNumbers: o = !1, pageSizeOptions: d, pageSize: s, onPageSizeChange: m, pageSizeLabel: a = "Rows", horizontalAlign: i = "left" }) => {
|
|
15519
15519
|
const { isAtLeast: h, isMobile: p } = b0(), u = F(null), [g, v] = R(p ? 0 : 2), w = D(() => {
|
|
15520
15520
|
const C = u.current, L = C?.parentElement;
|
|
15521
15521
|
if (!C || !L) return;
|
|
15522
15522
|
let z = 0;
|
|
15523
|
-
for (const
|
|
15524
|
-
const
|
|
15523
|
+
for (const M of L.children) M !== C && (z += M.offsetWidth + O2);
|
|
15524
|
+
const V = L.clientWidth - z - ((h("desktop") ? ul : vl) * 2 + pl * 2 + gl * 2 + O2 * 6), k = Math.floor(V / 53), b = Math.min(wl, Math.max(0, Math.floor(k / 2)));
|
|
15525
15525
|
v(b);
|
|
15526
15526
|
}, [h]);
|
|
15527
15527
|
Y(() => {
|
|
@@ -15658,14 +15658,14 @@ var ll = (t) => !Number.isFinite(t) || t >= 1 ? 0 : String(t).split(".")[1]?.len
|
|
|
15658
15658
|
return s ? r(o, s) : null;
|
|
15659
15659
|
})]
|
|
15660
15660
|
});
|
|
15661
|
-
},
|
|
15661
|
+
}, q2 = [
|
|
15662
15662
|
15,
|
|
15663
15663
|
30,
|
|
15664
15664
|
50,
|
|
15665
15665
|
100,
|
|
15666
15666
|
250,
|
|
15667
15667
|
500
|
|
15668
|
-
],
|
|
15668
|
+
], V3 = (t) => typeof t.header == "string" ? t.header : t.key, kl = (t) => typeof t == "number" ? `${t}px` : t, S3 = (t) => /* @__PURE__ */ n("span", {
|
|
15669
15669
|
className: "data-view__column-label",
|
|
15670
15670
|
children: [t.icon && /* @__PURE__ */ e(j, {
|
|
15671
15671
|
className: "data-view__column-icon",
|
|
@@ -15673,7 +15673,7 @@ var ll = (t) => !Number.isFinite(t) || t >= 1 ? 0 : String(t).split(".")[1]?.len
|
|
|
15673
15673
|
size: "sm",
|
|
15674
15674
|
variant: "muted"
|
|
15675
15675
|
}), /* @__PURE__ */ e("span", { children: t.header })]
|
|
15676
|
-
}),
|
|
15676
|
+
}), H3 = (t, r) => {
|
|
15677
15677
|
const c = t.cellIcon?.(r), l = t.accessor ? t.accessor(r) : r[t.key];
|
|
15678
15678
|
return c ? /* @__PURE__ */ n("span", {
|
|
15679
15679
|
className: "data-view__cell-with-icon",
|
|
@@ -15684,9 +15684,9 @@ var ll = (t) => !Number.isFinite(t) || t >= 1 ? 0 : String(t).split(".")[1]?.len
|
|
|
15684
15684
|
}) : l;
|
|
15685
15685
|
};
|
|
15686
15686
|
function xl({ data: t, columns: r, rowKey: c, card: l, actions: o, timeline: d, onRowClick: s, rowHref: m, rowClassName: a, empty: i, selectable: h, selectedIds: p = [], pinnedIds: u, onToggleSelect: g, cardMaxWidth: v, isMobile: w = !1, groups: f, showGroupCount: y = !0, collapsible: _ = !1, collapsedGroups: C, onToggleGroup: L }) {
|
|
15687
|
-
const z = r.filter((
|
|
15688
|
-
id: d.idAccessor(
|
|
15689
|
-
date: d.dateAccessor(
|
|
15687
|
+
const z = r.filter((x) => !x.hideInCard && !(w && x.hideInMobile)), V = l1(() => new Set(u ?? []), [u]), k = `data-view__cards${v !== void 0 ? " data-view__cards--grid" : ""}`, b = v !== void 0 ? { "--data-view-card-max-width": kl(v) } : void 0, M = l1(() => d ? z2(t.map((x) => ({
|
|
15688
|
+
id: d.idAccessor(x),
|
|
15689
|
+
date: d.dateAccessor(x)
|
|
15690
15690
|
})), d.granularity) : /* @__PURE__ */ new Map(), [t, d]);
|
|
15691
15691
|
if (t.length === 0)
|
|
15692
15692
|
return i ? /* @__PURE__ */ e(a0, {
|
|
@@ -15696,9 +15696,9 @@ function xl({ data: t, columns: r, rowKey: c, card: l, actions: o, timeline: d,
|
|
|
15696
15696
|
primary: i.primary,
|
|
15697
15697
|
secondary: i.secondary
|
|
15698
15698
|
}) : /* @__PURE__ */ e(a0, { title: "No data available" });
|
|
15699
|
-
const
|
|
15700
|
-
const H =
|
|
15701
|
-
W.metaKey || W.ctrlKey || W.shiftKey || W.altKey || W.button !== 0 || s && (W.preventDefault(), s(
|
|
15699
|
+
const N = (x, B) => {
|
|
15700
|
+
const H = M.get(B), E = c(x, B), P = h && p.includes(E), J = V.has(E), A = m?.(x), T = !!s || !!A, S = l?.accentColor?.(x), $ = `data-view__card ${T ? "data-view__card--clickable" : ""} ${P ? "data-view__card--selected" : ""} ${J ? "data-view__card--pinned" : ""} ${S ? "data-view__card--accent" : ""} ${a?.(x) || ""}`, e1 = S ? { "--data-view-card-accent-color": S } : void 0, O = (W) => {
|
|
15701
|
+
W.metaKey || W.ctrlKey || W.shiftKey || W.altKey || W.button !== 0 || s && (W.preventDefault(), s(x, W));
|
|
15702
15702
|
}, Z = /* @__PURE__ */ n(h1, { children: [
|
|
15703
15703
|
J && /* @__PURE__ */ e(c1, {
|
|
15704
15704
|
title: "Pinned",
|
|
@@ -15720,10 +15720,10 @@ function xl({ data: t, columns: r, rowKey: c, card: l, actions: o, timeline: d,
|
|
|
15720
15720
|
}),
|
|
15721
15721
|
l?.media && /* @__PURE__ */ e("div", {
|
|
15722
15722
|
className: "data-view__card-media",
|
|
15723
|
-
children: l.media(
|
|
15723
|
+
children: l.media(x)
|
|
15724
15724
|
}),
|
|
15725
15725
|
l && (() => {
|
|
15726
|
-
const W = l.icon?.(
|
|
15726
|
+
const W = l.icon?.(x);
|
|
15727
15727
|
return /* @__PURE__ */ n("div", {
|
|
15728
15728
|
className: "data-view__card-header",
|
|
15729
15729
|
children: [/* @__PURE__ */ n("div", {
|
|
@@ -15745,16 +15745,16 @@ function xl({ data: t, columns: r, rowKey: c, card: l, actions: o, timeline: d,
|
|
|
15745
15745
|
}),
|
|
15746
15746
|
/* @__PURE__ */ e("span", {
|
|
15747
15747
|
className: "data-view__card-title",
|
|
15748
|
-
children: l.title(
|
|
15748
|
+
children: l.title(x)
|
|
15749
15749
|
})
|
|
15750
15750
|
]
|
|
15751
15751
|
}), l.subtitle && /* @__PURE__ */ e("span", {
|
|
15752
15752
|
className: "data-view__card-subtitle",
|
|
15753
|
-
children: l.subtitle(
|
|
15753
|
+
children: l.subtitle(x)
|
|
15754
15754
|
})]
|
|
15755
15755
|
}), l.badges && /* @__PURE__ */ e("div", {
|
|
15756
15756
|
className: "data-view__card-badges",
|
|
15757
|
-
children: l.badges(
|
|
15757
|
+
children: l.badges(x)
|
|
15758
15758
|
})]
|
|
15759
15759
|
});
|
|
15760
15760
|
})(),
|
|
@@ -15764,17 +15764,17 @@ function xl({ data: t, columns: r, rowKey: c, card: l, actions: o, timeline: d,
|
|
|
15764
15764
|
className: "data-view__card-field",
|
|
15765
15765
|
children: [/* @__PURE__ */ e("span", {
|
|
15766
15766
|
className: "data-view__card-label",
|
|
15767
|
-
children:
|
|
15767
|
+
children: S3(W)
|
|
15768
15768
|
}), /* @__PURE__ */ e("span", {
|
|
15769
15769
|
className: "data-view__card-value",
|
|
15770
|
-
children:
|
|
15770
|
+
children: H3(W, x)
|
|
15771
15771
|
})]
|
|
15772
15772
|
}, W.key))
|
|
15773
15773
|
}),
|
|
15774
15774
|
o && /* @__PURE__ */ e("div", {
|
|
15775
15775
|
className: "data-view__card-actions",
|
|
15776
15776
|
onClick: (W) => W.stopPropagation(),
|
|
15777
|
-
children: o(
|
|
15777
|
+
children: o(x)
|
|
15778
15778
|
})
|
|
15779
15779
|
] });
|
|
15780
15780
|
return /* @__PURE__ */ n(w1.Fragment, { children: [H && /* @__PURE__ */ e(Ml, { marker: H }), A ? /* @__PURE__ */ e("a", {
|
|
@@ -15786,17 +15786,17 @@ function xl({ data: t, columns: r, rowKey: c, card: l, actions: o, timeline: d,
|
|
|
15786
15786
|
}) : /* @__PURE__ */ e("div", {
|
|
15787
15787
|
className: $,
|
|
15788
15788
|
style: e1,
|
|
15789
|
-
onClick: s ? (W) => s(
|
|
15789
|
+
onClick: s ? (W) => s(x, W) : void 0,
|
|
15790
15790
|
children: Z
|
|
15791
15791
|
})] }, E);
|
|
15792
15792
|
};
|
|
15793
15793
|
if (f) {
|
|
15794
|
-
let
|
|
15794
|
+
let x = 0;
|
|
15795
15795
|
return /* @__PURE__ */ e("div", {
|
|
15796
15796
|
className: "data-view__groups",
|
|
15797
15797
|
children: f.map((B) => {
|
|
15798
|
-
const H =
|
|
15799
|
-
|
|
15798
|
+
const H = x;
|
|
15799
|
+
x += B.items.length;
|
|
15800
15800
|
const E = _ && C?.has(B.key);
|
|
15801
15801
|
return /* @__PURE__ */ n("section", {
|
|
15802
15802
|
className: "data-view__group",
|
|
@@ -15819,18 +15819,18 @@ function xl({ data: t, columns: r, rowKey: c, card: l, actions: o, timeline: d,
|
|
|
15819
15819
|
})
|
|
15820
15820
|
]
|
|
15821
15821
|
}), !E && /* @__PURE__ */ e("div", {
|
|
15822
|
-
className:
|
|
15822
|
+
className: k,
|
|
15823
15823
|
style: b,
|
|
15824
|
-
children: B.items.map((P, J) =>
|
|
15824
|
+
children: B.items.map((P, J) => N(P, H + J))
|
|
15825
15825
|
})]
|
|
15826
15826
|
}, B.key ?? "__null__");
|
|
15827
15827
|
})
|
|
15828
15828
|
});
|
|
15829
15829
|
}
|
|
15830
15830
|
return /* @__PURE__ */ e("div", {
|
|
15831
|
-
className:
|
|
15831
|
+
className: k,
|
|
15832
15832
|
style: b,
|
|
15833
|
-
children: t.map((
|
|
15833
|
+
children: t.map((x, B) => N(x, B))
|
|
15834
15834
|
});
|
|
15835
15835
|
}
|
|
15836
15836
|
function Ll({ config: t }) {
|
|
@@ -15924,7 +15924,7 @@ function Nl({ columns: t, config: r, sortDirection: c, sortKey: l, onSort: o })
|
|
|
15924
15924
|
const m = t.find((a) => a.key === s.column);
|
|
15925
15925
|
return {
|
|
15926
15926
|
value: s.column,
|
|
15927
|
-
label: s.label ?? (m ?
|
|
15927
|
+
label: s.label ?? (m ? V3(m) : s.column),
|
|
15928
15928
|
icon: s.icon ?? m?.icon,
|
|
15929
15929
|
direction: s.direction ?? "asc",
|
|
15930
15930
|
disabled: !m
|
|
@@ -15942,16 +15942,16 @@ function Vl({ state: t }) {
|
|
|
15942
15942
|
children: /* @__PURE__ */ e(j, { name: t === "asc" ? "arrow-up" : t === "desc" ? "arrow-down" : "arrow-bidirectional-vertical" })
|
|
15943
15943
|
});
|
|
15944
15944
|
}
|
|
15945
|
-
function yi({ columns: t, data: r, rowKey: c, pinnedIds: l, selectable: o = !1, onSelectionChange: d, selectedIds: s, pageSizeOptions: m =
|
|
15945
|
+
function yi({ columns: t, data: r, rowKey: c, pinnedIds: l, selectable: o = !1, onSelectionChange: d, selectedIds: s, pageSizeOptions: m = q2, initialPageSize: a = q2[1], showPageSize: i = !0, card: h, actions: p, actionsWidth: u, timeline: g, onRowClick: v, rowHref: w, rowClassName: f, rowDetail: y, empty: _, initialSortKey: C = null, initialSortDirection: L = "asc", sortKey: z, sortDirection: V, onSortChange: k, miniSort: b, showCardSortControls: M = !0, desktopView: N = "table", cardMaxWidth: x, className: B, onPageChange: H, onPageSizeChange: E, currentPage: P, totalItems: J, group: A, showResultsCount: T = !0, totalCount: S, itemNoun: $, columnSelector: e1 }) {
|
|
15946
15946
|
const { isMobile: O } = b0(), [Z, W] = R(C), [q, m1] = R(L), [t1, C1] = R([]), f1 = s ?? t1, [A1, a1] = R(1), u1 = P ?? A1, [I, K] = R(a), [d1, v1] = R(() => t.reduce((G, s1) => (s1.width && (G[s1.key] = s1.width), G), {})), [k1, M1] = R(/* @__PURE__ */ new Set()), T1 = (G) => {
|
|
15947
15947
|
M1((s1) => {
|
|
15948
15948
|
const g1 = new Set(s1);
|
|
15949
15949
|
return g1.has(G) ? g1.delete(G) : g1.add(G), g1;
|
|
15950
15950
|
});
|
|
15951
|
-
},
|
|
15951
|
+
}, j1 = (G, s1) => c?.(G, s1) ?? s1, r0 = (G) => {
|
|
15952
15952
|
P === void 0 && a1(G), H?.(G);
|
|
15953
|
-
}, V1 = z !== void 0 ? z : Z, S1 =
|
|
15954
|
-
z === void 0 && W(G),
|
|
15953
|
+
}, V1 = z !== void 0 ? z : Z, S1 = V ?? q, W1 = (G, s1) => {
|
|
15954
|
+
z === void 0 && W(G), V === void 0 && m1(s1), k?.({
|
|
15955
15955
|
key: G,
|
|
15956
15956
|
direction: s1
|
|
15957
15957
|
}), r0(1);
|
|
@@ -15973,10 +15973,10 @@ function yi({ columns: t, data: r, rowKey: c, pinnedIds: l, selectable: o = !1,
|
|
|
15973
15973
|
if (o0.size === 0) return G;
|
|
15974
15974
|
const s1 = [], g1 = [];
|
|
15975
15975
|
if (G.forEach((n1, i1) => {
|
|
15976
|
-
o0.has(
|
|
15976
|
+
o0.has(j1(n1, i1)) ? s1.push(n1) : g1.push(n1);
|
|
15977
15977
|
}), l && l.length > 1 && s1.length > 1) {
|
|
15978
15978
|
const n1 = new Map(l.map((i1, y1) => [i1, y1]));
|
|
15979
|
-
s1.sort((i1, y1) => (n1.get(
|
|
15979
|
+
s1.sort((i1, y1) => (n1.get(j1(i1, 0)) ?? 0) - (n1.get(j1(y1, 0)) ?? 0));
|
|
15980
15980
|
}
|
|
15981
15981
|
return [...s1, ...g1];
|
|
15982
15982
|
}, [
|
|
@@ -16035,10 +16035,10 @@ function yi({ columns: t, data: r, rowKey: c, pinnedIds: l, selectable: o = !1,
|
|
|
16035
16035
|
]), D0 = l1(() => g ? z2(X.map((G) => ({
|
|
16036
16036
|
id: g.idAccessor(G),
|
|
16037
16037
|
date: g.dateAccessor(G)
|
|
16038
|
-
})), g.granularity) : /* @__PURE__ */ new Map(), [X, g]),
|
|
16039
|
-
s === void 0 && C1(G), d?.(r.filter((s1, g1) => G.includes(
|
|
16038
|
+
})), g.granularity) : /* @__PURE__ */ new Map(), [X, g]), F1 = (G) => {
|
|
16039
|
+
s === void 0 && C1(G), d?.(r.filter((s1, g1) => G.includes(j1(s1, g1))));
|
|
16040
16040
|
}, Y0 = (G) => {
|
|
16041
|
-
G.sortable && (V1 === G.key ?
|
|
16041
|
+
G.sortable && (V1 === G.key ? W1(G.key, S1 === "asc" ? "desc" : "asc") : W1(G.key, "asc"));
|
|
16042
16042
|
}, _0 = (G, s1) => {
|
|
16043
16043
|
G.preventDefault();
|
|
16044
16044
|
const g1 = G.clientX, n1 = d1[s1] ?? 150, i1 = ($1) => {
|
|
@@ -16052,26 +16052,26 @@ function yi({ columns: t, data: r, rowKey: c, pinnedIds: l, selectable: o = !1,
|
|
|
16052
16052
|
};
|
|
16053
16053
|
window.addEventListener("mousemove", i1), window.addEventListener("mouseup", y1);
|
|
16054
16054
|
}, M0 = t.some((G) => G.filter), s0 = t.filter((G) => G.sortable), q0 = s0.map((G) => ({
|
|
16055
|
-
label:
|
|
16055
|
+
label: V3(G),
|
|
16056
16056
|
value: G.key
|
|
16057
|
-
})), c4 = s0.length > 0, X0 = V1 ? s0.find((G) => G.key === V1) : void 0, l4 = b?.align ?? "left",
|
|
16057
|
+
})), c4 = s0.length > 0, X0 = V1 ? s0.find((G) => G.key === V1) : void 0, l4 = b?.align ?? "left", R2 = (b?.columns ?? b?.column ?? []).length > 0 ? /* @__PURE__ */ e(Nl, {
|
|
16058
16058
|
columns: t,
|
|
16059
16059
|
config: b,
|
|
16060
16060
|
sortKey: V1,
|
|
16061
16061
|
sortDirection: S1,
|
|
16062
|
-
onSort:
|
|
16063
|
-
}) : null,
|
|
16062
|
+
onSort: W1
|
|
16063
|
+
}) : null, B2 = e1 && e1.options.length > 0 ? /* @__PURE__ */ e(Ll, { config: e1 }) : null, K0 = r1 || R2 || B2 ? /* @__PURE__ */ n("div", {
|
|
16064
16064
|
className: `data-view__top-row data-view__top-row--mini-${l4}`,
|
|
16065
16065
|
children: [
|
|
16066
16066
|
r1 && /* @__PURE__ */ e("div", {
|
|
16067
16067
|
className: "data-view__results-count",
|
|
16068
16068
|
children: r1
|
|
16069
16069
|
}),
|
|
16070
|
-
|
|
16071
|
-
|
|
16070
|
+
R2,
|
|
16071
|
+
B2
|
|
16072
16072
|
]
|
|
16073
16073
|
}) : null;
|
|
16074
|
-
if (
|
|
16074
|
+
if (N !== "cards" && t.length === 0) return /* @__PURE__ */ n("div", {
|
|
16075
16075
|
className: `data-view${B ? ` ${B}` : ""}`,
|
|
16076
16076
|
children: [K0, /* @__PURE__ */ e("div", {
|
|
16077
16077
|
className: "data-view__wrapper data-view__wrapper--empty",
|
|
@@ -16081,11 +16081,11 @@ function yi({ columns: t, data: r, rowKey: c, pinnedIds: l, selectable: o = !1,
|
|
|
16081
16081
|
})
|
|
16082
16082
|
})]
|
|
16083
16083
|
});
|
|
16084
|
-
if (
|
|
16084
|
+
if (N === "cards") return /* @__PURE__ */ n("div", {
|
|
16085
16085
|
className: `data-view data-view--cards${B ? ` ${B}` : ""}`,
|
|
16086
16086
|
children: [
|
|
16087
16087
|
K0,
|
|
16088
|
-
|
|
16088
|
+
M && c4 && /* @__PURE__ */ n("div", {
|
|
16089
16089
|
className: "data-view__card-sort-bar",
|
|
16090
16090
|
children: [/* @__PURE__ */ e("div", {
|
|
16091
16091
|
className: "data-view__card-sort-field",
|
|
@@ -16099,11 +16099,11 @@ function yi({ columns: t, data: r, rowKey: c, pinnedIds: l, selectable: o = !1,
|
|
|
16099
16099
|
usePortal: !1,
|
|
16100
16100
|
onChange: (G) => {
|
|
16101
16101
|
if (!G || Array.isArray(G)) {
|
|
16102
|
-
|
|
16102
|
+
W1(null, S1);
|
|
16103
16103
|
return;
|
|
16104
16104
|
}
|
|
16105
16105
|
const s1 = String(G.value);
|
|
16106
|
-
|
|
16106
|
+
W1(s1, V1 === s1 ? S1 : "asc");
|
|
16107
16107
|
}
|
|
16108
16108
|
})
|
|
16109
16109
|
}), /* @__PURE__ */ e(c1, {
|
|
@@ -16112,7 +16112,7 @@ function yi({ columns: t, data: r, rowKey: c, pinnedIds: l, selectable: o = !1,
|
|
|
16112
16112
|
className: "data-view__card-sort-direction",
|
|
16113
16113
|
disabled: !X0,
|
|
16114
16114
|
onClick: () => {
|
|
16115
|
-
X0 &&
|
|
16115
|
+
X0 && W1(X0.key, S1 === "asc" ? "desc" : "asc");
|
|
16116
16116
|
},
|
|
16117
16117
|
variant: "ghost",
|
|
16118
16118
|
children: /* @__PURE__ */ e(j, { name: S1 === "asc" ? "arrow-up" : "arrow-down" })
|
|
@@ -16129,7 +16129,7 @@ function yi({ columns: t, data: r, rowKey: c, pinnedIds: l, selectable: o = !1,
|
|
|
16129
16129
|
/* @__PURE__ */ e(xl, {
|
|
16130
16130
|
data: X,
|
|
16131
16131
|
columns: t,
|
|
16132
|
-
rowKey:
|
|
16132
|
+
rowKey: j1,
|
|
16133
16133
|
card: h,
|
|
16134
16134
|
actions: p,
|
|
16135
16135
|
timeline: g,
|
|
@@ -16140,7 +16140,7 @@ function yi({ columns: t, data: r, rowKey: c, pinnedIds: l, selectable: o = !1,
|
|
|
16140
16140
|
selectable: o,
|
|
16141
16141
|
selectedIds: f1,
|
|
16142
16142
|
pinnedIds: l,
|
|
16143
|
-
cardMaxWidth:
|
|
16143
|
+
cardMaxWidth: x,
|
|
16144
16144
|
isMobile: O,
|
|
16145
16145
|
groups: K1 ?? void 0,
|
|
16146
16146
|
showGroupCount: A?.showCount !== !1,
|
|
@@ -16148,10 +16148,10 @@ function yi({ columns: t, data: r, rowKey: c, pinnedIds: l, selectable: o = !1,
|
|
|
16148
16148
|
collapsedGroups: k1,
|
|
16149
16149
|
onToggleGroup: T1,
|
|
16150
16150
|
onToggleSelect: (G, s1) => {
|
|
16151
|
-
|
|
16151
|
+
F1(s1 ? [...f1, G] : f1.filter((g1) => g1 !== G));
|
|
16152
16152
|
}
|
|
16153
16153
|
}),
|
|
16154
|
-
/* @__PURE__ */ e(
|
|
16154
|
+
/* @__PURE__ */ e(Y2, {
|
|
16155
16155
|
currentPage: Q,
|
|
16156
16156
|
totalPages: l0,
|
|
16157
16157
|
totalItems: c0,
|
|
@@ -16164,7 +16164,7 @@ function yi({ columns: t, data: r, rowKey: c, pinnedIds: l, selectable: o = !1,
|
|
|
16164
16164
|
})
|
|
16165
16165
|
]
|
|
16166
16166
|
});
|
|
16167
|
-
const k0 = t.filter((G) => !G.hideInTable), n4 = o && f1.length > 0 && f1.length === r.length, a4 = o && f1.length > 0 && f1.length < r.length, d0 = g && D0.size > 0,
|
|
16167
|
+
const k0 = t.filter((G) => !G.hideInTable), n4 = o && f1.length > 0 && f1.length === r.length, a4 = o && f1.length > 0 && f1.length < r.length, d0 = g && D0.size > 0, A2 = /* @__PURE__ */ n(h1, { children: [
|
|
16168
16168
|
K0,
|
|
16169
16169
|
/* @__PURE__ */ e("div", {
|
|
16170
16170
|
className: "data-view__wrapper",
|
|
@@ -16176,7 +16176,7 @@ function yi({ columns: t, data: r, rowKey: c, pinnedIds: l, selectable: o = !1,
|
|
|
16176
16176
|
checked: n4,
|
|
16177
16177
|
indeterminate: a4,
|
|
16178
16178
|
onChange: (G) => {
|
|
16179
|
-
|
|
16179
|
+
F1(G ? r.map(j1) : []);
|
|
16180
16180
|
}
|
|
16181
16181
|
})
|
|
16182
16182
|
}),
|
|
@@ -16188,7 +16188,7 @@ function yi({ columns: t, data: r, rowKey: c, pinnedIds: l, selectable: o = !1,
|
|
|
16188
16188
|
onClick: () => Y0(G),
|
|
16189
16189
|
children: [/* @__PURE__ */ n("span", {
|
|
16190
16190
|
className: "data-view__th-content",
|
|
16191
|
-
children: [
|
|
16191
|
+
children: [S3(G), G.sortable && /* @__PURE__ */ e(Vl, { state: V1 === G.key ? S1 : "unsorted" })]
|
|
16192
16192
|
}), /* @__PURE__ */ e("span", {
|
|
16193
16193
|
className: "data-view__resizer",
|
|
16194
16194
|
onMouseDown: (g1) => _0(g1, G.key),
|
|
@@ -16226,7 +16226,7 @@ function yi({ columns: t, data: r, rowKey: c, pinnedIds: l, selectable: o = !1,
|
|
|
16226
16226
|
}) : /* @__PURE__ */ e(a0, { title: "No data available" })
|
|
16227
16227
|
}) });
|
|
16228
16228
|
const G = k0.length + (d0 ? 1 : 0) + (o ? 1 : 0) + (p ? 1 : 0), s1 = A?.showCount !== !1, g1 = (n1, i1) => {
|
|
16229
|
-
const y1 =
|
|
16229
|
+
const y1 = j1(n1, i1), $1 = f1.includes(y1), H1 = o0.has(y1), I1 = D0.get(i1), x1 = w?.(n1), $2 = !!v || !!x1, i4 = (_1) => {
|
|
16230
16230
|
if (x1 && (_1.metaKey || _1.ctrlKey || _1.shiftKey)) {
|
|
16231
16231
|
window.open(x1, "_blank", "noopener,noreferrer");
|
|
16232
16232
|
return;
|
|
@@ -16240,8 +16240,8 @@ function yi({ columns: t, data: r, rowKey: c, pinnedIds: l, selectable: o = !1,
|
|
|
16240
16240
|
_1.button !== 1 || !x1 || (_1.preventDefault(), window.open(x1, "_blank", "noopener,noreferrer"));
|
|
16241
16241
|
}, Q0 = y?.(n1);
|
|
16242
16242
|
return /* @__PURE__ */ n(w1.Fragment, { children: [/* @__PURE__ */ n("tr", {
|
|
16243
|
-
className: `${$1 ? "is-selected" : ""} ${
|
|
16244
|
-
onClick:
|
|
16243
|
+
className: `${$1 ? "is-selected" : ""} ${$2 ? "data-view__row--clickable" : ""} ${H1 ? "data-view__row--pinned" : ""} ${f?.(n1) || ""}`,
|
|
16244
|
+
onClick: $2 ? i4 : void 0,
|
|
16245
16245
|
onAuxClick: x1 ? o4 : void 0,
|
|
16246
16246
|
children: [
|
|
16247
16247
|
d0 && /* @__PURE__ */ e("td", {
|
|
@@ -16253,7 +16253,7 @@ function yi({ columns: t, data: r, rowKey: c, pinnedIds: l, selectable: o = !1,
|
|
|
16253
16253
|
children: /* @__PURE__ */ e(e0, {
|
|
16254
16254
|
checked: $1,
|
|
16255
16255
|
onChange: (_1) => {
|
|
16256
|
-
|
|
16256
|
+
F1(_1 ? [...f1, y1] : f1.filter((J0) => J0 !== y1));
|
|
16257
16257
|
}
|
|
16258
16258
|
})
|
|
16259
16259
|
}),
|
|
@@ -16266,7 +16266,7 @@ function yi({ columns: t, data: r, rowKey: c, pinnedIds: l, selectable: o = !1,
|
|
|
16266
16266
|
name: "pin",
|
|
16267
16267
|
size: "sm"
|
|
16268
16268
|
})
|
|
16269
|
-
}),
|
|
16269
|
+
}), H3(_1, n1)]
|
|
16270
16270
|
}, _1.key)),
|
|
16271
16271
|
p && /* @__PURE__ */ e("td", {
|
|
16272
16272
|
className: "data-view__actions-cell",
|
|
@@ -16321,7 +16321,7 @@ function yi({ columns: t, data: r, rowKey: c, pinnedIds: l, selectable: o = !1,
|
|
|
16321
16321
|
return X.map((n1, i1) => g1(n1, i1));
|
|
16322
16322
|
})() })] })
|
|
16323
16323
|
}),
|
|
16324
|
-
/* @__PURE__ */ e(
|
|
16324
|
+
/* @__PURE__ */ e(Y2, {
|
|
16325
16325
|
currentPage: Q,
|
|
16326
16326
|
totalPages: l0,
|
|
16327
16327
|
totalItems: L1.length,
|
|
@@ -16337,8 +16337,8 @@ function yi({ columns: t, data: r, rowKey: c, pinnedIds: l, selectable: o = !1,
|
|
|
16337
16337
|
className: `data-view${B ? ` ${B}` : ""}`,
|
|
16338
16338
|
children: d0 ? /* @__PURE__ */ n("div", {
|
|
16339
16339
|
className: "timeline-markers",
|
|
16340
|
-
children: [/* @__PURE__ */ e("div", { className: "timeline-markers__track" }),
|
|
16341
|
-
}) :
|
|
16340
|
+
children: [/* @__PURE__ */ e("div", { className: "timeline-markers__track" }), A2]
|
|
16341
|
+
}) : A2
|
|
16342
16342
|
});
|
|
16343
16343
|
}
|
|
16344
16344
|
var n0 = (t) => {
|
|
@@ -16350,9 +16350,9 @@ var n0 = (t) => {
|
|
|
16350
16350
|
const [i, h] = R({}), [p, u] = R(() => /* @__PURE__ */ new Date()), [g, v] = R(null), [w, f] = R(d), [y, _] = R({
|
|
16351
16351
|
position: "fixed",
|
|
16352
16352
|
visibility: "hidden"
|
|
16353
|
-
}), [C, L] = R(r?.start ?? ""), [z,
|
|
16354
|
-
start:
|
|
16355
|
-
end:
|
|
16353
|
+
}), [C, L] = R(r?.start ?? ""), [z, V] = R(r?.end ?? ""), k = F(null), b = F(null), M = r ?? i, N = n0(M.start), x = n0(M.end), B = N && x ? {
|
|
16354
|
+
start: N,
|
|
16355
|
+
end: x
|
|
16356
16356
|
} : void 0, H = (q) => {
|
|
16357
16357
|
r || h(q), c?.(q);
|
|
16358
16358
|
}, E = (q) => {
|
|
@@ -16364,14 +16364,14 @@ var n0 = (t) => {
|
|
|
16364
16364
|
v(q);
|
|
16365
16365
|
}, J = (q) => /^\d{4}-\d{2}-\d{2}$/.test(q) && n0(q) !== void 0, A = () => {
|
|
16366
16366
|
J(C) ? H({
|
|
16367
|
-
...
|
|
16367
|
+
...M,
|
|
16368
16368
|
start: C
|
|
16369
|
-
}) : L(
|
|
16369
|
+
}) : L(M.start ?? "");
|
|
16370
16370
|
}, T = () => {
|
|
16371
16371
|
J(z) ? H({
|
|
16372
|
-
...
|
|
16372
|
+
...M,
|
|
16373
16373
|
end: z
|
|
16374
|
-
}) :
|
|
16374
|
+
}) : V(M.end ?? "");
|
|
16375
16375
|
}, S = (q) => {
|
|
16376
16376
|
const m1 = /* @__PURE__ */ new Date(), t1 = /* @__PURE__ */ new Date();
|
|
16377
16377
|
t1.setDate(t1.getDate() - q), H({
|
|
@@ -16380,13 +16380,13 @@ var n0 = (t) => {
|
|
|
16380
16380
|
});
|
|
16381
16381
|
};
|
|
16382
16382
|
Y(() => {
|
|
16383
|
-
L(
|
|
16384
|
-
}, [
|
|
16385
|
-
|
|
16386
|
-
}, [
|
|
16383
|
+
L(M.start ?? "");
|
|
16384
|
+
}, [M.start]), Y(() => {
|
|
16385
|
+
V(M.end ?? "");
|
|
16386
|
+
}, [M.end]);
|
|
16387
16387
|
const $ = l1(() => C0(p, 1), [p]), e1 = d || w, O = !d && w, Z = D(() => {
|
|
16388
|
-
if (!O || !
|
|
16389
|
-
const q =
|
|
16388
|
+
if (!O || !k.current || !b.current) return;
|
|
16389
|
+
const q = k.current.getBoundingClientRect(), m1 = b.current.getBoundingClientRect(), t1 = 16, C1 = 8, f1 = window.innerHeight - q.bottom - t1, A1 = q.top - t1, a1 = f1 < m1.height && A1 > m1.height ? q.top - m1.height - C1 : q.bottom + C1, u1 = Math.max(t1, Math.min(a1, window.innerHeight - m1.height - t1)), I = q.left, K = Math.max(t1, Math.min(I, window.innerWidth - m1.width - t1));
|
|
16390
16390
|
_({
|
|
16391
16391
|
position: "fixed",
|
|
16392
16392
|
top: `${u1}px`,
|
|
@@ -16412,7 +16412,7 @@ var n0 = (t) => {
|
|
|
16412
16412
|
if (!O) return;
|
|
16413
16413
|
const q = (t1) => {
|
|
16414
16414
|
const C1 = t1.target;
|
|
16415
|
-
|
|
16415
|
+
k.current?.contains(C1) || b.current?.contains(C1) || f(!1);
|
|
16416
16416
|
}, m1 = (t1) => {
|
|
16417
16417
|
t1.key === "Escape" && f(!1);
|
|
16418
16418
|
};
|
|
@@ -16483,7 +16483,7 @@ var n0 = (t) => {
|
|
|
16483
16483
|
})]
|
|
16484
16484
|
});
|
|
16485
16485
|
return /* @__PURE__ */ n("div", {
|
|
16486
|
-
ref:
|
|
16486
|
+
ref: k,
|
|
16487
16487
|
className: "date-range-picker",
|
|
16488
16488
|
children: [
|
|
16489
16489
|
t && m && m.length > 0 ? /* @__PURE__ */ n("div", {
|
|
@@ -16530,7 +16530,7 @@ var n0 = (t) => {
|
|
|
16530
16530
|
value: z,
|
|
16531
16531
|
placeholder: "YYYY-MM-DD",
|
|
16532
16532
|
maxLength: 10,
|
|
16533
|
-
onChange:
|
|
16533
|
+
onChange: V,
|
|
16534
16534
|
onBlur: T
|
|
16535
16535
|
}),
|
|
16536
16536
|
!d && /* @__PURE__ */ e(U, {
|
|
@@ -16542,7 +16542,7 @@ var n0 = (t) => {
|
|
|
16542
16542
|
]
|
|
16543
16543
|
}),
|
|
16544
16544
|
d && e1 && W,
|
|
16545
|
-
O &&
|
|
16545
|
+
O && Y1(/* @__PURE__ */ e("div", {
|
|
16546
16546
|
ref: b,
|
|
16547
16547
|
className: "date-range-picker__overlay",
|
|
16548
16548
|
style: y,
|
|
@@ -16550,7 +16550,7 @@ var n0 = (t) => {
|
|
|
16550
16550
|
}), document.body)
|
|
16551
16551
|
]
|
|
16552
16552
|
});
|
|
16553
|
-
},
|
|
16553
|
+
}, R3 = ({ enabled: t = !0, maxDurationMs: r = 800, onSwipeDown: c, onSwipeLeft: l, onSwipeRight: o, onSwipeUp: d, restraint: s = 80, threshold: m = 60 }) => {
|
|
16554
16554
|
const a = F(null);
|
|
16555
16555
|
return {
|
|
16556
16556
|
onTouchStart: D((i) => {
|
|
@@ -16590,13 +16590,120 @@ var n0 = (t) => {
|
|
|
16590
16590
|
a.current = null;
|
|
16591
16591
|
}, [])
|
|
16592
16592
|
};
|
|
16593
|
-
},
|
|
16593
|
+
}, Sl = 1e3, X2 = 0, N2 = ({ isOpen: t, onClose: r, position: c = "left", width: l = "320px", maxWidth: o = "none", margin: d = 0, borderRadius: s = 0, shadow: m = "none", children: a, title: i, icon: h, className: p = "", showOverlay: u = !0, lockScroll: g = !0, hideClose: v = !1, actions: w = [], onBack: f, backLabel: y = "Back", primary: _, secondary: C, footer: L }) => {
|
|
16594
|
+
g3(t && g);
|
|
16595
|
+
const [z, V] = R(0);
|
|
16596
|
+
if (Y(() => {
|
|
16597
|
+
t && (X2 += 1, V(X2));
|
|
16598
|
+
}, [t]), Y(() => {
|
|
16599
|
+
const x = (B) => {
|
|
16600
|
+
B.key === "Escape" && t && r();
|
|
16601
|
+
};
|
|
16602
|
+
return document.addEventListener("keydown", x), () => document.removeEventListener("keydown", x);
|
|
16603
|
+
}, [t, r]), !t) return null;
|
|
16604
|
+
const k = (x) => typeof x == "number" ? `${x}px` : x, b = Sl + z * 2, M = {
|
|
16605
|
+
"--drawer-width": l,
|
|
16606
|
+
"--drawer-max-width": k(o),
|
|
16607
|
+
"--drawer-margin": k(d),
|
|
16608
|
+
"--drawer-border-radius": k(s),
|
|
16609
|
+
"--drawer-shadow": m,
|
|
16610
|
+
zIndex: b + 1
|
|
16611
|
+
}, N = L || _ || C;
|
|
16612
|
+
return /* @__PURE__ */ n(h1, { children: [u && /* @__PURE__ */ e("div", {
|
|
16613
|
+
className: "drawer-overlay",
|
|
16614
|
+
onClick: r,
|
|
16615
|
+
style: { zIndex: b }
|
|
16616
|
+
}), /* @__PURE__ */ n("div", {
|
|
16617
|
+
className: `drawer drawer--${c} ${p}`,
|
|
16618
|
+
style: M,
|
|
16619
|
+
children: [
|
|
16620
|
+
/* @__PURE__ */ n("div", {
|
|
16621
|
+
className: "drawer__header",
|
|
16622
|
+
children: [
|
|
16623
|
+
f && /* @__PURE__ */ e(c1, {
|
|
16624
|
+
title: y,
|
|
16625
|
+
position: "bottom",
|
|
16626
|
+
children: /* @__PURE__ */ e(U, {
|
|
16627
|
+
className: "drawer__back",
|
|
16628
|
+
onClick: f,
|
|
16629
|
+
size: "small",
|
|
16630
|
+
variant: "ghost",
|
|
16631
|
+
icon: "arrow-left"
|
|
16632
|
+
})
|
|
16633
|
+
}),
|
|
16634
|
+
(i || h) && /* @__PURE__ */ n("h2", {
|
|
16635
|
+
className: "drawer__title",
|
|
16636
|
+
children: [h && /* @__PURE__ */ e(j, { name: h }), i && /* @__PURE__ */ e("span", {
|
|
16637
|
+
className: "drawer__title-text",
|
|
16638
|
+
children: i
|
|
16639
|
+
})]
|
|
16640
|
+
}),
|
|
16641
|
+
w.length > 0 && /* @__PURE__ */ e("div", {
|
|
16642
|
+
className: "drawer__header-actions",
|
|
16643
|
+
children: w.map((x) => {
|
|
16644
|
+
const B = /* @__PURE__ */ e(U, {
|
|
16645
|
+
disabled: x.disabled,
|
|
16646
|
+
onClick: x.onClick,
|
|
16647
|
+
icon: x.icon,
|
|
16648
|
+
emojiIcon: x.emojiIcon,
|
|
16649
|
+
size: x.size ?? "small",
|
|
16650
|
+
variant: x.variant ?? "ghost",
|
|
16651
|
+
children: x.label
|
|
16652
|
+
}), H = x.title ?? x.label;
|
|
16653
|
+
return H ? /* @__PURE__ */ e(c1, {
|
|
16654
|
+
title: H,
|
|
16655
|
+
position: "bottom",
|
|
16656
|
+
children: B
|
|
16657
|
+
}, x.id) : /* @__PURE__ */ e(w1.Fragment, { children: B }, x.id);
|
|
16658
|
+
})
|
|
16659
|
+
}),
|
|
16660
|
+
!v && /* @__PURE__ */ e(c1, {
|
|
16661
|
+
title: "Close drawer",
|
|
16662
|
+
children: /* @__PURE__ */ e(U, {
|
|
16663
|
+
className: "drawer__close",
|
|
16664
|
+
icon: "clear",
|
|
16665
|
+
onClick: r,
|
|
16666
|
+
size: "medium",
|
|
16667
|
+
variant: "ghost"
|
|
16668
|
+
})
|
|
16669
|
+
})
|
|
16670
|
+
]
|
|
16671
|
+
}),
|
|
16672
|
+
/* @__PURE__ */ e("div", {
|
|
16673
|
+
className: "drawer__content",
|
|
16674
|
+
children: a
|
|
16675
|
+
}),
|
|
16676
|
+
N && /* @__PURE__ */ n("div", {
|
|
16677
|
+
className: "drawer__footer",
|
|
16678
|
+
children: [L && /* @__PURE__ */ e("div", {
|
|
16679
|
+
className: "drawer__footer-content",
|
|
16680
|
+
children: L
|
|
16681
|
+
}), (_ || C) && /* @__PURE__ */ n("div", {
|
|
16682
|
+
className: "drawer__footer-actions",
|
|
16683
|
+
children: [C && /* @__PURE__ */ e(U, {
|
|
16684
|
+
variant: C.variant || "default",
|
|
16685
|
+
icon: C.icon,
|
|
16686
|
+
disabled: C.disabled,
|
|
16687
|
+
onClick: C.onClick,
|
|
16688
|
+
children: C.text
|
|
16689
|
+
}), _ && /* @__PURE__ */ e(U, {
|
|
16690
|
+
variant: _.variant || "info",
|
|
16691
|
+
icon: _.icon,
|
|
16692
|
+
disabled: _.disabled,
|
|
16693
|
+
onClick: _.onClick,
|
|
16694
|
+
children: _.text
|
|
16695
|
+
})]
|
|
16696
|
+
})]
|
|
16697
|
+
})
|
|
16698
|
+
]
|
|
16699
|
+
})] });
|
|
16700
|
+
}, B1 = (t) => new Date(t.getFullYear(), t.getMonth(), t.getDate()), Hl = (t, r) => {
|
|
16594
16701
|
const c = (t.getDay() - r + 7) % 7;
|
|
16595
16702
|
return S0(B1(t), -c);
|
|
16596
|
-
},
|
|
16597
|
-
const c =
|
|
16703
|
+
}, B3 = (t, r) => {
|
|
16704
|
+
const c = Hl(t, r);
|
|
16598
16705
|
return Array.from({ length: 7 }, (l, o) => S0(c, o));
|
|
16599
|
-
},
|
|
16706
|
+
}, K2 = (t) => t.getHours() * 60 + t.getMinutes(), Rl = (t, r) => t.end ?? new Date(t.start.getTime() + r * 6e4), V2 = (t, r) => r.map((c) => {
|
|
16600
16707
|
const l = [], o = [];
|
|
16601
16708
|
return t.forEach((d) => {
|
|
16602
16709
|
if (d.allDay) {
|
|
@@ -16610,14 +16717,14 @@ var n0 = (t) => {
|
|
|
16610
16717
|
allDay: l,
|
|
16611
16718
|
timed: o
|
|
16612
16719
|
};
|
|
16613
|
-
}),
|
|
16720
|
+
}), A3 = (t, r, c, l) => {
|
|
16614
16721
|
if (t.length === 0) return [];
|
|
16615
16722
|
const o = r * 60, d = c * 60, s = Math.max(d - o, 1), m = t.map((u) => {
|
|
16616
|
-
const g =
|
|
16723
|
+
const g = K2(u.start);
|
|
16617
16724
|
return {
|
|
16618
16725
|
event: u,
|
|
16619
16726
|
start: g,
|
|
16620
|
-
end: Math.max(
|
|
16727
|
+
end: Math.max(K2(Rl(u, l)), g + 15)
|
|
16621
16728
|
};
|
|
16622
16729
|
}), a = [];
|
|
16623
16730
|
let i = [], h = -1;
|
|
@@ -16643,11 +16750,11 @@ var n0 = (t) => {
|
|
|
16643
16750
|
return [...m].sort((u, g) => u.start - g.start || u.end - g.end).forEach((u) => {
|
|
16644
16751
|
i.length > 0 && u.start >= h && p(), i.push(u), h = Math.max(h, u.end);
|
|
16645
16752
|
}), p(), a;
|
|
16646
|
-
},
|
|
16753
|
+
}, Bl = (t, r, c) => {
|
|
16647
16754
|
if (!c) return new Date(r);
|
|
16648
16755
|
const l = B1(r);
|
|
16649
16756
|
return l.setHours(t.start.getHours(), t.start.getMinutes(), 0, 0), l;
|
|
16650
|
-
}, j0 = (t, r) => !r || t >= r.start && t < r.end,
|
|
16757
|
+
}, j0 = (t, r) => !r || t >= r.start && t < r.end, $3 = (t) => `${t.toString().padStart(2, "0")}:00`, Al = (t) => `${t.getHours().toString().padStart(2, "0")}:${t.getMinutes().toString().padStart(2, "0")}`;
|
|
16651
16758
|
function H0({ className: t, dragEnabled: r, event: c, isDragging: l, onClick: o, onDragEnd: d, onDragStart: s, renderEvent: m, showTime: a = !1, style: i }) {
|
|
16652
16759
|
const h = r && c.draggable !== !1, p = (g) => {
|
|
16653
16760
|
g.stopPropagation(), o?.(c);
|
|
@@ -16679,7 +16786,7 @@ function H0({ className: t, dragEnabled: r, event: c, isDragging: l, onClick: o,
|
|
|
16679
16786
|
}),
|
|
16680
16787
|
a && !c.allDay && /* @__PURE__ */ e("span", {
|
|
16681
16788
|
className: "event-calendar__chip-time",
|
|
16682
|
-
children:
|
|
16789
|
+
children: Al(c.start)
|
|
16683
16790
|
}),
|
|
16684
16791
|
/* @__PURE__ */ e("span", {
|
|
16685
16792
|
className: "event-calendar__chip-title",
|
|
@@ -16688,94 +16795,93 @@ function H0({ className: t, dragEnabled: r, event: c, isDragging: l, onClick: o,
|
|
|
16688
16795
|
] })
|
|
16689
16796
|
});
|
|
16690
16797
|
}
|
|
16691
|
-
var
|
|
16798
|
+
var $l = 8, P0 = () => {
|
|
16692
16799
|
};
|
|
16693
|
-
function
|
|
16694
|
-
const
|
|
16695
|
-
|
|
16800
|
+
function Dl({ activeHours: t, className: r, date: c, dayEndHour: l = 24, dayStartHour: o = 0, defaultDurationMinutes: d = 30, emptyLabel: s = "Nothing scheduled", events: m, hourHeight: a = 44, isOpen: i, onAdd: h, onClose: p, onDateChange: u, onEventClick: g, position: v = "right", renderEvent: w, width: f = "min(480px, 100vw)" }) {
|
|
16801
|
+
const y = F(null), _ = l1(() => V2(m, [B1(c)])[0], [c, m]), C = l1(() => Array.from({ length: Math.max(l - o, 1) }, (M, N) => o + N), [o, l]), L = l1(() => A3(_.timed, o, l, d), [
|
|
16802
|
+
_.timed,
|
|
16696
16803
|
l,
|
|
16697
16804
|
o,
|
|
16698
16805
|
d
|
|
16699
|
-
]),
|
|
16700
|
-
const M =
|
|
16701
|
-
return M.length > 0 ? Math.min(...M) : t?.start ??
|
|
16702
|
-
}, [t,
|
|
16806
|
+
]), z = l1(() => {
|
|
16807
|
+
const M = _.timed.map((N) => N.start.getHours());
|
|
16808
|
+
return M.length > 0 ? Math.min(...M) : t?.start ?? $l;
|
|
16809
|
+
}, [t, _.timed]);
|
|
16703
16810
|
Y(() => {
|
|
16704
|
-
!i || !
|
|
16811
|
+
!i || !y.current || (y.current.scrollTop = Math.max(z - o - 1, 0) * a);
|
|
16705
16812
|
}, [
|
|
16706
16813
|
o,
|
|
16707
|
-
|
|
16814
|
+
z,
|
|
16708
16815
|
a,
|
|
16709
16816
|
i
|
|
16710
16817
|
]);
|
|
16711
|
-
const
|
|
16818
|
+
const V = R3({
|
|
16712
16819
|
enabled: !!u,
|
|
16713
16820
|
onSwipeLeft: () => u?.(S0(B1(c), 1)),
|
|
16714
16821
|
onSwipeRight: () => u?.(S0(B1(c), -1)),
|
|
16715
16822
|
restraint: 50
|
|
16716
|
-
}),
|
|
16717
|
-
const
|
|
16718
|
-
return
|
|
16719
|
-
},
|
|
16720
|
-
return /* @__PURE__ */ n(
|
|
16823
|
+
}), k = (M) => {
|
|
16824
|
+
const N = B1(c);
|
|
16825
|
+
return N.setHours(M, 0, 0, 0), N;
|
|
16826
|
+
}, b = C.length * a;
|
|
16827
|
+
return /* @__PURE__ */ n(N2, {
|
|
16721
16828
|
className: ["day-agenda", r ?? ""].filter(Boolean).join(" "),
|
|
16722
|
-
fullHeight: !0,
|
|
16723
16829
|
isOpen: i,
|
|
16724
16830
|
onClose: p,
|
|
16725
|
-
|
|
16726
|
-
|
|
16727
|
-
title:
|
|
16728
|
-
|
|
16831
|
+
position: v,
|
|
16832
|
+
showOverlay: !0,
|
|
16833
|
+
title: O1(c, "DD MMM YYYY"),
|
|
16834
|
+
width: f,
|
|
16729
16835
|
children: [
|
|
16730
16836
|
/* @__PURE__ */ n("div", {
|
|
16731
16837
|
className: "day-agenda__weekday",
|
|
16732
|
-
children: [/* @__PURE__ */ e("span", { children: c.toLocaleDateString(void 0, { weekday: "long" }) }),
|
|
16838
|
+
children: [/* @__PURE__ */ e("span", { children: c.toLocaleDateString(void 0, { weekday: "long" }) }), _.allDay.length === 0 && _.timed.length === 0 && /* @__PURE__ */ e("span", {
|
|
16733
16839
|
className: "day-agenda__empty",
|
|
16734
16840
|
children: s
|
|
16735
16841
|
})]
|
|
16736
16842
|
}),
|
|
16737
|
-
|
|
16843
|
+
_.allDay.length > 0 && /* @__PURE__ */ n("div", {
|
|
16738
16844
|
className: "day-agenda__all-day",
|
|
16739
16845
|
children: [/* @__PURE__ */ e("div", {
|
|
16740
16846
|
className: "day-agenda__gutter-label",
|
|
16741
16847
|
children: "All day"
|
|
16742
16848
|
}), /* @__PURE__ */ e("div", {
|
|
16743
16849
|
className: "day-agenda__all-day-cell",
|
|
16744
|
-
children:
|
|
16850
|
+
children: _.allDay.map((M) => /* @__PURE__ */ e(H0, {
|
|
16745
16851
|
dragEnabled: !1,
|
|
16746
16852
|
event: M,
|
|
16747
16853
|
isDragging: !1,
|
|
16748
16854
|
onClick: g,
|
|
16749
16855
|
onDragEnd: P0,
|
|
16750
16856
|
onDragStart: P0,
|
|
16751
|
-
renderEvent:
|
|
16857
|
+
renderEvent: w
|
|
16752
16858
|
}, M.id))
|
|
16753
16859
|
})]
|
|
16754
16860
|
}),
|
|
16755
16861
|
/* @__PURE__ */ n("div", {
|
|
16756
16862
|
className: "day-agenda__body",
|
|
16757
|
-
ref:
|
|
16758
|
-
...
|
|
16863
|
+
ref: y,
|
|
16864
|
+
...V,
|
|
16759
16865
|
children: [/* @__PURE__ */ e("div", {
|
|
16760
16866
|
className: "day-agenda__gutter",
|
|
16761
|
-
style: { height:
|
|
16762
|
-
children:
|
|
16867
|
+
style: { height: b },
|
|
16868
|
+
children: C.map((M) => /* @__PURE__ */ e("div", {
|
|
16763
16869
|
className: ["day-agenda__gutter-hour", j0(M, t) ? "" : "day-agenda__gutter-hour--inactive"].filter(Boolean).join(" "),
|
|
16764
16870
|
style: { height: a },
|
|
16765
|
-
children: /* @__PURE__ */ e("span", { children:
|
|
16871
|
+
children: /* @__PURE__ */ e("span", { children: $3(M) })
|
|
16766
16872
|
}, M))
|
|
16767
16873
|
}), /* @__PURE__ */ n("div", {
|
|
16768
16874
|
className: "day-agenda__column",
|
|
16769
|
-
style: { height:
|
|
16770
|
-
children: [
|
|
16875
|
+
style: { height: b },
|
|
16876
|
+
children: [C.map((M) => /* @__PURE__ */ e("div", {
|
|
16771
16877
|
className: [
|
|
16772
16878
|
"day-agenda__slot",
|
|
16773
16879
|
j0(M, t) ? "" : "day-agenda__slot--inactive",
|
|
16774
16880
|
h ? "day-agenda__slot--clickable" : ""
|
|
16775
16881
|
].filter(Boolean).join(" "),
|
|
16776
|
-
onClick: () => h?.(
|
|
16882
|
+
onClick: () => h?.(k(M)),
|
|
16777
16883
|
style: { height: a }
|
|
16778
|
-
}, M)),
|
|
16884
|
+
}, M)), L.map((M) => /* @__PURE__ */ e(H0, {
|
|
16779
16885
|
className: "event-calendar__chip--positioned day-agenda__chip",
|
|
16780
16886
|
dragEnabled: !1,
|
|
16781
16887
|
event: M.event,
|
|
@@ -16783,7 +16889,7 @@ function $l({ activeHours: t, className: r, date: c, dayEndHour: l = 24, dayStar
|
|
|
16783
16889
|
onClick: g,
|
|
16784
16890
|
onDragEnd: P0,
|
|
16785
16891
|
onDragStart: P0,
|
|
16786
|
-
renderEvent:
|
|
16892
|
+
renderEvent: w,
|
|
16787
16893
|
showTime: !0,
|
|
16788
16894
|
style: {
|
|
16789
16895
|
top: `${M.top}%`,
|
|
@@ -16797,7 +16903,7 @@ function $l({ activeHours: t, className: r, date: c, dayEndHour: l = 24, dayStar
|
|
|
16797
16903
|
]
|
|
16798
16904
|
});
|
|
16799
16905
|
}
|
|
16800
|
-
function
|
|
16906
|
+
function D3(t, r) {
|
|
16801
16907
|
const c = t.length, l = r.length, o = c + l, d = new Array(2 * o + 1).fill(0), s = [];
|
|
16802
16908
|
e: for (let h = 0; h <= o; h++) {
|
|
16803
16909
|
s.push([...d]);
|
|
@@ -16832,8 +16938,8 @@ function $3(t, r) {
|
|
|
16832
16938
|
}
|
|
16833
16939
|
return m;
|
|
16834
16940
|
}
|
|
16835
|
-
function
|
|
16836
|
-
const c =
|
|
16941
|
+
function El(t, r) {
|
|
16942
|
+
const c = D3(t.split(`
|
|
16837
16943
|
`), r.split(`
|
|
16838
16944
|
`)), l = [];
|
|
16839
16945
|
let o = 1, d = 1, s = 0;
|
|
@@ -16866,17 +16972,17 @@ function Dl(t, r) {
|
|
|
16866
16972
|
}
|
|
16867
16973
|
return l;
|
|
16868
16974
|
}
|
|
16869
|
-
function
|
|
16975
|
+
function Tl(t, r) {
|
|
16870
16976
|
const c = (l) => l.match(/\S+|\s+/g) ?? [];
|
|
16871
|
-
return
|
|
16977
|
+
return D3(c(t), c(r));
|
|
16872
16978
|
}
|
|
16873
|
-
var
|
|
16979
|
+
var Pl = ({ a: t, b: r, side: c }) => /* @__PURE__ */ e(h1, { children: Tl(t, r).map((l, o) => l.kind === "eq" ? /* @__PURE__ */ e("span", { children: l.val }, o) : l.kind === "del" && c === "old" ? /* @__PURE__ */ e("mark", {
|
|
16874
16980
|
className: "dv-word dv-word--del",
|
|
16875
16981
|
children: l.val
|
|
16876
16982
|
}, o) : l.kind === "ins" && c === "new" ? /* @__PURE__ */ e("mark", {
|
|
16877
16983
|
className: "dv-word dv-word--ins",
|
|
16878
16984
|
children: l.val
|
|
16879
|
-
}, o) : null) }),
|
|
16985
|
+
}, o) : null) }), Il = [
|
|
16880
16986
|
{
|
|
16881
16987
|
name: "comment",
|
|
16882
16988
|
pattern: /\/\/.*$|\/\*[\s\S]*?\*\/|#.*$/m
|
|
@@ -16906,12 +17012,12 @@ var Tl = ({ a: t, b: r, side: c }) => /* @__PURE__ */ e(h1, { children: El(t, r)
|
|
|
16906
17012
|
pattern: /\b[a-zA-Z_$][a-zA-Z0-9_$]*(?=\s*\()/
|
|
16907
17013
|
}
|
|
16908
17014
|
];
|
|
16909
|
-
function
|
|
17015
|
+
function Gl(t) {
|
|
16910
17016
|
const r = [];
|
|
16911
17017
|
let c = t;
|
|
16912
17018
|
for (; c.length > 0; ) {
|
|
16913
17019
|
let l = !1;
|
|
16914
|
-
for (const { name: o, pattern: d } of
|
|
17020
|
+
for (const { name: o, pattern: d } of Il) {
|
|
16915
17021
|
const s = c.match(new RegExp(`^(?:${d.source})`, d.flags));
|
|
16916
17022
|
if (s) {
|
|
16917
17023
|
r.push({
|
|
@@ -16928,18 +17034,18 @@ function Il(t) {
|
|
|
16928
17034
|
}
|
|
16929
17035
|
return r;
|
|
16930
17036
|
}
|
|
16931
|
-
var
|
|
17037
|
+
var Zl = ({ text: t }) => /* @__PURE__ */ e(h1, { children: l1(() => Gl(t), [t]).map((r, c) => r.name === "plain" ? /* @__PURE__ */ e("span", { children: r.val }, c) : /* @__PURE__ */ e("span", {
|
|
16932
17038
|
className: `dv-token dv-token--${r.name}`,
|
|
16933
17039
|
children: r.val
|
|
16934
17040
|
}, c)) }), h2 = ({ line: t, side: r, type: c }) => {
|
|
16935
17041
|
const l = r === "old" ? t.text ?? t.oldText ?? "" : t.text ?? t.newText ?? "";
|
|
16936
|
-
return t.kind !== "equal" && t.oldText !== void 0 && t.newText !== void 0 ? /* @__PURE__ */ e(
|
|
17042
|
+
return t.kind !== "equal" && t.oldText !== void 0 && t.newText !== void 0 ? /* @__PURE__ */ e(Pl, {
|
|
16937
17043
|
a: t.oldText,
|
|
16938
17044
|
b: t.newText,
|
|
16939
17045
|
side: r
|
|
16940
|
-
}) : c === "code" ? /* @__PURE__ */ e(
|
|
17046
|
+
}) : c === "code" ? /* @__PURE__ */ e(Zl, { text: l }) : /* @__PURE__ */ e(h1, { children: l });
|
|
16941
17047
|
}, _i = ({ oldValue: t, newValue: r, mode: c = "split", type: l = "text", oldTitle: o = "Before", newTitle: d = "After", showLineNumbers: s = !0 }) => {
|
|
16942
|
-
const m = l1(() =>
|
|
17048
|
+
const m = l1(() => El(t, r), [t, r]), a = l1(() => ({
|
|
16943
17049
|
added: m.filter((i) => i.kind === "added").length,
|
|
16944
17050
|
removed: m.filter((i) => i.kind === "removed").length
|
|
16945
17051
|
}), [m]);
|
|
@@ -17059,113 +17165,6 @@ var Gl = ({ text: t }) => /* @__PURE__ */ e(h1, { children: l1(() => Il(t), [t])
|
|
|
17059
17165
|
})
|
|
17060
17166
|
})]
|
|
17061
17167
|
});
|
|
17062
|
-
}, Zl = 1e3, X2 = 0, D3 = ({ isOpen: t, onClose: r, position: c = "left", width: l = "320px", maxWidth: o = "none", margin: d = 0, borderRadius: s = 0, shadow: m = "none", children: a, title: i, icon: h, className: p = "", showOverlay: u = !0, lockScroll: g = !0, hideClose: v = !1, actions: w = [], onBack: f, backLabel: y = "Back", primary: _, secondary: C, footer: L }) => {
|
|
17063
|
-
v3(t && g);
|
|
17064
|
-
const [z, N] = R(0);
|
|
17065
|
-
if (Y(() => {
|
|
17066
|
-
t && (X2 += 1, N(X2));
|
|
17067
|
-
}, [t]), Y(() => {
|
|
17068
|
-
const k = (B) => {
|
|
17069
|
-
B.key === "Escape" && t && r();
|
|
17070
|
-
};
|
|
17071
|
-
return document.addEventListener("keydown", k), () => document.removeEventListener("keydown", k);
|
|
17072
|
-
}, [t, r]), !t) return null;
|
|
17073
|
-
const M = (k) => typeof k == "number" ? `${k}px` : k, b = Zl + z * 2, x = {
|
|
17074
|
-
"--drawer-width": l,
|
|
17075
|
-
"--drawer-max-width": M(o),
|
|
17076
|
-
"--drawer-margin": M(d),
|
|
17077
|
-
"--drawer-border-radius": M(s),
|
|
17078
|
-
"--drawer-shadow": m,
|
|
17079
|
-
zIndex: b + 1
|
|
17080
|
-
}, V = L || _ || C;
|
|
17081
|
-
return /* @__PURE__ */ n(h1, { children: [u && /* @__PURE__ */ e("div", {
|
|
17082
|
-
className: "drawer-overlay",
|
|
17083
|
-
onClick: r,
|
|
17084
|
-
style: { zIndex: b }
|
|
17085
|
-
}), /* @__PURE__ */ n("div", {
|
|
17086
|
-
className: `drawer drawer--${c} ${p}`,
|
|
17087
|
-
style: x,
|
|
17088
|
-
children: [
|
|
17089
|
-
/* @__PURE__ */ n("div", {
|
|
17090
|
-
className: "drawer__header",
|
|
17091
|
-
children: [
|
|
17092
|
-
f && /* @__PURE__ */ e(c1, {
|
|
17093
|
-
title: y,
|
|
17094
|
-
position: "bottom",
|
|
17095
|
-
children: /* @__PURE__ */ e(U, {
|
|
17096
|
-
className: "drawer__back",
|
|
17097
|
-
onClick: f,
|
|
17098
|
-
size: "small",
|
|
17099
|
-
variant: "ghost",
|
|
17100
|
-
icon: "arrow-left"
|
|
17101
|
-
})
|
|
17102
|
-
}),
|
|
17103
|
-
(i || h) && /* @__PURE__ */ n("h2", {
|
|
17104
|
-
className: "drawer__title",
|
|
17105
|
-
children: [h && /* @__PURE__ */ e(j, { name: h }), i && /* @__PURE__ */ e("span", {
|
|
17106
|
-
className: "drawer__title-text",
|
|
17107
|
-
children: i
|
|
17108
|
-
})]
|
|
17109
|
-
}),
|
|
17110
|
-
w.length > 0 && /* @__PURE__ */ e("div", {
|
|
17111
|
-
className: "drawer__header-actions",
|
|
17112
|
-
children: w.map((k) => {
|
|
17113
|
-
const B = /* @__PURE__ */ e(U, {
|
|
17114
|
-
disabled: k.disabled,
|
|
17115
|
-
onClick: k.onClick,
|
|
17116
|
-
icon: k.icon,
|
|
17117
|
-
emojiIcon: k.emojiIcon,
|
|
17118
|
-
size: k.size ?? "small",
|
|
17119
|
-
variant: k.variant ?? "ghost",
|
|
17120
|
-
children: k.label
|
|
17121
|
-
}), H = k.title ?? k.label;
|
|
17122
|
-
return H ? /* @__PURE__ */ e(c1, {
|
|
17123
|
-
title: H,
|
|
17124
|
-
position: "bottom",
|
|
17125
|
-
children: B
|
|
17126
|
-
}, k.id) : /* @__PURE__ */ e(w1.Fragment, { children: B }, k.id);
|
|
17127
|
-
})
|
|
17128
|
-
}),
|
|
17129
|
-
!v && /* @__PURE__ */ e(c1, {
|
|
17130
|
-
title: "Close drawer",
|
|
17131
|
-
children: /* @__PURE__ */ e(U, {
|
|
17132
|
-
className: "drawer__close",
|
|
17133
|
-
icon: "clear",
|
|
17134
|
-
onClick: r,
|
|
17135
|
-
size: "medium",
|
|
17136
|
-
variant: "ghost"
|
|
17137
|
-
})
|
|
17138
|
-
})
|
|
17139
|
-
]
|
|
17140
|
-
}),
|
|
17141
|
-
/* @__PURE__ */ e("div", {
|
|
17142
|
-
className: "drawer__content",
|
|
17143
|
-
children: a
|
|
17144
|
-
}),
|
|
17145
|
-
V && /* @__PURE__ */ n("div", {
|
|
17146
|
-
className: "drawer__footer",
|
|
17147
|
-
children: [L && /* @__PURE__ */ e("div", {
|
|
17148
|
-
className: "drawer__footer-content",
|
|
17149
|
-
children: L
|
|
17150
|
-
}), (_ || C) && /* @__PURE__ */ n("div", {
|
|
17151
|
-
className: "drawer__footer-actions",
|
|
17152
|
-
children: [C && /* @__PURE__ */ e(U, {
|
|
17153
|
-
variant: C.variant || "default",
|
|
17154
|
-
icon: C.icon,
|
|
17155
|
-
disabled: C.disabled,
|
|
17156
|
-
onClick: C.onClick,
|
|
17157
|
-
children: C.text
|
|
17158
|
-
}), _ && /* @__PURE__ */ e(U, {
|
|
17159
|
-
variant: _.variant || "info",
|
|
17160
|
-
icon: _.icon,
|
|
17161
|
-
disabled: _.disabled,
|
|
17162
|
-
onClick: _.onClick,
|
|
17163
|
-
children: _.text
|
|
17164
|
-
})]
|
|
17165
|
-
})]
|
|
17166
|
-
})
|
|
17167
|
-
]
|
|
17168
|
-
})] });
|
|
17169
17168
|
}, jl = {
|
|
17170
17169
|
"⚽": [
|
|
17171
17170
|
"soccer",
|
|
@@ -22326,7 +22325,7 @@ var Gl = ({ text: t }) => /* @__PURE__ */ e(h1, { children: l1(() => Il(t), [t])
|
|
|
22326
22325
|
"Sat"
|
|
22327
22326
|
];
|
|
22328
22327
|
function Jl({ date: t, dragEnabled: r, draggingId: c, emptyLabel: l, events: o, firstDayOfWeek: d, maxEventsPerDay: s, onDayClick: m, onDragEnd: a, onDragStart: i, onDrop: h, onEventClick: p, onOpenDay: u, renderEvent: g, showWeekNumbers: v }) {
|
|
22329
|
-
const [w, f] = R(null), [y, _] = R(null), C = l1(() =>
|
|
22328
|
+
const [w, f] = R(null), [y, _] = R(null), C = l1(() => _3(t.getFullYear(), t.getMonth(), d), [t, d]), L = l1(() => C.flat(), [C]), z = l1(() => V2(o, L), [o, L]), V = l1(() => new Map(z.map((H) => [H.date.toDateString(), H])), [z]), k = l1(() => d === 1 ? [...m2.slice(1), m2[0]] : m2, [d]), b = t.getMonth(), M = o.length > 0, N = /* @__PURE__ */ new Date(), x = (H, E) => {
|
|
22330
22329
|
H.preventDefault(), _(null), h(E, !0);
|
|
22331
22330
|
}, B = (H, E) => {
|
|
22332
22331
|
!r || c === null || (H.preventDefault(), H.dataTransfer.dropEffect = "move", _(E));
|
|
@@ -22339,7 +22338,7 @@ function Jl({ date: t, dragEnabled: r, draggingId: c, emptyLabel: l, events: o,
|
|
|
22339
22338
|
children: [v && /* @__PURE__ */ e("div", {
|
|
22340
22339
|
className: "event-calendar__week-number event-calendar__week-number--head",
|
|
22341
22340
|
children: "Wk"
|
|
22342
|
-
}),
|
|
22341
|
+
}), k.map((H) => /* @__PURE__ */ e("div", {
|
|
22343
22342
|
className: "event-calendar__weekday",
|
|
22344
22343
|
children: H
|
|
22345
22344
|
}, H))]
|
|
@@ -22347,12 +22346,12 @@ function Jl({ date: t, dragEnabled: r, draggingId: c, emptyLabel: l, events: o,
|
|
|
22347
22346
|
/* @__PURE__ */ e("div", {
|
|
22348
22347
|
className: "event-calendar__weeks",
|
|
22349
22348
|
children: C.map((H, E) => /* @__PURE__ */ n("div", {
|
|
22350
|
-
className: ["event-calendar__week", H.some((P) => Z1(P,
|
|
22349
|
+
className: ["event-calendar__week", H.some((P) => Z1(P, N)) ? "event-calendar__week--current" : ""].filter(Boolean).join(" "),
|
|
22351
22350
|
children: [v && /* @__PURE__ */ e("div", {
|
|
22352
22351
|
className: "event-calendar__week-number",
|
|
22353
22352
|
children: bc(H[0])
|
|
22354
22353
|
}), H.map((P) => {
|
|
22355
|
-
const J = P.toDateString(), A =
|
|
22354
|
+
const J = P.toDateString(), A = V.get(J), T = A ? [...A.allDay, ...A.timed] : [], S = w === J, $ = P.getDate() === 1 ? `${P.toLocaleDateString(void 0, { month: "short" })} ${P.getDate()}` : String(P.getDate()), e1 = S ? T : T.slice(0, s), O = T.length - e1.length;
|
|
22356
22355
|
return /* @__PURE__ */ n("div", {
|
|
22357
22356
|
className: [
|
|
22358
22357
|
"event-calendar__day",
|
|
@@ -22365,7 +22364,7 @@ function Jl({ date: t, dragEnabled: r, draggingId: c, emptyLabel: l, events: o,
|
|
|
22365
22364
|
onClick: () => m?.(P),
|
|
22366
22365
|
onDragLeave: () => _((Z) => Z === J ? null : Z),
|
|
22367
22366
|
onDragOver: (Z) => B(Z, J),
|
|
22368
|
-
onDrop: (Z) =>
|
|
22367
|
+
onDrop: (Z) => x(Z, P),
|
|
22369
22368
|
children: [u ? /* @__PURE__ */ e("button", {
|
|
22370
22369
|
className: "event-calendar__day-number event-calendar__day-number--button",
|
|
22371
22370
|
onClick: (Z) => {
|
|
@@ -22419,7 +22418,7 @@ function Jl({ date: t, dragEnabled: r, draggingId: c, emptyLabel: l, events: o,
|
|
|
22419
22418
|
})]
|
|
22420
22419
|
}, E))
|
|
22421
22420
|
}),
|
|
22422
|
-
!
|
|
22421
|
+
!M && l && /* @__PURE__ */ e("div", {
|
|
22423
22422
|
className: "event-calendar__empty",
|
|
22424
22423
|
children: l
|
|
22425
22424
|
})
|
|
@@ -22428,60 +22427,60 @@ function Jl({ date: t, dragEnabled: r, draggingId: c, emptyLabel: l, events: o,
|
|
|
22428
22427
|
}
|
|
22429
22428
|
var en = 8;
|
|
22430
22429
|
function tn({ activeHours: t, date: r, dayEndHour: c, dayStartHour: l, defaultDurationMinutes: o, dragEnabled: d, draggingId: s, events: m, firstDayOfWeek: a, hourHeight: i, onDayClick: h, onDragEnd: p, onDragStart: u, onDrop: g, onEventClick: v, renderEvent: w }) {
|
|
22431
|
-
const [f, y] = R(null), _ = F(null), C = l1(() =>
|
|
22432
|
-
const
|
|
22433
|
-
return
|
|
22430
|
+
const [f, y] = R(null), _ = F(null), C = l1(() => B3(r, a), [r, a]), L = l1(() => V2(m, C), [m, C]), z = l1(() => Array.from({ length: Math.max(c - l, 1) }, (x, B) => l + B), [l, c]), V = L.some((x) => x.allDay.length > 0), k = z.length * i, b = l1(() => {
|
|
22431
|
+
const x = L.flatMap((B) => B.timed.map((H) => H.start.getHours()));
|
|
22432
|
+
return x.length > 0 ? Math.min(...x) : t?.start ?? en;
|
|
22434
22433
|
}, [t, L]);
|
|
22435
22434
|
Y(() => {
|
|
22436
22435
|
if (!_.current) return;
|
|
22437
|
-
const
|
|
22438
|
-
_.current.scrollTop =
|
|
22436
|
+
const x = Math.max(b - l - 1, 0);
|
|
22437
|
+
_.current.scrollTop = x * i;
|
|
22439
22438
|
}, [
|
|
22440
22439
|
l,
|
|
22441
22440
|
b,
|
|
22442
22441
|
i
|
|
22443
22442
|
]);
|
|
22444
|
-
const
|
|
22445
|
-
const H = B1(
|
|
22443
|
+
const M = (x, B) => {
|
|
22444
|
+
const H = B1(x);
|
|
22446
22445
|
return H.setHours(B, 0, 0, 0), H;
|
|
22447
|
-
},
|
|
22448
|
-
!d || s === null || (
|
|
22446
|
+
}, N = (x, B) => {
|
|
22447
|
+
!d || s === null || (x.preventDefault(), x.dataTransfer.dropEffect = "move", y(B));
|
|
22449
22448
|
};
|
|
22450
22449
|
return /* @__PURE__ */ n("div", {
|
|
22451
22450
|
className: "event-calendar__week-view",
|
|
22452
22451
|
children: [
|
|
22453
22452
|
/* @__PURE__ */ n("div", {
|
|
22454
22453
|
className: "event-calendar__week-head",
|
|
22455
|
-
children: [/* @__PURE__ */ e("div", { className: "event-calendar__gutter-spacer" }), C.map((
|
|
22454
|
+
children: [/* @__PURE__ */ e("div", { className: "event-calendar__gutter-spacer" }), C.map((x) => /* @__PURE__ */ n("div", {
|
|
22456
22455
|
className: [
|
|
22457
22456
|
"event-calendar__week-day-head",
|
|
22458
|
-
Z0(
|
|
22459
|
-
M2(
|
|
22457
|
+
Z0(x) ? "event-calendar__week-day-head--today" : "",
|
|
22458
|
+
M2(x) ? "event-calendar__week-day-head--weekend" : ""
|
|
22460
22459
|
].filter(Boolean).join(" "),
|
|
22461
22460
|
children: [/* @__PURE__ */ e("span", {
|
|
22462
22461
|
className: "event-calendar__week-day-name",
|
|
22463
|
-
children:
|
|
22462
|
+
children: x.toLocaleDateString(void 0, { weekday: "short" })
|
|
22464
22463
|
}), /* @__PURE__ */ e("span", {
|
|
22465
22464
|
className: "event-calendar__week-day-number",
|
|
22466
|
-
children:
|
|
22465
|
+
children: x.getDate()
|
|
22467
22466
|
})]
|
|
22468
|
-
},
|
|
22467
|
+
}, x.toDateString()))]
|
|
22469
22468
|
}),
|
|
22470
|
-
|
|
22469
|
+
V && /* @__PURE__ */ n("div", {
|
|
22471
22470
|
className: "event-calendar__all-day",
|
|
22472
22471
|
children: [/* @__PURE__ */ e("div", {
|
|
22473
22472
|
className: "event-calendar__gutter-label",
|
|
22474
22473
|
children: "All day"
|
|
22475
|
-
}), L.map((
|
|
22476
|
-
const B = `allday-${
|
|
22474
|
+
}), L.map((x) => {
|
|
22475
|
+
const B = `allday-${x.date.toDateString()}`;
|
|
22477
22476
|
return /* @__PURE__ */ e("div", {
|
|
22478
22477
|
className: ["event-calendar__all-day-cell", f === B ? "event-calendar__all-day-cell--drop-target" : ""].filter(Boolean).join(" "),
|
|
22479
22478
|
onDragLeave: () => y((H) => H === B ? null : H),
|
|
22480
|
-
onDragOver: (H) =>
|
|
22479
|
+
onDragOver: (H) => N(H, B),
|
|
22481
22480
|
onDrop: (H) => {
|
|
22482
|
-
H.preventDefault(), y(null), g(
|
|
22481
|
+
H.preventDefault(), y(null), g(x.date, !0);
|
|
22483
22482
|
},
|
|
22484
|
-
children:
|
|
22483
|
+
children: x.allDay.map((H) => /* @__PURE__ */ e(H0, {
|
|
22485
22484
|
dragEnabled: d,
|
|
22486
22485
|
event: H,
|
|
22487
22486
|
isDragging: s === H.id,
|
|
@@ -22498,19 +22497,19 @@ function tn({ activeHours: t, date: r, dayEndHour: c, dayStartHour: l, defaultDu
|
|
|
22498
22497
|
ref: _,
|
|
22499
22498
|
children: [/* @__PURE__ */ e("div", {
|
|
22500
22499
|
className: "event-calendar__gutter",
|
|
22501
|
-
style: { height:
|
|
22502
|
-
children: z.map((
|
|
22503
|
-
className: ["event-calendar__gutter-hour", j0(
|
|
22500
|
+
style: { height: k },
|
|
22501
|
+
children: z.map((x) => /* @__PURE__ */ e("div", {
|
|
22502
|
+
className: ["event-calendar__gutter-hour", j0(x, t) ? "" : "event-calendar__gutter-hour--inactive"].filter(Boolean).join(" "),
|
|
22504
22503
|
style: { height: i },
|
|
22505
|
-
children: /* @__PURE__ */ e("span", { children:
|
|
22506
|
-
},
|
|
22507
|
-
}), L.map((
|
|
22508
|
-
const B =
|
|
22504
|
+
children: /* @__PURE__ */ e("span", { children: $3(x) })
|
|
22505
|
+
}, x))
|
|
22506
|
+
}), L.map((x) => {
|
|
22507
|
+
const B = A3(x.timed, l, c, o);
|
|
22509
22508
|
return /* @__PURE__ */ n("div", {
|
|
22510
|
-
className: ["event-calendar__week-column", Z0(
|
|
22511
|
-
style: { height:
|
|
22509
|
+
className: ["event-calendar__week-column", Z0(x.date) ? "event-calendar__week-column--today" : ""].filter(Boolean).join(" "),
|
|
22510
|
+
style: { height: k },
|
|
22512
22511
|
children: [z.map((H) => {
|
|
22513
|
-
const E = `${
|
|
22512
|
+
const E = `${x.date.toDateString()}-${H}`;
|
|
22514
22513
|
return /* @__PURE__ */ e("div", {
|
|
22515
22514
|
className: [
|
|
22516
22515
|
"event-calendar__slot",
|
|
@@ -22518,11 +22517,11 @@ function tn({ activeHours: t, date: r, dayEndHour: c, dayStartHour: l, defaultDu
|
|
|
22518
22517
|
f === E ? "event-calendar__slot--drop-target" : "",
|
|
22519
22518
|
h ? "event-calendar__slot--clickable" : ""
|
|
22520
22519
|
].filter(Boolean).join(" "),
|
|
22521
|
-
onClick: () => h?.(x
|
|
22520
|
+
onClick: () => h?.(M(x.date, H)),
|
|
22522
22521
|
onDragLeave: () => y((P) => P === E ? null : P),
|
|
22523
|
-
onDragOver: (P) =>
|
|
22522
|
+
onDragOver: (P) => N(P, E),
|
|
22524
22523
|
onDrop: (P) => {
|
|
22525
|
-
P.preventDefault(), y(null), g(x
|
|
22524
|
+
P.preventDefault(), y(null), g(M(x.date, H), !1);
|
|
22526
22525
|
},
|
|
22527
22526
|
style: { height: i }
|
|
22528
22527
|
}, E);
|
|
@@ -22543,7 +22542,7 @@ function tn({ activeHours: t, date: r, dayEndHour: c, dayStartHour: l, defaultDu
|
|
|
22543
22542
|
width: `calc(${H.width}% - var(--spacing-4))`
|
|
22544
22543
|
}
|
|
22545
22544
|
}, H.event.id))]
|
|
22546
|
-
},
|
|
22545
|
+
}, x.date.toDateString());
|
|
22547
22546
|
})]
|
|
22548
22547
|
})
|
|
22549
22548
|
]
|
|
@@ -22561,23 +22560,23 @@ var rn = [{
|
|
|
22561
22560
|
month: "long",
|
|
22562
22561
|
year: "numeric"
|
|
22563
22562
|
}), z0 = (t) => t.toLocaleDateString(void 0, { month: "short" }), ln = (t, r) => {
|
|
22564
|
-
const c =
|
|
22563
|
+
const c = B3(t, r), l = c[0], o = c[c.length - 1];
|
|
22565
22564
|
return l.getFullYear() !== o.getFullYear() ? `${l.getDate()} ${z0(l)} ${l.getFullYear()} – ${o.getDate()} ${z0(o)} ${o.getFullYear()}` : l.getMonth() !== o.getMonth() ? `${l.getDate()} ${z0(l)} – ${o.getDate()} ${z0(o)} ${o.getFullYear()}` : `${l.getDate()} – ${o.getDate()} ${z0(o)} ${o.getFullYear()}`;
|
|
22566
22565
|
};
|
|
22567
|
-
function xi({ activeHours: t, className: r, date: c, dayAgenda: l = !1, dayEndHour: o = 24, dayStartHour: d = 0, defaultDurationMinutes: s = 30, emptyLabel: m, events: a, firstDayOfWeek: i = 0, headerExtra: h, hourHeight: p = 44, maxEventsPerDay: u = 3, onDateChange: g, onDayClick: v, onEventClick: w, onEventDrop: f, onViewChange: y, renderEvent: _, showHeader: C = !0, showWeekNumbers: L = !1, swipeNavigation: z = !0, view:
|
|
22568
|
-
const [
|
|
22566
|
+
function xi({ activeHours: t, className: r, date: c, dayAgenda: l = !1, dayEndHour: o = 24, dayStartHour: d = 0, defaultDurationMinutes: s = 30, emptyLabel: m, events: a, firstDayOfWeek: i = 0, headerExtra: h, hourHeight: p = 44, maxEventsPerDay: u = 3, onDateChange: g, onDayClick: v, onEventClick: w, onEventDrop: f, onViewChange: y, renderEvent: _, showHeader: C = !0, showWeekNumbers: L = !1, swipeNavigation: z = !0, view: V }) {
|
|
22567
|
+
const [k, b] = R(() => B1(c ?? /* @__PURE__ */ new Date())), [M, N] = R(V ?? "month"), [x, B] = R(null), [H, E] = R(null), P = c ?? k, J = V ?? M, A = !!f, T = D((t1) => {
|
|
22569
22568
|
g && g(t1), c || b(t1);
|
|
22570
22569
|
}, [c, g]), S = D((t1) => {
|
|
22571
|
-
y && y(t1),
|
|
22572
|
-
}, [y,
|
|
22570
|
+
y && y(t1), V || N(t1);
|
|
22571
|
+
}, [y, V]), $ = D((t1) => {
|
|
22573
22572
|
T(J === "month" ? C0(P, t1) : S0(P, t1 * 7));
|
|
22574
22573
|
}, [
|
|
22575
22574
|
P,
|
|
22576
22575
|
J,
|
|
22577
22576
|
T
|
|
22578
22577
|
]), e1 = D((t1, C1) => {
|
|
22579
|
-
!
|
|
22580
|
-
}, [
|
|
22578
|
+
!x || !f || (f(x, Bl(x, t1, C1)), B(null));
|
|
22579
|
+
}, [x, f]), O = D((t1) => E(B1(t1)), []), Z = D((t1) => {
|
|
22581
22580
|
if (l) {
|
|
22582
22581
|
O(t1.start);
|
|
22583
22582
|
return;
|
|
@@ -22587,7 +22586,7 @@ function xi({ activeHours: t, className: r, date: c, dayAgenda: l = !1, dayEndHo
|
|
|
22587
22586
|
l,
|
|
22588
22587
|
w,
|
|
22589
22588
|
O
|
|
22590
|
-
]), W =
|
|
22589
|
+
]), W = R3({
|
|
22591
22590
|
enabled: z,
|
|
22592
22591
|
onSwipeLeft: () => $(1),
|
|
22593
22592
|
onSwipeRight: () => $(-1)
|
|
@@ -22599,7 +22598,7 @@ function xi({ activeHours: t, className: r, date: c, dayAgenda: l = !1, dayEndHo
|
|
|
22599
22598
|
activeHours: t,
|
|
22600
22599
|
date: P,
|
|
22601
22600
|
dragEnabled: A,
|
|
22602
|
-
draggingId:
|
|
22601
|
+
draggingId: x?.id ?? null,
|
|
22603
22602
|
events: a,
|
|
22604
22603
|
firstDayOfWeek: i,
|
|
22605
22604
|
onDayClick: v,
|
|
@@ -22672,7 +22671,7 @@ function xi({ activeHours: t, className: r, date: c, dayAgenda: l = !1, dayEndHo
|
|
|
22672
22671
|
hourHeight: p
|
|
22673
22672
|
})
|
|
22674
22673
|
}),
|
|
22675
|
-
H && /* @__PURE__ */ e(
|
|
22674
|
+
H && /* @__PURE__ */ e(Dl, {
|
|
22676
22675
|
activeHours: t,
|
|
22677
22676
|
date: H,
|
|
22678
22677
|
onDateChange: E,
|
|
@@ -22828,7 +22827,7 @@ var Li = ({ label: t, accept: r, multiple: c = !1, showPreview: l = !0, onFiles:
|
|
|
22828
22827
|
const [y, _] = R(o), [C, L] = R(() => l ?? {
|
|
22829
22828
|
x: Math.max(0, (window.innerWidth - o.width) / 2),
|
|
22830
22829
|
y: Math.max(0, (window.innerHeight - o.height) / 3)
|
|
22831
|
-
}), [z,
|
|
22830
|
+
}), [z, V] = R(!1), [k, b] = R(!1), M = F(null), N = F(null), x = D((S, $) => ({
|
|
22832
22831
|
x: Math.min(Math.max(S.x, p2 - $.width), window.innerWidth - p2),
|
|
22833
22832
|
y: Math.min(Math.max(S.y, 0), window.innerHeight - p2)
|
|
22834
22833
|
}), []), B = D(() => {
|
|
@@ -22841,7 +22840,7 @@ var Li = ({ label: t, accept: r, multiple: c = !1, showPreview: l = !0, onFiles:
|
|
|
22841
22840
|
C,
|
|
22842
22841
|
y
|
|
22843
22842
|
]), H = D((S, $) => {
|
|
22844
|
-
|
|
22843
|
+
k || (S.preventDefault(), S.stopPropagation(), S.currentTarget.setPointerCapture(S.pointerId), N.current = {
|
|
22845
22844
|
direction: $,
|
|
22846
22845
|
pointerId: S.pointerId,
|
|
22847
22846
|
startPointer: {
|
|
@@ -22854,15 +22853,15 @@ var Li = ({ label: t, accept: r, multiple: c = !1, showPreview: l = !0, onFiles:
|
|
|
22854
22853
|
}
|
|
22855
22854
|
});
|
|
22856
22855
|
}, [
|
|
22857
|
-
|
|
22856
|
+
k,
|
|
22858
22857
|
C,
|
|
22859
22858
|
y
|
|
22860
22859
|
]), E = D((S) => {
|
|
22861
|
-
const $ =
|
|
22860
|
+
const $ = N.current;
|
|
22862
22861
|
if (!$ || $.pointerId !== S.pointerId) return;
|
|
22863
22862
|
const e1 = S.clientX - $.startPointer.x, O = S.clientY - $.startPointer.y, { startRect: Z, direction: W } = $;
|
|
22864
22863
|
if (!W) {
|
|
22865
|
-
L(
|
|
22864
|
+
L(x({
|
|
22866
22865
|
x: Z.x + e1,
|
|
22867
22866
|
y: Z.y + O
|
|
22868
22867
|
}, Z));
|
|
@@ -22877,15 +22876,15 @@ var Li = ({ label: t, accept: r, multiple: c = !1, showPreview: l = !0, onFiles:
|
|
|
22877
22876
|
y: C1
|
|
22878
22877
|
});
|
|
22879
22878
|
}, [
|
|
22880
|
-
|
|
22879
|
+
x,
|
|
22881
22880
|
a,
|
|
22882
22881
|
i
|
|
22883
22882
|
]), P = D((S) => {
|
|
22884
|
-
|
|
22883
|
+
N.current && (S.currentTarget.releasePointerCapture(S.pointerId), N.current = null, B());
|
|
22885
22884
|
}, [B]), J = D(() => {
|
|
22886
22885
|
b((S) => {
|
|
22887
22886
|
if (S) {
|
|
22888
|
-
const $ =
|
|
22887
|
+
const $ = M.current;
|
|
22889
22888
|
return $ && (L({
|
|
22890
22889
|
x: $.x,
|
|
22891
22890
|
y: $.y
|
|
@@ -22894,10 +22893,10 @@ var Li = ({ label: t, accept: r, multiple: c = !1, showPreview: l = !0, onFiles:
|
|
|
22894
22893
|
width: $.width
|
|
22895
22894
|
})), !1;
|
|
22896
22895
|
}
|
|
22897
|
-
return
|
|
22896
|
+
return M.current = {
|
|
22898
22897
|
...C,
|
|
22899
22898
|
...y
|
|
22900
|
-
},
|
|
22899
|
+
}, V(!1), !0;
|
|
22901
22900
|
});
|
|
22902
22901
|
}, [C, y]);
|
|
22903
22902
|
if (Y(() => {
|
|
@@ -22912,14 +22911,14 @@ var Li = ({ label: t, accept: r, multiple: c = !1, showPreview: l = !0, onFiles:
|
|
|
22912
22911
|
h
|
|
22913
22912
|
]), Y(() => {
|
|
22914
22913
|
if (!s) return;
|
|
22915
|
-
const S = () => L(($) =>
|
|
22914
|
+
const S = () => L(($) => x($, y));
|
|
22916
22915
|
return window.addEventListener("resize", S), () => window.removeEventListener("resize", S);
|
|
22917
22916
|
}, [
|
|
22918
|
-
|
|
22917
|
+
x,
|
|
22919
22918
|
s,
|
|
22920
22919
|
y
|
|
22921
22920
|
]), !s) return null;
|
|
22922
|
-
const A =
|
|
22921
|
+
const A = k ? {
|
|
22923
22922
|
"--_window-z": f,
|
|
22924
22923
|
height: `calc(100vh - ${G0 * 2}px)`,
|
|
22925
22924
|
left: G0,
|
|
@@ -22934,7 +22933,7 @@ var Li = ({ label: t, accept: r, multiple: c = !1, showPreview: l = !0, onFiles:
|
|
|
22934
22933
|
}, T = /* @__PURE__ */ n("div", {
|
|
22935
22934
|
className: [
|
|
22936
22935
|
"floating-window",
|
|
22937
|
-
|
|
22936
|
+
k ? "floating-window--maximized" : "",
|
|
22938
22937
|
z ? "floating-window--minimized" : "",
|
|
22939
22938
|
r
|
|
22940
22939
|
].filter(Boolean).join(" "),
|
|
@@ -22959,20 +22958,20 @@ var Li = ({ label: t, accept: r, multiple: c = !1, showPreview: l = !0, onFiles:
|
|
|
22959
22958
|
title: z ? "Expand" : "Collapse",
|
|
22960
22959
|
children: /* @__PURE__ */ e("button", {
|
|
22961
22960
|
className: "floating-window__action",
|
|
22962
|
-
onClick: () =>
|
|
22961
|
+
onClick: () => V((S) => !S),
|
|
22963
22962
|
onPointerDown: (S) => S.stopPropagation(),
|
|
22964
22963
|
type: "button",
|
|
22965
22964
|
children: z ? "▢" : "—"
|
|
22966
22965
|
})
|
|
22967
22966
|
}),
|
|
22968
22967
|
u && /* @__PURE__ */ e(c1, {
|
|
22969
|
-
title:
|
|
22968
|
+
title: k ? "Restore" : "Maximize",
|
|
22970
22969
|
children: /* @__PURE__ */ e("button", {
|
|
22971
22970
|
className: "floating-window__action",
|
|
22972
22971
|
onClick: J,
|
|
22973
22972
|
onPointerDown: (S) => S.stopPropagation(),
|
|
22974
22973
|
type: "button",
|
|
22975
|
-
children:
|
|
22974
|
+
children: k ? "❐" : "□"
|
|
22976
22975
|
})
|
|
22977
22976
|
}),
|
|
22978
22977
|
/* @__PURE__ */ e(c1, {
|
|
@@ -22995,7 +22994,7 @@ var Li = ({ label: t, accept: r, multiple: c = !1, showPreview: l = !0, onFiles:
|
|
|
22995
22994
|
className: "floating-window__footer",
|
|
22996
22995
|
children: d
|
|
22997
22996
|
})] }),
|
|
22998
|
-
u && !
|
|
22997
|
+
u && !k && !z && nn.map((S) => /* @__PURE__ */ e("span", {
|
|
22999
22998
|
className: `floating-window__handle floating-window__handle--${S}`,
|
|
23000
22999
|
onPointerDown: ($) => H($, S),
|
|
23001
23000
|
onPointerMove: E,
|
|
@@ -23003,7 +23002,7 @@ var Li = ({ label: t, accept: r, multiple: c = !1, showPreview: l = !0, onFiles:
|
|
|
23003
23002
|
}, S))
|
|
23004
23003
|
]
|
|
23005
23004
|
});
|
|
23006
|
-
return w ?
|
|
23005
|
+
return w ? Y1(T, document.body) : T;
|
|
23007
23006
|
}, E3 = () => /* @__PURE__ */ e("div", {
|
|
23008
23007
|
className: "loading",
|
|
23009
23008
|
children: /* @__PURE__ */ e("div", { className: "loading__spinner" })
|
|
@@ -23042,7 +23041,7 @@ var Li = ({ label: t, accept: r, multiple: c = !1, showPreview: l = !0, onFiles:
|
|
|
23042
23041
|
name: _,
|
|
23043
23042
|
path: _
|
|
23044
23043
|
})) ?? [] : m?.directories ?? [];
|
|
23045
|
-
return /* @__PURE__ */ e(
|
|
23044
|
+
return /* @__PURE__ */ e(q1, {
|
|
23046
23045
|
isOpen: t,
|
|
23047
23046
|
title: r,
|
|
23048
23047
|
onClose: d,
|
|
@@ -23170,7 +23169,7 @@ var Li = ({ label: t, accept: r, multiple: c = !1, showPreview: l = !0, onFiles:
|
|
|
23170
23169
|
style: g,
|
|
23171
23170
|
children: r
|
|
23172
23171
|
});
|
|
23173
|
-
},
|
|
23172
|
+
}, Q2 = Object.keys(u3), J2 = (t) => {
|
|
23174
23173
|
const r = new Set(t), c = [];
|
|
23175
23174
|
return _2.forEach((l) => {
|
|
23176
23175
|
const o = l.icons.filter((d) => r.has(d));
|
|
@@ -23185,7 +23184,7 @@ var Li = ({ label: t, accept: r, multiple: c = !1, showPreview: l = !0, onFiles:
|
|
|
23185
23184
|
icons: t.filter((l) => r.has(l))
|
|
23186
23185
|
}), c;
|
|
23187
23186
|
}, Ri = ({ color: t, emptyLabel: r = "No icons match", grouped: c = !0, icons: l, onChange: o, placeholder: d = "Search icons...", value: s }) => {
|
|
23188
|
-
const [m, a] = R(""), i = l1(() => l ??
|
|
23187
|
+
const [m, a] = R(""), i = l1(() => l ?? Q2, [l]), h = l1(() => c ? J2(i) : [], [i, c]), [p, u] = R(() => s && v3.get(s) || J2(l ?? Q2)[0]?.id || "other"), g = l1(() => {
|
|
23189
23188
|
const f = m.trim().toLowerCase();
|
|
23190
23189
|
if (!f) return null;
|
|
23191
23190
|
const y = f.replace(/[\s-]+/g, "");
|
|
@@ -23290,29 +23289,29 @@ var Li = ({ label: t, accept: r, multiple: c = !1, showPreview: l = !0, onFiles:
|
|
|
23290
23289
|
]
|
|
23291
23290
|
});
|
|
23292
23291
|
}, on = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/, sn = (t) => !t || t.trim() === "" ? !0 : on.test(t.trim()), Ai = z1(({ autoComplete: t = "on", autoFocus: r, disabled: c, error: l = "Please enter a valid email address", highlighted: o, id: d, label: s, maxLength: m, onBlur: a, onChange: i, onClick: h, onKeyDown: p, onKeyUp: u, onValidate: g, placeholder: v, readOnly: w = !1, required: f = !1, showValidation: y = !1, success: _, validateOn: C = "blur", value: L }, z) => {
|
|
23293
|
-
const [
|
|
23292
|
+
const [V, k] = R(!0), [b, M] = R(!1), N = (E) => f && (!E || E.trim() === "") ? !1 : !E || E.trim() === "" ? !0 : sn(E);
|
|
23294
23293
|
Y(() => {
|
|
23295
23294
|
if (L !== void 0) {
|
|
23296
|
-
const E =
|
|
23297
|
-
|
|
23295
|
+
const E = N(L);
|
|
23296
|
+
k(E), g?.(E);
|
|
23298
23297
|
}
|
|
23299
23298
|
}, [
|
|
23300
23299
|
L,
|
|
23301
23300
|
g,
|
|
23302
23301
|
f
|
|
23303
23302
|
]);
|
|
23304
|
-
const
|
|
23303
|
+
const x = (E) => {
|
|
23305
23304
|
if (i?.(E), C === "change" || C === "both") {
|
|
23306
|
-
const P =
|
|
23307
|
-
|
|
23305
|
+
const P = N(E);
|
|
23306
|
+
k(P), M(!0), g?.(P);
|
|
23308
23307
|
}
|
|
23309
23308
|
}, B = (E) => {
|
|
23310
|
-
if (
|
|
23311
|
-
const P =
|
|
23312
|
-
|
|
23309
|
+
if (M(!0), C === "blur" || C === "both") {
|
|
23310
|
+
const P = N(E.target.value);
|
|
23311
|
+
k(P), g?.(P);
|
|
23313
23312
|
}
|
|
23314
23313
|
a?.(E);
|
|
23315
|
-
}, H = y && b && !
|
|
23314
|
+
}, H = y && b && !V;
|
|
23316
23315
|
return /* @__PURE__ */ n("div", {
|
|
23317
23316
|
className: `input-email-wrapper${o ? " input-email-highlighted" : ""}`,
|
|
23318
23317
|
children: [
|
|
@@ -23329,14 +23328,14 @@ var Li = ({ label: t, accept: r, multiple: c = !1, showPreview: l = !0, onFiles:
|
|
|
23329
23328
|
autoFocus: r,
|
|
23330
23329
|
disabled: c,
|
|
23331
23330
|
type: "email",
|
|
23332
|
-
className: `input-email${H ? " input-email--error" : ""}${_ ? " input-email-success" :
|
|
23331
|
+
className: `input-email${H ? " input-email--error" : ""}${_ ? " input-email-success" : V && b && y ? " input-email--valid" : ""}`,
|
|
23333
23332
|
id: d,
|
|
23334
23333
|
maxLength: m,
|
|
23335
23334
|
placeholder: v,
|
|
23336
23335
|
ref: z,
|
|
23337
23336
|
value: L,
|
|
23338
23337
|
onBlur: B,
|
|
23339
|
-
onChange: (E) =>
|
|
23338
|
+
onChange: (E) => x(E.target.value),
|
|
23340
23339
|
onClick: h,
|
|
23341
23340
|
onKeyDown: p,
|
|
23342
23341
|
onKeyUp: u,
|
|
@@ -23425,15 +23424,15 @@ function mn(t) {
|
|
|
23425
23424
|
return t.filter((r) => r.type === "token").length;
|
|
23426
23425
|
}
|
|
23427
23426
|
var pn = z1(({ mask: t, value: r, onChange: c, onComplete: l, placeholder: o, label: d, hint: s, error: m, highlighted: a, size: i = "md", variant: h = "default", disabled: p = !1, readOnly: u = !1, maskChar: g = "_", mono: v = !0, icon: w, suffix: f, className: y = "", id: _, name: C, autoComplete: L }, z) => {
|
|
23428
|
-
const
|
|
23429
|
-
|
|
23427
|
+
const V = w1.useMemo(() => hn(t), [t]), k = w1.useMemo(() => mn(V), [V]), b = A0(), M = _ ?? b, [N, x] = R(() => r !== void 0 ? r : ""), B = F(null);
|
|
23428
|
+
m3(z, () => ({
|
|
23430
23429
|
focus: () => B.current?.focus(),
|
|
23431
23430
|
clear: () => {
|
|
23432
|
-
|
|
23431
|
+
x(""), c?.("", "");
|
|
23433
23432
|
},
|
|
23434
|
-
getRawValue: () =>
|
|
23433
|
+
getRawValue: () => N
|
|
23435
23434
|
}));
|
|
23436
|
-
const { masked: H } = u2(
|
|
23435
|
+
const { masked: H } = u2(N, V, g), E = H.includes(g) ? H.replace(new RegExp(g.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g"), g) : H, P = m ? "danger" : h, J = [
|
|
23437
23436
|
"input-mask",
|
|
23438
23437
|
`input-mask--${i}`,
|
|
23439
23438
|
`input-mask--${P}`,
|
|
@@ -23448,38 +23447,38 @@ var pn = z1(({ mask: t, value: r, onChange: c, onComplete: l, placeholder: o, la
|
|
|
23448
23447
|
if (p || u) return;
|
|
23449
23448
|
if ($.key === "Backspace") {
|
|
23450
23449
|
$.preventDefault();
|
|
23451
|
-
const q =
|
|
23452
|
-
|
|
23450
|
+
const q = N.slice(0, -1), { masked: m1 } = u2(q, V, g);
|
|
23451
|
+
x(q), c?.(q, m1);
|
|
23453
23452
|
return;
|
|
23454
23453
|
}
|
|
23455
|
-
if ($.key.length !== 1 || $.ctrlKey || $.metaKey || ($.preventDefault(),
|
|
23454
|
+
if ($.key.length !== 1 || $.ctrlKey || $.metaKey || ($.preventDefault(), N.length >= k)) return;
|
|
23456
23455
|
const e1 = $.key;
|
|
23457
23456
|
let O = 0;
|
|
23458
|
-
for (const q of
|
|
23459
|
-
if (O ===
|
|
23457
|
+
for (const q of V) if (q.type === "token") {
|
|
23458
|
+
if (O === N.length) {
|
|
23460
23459
|
if (!T3[q.key].test(e1)) return;
|
|
23461
23460
|
break;
|
|
23462
23461
|
}
|
|
23463
23462
|
O++;
|
|
23464
23463
|
}
|
|
23465
|
-
const { masked: Z, rawAccepted: W } = u2(
|
|
23466
|
-
|
|
23464
|
+
const { masked: Z, rawAccepted: W } = u2(N + e1, V, g);
|
|
23465
|
+
x(W), c?.(W, Z), W.length === k && l?.(W, Z);
|
|
23467
23466
|
}, [
|
|
23468
23467
|
p,
|
|
23469
23468
|
u,
|
|
23470
|
-
V,
|
|
23471
23469
|
N,
|
|
23470
|
+
V,
|
|
23472
23471
|
g,
|
|
23473
|
-
|
|
23472
|
+
k,
|
|
23474
23473
|
c,
|
|
23475
23474
|
l
|
|
23476
|
-
]), T = o ??
|
|
23475
|
+
]), T = o ?? V.map(($) => $.type === "literal" ? $.char : g).join(""), S = N.length === k;
|
|
23477
23476
|
return /* @__PURE__ */ n("div", {
|
|
23478
23477
|
className: J,
|
|
23479
23478
|
children: [
|
|
23480
23479
|
d && /* @__PURE__ */ e("label", {
|
|
23481
23480
|
className: "input-mask__label",
|
|
23482
|
-
htmlFor:
|
|
23481
|
+
htmlFor: M,
|
|
23483
23482
|
children: d
|
|
23484
23483
|
}),
|
|
23485
23484
|
/* @__PURE__ */ n("div", {
|
|
@@ -23491,7 +23490,7 @@ var pn = z1(({ mask: t, value: r, onChange: c, onComplete: l, placeholder: o, la
|
|
|
23491
23490
|
}),
|
|
23492
23491
|
/* @__PURE__ */ e("input", {
|
|
23493
23492
|
ref: B,
|
|
23494
|
-
id:
|
|
23493
|
+
id: M,
|
|
23495
23494
|
name: C,
|
|
23496
23495
|
type: "text",
|
|
23497
23496
|
inputMode: "text",
|
|
@@ -23509,9 +23508,9 @@ var pn = z1(({ mask: t, value: r, onChange: c, onComplete: l, placeholder: o, la
|
|
|
23509
23508
|
/* @__PURE__ */ n("span", {
|
|
23510
23509
|
className: "input-mask__counter",
|
|
23511
23510
|
children: [
|
|
23512
|
-
|
|
23511
|
+
N.length,
|
|
23513
23512
|
"/",
|
|
23514
|
-
|
|
23513
|
+
k
|
|
23515
23514
|
]
|
|
23516
23515
|
}),
|
|
23517
23516
|
f && /* @__PURE__ */ e("span", {
|
|
@@ -23593,9 +23592,9 @@ function vn(t) {
|
|
|
23593
23592
|
return t.split("").filter((r) => r === "#").length;
|
|
23594
23593
|
}
|
|
23595
23594
|
var gn = z1(({ autoFocus: t, disabled: r, error: c, format: l = un, highlighted: o, id: d, label: s, onBlur: m, onChange: a, onClick: i, onKeyDown: h, placeholder: p, readOnly: u = !1, required: g = !1, success: v, value: w }, f) => {
|
|
23596
|
-
const y = w !== void 0, [_, C] = R(() => w ? v2(g2(w), l) : ""), L = y ? v2(g2(w ?? ""), l) : _, z = p ?? l.replace(/#/g, "0"),
|
|
23597
|
-
const
|
|
23598
|
-
y || C(B), a?.(B,
|
|
23595
|
+
const y = w !== void 0, [_, C] = R(() => w ? v2(g2(w), l) : ""), L = y ? v2(g2(w ?? ""), l) : _, z = p ?? l.replace(/#/g, "0"), V = l.length, k = (b) => {
|
|
23596
|
+
const M = g2(b), N = vn(l), x = M.slice(0, N), B = v2(x, l);
|
|
23597
|
+
y || C(B), a?.(B, x);
|
|
23599
23598
|
};
|
|
23600
23599
|
return /* @__PURE__ */ n("div", {
|
|
23601
23600
|
className: "input-phone-wrapper",
|
|
@@ -23629,7 +23628,7 @@ var gn = z1(({ autoFocus: t, disabled: r, error: c, format: l = un, highlighted:
|
|
|
23629
23628
|
disabled: r,
|
|
23630
23629
|
id: d,
|
|
23631
23630
|
inputMode: "tel",
|
|
23632
|
-
maxLength:
|
|
23631
|
+
maxLength: V,
|
|
23633
23632
|
placeholder: z,
|
|
23634
23633
|
readOnly: u,
|
|
23635
23634
|
ref: f,
|
|
@@ -23637,7 +23636,7 @@ var gn = z1(({ autoFocus: t, disabled: r, error: c, format: l = un, highlighted:
|
|
|
23637
23636
|
type: "tel",
|
|
23638
23637
|
value: L,
|
|
23639
23638
|
onBlur: m,
|
|
23640
|
-
onChange: (b) =>
|
|
23639
|
+
onChange: (b) => k(b.target.value),
|
|
23641
23640
|
onClick: i,
|
|
23642
23641
|
onKeyDown: h
|
|
23643
23642
|
})]
|
|
@@ -23655,7 +23654,7 @@ var gn = z1(({ autoFocus: t, disabled: r, error: c, format: l = un, highlighted:
|
|
|
23655
23654
|
});
|
|
23656
23655
|
gn.displayName = "InputPhone";
|
|
23657
23656
|
var wn = /[^0-9]/g, fn = /[^0-9a-zA-Z]/g, Ei = ({ autoFocus: t = !1, disabled: r = !1, error: c, id: l, label: o, length: d = 6, groupSize: s, onChange: m, onComplete: a, secret: i = !1, success: h, type: p = "numeric", value: u }) => {
|
|
23658
|
-
const g = F([]), v = F(!1), w = D((
|
|
23657
|
+
const g = F([]), v = F(!1), w = D((k) => k.replace(p === "numeric" ? wn : fn, "").slice(0, d), [d, p]), f = w(u), y = f.split("");
|
|
23659
23658
|
Y(() => {
|
|
23660
23659
|
f.length === d && !v.current && (v.current = !0, a?.(f)), f.length < d && (v.current = !1);
|
|
23661
23660
|
}, [
|
|
@@ -23665,59 +23664,59 @@ var wn = /[^0-9]/g, fn = /[^0-9a-zA-Z]/g, Ei = ({ autoFocus: t = !1, disabled: r
|
|
|
23665
23664
|
]), Y(() => {
|
|
23666
23665
|
t && g.current[0]?.focus();
|
|
23667
23666
|
}, [t]);
|
|
23668
|
-
const _ = D((
|
|
23669
|
-
const b = g.current[Math.min(Math.max(
|
|
23667
|
+
const _ = D((k) => {
|
|
23668
|
+
const b = g.current[Math.min(Math.max(k, 0), d - 1)];
|
|
23670
23669
|
b?.focus(), b?.select();
|
|
23671
|
-
}, [d]), C = D((
|
|
23672
|
-
const b =
|
|
23670
|
+
}, [d]), C = D((k) => {
|
|
23671
|
+
const b = k.join("").replace(/\s/g, "");
|
|
23673
23672
|
m(w(b));
|
|
23674
|
-
}, [m, w]), L = D((
|
|
23675
|
-
const
|
|
23676
|
-
if (!
|
|
23673
|
+
}, [m, w]), L = D((k, b) => {
|
|
23674
|
+
const M = y[k] ?? "", N = M && b.startsWith(M) ? b.slice(M.length) : b, x = w(N);
|
|
23675
|
+
if (!x) return;
|
|
23677
23676
|
const B = [...y];
|
|
23678
|
-
|
|
23679
|
-
|
|
23680
|
-
}), C(B), _(
|
|
23677
|
+
x.split("").forEach((H, E) => {
|
|
23678
|
+
k + E < d && (B[k + E] = H);
|
|
23679
|
+
}), C(B), _(k + x.length);
|
|
23681
23680
|
}, [
|
|
23682
23681
|
y,
|
|
23683
23682
|
C,
|
|
23684
23683
|
_,
|
|
23685
23684
|
d,
|
|
23686
23685
|
w
|
|
23687
|
-
]), z = D((
|
|
23688
|
-
if (
|
|
23689
|
-
|
|
23690
|
-
const
|
|
23691
|
-
if (
|
|
23692
|
-
|
|
23686
|
+
]), z = D((k, b) => {
|
|
23687
|
+
if (k.key === "Backspace") {
|
|
23688
|
+
k.preventDefault();
|
|
23689
|
+
const M = [...y];
|
|
23690
|
+
if (M[b]) {
|
|
23691
|
+
M.splice(b, 1), C(M);
|
|
23693
23692
|
return;
|
|
23694
23693
|
}
|
|
23695
|
-
b > 0 && (
|
|
23694
|
+
b > 0 && (M.splice(b - 1, 1), C(M), _(b - 1));
|
|
23696
23695
|
return;
|
|
23697
23696
|
}
|
|
23698
|
-
if (
|
|
23699
|
-
|
|
23700
|
-
const
|
|
23701
|
-
|
|
23697
|
+
if (k.key === "Delete") {
|
|
23698
|
+
k.preventDefault();
|
|
23699
|
+
const M = [...y];
|
|
23700
|
+
M.splice(b, 1), C(M);
|
|
23702
23701
|
return;
|
|
23703
23702
|
}
|
|
23704
|
-
if (
|
|
23705
|
-
|
|
23703
|
+
if (k.key === "ArrowLeft") {
|
|
23704
|
+
k.preventDefault(), _(b - 1);
|
|
23706
23705
|
return;
|
|
23707
23706
|
}
|
|
23708
|
-
|
|
23707
|
+
k.key === "ArrowRight" && (k.preventDefault(), _(b + 1));
|
|
23709
23708
|
}, [
|
|
23710
23709
|
y,
|
|
23711
23710
|
C,
|
|
23712
23711
|
_
|
|
23713
|
-
]),
|
|
23714
|
-
|
|
23715
|
-
const
|
|
23716
|
-
if (!
|
|
23717
|
-
const
|
|
23718
|
-
|
|
23719
|
-
b + B < d && (
|
|
23720
|
-
}), C(
|
|
23712
|
+
]), V = D((k, b) => {
|
|
23713
|
+
k.preventDefault();
|
|
23714
|
+
const M = w(k.clipboardData.getData("text"));
|
|
23715
|
+
if (!M) return;
|
|
23716
|
+
const N = [...y];
|
|
23717
|
+
M.split("").forEach((x, B) => {
|
|
23718
|
+
b + B < d && (N[b + B] = x);
|
|
23719
|
+
}), C(N), _(b + M.length);
|
|
23721
23720
|
}, [
|
|
23722
23721
|
y,
|
|
23723
23722
|
C,
|
|
@@ -23739,20 +23738,20 @@ var wn = /[^0-9]/g, fn = /[^0-9a-zA-Z]/g, Ei = ({ autoFocus: t = !1, disabled: r
|
|
|
23739
23738
|
}),
|
|
23740
23739
|
/* @__PURE__ */ e("div", {
|
|
23741
23740
|
className: "input-pin-cells",
|
|
23742
|
-
children: Array.from({ length: d }, (
|
|
23741
|
+
children: Array.from({ length: d }, (k, b) => /* @__PURE__ */ e("input", {
|
|
23743
23742
|
autoComplete: b === 0 ? "one-time-code" : "off",
|
|
23744
23743
|
className: `input-pin-cell${y[b] ? " input-pin-cell--filled" : ""}${s && b > 0 && b % s === 0 ? " input-pin-cell--group-start" : ""}`,
|
|
23745
23744
|
disabled: r,
|
|
23746
23745
|
id: l ? `${l}-${b}` : void 0,
|
|
23747
23746
|
inputMode: p === "numeric" ? "numeric" : "text",
|
|
23748
23747
|
maxLength: d,
|
|
23749
|
-
onChange: (
|
|
23750
|
-
onFocus: (
|
|
23751
|
-
onKeyDown: (
|
|
23752
|
-
onPaste: (
|
|
23748
|
+
onChange: (M) => L(b, M.target.value),
|
|
23749
|
+
onFocus: (M) => M.target.select(),
|
|
23750
|
+
onKeyDown: (M) => z(M, b),
|
|
23751
|
+
onPaste: (M) => V(M, b),
|
|
23753
23752
|
type: i ? "password" : "text",
|
|
23754
|
-
ref: (
|
|
23755
|
-
g.current[b] =
|
|
23753
|
+
ref: (M) => {
|
|
23754
|
+
g.current[b] = M;
|
|
23756
23755
|
},
|
|
23757
23756
|
value: y[b] ?? ""
|
|
23758
23757
|
}, b))
|
|
@@ -23805,7 +23804,7 @@ var wn = /[^0-9]/g, fn = /[^0-9a-zA-Z]/g, Ei = ({ autoFocus: t = !1, disabled: r
|
|
|
23805
23804
|
children: f
|
|
23806
23805
|
})
|
|
23807
23806
|
]
|
|
23808
|
-
})),
|
|
23807
|
+
})), e3 = (t) => t.toString().padStart(2, "0"), Cn = (t) => {
|
|
23809
23808
|
const [r, c] = (t ?? "").split(":").map(Number);
|
|
23810
23809
|
return {
|
|
23811
23810
|
hours: Number.isFinite(r) ? r : 0,
|
|
@@ -23813,8 +23812,8 @@ var wn = /[^0-9]/g, fn = /[^0-9a-zA-Z]/g, Ei = ({ autoFocus: t = !1, disabled: r
|
|
|
23813
23812
|
seconds: 0
|
|
23814
23813
|
};
|
|
23815
23814
|
}, Pi = z1(({ autoFocus: t, disabled: r, error: c, highlighted: l, id: o, label: d, max: s, min: m, minuteStep: a = 1, onBlur: i, onChange: h, onClick: p, onKeyDown: u, onKeyUp: g, readOnly: v = !1, required: w = !1, success: f, value: y, withClock: _ = !1 }, C) => {
|
|
23816
|
-
const [L, z] = R(!1),
|
|
23817
|
-
h?.(`${
|
|
23815
|
+
const [L, z] = R(!1), V = F(null), k = (b) => {
|
|
23816
|
+
h?.(`${e3(b.hours)}:${e3(b.minutes)}`);
|
|
23818
23817
|
};
|
|
23819
23818
|
return /* @__PURE__ */ n("div", {
|
|
23820
23819
|
className: `input-time-wrapper${l ? " input-time-highlighted" : ""}`,
|
|
@@ -23828,7 +23827,7 @@ var wn = /[^0-9]/g, fn = /[^0-9a-zA-Z]/g, Ei = ({ autoFocus: t = !1, disabled: r
|
|
|
23828
23827
|
})]
|
|
23829
23828
|
}),
|
|
23830
23829
|
/* @__PURE__ */ n("div", {
|
|
23831
|
-
ref:
|
|
23830
|
+
ref: V,
|
|
23832
23831
|
className: `input-time-field${_ ? " input-time-field--with-clock" : ""}`,
|
|
23833
23832
|
children: [/* @__PURE__ */ e("input", {
|
|
23834
23833
|
autoFocus: t,
|
|
@@ -23867,12 +23866,12 @@ var wn = /[^0-9]/g, fn = /[^0-9a-zA-Z]/g, Ei = ({ autoFocus: t = !1, disabled: r
|
|
|
23867
23866
|
_ && /* @__PURE__ */ e(x2, {
|
|
23868
23867
|
visible: L,
|
|
23869
23868
|
onClose: () => z(!1),
|
|
23870
|
-
anchorEl:
|
|
23871
|
-
children: /* @__PURE__ */ e(
|
|
23869
|
+
anchorEl: V.current,
|
|
23870
|
+
children: /* @__PURE__ */ e(L3, {
|
|
23872
23871
|
collapsibleClock: !1,
|
|
23873
23872
|
label: "",
|
|
23874
23873
|
minuteStep: a,
|
|
23875
|
-
onChange:
|
|
23874
|
+
onChange: k,
|
|
23876
23875
|
value: Cn(y),
|
|
23877
23876
|
withClock: !0
|
|
23878
23877
|
})
|
|
@@ -23887,16 +23886,16 @@ var wn = /[^0-9]/g, fn = /[^0-9a-zA-Z]/g, Ei = ({ autoFocus: t = !1, disabled: r
|
|
|
23887
23886
|
return !1;
|
|
23888
23887
|
}
|
|
23889
23888
|
}, Ii = z1(({ autoFocus: t, disabled: r, error: c, highlighted: l, id: o, label: d, maxLength: s, onBlur: m, onChange: a, onClick: i, onKeyDown: h, onKeyUp: p, onValidationChange: u, placeholder: g = "https://...", readOnly: v = !1, required: w = !1, success: f, validationErrorMessage: y, value: _ }, C) => {
|
|
23890
|
-
const [L, z] = R(void 0),
|
|
23891
|
-
if (!
|
|
23889
|
+
const [L, z] = R(void 0), V = (N) => {
|
|
23890
|
+
if (!N)
|
|
23892
23891
|
return z(void 0), u?.(!0), !0;
|
|
23893
|
-
const
|
|
23894
|
-
return z(
|
|
23895
|
-
},
|
|
23896
|
-
a?.(
|
|
23897
|
-
}, b = (
|
|
23898
|
-
N
|
|
23899
|
-
},
|
|
23892
|
+
const x = bn(N);
|
|
23893
|
+
return z(x ? void 0 : y ?? yn), u?.(x), x;
|
|
23894
|
+
}, k = (N) => {
|
|
23895
|
+
a?.(N), L && V(N);
|
|
23896
|
+
}, b = (N) => {
|
|
23897
|
+
V(N.target.value), m?.(N);
|
|
23898
|
+
}, M = c ?? L;
|
|
23900
23899
|
return /* @__PURE__ */ n("div", {
|
|
23901
23900
|
className: `input-url-wrapper${l ? " input-url-highlighted" : ""}`,
|
|
23902
23901
|
children: [
|
|
@@ -23912,23 +23911,23 @@ var wn = /[^0-9]/g, fn = /[^0-9a-zA-Z]/g, Ei = ({ autoFocus: t = !1, disabled: r
|
|
|
23912
23911
|
autoFocus: t,
|
|
23913
23912
|
disabled: r,
|
|
23914
23913
|
type: "url",
|
|
23915
|
-
className: `input-url${
|
|
23914
|
+
className: `input-url${M ? " input-url-error" : ""}${f ? " input-url-success" : ""}`,
|
|
23916
23915
|
id: o,
|
|
23917
23916
|
maxLength: s,
|
|
23918
23917
|
placeholder: g,
|
|
23919
23918
|
ref: C,
|
|
23920
23919
|
value: _,
|
|
23921
23920
|
onBlur: b,
|
|
23922
|
-
onChange: (
|
|
23921
|
+
onChange: (N) => k(N.target.value),
|
|
23923
23922
|
onClick: i,
|
|
23924
23923
|
onKeyDown: h,
|
|
23925
23924
|
onKeyUp: p,
|
|
23926
23925
|
readOnly: v,
|
|
23927
23926
|
required: w
|
|
23928
23927
|
}),
|
|
23929
|
-
|
|
23928
|
+
M && /* @__PURE__ */ e("span", {
|
|
23930
23929
|
className: "input-url-error-message",
|
|
23931
|
-
children:
|
|
23930
|
+
children: M
|
|
23932
23931
|
}),
|
|
23933
23932
|
f && /* @__PURE__ */ e("span", {
|
|
23934
23933
|
className: "input-url-success-message",
|
|
@@ -24015,7 +24014,7 @@ var wn = /[^0-9]/g, fn = /[^0-9a-zA-Z]/g, Ei = ({ autoFocus: t = !1, disabled: r
|
|
|
24015
24014
|
}),
|
|
24016
24015
|
C
|
|
24017
24016
|
]
|
|
24018
|
-
}) : null : d === "modal" ? /* @__PURE__ */ e(
|
|
24017
|
+
}) : null : d === "modal" ? /* @__PURE__ */ e(q1, {
|
|
24019
24018
|
isOpen: t,
|
|
24020
24019
|
onClose: f,
|
|
24021
24020
|
title: o,
|
|
@@ -24044,7 +24043,7 @@ var wn = /[^0-9]/g, fn = /[^0-9a-zA-Z]/g, Ei = ({ autoFocus: t = !1, disabled: r
|
|
|
24044
24043
|
C
|
|
24045
24044
|
]
|
|
24046
24045
|
})
|
|
24047
|
-
}) : /* @__PURE__ */ e(
|
|
24046
|
+
}) : /* @__PURE__ */ e(N2, {
|
|
24048
24047
|
isOpen: t,
|
|
24049
24048
|
onClose: f,
|
|
24050
24049
|
title: o,
|
|
@@ -24232,7 +24231,7 @@ var wn = /[^0-9]/g, fn = /[^0-9a-zA-Z]/g, Ei = ({ autoFocus: t = !1, disabled: r
|
|
|
24232
24231
|
]
|
|
24233
24232
|
});
|
|
24234
24233
|
};
|
|
24235
|
-
return /* @__PURE__ */ n(
|
|
24234
|
+
return /* @__PURE__ */ n(M3, {
|
|
24236
24235
|
className: [
|
|
24237
24236
|
"mini-stats-card",
|
|
24238
24237
|
`mini-stats-card--align-${o}`,
|
|
@@ -24345,7 +24344,7 @@ var wn = /[^0-9]/g, fn = /[^0-9a-zA-Z]/g, Ei = ({ autoFocus: t = !1, disabled: r
|
|
|
24345
24344
|
className: "NotificationPanel__badge",
|
|
24346
24345
|
children: t.length
|
|
24347
24346
|
})]
|
|
24348
|
-
}), o &&
|
|
24347
|
+
}), o && Y1(/* @__PURE__ */ n(h1, { children: [/* @__PURE__ */ e("div", {
|
|
24349
24348
|
className: "NotificationPanel__backdrop",
|
|
24350
24349
|
onClick: () => d(!1)
|
|
24351
24350
|
}), /* @__PURE__ */ n("div", {
|
|
@@ -24371,7 +24370,7 @@ var wn = /[^0-9]/g, fn = /[^0-9a-zA-Z]/g, Ei = ({ autoFocus: t = !1, disabled: r
|
|
|
24371
24370
|
small: 120,
|
|
24372
24371
|
medium: 180,
|
|
24373
24372
|
large: 240
|
|
24374
|
-
},
|
|
24373
|
+
}, t3 = {
|
|
24375
24374
|
default: "var(--progress-default-bar-fill-color)",
|
|
24376
24375
|
warning: "var(--progress-warning-bar-fill-color)",
|
|
24377
24376
|
danger: "var(--progress-danger-bar-fill-color)",
|
|
@@ -24404,23 +24403,23 @@ var wn = /[^0-9]/g, fn = /[^0-9a-zA-Z]/g, Ei = ({ autoFocus: t = !1, disabled: r
|
|
|
24404
24403
|
].join(" ");
|
|
24405
24404
|
}, Ln = (t) => `hsl(${Math.round((t * 137.508 + 28) % 360)} 72% 52%)`, zn = (t, r) => {
|
|
24406
24405
|
const c = t.variant ?? "default";
|
|
24407
|
-
return c === "custom" ? t.customColor ||
|
|
24406
|
+
return c === "custom" ? t.customColor || t3.default : c === "random" ? Ln(r) : t3[c];
|
|
24408
24407
|
}, Ui = ({ className: t = "", data: r = [], emptyLabel: c, gap: l = 1, size: o = "medium", valueFormatter: d, valuePosition: s = "inside" }) => {
|
|
24409
24408
|
const m = kn[o], a = s === "outside" ? Math.round(m * 0.18) : 0, i = m / 2, h = Math.max(i - Math.max(l, 1), 1), p = `${-a} ${-a} ${m + a * 2} ${m + a * 2}`, u = l1(() => {
|
|
24410
|
-
const L = r.filter((
|
|
24409
|
+
const L = r.filter((k) => Number.isFinite(k.value) && k.value > 0), z = L.reduce((k, b) => k + b.value, 0);
|
|
24411
24410
|
if (z <= 0) return [];
|
|
24412
|
-
let
|
|
24413
|
-
return L.map((
|
|
24414
|
-
const
|
|
24415
|
-
return
|
|
24416
|
-
color: zn(
|
|
24417
|
-
endAngle:
|
|
24411
|
+
let V = 0;
|
|
24412
|
+
return L.map((k, b) => {
|
|
24413
|
+
const M = k.value / z * 360, N = V, x = b === L.length - 1 ? 360 : V + M, B = N + (x - N) / 2;
|
|
24414
|
+
return V = x, {
|
|
24415
|
+
color: zn(k, b),
|
|
24416
|
+
endAngle: x,
|
|
24418
24417
|
index: b,
|
|
24419
|
-
label: d ? d(
|
|
24418
|
+
label: d ? d(k.value, k, b) : k.value,
|
|
24420
24419
|
midAngle: B,
|
|
24421
|
-
path: xn(i, h,
|
|
24422
|
-
startAngle:
|
|
24423
|
-
value:
|
|
24420
|
+
path: xn(i, h, N, x),
|
|
24421
|
+
startAngle: N,
|
|
24422
|
+
value: k.value
|
|
24424
24423
|
};
|
|
24425
24424
|
});
|
|
24426
24425
|
}, [
|
|
@@ -24463,20 +24462,20 @@ var wn = /[^0-9]/g, fn = /[^0-9a-zA-Z]/g, Ei = ({ autoFocus: t = !1, disabled: r
|
|
|
24463
24462
|
strokeWidth: _
|
|
24464
24463
|
}, `${L.index}-${L.value}-${L.startAngle}`))),
|
|
24465
24464
|
g && C && s === "outside" && u.map((L) => {
|
|
24466
|
-
const z = g0(i, i, f, L.midAngle),
|
|
24465
|
+
const z = g0(i, i, f, L.midAngle), V = g0(i, i, y, L.midAngle), k = g0(i, i, w, L.midAngle), b = k.x >= i;
|
|
24467
24466
|
return /* @__PURE__ */ n("g", {
|
|
24468
24467
|
className: "pie-chart__outside-label-group",
|
|
24469
24468
|
children: [/* @__PURE__ */ e("line", {
|
|
24470
24469
|
className: "pie-chart__leader-line",
|
|
24471
24470
|
x1: z.x,
|
|
24472
24471
|
y1: z.y,
|
|
24473
|
-
x2:
|
|
24474
|
-
y2:
|
|
24472
|
+
x2: V.x,
|
|
24473
|
+
y2: V.y,
|
|
24475
24474
|
stroke: L.color
|
|
24476
24475
|
}), /* @__PURE__ */ e("text", {
|
|
24477
24476
|
className: "pie-chart__value-label pie-chart__value-label--outside",
|
|
24478
|
-
x:
|
|
24479
|
-
y:
|
|
24477
|
+
x: k.x,
|
|
24478
|
+
y: k.y,
|
|
24480
24479
|
textAnchor: b ? "start" : "end",
|
|
24481
24480
|
dominantBaseline: "central",
|
|
24482
24481
|
fill: L.color,
|
|
@@ -24688,7 +24687,7 @@ var wn = /[^0-9]/g, fn = /[^0-9a-zA-Z]/g, Ei = ({ autoFocus: t = !1, disabled: r
|
|
|
24688
24687
|
};
|
|
24689
24688
|
return /* @__PURE__ */ e("div", {
|
|
24690
24689
|
className: "quick-add",
|
|
24691
|
-
children: /* @__PURE__ */ e(
|
|
24690
|
+
children: /* @__PURE__ */ e(q1, {
|
|
24692
24691
|
isOpen: t,
|
|
24693
24692
|
title: l,
|
|
24694
24693
|
titleIcon: d,
|
|
@@ -24728,7 +24727,7 @@ var wn = /[^0-9]/g, fn = /[^0-9a-zA-Z]/g, Ei = ({ autoFocus: t = !1, disabled: r
|
|
|
24728
24727
|
const [a, i] = R(d), [h, p] = R(!1), u = async () => {
|
|
24729
24728
|
p(!0), await l(a), p(!1), c();
|
|
24730
24729
|
};
|
|
24731
|
-
return /* @__PURE__ */ e(
|
|
24730
|
+
return /* @__PURE__ */ e(q1, {
|
|
24732
24731
|
isOpen: t,
|
|
24733
24732
|
titleIcon: o,
|
|
24734
24733
|
title: r,
|
|
@@ -24817,7 +24816,7 @@ var wn = /[^0-9]/g, fn = /[^0-9a-zA-Z]/g, Ei = ({ autoFocus: t = !1, disabled: r
|
|
|
24817
24816
|
};
|
|
24818
24817
|
return /* @__PURE__ */ e("div", {
|
|
24819
24818
|
className: "quick-set",
|
|
24820
|
-
children: /* @__PURE__ */ n(
|
|
24819
|
+
children: /* @__PURE__ */ n(q1, {
|
|
24821
24820
|
isOpen: t,
|
|
24822
24821
|
titleIcon: d,
|
|
24823
24822
|
title: c,
|
|
@@ -24852,7 +24851,7 @@ var wn = /[^0-9]/g, fn = /[^0-9a-zA-Z]/g, Ei = ({ autoFocus: t = !1, disabled: r
|
|
|
24852
24851
|
})
|
|
24853
24852
|
});
|
|
24854
24853
|
}, Sn = (t) => !Number.isFinite(t) || t >= 1 ? 0 : String(t).split(".")[1]?.length ?? 0, to = ({ disabled: t = !1, formatValue: r, label: c, max: l = 100, min: o = 0, minDistance: d, onChange: s, onChangeEnd: m, showValues: a = !0, step: i = 1, thin: h = !1, tickStep: p = 0, value: u, variant: g = "accent" }) => {
|
|
24855
|
-
const v = F(null), w = F(null), f = Math.max(1, l - o), y = d ?? i, _ = Sn(i), [C, L] = u, z = D((T) => r ? r(T) : _ > 0 ? T.toFixed(_) : String(T), [_, r]),
|
|
24854
|
+
const v = F(null), w = F(null), f = Math.max(1, l - o), y = d ?? i, _ = Sn(i), [C, L] = u, z = D((T) => r ? r(T) : _ > 0 ? T.toFixed(_) : String(T), [_, r]), V = D((T) => {
|
|
24856
24855
|
const S = i > 0 ? o + Math.round((T - o) / i) * i : T, $ = Math.min(l, Math.max(o, S));
|
|
24857
24856
|
return _ > 0 ? Number($.toFixed(_)) : $;
|
|
24858
24857
|
}, [
|
|
@@ -24860,41 +24859,41 @@ var wn = /[^0-9]/g, fn = /[^0-9a-zA-Z]/g, Ei = ({ autoFocus: t = !1, disabled: r
|
|
|
24860
24859
|
l,
|
|
24861
24860
|
o,
|
|
24862
24861
|
i
|
|
24863
|
-
]),
|
|
24864
|
-
const $ =
|
|
24862
|
+
]), k = D((T, S) => {
|
|
24863
|
+
const $ = V(S);
|
|
24865
24864
|
return T === "lower" ? [Math.min($, L - y), L] : [C, Math.max($, C + y)];
|
|
24866
24865
|
}, [
|
|
24867
24866
|
y,
|
|
24868
24867
|
C,
|
|
24869
|
-
|
|
24868
|
+
V,
|
|
24870
24869
|
L
|
|
24871
24870
|
]), b = D((T) => {
|
|
24872
24871
|
const S = v.current;
|
|
24873
24872
|
if (!S) return null;
|
|
24874
24873
|
const $ = S.getBoundingClientRect();
|
|
24875
24874
|
return $.width === 0 ? null : o + Math.min(1, Math.max(0, (T - $.left) / $.width)) * f;
|
|
24876
|
-
}, [o, f]),
|
|
24875
|
+
}, [o, f]), M = D((T, S) => {
|
|
24877
24876
|
t || (T.preventDefault(), T.stopPropagation(), T.currentTarget.setPointerCapture(T.pointerId), w.current = S);
|
|
24878
|
-
}, [t]),
|
|
24877
|
+
}, [t]), N = D((T) => {
|
|
24879
24878
|
const S = w.current;
|
|
24880
24879
|
if (!S || t) return;
|
|
24881
24880
|
const $ = b(T.clientX);
|
|
24882
|
-
$ !== null && s(
|
|
24881
|
+
$ !== null && s(k(S, $));
|
|
24883
24882
|
}, [
|
|
24884
|
-
|
|
24883
|
+
k,
|
|
24885
24884
|
t,
|
|
24886
24885
|
s,
|
|
24887
24886
|
b
|
|
24888
|
-
]),
|
|
24887
|
+
]), x = D((T) => {
|
|
24889
24888
|
w.current && (T.currentTarget.releasePointerCapture(T.pointerId), w.current = null, m?.(u));
|
|
24890
24889
|
}, [m, u]), B = D((T) => {
|
|
24891
24890
|
if (t) return;
|
|
24892
24891
|
const S = b(T.clientX);
|
|
24893
24892
|
if (S === null) return;
|
|
24894
|
-
const $ = Math.abs(S - C) <= Math.abs(S - L) ? "lower" : "upper", e1 =
|
|
24893
|
+
const $ = Math.abs(S - C) <= Math.abs(S - L) ? "lower" : "upper", e1 = k($, S);
|
|
24895
24894
|
s(e1), m?.(e1);
|
|
24896
24895
|
}, [
|
|
24897
|
-
|
|
24896
|
+
k,
|
|
24898
24897
|
t,
|
|
24899
24898
|
C,
|
|
24900
24899
|
s,
|
|
@@ -24906,10 +24905,10 @@ var wn = /[^0-9]/g, fn = /[^0-9a-zA-Z]/g, Ei = ({ autoFocus: t = !1, disabled: r
|
|
|
24906
24905
|
const $ = S === "lower" ? C : L, e1 = i > 0 ? i : 1, O = T.key === "ArrowLeft" || T.key === "ArrowDown" ? $ - e1 : T.key === "ArrowRight" || T.key === "ArrowUp" ? $ + e1 : T.key === "PageDown" ? $ - e1 * 10 : T.key === "PageUp" ? $ + e1 * 10 : T.key === "Home" ? o : T.key === "End" ? l : null;
|
|
24907
24906
|
if (O === null) return;
|
|
24908
24907
|
T.preventDefault();
|
|
24909
|
-
const Z =
|
|
24908
|
+
const Z = k(S, O);
|
|
24910
24909
|
s(Z), m?.(Z);
|
|
24911
24910
|
}, [
|
|
24912
|
-
|
|
24911
|
+
k,
|
|
24913
24912
|
t,
|
|
24914
24913
|
C,
|
|
24915
24914
|
l,
|
|
@@ -24921,12 +24920,12 @@ var wn = /[^0-9]/g, fn = /[^0-9a-zA-Z]/g, Ei = ({ autoFocus: t = !1, disabled: r
|
|
|
24921
24920
|
]), E = l1(() => {
|
|
24922
24921
|
if (!p || p <= 0) return [];
|
|
24923
24922
|
const T = [];
|
|
24924
|
-
for (let S = o; S <= l; S += p) T.push(
|
|
24923
|
+
for (let S = o; S <= l; S += p) T.push(V(S));
|
|
24925
24924
|
return T;
|
|
24926
24925
|
}, [
|
|
24927
24926
|
l,
|
|
24928
24927
|
o,
|
|
24929
|
-
|
|
24928
|
+
V,
|
|
24930
24929
|
p
|
|
24931
24930
|
]), P = (T) => (Math.min(l, Math.max(o, T)) - o) / f * 100, J = P(C), A = P(L);
|
|
24932
24931
|
return /* @__PURE__ */ n("div", {
|
|
@@ -24967,9 +24966,9 @@ var wn = /[^0-9]/g, fn = /[^0-9a-zA-Z]/g, Ei = ({ autoFocus: t = !1, disabled: r
|
|
|
24967
24966
|
className: "range-slider__thumb range-slider__thumb--lower",
|
|
24968
24967
|
disabled: t,
|
|
24969
24968
|
onKeyDown: (T) => H(T, "lower"),
|
|
24970
|
-
onPointerDown: (T) =>
|
|
24971
|
-
onPointerMove:
|
|
24972
|
-
onPointerUp:
|
|
24969
|
+
onPointerDown: (T) => M(T, "lower"),
|
|
24970
|
+
onPointerMove: N,
|
|
24971
|
+
onPointerUp: x,
|
|
24973
24972
|
style: { left: `${J}%` },
|
|
24974
24973
|
title: z(C),
|
|
24975
24974
|
type: "button"
|
|
@@ -24978,9 +24977,9 @@ var wn = /[^0-9]/g, fn = /[^0-9a-zA-Z]/g, Ei = ({ autoFocus: t = !1, disabled: r
|
|
|
24978
24977
|
className: "range-slider__thumb range-slider__thumb--upper",
|
|
24979
24978
|
disabled: t,
|
|
24980
24979
|
onKeyDown: (T) => H(T, "upper"),
|
|
24981
|
-
onPointerDown: (T) =>
|
|
24982
|
-
onPointerMove:
|
|
24983
|
-
onPointerUp:
|
|
24980
|
+
onPointerDown: (T) => M(T, "upper"),
|
|
24981
|
+
onPointerMove: N,
|
|
24982
|
+
onPointerUp: x,
|
|
24984
24983
|
style: { left: `${A}%` },
|
|
24985
24984
|
title: z(L),
|
|
24986
24985
|
type: "button"
|
|
@@ -25158,7 +25157,7 @@ ${o.textContent ?? ""}
|
|
|
25158
25157
|
label: "Code Block",
|
|
25159
25158
|
title: "Code Block",
|
|
25160
25159
|
isAdvanced: !0
|
|
25161
|
-
}],
|
|
25160
|
+
}], r3 = (t) => {
|
|
25162
25161
|
const r = document.createElement("tr");
|
|
25163
25162
|
for (let c = 0; c < t; c++) {
|
|
25164
25163
|
const l = document.createElement("td");
|
|
@@ -25294,7 +25293,7 @@ ${o.textContent ?? ""}
|
|
|
25294
25293
|
const v = m()?.closest("tr") ?? null, w = l.querySelector("tbody") ?? l, f = v ?? w.querySelector("tr:last-child");
|
|
25295
25294
|
if (!f) return;
|
|
25296
25295
|
const y = f.querySelectorAll("td,th").length;
|
|
25297
|
-
w.insertBefore(
|
|
25296
|
+
w.insertBefore(r3(y), f.nextSibling), c(), a(l);
|
|
25298
25297
|
}, [
|
|
25299
25298
|
l,
|
|
25300
25299
|
r,
|
|
@@ -25307,7 +25306,7 @@ ${o.textContent ?? ""}
|
|
|
25307
25306
|
const v = m()?.closest("tr") ?? null, w = l.querySelector("tbody") ?? l, f = v ?? w.querySelector("tr:first-child");
|
|
25308
25307
|
if (!f) return;
|
|
25309
25308
|
const y = f.querySelectorAll("td,th").length;
|
|
25310
|
-
w.insertBefore(
|
|
25309
|
+
w.insertBefore(r3(y), f), c(), a(l);
|
|
25311
25310
|
}, [
|
|
25312
25311
|
l,
|
|
25313
25312
|
r,
|
|
@@ -25630,7 +25629,7 @@ ${o.textContent ?? ""}
|
|
|
25630
25629
|
s(c === "markdown" ? Bn(u1) : u1), setTimeout(() => {
|
|
25631
25630
|
p.current = !1;
|
|
25632
25631
|
}, 0);
|
|
25633
|
-
}, [c, s]), { snapshotForUndo: f, undo: y, redo: _ } = In(h, p, w), { showLinkPrompt: C, linkUrl: L, setLinkUrl: z, linkText:
|
|
25632
|
+
}, [c, s]), { snapshotForUndo: f, undo: y, redo: _ } = In(h, p, w), { showLinkPrompt: C, linkUrl: L, setLinkUrl: z, linkText: V, setLinkText: k, editingAnchorRef: b, openLinkPrompt: M, confirmLink: N, cancelLink: x } = Gn({
|
|
25634
25633
|
editorRef: h,
|
|
25635
25634
|
snapshotForUndo: f,
|
|
25636
25635
|
emitChange: w
|
|
@@ -25695,13 +25694,13 @@ ${o.textContent ?? ""}
|
|
|
25695
25694
|
}, [W]), C1 = D((a1) => {
|
|
25696
25695
|
const u1 = a1.target, I = u1.closest("a");
|
|
25697
25696
|
if (I) {
|
|
25698
|
-
a1.preventDefault(),
|
|
25697
|
+
a1.preventDefault(), M(I), Z();
|
|
25699
25698
|
return;
|
|
25700
25699
|
}
|
|
25701
25700
|
const K = u1.closest("table");
|
|
25702
25701
|
K ? E(K) : P(), Z();
|
|
25703
25702
|
}, [
|
|
25704
|
-
|
|
25703
|
+
M,
|
|
25705
25704
|
Z,
|
|
25706
25705
|
E,
|
|
25707
25706
|
P
|
|
@@ -25763,19 +25762,19 @@ ${o.textContent ?? ""}
|
|
|
25763
25762
|
exec: W,
|
|
25764
25763
|
applyHeading: q,
|
|
25765
25764
|
insertTaskList: m1,
|
|
25766
|
-
openLinkPrompt: () =>
|
|
25765
|
+
openLinkPrompt: () => M(),
|
|
25767
25766
|
insertTable: t1,
|
|
25768
25767
|
undo: y,
|
|
25769
25768
|
redo: _
|
|
25770
25769
|
}),
|
|
25771
25770
|
C && /* @__PURE__ */ e(jn, {
|
|
25772
25771
|
isEditing: !!b.current,
|
|
25773
|
-
linkText:
|
|
25772
|
+
linkText: V,
|
|
25774
25773
|
linkUrl: L,
|
|
25775
|
-
setLinkText:
|
|
25774
|
+
setLinkText: k,
|
|
25776
25775
|
setLinkUrl: z,
|
|
25777
|
-
confirmLink:
|
|
25778
|
-
cancelLink:
|
|
25776
|
+
confirmLink: N,
|
|
25777
|
+
cancelLink: x
|
|
25779
25778
|
}),
|
|
25780
25779
|
B && H && /* @__PURE__ */ e(Wn, {
|
|
25781
25780
|
pos: H,
|
|
@@ -25857,10 +25856,10 @@ ${o.textContent ?? ""}
|
|
|
25857
25856
|
"--_roll-delay": `${z * a}ms`,
|
|
25858
25857
|
"--_roll-digit": Number(_)
|
|
25859
25858
|
},
|
|
25860
|
-
children: Un.map((
|
|
25859
|
+
children: Un.map((V) => /* @__PURE__ */ e("span", {
|
|
25861
25860
|
className: "rolling-number__cell",
|
|
25862
|
-
children:
|
|
25863
|
-
},
|
|
25861
|
+
children: V
|
|
25862
|
+
}, V))
|
|
25864
25863
|
})
|
|
25865
25864
|
}, `digit-${z}`) : /* @__PURE__ */ e("span", {
|
|
25866
25865
|
className: "rolling-number__separator",
|
|
@@ -25930,7 +25929,7 @@ ${o.textContent ?? ""}
|
|
|
25930
25929
|
const [u, g] = R(""), v = G3(), w = m ?? v?.isMobile ?? !1, f = d ?? (w ? v?.isOpen ?? !1 : !0), y = s ?? v?.close ?? (() => {
|
|
25931
25930
|
}), _ = p && u ? t.map((b) => ({
|
|
25932
25931
|
...b,
|
|
25933
|
-
items: b.items.filter((
|
|
25932
|
+
items: b.items.filter((M) => M.label.toLowerCase().includes(u.toLowerCase()))
|
|
25934
25933
|
})).filter((b) => b.items.length > 0) : t, C = [
|
|
25935
25934
|
"sidebar",
|
|
25936
25935
|
f ? "sidebar--open" : "sidebar--closed",
|
|
@@ -25940,15 +25939,15 @@ ${o.textContent ?? ""}
|
|
|
25940
25939
|
].filter(Boolean).join(" "), L = ["sidebar__overlay", i ? "sidebar__overlay--contained" : ""].filter(Boolean).join(" "), z = {
|
|
25941
25940
|
"--sidebar-width": r,
|
|
25942
25941
|
"--sidebar-shadow": h
|
|
25943
|
-
},
|
|
25942
|
+
}, V = (b) => {
|
|
25944
25943
|
b.onClick?.(), w && y();
|
|
25945
|
-
},
|
|
25944
|
+
}, k = (b) => /* @__PURE__ */ n("button", {
|
|
25946
25945
|
className: [
|
|
25947
25946
|
"sidebar__link",
|
|
25948
25947
|
b.isActive ? "sidebar__link--active" : "",
|
|
25949
25948
|
b.className
|
|
25950
25949
|
].filter(Boolean).join(" "),
|
|
25951
|
-
onClick: () =>
|
|
25950
|
+
onClick: () => V(b),
|
|
25952
25951
|
children: [
|
|
25953
25952
|
b.icon && /* @__PURE__ */ e("span", {
|
|
25954
25953
|
className: "sidebar__link-icon",
|
|
@@ -25982,7 +25981,7 @@ ${o.textContent ?? ""}
|
|
|
25982
25981
|
className: C,
|
|
25983
25982
|
style: z,
|
|
25984
25983
|
children: [
|
|
25985
|
-
l && /* @__PURE__ */ e(
|
|
25984
|
+
l && /* @__PURE__ */ e(y3, {
|
|
25986
25985
|
...l,
|
|
25987
25986
|
className: ["sidebar__app-header", l.className].filter(Boolean).join(" ")
|
|
25988
25987
|
}),
|
|
@@ -25996,7 +25995,7 @@ ${o.textContent ?? ""}
|
|
|
25996
25995
|
}),
|
|
25997
25996
|
_.length > 0 && /* @__PURE__ */ e("nav", {
|
|
25998
25997
|
className: "sidebar__nav",
|
|
25999
|
-
children: _.map((b,
|
|
25998
|
+
children: _.map((b, M) => /* @__PURE__ */ n("section", {
|
|
26000
25999
|
className: "sidebar__section",
|
|
26001
26000
|
children: [
|
|
26002
26001
|
(b.title || b.heading || b.icon || b.description) && /* @__PURE__ */ n("div", {
|
|
@@ -26021,10 +26020,10 @@ ${o.textContent ?? ""}
|
|
|
26021
26020
|
children: b.description
|
|
26022
26021
|
})]
|
|
26023
26022
|
}),
|
|
26024
|
-
b.items.map((
|
|
26025
|
-
b.showDivider &&
|
|
26023
|
+
b.items.map((N) => o ? o(N) : k(N)),
|
|
26024
|
+
b.showDivider && M < _.length - 1 && /* @__PURE__ */ e("div", { className: "sidebar__divider" })
|
|
26026
26025
|
]
|
|
26027
|
-
}, b.id ?? b.title ??
|
|
26026
|
+
}, b.id ?? b.title ?? M))
|
|
26028
26027
|
})
|
|
26029
26028
|
]
|
|
26030
26029
|
})] });
|
|
@@ -26188,41 +26187,41 @@ var ho = ({ variant: t = "text", animation: r = "pulse", width: c, height: l, bo
|
|
|
26188
26187
|
}, po = ({ className: t = "", collapsible: r = !1, gutterSize: c = 6, keyboardStep: l = 2, onResize: o, orientation: d = "horizontal", panes: s, resetOnDoubleClick: m = !0 }) => {
|
|
26189
26188
|
const a = l1(() => Kn(s), [s]), [i, h] = R(a), p = F(null), u = F(null);
|
|
26190
26189
|
Y(() => {
|
|
26191
|
-
h((
|
|
26190
|
+
h((V) => V.length === a.length ? V : a);
|
|
26192
26191
|
}, [a]);
|
|
26193
|
-
const g = D((
|
|
26194
|
-
const
|
|
26195
|
-
let H =
|
|
26196
|
-
return H <
|
|
26197
|
-
}, [r, g]), w = D((
|
|
26198
|
-
const
|
|
26199
|
-
return h(
|
|
26200
|
-
}, [i]), f = D((
|
|
26201
|
-
|
|
26202
|
-
index:
|
|
26203
|
-
startA: i[
|
|
26204
|
-
startB: i[
|
|
26205
|
-
startPosition: d === "horizontal" ?
|
|
26192
|
+
const g = D((V) => s[V]?.minSize ?? Xn, [s]), v = D((V, k, b, M) => {
|
|
26193
|
+
const N = g(V), x = g(V + 1), B = k + b;
|
|
26194
|
+
let H = k + M;
|
|
26195
|
+
return H < N && (H = r && H < N / 2 ? 0 : N), B - H < x && (H = r && B - H < x / 2 ? B : B - x), [H, B - H];
|
|
26196
|
+
}, [r, g]), w = D((V, [k, b]) => {
|
|
26197
|
+
const M = i.map((N, x) => x === V ? k : x === V + 1 ? b : N);
|
|
26198
|
+
return h(M), M;
|
|
26199
|
+
}, [i]), f = D((V, k) => {
|
|
26200
|
+
V.preventDefault(), V.currentTarget.setPointerCapture(V.pointerId), u.current = {
|
|
26201
|
+
index: k,
|
|
26202
|
+
startA: i[k],
|
|
26203
|
+
startB: i[k + 1],
|
|
26204
|
+
startPosition: d === "horizontal" ? V.clientX : V.clientY
|
|
26206
26205
|
};
|
|
26207
|
-
}, [d, i]), y = D((
|
|
26208
|
-
const
|
|
26209
|
-
if (!
|
|
26210
|
-
const
|
|
26211
|
-
if (
|
|
26212
|
-
const
|
|
26213
|
-
w(
|
|
26206
|
+
}, [d, i]), y = D((V) => {
|
|
26207
|
+
const k = u.current, b = p.current;
|
|
26208
|
+
if (!k || !b) return;
|
|
26209
|
+
const M = b.getBoundingClientRect(), N = d === "horizontal" ? M.width : M.height;
|
|
26210
|
+
if (N === 0) return;
|
|
26211
|
+
const x = ((d === "horizontal" ? V.clientX : V.clientY) - k.startPosition) / N * 100;
|
|
26212
|
+
w(k.index, v(k.index, k.startA, k.startB, x));
|
|
26214
26213
|
}, [
|
|
26215
26214
|
w,
|
|
26216
26215
|
d,
|
|
26217
26216
|
v
|
|
26218
|
-
]), _ = D((
|
|
26219
|
-
u.current && (
|
|
26220
|
-
}, [o, i]), C = D((
|
|
26221
|
-
const b = d === "horizontal" ? "ArrowLeft" : "ArrowUp",
|
|
26222
|
-
if (
|
|
26223
|
-
|
|
26224
|
-
const
|
|
26225
|
-
o?.(w(
|
|
26217
|
+
]), _ = D((V) => {
|
|
26218
|
+
u.current && (V.currentTarget.releasePointerCapture(V.pointerId), u.current = null, o?.(i));
|
|
26219
|
+
}, [o, i]), C = D((V, k) => {
|
|
26220
|
+
const b = d === "horizontal" ? "ArrowLeft" : "ArrowUp", M = d === "horizontal" ? "ArrowRight" : "ArrowDown";
|
|
26221
|
+
if (V.key !== b && V.key !== M) return;
|
|
26222
|
+
V.preventDefault();
|
|
26223
|
+
const N = V.key === M ? 1 : -1;
|
|
26224
|
+
o?.(w(k, v(k, i[k], i[k + 1], N * l)));
|
|
26226
26225
|
}, [
|
|
26227
26226
|
w,
|
|
26228
26227
|
l,
|
|
@@ -26245,21 +26244,21 @@ var ho = ({ variant: t = "text", animation: r = "pulse", width: c, height: l, bo
|
|
|
26245
26244
|
].filter(Boolean).join(" "),
|
|
26246
26245
|
ref: p,
|
|
26247
26246
|
style: z,
|
|
26248
|
-
children: s.map((
|
|
26249
|
-
className: `splitter__pane${i[
|
|
26250
|
-
style: { flexBasis: `${i[
|
|
26251
|
-
children:
|
|
26252
|
-
}),
|
|
26247
|
+
children: s.map((V, k) => /* @__PURE__ */ n(h3, { children: [/* @__PURE__ */ e("div", {
|
|
26248
|
+
className: `splitter__pane${i[k] === 0 ? " splitter__pane--collapsed" : ""}`,
|
|
26249
|
+
style: { flexBasis: `${i[k]}%` },
|
|
26250
|
+
children: V.content
|
|
26251
|
+
}), k < s.length - 1 && /* @__PURE__ */ e("div", {
|
|
26253
26252
|
className: "splitter__gutter",
|
|
26254
26253
|
onDoubleClick: L,
|
|
26255
|
-
onKeyDown: (b) => C(b,
|
|
26256
|
-
onPointerDown: (b) => f(b,
|
|
26254
|
+
onKeyDown: (b) => C(b, k),
|
|
26255
|
+
onPointerDown: (b) => f(b, k),
|
|
26257
26256
|
onPointerMove: y,
|
|
26258
26257
|
onPointerUp: _,
|
|
26259
26258
|
tabIndex: 0,
|
|
26260
26259
|
title: m ? "Drag to resize — double-click to reset" : "Drag to resize",
|
|
26261
26260
|
children: /* @__PURE__ */ e("span", { className: "splitter__gutter-grip" })
|
|
26262
|
-
})] },
|
|
26261
|
+
})] }, V.id))
|
|
26263
26262
|
});
|
|
26264
26263
|
}, Qn = (t, r, c) => {
|
|
26265
26264
|
const l = `${O0(r)}%`;
|
|
@@ -26340,31 +26339,31 @@ var ho = ({ variant: t = "text", animation: r = "pulse", width: c, height: l, bo
|
|
|
26340
26339
|
children: d
|
|
26341
26340
|
})]
|
|
26342
26341
|
}) : null;
|
|
26343
|
-
function
|
|
26342
|
+
function c3({ state: t }) {
|
|
26344
26343
|
return /* @__PURE__ */ e("span", {
|
|
26345
26344
|
className: `suggestions-list__sort-icon suggestions-list__sort-icon--${t}`,
|
|
26346
26345
|
children: /* @__PURE__ */ e(j, { name: t === "asc" ? "arrow-up" : t === "desc" ? "arrow-down" : "arrow-bidirectional-vertical" })
|
|
26347
26346
|
});
|
|
26348
26347
|
}
|
|
26349
|
-
var
|
|
26348
|
+
var l3 = 10, wo = ({ data: t, label: r, title: c, tooltip: l, enableSearch: o = !1, onRowClick: d }) => {
|
|
26350
26349
|
const [s, m] = R(!1), [a, i] = R(!1), [h, p] = R(""), [u, g] = R(null), [v, w] = R("asc"), f = l1(() => h.trim() ? t.filter((b) => b.name.toLowerCase().includes(h.toLowerCase())) : t, [t, h]), y = l1(() => {
|
|
26351
26350
|
if (!u) return f;
|
|
26352
|
-
const b = [...f].sort((
|
|
26353
|
-
const
|
|
26354
|
-
return typeof
|
|
26351
|
+
const b = [...f].sort((M, N) => {
|
|
26352
|
+
const x = u === "name" ? M.name : M.value, B = u === "name" ? N.name : N.value;
|
|
26353
|
+
return typeof x == "number" && typeof B == "number" ? x - B : String(x).localeCompare(String(B));
|
|
26355
26354
|
});
|
|
26356
26355
|
return v === "asc" ? b : b.reverse();
|
|
26357
26356
|
}, [
|
|
26358
26357
|
f,
|
|
26359
26358
|
u,
|
|
26360
26359
|
v
|
|
26361
|
-
]), _ = l1(() => a ? [...y] : y.slice(0,
|
|
26360
|
+
]), _ = l1(() => a ? [...y] : y.slice(0, l3), [y, a]), C = y.length > l3, L = () => {
|
|
26362
26361
|
m(!s);
|
|
26363
26362
|
}, z = D(() => {
|
|
26364
26363
|
i(!a);
|
|
26365
|
-
}, [a]),
|
|
26366
|
-
u === b ? w((
|
|
26367
|
-
},
|
|
26364
|
+
}, [a]), V = (b) => {
|
|
26365
|
+
u === b ? w((M) => M === "asc" ? "desc" : "asc") : (g(b), w("asc"));
|
|
26366
|
+
}, k = l1(() => /* @__PURE__ */ n("div", {
|
|
26368
26367
|
className: "list-suggestions-list",
|
|
26369
26368
|
children: [
|
|
26370
26369
|
/* @__PURE__ */ e(c1, {
|
|
@@ -26387,28 +26386,28 @@ var c3 = 10, wo = ({ data: t, label: r, title: c, tooltip: l, enableSearch: o =
|
|
|
26387
26386
|
children: [/* @__PURE__ */ n("button", {
|
|
26388
26387
|
type: "button",
|
|
26389
26388
|
className: "list-suggestions-list-header-cell list-suggestions-list-header-cell--name",
|
|
26390
|
-
onClick: () =>
|
|
26391
|
-
children: ["Name", /* @__PURE__ */ e(
|
|
26389
|
+
onClick: () => V("name"),
|
|
26390
|
+
children: ["Name", /* @__PURE__ */ e(c3, { state: u === "name" ? v : "unsorted" })]
|
|
26392
26391
|
}), /* @__PURE__ */ n("button", {
|
|
26393
26392
|
type: "button",
|
|
26394
26393
|
className: "list-suggestions-list-header-cell list-suggestions-list-header-cell--value",
|
|
26395
|
-
onClick: () =>
|
|
26396
|
-
children: ["Value", /* @__PURE__ */ e(
|
|
26394
|
+
onClick: () => V("value"),
|
|
26395
|
+
children: ["Value", /* @__PURE__ */ e(c3, { state: u === "value" ? v : "unsorted" })]
|
|
26397
26396
|
})]
|
|
26398
26397
|
}),
|
|
26399
|
-
_.map((b,
|
|
26398
|
+
_.map((b, M) => /* @__PURE__ */ n("div", {
|
|
26400
26399
|
className: `list-suggestions-list-row ${d ? "list-suggestions-list-row--clickable" : ""}`,
|
|
26401
26400
|
onClick: () => d?.(b),
|
|
26402
26401
|
tabIndex: d ? 0 : void 0,
|
|
26403
|
-
onKeyDown: (
|
|
26404
|
-
d && (
|
|
26402
|
+
onKeyDown: (N) => {
|
|
26403
|
+
d && (N.key === "Enter" || N.key === " ") && (N.preventDefault(), d(b));
|
|
26405
26404
|
},
|
|
26406
26405
|
children: [/* @__PURE__ */ e("div", { children: b.name }), /* @__PURE__ */ n("div", { children: [
|
|
26407
26406
|
typeof b.value == "number" && O0(b.value),
|
|
26408
26407
|
typeof b.value == "string" && b.value,
|
|
26409
26408
|
b.unit
|
|
26410
26409
|
] })]
|
|
26411
|
-
}, `list-suggestions-list-row-${
|
|
26410
|
+
}, `list-suggestions-list-row-${M}`)),
|
|
26412
26411
|
_.length === 0 && /* @__PURE__ */ e("div", {
|
|
26413
26412
|
className: "list-suggestions-list-empty",
|
|
26414
26413
|
children: "No results found"
|
|
@@ -26432,7 +26431,7 @@ var c3 = 10, wo = ({ data: t, label: r, title: c, tooltip: l, enableSearch: o =
|
|
|
26432
26431
|
v,
|
|
26433
26432
|
c,
|
|
26434
26433
|
z,
|
|
26435
|
-
|
|
26434
|
+
V,
|
|
26436
26435
|
l
|
|
26437
26436
|
]);
|
|
26438
26437
|
return /* @__PURE__ */ n("div", {
|
|
@@ -26446,7 +26445,7 @@ var c3 = 10, wo = ({ data: t, label: r, title: c, tooltip: l, enableSearch: o =
|
|
|
26446
26445
|
r,
|
|
26447
26446
|
" suggestions"
|
|
26448
26447
|
]
|
|
26449
|
-
}) }), s &&
|
|
26448
|
+
}) }), s && k]
|
|
26450
26449
|
});
|
|
26451
26450
|
}, w0 = [
|
|
26452
26451
|
{
|
|
@@ -26954,7 +26953,7 @@ var c3 = 10, wo = ({ data: t, label: r, title: c, tooltip: l, enableSearch: o =
|
|
|
26954
26953
|
fontUrl: "https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600;700&display=swap",
|
|
26955
26954
|
fontUrlMono: "https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600;700&display=swap"
|
|
26956
26955
|
}
|
|
26957
|
-
],
|
|
26956
|
+
], n3 = /* @__PURE__ */ new Set([
|
|
26958
26957
|
"arctic-blue",
|
|
26959
26958
|
"crimson-dusk",
|
|
26960
26959
|
"frost-petal",
|
|
@@ -26981,18 +26980,18 @@ var c3 = 10, wo = ({ data: t, label: r, title: c, tooltip: l, enableSearch: o =
|
|
|
26981
26980
|
"sandy-parchment",
|
|
26982
26981
|
"terracotta-kitchen",
|
|
26983
26982
|
"vital-aurora"
|
|
26984
|
-
]), ea = (t) => Jn.has(t) ? "light" : "dark", ta = (t) => w0.find((r) => r.value === t),
|
|
26983
|
+
]), ea = (t) => Jn.has(t) ? "light" : "dark", ta = (t) => w0.find((r) => r.value === t), a3 = "theme-font-link", i3 = "theme-font-link-display", o3 = "theme-font-link-mono", fo = ({ children: t, theme: r, effects: c, onSave: l, allowedThemes: o }) => {
|
|
26985
26984
|
const [d, s] = R(null), [m, a] = R(null), [i, h] = R(!1), p = d ?? r, u = m ?? c;
|
|
26986
26985
|
Y(() => {
|
|
26987
26986
|
document.documentElement.setAttribute("data-theme", p);
|
|
26988
26987
|
const C = ta(p);
|
|
26989
26988
|
if (C) {
|
|
26990
|
-
let L = document.getElementById(
|
|
26991
|
-
L || (L = document.createElement("link"), L.id =
|
|
26992
|
-
let z = document.getElementById(
|
|
26993
|
-
C.fontUrlDisplay ? (z || (z = document.createElement("link"), z.id =
|
|
26994
|
-
let
|
|
26995
|
-
C.fontUrlMono ? (
|
|
26989
|
+
let L = document.getElementById(a3);
|
|
26990
|
+
L || (L = document.createElement("link"), L.id = a3, L.rel = "stylesheet", document.head.appendChild(L)), L.href = C.fontUrl;
|
|
26991
|
+
let z = document.getElementById(i3);
|
|
26992
|
+
C.fontUrlDisplay ? (z || (z = document.createElement("link"), z.id = i3, z.rel = "stylesheet", document.head.appendChild(z)), z.href = C.fontUrlDisplay) : z?.remove();
|
|
26993
|
+
let V = document.getElementById(o3);
|
|
26994
|
+
C.fontUrlMono ? (V || (V = document.createElement("link"), V.id = o3, V.rel = "stylesheet", document.head.appendChild(V)), V.href = C.fontUrlMono) : V?.remove();
|
|
26996
26995
|
}
|
|
26997
26996
|
}, [p]);
|
|
26998
26997
|
const g = D((C) => {
|
|
@@ -27005,16 +27004,16 @@ var c3 = 10, wo = ({ data: t, label: r, title: c, tooltip: l, enableSearch: o =
|
|
|
27005
27004
|
Y(() => {
|
|
27006
27005
|
const C = (z) => {
|
|
27007
27006
|
if (!(z instanceof HTMLElement)) return !1;
|
|
27008
|
-
const
|
|
27009
|
-
return
|
|
27007
|
+
const V = z.tagName;
|
|
27008
|
+
return V === "INPUT" || V === "TEXTAREA" || V === "SELECT" || z.isContentEditable;
|
|
27010
27009
|
}, L = (z) => {
|
|
27011
27010
|
if (!(z.ctrlKey || z.metaKey || z.altKey) && !C(z.target))
|
|
27012
27011
|
if (z.key === "[" || z.key === "]") {
|
|
27013
27012
|
z.preventDefault();
|
|
27014
|
-
const
|
|
27015
|
-
if (
|
|
27016
|
-
const b =
|
|
27017
|
-
s(M
|
|
27013
|
+
const V = w0.map((N) => N.value), k = o && o.length > 0 ? V.filter((N) => o.includes(N)) : V;
|
|
27014
|
+
if (k.length === 0) return;
|
|
27015
|
+
const b = k.indexOf(p), M = ((b === -1 ? 0 : b) + (z.key === "]" ? 1 : -1) + k.length) % k.length;
|
|
27016
|
+
s(k[M]);
|
|
27018
27017
|
} else z.key === "Escape" && d && (z.preventDefault(), s(null), a(null));
|
|
27019
27018
|
};
|
|
27020
27019
|
return window.addEventListener("keydown", L), () => window.removeEventListener("keydown", L);
|
|
@@ -27033,7 +27032,7 @@ var c3 = 10, wo = ({ data: t, label: r, title: c, tooltip: l, enableSearch: o =
|
|
|
27033
27032
|
u,
|
|
27034
27033
|
l
|
|
27035
27034
|
]);
|
|
27036
|
-
return /* @__PURE__ */ n(
|
|
27035
|
+
return /* @__PURE__ */ n(w3.Provider, {
|
|
27037
27036
|
value: {
|
|
27038
27037
|
theme: p,
|
|
27039
27038
|
effects: u,
|
|
@@ -27105,7 +27104,7 @@ var c3 = 10, wo = ({ data: t, label: r, title: c, tooltip: l, enableSearch: o =
|
|
|
27105
27104
|
]
|
|
27106
27105
|
})]
|
|
27107
27106
|
});
|
|
27108
|
-
},
|
|
27107
|
+
}, s3 = ({ checked: t = !1, className: r, disabled: c = !1, offLabel: l = "Off", onChange: o, onLabel: d = "On", showLabels: s = !0, size: m = "medium", variant: a = "default" }) => {
|
|
27109
27108
|
const i = () => {
|
|
27110
27109
|
!c && o && o(!t);
|
|
27111
27110
|
}, h = (p) => {
|
|
@@ -27138,7 +27137,7 @@ var c3 = 10, wo = ({ data: t, label: r, title: c, tooltip: l, enableSearch: o =
|
|
|
27138
27137
|
label: "Dark"
|
|
27139
27138
|
}
|
|
27140
27139
|
], Co = ({ isOpen: t, onClose: r, allowedThemes: c, currentApp: l, showEffects: o = !0, showSearch: d = !0, showFavorites: s = !0, showAppearanceFilter: m = !0 }) => {
|
|
27141
|
-
const { theme: a, effects: i, setPreviewTheme: h, setPreviewEffects: p, commitPreview: u, clearPreview: g } =
|
|
27140
|
+
const { theme: a, effects: i, setPreviewTheme: h, setPreviewEffects: p, commitPreview: u, clearPreview: g } = f3(), v = ["Card", "Modal"], w = [
|
|
27142
27141
|
{
|
|
27143
27142
|
label: "None",
|
|
27144
27143
|
value: ""
|
|
@@ -27159,13 +27158,13 @@ var c3 = 10, wo = ({ data: t, label: r, title: c, tooltip: l, enableSearch: o =
|
|
|
27159
27158
|
label: "Glow",
|
|
27160
27159
|
value: "glow-effect"
|
|
27161
27160
|
}
|
|
27162
|
-
], [f, y] = R(""), [_, C] = R(!1), [L, z] = R(!1), [
|
|
27161
|
+
], [f, y] = R(""), [_, C] = R(!1), [L, z] = R(!1), [V, k] = R("all"), b = F(null), M = F(!1), N = l?.trim().toLowerCase() ?? "", x = l1(() => {
|
|
27163
27162
|
let A = w0;
|
|
27164
27163
|
if (c && c.length > 0) {
|
|
27165
27164
|
const T = new Set(c);
|
|
27166
27165
|
A = A.filter((S) => T.has(S.value));
|
|
27167
27166
|
}
|
|
27168
|
-
if (_ && (A = A.filter((T) =>
|
|
27167
|
+
if (_ && (A = A.filter((T) => n3.has(T.value))), L && N && (A = A.filter((T) => (T.recommendedApps ?? []).some((S) => S.toLowerCase() === N))), V !== "all" && (A = A.filter((T) => ea(T.value) === V)), f.trim()) {
|
|
27169
27168
|
const T = f.toLowerCase().trim();
|
|
27170
27169
|
A = A.filter((S) => S.label.toLowerCase().includes(T) || (S.recommendedApps ?? []).some(($) => $.toLowerCase().includes(T)));
|
|
27171
27170
|
}
|
|
@@ -27174,19 +27173,19 @@ var c3 = 10, wo = ({ data: t, label: r, title: c, tooltip: l, enableSearch: o =
|
|
|
27174
27173
|
f,
|
|
27175
27174
|
_,
|
|
27176
27175
|
L,
|
|
27177
|
-
V,
|
|
27178
27176
|
N,
|
|
27177
|
+
V,
|
|
27179
27178
|
c
|
|
27180
27179
|
]);
|
|
27181
27180
|
Y(() => {
|
|
27182
|
-
t ? (y(""), C(!1), z(!1),
|
|
27181
|
+
t ? (y(""), C(!1), z(!1), k("all")) : M.current = !1;
|
|
27183
27182
|
}, [t]), Y(() => {
|
|
27184
|
-
if (!t || f || _ || L ||
|
|
27183
|
+
if (!t || f || _ || L || V !== "all" || M.current) return;
|
|
27185
27184
|
const A = window.requestAnimationFrame(() => {
|
|
27186
27185
|
b.current?.scrollIntoView({
|
|
27187
27186
|
block: "center",
|
|
27188
27187
|
inline: "nearest"
|
|
27189
|
-
}),
|
|
27188
|
+
}), M.current = !0;
|
|
27190
27189
|
});
|
|
27191
27190
|
return () => window.cancelAnimationFrame(A);
|
|
27192
27191
|
}, [
|
|
@@ -27194,7 +27193,7 @@ var c3 = 10, wo = ({ data: t, label: r, title: c, tooltip: l, enableSearch: o =
|
|
|
27194
27193
|
f,
|
|
27195
27194
|
_,
|
|
27196
27195
|
L,
|
|
27197
|
-
|
|
27196
|
+
V,
|
|
27198
27197
|
a
|
|
27199
27198
|
]);
|
|
27200
27199
|
const B = (A) => {
|
|
@@ -27214,7 +27213,7 @@ var c3 = 10, wo = ({ data: t, label: r, title: c, tooltip: l, enableSearch: o =
|
|
|
27214
27213
|
}, P = () => {
|
|
27215
27214
|
g(), r();
|
|
27216
27215
|
};
|
|
27217
|
-
return /* @__PURE__ */ e(
|
|
27216
|
+
return /* @__PURE__ */ e(N2, {
|
|
27218
27217
|
isOpen: t,
|
|
27219
27218
|
onClose: P,
|
|
27220
27219
|
title: "Theme Settings",
|
|
@@ -27252,14 +27251,14 @@ var c3 = 10, wo = ({ data: t, label: r, title: c, tooltip: l, enableSearch: o =
|
|
|
27252
27251
|
value: f,
|
|
27253
27252
|
onChange: y
|
|
27254
27253
|
}),
|
|
27255
|
-
l && /* @__PURE__ */ e(
|
|
27254
|
+
l && /* @__PURE__ */ e(s3, {
|
|
27256
27255
|
checked: L,
|
|
27257
27256
|
onChange: z,
|
|
27258
27257
|
onLabel: `For ${l}`,
|
|
27259
27258
|
offLabel: `For ${l}`,
|
|
27260
27259
|
size: "small"
|
|
27261
27260
|
}),
|
|
27262
|
-
s && /* @__PURE__ */ e(
|
|
27261
|
+
s && /* @__PURE__ */ e(s3, {
|
|
27263
27262
|
checked: _,
|
|
27264
27263
|
onChange: C,
|
|
27265
27264
|
onLabel: "Favorites",
|
|
@@ -27272,17 +27271,17 @@ var c3 = 10, wo = ({ data: t, label: r, title: c, tooltip: l, enableSearch: o =
|
|
|
27272
27271
|
className: "theme-settings__appearance",
|
|
27273
27272
|
children: ra.map((A) => /* @__PURE__ */ e("button", {
|
|
27274
27273
|
type: "button",
|
|
27275
|
-
className: `theme-settings__appearance-option ${
|
|
27276
|
-
onClick: () =>
|
|
27274
|
+
className: `theme-settings__appearance-option ${V === A.value ? "theme-settings__appearance-option--active" : ""}`,
|
|
27275
|
+
onClick: () => k(A.value),
|
|
27277
27276
|
children: A.label
|
|
27278
27277
|
}, A.value))
|
|
27279
27278
|
}),
|
|
27280
27279
|
/* @__PURE__ */ e("div", {
|
|
27281
27280
|
className: "theme-settings__grid",
|
|
27282
|
-
children:
|
|
27281
|
+
children: x.length === 0 ? /* @__PURE__ */ e("div", {
|
|
27283
27282
|
className: "theme-settings__empty",
|
|
27284
27283
|
children: "No themes found"
|
|
27285
|
-
}) :
|
|
27284
|
+
}) : x.map((A) => /* @__PURE__ */ n("button", {
|
|
27286
27285
|
ref: a === A.value ? b : null,
|
|
27287
27286
|
type: "button",
|
|
27288
27287
|
className: `theme-settings__swatch ${a === A.value ? "theme-settings__swatch--active" : ""}`,
|
|
@@ -27291,7 +27290,7 @@ var c3 = 10, wo = ({ data: t, label: r, title: c, tooltip: l, enableSearch: o =
|
|
|
27291
27290
|
className: "theme-settings__preview",
|
|
27292
27291
|
"data-theme": A.value,
|
|
27293
27292
|
children: [
|
|
27294
|
-
|
|
27293
|
+
n3.has(A.value) && /* @__PURE__ */ e("span", {
|
|
27295
27294
|
className: "theme-settings__favorite-badge",
|
|
27296
27295
|
children: "⭐"
|
|
27297
27296
|
}),
|
|
@@ -27404,7 +27403,7 @@ var c3 = 10, wo = ({ data: t, label: r, title: c, tooltip: l, enableSearch: o =
|
|
|
27404
27403
|
}, s.id))
|
|
27405
27404
|
}), la = (t, r) => Math.floor(Math.random() * (r - t + 1) + t), bo = ({ list: t }) => {
|
|
27406
27405
|
const r = la(0, t.length - 1);
|
|
27407
|
-
return /* @__PURE__ */ n(
|
|
27406
|
+
return /* @__PURE__ */ n(M3, {
|
|
27408
27407
|
className: "tips-of-the-day",
|
|
27409
27408
|
children: [
|
|
27410
27409
|
/* @__PURE__ */ n("h3", { children: [
|
|
@@ -27416,7 +27415,7 @@ var c3 = 10, wo = ({ data: t, label: r, title: c, tooltip: l, enableSearch: o =
|
|
|
27416
27415
|
/* @__PURE__ */ e("h4", { children: t[r] })
|
|
27417
27416
|
]
|
|
27418
27417
|
});
|
|
27419
|
-
},
|
|
27418
|
+
}, S2 = ({ message: t, type: r = "success", onClose: c, position: l = "top-right", showDismissButton: o = !0, timeout: d = 3e3, action: s }) => (Y(() => {
|
|
27420
27419
|
const m = setTimeout(() => {
|
|
27421
27420
|
c();
|
|
27422
27421
|
}, d);
|
|
@@ -27620,17 +27619,17 @@ var c3 = 10, wo = ({ data: t, label: r, title: c, tooltip: l, enableSearch: o =
|
|
|
27620
27619
|
})]
|
|
27621
27620
|
});
|
|
27622
27621
|
}, ko = ({ appear: t = !1, as: r = "div", children: c, className: l = "", delay: o = 0, duration: d = 250, easing: s = "ease", keepMounted: m = !1, onEntered: a, onExited: i, show: h, type: p = "fade" }) => {
|
|
27623
|
-
const u = h ? t ? "entering" : "entered" : "unmounted", [g, v] = R(u), [w, f] = R("auto"), y = F(null), _ = F(u), C = F(a), L = F(i), z = F(null),
|
|
27622
|
+
const u = h ? t ? "entering" : "entered" : "unmounted", [g, v] = R(u), [w, f] = R("auto"), y = F(null), _ = F(u), C = F(a), L = F(i), z = F(null), V = F(null);
|
|
27624
27623
|
Y(() => {
|
|
27625
27624
|
C.current = a, L.current = i;
|
|
27626
27625
|
}, [a, i]);
|
|
27627
|
-
const
|
|
27626
|
+
const k = D((B) => {
|
|
27628
27627
|
_.current = B, v(B);
|
|
27629
27628
|
}, []), b = D(() => {
|
|
27630
|
-
z.current !== null && (clearTimeout(z.current), z.current = null),
|
|
27631
|
-
}, []),
|
|
27632
|
-
|
|
27633
|
-
|
|
27629
|
+
z.current !== null && (clearTimeout(z.current), z.current = null), V.current !== null && (cancelAnimationFrame(V.current), V.current = null);
|
|
27630
|
+
}, []), M = D((B) => {
|
|
27631
|
+
V.current = requestAnimationFrame(() => {
|
|
27632
|
+
V.current = requestAnimationFrame(B);
|
|
27634
27633
|
});
|
|
27635
27634
|
}, []);
|
|
27636
27635
|
Y(() => b, [b]), Y(() => {
|
|
@@ -27638,30 +27637,30 @@ var c3 = 10, wo = ({ data: t, label: r, title: c, tooltip: l, enableSearch: o =
|
|
|
27638
27637
|
const B = p === "collapse";
|
|
27639
27638
|
if (h) {
|
|
27640
27639
|
if (_.current === "entered") return;
|
|
27641
|
-
|
|
27642
|
-
|
|
27640
|
+
k("entering"), B && f(0), M(() => {
|
|
27641
|
+
k("entered"), B && y.current && f(y.current.scrollHeight);
|
|
27643
27642
|
}), z.current = setTimeout(() => {
|
|
27644
27643
|
B && f("auto"), C.current?.();
|
|
27645
27644
|
}, d + o);
|
|
27646
27645
|
return;
|
|
27647
27646
|
}
|
|
27648
|
-
_.current !== "unmounted" && (B && y.current && (f(y.current.scrollHeight),
|
|
27649
|
-
|
|
27647
|
+
_.current !== "unmounted" && (B && y.current && (f(y.current.scrollHeight), M(() => f(0))), k("exiting"), z.current = setTimeout(() => {
|
|
27648
|
+
k("unmounted"), f("auto"), L.current?.();
|
|
27650
27649
|
}, d));
|
|
27651
27650
|
}, [
|
|
27652
|
-
x,
|
|
27653
27651
|
M,
|
|
27652
|
+
k,
|
|
27654
27653
|
b,
|
|
27655
27654
|
o,
|
|
27656
27655
|
d,
|
|
27657
27656
|
h,
|
|
27658
27657
|
p
|
|
27659
27658
|
]);
|
|
27660
|
-
const
|
|
27659
|
+
const N = D((B) => {
|
|
27661
27660
|
y.current = B;
|
|
27662
27661
|
}, []);
|
|
27663
27662
|
if (g === "unmounted" && !m) return null;
|
|
27664
|
-
const
|
|
27663
|
+
const x = {
|
|
27665
27664
|
transitionDelay: g === "entering" || g === "entered" ? `${o}ms` : void 0,
|
|
27666
27665
|
transitionDuration: `${d}ms`,
|
|
27667
27666
|
transitionTimingFunction: s,
|
|
@@ -27675,8 +27674,8 @@ var c3 = 10, wo = ({ data: t, label: r, title: c, tooltip: l, enableSearch: o =
|
|
|
27675
27674
|
m && g === "unmounted" ? "transition--hidden" : "",
|
|
27676
27675
|
l
|
|
27677
27676
|
].filter(Boolean).join(" "),
|
|
27678
|
-
ref:
|
|
27679
|
-
style:
|
|
27677
|
+
ref: N,
|
|
27678
|
+
style: x,
|
|
27680
27679
|
children: c
|
|
27681
27680
|
});
|
|
27682
27681
|
}, oa = ({ open: t }) => /* @__PURE__ */ e("svg", {
|
|
@@ -27768,29 +27767,29 @@ var c3 = 10, wo = ({ data: t, label: r, title: c, tooltip: l, enableSearch: o =
|
|
|
27768
27767
|
});
|
|
27769
27768
|
}, sa = 96, da = 6;
|
|
27770
27769
|
function Lo({ items: t, renderItem: r, getKey: c, rowHeight: l, overscan: o = da, maxHeight: d, empty: s, className: m = "", rowClassName: a = "" }) {
|
|
27771
|
-
const i = F(null), [h, p] = R(0), [u, g] = R(0), [v, w] = R(() => window.innerHeight), [f, y] = R(sa), _ = l && l > 0 ? l : f, C = D((
|
|
27772
|
-
p(
|
|
27770
|
+
const i = F(null), [h, p] = R(0), [u, g] = R(0), [v, w] = R(() => window.innerHeight), [f, y] = R(sa), _ = l && l > 0 ? l : f, C = D((x) => {
|
|
27771
|
+
p(x.currentTarget.scrollTop);
|
|
27773
27772
|
}, []);
|
|
27774
27773
|
Y(() => {
|
|
27775
|
-
const
|
|
27776
|
-
return window.addEventListener("resize",
|
|
27774
|
+
const x = () => w(window.innerHeight);
|
|
27775
|
+
return window.addEventListener("resize", x), () => window.removeEventListener("resize", x);
|
|
27777
27776
|
}, []), Y(() => {
|
|
27778
|
-
const
|
|
27779
|
-
if (!
|
|
27777
|
+
const x = i.current;
|
|
27778
|
+
if (!x) return;
|
|
27780
27779
|
const B = new ResizeObserver((H) => {
|
|
27781
27780
|
const E = H[0]?.contentRect.height ?? 0;
|
|
27782
27781
|
g((P) => Math.abs(P - E) > 0.5 ? E : P);
|
|
27783
27782
|
});
|
|
27784
|
-
return B.observe(
|
|
27785
|
-
}, []),
|
|
27783
|
+
return B.observe(x), g(x.clientHeight), () => B.disconnect();
|
|
27784
|
+
}, []), D2(() => {
|
|
27786
27785
|
i.current && (i.current.scrollTop = 0), p(0);
|
|
27787
27786
|
}, [t]);
|
|
27788
|
-
const L = t.length, z = Math.ceil(Math.min(u || v, v) / _),
|
|
27789
|
-
return
|
|
27787
|
+
const L = t.length, z = Math.ceil(Math.min(u || v, v) / _), V = Math.max(1, z + o * 2), k = Math.max(0, L - V), b = Math.min(k, Math.max(0, Math.floor(h / _) - o)), M = Math.min(L, b + V), N = Math.max(0, L - M);
|
|
27788
|
+
return D2(() => {
|
|
27790
27789
|
if (l) return;
|
|
27791
|
-
const
|
|
27792
|
-
if (!
|
|
27793
|
-
const B =
|
|
27790
|
+
const x = i.current;
|
|
27791
|
+
if (!x) return;
|
|
27792
|
+
const B = x.querySelectorAll("[data-virtual-row]"), H = B[0];
|
|
27794
27793
|
if (!H) return;
|
|
27795
27794
|
const E = B[1] ? B[1].offsetTop - H.offsetTop : H.offsetHeight;
|
|
27796
27795
|
E > 0 && y((P) => Math.abs(P - E) > 0.5 ? E : P);
|
|
@@ -27808,17 +27807,17 @@ function Lo({ items: t, renderItem: r, getKey: c, rowHeight: l, overscan: o = da
|
|
|
27808
27807
|
className: "virtual-list__spacer",
|
|
27809
27808
|
style: { height: b * _ }
|
|
27810
27809
|
}),
|
|
27811
|
-
t.slice(b,
|
|
27810
|
+
t.slice(b, M).map((x, B) => {
|
|
27812
27811
|
const H = b + B;
|
|
27813
27812
|
return /* @__PURE__ */ e("div", {
|
|
27814
27813
|
className: `virtual-list__row ${a}`.trim(),
|
|
27815
27814
|
"data-virtual-row": "",
|
|
27816
|
-
children: r(
|
|
27817
|
-
}, c(
|
|
27815
|
+
children: r(x, H)
|
|
27816
|
+
}, c(x, H));
|
|
27818
27817
|
}),
|
|
27819
|
-
|
|
27818
|
+
N > 0 && /* @__PURE__ */ e("div", {
|
|
27820
27819
|
className: "virtual-list__spacer",
|
|
27821
|
-
style: { height:
|
|
27820
|
+
style: { height: N * _ }
|
|
27822
27821
|
})
|
|
27823
27822
|
]
|
|
27824
27823
|
});
|
|
@@ -28037,13 +28036,13 @@ function No({ children: t, config: r }) {
|
|
|
28037
28036
|
children: t
|
|
28038
28037
|
});
|
|
28039
28038
|
}
|
|
28040
|
-
var
|
|
28039
|
+
var H2 = () => {
|
|
28041
28040
|
const t = B0(j3);
|
|
28042
28041
|
if (t === void 0) throw new Error("useAuth must be used within an AuthProvider");
|
|
28043
28042
|
return t;
|
|
28044
28043
|
};
|
|
28045
28044
|
function Vo({ isOpen: t, onClose: r }) {
|
|
28046
|
-
const { config: c } =
|
|
28045
|
+
const { config: c } = H2(), [l, o] = R(""), [d, s] = R(""), [m, a] = R(""), [i, h] = R(""), [p, u] = R(!1), [g, v] = R(null);
|
|
28047
28046
|
Y(() => {
|
|
28048
28047
|
t && (o(""), s(""), a(""), h(""));
|
|
28049
28048
|
}, [t]);
|
|
@@ -28092,7 +28091,7 @@ function Vo({ isOpen: t, onClose: r }) {
|
|
|
28092
28091
|
}, f = () => {
|
|
28093
28092
|
v(null);
|
|
28094
28093
|
};
|
|
28095
|
-
return /* @__PURE__ */ n(
|
|
28094
|
+
return /* @__PURE__ */ n(q1, {
|
|
28096
28095
|
isOpen: t,
|
|
28097
28096
|
onClose: r,
|
|
28098
28097
|
title: "Change Password",
|
|
@@ -28162,7 +28161,7 @@ function Vo({ isOpen: t, onClose: r }) {
|
|
|
28162
28161
|
children: i
|
|
28163
28162
|
})
|
|
28164
28163
|
]
|
|
28165
|
-
}), g && /* @__PURE__ */ e(
|
|
28164
|
+
}), g && /* @__PURE__ */ e(S2, {
|
|
28166
28165
|
message: g.message,
|
|
28167
28166
|
type: g.type,
|
|
28168
28167
|
onClose: f
|
|
@@ -28170,7 +28169,7 @@ function Vo({ isOpen: t, onClose: r }) {
|
|
|
28170
28169
|
});
|
|
28171
28170
|
}
|
|
28172
28171
|
function So({ redirectPath: t = "/" }) {
|
|
28173
|
-
const { login: r, verifyMfa: c, config: l, isAuthenticated: o } =
|
|
28172
|
+
const { login: r, verifyMfa: c, config: l, isAuthenticated: o } = H2(), [d, s] = R("credentials"), [m, a] = R(""), [i, h] = R(""), [p, u] = R(!1), [g, v] = R("totp"), [w, f] = R(""), [y, _] = R(!1), [C, L] = R(""), [z, V] = R(!1), [k, b] = R(!1);
|
|
28174
28173
|
Y(() => {
|
|
28175
28174
|
o && (window.location.href = t);
|
|
28176
28175
|
}, [o, t]), Y(() => {
|
|
@@ -28180,12 +28179,12 @@ function So({ redirectPath: t = "/" }) {
|
|
|
28180
28179
|
window.history.replaceState({}, "", H);
|
|
28181
28180
|
}
|
|
28182
28181
|
}, []);
|
|
28183
|
-
const
|
|
28182
|
+
const M = async (H) => {
|
|
28184
28183
|
if (H.preventDefault(), L(""), !m || !i) {
|
|
28185
28184
|
L("Username and password are required");
|
|
28186
28185
|
return;
|
|
28187
28186
|
}
|
|
28188
|
-
|
|
28187
|
+
V(!0);
|
|
28189
28188
|
try {
|
|
28190
28189
|
const E = await r({
|
|
28191
28190
|
username: m,
|
|
@@ -28196,22 +28195,22 @@ function So({ redirectPath: t = "/" }) {
|
|
|
28196
28195
|
} catch (E) {
|
|
28197
28196
|
L(E instanceof Error ? E.message : "Login failed. Please try again.");
|
|
28198
28197
|
} finally {
|
|
28199
|
-
|
|
28198
|
+
V(!1);
|
|
28200
28199
|
}
|
|
28201
|
-
},
|
|
28200
|
+
}, N = async (H) => {
|
|
28202
28201
|
if (H.preventDefault(), L(""), !w.trim()) {
|
|
28203
28202
|
L("Enter the verification code");
|
|
28204
28203
|
return;
|
|
28205
28204
|
}
|
|
28206
|
-
|
|
28205
|
+
V(!0);
|
|
28207
28206
|
try {
|
|
28208
28207
|
await c(w.trim(), y);
|
|
28209
28208
|
} catch (E) {
|
|
28210
28209
|
L(E instanceof Error ? E.message : "Verification failed. Please try again.");
|
|
28211
28210
|
} finally {
|
|
28212
|
-
|
|
28211
|
+
V(!1);
|
|
28213
28212
|
}
|
|
28214
|
-
},
|
|
28213
|
+
}, x = () => {
|
|
28215
28214
|
s("credentials"), f(""), L("");
|
|
28216
28215
|
}, B = g === "email" ? "Enter the code we emailed you. You can also use a recovery code." : "Enter the code from your authenticator app. You can also use a recovery code.";
|
|
28217
28216
|
return /* @__PURE__ */ n(h1, { children: [/* @__PURE__ */ e("div", {
|
|
@@ -28222,7 +28221,7 @@ function So({ redirectPath: t = "/" }) {
|
|
|
28222
28221
|
className: "LoginPage__title",
|
|
28223
28222
|
children: l.appName || "Login"
|
|
28224
28223
|
}), d === "credentials" ? /* @__PURE__ */ n("form", {
|
|
28225
|
-
onSubmit:
|
|
28224
|
+
onSubmit: M,
|
|
28226
28225
|
className: "LoginPage__form",
|
|
28227
28226
|
children: [
|
|
28228
28227
|
/* @__PURE__ */ e(N1, {
|
|
@@ -28260,7 +28259,7 @@ function So({ redirectPath: t = "/" }) {
|
|
|
28260
28259
|
})
|
|
28261
28260
|
]
|
|
28262
28261
|
}) : /* @__PURE__ */ n("form", {
|
|
28263
|
-
onSubmit:
|
|
28262
|
+
onSubmit: N,
|
|
28264
28263
|
className: "LoginPage__form",
|
|
28265
28264
|
children: [
|
|
28266
28265
|
/* @__PURE__ */ e("p", {
|
|
@@ -28299,27 +28298,27 @@ function So({ redirectPath: t = "/" }) {
|
|
|
28299
28298
|
icon: "clear",
|
|
28300
28299
|
disabled: z,
|
|
28301
28300
|
fullWidth: !0,
|
|
28302
|
-
onClick:
|
|
28301
|
+
onClick: x,
|
|
28303
28302
|
children: "Back"
|
|
28304
28303
|
})
|
|
28305
28304
|
]
|
|
28306
28305
|
})]
|
|
28307
28306
|
})
|
|
28308
|
-
}),
|
|
28307
|
+
}), k && /* @__PURE__ */ e(S2, {
|
|
28309
28308
|
message: "Your session has expired. Please log in again.",
|
|
28310
28309
|
type: "warning",
|
|
28311
28310
|
onClose: () => b(!1)
|
|
28312
28311
|
})] });
|
|
28313
28312
|
}
|
|
28314
|
-
var pa = Object.defineProperty, F0 = Object.getOwnPropertySymbols, W3 = Object.prototype.hasOwnProperty, F3 = Object.prototype.propertyIsEnumerable,
|
|
28313
|
+
var pa = Object.defineProperty, F0 = Object.getOwnPropertySymbols, W3 = Object.prototype.hasOwnProperty, F3 = Object.prototype.propertyIsEnumerable, d3 = (t, r, c) => r in t ? pa(t, r, {
|
|
28315
28314
|
enumerable: !0,
|
|
28316
28315
|
configurable: !0,
|
|
28317
28316
|
writable: !0,
|
|
28318
28317
|
value: c
|
|
28319
28318
|
}) : t[r] = c, C2 = (t, r) => {
|
|
28320
|
-
for (var c in r || (r = {})) W3.call(r, c) &&
|
|
28319
|
+
for (var c in r || (r = {})) W3.call(r, c) && d3(t, c, r[c]);
|
|
28321
28320
|
if (F0)
|
|
28322
|
-
for (var c of F0(r)) F3.call(r, c) &&
|
|
28321
|
+
for (var c of F0(r)) F3.call(r, c) && d3(t, c, r[c]);
|
|
28323
28322
|
return t;
|
|
28324
28323
|
}, y2 = (t, r) => {
|
|
28325
28324
|
var c = {};
|
|
@@ -28446,8 +28445,8 @@ var pa = Object.defineProperty, F0 = Object.getOwnPropertySymbols, W3 = Object.p
|
|
|
28446
28445
|
for (let C = 0, L = 0; C < p; C++) {
|
|
28447
28446
|
let z = a.slice(L, L + w - u + (C < v ? 0 : 1));
|
|
28448
28447
|
L += z.length;
|
|
28449
|
-
const
|
|
28450
|
-
C < v && z.push(0), f.push(z.concat(
|
|
28448
|
+
const V = p1.reedSolomonComputeRemainder(z, y);
|
|
28449
|
+
C < v && z.push(0), f.push(z.concat(V));
|
|
28451
28450
|
}
|
|
28452
28451
|
let _ = [];
|
|
28453
28452
|
for (let C = 0; C < f[0].length; C++) f.forEach((L, z) => {
|
|
@@ -29181,7 +29180,7 @@ var ya = (function() {
|
|
|
29181
29180
|
"imageSettings"
|
|
29182
29181
|
]), { style: w } = v, f = y2(v, ["style"]), y = g?.src, _ = w1.useRef(null), C = w1.useRef(null), L = w1.useCallback((H) => {
|
|
29183
29182
|
_.current = H, typeof c == "function" ? c(H) : c && (c.current = H);
|
|
29184
|
-
}, [c]), [z,
|
|
29183
|
+
}, [c]), [z, V] = w1.useState(!1), { margin: k, cells: b, numCells: M, calculatedImageSettings: N } = e4({
|
|
29185
29184
|
value: o,
|
|
29186
29185
|
level: s,
|
|
29187
29186
|
minVersion: h,
|
|
@@ -29196,21 +29195,21 @@ var ya = (function() {
|
|
|
29196
29195
|
const H = _.current, E = H.getContext("2d");
|
|
29197
29196
|
if (!E) return;
|
|
29198
29197
|
let P = b;
|
|
29199
|
-
const J = C.current, A =
|
|
29200
|
-
A &&
|
|
29198
|
+
const J = C.current, A = N != null && J !== null && J.complete && J.naturalHeight !== 0 && J.naturalWidth !== 0;
|
|
29199
|
+
A && N.excavation != null && (P = J3(b, N.excavation));
|
|
29201
29200
|
const T = window.devicePixelRatio || 1;
|
|
29202
29201
|
H.height = H.width = d * T;
|
|
29203
|
-
const S = d /
|
|
29204
|
-
E.scale(S, S), E.fillStyle = m, E.fillRect(0, 0,
|
|
29202
|
+
const S = d / M * T;
|
|
29203
|
+
E.scale(S, S), E.fillStyle = m, E.fillRect(0, 0, M, M), E.fillStyle = a, ya ? E.fill(new Path2D(Q3(P, k))) : b.forEach(function($, e1) {
|
|
29205
29204
|
$.forEach(function(O, Z) {
|
|
29206
|
-
O && E.fillRect(Z +
|
|
29205
|
+
O && E.fillRect(Z + k, e1 + k, 1, 1);
|
|
29207
29206
|
});
|
|
29208
|
-
}),
|
|
29207
|
+
}), N && (E.globalAlpha = N.opacity), A && E.drawImage(J, N.x + k, N.y + k, N.w, N.h);
|
|
29209
29208
|
}
|
|
29210
29209
|
}), w1.useEffect(() => {
|
|
29211
|
-
|
|
29210
|
+
V(!1);
|
|
29212
29211
|
}, [y]);
|
|
29213
|
-
const
|
|
29212
|
+
const x = C2({
|
|
29214
29213
|
height: d,
|
|
29215
29214
|
width: d
|
|
29216
29215
|
}, w);
|
|
@@ -29220,12 +29219,12 @@ var ya = (function() {
|
|
|
29220
29219
|
key: y,
|
|
29221
29220
|
style: { display: "none" },
|
|
29222
29221
|
onLoad: () => {
|
|
29223
|
-
|
|
29222
|
+
V(!0);
|
|
29224
29223
|
},
|
|
29225
29224
|
ref: C,
|
|
29226
|
-
crossOrigin:
|
|
29225
|
+
crossOrigin: N?.crossOrigin
|
|
29227
29226
|
})), /* @__PURE__ */ w1.createElement(w1.Fragment, null, /* @__PURE__ */ w1.createElement("canvas", C2({
|
|
29228
|
-
style:
|
|
29227
|
+
style: x,
|
|
29229
29228
|
height: d,
|
|
29230
29229
|
width: d,
|
|
29231
29230
|
ref: L,
|
|
@@ -29267,7 +29266,7 @@ var t4 = w1.forwardRef(function(r, c) {
|
|
|
29267
29266
|
opacity: C.opacity,
|
|
29268
29267
|
crossOrigin: C.crossOrigin
|
|
29269
29268
|
}));
|
|
29270
|
-
const
|
|
29269
|
+
const V = Q3(L, f);
|
|
29271
29270
|
return /* @__PURE__ */ w1.createElement("svg", C2({
|
|
29272
29271
|
height: d,
|
|
29273
29272
|
width: d,
|
|
@@ -29280,13 +29279,13 @@ var t4 = w1.forwardRef(function(r, c) {
|
|
|
29280
29279
|
shapeRendering: "crispEdges"
|
|
29281
29280
|
}), /* @__PURE__ */ w1.createElement("path", {
|
|
29282
29281
|
fill: a,
|
|
29283
|
-
d:
|
|
29282
|
+
d: V,
|
|
29284
29283
|
shapeRendering: "crispEdges"
|
|
29285
29284
|
}), z);
|
|
29286
29285
|
});
|
|
29287
29286
|
t4.displayName = "QRCodeSVG";
|
|
29288
29287
|
function Bo({ isOpen: t, onClose: r }) {
|
|
29289
|
-
const { config: c } =
|
|
29288
|
+
const { config: c } = H2(), [l, o] = R("loading"), [d, s] = R(!1), [m, a] = R(null), [i, h] = R(""), [p, u] = R(""), [g, v] = R(""), [w, f] = R(""), [y, _] = R([]), [C, L] = R(""), [z, V] = R(!1), [k, b] = R(null), M = D(async (O, Z) => {
|
|
29290
29289
|
const W = document.cookie.match(/(?:^|;\s*)csrf_token=([^;]+)/), q = W ? decodeURIComponent(W[1]) : null, m1 = { "Content-Type": "application/json" };
|
|
29291
29290
|
q && (m1["X-CSRF-Token"] = q);
|
|
29292
29291
|
const t1 = await fetch(`${c.apiBaseUrl}${O}`, {
|
|
@@ -29297,7 +29296,7 @@ function Bo({ isOpen: t, onClose: r }) {
|
|
|
29297
29296
|
}), C1 = await t1.json().catch(() => ({}));
|
|
29298
29297
|
if (!t1.ok) throw new Error(C1.error || "Request failed");
|
|
29299
29298
|
return C1;
|
|
29300
|
-
}, [c.apiBaseUrl]),
|
|
29299
|
+
}, [c.apiBaseUrl]), N = D(async () => {
|
|
29301
29300
|
o("loading"), L("");
|
|
29302
29301
|
try {
|
|
29303
29302
|
const O = await (await fetch(`${c.apiBaseUrl}/auth/mfaStatus`, { credentials: "include" })).json();
|
|
@@ -29307,38 +29306,38 @@ function Bo({ isOpen: t, onClose: r }) {
|
|
|
29307
29306
|
}
|
|
29308
29307
|
}, [c.apiBaseUrl]);
|
|
29309
29308
|
Y(() => {
|
|
29310
|
-
t && (v(""), f(""), L(""), _([]),
|
|
29311
|
-
}, [t,
|
|
29312
|
-
const
|
|
29313
|
-
|
|
29309
|
+
t && (v(""), f(""), L(""), _([]), N());
|
|
29310
|
+
}, [t, N]);
|
|
29311
|
+
const x = async (O) => {
|
|
29312
|
+
V(!0), L("");
|
|
29314
29313
|
try {
|
|
29315
29314
|
await O();
|
|
29316
29315
|
} catch (Z) {
|
|
29317
29316
|
L(Z instanceof Error ? Z.message : "Something went wrong.");
|
|
29318
29317
|
} finally {
|
|
29319
|
-
|
|
29318
|
+
V(!1);
|
|
29320
29319
|
}
|
|
29321
|
-
}, B = () =>
|
|
29322
|
-
const O = await
|
|
29320
|
+
}, B = () => x(async () => {
|
|
29321
|
+
const O = await M("/auth/mfaSetupTotp");
|
|
29323
29322
|
h(O.secret || ""), u(O.otpauthUri || ""), v(""), o("totp-setup");
|
|
29324
|
-
}), H = () =>
|
|
29325
|
-
const O = await
|
|
29323
|
+
}), H = () => x(async () => {
|
|
29324
|
+
const O = await M("/auth/mfaConfirmTotp", { code: g.trim() });
|
|
29326
29325
|
_(O.recoveryCodes || []), o("recovery");
|
|
29327
|
-
}), E = () =>
|
|
29328
|
-
await
|
|
29329
|
-
}), P = () =>
|
|
29330
|
-
const O = await
|
|
29326
|
+
}), E = () => x(async () => {
|
|
29327
|
+
await M("/auth/mfaEnableEmail"), v(""), o("email-setup");
|
|
29328
|
+
}), P = () => x(async () => {
|
|
29329
|
+
const O = await M("/auth/mfaConfirmEmail", { code: g.trim() });
|
|
29331
29330
|
_(O.recoveryCodes || []), o("recovery");
|
|
29332
|
-
}), J = () =>
|
|
29333
|
-
await
|
|
29331
|
+
}), J = () => x(async () => {
|
|
29332
|
+
await M("/auth/mfaDisable", { password: w }), b({
|
|
29334
29333
|
message: "Two-factor authentication disabled.",
|
|
29335
29334
|
type: "success"
|
|
29336
|
-
}), f(""), await
|
|
29337
|
-
}), A = () =>
|
|
29338
|
-
const O = await
|
|
29335
|
+
}), f(""), await N();
|
|
29336
|
+
}), A = () => x(async () => {
|
|
29337
|
+
const O = await M("/auth/mfaRegenRecovery", { password: w });
|
|
29339
29338
|
_(O.recoveryCodes || []), f(""), o("recovery");
|
|
29340
|
-
}), T = () =>
|
|
29341
|
-
await
|
|
29339
|
+
}), T = () => x(async () => {
|
|
29340
|
+
await M("/auth/mfaForgetDevices"), b({
|
|
29342
29341
|
message: "All trusted devices have been signed out.",
|
|
29343
29342
|
type: "success"
|
|
29344
29343
|
});
|
|
@@ -29349,7 +29348,7 @@ function Bo({ isOpen: t, onClose: r }) {
|
|
|
29349
29348
|
type: "success"
|
|
29350
29349
|
});
|
|
29351
29350
|
}, $ = i.replace(/(.{4})/g, "$1 ").trim();
|
|
29352
|
-
return /* @__PURE__ */ n(
|
|
29351
|
+
return /* @__PURE__ */ n(q1, {
|
|
29353
29352
|
isOpen: t,
|
|
29354
29353
|
onClose: r,
|
|
29355
29354
|
title: "Two-factor authentication",
|
|
@@ -29382,7 +29381,7 @@ function Bo({ isOpen: t, onClose: r }) {
|
|
|
29382
29381
|
variant: "default",
|
|
29383
29382
|
fullWidth: !0,
|
|
29384
29383
|
disabled: z,
|
|
29385
|
-
onClick: () =>
|
|
29384
|
+
onClick: () => x(T),
|
|
29386
29385
|
children: "Sign out trusted devices"
|
|
29387
29386
|
}),
|
|
29388
29387
|
/* @__PURE__ */ e(U, {
|
|
@@ -29515,7 +29514,7 @@ function Bo({ isOpen: t, onClose: r }) {
|
|
|
29515
29514
|
variant: "success",
|
|
29516
29515
|
fullWidth: !0,
|
|
29517
29516
|
disabled: z,
|
|
29518
|
-
onClick:
|
|
29517
|
+
onClick: N,
|
|
29519
29518
|
children: "I've saved them"
|
|
29520
29519
|
})
|
|
29521
29520
|
]
|
|
@@ -29591,9 +29590,9 @@ function Bo({ isOpen: t, onClose: r }) {
|
|
|
29591
29590
|
className: "MfaSetupModal__error",
|
|
29592
29591
|
children: C
|
|
29593
29592
|
})]
|
|
29594
|
-
}),
|
|
29595
|
-
message:
|
|
29596
|
-
type:
|
|
29593
|
+
}), k && /* @__PURE__ */ e(S2, {
|
|
29594
|
+
message: k.message,
|
|
29595
|
+
type: k.type,
|
|
29597
29596
|
onClose: () => b(null)
|
|
29598
29597
|
})]
|
|
29599
29598
|
});
|
|
@@ -29815,7 +29814,7 @@ var Po = (t, r, c) => {
|
|
|
29815
29814
|
} catch {
|
|
29816
29815
|
return t.trim();
|
|
29817
29816
|
}
|
|
29818
|
-
}, xa = "1.0.
|
|
29817
|
+
}, xa = "1.0.66", Uo = 383, La = "a0f7cd4", za = "2026-09-29T15:41:15.459Z", Oo = "383", Na = (t) => {
|
|
29819
29818
|
const r = document.getElementById("mb-version-toast");
|
|
29820
29819
|
if (r) {
|
|
29821
29820
|
r.remove();
|
|
@@ -29839,7 +29838,7 @@ var Po = (t, r, c) => {
|
|
|
29839
29838
|
const r = {
|
|
29840
29839
|
...t,
|
|
29841
29840
|
lib: xa,
|
|
29842
|
-
libBuildNumber:
|
|
29841
|
+
libBuildNumber: 383,
|
|
29843
29842
|
libCommit: La,
|
|
29844
29843
|
libBuildDate: za
|
|
29845
29844
|
};
|
|
@@ -29920,7 +29919,7 @@ export {
|
|
|
29920
29919
|
Pa as AlertDialog,
|
|
29921
29920
|
ic as AnalogClock,
|
|
29922
29921
|
Ia as AngleSlider,
|
|
29923
|
-
|
|
29922
|
+
y3 as AppHeader,
|
|
29924
29923
|
V0 as AppPersistenceStorage,
|
|
29925
29924
|
j3 as AuthContext,
|
|
29926
29925
|
So as AuthLogin,
|
|
@@ -29935,7 +29934,7 @@ export {
|
|
|
29935
29934
|
U as Button,
|
|
29936
29935
|
f2 as Calendar,
|
|
29937
29936
|
li as CalendarHeatmap,
|
|
29938
|
-
|
|
29937
|
+
M3 as Card,
|
|
29939
29938
|
Vo as ChangePasswordModal,
|
|
29940
29939
|
e0 as Checkbox,
|
|
29941
29940
|
v0 as Chip,
|
|
@@ -29954,9 +29953,9 @@ export {
|
|
|
29954
29953
|
yi as DataView,
|
|
29955
29954
|
Gc as DatePicker,
|
|
29956
29955
|
bi as DateRangePicker,
|
|
29957
|
-
|
|
29956
|
+
Dl as DayAgenda,
|
|
29958
29957
|
_i as DiffViewer,
|
|
29959
|
-
|
|
29958
|
+
N2 as Drawer,
|
|
29960
29959
|
$0 as Dropdown,
|
|
29961
29960
|
Mi as EmojiPicker,
|
|
29962
29961
|
a0 as EmptyState,
|
|
@@ -29998,11 +29997,11 @@ export {
|
|
|
29998
29997
|
zl as MiniSort,
|
|
29999
29998
|
Wi as MiniStatsCard,
|
|
30000
29999
|
ji as Minimap,
|
|
30001
|
-
|
|
30000
|
+
q1 as Modal,
|
|
30002
30001
|
Fi as NavBar,
|
|
30003
30002
|
Mn as NotificationPanel,
|
|
30004
30003
|
dc as PEDIATRIC_THRESHOLDS,
|
|
30005
|
-
|
|
30004
|
+
Y2 as Pagination,
|
|
30006
30005
|
Ui as PieChart,
|
|
30007
30006
|
x2 as Popover,
|
|
30008
30007
|
qi as ProgressBar,
|
|
@@ -30030,20 +30029,20 @@ export {
|
|
|
30030
30029
|
go as StickyBar,
|
|
30031
30030
|
wo as SuggestionsList,
|
|
30032
30031
|
w0 as THEME_CONFIGS,
|
|
30033
|
-
|
|
30032
|
+
w3 as ThemeContext,
|
|
30034
30033
|
fo as ThemeProvider,
|
|
30035
30034
|
Co as ThemeSettings,
|
|
30036
|
-
|
|
30035
|
+
L3 as TimePicker,
|
|
30037
30036
|
yo as Timeline,
|
|
30038
30037
|
_l as TimelineMarkerDot,
|
|
30039
30038
|
Ci as TimelineMarkers,
|
|
30040
30039
|
Ml as TimelineMobileSeparator,
|
|
30041
30040
|
bo as TipsOfTheDay,
|
|
30042
|
-
|
|
30041
|
+
S2 as Toast,
|
|
30043
30042
|
hi as ToastContainer,
|
|
30044
30043
|
mi as ToastProvider,
|
|
30045
30044
|
Ql as ToggleButtons,
|
|
30046
|
-
|
|
30045
|
+
s3 as ToggleSwitch,
|
|
30047
30046
|
_o as Toolbar,
|
|
30048
30047
|
c1 as Tooltip,
|
|
30049
30048
|
Mo as TourHud,
|
|
@@ -30058,13 +30057,13 @@ export {
|
|
|
30058
30057
|
z2 as calculateTimelineMarkers,
|
|
30059
30058
|
Hn as ensureHtml,
|
|
30060
30059
|
jo as extractDomainFromUrl,
|
|
30061
|
-
|
|
30060
|
+
W2 as foldDiacritics,
|
|
30062
30061
|
O0 as format2Digits,
|
|
30063
30062
|
Qa as formatAppDate,
|
|
30064
30063
|
Ja as formatAppDateTime,
|
|
30065
30064
|
Do as formatBigNumber,
|
|
30066
30065
|
Eo as formatBytes,
|
|
30067
|
-
|
|
30066
|
+
O1 as formatDate,
|
|
30068
30067
|
Xa as formatDateLocale,
|
|
30069
30068
|
Ya as formatDuration,
|
|
30070
30069
|
$o as formatMoney,
|
|
@@ -30076,7 +30075,7 @@ export {
|
|
|
30076
30075
|
vc as getIndicatorColor,
|
|
30077
30076
|
uc as getIndicatorPosition,
|
|
30078
30077
|
bc as getIsoWeek,
|
|
30079
|
-
|
|
30078
|
+
_3 as getMonthMatrix,
|
|
30080
30079
|
mc as getPediatricRanges,
|
|
30081
30080
|
Oi as getPercent,
|
|
30082
30081
|
Yi as getPercentsOf2Numbers,
|
|
@@ -30102,16 +30101,16 @@ export {
|
|
|
30102
30101
|
Fo as stripTrackingParams,
|
|
30103
30102
|
Zo as truncateText,
|
|
30104
30103
|
Ao as useAppPersistence,
|
|
30105
|
-
|
|
30106
|
-
|
|
30104
|
+
H2 as useAuth,
|
|
30105
|
+
g3 as useBodyScrollLock,
|
|
30107
30106
|
b0 as useBreakpoint,
|
|
30108
|
-
|
|
30107
|
+
C3 as useComponentEffect,
|
|
30109
30108
|
pi as useControlPanel,
|
|
30110
30109
|
L2 as useControlPanelContext,
|
|
30111
30110
|
di as usePopover,
|
|
30112
30111
|
ao as useSidebar,
|
|
30113
|
-
|
|
30114
|
-
|
|
30112
|
+
R3 as useSwipe,
|
|
30113
|
+
f3 as useTheme,
|
|
30115
30114
|
Ec as useToast,
|
|
30116
30115
|
sn as validateEmail,
|
|
30117
30116
|
qo as validateVin
|