xedonium 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/xedonium.js CHANGED
@@ -1,47 +1,117 @@
1
- import { jsxs as h, jsx as e, Fragment as Y } from "react/jsx-runtime";
2
- import { useId as S, useRef as E, useState as k, useLayoutEffect as Ne, useEffect as T, cloneElement as Re, createContext as ze, useContext as We, Children as Ke, useMemo as $e, useCallback as Me, forwardRef as qe } from "react";
3
- import { createPortal as H } from "react-dom";
4
- const pe = 6, Q = 8, Le = ({ text: t, children: r, className: a = "" }) => {
5
- const n = S(), s = E(null), l = E(null), [o, c] = k(!1), [i, u] = k(null), m = () => c(!0), d = () => {
6
- c(!1), u(null);
1
+ import { jsxs as f, jsx as t, Fragment as re } from "react/jsx-runtime";
2
+ import { useRef as A, useEffect as P, useId as O, useState as D, useLayoutEffect as ve, cloneElement as Ve, createContext as Xe, useContext as Je, Children as et, useMemo as je, useCallback as Fe, forwardRef as tt } from "react";
3
+ import { createPortal as ae } from "react-dom";
4
+ const V = (e, r, a) => {
5
+ const n = A(a);
6
+ P(() => {
7
+ n.current = a;
8
+ }), P(() => {
9
+ if (!e) return;
10
+ const s = Array.isArray(r) ? r : [r], l = (i) => {
11
+ s.some((c) => {
12
+ var u;
13
+ return (u = c.current) == null ? void 0 : u.contains(i.target);
14
+ }) || n.current("outside");
15
+ }, o = (i) => {
16
+ i.key === "Escape" && n.current("escape");
17
+ };
18
+ return document.addEventListener("mousedown", l), document.addEventListener("keydown", o), () => {
19
+ document.removeEventListener("mousedown", l), document.removeEventListener("keydown", o);
20
+ };
21
+ }, [e]);
22
+ }, K = 8, rt = { top: "bottom", bottom: "top", left: "right", right: "left" }, at = (e = "bottom") => {
23
+ const [r, a = "center"] = e.split("-");
24
+ return { side: r, align: a };
25
+ }, Ne = (e, r, a, n, s) => {
26
+ if (e === "top" || e === "bottom") {
27
+ const i = e === "bottom" ? a.bottom + s : a.top - s - n.height, c = r === "start" ? a.left : r === "end" ? a.right - n.width : a.left + a.width / 2 - n.width / 2;
28
+ return { top: i, left: c };
29
+ }
30
+ const l = e === "right" ? a.right + s : a.left - s - n.width;
31
+ return { top: r === "start" ? a.top : r === "end" ? a.bottom - n.height : a.top + a.height / 2 - n.height / 2, left: l };
32
+ }, J = (e, r, a, n, s) => e === "bottom" ? Math.max(0, r.bottom + n + a.height - (s.height - K)) : e === "top" ? Math.max(0, K - (r.top - n - a.height)) : e === "right" ? Math.max(0, r.right + n + a.width - (s.width - K)) : Math.max(0, K - (r.left - n - a.width)), Be = (e, r, { placement: a = "bottom", gap: n = 6, viewport: s } = {}) => {
33
+ const l = s ?? { width: document.documentElement.clientWidth, height: window.innerHeight }, { side: o, align: i } = at(a);
34
+ let c = o;
35
+ if (o === "auto") {
36
+ const v = ["bottom", "top", "right", "left"];
37
+ c = v.find((N) => J(N, e, r, n, l) === 0), c || (c = v.reduce(
38
+ (N, M) => J(M, e, r, n, l) < J(N, e, r, n, l) ? M : N
39
+ ));
40
+ } else if (J(o, e, r, n, l) > 0) {
41
+ const v = rt[o];
42
+ J(v, e, r, n, l) < J(o, e, r, n, l) && (c = v);
43
+ }
44
+ const u = c === "top" || c === "bottom", b = (v) => u ? [v.left, v.left + r.width] : [v.top, v.top + r.height], d = u ? l.width : l.height, p = (v) => {
45
+ const [N, M] = b(v);
46
+ return Math.max(0, K - N) + Math.max(0, M - (d - K));
7
47
  };
8
- if (Ne(() => {
9
- if (!o || !s.current || !l.current) return;
10
- const b = s.current.getBoundingClientRect(), x = l.current.getBoundingClientRect(), p = document.documentElement.clientWidth, g = window.innerHeight;
11
- let y = b.bottom + pe;
12
- y + x.height > g - Q && (y = Math.max(Q, b.top - pe - x.height));
13
- const C = b.left + b.width / 2 - x.width / 2, w = Math.min(Math.max(Q, C), p - Q - x.width);
14
- u({ top: y, left: w });
15
- }, [o, t]), T(() => {
16
- if (!o) return;
17
- const b = (x) => x.key === "Escape" && d();
18
- return window.addEventListener("keydown", b), window.addEventListener("scroll", d, !0), window.addEventListener("resize", d), () => {
19
- window.removeEventListener("keydown", b), window.removeEventListener("scroll", d, !0), window.removeEventListener("resize", d);
48
+ let m = i, g = Ne(c, i, e, r, n);
49
+ if ((i === "start" || i === "end") && p(g) > 0) {
50
+ const v = i === "start" ? "end" : "start", N = Ne(c, v, e, r, n);
51
+ p(N) < p(g) && (g = N, m = v);
52
+ }
53
+ const h = Math.min(Math.max(K, g.top), Math.max(K, l.height - K - r.height)), x = Math.min(Math.max(K, g.left), Math.max(K, l.width - K - r.width));
54
+ return { top: h, left: x, side: c, align: m };
55
+ }, nt = (e) => {
56
+ const r = e.getBoundingClientRect(), a = r.width * r.height;
57
+ if (a === 0) return !1;
58
+ let n = {
59
+ top: Math.max(r.top, 0),
60
+ left: Math.max(r.left, 0),
61
+ bottom: Math.min(r.bottom, window.innerHeight),
62
+ right: Math.min(r.right, document.documentElement.clientWidth)
63
+ };
64
+ for (let o = e.parentElement; o && o !== document.body; o = o.parentElement) {
65
+ const { overflowX: i, overflowY: c } = getComputedStyle(o);
66
+ if (i === "visible" && c === "visible") continue;
67
+ const u = o.getBoundingClientRect();
68
+ n = {
69
+ top: Math.max(n.top, u.top),
70
+ left: Math.max(n.left, u.left),
71
+ bottom: Math.min(n.bottom, u.bottom),
72
+ right: Math.min(n.right, u.right)
20
73
  };
21
- }, [o]), !t) return r;
22
- const f = r.props["aria-label"] !== t;
23
- return /* @__PURE__ */ h(
74
+ }
75
+ const s = Math.max(0, n.right - n.left), l = Math.max(0, n.bottom - n.top);
76
+ return s * l / a < 0.5;
77
+ }, lt = 6, Oe = ({ text: e, children: r, placement: a = "bottom", className: n = "" }) => {
78
+ const s = O(), l = A(null), o = A(null), [i, c] = D(!1), [u, b] = D(null), d = () => c(!0), p = () => {
79
+ c(!1), b(null);
80
+ };
81
+ if (ve(() => {
82
+ if (!i || !l.current || !o.current) return;
83
+ const g = l.current.getBoundingClientRect(), h = o.current.getBoundingClientRect(), { top: x, left: v } = Be(g, h, { placement: a, gap: lt });
84
+ b({ top: x, left: v });
85
+ }, [i, e, a]), P(() => {
86
+ if (!i) return;
87
+ const g = (h) => h.key === "Escape" && p();
88
+ return window.addEventListener("keydown", g), window.addEventListener("scroll", p, !0), window.addEventListener("resize", p), () => {
89
+ window.removeEventListener("keydown", g), window.removeEventListener("scroll", p, !0), window.removeEventListener("resize", p);
90
+ };
91
+ }, [i]), !e) return r;
92
+ const m = r.props["aria-label"] !== e;
93
+ return /* @__PURE__ */ f(
24
94
  "span",
25
95
  {
26
- ref: s,
27
- className: `inline-flex [&>:disabled]:pointer-events-none has-[>:disabled]:cursor-not-allowed ${a}`,
28
- onMouseEnter: m,
29
- onMouseLeave: d,
30
- onFocus: (b) => b.target.matches(":focus-visible") && m(),
31
- onBlur: d,
32
- onPointerDown: d,
96
+ ref: l,
97
+ className: `inline-flex [&>:disabled]:pointer-events-none has-[>:disabled]:cursor-not-allowed ${n}`,
98
+ onMouseEnter: d,
99
+ onMouseLeave: p,
100
+ onFocus: (g) => g.target.matches(":focus-visible") && d(),
101
+ onBlur: p,
102
+ onPointerDown: p,
33
103
  children: [
34
- f ? Re(r, { "aria-describedby": n }) : r,
35
- f && /* @__PURE__ */ e("span", { id: n, hidden: !0, children: t }),
36
- o && H(
37
- /* @__PURE__ */ e(
104
+ m ? Ve(r, { "aria-describedby": s }) : r,
105
+ m && /* @__PURE__ */ t("span", { id: s, hidden: !0, children: e }),
106
+ i && ae(
107
+ /* @__PURE__ */ t(
38
108
  "div",
39
109
  {
40
- ref: l,
110
+ ref: o,
41
111
  "aria-hidden": "true",
42
- style: { top: (i == null ? void 0 : i.top) ?? 0, left: (i == null ? void 0 : i.left) ?? 0, visibility: i ? "visible" : "hidden" },
112
+ style: { top: (u == null ? void 0 : u.top) ?? 0, left: (u == null ? void 0 : u.left) ?? 0, visibility: u ? "visible" : "hidden" },
43
113
  className: "pointer-events-none fixed z-[var(--xd-z-tooltip,100)] w-max max-w-[16rem] border border-app-border bg-app-card px-2.5 py-1.5 text-xs normal-case tracking-normal text-app-text shadow-xl",
44
- children: t
114
+ children: e
45
115
  }
46
116
  ),
47
117
  document.body
@@ -49,118 +119,175 @@ const pe = 6, Q = 8, Le = ({ text: t, children: r, className: a = "" }) => {
49
119
  ]
50
120
  }
51
121
  );
52
- }, R = (t) => {
122
+ }, H = (e) => {
53
123
  const {
54
124
  onClick: r,
55
125
  tooltip: a,
56
- variant: n = "default",
57
- className: s = "",
58
- children: l,
59
- type: o = "button",
126
+ tooltipPlacement: n,
127
+ variant: s = "default",
128
+ className: l = "",
129
+ children: o,
130
+ type: i = "button",
60
131
  disabled: c = !1,
61
- ...i
62
- } = t, m = /* @__PURE__ */ e(
132
+ ...u
133
+ } = e, d = /* @__PURE__ */ t(
63
134
  "button",
64
135
  {
65
- type: o,
136
+ type: i,
66
137
  onClick: r,
67
138
  disabled: c,
68
139
  className: `text-xs font-semibold uppercase tracking-widest ${{
69
140
  default: "bg-app-strong text-app-bg border border-app-strong hover:bg-app-text",
70
141
  secondary: "bg-app-bg text-app-text border border-app-border hover:border-app-strong hover:text-app-text",
71
142
  danger: "bg-red-500/10 text-red-700 dark:text-red-400 border border-red-500/30 hover:bg-red-500/20",
143
+ success: "bg-emerald-600 text-white border border-emerald-600 hover:bg-emerald-500 hover:border-emerald-500 dark:bg-emerald-500 dark:text-black dark:border-emerald-500 dark:hover:bg-emerald-400 dark:hover:border-emerald-400",
72
144
  warning: "bg-amber-400 text-black border border-amber-400 hover:bg-amber-300 hover:border-amber-300"
73
- }[n]} px-3 py-2 transition disabled:cursor-not-allowed disabled:opacity-50 ${s}`,
74
- ...i,
75
- children: l
145
+ }[s]} px-3 py-2 transition disabled:cursor-not-allowed disabled:opacity-50 ${l}`,
146
+ ...u,
147
+ children: o
76
148
  }
77
149
  );
78
- return a ? /* @__PURE__ */ e(Le, { text: a, children: m }) : m;
79
- }, _e = {
80
- default: "text-app-text hover:bg-app-bg",
81
- warning: "text-amber-700 hover:bg-amber-400/10 dark:text-amber-400"
82
- }, Ht = ({ label: t, trigger: r, variant: a = "secondary", items: n, className: s = "" }) => {
83
- const [l, o] = k(!1), c = E(null), i = S();
84
- T(() => {
85
- if (!l) return;
86
- const m = (f) => {
87
- c.current && !c.current.contains(f.target) && o(!1);
88
- }, d = (f) => {
89
- var b, x;
90
- f.key === "Escape" && (o(!1), (x = (b = c.current) == null ? void 0 : b.querySelector("button")) == null || x.focus());
150
+ return a ? /* @__PURE__ */ t(Oe, { text: a, placement: n, children: d }) : d;
151
+ }, X = ({
152
+ open: e,
153
+ anchorRef: r,
154
+ placement: a = "bottom-start",
155
+ gap: n = 4,
156
+ matchWidth: s = !1,
157
+ panelRef: l,
158
+ className: o = "",
159
+ style: i,
160
+ children: c,
161
+ ...u
162
+ }) => {
163
+ const b = A(null), d = l ?? b, [p, m] = D(null);
164
+ return ve(() => {
165
+ if (!e) {
166
+ m(null);
167
+ return;
168
+ }
169
+ const g = () => {
170
+ var M;
171
+ const x = (M = r.current) == null ? void 0 : M.getBoundingClientRect(), v = d.current;
172
+ if (!x || !v) return;
173
+ const N = {
174
+ ...Be(x, { width: v.offsetWidth, height: v.offsetHeight }, { placement: a, gap: n }),
175
+ width: s ? x.width : void 0,
176
+ // the anchor was scrolled out of view: hide rather than hover over unrelated content
177
+ hidden: nt(r.current)
178
+ };
179
+ m(
180
+ (y) => y && y.top === N.top && y.left === N.left && y.width === N.width && y.hidden === N.hidden ? y : N
181
+ );
91
182
  };
92
- return document.addEventListener("mousedown", m), document.addEventListener("keydown", d), () => {
93
- document.removeEventListener("mousedown", m), document.removeEventListener("keydown", d);
183
+ g(), window.addEventListener("scroll", g, !0), window.addEventListener("resize", g);
184
+ const h = typeof ResizeObserver > "u" ? null : new ResizeObserver(g);
185
+ return h && d.current && h.observe(d.current), () => {
186
+ window.removeEventListener("scroll", g, !0), window.removeEventListener("resize", g), h == null || h.disconnect();
94
187
  };
95
- }, [l]);
96
- const u = (m) => {
97
- o(!1), m.onClick();
188
+ }, [e, r, d, a, n, s]), e ? ae(
189
+ /* @__PURE__ */ t(
190
+ "div",
191
+ {
192
+ ref: d,
193
+ ...u,
194
+ style: {
195
+ position: "fixed",
196
+ top: (p == null ? void 0 : p.top) ?? 0,
197
+ left: (p == null ? void 0 : p.left) ?? 0,
198
+ minWidth: p == null ? void 0 : p.width,
199
+ // invisible (but focusable) until measured, so children can take focus on mount; also hidden while scrolled out
200
+ opacity: p && !p.hidden ? 1 : 0,
201
+ pointerEvents: p && !p.hidden ? void 0 : "none",
202
+ ...i
203
+ },
204
+ className: `z-[var(--xd-z-popover,85)] ${o}`,
205
+ children: c
206
+ }
207
+ ),
208
+ document.body
209
+ ) : null;
210
+ }, st = {
211
+ default: "text-app-text hover:bg-app-bg",
212
+ warning: "text-amber-700 hover:bg-amber-400/10 dark:text-amber-400"
213
+ }, hr = ({ label: e, trigger: r, variant: a = "secondary", items: n, placement: s = "bottom-start", className: l = "" }) => {
214
+ const [o, i] = D(!1), c = A(null), u = A(null), b = O();
215
+ V(o, [c, u], (p) => {
216
+ var m, g;
217
+ i(!1), p === "escape" && ((g = (m = c.current) == null ? void 0 : m.querySelector("button")) == null || g.focus());
218
+ });
219
+ const d = (p) => {
220
+ i(!1), p.onClick();
98
221
  };
99
- return /* @__PURE__ */ h("div", { ref: c, className: `relative ${s}`, children: [
100
- /* @__PURE__ */ e(
101
- R,
222
+ return /* @__PURE__ */ f("div", { ref: c, className: `relative inline-block ${l}`, children: [
223
+ /* @__PURE__ */ t(
224
+ H,
102
225
  {
103
- onClick: () => o((m) => !m),
226
+ onClick: () => i((p) => !p),
104
227
  variant: a,
105
- "aria-label": t,
228
+ "aria-label": e,
106
229
  "aria-haspopup": "menu",
107
- "aria-expanded": l,
108
- "aria-controls": l ? i : void 0,
230
+ "aria-expanded": o,
231
+ "aria-controls": o ? b : void 0,
109
232
  children: r
110
233
  }
111
234
  ),
112
- l && /* @__PURE__ */ e(
113
- "div",
235
+ /* @__PURE__ */ t(
236
+ X,
114
237
  {
115
- id: i,
238
+ open: o,
239
+ anchorRef: c,
240
+ panelRef: u,
241
+ placement: s,
242
+ id: b,
116
243
  role: "menu",
117
- "aria-label": t,
118
- className: "absolute right-0 top-full z-20 mt-2 w-60 overflow-hidden border border-app-border bg-app-card shadow-lg",
119
- children: n.map((m) => /* @__PURE__ */ h(
244
+ "aria-label": e,
245
+ className: "w-60 max-w-[calc(100vw-1rem)] overflow-hidden border border-app-border bg-app-card shadow-lg",
246
+ children: n.map((p) => /* @__PURE__ */ f(
120
247
  "button",
121
248
  {
122
249
  type: "button",
123
250
  role: "menuitem",
124
- disabled: m.disabled,
125
- "aria-haspopup": m.hasDialog ? "dialog" : void 0,
126
- onClick: () => u(m),
127
- className: `flex w-full items-center gap-2 border-b border-app-border bg-app-card px-3 py-2.5 text-left transition last:border-b-0 disabled:cursor-not-allowed disabled:opacity-50 ${_e[m.tone || "default"]}`,
251
+ disabled: p.disabled,
252
+ "aria-haspopup": p.hasDialog ? "dialog" : void 0,
253
+ onClick: () => d(p),
254
+ className: `flex w-full items-center gap-2 border-b border-app-border bg-app-card px-3 py-2.5 text-left transition last:border-b-0 disabled:cursor-not-allowed disabled:opacity-50 ${st[p.tone || "default"]}`,
128
255
  children: [
129
- /* @__PURE__ */ h("span", { className: "min-w-0 flex-1", children: [
130
- /* @__PURE__ */ e("span", { className: "block text-xs font-medium uppercase tracking-widest", children: m.label }),
131
- m.description && /* @__PURE__ */ e("span", { className: "mt-0.5 block text-xs normal-case tracking-normal text-app-muted", children: m.description })
256
+ /* @__PURE__ */ f("span", { className: "min-w-0 flex-1", children: [
257
+ /* @__PURE__ */ t("span", { className: "block text-xs font-medium uppercase tracking-widest", children: p.label }),
258
+ p.description && /* @__PURE__ */ t("span", { className: "mt-0.5 block text-xs normal-case tracking-normal text-app-muted", children: p.description })
132
259
  ] }),
133
- m.badge != null && /* @__PURE__ */ e("span", { className: "font-mono text-xs", children: m.badge })
260
+ p.badge != null && /* @__PURE__ */ t("span", { className: "font-mono text-xs", children: p.badge })
134
261
  ]
135
262
  },
136
- m.key
263
+ p.key
137
264
  ))
138
265
  }
139
266
  )
140
267
  ] });
141
- }, oe = ({ className: t }) => /* @__PURE__ */ e(
268
+ }, we = ({ className: e }) => /* @__PURE__ */ t(
142
269
  "svg",
143
270
  {
144
271
  "aria-hidden": "true",
145
272
  focusable: "false",
146
- className: t ?? "h-5 w-5 text-app-soft",
273
+ className: e ?? "h-5 w-5 text-app-soft",
147
274
  fill: "none",
148
275
  viewBox: "0 0 24 24",
149
276
  stroke: "currentColor",
150
277
  strokeWidth: 1.5,
151
- children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" })
278
+ children: /* @__PURE__ */ t("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" })
152
279
  }
153
- ), Ge = ({ className: t }) => /* @__PURE__ */ e(
280
+ ), ot = ({ className: e }) => /* @__PURE__ */ t(
154
281
  "svg",
155
282
  {
156
283
  "aria-hidden": "true",
157
284
  focusable: "false",
158
- className: t ?? "w-4 h-4 text-red-600 dark:text-red-400 flex-shrink-0",
285
+ className: e ?? "w-4 h-4 text-red-600 dark:text-red-400 flex-shrink-0",
159
286
  fill: "none",
160
287
  viewBox: "0 0 24 24",
161
288
  stroke: "currentColor",
162
289
  strokeWidth: 2,
163
- children: /* @__PURE__ */ e(
290
+ children: /* @__PURE__ */ t(
164
291
  "path",
165
292
  {
166
293
  strokeLinecap: "round",
@@ -169,36 +296,36 @@ const pe = 6, Q = 8, Le = ({ text: t, children: r, className: a = "" }) => {
169
296
  }
170
297
  )
171
298
  }
172
- ), Ue = {
299
+ ), it = {
173
300
  info: "border-app-border bg-app-card text-app-text",
174
301
  success: "border-emerald-500/40 bg-emerald-500/10 text-emerald-800 dark:text-emerald-300",
175
302
  warning: "border-amber-500/50 bg-amber-400/15 text-amber-900 dark:text-amber-200",
176
303
  danger: "border-red-500/40 bg-red-500/10 text-red-800 dark:text-red-300"
177
- }, Zt = ({ tone: t = "info", title: r, onClose: a, icon: n, className: s = "", children: l }) => /* @__PURE__ */ h(
304
+ }, mr = ({ tone: e = "info", title: r, onClose: a, icon: n, className: s = "", children: l }) => /* @__PURE__ */ f(
178
305
  "div",
179
306
  {
180
- role: t === "danger" || t === "warning" ? "alert" : "status",
181
- className: `flex items-start gap-3 border px-4 py-3 text-sm ${Ue[t]} ${s}`,
307
+ role: e === "danger" || e === "warning" ? "alert" : "status",
308
+ className: `flex items-start gap-3 border px-4 py-3 text-sm ${it[e]} ${s}`,
182
309
  children: [
183
- /* @__PURE__ */ e("span", { className: "mt-0.5 shrink-0", children: n ?? /* @__PURE__ */ e(Ge, { className: "h-4 w-4" }) }),
184
- /* @__PURE__ */ h("div", { className: "min-w-0 flex-1", children: [
185
- r && /* @__PURE__ */ e("div", { className: "font-semibold", children: r }),
186
- l && /* @__PURE__ */ e("div", { className: r ? "mt-0.5 opacity-90" : "", children: l })
310
+ /* @__PURE__ */ t("span", { className: "mt-0.5 shrink-0", children: n ?? /* @__PURE__ */ t(ot, { className: "h-4 w-4" }) }),
311
+ /* @__PURE__ */ f("div", { className: "min-w-0 flex-1", children: [
312
+ r && /* @__PURE__ */ t("div", { className: "font-semibold", children: r }),
313
+ l && /* @__PURE__ */ t("div", { className: r ? "mt-0.5 opacity-90" : "", children: l })
187
314
  ] }),
188
- a && /* @__PURE__ */ e(
315
+ a && /* @__PURE__ */ t(
189
316
  "button",
190
317
  {
191
318
  type: "button",
192
319
  onClick: a,
193
320
  "aria-label": "Dismiss",
194
- className: "shrink-0 opacity-70 transition hover:opacity-100",
195
- children: /* @__PURE__ */ e(oe, { className: "h-4 w-4" })
321
+ className: "-m-2 shrink-0 p-2 opacity-70 transition hover:opacity-100",
322
+ children: /* @__PURE__ */ t(we, { className: "h-4 w-4" })
196
323
  }
197
324
  )
198
325
  ]
199
326
  }
200
- ), Ce = ze({ activeTheme: "dark", toggleTheme: () => {
201
- } }), Ye = () => We(Ce), He = (t) => `flex h-9 w-9 items-center justify-center border transition hover:bg-app-card/80 ${t ? "border-app-strong bg-app-card/80" : "border-transparent hover:border-app-border"}`, Ze = () => /* @__PURE__ */ e(
327
+ ), We = Xe({ activeTheme: "dark", toggleTheme: () => {
328
+ } }), ct = () => Je(We), dt = (e) => `flex h-9 w-9 items-center justify-center border transition hover:bg-app-card/80 ${e ? "border-app-strong bg-app-card/80" : "border-transparent hover:border-app-border"}`, pt = () => /* @__PURE__ */ t(
202
329
  "svg",
203
330
  {
204
331
  "aria-hidden": "true",
@@ -208,9 +335,9 @@ const pe = 6, Q = 8, Le = ({ text: t, children: r, className: a = "" }) => {
208
335
  fill: "none",
209
336
  stroke: "currentColor",
210
337
  strokeWidth: "1.8",
211
- children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M21 12.79A9 9 0 1111.21 3a7 7 0 009.79 9.79z" })
338
+ children: /* @__PURE__ */ t("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M21 12.79A9 9 0 1111.21 3a7 7 0 009.79 9.79z" })
212
339
  }
213
- ), Qe = () => /* @__PURE__ */ h(
340
+ ), ut = () => /* @__PURE__ */ f(
214
341
  "svg",
215
342
  {
216
343
  "aria-hidden": "true",
@@ -221,8 +348,8 @@ const pe = 6, Q = 8, Le = ({ text: t, children: r, className: a = "" }) => {
221
348
  stroke: "currentColor",
222
349
  strokeWidth: "1.8",
223
350
  children: [
224
- /* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "4" }),
225
- /* @__PURE__ */ e(
351
+ /* @__PURE__ */ t("circle", { cx: "12", cy: "12", r: "4" }),
352
+ /* @__PURE__ */ t(
226
353
  "path",
227
354
  {
228
355
  strokeLinecap: "round",
@@ -231,127 +358,132 @@ const pe = 6, Q = 8, Le = ({ text: t, children: r, className: a = "" }) => {
231
358
  )
232
359
  ]
233
360
  }
234
- ), De = ({ variant: t = "button" }) => {
235
- const { activeTheme: r, toggleTheme: a } = Ye(), n = r === "dark", s = `Switch to ${n ? "light" : "dark"} theme`, l = n ? /* @__PURE__ */ e(Ze, {}) : /* @__PURE__ */ e(Qe, {});
236
- return t === "toolbar" ? /* @__PURE__ */ e(Le, { text: s, children: /* @__PURE__ */ e("button", { type: "button", onClick: a, "aria-label": s, className: He(!1), children: l }) }) : /* @__PURE__ */ e(R, { onClick: a, tooltip: s, "aria-label": s, variant: "secondary", children: l });
237
- }, Ve = (t) => `px-2.5 py-1.5 text-xs font-semibold uppercase tracking-widest transition sm:px-3 ${t ? "bg-app-card text-app-text" : "text-app-muted hover:text-app-text"}`, Qt = ({
238
- brand: t,
361
+ ), ze = ({ variant: e = "button" }) => {
362
+ const { activeTheme: r, toggleTheme: a } = ct(), n = r === "dark", s = `Switch to ${n ? "light" : "dark"} theme`, l = n ? /* @__PURE__ */ t(pt, {}) : /* @__PURE__ */ t(ut, {});
363
+ return e === "toolbar" ? /* @__PURE__ */ t(Oe, { text: s, children: /* @__PURE__ */ t("button", { type: "button", onClick: a, "aria-label": s, className: dt(!1), children: l }) }) : /* @__PURE__ */ t(H, { onClick: a, tooltip: s, "aria-label": s, variant: "secondary", children: l });
364
+ }, ht = (e) => `flex min-h-9 items-center px-2.5 py-1.5 text-xs font-semibold uppercase tracking-widest transition sm:px-3 ${e ? "bg-app-card text-app-text" : "text-app-muted hover:text-app-text"}`, fr = ({
365
+ brand: e,
239
366
  logo: r,
240
367
  brandHref: a = "/",
241
368
  links: n = [],
242
369
  actions: s,
243
370
  themeToggle: l = !0,
244
371
  hideBrandOnMobile: o = !1,
245
- linkComponent: c = "a",
246
- linkProp: i = "href",
372
+ linkComponent: i = "a",
373
+ linkProp: c = "href",
247
374
  maxWidth: u = "max-w-5xl"
248
- }) => /* @__PURE__ */ e("header", { className: "sticky top-0 z-40 border-b border-app-border bg-app-bg/95 backdrop-blur", children: /* @__PURE__ */ h("div", { className: `mx-auto flex h-14 w-full ${u} items-center justify-between gap-3 px-4`, children: [
249
- /* @__PURE__ */ h(c, { [i]: a, className: "flex shrink-0 items-center gap-2 text-app-text", children: [
375
+ }) => /* @__PURE__ */ t("header", { className: "sticky top-0 z-40 border-b border-app-border bg-app-bg/95 backdrop-blur", children: /* @__PURE__ */ f("div", { className: `mx-auto flex h-14 w-full ${u} items-center justify-between gap-3 px-4`, children: [
376
+ /* @__PURE__ */ f(i, { [c]: a, className: "flex min-h-9 shrink-0 items-center gap-2 text-app-text", children: [
250
377
  r,
251
- /* @__PURE__ */ e("span", { className: `text-base font-bold tracking-tight ${o ? "hidden sm:inline" : ""}`, children: t })
378
+ /* @__PURE__ */ t("span", { className: `text-base font-bold tracking-tight ${o ? "hidden sm:inline" : ""}`, children: e })
252
379
  ] }),
253
- n.length > 0 && /* @__PURE__ */ e("nav", { "aria-label": "Main", className: "flex items-center gap-1", children: n.map(({ href: m, label: d, active: f = !1, ...b }) => /* @__PURE__ */ e(
254
- c,
380
+ n.length > 0 && /* @__PURE__ */ t("nav", { "aria-label": "Main", className: "flex min-w-0 items-center gap-1 overflow-x-auto", children: n.map(({ href: b, label: d, active: p = !1, ...m }) => /* @__PURE__ */ t(
381
+ i,
255
382
  {
256
- [i]: m,
257
- "aria-current": f ? "page" : void 0,
258
- className: Ve(f),
259
- ...b,
383
+ [c]: b,
384
+ "aria-current": p ? "page" : void 0,
385
+ className: ht(p),
386
+ ...m,
260
387
  children: d
261
388
  },
262
- m
389
+ b
263
390
  )) }),
264
- /* @__PURE__ */ h("div", { className: "flex shrink-0 items-center gap-1", children: [
265
- l && /* @__PURE__ */ e(De, { variant: "toolbar" }),
391
+ /* @__PURE__ */ f("div", { className: "flex shrink-0 items-center gap-1", children: [
392
+ l && /* @__PURE__ */ t(ze, { variant: "toolbar" }),
266
393
  s
267
394
  ] })
268
- ] }) }), Xe = 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])', X = (t, r) => {
269
- T(() => {
395
+ ] }) }), mt = 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])', ie = (e, r) => {
396
+ P(() => {
270
397
  const a = r.current;
271
- if (!t || !a) return;
272
- const n = document.activeElement, s = () => [...a.querySelectorAll(Xe)];
398
+ if (!e || !a) return;
399
+ const n = document.activeElement, s = () => [...a.querySelectorAll(mt)];
273
400
  (a.querySelector("[data-autofocus]") || s()[0] || a).focus();
274
401
  const l = (o) => {
275
402
  if (o.key !== "Tab") return;
276
- const c = s();
277
- if (!c.length) {
403
+ const i = s();
404
+ if (!i.length) {
278
405
  o.preventDefault();
279
406
  return;
280
407
  }
281
- const i = c[0], u = c[c.length - 1];
282
- o.shiftKey && document.activeElement === i ? (o.preventDefault(), u.focus()) : !o.shiftKey && document.activeElement === u && (o.preventDefault(), i.focus());
408
+ const c = i[0], u = i[i.length - 1];
409
+ o.shiftKey && document.activeElement === c ? (o.preventDefault(), u.focus()) : !o.shiftKey && document.activeElement === u && (o.preventDefault(), c.focus());
283
410
  };
284
411
  return a.addEventListener("keydown", l), () => {
285
412
  a.removeEventListener("keydown", l), n != null && n.isConnected && n.focus();
286
413
  };
287
- }, [t, r]);
288
- }, ie = (t, r) => {
289
- T(() => {
290
- if (!t) return;
414
+ }, [e, r]);
415
+ }, ye = (e, r) => {
416
+ P(() => {
417
+ if (!e) return;
291
418
  const a = (n) => {
292
419
  n.key === "Escape" && r();
293
420
  };
294
421
  return window.addEventListener("keydown", a), () => window.removeEventListener("keydown", a);
295
- }, [t, r]);
296
- }, Je = { right: "right-0 border-l", left: "left-0 border-r" }, et = ({ open: t, onClose: r, title: a, side: n = "right", width: s = "max-w-md", footer: l, children: o }) => {
297
- const c = E(null), i = S();
298
- return ie(t, r), X(t, c), T(() => {
299
- if (!t) return;
300
- const u = document.body.style.overflow;
422
+ }, [e, r]);
423
+ }, ft = { right: "right-0 border-l", left: "left-0 border-r" }, bt = ({ open: e, onClose: r, title: a, side: n = "right", width: s = "max-w-md", padded: l = !0, footer: o, children: i }) => {
424
+ const c = A(null), u = O();
425
+ return ye(e, r), ie(e, c), P(() => {
426
+ if (!e) return;
427
+ const b = document.body.style.overflow;
301
428
  return document.body.style.overflow = "hidden", () => {
302
- document.body.style.overflow = u;
429
+ document.body.style.overflow = b;
303
430
  };
304
- }, [t]), t ? H(
305
- /* @__PURE__ */ h("div", { className: "fixed inset-0 z-[var(--xd-z-modal,80)]", children: [
306
- /* @__PURE__ */ e("div", { "aria-hidden": "true", className: "absolute inset-0 bg-black/30 backdrop-blur-sm", onClick: r }),
307
- /* @__PURE__ */ h(
431
+ }, [e]), e ? ae(
432
+ /* @__PURE__ */ f("div", { className: "fixed inset-0 z-[var(--xd-z-modal,80)]", children: [
433
+ /* @__PURE__ */ t("div", { "aria-hidden": "true", className: "absolute inset-0 bg-black/30 backdrop-blur-sm", onClick: r }),
434
+ /* @__PURE__ */ f(
308
435
  "aside",
309
436
  {
310
437
  ref: c,
311
438
  role: "dialog",
312
439
  "aria-modal": "true",
313
- "aria-labelledby": i,
440
+ "aria-labelledby": u,
314
441
  tabIndex: -1,
315
- className: `absolute inset-y-0 flex w-full flex-col border-app-border bg-app-card shadow-2xl ${Je[n]} ${s}`,
442
+ className: `absolute inset-y-0 flex w-full flex-col border-app-border bg-app-card shadow-2xl ${ft[n]} ${s}`,
316
443
  children: [
317
- /* @__PURE__ */ h("div", { className: "flex shrink-0 items-center justify-between border-b border-app-border px-6 py-4", children: [
318
- /* @__PURE__ */ e("h2", { id: i, className: "text-sm font-semibold uppercase tracking-widest text-app-soft", children: a }),
319
- /* @__PURE__ */ e(R, { onClick: r, tooltip: "Close", "aria-label": "Close", variant: "secondary", children: /* @__PURE__ */ e(oe, {}) })
444
+ /* @__PURE__ */ f("div", { className: "flex shrink-0 items-center justify-between border-b border-app-border px-6 py-4", children: [
445
+ /* @__PURE__ */ t("h2", { id: u, className: "text-sm font-semibold uppercase tracking-widest text-app-soft", children: a }),
446
+ /* @__PURE__ */ t(H, { onClick: r, tooltip: "Close", "aria-label": "Close", variant: "secondary", children: /* @__PURE__ */ t(we, {}) })
320
447
  ] }),
321
- /* @__PURE__ */ e("div", { className: "flex-1 overflow-y-auto p-6", children: o }),
322
- l && /* @__PURE__ */ e("div", { className: "flex shrink-0 flex-wrap items-center justify-end gap-3 border-t border-app-border px-6 py-4", children: l })
448
+ /* @__PURE__ */ t("div", { className: `min-h-0 flex-1 ${l ? "overflow-y-auto p-6" : "flex flex-col"}`, children: i }),
449
+ o && /* @__PURE__ */ t("div", { className: "flex shrink-0 flex-wrap items-center justify-end gap-3 border-t border-app-border px-6 py-4", children: o })
323
450
  ]
324
451
  }
325
452
  )
326
453
  ] }),
327
454
  document.body
328
455
  ) : null;
329
- }, tt = ({ className: t }) => /* @__PURE__ */ e(
456
+ }, xt = ({ className: e }) => /* @__PURE__ */ t(
330
457
  "svg",
331
458
  {
332
459
  "aria-hidden": "true",
333
460
  focusable: "false",
334
- className: t ?? "h-5 w-5",
461
+ className: e ?? "h-5 w-5",
335
462
  viewBox: "0 0 24 24",
336
463
  fill: "none",
337
464
  stroke: "currentColor",
338
465
  strokeWidth: "2",
339
- children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M4 6h16M4 12h16M4 18h16" })
466
+ children: /* @__PURE__ */ t("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M4 6h16M4 12h16M4 18h16" })
340
467
  }
341
- ), Vt = ({ header: t, sidebar: r, sidebarTitle: a = "Menu", children: n, className: s = "" }) => {
342
- const [l, o] = k(!1), c = () => o(!1), i = typeof r == "function" ? r(c) : r;
343
- return /* @__PURE__ */ h("div", { className: `flex h-screen flex-col bg-app-bg text-app-text ${s}`, children: [
344
- /* @__PURE__ */ h("header", { className: "flex shrink-0 items-center gap-3 border-b border-app-border bg-app-card px-4 py-2", children: [
345
- r && /* @__PURE__ */ e("span", { className: "md:hidden", children: /* @__PURE__ */ e(R, { variant: "secondary", "aria-label": "Open menu", onClick: () => o(!0), children: /* @__PURE__ */ e(tt, {}) }) }),
346
- /* @__PURE__ */ e("div", { className: "min-w-0 flex-1", children: t })
468
+ ), br = ({ header: e, sidebar: r, sidebarTitle: a = "Menu", children: n, className: s = "" }) => {
469
+ const [l, o] = D(!1), i = () => o(!1);
470
+ P(() => {
471
+ const u = window.matchMedia("(min-width: 768px)"), b = (d) => d.matches && o(!1);
472
+ return u.addEventListener("change", b), () => u.removeEventListener("change", b);
473
+ }, []);
474
+ const c = typeof r == "function" ? r(i) : r;
475
+ return /* @__PURE__ */ f("div", { className: `relative flex h-screen flex-col overflow-hidden bg-app-bg text-app-text ${s}`, children: [
476
+ /* @__PURE__ */ f("header", { className: "flex shrink-0 items-center gap-3 border-b border-app-border bg-app-card px-4 py-2", children: [
477
+ r && /* @__PURE__ */ t("span", { className: "md:hidden", children: /* @__PURE__ */ t(H, { variant: "secondary", "aria-label": "Open menu", onClick: () => o(!0), children: /* @__PURE__ */ t(xt, {}) }) }),
478
+ /* @__PURE__ */ t("div", { className: "min-w-0 flex-1", children: e })
347
479
  ] }),
348
- /* @__PURE__ */ h("div", { className: "flex min-h-0 flex-1", children: [
349
- r && /* @__PURE__ */ e("aside", { className: "hidden shrink-0 md:block", children: i }),
350
- /* @__PURE__ */ e("main", { className: "min-w-0 flex-1 overflow-y-auto p-4 sm:p-6", children: n })
480
+ /* @__PURE__ */ f("div", { className: "flex min-h-0 flex-1", children: [
481
+ r && /* @__PURE__ */ t("aside", { className: "hidden shrink-0 md:block", children: c }),
482
+ /* @__PURE__ */ t("main", { className: "relative min-w-0 flex-1 overflow-y-auto p-4 sm:p-6", children: n })
351
483
  ] }),
352
- r && /* @__PURE__ */ e(et, { open: l, onClose: c, title: a, side: "left", width: "max-w-xs", children: /* @__PURE__ */ e("div", { className: "-m-6", children: typeof r == "function" ? r(c) : r }) })
484
+ r && /* @__PURE__ */ t(bt, { open: l, onClose: i, title: a, side: "left", width: "max-w-xs", padded: !1, children: /* @__PURE__ */ t("div", { className: "flex min-h-0 flex-1 flex-col [&>nav]:min-h-0 [&>nav]:w-full [&>nav]:flex-1 [&>nav]:border-r-0", children: typeof r == "function" ? r(i) : r }) })
353
485
  ] });
354
- }, ue = [
486
+ }, $e = [
355
487
  "rgb(var(--color-app-strong))",
356
488
  "#3b82f6",
357
489
  "#10b981",
@@ -360,84 +492,84 @@ const pe = 6, Q = 8, Le = ({ text: t, children: r, className: a = "" }) => {
360
492
  "#8b5cf6",
361
493
  "#06b6d4",
362
494
  "#ec4899"
363
- ], J = (t, r) => t.color ?? ue[r % ue.length], Ee = (t, r, a = 5) => {
364
- const n = Math.min(0, t), s = r <= n ? n + 1 : r, l = (s - n) / (a - 1), o = 10 ** Math.floor(Math.log10(l)), c = l / o, i = (c <= 1 ? 1 : c <= 2 ? 2 : c <= 5 ? 5 : 10) * o, u = Math.floor(n / i) * i, m = Math.ceil(s / i) * i, d = [];
365
- for (let f = u; f <= m + i / 2; f += i) d.push(Number(f.toPrecision(12)));
366
- return { min: u, max: m, ticks: d };
367
- }, rt = (t) => new Intl.NumberFormat(void 0, { notation: "compact", maximumFractionDigits: 1 }).format(t), at = 600, B = { top: 12, right: 16, bottom: 28, left: 44 }, Te = () => {
368
- const t = E(null), [r, a] = k(at);
369
- return T(() => {
370
- const n = t.current;
495
+ ], ce = (e, r) => e.color ?? $e[r % $e.length], qe = (e, r, a = 5) => {
496
+ const n = Math.min(0, e), s = r <= n ? n + 1 : r, l = (s - n) / (a - 1), o = 10 ** Math.floor(Math.log10(l)), i = l / o, c = (i <= 1 ? 1 : i <= 2 ? 2 : i <= 5 ? 5 : 10) * o, u = Math.floor(n / c) * c, b = Math.ceil(s / c) * c, d = [];
497
+ for (let p = u; p <= b + c / 2; p += c) d.push(Number(p.toPrecision(12)));
498
+ return { min: u, max: b, ticks: d };
499
+ }, gt = (e) => new Intl.NumberFormat(void 0, { notation: "compact", maximumFractionDigits: 1 }).format(e), vt = 600, _ = { top: 12, right: 16, bottom: 28, left: 44 }, Ke = () => {
500
+ const e = A(null), [r, a] = D(vt);
501
+ return P(() => {
502
+ const n = e.current;
371
503
  if (!n || typeof ResizeObserver > "u") return;
372
504
  const s = new ResizeObserver(([l]) => {
373
505
  const o = Math.round(l.contentRect.width);
374
506
  o > 0 && a(o);
375
507
  });
376
508
  return s.observe(n), () => s.disconnect();
377
- }, []), [t, r];
378
- }, ce = ({ items: t }) => /* @__PURE__ */ e("ul", { className: "m-0 mt-2 flex list-none flex-wrap justify-center gap-x-4 gap-y-1 p-0 text-xs text-app-muted", children: t.map((r) => /* @__PURE__ */ h("li", { className: "flex items-center gap-1.5", children: [
379
- /* @__PURE__ */ e("span", { "aria-hidden": "true", className: "inline-block h-2.5 w-2.5", style: { background: r.color } }),
509
+ }, []), [e, r];
510
+ }, ke = ({ items: e }) => /* @__PURE__ */ t("ul", { className: "m-0 mt-2 flex list-none flex-wrap justify-center gap-x-4 gap-y-1 p-0 text-xs text-app-muted", children: e.map((r) => /* @__PURE__ */ f("li", { className: "flex items-center gap-1.5", children: [
511
+ /* @__PURE__ */ t("span", { "aria-hidden": "true", className: "inline-block h-2.5 w-2.5", style: { background: r.color } }),
380
512
  r.name
381
- ] }, r.name)) }), Ie = ({ width: t, height: r, scale: a, labels: n, xPositions: s, label: l, children: o, legend: c }) => {
382
- const i = r - B.bottom, u = i - B.top, m = (d) => B.top + u * (1 - (d - a.min) / (a.max - a.min));
383
- return /* @__PURE__ */ h("figure", { className: "m-0", children: [
384
- /* @__PURE__ */ h(
513
+ ] }, r.name)) }), _e = ({ width: e, height: r, scale: a, labels: n, xPositions: s, label: l, children: o, legend: i }) => {
514
+ const c = r - _.bottom, u = c - _.top, b = (d) => _.top + u * (1 - (d - a.min) / (a.max - a.min));
515
+ return /* @__PURE__ */ f("figure", { className: "m-0", children: [
516
+ /* @__PURE__ */ f(
385
517
  "svg",
386
518
  {
387
519
  role: "img",
388
520
  "aria-label": l,
389
- width: t,
521
+ width: e,
390
522
  height: r,
391
- viewBox: `0 0 ${t} ${r}`,
523
+ viewBox: `0 0 ${e} ${r}`,
392
524
  className: "block max-w-full text-app-muted",
393
525
  fontFamily: "inherit",
394
526
  children: [
395
- a.ticks.map((d) => /* @__PURE__ */ h("g", { children: [
396
- /* @__PURE__ */ e(
527
+ a.ticks.map((d) => /* @__PURE__ */ f("g", { children: [
528
+ /* @__PURE__ */ t(
397
529
  "line",
398
530
  {
399
- x1: B.left,
400
- x2: t - B.right,
401
- y1: m(d),
402
- y2: m(d),
531
+ x1: _.left,
532
+ x2: e - _.right,
533
+ y1: b(d),
534
+ y2: b(d),
403
535
  stroke: "rgb(var(--color-app-border))",
404
536
  strokeWidth: "1",
405
537
  strokeDasharray: d === a.min ? void 0 : "3 3"
406
538
  }
407
539
  ),
408
- /* @__PURE__ */ e(
540
+ /* @__PURE__ */ t(
409
541
  "text",
410
542
  {
411
- x: B.left - 6,
412
- y: m(d),
543
+ x: _.left - 6,
544
+ y: b(d),
413
545
  textAnchor: "end",
414
546
  dominantBaseline: "middle",
415
547
  fontSize: "11",
416
548
  fill: "currentColor",
417
- children: rt(d)
549
+ children: gt(d)
418
550
  }
419
551
  )
420
552
  ] }, d)),
421
- n.map((d, f) => /* @__PURE__ */ e(
553
+ n.map((d, p) => /* @__PURE__ */ t(
422
554
  "text",
423
555
  {
424
- x: s[f],
425
- y: i + 16,
556
+ x: s[p],
557
+ y: c + 16,
426
558
  textAnchor: "middle",
427
559
  fontSize: "11",
428
560
  fill: "currentColor",
429
561
  children: d
430
562
  },
431
- `${d}-${f}`
563
+ `${d}-${p}`
432
564
  )),
433
- o(m)
565
+ o(b)
434
566
  ]
435
567
  }
436
568
  ),
437
- c
569
+ i
438
570
  ] });
439
- }, Ae = (t) => t.map((r, a) => ({ name: r.name, color: J(r, a) })), nt = ({
440
- labels: t,
571
+ }, Ue = (e) => e.map((r, a) => ({ name: r.name, color: ce(r, a) })), wt = ({
572
+ labels: e,
441
573
  series: r,
442
574
  height: a = 300,
443
575
  area: n = !1,
@@ -445,50 +577,50 @@ const pe = 6, Q = 8, Le = ({ text: t, children: r, className: a = "" }) => {
445
577
  legend: l = !0,
446
578
  className: o = ""
447
579
  }) => {
448
- const [c, i] = Te(), u = r.flatMap((p) => p.values), m = Ee(Math.min(...u), Math.max(...u)), d = B.left, f = i - B.right, b = (p) => t.length === 1 ? (d + f) / 2 : d + (f - d) * p / (t.length - 1), x = t.map((p, g) => b(g));
449
- return /* @__PURE__ */ e("div", { ref: c, className: o, children: /* @__PURE__ */ e(
450
- Ie,
580
+ const [i, c] = Ke(), u = r.flatMap((h) => h.values), b = qe(Math.min(...u), Math.max(...u)), d = _.left, p = c - _.right, m = (h) => e.length === 1 ? (d + p) / 2 : d + (p - d) * h / (e.length - 1), g = e.map((h, x) => m(x));
581
+ return /* @__PURE__ */ t("div", { ref: i, className: o, children: /* @__PURE__ */ t(
582
+ _e,
451
583
  {
452
- width: i,
584
+ width: c,
453
585
  height: a,
454
- scale: m,
455
- labels: t,
456
- xPositions: x,
586
+ scale: b,
587
+ labels: e,
588
+ xPositions: g,
457
589
  label: s,
458
- legend: l && r.length > 1 ? /* @__PURE__ */ e(ce, { items: Ae(r) }) : null,
459
- children: (p) => {
460
- const g = p(Math.max(m.min, 0));
461
- return r.map((y, C) => {
462
- const w = J(y, C), D = y.values.map((v, L) => `${b(L)},${p(v)}`);
463
- return /* @__PURE__ */ h("g", { children: [
464
- n && /* @__PURE__ */ e(
590
+ legend: l && r.length > 1 ? /* @__PURE__ */ t(ke, { items: Ue(r) }) : null,
591
+ children: (h) => {
592
+ const x = h(Math.max(b.min, 0));
593
+ return r.map((v, N) => {
594
+ const M = ce(v, N), y = v.values.map((w, C) => `${m(C)},${h(w)}`);
595
+ return /* @__PURE__ */ f("g", { children: [
596
+ n && /* @__PURE__ */ t(
465
597
  "polygon",
466
598
  {
467
- points: `${b(0)},${g} ${D.join(" ")} ${b(y.values.length - 1)},${g}`,
468
- fill: w,
599
+ points: `${m(0)},${x} ${y.join(" ")} ${m(v.values.length - 1)},${x}`,
600
+ fill: M,
469
601
  opacity: "0.18"
470
602
  }
471
603
  ),
472
- /* @__PURE__ */ e("polyline", { points: D.join(" "), fill: "none", stroke: w, strokeWidth: "2", strokeLinejoin: "round" }),
473
- y.values.map((v, L) => /* @__PURE__ */ e("circle", { cx: b(L), cy: p(v), r: "3.5", fill: w, children: /* @__PURE__ */ e("title", { children: `${y.name}, ${t[L]}: ${v}` }) }, L))
474
- ] }, y.name);
604
+ /* @__PURE__ */ t("polyline", { points: y.join(" "), fill: "none", stroke: M, strokeWidth: "2", strokeLinejoin: "round" }),
605
+ v.values.map((w, C) => /* @__PURE__ */ t("circle", { cx: m(C), cy: h(w), r: "3.5", fill: M, children: /* @__PURE__ */ t("title", { children: `${v.name}, ${e[C]}: ${w}` }) }, C))
606
+ ] }, v.name);
475
607
  });
476
608
  }
477
609
  }
478
610
  ) });
479
- }, Xt = ({ label: t = "Area chart", ...r }) => /* @__PURE__ */ e(nt, { area: !0, label: t, ...r }), st = { sm: "h-6 w-6 text-[10px]", md: "h-9 w-9 text-xs", lg: "h-14 w-14 text-base" }, lt = (t) => (t ?? "").split(/\s+/).filter(Boolean).slice(0, 2).map((r) => r[0].toUpperCase()).join(""), Jt = ({ src: t, name: r, size: a = "md", className: n = "" }) => {
480
- const [s, l] = k(!1), o = t && !s;
481
- return /* @__PURE__ */ e(
611
+ }, xr = ({ label: e = "Area chart", ...r }) => /* @__PURE__ */ t(wt, { area: !0, label: e, ...r }), yt = { sm: "h-6 w-6 text-[10px]", md: "h-9 w-9 text-xs", lg: "h-14 w-14 text-base" }, kt = (e) => (e ?? "").split(/\s+/).filter(Boolean).slice(0, 2).map((r) => r[0].toUpperCase()).join(""), gr = ({ src: e, name: r, size: a = "md", className: n = "" }) => {
612
+ const [s, l] = D(!1), o = e && !s;
613
+ return /* @__PURE__ */ t(
482
614
  "span",
483
615
  {
484
616
  role: "img",
485
617
  "aria-label": r,
486
- className: `inline-flex shrink-0 items-center justify-center overflow-hidden rounded-full border border-app-border bg-app-bg font-semibold uppercase tracking-wider text-app-soft ${st[a]} ${n}`,
487
- children: o ? /* @__PURE__ */ e("img", { src: t, alt: "", className: "h-full w-full object-cover", onError: () => l(!0) }) : lt(r) || "?"
618
+ className: `inline-flex shrink-0 items-center justify-center overflow-hidden rounded-full border border-app-border bg-app-bg font-semibold uppercase tracking-wider text-app-soft ${yt[a]} ${n}`,
619
+ children: o ? /* @__PURE__ */ t("img", { src: e, alt: "", className: "h-full w-full object-cover", onError: () => l(!0) }) : kt(r) || "?"
488
620
  }
489
621
  );
490
- }, er = ({
491
- labels: t,
622
+ }, vr = ({
623
+ labels: e,
492
624
  series: r,
493
625
  height: a = 300,
494
626
  stacked: n = !1,
@@ -496,285 +628,301 @@ const pe = 6, Q = 8, Le = ({ text: t, children: r, className: a = "" }) => {
496
628
  legend: l = !0,
497
629
  className: o = ""
498
630
  }) => {
499
- const [c, i] = Te(), u = t.map((w, D) => r.reduce((v, L) => v + L.values[D], 0)), m = Math.max(...n ? u : r.flatMap((w) => w.values)), d = n ? 0 : Math.min(...r.flatMap((w) => w.values)), f = Ee(d, m), b = B.left, p = (i - B.right - B.left) / t.length, g = p * 0.7, y = n ? g : g / r.length, C = t.map((w, D) => b + p * D + p / 2);
500
- return /* @__PURE__ */ e("div", { ref: c, className: o, children: /* @__PURE__ */ e(
501
- Ie,
631
+ const [i, c] = Ke(), u = e.map((M, y) => r.reduce((w, C) => w + C.values[y], 0)), b = Math.max(...n ? u : r.flatMap((M) => M.values)), d = n ? 0 : Math.min(...r.flatMap((M) => M.values)), p = qe(d, b), m = _.left, h = (c - _.right - _.left) / e.length, x = h * 0.7, v = n ? x : x / r.length, N = e.map((M, y) => m + h * y + h / 2);
632
+ return /* @__PURE__ */ t("div", { ref: i, className: o, children: /* @__PURE__ */ t(
633
+ _e,
502
634
  {
503
- width: i,
635
+ width: c,
504
636
  height: a,
505
- scale: f,
506
- labels: t,
507
- xPositions: C,
637
+ scale: p,
638
+ labels: e,
639
+ xPositions: N,
508
640
  label: s,
509
- legend: l && r.length > 1 ? /* @__PURE__ */ e(ce, { items: Ae(r) }) : null,
510
- children: (w) => {
511
- const D = w(Math.max(f.min, 0));
512
- return t.map((v, L) => {
513
- const M = b + p * L + (p - g) / 2;
514
- let N = D;
515
- return /* @__PURE__ */ e("g", { children: r.map((A, F) => {
516
- const j = A.values[L], z = w(j), O = Math.abs(D - z);
517
- let $ = Math.min(z, D);
518
- const I = M + (n ? 0 : y * F);
519
- return n && ($ = N - O, N = $), /* @__PURE__ */ e(
641
+ legend: l && r.length > 1 ? /* @__PURE__ */ t(ke, { items: Ue(r) }) : null,
642
+ children: (M) => {
643
+ const y = M(Math.max(p.min, 0));
644
+ return e.map((w, C) => {
645
+ const T = m + h * C + (h - x) / 2;
646
+ let L = y;
647
+ return /* @__PURE__ */ t("g", { children: r.map((I, j) => {
648
+ const B = I.values[C], z = M(B), q = Math.abs(y - z);
649
+ let k = Math.min(z, y);
650
+ const $ = T + (n ? 0 : v * j);
651
+ return n && (k = L - q, L = k), /* @__PURE__ */ t(
520
652
  "rect",
521
653
  {
522
- x: I + 1,
523
- y: $,
524
- width: Math.max(y - 2, 1),
525
- height: O,
526
- fill: J(A, F),
527
- children: /* @__PURE__ */ e("title", { children: `${A.name}, ${v}: ${j}` })
654
+ x: $ + 1,
655
+ y: k,
656
+ width: Math.max(v - 2, 1),
657
+ height: q,
658
+ fill: ce(I, j),
659
+ children: /* @__PURE__ */ t("title", { children: `${I.name}, ${w}: ${B}` })
528
660
  },
529
- A.name
661
+ I.name
530
662
  );
531
- }) }, `${v}-${L}`);
663
+ }) }, `${w}-${C}`);
532
664
  });
533
665
  }
534
666
  }
535
667
  ) });
536
- }, tr = ({ items: t, linkComponent: r = "a", linkProp: a = "href", className: n = "" }) => /* @__PURE__ */ e("nav", { "aria-label": "Breadcrumb", className: n, children: /* @__PURE__ */ e("ol", { className: "m-0 flex list-none flex-wrap items-center gap-2 p-0 text-xs font-semibold uppercase tracking-widest", children: t.map((s, l) => {
537
- const o = l === t.length - 1;
538
- return /* @__PURE__ */ h("li", { className: "flex items-center gap-2", children: [
539
- o || !s.href ? /* @__PURE__ */ e("span", { "aria-current": o ? "page" : void 0, className: o ? "text-app-text" : "text-app-muted", children: s.label }) : /* @__PURE__ */ e(r, { [a]: s.href, className: "text-app-muted transition hover:text-app-text", children: s.label }),
540
- !o && /* @__PURE__ */ e("span", { "aria-hidden": "true", className: "text-app-border", children: "/" })
668
+ }, wr = ({ as: e = "p", className: r = "", children: a, ...n }) => /* @__PURE__ */ t(e, { className: `m-0 text-sm text-app-text ${r}`, ...n, children: a }), yr = ({ items: e, linkComponent: r = "a", linkProp: a = "href", className: n = "" }) => /* @__PURE__ */ t("nav", { "aria-label": "Breadcrumb", className: n, children: /* @__PURE__ */ t("ol", { className: "m-0 flex list-none flex-wrap items-center gap-2 p-0 text-xs font-semibold uppercase tracking-widest", children: e.map((s, l) => {
669
+ const o = l === e.length - 1;
670
+ return /* @__PURE__ */ f("li", { className: "flex items-center gap-2", children: [
671
+ o || !s.href ? /* @__PURE__ */ t("span", { "aria-current": o ? "page" : void 0, className: o ? "text-app-text" : "text-app-muted", children: s.label }) : /* @__PURE__ */ t(r, { [a]: s.href, className: "text-app-muted transition hover:text-app-text", children: s.label }),
672
+ !o && /* @__PURE__ */ t("span", { "aria-hidden": "true", className: "text-app-border", children: "/" })
541
673
  ] }, `${s.label}-${l}`);
542
- }) }) }), he = (t) => new Date(t.getFullYear(), t.getMonth(), t.getDate()), K = (t, r) => new Date(t.getFullYear(), t.getMonth(), t.getDate() + r), te = (t, r) => {
543
- const a = new Date(t.getFullYear(), t.getMonth() + r, 1), n = new Date(a.getFullYear(), a.getMonth() + 1, 0).getDate();
544
- return new Date(a.getFullYear(), a.getMonth(), Math.min(t.getDate(), n));
545
- }, G = (t, r) => !!t && !!r && t.getTime() === r.getTime(), U = (t, r) => t.getTime() < r.getTime(), ot = (t, r, a) => !!r && U(t, r) || !!a && U(a, t), it = (t, r = 0) => {
546
- const a = new Date(t.getFullYear(), t.getMonth(), 1), n = (a.getDay() - r + 7) % 7, s = K(a, -n), l = [];
674
+ }) }) }), Me = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()), Y = (e, r) => new Date(e.getFullYear(), e.getMonth(), e.getDate() + r), pe = (e, r) => {
675
+ const a = new Date(e.getFullYear(), e.getMonth() + r, 1), n = new Date(a.getFullYear(), a.getMonth() + 1, 0).getDate();
676
+ return new Date(a.getFullYear(), a.getMonth(), Math.min(e.getDate(), n));
677
+ }, ee = (e, r) => !!e && !!r && e.getTime() === r.getTime(), te = (e, r) => e.getTime() < r.getTime(), Nt = (e, r, a) => !!r && te(e, r) || !!a && te(a, e), $t = (e, r = 0) => {
678
+ const a = new Date(e.getFullYear(), e.getMonth(), 1), n = (a.getDay() - r + 7) % 7, s = Y(a, -n), l = [];
547
679
  for (let o = 0; o < 6; o++) {
548
- const c = Array.from({ length: 7 }, (i, u) => K(s, o * 7 + u));
549
- if (o >= 4 && c[0].getMonth() !== t.getMonth()) break;
550
- l.push(c);
680
+ const i = Array.from({ length: 7 }, (c, u) => Y(s, o * 7 + u));
681
+ if (o >= 4 && i[0].getMonth() !== e.getMonth()) break;
682
+ l.push(i);
551
683
  }
552
684
  return l;
553
- }, ct = (t = 0, r) => Array.from({ length: 7 }, (a, n) => {
554
- const s = new Date(2023, 0, 1 + (t + n) % 7);
685
+ }, Mt = (e = 0, r) => Array.from({ length: 7 }, (a, n) => {
686
+ const s = new Date(2023, 0, 1 + (e + n) % 7);
555
687
  return new Intl.DateTimeFormat(r, { weekday: "short" }).format(s);
556
- }), dt = (t, r) => new Intl.DateTimeFormat(r, { month: "long", year: "numeric" }).format(t), ne = (t, r) => t ? new Intl.DateTimeFormat(r, { year: "numeric", month: "short", day: "numeric" }).format(t) : "", me = "border border-app-border bg-app-bg px-2 py-1 text-xs font-semibold text-app-text transition hover:border-app-strong disabled:cursor-not-allowed disabled:opacity-50", Se = ({ value: t, onChange: r, rangeStart: a, rangeEnd: n, min: s, max: l, weekStartsOn: o = 0, locale: c, className: i = "" }) => {
557
- const u = he(/* @__PURE__ */ new Date()), m = t ?? a ?? u, [d, f] = k(he(m)), [b, x] = k(new Date(m.getFullYear(), m.getMonth(), 1)), p = E(null), g = E(!1);
558
- T(() => {
559
- var M, N;
560
- g.current && (g.current = !1, (N = (M = p.current) == null ? void 0 : M.querySelector('button[tabindex="0"]')) == null || N.focus());
688
+ }), Lt = (e, r) => new Intl.DateTimeFormat(r, { month: "long", year: "numeric" }).format(e), be = (e, r) => e ? new Intl.DateTimeFormat(r, { year: "numeric", month: "short", day: "numeric" }).format(e) : "", Le = "min-h-8 min-w-8 border border-app-border bg-app-bg px-2 py-1 text-xs font-semibold text-app-text transition hover:border-app-strong disabled:cursor-not-allowed disabled:opacity-50", Ge = ({ value: e, onChange: r, rangeStart: a, rangeEnd: n, min: s, max: l, weekStartsOn: o = 0, locale: i, className: c = "" }) => {
689
+ const u = Me(/* @__PURE__ */ new Date()), b = e ?? a ?? u, [d, p] = D(Me(b)), [m, g] = D(new Date(b.getFullYear(), b.getMonth(), 1)), h = A(null), x = A(!1);
690
+ P(() => {
691
+ var T, L;
692
+ x.current && (x.current = !1, (L = (T = h.current) == null ? void 0 : T.querySelector('button[tabindex="0"]')) == null || L.focus());
561
693
  });
562
- const y = (M) => {
563
- g.current = !0, f(M), (M.getMonth() !== b.getMonth() || M.getFullYear() !== b.getFullYear()) && x(new Date(M.getFullYear(), M.getMonth(), 1));
564
- }, C = (M) => {
565
- const N = (d.getDay() - o + 7) % 7, A = {
566
- ArrowLeft: K(d, -1),
567
- ArrowRight: K(d, 1),
568
- ArrowUp: K(d, -7),
569
- ArrowDown: K(d, 7),
570
- PageUp: te(d, -1),
571
- PageDown: te(d, 1),
572
- Home: K(d, -N),
573
- End: K(d, 6 - N)
694
+ const v = (T) => {
695
+ x.current = !0, p(T), (T.getMonth() !== m.getMonth() || T.getFullYear() !== m.getFullYear()) && g(new Date(T.getFullYear(), T.getMonth(), 1));
696
+ }, N = (T) => {
697
+ const L = (d.getDay() - o + 7) % 7, I = {
698
+ ArrowLeft: Y(d, -1),
699
+ ArrowRight: Y(d, 1),
700
+ ArrowUp: Y(d, -7),
701
+ ArrowDown: Y(d, 7),
702
+ PageUp: pe(d, -1),
703
+ PageDown: pe(d, 1),
704
+ Home: Y(d, -L),
705
+ End: Y(d, 6 - L)
574
706
  };
575
- A[M.key] && (M.preventDefault(), y(A[M.key]));
576
- }, w = (M) => {
577
- const N = te(b, M);
578
- x(N), f(new Date(N.getFullYear(), N.getMonth(), Math.min(d.getDate(), 28)));
579
- }, [D, v] = a && n && U(n, a) ? [n, a] : [a, n], L = it(b, o);
580
- return /* @__PURE__ */ h("div", { className: `inline-block border border-app-border bg-app-card p-3 text-app-text ${i}`, children: [
581
- /* @__PURE__ */ h("div", { className: "mb-2 flex items-center justify-between gap-2", children: [
582
- /* @__PURE__ */ e("button", { type: "button", className: me, "aria-label": "Previous month", onClick: () => w(-1), children: "‹" }),
583
- /* @__PURE__ */ e("div", { "aria-live": "polite", className: "text-xs font-semibold uppercase tracking-widest", children: dt(b, c) }),
584
- /* @__PURE__ */ e("button", { type: "button", className: me, "aria-label": "Next month", onClick: () => w(1), children: "›" })
707
+ I[T.key] && (T.preventDefault(), v(I[T.key]));
708
+ }, M = (T) => {
709
+ const L = pe(m, T);
710
+ g(L), p(new Date(L.getFullYear(), L.getMonth(), Math.min(d.getDate(), 28)));
711
+ }, [y, w] = a && n && te(n, a) ? [n, a] : [a, n], C = $t(m, o);
712
+ return /* @__PURE__ */ f("div", { className: `inline-block border border-app-border bg-app-card p-3 text-app-text ${c}`, children: [
713
+ /* @__PURE__ */ f("div", { className: "mb-2 flex items-center justify-between gap-2", children: [
714
+ /* @__PURE__ */ t("button", { type: "button", className: Le, "aria-label": "Previous month", onClick: () => M(-1), children: "‹" }),
715
+ /* @__PURE__ */ t("div", { "aria-live": "polite", className: "text-xs font-semibold uppercase tracking-widest", children: Lt(m, i) }),
716
+ /* @__PURE__ */ t("button", { type: "button", className: Le, "aria-label": "Next month", onClick: () => M(1), children: "›" })
585
717
  ] }),
586
- /* @__PURE__ */ h("table", { ref: p, role: "grid", onKeyDown: C, className: "border-collapse", children: [
587
- /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ e("tr", { children: ct(o, c).map((M) => /* @__PURE__ */ e(
718
+ /* @__PURE__ */ f("table", { ref: h, role: "grid", onKeyDown: N, className: "border-collapse", children: [
719
+ /* @__PURE__ */ t("thead", { children: /* @__PURE__ */ t("tr", { children: Mt(o, i).map((T) => /* @__PURE__ */ t(
588
720
  "th",
589
721
  {
590
722
  scope: "col",
591
- className: "h-8 w-9 text-[10px] font-semibold uppercase tracking-widest text-app-muted",
592
- children: M.slice(0, 2)
723
+ className: "h-8 w-7 text-[10px] min-[360px]:w-8 sm:w-9 font-semibold uppercase tracking-widest text-app-muted",
724
+ children: T.slice(0, 2)
593
725
  },
594
- M
726
+ T
595
727
  )) }) }),
596
- /* @__PURE__ */ e("tbody", { children: L.map((M) => /* @__PURE__ */ e("tr", { children: M.map((N) => {
597
- const A = G(N, t) || G(N, D) || G(N, v), F = D && v && !U(N, D) && !U(v, N), j = N.getMonth() !== b.getMonth(), z = ot(N, s, l);
598
- let O = "text-app-text hover:bg-app-bg";
599
- return A ? O = "bg-app-strong text-app-bg" : F ? O = "bg-app-soft/20 text-app-text" : j && (O = "text-app-muted hover:bg-app-bg"), /* @__PURE__ */ e("td", { role: "gridcell", "aria-selected": A, className: "p-0", children: /* @__PURE__ */ e(
728
+ /* @__PURE__ */ t("tbody", { children: C.map((T) => /* @__PURE__ */ t("tr", { children: T.map((L) => {
729
+ const I = ee(L, e) || ee(L, y) || ee(L, w), j = y && w && !te(L, y) && !te(w, L), B = L.getMonth() !== m.getMonth(), z = Nt(L, s, l);
730
+ let q = "text-app-text hover:bg-app-bg";
731
+ return I ? q = "bg-app-strong text-app-bg" : j ? q = "bg-app-soft/20 text-app-text" : B && (q = "text-app-muted hover:bg-app-bg"), /* @__PURE__ */ t("td", { role: "gridcell", "aria-selected": I, className: "p-0", children: /* @__PURE__ */ t(
600
732
  "button",
601
733
  {
602
734
  type: "button",
603
- tabIndex: G(N, d) ? 0 : -1,
735
+ tabIndex: ee(L, d) ? 0 : -1,
604
736
  disabled: z,
605
- "aria-label": N.toDateString(),
606
- "aria-current": G(N, u) ? "date" : void 0,
737
+ "aria-label": L.toDateString(),
738
+ "aria-current": ee(L, u) ? "date" : void 0,
607
739
  onClick: () => {
608
- f(N), r == null || r(N);
740
+ p(L), r == null || r(L);
609
741
  },
610
- className: `h-9 w-9 text-xs transition disabled:cursor-not-allowed disabled:opacity-30 ${O} ${G(N, u) && !A ? "font-bold underline underline-offset-2" : ""}`,
611
- children: N.getDate()
742
+ className: `h-8 w-7 text-xs transition min-[360px]:w-8 sm:h-9 sm:w-9 disabled:cursor-not-allowed disabled:opacity-30 ${q} ${ee(L, u) && !I ? "font-bold underline underline-offset-2" : ""}`,
743
+ children: L.getDate()
612
744
  }
613
- ) }, N.getTime());
614
- }) }, M[0].getTime())) })
745
+ ) }, L.getTime());
746
+ }) }, T[0].getTime())) })
615
747
  ] })
616
748
  ] });
617
- }, rr = ({ title: t, subtitle: r, actions: a, footer: n, padded: s = !0, className: l = "", children: o }) => /* @__PURE__ */ h("section", { className: `flex flex-col border border-app-border bg-app-card ${l}`, children: [
618
- (t || a) && /* @__PURE__ */ h("header", { className: "flex items-center justify-between gap-3 border-b border-app-border px-5 py-3", children: [
619
- /* @__PURE__ */ h("div", { className: "min-w-0", children: [
620
- t && /* @__PURE__ */ e("h3", { className: "m-0 text-sm font-semibold uppercase tracking-widest text-app-text", children: t }),
621
- r && /* @__PURE__ */ e("p", { className: "m-0 mt-0.5 text-xs text-app-muted", children: r })
749
+ }, kr = ({ title: e, subtitle: r, actions: a, footer: n, padded: s = !0, className: l = "", children: o }) => /* @__PURE__ */ f("section", { className: `flex flex-col border border-app-border bg-app-card ${l}`, children: [
750
+ (e || a) && /* @__PURE__ */ f("header", { className: "flex items-center justify-between gap-3 border-b border-app-border px-5 py-3", children: [
751
+ /* @__PURE__ */ f("div", { className: "min-w-0", children: [
752
+ e && /* @__PURE__ */ t("h3", { className: "m-0 text-sm font-semibold uppercase tracking-widest text-app-text", children: e }),
753
+ r && /* @__PURE__ */ t("p", { className: "m-0 mt-0.5 text-xs text-app-muted", children: r })
622
754
  ] }),
623
- a && /* @__PURE__ */ e("div", { className: "flex shrink-0 items-center gap-2", children: a })
755
+ a && /* @__PURE__ */ t("div", { className: "flex shrink-0 items-center gap-2", children: a })
624
756
  ] }),
625
- /* @__PURE__ */ e("div", { className: `flex-1 text-sm text-app-text ${s ? "p-5" : ""}`, children: o }),
626
- n && /* @__PURE__ */ e("footer", { className: "border-t border-app-border px-5 py-3 text-sm", children: n })
627
- ] }), fe = "absolute top-1/2 z-10 -translate-y-1/2 border border-app-border bg-app-card/90 px-2 py-2 text-app-text transition hover:border-app-strong disabled:cursor-not-allowed disabled:opacity-40", ar = ({
628
- children: t,
757
+ /* @__PURE__ */ t("div", { className: `flex-1 text-sm text-app-text ${s ? "p-5" : ""}`, children: o }),
758
+ n && /* @__PURE__ */ t("footer", { className: "border-t border-app-border px-5 py-3 text-sm", children: n })
759
+ ] }), Ce = "absolute top-1/2 z-10 -translate-y-1/2 border border-app-border bg-app-card/90 px-3 py-2 text-app-text transition hover:border-app-strong disabled:cursor-not-allowed disabled:opacity-40", Nr = ({
760
+ children: e,
629
761
  index: r,
630
762
  defaultIndex: a = 0,
631
763
  onIndexChange: n,
632
764
  autoPlay: s = 0,
633
765
  loop: l = !0,
634
766
  label: o = "Carousel",
635
- className: c = ""
767
+ className: i = ""
636
768
  }) => {
637
- const i = Ke.toArray(t), [u, m] = k(a), [d, f] = k(!1), b = r ?? u, x = (p) => {
638
- if (!i.length) return;
639
- let g = p;
640
- l ? g = (p + i.length) % i.length : g = Math.min(Math.max(p, 0), i.length - 1), r === void 0 && m(g), n == null || n(g);
769
+ const c = et.toArray(e), [u, b] = D(a), [d, p] = D(!1), m = r ?? u, g = (h) => {
770
+ if (!c.length) return;
771
+ let x = h;
772
+ l ? x = (h + c.length) % c.length : x = Math.min(Math.max(h, 0), c.length - 1), r === void 0 && b(x), n == null || n(x);
641
773
  };
642
- return T(() => {
643
- if (!s || d || i.length < 2) return;
644
- const p = setTimeout(() => x(b + 1), s);
645
- return () => clearTimeout(p);
646
- }, [s, d, b, i.length]), /* @__PURE__ */ h(
774
+ return P(() => {
775
+ if (!s || d || c.length < 2) return;
776
+ const h = setTimeout(() => g(m + 1), s);
777
+ return () => clearTimeout(h);
778
+ }, [s, d, m, c.length]), /* @__PURE__ */ f(
647
779
  "div",
648
780
  {
649
781
  role: "region",
650
782
  "aria-roledescription": "carousel",
651
783
  "aria-label": o,
652
- className: `relative ${c}`,
653
- onMouseEnter: () => f(!0),
654
- onMouseLeave: () => f(!1),
655
- onFocus: () => f(!0),
656
- onBlur: () => f(!1),
657
- onKeyDown: (p) => {
658
- p.key === "ArrowLeft" ? x(b - 1) : p.key === "ArrowRight" && x(b + 1);
784
+ className: `relative ${i}`,
785
+ onMouseEnter: () => p(!0),
786
+ onMouseLeave: () => p(!1),
787
+ onFocus: () => p(!0),
788
+ onBlur: () => p(!1),
789
+ onKeyDown: (h) => {
790
+ h.key === "ArrowLeft" ? g(m - 1) : h.key === "ArrowRight" && g(m + 1);
659
791
  },
660
792
  children: [
661
- /* @__PURE__ */ e("div", { className: "overflow-hidden border border-app-border bg-app-card", children: /* @__PURE__ */ e(
793
+ /* @__PURE__ */ t("div", { className: "overflow-hidden border border-app-border bg-app-card", children: /* @__PURE__ */ t(
662
794
  "div",
663
795
  {
664
796
  className: "flex transition-transform duration-300 ease-out",
665
- style: { transform: `translateX(-${b * 100}%)` },
797
+ style: { transform: `translateX(-${m * 100}%)` },
666
798
  "aria-live": s && !d ? "off" : "polite",
667
- children: i.map((p, g) => /* @__PURE__ */ e(
799
+ children: c.map((h, x) => /* @__PURE__ */ t(
668
800
  "div",
669
801
  {
670
802
  role: "group",
671
803
  "aria-roledescription": "slide",
672
- "aria-label": `${g + 1} of ${i.length}`,
673
- "aria-hidden": g !== b,
674
- ref: (y) => {
675
- y && (g === b ? y.removeAttribute("inert") : y.setAttribute("inert", ""));
804
+ "aria-label": `${x + 1} of ${c.length}`,
805
+ "aria-hidden": x !== m,
806
+ ref: (v) => {
807
+ v && (x === m ? v.removeAttribute("inert") : v.setAttribute("inert", ""));
676
808
  },
677
809
  className: "w-full shrink-0",
678
- children: p
810
+ children: h
679
811
  },
680
- g
812
+ x
681
813
  ))
682
814
  }
683
815
  ) }),
684
- i.length > 1 && /* @__PURE__ */ h(Y, { children: [
685
- /* @__PURE__ */ e(
816
+ c.length > 1 && /* @__PURE__ */ f(re, { children: [
817
+ /* @__PURE__ */ t(
686
818
  "button",
687
819
  {
688
820
  type: "button",
689
821
  "aria-label": "Previous slide",
690
- className: `${fe} left-2`,
691
- disabled: !l && b === 0,
692
- onClick: () => x(b - 1),
822
+ className: `${Ce} left-2`,
823
+ disabled: !l && m === 0,
824
+ onClick: () => g(m - 1),
693
825
  children: "‹"
694
826
  }
695
827
  ),
696
- /* @__PURE__ */ e(
828
+ /* @__PURE__ */ t(
697
829
  "button",
698
830
  {
699
831
  type: "button",
700
832
  "aria-label": "Next slide",
701
- className: `${fe} right-2`,
702
- disabled: !l && b === i.length - 1,
703
- onClick: () => x(b + 1),
833
+ className: `${Ce} right-2`,
834
+ disabled: !l && m === c.length - 1,
835
+ onClick: () => g(m + 1),
704
836
  children: "›"
705
837
  }
706
838
  ),
707
- /* @__PURE__ */ e("div", { className: "mt-2 flex justify-center gap-1.5", children: i.map((p, g) => /* @__PURE__ */ e(
839
+ /* @__PURE__ */ t("div", { className: "mt-2 flex justify-center gap-1.5", children: c.map((h, x) => /* @__PURE__ */ t(
708
840
  "button",
709
841
  {
710
842
  type: "button",
711
- "aria-label": `Go to slide ${g + 1}`,
712
- "aria-current": g === b,
713
- onClick: () => x(g),
714
- className: `h-2 w-2 border border-app-strong transition ${g === b ? "bg-app-strong" : "bg-transparent"}`
843
+ "aria-label": `Go to slide ${x + 1}`,
844
+ "aria-current": x === m,
845
+ onClick: () => g(x),
846
+ className: "flex h-6 w-6 items-center justify-center",
847
+ children: /* @__PURE__ */ t(
848
+ "span",
849
+ {
850
+ className: `h-2 w-2 border border-app-strong transition ${x === m ? "bg-app-strong" : "bg-transparent"}`
851
+ }
852
+ )
715
853
  },
716
- g
854
+ x
717
855
  )) })
718
856
  ] })
719
857
  ]
720
858
  }
721
859
  );
722
- }, be = ({ label: t, checked: r, onChange: a, indeterminate: n = !1, disabled: s = !1, className: l = "", ...o }) => {
723
- const c = S(), i = E(null);
724
- return T(() => {
725
- i.current && (i.current.indeterminate = n);
726
- }, [n]), /* @__PURE__ */ h(
860
+ }, Te = ({ label: e, checked: r, onChange: a, indeterminate: n = !1, disabled: s = !1, className: l = "", ...o }) => {
861
+ const i = O(), c = A(null);
862
+ P(() => {
863
+ c.current && (c.current.indeterminate = n);
864
+ }, [n]);
865
+ const u = r || n;
866
+ return /* @__PURE__ */ f(
727
867
  "label",
728
868
  {
729
- htmlFor: c,
730
- className: `inline-flex items-center gap-2 align-middle text-sm leading-none text-app-text ${s ? "cursor-not-allowed opacity-50" : "cursor-pointer"} ${l}`,
869
+ htmlFor: i,
870
+ className: `inline-flex min-h-8 items-center gap-2 align-middle text-sm leading-none text-app-text ${s ? "cursor-not-allowed opacity-50" : "cursor-pointer"} ${l}`,
731
871
  children: [
732
- /* @__PURE__ */ e(
872
+ /* @__PURE__ */ t(
733
873
  "input",
734
874
  {
735
- ref: i,
736
- id: c,
875
+ ref: c,
876
+ id: i,
737
877
  type: "checkbox",
738
878
  checked: r,
739
879
  disabled: s,
740
- onChange: (u) => a == null ? void 0 : a(u.target.checked),
741
- className: "h-4 w-4 cursor-[inherit] accent-[rgb(var(--color-app-strong))]",
880
+ onChange: (b) => a == null ? void 0 : a(b.target.checked),
881
+ className: "peer sr-only",
742
882
  ...o
743
883
  }
744
884
  ),
745
- t
885
+ /* @__PURE__ */ t(
886
+ "span",
887
+ {
888
+ "aria-hidden": "true",
889
+ className: `flex h-4 w-4 shrink-0 items-center justify-center border transition peer-focus-visible:outline peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2 peer-focus-visible:outline-app-strong ${u ? "border-app-strong bg-app-strong text-app-bg" : "border-app-border bg-app-bg"}`,
890
+ children: n ? /* @__PURE__ */ t("svg", { viewBox: "0 0 16 16", className: "h-3 w-3", fill: "none", stroke: "currentColor", strokeWidth: "2.2", children: /* @__PURE__ */ t("path", { d: "M3.5 8h9" }) }) : r && /* @__PURE__ */ t("svg", { viewBox: "0 0 16 16", className: "h-3 w-3", fill: "none", stroke: "currentColor", strokeWidth: "2.2", children: /* @__PURE__ */ t("path", { strokeLinecap: "square", strokeLinejoin: "miter", d: "M3 8.5l3.2 3.2L13 4.8" }) })
891
+ }
892
+ ),
893
+ e
746
894
  ]
747
895
  }
748
896
  );
749
- }, nr = ({
750
- open: t,
897
+ }, $r = ({
898
+ open: e,
751
899
  onClose: r,
752
900
  commands: a,
753
901
  placeholder: n = "Type a command…",
754
902
  empty: s = "No matching commands"
755
903
  }) => {
756
- const [l, o] = k(""), [c, i] = k(0), u = E(null), m = E(null), d = S();
757
- ie(t, r), X(t, u), T(() => {
758
- t && (o(""), i(0));
759
- }, [t]);
760
- const f = $e(() => {
761
- const p = l.trim().toLowerCase(), g = p ? a.filter((C) => `${C.label} ${C.description ?? ""} ${C.group ?? ""}`.toLowerCase().includes(p)) : a;
762
- return [...new Set(g.map((C) => C.group))].flatMap((C) => g.filter((w) => w.group === C));
904
+ const [l, o] = D(""), [i, c] = D(0), u = A(null), b = A(null), d = O();
905
+ ye(e, r), ie(e, u), P(() => {
906
+ e && (o(""), c(0));
907
+ }, [e]);
908
+ const p = je(() => {
909
+ const h = l.trim().toLowerCase(), x = h ? a.filter((N) => `${N.label} ${N.description ?? ""} ${N.group ?? ""}`.toLowerCase().includes(h)) : a;
910
+ return [...new Set(x.map((N) => N.group))].flatMap((N) => x.filter((M) => M.group === N));
763
911
  }, [a, l]);
764
- if (T(() => {
765
- var p, g, y;
766
- (y = (g = (p = m.current) == null ? void 0 : p.querySelector('[aria-selected="true"]')) == null ? void 0 : g.scrollIntoView) == null || y.call(g, { block: "nearest" });
767
- }, [c, f]), !t) return null;
768
- const b = (p) => {
769
- var g;
770
- p && (r(), (g = p.onSelect) == null || g.call(p));
771
- }, x = (p) => {
772
- p.key === "ArrowDown" ? (p.preventDefault(), i((g) => f.length ? (g + 1) % f.length : 0)) : p.key === "ArrowUp" ? (p.preventDefault(), i((g) => f.length ? (g - 1 + f.length) % f.length : 0)) : p.key === "Enter" && (p.preventDefault(), b(f[c]));
912
+ if (P(() => {
913
+ var h, x, v;
914
+ (v = (x = (h = b.current) == null ? void 0 : h.querySelector('[aria-selected="true"]')) == null ? void 0 : x.scrollIntoView) == null || v.call(x, { block: "nearest" });
915
+ }, [i, p]), !e) return null;
916
+ const m = (h) => {
917
+ var x;
918
+ h && (r(), (x = h.onSelect) == null || x.call(h));
919
+ }, g = (h) => {
920
+ h.key === "ArrowDown" ? (h.preventDefault(), c((x) => p.length ? (x + 1) % p.length : 0)) : h.key === "ArrowUp" ? (h.preventDefault(), c((x) => p.length ? (x - 1 + p.length) % p.length : 0)) : h.key === "Enter" && (h.preventDefault(), m(p[i]));
773
921
  };
774
- return H(
775
- /* @__PURE__ */ h("div", { className: "fixed inset-0 z-[var(--xd-z-modal,80)] flex items-start justify-center px-4 pt-[15vh]", children: [
776
- /* @__PURE__ */ e("div", { "aria-hidden": "true", className: "absolute inset-0 bg-black/30 backdrop-blur-sm", onClick: r }),
777
- /* @__PURE__ */ h(
922
+ return ae(
923
+ /* @__PURE__ */ f("div", { className: "fixed inset-0 z-[var(--xd-z-modal,80)] flex items-start justify-center px-4 pt-[15vh]", children: [
924
+ /* @__PURE__ */ t("div", { "aria-hidden": "true", className: "absolute inset-0 bg-black/30 backdrop-blur-sm", onClick: r }),
925
+ /* @__PURE__ */ f(
778
926
  "div",
779
927
  {
780
928
  ref: u,
@@ -784,65 +932,65 @@ const pe = 6, Q = 8, Le = ({ text: t, children: r, className: a = "" }) => {
784
932
  tabIndex: -1,
785
933
  className: "relative z-10 flex max-h-[60vh] w-full max-w-xl flex-col border border-app-border bg-app-card shadow-2xl",
786
934
  children: [
787
- /* @__PURE__ */ e(
935
+ /* @__PURE__ */ t(
788
936
  "input",
789
937
  {
790
938
  "data-autofocus": !0,
791
939
  role: "combobox",
792
940
  "aria-expanded": "true",
793
941
  "aria-controls": d,
794
- "aria-activedescendant": f[c] ? `${d}-${f[c].key}` : void 0,
942
+ "aria-activedescendant": p[i] ? `${d}-${p[i].key}` : void 0,
795
943
  "aria-autocomplete": "list",
796
944
  value: l,
797
- onChange: (p) => {
798
- o(p.target.value), i(0);
945
+ onChange: (h) => {
946
+ o(h.target.value), c(0);
799
947
  },
800
- onKeyDown: x,
948
+ onKeyDown: g,
801
949
  placeholder: n,
802
950
  "aria-label": "Search commands",
803
951
  className: "w-full border-b border-app-border bg-transparent px-4 py-3 text-sm text-app-text outline-none placeholder:text-app-muted"
804
952
  }
805
953
  ),
806
- /* @__PURE__ */ h(
954
+ /* @__PURE__ */ f(
807
955
  "ul",
808
956
  {
809
957
  id: d,
810
- ref: m,
958
+ ref: b,
811
959
  role: "listbox",
812
960
  "aria-label": "Commands",
813
961
  className: "m-0 flex-1 list-none overflow-y-auto p-0",
814
962
  children: [
815
- f.length === 0 && /* @__PURE__ */ e("li", { className: "px-4 py-6 text-center text-sm text-app-muted", children: s }),
816
- f.map((p, g) => {
817
- var C;
818
- const y = p.group && p.group !== ((C = f[g - 1]) == null ? void 0 : C.group);
819
- return /* @__PURE__ */ h("li", { role: "presentation", children: [
820
- y && /* @__PURE__ */ e("div", { className: "px-4 pb-1 pt-3 text-[10px] font-semibold uppercase tracking-widest text-app-muted", children: p.group }),
821
- /* @__PURE__ */ h(
963
+ p.length === 0 && /* @__PURE__ */ t("li", { className: "px-4 py-6 text-center text-sm text-app-muted", children: s }),
964
+ p.map((h, x) => {
965
+ var N;
966
+ const v = h.group && h.group !== ((N = p[x - 1]) == null ? void 0 : N.group);
967
+ return /* @__PURE__ */ f("li", { role: "presentation", children: [
968
+ v && /* @__PURE__ */ t("div", { className: "px-4 pb-1 pt-3 text-[10px] font-semibold uppercase tracking-widest text-app-muted", children: h.group }),
969
+ /* @__PURE__ */ f(
822
970
  "div",
823
971
  {
824
- id: `${d}-${p.key}`,
972
+ id: `${d}-${h.key}`,
825
973
  role: "option",
826
- "aria-selected": g === c,
827
- onMouseMove: () => i(g),
828
- onClick: () => b(p),
829
- className: `flex cursor-pointer items-center justify-between gap-3 px-4 py-2.5 text-sm ${g === c ? "bg-app-strong text-app-bg" : "text-app-text"}`,
974
+ "aria-selected": x === i,
975
+ onMouseMove: () => c(x),
976
+ onClick: () => m(h),
977
+ className: `flex cursor-pointer items-center justify-between gap-3 px-4 py-2.5 text-sm ${x === i ? "bg-app-strong text-app-bg" : "text-app-text"}`,
830
978
  children: [
831
- /* @__PURE__ */ h("span", { className: "min-w-0", children: [
832
- /* @__PURE__ */ e("span", { className: "block truncate", children: p.label }),
833
- p.description && /* @__PURE__ */ e("span", { className: `block truncate text-xs ${g === c ? "opacity-80" : "text-app-muted"}`, children: p.description })
979
+ /* @__PURE__ */ f("span", { className: "min-w-0", children: [
980
+ /* @__PURE__ */ t("span", { className: "block truncate", children: h.label }),
981
+ h.description && /* @__PURE__ */ t("span", { className: `block truncate text-xs ${x === i ? "opacity-80" : "text-app-muted"}`, children: h.description })
834
982
  ] }),
835
- p.shortcut && /* @__PURE__ */ e(
983
+ h.shortcut && /* @__PURE__ */ t(
836
984
  "kbd",
837
985
  {
838
- className: `shrink-0 border px-1.5 py-0.5 text-[10px] ${g === c ? "border-app-bg/40" : "border-app-border text-app-muted"}`,
839
- children: p.shortcut
986
+ className: `shrink-0 border px-1.5 py-0.5 text-[10px] ${x === i ? "border-app-bg/40" : "border-app-border text-app-muted"}`,
987
+ children: h.shortcut
840
988
  }
841
989
  )
842
990
  ]
843
991
  }
844
992
  )
845
- ] }, p.key);
993
+ ] }, h.key);
846
994
  })
847
995
  ]
848
996
  }
@@ -853,7 +1001,7 @@ const pe = 6, Q = 8, Le = ({ text: t, children: r, className: a = "" }) => {
853
1001
  ] }),
854
1002
  document.body
855
1003
  );
856
- }, Fe = "xedonium-theme-override", se = {
1004
+ }, He = "xedonium-theme-override", xe = {
857
1005
  light: {
858
1006
  outer: "#d8d8d8",
859
1007
  bladeA: "#f5f5f5",
@@ -872,153 +1020,153 @@ const pe = 6, Q = 8, Le = ({ text: t, children: r, className: a = "" }) => {
872
1020
  ring: "#b5b5b5",
873
1021
  ringOpacity: "0.85"
874
1022
  }
875
- }, pt = 450, xe = () => typeof document > "u" ? "light" : document.documentElement.getAttribute("data-theme") === "dark" ? "dark" : "light", je = ({ size: t = 64, theme: r, label: a }) => {
876
- const [n, s] = k(() => r || xe()), l = E(null);
877
- T(() => {
1023
+ }, Ct = 450, De = () => typeof document > "u" ? "light" : document.documentElement.getAttribute("data-theme") === "dark" ? "dark" : "light", Ye = ({ size: e = 64, theme: r, label: a }) => {
1024
+ const [n, s] = D(() => r || De()), l = A(null);
1025
+ P(() => {
878
1026
  if (r) {
879
1027
  s(r);
880
1028
  return;
881
1029
  }
882
- const c = document.documentElement, i = () => s(xe()), u = new MutationObserver(i);
883
- return i(), u.observe(c, { attributes: !0, attributeFilter: ["data-theme"] }), () => u.disconnect();
884
- }, [r]), T(() => {
885
- let c = 0, i = null, u;
886
- const m = (d) => {
887
- var b;
888
- const f = i === null ? 0 : (d - i) / 1e3;
889
- i = d, c = (c + pt * f) % 360, (b = l.current) == null || b.setAttribute("transform", `rotate(${c} 32 32)`), u = requestAnimationFrame(m);
1030
+ const i = document.documentElement, c = () => s(De()), u = new MutationObserver(c);
1031
+ return c(), u.observe(i, { attributes: !0, attributeFilter: ["data-theme"] }), () => u.disconnect();
1032
+ }, [r]), P(() => {
1033
+ let i = 0, c = null, u;
1034
+ const b = (d) => {
1035
+ var m;
1036
+ const p = c === null ? 0 : (d - c) / 1e3;
1037
+ c = d, i = (i + Ct * p) % 360, (m = l.current) == null || m.setAttribute("transform", `rotate(${i} 32 32)`), u = requestAnimationFrame(b);
890
1038
  };
891
- return u = requestAnimationFrame(m), () => cancelAnimationFrame(u);
1039
+ return u = requestAnimationFrame(b), () => cancelAnimationFrame(u);
892
1040
  }, []);
893
- const o = se[n] || se.light;
894
- return /* @__PURE__ */ h(
1041
+ const o = xe[n] || xe.light;
1042
+ return /* @__PURE__ */ f(
895
1043
  "svg",
896
1044
  {
897
- width: t,
898
- height: t,
1045
+ width: e,
1046
+ height: e,
899
1047
  viewBox: "0 0 64 64",
900
1048
  xmlns: "http://www.w3.org/2000/svg",
901
1049
  focusable: "false",
902
1050
  ...a ? { role: "img", "aria-label": a } : { "aria-hidden": !0 },
903
1051
  children: [
904
- /* @__PURE__ */ e("circle", { cx: "32", cy: "32", r: "30", fill: o.outer }),
905
- /* @__PURE__ */ h("g", { ref: l, children: [
906
- /* @__PURE__ */ e("path", { d: "M32 32 C32 18, 42 14, 45 10 C49 5, 52 6, 50 12 C48 18, 38 20, 32 32 Z", fill: o.bladeA }),
907
- /* @__PURE__ */ e("path", { d: "M32 32 C46 32, 50 42, 54 45 C59 49, 58 52, 52 50 C46 48, 44 38, 32 32 Z", fill: o.bladeB }),
908
- /* @__PURE__ */ e("path", { d: "M32 32 C32 46, 22 50, 19 54 C15 59, 12 58, 14 52 C16 46, 26 44, 32 32 Z", fill: o.bladeA }),
909
- /* @__PURE__ */ e("path", { d: "M32 32 C18 32, 14 22, 10 19 C5 15, 6 12, 12 14 C18 16, 20 26, 32 32 Z", fill: o.bladeB })
1052
+ /* @__PURE__ */ t("circle", { cx: "32", cy: "32", r: "30", fill: o.outer }),
1053
+ /* @__PURE__ */ f("g", { ref: l, children: [
1054
+ /* @__PURE__ */ t("path", { d: "M32 32 C32 18, 42 14, 45 10 C49 5, 52 6, 50 12 C48 18, 38 20, 32 32 Z", fill: o.bladeA }),
1055
+ /* @__PURE__ */ t("path", { d: "M32 32 C46 32, 50 42, 54 45 C59 49, 58 52, 52 50 C46 48, 44 38, 32 32 Z", fill: o.bladeB }),
1056
+ /* @__PURE__ */ t("path", { d: "M32 32 C32 46, 22 50, 19 54 C15 59, 12 58, 14 52 C16 46, 26 44, 32 32 Z", fill: o.bladeA }),
1057
+ /* @__PURE__ */ t("path", { d: "M32 32 C18 32, 14 22, 10 19 C5 15, 6 12, 12 14 C18 16, 20 26, 32 32 Z", fill: o.bladeB })
910
1058
  ] }),
911
- /* @__PURE__ */ e("circle", { cx: "32", cy: "32", r: "5", fill: o.hubOuter }),
912
- /* @__PURE__ */ e("circle", { cx: "32", cy: "32", r: "3", fill: o.hubInner }),
913
- /* @__PURE__ */ e("circle", { cx: "32", cy: "32", r: "30", fill: "none", stroke: o.ring, strokeWidth: "5", opacity: "0.85" })
1059
+ /* @__PURE__ */ t("circle", { cx: "32", cy: "32", r: "5", fill: o.hubOuter }),
1060
+ /* @__PURE__ */ t("circle", { cx: "32", cy: "32", r: "3", fill: o.hubInner }),
1061
+ /* @__PURE__ */ t("circle", { cx: "32", cy: "32", r: "30", fill: "none", stroke: o.ring, strokeWidth: "5", opacity: "0.85" })
914
1062
  ]
915
1063
  }
916
1064
  );
917
- }, ut = {
1065
+ }, Tt = {
918
1066
  default: { dot: "bg-app-soft", title: "text-app-soft" },
919
1067
  danger: { dot: "bg-red-500", title: "text-red-700 dark:text-red-400" }
920
- }, ht = ({
921
- open: t,
1068
+ }, Dt = ({
1069
+ open: e,
922
1070
  onClose: r,
923
1071
  title: a,
924
1072
  tone: n = "default",
925
1073
  busy: s = !1,
926
1074
  dismissible: l = !0,
927
1075
  role: o = "dialog",
928
- describedBy: c,
929
- maxWidth: i = "max-w-lg",
1076
+ describedBy: i,
1077
+ maxWidth: c = "max-w-lg",
930
1078
  className: u = "",
931
- as: m = "div",
1079
+ as: b = "div",
932
1080
  footer: d,
933
- children: f,
934
- ...b
1081
+ children: p,
1082
+ ...m
935
1083
  }) => {
936
- const x = E(null), p = S(), g = E(r);
937
- T(() => {
938
- g.current = r;
1084
+ const g = A(null), h = O(), x = A(r);
1085
+ P(() => {
1086
+ x.current = r;
939
1087
  });
940
- const y = Me(() => {
941
- !s && l && g.current();
1088
+ const v = Fe(() => {
1089
+ !s && l && x.current();
942
1090
  }, [s, l]);
943
- if (ie(t, y), X(t, x), !t) return null;
944
- const { dot: C, title: w } = ut[n];
945
- return H(
946
- /* @__PURE__ */ h("div", { className: "fixed inset-0 z-[var(--xd-z-modal,80)] flex items-center justify-center px-4", children: [
947
- /* @__PURE__ */ e("div", { "aria-hidden": "true", className: "absolute inset-0 bg-black/30 backdrop-blur-sm", onClick: y }),
948
- /* @__PURE__ */ h(
949
- m,
1091
+ if (ye(e, v), ie(e, g), !e) return null;
1092
+ const { dot: N, title: M } = Tt[n];
1093
+ return ae(
1094
+ /* @__PURE__ */ f("div", { className: "fixed inset-0 z-[var(--xd-z-modal,80)] flex items-center justify-center px-4", children: [
1095
+ /* @__PURE__ */ t("div", { "aria-hidden": "true", className: "absolute inset-0 bg-black/30 backdrop-blur-sm", onClick: v }),
1096
+ /* @__PURE__ */ f(
1097
+ b,
950
1098
  {
951
- ref: x,
1099
+ ref: g,
952
1100
  role: o,
953
1101
  "aria-modal": "true",
954
- "aria-labelledby": p,
955
- "aria-describedby": c,
1102
+ "aria-labelledby": h,
1103
+ "aria-describedby": i,
956
1104
  "aria-busy": s || void 0,
957
1105
  tabIndex: -1,
958
- className: `relative z-10 flex max-h-[90vh] w-full min-w-0 flex-col border border-app-border bg-app-card shadow-2xl ${i} ${u}`,
959
- ...b,
1106
+ className: `relative z-10 flex max-h-[90vh] w-full min-w-0 flex-col border border-app-border bg-app-card shadow-2xl ${c} ${u}`,
1107
+ ...m,
960
1108
  children: [
961
- /* @__PURE__ */ h("div", { className: "flex shrink-0 items-center justify-between border-b border-app-border px-6 pb-5 pt-6", children: [
962
- /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
963
- /* @__PURE__ */ e("span", { "aria-hidden": "true", className: `inline-block h-2 w-2 rounded-full ${C}` }),
964
- /* @__PURE__ */ e("h2", { id: p, className: `text-sm font-semibold uppercase tracking-widest ${w}`, children: a })
1109
+ /* @__PURE__ */ f("div", { className: "flex shrink-0 items-center justify-between border-b border-app-border px-6 pb-5 pt-6", children: [
1110
+ /* @__PURE__ */ f("div", { className: "flex items-center gap-2", children: [
1111
+ /* @__PURE__ */ t("span", { "aria-hidden": "true", className: `inline-block h-2 w-2 rounded-full ${N}` }),
1112
+ /* @__PURE__ */ t("h2", { id: h, className: `text-sm font-semibold uppercase tracking-widest ${M}`, children: a })
965
1113
  ] }),
966
- /* @__PURE__ */ e(
967
- R,
1114
+ /* @__PURE__ */ t(
1115
+ H,
968
1116
  {
969
- onClick: () => !s && g.current(),
1117
+ onClick: () => !s && x.current(),
970
1118
  disabled: s,
971
1119
  tooltip: "Close dialog",
972
1120
  "aria-label": "Close dialog",
973
1121
  variant: "secondary",
974
- children: /* @__PURE__ */ e(oe, {})
1122
+ children: /* @__PURE__ */ t(we, {})
975
1123
  }
976
1124
  )
977
1125
  ] }),
978
- /* @__PURE__ */ e("div", { className: "flex-1 overflow-y-auto", children: f }),
979
- d && /* @__PURE__ */ e("div", { className: "flex shrink-0 flex-wrap items-center justify-end gap-3 border-t border-app-border px-6 pb-6 pt-4", children: d })
1126
+ /* @__PURE__ */ t("div", { className: "flex-1 overflow-y-auto", children: p }),
1127
+ d && /* @__PURE__ */ t("div", { className: "flex shrink-0 flex-wrap items-center justify-end gap-3 border-t border-app-border px-6 pb-6 pt-4", children: d })
980
1128
  ]
981
1129
  }
982
1130
  )
983
1131
  ] }),
984
1132
  document.body
985
1133
  );
986
- }, sr = ({
987
- open: t,
1134
+ }, Mr = ({
1135
+ open: e,
988
1136
  onClose: r,
989
1137
  onConfirm: a,
990
1138
  title: n,
991
1139
  tone: s = "default",
992
1140
  busy: l = !1,
993
1141
  confirmLabel: o = "Confirm",
994
- busyLabel: c,
995
- cancelLabel: i = "Cancel",
1142
+ busyLabel: i,
1143
+ cancelLabel: c = "Cancel",
996
1144
  error: u,
997
- children: m
998
- }) => /* @__PURE__ */ e(
999
- ht,
1145
+ children: b
1146
+ }) => /* @__PURE__ */ t(
1147
+ Dt,
1000
1148
  {
1001
- open: t,
1149
+ open: e,
1002
1150
  onClose: r,
1003
1151
  busy: l,
1004
1152
  title: n,
1005
1153
  tone: s,
1006
1154
  role: s === "danger" ? "alertdialog" : "dialog",
1007
1155
  maxWidth: "max-w-md",
1008
- footer: /* @__PURE__ */ h(Y, { children: [
1009
- /* @__PURE__ */ e(R, { onClick: r, disabled: l, variant: "secondary", "data-autofocus": !0, children: i }),
1010
- /* @__PURE__ */ e(R, { onClick: a, disabled: l, variant: s === "danger" ? "danger" : "default", children: l ? /* @__PURE__ */ h("span", { className: "flex items-center gap-1", children: [
1011
- /* @__PURE__ */ e(je, { size: 16 }),
1156
+ footer: /* @__PURE__ */ f(re, { children: [
1157
+ /* @__PURE__ */ t(H, { onClick: r, disabled: l, variant: "secondary", "data-autofocus": !0, children: c }),
1158
+ /* @__PURE__ */ t(H, { onClick: a, disabled: l, variant: s === "danger" ? "danger" : "default", children: l ? /* @__PURE__ */ f("span", { className: "flex items-center gap-1", children: [
1159
+ /* @__PURE__ */ t(Ye, { size: 16 }),
1012
1160
  " ",
1013
- c || o
1161
+ i || o
1014
1162
  ] }) : o })
1015
1163
  ] }),
1016
- children: /* @__PURE__ */ h("div", { className: "flex flex-col gap-3 px-6 py-5 text-sm text-app-text", children: [
1017
- m,
1018
- u && /* @__PURE__ */ e("p", { role: "alert", className: "text-red-700 dark:text-red-400", children: u })
1164
+ children: /* @__PURE__ */ f("div", { className: "flex flex-col gap-3 px-6 py-5 text-sm text-app-text", children: [
1165
+ b,
1166
+ u && /* @__PURE__ */ t("p", { role: "alert", className: "text-red-700 dark:text-red-400", children: u })
1019
1167
  ] })
1020
1168
  }
1021
- ), lr = ({ maxWidth: t = "max-w-5xl", className: r = "", as: a = "div", children: n, ...s }) => /* @__PURE__ */ e(a, { className: `mx-auto w-full px-4 sm:px-6 ${t} ${r}`, ...s, children: n }), mt = {
1169
+ ), Lr = ({ maxWidth: e = "max-w-5xl", className: r = "", as: a = "div", children: n, ...s }) => /* @__PURE__ */ t(a, { className: `mx-auto w-full px-4 sm:px-6 ${e} ${r}`, ...s, children: n }), At = {
1022
1170
  1: "grid-cols-1",
1023
1171
  2: "grid-cols-2",
1024
1172
  3: "grid-cols-3",
@@ -1026,7 +1174,7 @@ const pe = 6, Q = 8, Le = ({ text: t, children: r, className: a = "" }) => {
1026
1174
  5: "grid-cols-5",
1027
1175
  6: "grid-cols-6",
1028
1176
  12: "grid-cols-12"
1029
- }, ft = {
1177
+ }, Et = {
1030
1178
  1: "grid-cols-1",
1031
1179
  2: "grid-cols-1 sm:grid-cols-2",
1032
1180
  3: "grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",
@@ -1034,360 +1182,365 @@ const pe = 6, Q = 8, Le = ({ text: t, children: r, className: a = "" }) => {
1034
1182
  5: "grid-cols-1 sm:grid-cols-3 lg:grid-cols-5",
1035
1183
  6: "grid-cols-2 sm:grid-cols-3 lg:grid-cols-6",
1036
1184
  12: "grid-cols-4 sm:grid-cols-6 lg:grid-cols-12"
1037
- }, bt = { 0: "gap-0", 1: "gap-1", 2: "gap-2", 3: "gap-3", 4: "gap-4", 6: "gap-6", 8: "gap-8" }, ge = ({ cols: t = 2, gap: r = 4, responsive: a = !0, className: n = "", as: s = "div", children: l, ...o }) => /* @__PURE__ */ e(s, { className: `grid ${(a ? ft : mt)[t]} ${bt[r]} ${n}`, ...o, children: l }), xt = ({ title: t, subtitle: r, children: a }) => /* @__PURE__ */ h("div", { className: "mb-6 flex flex-wrap items-end justify-between gap-3", children: [
1038
- /* @__PURE__ */ h("div", { children: [
1039
- /* @__PURE__ */ e("h1", { className: "text-2xl font-bold tracking-tight text-app-text sm:text-3xl", children: t }),
1040
- r && /* @__PURE__ */ e("p", { className: "mt-0.5 text-xs font-semibold uppercase tracking-widest text-app-muted", children: r })
1185
+ }, It = { 0: "gap-0", 1: "gap-1", 2: "gap-2", 3: "gap-3", 4: "gap-4", 6: "gap-6", 8: "gap-8" }, Ae = ({ cols: e = 2, gap: r = 4, responsive: a = !0, className: n = "", as: s = "div", children: l, ...o }) => /* @__PURE__ */ t(s, { className: `grid ${(a ? Et : At)[e]} ${It[r]} ${n}`, ...o, children: l }), U = ({ as: e, htmlFor: r, className: a = "", children: n, ...s }) => {
1186
+ const l = e ?? (r ? "label" : "span");
1187
+ return /* @__PURE__ */ t(
1188
+ l,
1189
+ {
1190
+ htmlFor: l === "label" ? r : void 0,
1191
+ className: `text-xs font-semibold uppercase tracking-widest text-app-muted ${a}`,
1192
+ ...s,
1193
+ children: n
1194
+ }
1195
+ );
1196
+ }, St = ({ title: e, subtitle: r, children: a }) => /* @__PURE__ */ f("div", { className: "mb-6 flex flex-wrap items-end justify-between gap-3", children: [
1197
+ /* @__PURE__ */ f("div", { children: [
1198
+ /* @__PURE__ */ t("h1", { className: "text-2xl font-bold tracking-tight text-app-text sm:text-3xl", children: e }),
1199
+ r && /* @__PURE__ */ t(U, { as: "p", className: "mt-0.5", children: r })
1041
1200
  ] }),
1042
- a && /* @__PURE__ */ e("div", { className: "flex flex-wrap items-center gap-2", children: a })
1043
- ] }), gt = {
1201
+ a && /* @__PURE__ */ t("div", { className: "flex flex-wrap items-center gap-2", children: a })
1202
+ ] }), Pt = {
1044
1203
  up: "text-emerald-700 dark:text-emerald-400",
1045
1204
  down: "text-red-700 dark:text-red-400",
1046
1205
  flat: "text-app-muted"
1047
- }, vt = ({ label: t, value: r, delta: a, trend: n = "flat", hint: s, className: l = "" }) => /* @__PURE__ */ h("div", { className: `flex flex-col gap-1 border border-app-border bg-app-card p-4 ${l}`, children: [
1048
- /* @__PURE__ */ e("span", { className: "text-xs font-semibold uppercase tracking-widest text-app-muted", children: t }),
1049
- /* @__PURE__ */ h("div", { className: "flex items-baseline gap-2", children: [
1050
- /* @__PURE__ */ e("span", { className: "text-2xl font-bold tracking-tight text-app-text", children: r }),
1051
- a && /* @__PURE__ */ h("span", { className: `text-xs font-semibold ${gt[n]}`, children: [
1052
- /* @__PURE__ */ e("span", { "aria-hidden": "true", children: n === "up" ? "▲ " : n === "down" ? "▼ " : "" }),
1206
+ }, Rt = ({ label: e, value: r, delta: a, trend: n = "flat", hint: s, className: l = "" }) => /* @__PURE__ */ f("div", { className: `flex flex-col gap-1 border border-app-border bg-app-card p-4 ${l}`, children: [
1207
+ /* @__PURE__ */ t(U, { children: e }),
1208
+ /* @__PURE__ */ f("div", { className: "flex items-baseline gap-2", children: [
1209
+ /* @__PURE__ */ t("span", { className: "text-2xl font-bold tracking-tight text-app-text", children: r }),
1210
+ a && /* @__PURE__ */ f("span", { className: `text-xs font-semibold ${Pt[n]}`, children: [
1211
+ /* @__PURE__ */ t("span", { "aria-hidden": "true", children: n === "up" ? "▲ " : n === "down" ? "▼ " : "" }),
1053
1212
  a
1054
1213
  ] })
1055
1214
  ] }),
1056
- s && /* @__PURE__ */ e("span", { className: "text-xs text-app-muted", children: s })
1057
- ] }), or = ({ title: t, subtitle: r, actions: a, stats: n = [], columns: s = 2, children: l }) => /* @__PURE__ */ h("div", { className: "flex flex-col gap-6", children: [
1058
- t && /* @__PURE__ */ e(xt, { title: t, subtitle: r, children: a }),
1059
- n.length > 0 && /* @__PURE__ */ e(ge, { cols: Math.min(n.length, 4), gap: 4, children: n.map((o) => /* @__PURE__ */ e(vt, { ...o }, o.label)) }),
1060
- l && /* @__PURE__ */ e(ge, { cols: s, gap: 4, children: l })
1061
- ] }), Z = (t = !1) => `w-full bg-app-bg border px-3 py-2 text-sm text-app-text placeholder:text-app-muted outline-none transition focus:ring-2 focus:ring-app-strong focus:border-app-strong disabled:cursor-not-allowed disabled:opacity-50 ${t ? "border-red-500" : "border-app-border"}`, Pe = qe(({ value: t, onChange: r, invalid: a = !1, type: n = "text", className: s = "", ...l }, o) => /* @__PURE__ */ e(
1215
+ s && /* @__PURE__ */ t("span", { className: "text-xs text-app-muted", children: s })
1216
+ ] }), Cr = ({ title: e, subtitle: r, actions: a, stats: n = [], columns: s = 2, children: l }) => /* @__PURE__ */ f("div", { className: "flex flex-col gap-6", children: [
1217
+ e && /* @__PURE__ */ t(St, { title: e, subtitle: r, children: a }),
1218
+ n.length > 0 && /* @__PURE__ */ t(Ae, { cols: Math.min(n.length, 4), gap: 4, children: n.map((o) => /* @__PURE__ */ t(Rt, { ...o }, o.label)) }),
1219
+ l && /* @__PURE__ */ t(Ae, { cols: s, gap: 4, children: l })
1220
+ ] }), se = (e = !1) => `w-full bg-app-bg border px-3 py-2 text-sm text-app-text placeholder:text-app-muted outline-none transition focus:ring-2 focus:ring-app-strong focus:border-app-strong disabled:cursor-not-allowed disabled:opacity-50 ${e ? "border-red-500" : "border-app-border"}`, Ze = tt(({ value: e, onChange: r, invalid: a = !1, type: n = "text", className: s = "", ...l }, o) => /* @__PURE__ */ t(
1062
1221
  "input",
1063
1222
  {
1064
1223
  ref: o,
1065
1224
  type: n,
1066
1225
  "aria-invalid": a || void 0,
1067
- className: `${Z(a)} ${s}`,
1068
- value: t,
1069
- onChange: (c) => r == null ? void 0 : r(c.target.value),
1226
+ className: `${se(a)} ${s}`,
1227
+ value: e,
1228
+ onChange: (i) => r == null ? void 0 : r(i.target.value),
1070
1229
  ...l
1071
1230
  }
1072
1231
  ));
1073
- Pe.displayName = "Input";
1074
- const yt = (t, r, a) => {
1232
+ Ze.displayName = "Input";
1233
+ const jt = (e, r, a) => {
1075
1234
  const n = /* @__PURE__ */ new Set([1, r]);
1076
- for (let o = t - a; o <= t + a; o++) o > 1 && o < r && n.add(o);
1077
- const s = [...n].sort((o, c) => o - c), l = [];
1078
- return s.forEach((o, c) => {
1079
- c > 0 && o - s[c - 1] > 1 && l.push(null), l.push(o);
1235
+ for (let o = e - a; o <= e + a; o++) o > 1 && o < r && n.add(o);
1236
+ const s = [...n].sort((o, i) => o - i), l = [];
1237
+ return s.forEach((o, i) => {
1238
+ i > 0 && o - s[i - 1] > 1 && l.push(null), l.push(o);
1080
1239
  }), l;
1081
- }, re = (t = !1) => `min-w-[2.25rem] border px-2 py-1.5 text-xs font-semibold tracking-widest transition disabled:cursor-not-allowed disabled:opacity-50 ${t ? "border-app-strong bg-app-strong text-app-bg" : "border-app-border bg-app-bg text-app-text hover:border-app-strong"}`, wt = ({ page: t, pageCount: r, onChange: a, siblings: n = 1, className: s = "" }) => /* @__PURE__ */ e("nav", { "aria-label": "Pagination", className: s, children: /* @__PURE__ */ h("ul", { className: "m-0 flex list-none flex-wrap items-center gap-1 p-0", children: [
1082
- /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e("button", { type: "button", className: re(), disabled: t <= 1, onClick: () => a(t - 1), children: "Prev" }) }),
1083
- yt(t, r, n).map(
1084
- (l, o) => l === null ? /* @__PURE__ */ e("li", { "aria-hidden": "true", className: "px-1 text-app-muted", children: "…" }, `gap-${o}`) : /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(
1240
+ }, ue = (e = !1) => `min-h-9 min-w-9 border px-2 py-1.5 text-xs font-semibold tracking-widest transition disabled:cursor-not-allowed disabled:opacity-50 ${e ? "border-app-strong bg-app-strong text-app-bg" : "border-app-border bg-app-bg text-app-text hover:border-app-strong"}`, Ft = ({ page: e, pageCount: r, onChange: a, siblings: n = 1, className: s = "" }) => /* @__PURE__ */ t("nav", { "aria-label": "Pagination", className: s, children: /* @__PURE__ */ f("ul", { className: "m-0 flex list-none flex-wrap items-center gap-1 p-0", children: [
1241
+ /* @__PURE__ */ t("li", { children: /* @__PURE__ */ t("button", { type: "button", className: ue(), disabled: e <= 1, onClick: () => a(e - 1), children: "Prev" }) }),
1242
+ jt(e, r, n).map(
1243
+ (l, o) => l === null ? /* @__PURE__ */ t("li", { "aria-hidden": "true", className: "px-1 text-app-muted", children: "…" }, `gap-${o}`) : /* @__PURE__ */ t("li", { children: /* @__PURE__ */ t(
1085
1244
  "button",
1086
1245
  {
1087
1246
  type: "button",
1088
- className: re(l === t),
1089
- "aria-current": l === t ? "page" : void 0,
1247
+ className: ue(l === e),
1248
+ "aria-current": l === e ? "page" : void 0,
1090
1249
  "aria-label": `Page ${l}`,
1091
1250
  onClick: () => a(l),
1092
1251
  children: l
1093
1252
  }
1094
1253
  ) }, l)
1095
1254
  ),
1096
- /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e("button", { type: "button", className: re(), disabled: t >= r, onClick: () => a(t + 1), children: "Next" }) })
1097
- ] }) }), ve = { left: "text-left", center: "text-center", right: "text-right" }, kt = (t, r) => t == null ? r == null ? 0 : 1 : r == null ? -1 : typeof t == "number" && typeof r == "number" ? t - r : String(t).localeCompare(String(r), void 0, { numeric: !0, sensitivity: "base" }), ir = ({
1098
- columns: t,
1255
+ /* @__PURE__ */ t("li", { children: /* @__PURE__ */ t("button", { type: "button", className: ue(), disabled: e >= r, onClick: () => a(e + 1), children: "Next" }) })
1256
+ ] }) }), Ee = { left: "text-left", center: "text-center", right: "text-right" }, Bt = (e, r) => e == null ? r == null ? 0 : 1 : r == null ? -1 : typeof e == "number" && typeof r == "number" ? e - r : String(e).localeCompare(String(r), void 0, { numeric: !0, sensitivity: "base" }), Tr = ({
1257
+ columns: e,
1099
1258
  rows: r,
1100
1259
  rowKey: a = "id",
1101
1260
  pageSize: n = 10,
1102
1261
  searchable: s = !1,
1103
1262
  selectable: l = !1,
1104
1263
  selected: o,
1105
- onSelectionChange: c,
1106
- empty: i = "No results",
1264
+ onSelectionChange: i,
1265
+ empty: c = "No results",
1107
1266
  caption: u,
1108
- className: m = ""
1267
+ className: b = ""
1109
1268
  }) => {
1110
- const [d, f] = k(null), [b, x] = k(""), [p, g] = k(1), [y, C] = k([]), w = o ?? y, D = ($, I) => I.accessor ? I.accessor($) : $[I.key], v = $e(() => {
1111
- const $ = b.trim().toLowerCase();
1112
- let I = $ ? r.filter(
1113
- (W) => t.some(
1114
- (P) => String(D(W, P) ?? "").toLowerCase().includes($)
1269
+ const [d, p] = D(null), [m, g] = D(""), [h, x] = D(1), [v, N] = D([]), M = o ?? v, y = (k, $) => $.accessor ? $.accessor(k) : k[$.key], w = je(() => {
1270
+ const k = m.trim().toLowerCase();
1271
+ let $ = k ? r.filter(
1272
+ (R) => e.some(
1273
+ (F) => String(y(R, F) ?? "").toLowerCase().includes(k)
1115
1274
  )
1116
1275
  ) : r;
1117
1276
  if (d) {
1118
- const W = t.find((P) => P.key === d.key);
1119
- I = [...I].sort(
1120
- (P, ee) => kt(D(P, W), D(ee, W)) * (d.dir === "asc" ? 1 : -1)
1277
+ const R = e.find((F) => F.key === d.key);
1278
+ $ = [...$].sort(
1279
+ (F, E) => Bt(y(F, R), y(E, R)) * (d.dir === "asc" ? 1 : -1)
1121
1280
  );
1122
1281
  }
1123
- return I;
1124
- }, [r, t, b, d]), L = Math.max(1, Math.ceil(v.length / n)), M = Math.min(p, L), N = v.slice((M - 1) * n, M * n), A = ($) => {
1125
- o === void 0 && C($), c == null || c($);
1126
- }, F = N.map(($) => $[a]), j = F.length > 0 && F.every(($) => w.includes($)), z = F.some(($) => w.includes($)), O = ($) => {
1127
- g(1), f(
1128
- (I) => (I == null ? void 0 : I.key) !== $.key ? { key: $.key, dir: "asc" } : I.dir === "asc" ? { key: $.key, dir: "desc" } : null
1282
+ return $;
1283
+ }, [r, e, m, d]), C = Math.max(1, Math.ceil(w.length / n)), T = Math.min(h, C), L = w.slice((T - 1) * n, T * n), I = (k) => {
1284
+ o === void 0 && N(k), i == null || i(k);
1285
+ }, j = L.map((k) => k[a]), B = j.length > 0 && j.every((k) => M.includes(k)), z = j.some((k) => M.includes(k)), q = (k) => {
1286
+ x(1), p(
1287
+ ($) => ($ == null ? void 0 : $.key) !== k.key ? { key: k.key, dir: "asc" } : $.dir === "asc" ? { key: k.key, dir: "desc" } : null
1129
1288
  );
1130
1289
  };
1131
- return /* @__PURE__ */ h("div", { className: `flex flex-col gap-3 ${m}`, children: [
1132
- s && /* @__PURE__ */ e("div", { className: "max-w-xs", children: /* @__PURE__ */ e(
1133
- Pe,
1290
+ return /* @__PURE__ */ f("div", { className: `flex flex-col gap-3 ${b}`, children: [
1291
+ s && /* @__PURE__ */ t("div", { className: "max-w-xs", children: /* @__PURE__ */ t(
1292
+ Ze,
1134
1293
  {
1135
- value: b,
1136
- onChange: ($) => {
1137
- x($), g(1);
1294
+ value: m,
1295
+ onChange: (k) => {
1296
+ g(k), x(1);
1138
1297
  },
1139
1298
  placeholder: "Search…",
1140
1299
  "aria-label": "Search rows",
1141
1300
  type: "search"
1142
1301
  }
1143
1302
  ) }),
1144
- /* @__PURE__ */ e("div", { className: "overflow-x-auto border border-app-border", children: /* @__PURE__ */ h("table", { className: "w-full border-collapse bg-app-card text-sm text-app-text", children: [
1145
- u && /* @__PURE__ */ e("caption", { className: "sr-only", children: u }),
1146
- /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ h("tr", { className: "border-b border-app-border bg-app-bg", children: [
1147
- l && /* @__PURE__ */ e("th", { scope: "col", className: "w-10 px-4 py-2.5", children: /* @__PURE__ */ e(
1148
- be,
1303
+ /* @__PURE__ */ t("div", { className: "overflow-x-auto border border-app-border", children: /* @__PURE__ */ f("table", { className: "w-full border-collapse bg-app-card text-sm text-app-text", children: [
1304
+ u && /* @__PURE__ */ t("caption", { className: "sr-only", children: u }),
1305
+ /* @__PURE__ */ t("thead", { children: /* @__PURE__ */ f("tr", { className: "border-b border-app-border bg-app-bg", children: [
1306
+ l && /* @__PURE__ */ t("th", { scope: "col", className: "w-10 px-4 py-2.5", children: /* @__PURE__ */ t(
1307
+ Te,
1149
1308
  {
1150
1309
  "aria-label": "Select all rows on this page",
1151
- checked: j,
1152
- indeterminate: !j && z,
1153
- onChange: ($) => A(
1154
- $ ? [.../* @__PURE__ */ new Set([...w, ...F])] : w.filter((I) => !F.includes(I))
1310
+ checked: B,
1311
+ indeterminate: !B && z,
1312
+ onChange: (k) => I(
1313
+ k ? [.../* @__PURE__ */ new Set([...M, ...j])] : M.filter(($) => !j.includes($))
1155
1314
  )
1156
1315
  }
1157
1316
  ) }),
1158
- t.map(($) => {
1159
- const I = (d == null ? void 0 : d.key) === $.key;
1160
- return /* @__PURE__ */ e(
1317
+ e.map((k) => {
1318
+ const $ = (d == null ? void 0 : d.key) === k.key;
1319
+ return /* @__PURE__ */ t(
1161
1320
  "th",
1162
1321
  {
1163
1322
  scope: "col",
1164
- "aria-sort": I ? d.dir === "asc" ? "ascending" : "descending" : $.sortable ? "none" : void 0,
1165
- className: `px-4 py-2.5 text-xs font-semibold uppercase tracking-widest text-app-muted ${ve[$.align ?? "left"]}`,
1166
- children: $.sortable ? /* @__PURE__ */ h(
1323
+ "aria-sort": $ ? d.dir === "asc" ? "ascending" : "descending" : k.sortable ? "none" : void 0,
1324
+ className: `px-4 py-2.5 text-xs font-semibold uppercase tracking-widest text-app-muted ${Ee[k.align ?? "left"]}`,
1325
+ children: k.sortable ? /* @__PURE__ */ f(
1167
1326
  "button",
1168
1327
  {
1169
1328
  type: "button",
1170
- onClick: () => O($),
1171
- className: "inline-flex items-center gap-1 uppercase tracking-widest transition hover:text-app-text",
1329
+ onClick: () => q(k),
1330
+ className: "-my-2 inline-flex min-h-8 items-center gap-1 uppercase tracking-widest transition hover:text-app-text",
1172
1331
  children: [
1173
- $.header,
1174
- /* @__PURE__ */ e("span", { "aria-hidden": "true", children: I ? d.dir === "asc" ? "↑" : "↓" : "↕" })
1332
+ k.header,
1333
+ /* @__PURE__ */ t("span", { "aria-hidden": "true", children: $ ? d.dir === "asc" ? "↑" : "↓" : "↕" })
1175
1334
  ]
1176
1335
  }
1177
- ) : $.header
1336
+ ) : k.header
1178
1337
  },
1179
- $.key
1338
+ k.key
1180
1339
  );
1181
1340
  })
1182
1341
  ] }) }),
1183
- /* @__PURE__ */ e("tbody", { children: N.length === 0 ? /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e("td", { colSpan: t.length + (l ? 1 : 0), className: "px-4 py-6 text-center text-app-muted", children: i }) }) : N.map(($) => {
1184
- const I = $[a], W = w.includes(I);
1185
- return /* @__PURE__ */ h(
1342
+ /* @__PURE__ */ t("tbody", { children: L.length === 0 ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", { colSpan: e.length + (l ? 1 : 0), className: "px-4 py-6 text-center text-app-muted", children: c }) }) : L.map((k) => {
1343
+ const $ = k[a], R = M.includes($);
1344
+ return /* @__PURE__ */ f(
1186
1345
  "tr",
1187
1346
  {
1188
- "aria-selected": l ? W : void 0,
1189
- className: `border-b border-app-border last:border-b-0 hover:bg-app-bg ${W ? "bg-app-soft/10" : ""}`,
1347
+ "aria-selected": l ? R : void 0,
1348
+ className: `border-b border-app-border last:border-b-0 hover:bg-app-bg ${R ? "bg-app-soft/10" : ""}`,
1190
1349
  children: [
1191
- l && /* @__PURE__ */ e("td", { className: "px-4 py-2.5", children: /* @__PURE__ */ e(
1192
- be,
1350
+ l && /* @__PURE__ */ t("td", { className: "px-4 py-2.5", children: /* @__PURE__ */ t(
1351
+ Te,
1193
1352
  {
1194
- "aria-label": `Select row ${I}`,
1195
- checked: W,
1196
- onChange: (P) => A(P ? [...w, I] : w.filter((ee) => ee !== I))
1353
+ "aria-label": `Select row ${$}`,
1354
+ checked: R,
1355
+ onChange: (F) => I(F ? [...M, $] : M.filter((E) => E !== $))
1197
1356
  }
1198
1357
  ) }),
1199
- t.map((P) => /* @__PURE__ */ e("td", { className: `px-4 py-2.5 ${ve[P.align ?? "left"]}`, children: P.render ? P.render($) : $[P.key] }, P.key))
1358
+ e.map((F) => /* @__PURE__ */ t("td", { className: `px-4 py-2.5 ${Ee[F.align ?? "left"]}`, children: F.render ? F.render(k) : k[F.key] }, F.key))
1200
1359
  ]
1201
1360
  },
1202
- I
1361
+ $
1203
1362
  );
1204
1363
  }) })
1205
1364
  ] }) }),
1206
- /* @__PURE__ */ h("div", { className: "flex flex-wrap items-center justify-between gap-3 text-xs text-app-muted", children: [
1207
- /* @__PURE__ */ h("span", { "aria-live": "polite", children: [
1208
- v.length,
1365
+ /* @__PURE__ */ f("div", { className: "flex flex-wrap items-center justify-between gap-3 text-xs text-app-muted", children: [
1366
+ /* @__PURE__ */ f("span", { "aria-live": "polite", children: [
1367
+ w.length,
1209
1368
  " ",
1210
- v.length === 1 ? "row" : "rows",
1211
- l && w.length > 0 ? `, ${w.length} selected` : ""
1369
+ w.length === 1 ? "row" : "rows",
1370
+ l && M.length > 0 ? `, ${M.length} selected` : ""
1212
1371
  ] }),
1213
- L > 1 && /* @__PURE__ */ e(wt, { page: M, pageCount: L, onChange: g })
1372
+ C > 1 && /* @__PURE__ */ t(Ft, { page: T, pageCount: C, onChange: x })
1214
1373
  ] })
1215
1374
  ] });
1216
- }, de = (t, r, a) => {
1217
- const n = E(a);
1218
- T(() => {
1219
- n.current = a;
1220
- }), T(() => {
1221
- if (!t) return;
1222
- const s = (o) => {
1223
- var c;
1224
- (c = r.current) != null && c.contains(o.target) || n.current("outside");
1225
- }, l = (o) => {
1226
- o.key === "Escape" && n.current("escape");
1227
- };
1228
- return document.addEventListener("mousedown", s), document.addEventListener("keydown", l), () => {
1229
- document.removeEventListener("mousedown", s), document.removeEventListener("keydown", l);
1230
- };
1231
- }, [t, r]);
1232
- }, cr = ({ label: t, value: r, onChange: a, min: n, max: s, placeholder: l = "Select date", error: o, locale: c, weekStartsOn: i }) => {
1233
- const [u, m] = k(!1), d = E(null), f = S(), b = `${f}-error`;
1234
- return de(u, d, (x) => {
1235
- var p, g;
1236
- m(!1), x === "escape" && ((g = (p = d.current) == null ? void 0 : p.querySelector("button")) == null || g.focus());
1237
- }), /* @__PURE__ */ h("div", { ref: d, className: "relative flex flex-col gap-1", children: [
1238
- t && /* @__PURE__ */ e("label", { htmlFor: f, className: "text-xs font-semibold uppercase tracking-widest text-app-muted", children: t }),
1239
- /* @__PURE__ */ e(
1375
+ }, Dr = ({ label: e, value: r, onChange: a, min: n, max: s, placeholder: l = "Select date", error: o, locale: i, weekStartsOn: c }) => {
1376
+ const [u, b] = D(!1), d = A(null), p = A(null), m = A(null), g = O(), h = `${g}-error`;
1377
+ return V(u, [d, m], (x) => {
1378
+ var v, N;
1379
+ b(!1), x === "escape" && ((N = (v = d.current) == null ? void 0 : v.querySelector("button")) == null || N.focus());
1380
+ }), /* @__PURE__ */ f("div", { ref: d, className: "relative flex flex-col gap-1", children: [
1381
+ e && /* @__PURE__ */ t(U, { htmlFor: g, children: e }),
1382
+ /* @__PURE__ */ t(
1240
1383
  "button",
1241
1384
  {
1242
- id: f,
1385
+ ref: p,
1386
+ id: g,
1243
1387
  type: "button",
1244
1388
  "aria-haspopup": "dialog",
1245
1389
  "aria-expanded": u,
1246
1390
  "aria-invalid": !!o,
1247
- "aria-describedby": o ? b : void 0,
1248
- onClick: () => m((x) => !x),
1249
- className: `${Z(!!o)} text-left ${r ? "" : "text-app-muted"}`,
1250
- children: r ? ne(r, c) : l
1391
+ "aria-describedby": o ? h : void 0,
1392
+ onClick: () => b((x) => !x),
1393
+ className: `${se(!!o)} text-left ${r ? "" : "text-app-muted"}`,
1394
+ children: r ? be(r, i) : l
1251
1395
  }
1252
1396
  ),
1253
- u && /* @__PURE__ */ e(
1254
- "div",
1397
+ /* @__PURE__ */ t(
1398
+ X,
1255
1399
  {
1400
+ open: u,
1401
+ anchorRef: p,
1402
+ panelRef: m,
1403
+ placement: "bottom-start",
1256
1404
  role: "dialog",
1257
1405
  "aria-label": "Choose date",
1258
- className: "absolute left-0 top-full z-[var(--xd-z-tooltip,70)] mt-1 shadow-xl",
1259
- children: /* @__PURE__ */ e(
1260
- Se,
1406
+ className: "shadow-xl",
1407
+ children: /* @__PURE__ */ t(
1408
+ Ge,
1261
1409
  {
1262
1410
  value: r,
1263
1411
  min: n,
1264
1412
  max: s,
1265
- locale: c,
1266
- weekStartsOn: i,
1413
+ locale: i,
1414
+ weekStartsOn: c,
1267
1415
  onChange: (x) => {
1268
- var p, g;
1269
- a == null || a(x), m(!1), (g = (p = d.current) == null ? void 0 : p.querySelector("button")) == null || g.focus();
1416
+ var v, N;
1417
+ a == null || a(x), b(!1), (N = (v = d.current) == null ? void 0 : v.querySelector("button")) == null || N.focus();
1270
1418
  }
1271
1419
  }
1272
1420
  )
1273
1421
  }
1274
1422
  ),
1275
- o && /* @__PURE__ */ e("span", { id: b, className: "text-xs text-red-700 dark:text-red-400", children: o })
1423
+ o && /* @__PURE__ */ t("span", { id: h, className: "text-xs text-red-700 dark:text-red-400", children: o })
1276
1424
  ] });
1277
- }, dr = ({
1278
- label: t,
1425
+ }, Ar = ({
1426
+ label: e,
1279
1427
  value: r,
1280
1428
  onChange: a,
1281
1429
  min: n,
1282
1430
  max: s,
1283
1431
  placeholder: l = "Select range",
1284
1432
  error: o,
1285
- locale: c,
1286
- weekStartsOn: i
1433
+ locale: i,
1434
+ weekStartsOn: c
1287
1435
  }) => {
1288
- const [u, m] = k(!1), [d, f] = k(null), b = E(null), x = S(), p = `${x}-error`, g = () => {
1289
- m(!1), f(null);
1436
+ const [u, b] = D(!1), [d, p] = D(null), m = A(null), g = A(null), h = A(null), x = O(), v = `${x}-error`, N = () => {
1437
+ b(!1), p(null);
1290
1438
  };
1291
- de(u, b, (w) => {
1292
- var D, v;
1293
- g(), w === "escape" && ((v = (D = b.current) == null ? void 0 : D.querySelector("button")) == null || v.focus());
1439
+ V(u, [m, h], (w) => {
1440
+ var C, T;
1441
+ N(), w === "escape" && ((T = (C = m.current) == null ? void 0 : C.querySelector("button")) == null || T.focus());
1294
1442
  });
1295
- const y = (w) => {
1296
- var L, M;
1443
+ const M = (w) => {
1444
+ var L, I;
1297
1445
  if (!d) {
1298
- f(w), a == null || a({ start: w, end: null });
1446
+ p(w), a == null || a({ start: w, end: null });
1299
1447
  return;
1300
1448
  }
1301
- const [D, v] = U(w, d) ? [w, d] : [d, w];
1302
- a == null || a({ start: D, end: v }), g(), (M = (L = b.current) == null ? void 0 : L.querySelector("button")) == null || M.focus();
1303
- }, C = r != null && r.start ? `${ne(r.start, c)} – ${r.end ? ne(r.end, c) : "…"}` : "";
1304
- return /* @__PURE__ */ h("div", { ref: b, className: "relative flex flex-col gap-1", children: [
1305
- t && /* @__PURE__ */ e("label", { htmlFor: x, className: "text-xs font-semibold uppercase tracking-widest text-app-muted", children: t }),
1306
- /* @__PURE__ */ e(
1449
+ const [C, T] = te(w, d) ? [w, d] : [d, w];
1450
+ a == null || a({ start: C, end: T }), N(), (I = (L = m.current) == null ? void 0 : L.querySelector("button")) == null || I.focus();
1451
+ }, y = r != null && r.start ? `${be(r.start, i)} – ${r.end ? be(r.end, i) : "…"}` : "";
1452
+ return /* @__PURE__ */ f("div", { ref: m, className: "relative flex flex-col gap-1", children: [
1453
+ e && /* @__PURE__ */ t(U, { htmlFor: x, children: e }),
1454
+ /* @__PURE__ */ t(
1307
1455
  "button",
1308
1456
  {
1457
+ ref: g,
1309
1458
  id: x,
1310
1459
  type: "button",
1311
1460
  "aria-haspopup": "dialog",
1312
1461
  "aria-expanded": u,
1313
1462
  "aria-invalid": !!o,
1314
- "aria-describedby": o ? p : void 0,
1315
- onClick: () => u ? g() : m(!0),
1316
- className: `${Z(!!o)} text-left ${C ? "" : "text-app-muted"}`,
1317
- children: C || l
1463
+ "aria-describedby": o ? v : void 0,
1464
+ onClick: () => u ? N() : b(!0),
1465
+ className: `${se(!!o)} text-left ${y ? "" : "text-app-muted"}`,
1466
+ children: y || l
1318
1467
  }
1319
1468
  ),
1320
- u && /* @__PURE__ */ e(
1321
- "div",
1469
+ /* @__PURE__ */ t(
1470
+ X,
1322
1471
  {
1472
+ open: u,
1473
+ anchorRef: g,
1474
+ panelRef: h,
1475
+ placement: "bottom-start",
1323
1476
  role: "dialog",
1324
1477
  "aria-label": "Choose date range",
1325
- className: "absolute left-0 top-full z-[var(--xd-z-tooltip,70)] mt-1 shadow-xl",
1326
- children: /* @__PURE__ */ e(
1327
- Se,
1478
+ className: "shadow-xl",
1479
+ children: /* @__PURE__ */ t(
1480
+ Ge,
1328
1481
  {
1329
1482
  rangeStart: d ?? (r == null ? void 0 : r.start),
1330
1483
  rangeEnd: d ? null : r == null ? void 0 : r.end,
1331
1484
  min: n,
1332
1485
  max: s,
1333
- locale: c,
1334
- weekStartsOn: i,
1335
- onChange: y
1486
+ locale: i,
1487
+ weekStartsOn: c,
1488
+ onChange: M
1336
1489
  }
1337
1490
  )
1338
1491
  }
1339
1492
  ),
1340
- o && /* @__PURE__ */ e("span", { id: p, className: "text-xs text-red-700 dark:text-red-400", children: o })
1493
+ o && /* @__PURE__ */ t("span", { id: v, className: "text-xs text-red-700 dark:text-red-400", children: o })
1341
1494
  ] });
1342
- }, pr = ({ orientation: t = "horizontal", label: r, className: a = "" }) => t === "vertical" ? /* @__PURE__ */ e("div", { role: "separator", "aria-orientation": "vertical", className: `w-px self-stretch bg-app-border ${a}` }) : r ? /* @__PURE__ */ h("div", { role: "separator", className: `flex items-center gap-3 ${a}`, children: [
1343
- /* @__PURE__ */ e("span", { className: "h-px flex-1 bg-app-border" }),
1344
- /* @__PURE__ */ e("span", { className: "text-xs font-semibold uppercase tracking-widest text-app-muted", children: r }),
1345
- /* @__PURE__ */ e("span", { className: "h-px flex-1 bg-app-border" })
1346
- ] }) : /* @__PURE__ */ e("hr", { className: `border-0 border-t border-app-border ${a}` }), ur = ({
1347
- label: t,
1495
+ }, Er = ({ orientation: e = "horizontal", label: r, className: a = "" }) => e === "vertical" ? /* @__PURE__ */ t("div", { role: "separator", "aria-orientation": "vertical", className: `w-px self-stretch bg-app-border ${a}` }) : r ? /* @__PURE__ */ f("div", { role: "separator", className: `flex items-center gap-3 ${a}`, children: [
1496
+ /* @__PURE__ */ t("span", { className: "h-px flex-1 bg-app-border" }),
1497
+ /* @__PURE__ */ t(U, { children: r }),
1498
+ /* @__PURE__ */ t("span", { className: "h-px flex-1 bg-app-border" })
1499
+ ] }) : /* @__PURE__ */ t("hr", { className: `border-0 border-t border-app-border ${a}` }), Ir = ({
1500
+ label: e,
1348
1501
  value: r,
1349
1502
  onChange: a,
1350
1503
  placeholder: n,
1351
1504
  error: s,
1352
1505
  type: l = "text",
1353
1506
  autoComplete: o = "off",
1354
- required: c = !0,
1355
- ...i
1507
+ required: i = !0,
1508
+ ...c
1356
1509
  }) => {
1357
- const u = S(), m = `${u}-error`;
1358
- return /* @__PURE__ */ h("div", { className: "flex flex-col gap-1", children: [
1359
- /* @__PURE__ */ e("label", { htmlFor: u, className: "text-xs font-semibold uppercase tracking-widest text-app-muted", children: t }),
1360
- /* @__PURE__ */ e(
1510
+ const u = O(), b = `${u}-error`;
1511
+ return /* @__PURE__ */ f("div", { className: "flex flex-col gap-1", children: [
1512
+ /* @__PURE__ */ t(U, { htmlFor: u, children: e }),
1513
+ /* @__PURE__ */ t(
1361
1514
  "input",
1362
1515
  {
1363
1516
  id: u,
1364
1517
  type: l,
1365
1518
  autoComplete: o,
1366
- "aria-required": c,
1519
+ "aria-required": i,
1367
1520
  "aria-invalid": !!s,
1368
- "aria-describedby": s ? m : void 0,
1521
+ "aria-describedby": s ? b : void 0,
1369
1522
  className: `bg-app-bg border px-3 py-2 text-sm text-app-text placeholder:text-app-muted outline-none transition focus:ring-2 focus:ring-app-strong focus:border-app-strong ${s ? "border-red-500" : "border-app-border"}`,
1370
1523
  placeholder: n,
1371
1524
  value: r,
1372
1525
  onChange: (d) => a(d.target.value),
1373
- ...i
1526
+ ...c
1374
1527
  }
1375
1528
  ),
1376
- s && /* @__PURE__ */ e("span", { id: m, className: "text-xs text-red-700 dark:text-red-400", children: s })
1529
+ s && /* @__PURE__ */ t("span", { id: b, className: "text-xs text-red-700 dark:text-red-400", children: s })
1377
1530
  ] });
1378
- }, hr = ({
1379
- label: t = "Choose files or drop them here",
1531
+ }, Sr = ({
1532
+ label: e = "Choose files or drop them here",
1380
1533
  accept: r,
1381
1534
  multiple: a = !1,
1382
1535
  onChange: n,
1383
1536
  disabled: s = !1
1384
1537
  }) => {
1385
- const l = S(), [o, c] = k([]), [i, u] = k(!1), m = (d) => {
1386
- const f = [...d];
1387
- c(f), n == null || n(f);
1538
+ const l = O(), [o, i] = D([]), [c, u] = D(!1), b = (d) => {
1539
+ const p = [...d];
1540
+ i(p), n == null || n(p);
1388
1541
  };
1389
- return /* @__PURE__ */ h("div", { className: "flex flex-col gap-2", children: [
1390
- /* @__PURE__ */ h(
1542
+ return /* @__PURE__ */ f("div", { className: "flex flex-col gap-2", children: [
1543
+ /* @__PURE__ */ f(
1391
1544
  "label",
1392
1545
  {
1393
1546
  htmlFor: l,
@@ -1396,12 +1549,12 @@ const yt = (t, r, a) => {
1396
1549
  },
1397
1550
  onDragLeave: () => u(!1),
1398
1551
  onDrop: (d) => {
1399
- d.preventDefault(), u(!1), s || m(a ? d.dataTransfer.files : [d.dataTransfer.files[0]].filter(Boolean));
1552
+ d.preventDefault(), u(!1), s || b(a ? d.dataTransfer.files : [d.dataTransfer.files[0]].filter(Boolean));
1400
1553
  },
1401
- className: `flex flex-col items-center justify-center gap-1 border border-dashed px-4 py-8 text-center text-sm text-app-muted transition focus-within:ring-2 focus-within:ring-app-strong ${i ? "border-app-strong bg-app-soft/10" : "border-app-border bg-app-bg"} ${s ? "cursor-not-allowed opacity-50" : "cursor-pointer hover:border-app-strong"}`,
1554
+ className: `flex flex-col items-center justify-center gap-1 border border-dashed px-4 py-8 text-center text-sm text-app-muted transition focus-within:ring-2 focus-within:ring-app-strong ${c ? "border-app-strong bg-app-soft/10" : "border-app-border bg-app-bg"} ${s ? "cursor-not-allowed opacity-50" : "cursor-pointer hover:border-app-strong"}`,
1402
1555
  children: [
1403
- t,
1404
- /* @__PURE__ */ e(
1556
+ e,
1557
+ /* @__PURE__ */ t(
1405
1558
  "input",
1406
1559
  {
1407
1560
  id: l,
@@ -1410,50 +1563,50 @@ const yt = (t, r, a) => {
1410
1563
  multiple: a,
1411
1564
  disabled: s,
1412
1565
  className: "sr-only",
1413
- onChange: (d) => m(d.target.files)
1566
+ onChange: (d) => b(d.target.files)
1414
1567
  }
1415
1568
  )
1416
1569
  ]
1417
1570
  }
1418
1571
  ),
1419
- o.length > 0 && /* @__PURE__ */ e("ul", { className: "m-0 list-none p-0 text-xs text-app-soft", children: o.map((d) => /* @__PURE__ */ e("li", { children: d.name }, `${d.name}-${d.size}`)) })
1572
+ o.length > 0 && /* @__PURE__ */ t("ul", { className: "m-0 list-none p-0 text-xs text-app-soft", children: o.map((d) => /* @__PURE__ */ t("li", { children: d.name }, `${d.name}-${d.size}`)) })
1420
1573
  ] });
1421
- }, Nt = { 0: "gap-0", 1: "gap-1", 2: "gap-2", 3: "gap-3", 4: "gap-4", 6: "gap-6", 8: "gap-8" }, $t = { row: "flex-row", column: "flex-col" }, Mt = {
1574
+ }, Ot = { 0: "gap-0", 1: "gap-1", 2: "gap-2", 3: "gap-3", 4: "gap-4", 6: "gap-6", 8: "gap-8" }, Wt = { row: "flex-row", column: "flex-col" }, zt = {
1422
1575
  start: "items-start",
1423
1576
  center: "items-center",
1424
1577
  end: "items-end",
1425
1578
  stretch: "items-stretch",
1426
1579
  baseline: "items-baseline"
1427
- }, Lt = {
1580
+ }, qt = {
1428
1581
  start: "justify-start",
1429
1582
  center: "justify-center",
1430
1583
  end: "justify-end",
1431
1584
  between: "justify-between",
1432
1585
  around: "justify-around"
1433
- }, Ct = ({
1434
- direction: t = "row",
1586
+ }, Kt = ({
1587
+ direction: e = "row",
1435
1588
  gap: r = 3,
1436
1589
  align: a,
1437
1590
  justify: n,
1438
1591
  wrap: s = !1,
1439
1592
  inline: l = !1,
1440
1593
  className: o = "",
1441
- as: c = "div",
1442
- children: i,
1594
+ as: i = "div",
1595
+ children: c,
1443
1596
  ...u
1444
- }) => /* @__PURE__ */ e(
1445
- c,
1597
+ }) => /* @__PURE__ */ t(
1598
+ i,
1446
1599
  {
1447
- className: `${l ? "inline-flex" : "flex"} ${$t[t]} ${Nt[r]} ${a ? Mt[a] : ""} ${n ? Lt[n] : ""} ${s ? "flex-wrap" : ""} ${o}`,
1600
+ className: `${l ? "inline-flex" : "flex"} ${Wt[e]} ${Ot[r]} ${a ? zt[a] : ""} ${n ? qt[n] : ""} ${s ? "flex-wrap" : ""} ${o}`,
1448
1601
  ...u,
1449
- children: i
1602
+ children: c
1450
1603
  }
1451
- ), mr = ({ active: t = !0, className: r = "", children: a, ...n }) => {
1452
- const s = E(null);
1453
- return X(t, s), /* @__PURE__ */ e("div", { ref: s, tabIndex: -1, className: r, ...n, children: a });
1454
- }, Dt = { square: "aspect-square", video: "aspect-video", photo: "aspect-[4/3]" }, fr = ({ src: t, alt: r, ratio: a, fit: n = "cover", fallback: s = "Image unavailable", className: l = "", ...o }) => {
1455
- const [c, i] = k(!1), u = `${a ? Dt[a] : ""} ${l}`;
1456
- return c ? /* @__PURE__ */ e(
1604
+ ), Pr = ({ active: e = !0, className: r = "", children: a, ...n }) => {
1605
+ const s = A(null);
1606
+ return ie(e, s), /* @__PURE__ */ t("div", { ref: s, tabIndex: -1, className: r, ...n, children: a });
1607
+ }, Rr = ({ as: e = "p", className: r = "", children: a, ...n }) => /* @__PURE__ */ t(e, { className: `m-0 text-xs text-app-muted ${r}`, ...n, children: a }), _t = { square: "aspect-square", video: "aspect-video", photo: "aspect-[4/3]" }, jr = ({ src: e, alt: r, ratio: a, fit: n = "cover", fallback: s = "Image unavailable", className: l = "", ...o }) => {
1608
+ const [i, c] = D(!1), u = `${a ? _t[a] : ""} ${l}`;
1609
+ return i ? /* @__PURE__ */ t(
1457
1610
  "div",
1458
1611
  {
1459
1612
  role: "img",
@@ -1461,27 +1614,27 @@ const yt = (t, r, a) => {
1461
1614
  className: `flex items-center justify-center border border-app-border bg-app-bg p-4 text-xs text-app-muted ${u}`,
1462
1615
  children: s
1463
1616
  }
1464
- ) : /* @__PURE__ */ e(
1617
+ ) : /* @__PURE__ */ t(
1465
1618
  "img",
1466
1619
  {
1467
- src: t,
1620
+ src: e,
1468
1621
  alt: r,
1469
1622
  loading: "lazy",
1470
- onError: () => i(!0),
1623
+ onError: () => c(!0),
1471
1624
  className: `block w-full ${n === "contain" ? "object-contain" : "object-cover"} ${u}`,
1472
1625
  ...o
1473
1626
  }
1474
1627
  );
1475
- }, br = ({ items: t, divided: r = !0, className: a = "" }) => /* @__PURE__ */ e("ul", { className: `m-0 list-none border border-app-border bg-app-card p-0 ${a}`, children: t.map((n) => {
1476
- const s = /* @__PURE__ */ h(Y, { children: [
1477
- n.leading && /* @__PURE__ */ e("span", { className: "shrink-0", children: n.leading }),
1478
- /* @__PURE__ */ h("span", { className: "min-w-0 flex-1 text-left", children: [
1479
- /* @__PURE__ */ e("span", { className: "block truncate text-sm text-app-text", children: n.primary }),
1480
- n.secondary && /* @__PURE__ */ e("span", { className: "block truncate text-xs text-app-muted", children: n.secondary })
1628
+ }, Fr = ({ items: e, divided: r = !0, className: a = "" }) => /* @__PURE__ */ t("ul", { className: `m-0 list-none border border-app-border bg-app-card p-0 ${a}`, children: e.map((n) => {
1629
+ const s = /* @__PURE__ */ f(re, { children: [
1630
+ n.leading && /* @__PURE__ */ t("span", { className: "shrink-0", children: n.leading }),
1631
+ /* @__PURE__ */ f("span", { className: "min-w-0 flex-1 text-left", children: [
1632
+ /* @__PURE__ */ t("span", { className: "block truncate text-sm text-app-text", children: n.primary }),
1633
+ n.secondary && /* @__PURE__ */ t("span", { className: "block truncate text-xs text-app-muted", children: n.secondary })
1481
1634
  ] }),
1482
- n.trailing && /* @__PURE__ */ e("span", { className: "shrink-0 text-xs text-app-muted", children: n.trailing })
1635
+ n.trailing && /* @__PURE__ */ t("span", { className: "shrink-0 text-xs text-app-muted", children: n.trailing })
1483
1636
  ] });
1484
- return /* @__PURE__ */ e("li", { className: r ? "border-b border-app-border last:border-b-0" : "", children: n.onClick ? /* @__PURE__ */ e(
1637
+ return /* @__PURE__ */ t("li", { className: r ? "border-b border-app-border last:border-b-0" : "", children: n.onClick ? /* @__PURE__ */ t(
1485
1638
  "button",
1486
1639
  {
1487
1640
  type: "button",
@@ -1489,9 +1642,9 @@ const yt = (t, r, a) => {
1489
1642
  className: "flex w-full items-center gap-3 px-4 py-3 transition hover:bg-app-bg",
1490
1643
  children: s
1491
1644
  }
1492
- ) : /* @__PURE__ */ e("div", { className: "flex items-center gap-3 px-4 py-3", children: s }) }, n.key);
1493
- }) }), Et = ({
1494
- children: t,
1645
+ ) : /* @__PURE__ */ t("div", { className: "flex items-center gap-3 px-4 py-3", children: s }) }, n.key);
1646
+ }) }), Ut = ({
1647
+ children: e,
1495
1648
  maxWidth: r = "max-w-5xl",
1496
1649
  centerContent: a = !1,
1497
1650
  themeToggle: n = !1,
@@ -1499,51 +1652,39 @@ const yt = (t, r, a) => {
1499
1652
  innerClassName: l = ""
1500
1653
  }) => {
1501
1654
  const o = a ? "flex flex-1 items-center justify-center" : "";
1502
- return /* @__PURE__ */ h("main", { className: `relative flex flex-1 flex-col bg-app-bg px-4 py-8 sm:py-10 ${s}`, children: [
1503
- n && /* @__PURE__ */ e("div", { className: "absolute right-4 top-4", children: /* @__PURE__ */ e(De, {}) }),
1504
- /* @__PURE__ */ e("div", { className: `mx-auto w-full ${r} ${o} ${l}`, children: t })
1655
+ return /* @__PURE__ */ f("main", { className: `relative flex flex-1 flex-col bg-app-bg px-4 py-8 sm:py-10 ${s}`, children: [
1656
+ n && /* @__PURE__ */ t("div", { className: "absolute right-4 top-4", children: /* @__PURE__ */ t(ze, {}) }),
1657
+ /* @__PURE__ */ t("div", { className: `mx-auto w-full ${r} ${o} ${l}`, children: e })
1505
1658
  ] });
1506
- }, xr = () => /* @__PURE__ */ e(Et, { maxWidth: "max-w-sm", centerContent: !0, children: /* @__PURE__ */ e(je, { label: "Loading" }) }), gr = ({
1507
- brand: t,
1659
+ }, Br = () => /* @__PURE__ */ t(Ut, { maxWidth: "max-w-sm", centerContent: !0, children: /* @__PURE__ */ t(Ye, { label: "Loading" }) }), Or = ({
1660
+ brand: e,
1508
1661
  links: r = [],
1509
1662
  actions: a,
1510
1663
  linkComponent: n = "a",
1511
1664
  linkProp: s = "href",
1512
1665
  label: l = "Main",
1513
1666
  className: o = ""
1514
- }) => /* @__PURE__ */ h(
1667
+ }) => /* @__PURE__ */ f(
1515
1668
  "nav",
1516
1669
  {
1517
1670
  "aria-label": l,
1518
1671
  className: `flex flex-wrap items-center gap-x-6 gap-y-2 border-b border-app-border bg-app-card px-4 py-3 ${o}`,
1519
1672
  children: [
1520
- t && /* @__PURE__ */ e("div", { className: "text-sm font-bold tracking-tight text-app-text", children: t }),
1521
- /* @__PURE__ */ e("ul", { className: "m-0 flex flex-1 list-none flex-wrap items-center gap-1 p-0", children: r.map(({ href: c, label: i, active: u, ...m }) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(
1673
+ e && /* @__PURE__ */ t("div", { className: "text-sm font-bold tracking-tight text-app-text", children: e }),
1674
+ /* @__PURE__ */ t("ul", { className: "m-0 flex flex-1 list-none flex-wrap items-center gap-1 p-0", children: r.map(({ href: i, label: c, active: u, ...b }) => /* @__PURE__ */ t("li", { children: /* @__PURE__ */ t(
1522
1675
  n,
1523
1676
  {
1524
- [s]: c,
1677
+ [s]: i,
1525
1678
  "aria-current": u ? "page" : void 0,
1526
1679
  className: `px-2.5 py-1.5 text-xs font-semibold uppercase tracking-widest transition ${u ? "bg-app-strong text-app-bg" : "text-app-muted hover:text-app-text"}`,
1527
- ...m,
1528
- children: i
1680
+ ...b,
1681
+ children: c
1529
1682
  }
1530
- ) }, i)) }),
1531
- a && /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: a })
1683
+ ) }, c)) }),
1684
+ a && /* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: a })
1532
1685
  ]
1533
1686
  }
1534
- ), ye = 8, Be = (t, r, a) => {
1535
- const [n, s] = k(!1);
1536
- return Ne(() => {
1537
- if (!t) {
1538
- s(!1);
1539
- return;
1540
- }
1541
- const l = r.current;
1542
- if (!l) return;
1543
- const o = l.getBoundingClientRect(), c = document.documentElement.clientWidth, i = a === "end" ? o.left < ye : o.right > c - ye;
1544
- s(i);
1545
- }, [t, r, a]), n ? a === "end" ? "start" : "end" : a;
1546
- }, Tt = () => /* @__PURE__ */ e(
1687
+ ), Gt = () => /* @__PURE__ */ t(
1547
1688
  "svg",
1548
1689
  {
1549
1690
  "aria-hidden": "true",
@@ -1553,7 +1694,7 @@ const yt = (t, r, a) => {
1553
1694
  fill: "none",
1554
1695
  stroke: "currentColor",
1555
1696
  strokeWidth: "1.8",
1556
- children: /* @__PURE__ */ e(
1697
+ children: /* @__PURE__ */ t(
1557
1698
  "path",
1558
1699
  {
1559
1700
  strokeLinecap: "round",
@@ -1562,8 +1703,8 @@ const yt = (t, r, a) => {
1562
1703
  }
1563
1704
  )
1564
1705
  }
1565
- ), vr = ({
1566
- notifications: t,
1706
+ ), Wr = ({
1707
+ notifications: e,
1567
1708
  onSelect: r,
1568
1709
  onMarkRead: a,
1569
1710
  onMarkAllRead: n,
@@ -1571,46 +1712,49 @@ const yt = (t, r, a) => {
1571
1712
  empty: l = "You are all caught up",
1572
1713
  align: o = "end"
1573
1714
  }) => {
1574
- const [c, i] = k(!1), u = E(null), m = E(null), d = Be(c, m, o), f = S(), b = t.filter((x) => !x.read).length;
1575
- return de(c, u, (x) => {
1576
- var p, g;
1577
- i(!1), x === "escape" && ((g = (p = u.current) == null ? void 0 : p.querySelector("button")) == null || g.focus());
1578
- }), /* @__PURE__ */ h("div", { ref: u, className: "relative inline-block", children: [
1579
- /* @__PURE__ */ e(
1580
- R,
1715
+ const [i, c] = D(!1), u = A(null), b = A(null), d = O(), p = e.filter((m) => !m.read).length;
1716
+ return V(i, [u, b], (m) => {
1717
+ var g, h;
1718
+ c(!1), m === "escape" && ((h = (g = u.current) == null ? void 0 : g.querySelector("button")) == null || h.focus());
1719
+ }), /* @__PURE__ */ f("div", { ref: u, className: "relative inline-block", children: [
1720
+ /* @__PURE__ */ t(
1721
+ H,
1581
1722
  {
1582
1723
  variant: "secondary",
1583
- "aria-label": b ? `Notifications, ${b} unread` : "Notifications",
1724
+ "aria-label": p ? `Notifications, ${p} unread` : "Notifications",
1584
1725
  "aria-haspopup": "dialog",
1585
- "aria-expanded": c,
1586
- "aria-controls": c ? f : void 0,
1587
- onClick: () => i((x) => !x),
1588
- children: /* @__PURE__ */ h("span", { className: "relative inline-flex", children: [
1589
- /* @__PURE__ */ e(Tt, {}),
1590
- b > 0 && /* @__PURE__ */ e(
1726
+ "aria-expanded": i,
1727
+ "aria-controls": i ? d : void 0,
1728
+ onClick: () => c((m) => !m),
1729
+ children: /* @__PURE__ */ f("span", { className: "relative inline-flex", children: [
1730
+ /* @__PURE__ */ t(Gt, {}),
1731
+ p > 0 && /* @__PURE__ */ t(
1591
1732
  "span",
1592
1733
  {
1593
1734
  "aria-hidden": "true",
1594
1735
  className: "absolute -right-2 -top-2 min-w-[1rem] bg-red-500 px-1 text-center text-[10px] font-bold leading-4 text-white",
1595
- children: b > 9 ? "9+" : b
1736
+ children: p > 9 ? "9+" : p
1596
1737
  }
1597
1738
  )
1598
1739
  ] })
1599
1740
  }
1600
1741
  ),
1601
- c && /* @__PURE__ */ h(
1602
- "div",
1742
+ /* @__PURE__ */ f(
1743
+ X,
1603
1744
  {
1604
- ref: m,
1605
- id: f,
1745
+ open: i,
1746
+ anchorRef: u,
1747
+ panelRef: b,
1748
+ placement: `bottom-${o}`,
1749
+ id: d,
1606
1750
  role: "dialog",
1607
1751
  "aria-label": "Notifications",
1608
- className: `absolute top-full z-[var(--xd-z-tooltip,70)] mt-1 flex max-h-96 w-80 max-w-[calc(100vw-2rem)] flex-col border border-app-border bg-app-card shadow-xl ${d === "end" ? "right-0" : "left-0"}`,
1752
+ className: "flex max-h-96 w-80 max-w-[calc(100vw-1rem)] flex-col border border-app-border bg-app-card shadow-xl",
1609
1753
  children: [
1610
- /* @__PURE__ */ h("div", { className: "flex items-center justify-between gap-2 border-b border-app-border px-4 py-2.5", children: [
1611
- /* @__PURE__ */ e("span", { className: "text-xs font-semibold uppercase tracking-widest text-app-text", children: "Notifications" }),
1612
- /* @__PURE__ */ h("span", { className: "flex gap-3 text-xs", children: [
1613
- n && b > 0 && /* @__PURE__ */ e(
1754
+ /* @__PURE__ */ f("div", { className: "flex items-center justify-between gap-2 border-b border-app-border px-4 py-2.5", children: [
1755
+ /* @__PURE__ */ t("span", { className: "text-xs font-semibold uppercase tracking-widest text-app-text", children: "Notifications" }),
1756
+ /* @__PURE__ */ f("span", { className: "flex gap-3 text-xs", children: [
1757
+ n && p > 0 && /* @__PURE__ */ t(
1614
1758
  "button",
1615
1759
  {
1616
1760
  type: "button",
@@ -1619,7 +1763,7 @@ const yt = (t, r, a) => {
1619
1763
  children: "Mark all read"
1620
1764
  }
1621
1765
  ),
1622
- s && t.length > 0 && /* @__PURE__ */ e(
1766
+ s && e.length > 0 && /* @__PURE__ */ t(
1623
1767
  "button",
1624
1768
  {
1625
1769
  type: "button",
@@ -1630,76 +1774,76 @@ const yt = (t, r, a) => {
1630
1774
  )
1631
1775
  ] })
1632
1776
  ] }),
1633
- t.length === 0 ? /* @__PURE__ */ e("p", { className: "m-0 px-4 py-8 text-center text-sm text-app-muted", children: l }) : /* @__PURE__ */ e("ul", { className: "m-0 flex-1 list-none overflow-y-auto p-0", children: t.map((x) => /* @__PURE__ */ e("li", { className: "border-b border-app-border last:border-b-0", children: /* @__PURE__ */ h(
1777
+ e.length === 0 ? /* @__PURE__ */ t("p", { className: "m-0 px-4 py-8 text-center text-sm text-app-muted", children: l }) : /* @__PURE__ */ t("ul", { className: "m-0 flex-1 list-none overflow-y-auto p-0", children: e.map((m) => /* @__PURE__ */ t("li", { className: "border-b border-app-border last:border-b-0", children: /* @__PURE__ */ f(
1634
1778
  "button",
1635
1779
  {
1636
1780
  type: "button",
1637
1781
  onClick: () => {
1638
- x.read || a == null || a(x.id), r == null || r(x);
1782
+ m.read || a == null || a(m.id), r == null || r(m);
1639
1783
  },
1640
1784
  className: "flex w-full items-start gap-3 px-4 py-3 text-left transition hover:bg-app-bg",
1641
1785
  children: [
1642
- /* @__PURE__ */ e(
1786
+ /* @__PURE__ */ t(
1643
1787
  "span",
1644
1788
  {
1645
1789
  "aria-hidden": "true",
1646
- className: `mt-1.5 h-2 w-2 shrink-0 ${x.read ? "bg-transparent" : "bg-red-500"}`
1790
+ className: `mt-1.5 h-2 w-2 shrink-0 ${m.read ? "bg-transparent" : "bg-red-500"}`
1647
1791
  }
1648
1792
  ),
1649
- /* @__PURE__ */ h("span", { className: "min-w-0 flex-1", children: [
1650
- /* @__PURE__ */ e("span", { className: `block text-sm text-app-text ${x.read ? "" : "font-semibold"}`, children: x.title }),
1651
- x.body && /* @__PURE__ */ e("span", { className: "block text-xs text-app-muted", children: x.body }),
1652
- x.time && /* @__PURE__ */ e("span", { className: "mt-0.5 block text-[10px] uppercase tracking-widest text-app-muted", children: x.time })
1793
+ /* @__PURE__ */ f("span", { className: "min-w-0 flex-1", children: [
1794
+ /* @__PURE__ */ t("span", { className: `block text-sm text-app-text ${m.read ? "" : "font-semibold"}`, children: m.title }),
1795
+ m.body && /* @__PURE__ */ t("span", { className: "block text-xs text-app-muted", children: m.body }),
1796
+ m.time && /* @__PURE__ */ t("span", { className: "mt-0.5 block text-[10px] uppercase tracking-widest text-app-muted", children: m.time })
1653
1797
  ] }),
1654
- !x.read && /* @__PURE__ */ e("span", { className: "sr-only", children: "Unread" })
1798
+ !m.read && /* @__PURE__ */ t("span", { className: "sr-only", children: "Unread" })
1655
1799
  ]
1656
1800
  }
1657
- ) }, x.id)) })
1801
+ ) }, m.id)) })
1658
1802
  ]
1659
1803
  }
1660
1804
  )
1661
1805
  ] });
1662
- }, q = 240, _ = 100, V = (t, r) => [q / 2 + r * Math.sin(t), q / 2 - r * Math.cos(t)], le = (t, r, a) => {
1663
- if (r - t >= Math.PI * 2 - 1e-6) {
1664
- const f = t + Math.PI;
1665
- return `${le(t, f, a)} ${le(f, t + Math.PI * 2 - 1e-4, a)}`;
1806
+ }, zr = ({ as: e = "h1", className: r = "", children: a, ...n }) => /* @__PURE__ */ t(e, { className: `m-0 text-2xl font-bold tracking-tight text-app-text sm:text-3xl ${r}`, ...n, children: a }), Z = 240, Q = 100, oe = (e, r) => [Z / 2 + r * Math.sin(e), Z / 2 - r * Math.cos(e)], ge = (e, r, a) => {
1807
+ if (r - e >= Math.PI * 2 - 1e-6) {
1808
+ const p = e + Math.PI;
1809
+ return `${ge(e, p, a)} ${ge(p, e + Math.PI * 2 - 1e-4, a)}`;
1666
1810
  }
1667
- const n = r - t > Math.PI ? 1 : 0, [s, l] = V(t, _), [o, c] = V(r, _);
1668
- if (!a) return `M${q / 2},${q / 2} L${s},${l} A${_},${_} 0 ${n} 1 ${o},${c} Z`;
1669
- const [i, u] = V(r, a), [m, d] = V(t, a);
1670
- return `M${s},${l} A${_},${_} 0 ${n} 1 ${o},${c} L${i},${u} A${a},${a} 0 ${n} 0 ${m},${d} Z`;
1671
- }, yr = ({ data: t, donut: r = !1, center: a, label: n = "Pie chart", className: s = "" }) => {
1672
- const l = t.reduce((i, u) => i + u.value, 0);
1811
+ const n = r - e > Math.PI ? 1 : 0, [s, l] = oe(e, Q), [o, i] = oe(r, Q);
1812
+ if (!a) return `M${Z / 2},${Z / 2} L${s},${l} A${Q},${Q} 0 ${n} 1 ${o},${i} Z`;
1813
+ const [c, u] = oe(r, a), [b, d] = oe(e, a);
1814
+ return `M${s},${l} A${Q},${Q} 0 ${n} 1 ${o},${i} L${c},${u} A${a},${a} 0 ${n} 0 ${b},${d} Z`;
1815
+ }, qr = ({ data: e, donut: r = !1, center: a, label: n = "Pie chart", className: s = "" }) => {
1816
+ const l = e.reduce((c, u) => c + u.value, 0);
1673
1817
  let o = 0;
1674
- const c = t.filter((i) => i.value > 0).map((i, u) => {
1675
- const m = o;
1676
- return o += i.value / l * Math.PI * 2, { ...i, start: m, end: o, color: J(i, u) };
1818
+ const i = e.filter((c) => c.value > 0).map((c, u) => {
1819
+ const b = o;
1820
+ return o += c.value / l * Math.PI * 2, { ...c, start: b, end: o, color: ce(c, u) };
1677
1821
  });
1678
- return /* @__PURE__ */ h("figure", { className: `m-0 ${s}`, children: [
1679
- /* @__PURE__ */ h(
1822
+ return /* @__PURE__ */ f("figure", { className: `m-0 ${s}`, children: [
1823
+ /* @__PURE__ */ f(
1680
1824
  "svg",
1681
1825
  {
1682
1826
  role: "img",
1683
1827
  "aria-label": n,
1684
- viewBox: `0 0 ${q} ${q}`,
1828
+ viewBox: `0 0 ${Z} ${Z}`,
1685
1829
  className: "mx-auto block h-auto w-full max-w-xs",
1686
1830
  children: [
1687
- c.map((i) => /* @__PURE__ */ e(
1831
+ i.map((c) => /* @__PURE__ */ t(
1688
1832
  "path",
1689
1833
  {
1690
- d: le(i.start, i.end, r ? _ * 0.6 : 0),
1691
- fill: i.color,
1834
+ d: ge(c.start, c.end, r ? Q * 0.6 : 0),
1835
+ fill: c.color,
1692
1836
  stroke: "rgb(var(--color-app-card))",
1693
1837
  strokeWidth: "2",
1694
- children: /* @__PURE__ */ e("title", { children: `${i.label}: ${i.value} (${Math.round(i.value / l * 100)}%)` })
1838
+ children: /* @__PURE__ */ t("title", { children: `${c.label}: ${c.value} (${Math.round(c.value / l * 100)}%)` })
1695
1839
  },
1696
- i.label
1840
+ c.label
1697
1841
  )),
1698
- r && a && /* @__PURE__ */ e(
1842
+ r && a && /* @__PURE__ */ t(
1699
1843
  "text",
1700
1844
  {
1701
- x: q / 2,
1702
- y: q / 2,
1845
+ x: Z / 2,
1846
+ y: Z / 2,
1703
1847
  textAnchor: "middle",
1704
1848
  dominantBaseline: "middle",
1705
1849
  fontSize: "20",
@@ -1711,58 +1855,52 @@ const yt = (t, r, a) => {
1711
1855
  ]
1712
1856
  }
1713
1857
  ),
1714
- /* @__PURE__ */ e(ce, { items: c.map((i) => ({ name: i.label, color: i.color })) })
1858
+ /* @__PURE__ */ t(ke, { items: i.map((c) => ({ name: c.label, color: c.color })) })
1715
1859
  ] });
1716
- }, wr = ({ trigger: t, label: r, variant: a = "secondary", align: n = "start", className: s = "", children: l }) => {
1717
- const [o, c] = k(!1), i = E(null), u = E(null), m = Be(o, u, n), d = S();
1718
- return T(() => {
1719
- if (!o) return;
1720
- const f = (x) => {
1721
- var p;
1722
- (p = i.current) != null && p.contains(x.target) || c(!1);
1723
- }, b = (x) => {
1724
- var p, g;
1725
- x.key === "Escape" && (c(!1), (g = (p = i.current) == null ? void 0 : p.querySelector("button")) == null || g.focus());
1726
- };
1727
- return document.addEventListener("mousedown", f), document.addEventListener("keydown", b), () => {
1728
- document.removeEventListener("mousedown", f), document.removeEventListener("keydown", b);
1729
- };
1730
- }, [o]), /* @__PURE__ */ h("div", { ref: i, className: "relative inline-block", children: [
1731
- /* @__PURE__ */ e(
1732
- R,
1860
+ }, Kr = ({ trigger: e, label: r, variant: a = "secondary", align: n = "start", placement: s, className: l = "", children: o }) => {
1861
+ const [i, c] = D(!1), u = A(null), b = A(null), d = O();
1862
+ return V(i, [u, b], (p) => {
1863
+ var m, g;
1864
+ c(!1), p === "escape" && ((g = (m = u.current) == null ? void 0 : m.querySelector("button")) == null || g.focus());
1865
+ }), /* @__PURE__ */ f("div", { ref: u, className: "relative inline-block", children: [
1866
+ /* @__PURE__ */ t(
1867
+ H,
1733
1868
  {
1734
1869
  variant: a,
1735
1870
  "aria-label": r,
1736
1871
  "aria-haspopup": "dialog",
1737
- "aria-expanded": o,
1738
- "aria-controls": o ? d : void 0,
1739
- onClick: () => c((f) => !f),
1740
- children: t
1872
+ "aria-expanded": i,
1873
+ "aria-controls": i ? d : void 0,
1874
+ onClick: () => c((p) => !p),
1875
+ children: e
1741
1876
  }
1742
1877
  ),
1743
- o && /* @__PURE__ */ e(
1744
- "div",
1878
+ /* @__PURE__ */ t(
1879
+ X,
1745
1880
  {
1746
- ref: u,
1881
+ open: i,
1882
+ anchorRef: u,
1883
+ panelRef: b,
1884
+ placement: s ?? `bottom-${n}`,
1747
1885
  id: d,
1748
1886
  role: "dialog",
1749
1887
  "aria-label": r,
1750
- className: `absolute top-full z-[var(--xd-z-tooltip,70)] mt-1 min-w-[12rem] border border-app-border bg-app-card p-4 text-sm text-app-text shadow-xl ${m === "end" ? "right-0" : "left-0"} ${s}`,
1751
- children: l
1888
+ className: `min-w-[12rem] max-w-[calc(100vw-1rem)] border border-app-border bg-app-card p-4 text-sm text-app-text shadow-xl ${l}`,
1889
+ children: o
1752
1890
  }
1753
1891
  )
1754
1892
  ] });
1755
- }, kr = ({ children: t, container: r }) => H(t, r ?? document.body), Nr = ({ value: t, label: r, showValue: a = !1, className: n = "" }) => {
1756
- const s = t === void 0, l = s ? 0 : Math.min(100, Math.max(0, t));
1757
- return /* @__PURE__ */ h("div", { className: `flex flex-col gap-1 ${n}`, children: [
1758
- (r || a && !s) && /* @__PURE__ */ h("div", { className: "flex items-center justify-between text-xs font-semibold uppercase tracking-widest text-app-muted", children: [
1759
- /* @__PURE__ */ e("span", { children: r }),
1760
- a && !s && /* @__PURE__ */ h("span", { className: "text-app-text", children: [
1893
+ }, _r = ({ children: e, container: r }) => ae(e, r ?? document.body), Ur = ({ value: e, label: r, showValue: a = !1, className: n = "" }) => {
1894
+ const s = e === void 0, l = s ? 0 : Math.min(100, Math.max(0, e));
1895
+ return /* @__PURE__ */ f("div", { className: `flex flex-col gap-1 ${n}`, children: [
1896
+ (r || a && !s) && /* @__PURE__ */ f("div", { className: "flex items-center justify-between gap-2", children: [
1897
+ /* @__PURE__ */ t(U, { children: r }),
1898
+ a && !s && /* @__PURE__ */ f("span", { className: "text-xs font-semibold uppercase tracking-widest text-app-text", children: [
1761
1899
  Math.round(l),
1762
1900
  "%"
1763
1901
  ] })
1764
1902
  ] }),
1765
- /* @__PURE__ */ e(
1903
+ /* @__PURE__ */ t(
1766
1904
  "div",
1767
1905
  {
1768
1906
  role: "progressbar",
@@ -1771,11 +1909,11 @@ const yt = (t, r, a) => {
1771
1909
  "aria-valuemax": 100,
1772
1910
  "aria-valuenow": s ? void 0 : Math.round(l),
1773
1911
  className: "relative h-1.5 w-full overflow-hidden bg-app-border",
1774
- children: s ? /* @__PURE__ */ e("div", { className: "absolute inset-y-0 w-2/5 animate-indeterminate bg-app-strong" }) : /* @__PURE__ */ e("div", { className: "h-full bg-app-strong transition-all", style: { width: `${l}%` } })
1912
+ children: s ? /* @__PURE__ */ t("div", { className: "absolute inset-y-0 w-2/5 animate-indeterminate bg-app-strong" }) : /* @__PURE__ */ t("div", { className: "h-full bg-app-strong transition-all", style: { width: `${l}%` } })
1775
1913
  }
1776
1914
  )
1777
1915
  ] });
1778
- }, It = `
1916
+ }, Ht = `
1779
1917
  @keyframes rs-blink {
1780
1918
  0%,45% { fill:rgb(var(--color-app-card)); filter:drop-shadow(0 0 0 transparent); }
1781
1919
  50%,55% { fill:#00e676; filter:drop-shadow(0 0 6px #00e676); }
@@ -1808,25 +1946,25 @@ const yt = (t, r, a) => {
1808
1946
  .rs-fan-hub { fill:rgb(var(--color-app-soft)); }
1809
1947
  .rs-fan-ring { fill:none; stroke:rgb(var(--color-app-border)); stroke-width:1.5; }
1810
1948
  .rs-glow { animation: rs-glow-pulse 3s infinite ease-in-out; }
1811
- `, At = 720, St = 540, $r = () => {
1812
- const t = E(null), r = E(null);
1813
- return T(() => {
1949
+ `, Yt = 720, Zt = 540, Gr = () => {
1950
+ const e = A(null), r = A(null);
1951
+ return P(() => {
1814
1952
  if (!document.getElementById("rack-server-styles")) {
1815
- const i = document.createElement("style");
1816
- i.id = "rack-server-styles", i.textContent = It, document.head.appendChild(i);
1953
+ const c = document.createElement("style");
1954
+ c.id = "rack-server-styles", c.textContent = Ht, document.head.appendChild(c);
1817
1955
  }
1818
1956
  let a = 0, n = 0, s, l = null;
1819
- const o = performance.now(), c = (i) => {
1820
- var b, x;
1821
- const u = l === null ? 0 : (i - l) / 1e3;
1822
- l = i;
1823
- const m = (i - o) / 1e3, d = Math.min(m / 3, 1), f = Math.min(m / 5, 1);
1824
- a = (a + d * d * d * At * u) % 360, n = (n + f * f * f * St * u) % 360, (b = t.current) == null || b.setAttribute("transform", `rotate(${a} 222 100)`), (x = r.current) == null || x.setAttribute("transform", `rotate(${n} 222 163)`), s = requestAnimationFrame(c);
1957
+ const o = performance.now(), i = (c) => {
1958
+ var m, g;
1959
+ const u = l === null ? 0 : (c - l) / 1e3;
1960
+ l = c;
1961
+ const b = (c - o) / 1e3, d = Math.min(b / 3, 1), p = Math.min(b / 5, 1);
1962
+ a = (a + d * d * d * Yt * u) % 360, n = (n + p * p * p * Zt * u) % 360, (m = e.current) == null || m.setAttribute("transform", `rotate(${a} 222 100)`), (g = r.current) == null || g.setAttribute("transform", `rotate(${n} 222 163)`), s = requestAnimationFrame(i);
1825
1963
  };
1826
- return s = requestAnimationFrame(c), () => {
1964
+ return s = requestAnimationFrame(i), () => {
1827
1965
  cancelAnimationFrame(s);
1828
1966
  };
1829
- }, []), /* @__PURE__ */ h(
1967
+ }, []), /* @__PURE__ */ f(
1830
1968
  "svg",
1831
1969
  {
1832
1970
  width: "300",
@@ -1836,25 +1974,25 @@ const yt = (t, r, a) => {
1836
1974
  "aria-hidden": "true",
1837
1975
  focusable: "false",
1838
1976
  children: [
1839
- /* @__PURE__ */ h("defs", { children: [
1840
- /* @__PURE__ */ h("linearGradient", { id: "rs-sg", x1: "0", y1: "0", x2: "0", y2: "1", children: [
1841
- /* @__PURE__ */ e("stop", { offset: "0%", stopColor: "rgb(var(--color-app-strong))", stopOpacity: "0" }),
1842
- /* @__PURE__ */ e("stop", { offset: "50%", stopColor: "rgb(var(--color-app-strong))", stopOpacity: "0.3" }),
1843
- /* @__PURE__ */ e("stop", { offset: "100%", stopColor: "rgb(var(--color-app-strong))", stopOpacity: "0" })
1977
+ /* @__PURE__ */ f("defs", { children: [
1978
+ /* @__PURE__ */ f("linearGradient", { id: "rs-sg", x1: "0", y1: "0", x2: "0", y2: "1", children: [
1979
+ /* @__PURE__ */ t("stop", { offset: "0%", stopColor: "rgb(var(--color-app-strong))", stopOpacity: "0" }),
1980
+ /* @__PURE__ */ t("stop", { offset: "50%", stopColor: "rgb(var(--color-app-strong))", stopOpacity: "0.3" }),
1981
+ /* @__PURE__ */ t("stop", { offset: "100%", stopColor: "rgb(var(--color-app-strong))", stopOpacity: "0" })
1844
1982
  ] }),
1845
- /* @__PURE__ */ h("linearGradient", { id: "rs-pg", x1: "0", y1: "0", x2: "1", y2: "0", children: [
1846
- /* @__PURE__ */ e("stop", { offset: "0%", stopColor: "#00e676" }),
1847
- /* @__PURE__ */ e("stop", { offset: "100%", stopColor: "rgb(var(--color-app-strong))" })
1983
+ /* @__PURE__ */ f("linearGradient", { id: "rs-pg", x1: "0", y1: "0", x2: "1", y2: "0", children: [
1984
+ /* @__PURE__ */ t("stop", { offset: "0%", stopColor: "#00e676" }),
1985
+ /* @__PURE__ */ t("stop", { offset: "100%", stopColor: "rgb(var(--color-app-strong))" })
1848
1986
  ] }),
1849
- /* @__PURE__ */ h("radialGradient", { id: "rs-ag", cx: "50%", cy: "50%", r: "50%", children: [
1850
- /* @__PURE__ */ e("stop", { offset: "0%", stopColor: "rgb(var(--color-app-strong))", stopOpacity: "0.15" }),
1851
- /* @__PURE__ */ e("stop", { offset: "100%", stopColor: "rgb(var(--color-app-strong))", stopOpacity: "0" })
1987
+ /* @__PURE__ */ f("radialGradient", { id: "rs-ag", cx: "50%", cy: "50%", r: "50%", children: [
1988
+ /* @__PURE__ */ t("stop", { offset: "0%", stopColor: "rgb(var(--color-app-strong))", stopOpacity: "0.15" }),
1989
+ /* @__PURE__ */ t("stop", { offset: "100%", stopColor: "rgb(var(--color-app-strong))", stopOpacity: "0" })
1852
1990
  ] }),
1853
- /* @__PURE__ */ e("clipPath", { id: "rs-rc", children: /* @__PURE__ */ e("rect", { x: "30", y: "55", width: "240", height: "190" }) })
1991
+ /* @__PURE__ */ t("clipPath", { id: "rs-rc", children: /* @__PURE__ */ t("rect", { x: "30", y: "55", width: "240", height: "190" }) })
1854
1992
  ] }),
1855
- /* @__PURE__ */ e("ellipse", { cx: "150", cy: "150", rx: "130", ry: "110", fill: "url(#rs-ag)", className: "rs-glow" }),
1856
- /* @__PURE__ */ e("rect", { x: "30", y: "50", width: "240", height: "190", className: "rs-chassis" }),
1857
- /* @__PURE__ */ e(
1993
+ /* @__PURE__ */ t("ellipse", { cx: "150", cy: "150", rx: "130", ry: "110", fill: "url(#rs-ag)", className: "rs-glow" }),
1994
+ /* @__PURE__ */ t("rect", { x: "30", y: "50", width: "240", height: "190", className: "rs-chassis" }),
1995
+ /* @__PURE__ */ t(
1858
1996
  "circle",
1859
1997
  {
1860
1998
  cx: "40",
@@ -1865,7 +2003,7 @@ const yt = (t, r, a) => {
1865
2003
  strokeWidth: "1"
1866
2004
  }
1867
2005
  ),
1868
- /* @__PURE__ */ e(
2006
+ /* @__PURE__ */ t(
1869
2007
  "circle",
1870
2008
  {
1871
2009
  cx: "260",
@@ -1876,7 +2014,7 @@ const yt = (t, r, a) => {
1876
2014
  strokeWidth: "1"
1877
2015
  }
1878
2016
  ),
1879
- /* @__PURE__ */ e(
2017
+ /* @__PURE__ */ t(
1880
2018
  "circle",
1881
2019
  {
1882
2020
  cx: "40",
@@ -1887,7 +2025,7 @@ const yt = (t, r, a) => {
1887
2025
  strokeWidth: "1"
1888
2026
  }
1889
2027
  ),
1890
- /* @__PURE__ */ e(
2028
+ /* @__PURE__ */ t(
1891
2029
  "circle",
1892
2030
  {
1893
2031
  cx: "260",
@@ -1898,50 +2036,50 @@ const yt = (t, r, a) => {
1898
2036
  strokeWidth: "1"
1899
2037
  }
1900
2038
  ),
1901
- /* @__PURE__ */ e("rect", { x: "42", y: "72", width: "216", height: "56", className: "rs-rack" }),
1902
- /* @__PURE__ */ e("rect", { x: "52", y: "79", width: "130", height: "8", className: "rs-slotline" }),
1903
- /* @__PURE__ */ e("rect", { x: "52", y: "91", width: "130", height: "8", className: "rs-slotline" }),
1904
- /* @__PURE__ */ e("rect", { x: "52", y: "103", width: "130", height: "8", className: "rs-slotline" }),
1905
- /* @__PURE__ */ e("rect", { x: "52", y: "115", width: "80", height: "8", className: "rs-slotline" }),
1906
- /* @__PURE__ */ e("circle", { cx: "60", cy: "83", r: "2.5", className: "rs-led-g rs-lg1" }),
1907
- /* @__PURE__ */ e("circle", { cx: "60", cy: "95", r: "2.5", className: "rs-led-g rs-lg2" }),
1908
- /* @__PURE__ */ e("circle", { cx: "60", cy: "107", r: "2.5", className: "rs-led-b rs-lb1" }),
1909
- /* @__PURE__ */ e("circle", { cx: "60", cy: "119", r: "2.5", className: "rs-led-g rs-lg3" }),
1910
- /* @__PURE__ */ e("circle", { cx: "222", cy: "100", r: "20", fill: "rgb(var(--color-app-bg))" }),
1911
- /* @__PURE__ */ h("g", { ref: t, children: [
1912
- /* @__PURE__ */ e("path", { d: "M222 80 Q230 100 222 120 Q214 100 222 80", className: "rs-fan-blade" }),
1913
- /* @__PURE__ */ e("path", { d: "M202 100 Q222 108 242 100 Q222 92 202 100", className: "rs-fan-blade" }),
1914
- /* @__PURE__ */ e("circle", { cx: "222", cy: "100", r: "2.5", className: "rs-fan-hub" })
2039
+ /* @__PURE__ */ t("rect", { x: "42", y: "72", width: "216", height: "56", className: "rs-rack" }),
2040
+ /* @__PURE__ */ t("rect", { x: "52", y: "79", width: "130", height: "8", className: "rs-slotline" }),
2041
+ /* @__PURE__ */ t("rect", { x: "52", y: "91", width: "130", height: "8", className: "rs-slotline" }),
2042
+ /* @__PURE__ */ t("rect", { x: "52", y: "103", width: "130", height: "8", className: "rs-slotline" }),
2043
+ /* @__PURE__ */ t("rect", { x: "52", y: "115", width: "80", height: "8", className: "rs-slotline" }),
2044
+ /* @__PURE__ */ t("circle", { cx: "60", cy: "83", r: "2.5", className: "rs-led-g rs-lg1" }),
2045
+ /* @__PURE__ */ t("circle", { cx: "60", cy: "95", r: "2.5", className: "rs-led-g rs-lg2" }),
2046
+ /* @__PURE__ */ t("circle", { cx: "60", cy: "107", r: "2.5", className: "rs-led-b rs-lb1" }),
2047
+ /* @__PURE__ */ t("circle", { cx: "60", cy: "119", r: "2.5", className: "rs-led-g rs-lg3" }),
2048
+ /* @__PURE__ */ t("circle", { cx: "222", cy: "100", r: "20", fill: "rgb(var(--color-app-bg))" }),
2049
+ /* @__PURE__ */ f("g", { ref: e, children: [
2050
+ /* @__PURE__ */ t("path", { d: "M222 80 Q230 100 222 120 Q214 100 222 80", className: "rs-fan-blade" }),
2051
+ /* @__PURE__ */ t("path", { d: "M202 100 Q222 108 242 100 Q222 92 202 100", className: "rs-fan-blade" }),
2052
+ /* @__PURE__ */ t("circle", { cx: "222", cy: "100", r: "2.5", className: "rs-fan-hub" })
1915
2053
  ] }),
1916
- /* @__PURE__ */ e("circle", { cx: "222", cy: "100", r: "20", className: "rs-fan-ring" }),
1917
- /* @__PURE__ */ e("rect", { x: "42", y: "136", width: "216", height: "56", className: "rs-rack" }),
1918
- /* @__PURE__ */ e("rect", { x: "52", y: "143", width: "130", height: "8", className: "rs-slotline" }),
1919
- /* @__PURE__ */ e("rect", { x: "52", y: "155", width: "130", height: "8", className: "rs-slotline" }),
1920
- /* @__PURE__ */ e("rect", { x: "52", y: "167", width: "130", height: "8", className: "rs-slotline" }),
1921
- /* @__PURE__ */ e("rect", { x: "52", y: "179", width: "80", height: "8", className: "rs-slotline" }),
1922
- /* @__PURE__ */ e("circle", { cx: "60", cy: "147", r: "2.5", className: "rs-led-g rs-lg2" }),
1923
- /* @__PURE__ */ e("circle", { cx: "60", cy: "159", r: "2.5", className: "rs-led-b rs-lb2" }),
1924
- /* @__PURE__ */ e("circle", { cx: "60", cy: "171", r: "2.5", className: "rs-led-g rs-lg4" }),
1925
- /* @__PURE__ */ e("circle", { cx: "60", cy: "183", r: "2.5", className: "rs-led-g rs-lg1" }),
1926
- /* @__PURE__ */ e("circle", { cx: "222", cy: "163", r: "20", fill: "rgb(var(--color-app-bg))" }),
1927
- /* @__PURE__ */ h("g", { ref: r, children: [
1928
- /* @__PURE__ */ e("path", { d: "M222 143 Q230 163 222 183 Q214 163 222 143", className: "rs-fan-blade" }),
1929
- /* @__PURE__ */ e("path", { d: "M202 163 Q222 171 242 163 Q222 155 202 163", className: "rs-fan-blade" }),
1930
- /* @__PURE__ */ e("circle", { cx: "222", cy: "163", r: "2.5", className: "rs-fan-hub" })
2054
+ /* @__PURE__ */ t("circle", { cx: "222", cy: "100", r: "20", className: "rs-fan-ring" }),
2055
+ /* @__PURE__ */ t("rect", { x: "42", y: "136", width: "216", height: "56", className: "rs-rack" }),
2056
+ /* @__PURE__ */ t("rect", { x: "52", y: "143", width: "130", height: "8", className: "rs-slotline" }),
2057
+ /* @__PURE__ */ t("rect", { x: "52", y: "155", width: "130", height: "8", className: "rs-slotline" }),
2058
+ /* @__PURE__ */ t("rect", { x: "52", y: "167", width: "130", height: "8", className: "rs-slotline" }),
2059
+ /* @__PURE__ */ t("rect", { x: "52", y: "179", width: "80", height: "8", className: "rs-slotline" }),
2060
+ /* @__PURE__ */ t("circle", { cx: "60", cy: "147", r: "2.5", className: "rs-led-g rs-lg2" }),
2061
+ /* @__PURE__ */ t("circle", { cx: "60", cy: "159", r: "2.5", className: "rs-led-b rs-lb2" }),
2062
+ /* @__PURE__ */ t("circle", { cx: "60", cy: "171", r: "2.5", className: "rs-led-g rs-lg4" }),
2063
+ /* @__PURE__ */ t("circle", { cx: "60", cy: "183", r: "2.5", className: "rs-led-g rs-lg1" }),
2064
+ /* @__PURE__ */ t("circle", { cx: "222", cy: "163", r: "20", fill: "rgb(var(--color-app-bg))" }),
2065
+ /* @__PURE__ */ f("g", { ref: r, children: [
2066
+ /* @__PURE__ */ t("path", { d: "M222 143 Q230 163 222 183 Q214 163 222 143", className: "rs-fan-blade" }),
2067
+ /* @__PURE__ */ t("path", { d: "M202 163 Q222 171 242 163 Q222 155 202 163", className: "rs-fan-blade" }),
2068
+ /* @__PURE__ */ t("circle", { cx: "222", cy: "163", r: "2.5", className: "rs-fan-hub" })
1931
2069
  ] }),
1932
- /* @__PURE__ */ e("circle", { cx: "222", cy: "163", r: "20", className: "rs-fan-ring" })
2070
+ /* @__PURE__ */ t("circle", { cx: "222", cy: "163", r: "20", className: "rs-fan-ring" })
1933
2071
  ]
1934
2072
  }
1935
2073
  );
1936
- }, Ft = ({ label: t, className: r = "", disabled: a = !1, ...n }) => {
1937
- const s = S();
1938
- return /* @__PURE__ */ h(
2074
+ }, Qt = ({ label: e, className: r = "", disabled: a = !1, ...n }) => {
2075
+ const s = O();
2076
+ return /* @__PURE__ */ f(
1939
2077
  "label",
1940
2078
  {
1941
2079
  htmlFor: s,
1942
- className: `inline-flex items-center gap-2 text-sm text-app-text ${a ? "cursor-not-allowed opacity-50" : "cursor-pointer"} ${r}`,
2080
+ className: `inline-flex min-h-8 items-center gap-2 text-sm text-app-text ${a ? "cursor-not-allowed opacity-50" : "cursor-pointer"} ${r}`,
1943
2081
  children: [
1944
- /* @__PURE__ */ e(
2082
+ /* @__PURE__ */ t(
1945
2083
  "input",
1946
2084
  {
1947
2085
  id: s,
@@ -1951,130 +2089,248 @@ const yt = (t, r, a) => {
1951
2089
  ...n
1952
2090
  }
1953
2091
  ),
1954
- t
2092
+ e
1955
2093
  ]
1956
2094
  }
1957
2095
  );
1958
- }, Mr = ({ label: t, name: r, value: a, onChange: n, options: s, direction: l = "column" }) => {
1959
- const o = S();
1960
- return /* @__PURE__ */ h("fieldset", { className: "flex flex-col gap-2 border-0 p-0", children: [
1961
- t && /* @__PURE__ */ e("legend", { className: "mb-1 text-xs font-semibold uppercase tracking-widest text-app-muted", children: t }),
1962
- /* @__PURE__ */ e("div", { className: `flex gap-3 ${l === "row" ? "flex-row flex-wrap" : "flex-col"}`, children: s.map((c) => /* @__PURE__ */ e(
1963
- Ft,
2096
+ }, Hr = ({ label: e, name: r, value: a, onChange: n, options: s, direction: l = "column" }) => {
2097
+ const o = O();
2098
+ return /* @__PURE__ */ f("fieldset", { className: "flex flex-col gap-2 border-0 p-0", children: [
2099
+ e && /* @__PURE__ */ t(U, { as: "legend", className: "mb-1", children: e }),
2100
+ /* @__PURE__ */ t("div", { className: `flex gap-3 ${l === "row" ? "flex-row flex-wrap" : "flex-col"}`, children: s.map((i) => /* @__PURE__ */ t(
2101
+ Qt,
1964
2102
  {
1965
2103
  name: r ?? o,
1966
- value: c.value,
1967
- label: c.label,
1968
- disabled: c.disabled,
1969
- checked: a === c.value,
1970
- onChange: () => n == null ? void 0 : n(c.value)
2104
+ value: i.value,
2105
+ label: i.label,
2106
+ disabled: i.disabled,
2107
+ checked: a === i.value,
2108
+ onChange: () => n == null ? void 0 : n(i.value)
1971
2109
  },
1972
- c.value
2110
+ i.value
1973
2111
  )) })
1974
2112
  ] });
1975
- }, Lr = ({ label: t, value: r, onChange: a, options: n, placeholder: s, error: l, className: o = "", ...c }) => {
1976
- const i = S(), u = `${i}-error`;
1977
- return /* @__PURE__ */ h("div", { className: "flex flex-col gap-1", children: [
1978
- t && /* @__PURE__ */ e("label", { htmlFor: i, className: "text-xs font-semibold uppercase tracking-widest text-app-muted", children: t }),
1979
- /* @__PURE__ */ h(
1980
- "select",
2113
+ }, Vt = ({ open: e }) => /* @__PURE__ */ t(
2114
+ "svg",
2115
+ {
2116
+ "aria-hidden": "true",
2117
+ focusable: "false",
2118
+ viewBox: "0 0 24 24",
2119
+ fill: "none",
2120
+ stroke: "currentColor",
2121
+ strokeWidth: "2",
2122
+ className: `h-4 w-4 shrink-0 text-app-muted transition-transform ${e ? "rotate-180" : ""}`,
2123
+ children: /* @__PURE__ */ t("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 9l6 6 6-6" })
2124
+ }
2125
+ ), Xt = () => /* @__PURE__ */ t(
2126
+ "svg",
2127
+ {
2128
+ "aria-hidden": "true",
2129
+ focusable: "false",
2130
+ viewBox: "0 0 24 24",
2131
+ fill: "none",
2132
+ stroke: "currentColor",
2133
+ strokeWidth: "2.5",
2134
+ className: "h-4 w-4 shrink-0",
2135
+ children: /* @__PURE__ */ t("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5 13l4 4L19 7" })
2136
+ }
2137
+ ), Yr = ({
2138
+ label: e,
2139
+ value: r,
2140
+ onChange: a,
2141
+ options: n,
2142
+ placeholder: s,
2143
+ error: l,
2144
+ disabled: o = !1,
2145
+ name: i,
2146
+ className: c = "",
2147
+ ...u
2148
+ }) => {
2149
+ const b = O(), d = `${b}-label`, p = `${b}-list`, m = `${b}-error`, g = A(null), h = A(null), x = A(null), v = A({ text: "", timer: null }), [N, M] = D(!1), [y, w] = D(-1), C = n.findIndex((k) => k.value === r), T = n[C], L = n.map((k, $) => k.disabled ? -1 : $).filter((k) => k >= 0);
2150
+ V(N, [g, x], (k) => {
2151
+ var $;
2152
+ M(!1), k === "escape" && (($ = h.current) == null || $.focus());
2153
+ }), P(() => {
2154
+ var k, $, R;
2155
+ N && ((R = ($ = (k = x.current) == null ? void 0 : k.querySelector('[data-active="true"]')) == null ? void 0 : $.scrollIntoView) == null || R.call($, { block: "nearest" }));
2156
+ }, [N, y]);
2157
+ const I = () => {
2158
+ o || (w(C >= 0 && !n[C].disabled ? C : L[0] ?? -1), M(!0));
2159
+ }, j = (k) => {
2160
+ var R;
2161
+ const $ = n[k];
2162
+ !$ || $.disabled || (a == null || a($.value), M(!1), (R = h.current) == null || R.focus());
2163
+ }, B = (k) => {
2164
+ if (!L.length) return;
2165
+ const $ = L.indexOf(y), R = L[Math.min(Math.max($ + k, 0), L.length - 1)];
2166
+ w(R);
2167
+ }, z = (k) => {
2168
+ const $ = v.current;
2169
+ clearTimeout($.timer), $.text += k.toLowerCase(), $.timer = setTimeout(() => $.text = "", 600);
2170
+ const R = L.indexOf(y), E = [...L.slice(R + 1), ...L.slice(0, R + 1)].find((S) => String(n[S].label).toLowerCase().startsWith($.text));
2171
+ E !== void 0 && (N ? w(E) : a == null || a(n[E].value));
2172
+ }, q = (k) => {
2173
+ if (o) return;
2174
+ const { key: $ } = k;
2175
+ if (!N) {
2176
+ ["ArrowDown", "ArrowUp", "Enter", " "].includes($) ? (k.preventDefault(), I()) : $.length === 1 && !k.ctrlKey && !k.metaKey && !k.altKey && z($);
2177
+ return;
2178
+ }
2179
+ if ($ === "ArrowDown") B(1);
2180
+ else if ($ === "ArrowUp") B(-1);
2181
+ else if ($ === "Home") w(L[0] ?? -1);
2182
+ else if ($ === "End") w(L[L.length - 1] ?? -1);
2183
+ else if ($ === "Enter" || $ === " ") j(y);
2184
+ else if ($ === "Tab") M(!1);
2185
+ else if ($.length === 1 && !k.ctrlKey && !k.metaKey && !k.altKey) z($);
2186
+ else return;
2187
+ $ !== "Tab" && k.preventDefault();
2188
+ };
2189
+ return /* @__PURE__ */ f("div", { ref: g, className: "relative flex flex-col gap-1", children: [
2190
+ e && /* @__PURE__ */ t(U, { id: d, htmlFor: b, children: e }),
2191
+ /* @__PURE__ */ f(
2192
+ "button",
1981
2193
  {
1982
- id: i,
2194
+ ref: h,
2195
+ id: b,
2196
+ type: "button",
2197
+ role: "combobox",
2198
+ disabled: o,
2199
+ "aria-haspopup": "listbox",
2200
+ "aria-expanded": N,
2201
+ "aria-controls": N ? p : void 0,
2202
+ "aria-activedescendant": N && y >= 0 ? `${b}-opt-${y}` : void 0,
2203
+ "aria-labelledby": e ? `${d} ${b}` : void 0,
1983
2204
  "aria-invalid": !!l,
1984
- "aria-describedby": l ? u : void 0,
1985
- className: `${Z(!!l)} ${o}`,
1986
- value: r,
1987
- onChange: (m) => a == null ? void 0 : a(m.target.value),
1988
- ...c,
2205
+ "aria-describedby": l ? m : void 0,
2206
+ onClick: () => N ? M(!1) : I(),
2207
+ onKeyDown: q,
2208
+ className: `${se(!!l)} flex items-center justify-between gap-2 text-left ${c}`,
2209
+ ...u,
1989
2210
  children: [
1990
- s && /* @__PURE__ */ e("option", { value: "", disabled: !0, children: s }),
1991
- n.map((m) => /* @__PURE__ */ e("option", { value: m.value, disabled: m.disabled, children: m.label }, m.value))
2211
+ /* @__PURE__ */ t("span", { className: `min-w-0 flex-1 truncate ${T ? "" : "text-app-muted"}`, children: T ? T.label : s ?? " " }),
2212
+ /* @__PURE__ */ t(Vt, { open: N })
1992
2213
  ]
1993
2214
  }
1994
2215
  ),
1995
- l && /* @__PURE__ */ e("span", { id: u, className: "text-xs text-red-700 dark:text-red-400", children: l })
2216
+ i && /* @__PURE__ */ t("input", { type: "hidden", name: i, value: r ?? "" }),
2217
+ /* @__PURE__ */ t(
2218
+ X,
2219
+ {
2220
+ open: N,
2221
+ anchorRef: h,
2222
+ panelRef: x,
2223
+ placement: "bottom-start",
2224
+ matchWidth: !0,
2225
+ gap: 2,
2226
+ className: "max-h-60 max-w-[calc(100vw-1rem)] overflow-y-auto border border-app-border bg-app-card shadow-xl",
2227
+ children: /* @__PURE__ */ t("ul", { id: p, role: "listbox", "aria-labelledby": e ? d : void 0, className: "m-0 list-none p-0", children: n.map((k, $) => {
2228
+ const R = $ === C, F = $ === y;
2229
+ return /* @__PURE__ */ f(
2230
+ "li",
2231
+ {
2232
+ id: `${b}-opt-${$}`,
2233
+ role: "option",
2234
+ "aria-selected": R,
2235
+ "aria-disabled": k.disabled || void 0,
2236
+ "data-active": F,
2237
+ onMouseDown: (E) => E.preventDefault(),
2238
+ onMouseMove: () => !k.disabled && w($),
2239
+ onClick: () => j($),
2240
+ className: `flex items-center justify-between gap-2 px-3 py-2 text-sm ${k.disabled ? "cursor-not-allowed text-app-muted opacity-50" : F ? "cursor-pointer bg-app-strong text-app-bg" : "cursor-pointer text-app-text"} ${R ? "font-semibold" : ""}`,
2241
+ children: [
2242
+ /* @__PURE__ */ t("span", { className: "min-w-0 truncate", children: k.label }),
2243
+ R && /* @__PURE__ */ t(Xt, {})
2244
+ ]
2245
+ },
2246
+ k.value
2247
+ );
2248
+ }) })
2249
+ }
2250
+ ),
2251
+ l && /* @__PURE__ */ t("span", { id: m, className: "text-xs text-red-700 dark:text-red-400", children: l })
1996
2252
  ] });
1997
- }, Cr = ({
1998
- items: t,
2253
+ }, Zr = ({
2254
+ items: e,
1999
2255
  activeKey: r,
2000
2256
  onSelect: a,
2001
2257
  header: n,
2002
2258
  footer: s,
2003
2259
  collapsed: l = !1,
2004
2260
  linkComponent: o = "a",
2005
- linkProp: c = "href",
2006
- label: i = "Sidebar",
2261
+ linkProp: i = "href",
2262
+ label: c = "Sidebar",
2007
2263
  className: u = ""
2008
2264
  }) => {
2009
- const m = (d, f = 0) => {
2010
- var w;
2011
- const b = d.key === r, x = /* @__PURE__ */ h(Y, { children: [
2012
- d.icon && /* @__PURE__ */ e("span", { className: "shrink-0 [&>svg]:h-4 [&>svg]:w-4", children: d.icon }),
2013
- !l && /* @__PURE__ */ e("span", { className: "min-w-0 flex-1 truncate text-left", children: d.label }),
2014
- !l && d.badge != null && /* @__PURE__ */ e("span", { className: "bg-app-strong px-1.5 text-[10px] font-semibold text-app-bg", children: d.badge })
2015
- ] }), p = `flex w-full items-center gap-3 py-2 text-xs font-semibold uppercase tracking-widest transition ${b ? "bg-app-strong text-app-bg" : "text-app-muted hover:bg-app-bg hover:text-app-text"} ${l ? "justify-center px-2" : "pr-3"}`, g = l ? void 0 : { paddingLeft: `${0.75 + f * 1}rem` }, y = () => {
2016
- var D;
2017
- (D = d.onClick) == null || D.call(d), a == null || a(d.key);
2018
- }, C = !!((w = d.children) != null && w.length);
2019
- return /* @__PURE__ */ h("li", { children: [
2020
- d.href && !C ? /* @__PURE__ */ e(
2265
+ const b = (d, p = 0) => {
2266
+ var M;
2267
+ const m = d.key === r, g = /* @__PURE__ */ f(re, { children: [
2268
+ d.icon && /* @__PURE__ */ t("span", { className: "shrink-0 [&>svg]:h-4 [&>svg]:w-4", children: d.icon }),
2269
+ !l && /* @__PURE__ */ t("span", { className: "min-w-0 flex-1 truncate text-left", children: d.label }),
2270
+ !l && d.badge != null && /* @__PURE__ */ t("span", { className: "bg-app-strong px-1.5 text-[10px] font-semibold text-app-bg", children: d.badge })
2271
+ ] }), h = `flex w-full items-center gap-3 py-2 text-xs font-semibold uppercase tracking-widest transition ${m ? "bg-app-strong text-app-bg" : "text-app-muted hover:bg-app-bg hover:text-app-text"} ${l ? "justify-center px-2" : "pr-3"}`, x = l ? void 0 : { paddingLeft: `${0.75 + p * 1}rem` }, v = () => {
2272
+ var y;
2273
+ (y = d.onClick) == null || y.call(d), a == null || a(d.key);
2274
+ }, N = !!((M = d.children) != null && M.length);
2275
+ return /* @__PURE__ */ f("li", { children: [
2276
+ d.href && !N ? /* @__PURE__ */ t(
2021
2277
  o,
2022
2278
  {
2023
- [c]: d.href,
2024
- "aria-current": b ? "page" : void 0,
2279
+ [i]: d.href,
2280
+ "aria-current": m ? "page" : void 0,
2025
2281
  "aria-label": l ? d.label : void 0,
2026
2282
  title: l ? d.label : void 0,
2027
- onClick: y,
2028
- className: p,
2029
- style: g,
2030
- children: x
2283
+ onClick: v,
2284
+ className: h,
2285
+ style: x,
2286
+ children: g
2031
2287
  }
2032
- ) : /* @__PURE__ */ e(
2288
+ ) : /* @__PURE__ */ t(
2033
2289
  "button",
2034
2290
  {
2035
2291
  type: "button",
2036
- "aria-current": b ? "page" : void 0,
2292
+ "aria-current": m ? "page" : void 0,
2037
2293
  "aria-label": l ? d.label : void 0,
2038
2294
  title: l ? d.label : void 0,
2039
- onClick: y,
2040
- className: p,
2041
- style: g,
2042
- children: x
2295
+ onClick: v,
2296
+ className: h,
2297
+ style: x,
2298
+ children: g
2043
2299
  }
2044
2300
  ),
2045
- C && !l && /* @__PURE__ */ e("ul", { className: "m-0 list-none p-0", children: d.children.map((D) => m(D, f + 1)) })
2301
+ N && !l && /* @__PURE__ */ t("ul", { className: "m-0 list-none p-0", children: d.children.map((y) => b(y, p + 1)) })
2046
2302
  ] }, d.key);
2047
2303
  };
2048
- return /* @__PURE__ */ h(
2304
+ return /* @__PURE__ */ f(
2049
2305
  "nav",
2050
2306
  {
2051
- "aria-label": i,
2307
+ "aria-label": c,
2052
2308
  className: `flex h-full flex-col border-r border-app-border bg-app-card ${l ? "w-14" : "w-60"} ${u}`,
2053
2309
  children: [
2054
- n && /* @__PURE__ */ e("div", { className: "shrink-0 border-b border-app-border px-3 py-3", children: n }),
2055
- /* @__PURE__ */ e("ul", { className: "m-0 flex-1 list-none overflow-y-auto p-0 py-2", children: t.map((d) => m(d)) }),
2056
- s && /* @__PURE__ */ e("div", { className: "shrink-0 border-t border-app-border px-3 py-3", children: s })
2310
+ n && /* @__PURE__ */ t("div", { className: "shrink-0 border-b border-app-border px-3 py-3", children: n }),
2311
+ /* @__PURE__ */ t("ul", { className: "m-0 flex-1 list-none overflow-y-auto p-0 py-2", children: e.map((d) => b(d)) }),
2312
+ s && /* @__PURE__ */ t("div", { className: "shrink-0 border-t border-app-border px-3 py-3", children: s })
2057
2313
  ]
2058
2314
  }
2059
2315
  );
2060
- }, Dr = ({ lines: t, circle: r = !1, className: a = "h-4 w-full" }) => t ? /* @__PURE__ */ e("div", { "aria-hidden": "true", className: "flex flex-col gap-2", children: Array.from({ length: t }, (n, s) => /* @__PURE__ */ e("div", { className: `h-3 animate-pulse bg-app-border ${s === t - 1 ? "w-2/3" : "w-full"}` }, s)) }) : /* @__PURE__ */ e("div", { "aria-hidden": "true", className: `animate-pulse bg-app-border ${r ? "rounded-full" : ""} ${a}` }), Er = ({
2061
- label: t,
2316
+ }, Qr = ({ lines: e, circle: r = !1, className: a = "h-4 w-full" }) => e ? /* @__PURE__ */ t("div", { "aria-hidden": "true", className: "flex flex-col gap-2", children: Array.from({ length: e }, (n, s) => /* @__PURE__ */ t("div", { className: `h-3 animate-pulse bg-app-border ${s === e - 1 ? "w-2/3" : "w-full"}` }, s)) }) : /* @__PURE__ */ t("div", { "aria-hidden": "true", className: `animate-pulse bg-app-border ${r ? "rounded-full" : ""} ${a}` }), Vr = ({
2317
+ label: e,
2062
2318
  value: r,
2063
2319
  onChange: a,
2064
2320
  min: n = 0,
2065
2321
  max: s = 100,
2066
2322
  step: l = 1,
2067
2323
  showValue: o = !0,
2068
- className: c = "",
2069
- ...i
2324
+ className: i = "",
2325
+ ...c
2070
2326
  }) => {
2071
- const u = S();
2072
- return /* @__PURE__ */ h("div", { className: `flex flex-col gap-1 ${c}`, children: [
2073
- (t || o) && /* @__PURE__ */ h("div", { className: "flex items-center justify-between text-xs font-semibold uppercase tracking-widest text-app-muted", children: [
2074
- /* @__PURE__ */ e("label", { htmlFor: u, children: t }),
2075
- o && /* @__PURE__ */ e("span", { className: "text-app-text", children: r })
2327
+ const u = O(), b = s - n, d = b > 0 ? Math.min(100, Math.max(0, (r - n) / b * 100)) : 0;
2328
+ return /* @__PURE__ */ f("div", { className: `flex flex-col gap-1 ${i}`, children: [
2329
+ (e || o) && /* @__PURE__ */ f("div", { className: "flex items-center justify-between gap-2", children: [
2330
+ e ? /* @__PURE__ */ t(U, { htmlFor: u, children: e }) : /* @__PURE__ */ t("span", {}),
2331
+ o && /* @__PURE__ */ t("span", { className: "text-xs font-semibold uppercase tracking-widest text-app-text", children: r })
2076
2332
  ] }),
2077
- /* @__PURE__ */ e(
2333
+ /* @__PURE__ */ t(
2078
2334
  "input",
2079
2335
  {
2080
2336
  id: u,
@@ -2083,92 +2339,93 @@ const yt = (t, r, a) => {
2083
2339
  max: s,
2084
2340
  step: l,
2085
2341
  value: r,
2086
- onChange: (m) => a == null ? void 0 : a(Number(m.target.value)),
2087
- className: "w-full cursor-pointer accent-[rgb(var(--color-app-strong))]",
2088
- ...i
2342
+ onChange: (p) => a == null ? void 0 : a(Number(p.target.value)),
2343
+ style: { "--xd-fill": `${d}%` },
2344
+ className: "xd-slider w-full",
2345
+ ...c
2089
2346
  }
2090
2347
  )
2091
2348
  ] });
2092
- }, jt = (t, r, a) => {
2093
- const n = [...t], [s] = n.splice(r, 1);
2349
+ }, Jt = (e, r, a) => {
2350
+ const n = [...e], [s] = n.splice(r, 1);
2094
2351
  return n.splice(a, 0, s), n;
2095
- }, Tr = ({ items: t, onChange: r, renderItem: a, label: n = "Sortable list", className: s = "" }) => {
2096
- const [l, o] = k(null), [c, i] = k(null), [u, m] = k(""), d = (f, b) => {
2097
- f === b || b < 0 || b >= t.length || r(jt(t, f, b));
2352
+ }, Xr = ({ items: e, onChange: r, renderItem: a, label: n = "Sortable list", className: s = "" }) => {
2353
+ const [l, o] = D(null), [i, c] = D(null), [u, b] = D(""), d = (p, m) => {
2354
+ p === m || m < 0 || m >= e.length || r(Jt(e, p, m));
2098
2355
  };
2099
- return /* @__PURE__ */ h(Y, { children: [
2100
- /* @__PURE__ */ e("ul", { "aria-label": n, className: `m-0 list-none border border-app-border bg-app-card p-0 ${s}`, children: t.map((f, b) => /* @__PURE__ */ h(
2356
+ return /* @__PURE__ */ f(re, { children: [
2357
+ /* @__PURE__ */ t("ul", { "aria-label": n, className: `m-0 list-none border border-app-border bg-app-card p-0 ${s}`, children: e.map((p, m) => /* @__PURE__ */ f(
2101
2358
  "li",
2102
2359
  {
2103
2360
  draggable: !0,
2104
- onDragStart: (x) => {
2105
- o(f.key), x.dataTransfer.effectAllowed = "move", x.dataTransfer.setData("text/plain", String(f.key));
2361
+ onDragStart: (g) => {
2362
+ o(p.key), g.dataTransfer.effectAllowed = "move", g.dataTransfer.setData("text/plain", String(p.key));
2106
2363
  },
2107
- onDragOver: (x) => {
2108
- x.preventDefault(), f.key !== c && i(f.key);
2364
+ onDragOver: (g) => {
2365
+ g.preventDefault(), p.key !== i && c(p.key);
2109
2366
  },
2110
- onDrop: (x) => {
2111
- x.preventDefault();
2112
- const p = t.findIndex((g) => g.key === l);
2113
- d(p, b), o(null), i(null);
2367
+ onDrop: (g) => {
2368
+ g.preventDefault();
2369
+ const h = e.findIndex((x) => x.key === l);
2370
+ d(h, m), o(null), c(null);
2114
2371
  },
2115
2372
  onDragEnd: () => {
2116
- o(null), i(null);
2373
+ o(null), c(null);
2117
2374
  },
2118
- className: `flex items-center gap-3 border-b border-app-border px-3 py-2.5 last:border-b-0 ${l === f.key ? "opacity-40" : ""} ${c === f.key && l !== f.key ? "bg-app-soft/20" : ""}`,
2375
+ className: `flex items-center gap-3 border-b border-app-border px-3 py-2.5 last:border-b-0 ${l === p.key ? "opacity-40" : ""} ${i === p.key && l !== p.key ? "bg-app-soft/20" : ""}`,
2119
2376
  children: [
2120
- /* @__PURE__ */ e(
2377
+ /* @__PURE__ */ t(
2121
2378
  "button",
2122
2379
  {
2123
2380
  type: "button",
2124
- "aria-label": `Reorder ${f.label ?? f.key}. Use up and down arrow keys.`,
2125
- onKeyDown: (x) => {
2126
- const p = x.key === "ArrowUp" ? b - 1 : x.key === "ArrowDown" ? b + 1 : null;
2127
- if (p === null || p < 0 || p >= t.length) return;
2128
- x.preventDefault();
2129
- const g = x.currentTarget;
2130
- d(b, p), m(`${f.label ?? f.key} moved to position ${p + 1} of ${t.length}`), requestAnimationFrame(() => g.focus());
2381
+ "aria-label": `Reorder ${p.label ?? p.key}. Use up and down arrow keys.`,
2382
+ onKeyDown: (g) => {
2383
+ const h = g.key === "ArrowUp" ? m - 1 : g.key === "ArrowDown" ? m + 1 : null;
2384
+ if (h === null || h < 0 || h >= e.length) return;
2385
+ g.preventDefault();
2386
+ const x = g.currentTarget;
2387
+ d(m, h), b(`${p.label ?? p.key} moved to position ${h + 1} of ${e.length}`), requestAnimationFrame(() => x.focus());
2131
2388
  },
2132
- className: "cursor-grab select-none px-1 text-app-muted transition hover:text-app-text active:cursor-grabbing",
2133
- children: /* @__PURE__ */ e("span", { "aria-hidden": "true", children: "⋮⋮" })
2389
+ className: "-my-2 cursor-grab select-none px-2 py-2 text-app-muted transition hover:text-app-text active:cursor-grabbing",
2390
+ children: /* @__PURE__ */ t("span", { "aria-hidden": "true", children: "⋮⋮" })
2134
2391
  }
2135
2392
  ),
2136
- /* @__PURE__ */ e("div", { className: "min-w-0 flex-1 text-sm text-app-text", children: a(f, b) })
2393
+ /* @__PURE__ */ t("div", { className: "min-w-0 flex-1 text-sm text-app-text", children: a(p, m) })
2137
2394
  ]
2138
2395
  },
2139
- f.key
2396
+ p.key
2140
2397
  )) }),
2141
- /* @__PURE__ */ e("div", { role: "status", "aria-live": "polite", className: "sr-only", children: u })
2398
+ /* @__PURE__ */ t("div", { role: "status", "aria-live": "polite", className: "sr-only", children: u })
2142
2399
  ] });
2143
- }, Ir = ({ direction: t = "column", gap: r = 4, ...a }) => /* @__PURE__ */ e(Ct, { direction: t, gap: r, ...a }), Pt = ({ className: t }) => /* @__PURE__ */ e(
2400
+ }, Jr = ({ direction: e = "column", gap: r = 4, ...a }) => /* @__PURE__ */ t(Kt, { direction: e, gap: r, ...a }), er = ({ className: e }) => /* @__PURE__ */ t(
2144
2401
  "svg",
2145
2402
  {
2146
2403
  "aria-hidden": "true",
2147
2404
  focusable: "false",
2148
- className: t ?? "w-4 h-4 flex-shrink-0 text-emerald-600 dark:text-emerald-400",
2405
+ className: e ?? "w-4 h-4 flex-shrink-0 text-emerald-600 dark:text-emerald-400",
2149
2406
  viewBox: "0 0 24 24",
2150
2407
  fill: "none",
2151
2408
  stroke: "currentColor",
2152
2409
  strokeWidth: "2.5",
2153
- children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5 13l4 4L19 7" })
2410
+ children: /* @__PURE__ */ t("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5 13l4 4L19 7" })
2154
2411
  }
2155
- ), Ar = ({ steps: t, current: r = 0, className: a = "" }) => /* @__PURE__ */ e("ol", { className: `m-0 flex list-none flex-col gap-4 p-0 sm:flex-row sm:gap-0 ${a}`, children: t.map((n, s) => {
2412
+ ), ea = ({ steps: e, current: r = 0, className: a = "" }) => /* @__PURE__ */ t("ol", { className: `m-0 flex list-none flex-col gap-4 p-0 sm:flex-row sm:gap-0 ${a}`, children: e.map((n, s) => {
2156
2413
  const l = s < r, o = s === r;
2157
- return /* @__PURE__ */ h(
2414
+ return /* @__PURE__ */ f(
2158
2415
  "li",
2159
2416
  {
2160
2417
  "aria-current": o ? "step" : void 0,
2161
2418
  className: "flex flex-1 items-start gap-3 sm:flex-col sm:gap-2",
2162
2419
  children: [
2163
- /* @__PURE__ */ h("div", { className: "flex items-center sm:w-full", children: [
2164
- /* @__PURE__ */ e(
2420
+ /* @__PURE__ */ f("div", { className: "flex items-center sm:w-full", children: [
2421
+ /* @__PURE__ */ t(
2165
2422
  "span",
2166
2423
  {
2167
2424
  className: `flex h-7 w-7 shrink-0 items-center justify-center border text-xs font-semibold ${l ? "border-app-strong bg-app-strong text-app-bg" : o ? "border-app-strong text-app-text" : "border-app-border text-app-muted"}`,
2168
- children: l ? /* @__PURE__ */ e(Pt, { className: "h-4 w-4" }) : s + 1
2425
+ children: l ? /* @__PURE__ */ t(er, { className: "h-4 w-4" }) : s + 1
2169
2426
  }
2170
2427
  ),
2171
- s < t.length - 1 && /* @__PURE__ */ e(
2428
+ s < e.length - 1 && /* @__PURE__ */ t(
2172
2429
  "span",
2173
2430
  {
2174
2431
  "aria-hidden": "true",
@@ -2176,40 +2433,40 @@ const yt = (t, r, a) => {
2176
2433
  }
2177
2434
  )
2178
2435
  ] }),
2179
- /* @__PURE__ */ h("div", { className: "pr-2", children: [
2180
- /* @__PURE__ */ e(
2436
+ /* @__PURE__ */ f("div", { className: "pr-2", children: [
2437
+ /* @__PURE__ */ t(
2181
2438
  "div",
2182
2439
  {
2183
2440
  className: `text-xs font-semibold uppercase tracking-widest ${o || l ? "text-app-text" : "text-app-muted"}`,
2184
2441
  children: n.label
2185
2442
  }
2186
2443
  ),
2187
- n.description && /* @__PURE__ */ e("div", { className: "mt-0.5 text-xs text-app-muted", children: n.description })
2444
+ n.description && /* @__PURE__ */ t("div", { className: "mt-0.5 text-xs text-app-muted", children: n.description })
2188
2445
  ] })
2189
2446
  ]
2190
2447
  },
2191
2448
  n.label
2192
2449
  );
2193
- }) }), Sr = ({ checked: t, onChange: r, label: a, disabled: n = !1, className: s = "", ...l }) => /* @__PURE__ */ h(
2450
+ }) }), ta = ({ checked: e, onChange: r, label: a, disabled: n = !1, className: s = "", ...l }) => /* @__PURE__ */ f(
2194
2451
  "button",
2195
2452
  {
2196
2453
  type: "button",
2197
2454
  role: "switch",
2198
- "aria-checked": t,
2455
+ "aria-checked": e,
2199
2456
  disabled: n,
2200
- onClick: () => r == null ? void 0 : r(!t),
2201
- className: `inline-flex items-center gap-2 text-sm text-app-text disabled:cursor-not-allowed disabled:opacity-50 ${s}`,
2457
+ onClick: () => r == null ? void 0 : r(!e),
2458
+ className: `inline-flex min-h-8 items-center gap-2 text-sm text-app-text disabled:cursor-not-allowed disabled:opacity-50 ${s}`,
2202
2459
  ...l,
2203
2460
  children: [
2204
- /* @__PURE__ */ e(
2461
+ /* @__PURE__ */ t(
2205
2462
  "span",
2206
2463
  {
2207
2464
  "aria-hidden": "true",
2208
- className: `relative inline-block h-5 w-9 shrink-0 border transition ${t ? "border-app-strong bg-app-strong" : "border-app-border bg-app-bg"}`,
2209
- children: /* @__PURE__ */ e(
2465
+ className: `relative inline-block h-5 w-9 shrink-0 border transition ${e ? "border-app-strong bg-app-strong" : "border-app-border bg-app-bg"}`,
2466
+ children: /* @__PURE__ */ t(
2210
2467
  "span",
2211
2468
  {
2212
- className: `absolute top-0.5 h-3.5 w-3.5 transition-all ${t ? "left-[1.1rem] bg-app-bg" : "left-0.5 bg-app-muted"}`
2469
+ className: `absolute top-0.5 h-3.5 w-3.5 transition-all ${e ? "left-[1.1rem] bg-app-bg" : "left-0.5 bg-app-muted"}`
2213
2470
  }
2214
2471
  )
2215
2472
  }
@@ -2217,350 +2474,521 @@ const yt = (t, r, a) => {
2217
2474
  a
2218
2475
  ]
2219
2476
  }
2220
- ), we = { left: "text-left", center: "text-center", right: "text-right" }, Fr = ({ columns: t, rows: r, rowKey: a = "id", empty: n = "No data", caption: s, className: l = "" }) => /* @__PURE__ */ e("div", { className: `overflow-x-auto border border-app-border ${l}`, children: /* @__PURE__ */ h("table", { className: "w-full border-collapse bg-app-card text-sm text-app-text", children: [
2221
- s && /* @__PURE__ */ e("caption", { className: "sr-only", children: s }),
2222
- /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ e("tr", { className: "border-b border-app-border bg-app-bg", children: t.map((o) => /* @__PURE__ */ e(
2477
+ ), Ie = { left: "text-left", center: "text-center", right: "text-right" }, ra = ({ columns: e, rows: r, rowKey: a = "id", empty: n = "No data", caption: s, className: l = "" }) => /* @__PURE__ */ t("div", { className: `overflow-x-auto border border-app-border ${l}`, children: /* @__PURE__ */ f("table", { className: "w-full border-collapse bg-app-card text-sm text-app-text", children: [
2478
+ s && /* @__PURE__ */ t("caption", { className: "sr-only", children: s }),
2479
+ /* @__PURE__ */ t("thead", { children: /* @__PURE__ */ t("tr", { className: "border-b border-app-border bg-app-bg", children: e.map((o) => /* @__PURE__ */ t(
2223
2480
  "th",
2224
2481
  {
2225
2482
  scope: "col",
2226
- className: `px-4 py-2.5 text-xs font-semibold uppercase tracking-widest text-app-muted ${we[o.align ?? "left"]}`,
2483
+ className: `px-4 py-2.5 text-xs font-semibold uppercase tracking-widest text-app-muted ${Ie[o.align ?? "left"]}`,
2227
2484
  children: o.header
2228
2485
  },
2229
2486
  o.key
2230
2487
  )) }) }),
2231
- /* @__PURE__ */ e("tbody", { children: r.length === 0 ? /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e("td", { colSpan: t.length, className: "px-4 py-6 text-center text-app-muted", children: n }) }) : r.map((o) => /* @__PURE__ */ e("tr", { className: "border-b border-app-border last:border-b-0 hover:bg-app-bg", children: t.map((c) => /* @__PURE__ */ e("td", { className: `px-4 py-2.5 ${we[c.align ?? "left"]}`, children: c.render ? c.render(o) : o[c.key] }, c.key)) }, o[a])) })
2232
- ] }) }), jr = ({ items: t, value: r, defaultValue: a, onChange: n, className: s = "" }) => {
2233
- var x;
2234
- const l = S(), [o, c] = k(a ?? ((x = t[0]) == null ? void 0 : x.key)), i = r ?? o, u = E({}), m = (p) => {
2235
- r === void 0 && c(p), n == null || n(p);
2236
- }, d = t.filter((p) => !p.disabled), f = (p) => {
2237
- var C;
2238
- const g = d.findIndex((w) => w.key === i);
2239
- let y;
2240
- p.key === "ArrowRight" ? y = d[(g + 1) % d.length] : p.key === "ArrowLeft" ? y = d[(g - 1 + d.length) % d.length] : p.key === "Home" ? y = d[0] : p.key === "End" && (y = d[d.length - 1]), y && (p.preventDefault(), m(y.key), (C = u.current[y.key]) == null || C.focus());
2241
- }, b = t.find((p) => p.key === i);
2242
- return /* @__PURE__ */ h("div", { className: s, children: [
2243
- /* @__PURE__ */ e(
2488
+ /* @__PURE__ */ t("tbody", { children: r.length === 0 ? /* @__PURE__ */ t("tr", { children: /* @__PURE__ */ t("td", { colSpan: e.length, className: "px-4 py-6 text-center text-app-muted", children: n }) }) : r.map((o) => /* @__PURE__ */ t("tr", { className: "border-b border-app-border last:border-b-0 hover:bg-app-bg", children: e.map((i) => /* @__PURE__ */ t("td", { className: `px-4 py-2.5 ${Ie[i.align ?? "left"]}`, children: i.render ? i.render(o) : o[i.key] }, i.key)) }, o[a])) })
2489
+ ] }) }), aa = ({ items: e, value: r, defaultValue: a, onChange: n, className: s = "" }) => {
2490
+ var g;
2491
+ const l = O(), [o, i] = D(a ?? ((g = e[0]) == null ? void 0 : g.key)), c = r ?? o, u = A({}), b = (h) => {
2492
+ r === void 0 && i(h), n == null || n(h);
2493
+ }, d = e.filter((h) => !h.disabled), p = (h) => {
2494
+ var N;
2495
+ const x = d.findIndex((M) => M.key === c);
2496
+ let v;
2497
+ h.key === "ArrowRight" ? v = d[(x + 1) % d.length] : h.key === "ArrowLeft" ? v = d[(x - 1 + d.length) % d.length] : h.key === "Home" ? v = d[0] : h.key === "End" && (v = d[d.length - 1]), v && (h.preventDefault(), b(v.key), (N = u.current[v.key]) == null || N.focus());
2498
+ }, m = e.find((h) => h.key === c);
2499
+ return /* @__PURE__ */ f("div", { className: s, children: [
2500
+ /* @__PURE__ */ t(
2244
2501
  "div",
2245
2502
  {
2246
2503
  role: "tablist",
2247
- onKeyDown: f,
2504
+ onKeyDown: p,
2248
2505
  className: "flex overflow-x-auto overflow-y-hidden shadow-[inset_0_-1px_0_rgb(var(--color-app-border))]",
2249
- children: t.map((p) => {
2250
- const g = p.key === i;
2251
- return /* @__PURE__ */ e(
2506
+ children: e.map((h) => {
2507
+ const x = h.key === c;
2508
+ return /* @__PURE__ */ t(
2252
2509
  "button",
2253
2510
  {
2254
- ref: (y) => u.current[p.key] = y,
2255
- id: `${l}-tab-${p.key}`,
2511
+ ref: (v) => u.current[h.key] = v,
2512
+ id: `${l}-tab-${h.key}`,
2256
2513
  type: "button",
2257
2514
  role: "tab",
2258
- "aria-selected": g,
2259
- "aria-controls": `${l}-panel-${p.key}`,
2260
- tabIndex: g ? 0 : -1,
2261
- disabled: p.disabled,
2262
- onClick: () => m(p.key),
2263
- className: `whitespace-nowrap border-b-2 px-4 py-2 text-xs font-semibold uppercase tracking-widest transition disabled:cursor-not-allowed disabled:opacity-50 ${g ? "border-app-strong text-app-text" : "border-transparent text-app-muted hover:text-app-text"}`,
2264
- children: p.label
2515
+ "aria-selected": x,
2516
+ "aria-controls": `${l}-panel-${h.key}`,
2517
+ tabIndex: x ? 0 : -1,
2518
+ disabled: h.disabled,
2519
+ onClick: () => b(h.key),
2520
+ className: `whitespace-nowrap border-b-2 px-4 py-2 text-xs font-semibold uppercase tracking-widest transition disabled:cursor-not-allowed disabled:opacity-50 ${x ? "border-app-strong text-app-text" : "border-transparent text-app-muted hover:text-app-text"}`,
2521
+ children: h.label
2265
2522
  },
2266
- p.key
2523
+ h.key
2267
2524
  );
2268
2525
  })
2269
2526
  }
2270
2527
  ),
2271
- (b == null ? void 0 : b.content) !== void 0 && /* @__PURE__ */ e(
2528
+ (m == null ? void 0 : m.content) !== void 0 && /* @__PURE__ */ t(
2272
2529
  "div",
2273
2530
  {
2274
2531
  role: "tabpanel",
2275
- id: `${l}-panel-${b.key}`,
2276
- "aria-labelledby": `${l}-tab-${b.key}`,
2532
+ id: `${l}-panel-${m.key}`,
2533
+ "aria-labelledby": `${l}-tab-${m.key}`,
2277
2534
  tabIndex: 0,
2278
2535
  className: "pt-4",
2279
- children: b.content
2536
+ children: m.content
2280
2537
  }
2281
2538
  )
2282
2539
  ] });
2283
- }, Bt = {
2540
+ }, na = ({ href: e, linkComponent: r = "a", linkProp: a = "href", className: n = "", children: s, ...l }) => /* @__PURE__ */ t(
2541
+ r,
2542
+ {
2543
+ [a]: e,
2544
+ className: `text-app-text underline underline-offset-2 transition hover:text-app-strong ${n}`,
2545
+ ...l,
2546
+ children: s
2547
+ }
2548
+ ), tr = {
2284
2549
  default: "bg-app-strong",
2285
2550
  success: "bg-emerald-500",
2286
2551
  warning: "bg-amber-400",
2287
2552
  danger: "bg-red-500"
2288
- }, Pr = ({ items: t, className: r = "" }) => /* @__PURE__ */ e("ol", { className: `m-0 list-none p-0 ${r}`, children: t.map((a, n) => /* @__PURE__ */ h("li", { className: "relative flex gap-4 pb-6 last:pb-0", children: [
2289
- n < t.length - 1 && /* @__PURE__ */ e("span", { "aria-hidden": "true", className: "absolute left-[0.3rem] top-4 bottom-0 w-px bg-app-border" }),
2290
- /* @__PURE__ */ e("span", { "aria-hidden": "true", className: `relative mt-1.5 h-2.5 w-2.5 shrink-0 ${Bt[a.tone ?? "default"]}` }),
2291
- /* @__PURE__ */ h("div", { className: "min-w-0 flex-1", children: [
2292
- /* @__PURE__ */ h("div", { className: "flex flex-wrap items-baseline justify-between gap-x-3", children: [
2293
- /* @__PURE__ */ e("span", { className: "text-sm font-semibold text-app-text", children: a.title }),
2294
- a.time && /* @__PURE__ */ e("time", { className: "text-xs text-app-muted", children: a.time })
2553
+ }, la = ({ items: e, className: r = "" }) => /* @__PURE__ */ t("ol", { className: `m-0 list-none p-0 ${r}`, children: e.map((a, n) => /* @__PURE__ */ f("li", { className: "relative flex gap-4 pb-6 last:pb-0", children: [
2554
+ n < e.length - 1 && /* @__PURE__ */ t("span", { "aria-hidden": "true", className: "absolute left-[0.3rem] top-4 bottom-0 w-px bg-app-border" }),
2555
+ /* @__PURE__ */ t("span", { "aria-hidden": "true", className: `relative mt-1.5 h-2.5 w-2.5 shrink-0 ${tr[a.tone ?? "default"]}` }),
2556
+ /* @__PURE__ */ f("div", { className: "min-w-0 flex-1", children: [
2557
+ /* @__PURE__ */ f("div", { className: "flex flex-wrap items-baseline justify-between gap-x-3", children: [
2558
+ /* @__PURE__ */ t("span", { className: "text-sm font-semibold text-app-text", children: a.title }),
2559
+ a.time && /* @__PURE__ */ t("time", { className: "text-xs text-app-muted", children: a.time })
2295
2560
  ] }),
2296
- a.description && /* @__PURE__ */ e("p", { className: "m-0 mt-0.5 text-sm text-app-muted", children: a.description })
2561
+ a.description && /* @__PURE__ */ t("p", { className: "m-0 mt-0.5 text-sm text-app-muted", children: a.description })
2297
2562
  ] })
2298
- ] }, a.key)) }), Br = ({ label: t, value: r, onChange: a, step: n = 900, min: s, max: l, error: o, ...c }) => {
2299
- const i = S(), u = `${i}-error`;
2300
- return /* @__PURE__ */ h("div", { className: "flex flex-col gap-1", children: [
2301
- t && /* @__PURE__ */ e("label", { htmlFor: i, className: "text-xs font-semibold uppercase tracking-widest text-app-muted", children: t }),
2302
- /* @__PURE__ */ e(
2303
- "input",
2563
+ ] }, a.key)) }), G = (e) => String(e).padStart(2, "0"), he = (e) => {
2564
+ const r = /^(\d{1,2}):(\d{2})/.exec(e ?? "");
2565
+ if (!r) return null;
2566
+ const a = Number(r[1]), n = Number(r[2]);
2567
+ return a < 24 && n < 60 ? { hour: a, minute: n } : null;
2568
+ }, Se = ({ hour: e, minute: r }) => e * 60 + r, rr = () => /* @__PURE__ */ f(
2569
+ "svg",
2570
+ {
2571
+ "aria-hidden": "true",
2572
+ focusable: "false",
2573
+ viewBox: "0 0 24 24",
2574
+ fill: "none",
2575
+ stroke: "currentColor",
2576
+ strokeWidth: "2",
2577
+ className: "h-4 w-4 shrink-0 text-app-muted",
2578
+ children: [
2579
+ /* @__PURE__ */ t("circle", { cx: "12", cy: "12", r: "9" }),
2580
+ /* @__PURE__ */ t("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 7v5l3 2" })
2581
+ ]
2582
+ }
2583
+ ), me = ({ label: e, options: r, selected: a, onPick: n, columnRef: s }) => /* @__PURE__ */ t(
2584
+ "div",
2585
+ {
2586
+ ref: s,
2587
+ role: "listbox",
2588
+ "aria-label": e,
2589
+ className: "flex max-h-56 w-14 flex-col overflow-y-auto border-r border-app-border last:border-r-0",
2590
+ children: r.map((l) => {
2591
+ const o = l.value === a;
2592
+ return /* @__PURE__ */ t(
2593
+ "button",
2594
+ {
2595
+ type: "button",
2596
+ role: "option",
2597
+ "aria-selected": o,
2598
+ disabled: l.disabled,
2599
+ "data-selected": o,
2600
+ tabIndex: o || a === null && l.first ? 0 : -1,
2601
+ onClick: () => n(l.value),
2602
+ onKeyDown: (i) => {
2603
+ const c = [...i.currentTarget.parentElement.querySelectorAll("button:not(:disabled)")], u = c.indexOf(i.currentTarget), b = i.key === "ArrowDown" ? 1 : i.key === "ArrowUp" ? -1 : 0;
2604
+ if (b) {
2605
+ i.preventDefault();
2606
+ const d = c[Math.min(Math.max(u + b, 0), c.length - 1)];
2607
+ d == null || d.focus(), d == null || d.click();
2608
+ } else if (i.key === "ArrowLeft" || i.key === "ArrowRight") {
2609
+ const d = [...i.currentTarget.closest("[data-columns]").querySelectorAll("[role=listbox]")], p = d[d.indexOf(i.currentTarget.parentElement) + (i.key === "ArrowRight" ? 1 : -1)], m = (p == null ? void 0 : p.querySelector('[data-selected="true"]')) ?? (p == null ? void 0 : p.querySelector("button:not(:disabled)"));
2610
+ m && (i.preventDefault(), m.focus());
2611
+ }
2612
+ },
2613
+ className: `px-3 py-2 text-center text-sm tabular-nums transition disabled:cursor-not-allowed disabled:opacity-30 ${o ? "bg-app-strong font-semibold text-app-bg" : "text-app-text hover:bg-app-bg"}`,
2614
+ children: l.label
2615
+ },
2616
+ l.value
2617
+ );
2618
+ })
2619
+ }
2620
+ ), sa = ({
2621
+ label: e,
2622
+ value: r,
2623
+ onChange: a,
2624
+ step: n = 900,
2625
+ min: s,
2626
+ max: l,
2627
+ hour12: o = !1,
2628
+ placeholder: i = "Select time",
2629
+ error: c,
2630
+ disabled: u = !1,
2631
+ className: b = "",
2632
+ ...d
2633
+ }) => {
2634
+ const p = O(), m = `${p}-error`, g = A(null), h = A(null), x = A(null), v = A(null), [N, M] = D(!1), y = he(r), w = Math.max(1, Math.round(n / 60)), C = Array.from({ length: Math.ceil(60 / w) }, (E, S) => S * w), T = he(s), L = he(l), I = (E, S) => {
2635
+ const W = E * 60 + S;
2636
+ return (!T || W >= Se(T)) && (!L || W <= Se(L));
2637
+ };
2638
+ V(N, [g, x], (E) => {
2639
+ var S;
2640
+ M(!1), E === "escape" && ((S = h.current) == null || S.focus());
2641
+ }), P(() => {
2642
+ var W, ne;
2643
+ const E = x.current;
2644
+ if (!N || !E) return;
2645
+ E.querySelectorAll("[role=listbox]").forEach((le) => {
2646
+ const de = le.querySelector('[data-selected="true"]');
2647
+ de && (le.scrollTop = de.offsetTop - le.clientHeight / 2 + de.offsetHeight / 2);
2648
+ });
2649
+ const S = ((W = v.current) == null ? void 0 : W.querySelector('[data-selected="true"]')) ?? ((ne = v.current) == null ? void 0 : ne.querySelector("button:not(:disabled)"));
2650
+ S == null || S.focus({ preventScroll: !0 });
2651
+ }, [N]);
2652
+ const j = (E, S) => a == null ? void 0 : a(`${G(E)}:${G(S)}`), B = (E) => {
2653
+ const S = C.find((W) => W === (y == null ? void 0 : y.minute) && I(E, W)) ?? C.find((W) => I(E, W)) ?? 0;
2654
+ j(E, S);
2655
+ }, z = (E) => j((y == null ? void 0 : y.hour) ?? (T ? T.hour : 0), E), q = (E) => {
2656
+ const S = (y == null ? void 0 : y.hour) ?? 0;
2657
+ j(E ? S % 12 + 12 : S % 12, (y == null ? void 0 : y.minute) ?? 0);
2658
+ }, k = ((y == null ? void 0 : y.hour) ?? 0) >= 12, $ = o ? Array.from({ length: 12 }, (E, S) => {
2659
+ const W = S === 0 ? 12 : S, ne = S % 12 + (k ? 12 : 0);
2660
+ return {
2661
+ value: ne,
2662
+ label: G(W),
2663
+ first: S === 0,
2664
+ disabled: !C.some((le) => I(ne, le))
2665
+ };
2666
+ }) : Array.from({ length: 24 }, (E, S) => ({
2667
+ value: S,
2668
+ label: G(S),
2669
+ first: S === 0,
2670
+ disabled: !C.some((W) => I(S, W))
2671
+ })), R = C.map((E, S) => ({
2672
+ value: E,
2673
+ label: G(E),
2674
+ first: S === 0,
2675
+ disabled: !I((y == null ? void 0 : y.hour) ?? (T ? T.hour : 0), E)
2676
+ })), F = y ? o ? `${G(y.hour % 12 === 0 ? 12 : y.hour % 12)}:${G(y.minute)} ${k ? "PM" : "AM"}` : `${G(y.hour)}:${G(y.minute)}` : "";
2677
+ return /* @__PURE__ */ f("div", { ref: g, className: "relative flex flex-col gap-1", children: [
2678
+ e && /* @__PURE__ */ t(U, { htmlFor: p, children: e }),
2679
+ /* @__PURE__ */ f(
2680
+ "button",
2304
2681
  {
2305
- id: i,
2306
- type: "time",
2307
- step: n,
2308
- min: s,
2309
- max: l,
2310
- value: r,
2311
- "aria-invalid": !!o,
2312
- "aria-describedby": o ? u : void 0,
2313
- onChange: (m) => a == null ? void 0 : a(m.target.value),
2314
- className: Z(!!o),
2315
- ...c
2682
+ ref: h,
2683
+ id: p,
2684
+ type: "button",
2685
+ disabled: u,
2686
+ "aria-haspopup": "dialog",
2687
+ "aria-expanded": N,
2688
+ "aria-invalid": !!c,
2689
+ "aria-describedby": c ? m : void 0,
2690
+ onClick: () => M((E) => !E),
2691
+ className: `${se(!!c)} flex items-center justify-between gap-2 text-left ${b}`,
2692
+ ...d,
2693
+ children: [
2694
+ /* @__PURE__ */ t("span", { className: F ? "tabular-nums" : "text-app-muted", children: F || i }),
2695
+ /* @__PURE__ */ t(rr, {})
2696
+ ]
2697
+ }
2698
+ ),
2699
+ /* @__PURE__ */ t(
2700
+ X,
2701
+ {
2702
+ open: N,
2703
+ anchorRef: h,
2704
+ panelRef: x,
2705
+ placement: "bottom-start",
2706
+ role: "dialog",
2707
+ "aria-label": "Choose time",
2708
+ className: "border border-app-border bg-app-card shadow-xl",
2709
+ children: /* @__PURE__ */ f("div", { "data-columns": !0, className: "flex", children: [
2710
+ /* @__PURE__ */ t(
2711
+ me,
2712
+ {
2713
+ label: "Hours",
2714
+ options: $,
2715
+ selected: y ? y.hour : null,
2716
+ onPick: B,
2717
+ columnRef: v
2718
+ }
2719
+ ),
2720
+ /* @__PURE__ */ t(me, { label: "Minutes", options: R, selected: y ? y.minute : null, onPick: z }),
2721
+ o && /* @__PURE__ */ t(
2722
+ me,
2723
+ {
2724
+ label: "AM or PM",
2725
+ options: [
2726
+ { value: "AM", label: "AM", first: !0 },
2727
+ { value: "PM", label: "PM" }
2728
+ ],
2729
+ selected: y ? k ? "PM" : "AM" : null,
2730
+ onPick: (E) => q(E === "PM")
2731
+ }
2732
+ )
2733
+ ] })
2316
2734
  }
2317
2735
  ),
2318
- o && /* @__PURE__ */ e("span", { id: u, className: "text-xs text-red-700 dark:text-red-400", children: o })
2736
+ c && /* @__PURE__ */ t("span", { id: m, className: "text-xs text-red-700 dark:text-red-400", children: c })
2319
2737
  ] });
2320
- }, Or = (t) => {
2321
- const { toast: r } = t;
2322
- return /* @__PURE__ */ e(
2738
+ }, oa = (e) => {
2739
+ const { toast: r } = e;
2740
+ return /* @__PURE__ */ t(
2323
2741
  "div",
2324
2742
  {
2325
2743
  role: "status",
2326
2744
  "aria-live": "polite",
2327
2745
  "aria-atomic": "true",
2328
2746
  className: "fixed bottom-5 right-5 z-[var(--xd-z-toast,90)]",
2329
- children: r && /* @__PURE__ */ h(
2747
+ children: r && /* @__PURE__ */ f(
2330
2748
  "div",
2331
2749
  {
2332
2750
  className: `max-w-sm px-4 py-3 text-sm font-semibold shadow-xl ${r.type === "error" ? "bg-red-700 text-white" : "bg-emerald-700 text-white"}`,
2333
2751
  children: [
2334
2752
  r.msg,
2335
- r.link && /* @__PURE__ */ h(Y, { children: [
2753
+ r.link && /* @__PURE__ */ f(re, { children: [
2336
2754
  " ",
2337
- /* @__PURE__ */ e("a", { href: r.link.href, target: "_blank", rel: "noreferrer", className: "underline underline-offset-2", children: r.link.label })
2755
+ /* @__PURE__ */ t("a", { href: r.link.href, target: "_blank", rel: "noreferrer", className: "underline underline-offset-2", children: r.link.label })
2338
2756
  ] })
2339
2757
  ]
2340
2758
  }
2341
2759
  )
2342
2760
  }
2343
2761
  );
2344
- }, Oe = (t, r, a = 0, n = null, s = []) => (t.forEach((l) => {
2762
+ }, Qe = (e, r, a = 0, n = null, s = []) => (e.forEach((l) => {
2345
2763
  var o;
2346
- s.push({ node: l, depth: a, parent: n }), (o = l.children) != null && o.length && r.includes(l.key) && Oe(l.children, r, a + 1, l.key, s);
2347
- }), s), Rr = ({
2348
- nodes: t,
2764
+ s.push({ node: l, depth: a, parent: n }), (o = l.children) != null && o.length && r.includes(l.key) && Qe(l.children, r, a + 1, l.key, s);
2765
+ }), s), ia = ({
2766
+ nodes: e,
2349
2767
  selected: r,
2350
2768
  onSelect: a,
2351
2769
  defaultExpanded: n = [],
2352
2770
  expanded: s,
2353
2771
  onExpandedChange: l,
2354
2772
  label: o = "Tree",
2355
- className: c = ""
2773
+ className: i = ""
2356
2774
  }) => {
2357
- var D;
2358
- const [i, u] = k(n), m = s ?? i, [d, f] = k(null), b = (v) => {
2359
- s === void 0 && u(v), l == null || l(v);
2360
- }, x = (v) => b(m.includes(v) ? m.filter((L) => L !== v) : [...m, v]), p = Oe(t, m), g = p.some((v) => v.node.key === d) ? d : (D = p[0]) == null ? void 0 : D.node.key, y = (v) => {
2361
- f(v), requestAnimationFrame(() => {
2362
- var L;
2363
- return (L = document.getElementById(`${C}-${v}`)) == null ? void 0 : L.focus();
2775
+ var y;
2776
+ const [c, u] = D(n), b = s ?? c, [d, p] = D(null), m = (w) => {
2777
+ s === void 0 && u(w), l == null || l(w);
2778
+ }, g = (w) => m(b.includes(w) ? b.filter((C) => C !== w) : [...b, w]), h = Qe(e, b), x = h.some((w) => w.node.key === d) ? d : (y = h[0]) == null ? void 0 : y.node.key, v = (w) => {
2779
+ p(w), requestAnimationFrame(() => {
2780
+ var C;
2781
+ return (C = document.getElementById(`${N}-${w}`)) == null ? void 0 : C.focus();
2364
2782
  });
2365
- }, C = `tree-${o.replace(/\W+/g, "-")}`, w = (v, L) => {
2366
- var j;
2367
- const { node: M, parent: N } = p[L], A = !!((j = M.children) != null && j.length), F = m.includes(M.key);
2368
- switch (v.key) {
2783
+ }, N = `tree-${o.replace(/\W+/g, "-")}`, M = (w, C) => {
2784
+ var B;
2785
+ const { node: T, parent: L } = h[C], I = !!((B = T.children) != null && B.length), j = b.includes(T.key);
2786
+ switch (w.key) {
2369
2787
  case "ArrowDown":
2370
- p[L + 1] && y(p[L + 1].node.key);
2788
+ h[C + 1] && v(h[C + 1].node.key);
2371
2789
  break;
2372
2790
  case "ArrowUp":
2373
- p[L - 1] && y(p[L - 1].node.key);
2791
+ h[C - 1] && v(h[C - 1].node.key);
2374
2792
  break;
2375
2793
  case "ArrowRight":
2376
- A && !F ? x(M.key) : A && y(M.children[0].key);
2794
+ I && !j ? g(T.key) : I && v(T.children[0].key);
2377
2795
  break;
2378
2796
  case "ArrowLeft":
2379
- A && F ? x(M.key) : N !== null && y(N);
2797
+ I && j ? g(T.key) : L !== null && v(L);
2380
2798
  break;
2381
2799
  case "Home":
2382
- y(p[0].node.key);
2800
+ v(h[0].node.key);
2383
2801
  break;
2384
2802
  case "End":
2385
- y(p[p.length - 1].node.key);
2803
+ v(h[h.length - 1].node.key);
2386
2804
  break;
2387
2805
  case "Enter":
2388
2806
  case " ":
2389
- a == null || a(M.key);
2807
+ a == null || a(T.key);
2390
2808
  break;
2391
2809
  default:
2392
2810
  return;
2393
2811
  }
2394
- v.preventDefault();
2812
+ w.preventDefault();
2395
2813
  };
2396
- return /* @__PURE__ */ e("ul", { role: "tree", "aria-label": o, className: `m-0 list-none p-0 text-sm text-app-text ${c}`, children: p.map(({ node: v, depth: L }, M) => {
2397
- var j;
2398
- const N = !!((j = v.children) != null && j.length), A = m.includes(v.key), F = r === v.key;
2399
- return /* @__PURE__ */ e(
2814
+ return /* @__PURE__ */ t("ul", { role: "tree", "aria-label": o, className: `m-0 list-none p-0 text-sm text-app-text ${i}`, children: h.map(({ node: w, depth: C }, T) => {
2815
+ var B;
2816
+ const L = !!((B = w.children) != null && B.length), I = b.includes(w.key), j = r === w.key;
2817
+ return /* @__PURE__ */ t(
2400
2818
  "li",
2401
2819
  {
2402
- id: `${C}-${v.key}`,
2820
+ id: `${N}-${w.key}`,
2403
2821
  role: "treeitem",
2404
- "aria-level": L + 1,
2405
- "aria-expanded": N ? A : void 0,
2406
- "aria-selected": F,
2407
- tabIndex: v.key === g ? 0 : -1,
2408
- onKeyDown: (z) => w(z, M),
2409
- onFocus: () => f(v.key),
2822
+ "aria-level": C + 1,
2823
+ "aria-expanded": L ? I : void 0,
2824
+ "aria-selected": j,
2825
+ tabIndex: w.key === x ? 0 : -1,
2826
+ onKeyDown: (z) => M(z, T),
2827
+ onFocus: () => p(w.key),
2410
2828
  className: "list-none outline-none",
2411
- children: /* @__PURE__ */ h(
2829
+ children: /* @__PURE__ */ f(
2412
2830
  "div",
2413
2831
  {
2414
- style: { paddingLeft: `${L * 1.25 + 0.5}rem` },
2415
- className: `flex cursor-pointer items-center gap-1 py-1.5 pr-3 transition hover:bg-app-bg ${F ? "bg-app-soft/20 font-semibold" : ""}`,
2832
+ style: { paddingLeft: `${C * 1.25 + 0.5}rem` },
2833
+ className: `flex cursor-pointer items-center gap-1 py-1.5 pr-3 transition hover:bg-app-bg ${j ? "bg-app-soft/20 font-semibold" : ""}`,
2416
2834
  onClick: () => {
2417
- a == null || a(v.key), N && x(v.key);
2835
+ a == null || a(w.key), L && g(w.key);
2418
2836
  },
2419
2837
  children: [
2420
- /* @__PURE__ */ e("span", { "aria-hidden": "true", className: "w-4 text-center text-xs text-app-muted", children: N ? A ? "▾" : "▸" : "" }),
2421
- v.label
2838
+ /* @__PURE__ */ t("span", { "aria-hidden": "true", className: "flex h-5 w-5 shrink-0 items-center justify-center text-app-muted", children: L && /* @__PURE__ */ t(
2839
+ "svg",
2840
+ {
2841
+ viewBox: "0 0 24 24",
2842
+ fill: "none",
2843
+ stroke: "currentColor",
2844
+ strokeWidth: "2.5",
2845
+ className: `h-4 w-4 transition-transform ${I ? "rotate-90" : ""}`,
2846
+ children: /* @__PURE__ */ t("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" })
2847
+ }
2848
+ ) }),
2849
+ w.label
2422
2850
  ]
2423
2851
  }
2424
2852
  )
2425
2853
  },
2426
- v.key
2854
+ w.key
2427
2855
  );
2428
2856
  }) });
2429
- }, ke = (t) => {
2430
- if (!Number.isFinite(t)) return "0:00";
2431
- const r = Math.floor(t / 60), a = Math.floor(t % 60);
2857
+ }, Pe = (e) => {
2858
+ if (!Number.isFinite(e)) return "0:00";
2859
+ const r = Math.floor(e / 60), a = Math.floor(e % 60);
2432
2860
  return `${r}:${String(a).padStart(2, "0")}`;
2433
- }, ae = "px-2 py-1 text-xs font-semibold uppercase tracking-widest text-app-text transition hover:bg-app-bg focus-visible:outline-offset-[-2px]", zr = ({ src: t, poster: r, title: a = "Video", ratio: n = "video", className: s = "", children: l, ...o }) => {
2434
- const c = E(null), i = E(null), [u, m] = k(!1), [d, f] = k(0), [b, x] = k(0), [p, g] = k(!1), [y, C] = k(!1);
2435
- T(() => {
2436
- const v = () => C(document.fullscreenElement === i.current);
2437
- return document.addEventListener("fullscreenchange", v), () => document.removeEventListener("fullscreenchange", v);
2861
+ }, fe = "min-h-9 px-2 py-1 text-xs font-semibold uppercase tracking-widest text-app-text transition hover:bg-app-bg focus-visible:outline-offset-[-2px]", ca = ({ src: e, poster: r, title: a = "Video", ratio: n = "video", className: s = "", children: l, ...o }) => {
2862
+ const i = A(null), c = A(null), [u, b] = D(!1), [d, p] = D(0), [m, g] = D(0), [h, x] = D(!1), [v, N] = D(!1);
2863
+ P(() => {
2864
+ const w = () => N(document.fullscreenElement === c.current);
2865
+ return document.addEventListener("fullscreenchange", w), () => document.removeEventListener("fullscreenchange", w);
2438
2866
  }, []);
2439
- const w = () => {
2440
- const v = c.current;
2441
- v.paused ? v.play().catch(() => {
2442
- }) : v.pause();
2443
- }, D = () => {
2444
- var v, L;
2445
- document.fullscreenElement ? document.exitFullscreen() : (L = (v = i.current) == null ? void 0 : v.requestFullscreen) == null || L.call(v);
2867
+ const M = () => {
2868
+ const w = i.current;
2869
+ w.paused ? w.play().catch(() => {
2870
+ }) : w.pause();
2871
+ }, y = () => {
2872
+ var w, C;
2873
+ document.fullscreenElement ? document.exitFullscreen() : (C = (w = c.current) == null ? void 0 : w.requestFullscreen) == null || C.call(w);
2446
2874
  };
2447
- return /* @__PURE__ */ h("div", { ref: i, className: `flex flex-col border border-app-border bg-app-card ${s}`, children: [
2448
- /* @__PURE__ */ e(
2875
+ return /* @__PURE__ */ f("div", { ref: c, className: `flex flex-col border border-app-border bg-app-card ${s}`, children: [
2876
+ /* @__PURE__ */ t(
2449
2877
  "video",
2450
2878
  {
2451
- ref: c,
2452
- src: t,
2879
+ ref: i,
2880
+ src: e,
2453
2881
  poster: r,
2454
2882
  title: a,
2455
- muted: p,
2883
+ muted: h,
2456
2884
  playsInline: !0,
2457
2885
  preload: "metadata",
2458
- className: `block w-full bg-black ${n === "video" ? "aspect-video" : ""} ${y ? "flex-1" : ""}`,
2459
- onClick: w,
2460
- onPlay: () => m(!0),
2461
- onPause: () => m(!1),
2462
- onTimeUpdate: (v) => f(v.currentTarget.currentTime),
2463
- onLoadedMetadata: (v) => x(v.currentTarget.duration),
2886
+ className: `block w-full bg-black ${n === "video" ? "aspect-video" : ""} ${v ? "flex-1" : ""}`,
2887
+ onClick: M,
2888
+ onPlay: () => b(!0),
2889
+ onPause: () => b(!1),
2890
+ onTimeUpdate: (w) => p(w.currentTarget.currentTime),
2891
+ onLoadedMetadata: (w) => g(w.currentTarget.duration),
2464
2892
  ...o,
2465
2893
  children: l
2466
2894
  }
2467
2895
  ),
2468
- /* @__PURE__ */ h(
2896
+ /* @__PURE__ */ f(
2469
2897
  "div",
2470
2898
  {
2471
2899
  role: "group",
2472
2900
  "aria-label": `${a} controls`,
2473
2901
  className: "flex items-center gap-1 border-t border-app-border px-1 py-1",
2474
2902
  children: [
2475
- /* @__PURE__ */ e("button", { type: "button", className: ae, onClick: w, "aria-label": u ? "Pause" : "Play", children: u ? "Pause" : "Play" }),
2476
- /* @__PURE__ */ e("span", { className: "w-10 text-center text-xs tabular-nums text-app-muted", children: ke(d) }),
2477
- /* @__PURE__ */ e(
2903
+ /* @__PURE__ */ t("button", { type: "button", className: fe, onClick: M, "aria-label": u ? "Pause" : "Play", children: u ? "Pause" : "Play" }),
2904
+ /* @__PURE__ */ t("span", { className: "w-10 text-center text-xs tabular-nums text-app-muted", children: Pe(d) }),
2905
+ /* @__PURE__ */ t(
2478
2906
  "input",
2479
2907
  {
2480
2908
  type: "range",
2481
2909
  "aria-label": "Seek",
2482
2910
  min: 0,
2483
- max: b || 0,
2911
+ max: m || 0,
2484
2912
  step: "any",
2485
- value: Math.min(d, b || 0),
2486
- onChange: (v) => {
2487
- c.current.currentTime = Number(v.target.value), f(Number(v.target.value));
2913
+ value: Math.min(d, m || 0),
2914
+ onChange: (w) => {
2915
+ i.current.currentTime = Number(w.target.value), p(Number(w.target.value));
2488
2916
  },
2489
2917
  className: "min-w-0 flex-1 cursor-pointer accent-[rgb(var(--color-app-strong))]"
2490
2918
  }
2491
2919
  ),
2492
- /* @__PURE__ */ e("span", { className: "w-10 text-center text-xs tabular-nums text-app-muted", children: ke(b) }),
2493
- /* @__PURE__ */ e("button", { type: "button", className: ae, "aria-pressed": p, onClick: () => g((v) => !v), children: p ? "Unmute" : "Mute" }),
2494
- /* @__PURE__ */ e("button", { type: "button", className: ae, onClick: D, children: y ? "Exit" : "Full" })
2920
+ /* @__PURE__ */ t("span", { className: "w-10 text-center text-xs tabular-nums text-app-muted", children: Pe(m) }),
2921
+ /* @__PURE__ */ t("button", { type: "button", className: fe, "aria-pressed": h, onClick: () => x((w) => !w), children: h ? "Unmute" : "Mute" }),
2922
+ /* @__PURE__ */ t("button", { type: "button", className: fe, onClick: y, children: v ? "Exit" : "Full" })
2495
2923
  ]
2496
2924
  }
2497
2925
  )
2498
2926
  ] });
2499
- }, Wr = ({
2500
- items: t,
2927
+ }, da = ({
2928
+ items: e,
2501
2929
  itemHeight: r,
2502
2930
  height: a = 320,
2503
2931
  overscan: n = 4,
2504
2932
  renderItem: s,
2505
2933
  getKey: l,
2506
2934
  label: o = "List",
2507
- className: c = ""
2935
+ className: i = ""
2508
2936
  }) => {
2509
- const [i, u] = k(0), m = Math.max(0, Math.floor(i / r) - n), d = Math.min(t.length, Math.ceil((i + a) / r) + n);
2510
- return /* @__PURE__ */ e(
2937
+ const [c, u] = D(0), b = Math.max(0, Math.floor(c / r) - n), d = Math.min(e.length, Math.ceil((c + a) / r) + n);
2938
+ return /* @__PURE__ */ t(
2511
2939
  "div",
2512
2940
  {
2513
2941
  role: "list",
2514
2942
  "aria-label": o,
2515
- "aria-rowcount": t.length,
2943
+ "aria-rowcount": e.length,
2516
2944
  tabIndex: 0,
2517
- onScroll: (f) => u(f.currentTarget.scrollTop),
2945
+ onScroll: (p) => u(p.currentTarget.scrollTop),
2518
2946
  style: { height: a },
2519
- className: `overflow-y-auto border border-app-border bg-app-card ${c}`,
2520
- children: /* @__PURE__ */ e("div", { style: { height: t.length * r, position: "relative" }, children: t.slice(m, d).map((f, b) => {
2521
- const x = m + b;
2522
- return /* @__PURE__ */ e(
2947
+ className: `overflow-y-auto border border-app-border bg-app-card ${i}`,
2948
+ children: /* @__PURE__ */ t("div", { style: { height: e.length * r, position: "relative" }, children: e.slice(b, d).map((p, m) => {
2949
+ const g = b + m;
2950
+ return /* @__PURE__ */ t(
2523
2951
  "div",
2524
2952
  {
2525
2953
  role: "listitem",
2526
- "aria-posinset": x + 1,
2527
- "aria-setsize": t.length,
2528
- style: { position: "absolute", top: x * r, height: r, left: 0, right: 0 },
2954
+ "aria-posinset": g + 1,
2955
+ "aria-setsize": e.length,
2956
+ style: { position: "absolute", top: g * r, height: r, left: 0, right: 0 },
2529
2957
  className: "flex items-center border-b border-app-border px-4 text-sm text-app-text",
2530
- children: s(f, x)
2958
+ children: s(p, g)
2531
2959
  },
2532
- l ? l(f, x) : x
2960
+ l ? l(p, g) : g
2533
2961
  );
2534
2962
  }) })
2535
2963
  }
2536
2964
  );
2537
- }, Kr = ({ className: t }) => /* @__PURE__ */ h(
2965
+ }, pa = ({ className: e }) => /* @__PURE__ */ f(
2538
2966
  "svg",
2539
2967
  {
2540
2968
  "aria-hidden": "true",
2541
2969
  focusable: "false",
2542
- className: t ?? "w-3.5 h-3.5",
2970
+ className: e ?? "w-3.5 h-3.5",
2543
2971
  viewBox: "0 0 24 24",
2544
2972
  fill: "none",
2545
2973
  stroke: "currentColor",
2546
2974
  strokeWidth: "2",
2547
2975
  children: [
2548
- /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19 12H5" }),
2549
- /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 5l-7 7 7 7" })
2976
+ /* @__PURE__ */ t("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19 12H5" }),
2977
+ /* @__PURE__ */ t("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 5l-7 7 7 7" })
2550
2978
  ]
2551
2979
  }
2552
- ), qr = ({ className: t }) => /* @__PURE__ */ h(
2980
+ ), ua = ({ className: e }) => /* @__PURE__ */ f(
2553
2981
  "svg",
2554
2982
  {
2555
2983
  "aria-hidden": "true",
2556
2984
  focusable: "false",
2557
- className: t ?? "w-4 h-4",
2985
+ className: e ?? "w-4 h-4",
2558
2986
  fill: "none",
2559
2987
  viewBox: "0 0 24 24",
2560
2988
  stroke: "currentColor",
2561
2989
  strokeWidth: 2,
2562
2990
  children: [
2563
- /* @__PURE__ */ e(
2991
+ /* @__PURE__ */ t(
2564
2992
  "path",
2565
2993
  {
2566
2994
  strokeLinecap: "round",
@@ -2568,20 +2996,20 @@ const yt = (t, r, a) => {
2568
2996
  d: "M2.036 12.322a1.012 1.012 0 010-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178z"
2569
2997
  }
2570
2998
  ),
2571
- /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15 12a3 3 0 11-6 0 3 3 0 016 0z" })
2999
+ /* @__PURE__ */ t("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15 12a3 3 0 11-6 0 3 3 0 016 0z" })
2572
3000
  ]
2573
3001
  }
2574
- ), _r = ({ className: t }) => /* @__PURE__ */ e(
3002
+ ), ha = ({ className: e }) => /* @__PURE__ */ t(
2575
3003
  "svg",
2576
3004
  {
2577
3005
  "aria-hidden": "true",
2578
3006
  focusable: "false",
2579
- className: t ?? "w-4 h-4",
3007
+ className: e ?? "w-4 h-4",
2580
3008
  fill: "none",
2581
3009
  viewBox: "0 0 24 24",
2582
3010
  stroke: "currentColor",
2583
3011
  strokeWidth: 2,
2584
- children: /* @__PURE__ */ e(
3012
+ children: /* @__PURE__ */ t(
2585
3013
  "path",
2586
3014
  {
2587
3015
  strokeLinecap: "round",
@@ -2590,34 +3018,34 @@ const yt = (t, r, a) => {
2590
3018
  }
2591
3019
  )
2592
3020
  }
2593
- ), Gr = ({ className: t }) => /* @__PURE__ */ h(
3021
+ ), ma = ({ className: e }) => /* @__PURE__ */ f(
2594
3022
  "svg",
2595
3023
  {
2596
3024
  "aria-hidden": "true",
2597
3025
  focusable: "false",
2598
- className: t ?? "h-5 w-5",
3026
+ className: e ?? "h-5 w-5",
2599
3027
  viewBox: "0 0 24 24",
2600
3028
  fill: "none",
2601
3029
  stroke: "currentColor",
2602
3030
  strokeWidth: "2",
2603
3031
  children: [
2604
- /* @__PURE__ */ e("rect", { x: "3", y: "3", width: "7", height: "7", rx: "1" }),
2605
- /* @__PURE__ */ e("rect", { x: "14", y: "3", width: "7", height: "7", rx: "1" }),
2606
- /* @__PURE__ */ e("rect", { x: "3", y: "14", width: "7", height: "7", rx: "1" }),
2607
- /* @__PURE__ */ e("rect", { x: "14", y: "14", width: "7", height: "7", rx: "1" })
3032
+ /* @__PURE__ */ t("rect", { x: "3", y: "3", width: "7", height: "7", rx: "1" }),
3033
+ /* @__PURE__ */ t("rect", { x: "14", y: "3", width: "7", height: "7", rx: "1" }),
3034
+ /* @__PURE__ */ t("rect", { x: "3", y: "14", width: "7", height: "7", rx: "1" }),
3035
+ /* @__PURE__ */ t("rect", { x: "14", y: "14", width: "7", height: "7", rx: "1" })
2608
3036
  ]
2609
3037
  }
2610
- ), Ur = ({ className: t }) => /* @__PURE__ */ e(
3038
+ ), fa = ({ className: e }) => /* @__PURE__ */ t(
2611
3039
  "svg",
2612
3040
  {
2613
3041
  "aria-hidden": "true",
2614
3042
  focusable: "false",
2615
- className: t ?? "w-4 h-4",
3043
+ className: e ?? "w-4 h-4",
2616
3044
  fill: "none",
2617
3045
  viewBox: "0 0 24 24",
2618
3046
  stroke: "currentColor",
2619
3047
  strokeWidth: 2,
2620
- children: /* @__PURE__ */ e(
3048
+ children: /* @__PURE__ */ t(
2621
3049
  "path",
2622
3050
  {
2623
3051
  strokeLinecap: "round",
@@ -2626,17 +3054,17 @@ const yt = (t, r, a) => {
2626
3054
  }
2627
3055
  )
2628
3056
  }
2629
- ), Yr = ({ className: t }) => /* @__PURE__ */ e(
3057
+ ), ba = ({ className: e }) => /* @__PURE__ */ t(
2630
3058
  "svg",
2631
3059
  {
2632
3060
  "aria-hidden": "true",
2633
3061
  focusable: "false",
2634
- className: t ?? "w-4 h-4",
3062
+ className: e ?? "w-4 h-4",
2635
3063
  fill: "none",
2636
3064
  viewBox: "0 0 24 24",
2637
3065
  stroke: "currentColor",
2638
3066
  strokeWidth: 2,
2639
- children: /* @__PURE__ */ e(
3067
+ children: /* @__PURE__ */ t(
2640
3068
  "path",
2641
3069
  {
2642
3070
  strokeLinecap: "round",
@@ -2645,17 +3073,17 @@ const yt = (t, r, a) => {
2645
3073
  }
2646
3074
  )
2647
3075
  }
2648
- ), Hr = ({ className: t }) => /* @__PURE__ */ e(
3076
+ ), xa = ({ className: e }) => /* @__PURE__ */ t(
2649
3077
  "svg",
2650
3078
  {
2651
3079
  "aria-hidden": "true",
2652
3080
  focusable: "false",
2653
- className: t ?? "h-5 w-5 text-app-soft",
3081
+ className: e ?? "h-5 w-5 text-app-soft",
2654
3082
  viewBox: "0 0 24 24",
2655
3083
  fill: "none",
2656
3084
  stroke: "currentColor",
2657
3085
  strokeWidth: 1.5,
2658
- children: /* @__PURE__ */ e(
3086
+ children: /* @__PURE__ */ t(
2659
3087
  "path",
2660
3088
  {
2661
3089
  strokeLinecap: "round",
@@ -2664,33 +3092,33 @@ const yt = (t, r, a) => {
2664
3092
  }
2665
3093
  )
2666
3094
  }
2667
- ), Zr = ({ className: t }) => /* @__PURE__ */ h(
3095
+ ), ga = ({ className: e }) => /* @__PURE__ */ f(
2668
3096
  "svg",
2669
3097
  {
2670
3098
  "aria-hidden": "true",
2671
3099
  focusable: "false",
2672
- className: t ?? "w-3.5 h-3.5",
3100
+ className: e ?? "w-3.5 h-3.5",
2673
3101
  viewBox: "0 0 24 24",
2674
3102
  fill: "none",
2675
3103
  stroke: "currentColor",
2676
3104
  strokeWidth: "2",
2677
3105
  children: [
2678
- /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M21 12a9 9 0 11-2.63-6.36" }),
2679
- /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M21 3v6h-6" })
3106
+ /* @__PURE__ */ t("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M21 12a9 9 0 11-2.63-6.36" }),
3107
+ /* @__PURE__ */ t("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M21 3v6h-6" })
2680
3108
  ]
2681
3109
  }
2682
- ), Qr = ({ className: t }) => /* @__PURE__ */ h(
3110
+ ), va = ({ className: e }) => /* @__PURE__ */ f(
2683
3111
  "svg",
2684
3112
  {
2685
3113
  "aria-hidden": "true",
2686
3114
  focusable: "false",
2687
- className: t ?? "h-4 w-4",
3115
+ className: e ?? "h-4 w-4",
2688
3116
  fill: "none",
2689
3117
  viewBox: "0 0 24 24",
2690
3118
  stroke: "currentColor",
2691
3119
  strokeWidth: 2,
2692
3120
  children: [
2693
- /* @__PURE__ */ e(
3121
+ /* @__PURE__ */ t(
2694
3122
  "path",
2695
3123
  {
2696
3124
  strokeLinecap: "round",
@@ -2698,20 +3126,20 @@ const yt = (t, r, a) => {
2698
3126
  d: "M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.325.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 011.37.49l1.296 2.247a1.125 1.125 0 01-.26 1.431l-1.003.827c-.293.241-.438.613-.43.992a7.723 7.723 0 010 .255c-.008.378.137.75.43.991l1.004.827c.424.35.534.955.26 1.43l-1.298 2.247a1.125 1.125 0 01-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.47 6.47 0 01-.22.128c-.331.183-.581.495-.644.869l-.213 1.281c-.09.543-.56.94-1.11.94h-2.594c-.55 0-1.019-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 01-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 01-1.369-.49l-1.297-2.247a1.125 1.125 0 01.26-1.431l1.004-.827c.292-.24.437-.613.43-.991a6.932 6.932 0 010-.255c.007-.38-.138-.751-.43-.992l-1.004-.827a1.125 1.125 0 01-.26-1.43l1.297-2.247a1.125 1.125 0 011.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.086.22-.128.332-.183.582-.495.644-.869l.214-1.28z"
2699
3127
  }
2700
3128
  ),
2701
- /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15 12a3 3 0 11-6 0 3 3 0 016 0z" })
3129
+ /* @__PURE__ */ t("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15 12a3 3 0 11-6 0 3 3 0 016 0z" })
2702
3130
  ]
2703
3131
  }
2704
- ), Vr = ({ className: t }) => /* @__PURE__ */ e(
3132
+ ), wa = ({ className: e }) => /* @__PURE__ */ t(
2705
3133
  "svg",
2706
3134
  {
2707
3135
  "aria-hidden": "true",
2708
3136
  focusable: "false",
2709
- className: t ?? "h-7 w-7 text-app-soft",
3137
+ className: e ?? "h-7 w-7 text-app-soft",
2710
3138
  fill: "none",
2711
3139
  viewBox: "0 0 24 24",
2712
3140
  stroke: "currentColor",
2713
3141
  strokeWidth: 1.5,
2714
- children: /* @__PURE__ */ e(
3142
+ children: /* @__PURE__ */ t(
2715
3143
  "path",
2716
3144
  {
2717
3145
  strokeLinecap: "round",
@@ -2720,48 +3148,60 @@ const yt = (t, r, a) => {
2720
3148
  }
2721
3149
  )
2722
3150
  }
2723
- ), Xr = (t, r = "") => {
2724
- T(() => {
2725
- document.title = [t, r].filter(Boolean).join(" · ");
2726
- }, [t, r]);
2727
- }, Ot = () => typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform), Rt = (t, r) => {
2728
- const a = t.toLowerCase().split("+"), n = a.pop(), s = new Set(a), l = Ot(), o = s.has("ctrl") || s.has("mod") && !l, c = s.has("meta") || s.has("mod") && l;
2729
- return r.key.toLowerCase() === n && r.ctrlKey === o && r.metaKey === c && r.altKey === s.has("alt") && r.shiftKey === s.has("shift");
2730
- }, zt = (t) => t instanceof HTMLElement && (t.isContentEditable || /^(INPUT|TEXTAREA|SELECT)$/.test(t.tagName)), Jr = (t, r = !0) => {
2731
- const a = E(t);
2732
- T(() => {
2733
- a.current = t;
2734
- }), T(() => {
3151
+ ), ya = (e, r = "") => {
3152
+ P(() => {
3153
+ document.title = [e, r].filter(Boolean).join(" · ");
3154
+ }, [e, r]);
3155
+ }, Re = 8, ka = (e, r, a) => {
3156
+ const [n, s] = D(!1);
3157
+ return ve(() => {
3158
+ if (!e) {
3159
+ s(!1);
3160
+ return;
3161
+ }
3162
+ const l = r.current;
3163
+ if (!l) return;
3164
+ const o = l.getBoundingClientRect(), i = document.documentElement.clientWidth, c = a === "end" ? o.left < Re : o.right > i - Re;
3165
+ s(c);
3166
+ }, [e, r, a]), n ? a === "end" ? "start" : "end" : a;
3167
+ }, ar = () => typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.platform), nr = (e, r) => {
3168
+ const a = e.toLowerCase().split("+"), n = a.pop(), s = new Set(a), l = ar(), o = s.has("ctrl") || s.has("mod") && !l, i = s.has("meta") || s.has("mod") && l;
3169
+ return r.key.toLowerCase() === n && r.ctrlKey === o && r.metaKey === i && r.altKey === s.has("alt") && r.shiftKey === s.has("shift");
3170
+ }, lr = (e) => e instanceof HTMLElement && (e.isContentEditable || /^(INPUT|TEXTAREA|SELECT)$/.test(e.tagName)), Na = (e, r = !0) => {
3171
+ const a = A(e);
3172
+ P(() => {
3173
+ a.current = e;
3174
+ }), P(() => {
2735
3175
  if (!r) return;
2736
3176
  const n = (s) => {
2737
3177
  for (const [l, o] of Object.entries(a.current))
2738
- if (!(!Rt(l, s) || !/\b(mod|ctrl|alt|meta)\+/i.test(l) && zt(s.target))) {
3178
+ if (!(!nr(l, s) || !/\b(mod|ctrl|alt|meta)\+/i.test(l) && lr(s.target))) {
2739
3179
  s.preventDefault(), o(s);
2740
3180
  return;
2741
3181
  }
2742
3182
  };
2743
3183
  return window.addEventListener("keydown", n), () => window.removeEventListener("keydown", n);
2744
3184
  }, [r]);
2745
- }, ea = (t) => {
2746
- T(() => {
2747
- if (!t) return;
3185
+ }, $a = (e) => {
3186
+ P(() => {
3187
+ if (!e) return;
2748
3188
  const r = (a) => {
2749
3189
  a.preventDefault(), a.returnValue = "";
2750
3190
  };
2751
3191
  return window.addEventListener("beforeunload", r), () => window.removeEventListener("beforeunload", r);
2752
- }, [t]);
2753
- }, ta = (t = 3e3) => {
2754
- const [r, a] = k(null), n = E(null);
2755
- T(() => () => clearTimeout(n.current), []);
2756
- const s = Me(
2757
- (l, o = "success", { link: c, duration: i = t } = {}) => {
2758
- clearTimeout(n.current), a({ msg: l, type: o, link: c }), n.current = setTimeout(() => a(null), i);
3192
+ }, [e]);
3193
+ }, Ma = (e = 3e3) => {
3194
+ const [r, a] = D(null), n = A(null);
3195
+ P(() => () => clearTimeout(n.current), []);
3196
+ const s = Fe(
3197
+ (l, o = "success", { link: i, duration: c = e } = {}) => {
3198
+ clearTimeout(n.current), a({ msg: l, type: o, link: i }), n.current = setTimeout(() => a(null), c);
2759
3199
  },
2760
- [t]
3200
+ [e]
2761
3201
  );
2762
3202
  return { toast: r, showToast: s };
2763
- }, Wt = (t, r = "") => {
2764
- const a = se[t], n = `
3203
+ }, sr = (e, r = "") => {
3204
+ const a = xe[e], n = `
2765
3205
  <svg width="64" height="64" viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg">
2766
3206
  <title>${r}</title>
2767
3207
  <circle cx="32" cy="32" r="30" fill="${a.outer}"/>
@@ -2775,128 +3215,133 @@ const yt = (t, r, a) => {
2775
3215
  </svg>
2776
3216
  `;
2777
3217
  return `data:image/svg+xml,${encodeURIComponent(n)}`;
2778
- }, Kt = () => typeof window > "u" ? "light" : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light", qt = (t = Fe) => {
3218
+ }, or = () => typeof window > "u" ? "light" : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light", ir = (e = He) => {
2779
3219
  if (typeof window > "u") return null;
2780
3220
  try {
2781
- const r = window.localStorage.getItem(t);
3221
+ const r = window.localStorage.getItem(e);
2782
3222
  if (r === "light" || r === "dark") return r;
2783
3223
  } catch {
2784
3224
  }
2785
3225
  return null;
2786
- }, _t = ({ storageKey: t = Fe, favicon: r = !0, faviconTitle: a = "" } = {}) => {
2787
- const [n, s] = k(Kt), [l, o] = k(() => qt(t)), c = l || n;
2788
- return T(() => {
3226
+ }, cr = ({ storageKey: e = He, favicon: r = !0, faviconTitle: a = "" } = {}) => {
3227
+ const [n, s] = D(or), [l, o] = D(() => ir(e)), i = l || n;
3228
+ return P(() => {
2789
3229
  if (typeof window > "u") return;
2790
- const u = window.matchMedia("(prefers-color-scheme: dark)"), m = (d) => s(d.matches ? "dark" : "light");
2791
- return u.addEventListener("change", m), () => u.removeEventListener("change", m);
2792
- }, []), T(() => {
3230
+ const u = window.matchMedia("(prefers-color-scheme: dark)"), b = (d) => s(d.matches ? "dark" : "light");
3231
+ return u.addEventListener("change", b), () => u.removeEventListener("change", b);
3232
+ }, []), P(() => {
2793
3233
  try {
2794
- l ? window.localStorage.setItem(t, l) : window.localStorage.removeItem(t);
3234
+ l ? window.localStorage.setItem(e, l) : window.localStorage.removeItem(e);
2795
3235
  } catch {
2796
3236
  }
2797
- }, [l, t]), T(() => {
2798
- if (document.documentElement.setAttribute("data-theme", c), !r) return;
2799
- const u = document.getElementById("app-favicon") || document.querySelector("link[rel='icon']");
2800
- u && u.setAttribute("href", Wt(c, a));
2801
- }, [c, r, a]), { activeTheme: c, toggleTheme: () => o((u) => (u || n) === "dark" ? "light" : "dark") };
2802
- }, ra = ({ children: t, storageKey: r, favicon: a = !1, faviconTitle: n }) => {
2803
- const s = _t({ storageKey: r, favicon: a, faviconTitle: n });
2804
- return /* @__PURE__ */ e(Ce.Provider, { value: s, children: t });
3237
+ }, [l, e]), P(() => {
3238
+ if (document.documentElement.setAttribute("data-theme", i), !r) return;
3239
+ let u = document.getElementById("app-favicon") || document.querySelector("link[rel~='icon']");
3240
+ u || (u = document.createElement("link"), u.id = "app-favicon", u.rel = "icon", document.head.appendChild(u)), u.setAttribute("type", "image/svg+xml"), u.setAttribute("href", sr(i, a));
3241
+ }, [i, r, a]), { activeTheme: i, toggleTheme: () => o((u) => (u || n) === "dark" ? "light" : "dark") };
3242
+ }, La = ({ children: e, storageKey: r, favicon: a = !1, faviconTitle: n }) => {
3243
+ const s = cr({ storageKey: r, favicon: a, faviconTitle: n });
3244
+ return /* @__PURE__ */ t(We.Provider, { value: s, children: e });
2805
3245
  };
2806
3246
  export {
2807
- Ht as ActionMenu,
2808
- Zt as Alert,
2809
- Qt as AppBar,
2810
- Vt as AppShell,
2811
- Xt as AreaChart,
2812
- Kr as ArrowLeftIcon,
2813
- Jt as Avatar,
2814
- er as BarChart,
2815
- tr as Breadcrumb,
2816
- R as Button,
2817
- Se as Calendar,
2818
- rr as Card,
2819
- ar as Carousel,
2820
- Pt as CheckIcon,
2821
- be as Checkbox,
2822
- oe as CloseIcon,
2823
- nr as CommandPalette,
2824
- sr as ConfirmDialog,
2825
- lr as Container,
2826
- Fe as DEFAULT_THEME_STORAGE_KEY,
2827
- or as Dashboard,
2828
- ir as DataGrid,
2829
- cr as DatePicker,
2830
- dr as DateRangePicker,
2831
- pr as Divider,
2832
- et as Drawer,
2833
- qr as EyeIcon,
2834
- _r as EyeOffIcon,
2835
- je as FanFavicon,
2836
- ur as Field,
2837
- hr as FileUpload,
2838
- Ct as Flex,
2839
- mr as FocusTrap,
2840
- ge as Grid,
2841
- Gr as GridIcon,
2842
- Ur as HomeIcon,
2843
- fr as Image,
2844
- Ge as InfoIcon,
2845
- Pe as Input,
2846
- nt as LineChart,
2847
- br as List,
2848
- xr as LoadingScreen,
2849
- Yr as LogoutIcon,
2850
- tt as MenuIcon,
2851
- ht as Modal,
2852
- gr as Navbar,
2853
- vr as NotificationCenter,
2854
- xt as PageHeader,
2855
- Et as PageLayout,
2856
- wt as Pagination,
2857
- Hr as PencilIcon,
2858
- yr as PieChart,
2859
- wr as Popover,
2860
- kr as Portal,
2861
- Nr as Progress,
2862
- $r as RackServer,
2863
- Ft as Radio,
2864
- Mr as RadioGroup,
2865
- Zr as RefreshIcon,
2866
- Lr as Select,
2867
- Qr as SettingsIcon,
2868
- Vr as ShieldIcon,
2869
- Cr as Sidebar,
2870
- Dr as Skeleton,
2871
- Er as Slider,
2872
- Tr as SortableList,
2873
- Ir as Stack,
2874
- vt as StatCard,
2875
- Ar as Stepper,
2876
- Sr as Switch,
2877
- se as THEME_FAVICON_COLORS,
2878
- Fr as Table,
2879
- jr as Tabs,
2880
- Ce as ThemeContext,
2881
- ra as ThemeProvider,
2882
- De as ThemeToggle,
2883
- Br as TimePicker,
2884
- Pr as Timeline,
2885
- Or as Toast,
2886
- Le as Tooltip,
2887
- Rr as Tree,
2888
- zr as Video,
2889
- Wr as VirtualList,
2890
- Wt as buildFaviconHref,
2891
- He as toolbarButtonClass,
2892
- _t as useAppTheme,
2893
- X as useDialogFocus,
2894
- de as useDismissable,
2895
- Xr as useDocumentTitle,
2896
- ie as useEscapeKey,
2897
- Be as useFlipAlign,
2898
- Jr as useKeyboardShortcuts,
2899
- ea as useLeaveWarning,
2900
- Ye as useTheme,
2901
- ta as useTimedToast
3247
+ hr as ActionMenu,
3248
+ mr as Alert,
3249
+ fr as AppBar,
3250
+ br as AppShell,
3251
+ xr as AreaChart,
3252
+ pa as ArrowLeftIcon,
3253
+ gr as Avatar,
3254
+ vr as BarChart,
3255
+ wr as BodyText,
3256
+ yr as Breadcrumb,
3257
+ H as Button,
3258
+ Ge as Calendar,
3259
+ kr as Card,
3260
+ Nr as Carousel,
3261
+ er as CheckIcon,
3262
+ Te as Checkbox,
3263
+ we as CloseIcon,
3264
+ $r as CommandPalette,
3265
+ Mr as ConfirmDialog,
3266
+ Lr as Container,
3267
+ He as DEFAULT_THEME_STORAGE_KEY,
3268
+ Cr as Dashboard,
3269
+ Tr as DataGrid,
3270
+ Dr as DatePicker,
3271
+ Ar as DateRangePicker,
3272
+ Er as Divider,
3273
+ bt as Drawer,
3274
+ ua as EyeIcon,
3275
+ ha as EyeOffIcon,
3276
+ Ye as FanFavicon,
3277
+ Ir as Field,
3278
+ Sr as FileUpload,
3279
+ Kt as Flex,
3280
+ Pr as FocusTrap,
3281
+ Ae as Grid,
3282
+ ma as GridIcon,
3283
+ Rr as HelperText,
3284
+ fa as HomeIcon,
3285
+ jr as Image,
3286
+ ot as InfoIcon,
3287
+ Ze as Input,
3288
+ U as Label,
3289
+ wt as LineChart,
3290
+ Fr as List,
3291
+ Br as LoadingScreen,
3292
+ ba as LogoutIcon,
3293
+ xt as MenuIcon,
3294
+ Dt as Modal,
3295
+ Or as Navbar,
3296
+ Wr as NotificationCenter,
3297
+ St as PageHeader,
3298
+ Ut as PageLayout,
3299
+ zr as PageTitle,
3300
+ Ft as Pagination,
3301
+ xa as PencilIcon,
3302
+ qr as PieChart,
3303
+ Kr as Popover,
3304
+ _r as Portal,
3305
+ Ur as Progress,
3306
+ Gr as RackServer,
3307
+ Qt as Radio,
3308
+ Hr as RadioGroup,
3309
+ ga as RefreshIcon,
3310
+ Yr as Select,
3311
+ va as SettingsIcon,
3312
+ wa as ShieldIcon,
3313
+ Zr as Sidebar,
3314
+ Qr as Skeleton,
3315
+ Vr as Slider,
3316
+ Xr as SortableList,
3317
+ Jr as Stack,
3318
+ Rt as StatCard,
3319
+ ea as Stepper,
3320
+ ta as Switch,
3321
+ xe as THEME_FAVICON_COLORS,
3322
+ ra as Table,
3323
+ aa as Tabs,
3324
+ na as TextLink,
3325
+ We as ThemeContext,
3326
+ La as ThemeProvider,
3327
+ ze as ThemeToggle,
3328
+ sa as TimePicker,
3329
+ la as Timeline,
3330
+ oa as Toast,
3331
+ Oe as Tooltip,
3332
+ ia as Tree,
3333
+ ca as Video,
3334
+ da as VirtualList,
3335
+ sr as buildFaviconHref,
3336
+ dt as toolbarButtonClass,
3337
+ cr as useAppTheme,
3338
+ ie as useDialogFocus,
3339
+ V as useDismissable,
3340
+ ya as useDocumentTitle,
3341
+ ye as useEscapeKey,
3342
+ ka as useFlipAlign,
3343
+ Na as useKeyboardShortcuts,
3344
+ $a as useLeaveWarning,
3345
+ ct as useTheme,
3346
+ Ma as useTimedToast
2902
3347
  };