@indxsearch/systm 2.24.0 → 2.25.0-beta.1
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/CHANGELOG.md +26 -0
- package/dist/components/Chat/ChatLauncher.d.ts +38 -0
- package/dist/components/Chat/index.d.ts +1 -0
- package/dist/components/Chip/Chip.d.ts +10 -2
- package/dist/components/HistogramRange/HistogramRange.d.ts +36 -0
- package/dist/components/InputField/InputField.d.ts +2 -1
- package/dist/components/ScrubSlider/ScrubSlider.d.ts +10 -0
- package/dist/components/SearchField/SearchField.d.ts +4 -1
- package/dist/components/Sidebar/Sidebar.d.ts +4 -1
- package/dist/components/SliderField/SliderField.d.ts +26 -0
- package/dist/components/StepProgress/StepProgress.d.ts +22 -0
- package/dist/components/StepProgress/index.d.ts +1 -0
- package/dist/components/Table/Table.d.ts +15 -1
- package/dist/components/Table/columnResize.d.ts +5 -0
- package/dist/cursors.css +98 -42
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +5 -2
- package/dist/index.es.js +1368 -928
- package/dist/systm.css +1 -1
- package/dist/systm.shadow.css +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -460,8 +460,8 @@ var oe = {
|
|
|
460
460
|
...o
|
|
461
461
|
});
|
|
462
462
|
}, ce = {
|
|
463
|
-
container: "
|
|
464
|
-
default: "
|
|
463
|
+
container: "_container_mek7k_1",
|
|
464
|
+
default: "_default_mek7k_5"
|
|
465
465
|
};
|
|
466
466
|
// src/components/Base/Base.tsx
|
|
467
467
|
function le({ children: e, className: t }) {
|
|
@@ -519,79 +519,80 @@ function de({ title: t, children: n, className: r = "", collapsible: i = !0, col
|
|
|
519
519
|
});
|
|
520
520
|
}
|
|
521
521
|
var fe = {
|
|
522
|
-
wrapper: "
|
|
523
|
-
label: "
|
|
524
|
-
inputContainer: "
|
|
525
|
-
input: "
|
|
526
|
-
focus: "
|
|
527
|
-
searchIcon: "
|
|
528
|
-
rightContent: "
|
|
529
|
-
sizeMicro: "
|
|
530
|
-
sizeDefault: "
|
|
531
|
-
error: "
|
|
532
|
-
errorText: "
|
|
522
|
+
wrapper: "_wrapper_zccyc_1",
|
|
523
|
+
label: "_label_zccyc_7",
|
|
524
|
+
inputContainer: "_inputContainer_zccyc_12",
|
|
525
|
+
input: "_input_zccyc_12",
|
|
526
|
+
focus: "_focus_zccyc_35",
|
|
527
|
+
searchIcon: "_searchIcon_zccyc_52",
|
|
528
|
+
rightContent: "_rightContent_zccyc_69",
|
|
529
|
+
sizeMicro: "_sizeMicro_zccyc_80",
|
|
530
|
+
sizeDefault: "_sizeDefault_zccyc_89",
|
|
531
|
+
error: "_error_zccyc_112",
|
|
532
|
+
errorText: "_errorText_zccyc_116",
|
|
533
|
+
filled: "_filled_zccyc_121"
|
|
533
534
|
}, pe = {
|
|
534
535
|
micro: 14,
|
|
535
536
|
default: 21
|
|
536
537
|
};
|
|
537
|
-
function me({ label: t, error: n, className: r = "", showSearchIcon: i = !0, searchIcon: a, searchIconColor: o, inputSize: s = "default", showFocusBorder: c = !1, clearable: u = !0,
|
|
538
|
-
let
|
|
539
|
-
|
|
540
|
-
},
|
|
541
|
-
let e =
|
|
538
|
+
function me({ label: t, error: n, className: r = "", showSearchIcon: i = !0, searchIcon: a, searchIconColor: o, inputSize: s = "default", showFocusBorder: c = !1, clearable: u = !0, filled: p = !1, children: m, id: _, type: v = "search", onChange: y, ...b }) {
|
|
539
|
+
let x = d(null), S = b.value !== void 0, [C, w] = f(String(b.defaultValue ?? "")), T = S ? String(b.value ?? "") : C, E = u && T.length > 0 && !b.disabled && !b.readOnly, D = (e) => {
|
|
540
|
+
S || w(e.target.value), y?.(e);
|
|
541
|
+
}, O = () => {
|
|
542
|
+
let e = x.current;
|
|
542
543
|
e && (Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")?.set?.call(e, ""), e.dispatchEvent(new Event("input", { bubbles: !0 })), e.focus());
|
|
543
|
-
},
|
|
544
|
+
}, k = d(null), [A, j] = f(0), N = e.Children.toArray(m).length > 0 || E;
|
|
544
545
|
l(() => {
|
|
545
|
-
let e =
|
|
546
|
+
let e = k.current;
|
|
546
547
|
if (!e) {
|
|
547
|
-
|
|
548
|
+
j(0);
|
|
548
549
|
return;
|
|
549
550
|
}
|
|
550
|
-
let t = () =>
|
|
551
|
+
let t = () => j(e.offsetWidth);
|
|
551
552
|
t();
|
|
552
553
|
let n = new ResizeObserver(t);
|
|
553
554
|
return n.observe(e), () => n.disconnect();
|
|
554
|
-
}, [
|
|
555
|
-
let
|
|
556
|
-
o && (
|
|
557
|
-
let
|
|
555
|
+
}, [N]);
|
|
556
|
+
let P = e.useId(), F = _ || P, I = `${F}-error`, L = pe[s], R = {};
|
|
557
|
+
o && (R["--search-icon-color"] = o), A > 0 && (R.paddingRight = `${A + 10}px`);
|
|
558
|
+
let z = a ?? /* @__PURE__ */ h(M, {}), B = s === "micro" ? fe.sizeMicro : fe.sizeDefault;
|
|
558
559
|
return /* @__PURE__ */ g("div", {
|
|
559
|
-
className: `${fe.wrapper} ${r}`,
|
|
560
|
+
className: `${fe.wrapper} ${p ? fe.filled : ""} ${r}`,
|
|
560
561
|
children: [
|
|
561
562
|
t && /* @__PURE__ */ h("label", {
|
|
562
|
-
htmlFor:
|
|
563
|
+
htmlFor: F,
|
|
563
564
|
className: fe.label,
|
|
564
565
|
children: t
|
|
565
566
|
}),
|
|
566
567
|
/* @__PURE__ */ g("div", {
|
|
567
|
-
className: `${fe.inputContainer} ${
|
|
568
|
+
className: `${fe.inputContainer} ${B}`,
|
|
568
569
|
children: [
|
|
569
570
|
i && /* @__PURE__ */ h("span", {
|
|
570
571
|
className: fe.searchIcon,
|
|
571
572
|
"aria-hidden": "true",
|
|
572
|
-
children: e.cloneElement(
|
|
573
|
-
size:
|
|
573
|
+
children: e.cloneElement(z, {
|
|
574
|
+
size: L,
|
|
574
575
|
color: o ?? "var(--search-icon-color)"
|
|
575
576
|
})
|
|
576
577
|
}),
|
|
577
578
|
/* @__PURE__ */ h("input", {
|
|
578
|
-
ref:
|
|
579
|
-
id:
|
|
580
|
-
type:
|
|
579
|
+
ref: x,
|
|
580
|
+
id: F,
|
|
581
|
+
type: v,
|
|
581
582
|
className: `${fe.input} ${c ? fe.focus : ""} ${n ? fe.error : ""}`,
|
|
582
|
-
style:
|
|
583
|
+
style: R,
|
|
583
584
|
"aria-invalid": n ? "true" : "false",
|
|
584
|
-
"aria-describedby": n ?
|
|
585
|
-
...
|
|
586
|
-
onChange:
|
|
585
|
+
"aria-describedby": n ? I : void 0,
|
|
586
|
+
...b,
|
|
587
|
+
onChange: D
|
|
587
588
|
}),
|
|
588
|
-
|
|
589
|
-
ref:
|
|
589
|
+
N && /* @__PURE__ */ g("div", {
|
|
590
|
+
ref: k,
|
|
590
591
|
className: fe.rightContent,
|
|
591
|
-
children: [
|
|
592
|
+
children: [m, E && /* @__PURE__ */ h(W, {
|
|
592
593
|
variant: "ghost",
|
|
593
594
|
size: "micro",
|
|
594
|
-
onClick:
|
|
595
|
+
onClick: O,
|
|
595
596
|
"aria-label": "Clear search",
|
|
596
597
|
children: "Clear"
|
|
597
598
|
})]
|
|
@@ -599,7 +600,7 @@ function me({ label: t, error: n, className: r = "", showSearchIcon: i = !0, sea
|
|
|
599
600
|
]
|
|
600
601
|
}),
|
|
601
602
|
n && /* @__PURE__ */ h("span", {
|
|
602
|
-
id:
|
|
603
|
+
id: I,
|
|
603
604
|
className: fe.errorText,
|
|
604
605
|
role: "alert",
|
|
605
606
|
children: n
|
|
@@ -608,12 +609,13 @@ function me({ label: t, error: n, className: r = "", showSearchIcon: i = !0, sea
|
|
|
608
609
|
});
|
|
609
610
|
}
|
|
610
611
|
var he = {
|
|
611
|
-
wrapper: "
|
|
612
|
-
label: "
|
|
613
|
-
input: "
|
|
614
|
-
error: "
|
|
615
|
-
errorText: "
|
|
616
|
-
|
|
612
|
+
wrapper: "_wrapper_o3xpv_1",
|
|
613
|
+
label: "_label_o3xpv_10",
|
|
614
|
+
input: "_input_o3xpv_15",
|
|
615
|
+
error: "_error_o3xpv_68",
|
|
616
|
+
errorText: "_errorText_o3xpv_76",
|
|
617
|
+
ghost: "_ghost_o3xpv_84",
|
|
618
|
+
borderBottom: "_borderBottom_o3xpv_109"
|
|
617
619
|
};
|
|
618
620
|
// src/components/InputField/InputField.tsx
|
|
619
621
|
function ge({ label: t, error: n, className: r = "", isValid: i = !0, variant: a = "default", id: o, ...s }) {
|
|
@@ -631,7 +633,7 @@ function ge({ label: t, error: n, className: r = "", isValid: i = !0, variant: a
|
|
|
631
633
|
}),
|
|
632
634
|
/* @__PURE__ */ h("input", {
|
|
633
635
|
id: l,
|
|
634
|
-
className: `${he.input} ${a === "borderBottom" ? he.borderBottom : ""} ${d ? he.error : ""}`,
|
|
636
|
+
className: `${he.input} ${a === "borderBottom" ? he.borderBottom : a === "ghost" ? he.ghost : ""} ${d ? he.error : ""}`,
|
|
635
637
|
"aria-invalid": d ? "true" : "false",
|
|
636
638
|
"aria-describedby": n ? u : void 0,
|
|
637
639
|
...s
|
|
@@ -706,19 +708,20 @@ var _e = {
|
|
|
706
708
|
]
|
|
707
709
|
});
|
|
708
710
|
}, G = {
|
|
709
|
-
label: "
|
|
710
|
-
basetrack: "
|
|
711
|
-
selectedtrack: "
|
|
712
|
-
livetrack: "
|
|
713
|
-
livetrackFaceted: "
|
|
714
|
-
livetrackDefault: "
|
|
715
|
-
thumbs: "
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
711
|
+
label: "_label_1bi7u_1",
|
|
712
|
+
basetrack: "_basetrack_1bi7u_8",
|
|
713
|
+
selectedtrack: "_selectedtrack_1bi7u_39",
|
|
714
|
+
livetrack: "_livetrack_1bi7u_46",
|
|
715
|
+
livetrackFaceted: "_livetrackFaceted_1bi7u_52",
|
|
716
|
+
livetrackDefault: "_livetrackDefault_1bi7u_55",
|
|
717
|
+
thumbs: "_thumbs_1bi7u_58",
|
|
718
|
+
rootDisabled: "_rootDisabled_1bi7u_95",
|
|
719
|
+
disabled: "_disabled_1bi7u_98",
|
|
720
|
+
stepmarks: "_stepmarks_1bi7u_102",
|
|
721
|
+
stepmark: "_stepmark_1bi7u_102",
|
|
722
|
+
stepmarksInline: "_stepmarksInline_1bi7u_121",
|
|
723
|
+
stepmarksBelow: "_stepmarksBelow_1bi7u_128",
|
|
724
|
+
basetrackStepsBelow: "_basetrackStepsBelow_1bi7u_133"
|
|
722
725
|
}, xe = 50, Se = (t) => {
|
|
723
726
|
let { min: n, max: r, step: i = 1, disabled: a = !1, className: o, activeMin: s, activeMax: c, isFaceted: l = !1, highlightFaceted: u = !0, stepMarks: d, onChange: f, onFinalChange: p, label: m, "aria-label": _, id: v } = t, y = e.useId(), b = v || y;
|
|
724
727
|
if (!(Number.isFinite(n) && Number.isFinite(r) && r > n)) return /* @__PURE__ */ g("div", {
|
|
@@ -742,7 +745,7 @@ var _e = {
|
|
|
742
745
|
if ("isRange" in t && t.isRange) {
|
|
743
746
|
let e = t.value, [u, d] = e;
|
|
744
747
|
return /* @__PURE__ */ g("div", {
|
|
745
|
-
className: o,
|
|
748
|
+
className: `${o ?? ""} ${a ? G.rootDisabled : ""}`.trim() || void 0,
|
|
746
749
|
children: [m && /* @__PURE__ */ h("label", {
|
|
747
750
|
htmlFor: b,
|
|
748
751
|
className: G.label,
|
|
@@ -805,7 +808,7 @@ var _e = {
|
|
|
805
808
|
{
|
|
806
809
|
let e = t.value;
|
|
807
810
|
return /* @__PURE__ */ g("div", {
|
|
808
|
-
className: o,
|
|
811
|
+
className: `${o ?? ""} ${a ? G.rootDisabled : ""}`.trim() || void 0,
|
|
809
812
|
children: [m && /* @__PURE__ */ h("label", {
|
|
810
813
|
htmlFor: b,
|
|
811
814
|
className: G.label,
|
|
@@ -866,18 +869,18 @@ var _e = {
|
|
|
866
869
|
});
|
|
867
870
|
}
|
|
868
871
|
}, Ce = {
|
|
869
|
-
row: "
|
|
870
|
-
default: "
|
|
871
|
-
micro: "
|
|
872
|
-
fill: "
|
|
873
|
-
label: "
|
|
874
|
-
value: "
|
|
875
|
-
stepmarks: "
|
|
876
|
-
stepmark: "
|
|
877
|
-
handle: "
|
|
878
|
-
line: "
|
|
879
|
-
keyboardFocus: "
|
|
880
|
-
disabled: "
|
|
872
|
+
row: "_row_1kxpx_2",
|
|
873
|
+
default: "_default_1kxpx_37",
|
|
874
|
+
micro: "_micro_1kxpx_43",
|
|
875
|
+
fill: "_fill_1kxpx_52",
|
|
876
|
+
label: "_label_1kxpx_66",
|
|
877
|
+
value: "_value_1kxpx_67",
|
|
878
|
+
stepmarks: "_stepmarks_1kxpx_90",
|
|
879
|
+
stepmark: "_stepmark_1kxpx_90",
|
|
880
|
+
handle: "_handle_1kxpx_109",
|
|
881
|
+
line: "_line_1kxpx_107",
|
|
882
|
+
keyboardFocus: "_keyboardFocus_1kxpx_147",
|
|
883
|
+
disabled: "_disabled_1kxpx_152"
|
|
881
884
|
}, we = 50, Te = 6, Ee = 8, De = ({ min: t, max: n, step: r = 1, value: i, onChange: a, onFinalChange: o, label: s, format: c, showValue: l = !0, stepMarks: u = !1, disabled: d = !1, size: f = "default", className: p, "aria-label": m, id: _ }) => {
|
|
882
885
|
let v = e.useId(), y = _ || v, [b, x] = e.useState(!1), S = Number.isFinite(t) && Number.isFinite(n) && n > t, C = [
|
|
883
886
|
Ce.row,
|
|
@@ -983,157 +986,327 @@ var _e = {
|
|
|
983
986
|
}
|
|
984
987
|
});
|
|
985
988
|
}, Oe = {
|
|
986
|
-
row: "
|
|
987
|
-
label: "
|
|
988
|
-
ruler: "
|
|
989
|
-
keyboardFocus: "
|
|
990
|
-
ticks: "
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
989
|
+
row: "_row_1wior_2",
|
|
990
|
+
label: "_label_1wior_9",
|
|
991
|
+
ruler: "_ruler_1wior_19",
|
|
992
|
+
keyboardFocus: "_keyboardFocus_1wior_33",
|
|
993
|
+
ticks: "_ticks_1wior_40",
|
|
994
|
+
mark: "_mark_1wior_60",
|
|
995
|
+
markWarning: "_markWarning_1wior_70",
|
|
996
|
+
markSignal: "_markSignal_1wior_74",
|
|
997
|
+
handle: "_handle_1wior_81",
|
|
998
|
+
field: "_field_1wior_93",
|
|
999
|
+
disabled: "_disabled_1wior_102"
|
|
1000
|
+
}, ke = 8, Ae = ({ value: t, onChange: n, onFinalChange: r, step: i = 1, min: a, max: o, label: s, labelWidth: c, disabled: l = !1, fieldWidth: u = "70px", className: d, "aria-label": f, id: p, marks: m }) => {
|
|
1001
|
+
let _ = e.useId(), v = p || _, y = e.useMemo(() => {
|
|
996
1002
|
let e = String(i), t = e.indexOf(".");
|
|
997
1003
|
return t < 0 ? 0 : e.length - t - 1;
|
|
998
|
-
}, [i]),
|
|
1004
|
+
}, [i]), b = e.useCallback((e) => {
|
|
999
1005
|
let t = e;
|
|
1000
|
-
return typeof a == "number" && (t = Math.max(a, t)), typeof o == "number" && (t = Math.min(o, t)), Number(t.toFixed(
|
|
1006
|
+
return typeof a == "number" && (t = Math.max(a, t)), typeof o == "number" && (t = Math.min(o, t)), Number(t.toFixed(y));
|
|
1001
1007
|
}, [
|
|
1002
1008
|
a,
|
|
1003
1009
|
o,
|
|
1004
|
-
|
|
1005
|
-
]),
|
|
1010
|
+
y
|
|
1011
|
+
]), x = e.useRef(null), [S, C] = e.useState(!1), [w, T] = e.useState(!1), E = e.useRef({
|
|
1006
1012
|
value: t,
|
|
1007
1013
|
onChange: n,
|
|
1008
1014
|
onFinalChange: r,
|
|
1009
|
-
clamp:
|
|
1015
|
+
clamp: b,
|
|
1010
1016
|
step: i
|
|
1011
1017
|
});
|
|
1012
|
-
|
|
1018
|
+
E.current = {
|
|
1013
1019
|
value: t,
|
|
1014
1020
|
onChange: n,
|
|
1015
1021
|
onFinalChange: r,
|
|
1016
|
-
clamp:
|
|
1022
|
+
clamp: b,
|
|
1017
1023
|
step: i
|
|
1018
|
-
}, e.useEffect(() => () =>
|
|
1019
|
-
let
|
|
1024
|
+
}, e.useEffect(() => () => x.current?.stop(), []);
|
|
1025
|
+
let D = (e) => {
|
|
1020
1026
|
if (l || e.button !== 0) return;
|
|
1021
|
-
e.preventDefault(),
|
|
1027
|
+
e.preventDefault(), T(!1), x.current?.stop();
|
|
1022
1028
|
let n = e.currentTarget, r = e.pointerId;
|
|
1023
1029
|
try {
|
|
1024
1030
|
n.setPointerCapture(r);
|
|
1025
1031
|
} catch {}
|
|
1026
1032
|
let i = (e) => {
|
|
1027
|
-
let t =
|
|
1033
|
+
let t = x.current;
|
|
1028
1034
|
if (!t) return;
|
|
1029
|
-
let { value: n, onChange: r, clamp: i, step: a } =
|
|
1035
|
+
let { value: n, onChange: r, clamp: i, step: a } = E.current, o = Math.round((e.clientX - t.x) / ke), s = i(t.value - o * a);
|
|
1030
1036
|
o !== 0 && (t.moved = !0), s !== n && r(s);
|
|
1031
1037
|
}, a = () => {
|
|
1032
|
-
let e =
|
|
1033
|
-
|
|
1038
|
+
let e = x.current;
|
|
1039
|
+
x.current = null, window.removeEventListener("pointermove", i), window.removeEventListener("pointerup", a), window.removeEventListener("pointercancel", a), window.removeEventListener("blur", a);
|
|
1034
1040
|
try {
|
|
1035
1041
|
n.hasPointerCapture(r) && n.releasePointerCapture(r);
|
|
1036
1042
|
} catch {}
|
|
1037
|
-
|
|
1043
|
+
C(!1), e?.moved && E.current.onFinalChange?.(E.current.value);
|
|
1038
1044
|
};
|
|
1039
|
-
window.addEventListener("pointermove", i), window.addEventListener("pointerup", a), window.addEventListener("pointercancel", a), window.addEventListener("blur", a),
|
|
1045
|
+
window.addEventListener("pointermove", i), window.addEventListener("pointerup", a), window.addEventListener("pointercancel", a), window.addEventListener("blur", a), x.current = {
|
|
1040
1046
|
x: e.clientX,
|
|
1041
1047
|
value: t,
|
|
1042
1048
|
moved: !1,
|
|
1043
1049
|
stop: a
|
|
1044
|
-
},
|
|
1045
|
-
},
|
|
1050
|
+
}, C(!0), n.focus();
|
|
1051
|
+
}, O = (e) => {
|
|
1046
1052
|
if (l) return;
|
|
1047
|
-
|
|
1053
|
+
T(!0);
|
|
1048
1054
|
let s = e.shiftKey ? 10 : 1, c;
|
|
1049
|
-
e.key === "ArrowRight" || e.key === "ArrowUp" ? c =
|
|
1050
|
-
}, [
|
|
1051
|
-
if (
|
|
1052
|
-
let e = Number(
|
|
1053
|
-
if (
|
|
1054
|
-
let i =
|
|
1055
|
+
e.key === "ArrowRight" || e.key === "ArrowUp" ? c = b(t + i * s) : e.key === "ArrowLeft" || e.key === "ArrowDown" ? c = b(t - i * s) : e.key === "Home" && typeof a == "number" ? c = a : e.key === "End" && typeof o == "number" && (c = o), c !== void 0 && (e.preventDefault(), c !== t && (n(c), r?.(c)));
|
|
1056
|
+
}, [k, A] = e.useState(null), j = () => {
|
|
1057
|
+
if (k === null) return;
|
|
1058
|
+
let e = Number(k.replace(",", "."));
|
|
1059
|
+
if (A(null), k.trim() === "" || !Number.isFinite(e)) return;
|
|
1060
|
+
let i = b(e);
|
|
1055
1061
|
i !== t && (n(i), r?.(i));
|
|
1056
|
-
},
|
|
1057
|
-
"--scrub-shift": `${
|
|
1062
|
+
}, M = -(t / i * ke % 40), N = (e) => (e - t) / i * ke, P = typeof a == "number" ? `max(0px, calc(50% + ${N(a)}px))` : "0px", F = typeof o == "number" ? `max(0px, calc(50% - ${N(o)}px))` : "0px", I = {
|
|
1063
|
+
"--scrub-shift": `${M}px`,
|
|
1058
1064
|
"--scrub-tick": `${ke}px`,
|
|
1059
1065
|
"--scrub-period": "40px",
|
|
1060
|
-
"--scrub-clip": `inset(0 ${
|
|
1061
|
-
},
|
|
1066
|
+
"--scrub-clip": `inset(0 ${F} 0 ${P})`
|
|
1067
|
+
}, L = [
|
|
1062
1068
|
Oe.row,
|
|
1063
1069
|
l ? Oe.disabled : "",
|
|
1064
1070
|
d ?? ""
|
|
1065
1071
|
].filter(Boolean).join(" ");
|
|
1066
1072
|
return /* @__PURE__ */ g("div", {
|
|
1067
|
-
className:
|
|
1073
|
+
className: L,
|
|
1068
1074
|
children: [
|
|
1069
1075
|
s && /* @__PURE__ */ h("label", {
|
|
1070
|
-
htmlFor:
|
|
1076
|
+
htmlFor: v,
|
|
1071
1077
|
className: Oe.label,
|
|
1072
1078
|
style: c ? { width: c } : void 0,
|
|
1073
1079
|
children: s
|
|
1074
1080
|
}),
|
|
1075
1081
|
/* @__PURE__ */ g("div", {
|
|
1076
|
-
className: `${Oe.ruler} ${
|
|
1077
|
-
style:
|
|
1082
|
+
className: `${Oe.ruler} ${S ? Oe.dragging : ""} ${w ? Oe.keyboardFocus : ""} ${l ? "cursor-not-allowed" : "cursor-resize-ew"}`,
|
|
1083
|
+
style: I,
|
|
1078
1084
|
role: "slider",
|
|
1079
1085
|
tabIndex: l ? -1 : 0,
|
|
1080
1086
|
"aria-label": f || s,
|
|
1081
1087
|
"aria-valuenow": t,
|
|
1088
|
+
"aria-valuetext": m?.find((e) => e.value === t)?.label ? `${t}, ${m.find((e) => e.value === t).label}` : void 0,
|
|
1082
1089
|
"aria-valuemin": a,
|
|
1083
1090
|
"aria-valuemax": o,
|
|
1084
1091
|
"aria-disabled": l || void 0,
|
|
1085
|
-
onPointerDown:
|
|
1086
|
-
onKeyDown:
|
|
1087
|
-
onBlur: () =>
|
|
1088
|
-
children: [
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
"
|
|
1094
|
-
|
|
1092
|
+
onPointerDown: D,
|
|
1093
|
+
onKeyDown: O,
|
|
1094
|
+
onBlur: () => T(!1),
|
|
1095
|
+
children: [
|
|
1096
|
+
/* @__PURE__ */ h("div", {
|
|
1097
|
+
className: Oe.ticks,
|
|
1098
|
+
"aria-hidden": "true"
|
|
1099
|
+
}),
|
|
1100
|
+
m?.map((e) => /* @__PURE__ */ h("div", {
|
|
1101
|
+
className: `${Oe.mark} ${e.tone === "warning" ? Oe.markWarning : e.tone === "signal" ? Oe.markSignal : ""}`,
|
|
1102
|
+
style: { left: `calc(50% + ${N(e.value)}px)` },
|
|
1103
|
+
"aria-hidden": "true"
|
|
1104
|
+
}, e.value)),
|
|
1105
|
+
/* @__PURE__ */ h("div", {
|
|
1106
|
+
className: Oe.handle,
|
|
1107
|
+
"aria-hidden": "true"
|
|
1108
|
+
})
|
|
1109
|
+
]
|
|
1095
1110
|
}),
|
|
1096
1111
|
/* @__PURE__ */ h(ge, {
|
|
1097
|
-
id:
|
|
1112
|
+
id: v,
|
|
1098
1113
|
className: Oe.field,
|
|
1099
1114
|
style: { width: u },
|
|
1100
1115
|
type: "text",
|
|
1101
1116
|
inputMode: "decimal",
|
|
1102
1117
|
"aria-label": s ? `${s}, value` : f,
|
|
1103
|
-
value:
|
|
1118
|
+
value: k ?? String(t),
|
|
1104
1119
|
disabled: l,
|
|
1105
|
-
onFocus: () =>
|
|
1106
|
-
onChange: (e) =>
|
|
1107
|
-
onBlur:
|
|
1120
|
+
onFocus: () => A(String(t)),
|
|
1121
|
+
onChange: (e) => A(e.target.value),
|
|
1122
|
+
onBlur: j,
|
|
1108
1123
|
onKeyDown: (e) => {
|
|
1109
|
-
e.key === "Enter" && e.currentTarget.blur(), e.key === "Escape" &&
|
|
1124
|
+
e.key === "Enter" && e.currentTarget.blur(), e.key === "Escape" && A(null);
|
|
1110
1125
|
}
|
|
1111
1126
|
})
|
|
1112
1127
|
]
|
|
1113
1128
|
});
|
|
1114
1129
|
}, je = {
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
+
sliderField: "_sliderField_bkzkz_2",
|
|
1131
|
+
slider: "_slider_bkzkz_2",
|
|
1132
|
+
field: "_field_bkzkz_15"
|
|
1133
|
+
}, Me = (e) => String(Math.round(e * 1e3) / 1e3);
|
|
1134
|
+
function Ne({ value: t, onChange: n, min: r, max: i, step: a = 1, fieldMin: o, fieldMax: s, fieldStep: c, format: l = Me, disabled: u = !1, className: d = "", "aria-label": f }) {
|
|
1135
|
+
let [p, m] = e.useState(null), _ = (e) => {
|
|
1136
|
+
m(e);
|
|
1137
|
+
let t = parseFloat(e.replace(",", "."));
|
|
1138
|
+
Number.isFinite(t) && n(Math.min(s ?? Infinity, Math.max(o ?? -Infinity, t)));
|
|
1139
|
+
};
|
|
1140
|
+
return /* @__PURE__ */ g("div", {
|
|
1141
|
+
className: `${je.sliderField} ${d}`,
|
|
1142
|
+
children: [/* @__PURE__ */ h(Se, {
|
|
1143
|
+
className: je.slider,
|
|
1144
|
+
min: r,
|
|
1145
|
+
max: i,
|
|
1146
|
+
step: a,
|
|
1147
|
+
disabled: u,
|
|
1148
|
+
"aria-label": f,
|
|
1149
|
+
value: Math.min(i, Math.max(r, t)),
|
|
1150
|
+
onChange: (e) => n(Math.round(e * 1e10) / 1e10)
|
|
1151
|
+
}), /* @__PURE__ */ h(ge, {
|
|
1152
|
+
variant: "ghost",
|
|
1153
|
+
type: "number",
|
|
1154
|
+
className: je.field,
|
|
1155
|
+
disabled: u,
|
|
1156
|
+
step: c ?? a,
|
|
1157
|
+
min: o,
|
|
1158
|
+
max: s,
|
|
1159
|
+
"aria-label": `${f}, value`,
|
|
1160
|
+
value: p ?? l(t),
|
|
1161
|
+
onChange: (e) => _(e.target.value),
|
|
1162
|
+
onBlur: () => m(null)
|
|
1163
|
+
})]
|
|
1164
|
+
});
|
|
1165
|
+
}
|
|
1166
|
+
var Pe = {
|
|
1167
|
+
histrange: "_histrange_104e8_2",
|
|
1168
|
+
bars: "_bars_104e8_10",
|
|
1169
|
+
bar: "_bar_104e8_10",
|
|
1170
|
+
barIn: "_barIn_104e8_27",
|
|
1171
|
+
ends: "_ends_104e8_31",
|
|
1172
|
+
upto: "_upto_104e8_53",
|
|
1173
|
+
disabled: "_disabled_104e8_61"
|
|
1174
|
+
}, Fe = (e) => String(Number(e.toFixed(8)));
|
|
1175
|
+
function Ie(e, t) {
|
|
1176
|
+
let n = e.filter(([e]) => Number.isFinite(e)).slice().sort((e, t) => e[0] - t[0]);
|
|
1177
|
+
if (n.length === 0) return [];
|
|
1178
|
+
if (n.length <= t) return n.map(([e, t]) => ({
|
|
1179
|
+
from: e,
|
|
1180
|
+
to: e,
|
|
1181
|
+
count: t
|
|
1182
|
+
}));
|
|
1183
|
+
let r = n[0][0], i = n[n.length - 1][0], a = (i - r) / t, o = [], s = 0;
|
|
1184
|
+
for (let e = 0; e < t; e++) {
|
|
1185
|
+
let c = e === t - 1 ? Infinity : r + (e + 1) * a, l = s, u = 0;
|
|
1186
|
+
for (; s < n.length && n[s][0] < c;) u += n[s++][1];
|
|
1187
|
+
o.push(s > l ? {
|
|
1188
|
+
from: n[l][0],
|
|
1189
|
+
to: n[s - 1][0],
|
|
1190
|
+
count: u
|
|
1191
|
+
} : {
|
|
1192
|
+
from: r + e * a,
|
|
1193
|
+
to: Math.min(i, r + (e + 1) * a),
|
|
1194
|
+
count: 0
|
|
1195
|
+
});
|
|
1196
|
+
}
|
|
1197
|
+
return o;
|
|
1198
|
+
}
|
|
1199
|
+
function Le({ values: e, value: t, onChange: n, maxBars: r = 30, step: i, disabled: a = !1, className: o = "", "aria-label": s }) {
|
|
1200
|
+
let c = u(() => Ie(e, r), [e, r]), l = Math.max(1, ...c.map((e) => e.count)), p = d(null), [m, _] = f(null), [v, y] = f({}), b = t.from != null || t.to != null, x = (e, n) => m ? n >= Math.min(...m) && n <= Math.max(...m) : b && (t.from == null || e.to >= t.from) && (t.to == null || e.from <= t.to), S = (e) => {
|
|
1201
|
+
let t = p.current.getBoundingClientRect();
|
|
1202
|
+
return Math.max(0, Math.min(c.length - 1, Math.floor((e - t.left) / t.width * c.length)));
|
|
1203
|
+
}, C = (e, r) => {
|
|
1204
|
+
let i = c[Math.min(e, r)], a = c[Math.max(e, r)];
|
|
1205
|
+
e === r && t.from === i.from && t.to === a.to ? n({
|
|
1206
|
+
from: null,
|
|
1207
|
+
to: null
|
|
1208
|
+
}) : n({
|
|
1209
|
+
from: i.from,
|
|
1210
|
+
to: a.to
|
|
1211
|
+
});
|
|
1212
|
+
}, w = (e) => {
|
|
1213
|
+
if (a || e.button !== 0 || c.length === 0) return;
|
|
1214
|
+
e.preventDefault();
|
|
1215
|
+
let t = S(e.clientX);
|
|
1216
|
+
_([t, t]), e.currentTarget.setPointerCapture(e.pointerId);
|
|
1217
|
+
}, T = (e) => {
|
|
1218
|
+
if (!m) return;
|
|
1219
|
+
let t = S(e.clientX);
|
|
1220
|
+
t !== m[1] && _([m[0], t]);
|
|
1221
|
+
}, E = () => {
|
|
1222
|
+
m && (C(m[0], m[1]), _(null));
|
|
1223
|
+
}, D = (e, r) => {
|
|
1224
|
+
if (y((t) => ({
|
|
1225
|
+
...t,
|
|
1226
|
+
[e]: void 0
|
|
1227
|
+
})), r.trim() === "") {
|
|
1228
|
+
n({
|
|
1229
|
+
...t,
|
|
1230
|
+
[e]: null
|
|
1231
|
+
});
|
|
1232
|
+
return;
|
|
1233
|
+
}
|
|
1234
|
+
let i = Number(r.replace(",", "."));
|
|
1235
|
+
if (!Number.isFinite(i)) return;
|
|
1236
|
+
let a = {
|
|
1237
|
+
...t,
|
|
1238
|
+
[e]: i
|
|
1239
|
+
};
|
|
1240
|
+
a.from != null && a.to != null && a.from > a.to && (a = {
|
|
1241
|
+
from: a.to,
|
|
1242
|
+
to: a.from
|
|
1243
|
+
}), n(a);
|
|
1244
|
+
}, O = (e, n) => /* @__PURE__ */ h(ge, {
|
|
1245
|
+
variant: "ghost",
|
|
1246
|
+
type: "number",
|
|
1247
|
+
step: i ?? "any",
|
|
1248
|
+
disabled: a,
|
|
1249
|
+
className: e === "to" ? Pe.upto : void 0,
|
|
1250
|
+
placeholder: n == null ? void 0 : Fe(n),
|
|
1251
|
+
"aria-label": `${s}, ${e}`,
|
|
1252
|
+
value: v[e] ?? (t[e] == null ? "" : Fe(t[e])),
|
|
1253
|
+
onChange: (t) => y((n) => ({
|
|
1254
|
+
...n,
|
|
1255
|
+
[e]: t.target.value
|
|
1256
|
+
})),
|
|
1257
|
+
onBlur: (t) => D(e, t.target.value),
|
|
1258
|
+
onKeyDown: (t) => {
|
|
1259
|
+
t.key === "Enter" && D(e, t.target.value);
|
|
1260
|
+
}
|
|
1261
|
+
});
|
|
1262
|
+
return /* @__PURE__ */ g("div", {
|
|
1263
|
+
className: `${Pe.histrange} ${a ? Pe.disabled : ""} ${o}`,
|
|
1264
|
+
children: [c.length > 0 && /* @__PURE__ */ h("div", {
|
|
1265
|
+
ref: p,
|
|
1266
|
+
className: Pe.bars,
|
|
1267
|
+
"aria-hidden": "true",
|
|
1268
|
+
onPointerDown: w,
|
|
1269
|
+
onPointerMove: T,
|
|
1270
|
+
onPointerUp: E,
|
|
1271
|
+
onPointerCancel: E,
|
|
1272
|
+
children: c.map((e, t) => /* @__PURE__ */ h("div", {
|
|
1273
|
+
className: `${Pe.bar} ${x(e, t) ? Pe.barIn : ""}`,
|
|
1274
|
+
style: { height: `${Math.max(6, e.count / l * 100)}%` },
|
|
1275
|
+
title: `${e.from === e.to ? Fe(e.from) : `${Fe(e.from)} to ${Fe(e.to)}`}: ${e.count.toLocaleString("en")}`
|
|
1276
|
+
}, t))
|
|
1277
|
+
}), /* @__PURE__ */ g("div", {
|
|
1278
|
+
className: Pe.ends,
|
|
1279
|
+
children: [
|
|
1280
|
+
O("from", c[0]?.from),
|
|
1281
|
+
/* @__PURE__ */ h("span", { children: "to" }),
|
|
1282
|
+
O("to", c[c.length - 1]?.to)
|
|
1283
|
+
]
|
|
1284
|
+
})]
|
|
1285
|
+
});
|
|
1286
|
+
}
|
|
1287
|
+
var Re = {
|
|
1288
|
+
wrapper: "_wrapper_bt1lo_1",
|
|
1289
|
+
label: "_label_bt1lo_7",
|
|
1290
|
+
trigger: "_trigger_bt1lo_12",
|
|
1291
|
+
micro: "_micro_bt1lo_28",
|
|
1292
|
+
default: "_default_bt1lo_34",
|
|
1293
|
+
large: "_large_bt1lo_40",
|
|
1294
|
+
ghost: "_ghost_bt1lo_62",
|
|
1295
|
+
icon: "_icon_bt1lo_74",
|
|
1296
|
+
sizer: "_sizer_bt1lo_78",
|
|
1297
|
+
sizerHidden: "_sizerHidden_bt1lo_87",
|
|
1298
|
+
content: "_content_bt1lo_99",
|
|
1299
|
+
viewport: "_viewport_bt1lo_108",
|
|
1300
|
+
item: "_item_bt1lo_114",
|
|
1301
|
+
itemIndicator: "_itemIndicator_bt1lo_137"
|
|
1302
|
+
}, ze = ({ value: t, onValueChange: n, options: r, placeholder: i = "Select...", className: a = "", disabled: o = !1, label: s, size: c = "default", variant: l = "default", "aria-label": u, id: d }) => {
|
|
1130
1303
|
let f = ae(), p = e.useId(), m = d || p, _ = `${m}-label`, v = r.find((e) => e.value === t), y = /* @__PURE__ */ g(L.Root, {
|
|
1131
1304
|
value: t,
|
|
1132
1305
|
onValueChange: n,
|
|
1133
1306
|
disabled: o,
|
|
1134
1307
|
children: [/* @__PURE__ */ g(L.Trigger, {
|
|
1135
1308
|
id: m,
|
|
1136
|
-
className: `${
|
|
1309
|
+
className: `${Re.trigger} ${Re[c]} ${l === "ghost" ? Re.ghost : ""} ${a} cursor-pointer`,
|
|
1137
1310
|
...s ? { "aria-labelledby": _ } : u ? { "aria-label": u } : {},
|
|
1138
1311
|
children: [/* @__PURE__ */ g("span", {
|
|
1139
1312
|
style: {
|
|
@@ -1142,15 +1315,15 @@ var _e = {
|
|
|
1142
1315
|
gap: 6
|
|
1143
1316
|
},
|
|
1144
1317
|
children: [v?.icon, l === "ghost" ? /* @__PURE__ */ g("span", {
|
|
1145
|
-
className:
|
|
1318
|
+
className: Re.sizer,
|
|
1146
1319
|
children: [r.filter((e) => e.value !== t).map((e) => /* @__PURE__ */ h("span", {
|
|
1147
|
-
className:
|
|
1320
|
+
className: Re.sizerHidden,
|
|
1148
1321
|
"aria-hidden": "true",
|
|
1149
1322
|
children: e.label
|
|
1150
1323
|
}, e.value)), /* @__PURE__ */ h("span", { children: /* @__PURE__ */ h(L.Value, { placeholder: i }) })]
|
|
1151
1324
|
}) : /* @__PURE__ */ h(L.Value, { placeholder: i })]
|
|
1152
1325
|
}), /* @__PURE__ */ h(L.Icon, {
|
|
1153
|
-
className:
|
|
1326
|
+
className: Re.icon,
|
|
1154
1327
|
"aria-hidden": "true",
|
|
1155
1328
|
children: /* @__PURE__ */ h(x, {
|
|
1156
1329
|
size: c === "large" ? 21 : 14,
|
|
@@ -1160,16 +1333,16 @@ var _e = {
|
|
|
1160
1333
|
}), /* @__PURE__ */ h(L.Portal, {
|
|
1161
1334
|
container: f,
|
|
1162
1335
|
children: /* @__PURE__ */ h(L.Content, {
|
|
1163
|
-
className:
|
|
1336
|
+
className: Re.content,
|
|
1164
1337
|
position: "popper",
|
|
1165
1338
|
side: "bottom",
|
|
1166
1339
|
align: "start",
|
|
1167
1340
|
sideOffset: 4,
|
|
1168
1341
|
children: /* @__PURE__ */ h(L.Viewport, {
|
|
1169
|
-
className:
|
|
1342
|
+
className: Re.viewport,
|
|
1170
1343
|
children: r.map((e) => /* @__PURE__ */ g(L.Item, {
|
|
1171
1344
|
value: e.value,
|
|
1172
|
-
className:
|
|
1345
|
+
className: Re.item,
|
|
1173
1346
|
children: [/* @__PURE__ */ g("span", {
|
|
1174
1347
|
style: {
|
|
1175
1348
|
display: "inline-flex",
|
|
@@ -1178,7 +1351,7 @@ var _e = {
|
|
|
1178
1351
|
},
|
|
1179
1352
|
children: [e.icon, /* @__PURE__ */ h(L.ItemText, { children: e.label })]
|
|
1180
1353
|
}), /* @__PURE__ */ h(L.ItemIndicator, {
|
|
1181
|
-
className:
|
|
1354
|
+
className: Re.itemIndicator,
|
|
1182
1355
|
children: /* @__PURE__ */ h(b, {
|
|
1183
1356
|
size: 14,
|
|
1184
1357
|
color: "currentColor"
|
|
@@ -1190,21 +1363,21 @@ var _e = {
|
|
|
1190
1363
|
})]
|
|
1191
1364
|
});
|
|
1192
1365
|
return s ? /* @__PURE__ */ g("div", {
|
|
1193
|
-
className:
|
|
1366
|
+
className: Re.wrapper,
|
|
1194
1367
|
children: [/* @__PURE__ */ h("label", {
|
|
1195
1368
|
id: _,
|
|
1196
1369
|
htmlFor: m,
|
|
1197
|
-
className:
|
|
1370
|
+
className: Re.label,
|
|
1198
1371
|
children: s
|
|
1199
1372
|
}), y]
|
|
1200
1373
|
}) : y;
|
|
1201
|
-
},
|
|
1202
|
-
content: "
|
|
1203
|
-
menu: "
|
|
1204
|
-
divider: "
|
|
1374
|
+
}, Be = {
|
|
1375
|
+
content: "_content_1a1gb_2",
|
|
1376
|
+
menu: "_menu_1a1gb_24",
|
|
1377
|
+
divider: "_divider_1a1gb_58"
|
|
1205
1378
|
};
|
|
1206
1379
|
// src/components/Popover/Popover.tsx
|
|
1207
|
-
function
|
|
1380
|
+
function Ve(e) {
|
|
1208
1381
|
if (![
|
|
1209
1382
|
"ArrowDown",
|
|
1210
1383
|
"ArrowUp",
|
|
@@ -1216,7 +1389,7 @@ function Pe(e) {
|
|
|
1216
1389
|
let n = t.indexOf(document.activeElement);
|
|
1217
1390
|
t[e.key === "Home" ? 0 : e.key === "End" ? t.length - 1 : e.key === "ArrowDown" ? (n + 1) % t.length : (n - 1 + t.length) % t.length].focus(), e.preventDefault();
|
|
1218
1391
|
}
|
|
1219
|
-
var
|
|
1392
|
+
var He = ({ trigger: t, children: n, open: r, onOpenChange: i, align: a = "end", side: o = "bottom", sideOffset: s = 5, role: c = "dialog", className: l = "", "aria-label": u, "aria-describedby": d }) => {
|
|
1220
1393
|
let f = ae(), p = e.useRef(null);
|
|
1221
1394
|
return /* @__PURE__ */ g(R.Root, {
|
|
1222
1395
|
open: r,
|
|
@@ -1229,7 +1402,7 @@ var Fe = ({ trigger: t, children: n, open: r, onOpenChange: i, align: a = "end",
|
|
|
1229
1402
|
container: f,
|
|
1230
1403
|
children: /* @__PURE__ */ h(R.Content, {
|
|
1231
1404
|
ref: p,
|
|
1232
|
-
className: `${
|
|
1405
|
+
className: `${Be.content} ${c === "menu" ? Be.menu : ""} ${l}`,
|
|
1233
1406
|
align: a,
|
|
1234
1407
|
side: o,
|
|
1235
1408
|
sideOffset: s,
|
|
@@ -1237,7 +1410,7 @@ var Fe = ({ trigger: t, children: n, open: r, onOpenChange: i, align: a = "end",
|
|
|
1237
1410
|
role: c,
|
|
1238
1411
|
"aria-label": u,
|
|
1239
1412
|
"aria-describedby": d,
|
|
1240
|
-
onKeyDown: c === "menu" ?
|
|
1413
|
+
onKeyDown: c === "menu" ? Ve : void 0,
|
|
1241
1414
|
onEscapeKeyDown: (e) => {
|
|
1242
1415
|
let t = p.current;
|
|
1243
1416
|
t && e.target !== t && t.querySelector("[aria-expanded=\"true\"]") && e.preventDefault();
|
|
@@ -1246,62 +1419,162 @@ var Fe = ({ trigger: t, children: n, open: r, onOpenChange: i, align: a = "end",
|
|
|
1246
1419
|
})
|
|
1247
1420
|
})]
|
|
1248
1421
|
});
|
|
1249
|
-
},
|
|
1250
|
-
className:
|
|
1422
|
+
}, Ue = () => /* @__PURE__ */ h("div", {
|
|
1423
|
+
className: Be.divider,
|
|
1251
1424
|
role: "separator"
|
|
1252
|
-
}),
|
|
1253
|
-
table: "
|
|
1254
|
-
caption: "
|
|
1255
|
-
headerRow: "
|
|
1256
|
-
dataRow: "
|
|
1257
|
-
cellInner: "
|
|
1258
|
-
cellLabel: "
|
|
1259
|
-
cellContent: "
|
|
1260
|
-
value: "
|
|
1261
|
-
icon: "
|
|
1262
|
-
scroll: "
|
|
1263
|
-
bleedEnd: "
|
|
1264
|
-
stickyFirst: "
|
|
1265
|
-
|
|
1425
|
+
}), We = {
|
|
1426
|
+
table: "_table_1jnl1_1",
|
|
1427
|
+
caption: "_caption_1jnl1_8",
|
|
1428
|
+
headerRow: "_headerRow_1jnl1_25",
|
|
1429
|
+
dataRow: "_dataRow_1jnl1_33",
|
|
1430
|
+
cellInner: "_cellInner_1jnl1_41",
|
|
1431
|
+
cellLabel: "_cellLabel_1jnl1_47",
|
|
1432
|
+
cellContent: "_cellContent_1jnl1_52",
|
|
1433
|
+
value: "_value_1jnl1_58",
|
|
1434
|
+
icon: "_icon_1jnl1_64",
|
|
1435
|
+
scroll: "_scroll_1jnl1_74",
|
|
1436
|
+
bleedEnd: "_bleedEnd_1jnl1_87",
|
|
1437
|
+
stickyFirst: "_stickyFirst_1jnl1_110",
|
|
1438
|
+
resizable: "_resizable_1jnl1_168",
|
|
1439
|
+
columnHandle: "_columnHandle_1jnl1_194"
|
|
1440
|
+
}, Ge = 48, Ke = 16, qe = 64, Je = 160;
|
|
1441
|
+
function Ye(e, t, n) {
|
|
1442
|
+
let r = n ? `indx-table-columns:${n}` : null, i = {};
|
|
1443
|
+
if (r) try {
|
|
1444
|
+
i = JSON.parse(localStorage.getItem(r) ?? "{}") ?? {};
|
|
1445
|
+
} catch {
|
|
1446
|
+
i = {};
|
|
1447
|
+
}
|
|
1448
|
+
let a = /* @__PURE__ */ new Map(), o = () => {
|
|
1449
|
+
let t = e.tHead?.rows;
|
|
1450
|
+
return t && t.length > 0 ? Array.from(t[t.length - 1].cells) : [];
|
|
1451
|
+
}, s = (e, t) => e.dataset.column ?? String(t), c = (e) => (e.dataset.column ?? e.textContent ?? "").trim() || "column";
|
|
1452
|
+
o().forEach((e, t) => {
|
|
1453
|
+
Number(e.dataset.width) > 0 || a.set(s(e, t), Math.max(Ge, Math.round(e.getBoundingClientRect().width)));
|
|
1454
|
+
}), e.classList.add(t.table);
|
|
1455
|
+
let l = (e, t) => {
|
|
1456
|
+
if (i[e] > 0) return Math.max(Ge, i[e]);
|
|
1457
|
+
let n = Number(t.dataset.width);
|
|
1458
|
+
return n > 0 ? n : (a.has(e) || a.set(e, Je), a.get(e));
|
|
1459
|
+
}, u = () => {
|
|
1460
|
+
if (r) try {
|
|
1461
|
+
localStorage.setItem(r, JSON.stringify(i));
|
|
1462
|
+
} catch {}
|
|
1463
|
+
}, d = () => {
|
|
1464
|
+
let n = o(), r = n.findIndex((e) => e.dataset.fill !== void 0), i = r >= 0 ? r : n.length - 1, a = 0;
|
|
1465
|
+
n.forEach((e, n) => {
|
|
1466
|
+
let r = s(e, n);
|
|
1467
|
+
n === 0 && e.querySelector(`:scope > .${t.handle}[data-lead]`)?.remove();
|
|
1468
|
+
let o = l(r, e);
|
|
1469
|
+
a += o;
|
|
1470
|
+
let u = e.querySelector(`:scope > .${t.handle}:not([data-lead])`);
|
|
1471
|
+
if (n === i) {
|
|
1472
|
+
e.style.width = "", u?.remove(), e.nextElementSibling?.querySelector(`:scope > .${t.handle}[data-lead]`)?.remove();
|
|
1473
|
+
return;
|
|
1474
|
+
}
|
|
1475
|
+
e.style.width = `${o}px`;
|
|
1476
|
+
let d = u ?? g(e), f = e.nextElementSibling;
|
|
1477
|
+
f && ((f.querySelector(`:scope > .${t.handle}[data-lead]`) ?? _(f)).dataset.column = r), d.dataset.column = r, d.setAttribute("aria-label", `Resize ${c(e)}`), d.setAttribute("aria-valuenow", String(Math.round(o)));
|
|
1478
|
+
}), e.style.minWidth = `${a}px`;
|
|
1479
|
+
}, f = (e, t) => {
|
|
1480
|
+
i[e] = Math.max(Ge, Math.round(t)), d();
|
|
1481
|
+
}, p = (e) => {
|
|
1482
|
+
delete i[e], d(), u();
|
|
1483
|
+
}, m = (e) => e.hasAttribute("data-lead") ? e.parentElement.previousElementSibling : e.parentElement, h = (e) => e.hasAttribute("data-lead") ? m(e).querySelector(`:scope > .${t.handle}:not([data-lead])`) ?? e : e;
|
|
1484
|
+
function g(e) {
|
|
1485
|
+
let n = document.createElement("span");
|
|
1486
|
+
return n.className = t.handle, n.setAttribute("role", "separator"), n.setAttribute("aria-orientation", "vertical"), n.setAttribute("aria-valuemin", String(Ge)), n.tabIndex = 0, n.addEventListener("pointerdown", v), n.addEventListener("keydown", y), n.addEventListener("dblclick", () => p(n.dataset.column)), n.addEventListener("click", (e) => e.stopPropagation()), e.appendChild(n), n;
|
|
1487
|
+
}
|
|
1488
|
+
function _(e) {
|
|
1489
|
+
let n = document.createElement("span");
|
|
1490
|
+
return n.className = t.handle, n.setAttribute("data-lead", ""), n.setAttribute("aria-hidden", "true"), n.addEventListener("pointerdown", v), n.addEventListener("pointerenter", () => h(n).setAttribute("data-hot", "")), n.addEventListener("pointerleave", () => h(n).removeAttribute("data-hot")), n.addEventListener("dblclick", () => p(n.dataset.column)), n.addEventListener("click", (e) => e.stopPropagation()), e.appendChild(n), n;
|
|
1491
|
+
}
|
|
1492
|
+
function v(t) {
|
|
1493
|
+
if (t.button !== 0) return;
|
|
1494
|
+
let n = t.currentTarget;
|
|
1495
|
+
t.preventDefault(), t.stopPropagation(), n.setPointerCapture(t.pointerId), h(n).setAttribute("data-dragging", ""), e.setAttribute("data-resizing", "");
|
|
1496
|
+
let r = n.dataset.column, i = t.clientX, a = m(n).getBoundingClientRect().width, o = (e) => f(r, a + e.clientX - i), s = () => {
|
|
1497
|
+
h(n).removeAttribute("data-dragging"), e.removeAttribute("data-resizing"), n.removeEventListener("pointermove", o), n.removeEventListener("pointerup", s), n.removeEventListener("pointercancel", s), u();
|
|
1498
|
+
};
|
|
1499
|
+
n.addEventListener("pointermove", o), n.addEventListener("pointerup", s), n.addEventListener("pointercancel", s);
|
|
1500
|
+
}
|
|
1501
|
+
function y(e) {
|
|
1502
|
+
let t = e.currentTarget, n = t.dataset.column, r = m(t).getBoundingClientRect().width, i = e.shiftKey ? qe : Ke;
|
|
1503
|
+
if (e.key === "ArrowRight") f(n, r + i);
|
|
1504
|
+
else if (e.key === "ArrowLeft") f(n, r - i);
|
|
1505
|
+
else if (e.key === "Home") f(n, Ge);
|
|
1506
|
+
else if (e.key === "Delete" || e.key === "Backspace") {
|
|
1507
|
+
p(n), e.preventDefault();
|
|
1508
|
+
return;
|
|
1509
|
+
} else return;
|
|
1510
|
+
e.preventDefault(), u();
|
|
1511
|
+
}
|
|
1512
|
+
d();
|
|
1513
|
+
let b = (t) => t === e || t instanceof Element && t.closest("thead") !== null, x = new MutationObserver((e) => {
|
|
1514
|
+
e.some((e) => b(e.target) && (e.type === "childList" ? [...Array.from(e.addedNodes), ...Array.from(e.removedNodes)].some((e) => !(e instanceof HTMLElement && e.classList.contains(t.handle))) : e.attributeName !== "style" && !(e.target instanceof HTMLElement && e.target.classList.contains(t.handle)))) && d();
|
|
1515
|
+
});
|
|
1516
|
+
return x.observe(e, {
|
|
1517
|
+
childList: !0,
|
|
1518
|
+
subtree: !0,
|
|
1519
|
+
attributes: !0,
|
|
1520
|
+
attributeFilter: [
|
|
1521
|
+
"data-column",
|
|
1522
|
+
"data-width",
|
|
1523
|
+
"data-fill"
|
|
1524
|
+
]
|
|
1525
|
+
}), () => {
|
|
1526
|
+
x.disconnect(), e.classList.remove(t.table), e.style.minWidth = "", o().forEach((e) => {
|
|
1527
|
+
e.style.width = "", e.querySelectorAll(`:scope > .${t.handle}`).forEach((e) => e.remove());
|
|
1528
|
+
});
|
|
1529
|
+
};
|
|
1530
|
+
}
|
|
1266
1531
|
// src/components/Table/Table.tsx
|
|
1267
|
-
function
|
|
1268
|
-
let
|
|
1269
|
-
|
|
1532
|
+
function Xe({ children: e, caption: t, "aria-label": n, scrollable: r = !1, stickyFirstColumn: i = !1, bleedEnd: a, resizableColumns: s = !1, columnStorageKey: c }) {
|
|
1533
|
+
let l = d(null);
|
|
1534
|
+
o(() => {
|
|
1535
|
+
if (s && l.current) return Ye(l.current, {
|
|
1536
|
+
table: We.resizable,
|
|
1537
|
+
handle: We.columnHandle
|
|
1538
|
+
}, c);
|
|
1539
|
+
}, [s, c]);
|
|
1540
|
+
let u = /* @__PURE__ */ g("table", {
|
|
1541
|
+
ref: l,
|
|
1542
|
+
className: `${We.table} ${r && i ? We.stickyFirst : ""}`,
|
|
1270
1543
|
"aria-label": n,
|
|
1271
1544
|
children: [t && /* @__PURE__ */ h("caption", {
|
|
1272
|
-
className:
|
|
1545
|
+
className: We.caption,
|
|
1273
1546
|
children: t
|
|
1274
1547
|
}), e]
|
|
1275
1548
|
});
|
|
1276
1549
|
return r ? /* @__PURE__ */ h("div", {
|
|
1277
|
-
className: `${
|
|
1550
|
+
className: `${We.scroll} ${a === void 0 ? "" : We.bleedEnd}`,
|
|
1278
1551
|
style: a === void 0 ? void 0 : { "--table-bleed": typeof a == "number" ? `${a}px` : a },
|
|
1279
1552
|
role: "region",
|
|
1280
1553
|
"aria-label": n ?? t,
|
|
1281
1554
|
tabIndex: 0,
|
|
1282
|
-
children:
|
|
1283
|
-
}) :
|
|
1555
|
+
children: u
|
|
1556
|
+
}) : u;
|
|
1284
1557
|
}
|
|
1285
1558
|
// src/components/Table/TableHeader.tsx
|
|
1286
|
-
function
|
|
1559
|
+
function Ze({ children: t }) {
|
|
1287
1560
|
let n = e.Children.map(t, (t) => e.isValidElement(t) && t.type === "td" ? /* @__PURE__ */ h("th", {
|
|
1288
1561
|
scope: "col",
|
|
1289
1562
|
...t.props
|
|
1290
1563
|
}) : t);
|
|
1291
1564
|
return /* @__PURE__ */ h("thead", { children: /* @__PURE__ */ h("tr", {
|
|
1292
|
-
className:
|
|
1565
|
+
className: We.headerRow,
|
|
1293
1566
|
children: n
|
|
1294
1567
|
}) });
|
|
1295
1568
|
}
|
|
1296
1569
|
// src/components/Table/TableRow.tsx
|
|
1297
|
-
function
|
|
1570
|
+
function Qe({ children: e }) {
|
|
1298
1571
|
return /* @__PURE__ */ h("tr", {
|
|
1299
|
-
className:
|
|
1572
|
+
className: We.dataRow,
|
|
1300
1573
|
children: e
|
|
1301
1574
|
});
|
|
1302
1575
|
}
|
|
1303
1576
|
// src/components/Table/TableCell.tsx
|
|
1304
|
-
function
|
|
1577
|
+
function $e({ label: e, children: t, isHeader: n = !1, scope: r, colSpan: i }) {
|
|
1305
1578
|
let a = n ? "th" : "td", o = {
|
|
1306
1579
|
...n && r ? { scope: r } : {},
|
|
1307
1580
|
...i ? { colSpan: i } : {}
|
|
@@ -1309,12 +1582,12 @@ function Ve({ label: e, children: t, isHeader: n = !1, scope: r, colSpan: i }) {
|
|
|
1309
1582
|
return e || t ? /* @__PURE__ */ h(a, {
|
|
1310
1583
|
...o,
|
|
1311
1584
|
children: /* @__PURE__ */ g("div", {
|
|
1312
|
-
className:
|
|
1585
|
+
className: We.cellInner,
|
|
1313
1586
|
children: [e && /* @__PURE__ */ h("span", {
|
|
1314
|
-
className:
|
|
1587
|
+
className: We.cellLabel,
|
|
1315
1588
|
children: e
|
|
1316
1589
|
}), t && /* @__PURE__ */ h("div", {
|
|
1317
|
-
className:
|
|
1590
|
+
className: We.cellContent,
|
|
1318
1591
|
children: t
|
|
1319
1592
|
})]
|
|
1320
1593
|
})
|
|
@@ -1324,17 +1597,17 @@ function Ve({ label: e, children: t, isHeader: n = !1, scope: r, colSpan: i }) {
|
|
|
1324
1597
|
});
|
|
1325
1598
|
}
|
|
1326
1599
|
// src/components/Table/TableValue.tsx
|
|
1327
|
-
function
|
|
1600
|
+
function et({ children: e }) {
|
|
1328
1601
|
return /* @__PURE__ */ h("span", {
|
|
1329
|
-
className:
|
|
1602
|
+
className: We.value,
|
|
1330
1603
|
children: e
|
|
1331
1604
|
});
|
|
1332
1605
|
}
|
|
1333
1606
|
// src/components/Table/TableIcon.tsx
|
|
1334
|
-
function
|
|
1607
|
+
function tt({ children: t, "aria-label": n }) {
|
|
1335
1608
|
let r = !n;
|
|
1336
1609
|
return /* @__PURE__ */ h("span", {
|
|
1337
|
-
className:
|
|
1610
|
+
className: We.icon,
|
|
1338
1611
|
"aria-hidden": r ? "true" : void 0,
|
|
1339
1612
|
"aria-label": n,
|
|
1340
1613
|
children: e.cloneElement(t, {
|
|
@@ -1343,7 +1616,7 @@ function Ue({ children: t, "aria-label": n }) {
|
|
|
1343
1616
|
})
|
|
1344
1617
|
});
|
|
1345
1618
|
}
|
|
1346
|
-
var
|
|
1619
|
+
var nt = {
|
|
1347
1620
|
tabs: "_tabs_q9gjb_1",
|
|
1348
1621
|
scrollable: "_scrollable_q9gjb_16",
|
|
1349
1622
|
tab: "_tab_q9gjb_1",
|
|
@@ -1358,23 +1631,23 @@ var We = {
|
|
|
1358
1631
|
bleed: "_bleed_q9gjb_149"
|
|
1359
1632
|
};
|
|
1360
1633
|
// src/components/Tabs/Tabs.tsx
|
|
1361
|
-
function
|
|
1634
|
+
function rt(e, t) {
|
|
1362
1635
|
if (!e || !t) return;
|
|
1363
1636
|
let n = parseFloat(getComputedStyle(e).paddingInlineStart) || 32, r = e.getBoundingClientRect(), i = t.getBoundingClientRect();
|
|
1364
1637
|
i.left < r.left + n ? e.scrollLeft -= r.left + n - i.left : i.right > r.right - n && (e.scrollLeft += i.right - (r.right - n));
|
|
1365
1638
|
}
|
|
1366
|
-
var
|
|
1639
|
+
var it = {
|
|
1367
1640
|
micro: 14,
|
|
1368
1641
|
default: 14,
|
|
1369
1642
|
large: 21
|
|
1370
1643
|
};
|
|
1371
|
-
function
|
|
1644
|
+
function at({ items: e, value: n, onValueChange: i, size: a = "default", variant: c = "underline", scrollable: l = !1, bleed: u, getPanelId: f, "aria-label": p, renderLink: _ }) {
|
|
1372
1645
|
let v = d(null), y = d(/* @__PURE__ */ new Map()), b = s(), x = Math.max(e.findIndex((e) => e.value === n), 0), S = e.some((e) => e.href !== void 0), C = (t) => {
|
|
1373
1646
|
let n = e[t];
|
|
1374
1647
|
if (!n) return;
|
|
1375
1648
|
i(n.value);
|
|
1376
1649
|
let r = y.current.get(n.value);
|
|
1377
|
-
r?.focus({ preventScroll: !0 }), l &&
|
|
1650
|
+
r?.focus({ preventScroll: !0 }), l && rt(v.current, r);
|
|
1378
1651
|
}, w = (t, n) => {
|
|
1379
1652
|
for (let r = 1; r <= e.length; r++) {
|
|
1380
1653
|
let i = (t + n * r + e.length * r) % e.length;
|
|
@@ -1421,27 +1694,27 @@ function qe({ items: e, value: n, onValueChange: i, size: a = "default", variant
|
|
|
1421
1694
|
u,
|
|
1422
1695
|
e.length
|
|
1423
1696
|
]), o(() => {
|
|
1424
|
-
l &&
|
|
1697
|
+
l && rt(v.current, y.current.get(n));
|
|
1425
1698
|
}, [l, n]), /* @__PURE__ */ h("div", {
|
|
1426
1699
|
ref: v,
|
|
1427
|
-
className: `${
|
|
1700
|
+
className: `${nt.tabs} ${c === "button" ? nt.buttonVariant : ""} ${l ? nt.scrollable : ""} ${l && u !== void 0 ? nt.bleed : ""}`,
|
|
1428
1701
|
style: l && u !== void 0 ? { "--tabs-bleed": typeof u == "number" ? `${u}px` : u } : void 0,
|
|
1429
1702
|
role: S ? "navigation" : "tablist",
|
|
1430
1703
|
"aria-label": p,
|
|
1431
1704
|
children: e.map((e, n) => {
|
|
1432
1705
|
let o = n === x, s = /* @__PURE__ */ g(m, { children: [
|
|
1433
1706
|
e.icon ? /* @__PURE__ */ h("span", {
|
|
1434
|
-
className:
|
|
1707
|
+
className: nt.icon,
|
|
1435
1708
|
"aria-hidden": "true",
|
|
1436
|
-
children: r(e.icon) && e.icon.props.size === void 0 ? t(e.icon, { size:
|
|
1709
|
+
children: r(e.icon) && e.icon.props.size === void 0 ? t(e.icon, { size: it[a] }) : e.icon
|
|
1437
1710
|
}) : null,
|
|
1438
1711
|
e.label,
|
|
1439
1712
|
e.badge != null && e.badge !== !1 ? /* @__PURE__ */ h("span", {
|
|
1440
|
-
className: e.badgeTone === "info" ? `${
|
|
1713
|
+
className: e.badgeTone === "info" ? `${nt.badge} ${nt.badgeInfo}` : nt.badge,
|
|
1441
1714
|
title: e.badgeTitle,
|
|
1442
1715
|
children: e.badge
|
|
1443
1716
|
}) : null
|
|
1444
|
-
] }), c = `${
|
|
1717
|
+
] }), c = `${nt.tab} ${nt[a]} ${o ? nt.active : ""}`;
|
|
1445
1718
|
if (e.href !== void 0) {
|
|
1446
1719
|
let t = {
|
|
1447
1720
|
id: `${b}-tab-${e.value}`,
|
|
@@ -1483,7 +1756,7 @@ function qe({ items: e, value: n, onValueChange: i, size: a = "default", variant
|
|
|
1483
1756
|
})
|
|
1484
1757
|
});
|
|
1485
1758
|
}
|
|
1486
|
-
var
|
|
1759
|
+
var ot = {
|
|
1487
1760
|
control: "_control_8m56y_4",
|
|
1488
1761
|
stretch: "_stretch_8m56y_13",
|
|
1489
1762
|
cell: "_cell_8m56y_17",
|
|
@@ -1497,7 +1770,7 @@ var Je = {
|
|
|
1497
1770
|
default: "_default_8m56y_96"
|
|
1498
1771
|
};
|
|
1499
1772
|
// src/components/SegmentedControl/SegmentedControl.tsx
|
|
1500
|
-
function
|
|
1773
|
+
function st({ items: e, value: t, onChange: n, size: r = "micro", stretch: i = !1, disabled: a = !1, "aria-label": o, className: s = "" }) {
|
|
1501
1774
|
let c = d([]), l = (t, r) => {
|
|
1502
1775
|
let i = t.key === "ArrowRight" || t.key === "ArrowDown" ? 1 : t.key === "ArrowLeft" || t.key === "ArrowUp" ? -1 : 0, a = -1;
|
|
1503
1776
|
if (i) for (let t = 1; t <= e.length; t++) {
|
|
@@ -1511,7 +1784,7 @@ function Ye({ items: e, value: t, onChange: n, size: r = "micro", stretch: i = !
|
|
|
1511
1784
|
a < 0 || a === r || (t.preventDefault(), c.current[a]?.focus(), n(e[a].value));
|
|
1512
1785
|
};
|
|
1513
1786
|
return /* @__PURE__ */ h("div", {
|
|
1514
|
-
className: `${
|
|
1787
|
+
className: `${ot.control} ${ot[r]} ${i ? ot.stretch : ""} ${a ? ot.disabled : ""} ${s}`,
|
|
1515
1788
|
role: "radiogroup",
|
|
1516
1789
|
"aria-label": o,
|
|
1517
1790
|
children: e.map((e, r) => {
|
|
@@ -1524,20 +1797,20 @@ function Ye({ items: e, value: t, onChange: n, size: r = "micro", stretch: i = !
|
|
|
1524
1797
|
role: "radio",
|
|
1525
1798
|
"aria-checked": i,
|
|
1526
1799
|
"aria-label": e["aria-label"],
|
|
1527
|
-
className: `${
|
|
1800
|
+
className: `${ot.cell} ${i ? ot.active : ""} ${e.icon && !e.label ? ot.iconOnly : ""}`,
|
|
1528
1801
|
tabIndex: i ? 0 : -1,
|
|
1529
1802
|
disabled: o,
|
|
1530
1803
|
onClick: () => !o && n(e.value),
|
|
1531
1804
|
onKeyDown: (e) => l(e, r),
|
|
1532
1805
|
children: [
|
|
1533
1806
|
e.icon && /* @__PURE__ */ h("span", {
|
|
1534
|
-
className:
|
|
1807
|
+
className: ot.icon,
|
|
1535
1808
|
"aria-hidden": "true",
|
|
1536
1809
|
children: e.icon
|
|
1537
1810
|
}),
|
|
1538
1811
|
e.label,
|
|
1539
1812
|
e.badge != null && e.badge !== !1 && /* @__PURE__ */ h("span", {
|
|
1540
|
-
className: e.badgeTone === "info" ? `${
|
|
1813
|
+
className: e.badgeTone === "info" ? `${ot.badge} ${ot.badgeInfo}` : ot.badge,
|
|
1541
1814
|
children: e.badge
|
|
1542
1815
|
})
|
|
1543
1816
|
]
|
|
@@ -1564,13 +1837,13 @@ var K = {
|
|
|
1564
1837
|
truncate: "_truncate_wrjxq_32"
|
|
1565
1838
|
};
|
|
1566
1839
|
// src/components/Breadcrumbs/Breadcrumbs.tsx
|
|
1567
|
-
function
|
|
1840
|
+
function ct(t) {
|
|
1568
1841
|
return e.isValidElement(t) ? e.cloneElement(t, {
|
|
1569
1842
|
size: "14px",
|
|
1570
1843
|
color: "currentColor"
|
|
1571
1844
|
}) : t;
|
|
1572
1845
|
}
|
|
1573
|
-
var
|
|
1846
|
+
var lt = "\0action", ut = ({ items: e, size: t = "default", overflow: n = "wrap", className: r = "", separator: i = /* @__PURE__ */ h(C, {
|
|
1574
1847
|
size: 14,
|
|
1575
1848
|
color: "currentColor"
|
|
1576
1849
|
}), renderLink: a, "aria-label": o = "Breadcrumb" }) => {
|
|
@@ -1598,7 +1871,7 @@ var Ze = "\0action", Qe = ({ items: e, size: t = "default", overflow: n = "wrap"
|
|
|
1598
1871
|
children: /* @__PURE__ */ g(m, { children: [t.icon && /* @__PURE__ */ h("span", {
|
|
1599
1872
|
className: K.icon,
|
|
1600
1873
|
"aria-hidden": "true",
|
|
1601
|
-
children:
|
|
1874
|
+
children: ct(t.icon)
|
|
1602
1875
|
}), /* @__PURE__ */ h("span", {
|
|
1603
1876
|
className: K.text,
|
|
1604
1877
|
children: t.label
|
|
@@ -1612,14 +1885,14 @@ var Ze = "\0action", Qe = ({ items: e, size: t = "default", overflow: n = "wrap"
|
|
|
1612
1885
|
children: [t.icon && /* @__PURE__ */ h("span", {
|
|
1613
1886
|
className: K.icon,
|
|
1614
1887
|
"aria-hidden": "true",
|
|
1615
|
-
children:
|
|
1888
|
+
children: ct(t.icon)
|
|
1616
1889
|
}), /* @__PURE__ */ h("span", {
|
|
1617
1890
|
className: K.text,
|
|
1618
1891
|
children: t.label
|
|
1619
1892
|
})]
|
|
1620
1893
|
}), t.switcher && /* @__PURE__ */ g(L.Root, {
|
|
1621
1894
|
value: t.switcher.value,
|
|
1622
|
-
onValueChange: (e) => e ===
|
|
1895
|
+
onValueChange: (e) => e === lt ? t.switcher.action?.onSelect() : t.switcher.onValueChange(e),
|
|
1623
1896
|
disabled: t.switcher.disabled || t.switcher.options.length === 0 && !t.switcher.action,
|
|
1624
1897
|
children: [/* @__PURE__ */ h(L.Trigger, {
|
|
1625
1898
|
className: K.trigger,
|
|
@@ -1635,16 +1908,16 @@ var Ze = "\0action", Qe = ({ items: e, size: t = "default", overflow: n = "wrap"
|
|
|
1635
1908
|
}), /* @__PURE__ */ h(L.Portal, {
|
|
1636
1909
|
container: s,
|
|
1637
1910
|
children: /* @__PURE__ */ h(L.Content, {
|
|
1638
|
-
className: `${
|
|
1911
|
+
className: `${Re.content} ${K.menu}`,
|
|
1639
1912
|
position: "popper",
|
|
1640
1913
|
align: "end",
|
|
1641
1914
|
sideOffset: 4,
|
|
1642
1915
|
collisionPadding: 8,
|
|
1643
1916
|
children: /* @__PURE__ */ g(L.Viewport, {
|
|
1644
|
-
className:
|
|
1917
|
+
className: Re.viewport,
|
|
1645
1918
|
children: [t.switcher.options.map((e) => /* @__PURE__ */ g(L.Item, {
|
|
1646
1919
|
value: e.value,
|
|
1647
|
-
className:
|
|
1920
|
+
className: Re.item,
|
|
1648
1921
|
textValue: e.label,
|
|
1649
1922
|
children: [/* @__PURE__ */ g("span", {
|
|
1650
1923
|
className: K.option,
|
|
@@ -1654,15 +1927,15 @@ var Ze = "\0action", Qe = ({ items: e, size: t = "default", overflow: n = "wrap"
|
|
|
1654
1927
|
children: e.icon
|
|
1655
1928
|
}), /* @__PURE__ */ h(L.ItemText, { children: e.label })]
|
|
1656
1929
|
}), /* @__PURE__ */ h(L.ItemIndicator, {
|
|
1657
|
-
className:
|
|
1930
|
+
className: Re.itemIndicator,
|
|
1658
1931
|
children: /* @__PURE__ */ h(b, {
|
|
1659
1932
|
size: 14,
|
|
1660
1933
|
color: "currentColor"
|
|
1661
1934
|
})
|
|
1662
1935
|
})]
|
|
1663
1936
|
}, e.value)), t.switcher.action && /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(L.Separator, { className: K.menuDivider }), /* @__PURE__ */ h(L.Item, {
|
|
1664
|
-
value:
|
|
1665
|
-
className:
|
|
1937
|
+
value: lt,
|
|
1938
|
+
className: Re.item,
|
|
1666
1939
|
textValue: t.switcher.action.label,
|
|
1667
1940
|
children: /* @__PURE__ */ g("span", {
|
|
1668
1941
|
className: K.option,
|
|
@@ -1684,32 +1957,32 @@ var Ze = "\0action", Qe = ({ items: e, size: t = "default", overflow: n = "wrap"
|
|
|
1684
1957
|
}, t.id))
|
|
1685
1958
|
})
|
|
1686
1959
|
});
|
|
1687
|
-
},
|
|
1688
|
-
wrapper: "
|
|
1689
|
-
track: "
|
|
1690
|
-
fill: "
|
|
1691
|
-
label: "
|
|
1960
|
+
}, dt = {
|
|
1961
|
+
wrapper: "_wrapper_1ons8_1",
|
|
1962
|
+
track: "_track_1ons8_8",
|
|
1963
|
+
fill: "_fill_1ons8_39",
|
|
1964
|
+
label: "_label_1ons8_49"
|
|
1692
1965
|
};
|
|
1693
1966
|
// src/components/ProgressBar/ProgressBar.tsx
|
|
1694
|
-
function
|
|
1967
|
+
function ft({ value: e, showLabel: t = !1, fulfilledColor: n = !1, className: r = "" }) {
|
|
1695
1968
|
let i = Math.min(100, Math.max(0, e)), a = `${Math.round(i)}%`, o = n && i >= 100 ? "var(--CPureBlue)" : void 0;
|
|
1696
1969
|
return /* @__PURE__ */ g("div", {
|
|
1697
|
-
className: `${
|
|
1970
|
+
className: `${dt.wrapper} ${r}`,
|
|
1698
1971
|
role: "progressbar",
|
|
1699
1972
|
"aria-valuenow": i,
|
|
1700
1973
|
"aria-valuemin": 0,
|
|
1701
1974
|
"aria-valuemax": 100,
|
|
1702
1975
|
children: [/* @__PURE__ */ h("div", {
|
|
1703
|
-
className:
|
|
1976
|
+
className: dt.track,
|
|
1704
1977
|
children: /* @__PURE__ */ h("div", {
|
|
1705
|
-
className:
|
|
1978
|
+
className: dt.fill,
|
|
1706
1979
|
style: {
|
|
1707
1980
|
width: `${i}%`,
|
|
1708
1981
|
backgroundColor: o
|
|
1709
1982
|
}
|
|
1710
1983
|
})
|
|
1711
1984
|
}), t && /* @__PURE__ */ h("span", {
|
|
1712
|
-
className:
|
|
1985
|
+
className: dt.label,
|
|
1713
1986
|
"aria-hidden": "true",
|
|
1714
1987
|
children: a
|
|
1715
1988
|
})]
|
|
@@ -1744,14 +2017,14 @@ var q = {
|
|
|
1744
2017
|
dim: "_dim_1ywpg_203",
|
|
1745
2018
|
zoneBar: "_zoneBar_1ywpg_208",
|
|
1746
2019
|
centre: "_centre_1ywpg_212"
|
|
1747
|
-
},
|
|
2020
|
+
}, pt = (e, t) => e?.filter((e) => t >= e.from).sort((e, t) => t.from - e.from)[0]?.color, mt = (e, t, n) => e?.find((e) => e.from > 0 && Math.round(e.from * n) === t), ht = [
|
|
1748
2021
|
"var(--lv8)",
|
|
1749
2022
|
"var(--lv5)",
|
|
1750
2023
|
"var(--lv4)",
|
|
1751
2024
|
"var(--lv3)"
|
|
1752
|
-
],
|
|
1753
|
-
function
|
|
1754
|
-
let f = n > 0 ? Math.min(1, Math.max(0, t / n)) : 0, p = s ??
|
|
2025
|
+
], gt = (e) => ht[Math.min(e, ht.length - 1)], _t = .08, vt = 4, yt = 96, bt = (e) => e < 72 ? 6 : 14;
|
|
2026
|
+
function xt({ label: e, value: t = 0, max: n = 100, segments: r, labels: i = "heads", format: a, maxLabel: o, color: s, zones: c, shape: l = "bar", size: u = 72, className: d = "" }) {
|
|
2027
|
+
let f = n > 0 ? Math.min(1, Math.max(0, t / n)) : 0, p = s ?? pt(c, f), _ = (e) => a ? a(e) : e.toLocaleString(), v = o ?? /* @__PURE__ */ g(m, { children: ["of ", _(n)] });
|
|
1755
2028
|
if (r && l !== "ring") {
|
|
1756
2029
|
let t = r.reduce((e, t) => e + Math.max(0, t.value), 0), n = (e) => a ? a(e.value) : `${Math.round((t > 0 ? e.value / t : 0) * 100)} %`, o = 0, s = r.map((e, n) => {
|
|
1757
2030
|
let i = o, a = t > 0 ? Math.max(0, e.value) / t : 0;
|
|
@@ -1761,7 +2034,7 @@ function lt({ label: e, value: t = 0, max: n = 100, segments: r, labels: i = "he
|
|
|
1761
2034
|
from: i,
|
|
1762
2035
|
to: n === r.length - 1 ? 1 : o,
|
|
1763
2036
|
share: a,
|
|
1764
|
-
color: e.color ??
|
|
2037
|
+
color: e.color ?? gt(n)
|
|
1765
2038
|
};
|
|
1766
2039
|
});
|
|
1767
2040
|
return /* @__PURE__ */ g("div", {
|
|
@@ -1776,7 +2049,7 @@ function lt({ label: e, value: t = 0, max: n = 100, segments: r, labels: i = "he
|
|
|
1776
2049
|
/* @__PURE__ */ g("div", {
|
|
1777
2050
|
className: `${q.shares} ${i === "legend" ? q.sharesLegend : ""}`,
|
|
1778
2051
|
children: [
|
|
1779
|
-
i === "heads" && s.map(({ g: e, i: t, from: r, to: i, share: a }) => (a >=
|
|
2052
|
+
i === "heads" && s.map(({ g: e, i: t, from: r, to: i, share: a }) => (a >= _t || t === s.length - 1) && /* @__PURE__ */ g("div", {
|
|
1780
2053
|
className: `${q.head} ${t === s.length - 1 ? q.headLast : ""}`,
|
|
1781
2054
|
style: {
|
|
1782
2055
|
"--seg-from": `${r * 100}%`,
|
|
@@ -1843,7 +2116,7 @@ function lt({ label: e, value: t = 0, max: n = 100, segments: r, labels: i = "he
|
|
|
1843
2116
|
},
|
|
1844
2117
|
children: [/* @__PURE__ */ g("div", {
|
|
1845
2118
|
className: q.dial,
|
|
1846
|
-
children: [/* @__PURE__ */ h(
|
|
2119
|
+
children: [/* @__PURE__ */ h(St, {
|
|
1847
2120
|
fraction: f,
|
|
1848
2121
|
size: u,
|
|
1849
2122
|
zones: c
|
|
@@ -1853,7 +2126,7 @@ function lt({ label: e, value: t = 0, max: n = 100, segments: r, labels: i = "he
|
|
|
1853
2126
|
children: [/* @__PURE__ */ h("span", {
|
|
1854
2127
|
className: q.value,
|
|
1855
2128
|
children: _(t)
|
|
1856
|
-
}), u >=
|
|
2129
|
+
}), u >= yt && /* @__PURE__ */ h("span", {
|
|
1857
2130
|
className: q.max,
|
|
1858
2131
|
children: v
|
|
1859
2132
|
})]
|
|
@@ -1904,10 +2177,10 @@ function lt({ label: e, value: t = 0, max: n = 100, segments: r, labels: i = "he
|
|
|
1904
2177
|
]
|
|
1905
2178
|
});
|
|
1906
2179
|
}
|
|
1907
|
-
function
|
|
1908
|
-
let r = t / 2, i = Math.max(0, r -
|
|
2180
|
+
function St({ fraction: e, size: t, zones: n }) {
|
|
2181
|
+
let r = t / 2, i = Math.max(0, r - bt(t)), a = (r + i) / 2, o = Math.max(4, Math.round(2 * Math.PI * a / vt)), s = Math.round(e * o), c = [];
|
|
1909
2182
|
for (let e = 0; e < o; e++) {
|
|
1910
|
-
let t = (-90 + 360 * e / o) * (Math.PI / 180), a = Math.cos(t), l = Math.sin(t), u =
|
|
2183
|
+
let t = (-90 + 360 * e / o) * (Math.PI / 180), a = Math.cos(t), l = Math.sin(t), u = mt(n, e, o);
|
|
1911
2184
|
c.push(/* @__PURE__ */ h("line", {
|
|
1912
2185
|
className: u ? q.zoneBar : e < s ? q.lit : q.dim,
|
|
1913
2186
|
style: u ? { stroke: u.color } : void 0,
|
|
@@ -1926,7 +2199,7 @@ function ut({ fraction: e, size: t, zones: n }) {
|
|
|
1926
2199
|
children: c
|
|
1927
2200
|
});
|
|
1928
2201
|
}
|
|
1929
|
-
var
|
|
2202
|
+
var Ct = {
|
|
1930
2203
|
waffle: "_waffle_1c9lc_1",
|
|
1931
2204
|
grid: "_grid_1c9lc_10",
|
|
1932
2205
|
gridWrap: "_gridWrap_1c9lc_20",
|
|
@@ -1940,13 +2213,13 @@ var dt = {
|
|
|
1940
2213
|
icon: "_icon_1c9lc_78",
|
|
1941
2214
|
name: "_name_1c9lc_83",
|
|
1942
2215
|
share: "_share_1c9lc_87"
|
|
1943
|
-
},
|
|
2216
|
+
}, wt = [
|
|
1944
2217
|
"var(--lv8)",
|
|
1945
2218
|
"var(--lv5)",
|
|
1946
2219
|
"var(--lv4)",
|
|
1947
2220
|
"var(--lv3)"
|
|
1948
2221
|
];
|
|
1949
|
-
function
|
|
2222
|
+
function Tt(e, t) {
|
|
1950
2223
|
let n = e.reduce((e, t) => e + Math.max(0, t), 0);
|
|
1951
2224
|
if (n <= 0) return e.map(() => 0);
|
|
1952
2225
|
let r = e.map((e) => Math.max(0, e) / n * t), i = r.map(Math.floor), a = t - i.reduce((e, t) => e + t, 0), o = r.map((e, t) => ({
|
|
@@ -1963,8 +2236,8 @@ function pt(e, t) {
|
|
|
1963
2236
|
}
|
|
1964
2237
|
return i;
|
|
1965
2238
|
}
|
|
1966
|
-
function
|
|
1967
|
-
let c = t * n, [l, u] = f(null), d = e.reduce((e, t) => e + Math.max(0, t.value), 0), p =
|
|
2239
|
+
function Et({ segments: e, columns: t = 20, rows: n = 5, cell: r = 4, format: i, legend: a = !0, "aria-label": o, className: s = "" }) {
|
|
2240
|
+
let c = t * n, [l, u] = f(null), d = e.reduce((e, t) => e + Math.max(0, t.value), 0), p = Tt(e.map((e) => e.value), c), m = (t) => e[t].color ?? wt[Math.min(t, wt.length - 1)], _ = (e) => {
|
|
1968
2241
|
let t = d > 0 ? Math.max(0, e.value) / d : 0;
|
|
1969
2242
|
return i ? i(t, e.value) : `${Math.round(t * 100)} %`;
|
|
1970
2243
|
}, v = [], y = 0, b = 0;
|
|
@@ -1974,7 +2247,7 @@ function mt({ segments: e, columns: t = 20, rows: n = 5, cell: r = 4, format: i,
|
|
|
1974
2247
|
b += 1;
|
|
1975
2248
|
let n = y < p.length ? y : -1;
|
|
1976
2249
|
v.push(/* @__PURE__ */ h("span", {
|
|
1977
|
-
className: `${
|
|
2250
|
+
className: `${Ct.cell} ${l && l.segment !== n ? Ct.dim : ""}`,
|
|
1978
2251
|
style: t ? { background: t } : void 0,
|
|
1979
2252
|
onMouseEnter: () => u(n >= 0 ? {
|
|
1980
2253
|
segment: n,
|
|
@@ -1985,34 +2258,34 @@ function mt({ segments: e, columns: t = 20, rows: n = 5, cell: r = 4, format: i,
|
|
|
1985
2258
|
let x = r + 2, S = l && l.cell != null && l.segment < e.length ? (() => {
|
|
1986
2259
|
let i = Math.floor(l.cell / n), a = l.cell % n, o = i > t / 2, s = e[l.segment];
|
|
1987
2260
|
return /* @__PURE__ */ g("div", {
|
|
1988
|
-
className: `${
|
|
2261
|
+
className: `${Ct.tooltip} ${o ? Ct.tooltipLeft : ""}`,
|
|
1989
2262
|
style: {
|
|
1990
2263
|
top: a * x + r / 2,
|
|
1991
2264
|
left: o ? i * x - 6 : i * x + r + 6
|
|
1992
2265
|
},
|
|
1993
2266
|
children: [
|
|
1994
2267
|
s.icon != null && /* @__PURE__ */ h("span", {
|
|
1995
|
-
className:
|
|
2268
|
+
className: Ct.icon,
|
|
1996
2269
|
children: s.icon
|
|
1997
2270
|
}),
|
|
1998
2271
|
/* @__PURE__ */ h("span", {
|
|
1999
|
-
className:
|
|
2272
|
+
className: Ct.name,
|
|
2000
2273
|
children: s.label
|
|
2001
2274
|
}),
|
|
2002
2275
|
/* @__PURE__ */ h("span", {
|
|
2003
|
-
className:
|
|
2276
|
+
className: Ct.share,
|
|
2004
2277
|
children: _(s)
|
|
2005
2278
|
})
|
|
2006
2279
|
]
|
|
2007
2280
|
});
|
|
2008
2281
|
})() : null;
|
|
2009
2282
|
return /* @__PURE__ */ g("div", {
|
|
2010
|
-
className: `${
|
|
2283
|
+
className: `${Ct.waffle} ${s}`,
|
|
2011
2284
|
children: [/* @__PURE__ */ g("div", {
|
|
2012
|
-
className:
|
|
2285
|
+
className: Ct.gridWrap,
|
|
2013
2286
|
onMouseLeave: () => u(null),
|
|
2014
2287
|
children: [/* @__PURE__ */ h("div", {
|
|
2015
|
-
className:
|
|
2288
|
+
className: Ct.grid,
|
|
2016
2289
|
role: "img",
|
|
2017
2290
|
"aria-label": o,
|
|
2018
2291
|
style: {
|
|
@@ -2022,10 +2295,10 @@ function mt({ segments: e, columns: t = 20, rows: n = 5, cell: r = 4, format: i,
|
|
|
2022
2295
|
children: v
|
|
2023
2296
|
}), S]
|
|
2024
2297
|
}), a && /* @__PURE__ */ h("ul", {
|
|
2025
|
-
className:
|
|
2298
|
+
className: Ct.legend,
|
|
2026
2299
|
"aria-hidden": !o || void 0,
|
|
2027
2300
|
children: e.map((e, t) => /* @__PURE__ */ g("li", {
|
|
2028
|
-
className:
|
|
2301
|
+
className: Ct.item,
|
|
2029
2302
|
onMouseEnter: () => u({
|
|
2030
2303
|
segment: t,
|
|
2031
2304
|
cell: null
|
|
@@ -2033,19 +2306,19 @@ function mt({ segments: e, columns: t = 20, rows: n = 5, cell: r = 4, format: i,
|
|
|
2033
2306
|
onMouseLeave: () => u(null),
|
|
2034
2307
|
children: [
|
|
2035
2308
|
/* @__PURE__ */ h("span", {
|
|
2036
|
-
className:
|
|
2309
|
+
className: Ct.swatch,
|
|
2037
2310
|
style: { background: m(t) }
|
|
2038
2311
|
}),
|
|
2039
2312
|
e.icon != null && /* @__PURE__ */ h("span", {
|
|
2040
|
-
className:
|
|
2313
|
+
className: Ct.icon,
|
|
2041
2314
|
children: e.icon
|
|
2042
2315
|
}),
|
|
2043
2316
|
/* @__PURE__ */ h("span", {
|
|
2044
|
-
className:
|
|
2317
|
+
className: Ct.name,
|
|
2045
2318
|
children: e.label
|
|
2046
2319
|
}),
|
|
2047
2320
|
/* @__PURE__ */ h("span", {
|
|
2048
|
-
className:
|
|
2321
|
+
className: Ct.share,
|
|
2049
2322
|
children: _(e)
|
|
2050
2323
|
})
|
|
2051
2324
|
]
|
|
@@ -2053,7 +2326,7 @@ function mt({ segments: e, columns: t = 20, rows: n = 5, cell: r = 4, format: i,
|
|
|
2053
2326
|
})]
|
|
2054
2327
|
});
|
|
2055
2328
|
}
|
|
2056
|
-
var
|
|
2329
|
+
var Dt = {
|
|
2057
2330
|
heatmap: "_heatmap_1poh8_1",
|
|
2058
2331
|
gridWrap: "_gridWrap_1poh8_12",
|
|
2059
2332
|
withRows: "_withRows_1poh8_17",
|
|
@@ -2067,34 +2340,34 @@ var ht = {
|
|
|
2067
2340
|
columnLabel: "_columnLabel_1poh8_65",
|
|
2068
2341
|
rowLabels: "_rowLabels_1poh8_77",
|
|
2069
2342
|
rowLabel: "_rowLabel_1poh8_77"
|
|
2070
|
-
},
|
|
2343
|
+
}, Ot = [
|
|
2071
2344
|
"var(--lv3)",
|
|
2072
2345
|
"var(--lv4)",
|
|
2073
2346
|
"var(--lv5)",
|
|
2074
2347
|
"var(--lv8)"
|
|
2075
2348
|
];
|
|
2076
|
-
function
|
|
2077
|
-
return e <= 0 || t <= 0 ? 0 : Math.min(
|
|
2349
|
+
function kt(e, t) {
|
|
2350
|
+
return e <= 0 || t <= 0 ? 0 : Math.min(Ot.length, Math.max(1, Math.ceil(e / t * Ot.length)));
|
|
2078
2351
|
}
|
|
2079
|
-
function
|
|
2352
|
+
function At({ values: e, rows: t = 7, max: n, columnLabels: r, rowLabels: i, cell: a = 6, format: o, "aria-label": s, className: c = "" }) {
|
|
2080
2353
|
let l = n ?? e.reduce((e, t) => t != null && t > e ? t : e, 0), u = Math.ceil(e.length / t), d = a + 2, [p, m] = f(null), _ = [];
|
|
2081
2354
|
for (let n = 0; n < u * t; n++) {
|
|
2082
2355
|
let t = n < e.length ? e[n] : null;
|
|
2083
2356
|
if (t == null) {
|
|
2084
|
-
_.push(/* @__PURE__ */ h("span", { className:
|
|
2357
|
+
_.push(/* @__PURE__ */ h("span", { className: Dt.gap }, n));
|
|
2085
2358
|
continue;
|
|
2086
2359
|
}
|
|
2087
|
-
let r =
|
|
2360
|
+
let r = kt(t, l);
|
|
2088
2361
|
_.push(/* @__PURE__ */ h("span", {
|
|
2089
|
-
className: `${
|
|
2090
|
-
style: r ? { background:
|
|
2362
|
+
className: `${Dt.cell} ${p === n ? Dt.hovered : ""}`,
|
|
2363
|
+
style: r ? { background: Ot[r - 1] } : void 0,
|
|
2091
2364
|
onMouseEnter: o ? () => m(n) : void 0
|
|
2092
2365
|
}, n));
|
|
2093
2366
|
}
|
|
2094
2367
|
let v = p != null && o && e[p] != null ? (() => {
|
|
2095
2368
|
let n = Math.floor(p / t), r = p % t, i = n > u / 2;
|
|
2096
2369
|
return /* @__PURE__ */ h("div", {
|
|
2097
|
-
className: `${
|
|
2370
|
+
className: `${Dt.tooltip} ${i ? Dt.tooltipLeft : ""}`,
|
|
2098
2371
|
style: {
|
|
2099
2372
|
top: r * d + a / 2,
|
|
2100
2373
|
left: i ? n * d - 6 : n * d + a + 6
|
|
@@ -2103,7 +2376,7 @@ function vt({ values: e, rows: t = 7, max: n, columnLabels: r, rowLabels: i, cel
|
|
|
2103
2376
|
});
|
|
2104
2377
|
})() : null;
|
|
2105
2378
|
return /* @__PURE__ */ g("div", {
|
|
2106
|
-
className: `${
|
|
2379
|
+
className: `${Dt.heatmap} ${i ? Dt.withRows : ""} ${c}`,
|
|
2107
2380
|
style: {
|
|
2108
2381
|
"--heatmap-rows": t,
|
|
2109
2382
|
"--heatmap-cell": `${a}px`,
|
|
@@ -2111,29 +2384,29 @@ function vt({ values: e, rows: t = 7, max: n, columnLabels: r, rowLabels: i, cel
|
|
|
2111
2384
|
},
|
|
2112
2385
|
children: [
|
|
2113
2386
|
i && /* @__PURE__ */ h("div", {
|
|
2114
|
-
className:
|
|
2387
|
+
className: Dt.rowLabels,
|
|
2115
2388
|
"aria-hidden": "true",
|
|
2116
2389
|
children: i.map((e) => /* @__PURE__ */ h("span", {
|
|
2117
|
-
className:
|
|
2390
|
+
className: Dt.rowLabel,
|
|
2118
2391
|
style: { top: e.at * d },
|
|
2119
2392
|
children: e.label
|
|
2120
2393
|
}, e.at))
|
|
2121
2394
|
}),
|
|
2122
2395
|
/* @__PURE__ */ g("div", {
|
|
2123
|
-
className:
|
|
2396
|
+
className: Dt.gridWrap,
|
|
2124
2397
|
onMouseLeave: () => m(null),
|
|
2125
2398
|
children: [/* @__PURE__ */ h("div", {
|
|
2126
|
-
className:
|
|
2399
|
+
className: Dt.grid,
|
|
2127
2400
|
role: "img",
|
|
2128
2401
|
"aria-label": s,
|
|
2129
2402
|
children: _
|
|
2130
2403
|
}), v]
|
|
2131
2404
|
}),
|
|
2132
2405
|
r && /* @__PURE__ */ h("div", {
|
|
2133
|
-
className:
|
|
2406
|
+
className: Dt.columnLabels,
|
|
2134
2407
|
"aria-hidden": "true",
|
|
2135
2408
|
children: r.map((e) => /* @__PURE__ */ h("span", {
|
|
2136
|
-
className:
|
|
2409
|
+
className: Dt.columnLabel,
|
|
2137
2410
|
style: { left: e.at * d },
|
|
2138
2411
|
children: e.label
|
|
2139
2412
|
}, e.at))
|
|
@@ -2141,7 +2414,7 @@ function vt({ values: e, rows: t = 7, max: n, columnLabels: r, rowLabels: i, cel
|
|
|
2141
2414
|
]
|
|
2142
2415
|
});
|
|
2143
2416
|
}
|
|
2144
|
-
var
|
|
2417
|
+
var jt = [
|
|
2145
2418
|
"Jan",
|
|
2146
2419
|
"Feb",
|
|
2147
2420
|
"Mar",
|
|
@@ -2154,7 +2427,7 @@ var yt = [
|
|
|
2154
2427
|
"Oct",
|
|
2155
2428
|
"Nov",
|
|
2156
2429
|
"Dec"
|
|
2157
|
-
],
|
|
2430
|
+
], Mt = [
|
|
2158
2431
|
"Mon",
|
|
2159
2432
|
"Tue",
|
|
2160
2433
|
"Wed",
|
|
@@ -2163,14 +2436,14 @@ var yt = [
|
|
|
2163
2436
|
"Sat",
|
|
2164
2437
|
"Sun"
|
|
2165
2438
|
];
|
|
2166
|
-
function
|
|
2439
|
+
function Nt(e, t, n) {
|
|
2167
2440
|
let r = new Date(e.getFullYear(), e.getMonth(), e.getDate()), i = new Date(t.getFullYear(), t.getMonth(), t.getDate()), a = [], o = [], s = [], c = (r.getDay() + 6) % 7;
|
|
2168
2441
|
for (let e = 0; e < c; e++) a.push(null), o.push(null);
|
|
2169
2442
|
for (let e = new Date(r); e <= i; e.setDate(e.getDate() + 1)) {
|
|
2170
2443
|
let t = new Date(e);
|
|
2171
2444
|
t.getDate() === 1 && s.push({
|
|
2172
2445
|
at: Math.floor(a.length / 7),
|
|
2173
|
-
label:
|
|
2446
|
+
label: jt[t.getMonth()]
|
|
2174
2447
|
}), a.push(n(t)), o.push(t);
|
|
2175
2448
|
}
|
|
2176
2449
|
for (; a.length % 7;) a.push(null), o.push(null);
|
|
@@ -2184,7 +2457,7 @@ function xt(e, t, n) {
|
|
|
2184
2457
|
4
|
|
2185
2458
|
].map((e) => ({
|
|
2186
2459
|
at: e,
|
|
2187
|
-
label:
|
|
2460
|
+
label: Mt[e]
|
|
2188
2461
|
}))
|
|
2189
2462
|
};
|
|
2190
2463
|
}
|
|
@@ -2215,8 +2488,8 @@ var J = {
|
|
|
2215
2488
|
legendLabel: "_legendLabel_16ve1_159",
|
|
2216
2489
|
tooltipLabel: "_tooltipLabel_16ve1_164",
|
|
2217
2490
|
tooltipValue: "_tooltipValue_16ve1_171"
|
|
2218
|
-
},
|
|
2219
|
-
function
|
|
2491
|
+
}, Pt = "var(--lv6)";
|
|
2492
|
+
function Ft({ values: e, series: t, labels: n, groups: r, gap: i = 4, rounding: a = 8, size: o = 240, hollow: s = .4, inverse: c = !1, max: l, color: u, format: d, centre: p, showLegend: m = !0, "aria-label": _, className: v = "" }) {
|
|
2220
2493
|
let [y, b] = f(null), x = o / 2, S = x * Math.min(.9, Math.max(0, s)), C = x - S, w = !!r?.length, T = w ? [{
|
|
2221
2494
|
label: "",
|
|
2222
2495
|
values: r.map((e) => e.value),
|
|
@@ -2225,7 +2498,7 @@ function Ct({ values: e, series: t, labels: n, groups: r, gap: i = 4, rounding:
|
|
|
2225
2498
|
label: "",
|
|
2226
2499
|
values: e ?? [],
|
|
2227
2500
|
color: u
|
|
2228
|
-
}], E = Math.max(...T.map((e) => e.values.length), 0), D = (e, t) => T[e].values[t], O = l ?? T.reduce((e, t) => t.values.reduce((e, t) => Number.isFinite(t) && t > e ? t : e, e), 0), k = 2 * Math.PI / Math.max(1, E), A = T.length, j = (e, t = 0) => -Math.PI / 2 + k * (e + (A > 1 ? (t + .5) / A - .5 : 0)), M = (e, t, n = 0) => [x + t * Math.cos(j(e, n)), x + t * Math.sin(j(e, n))], N = (e) => O > 0 && Number.isFinite(e) ? Math.max(0, e) / O * C : 0, P = c ? x : S, F = (e) => c ? x - e : S + e, I = Math.max(.5, Math.min(2, 2 * Math.PI * S / Math.max(1, E * A) * .55)), L = (e) => T[e].color ??
|
|
2501
|
+
}], E = Math.max(...T.map((e) => e.values.length), 0), D = (e, t) => T[e].values[t], O = l ?? T.reduce((e, t) => t.values.reduce((e, t) => Number.isFinite(t) && t > e ? t : e, e), 0), k = 2 * Math.PI / Math.max(1, E), A = T.length, j = (e, t = 0) => -Math.PI / 2 + k * (e + (A > 1 ? (t + .5) / A - .5 : 0)), M = (e, t, n = 0) => [x + t * Math.cos(j(e, n)), x + t * Math.sin(j(e, n))], N = (e) => O > 0 && Number.isFinite(e) ? Math.max(0, e) / O * C : 0, P = c ? x : S, F = (e) => c ? x - e : S + e, I = Math.max(.5, Math.min(2, 2 * Math.PI * S / Math.max(1, E * A) * .55)), L = (e) => T[e].color ?? Pt, R = Math.min(a, C * .12), z = i / 2 + R, B = (e, t) => {
|
|
2229
2502
|
let n = S + z, r = Math.max(n + .5, t - z), i = j(e), a = Math.max(.01, k / 2 - z / n), o = Math.max(.01, k / 2 - z / r), s = (e, t) => `${(x + e * Math.cos(t)).toFixed(2)} ${(x + e * Math.sin(t)).toFixed(2)}`, c = +(2 * o > Math.PI);
|
|
2230
2503
|
return `M ${s(n, i - a)} L ${s(r, i - o)} A ${r.toFixed(2)} ${r.toFixed(2)} 0 ${c} 1 ${s(r, i + o)} L ${s(n, i + a)} A ${n.toFixed(2)} ${n.toFixed(2)} 0 ${c} 0 ${s(n, i - a)} Z`;
|
|
2231
2504
|
}, ee = (e) => {
|
|
@@ -2246,7 +2519,7 @@ function Ct({ values: e, series: t, labels: n, groups: r, gap: i = 4, rounding:
|
|
|
2246
2519
|
style: { strokeWidth: R * 2 },
|
|
2247
2520
|
d: B(e, x)
|
|
2248
2521
|
}, `t${e}`)), n > 0) {
|
|
2249
|
-
let r = t.color ?? u ??
|
|
2522
|
+
let r = t.color ?? u ?? Pt;
|
|
2250
2523
|
te.push(/* @__PURE__ */ h("path", {
|
|
2251
2524
|
className: `${J.wedge} ${y === e ? J.wedgeHovered : ""}`,
|
|
2252
2525
|
style: {
|
|
@@ -2417,7 +2690,7 @@ var Y = {
|
|
|
2417
2690
|
legendItem: "_legendItem_1gzqh_112",
|
|
2418
2691
|
legendMark: "_legendMark_1gzqh_118",
|
|
2419
2692
|
legendLabel: "_legendLabel_1gzqh_124"
|
|
2420
|
-
},
|
|
2693
|
+
}, It = "var(--lv6)", Lt = .14, Rt = .7, zt = 36, Bt = {
|
|
2421
2694
|
hatch: [
|
|
2422
2695
|
[
|
|
2423
2696
|
0,
|
|
@@ -2462,11 +2735,11 @@ var Y = {
|
|
|
2462
2735
|
2
|
|
2463
2736
|
]]
|
|
2464
2737
|
};
|
|
2465
|
-
function
|
|
2466
|
-
let u = s(), [d, p] = f(null), m = e.length, _ = n / 2, v = Math.max(
|
|
2738
|
+
function Vt({ axes: e, series: t, size: n = 240, max: r, rings: i = 3, format: a, showLegend: o = !0, "aria-label": c, className: l = "" }) {
|
|
2739
|
+
let u = s(), [d, p] = f(null), m = e.length, _ = n / 2, v = Math.max(zt, Math.max(0, ...e.map((e) => e.label.length)) * 6.5 + 14), y = n + v * 2, b = n + 56, x = y / 2, S = b / 2, C = r ?? t.reduce((e, t) => t.values.reduce((e, t) => Number.isFinite(t) && t > e ? t : e, e), 0), w = (t) => e[t].max ?? C, T = (e) => -Math.PI / 2 + 2 * Math.PI * e / Math.max(1, m), E = (e, t) => [x + t * Math.cos(T(e)), S + t * Math.sin(T(e))], D = (e, t) => {
|
|
2467
2740
|
let n = w(e);
|
|
2468
2741
|
return n > 0 && Number.isFinite(t) ? Math.min(1, Math.max(0, t / n)) * _ : 0;
|
|
2469
|
-
}, O = (e) => e.color ??
|
|
2742
|
+
}, O = (e) => e.color ?? It, k = (t, n) => e[t].format?.(n) ?? a?.(n) ?? n.toLocaleString(), A = (e) => {
|
|
2470
2743
|
if (m === 0) return;
|
|
2471
2744
|
let t = e.currentTarget.getBoundingClientRect(), n = (e.clientX - t.left) / t.width * y - x, r = (e.clientY - t.top) / t.height * b - S;
|
|
2472
2745
|
if (Math.hypot(n, r) > _ + v) {
|
|
@@ -2478,7 +2751,7 @@ function kt({ axes: e, series: t, size: n = 240, max: r, rings: i = 3, format: a
|
|
|
2478
2751
|
}, j = Array.from({ length: i }, (e, t) => {
|
|
2479
2752
|
let n = _ * (t + 1) / i;
|
|
2480
2753
|
return Array.from({ length: m }, (e, t) => E(t, n).map((e) => e.toFixed(2)).join(",")).join(" ");
|
|
2481
|
-
}), M = t.filter((e) => e.fill && e.fill in
|
|
2754
|
+
}), M = t.filter((e) => e.fill && e.fill in Bt);
|
|
2482
2755
|
return /* @__PURE__ */ g("div", {
|
|
2483
2756
|
className: `${Y.wrapper} ${l}`,
|
|
2484
2757
|
children: [/* @__PURE__ */ g("div", {
|
|
@@ -2498,12 +2771,12 @@ function kt({ axes: e, series: t, size: n = 240, max: r, rings: i = 3, format: a
|
|
|
2498
2771
|
onPointerMove: A,
|
|
2499
2772
|
onPointerDown: A,
|
|
2500
2773
|
children: [
|
|
2501
|
-
M.length > 0 && /* @__PURE__ */ h("defs", { children: t.map((e, t) => e.fill && e.fill in
|
|
2774
|
+
M.length > 0 && /* @__PURE__ */ h("defs", { children: t.map((e, t) => e.fill && e.fill in Bt ? /* @__PURE__ */ h("pattern", {
|
|
2502
2775
|
id: `${u}-${t}`,
|
|
2503
2776
|
width: 4,
|
|
2504
2777
|
height: 4,
|
|
2505
2778
|
patternUnits: "userSpaceOnUse",
|
|
2506
|
-
children:
|
|
2779
|
+
children: Bt[e.fill].map(([t, n, r, i], a) => /* @__PURE__ */ h("rect", {
|
|
2507
2780
|
x: t,
|
|
2508
2781
|
y: n,
|
|
2509
2782
|
width: r,
|
|
@@ -2526,12 +2799,12 @@ function kt({ axes: e, series: t, size: n = 240, max: r, rings: i = 3, format: a
|
|
|
2526
2799
|
}, `a${t}`);
|
|
2527
2800
|
}),
|
|
2528
2801
|
t.map((t, n) => {
|
|
2529
|
-
let r = e.map((e, n) => E(n, D(n, t.values[n]))), i = t.fill ?? "solid", a = i in
|
|
2802
|
+
let r = e.map((e, n) => E(n, D(n, t.values[n]))), i = t.fill ?? "solid", a = i in Bt ? `url(#${u}-${n})` : O(t);
|
|
2530
2803
|
return /* @__PURE__ */ g("g", { children: [
|
|
2531
2804
|
i !== "none" && /* @__PURE__ */ h("polygon", {
|
|
2532
2805
|
points: r.map(([e, t]) => `${e.toFixed(2)},${t.toFixed(2)}`).join(" "),
|
|
2533
2806
|
fill: a,
|
|
2534
|
-
fillOpacity: i === "solid" ?
|
|
2807
|
+
fillOpacity: i === "solid" ? Lt : Rt,
|
|
2535
2808
|
stroke: "none"
|
|
2536
2809
|
}),
|
|
2537
2810
|
/* @__PURE__ */ h("polygon", {
|
|
@@ -2610,7 +2883,7 @@ function kt({ axes: e, series: t, size: n = 240, max: r, rings: i = 3, format: a
|
|
|
2610
2883
|
})]
|
|
2611
2884
|
});
|
|
2612
2885
|
}
|
|
2613
|
-
var
|
|
2886
|
+
var Ht = {
|
|
2614
2887
|
chart: "_chart_106dt_1",
|
|
2615
2888
|
svg: "_svg_106dt_7",
|
|
2616
2889
|
divider: "_divider_106dt_13",
|
|
@@ -2624,8 +2897,8 @@ var At = {
|
|
|
2624
2897
|
tooltipLeft: "_tooltipLeft_106dt_66",
|
|
2625
2898
|
tooltipLabel: "_tooltipLabel_106dt_70",
|
|
2626
2899
|
tooltipValue: "_tooltipValue_106dt_77"
|
|
2627
|
-
},
|
|
2628
|
-
function
|
|
2900
|
+
}, Ut = "var(--lv6)", Wt = 30, Gt = 10, Kt = 20;
|
|
2901
|
+
function qt({ groups: e, labels: t, height: n = 120, max: r, gap: i = 2, format: a, "aria-label": s, className: c = "" }) {
|
|
2629
2902
|
let l = i, u = d(null), [p, m] = f(0), [_, v] = f(null);
|
|
2630
2903
|
o(() => {
|
|
2631
2904
|
let e = u.current;
|
|
@@ -2633,9 +2906,9 @@ function Ft({ groups: e, labels: t, height: n = 120, max: r, gap: i = 2, format:
|
|
|
2633
2906
|
let t = new ResizeObserver(([e]) => m(e.contentRect.width));
|
|
2634
2907
|
return t.observe(e), m(e.clientWidth), () => t.disconnect();
|
|
2635
2908
|
}, []);
|
|
2636
|
-
let y = e.reduce((e, t) => e + t.values.length, 0), b = r ?? e.reduce((e, t) => t.values.reduce((e, t) => Number.isFinite(t) && t > e ? t : e, e), 0), x = n +
|
|
2909
|
+
let y = e.reduce((e, t) => e + t.values.length, 0), b = r ?? e.reduce((e, t) => t.values.reduce((e, t) => Number.isFinite(t) && t > e ? t : e, e), 0), x = n + Wt + 4 + Gt + Kt, S = Wt + n, C = y > 0 ? (p - l * Math.max(0, e.length - 1)) / y : 0, w = [], T = 0;
|
|
2637
2910
|
for (let t of e) w.push(T), T += t.values.length * C + l;
|
|
2638
|
-
let E = (e, t) => w[e] + t * C + C / 2, D = (e) => e.highlight ? e.color ?? "var(--CTeal)" :
|
|
2911
|
+
let E = (e, t) => w[e] + t * C + C / 2, D = (e) => e.highlight ? e.color ?? "var(--CTeal)" : Ut, O = C > 0 ? Math.max(1, Math.ceil(28 / C)) : 1, k = (e, t) => Math.min(p - 10, Math.max(10, E(e, t))), A = (t) => {
|
|
2639
2912
|
if (!a || y === 0) return;
|
|
2640
2913
|
let n = t.currentTarget.getBoundingClientRect(), r = t.clientX - n.left;
|
|
2641
2914
|
for (let t = 0; t < e.length; t++) {
|
|
@@ -2650,27 +2923,27 @@ function Ft({ groups: e, labels: t, height: n = 120, max: r, gap: i = 2, format:
|
|
|
2650
2923
|
}, j = _ && a ? (() => {
|
|
2651
2924
|
let [r, i] = _, o = e[r], s = E(r, i), c = s > p / 2, l = b > 0 && Number.isFinite(o.values[i]) ? Math.max(0, o.values[i]) / b * n : 0;
|
|
2652
2925
|
return /* @__PURE__ */ g("div", {
|
|
2653
|
-
className: `${
|
|
2926
|
+
className: `${Ht.tooltip} ${c ? Ht.tooltipLeft : ""}`,
|
|
2654
2927
|
style: {
|
|
2655
2928
|
left: c ? s - 8 : s + 8,
|
|
2656
2929
|
top: Math.max(42, S - l)
|
|
2657
2930
|
},
|
|
2658
2931
|
children: [/* @__PURE__ */ g("span", {
|
|
2659
|
-
className:
|
|
2660
|
-
children: [o.label, t?.[i] == null ? "" :
|
|
2932
|
+
className: Ht.tooltipLabel,
|
|
2933
|
+
children: [o.label, t?.[i] == null ? "" : `, ${t[i]}`]
|
|
2661
2934
|
}), /* @__PURE__ */ h("span", {
|
|
2662
|
-
className:
|
|
2935
|
+
className: Ht.tooltipValue,
|
|
2663
2936
|
children: a(o.values[i], r, i)
|
|
2664
2937
|
})]
|
|
2665
2938
|
});
|
|
2666
2939
|
})() : null;
|
|
2667
2940
|
return /* @__PURE__ */ g("div", {
|
|
2668
2941
|
ref: u,
|
|
2669
|
-
className: `${
|
|
2942
|
+
className: `${Ht.chart} ${c}`,
|
|
2670
2943
|
style: { height: x },
|
|
2671
2944
|
onPointerLeave: () => v(null),
|
|
2672
2945
|
children: [p > 0 && /* @__PURE__ */ h("svg", {
|
|
2673
|
-
className:
|
|
2946
|
+
className: Ht.svg,
|
|
2674
2947
|
width: p,
|
|
2675
2948
|
height: x,
|
|
2676
2949
|
role: "img",
|
|
@@ -2681,20 +2954,20 @@ function Ft({ groups: e, labels: t, height: n = 120, max: r, gap: i = 2, format:
|
|
|
2681
2954
|
let i = w[r], a = e.values.length * C, o = D(e);
|
|
2682
2955
|
return /* @__PURE__ */ g("g", { children: [
|
|
2683
2956
|
/* @__PURE__ */ h("line", {
|
|
2684
|
-
className:
|
|
2957
|
+
className: Ht.divider,
|
|
2685
2958
|
x1: i,
|
|
2686
2959
|
y1: 0,
|
|
2687
2960
|
x2: i,
|
|
2688
2961
|
y2: S
|
|
2689
2962
|
}),
|
|
2690
2963
|
/* @__PURE__ */ h("text", {
|
|
2691
|
-
className:
|
|
2964
|
+
className: Ht.head,
|
|
2692
2965
|
x: i + 6,
|
|
2693
2966
|
y: 11,
|
|
2694
2967
|
children: e.label
|
|
2695
2968
|
}),
|
|
2696
2969
|
e.sublabel != null && /* @__PURE__ */ h("text", {
|
|
2697
|
-
className: `${
|
|
2970
|
+
className: `${Ht.sub} ${e.highlight ? Ht.subHighlight : ""}`,
|
|
2698
2971
|
x: i + 6,
|
|
2699
2972
|
y: 23,
|
|
2700
2973
|
style: e.highlight ? { fill: o } : void 0,
|
|
@@ -2703,7 +2976,7 @@ function Ft({ groups: e, labels: t, height: n = 120, max: r, gap: i = 2, format:
|
|
|
2703
2976
|
e.values.map((e, t) => {
|
|
2704
2977
|
let i = b > 0 && Number.isFinite(e) ? Math.max(0, e) / b * n : 0, a = _?.[0] === r && _[1] === t;
|
|
2705
2978
|
return /* @__PURE__ */ h("rect", {
|
|
2706
|
-
className: a ?
|
|
2979
|
+
className: a ? Ht.barHovered : Ht.bar,
|
|
2707
2980
|
style: { fill: a ? void 0 : o },
|
|
2708
2981
|
x: E(r, t) - (a ? 1.5 : 1),
|
|
2709
2982
|
y: S - i,
|
|
@@ -2712,15 +2985,15 @@ function Ft({ groups: e, labels: t, height: n = 120, max: r, gap: i = 2, format:
|
|
|
2712
2985
|
}, t);
|
|
2713
2986
|
}),
|
|
2714
2987
|
/* @__PURE__ */ h("rect", {
|
|
2715
|
-
className:
|
|
2988
|
+
className: Ht.band,
|
|
2716
2989
|
style: e.highlight ? { fill: o } : void 0,
|
|
2717
2990
|
x: i,
|
|
2718
2991
|
y: S + 4,
|
|
2719
2992
|
width: a,
|
|
2720
|
-
height:
|
|
2993
|
+
height: Gt
|
|
2721
2994
|
}),
|
|
2722
2995
|
t && e.values.map((e, n) => n % O === 0 ? /* @__PURE__ */ h("text", {
|
|
2723
|
-
className:
|
|
2996
|
+
className: Ht.tick,
|
|
2724
2997
|
x: k(r, n),
|
|
2725
2998
|
y: x - 5,
|
|
2726
2999
|
textAnchor: "middle",
|
|
@@ -2731,32 +3004,32 @@ function Ft({ groups: e, labels: t, height: n = 120, max: r, gap: i = 2, format:
|
|
|
2731
3004
|
}), j]
|
|
2732
3005
|
});
|
|
2733
3006
|
}
|
|
2734
|
-
var
|
|
3007
|
+
var Jt = { kbd: "_kbd_17l44_3" };
|
|
2735
3008
|
// src/components/Kbd/Kbd.tsx
|
|
2736
|
-
function
|
|
3009
|
+
function Yt({ children: e, className: t = "", ...n }) {
|
|
2737
3010
|
return /* @__PURE__ */ h("kbd", {
|
|
2738
|
-
className: `${
|
|
3011
|
+
className: `${Jt.kbd} ${t}`,
|
|
2739
3012
|
...n,
|
|
2740
3013
|
children: e
|
|
2741
3014
|
});
|
|
2742
3015
|
}
|
|
2743
|
-
var
|
|
2744
|
-
overlay: "
|
|
2745
|
-
panel: "
|
|
2746
|
-
field: "
|
|
2747
|
-
icon: "
|
|
2748
|
-
input: "
|
|
2749
|
-
list: "
|
|
2750
|
-
group: "
|
|
2751
|
-
item: "
|
|
2752
|
-
active: "
|
|
2753
|
-
itemIcon: "
|
|
2754
|
-
label: "
|
|
2755
|
-
hint: "
|
|
2756
|
-
empty: "
|
|
3016
|
+
var Xt = {
|
|
3017
|
+
overlay: "_overlay_11duy_3",
|
|
3018
|
+
panel: "_panel_11duy_14",
|
|
3019
|
+
field: "_field_11duy_25",
|
|
3020
|
+
icon: "_icon_11duy_35",
|
|
3021
|
+
input: "_input_11duy_40",
|
|
3022
|
+
list: "_list_11duy_56",
|
|
3023
|
+
group: "_group_11duy_61",
|
|
3024
|
+
item: "_item_11duy_69",
|
|
3025
|
+
active: "_active_11duy_86",
|
|
3026
|
+
itemIcon: "_itemIcon_11duy_91",
|
|
3027
|
+
label: "_label_11duy_97",
|
|
3028
|
+
hint: "_hint_11duy_105",
|
|
3029
|
+
empty: "_empty_11duy_111"
|
|
2757
3030
|
};
|
|
2758
3031
|
// src/components/CommandPalette/CommandPalette.tsx
|
|
2759
|
-
function
|
|
3032
|
+
function Zt({ items: t, query: n, onQueryChange: r, open: i, onOpenChange: a, onChoose: c, shortcut: l = "k", placeholder: u = "Search", emptyText: p = "Nothing to show.", noMatchText: m = "No matches.", "aria-label": _ = "Command palette" }) {
|
|
2760
3033
|
let v = s(), y = d(null), b = d(null), [x, S] = f(0);
|
|
2761
3034
|
o(() => {
|
|
2762
3035
|
if (!l) return;
|
|
@@ -2794,19 +3067,19 @@ function zt({ items: t, query: n, onQueryChange: r, open: i, onOpenChange: a, on
|
|
|
2794
3067
|
if (!i) return null;
|
|
2795
3068
|
let E = /* @__PURE__ */ new Set(), D = t.filter((e) => !E.has(e.id) && (E.add(e.id), !0)), O;
|
|
2796
3069
|
return /* @__PURE__ */ h("div", {
|
|
2797
|
-
className:
|
|
3070
|
+
className: Xt.overlay,
|
|
2798
3071
|
onClick: C,
|
|
2799
3072
|
children: /* @__PURE__ */ g("div", {
|
|
2800
|
-
className:
|
|
3073
|
+
className: Xt.panel,
|
|
2801
3074
|
role: "dialog",
|
|
2802
3075
|
"aria-modal": "true",
|
|
2803
3076
|
"aria-label": _,
|
|
2804
3077
|
onClick: (e) => e.stopPropagation(),
|
|
2805
3078
|
children: [/* @__PURE__ */ g("div", {
|
|
2806
|
-
className:
|
|
3079
|
+
className: Xt.field,
|
|
2807
3080
|
children: [
|
|
2808
3081
|
/* @__PURE__ */ h("span", {
|
|
2809
|
-
className:
|
|
3082
|
+
className: Xt.icon,
|
|
2810
3083
|
children: /* @__PURE__ */ h(M, {
|
|
2811
3084
|
size: 14,
|
|
2812
3085
|
color: "currentColor"
|
|
@@ -2814,7 +3087,7 @@ function zt({ items: t, query: n, onQueryChange: r, open: i, onOpenChange: a, on
|
|
|
2814
3087
|
}),
|
|
2815
3088
|
/* @__PURE__ */ h("input", {
|
|
2816
3089
|
ref: y,
|
|
2817
|
-
className:
|
|
3090
|
+
className: Xt.input,
|
|
2818
3091
|
type: "text",
|
|
2819
3092
|
role: "combobox",
|
|
2820
3093
|
"aria-expanded": "true",
|
|
@@ -2828,21 +3101,21 @@ function zt({ items: t, query: n, onQueryChange: r, open: i, onOpenChange: a, on
|
|
|
2828
3101
|
onChange: (e) => r(e.target.value),
|
|
2829
3102
|
onKeyDown: T
|
|
2830
3103
|
}),
|
|
2831
|
-
/* @__PURE__ */ h(
|
|
3104
|
+
/* @__PURE__ */ h(Yt, { children: "esc" })
|
|
2832
3105
|
]
|
|
2833
3106
|
}), /* @__PURE__ */ g("div", {
|
|
2834
3107
|
ref: b,
|
|
2835
|
-
className:
|
|
3108
|
+
className: Xt.list,
|
|
2836
3109
|
id: v,
|
|
2837
3110
|
role: "listbox",
|
|
2838
3111
|
"aria-label": _,
|
|
2839
3112
|
children: [D.length === 0 && /* @__PURE__ */ h("p", {
|
|
2840
|
-
className:
|
|
3113
|
+
className: Xt.empty,
|
|
2841
3114
|
children: n.trim() ? m : p
|
|
2842
3115
|
}), D.map((t, n) => {
|
|
2843
3116
|
let r = t.group !== O && t.group ? t.group : null;
|
|
2844
3117
|
return O = t.group, /* @__PURE__ */ g(e.Fragment, { children: [r && /* @__PURE__ */ h("div", {
|
|
2845
|
-
className:
|
|
3118
|
+
className: Xt.group,
|
|
2846
3119
|
role: "presentation",
|
|
2847
3120
|
children: r
|
|
2848
3121
|
}), /* @__PURE__ */ g("button", {
|
|
@@ -2851,20 +3124,20 @@ function zt({ items: t, query: n, onQueryChange: r, open: i, onOpenChange: a, on
|
|
|
2851
3124
|
"data-index": n,
|
|
2852
3125
|
role: "option",
|
|
2853
3126
|
"aria-selected": n === x,
|
|
2854
|
-
className: `${
|
|
3127
|
+
className: `${Xt.item} ${n === x ? Xt.active : ""}`,
|
|
2855
3128
|
onPointerMove: () => n !== x && S(n),
|
|
2856
3129
|
onClick: () => w(t),
|
|
2857
3130
|
children: [
|
|
2858
3131
|
t.icon && /* @__PURE__ */ h("span", {
|
|
2859
|
-
className:
|
|
3132
|
+
className: Xt.itemIcon,
|
|
2860
3133
|
children: t.icon
|
|
2861
3134
|
}),
|
|
2862
3135
|
/* @__PURE__ */ h("span", {
|
|
2863
|
-
className:
|
|
3136
|
+
className: Xt.label,
|
|
2864
3137
|
children: t.label
|
|
2865
3138
|
}),
|
|
2866
3139
|
t.hint && /* @__PURE__ */ h("span", {
|
|
2867
|
-
className:
|
|
3140
|
+
className: Xt.hint,
|
|
2868
3141
|
children: t.hint
|
|
2869
3142
|
})
|
|
2870
3143
|
]
|
|
@@ -2874,7 +3147,7 @@ function zt({ items: t, query: n, onQueryChange: r, open: i, onOpenChange: a, on
|
|
|
2874
3147
|
})
|
|
2875
3148
|
});
|
|
2876
3149
|
}
|
|
2877
|
-
var
|
|
3150
|
+
var Qt = {
|
|
2878
3151
|
wrapper: "_wrapper_59d2a_1",
|
|
2879
3152
|
field: "_field_59d2a_9",
|
|
2880
3153
|
disabled: "_disabled_59d2a_28",
|
|
@@ -2886,7 +3159,7 @@ var Bt = {
|
|
|
2886
3159
|
label: "_label_59d2a_106"
|
|
2887
3160
|
};
|
|
2888
3161
|
// src/components/TagsInput/TagsInput.tsx
|
|
2889
|
-
function
|
|
3162
|
+
function $t({ value: e, onChange: t, label: n, placeholder: r, hint: i, separators: a = ";,", disabled: o = !1, "aria-label": c, className: l = "" }) {
|
|
2890
3163
|
let u = s(), p = d(null), [m, _] = f(""), v = (e, t) => {
|
|
2891
3164
|
let n = [...e];
|
|
2892
3165
|
for (let e of t) {
|
|
@@ -2908,24 +3181,24 @@ function Vt({ value: e, onChange: t, label: n, placeholder: r, hint: i, separato
|
|
|
2908
3181
|
t(e.filter((e, t) => t !== n)), p.current?.focus();
|
|
2909
3182
|
};
|
|
2910
3183
|
return /* @__PURE__ */ g("div", {
|
|
2911
|
-
className: `${
|
|
3184
|
+
className: `${Qt.wrapper} ${l}`,
|
|
2912
3185
|
children: [
|
|
2913
3186
|
n && /* @__PURE__ */ h("label", {
|
|
2914
3187
|
htmlFor: u,
|
|
2915
|
-
className:
|
|
3188
|
+
className: Qt.label,
|
|
2916
3189
|
children: n
|
|
2917
3190
|
}),
|
|
2918
3191
|
/* @__PURE__ */ g("div", {
|
|
2919
|
-
className: `${
|
|
3192
|
+
className: `${Qt.field} ${o ? Qt.disabled : ""}`,
|
|
2920
3193
|
onClick: () => p.current?.focus(),
|
|
2921
3194
|
children: [e.map((e, t) => /* @__PURE__ */ g("span", {
|
|
2922
|
-
className:
|
|
3195
|
+
className: Qt.chip,
|
|
2923
3196
|
children: [/* @__PURE__ */ h("span", {
|
|
2924
|
-
className:
|
|
3197
|
+
className: Qt.text,
|
|
2925
3198
|
children: e
|
|
2926
3199
|
}), !o && /* @__PURE__ */ h("button", {
|
|
2927
3200
|
type: "button",
|
|
2928
|
-
className:
|
|
3201
|
+
className: Qt.remove,
|
|
2929
3202
|
"aria-label": `Remove ${e}`,
|
|
2930
3203
|
title: "Remove",
|
|
2931
3204
|
onClick: (e) => {
|
|
@@ -2939,7 +3212,7 @@ function Vt({ value: e, onChange: t, label: n, placeholder: r, hint: i, separato
|
|
|
2939
3212
|
}, e)), /* @__PURE__ */ h("input", {
|
|
2940
3213
|
id: u,
|
|
2941
3214
|
ref: p,
|
|
2942
|
-
className:
|
|
3215
|
+
className: Qt.input,
|
|
2943
3216
|
value: m,
|
|
2944
3217
|
placeholder: e.length === 0 ? r : void 0,
|
|
2945
3218
|
"aria-label": c ?? n,
|
|
@@ -2950,84 +3223,84 @@ function Vt({ value: e, onChange: t, label: n, placeholder: r, hint: i, separato
|
|
|
2950
3223
|
})]
|
|
2951
3224
|
}),
|
|
2952
3225
|
i && /* @__PURE__ */ h("span", {
|
|
2953
|
-
className:
|
|
3226
|
+
className: Qt.hint,
|
|
2954
3227
|
children: i
|
|
2955
3228
|
})
|
|
2956
3229
|
]
|
|
2957
3230
|
});
|
|
2958
3231
|
}
|
|
2959
|
-
var
|
|
3232
|
+
var en = {
|
|
2960
3233
|
stack: "_stack_67643_3",
|
|
2961
3234
|
toast: "_toast_67643_18",
|
|
2962
3235
|
error: "_error_67643_36",
|
|
2963
3236
|
icon: "_icon_67643_40",
|
|
2964
3237
|
message: "_message_67643_50",
|
|
2965
3238
|
close: "_close_67643_55"
|
|
2966
|
-
},
|
|
2967
|
-
function
|
|
2968
|
-
let t = ++
|
|
2969
|
-
return
|
|
3239
|
+
}, tn = [], nn = 0, rn = /* @__PURE__ */ new Set(), an = () => rn.forEach((e) => e());
|
|
3240
|
+
function on(e) {
|
|
3241
|
+
let t = ++nn;
|
|
3242
|
+
return tn = [...tn, {
|
|
2970
3243
|
...e,
|
|
2971
3244
|
id: t
|
|
2972
|
-
}].slice(-4),
|
|
3245
|
+
}].slice(-4), an(), t;
|
|
2973
3246
|
}
|
|
2974
|
-
function
|
|
2975
|
-
return
|
|
3247
|
+
function sn(e, t = {}) {
|
|
3248
|
+
return on({
|
|
2976
3249
|
message: e,
|
|
2977
3250
|
kind: "neutral",
|
|
2978
3251
|
...t,
|
|
2979
3252
|
duration: t.duration ?? 4e3
|
|
2980
3253
|
});
|
|
2981
3254
|
}
|
|
2982
|
-
|
|
3255
|
+
sn.error = (e, t = {}) => on({
|
|
2983
3256
|
message: e,
|
|
2984
3257
|
kind: "error",
|
|
2985
3258
|
...t,
|
|
2986
3259
|
duration: t.duration ?? 8e3
|
|
2987
|
-
}),
|
|
2988
|
-
|
|
3260
|
+
}), sn.dismiss = (e) => {
|
|
3261
|
+
tn = tn.filter((t) => t.id !== e), an();
|
|
2989
3262
|
};
|
|
2990
|
-
function
|
|
2991
|
-
return p((e) => (
|
|
3263
|
+
function cn() {
|
|
3264
|
+
return p((e) => (rn.add(e), () => rn.delete(e)), () => tn, () => tn);
|
|
2992
3265
|
}
|
|
2993
|
-
function
|
|
3266
|
+
function ln({ t: e }) {
|
|
2994
3267
|
let t = d(void 0), n = () => {
|
|
2995
|
-
clearTimeout(t.current), t.current = setTimeout(() =>
|
|
3268
|
+
clearTimeout(t.current), t.current = setTimeout(() => sn.dismiss(e.id), e.duration);
|
|
2996
3269
|
}, r = () => clearTimeout(t.current);
|
|
2997
3270
|
return o(() => (n(), r), [e.id]), /* @__PURE__ */ g("div", {
|
|
2998
|
-
className: `${
|
|
3271
|
+
className: `${en.toast} ${e.kind === "error" ? en.error : ""}`,
|
|
2999
3272
|
role: e.kind === "error" ? "alert" : "status",
|
|
3000
3273
|
onMouseEnter: r,
|
|
3001
3274
|
onMouseLeave: n,
|
|
3002
3275
|
children: [
|
|
3003
3276
|
e.kind === "error" ? /* @__PURE__ */ h("span", {
|
|
3004
|
-
className:
|
|
3277
|
+
className: en.icon,
|
|
3005
3278
|
children: /* @__PURE__ */ h(P, {
|
|
3006
3279
|
size: 14,
|
|
3007
3280
|
color: "currentColor"
|
|
3008
3281
|
})
|
|
3009
3282
|
}) : e.icon && /* @__PURE__ */ h("span", {
|
|
3010
|
-
className:
|
|
3283
|
+
className: en.icon,
|
|
3011
3284
|
children: e.icon
|
|
3012
3285
|
}),
|
|
3013
3286
|
/* @__PURE__ */ h("span", {
|
|
3014
|
-
className:
|
|
3287
|
+
className: en.message,
|
|
3015
3288
|
children: e.message
|
|
3016
3289
|
}),
|
|
3017
3290
|
e.action && /* @__PURE__ */ h(W, {
|
|
3018
3291
|
variant: "ghost",
|
|
3019
3292
|
size: "micro",
|
|
3020
3293
|
onClick: () => {
|
|
3021
|
-
|
|
3294
|
+
sn.dismiss(e.id), e.action.onClick();
|
|
3022
3295
|
},
|
|
3023
3296
|
children: e.action.label
|
|
3024
3297
|
}),
|
|
3025
3298
|
/* @__PURE__ */ h("button", {
|
|
3026
3299
|
type: "button",
|
|
3027
|
-
className:
|
|
3300
|
+
className: en.close,
|
|
3028
3301
|
"aria-label": "Dismiss",
|
|
3029
3302
|
title: "Dismiss",
|
|
3030
|
-
onClick: () =>
|
|
3303
|
+
onClick: () => sn.dismiss(e.id),
|
|
3031
3304
|
children: /* @__PURE__ */ h(F, {
|
|
3032
3305
|
size: 7,
|
|
3033
3306
|
color: "currentColor"
|
|
@@ -3036,21 +3309,21 @@ function Xt({ t: e }) {
|
|
|
3036
3309
|
]
|
|
3037
3310
|
});
|
|
3038
3311
|
}
|
|
3039
|
-
function
|
|
3040
|
-
let e =
|
|
3312
|
+
function un() {
|
|
3313
|
+
let e = cn();
|
|
3041
3314
|
return /* @__PURE__ */ h("div", {
|
|
3042
|
-
className:
|
|
3315
|
+
className: en.stack,
|
|
3043
3316
|
role: "region",
|
|
3044
3317
|
"aria-label": "Notices",
|
|
3045
|
-
children: e.map((e) => /* @__PURE__ */ h(
|
|
3318
|
+
children: e.map((e) => /* @__PURE__ */ h(ln, { t: e }, e.id))
|
|
3046
3319
|
});
|
|
3047
3320
|
}
|
|
3048
|
-
var
|
|
3049
|
-
tooltip: "
|
|
3050
|
-
arrow: "
|
|
3321
|
+
var dn = {
|
|
3322
|
+
tooltip: "_tooltip_qkom3_1",
|
|
3323
|
+
arrow: "_arrow_qkom3_18"
|
|
3051
3324
|
};
|
|
3052
3325
|
// src/components/Tooltip/Tooltip.tsx
|
|
3053
|
-
function
|
|
3326
|
+
function fn({ content: e, position: t = "top", children: n, className: r }) {
|
|
3054
3327
|
let i = ae();
|
|
3055
3328
|
return /* @__PURE__ */ h(z.Provider, {
|
|
3056
3329
|
delayDuration: 80,
|
|
@@ -3062,34 +3335,35 @@ function $t({ content: e, position: t = "top", children: n, className: r }) {
|
|
|
3062
3335
|
children: /* @__PURE__ */ g(z.Content, {
|
|
3063
3336
|
side: t,
|
|
3064
3337
|
sideOffset: 7,
|
|
3065
|
-
className: [
|
|
3066
|
-
children: [e, /* @__PURE__ */ h(z.Arrow, { className:
|
|
3338
|
+
className: [dn.tooltip, r].filter(Boolean).join(" "),
|
|
3339
|
+
children: [e, /* @__PURE__ */ h(z.Arrow, { className: dn.arrow })]
|
|
3067
3340
|
})
|
|
3068
3341
|
})] })
|
|
3069
3342
|
});
|
|
3070
3343
|
}
|
|
3071
3344
|
var X = {
|
|
3072
|
-
sidebar: "
|
|
3073
|
-
header: "
|
|
3074
|
-
body: "
|
|
3075
|
-
group: "
|
|
3076
|
-
title: "
|
|
3077
|
-
titleText: "
|
|
3078
|
-
titleToggle: "
|
|
3079
|
-
titleChevron: "
|
|
3080
|
-
items: "
|
|
3081
|
-
item: "
|
|
3082
|
-
label: "
|
|
3083
|
-
badge: "
|
|
3084
|
-
badgeSignal: "
|
|
3085
|
-
trailing: "
|
|
3086
|
-
footer: "
|
|
3087
|
-
footerContent: "
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3345
|
+
sidebar: "_sidebar_1icfm_3",
|
|
3346
|
+
header: "_header_1icfm_13",
|
|
3347
|
+
body: "_body_1icfm_14",
|
|
3348
|
+
group: "_group_1icfm_15",
|
|
3349
|
+
title: "_title_1icfm_16",
|
|
3350
|
+
titleText: "_titleText_1icfm_27",
|
|
3351
|
+
titleToggle: "_titleToggle_1icfm_28",
|
|
3352
|
+
titleChevron: "_titleChevron_1icfm_30",
|
|
3353
|
+
items: "_items_1icfm_31",
|
|
3354
|
+
item: "_item_1icfm_31",
|
|
3355
|
+
label: "_label_1icfm_34",
|
|
3356
|
+
badge: "_badge_1icfm_35",
|
|
3357
|
+
badgeSignal: "_badgeSignal_1icfm_36",
|
|
3358
|
+
trailing: "_trailing_1icfm_38",
|
|
3359
|
+
footer: "_footer_1icfm_40",
|
|
3360
|
+
footerContent: "_footerContent_1icfm_41",
|
|
3361
|
+
railFooter: "_railFooter_1icfm_42",
|
|
3362
|
+
rail: "_rail_1icfm_42",
|
|
3363
|
+
overlay: "_overlay_1icfm_55",
|
|
3364
|
+
open: "_open_1icfm_69"
|
|
3365
|
+
}, pn = "(max-width: 768px)", mn = () => typeof navigator < "u" && (/Mac|iPhone|iPad|iPod/.test(navigator.platform) || /Mac OS X/.test(navigator.userAgent)), hn = (e) => e instanceof HTMLElement && (e.isContentEditable || /^(INPUT|TEXTAREA|SELECT)$/.test(e.tagName));
|
|
3366
|
+
function gn(e) {
|
|
3093
3367
|
if (e) try {
|
|
3094
3368
|
let t = localStorage.getItem(e);
|
|
3095
3369
|
return t === "rail" || t !== "full" && void 0;
|
|
@@ -3097,54 +3371,54 @@ function rn(e) {
|
|
|
3097
3371
|
return;
|
|
3098
3372
|
}
|
|
3099
3373
|
}
|
|
3100
|
-
function
|
|
3101
|
-
let [e, t] = f(() => typeof window < "u" && window.matchMedia(
|
|
3374
|
+
function _n() {
|
|
3375
|
+
let [e, t] = f(() => typeof window < "u" && window.matchMedia(pn).matches);
|
|
3102
3376
|
return o(() => {
|
|
3103
|
-
let e = window.matchMedia(
|
|
3377
|
+
let e = window.matchMedia(pn), n = () => t(e.matches);
|
|
3104
3378
|
return e.addEventListener("change", n), () => e.removeEventListener("change", n);
|
|
3105
3379
|
}, []), e;
|
|
3106
3380
|
}
|
|
3107
|
-
function
|
|
3108
|
-
let [
|
|
3109
|
-
if (!
|
|
3110
|
-
let e = !
|
|
3111
|
-
if (
|
|
3381
|
+
function vn({ groups: t, active: n, onSelect: r, header: a, footer: s, railFooter: c, collapsed: l, onCollapsedChange: u, defaultCollapsed: p = !1, collapsible: _ = !0, shortcut: v = "b", storageKey: y, open: b = !1, onOpenChange: S, "aria-label": w = "Sections", className: T = "" }) {
|
|
3382
|
+
let [O, k] = f(() => gn(y)), [A, j] = f(() => /* @__PURE__ */ new Set()), M = _n(), N = d(null), P = _ && (l ?? O ?? p), F = P && !M, I = mn(), L = v ? I ? `⌘${v.toUpperCase()}` : `Ctrl ${v.toUpperCase()}` : "", R = i(() => {
|
|
3383
|
+
if (!_) return;
|
|
3384
|
+
let e = !P;
|
|
3385
|
+
if (l === void 0 && (k(e), y)) {
|
|
3112
3386
|
try {
|
|
3113
|
-
localStorage.setItem(
|
|
3387
|
+
localStorage.setItem(y, e ? "rail" : "full");
|
|
3114
3388
|
} catch {}
|
|
3115
3389
|
try {
|
|
3116
|
-
document.cookie = `${encodeURIComponent(
|
|
3390
|
+
document.cookie = `${encodeURIComponent(y)}=${e ? "rail" : "full"}; path=/; max-age=31536000; samesite=lax`;
|
|
3117
3391
|
} catch {}
|
|
3118
3392
|
}
|
|
3119
|
-
|
|
3393
|
+
u?.(e);
|
|
3120
3394
|
}, [
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
]),
|
|
3395
|
+
_,
|
|
3396
|
+
P,
|
|
3397
|
+
l,
|
|
3398
|
+
y,
|
|
3399
|
+
u
|
|
3400
|
+
]), z = i(() => S?.(!1), [S]);
|
|
3127
3401
|
o(() => {
|
|
3128
3402
|
let e = (e) => {
|
|
3129
|
-
|
|
3403
|
+
_ && v && (e.metaKey || e.ctrlKey) && !e.altKey && !e.shiftKey && e.key.toLowerCase() === v.toLowerCase() && !hn(e.target) ? (e.preventDefault(), R()) : e.key === "Escape" && b && M && (e.preventDefault(), z());
|
|
3130
3404
|
};
|
|
3131
3405
|
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
3132
3406
|
}, [
|
|
3133
|
-
p,
|
|
3134
3407
|
_,
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3408
|
+
v,
|
|
3409
|
+
R,
|
|
3410
|
+
b,
|
|
3411
|
+
M,
|
|
3412
|
+
z
|
|
3139
3413
|
]), o(() => {
|
|
3140
|
-
|
|
3141
|
-
}, [
|
|
3142
|
-
let
|
|
3143
|
-
r?.(e),
|
|
3144
|
-
},
|
|
3414
|
+
b && M && N.current && (N.current.querySelector("[aria-current=\"page\"]") ?? N.current.querySelector(`.${X.body} a, .${X.body} button`))?.focus();
|
|
3415
|
+
}, [b, M]);
|
|
3416
|
+
let B = (e) => {
|
|
3417
|
+
r?.(e), z();
|
|
3418
|
+
}, ee = (e) => j((t) => {
|
|
3145
3419
|
let n = new Set(t);
|
|
3146
3420
|
return n.delete(e) || n.add(e), n;
|
|
3147
|
-
}),
|
|
3421
|
+
}), V = (t) => /* @__PURE__ */ g(m, { children: [
|
|
3148
3422
|
/* @__PURE__ */ h("span", {
|
|
3149
3423
|
className: X.label,
|
|
3150
3424
|
children: t.label
|
|
@@ -3162,7 +3436,7 @@ function on({ groups: t, active: n, onSelect: r, header: a, footer: s, collapsed
|
|
|
3162
3436
|
color: "currentColor"
|
|
3163
3437
|
})
|
|
3164
3438
|
})
|
|
3165
|
-
] }),
|
|
3439
|
+
] }), te = (e) => {
|
|
3166
3440
|
let t = e.key === n;
|
|
3167
3441
|
return e.disabled ? /* @__PURE__ */ h(W, {
|
|
3168
3442
|
variant: "ghost",
|
|
@@ -3171,7 +3445,7 @@ function on({ groups: t, active: n, onSelect: r, header: a, footer: s, collapsed
|
|
|
3171
3445
|
"aria-disabled": "true",
|
|
3172
3446
|
title: e.title,
|
|
3173
3447
|
onClick: (e) => e.preventDefault(),
|
|
3174
|
-
children:
|
|
3448
|
+
children: V(e)
|
|
3175
3449
|
}) : e.href ? /* @__PURE__ */ h(W, {
|
|
3176
3450
|
variant: t ? "primary" : "ghost",
|
|
3177
3451
|
size: "micro",
|
|
@@ -3179,30 +3453,30 @@ function on({ groups: t, active: n, onSelect: r, header: a, footer: s, collapsed
|
|
|
3179
3453
|
title: e.title,
|
|
3180
3454
|
"aria-current": t ? "page" : void 0,
|
|
3181
3455
|
href: e.href,
|
|
3182
|
-
onClick: () =>
|
|
3183
|
-
children:
|
|
3456
|
+
onClick: () => B(e),
|
|
3457
|
+
children: V(e)
|
|
3184
3458
|
}) : /* @__PURE__ */ h(W, {
|
|
3185
3459
|
variant: t ? "primary" : "ghost",
|
|
3186
3460
|
size: "micro",
|
|
3187
3461
|
iconLeft: e.icon,
|
|
3188
3462
|
title: e.title,
|
|
3189
3463
|
"aria-current": t ? "page" : void 0,
|
|
3190
|
-
onClick: () =>
|
|
3191
|
-
children:
|
|
3464
|
+
onClick: () => B(e),
|
|
3465
|
+
children: V(e)
|
|
3192
3466
|
});
|
|
3193
|
-
},
|
|
3467
|
+
}, H = [
|
|
3194
3468
|
X.sidebar,
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3469
|
+
F ? X.rail : "",
|
|
3470
|
+
b ? X.open : "",
|
|
3471
|
+
T
|
|
3198
3472
|
].filter(Boolean).join(" ");
|
|
3199
|
-
return /* @__PURE__ */ g(m, { children: [
|
|
3473
|
+
return /* @__PURE__ */ g(m, { children: [b && M && /* @__PURE__ */ h("div", {
|
|
3200
3474
|
className: X.overlay,
|
|
3201
|
-
onClick:
|
|
3475
|
+
onClick: z
|
|
3202
3476
|
}), /* @__PURE__ */ g("nav", {
|
|
3203
|
-
ref:
|
|
3204
|
-
className:
|
|
3205
|
-
"aria-label":
|
|
3477
|
+
ref: N,
|
|
3478
|
+
className: H,
|
|
3479
|
+
"aria-label": w,
|
|
3206
3480
|
children: [
|
|
3207
3481
|
a && /* @__PURE__ */ h("div", {
|
|
3208
3482
|
className: X.header,
|
|
@@ -3211,14 +3485,14 @@ function on({ groups: t, active: n, onSelect: r, header: a, footer: s, collapsed
|
|
|
3211
3485
|
/* @__PURE__ */ h("div", {
|
|
3212
3486
|
className: X.body,
|
|
3213
3487
|
children: t.map((e, t) => {
|
|
3214
|
-
let n = !!(e.collapsible && e.title &&
|
|
3488
|
+
let n = !!(e.collapsible && e.title && A.has(e.title));
|
|
3215
3489
|
return /* @__PURE__ */ g("div", {
|
|
3216
3490
|
className: X.group,
|
|
3217
3491
|
children: [e.title && (e.collapsible ? /* @__PURE__ */ g("button", {
|
|
3218
3492
|
type: "button",
|
|
3219
3493
|
className: `${X.title} ${X.titleToggle}`,
|
|
3220
3494
|
"aria-expanded": !n,
|
|
3221
|
-
onClick: () =>
|
|
3495
|
+
onClick: () => ee(e.title),
|
|
3222
3496
|
children: [/* @__PURE__ */ h("span", {
|
|
3223
3497
|
className: X.titleText,
|
|
3224
3498
|
children: e.title
|
|
@@ -3236,56 +3510,63 @@ function on({ groups: t, active: n, onSelect: r, header: a, footer: s, collapsed
|
|
|
3236
3510
|
className: X.titleText,
|
|
3237
3511
|
children: e.title
|
|
3238
3512
|
})
|
|
3239
|
-
})), (!n ||
|
|
3513
|
+
})), (!n || F) && /* @__PURE__ */ h("div", {
|
|
3240
3514
|
className: X.items,
|
|
3241
3515
|
children: e.items.map((e) => /* @__PURE__ */ h("span", {
|
|
3242
3516
|
className: X.item,
|
|
3243
|
-
children:
|
|
3517
|
+
children: F ? /* @__PURE__ */ h(fn, {
|
|
3244
3518
|
content: e.badge ? `${e.label} (${e.badge})` : e.label,
|
|
3245
3519
|
position: "right",
|
|
3246
|
-
children:
|
|
3247
|
-
}) :
|
|
3520
|
+
children: te(e)
|
|
3521
|
+
}) : te(e)
|
|
3248
3522
|
}, e.key))
|
|
3249
3523
|
})]
|
|
3250
3524
|
}, e.title ?? t);
|
|
3251
3525
|
})
|
|
3252
3526
|
}),
|
|
3253
|
-
(s ||
|
|
3527
|
+
(s || c && F || _ && !M) && /* @__PURE__ */ g("div", {
|
|
3254
3528
|
className: X.footer,
|
|
3255
|
-
children: [
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3529
|
+
children: [
|
|
3530
|
+
c && F && /* @__PURE__ */ h("div", {
|
|
3531
|
+
className: X.railFooter,
|
|
3532
|
+
children: c
|
|
3533
|
+
}),
|
|
3534
|
+
s && /* @__PURE__ */ h("div", {
|
|
3535
|
+
className: X.footerContent,
|
|
3536
|
+
children: s
|
|
3537
|
+
}),
|
|
3538
|
+
_ && !M && /* @__PURE__ */ h("span", {
|
|
3539
|
+
className: X.item,
|
|
3540
|
+
children: F ? /* @__PURE__ */ h(fn, {
|
|
3541
|
+
content: `Expand${L ? ` (${L})` : ""}`,
|
|
3542
|
+
position: "right",
|
|
3543
|
+
children: /* @__PURE__ */ h(W, {
|
|
3544
|
+
variant: "ghost",
|
|
3545
|
+
size: "micro",
|
|
3546
|
+
iconLeft: /* @__PURE__ */ h(D, {}),
|
|
3547
|
+
"aria-expanded": !1,
|
|
3548
|
+
"aria-label": "Expand",
|
|
3549
|
+
onClick: R
|
|
3550
|
+
})
|
|
3551
|
+
}) : /* @__PURE__ */ h(W, {
|
|
3264
3552
|
variant: "ghost",
|
|
3265
3553
|
size: "micro",
|
|
3266
|
-
iconLeft: /* @__PURE__ */ h(
|
|
3267
|
-
"aria-expanded": !
|
|
3268
|
-
|
|
3269
|
-
onClick:
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
iconLeft: /* @__PURE__ */ h(E, {}),
|
|
3275
|
-
"aria-expanded": !0,
|
|
3276
|
-
title: I ? `Collapse (${I})` : "Collapse",
|
|
3277
|
-
onClick: L,
|
|
3278
|
-
children: /* @__PURE__ */ h("span", {
|
|
3279
|
-
className: X.label,
|
|
3280
|
-
children: "Collapse"
|
|
3554
|
+
iconLeft: /* @__PURE__ */ h(E, {}),
|
|
3555
|
+
"aria-expanded": !0,
|
|
3556
|
+
title: L ? `Collapse (${L})` : "Collapse",
|
|
3557
|
+
onClick: R,
|
|
3558
|
+
children: /* @__PURE__ */ h("span", {
|
|
3559
|
+
className: X.label,
|
|
3560
|
+
children: "Collapse"
|
|
3561
|
+
})
|
|
3281
3562
|
})
|
|
3282
3563
|
})
|
|
3283
|
-
|
|
3564
|
+
]
|
|
3284
3565
|
})
|
|
3285
3566
|
]
|
|
3286
3567
|
})] });
|
|
3287
3568
|
}
|
|
3288
|
-
var
|
|
3569
|
+
var yn = {
|
|
3289
3570
|
wrapper: "_wrapper_1ogxf_2",
|
|
3290
3571
|
label: "_label_1ogxf_3",
|
|
3291
3572
|
field: "_field_1ogxf_4",
|
|
@@ -3310,14 +3591,14 @@ var sn = {
|
|
|
3310
3591
|
empty: "_empty_1ogxf_56"
|
|
3311
3592
|
};
|
|
3312
3593
|
// src/components/Combobox/Combobox.tsx
|
|
3313
|
-
function
|
|
3594
|
+
function bn(e, t) {
|
|
3314
3595
|
let n = t.toLowerCase(), r = e.filter((e) => e.label.toLowerCase().startsWith(n)), i = e.filter((e) => !e.label.toLowerCase().startsWith(n) && e.label.toLowerCase().includes(n));
|
|
3315
3596
|
return [...r, ...i];
|
|
3316
3597
|
}
|
|
3317
|
-
function
|
|
3598
|
+
function xn({ value: t, onValueChange: n, options: r, search: i, label: a, placeholder: c = "Choose…", searchPlaceholder: l = "Search", noMatchText: p = "No matches.", size: m = "default", disabled: _ = !1, "aria-label": v, id: y, className: S = "" }) {
|
|
3318
3599
|
let C = s(), w = y ?? C, T = `${w}-list`, [E, D] = f(!1), [O, k] = f(""), [A, j] = f(0), N = d(null), P = d(null), F = d(null), I = r.find((e) => e.value === t), L = m === "large" ? 21 : 14, R = u(() => {
|
|
3319
3600
|
let e = O.trim();
|
|
3320
|
-
return e ? i ? i(e) :
|
|
3601
|
+
return e ? i ? i(e) : bn(r, e) : r;
|
|
3321
3602
|
}, [
|
|
3322
3603
|
r,
|
|
3323
3604
|
O,
|
|
@@ -3351,36 +3632,36 @@ function ln({ value: t, onValueChange: n, options: r, search: i, label: a, place
|
|
|
3351
3632
|
color: "currentColor"
|
|
3352
3633
|
}) : t;
|
|
3353
3634
|
return /* @__PURE__ */ g("div", {
|
|
3354
|
-
className: `${
|
|
3635
|
+
className: `${yn.wrapper} ${S}`,
|
|
3355
3636
|
children: [a && /* @__PURE__ */ h("label", {
|
|
3356
3637
|
id: `${w}-label`,
|
|
3357
3638
|
htmlFor: w,
|
|
3358
|
-
className:
|
|
3639
|
+
className: yn.label,
|
|
3359
3640
|
children: a
|
|
3360
|
-
}), /* @__PURE__ */ h(
|
|
3641
|
+
}), /* @__PURE__ */ h(He, {
|
|
3361
3642
|
open: E,
|
|
3362
3643
|
onOpenChange: z,
|
|
3363
3644
|
align: "start",
|
|
3364
|
-
className:
|
|
3645
|
+
className: yn.panel,
|
|
3365
3646
|
"aria-label": v ?? a,
|
|
3366
3647
|
trigger: /* @__PURE__ */ g("button", {
|
|
3367
3648
|
ref: F,
|
|
3368
3649
|
type: "button",
|
|
3369
3650
|
id: w,
|
|
3370
|
-
className: `${
|
|
3651
|
+
className: `${yn.field} ${yn[m]}`,
|
|
3371
3652
|
disabled: _,
|
|
3372
3653
|
"aria-haspopup": "listbox",
|
|
3373
3654
|
"aria-labelledby": a ? `${w}-label ${w}-value` : void 0,
|
|
3374
3655
|
"aria-label": a ? void 0 : v,
|
|
3375
3656
|
children: [/* @__PURE__ */ g("span", {
|
|
3376
3657
|
id: `${w}-value`,
|
|
3377
|
-
className: `${
|
|
3658
|
+
className: `${yn.value} ${I ? "" : yn.placeholder}`,
|
|
3378
3659
|
children: [I?.icon && V(I.icon, L), /* @__PURE__ */ h("span", {
|
|
3379
|
-
className:
|
|
3660
|
+
className: yn.text,
|
|
3380
3661
|
children: I?.label ?? c
|
|
3381
3662
|
})]
|
|
3382
3663
|
}), /* @__PURE__ */ h("span", {
|
|
3383
|
-
className:
|
|
3664
|
+
className: yn.chevron,
|
|
3384
3665
|
"aria-hidden": "true",
|
|
3385
3666
|
children: /* @__PURE__ */ h(x, {
|
|
3386
3667
|
size: L,
|
|
@@ -3389,11 +3670,11 @@ function ln({ value: t, onValueChange: n, options: r, search: i, label: a, place
|
|
|
3389
3670
|
})]
|
|
3390
3671
|
}),
|
|
3391
3672
|
children: /* @__PURE__ */ g("div", {
|
|
3392
|
-
className:
|
|
3673
|
+
className: yn.body,
|
|
3393
3674
|
children: [/* @__PURE__ */ g("div", {
|
|
3394
|
-
className:
|
|
3675
|
+
className: yn.search,
|
|
3395
3676
|
children: [/* @__PURE__ */ h("span", {
|
|
3396
|
-
className:
|
|
3677
|
+
className: yn.searchIcon,
|
|
3397
3678
|
"aria-hidden": "true",
|
|
3398
3679
|
children: /* @__PURE__ */ h(M, {
|
|
3399
3680
|
size: 14,
|
|
@@ -3401,7 +3682,7 @@ function ln({ value: t, onValueChange: n, options: r, search: i, label: a, place
|
|
|
3401
3682
|
})
|
|
3402
3683
|
}), /* @__PURE__ */ h("input", {
|
|
3403
3684
|
ref: N,
|
|
3404
|
-
className:
|
|
3685
|
+
className: yn.input,
|
|
3405
3686
|
type: "text",
|
|
3406
3687
|
role: "combobox",
|
|
3407
3688
|
"aria-expanded": "true",
|
|
@@ -3417,12 +3698,12 @@ function ln({ value: t, onValueChange: n, options: r, search: i, label: a, place
|
|
|
3417
3698
|
})]
|
|
3418
3699
|
}), /* @__PURE__ */ g("div", {
|
|
3419
3700
|
ref: P,
|
|
3420
|
-
className:
|
|
3701
|
+
className: yn.list,
|
|
3421
3702
|
id: T,
|
|
3422
3703
|
role: "listbox",
|
|
3423
3704
|
"aria-label": v ?? a,
|
|
3424
3705
|
children: [R.length === 0 && /* @__PURE__ */ h("p", {
|
|
3425
|
-
className:
|
|
3706
|
+
className: yn.empty,
|
|
3426
3707
|
children: p
|
|
3427
3708
|
}), R.map((e, n) => /* @__PURE__ */ g("button", {
|
|
3428
3709
|
type: "button",
|
|
@@ -3430,20 +3711,20 @@ function ln({ value: t, onValueChange: n, options: r, search: i, label: a, place
|
|
|
3430
3711
|
"data-index": n,
|
|
3431
3712
|
role: "option",
|
|
3432
3713
|
"aria-selected": e.value === t,
|
|
3433
|
-
className: `${
|
|
3714
|
+
className: `${yn.item} ${n === A ? yn.active : ""}`,
|
|
3434
3715
|
onPointerMove: () => n !== A && j(n),
|
|
3435
3716
|
onClick: () => B(e),
|
|
3436
3717
|
children: [
|
|
3437
3718
|
e.icon && /* @__PURE__ */ h("span", {
|
|
3438
|
-
className:
|
|
3719
|
+
className: yn.itemIcon,
|
|
3439
3720
|
children: V(e.icon, 14)
|
|
3440
3721
|
}),
|
|
3441
3722
|
/* @__PURE__ */ h("span", {
|
|
3442
|
-
className:
|
|
3723
|
+
className: yn.itemLabel,
|
|
3443
3724
|
children: e.label
|
|
3444
3725
|
}),
|
|
3445
3726
|
e.value === t && /* @__PURE__ */ h("span", {
|
|
3446
|
-
className:
|
|
3727
|
+
className: yn.check,
|
|
3447
3728
|
children: /* @__PURE__ */ h(b, {
|
|
3448
3729
|
size: 14,
|
|
3449
3730
|
color: "currentColor"
|
|
@@ -3456,7 +3737,7 @@ function ln({ value: t, onValueChange: n, options: r, search: i, label: a, place
|
|
|
3456
3737
|
})]
|
|
3457
3738
|
});
|
|
3458
3739
|
}
|
|
3459
|
-
var
|
|
3740
|
+
var Sn = {
|
|
3460
3741
|
empty: "_empty_jzgh0_1",
|
|
3461
3742
|
default: "_default_jzgh0_2",
|
|
3462
3743
|
compact: "_compact_jzgh0_3",
|
|
@@ -3466,13 +3747,13 @@ var un = {
|
|
|
3466
3747
|
actions: "_actions_jzgh0_10"
|
|
3467
3748
|
};
|
|
3468
3749
|
// src/components/EmptyState/EmptyState.tsx
|
|
3469
|
-
function
|
|
3750
|
+
function Cn({ icon: t, title: n, children: r, actions: i, size: a = "default", className: o = "" }) {
|
|
3470
3751
|
return /* @__PURE__ */ g("div", {
|
|
3471
|
-
className: `${
|
|
3752
|
+
className: `${Sn.empty} ${Sn[a]} ${o}`,
|
|
3472
3753
|
role: "status",
|
|
3473
3754
|
children: [
|
|
3474
3755
|
t && /* @__PURE__ */ h("span", {
|
|
3475
|
-
className:
|
|
3756
|
+
className: Sn.icon,
|
|
3476
3757
|
"aria-hidden": "true",
|
|
3477
3758
|
children: e.cloneElement(t, {
|
|
3478
3759
|
size: a === "compact" ? 35 : 70,
|
|
@@ -3480,21 +3761,21 @@ function dn({ icon: t, title: n, children: r, actions: i, size: a = "default", c
|
|
|
3480
3761
|
})
|
|
3481
3762
|
}),
|
|
3482
3763
|
/* @__PURE__ */ h("div", {
|
|
3483
|
-
className:
|
|
3764
|
+
className: Sn.title,
|
|
3484
3765
|
children: n
|
|
3485
3766
|
}),
|
|
3486
3767
|
r && /* @__PURE__ */ h("div", {
|
|
3487
|
-
className:
|
|
3768
|
+
className: Sn.detail,
|
|
3488
3769
|
children: r
|
|
3489
3770
|
}),
|
|
3490
3771
|
i && /* @__PURE__ */ h("div", {
|
|
3491
|
-
className:
|
|
3772
|
+
className: Sn.actions,
|
|
3492
3773
|
children: i
|
|
3493
3774
|
})
|
|
3494
3775
|
]
|
|
3495
3776
|
});
|
|
3496
3777
|
}
|
|
3497
|
-
var
|
|
3778
|
+
var wn = {
|
|
3498
3779
|
overlay: "_overlay_9rhqp_1",
|
|
3499
3780
|
sheet: "_sheet_9rhqp_3",
|
|
3500
3781
|
wide: "_wide_9rhqp_14",
|
|
@@ -3509,7 +3790,7 @@ var fn = {
|
|
|
3509
3790
|
srOnly: "_srOnly_9rhqp_30"
|
|
3510
3791
|
};
|
|
3511
3792
|
// src/components/Sheet/Sheet.tsx
|
|
3512
|
-
function
|
|
3793
|
+
function Tn({ open: e, onOpenChange: t, trigger: n, title: r, description: i, children: a, footer: o, side: s = "right", size: c = "default", className: l = "" }) {
|
|
3513
3794
|
let u = ae(), f = d(null);
|
|
3514
3795
|
return /* @__PURE__ */ g(B.Root, {
|
|
3515
3796
|
open: e,
|
|
@@ -3519,8 +3800,8 @@ function pn({ open: e, onOpenChange: t, trigger: n, title: r, description: i, ch
|
|
|
3519
3800
|
children: n
|
|
3520
3801
|
}), /* @__PURE__ */ g(B.Portal, {
|
|
3521
3802
|
container: u,
|
|
3522
|
-
children: [/* @__PURE__ */ h(B.Overlay, { className:
|
|
3523
|
-
className: `${
|
|
3803
|
+
children: [/* @__PURE__ */ h(B.Overlay, { className: wn.overlay }), /* @__PURE__ */ g(B.Content, {
|
|
3804
|
+
className: `${wn.sheet} ${wn[s]} ${c === "wide" ? wn.wide : ""} ${l}`,
|
|
3524
3805
|
...i ? {} : { "aria-describedby": void 0 },
|
|
3525
3806
|
onOpenAutoFocus: () => {
|
|
3526
3807
|
f.current = document.activeElement;
|
|
@@ -3530,14 +3811,14 @@ function pn({ open: e, onOpenChange: t, trigger: n, title: r, description: i, ch
|
|
|
3530
3811
|
},
|
|
3531
3812
|
children: [
|
|
3532
3813
|
/* @__PURE__ */ g("div", {
|
|
3533
|
-
className:
|
|
3814
|
+
className: wn.header,
|
|
3534
3815
|
children: [/* @__PURE__ */ g("div", {
|
|
3535
|
-
className:
|
|
3816
|
+
className: wn.heading,
|
|
3536
3817
|
children: [/* @__PURE__ */ h(B.Title, {
|
|
3537
|
-
className: r ?
|
|
3818
|
+
className: r ? wn.title : wn.srOnly,
|
|
3538
3819
|
children: r || "Panel"
|
|
3539
3820
|
}), i && /* @__PURE__ */ h(B.Description, {
|
|
3540
|
-
className:
|
|
3821
|
+
className: wn.description,
|
|
3541
3822
|
children: i
|
|
3542
3823
|
})]
|
|
3543
3824
|
}), /* @__PURE__ */ h(B.Close, {
|
|
@@ -3551,11 +3832,11 @@ function pn({ open: e, onOpenChange: t, trigger: n, title: r, description: i, ch
|
|
|
3551
3832
|
})]
|
|
3552
3833
|
}),
|
|
3553
3834
|
/* @__PURE__ */ h("div", {
|
|
3554
|
-
className:
|
|
3835
|
+
className: wn.body,
|
|
3555
3836
|
children: a
|
|
3556
3837
|
}),
|
|
3557
3838
|
o && /* @__PURE__ */ h("div", {
|
|
3558
|
-
className:
|
|
3839
|
+
className: wn.footer,
|
|
3559
3840
|
children: o
|
|
3560
3841
|
})
|
|
3561
3842
|
]
|
|
@@ -3563,17 +3844,17 @@ function pn({ open: e, onOpenChange: t, trigger: n, title: r, description: i, ch
|
|
|
3563
3844
|
})]
|
|
3564
3845
|
});
|
|
3565
3846
|
}
|
|
3566
|
-
var
|
|
3567
|
-
root: "
|
|
3568
|
-
vertical: "
|
|
3569
|
-
pane: "
|
|
3570
|
-
first: "
|
|
3571
|
-
second: "
|
|
3572
|
-
handle: "
|
|
3573
|
-
horizontal: "
|
|
3574
|
-
grip: "
|
|
3575
|
-
},
|
|
3576
|
-
function
|
|
3847
|
+
var En = {
|
|
3848
|
+
root: "_root_1x9y1_1",
|
|
3849
|
+
vertical: "_vertical_1x9y1_2",
|
|
3850
|
+
pane: "_pane_1x9y1_3",
|
|
3851
|
+
first: "_first_1x9y1_4",
|
|
3852
|
+
second: "_second_1x9y1_5",
|
|
3853
|
+
handle: "_handle_1x9y1_8",
|
|
3854
|
+
horizontal: "_horizontal_1x9y1_9",
|
|
3855
|
+
grip: "_grip_1x9y1_16"
|
|
3856
|
+
}, Dn = 2, On = 10;
|
|
3857
|
+
function kn(e) {
|
|
3577
3858
|
if (e) try {
|
|
3578
3859
|
let t = parseFloat(localStorage.getItem(e) ?? "");
|
|
3579
3860
|
return Number.isNaN(t) ? void 0 : t;
|
|
@@ -3581,8 +3862,8 @@ function _n(e) {
|
|
|
3581
3862
|
return;
|
|
3582
3863
|
}
|
|
3583
3864
|
}
|
|
3584
|
-
function
|
|
3585
|
-
let m = (e) => Math.min(a, Math.max(i, e)), [_, v] = f(() => m(
|
|
3865
|
+
function An({ first: e, second: t, direction: n = "horizontal", defaultSize: r = 50, minSize: i = 10, maxSize: a = 90, storageKey: s, onSizeChange: c, withHandle: l = !1, "aria-label": u = "Resize", className: p = "" }) {
|
|
3866
|
+
let m = (e) => Math.min(a, Math.max(i, e)), [_, v] = f(() => m(kn(s) ?? r)), [y, b] = f(!1), x = d(null), S = d(_);
|
|
3586
3867
|
S.current = _;
|
|
3587
3868
|
let C = n === "horizontal", w = (e) => {
|
|
3588
3869
|
if (s) try {
|
|
@@ -3600,16 +3881,16 @@ function vn({ first: e, second: t, direction: n = "horizontal", defaultSize: r =
|
|
|
3600
3881
|
};
|
|
3601
3882
|
}, [y]), /* @__PURE__ */ g("div", {
|
|
3602
3883
|
ref: x,
|
|
3603
|
-
className: `${
|
|
3884
|
+
className: `${En.root} ${C ? En.horizontal : En.vertical} ${p}`,
|
|
3604
3885
|
"data-dragging": y || void 0,
|
|
3605
3886
|
style: { "--resizable-size": `${_}%` },
|
|
3606
3887
|
children: [
|
|
3607
3888
|
/* @__PURE__ */ h("div", {
|
|
3608
|
-
className: `${
|
|
3889
|
+
className: `${En.pane} ${En.first}`,
|
|
3609
3890
|
children: e
|
|
3610
3891
|
}),
|
|
3611
3892
|
/* @__PURE__ */ h("div", {
|
|
3612
|
-
className:
|
|
3893
|
+
className: En.handle,
|
|
3613
3894
|
role: "separator",
|
|
3614
3895
|
tabIndex: 0,
|
|
3615
3896
|
"aria-label": u,
|
|
@@ -3621,37 +3902,37 @@ function vn({ first: e, second: t, direction: n = "horizontal", defaultSize: r =
|
|
|
3621
3902
|
e.button === 0 && (e.preventDefault(), b(!0));
|
|
3622
3903
|
},
|
|
3623
3904
|
onKeyDown: (e) => {
|
|
3624
|
-
let t = C ? "ArrowLeft" : "ArrowUp", n = C ? "ArrowRight" : "ArrowDown", r = e.key === t ? _ -
|
|
3905
|
+
let t = C ? "ArrowLeft" : "ArrowUp", n = C ? "ArrowRight" : "ArrowDown", r = e.key === t ? _ - Dn : e.key === n ? _ + Dn : e.key === "PageUp" ? _ - On : e.key === "PageDown" ? _ + On : e.key === "Home" ? i : e.key === "End" ? a : null;
|
|
3625
3906
|
if (r === null) return;
|
|
3626
3907
|
e.preventDefault();
|
|
3627
3908
|
let o = m(r);
|
|
3628
3909
|
v(o), w(o);
|
|
3629
3910
|
},
|
|
3630
3911
|
children: l && /* @__PURE__ */ h("span", {
|
|
3631
|
-
className:
|
|
3912
|
+
className: En.grip,
|
|
3632
3913
|
"aria-hidden": "true"
|
|
3633
3914
|
})
|
|
3634
3915
|
}),
|
|
3635
3916
|
/* @__PURE__ */ h("div", {
|
|
3636
|
-
className: `${
|
|
3917
|
+
className: `${En.pane} ${En.second}`,
|
|
3637
3918
|
children: t
|
|
3638
3919
|
})
|
|
3639
3920
|
]
|
|
3640
3921
|
});
|
|
3641
3922
|
}
|
|
3642
3923
|
// src/components/TreeCanvas/viewport.ts
|
|
3643
|
-
var
|
|
3644
|
-
function
|
|
3924
|
+
var jn = .2, Mn = 2, Nn = 24, Pn = 1.2, Fn = 48, In = 8;
|
|
3925
|
+
function Ln(e, t, n, r) {
|
|
3645
3926
|
let i = {
|
|
3646
3927
|
x: 0,
|
|
3647
3928
|
y: 0,
|
|
3648
3929
|
z: 1,
|
|
3649
3930
|
pan: r
|
|
3650
|
-
}, a, o = (e) => Math.min(
|
|
3931
|
+
}, a, o = (e) => Math.min(Mn, Math.max(jn, e)), s = () => {
|
|
3651
3932
|
if (t.style.transform = `translate(${i.x}px, ${i.y}px) scale(${i.z})`, n) {
|
|
3652
3933
|
n.style.setProperty("--tree-x", `${i.x}px`), n.style.setProperty("--tree-y", `${i.y}px`), a ??= parseFloat(getComputedStyle(n).getPropertyValue("--tree-tile")) || 12;
|
|
3653
3934
|
let e = i.z;
|
|
3654
|
-
for (; a * e <
|
|
3935
|
+
for (; a * e < In;) e *= 2;
|
|
3655
3936
|
n.style.setProperty("--tree-zoom", `${e}`);
|
|
3656
3937
|
}
|
|
3657
3938
|
let r = e.querySelector("[data-tree-zoom-label]");
|
|
@@ -3675,7 +3956,7 @@ function Tn(e, t, n, r) {
|
|
|
3675
3956
|
e = o(e), i.x = t - (t - i.x) * (e / i.z), i.y = n - (n - i.y) * (e / i.z), i.z = e, s();
|
|
3676
3957
|
}, f = (t) => {
|
|
3677
3958
|
let n = e.getBoundingClientRect(), r = n.width / 2, a = n.height / 2;
|
|
3678
|
-
t === "in" ? d(i.z *
|
|
3959
|
+
t === "in" ? d(i.z * Pn, r, a) : t === "out" ? d(i.z / Pn, r, a) : t === "reset" ? d(1, r, a) : t === "fullscreen" ? p() : u(l());
|
|
3679
3960
|
}, p = () => {
|
|
3680
3961
|
if (document.fullscreenElement) {
|
|
3681
3962
|
document.exitFullscreen?.();
|
|
@@ -3724,10 +4005,10 @@ function Tn(e, t, n, r) {
|
|
|
3724
4005
|
}, x = (t) => {
|
|
3725
4006
|
if (!i.pan || t.altKey || t.ctrlKey || t.metaKey || t.target.closest("input, select, textarea")) return;
|
|
3726
4007
|
let n = e.getBoundingClientRect();
|
|
3727
|
-
if (t.key === "+" || t.key === "=") d(i.z *
|
|
3728
|
-
else if (t.key === "-" || t.key === "_") d(i.z /
|
|
4008
|
+
if (t.key === "+" || t.key === "=") d(i.z * Pn, n.width / 2, n.height / 2);
|
|
4009
|
+
else if (t.key === "-" || t.key === "_") d(i.z / Pn, n.width / 2, n.height / 2);
|
|
3729
4010
|
else if (t.key === "0") f("fit");
|
|
3730
|
-
else if (t.target === e && t.key.startsWith("Arrow")) t.key === "ArrowLeft" && (i.x +=
|
|
4011
|
+
else if (t.target === e && t.key.startsWith("Arrow")) t.key === "ArrowLeft" && (i.x += Fn), t.key === "ArrowRight" && (i.x -= Fn), t.key === "ArrowUp" && (i.y += Fn), t.key === "ArrowDown" && (i.y -= Fn), s();
|
|
3731
4012
|
else return;
|
|
3732
4013
|
t.preventDefault();
|
|
3733
4014
|
}, S = () => {
|
|
@@ -3753,7 +4034,7 @@ function Tn(e, t, n, r) {
|
|
|
3753
4034
|
command: f,
|
|
3754
4035
|
bringIntoView(t) {
|
|
3755
4036
|
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect();
|
|
3756
|
-
r.left < n.left +
|
|
4037
|
+
r.left < n.left + Nn ? i.x += n.left + Nn - r.left : r.right > n.right - Nn && (i.x -= r.right - (n.right - Nn)), r.top < n.top + Nn ? i.y += n.top + Nn - r.top : r.bottom > n.bottom - Nn && (i.y -= r.bottom - (n.bottom - Nn)), s();
|
|
3757
4038
|
},
|
|
3758
4039
|
destroy() {
|
|
3759
4040
|
e.removeEventListener("pointerdown", g), e.removeEventListener("pointermove", _), e.removeEventListener("pointerup", v), e.removeEventListener("pointercancel", v), e.removeEventListener("click", y, !0), e.removeEventListener("wheel", b), e.removeEventListener("keydown", x), e.removeEventListener("scroll", S);
|
|
@@ -3761,44 +4042,44 @@ function Tn(e, t, n, r) {
|
|
|
3761
4042
|
};
|
|
3762
4043
|
}
|
|
3763
4044
|
var Z = {
|
|
3764
|
-
canvas: "
|
|
3765
|
-
view: "
|
|
3766
|
-
sheet: "
|
|
3767
|
-
edges: "
|
|
3768
|
-
handles: "
|
|
3769
|
-
edge: "
|
|
3770
|
-
edgeLit: "
|
|
3771
|
-
edgeMuted: "
|
|
3772
|
-
handle: "
|
|
3773
|
-
handleLit: "
|
|
3774
|
-
slot: "
|
|
3775
|
-
pill: "
|
|
3776
|
-
pillPath: "
|
|
3777
|
-
pillSelected: "
|
|
3778
|
-
muted: "
|
|
3779
|
-
name: "
|
|
3780
|
-
chip: "
|
|
3781
|
-
mark: "
|
|
3782
|
-
toggle: "
|
|
3783
|
-
disclosure: "
|
|
3784
|
-
more: "
|
|
3785
|
-
listWrap: "
|
|
3786
|
-
list: "
|
|
3787
|
-
row: "
|
|
3788
|
-
rowSelected: "
|
|
3789
|
-
rowName: "
|
|
3790
|
-
disclosureSpace: "
|
|
3791
|
-
empty: "
|
|
3792
|
-
grid: "
|
|
3793
|
-
controls: "
|
|
3794
|
-
zoomLabel: "
|
|
3795
|
-
pannable: "
|
|
3796
|
-
},
|
|
3797
|
-
function
|
|
3798
|
-
let n = e.label.length *
|
|
3799
|
-
return
|
|
4045
|
+
canvas: "_canvas_1249l_3",
|
|
4046
|
+
view: "_view_1249l_19",
|
|
4047
|
+
sheet: "_sheet_1249l_26",
|
|
4048
|
+
edges: "_edges_1249l_32",
|
|
4049
|
+
handles: "_handles_1249l_33",
|
|
4050
|
+
edge: "_edge_1249l_32",
|
|
4051
|
+
edgeLit: "_edgeLit_1249l_53",
|
|
4052
|
+
edgeMuted: "_edgeMuted_1249l_59",
|
|
4053
|
+
handle: "_handle_1249l_33",
|
|
4054
|
+
handleLit: "_handleLit_1249l_70",
|
|
4055
|
+
slot: "_slot_1249l_75",
|
|
4056
|
+
pill: "_pill_1249l_82",
|
|
4057
|
+
pillPath: "_pillPath_1249l_109",
|
|
4058
|
+
pillSelected: "_pillSelected_1249l_113",
|
|
4059
|
+
muted: "_muted_1249l_120",
|
|
4060
|
+
name: "_name_1249l_124",
|
|
4061
|
+
chip: "_chip_1249l_131",
|
|
4062
|
+
mark: "_mark_1249l_149",
|
|
4063
|
+
toggle: "_toggle_1249l_160",
|
|
4064
|
+
disclosure: "_disclosure_1249l_166",
|
|
4065
|
+
more: "_more_1249l_187",
|
|
4066
|
+
listWrap: "_listWrap_1249l_206",
|
|
4067
|
+
list: "_list_1249l_206",
|
|
4068
|
+
row: "_row_1249l_217",
|
|
4069
|
+
rowSelected: "_rowSelected_1249l_226",
|
|
4070
|
+
rowName: "_rowName_1249l_230",
|
|
4071
|
+
disclosureSpace: "_disclosureSpace_1249l_251",
|
|
4072
|
+
empty: "_empty_1249l_257",
|
|
4073
|
+
grid: "_grid_1249l_267",
|
|
4074
|
+
controls: "_controls_1249l_288",
|
|
4075
|
+
zoomLabel: "_zoomLabel_1249l_309",
|
|
4076
|
+
pannable: "_pannable_1249l_316"
|
|
4077
|
+
}, Rn = 44, zn = 5, Bn = 56, Vn = 24, Hn = 7, Un = 10;
|
|
4078
|
+
function Wn(e, t) {
|
|
4079
|
+
let n = e.label.length * Hn, r = e.count == null ? 0 : (t ? t(e.count) : e.count.toLocaleString()).length * 6 + Un + 8, i = (e.marks?.length ?? 0) * 20, a = e.children?.length ? 18 : 0;
|
|
4080
|
+
return Vn + n + r + i + a;
|
|
3800
4081
|
}
|
|
3801
|
-
function
|
|
4082
|
+
function Gn({ roots: e, selected: t, onSelect: n, defaultExpanded: r, view: i = "tree", maxChildren: a = 50, format: s, visible: c, zoom: p, openDepth: m, pan: _ = !0, fullscreen: v = !0, pattern: y, "aria-label": b, className: x = "" }) {
|
|
3802
4083
|
let [S, C] = f(() => new Set(r ?? e.map((e) => e.id))), [w, T] = f(() => /* @__PURE__ */ new Set());
|
|
3803
4084
|
o(() => {
|
|
3804
4085
|
if (m == null) return;
|
|
@@ -3811,7 +4092,7 @@ function Nn({ roots: e, selected: t, onSelect: n, defaultExpanded: r, view: i =
|
|
|
3811
4092
|
l(() => {
|
|
3812
4093
|
let e = N.current, t = P.current;
|
|
3813
4094
|
if (!e || !t) return;
|
|
3814
|
-
let n =
|
|
4095
|
+
let n = Ln(e, t, F.current, _);
|
|
3815
4096
|
return I.current = n, () => {
|
|
3816
4097
|
n.destroy(), I.current = null;
|
|
3817
4098
|
};
|
|
@@ -3862,7 +4143,7 @@ function Nn({ roots: e, selected: t, onSelect: n, defaultExpanded: r, view: i =
|
|
|
3862
4143
|
depth: o,
|
|
3863
4144
|
x: 0,
|
|
3864
4145
|
y: 0,
|
|
3865
|
-
width: E.get(i.id) ??
|
|
4146
|
+
width: E.get(i.id) ?? Wn(i, s),
|
|
3866
4147
|
parent: c,
|
|
3867
4148
|
open: l,
|
|
3868
4149
|
more: d
|
|
@@ -3870,19 +4151,19 @@ function Nn({ roots: e, selected: t, onSelect: n, defaultExpanded: r, view: i =
|
|
|
3870
4151
|
if (t[o] = Math.max(t[o] ?? 0, f.width), e.push(f), u.length) {
|
|
3871
4152
|
let e = u.map((e) => r(e, o + 1, f));
|
|
3872
4153
|
f.y = (e[0].y + e[e.length - 1].y) / 2, d > 0 && (n += 1);
|
|
3873
|
-
} else f.y = n *
|
|
4154
|
+
} else f.y = n * Rn + Rn / 2, n += 1;
|
|
3874
4155
|
return f;
|
|
3875
4156
|
};
|
|
3876
4157
|
ee.forEach((e) => r(e, 0));
|
|
3877
4158
|
let i = [], o = 0;
|
|
3878
4159
|
return t.forEach((e, t) => {
|
|
3879
|
-
i[t] = o, o += e +
|
|
4160
|
+
i[t] = o, o += e + Bn;
|
|
3880
4161
|
}), e.forEach((e) => {
|
|
3881
4162
|
e.x = i[e.depth];
|
|
3882
4163
|
}), {
|
|
3883
4164
|
placed: e,
|
|
3884
4165
|
columns: i,
|
|
3885
|
-
height: Math.max(n, 1) *
|
|
4166
|
+
height: Math.max(n, 1) * Rn
|
|
3886
4167
|
};
|
|
3887
4168
|
}, [
|
|
3888
4169
|
ee,
|
|
@@ -3987,7 +4268,7 @@ function Nn({ roots: e, selected: t, onSelect: n, defaultExpanded: r, view: i =
|
|
|
3987
4268
|
style: {
|
|
3988
4269
|
"--tree-pattern": `var(--pattern-${y}-light)`,
|
|
3989
4270
|
"--tree-pattern-dark": `var(--pattern-${y}-dark)`,
|
|
3990
|
-
"--tree-tile": `${
|
|
4271
|
+
"--tree-tile": `${Kn(y)}px`
|
|
3991
4272
|
}
|
|
3992
4273
|
}),
|
|
3993
4274
|
H.length === 0 && /* @__PURE__ */ h("div", {
|
|
@@ -4067,8 +4348,8 @@ function Nn({ roots: e, selected: t, onSelect: n, defaultExpanded: r, view: i =
|
|
|
4067
4348
|
type: "button",
|
|
4068
4349
|
className: Z.more,
|
|
4069
4350
|
style: {
|
|
4070
|
-
left: (U[e.depth + 1] ?? e.x + e.width +
|
|
4071
|
-
top: (
|
|
4351
|
+
left: (U[e.depth + 1] ?? e.x + e.width + Bn) - e.x,
|
|
4352
|
+
top: (qn(H, e) + 1) * Rn - (e.y - 15)
|
|
4072
4353
|
},
|
|
4073
4354
|
onClick: () => T((e) => new Set(e).add(n.id)),
|
|
4074
4355
|
children: [
|
|
@@ -4088,16 +4369,16 @@ function Nn({ roots: e, selected: t, onSelect: n, defaultExpanded: r, view: i =
|
|
|
4088
4369
|
let n = B.has(e.node.id);
|
|
4089
4370
|
return /* @__PURE__ */ g("g", { children: [e.parent && /* @__PURE__ */ h("rect", {
|
|
4090
4371
|
className: `${Z.handle} ${n ? Z.handleLit : ""}`,
|
|
4091
|
-
x: e.x -
|
|
4092
|
-
y: e.y -
|
|
4093
|
-
width:
|
|
4094
|
-
height:
|
|
4372
|
+
x: e.x - zn / 2,
|
|
4373
|
+
y: e.y - zn / 2,
|
|
4374
|
+
width: zn,
|
|
4375
|
+
height: zn
|
|
4095
4376
|
}), e.open && /* @__PURE__ */ h("rect", {
|
|
4096
4377
|
className: `${Z.handle} ${n && e.node.id !== t ? Z.handleLit : ""}`,
|
|
4097
|
-
x: e.x + e.width -
|
|
4098
|
-
y: e.y -
|
|
4099
|
-
width:
|
|
4100
|
-
height:
|
|
4378
|
+
x: e.x + e.width - zn / 2,
|
|
4379
|
+
y: e.y - zn / 2,
|
|
4380
|
+
width: zn,
|
|
4381
|
+
height: zn
|
|
4101
4382
|
})] }, e.node.id);
|
|
4102
4383
|
})
|
|
4103
4384
|
})
|
|
@@ -4110,7 +4391,7 @@ function Nn({ roots: e, selected: t, onSelect: n, defaultExpanded: r, view: i =
|
|
|
4110
4391
|
"aria-label": "Zoom",
|
|
4111
4392
|
"data-tree-controls": "",
|
|
4112
4393
|
children: [
|
|
4113
|
-
/* @__PURE__ */ h(
|
|
4394
|
+
/* @__PURE__ */ h(fn, {
|
|
4114
4395
|
content: "Zoom in (+)",
|
|
4115
4396
|
position: "right",
|
|
4116
4397
|
children: /* @__PURE__ */ h(W, {
|
|
@@ -4121,7 +4402,7 @@ function Nn({ roots: e, selected: t, onSelect: n, defaultExpanded: r, view: i =
|
|
|
4121
4402
|
"data-tree-action": "in"
|
|
4122
4403
|
})
|
|
4123
4404
|
}),
|
|
4124
|
-
/* @__PURE__ */ h(
|
|
4405
|
+
/* @__PURE__ */ h(fn, {
|
|
4125
4406
|
content: "Zoom out (-)",
|
|
4126
4407
|
position: "right",
|
|
4127
4408
|
children: /* @__PURE__ */ h(W, {
|
|
@@ -4132,7 +4413,7 @@ function Nn({ roots: e, selected: t, onSelect: n, defaultExpanded: r, view: i =
|
|
|
4132
4413
|
"data-tree-action": "out"
|
|
4133
4414
|
})
|
|
4134
4415
|
}),
|
|
4135
|
-
/* @__PURE__ */ h(
|
|
4416
|
+
/* @__PURE__ */ h(fn, {
|
|
4136
4417
|
content: "Fit in view (0)",
|
|
4137
4418
|
position: "right",
|
|
4138
4419
|
children: /* @__PURE__ */ h(W, {
|
|
@@ -4143,7 +4424,7 @@ function Nn({ roots: e, selected: t, onSelect: n, defaultExpanded: r, view: i =
|
|
|
4143
4424
|
"data-tree-action": "fit"
|
|
4144
4425
|
})
|
|
4145
4426
|
}),
|
|
4146
|
-
v && /* @__PURE__ */ h(
|
|
4427
|
+
v && /* @__PURE__ */ h(fn, {
|
|
4147
4428
|
content: "Full screen (Esc to leave)",
|
|
4148
4429
|
position: "right",
|
|
4149
4430
|
children: /* @__PURE__ */ h(W, {
|
|
@@ -4154,7 +4435,7 @@ function Nn({ roots: e, selected: t, onSelect: n, defaultExpanded: r, view: i =
|
|
|
4154
4435
|
"data-tree-action": "fullscreen"
|
|
4155
4436
|
})
|
|
4156
4437
|
}),
|
|
4157
|
-
/* @__PURE__ */ h(
|
|
4438
|
+
/* @__PURE__ */ h(fn, {
|
|
4158
4439
|
content: "Zoom to 100%",
|
|
4159
4440
|
position: "right",
|
|
4160
4441
|
children: /* @__PURE__ */ h(W, {
|
|
@@ -4173,118 +4454,136 @@ function Nn({ roots: e, selected: t, onSelect: n, defaultExpanded: r, view: i =
|
|
|
4173
4454
|
]
|
|
4174
4455
|
});
|
|
4175
4456
|
}
|
|
4176
|
-
function
|
|
4457
|
+
function Kn(e) {
|
|
4177
4458
|
let t = Number(e.slice(e.lastIndexOf("-") + 1));
|
|
4178
4459
|
return Number.isFinite(t) ? t : 2;
|
|
4179
4460
|
}
|
|
4180
|
-
function
|
|
4461
|
+
function qn(e, t) {
|
|
4181
4462
|
let n = e.filter((e) => e.parent === t), r = n[n.length - 1];
|
|
4182
|
-
return Math.round(r ? (r.y -
|
|
4463
|
+
return Math.round(r ? (r.y - Rn / 2) / Rn : (t.y - Rn / 2) / Rn);
|
|
4183
4464
|
}
|
|
4184
|
-
var
|
|
4185
|
-
chip: "
|
|
4186
|
-
large: "
|
|
4465
|
+
var Jn = {
|
|
4466
|
+
chip: "_chip_otthl_1",
|
|
4467
|
+
large: "_large_otthl_14",
|
|
4468
|
+
toggle: "_toggle_otthl_20",
|
|
4469
|
+
selected: "_selected_otthl_38"
|
|
4187
4470
|
};
|
|
4188
4471
|
// src/components/Chip/Chip.tsx
|
|
4189
|
-
function
|
|
4190
|
-
let
|
|
4191
|
-
|
|
4472
|
+
function Yn({ children: t, color: n, textColor: r, className: i, title: a, icon: o, size: s = "default", onClick: c, selected: l = !1, disabled: u = !1 }) {
|
|
4473
|
+
let d = {};
|
|
4474
|
+
n && (d.backgroundColor = n), r && (d.color = r);
|
|
4475
|
+
let f = [
|
|
4476
|
+
Jn.chip,
|
|
4477
|
+
"indx-chip",
|
|
4478
|
+
s === "large" && Jn.large,
|
|
4479
|
+
i
|
|
4480
|
+
], p = /* @__PURE__ */ g(m, { children: [o && e.cloneElement(o, {
|
|
4481
|
+
size: 14,
|
|
4482
|
+
color: "currentColor"
|
|
4483
|
+
}), t] });
|
|
4484
|
+
return c ? /* @__PURE__ */ h("button", {
|
|
4485
|
+
type: "button",
|
|
4192
4486
|
className: [
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
i
|
|
4487
|
+
...f,
|
|
4488
|
+
Jn.toggle,
|
|
4489
|
+
l && Jn.selected
|
|
4197
4490
|
].filter(Boolean).join(" "),
|
|
4198
|
-
style:
|
|
4199
|
-
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
|
|
4491
|
+
style: d,
|
|
4492
|
+
title: a,
|
|
4493
|
+
"aria-pressed": l,
|
|
4494
|
+
disabled: u,
|
|
4495
|
+
onClick: c,
|
|
4496
|
+
children: p
|
|
4497
|
+
}) : /* @__PURE__ */ h("span", {
|
|
4498
|
+
className: f.filter(Boolean).join(" "),
|
|
4499
|
+
style: d,
|
|
4500
|
+
title: a,
|
|
4501
|
+
children: p
|
|
4203
4502
|
});
|
|
4204
4503
|
}
|
|
4205
|
-
var
|
|
4206
|
-
root: "
|
|
4207
|
-
icon: "
|
|
4208
|
-
body: "
|
|
4209
|
-
title: "
|
|
4210
|
-
description: "
|
|
4211
|
-
default: "
|
|
4212
|
-
info: "
|
|
4213
|
-
success: "
|
|
4214
|
-
warning: "
|
|
4215
|
-
destructive: "
|
|
4216
|
-
},
|
|
4504
|
+
var Xn = {
|
|
4505
|
+
root: "_root_1ptcs_3",
|
|
4506
|
+
icon: "_icon_1ptcs_16",
|
|
4507
|
+
body: "_body_1ptcs_17",
|
|
4508
|
+
title: "_title_1ptcs_18",
|
|
4509
|
+
description: "_description_1ptcs_19",
|
|
4510
|
+
default: "_default_1ptcs_22",
|
|
4511
|
+
info: "_info_1ptcs_23",
|
|
4512
|
+
success: "_success_1ptcs_24",
|
|
4513
|
+
warning: "_warning_1ptcs_25",
|
|
4514
|
+
destructive: "_destructive_1ptcs_26"
|
|
4515
|
+
}, Zn = {
|
|
4217
4516
|
success: /* @__PURE__ */ h(b, {}),
|
|
4218
4517
|
warning: /* @__PURE__ */ h(P, {}),
|
|
4219
4518
|
destructive: /* @__PURE__ */ h(P, {})
|
|
4220
4519
|
};
|
|
4221
|
-
function
|
|
4520
|
+
function Qn(t) {
|
|
4222
4521
|
return e.isValidElement(t) ? e.cloneElement(t, {
|
|
4223
4522
|
size: 14,
|
|
4224
4523
|
color: "currentColor"
|
|
4225
4524
|
}) : t;
|
|
4226
4525
|
}
|
|
4227
|
-
var
|
|
4228
|
-
let a = t === void 0 ?
|
|
4526
|
+
var $n = ({ variant: e = "default", icon: t, className: n = "", children: r, role: i }) => {
|
|
4527
|
+
let a = t === void 0 ? Zn[e] : t;
|
|
4229
4528
|
return /* @__PURE__ */ g("div", {
|
|
4230
4529
|
role: i ?? (e === "destructive" || e === "warning" ? "alert" : "status"),
|
|
4231
|
-
className: `${
|
|
4530
|
+
className: `${Xn.root} ${Xn[e]} ${n}`,
|
|
4232
4531
|
children: [a && /* @__PURE__ */ h("span", {
|
|
4233
|
-
className:
|
|
4532
|
+
className: Xn.icon,
|
|
4234
4533
|
"aria-hidden": "true",
|
|
4235
|
-
children:
|
|
4534
|
+
children: Qn(a)
|
|
4236
4535
|
}), /* @__PURE__ */ h("div", {
|
|
4237
|
-
className:
|
|
4536
|
+
className: Xn.body,
|
|
4238
4537
|
children: r
|
|
4239
4538
|
})]
|
|
4240
4539
|
});
|
|
4241
|
-
},
|
|
4242
|
-
className: `${
|
|
4540
|
+
}, er = ({ children: e, className: t = "" }) => /* @__PURE__ */ h("div", {
|
|
4541
|
+
className: `${Xn.title} ${t}`,
|
|
4243
4542
|
children: e
|
|
4244
|
-
}),
|
|
4245
|
-
className: `${
|
|
4543
|
+
}), tr = ({ children: e, className: t = "" }) => /* @__PURE__ */ h("div", {
|
|
4544
|
+
className: `${Xn.description} ${t}`,
|
|
4246
4545
|
children: e
|
|
4247
|
-
}),
|
|
4546
|
+
}), nr = {
|
|
4248
4547
|
root: "_root_1aak8_10",
|
|
4249
4548
|
main: "_main_1aak8_33",
|
|
4250
4549
|
aside: "_aside_1aak8_34",
|
|
4251
4550
|
message: "_message_1aak8_41"
|
|
4252
|
-
},
|
|
4551
|
+
}, rr = ({ visible: e = !0, message: t, aside: n, children: r, className: i = "", "aria-label": a = "Unsaved changes" }) => e ? /* @__PURE__ */ g("div", {
|
|
4253
4552
|
role: "region",
|
|
4254
4553
|
"aria-label": a,
|
|
4255
|
-
className: `${
|
|
4554
|
+
className: `${nr.root} ${i}`,
|
|
4256
4555
|
children: [/* @__PURE__ */ g("div", {
|
|
4257
|
-
className:
|
|
4556
|
+
className: nr.main,
|
|
4258
4557
|
children: [r, t && /* @__PURE__ */ h("span", {
|
|
4259
|
-
className:
|
|
4558
|
+
className: nr.message,
|
|
4260
4559
|
children: t
|
|
4261
4560
|
})]
|
|
4262
4561
|
}), n && /* @__PURE__ */ h("div", {
|
|
4263
|
-
className:
|
|
4562
|
+
className: nr.aside,
|
|
4264
4563
|
children: n
|
|
4265
4564
|
})]
|
|
4266
4565
|
}) : null, Q = {
|
|
4267
|
-
wrapper: "
|
|
4268
|
-
chart: "
|
|
4269
|
-
svg: "
|
|
4270
|
-
tooltip: "
|
|
4271
|
-
tooltipLabel: "
|
|
4272
|
-
tooltipRow: "
|
|
4273
|
-
tooltipDot: "
|
|
4274
|
-
tooltipName: "
|
|
4275
|
-
tooltipValue: "
|
|
4276
|
-
tooltipRange: "
|
|
4277
|
-
tooltipRangeValue: "
|
|
4278
|
-
tooltipTotal: "
|
|
4279
|
-
legend: "
|
|
4280
|
-
legendItem: "
|
|
4281
|
-
legendMark: "
|
|
4282
|
-
legendSwatch: "
|
|
4283
|
-
legendLabel: "
|
|
4284
|
-
marker: "
|
|
4285
|
-
tooltipMarker: "
|
|
4286
|
-
markerDot: "
|
|
4287
|
-
},
|
|
4566
|
+
wrapper: "_wrapper_yrzff_1",
|
|
4567
|
+
chart: "_chart_yrzff_8",
|
|
4568
|
+
svg: "_svg_yrzff_40",
|
|
4569
|
+
tooltip: "_tooltip_yrzff_48",
|
|
4570
|
+
tooltipLabel: "_tooltipLabel_yrzff_58",
|
|
4571
|
+
tooltipRow: "_tooltipRow_yrzff_66",
|
|
4572
|
+
tooltipDot: "_tooltipDot_yrzff_73",
|
|
4573
|
+
tooltipName: "_tooltipName_yrzff_79",
|
|
4574
|
+
tooltipValue: "_tooltipValue_yrzff_86",
|
|
4575
|
+
tooltipRange: "_tooltipRange_yrzff_93",
|
|
4576
|
+
tooltipRangeValue: "_tooltipRangeValue_yrzff_97",
|
|
4577
|
+
tooltipTotal: "_tooltipTotal_yrzff_103",
|
|
4578
|
+
legend: "_legend_yrzff_110",
|
|
4579
|
+
legendItem: "_legendItem_yrzff_117",
|
|
4580
|
+
legendMark: "_legendMark_yrzff_123",
|
|
4581
|
+
legendSwatch: "_legendSwatch_yrzff_130",
|
|
4582
|
+
legendLabel: "_legendLabel_yrzff_135",
|
|
4583
|
+
marker: "_marker_yrzff_142",
|
|
4584
|
+
tooltipMarker: "_tooltipMarker_yrzff_146",
|
|
4585
|
+
markerDot: "_markerDot_yrzff_150"
|
|
4586
|
+
}, ir = "var(--lv4)", ar = 12, or = 20, sr = 8, cr = 28, lr = 20, ur = {
|
|
4288
4587
|
hatch: [
|
|
4289
4588
|
[
|
|
4290
4589
|
0,
|
|
@@ -4328,22 +4627,22 @@ var Vn = ({ variant: e = "default", icon: t, className: n = "", children: r, rol
|
|
|
4328
4627
|
2,
|
|
4329
4628
|
2
|
|
4330
4629
|
]]
|
|
4331
|
-
},
|
|
4332
|
-
function
|
|
4630
|
+
}, dr = .14, fr = "var(--CSignal)";
|
|
4631
|
+
function pr(e, t = 4) {
|
|
4333
4632
|
let n = e / t || 1, r = 10 ** Math.floor(Math.log10(n)), i = n / r;
|
|
4334
4633
|
return (i <= 1 ? 1 : i <= 2 ? 2 : i <= 5 ? 5 : 10) * r;
|
|
4335
4634
|
}
|
|
4336
|
-
function
|
|
4635
|
+
function mr(e) {
|
|
4337
4636
|
let t = Math.abs(e);
|
|
4338
|
-
return t >= 1e6 ? `${
|
|
4637
|
+
return t >= 1e6 ? `${hr(e / 1e6)}M` : t >= 1e3 ? `${hr(e / 1e3)}k` : hr(e);
|
|
4339
4638
|
}
|
|
4340
|
-
function
|
|
4639
|
+
function hr(e) {
|
|
4341
4640
|
return e.toLocaleString(void 0, { maximumFractionDigits: Math.abs(e) < 10 ? 2 : 1 });
|
|
4342
4641
|
}
|
|
4343
|
-
function
|
|
4642
|
+
function gr(e) {
|
|
4344
4643
|
return Number.isInteger(e) ? String(e) : e.toLocaleString(void 0, { maximumFractionDigits: 2 });
|
|
4345
4644
|
}
|
|
4346
|
-
function
|
|
4645
|
+
function _r({ series: t, labels: n, type: r = "line", height: a = 200, showLegend: c = !0, className: l, markers: u, yAxis: p = "none", yFormat: _ = mr, references: v, stacked: y = !1 }) {
|
|
4347
4646
|
let b = y && r === "bar", x = d(null), S = s(), [C, w] = f(0), [T, E] = f(null);
|
|
4348
4647
|
o(() => {
|
|
4349
4648
|
let e = x.current;
|
|
@@ -4351,25 +4650,25 @@ function ar({ series: t, labels: n, type: r = "line", height: a = 200, showLegen
|
|
|
4351
4650
|
let t = new ResizeObserver(([e]) => w(e.contentRect.width));
|
|
4352
4651
|
return t.observe(e), w(e.clientWidth), () => t.disconnect();
|
|
4353
4652
|
}, []);
|
|
4354
|
-
let D = n?.length ?
|
|
4653
|
+
let D = n?.length ? cr : sr, O = Math.max(a - ar - D, 0), k = Math.max(...t.map((e) => e.data.length), 0), A = b ? Array.from({ length: k }, (e, n) => t.reduce((e, t) => e + Math.max(0, t.data[n] ?? 0), 0)) : [], j = b ? A : t.flatMap((e) => [...e.data, ...r === "line" ? [...e.low ?? [], ...e.high ?? []] : []].filter(Number.isFinite)), M = (v ?? []).map((e) => e.value).filter(Number.isFinite), N = j.length || M.length ? Math.max(...j, ...M, 0) : 1, P = r === "bar" ? Math.min(0, ...M) : Math.min(...j, ...M, 0), F = p !== "none", I = pr(N - P);
|
|
4355
4654
|
F && (N = Math.ceil(N / I - 1e-9) * I, P = Math.floor(P / I + 1e-9) * I);
|
|
4356
4655
|
let L = N - P || 1, R = [];
|
|
4357
4656
|
if (F) for (let e = P; e <= N + I / 2; e += I) R.push(Number(e.toFixed(10)));
|
|
4358
|
-
let z = (e) => e.label ?? _(e.value), B = F ? Math.max(...R.map((e) => _(e).length)) * 6 + 10 : 0, ee = v?.length ? Math.max(...v.map((e) => z(e).length)) * 6 + 8 : 0, V = p === "left" ? B + 4 :
|
|
4657
|
+
let z = (e) => e.label ?? _(e.value), B = F ? Math.max(...R.map((e) => _(e).length)) * 6 + 10 : 0, ee = v?.length ? Math.max(...v.map((e) => z(e).length)) * 6 + 8 : 0, V = p === "left" ? B + 4 : lr, te = Math.max(p === "right" ? B + 4 : or, ee ? ee + 6 : 0), H = Math.max(C - V - te, 0), U = Math.max(...t.map((e) => e.data.length), 0), ne = (() => {
|
|
4359
4658
|
if (!n || n.length <= 1 || H <= 0) return 1;
|
|
4360
4659
|
let e = Math.max(...n.map((e) => e.length)) * 6 + 12, t = Math.max(Math.floor(H / e), 1);
|
|
4361
4660
|
return Math.ceil(n.length / t);
|
|
4362
|
-
})(), W = U <= 1 || H / (U - 1) >= 12, re = (e) =>
|
|
4661
|
+
})(), W = U <= 1 || H / (U - 1) >= 12, re = (e) => ar + (1 - (e - P) / L) * O, ie = re(Math.max(P, 0)), ae = (e, t, n = e.length) => {
|
|
4363
4662
|
let r = [];
|
|
4364
4663
|
for (let i = 0; i < n; i++) t && i > 0 && r.push(`${me(i).toFixed(2)},${re(e[i - 1]).toFixed(2)}`), r.push(`${me(i).toFixed(2)},${re(e[i]).toFixed(2)}`);
|
|
4365
4664
|
return r;
|
|
4366
|
-
}, oe = (v ?? []).filter((e) => e.signal && Number.isFinite(e.value)), se = oe.length ? re(Math.min(...oe.map((e) => e.value))) : null, ce = `${S}-signal`, le = (e) => e.fill ?? (r === "bar" ? "solid" : "none"), ue = (e) => e.color ?? (r === "bar" ? "var(--chart-bar)" :
|
|
4665
|
+
}, oe = (v ?? []).filter((e) => e.signal && Number.isFinite(e.value)), se = oe.length ? re(Math.min(...oe.map((e) => e.value))) : null, ce = `${S}-signal`, le = (e) => e.fill ?? (r === "bar" ? "solid" : "none"), ue = (e) => e.color ?? (r === "bar" ? "var(--chart-bar)" : ir), de = (e) => `url(#${S}-${e})`, fe = (e, t) => {
|
|
4367
4666
|
let n = le(e);
|
|
4368
4667
|
return n === "hatch" || n === "dots" || n === "checker" ? de(t) : ue(e);
|
|
4369
|
-
}, pe = t.some((e) => le(e) in
|
|
4668
|
+
}, pe = t.some((e) => le(e) in ur) ? /* @__PURE__ */ h("defs", { children: t.map((e, t) => {
|
|
4370
4669
|
let n = le(e);
|
|
4371
|
-
if (!(n in
|
|
4372
|
-
let r =
|
|
4670
|
+
if (!(n in ur)) return null;
|
|
4671
|
+
let r = ur[n];
|
|
4373
4672
|
return /* @__PURE__ */ h("pattern", {
|
|
4374
4673
|
id: `${S}-${t}`,
|
|
4375
4674
|
width: 4,
|
|
@@ -4409,9 +4708,9 @@ function ar({ series: t, labels: n, type: r = "line", height: a = 200, showLegen
|
|
|
4409
4708
|
e.pointerType === "mouse" && E(null);
|
|
4410
4709
|
}, []), _e = F ? null : /* @__PURE__ */ h("line", {
|
|
4411
4710
|
x1: V,
|
|
4412
|
-
y1:
|
|
4711
|
+
y1: ar + O * .5,
|
|
4413
4712
|
x2: V + H,
|
|
4414
|
-
y2:
|
|
4713
|
+
y2: ar + O * .5,
|
|
4415
4714
|
stroke: "var(--chart-midline)",
|
|
4416
4715
|
strokeWidth: "0.5"
|
|
4417
4716
|
}), ve = (v ?? []).filter((e) => Number.isFinite(e.value)).map((e) => re(e.value)), ye = (e) => p === "right" && ve.some((t) => Math.abs(t - e) < 12), be = F ? /* @__PURE__ */ h("g", { children: R.map((e) => {
|
|
@@ -4460,36 +4759,36 @@ function ar({ series: t, labels: n, type: r = "line", height: a = 200, showLegen
|
|
|
4460
4759
|
] }, t);
|
|
4461
4760
|
}), xe = /* @__PURE__ */ h("line", {
|
|
4462
4761
|
x1: V,
|
|
4463
|
-
y1:
|
|
4762
|
+
y1: ar + O,
|
|
4464
4763
|
x2: V + H,
|
|
4465
|
-
y2:
|
|
4764
|
+
y2: ar + O,
|
|
4466
4765
|
stroke: "var(--chart-baseline)",
|
|
4467
4766
|
strokeWidth: "1"
|
|
4468
4767
|
}), Se = T && r === "bar" ? (() => {
|
|
4469
4768
|
let e = H / U;
|
|
4470
4769
|
return /* @__PURE__ */ h("rect", {
|
|
4471
4770
|
x: V + T.index * e,
|
|
4472
|
-
y:
|
|
4771
|
+
y: ar,
|
|
4473
4772
|
width: e,
|
|
4474
4773
|
height: O,
|
|
4475
4774
|
fill: "var(--chart-column-hover)"
|
|
4476
4775
|
});
|
|
4477
4776
|
})() : null, Ce = (e) => t.map((t, n) => {
|
|
4478
4777
|
if (!t.data.length) return null;
|
|
4479
|
-
let r = e ?? t.color ??
|
|
4778
|
+
let r = e ?? t.color ?? ir, i = ae(t.data, t.step).join(" "), a = le(t), o = !e && !!(t.low && t.high && t.low.length && t.high.length), s = o ? (() => {
|
|
4480
4779
|
let e = Math.min(t.data.length, t.low.length, t.high.length);
|
|
4481
4780
|
if (e < 2) return null;
|
|
4482
|
-
let i = ae(t.high, t.step, e), o = ae(t.low, t.step, e).reverse(), s = a in
|
|
4781
|
+
let i = ae(t.high, t.step, e), o = ae(t.low, t.step, e).reverse(), s = a in ur;
|
|
4483
4782
|
return /* @__PURE__ */ h("polygon", {
|
|
4484
4783
|
points: [...i, ...o].join(" "),
|
|
4485
4784
|
fill: s ? de(n) : r,
|
|
4486
|
-
fillOpacity: s ? 1 :
|
|
4785
|
+
fillOpacity: s ? 1 : dr,
|
|
4487
4786
|
stroke: "none"
|
|
4488
4787
|
});
|
|
4489
4788
|
})() : null, c = !e && !o && a !== "none" && t.data.length > 1 ? /* @__PURE__ */ h("polygon", {
|
|
4490
4789
|
points: `${me(0).toFixed(2)},${ie.toFixed(2)} ${i} ${me(t.data.length - 1).toFixed(2)},${ie.toFixed(2)}`,
|
|
4491
4790
|
fill: fe(t, n),
|
|
4492
|
-
fillOpacity: a === "solid" ?
|
|
4791
|
+
fillOpacity: a === "solid" ? dr : 1,
|
|
4493
4792
|
stroke: "none"
|
|
4494
4793
|
}) : null;
|
|
4495
4794
|
return /* @__PURE__ */ g("g", { children: [
|
|
@@ -4518,7 +4817,7 @@ function ar({ series: t, labels: n, type: r = "line", height: a = 200, showLegen
|
|
|
4518
4817
|
] }, `${e ? "signal-" : ""}${n}`);
|
|
4519
4818
|
}), we = (e) => {
|
|
4520
4819
|
if (!U) return null;
|
|
4521
|
-
let n = b ? 1 : t.length, r = H / U, i = Math.max((r - 2 * (n + 1)) / n, 2), a =
|
|
4820
|
+
let n = b ? 1 : t.length, r = H / U, i = Math.max((r - 2 * (n + 1)) / n, 2), a = ar + O, o = Array(U).fill(0);
|
|
4522
4821
|
return t.map((t, n) => t.data.map((s, c) => {
|
|
4523
4822
|
let l = b ? V + c * r + 2 : V + c * r + 2 + n * (i + 2), u = b ? Math.max(0, s) : s, d = b ? o[c] : 0;
|
|
4524
4823
|
b && (o[c] += u);
|
|
@@ -4533,7 +4832,7 @@ function ar({ series: t, labels: n, type: r = "line", height: a = 200, showLegen
|
|
|
4533
4832
|
}));
|
|
4534
4833
|
}, Te = () => {
|
|
4535
4834
|
if (!n?.length) return null;
|
|
4536
|
-
let e =
|
|
4835
|
+
let e = ar + O + 18, t = n.length - 1;
|
|
4537
4836
|
return n.map((n, i) => {
|
|
4538
4837
|
if ((t - i) % ne !== 0) return null;
|
|
4539
4838
|
let a = r === "line" ? me(i) : V + (i + .5) * (H / U);
|
|
@@ -4548,20 +4847,37 @@ function ar({ series: t, labels: n, type: r = "line", height: a = 200, showLegen
|
|
|
4548
4847
|
});
|
|
4549
4848
|
}, Ee = T && r === "line" ? /* @__PURE__ */ h("line", {
|
|
4550
4849
|
x1: me(T.index),
|
|
4551
|
-
y1:
|
|
4850
|
+
y1: ar,
|
|
4552
4851
|
x2: me(T.index),
|
|
4553
|
-
y2:
|
|
4852
|
+
y2: ar + O,
|
|
4554
4853
|
stroke: "var(--chart-crosshair)",
|
|
4555
4854
|
strokeWidth: "1",
|
|
4556
4855
|
strokeDasharray: "3 3"
|
|
4557
4856
|
}) : null, De = T ? (() => {
|
|
4558
|
-
let i = n?.[T.index] ?? String(T.index + 1), o = t.length + t.filter((e) => e.low && e.high && e.low[T.index] != null && e.high[T.index] != null).length + (b && t.length > 1 ? 1 : 0)
|
|
4559
|
-
|
|
4560
|
-
|
|
4857
|
+
let i = n?.[T.index] ?? String(T.index + 1), o = t.length + t.filter((e) => e.low && e.high && e.low[T.index] != null && e.high[T.index] != null).length + (b && t.length > 1 ? 1 : 0), s = [];
|
|
4858
|
+
for (let e of u ?? []) {
|
|
4859
|
+
if (e.index !== T.index) continue;
|
|
4860
|
+
let t = s.find((t) => t.label === e.label);
|
|
4861
|
+
t ? t.count++ : s.push({
|
|
4862
|
+
label: e.label,
|
|
4863
|
+
count: 1
|
|
4864
|
+
});
|
|
4865
|
+
}
|
|
4866
|
+
let c = Math.max(1, Math.floor((a - 8 - 30 - o * 20) / 22));
|
|
4867
|
+
if (s.length > c) {
|
|
4868
|
+
let e = s.slice(c - 1).reduce((e, t) => e + t.count, 0);
|
|
4869
|
+
s = [...s.slice(0, c - 1), {
|
|
4870
|
+
label: null,
|
|
4871
|
+
count: e
|
|
4872
|
+
}];
|
|
4873
|
+
}
|
|
4874
|
+
let l = Math.max(i.length, ...t.map((e) => e.label.length + 8), ...s.map((e) => (e.label?.length ?? 12) + 6)), d = Math.min(Math.max(90, l * 6.5 + 36), Math.max(120, C - 16)), f = 30 + o * 20 + s.length * 22, p = r === "bar" && U > 0 ? H / U / 2 : 0, m = r === "bar" && U > 0 ? V + (T.index + .5) * (H / U) : me(T.index), _ = {
|
|
4875
|
+
left: m + p + 12 + d <= C - 4 ? m + p + 12 : Math.max(4, m - p - 12 - d),
|
|
4876
|
+
top: Math.max(4, Math.min(T.y - f / 2, a - f - 4))
|
|
4561
4877
|
};
|
|
4562
4878
|
return /* @__PURE__ */ g("div", {
|
|
4563
4879
|
className: Q.tooltip,
|
|
4564
|
-
style:
|
|
4880
|
+
style: _,
|
|
4565
4881
|
children: [
|
|
4566
4882
|
/* @__PURE__ */ h("div", {
|
|
4567
4883
|
className: Q.tooltipLabel,
|
|
@@ -4572,7 +4888,7 @@ function ar({ series: t, labels: n, type: r = "line", height: a = 200, showLegen
|
|
|
4572
4888
|
children: [
|
|
4573
4889
|
/* @__PURE__ */ h("span", {
|
|
4574
4890
|
className: Q.tooltipDot,
|
|
4575
|
-
style: { background: t.color ??
|
|
4891
|
+
style: { background: t.color ?? ir }
|
|
4576
4892
|
}),
|
|
4577
4893
|
/* @__PURE__ */ h("span", {
|
|
4578
4894
|
className: Q.tooltipName,
|
|
@@ -4580,7 +4896,7 @@ function ar({ series: t, labels: n, type: r = "line", height: a = 200, showLegen
|
|
|
4580
4896
|
}),
|
|
4581
4897
|
/* @__PURE__ */ h("span", {
|
|
4582
4898
|
className: Q.tooltipValue,
|
|
4583
|
-
children:
|
|
4899
|
+
children: gr(t.data[T.index] ?? 0)
|
|
4584
4900
|
})
|
|
4585
4901
|
]
|
|
4586
4902
|
}), t.low && t.high && t.low[T.index] != null && t.high[T.index] != null && /* @__PURE__ */ g("div", {
|
|
@@ -4597,9 +4913,9 @@ function ar({ series: t, labels: n, type: r = "line", height: a = 200, showLegen
|
|
|
4597
4913
|
/* @__PURE__ */ g("span", {
|
|
4598
4914
|
className: Q.tooltipRangeValue,
|
|
4599
4915
|
children: [
|
|
4600
|
-
|
|
4916
|
+
gr(t.low[T.index]),
|
|
4601
4917
|
" to ",
|
|
4602
|
-
|
|
4918
|
+
gr(t.high[T.index])
|
|
4603
4919
|
]
|
|
4604
4920
|
})
|
|
4605
4921
|
]
|
|
@@ -4617,16 +4933,26 @@ function ar({ series: t, labels: n, type: r = "line", height: a = 200, showLegen
|
|
|
4617
4933
|
}),
|
|
4618
4934
|
/* @__PURE__ */ h("span", {
|
|
4619
4935
|
className: Q.tooltipValue,
|
|
4620
|
-
children:
|
|
4936
|
+
children: gr(A[T.index] ?? 0)
|
|
4621
4937
|
})
|
|
4622
4938
|
]
|
|
4623
4939
|
}),
|
|
4624
|
-
|
|
4940
|
+
s.map((e, t) => /* @__PURE__ */ g("div", {
|
|
4625
4941
|
className: `${Q.tooltipRow} ${Q.tooltipMarker}`,
|
|
4626
|
-
children: [
|
|
4627
|
-
|
|
4628
|
-
|
|
4629
|
-
|
|
4942
|
+
children: [
|
|
4943
|
+
/* @__PURE__ */ h("span", {
|
|
4944
|
+
className: `${Q.tooltipDot} ${Q.markerDot}`,
|
|
4945
|
+
style: e.label == null ? { visibility: "hidden" } : void 0
|
|
4946
|
+
}),
|
|
4947
|
+
/* @__PURE__ */ h("span", {
|
|
4948
|
+
className: Q.tooltipName,
|
|
4949
|
+
children: e.label ?? `and ${e.count} more`
|
|
4950
|
+
}),
|
|
4951
|
+
e.label != null && e.count > 1 && /* @__PURE__ */ g("span", {
|
|
4952
|
+
className: Q.tooltipValue,
|
|
4953
|
+
children: ["×", e.count]
|
|
4954
|
+
})
|
|
4955
|
+
]
|
|
4630
4956
|
}, `m${t}`))
|
|
4631
4957
|
]
|
|
4632
4958
|
});
|
|
@@ -4652,24 +4978,24 @@ function ar({ series: t, labels: n, type: r = "line", height: a = 200, showLegen
|
|
|
4652
4978
|
Se,
|
|
4653
4979
|
Ee,
|
|
4654
4980
|
r === "line" ? Ce() : we(),
|
|
4655
|
-
se != null && se >
|
|
4981
|
+
se != null && se > ar && /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("defs", { children: /* @__PURE__ */ h("clipPath", {
|
|
4656
4982
|
id: ce,
|
|
4657
4983
|
children: /* @__PURE__ */ h("rect", {
|
|
4658
4984
|
x: V,
|
|
4659
|
-
y:
|
|
4985
|
+
y: ar,
|
|
4660
4986
|
width: H,
|
|
4661
|
-
height: se -
|
|
4987
|
+
height: se - ar
|
|
4662
4988
|
})
|
|
4663
4989
|
}) }), /* @__PURE__ */ h("g", {
|
|
4664
4990
|
clipPath: `url(#${ce})`,
|
|
4665
|
-
children: r === "line" ? Ce(
|
|
4991
|
+
children: r === "line" ? Ce(fr) : we(fr)
|
|
4666
4992
|
})] }),
|
|
4667
4993
|
u && U > 0 && [...new Set(u.map((e) => e.index).filter((e) => e >= 0 && e < U))].map((e) => {
|
|
4668
4994
|
let t = r === "line" ? me(e) : V + (e + .5) * (H / U);
|
|
4669
4995
|
return /* @__PURE__ */ h("rect", {
|
|
4670
4996
|
className: Q.marker,
|
|
4671
4997
|
x: t - 3,
|
|
4672
|
-
y:
|
|
4998
|
+
y: ar + O - 3,
|
|
4673
4999
|
width: 6,
|
|
4674
5000
|
height: 6
|
|
4675
5001
|
}, `m${e}`);
|
|
@@ -4682,7 +5008,7 @@ function ar({ series: t, labels: n, type: r = "line", height: a = 200, showLegen
|
|
|
4682
5008
|
className: Q.legend,
|
|
4683
5009
|
children: t.map((e, t) => /* @__PURE__ */ g("div", {
|
|
4684
5010
|
className: Q.legendItem,
|
|
4685
|
-
children: [le(e) in
|
|
5011
|
+
children: [le(e) in ur ? /* @__PURE__ */ h("svg", {
|
|
4686
5012
|
className: Q.legendSwatch,
|
|
4687
5013
|
width: 12,
|
|
4688
5014
|
height: 8,
|
|
@@ -4694,7 +5020,7 @@ function ar({ series: t, labels: n, type: r = "line", height: a = 200, showLegen
|
|
|
4694
5020
|
})
|
|
4695
5021
|
}) : /* @__PURE__ */ h("div", {
|
|
4696
5022
|
className: Q.legendMark,
|
|
4697
|
-
style: { background: e.color ??
|
|
5023
|
+
style: { background: e.color ?? ir }
|
|
4698
5024
|
}), /* @__PURE__ */ h("span", {
|
|
4699
5025
|
className: Q.legendLabel,
|
|
4700
5026
|
children: e.label
|
|
@@ -4703,7 +5029,7 @@ function ar({ series: t, labels: n, type: r = "line", height: a = 200, showLegen
|
|
|
4703
5029
|
})]
|
|
4704
5030
|
});
|
|
4705
5031
|
}
|
|
4706
|
-
var
|
|
5032
|
+
var vr = {
|
|
4707
5033
|
sparkline: "_sparkline_fqcg9_4",
|
|
4708
5034
|
line: "_line_fqcg9_12",
|
|
4709
5035
|
partial: "_partial_fqcg9_22",
|
|
@@ -4711,16 +5037,16 @@ var or = {
|
|
|
4711
5037
|
bars: "_bars_fqcg9_34",
|
|
4712
5038
|
bar: "_bar_fqcg9_34",
|
|
4713
5039
|
baseline: "_baseline_fqcg9_48"
|
|
4714
|
-
},
|
|
4715
|
-
function
|
|
5040
|
+
}, yr = 100, br = 100;
|
|
5041
|
+
function xr({ values: e, type: t = "line", width: n = "100%", height: r = 24, color: i = "currentColor", fill: a = !1, baseline: o = !1, lastIsPartial: c = !1, gap: l = 1, idleColor: u, ariaLabel: d, className: f }) {
|
|
4716
5042
|
let p = `spark-${s().replace(/:/g, "")}`, _ = e.filter((e) => Number.isFinite(e)), v = d == null, y = _.length ? Math.max(..._) : 0, b = _.length ? Math.min(..._) : 0, x = y - b || 1, S = (e) => 94 - (e - b) / x * 88, C = (e) => /* @__PURE__ */ g("svg", {
|
|
4717
|
-
className: [
|
|
5043
|
+
className: [vr.sparkline, f].filter(Boolean).join(" "),
|
|
4718
5044
|
style: {
|
|
4719
5045
|
width: n,
|
|
4720
5046
|
height: r,
|
|
4721
5047
|
color: i
|
|
4722
5048
|
},
|
|
4723
|
-
viewBox: `0 0 ${
|
|
5049
|
+
viewBox: `0 0 ${yr} ${br}`,
|
|
4724
5050
|
preserveAspectRatio: "none",
|
|
4725
5051
|
role: v ? void 0 : "img",
|
|
4726
5052
|
"aria-label": d,
|
|
@@ -4729,15 +5055,15 @@ function lr({ values: e, type: t = "line", width: n = "100%", height: r = 24, co
|
|
|
4729
5055
|
children: [e, o && /* @__PURE__ */ h("line", {
|
|
4730
5056
|
x1: "0",
|
|
4731
5057
|
y1: 99.5,
|
|
4732
|
-
x2:
|
|
5058
|
+
x2: yr,
|
|
4733
5059
|
y2: 99.5,
|
|
4734
|
-
className:
|
|
5060
|
+
className: vr.baseline,
|
|
4735
5061
|
vectorEffect: "non-scaling-stroke"
|
|
4736
5062
|
})]
|
|
4737
5063
|
});
|
|
4738
5064
|
if (_.length < 2) return C(null);
|
|
4739
5065
|
if (t === "bar") return /* @__PURE__ */ h("div", {
|
|
4740
|
-
className: [
|
|
5066
|
+
className: [vr.bars, f].filter(Boolean).join(" "),
|
|
4741
5067
|
style: {
|
|
4742
5068
|
width: n,
|
|
4743
5069
|
height: r,
|
|
@@ -4749,18 +5075,18 @@ function lr({ values: e, type: t = "line", width: n = "100%", height: r = 24, co
|
|
|
4749
5075
|
"aria-label": d,
|
|
4750
5076
|
"aria-hidden": v || void 0,
|
|
4751
5077
|
children: _.map((e, t) => /* @__PURE__ */ h("span", {
|
|
4752
|
-
className:
|
|
5078
|
+
className: vr.bar,
|
|
4753
5079
|
style: { height: `${Math.max((e - b) / x * 100, 2)}%` }
|
|
4754
5080
|
}, t))
|
|
4755
5081
|
});
|
|
4756
|
-
let w =
|
|
5082
|
+
let w = yr / (_.length - 1), T = (e, t) => _.slice(e, e + t).map((t, n) => `${(e + n) * w},${S(t)}`).join(" "), E = T(0, _.length), D = u != null && _.some((e) => e === 0), O = D ? { stroke: `url(#${p})` } : void 0, k = D ? { fill: `url(#${p})` } : void 0;
|
|
4757
5083
|
return C(/* @__PURE__ */ g(m, { children: [
|
|
4758
5084
|
D && /* @__PURE__ */ h("defs", { children: /* @__PURE__ */ h("linearGradient", {
|
|
4759
5085
|
id: p,
|
|
4760
5086
|
gradientUnits: "userSpaceOnUse",
|
|
4761
5087
|
x1: "0",
|
|
4762
5088
|
y1: "0",
|
|
4763
|
-
x2:
|
|
5089
|
+
x2: yr,
|
|
4764
5090
|
y2: "0",
|
|
4765
5091
|
children: (() => {
|
|
4766
5092
|
let e = _.length - 1, t = (e) => _[e] === 0 && _[e + 1] === 0 ? u : "currentColor", n = .2 / e;
|
|
@@ -4777,29 +5103,29 @@ function lr({ values: e, type: t = "line", width: n = "100%", height: r = 24, co
|
|
|
4777
5103
|
})()
|
|
4778
5104
|
}) }),
|
|
4779
5105
|
a && /* @__PURE__ */ h("polygon", {
|
|
4780
|
-
className:
|
|
4781
|
-
points: `0,${
|
|
5106
|
+
className: vr.fill,
|
|
5107
|
+
points: `0,${br} ${E} ${yr},${br}`,
|
|
4782
5108
|
style: k
|
|
4783
5109
|
}),
|
|
4784
5110
|
c ? /* @__PURE__ */ g(m, { children: [_.length > 2 && /* @__PURE__ */ h("polyline", {
|
|
4785
|
-
className:
|
|
5111
|
+
className: vr.line,
|
|
4786
5112
|
points: T(0, _.length - 1),
|
|
4787
5113
|
vectorEffect: "non-scaling-stroke",
|
|
4788
5114
|
style: O
|
|
4789
5115
|
}), /* @__PURE__ */ h("polyline", {
|
|
4790
|
-
className: `${
|
|
5116
|
+
className: `${vr.line} ${vr.partial}`,
|
|
4791
5117
|
points: T(_.length - 2, 2),
|
|
4792
5118
|
vectorEffect: "non-scaling-stroke",
|
|
4793
5119
|
style: O
|
|
4794
5120
|
})] }) : /* @__PURE__ */ h("polyline", {
|
|
4795
|
-
className:
|
|
5121
|
+
className: vr.line,
|
|
4796
5122
|
points: E,
|
|
4797
5123
|
vectorEffect: "non-scaling-stroke",
|
|
4798
5124
|
style: O
|
|
4799
5125
|
})
|
|
4800
5126
|
] }));
|
|
4801
5127
|
}
|
|
4802
|
-
var
|
|
5128
|
+
var Sr = {
|
|
4803
5129
|
wrapper: "_wrapper_17ws4_1",
|
|
4804
5130
|
label: "_label_17ws4_7",
|
|
4805
5131
|
textarea: "_textarea_17ws4_12",
|
|
@@ -4807,14 +5133,14 @@ var ur = {
|
|
|
4807
5133
|
errorText: "_errorText_17ws4_56"
|
|
4808
5134
|
};
|
|
4809
5135
|
// src/components/Textarea/Textarea.tsx
|
|
4810
|
-
function
|
|
5136
|
+
function Cr({ label: t, error: n, className: r = "", isValid: i = !0, id: a, rows: o = 4, ...s }) {
|
|
4811
5137
|
let c = e.useId(), l = a || c, u = `${l}-error`, d = n || !i;
|
|
4812
5138
|
return /* @__PURE__ */ g("div", {
|
|
4813
|
-
className: `${
|
|
5139
|
+
className: `${Sr.wrapper} ${r}`,
|
|
4814
5140
|
children: [
|
|
4815
5141
|
t && /* @__PURE__ */ g("label", {
|
|
4816
5142
|
htmlFor: l,
|
|
4817
|
-
className:
|
|
5143
|
+
className: Sr.label,
|
|
4818
5144
|
children: [t, s.required && /* @__PURE__ */ h("span", {
|
|
4819
5145
|
"aria-label": "required",
|
|
4820
5146
|
children: " *"
|
|
@@ -4823,28 +5149,28 @@ function dr({ label: t, error: n, className: r = "", isValid: i = !0, id: a, row
|
|
|
4823
5149
|
/* @__PURE__ */ h("textarea", {
|
|
4824
5150
|
id: l,
|
|
4825
5151
|
rows: o,
|
|
4826
|
-
className: `${
|
|
5152
|
+
className: `${Sr.textarea} ${d ? Sr.error : ""}`,
|
|
4827
5153
|
"aria-invalid": d ? "true" : "false",
|
|
4828
5154
|
"aria-describedby": n ? u : void 0,
|
|
4829
5155
|
...s
|
|
4830
5156
|
}),
|
|
4831
5157
|
n && /* @__PURE__ */ h("span", {
|
|
4832
5158
|
id: u,
|
|
4833
|
-
className:
|
|
5159
|
+
className: Sr.errorText,
|
|
4834
5160
|
role: "alert",
|
|
4835
5161
|
children: n
|
|
4836
5162
|
})
|
|
4837
5163
|
]
|
|
4838
5164
|
});
|
|
4839
5165
|
}
|
|
4840
|
-
var
|
|
5166
|
+
var wr = {
|
|
4841
5167
|
overlay: "_overlay_xud7c_1",
|
|
4842
5168
|
content: "_content_xud7c_8",
|
|
4843
5169
|
title: "_title_xud7c_26",
|
|
4844
5170
|
description: "_description_xud7c_34",
|
|
4845
5171
|
close: "_close_xud7c_40",
|
|
4846
5172
|
srOnly: "_srOnly_xud7c_62"
|
|
4847
|
-
},
|
|
5173
|
+
}, Tr = ({ trigger: e, children: t, open: n, onOpenChange: r, title: i, description: a, className: o = "", showClose: s = !0 }) => {
|
|
4848
5174
|
let c = ae();
|
|
4849
5175
|
return /* @__PURE__ */ g(B.Root, {
|
|
4850
5176
|
open: n,
|
|
@@ -4854,19 +5180,19 @@ var fr = {
|
|
|
4854
5180
|
children: e
|
|
4855
5181
|
}), /* @__PURE__ */ g(B.Portal, {
|
|
4856
5182
|
container: c,
|
|
4857
|
-
children: [/* @__PURE__ */ h(B.Overlay, { className:
|
|
4858
|
-
className: `${
|
|
5183
|
+
children: [/* @__PURE__ */ h(B.Overlay, { className: wr.overlay }), /* @__PURE__ */ g(B.Content, {
|
|
5184
|
+
className: `${wr.content} ${o}`,
|
|
4859
5185
|
children: [
|
|
4860
5186
|
/* @__PURE__ */ h(B.Title, {
|
|
4861
|
-
className: i ?
|
|
5187
|
+
className: i ? wr.title : wr.srOnly,
|
|
4862
5188
|
children: i || "Dialog"
|
|
4863
5189
|
}),
|
|
4864
5190
|
a && /* @__PURE__ */ h(B.Description, {
|
|
4865
|
-
className:
|
|
5191
|
+
className: wr.description,
|
|
4866
5192
|
children: a
|
|
4867
5193
|
}),
|
|
4868
5194
|
s && /* @__PURE__ */ h(B.Close, {
|
|
4869
|
-
className:
|
|
5195
|
+
className: wr.close,
|
|
4870
5196
|
"aria-label": "Close",
|
|
4871
5197
|
children: /* @__PURE__ */ h(F, {
|
|
4872
5198
|
size: 14,
|
|
@@ -4878,7 +5204,7 @@ var fr = {
|
|
|
4878
5204
|
})]
|
|
4879
5205
|
})]
|
|
4880
5206
|
});
|
|
4881
|
-
},
|
|
5207
|
+
}, Er = {
|
|
4882
5208
|
wrapper: "_wrapper_aimna_1",
|
|
4883
5209
|
label: "_label_aimna_7",
|
|
4884
5210
|
trigger: "_trigger_aimna_12",
|
|
@@ -4897,7 +5223,7 @@ var fr = {
|
|
|
4897
5223
|
today: "_today_aimna_131",
|
|
4898
5224
|
selected: "_selected_aimna_136",
|
|
4899
5225
|
errorText: "_errorText_aimna_142"
|
|
4900
|
-
},
|
|
5226
|
+
}, Dr = [
|
|
4901
5227
|
"Mo",
|
|
4902
5228
|
"Tu",
|
|
4903
5229
|
"We",
|
|
@@ -4905,7 +5231,7 @@ var fr = {
|
|
|
4905
5231
|
"Fr",
|
|
4906
5232
|
"Sa",
|
|
4907
5233
|
"Su"
|
|
4908
|
-
],
|
|
5234
|
+
], Or = [
|
|
4909
5235
|
"January",
|
|
4910
5236
|
"February",
|
|
4911
5237
|
"March",
|
|
@@ -4919,19 +5245,19 @@ var fr = {
|
|
|
4919
5245
|
"November",
|
|
4920
5246
|
"December"
|
|
4921
5247
|
];
|
|
4922
|
-
function
|
|
5248
|
+
function kr(e) {
|
|
4923
5249
|
let t = String(e.getMonth() + 1).padStart(2, "0"), n = String(e.getDate()).padStart(2, "0");
|
|
4924
5250
|
return `${e.getFullYear()}-${t}-${n}`;
|
|
4925
5251
|
}
|
|
4926
|
-
function
|
|
5252
|
+
function Ar(e, t) {
|
|
4927
5253
|
return !!e && !!t && e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate();
|
|
4928
5254
|
}
|
|
4929
|
-
function
|
|
5255
|
+
function jr(e, t) {
|
|
4930
5256
|
let n = (new Date(e, t, 1).getDay() + 6) % 7, r = [];
|
|
4931
5257
|
for (let i = 0; i < 42; i++) r.push(new Date(e, t, 1 - n + i));
|
|
4932
5258
|
return r;
|
|
4933
5259
|
}
|
|
4934
|
-
var
|
|
5260
|
+
var Mr = ({ value: t, onChange: n, label: r, placeholder: i = "Select a date", error: a, isValid: o = !0, disabled: s = !1, className: c = "", formatDate: l = kr }) => {
|
|
4935
5261
|
let u = ae(), d = e.useId(), p = `${d}-error`, m = !!a || !o, [_, v] = f(!1), y = /* @__PURE__ */ new Date(), b = t ?? y, [w, T] = f(b.getFullYear()), [E, D] = f(b.getMonth()), [O, k] = f(b), A = e.useRef(/* @__PURE__ */ new Map()), j = e.useRef(!1), M = (e) => {
|
|
4936
5262
|
if (e) {
|
|
4937
5263
|
let e = t ?? /* @__PURE__ */ new Date();
|
|
@@ -4940,7 +5266,7 @@ var br = ({ value: t, onChange: n, label: r, placeholder: i = "Select a date", e
|
|
|
4940
5266
|
v(e);
|
|
4941
5267
|
};
|
|
4942
5268
|
e.useEffect(() => {
|
|
4943
|
-
j.current &&= (A.current.get(
|
|
5269
|
+
j.current &&= (A.current.get(kr(O))?.focus(), !1);
|
|
4944
5270
|
}, [O]);
|
|
4945
5271
|
let N = (e, t) => {
|
|
4946
5272
|
let n = new Date(t), r = {
|
|
@@ -4967,13 +5293,13 @@ var br = ({ value: t, onChange: n, label: r, placeholder: i = "Select a date", e
|
|
|
4967
5293
|
E === 11 ? (D(0), T(w + 1)) : D(E + 1);
|
|
4968
5294
|
}, I = (e) => {
|
|
4969
5295
|
n?.(e), v(!1);
|
|
4970
|
-
}, L =
|
|
5296
|
+
}, L = jr(w, E);
|
|
4971
5297
|
return /* @__PURE__ */ g("div", {
|
|
4972
|
-
className: `${
|
|
5298
|
+
className: `${Er.wrapper} ${c}`,
|
|
4973
5299
|
children: [
|
|
4974
5300
|
r && /* @__PURE__ */ h("span", {
|
|
4975
5301
|
id: `${d}-label`,
|
|
4976
|
-
className:
|
|
5302
|
+
className: Er.label,
|
|
4977
5303
|
children: r
|
|
4978
5304
|
}),
|
|
4979
5305
|
/* @__PURE__ */ g(R.Root, {
|
|
@@ -4983,14 +5309,14 @@ var br = ({ value: t, onChange: n, label: r, placeholder: i = "Select a date", e
|
|
|
4983
5309
|
asChild: !0,
|
|
4984
5310
|
children: /* @__PURE__ */ g("button", {
|
|
4985
5311
|
type: "button",
|
|
4986
|
-
className: `${
|
|
5312
|
+
className: `${Er.trigger} ${m ? Er.error : ""}`,
|
|
4987
5313
|
disabled: s,
|
|
4988
5314
|
"aria-labelledby": r ? `${d}-label ${d}-value` : void 0,
|
|
4989
5315
|
"aria-invalid": m ? "true" : "false",
|
|
4990
5316
|
"aria-describedby": a ? p : void 0,
|
|
4991
5317
|
children: [/* @__PURE__ */ h("span", {
|
|
4992
5318
|
id: `${d}-value`,
|
|
4993
|
-
className: t ?
|
|
5319
|
+
className: t ? Er.valueText : Er.placeholder,
|
|
4994
5320
|
children: t ? l(t) : i
|
|
4995
5321
|
}), /* @__PURE__ */ h(x, {
|
|
4996
5322
|
size: 14,
|
|
@@ -5000,20 +5326,20 @@ var br = ({ value: t, onChange: n, label: r, placeholder: i = "Select a date", e
|
|
|
5000
5326
|
}), /* @__PURE__ */ h(R.Portal, {
|
|
5001
5327
|
container: u,
|
|
5002
5328
|
children: /* @__PURE__ */ g(R.Content, {
|
|
5003
|
-
className:
|
|
5329
|
+
className: Er.calendar,
|
|
5004
5330
|
align: "start",
|
|
5005
5331
|
sideOffset: 5,
|
|
5006
5332
|
"aria-label": r ? `${r} calendar` : "Choose a date",
|
|
5007
5333
|
onOpenAutoFocus: (e) => {
|
|
5008
|
-
e.preventDefault(), A.current.get(
|
|
5334
|
+
e.preventDefault(), A.current.get(kr(O))?.focus();
|
|
5009
5335
|
},
|
|
5010
5336
|
children: [
|
|
5011
5337
|
/* @__PURE__ */ g("div", {
|
|
5012
|
-
className:
|
|
5338
|
+
className: Er.header,
|
|
5013
5339
|
children: [
|
|
5014
5340
|
/* @__PURE__ */ h("button", {
|
|
5015
5341
|
type: "button",
|
|
5016
|
-
className:
|
|
5342
|
+
className: Er.navButton,
|
|
5017
5343
|
onClick: P,
|
|
5018
5344
|
"aria-label": "Previous month",
|
|
5019
5345
|
children: /* @__PURE__ */ h(S, {
|
|
@@ -5022,16 +5348,16 @@ var br = ({ value: t, onChange: n, label: r, placeholder: i = "Select a date", e
|
|
|
5022
5348
|
})
|
|
5023
5349
|
}),
|
|
5024
5350
|
/* @__PURE__ */ g("span", {
|
|
5025
|
-
className:
|
|
5351
|
+
className: Er.monthLabel,
|
|
5026
5352
|
children: [
|
|
5027
|
-
|
|
5353
|
+
Or[E],
|
|
5028
5354
|
" ",
|
|
5029
5355
|
w
|
|
5030
5356
|
]
|
|
5031
5357
|
}),
|
|
5032
5358
|
/* @__PURE__ */ h("button", {
|
|
5033
5359
|
type: "button",
|
|
5034
|
-
className:
|
|
5360
|
+
className: Er.navButton,
|
|
5035
5361
|
onClick: F,
|
|
5036
5362
|
"aria-label": "Next month",
|
|
5037
5363
|
children: /* @__PURE__ */ h(C, {
|
|
@@ -5042,27 +5368,27 @@ var br = ({ value: t, onChange: n, label: r, placeholder: i = "Select a date", e
|
|
|
5042
5368
|
]
|
|
5043
5369
|
}),
|
|
5044
5370
|
/* @__PURE__ */ h("div", {
|
|
5045
|
-
className:
|
|
5046
|
-
children:
|
|
5047
|
-
className:
|
|
5371
|
+
className: Er.weekdays,
|
|
5372
|
+
children: Dr.map((e) => /* @__PURE__ */ h("span", {
|
|
5373
|
+
className: Er.weekday,
|
|
5048
5374
|
children: e
|
|
5049
5375
|
}, e))
|
|
5050
5376
|
}),
|
|
5051
5377
|
/* @__PURE__ */ h("div", {
|
|
5052
|
-
className:
|
|
5378
|
+
className: Er.grid,
|
|
5053
5379
|
children: L.map((e) => {
|
|
5054
|
-
let n = e.getMonth() !== E, r =
|
|
5055
|
-
|
|
5056
|
-
n ?
|
|
5057
|
-
r ?
|
|
5058
|
-
i && !r ?
|
|
5380
|
+
let n = e.getMonth() !== E, r = Ar(e, t), i = Ar(e, y), a = [
|
|
5381
|
+
Er.day,
|
|
5382
|
+
n ? Er.outside : "",
|
|
5383
|
+
r ? Er.selected : "",
|
|
5384
|
+
i && !r ? Er.today : ""
|
|
5059
5385
|
].filter(Boolean).join(" ");
|
|
5060
5386
|
return /* @__PURE__ */ h("button", {
|
|
5061
5387
|
type: "button",
|
|
5062
5388
|
className: a,
|
|
5063
5389
|
onClick: () => I(e),
|
|
5064
5390
|
ref: (t) => {
|
|
5065
|
-
t ? A.current.set(
|
|
5391
|
+
t ? A.current.set(kr(e), t) : A.current.delete(kr(e));
|
|
5066
5392
|
},
|
|
5067
5393
|
"aria-label": e.toLocaleDateString(void 0, {
|
|
5068
5394
|
weekday: "long",
|
|
@@ -5072,7 +5398,7 @@ var br = ({ value: t, onChange: n, label: r, placeholder: i = "Select a date", e
|
|
|
5072
5398
|
}),
|
|
5073
5399
|
"aria-pressed": r,
|
|
5074
5400
|
"aria-current": i ? "date" : void 0,
|
|
5075
|
-
tabIndex:
|
|
5401
|
+
tabIndex: Ar(e, O) || O.getMonth() !== E && e.getDate() === 1 && !n ? 0 : -1,
|
|
5076
5402
|
onKeyDown: (t) => N(t, e),
|
|
5077
5403
|
children: e.getDate()
|
|
5078
5404
|
}, e.toISOString());
|
|
@@ -5084,130 +5410,130 @@ var br = ({ value: t, onChange: n, label: r, placeholder: i = "Select a date", e
|
|
|
5084
5410
|
}),
|
|
5085
5411
|
a && /* @__PURE__ */ h("span", {
|
|
5086
5412
|
id: p,
|
|
5087
|
-
className:
|
|
5413
|
+
className: Er.errorText,
|
|
5088
5414
|
role: "alert",
|
|
5089
5415
|
children: a
|
|
5090
5416
|
})
|
|
5091
5417
|
]
|
|
5092
5418
|
});
|
|
5093
|
-
},
|
|
5419
|
+
}, Nr = {
|
|
5094
5420
|
skeleton: "_skeleton_fo2zs_11",
|
|
5095
5421
|
"indx-skeleton-pulse": "_indx-skeleton-pulse_fo2zs_1",
|
|
5096
5422
|
level3: "_level3_fo2zs_20",
|
|
5097
5423
|
appear: "_appear_fo2zs_25",
|
|
5098
5424
|
"indx-skeleton-appear": "_indx-skeleton-appear_fo2zs_1"
|
|
5099
|
-
},
|
|
5100
|
-
function
|
|
5425
|
+
}, Pr = (e) => typeof e == "number" ? `${e}px` : e;
|
|
5426
|
+
function Fr({ width: e = "100%", height: t = 10, level: n = 2, delay: r = 0, appear: i = !0, className: a = "", style: o }) {
|
|
5101
5427
|
return /* @__PURE__ */ h("span", {
|
|
5102
5428
|
"aria-hidden": "true",
|
|
5103
|
-
className: `${
|
|
5429
|
+
className: `${Nr.skeleton} ${n === 3 ? Nr.level3 : ""} ${i ? Nr.appear : ""} ${a}`,
|
|
5104
5430
|
style: {
|
|
5105
|
-
width:
|
|
5106
|
-
height:
|
|
5431
|
+
width: Pr(e),
|
|
5432
|
+
height: Pr(t),
|
|
5107
5433
|
"--skeleton-delay": `${r}s`,
|
|
5108
5434
|
...o
|
|
5109
5435
|
}
|
|
5110
5436
|
});
|
|
5111
5437
|
}
|
|
5112
|
-
var
|
|
5113
|
-
stat: "
|
|
5114
|
-
label: "
|
|
5115
|
-
labelIcon: "
|
|
5116
|
-
body: "
|
|
5117
|
-
footRow: "
|
|
5118
|
-
foot: "
|
|
5119
|
-
hinted: "
|
|
5120
|
-
value: "
|
|
5121
|
-
icon: "
|
|
5122
|
-
figured: "
|
|
5123
|
-
figure: "
|
|
5124
|
-
text: "
|
|
5125
|
-
group: "
|
|
5126
|
-
fixed: "
|
|
5127
|
-
many: "
|
|
5128
|
-
pairs: "
|
|
5129
|
-
},
|
|
5130
|
-
function
|
|
5438
|
+
var Ir = {
|
|
5439
|
+
stat: "_stat_tcz5d_2",
|
|
5440
|
+
label: "_label_tcz5d_16",
|
|
5441
|
+
labelIcon: "_labelIcon_tcz5d_25",
|
|
5442
|
+
body: "_body_tcz5d_32",
|
|
5443
|
+
footRow: "_footRow_tcz5d_43",
|
|
5444
|
+
foot: "_foot_tcz5d_43",
|
|
5445
|
+
hinted: "_hinted_tcz5d_51",
|
|
5446
|
+
value: "_value_tcz5d_58",
|
|
5447
|
+
icon: "_icon_tcz5d_72",
|
|
5448
|
+
figured: "_figured_tcz5d_90",
|
|
5449
|
+
figure: "_figure_tcz5d_90",
|
|
5450
|
+
text: "_text_tcz5d_103",
|
|
5451
|
+
group: "_group_tcz5d_113",
|
|
5452
|
+
fixed: "_fixed_tcz5d_119",
|
|
5453
|
+
many: "_many_tcz5d_124",
|
|
5454
|
+
pairs: "_pairs_tcz5d_128"
|
|
5455
|
+
}, Lr = 28;
|
|
5456
|
+
function Rr({ label: e, labelIcon: n, value: i, figure: a, icon: o, color: s, hint: c, children: l, className: u = "" }) {
|
|
5131
5457
|
let d = n && r(n) ? t(n, {
|
|
5132
5458
|
size: n.props.size ?? 14,
|
|
5133
5459
|
color: n.props.color ?? "currentColor"
|
|
5134
5460
|
}) : n, f = /* @__PURE__ */ g("span", {
|
|
5135
|
-
className: `${
|
|
5461
|
+
className: `${Ir.label} ${c ? Ir.hinted : ""}`,
|
|
5136
5462
|
children: [d != null && /* @__PURE__ */ h("span", {
|
|
5137
|
-
className:
|
|
5463
|
+
className: Ir.labelIcon,
|
|
5138
5464
|
"aria-hidden": "true",
|
|
5139
5465
|
children: d
|
|
5140
5466
|
}), e]
|
|
5141
5467
|
}), p = o && r(o) ? t(o, {
|
|
5142
5468
|
size: o.props.size ?? 28,
|
|
5143
5469
|
color: o.props.color ?? "currentColor"
|
|
5144
|
-
}) : o, m = c ? /* @__PURE__ */ h(
|
|
5470
|
+
}) : o, m = c ? /* @__PURE__ */ h(fn, {
|
|
5145
5471
|
content: c,
|
|
5146
5472
|
children: f
|
|
5147
5473
|
}) : f, _ = (i != null || p != null) && /* @__PURE__ */ g("span", {
|
|
5148
|
-
className:
|
|
5474
|
+
className: Ir.value,
|
|
5149
5475
|
style: s ? { color: s } : void 0,
|
|
5150
5476
|
children: [p != null && /* @__PURE__ */ h("span", {
|
|
5151
|
-
className:
|
|
5477
|
+
className: Ir.icon,
|
|
5152
5478
|
"aria-hidden": "true",
|
|
5153
5479
|
children: p
|
|
5154
5480
|
}), i]
|
|
5155
5481
|
}), v = l != null && /* @__PURE__ */ h("span", {
|
|
5156
|
-
className:
|
|
5482
|
+
className: Ir.foot,
|
|
5157
5483
|
children: l
|
|
5158
5484
|
});
|
|
5159
5485
|
return a == null ? /* @__PURE__ */ g("div", {
|
|
5160
|
-
className: `${
|
|
5486
|
+
className: `${Ir.stat} ${u}`,
|
|
5161
5487
|
children: [
|
|
5162
5488
|
m,
|
|
5163
5489
|
/* @__PURE__ */ h("span", {
|
|
5164
|
-
className:
|
|
5490
|
+
className: Ir.body,
|
|
5165
5491
|
children: _
|
|
5166
5492
|
}),
|
|
5167
5493
|
v && /* @__PURE__ */ h("span", {
|
|
5168
|
-
className:
|
|
5494
|
+
className: Ir.footRow,
|
|
5169
5495
|
children: v
|
|
5170
5496
|
})
|
|
5171
5497
|
]
|
|
5172
5498
|
}) : /* @__PURE__ */ g("div", {
|
|
5173
|
-
className: `${
|
|
5499
|
+
className: `${Ir.stat} ${u}`,
|
|
5174
5500
|
children: [m, /* @__PURE__ */ h("span", {
|
|
5175
|
-
className:
|
|
5501
|
+
className: Ir.body,
|
|
5176
5502
|
children: /* @__PURE__ */ g("span", {
|
|
5177
|
-
className:
|
|
5503
|
+
className: Ir.figured,
|
|
5178
5504
|
children: [/* @__PURE__ */ h("span", {
|
|
5179
|
-
className:
|
|
5505
|
+
className: Ir.figure,
|
|
5180
5506
|
children: a
|
|
5181
5507
|
}), /* @__PURE__ */ g("span", {
|
|
5182
|
-
className:
|
|
5508
|
+
className: Ir.text,
|
|
5183
5509
|
children: [_, v]
|
|
5184
5510
|
})]
|
|
5185
5511
|
})
|
|
5186
5512
|
})]
|
|
5187
5513
|
});
|
|
5188
5514
|
}
|
|
5189
|
-
function
|
|
5190
|
-
let r = t ? `${
|
|
5515
|
+
function zr({ children: e, columns: t, className: n = "" }) {
|
|
5516
|
+
let r = t ? `${Ir.fixed} ${t > 3 ? Ir.many : ""} ${t > 2 ? Ir.pairs : ""}` : "";
|
|
5191
5517
|
return /* @__PURE__ */ h("div", {
|
|
5192
|
-
className: `${
|
|
5518
|
+
className: `${Ir.group} ${r} ${n}`,
|
|
5193
5519
|
style: t ? { "--stat-columns": t } : void 0,
|
|
5194
5520
|
children: e
|
|
5195
5521
|
});
|
|
5196
5522
|
}
|
|
5197
|
-
var
|
|
5523
|
+
var Br = {
|
|
5198
5524
|
text: "_text_15djf_3",
|
|
5199
5525
|
active: "_active_15djf_6",
|
|
5200
5526
|
"indx-shimmer-text": "_indx-shimmer-text_15djf_1"
|
|
5201
5527
|
};
|
|
5202
5528
|
// src/components/ShimmerText/ShimmerText.tsx
|
|
5203
|
-
function
|
|
5529
|
+
function Vr({ children: e, active: t = !0, className: n = "", ...r }) {
|
|
5204
5530
|
return /* @__PURE__ */ h("span", {
|
|
5205
|
-
className: `${
|
|
5531
|
+
className: `${Br.text} ${t ? Br.active : ""} ${n}`,
|
|
5206
5532
|
...r,
|
|
5207
5533
|
children: e
|
|
5208
5534
|
});
|
|
5209
5535
|
}
|
|
5210
|
-
var
|
|
5536
|
+
var Hr = {
|
|
5211
5537
|
meter: "_meter_5u78a_3",
|
|
5212
5538
|
cell: "_cell_5u78a_12",
|
|
5213
5539
|
lit: "_lit_5u78a_13",
|
|
@@ -5215,25 +5541,77 @@ var Ar = {
|
|
|
5215
5541
|
some: "_some_5u78a_16",
|
|
5216
5542
|
all: "_all_5u78a_17",
|
|
5217
5543
|
mark: "_mark_5u78a_18"
|
|
5218
|
-
},
|
|
5219
|
-
function
|
|
5220
|
-
let o = t.length === 0 ? "" : t.every((t) => e >= t.at) ?
|
|
5544
|
+
}, Ur = (e) => Math.min(1, Math.max(0, e)).toFixed(2);
|
|
5545
|
+
function Wr({ value: e, marks: t = [], cells: n = 20, cell: r = 4, className: i = "", ...a }) {
|
|
5546
|
+
let o = t.length === 0 ? "" : t.every((t) => e >= t.at) ? Hr.all : t.some((t) => e >= t.at) ? Hr.some : Hr.none;
|
|
5221
5547
|
return /* @__PURE__ */ g("span", {
|
|
5222
|
-
className: `${
|
|
5548
|
+
className: `${Hr.meter} ${o} ${i}`,
|
|
5223
5549
|
role: "meter",
|
|
5224
5550
|
"aria-valuemin": 0,
|
|
5225
5551
|
"aria-valuemax": 1,
|
|
5226
|
-
"aria-valuenow": Number(
|
|
5552
|
+
"aria-valuenow": Number(Ur(e)),
|
|
5227
5553
|
"aria-label": a["aria-label"],
|
|
5228
5554
|
style: { "--score-cell": `${r}px` },
|
|
5229
|
-
children: [Array.from({ length: n }, (t, r) => /* @__PURE__ */ h("span", { className: `${
|
|
5230
|
-
className:
|
|
5555
|
+
children: [Array.from({ length: n }, (t, r) => /* @__PURE__ */ h("span", { className: `${Hr.cell} ${e >= (r + .5) / n ? Hr.lit : ""}` }, r)), t.map((e) => /* @__PURE__ */ h("span", {
|
|
5556
|
+
className: Hr.mark,
|
|
5231
5557
|
style: { left: `${Math.min(1, Math.max(0, e.at)) * 100}%` },
|
|
5232
|
-
title: `${e.label} ${
|
|
5558
|
+
title: `${e.label} ${Ur(e.at)}`
|
|
5233
5559
|
}, `${e.label}-${e.at}`))]
|
|
5234
5560
|
});
|
|
5235
5561
|
}
|
|
5236
|
-
var
|
|
5562
|
+
var Gr = {
|
|
5563
|
+
steps: "_steps_16r2n_1",
|
|
5564
|
+
part: "_part_16r2n_2",
|
|
5565
|
+
track: "_track_16r2n_3",
|
|
5566
|
+
fill: "_fill_16r2n_4",
|
|
5567
|
+
label: "_label_16r2n_5",
|
|
5568
|
+
name: "_name_16r2n_6",
|
|
5569
|
+
count: "_count_16r2n_7"
|
|
5570
|
+
};
|
|
5571
|
+
// src/components/StepProgress/StepProgress.tsx
|
|
5572
|
+
function Kr({ parts: e, weighted: t = !0, labels: n = !1, color: r, height: i = 3, className: a = "", ...o }) {
|
|
5573
|
+
let s = e.reduce((e, t) => e + Math.min(t.value, t.max ?? 1), 0), c = e.reduce((e, t) => e + (t.max ?? 1), 0), l = {
|
|
5574
|
+
"--step-fill": r,
|
|
5575
|
+
"--step-height": `${i}px`
|
|
5576
|
+
};
|
|
5577
|
+
return /* @__PURE__ */ h("div", {
|
|
5578
|
+
className: `${Gr.steps} ${a}`,
|
|
5579
|
+
style: l,
|
|
5580
|
+
role: "progressbar",
|
|
5581
|
+
"aria-valuemin": 0,
|
|
5582
|
+
"aria-valuemax": c,
|
|
5583
|
+
"aria-valuenow": s,
|
|
5584
|
+
"aria-label": o["aria-label"] ?? `${s} of ${c} done`,
|
|
5585
|
+
children: e.map((e, r) => {
|
|
5586
|
+
let i = e.max ?? 1, a = Math.min(Math.max(e.value, 0), i);
|
|
5587
|
+
return /* @__PURE__ */ g("div", {
|
|
5588
|
+
className: Gr.part,
|
|
5589
|
+
style: { flex: t ? i : 1 },
|
|
5590
|
+
children: [/* @__PURE__ */ h("div", {
|
|
5591
|
+
className: Gr.track,
|
|
5592
|
+
children: /* @__PURE__ */ h("div", {
|
|
5593
|
+
className: Gr.fill,
|
|
5594
|
+
style: { width: `${a / i * 100}%` }
|
|
5595
|
+
})
|
|
5596
|
+
}), n && /* @__PURE__ */ g("div", {
|
|
5597
|
+
className: Gr.label,
|
|
5598
|
+
children: [/* @__PURE__ */ h("span", {
|
|
5599
|
+
className: Gr.name,
|
|
5600
|
+
children: e.label
|
|
5601
|
+
}), /* @__PURE__ */ g("span", {
|
|
5602
|
+
className: Gr.count,
|
|
5603
|
+
children: [
|
|
5604
|
+
a,
|
|
5605
|
+
"/",
|
|
5606
|
+
i
|
|
5607
|
+
]
|
|
5608
|
+
})]
|
|
5609
|
+
})]
|
|
5610
|
+
}, r);
|
|
5611
|
+
})
|
|
5612
|
+
});
|
|
5613
|
+
}
|
|
5614
|
+
var qr = {
|
|
5237
5615
|
icicle: "_icicle_1e1du_2",
|
|
5238
5616
|
cell: "_cell_1e1du_3",
|
|
5239
5617
|
block: "_block_1e1du_4",
|
|
@@ -5243,12 +5621,12 @@ var Nr = {
|
|
|
5243
5621
|
tone2: "_tone2_1e1du_18",
|
|
5244
5622
|
tone3: "_tone3_1e1du_19",
|
|
5245
5623
|
tone4: "_tone4_1e1du_20"
|
|
5246
|
-
},
|
|
5624
|
+
}, Jr = (e) => 1 + (e.children?.length ? Math.max(...e.children.map(Jr)) : 0), Yr = (e) => {
|
|
5247
5625
|
if (e.value <= 0 || !e.children?.length) return 0;
|
|
5248
5626
|
let t = Math.min(1, Math.max(0, e.children.reduce((e, t) => e + t.value, 0) / e.value));
|
|
5249
5627
|
return Math.round(t * 4);
|
|
5250
5628
|
};
|
|
5251
|
-
function
|
|
5629
|
+
function Xr({ root: e, rowHeight: t = 30, maxDepth: n = 6, title: r, className: i = "", ...a }) {
|
|
5252
5630
|
let o = [], s = (t, r, i, a) => {
|
|
5253
5631
|
if (r >= n || a <= 0) return;
|
|
5254
5632
|
o.push({
|
|
@@ -5264,14 +5642,14 @@ function Ir({ root: e, rowHeight: t = 30, maxDepth: n = 6, title: r, className:
|
|
|
5264
5642
|
}
|
|
5265
5643
|
};
|
|
5266
5644
|
s(e, 0, 0, +(e.value > 0));
|
|
5267
|
-
let c = Math.min(n,
|
|
5645
|
+
let c = Math.min(n, Jr(e));
|
|
5268
5646
|
return /* @__PURE__ */ h("div", {
|
|
5269
|
-
className: `${
|
|
5647
|
+
className: `${qr.icicle} ${i}`,
|
|
5270
5648
|
role: "img",
|
|
5271
5649
|
"aria-label": a["aria-label"],
|
|
5272
5650
|
style: { height: c * t },
|
|
5273
5651
|
children: o.map((e, n) => /* @__PURE__ */ h("div", {
|
|
5274
|
-
className:
|
|
5652
|
+
className: qr.cell,
|
|
5275
5653
|
title: r?.(e.node) ?? `${e.node.label}: ${e.node.value.toLocaleString()}`,
|
|
5276
5654
|
style: {
|
|
5277
5655
|
left: `${e.x * 100}%`,
|
|
@@ -5280,16 +5658,16 @@ function Ir({ root: e, rowHeight: t = 30, maxDepth: n = 6, title: r, className:
|
|
|
5280
5658
|
height: t - 2
|
|
5281
5659
|
},
|
|
5282
5660
|
children: /* @__PURE__ */ h("span", {
|
|
5283
|
-
className: `${
|
|
5661
|
+
className: `${qr.block} ${qr[`tone${Yr(e.node)}`]}`,
|
|
5284
5662
|
children: /* @__PURE__ */ h("span", {
|
|
5285
|
-
className:
|
|
5663
|
+
className: qr.label,
|
|
5286
5664
|
children: e.node.label
|
|
5287
5665
|
})
|
|
5288
5666
|
})
|
|
5289
5667
|
}, n))
|
|
5290
5668
|
});
|
|
5291
5669
|
}
|
|
5292
|
-
var
|
|
5670
|
+
var Zr = {
|
|
5293
5671
|
root: "_root_biiv1_1",
|
|
5294
5672
|
micro: "_micro_biiv1_7",
|
|
5295
5673
|
default: "_default_biiv1_8",
|
|
@@ -5305,13 +5683,13 @@ var Lr = {
|
|
|
5305
5683
|
panelTrigger: "_panelTrigger_biiv1_77",
|
|
5306
5684
|
viewport: "_viewport_biiv1_60",
|
|
5307
5685
|
content: "_content_biiv1_110"
|
|
5308
|
-
},
|
|
5686
|
+
}, Qr = {
|
|
5309
5687
|
micro: 14,
|
|
5310
5688
|
default: 14,
|
|
5311
5689
|
large: 21
|
|
5312
|
-
},
|
|
5690
|
+
}, $r = e.createContext("default"), ei = typeof window > "u" ? e.useEffect : e.useLayoutEffect, ti = e.forwardRef(({ size: t = "default", align: n = "start", panelAlign: r = "trigger", panelWidth: i, className: a = "", style: o, children: s, "aria-label": c = "Main navigation", ...l }, u) => {
|
|
5313
5691
|
let d = e.useRef(null), f = e.useRef(!1);
|
|
5314
|
-
|
|
5692
|
+
ei(() => {
|
|
5315
5693
|
let e = d.current;
|
|
5316
5694
|
if (!e || r !== "trigger") return;
|
|
5317
5695
|
let t = () => {
|
|
@@ -5340,8 +5718,8 @@ var Lr = {
|
|
|
5340
5718
|
let p = {
|
|
5341
5719
|
...o,
|
|
5342
5720
|
...i === void 0 ? {} : { "--panel-width": typeof i == "number" ? `${i}px` : i }
|
|
5343
|
-
}, m = r === "trigger" ?
|
|
5344
|
-
return /* @__PURE__ */ h(
|
|
5721
|
+
}, m = r === "trigger" ? Zr.panelTrigger : r === "end" ? Zr.alignEnd : "";
|
|
5722
|
+
return /* @__PURE__ */ h($r.Provider, {
|
|
5345
5723
|
value: t,
|
|
5346
5724
|
children: /* @__PURE__ */ g(ee.Root, {
|
|
5347
5725
|
...l,
|
|
@@ -5350,67 +5728,67 @@ var Lr = {
|
|
|
5350
5728
|
},
|
|
5351
5729
|
"aria-label": c,
|
|
5352
5730
|
style: p,
|
|
5353
|
-
className: `${
|
|
5731
|
+
className: `${Zr.root} ${Zr[t]} ${n === "end" ? Zr.alignList : ""} ${m} ${a}`,
|
|
5354
5732
|
children: [s, /* @__PURE__ */ h("div", {
|
|
5355
|
-
className:
|
|
5356
|
-
children: /* @__PURE__ */ h(ee.Viewport, { className:
|
|
5733
|
+
className: Zr.viewportPosition,
|
|
5734
|
+
children: /* @__PURE__ */ h(ee.Viewport, { className: Zr.viewport })
|
|
5357
5735
|
})]
|
|
5358
5736
|
})
|
|
5359
5737
|
});
|
|
5360
5738
|
});
|
|
5361
|
-
|
|
5362
|
-
var
|
|
5739
|
+
ti.displayName = "NavigationMenu";
|
|
5740
|
+
var ni = e.forwardRef(({ className: e = "", ...t }, n) => /* @__PURE__ */ h(ee.List, {
|
|
5363
5741
|
...t,
|
|
5364
5742
|
ref: n,
|
|
5365
|
-
className: `${
|
|
5743
|
+
className: `${Zr.list} ${e}`
|
|
5366
5744
|
}));
|
|
5367
|
-
|
|
5368
|
-
var
|
|
5369
|
-
function
|
|
5370
|
-
let n = e.useContext(
|
|
5745
|
+
ni.displayName = "NavigationMenuList";
|
|
5746
|
+
var ri = ee.Item;
|
|
5747
|
+
function ii({ icon: t }) {
|
|
5748
|
+
let n = e.useContext($r);
|
|
5371
5749
|
return t ? /* @__PURE__ */ h("span", {
|
|
5372
|
-
className:
|
|
5750
|
+
className: Zr.icon,
|
|
5373
5751
|
"aria-hidden": "true",
|
|
5374
5752
|
children: e.cloneElement(t, {
|
|
5375
|
-
size:
|
|
5753
|
+
size: Qr[n],
|
|
5376
5754
|
color: "currentColor"
|
|
5377
5755
|
})
|
|
5378
5756
|
}) : null;
|
|
5379
5757
|
}
|
|
5380
|
-
var
|
|
5381
|
-
let o = e.useContext(
|
|
5758
|
+
var ai = e.forwardRef(({ className: t = "", icon: n, children: r, ...i }, a) => {
|
|
5759
|
+
let o = e.useContext($r);
|
|
5382
5760
|
return /* @__PURE__ */ g(ee.Trigger, {
|
|
5383
5761
|
...i,
|
|
5384
5762
|
ref: a,
|
|
5385
|
-
className: `${
|
|
5763
|
+
className: `${Zr.control} ${t}`,
|
|
5386
5764
|
children: [
|
|
5387
|
-
/* @__PURE__ */ h(
|
|
5765
|
+
/* @__PURE__ */ h(ii, { icon: n }),
|
|
5388
5766
|
r,
|
|
5389
5767
|
/* @__PURE__ */ h("span", {
|
|
5390
|
-
className:
|
|
5768
|
+
className: Zr.caret,
|
|
5391
5769
|
"aria-hidden": "true",
|
|
5392
5770
|
children: /* @__PURE__ */ h(x, {
|
|
5393
|
-
size:
|
|
5771
|
+
size: Qr[o],
|
|
5394
5772
|
color: "currentColor"
|
|
5395
5773
|
})
|
|
5396
5774
|
})
|
|
5397
5775
|
]
|
|
5398
5776
|
});
|
|
5399
5777
|
});
|
|
5400
|
-
|
|
5401
|
-
var
|
|
5778
|
+
ai.displayName = "NavigationMenuTrigger";
|
|
5779
|
+
var oi = e.forwardRef(({ className: e = "", ...t }, n) => /* @__PURE__ */ h(ee.Content, {
|
|
5402
5780
|
...t,
|
|
5403
5781
|
ref: n,
|
|
5404
|
-
className: `${
|
|
5782
|
+
className: `${Zr.content} ${e}`
|
|
5405
5783
|
}));
|
|
5406
|
-
|
|
5407
|
-
var
|
|
5784
|
+
oi.displayName = "NavigationMenuContent";
|
|
5785
|
+
var si = e.forwardRef(({ variant: e = "panel", icon: t, className: n = "", children: r, ...i }, a) => /* @__PURE__ */ h(ee.Link, {
|
|
5408
5786
|
...i,
|
|
5409
5787
|
ref: a,
|
|
5410
|
-
className: `${e === "navigation" ?
|
|
5411
|
-
children: e === "navigation" && !i.asChild ? /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(
|
|
5788
|
+
className: `${e === "navigation" ? Zr.control : Zr.link} ${n}`,
|
|
5789
|
+
children: e === "navigation" && !i.asChild ? /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(ii, { icon: t }), r] }) : r
|
|
5412
5790
|
}));
|
|
5413
|
-
|
|
5791
|
+
si.displayName = "NavigationMenuLink";
|
|
5414
5792
|
var $ = {
|
|
5415
5793
|
panel: "_panel_1psyb_7",
|
|
5416
5794
|
header: "_header_1psyb_15",
|
|
@@ -5460,12 +5838,12 @@ var $ = {
|
|
|
5460
5838
|
reasoningIcon: "_reasoningIcon_1psyb_260",
|
|
5461
5839
|
reasoningChevron: "_reasoningChevron_1psyb_262",
|
|
5462
5840
|
reasoningBody: "_reasoningBody_1psyb_264"
|
|
5463
|
-
},
|
|
5464
|
-
/* @__PURE__ */ g("span", { children: [/* @__PURE__ */ h(
|
|
5465
|
-
/* @__PURE__ */ g("span", { children: [/* @__PURE__ */ h(
|
|
5466
|
-
/* @__PURE__ */ g("span", { children: [/* @__PURE__ */ h(
|
|
5841
|
+
}, ci = 80, li = /* @__PURE__ */ g(m, { children: [
|
|
5842
|
+
/* @__PURE__ */ g("span", { children: [/* @__PURE__ */ h(Yt, { children: "↵" }), " send"] }),
|
|
5843
|
+
/* @__PURE__ */ g("span", { children: [/* @__PURE__ */ h(Yt, { children: "⇧↵" }), " new line"] }),
|
|
5844
|
+
/* @__PURE__ */ g("span", { children: [/* @__PURE__ */ h(Yt, { children: "esc" }), " close"] })
|
|
5467
5845
|
] });
|
|
5468
|
-
function
|
|
5846
|
+
function ui({ header: e, children: t, composer: n, hints: r = li, className: a = "", threadRef: s, "aria-label": c, jumpToLatest: l = !0, jumpLabel: u = "Latest" }) {
|
|
5469
5847
|
let [p, m] = f(null), [_, y] = f(!1), b = d(s);
|
|
5470
5848
|
b.current = s;
|
|
5471
5849
|
let x = i((e) => {
|
|
@@ -5475,7 +5853,7 @@ function Xr({ header: e, children: t, composer: n, hints: r = Yr, className: a =
|
|
|
5475
5853
|
}, []);
|
|
5476
5854
|
return o(() => {
|
|
5477
5855
|
if (!p || !l) return;
|
|
5478
|
-
let e = () => y(p.scrollHeight - p.scrollTop - p.clientHeight >
|
|
5856
|
+
let e = () => y(p.scrollHeight - p.scrollTop - p.clientHeight > ci);
|
|
5479
5857
|
p.addEventListener("scroll", e, { passive: !0 });
|
|
5480
5858
|
let t = new MutationObserver(e);
|
|
5481
5859
|
t.observe(p, {
|
|
@@ -5528,7 +5906,7 @@ function Xr({ header: e, children: t, composer: n, hints: r = Yr, className: a =
|
|
|
5528
5906
|
});
|
|
5529
5907
|
}
|
|
5530
5908
|
// src/components/Chat/Message.tsx
|
|
5531
|
-
function
|
|
5909
|
+
function di({ children: e, className: t = "" }) {
|
|
5532
5910
|
return /* @__PURE__ */ h("div", {
|
|
5533
5911
|
className: $.userRow,
|
|
5534
5912
|
children: /* @__PURE__ */ h("div", {
|
|
@@ -5537,7 +5915,7 @@ function Zr({ children: e, className: t = "" }) {
|
|
|
5537
5915
|
})
|
|
5538
5916
|
});
|
|
5539
5917
|
}
|
|
5540
|
-
function
|
|
5918
|
+
function fi({ label: e = "Assistant", icon: t, children: n, className: r = "" }) {
|
|
5541
5919
|
return /* @__PURE__ */ g("div", {
|
|
5542
5920
|
className: `${$.assistant} ${r}`,
|
|
5543
5921
|
children: [/* @__PURE__ */ g("div", {
|
|
@@ -5553,13 +5931,13 @@ function Qr({ label: e = "Assistant", icon: t, children: n, className: r = "" })
|
|
|
5553
5931
|
});
|
|
5554
5932
|
}
|
|
5555
5933
|
// src/components/Chat/Composer.tsx
|
|
5556
|
-
var
|
|
5934
|
+
var pi = 18, mi = e.forwardRef(function({ value: e, onChange: t, onSend: n, onStop: r, streaming: a = !1, placeholder: s = "Ask a question…", disabled: l = !1, autoFocus: u = !1, icon: f, maxLines: p = 6, maxLength: m, className: v = "", "aria-label": b = "Message" }, x) {
|
|
5557
5935
|
let S = d(null);
|
|
5558
5936
|
c(x, () => ({ focus: () => S.current?.focus() }), []), o(() => {
|
|
5559
5937
|
let e = S.current;
|
|
5560
5938
|
if (!e) return;
|
|
5561
5939
|
e.style.height = "auto";
|
|
5562
|
-
let t =
|
|
5940
|
+
let t = pi * p + 12;
|
|
5563
5941
|
e.style.height = `${Math.min(e.scrollHeight, t)}px`;
|
|
5564
5942
|
}, [e, p]);
|
|
5565
5943
|
let C = m !== void 0 && m > 0 && e.length > m, w = !a && !l && !C && e.trim().length > 0, T = i(() => {
|
|
@@ -5626,7 +6004,7 @@ var $r = 18, ei = e.forwardRef(function({ value: e, onChange: t, onSend: n, onSt
|
|
|
5626
6004
|
});
|
|
5627
6005
|
});
|
|
5628
6006
|
// src/components/Chat/Citation.tsx
|
|
5629
|
-
function
|
|
6007
|
+
function hi({ n: e, href: t, onClick: n, title: r, className: i = "" }) {
|
|
5630
6008
|
let a = `${$.ref} ${i}`;
|
|
5631
6009
|
return t ? /* @__PURE__ */ h("a", {
|
|
5632
6010
|
href: t,
|
|
@@ -5644,7 +6022,7 @@ function ti({ n: e, href: t, onClick: n, title: r, className: i = "" }) {
|
|
|
5644
6022
|
children: e
|
|
5645
6023
|
});
|
|
5646
6024
|
}
|
|
5647
|
-
function
|
|
6025
|
+
function gi({ items: e, label: t = "Sources", className: n = "" }) {
|
|
5648
6026
|
return e.length === 0 ? null : /* @__PURE__ */ g("div", {
|
|
5649
6027
|
className: `${$.stack} ${n}`,
|
|
5650
6028
|
children: [/* @__PURE__ */ h("div", {
|
|
@@ -5653,7 +6031,7 @@ function ni({ items: e, label: t = "Sources", className: n = "" }) {
|
|
|
5653
6031
|
}), /* @__PURE__ */ h("div", {
|
|
5654
6032
|
className: $.wrap,
|
|
5655
6033
|
children: e.map((e) => {
|
|
5656
|
-
let t = /* @__PURE__ */ g(
|
|
6034
|
+
let t = /* @__PURE__ */ g(Yn, {
|
|
5657
6035
|
icon: e.icon,
|
|
5658
6036
|
children: [
|
|
5659
6037
|
/* @__PURE__ */ h("span", {
|
|
@@ -5680,7 +6058,7 @@ function ni({ items: e, label: t = "Sources", className: n = "" }) {
|
|
|
5680
6058
|
});
|
|
5681
6059
|
}
|
|
5682
6060
|
// src/components/Chat/StreamStatus.tsx
|
|
5683
|
-
function
|
|
6061
|
+
function _i({ children: e, spinner: t, className: n = "" }) {
|
|
5684
6062
|
return /* @__PURE__ */ g("div", {
|
|
5685
6063
|
className: `${$.status} ${n}`,
|
|
5686
6064
|
role: "status",
|
|
@@ -5694,7 +6072,7 @@ function ri({ children: e, spinner: t, className: n = "" }) {
|
|
|
5694
6072
|
});
|
|
5695
6073
|
}
|
|
5696
6074
|
// src/components/Chat/Suggestions.tsx
|
|
5697
|
-
function
|
|
6075
|
+
function vi({ items: e, onPick: t, label: n = "Try asking", className: r = "" }) {
|
|
5698
6076
|
return /* @__PURE__ */ g("div", {
|
|
5699
6077
|
className: `${$.suggestions} ${r}`,
|
|
5700
6078
|
children: [/* @__PURE__ */ h("div", {
|
|
@@ -5712,7 +6090,7 @@ function ii({ items: e, onPick: t, label: n = "Try asking", className: r = "" })
|
|
|
5712
6090
|
});
|
|
5713
6091
|
}
|
|
5714
6092
|
// src/components/Chat/AnswerActions.tsx
|
|
5715
|
-
function
|
|
6093
|
+
function yi({ onCopy: e, copied: t = !1, onFollowUp: n, followUpLabel: r = "Ask a follow-up", className: i = "" }) {
|
|
5716
6094
|
return /* @__PURE__ */ g("div", {
|
|
5717
6095
|
className: `${$.actions} ${i}`,
|
|
5718
6096
|
children: [
|
|
@@ -5735,7 +6113,7 @@ function ai({ onCopy: e, copied: t = !1, onFollowUp: n, followUpLabel: r = "Ask
|
|
|
5735
6113
|
});
|
|
5736
6114
|
}
|
|
5737
6115
|
// src/components/Chat/ToolStep.tsx
|
|
5738
|
-
function
|
|
6116
|
+
function bi({ children: t, state: n = "done", meta: r, icon: i, detail: a, defaultOpen: o = !1, className: c = "" }) {
|
|
5739
6117
|
let [l, u] = f(o), d = s(), p = n === "running" ? /* @__PURE__ */ h(ne, { size: 14 }) : n === "error" ? /* @__PURE__ */ h(F, {
|
|
5740
6118
|
size: 14,
|
|
5741
6119
|
color: "currentColor"
|
|
@@ -5787,7 +6165,7 @@ function oi({ children: t, state: n = "done", meta: r, icon: i, detail: a, defau
|
|
|
5787
6165
|
})]
|
|
5788
6166
|
});
|
|
5789
6167
|
}
|
|
5790
|
-
function
|
|
6168
|
+
function xi({ children: e, summary: t, defaultOpen: n = !1, "aria-label": r = "Steps", className: i = "" }) {
|
|
5791
6169
|
let [a, o] = f(n), c = s();
|
|
5792
6170
|
return /* @__PURE__ */ h("div", {
|
|
5793
6171
|
className: `${$.toolSteps} ${i}`,
|
|
@@ -5815,7 +6193,7 @@ function si({ children: e, summary: t, defaultOpen: n = !1, "aria-label": r = "S
|
|
|
5815
6193
|
});
|
|
5816
6194
|
}
|
|
5817
6195
|
// src/components/Chat/Reasoning.tsx
|
|
5818
|
-
function
|
|
6196
|
+
function Si({ children: e, streaming: t = !1, seconds: n, className: r = "" }) {
|
|
5819
6197
|
let [i, a] = f(null), o = s(), c = i ?? t, l = t ? "Thinking…" : n == null ? "Thought" : n < 1 ? "Thought for a moment" : `Thought for ${n}s`, u = h(c ? x : C, {
|
|
5820
6198
|
size: 14,
|
|
5821
6199
|
color: "currentColor"
|
|
@@ -5849,20 +6227,82 @@ function ci({ children: e, streaming: t = !1, seconds: n, className: r = "" }) {
|
|
|
5849
6227
|
})]
|
|
5850
6228
|
});
|
|
5851
6229
|
}
|
|
5852
|
-
var
|
|
6230
|
+
var Ci = {
|
|
6231
|
+
launcherRoot: "_launcherRoot_s5ap7_4",
|
|
6232
|
+
fixed: "_fixed_s5ap7_6",
|
|
6233
|
+
contained: "_contained_s5ap7_7",
|
|
6234
|
+
right: "_right_s5ap7_8",
|
|
6235
|
+
left: "_left_s5ap7_10",
|
|
6236
|
+
window: "_window_s5ap7_13",
|
|
6237
|
+
head: "_head_s5ap7_16",
|
|
6238
|
+
title: "_title_s5ap7_17",
|
|
6239
|
+
headActions: "_headActions_s5ap7_18",
|
|
6240
|
+
body: "_body_s5ap7_19",
|
|
6241
|
+
footer: "_footer_s5ap7_20"
|
|
6242
|
+
};
|
|
6243
|
+
// src/components/Chat/ChatLauncher.tsx
|
|
6244
|
+
function wi({ title: e, children: t, headerActions: n, footer: r, label: i = "Ask", closeLabel: a = "Close", icon: s, open: c, onOpenChange: l, defaultOpen: u = !1, corner: d = "bottom-right", contained: p = !1, "aria-label": m, className: v = "" }) {
|
|
6245
|
+
let [y, b] = f(u), x = c ?? y, S = (e) => {
|
|
6246
|
+
c === void 0 && b(e), l?.(e);
|
|
6247
|
+
};
|
|
6248
|
+
o(() => {
|
|
6249
|
+
if (!x) return;
|
|
6250
|
+
let e = (e) => {
|
|
6251
|
+
e.key === "Escape" && S(!1);
|
|
6252
|
+
};
|
|
6253
|
+
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
6254
|
+
});
|
|
6255
|
+
let C = `${p ? Ci.contained : Ci.fixed} ${d === "bottom-left" ? Ci.left : Ci.right}`;
|
|
6256
|
+
return /* @__PURE__ */ g("div", {
|
|
6257
|
+
className: `${Ci.launcherRoot} ${C} ${v}`,
|
|
6258
|
+
children: [/* @__PURE__ */ g("section", {
|
|
6259
|
+
className: Ci.window,
|
|
6260
|
+
hidden: !x,
|
|
6261
|
+
role: "dialog",
|
|
6262
|
+
"aria-label": m ?? (typeof e == "string" ? e : void 0),
|
|
6263
|
+
children: [
|
|
6264
|
+
/* @__PURE__ */ g("div", {
|
|
6265
|
+
className: Ci.head,
|
|
6266
|
+
children: [/* @__PURE__ */ h("span", {
|
|
6267
|
+
className: Ci.title,
|
|
6268
|
+
children: e
|
|
6269
|
+
}), n && /* @__PURE__ */ h("span", {
|
|
6270
|
+
className: Ci.headActions,
|
|
6271
|
+
children: n
|
|
6272
|
+
})]
|
|
6273
|
+
}),
|
|
6274
|
+
/* @__PURE__ */ h("div", {
|
|
6275
|
+
className: Ci.body,
|
|
6276
|
+
children: t
|
|
6277
|
+
}),
|
|
6278
|
+
r && /* @__PURE__ */ h("div", {
|
|
6279
|
+
className: Ci.footer,
|
|
6280
|
+
children: r
|
|
6281
|
+
})
|
|
6282
|
+
]
|
|
6283
|
+
}), /* @__PURE__ */ h(W, {
|
|
6284
|
+
variant: "primary",
|
|
6285
|
+
iconLeft: s ?? /* @__PURE__ */ h(_, {}),
|
|
6286
|
+
"aria-expanded": x,
|
|
6287
|
+
onClick: () => S(!x),
|
|
6288
|
+
children: x ? a : i
|
|
6289
|
+
})]
|
|
6290
|
+
});
|
|
6291
|
+
}
|
|
6292
|
+
var Ti = {
|
|
5853
6293
|
truncate: "_truncate_za4sm_1",
|
|
5854
6294
|
start: "_start_za4sm_13"
|
|
5855
6295
|
};
|
|
5856
6296
|
// src/components/Truncate/Truncate.tsx
|
|
5857
|
-
function
|
|
6297
|
+
function Ei({ children: e, side: t = "end", title: n, className: r = "" }) {
|
|
5858
6298
|
let i = n ?? (typeof e == "string" ? e : void 0);
|
|
5859
6299
|
return /* @__PURE__ */ h("span", {
|
|
5860
|
-
className: `${
|
|
6300
|
+
className: `${Ti.truncate} ${t === "start" ? Ti.start : ""} ${r}`,
|
|
5861
6301
|
title: i,
|
|
5862
6302
|
children: t === "start" ? /* @__PURE__ */ h("bdi", { children: e }) : e
|
|
5863
6303
|
});
|
|
5864
6304
|
}
|
|
5865
|
-
var
|
|
6305
|
+
var Di = {
|
|
5866
6306
|
disclosure: "_disclosure_94bgy_1",
|
|
5867
6307
|
trigger: "_trigger_94bgy_7",
|
|
5868
6308
|
summary: "_summary_94bgy_31",
|
|
@@ -5870,24 +6310,24 @@ var di = {
|
|
|
5870
6310
|
content: "_content_94bgy_43"
|
|
5871
6311
|
};
|
|
5872
6312
|
// src/components/Disclosure/Disclosure.tsx
|
|
5873
|
-
function
|
|
6313
|
+
function Oi({ summary: t, children: n, open: r, defaultOpen: i = !1, onOpenChange: a, className: o = "" }) {
|
|
5874
6314
|
let [s, c] = e.useState(i), l = r ?? s, u = e.useId();
|
|
5875
6315
|
return /* @__PURE__ */ g("div", {
|
|
5876
|
-
className: `${
|
|
6316
|
+
className: `${Di.disclosure} ${o}`,
|
|
5877
6317
|
"data-state": l ? "open" : "closed",
|
|
5878
6318
|
children: [/* @__PURE__ */ g("button", {
|
|
5879
6319
|
type: "button",
|
|
5880
|
-
className:
|
|
6320
|
+
className: Di.trigger,
|
|
5881
6321
|
"aria-expanded": l,
|
|
5882
6322
|
"aria-controls": l ? u : void 0,
|
|
5883
6323
|
onClick: () => {
|
|
5884
6324
|
r === void 0 && c(!l), a?.(!l);
|
|
5885
6325
|
},
|
|
5886
6326
|
children: [/* @__PURE__ */ h("span", {
|
|
5887
|
-
className:
|
|
6327
|
+
className: Di.summary,
|
|
5888
6328
|
children: t
|
|
5889
6329
|
}), /* @__PURE__ */ h("span", {
|
|
5890
|
-
className:
|
|
6330
|
+
className: Di.chevron,
|
|
5891
6331
|
"aria-hidden": "true",
|
|
5892
6332
|
children: h(l ? x : C, {
|
|
5893
6333
|
size: 14,
|
|
@@ -5896,18 +6336,18 @@ function fi({ summary: t, children: n, open: r, defaultOpen: i = !1, onOpenChang
|
|
|
5896
6336
|
})]
|
|
5897
6337
|
}), l && /* @__PURE__ */ h("div", {
|
|
5898
6338
|
id: u,
|
|
5899
|
-
className:
|
|
6339
|
+
className: Di.content,
|
|
5900
6340
|
children: n
|
|
5901
6341
|
})]
|
|
5902
6342
|
});
|
|
5903
6343
|
}
|
|
5904
|
-
var
|
|
6344
|
+
var ki = {
|
|
5905
6345
|
field: "_field_5juos_1",
|
|
5906
6346
|
code: "_code_5juos_16",
|
|
5907
6347
|
status: "_status_5juos_31"
|
|
5908
6348
|
};
|
|
5909
6349
|
// src/components/CodeCopy/CodeCopy.tsx
|
|
5910
|
-
async function
|
|
6350
|
+
async function Ai(e) {
|
|
5911
6351
|
if (navigator.clipboard && window.isSecureContext) try {
|
|
5912
6352
|
return await navigator.clipboard.writeText(e), !0;
|
|
5913
6353
|
} catch {}
|
|
@@ -5921,13 +6361,13 @@ async function mi(e) {
|
|
|
5921
6361
|
t.remove();
|
|
5922
6362
|
}
|
|
5923
6363
|
}
|
|
5924
|
-
function
|
|
6364
|
+
function ji({ code: e, className: t, onCopy: n }) {
|
|
5925
6365
|
let [r, i] = f(!1), a = d(void 0);
|
|
5926
6366
|
return o(() => () => clearTimeout(a.current), []), /* @__PURE__ */ g("div", {
|
|
5927
|
-
className: [
|
|
6367
|
+
className: [ki.field, t].filter(Boolean).join(" "),
|
|
5928
6368
|
children: [
|
|
5929
6369
|
/* @__PURE__ */ h("code", {
|
|
5930
|
-
className:
|
|
6370
|
+
className: ki.code,
|
|
5931
6371
|
children: e
|
|
5932
6372
|
}),
|
|
5933
6373
|
/* @__PURE__ */ h(W, {
|
|
@@ -5935,17 +6375,17 @@ function hi({ code: e, className: t, onCopy: n }) {
|
|
|
5935
6375
|
variant: "ghost",
|
|
5936
6376
|
iconLeft: h(r ? b : w, {}),
|
|
5937
6377
|
onClick: async () => {
|
|
5938
|
-
await
|
|
6378
|
+
await Ai(e) && (i(!0), n?.(), clearTimeout(a.current), a.current = setTimeout(() => i(!1), 2e3));
|
|
5939
6379
|
},
|
|
5940
6380
|
"aria-label": r ? "Copied" : "Copy",
|
|
5941
6381
|
title: r ? "Copied" : "Copy"
|
|
5942
6382
|
}),
|
|
5943
6383
|
/* @__PURE__ */ h("span", {
|
|
5944
|
-
className:
|
|
6384
|
+
className: ki.status,
|
|
5945
6385
|
role: "status",
|
|
5946
6386
|
children: r ? "Copied" : ""
|
|
5947
6387
|
})
|
|
5948
6388
|
]
|
|
5949
6389
|
});
|
|
5950
6390
|
}
|
|
5951
|
-
export {
|
|
6391
|
+
export { $n as Alert, tr as AlertDescription, er as AlertTitle, yi as AnswerActions, fi as AssistantMessage, xt as BarMeter, De as BarSlider, le as Base, ut as Breadcrumbs, W as Button, _r as Chart, wi as ChatLauncher, ui as ChatPanel, se as Checkbox, Yn as Chip, gi as CitationList, hi as CitationRef, ji as CodeCopy, xn as Combobox, Zt as CommandPalette, mi as Composer, Mr as DatePicker, Oi as Disclosure, Cn as EmptyState, de as FilterPanelBase, qt as GroupedBars, At as Heatmap, Le as HistogramRange, Xr as Icicle, ge as InputField, Yt as Kbd, Tr as Modal, ti as NavigationMenu, oi as NavigationMenuContent, ri as NavigationMenuItem, si as NavigationMenuLink, ni as NavigationMenuList, ai as NavigationMenuTrigger, He as Popover, Ue as PopoverDivider, ie as PortalContainerProvider, ft as ProgressBar, Vt as RadarChart, Ft as RadialChart, ve as RadioButton, Si as Reasoning, An as Resizable, Lr as STAT_ICON_SIZE, rr as SaveBar, Wr as ScoreMeter, Ae as ScrubSlider, me as SearchField, st as SegmentedControl, ze as Select, Tn as Sheet, Vr as ShimmerText, vn as Sidebar, Fr as Skeleton, Se as Slider, Ne as SliderField, xr as Sparkline, ne as Spinner, Rr as Stat, zr as StatGroup, Kr as StepProgress, _i as StreamStatus, vi as Suggestions, Xe as Table, $e as TableCell, Ze as TableHeader, tt as TableIcon, Qe as TableRow, et as TableValue, at as Tabs, $t as TagsInput, Cr as Textarea, un as Toaster, be as ToggleSwitch, bi as ToolStep, xi as ToolSteps, fn as Tooltip, Gn as TreeCanvas, Ei as Truncate, di as UserMessage, Et as Waffle, Tt as allocateCells, Ie as barsOf, Nt as calendarCells, li as defaultChatHints, kt as levelOf, U as spinnerNames, sn as toast, ae as usePortalContainer };
|