@matthiaskrijgsman/mat-ui 0.0.33 → 0.0.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,12 +1,12 @@
1
1
  "use client";
2
2
  import { jsx as e, jsxs as d, Fragment as ee } from "react/jsx-runtime";
3
- import * as y from "react";
4
- import { createContext as Qe, useContext as qe, useEffect as $, useState as A, useRef as ke, useCallback as Te, useLayoutEffect as yt, useMemo as se } from "react";
5
- import { AnimatePresence as Se, motion as G, animate as _t } from "motion/react";
6
- import { IconExclamationCircleFilled as Ze, IconEyeOff as $t, IconEye as Xt, IconPaperclip as jt, IconCircleCheckFilled as et, IconX as ie, IconCloudUpload as Vt, IconCheck as Ct, IconChevronDown as pe, IconBold as Kt, IconItalic as Gt, IconUnderline as Yt, IconList as Ye, IconListNumbers as Jt, IconLink as Qt, IconArrowBackUp as qt, IconArrowForwardUp as Zt, IconDots as en, IconSearch as Ee, IconSearchOff as tt, IconInfoCircleFilled as tn, IconAlertTriangleFilled as nn, IconChevronRight as rn, IconChevronUp as ln, IconSettings as dt, IconPlus as ut, IconTrash as on, IconMailFilled as sn } from "@tabler/icons-react";
7
- import { FloatingPortal as Me, FloatingOverlay as nt, size as rt, useFloating as lt, autoUpdate as ot, offset as an, flip as cn, shift as dn, useListNavigation as un, useInteractions as fn } from "@floating-ui/react";
8
- import { mergeRefs as mn } from "react-merge-refs";
9
- import { useDropzone as It } from "react-dropzone";
3
+ import * as C from "react";
4
+ import { createContext as Qe, useContext as qe, useEffect as $, useState as A, useRef as ke, useCallback as Te, useLayoutEffect as It, useMemo as ae } from "react";
5
+ import { AnimatePresence as Se, motion as G, animate as Xt } from "motion/react";
6
+ import { IconExclamationCircleFilled as Ze, IconEyeOff as jt, IconEye as Vt, IconPaperclip as Kt, IconCircleCheckFilled as et, IconX as ce, IconCloudUpload as Gt, IconCheck as Rt, IconChevronDown as ge, IconBold as Yt, IconItalic as Jt, IconUnderline as Qt, IconList as Ye, IconListNumbers as qt, IconLink as Zt, IconArrowBackUp as en, IconArrowForwardUp as tn, IconDots as nn, IconSearch as Ee, IconSearchOff as tt, IconInfoCircleFilled as rn, IconAlertTriangleFilled as ln, IconChevronRight as on, IconChevronUp as sn, IconSettings as mt, IconPlus as ft, IconTrash as an, IconMailFilled as cn } from "@tabler/icons-react";
7
+ import { FloatingPortal as Me, FloatingOverlay as nt, flip as rt, shift as lt, size as ot, useFloating as st, autoUpdate as at, offset as dn, useListNavigation as un, useInteractions as mn } from "@floating-ui/react";
8
+ import { mergeRefs as fn } from "react-merge-refs";
9
+ import { useDropzone as St } from "react-dropzone";
10
10
  import { LexicalComposer as hn } from "@lexical/react/LexicalComposer";
11
11
  import { RichTextPlugin as pn } from "@lexical/react/LexicalRichTextPlugin";
12
12
  import { ContentEditable as gn } from "@lexical/react/LexicalContentEditable";
@@ -17,28 +17,28 @@ import { OnChangePlugin as wn } from "@lexical/react/LexicalOnChangePlugin";
17
17
  import { AutoFocusPlugin as Nn } from "@lexical/react/LexicalAutoFocusPlugin";
18
18
  import { LexicalErrorBoundary as kn } from "@lexical/react/LexicalErrorBoundary";
19
19
  import { HeadingNode as yn, QuoteNode as Cn, $isHeadingNode as In, $createHeadingNode as Rn } from "@lexical/rich-text";
20
- import { ListNode as Rt, ListItemNode as Sn, $isListNode as Dn, REMOVE_LIST_COMMAND as ft, INSERT_UNORDERED_LIST_COMMAND as On, INSERT_ORDERED_LIST_COMMAND as zn } from "@lexical/list";
21
- import { LinkNode as Tn, $isLinkNode as mt, TOGGLE_LINK_COMMAND as ht } from "@lexical/link";
22
- import { useLexicalComposerContext as ce } from "@lexical/react/LexicalComposerContext";
23
- import { CAN_UNDO_COMMAND as Ln, COMMAND_PRIORITY_LOW as Le, CAN_REDO_COMMAND as Pn, $getSelection as St, $isRangeSelection as Dt, $createParagraphNode as En, FORMAT_TEXT_COMMAND as $e, UNDO_COMMAND as Mn, REDO_COMMAND as Fn, FOCUS_COMMAND as Bn, BLUR_COMMAND as An } from "lexical";
24
- import { mergeRegister as Ot, $getNearestNodeOfType as Un } from "@lexical/utils";
25
- import { $setBlocksType as pt } from "@lexical/selection";
26
- const h = (...n) => n.filter(Boolean).join(" "), Wn = [
20
+ import { ListNode as Dt, ListItemNode as Sn, $isListNode as Dn, REMOVE_LIST_COMMAND as ht, INSERT_UNORDERED_LIST_COMMAND as On, INSERT_ORDERED_LIST_COMMAND as zn } from "@lexical/list";
21
+ import { LinkNode as Tn, $isLinkNode as pt, TOGGLE_LINK_COMMAND as gt } from "@lexical/link";
22
+ import { useLexicalComposerContext as de } from "@lexical/react/LexicalComposerContext";
23
+ import { CAN_UNDO_COMMAND as Ln, COMMAND_PRIORITY_LOW as Le, CAN_REDO_COMMAND as Pn, $getSelection as Ot, $isRangeSelection as zt, $createParagraphNode as En, FORMAT_TEXT_COMMAND as $e, UNDO_COMMAND as Mn, REDO_COMMAND as Fn, FOCUS_COMMAND as Bn, BLUR_COMMAND as An } from "lexical";
24
+ import { mergeRegister as Tt, $getNearestNodeOfType as Un } from "@lexical/utils";
25
+ import { $setBlocksType as bt } from "@lexical/selection";
26
+ const f = (...t) => t.filter(Boolean).join(" "), Wn = [
27
27
  "polygon(50% 50%,0 0,0 0,0 0,0 0,0 0)",
28
28
  "polygon(50% 50%,0 0,100% 0,100% 0,100% 0,100% 0)",
29
29
  "polygon(50% 50%,0 0,100% 0,100% 100%,100% 100%,100% 100%)",
30
30
  "polygon(50% 50%,0 0,100% 0,100% 100%,0 100%,0 100%)",
31
31
  "polygon(50% 50%,0 0,100% 0,100% 100%,0 100%,0 0)"
32
- ], Re = (n) => {
32
+ ], Re = (t) => {
33
33
  const {
34
- speed: t = 1,
34
+ speed: n = 1,
35
35
  className: o
36
- } = n, s = 1 / t, r = 2 / t;
36
+ } = t, s = 1 / n, r = 2 / n;
37
37
  return /* @__PURE__ */ e(Se, { children: /* @__PURE__ */ e(
38
38
  G.div,
39
39
  {
40
40
  role: "status",
41
- className: h("relative rounded-full", o),
41
+ className: f("relative rounded-full", o),
42
42
  animate: { rotate: 360 },
43
43
  transition: { repeat: 1 / 0, ease: "linear", duration: s },
44
44
  children: /* @__PURE__ */ e(
@@ -65,7 +65,7 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
65
65
  sm: "h-[var(--control-size-sm-height)]",
66
66
  md: "h-[var(--control-size-md-height)]",
67
67
  lg: "h-[var(--control-size-lg-height)]"
68
- }, zt = {
68
+ }, Lt = {
69
69
  sm: "min-h-[var(--control-size-sm-height)]",
70
70
  md: "min-h-[var(--control-size-md-height)]",
71
71
  lg: "min-h-[var(--control-size-lg-height)]"
@@ -81,15 +81,15 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
81
81
  sm: "px-[var(--control-size-sm-px)]",
82
82
  md: "px-[var(--control-size-md-px)]",
83
83
  lg: "px-[var(--control-size-lg-px)]"
84
- }, de = {
84
+ }, ue = {
85
85
  sm: "pl-[var(--control-size-sm-px)]",
86
86
  md: "pl-[var(--control-size-md-px)]",
87
87
  lg: "pl-[var(--control-size-lg-px)]"
88
- }, st = {
88
+ }, it = {
89
89
  sm: "pr-[var(--control-size-sm-px)]",
90
90
  md: "pr-[var(--control-size-md-px)]",
91
91
  lg: "pr-[var(--control-size-lg-px)]"
92
- }, ue = {
92
+ }, me = {
93
93
  sm: "pr-[calc(var(--control-size-sm-px)+2rem)]",
94
94
  md: "pr-[calc(var(--control-size-md-px)+2rem)]",
95
95
  lg: "pr-[calc(var(--control-size-lg-px)+2rem)]"
@@ -97,11 +97,11 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
97
97
  sm: "pr-[calc(var(--control-size-sm-px)+3.75rem)]",
98
98
  md: "pr-[calc(var(--control-size-md-px)+3.75rem)]",
99
99
  lg: "pr-[calc(var(--control-size-lg-px)+3.75rem)]"
100
- }, Tt = {
100
+ }, Pt = {
101
101
  sm: "pl-[calc(var(--control-size-sm-icon-offset)+var(--control-size-sm-icon)+0.75rem)]",
102
102
  md: "pl-[calc(var(--control-size-md-icon-offset)+var(--control-size-md-icon)+0.75rem)]",
103
103
  lg: "pl-[calc(var(--control-size-lg-icon-offset)+var(--control-size-lg-icon)+0.75rem)]"
104
- }, Lt = {
104
+ }, Et = {
105
105
  sm: "left-[var(--control-size-sm-icon-offset)]",
106
106
  md: "left-[var(--control-size-md-icon-offset)]",
107
107
  lg: "left-[var(--control-size-lg-icon-offset)]"
@@ -109,11 +109,11 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
109
109
  sm: "right-[var(--control-size-sm-px)]",
110
110
  md: "right-[var(--control-size-md-px)]",
111
111
  lg: "right-[var(--control-size-lg-px)]"
112
- }, he = {
112
+ }, pe = {
113
113
  sm: "h-[var(--control-size-sm-icon)] w-[var(--control-size-sm-icon)]",
114
114
  md: "h-[var(--control-size-md-icon)] w-[var(--control-size-md-icon)]",
115
115
  lg: "h-[var(--control-size-lg-icon)] w-[var(--control-size-lg-icon)]"
116
- }, Pt = {
116
+ }, Mt = {
117
117
  sm: "h-[var(--control-size-sm-height)] w-[var(--control-size-sm-height)]",
118
118
  md: "h-[var(--control-size-md-height)] w-[var(--control-size-md-height)]",
119
119
  lg: "h-[var(--control-size-lg-height)] w-[var(--control-size-lg-height)]"
@@ -130,7 +130,7 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
130
130
  white: "border button-white shadow-sm",
131
131
  black: "border button-black shadow-sm",
132
132
  transparent: "border button-transparent"
133
- }, Vn = y.forwardRef((n, t) => {
133
+ }, Vn = C.forwardRef((t, n) => {
134
134
  const {
135
135
  variant: o = "white",
136
136
  size: s = "md",
@@ -139,12 +139,12 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
139
139
  loading: a = !1,
140
140
  Icon: i,
141
141
  ...c
142
- } = n;
142
+ } = t;
143
143
  return /* @__PURE__ */ d(
144
144
  "button",
145
145
  {
146
- ref: t,
147
- className: h(
146
+ ref: n,
147
+ className: f(
148
148
  Xn,
149
149
  jn[o],
150
150
  te[s],
@@ -155,9 +155,9 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
155
155
  ),
156
156
  ...c,
157
157
  children: [
158
- a && /* @__PURE__ */ e(Re, { className: h(he[s]) }),
158
+ a && /* @__PURE__ */ e(Re, { className: f(pe[s]) }),
159
159
  !a && /* @__PURE__ */ d(ee, { children: [
160
- i && /* @__PURE__ */ e(i, { className: h(he[s], "-ml-1") }),
160
+ i && /* @__PURE__ */ e(i, { className: f(pe[s], "-ml-1") }),
161
161
  l
162
162
  ] })
163
163
  ]
@@ -176,26 +176,26 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
176
176
  white: "border button-white shadow-sm",
177
177
  black: "border button-black shadow-sm",
178
178
  transparent: "border button-transparent"
179
- }, Je = y.forwardRef((n, t) => {
179
+ }, Je = C.forwardRef((t, n) => {
180
180
  const {
181
181
  variant: o = "white",
182
182
  size: s = "md",
183
183
  className: r,
184
184
  Icon: l,
185
185
  ...a
186
- } = n;
186
+ } = t;
187
187
  return /* @__PURE__ */ e(
188
188
  "button",
189
189
  {
190
- ref: t,
191
- className: h(
190
+ ref: n,
191
+ className: f(
192
192
  Kn,
193
193
  Gn[o],
194
- Pt[s],
194
+ Mt[s],
195
195
  r
196
196
  ),
197
197
  ...a,
198
- children: /* @__PURE__ */ e(l, { className: he[s] })
198
+ children: /* @__PURE__ */ e(l, { className: pe[s] })
199
199
  }
200
200
  );
201
201
  }), Yn = `
@@ -209,43 +209,43 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
209
209
  white: "border button-white shadow-sm",
210
210
  black: "border button-black shadow-sm",
211
211
  transparent: "border button-transparent"
212
- }, Et = y.forwardRef((n, t) => {
212
+ }, Ft = C.forwardRef((t, n) => {
213
213
  const {
214
214
  variant: o = "white",
215
215
  size: s = "md",
216
216
  className: r,
217
217
  Icon: l,
218
218
  ...a
219
- } = n;
219
+ } = t;
220
220
  return /* @__PURE__ */ e(
221
221
  "button",
222
222
  {
223
- ref: t,
224
- className: h(
223
+ ref: n,
224
+ className: f(
225
225
  Yn,
226
226
  Jn[o],
227
- Pt[s],
227
+ Mt[s],
228
228
  r
229
229
  ),
230
230
  ...a,
231
- children: /* @__PURE__ */ e(l, { className: he[s] })
231
+ children: /* @__PURE__ */ e(l, { className: pe[s] })
232
232
  }
233
233
  );
234
- }), J = (n) => {
234
+ }), J = (t) => {
235
235
  const {
236
- children: t
237
- } = n;
238
- return t ? /* @__PURE__ */ e("label", { className: "input-label font-medium mb-1", children: t }) : null;
239
- }, ne = () => /* @__PURE__ */ e("div", { className: "h-5 w-5", children: /* @__PURE__ */ e(Ze, { className: "h-5 w-5 input-error-icon" }) }), Q = Qe("md"), Qn = () => qe(Q), fe = y.forwardRef((n, t) => {
236
+ children: n
237
+ } = t;
238
+ return n ? /* @__PURE__ */ e("label", { className: "input-label font-medium mb-1", children: n }) : null;
239
+ }, ne = () => /* @__PURE__ */ e("div", { className: "h-5 w-5", children: /* @__PURE__ */ e(Ze, { className: "h-5 w-5 input-error-icon" }) }), Q = Qe("md"), Qn = () => qe(Q), fe = C.forwardRef((t, n) => {
240
240
  const {
241
241
  children: o,
242
242
  className: s
243
- } = n, r = Qn();
243
+ } = t, r = Qn();
244
244
  return /* @__PURE__ */ e(
245
245
  "div",
246
246
  {
247
- ref: t,
248
- className: h(
247
+ ref: n,
248
+ className: f(
249
249
  "absolute top-1/2 -translate-y-1/2 flex flex-row items-center gap-1 pointer-events-none",
250
250
  $n[r],
251
251
  s
@@ -253,19 +253,19 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
253
253
  children: o
254
254
  }
255
255
  );
256
- }), V = (n) => {
256
+ }), V = (t) => {
257
257
  const {
258
- children: t
259
- } = n;
260
- return t ? /* @__PURE__ */ e("div", { className: "input-description text-sm font-medium mt-2", children: t }) : null;
261
- }, K = (n) => {
258
+ children: n
259
+ } = t;
260
+ return n ? /* @__PURE__ */ e("div", { className: "input-description text-sm font-medium mt-2", children: n }) : null;
261
+ }, K = (t) => {
262
262
  const {
263
- children: t
264
- } = n;
265
- return t ? /* @__PURE__ */ e("div", { className: "input-error-text text-sm font-medium mt-2", children: t }) : null;
266
- }, Mt = (n) => {
263
+ children: n
264
+ } = t;
265
+ return n ? /* @__PURE__ */ e("div", { className: "input-error-text text-sm font-medium mt-2", children: n }) : null;
266
+ }, Bt = (t) => {
267
267
  const {
268
- className: t,
268
+ className: n,
269
269
  label: o,
270
270
  description: s,
271
271
  Icon: r,
@@ -273,31 +273,31 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
273
273
  buttonTray: a,
274
274
  size: i = "md",
275
275
  ...c
276
- } = n, g = !!l || !!a;
276
+ } = t, g = !!l || !!a;
277
277
  return /* @__PURE__ */ e(Q.Provider, { value: i, children: /* @__PURE__ */ d(
278
278
  "div",
279
279
  {
280
- className: h(
280
+ className: f(
281
281
  "flex flex-col",
282
- t
282
+ n
283
283
  ),
284
284
  children: [
285
285
  /* @__PURE__ */ e(J, { children: o }),
286
286
  /* @__PURE__ */ d("div", { className: "flex flex-col relative", children: [
287
- r && /* @__PURE__ */ e(r, { className: h(
287
+ r && /* @__PURE__ */ e(r, { className: f(
288
288
  "input-icon absolute top-1/2 -translate-y-1/2",
289
- he[i],
290
- Lt[i]
289
+ pe[i],
290
+ Et[i]
291
291
  ) }),
292
292
  /* @__PURE__ */ e(
293
293
  "input",
294
294
  {
295
- className: h(
295
+ className: f(
296
296
  "border input-base transition-all duration-150 rounded-xl shadow-sm ring-0 focus:ring-4 focus:outline-none",
297
297
  te[i],
298
298
  Y[i],
299
- r ? Tt[i] : de[i],
300
- g ? ue[i] : st[i],
299
+ r ? Pt[i] : ue[i],
300
+ g ? me[i] : it[i],
301
301
  l && "input-error"
302
302
  ),
303
303
  ...c
@@ -313,59 +313,59 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
313
313
  ]
314
314
  }
315
315
  ) });
316
- }, qn = (n) => {
317
- const t = n.match(/^#?([0-9a-fA-F]{6})$/);
318
- if (!t) return null;
319
- const o = parseInt(t[1], 16);
316
+ }, qn = (t) => {
317
+ const n = t.match(/^#?([0-9a-fA-F]{6})$/);
318
+ if (!n) return null;
319
+ const o = parseInt(n[1], 16);
320
320
  return [(o >> 16 & 255) / 255, (o >> 8 & 255) / 255, (o & 255) / 255];
321
- }, Zn = (n, t, o) => {
321
+ }, Zn = (t, n, o) => {
322
322
  const s = (r) => Math.round(r * 255).toString(16).padStart(2, "0").toUpperCase();
323
- return "#" + s(n) + s(t) + s(o);
324
- }, er = (n, t, o) => {
325
- const s = Math.max(n, t, o), r = Math.min(n, t, o), l = s - r;
323
+ return "#" + s(t) + s(n) + s(o);
324
+ }, er = (t, n, o) => {
325
+ const s = Math.max(t, n, o), r = Math.min(t, n, o), l = s - r;
326
326
  let a = 0;
327
- return l !== 0 && (s === n ? a = ((t - o) / l + 6) % 6 : s === t ? a = (o - n) / l + 2 : a = (n - t) / l + 4, a *= 60), [a, s === 0 ? 0 : l / s, s];
328
- }, tr = (n, t, o) => {
329
- const s = o * t, r = n / 60, l = s * (1 - Math.abs(r % 2 - 1));
327
+ return l !== 0 && (s === t ? a = ((n - o) / l + 6) % 6 : s === n ? a = (o - t) / l + 2 : a = (t - n) / l + 4, a *= 60), [a, s === 0 ? 0 : l / s, s];
328
+ }, tr = (t, n, o) => {
329
+ const s = o * n, r = t / 60, l = s * (1 - Math.abs(r % 2 - 1));
330
330
  let a = 0, i = 0, c = 0;
331
331
  r < 1 ? (a = s, i = l) : r < 2 ? (a = l, i = s) : r < 3 ? (i = s, c = l) : r < 4 ? (i = l, c = s) : r < 5 ? (a = l, c = s) : (a = s, c = l);
332
332
  const g = o - s;
333
333
  return [a + g, i + g, c + g];
334
- }, Ie = (n, t, o) => {
335
- const [s, r, l] = tr(n, t, o);
334
+ }, Ie = (t, n, o) => {
335
+ const [s, r, l] = tr(t, n, o);
336
336
  return Zn(s, r, l);
337
- }, gt = (n) => {
338
- const t = qn(n);
339
- return t ? er(t[0], t[1], t[2]) : null;
340
- }, nr = (n) => {
341
- const t = n.trim();
342
- if (!t) return null;
343
- const o = t.match(/^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/);
337
+ }, vt = (t) => {
338
+ const n = qn(t);
339
+ return n ? er(n[0], n[1], n[2]) : null;
340
+ }, nr = (t) => {
341
+ const n = t.trim();
342
+ if (!n) return null;
343
+ const o = n.match(/^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/);
344
344
  if (o) {
345
345
  let a = o[1];
346
346
  return a.length === 3 && (a = a.split("").map((i) => i + i).join("")), "#" + a.toUpperCase();
347
347
  }
348
348
  if (typeof document > "u") return null;
349
349
  const s = document.createElement("div");
350
- if (s.style.color = t, !s.style.color) return null;
350
+ if (s.style.color = n, !s.style.color) return null;
351
351
  document.body.appendChild(s);
352
352
  const r = getComputedStyle(s).color;
353
353
  document.body.removeChild(s);
354
354
  const l = r.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/);
355
355
  return l ? "#" + [l[1], l[2], l[3]].map((a) => parseInt(a, 10).toString(16).padStart(2, "0")).join("").toUpperCase() : null;
356
- }, Xe = (n) => {
357
- const t = y.useRef(null), [o, s] = y.useState(!1), r = (l) => {
358
- t.current = null, s(!1), l.currentTarget.releasePointerCapture?.(l.pointerId);
356
+ }, Xe = (t) => {
357
+ const n = C.useRef(null), [o, s] = C.useState(!1), r = (l) => {
358
+ n.current = null, s(!1), l.currentTarget.releasePointerCapture?.(l.pointerId);
359
359
  };
360
360
  return {
361
361
  isDragging: o,
362
362
  bind: {
363
363
  onPointerDown: (l) => {
364
364
  const a = l.currentTarget;
365
- t.current = a.getBoundingClientRect(), a.setPointerCapture?.(l.pointerId), s(!0), n(l.clientX, l.clientY, t.current);
365
+ n.current = a.getBoundingClientRect(), a.setPointerCapture?.(l.pointerId), s(!0), t(l.clientX, l.clientY, n.current);
366
366
  },
367
367
  onPointerMove: (l) => {
368
- t.current && n(l.clientX, l.clientY, t.current);
368
+ n.current && t(l.clientX, l.clientY, n.current);
369
369
  },
370
370
  onPointerUp: r,
371
371
  onPointerCancel: r
@@ -375,17 +375,17 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
375
375
  sm: "p-2",
376
376
  md: "p-3",
377
377
  lg: "p-4"
378
- }, ge = (n) => {
378
+ }, be = (t) => {
379
379
  const {
380
- className: t,
380
+ className: n,
381
381
  children: o,
382
382
  padding: s = "md",
383
383
  ...r
384
- } = n;
384
+ } = t;
385
385
  return /* @__PURE__ */ e(
386
386
  "div",
387
387
  {
388
- className: h(rr, lr[s], t),
388
+ className: f(rr, lr[s], n),
389
389
  ...r,
390
390
  children: o
391
391
  }
@@ -403,8 +403,8 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
403
403
  left: "right center",
404
404
  "left-start": "top right",
405
405
  "left-end": "bottom right"
406
- }, Ft = y.memo(
407
- ({ open: n, children: t, className: o, onOutsideClick: s, floatingStyles: r, setFloating: l, placement: a, floatingProps: i }) => /* @__PURE__ */ e(Me, { children: /* @__PURE__ */ e(Se, { children: n && /* @__PURE__ */ d(ee, { children: [
406
+ }, At = C.memo(
407
+ ({ open: t, children: n, className: o, onOutsideClick: s, floatingStyles: r, setFloating: l, placement: a, floatingProps: i }) => /* @__PURE__ */ e(Me, { children: /* @__PURE__ */ e(Se, { children: t && /* @__PURE__ */ d(ee, { children: [
408
408
  s && /* @__PURE__ */ e(nt, { onClick: s }),
409
409
  /* @__PURE__ */ e("div", { ref: l, style: r, className: "z-50", ...i, children: /* @__PURE__ */ e(
410
410
  G.div,
@@ -415,100 +415,102 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
415
415
  animate: { opacity: 1, scale: 1 },
416
416
  exit: { opacity: 0, scale: 0.95 },
417
417
  transition: { duration: 0.1, ease: "easeInOut" },
418
- children: t
418
+ children: n
419
419
  }
420
420
  ) })
421
421
  ] }) }) })
422
- ), at = (n) => {
423
- const { placement: t = "bottom", onOutsideClick: o, fullWidth: s, minWidth: r, maxWidth: l } = n, a = y.useMemo(() => [
424
- rt({
425
- apply({ rects: x, elements: m }) {
426
- s && (m.floating.style.width = `${x.reference.width}px`), r && (m.floating.style.minWidth = `${r}px`), l && (m.floating.style.maxWidth = `${l}px`);
422
+ ), ct = (t) => {
423
+ const { placement: n = "bottom", onOutsideClick: o, fullWidth: s, minWidth: r, maxWidth: l } = t, a = C.useMemo(() => [
424
+ rt({ padding: 8 }),
425
+ lt({ padding: 8 }),
426
+ ot({
427
+ apply({ rects: h, elements: b }) {
428
+ s && (b.floating.style.width = `${h.reference.width}px`), r && (b.floating.style.minWidth = `${r}px`), l && (b.floating.style.maxWidth = `${l}px`);
427
429
  }
428
430
  })
429
- ], [s, l, r]), { refs: i, floatingStyles: c } = lt({
430
- placement: t,
431
+ ], [s, l, r]), { refs: i, floatingStyles: c, placement: g } = st({
432
+ placement: n,
431
433
  middleware: a,
432
- whileElementsMounted: ot
433
- }), g = y.useRef({
434
+ whileElementsMounted: at
435
+ }), x = C.useRef({
434
436
  onOutsideClick: o,
435
437
  floatingStyles: c,
436
438
  setFloating: i.setFloating,
437
- placement: t
439
+ placement: n
438
440
  });
439
- g.current = {
441
+ x.current = {
440
442
  onOutsideClick: o,
441
443
  floatingStyles: c,
442
444
  setFloating: i.setFloating,
443
- placement: t
445
+ placement: g
444
446
  };
445
- const w = y.useMemo(() => {
446
- const x = (m) => {
447
- const { floatingStyles: b, setFloating: p, onOutsideClick: f, placement: v } = g.current, { className: u, open: R, children: C } = m;
447
+ const w = C.useMemo(() => {
448
+ const h = (b) => {
449
+ const { floatingStyles: p, setFloating: m, onOutsideClick: v, placement: u } = x.current, { className: I, open: R, children: y } = b;
448
450
  return /* @__PURE__ */ e(
449
- Ft,
451
+ At,
450
452
  {
451
453
  open: R,
452
- className: u,
453
- onOutsideClick: f,
454
- floatingStyles: b,
455
- setFloating: p,
456
- placement: v,
457
- children: C
454
+ className: I,
455
+ onOutsideClick: v,
456
+ floatingStyles: p,
457
+ setFloating: m,
458
+ placement: u,
459
+ children: y
458
460
  }
459
461
  );
460
462
  };
461
- return y.memo(x);
463
+ return C.memo(h);
462
464
  }, []);
463
465
  return {
464
466
  anchorRef: i.setReference,
465
467
  Popover: w
466
468
  };
467
- }, be = (n, t) => {
469
+ }, ve = (t, n) => {
468
470
  $(() => {
469
- if (!n) return;
471
+ if (!t) return;
470
472
  const o = (s) => {
471
- s.key === "Escape" && t();
473
+ s.key === "Escape" && n();
472
474
  };
473
475
  return document.addEventListener("keydown", o), () => {
474
476
  document.removeEventListener("keydown", o);
475
477
  };
476
- }, [n, t]);
477
- }, sr = "linear-gradient(to right, #f00 0%, #ff0 16.66%, #0f0 33.33%, #0ff 50%, #00f 66.66%, #f0f 83.33%, #f00 100%)", ar = "linear-gradient(to right, #fff, rgba(255,255,255,0))", ir = "linear-gradient(to top, #000, rgba(0,0,0,0))", je = "0 0 0 1px rgba(0,0,0,0.15)", cr = 14, dr = 28, ur = 6, fr = 8, Ve = { type: "spring", stiffness: 500, damping: 18, mass: 0.6 }, we = (n) => {
478
- const t = n ? dr : cr, o = t / 2;
478
+ }, [t, n]);
479
+ }, sr = "linear-gradient(to right, #f00 0%, #ff0 16.66%, #0f0 33.33%, #0ff 50%, #00f 66.66%, #f0f 83.33%, #f00 100%)", ar = "linear-gradient(to right, #fff, rgba(255,255,255,0))", ir = "linear-gradient(to top, #000, rgba(0,0,0,0))", je = "0 0 0 1px rgba(0,0,0,0.15)", cr = 14, dr = 28, ur = 6, mr = 8, Ve = { type: "spring", stiffness: 500, damping: 18, mass: 0.6 }, we = (t) => {
480
+ const n = t ? dr : cr, o = n / 2;
479
481
  return {
480
- width: t,
481
- height: t,
482
+ width: n,
483
+ height: n,
482
484
  marginLeft: -o,
483
485
  marginTop: -o,
484
- borderRadius: n ? fr : ur
486
+ borderRadius: t ? mr : ur
485
487
  };
486
- }, ze = (n) => Math.max(0, Math.min(1, n)), bt = (n, t) => {
487
- Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")?.set?.call(n, t), n.dispatchEvent(new Event("input", { bubbles: !0 }));
488
- }, mr = ({ value: n, onChange: t }) => {
489
- const [o, s] = A(() => gt(n) ?? [0, 0, 1]), r = ke(Ie(o[0], o[1], o[2]));
488
+ }, ze = (t) => Math.max(0, Math.min(1, t)), xt = (t, n) => {
489
+ Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, "value")?.set?.call(t, n), t.dispatchEvent(new Event("input", { bubbles: !0 }));
490
+ }, fr = ({ value: t, onChange: n }) => {
491
+ const [o, s] = A(() => vt(t) ?? [0, 0, 1]), r = ke(Ie(o[0], o[1], o[2]));
490
492
  $(() => {
491
- if ((n || "").toUpperCase() === r.current) return;
492
- const f = gt(n);
493
- f && s(f);
494
- }, [n]);
495
- const l = (f) => {
496
- s(f);
497
- const v = Ie(f[0], f[1], f[2]);
498
- r.current = v, t(v);
499
- }, [a, i, c] = o, g = Ie(a, 1, 1), w = Ie(a, i, 1), x = Ie(a, i, c), m = Xe((f, v, u) => {
500
- l([a, ze((f - u.left) / u.width), 1 - ze((v - u.top) / u.height)]);
501
- }), b = Xe((f, v, u) => {
502
- l([ze((f - u.left) / u.width) * 360, i, c]);
503
- }), p = Xe((f, v, u) => {
504
- l([a, i, ze((f - u.left) / u.width)]);
493
+ if ((t || "").toUpperCase() === r.current) return;
494
+ const m = vt(t);
495
+ m && s(m);
496
+ }, [t]);
497
+ const l = (m) => {
498
+ s(m);
499
+ const v = Ie(m[0], m[1], m[2]);
500
+ r.current = v, n(v);
501
+ }, [a, i, c] = o, g = Ie(a, 1, 1), x = Ie(a, i, 1), w = Ie(a, i, c), h = Xe((m, v, u) => {
502
+ l([a, ze((m - u.left) / u.width), 1 - ze((v - u.top) / u.height)]);
503
+ }), b = Xe((m, v, u) => {
504
+ l([ze((m - u.left) / u.width) * 360, i, c]);
505
+ }), p = Xe((m, v, u) => {
506
+ l([a, i, ze((m - u.left) / u.width)]);
505
507
  });
506
508
  return /* @__PURE__ */ d(
507
509
  "div",
508
510
  {
509
511
  className: "flex flex-col gap-3",
510
512
  style: { width: 220, userSelect: "none" },
511
- onMouseDown: (f) => f.preventDefault(),
513
+ onMouseDown: (m) => m.preventDefault(),
512
514
  children: [
513
515
  /* @__PURE__ */ d(
514
516
  "div",
@@ -519,7 +521,7 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
519
521
  touchAction: "none",
520
522
  cursor: "crosshair"
521
523
  },
522
- ...m.bind,
524
+ ...h.bind,
523
525
  children: [
524
526
  /* @__PURE__ */ d(
525
527
  "div",
@@ -552,10 +554,10 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
552
554
  left: `${i * 100}%`,
553
555
  top: `${(1 - c) * 100}%`,
554
556
  boxShadow: je,
555
- backgroundColor: x
557
+ backgroundColor: w
556
558
  },
557
559
  initial: we(!1),
558
- animate: we(m.isDragging),
560
+ animate: we(h.isDragging),
559
561
  transition: Ve
560
562
  }
561
563
  )
@@ -596,7 +598,7 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
596
598
  className: "relative w-full rounded-md",
597
599
  style: {
598
600
  height: 12,
599
- background: `linear-gradient(to right, #000, ${w})`,
601
+ background: `linear-gradient(to right, #000, ${x})`,
600
602
  touchAction: "none",
601
603
  cursor: "ew-resize"
602
604
  },
@@ -608,7 +610,7 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
608
610
  style: {
609
611
  top: "50%",
610
612
  left: `${c * 100}%`,
611
- backgroundColor: x,
613
+ backgroundColor: w,
612
614
  boxShadow: je
613
615
  },
614
616
  initial: we(!1),
@@ -621,9 +623,9 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
621
623
  ]
622
624
  }
623
625
  );
624
- }, bl = (n) => {
626
+ }, bl = (t) => {
625
627
  const {
626
- className: t,
628
+ className: n,
627
629
  label: o,
628
630
  description: s,
629
631
  error: r,
@@ -632,113 +634,113 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
632
634
  value: i,
633
635
  defaultValue: c,
634
636
  onChange: g,
635
- onBlur: w,
636
- onFocus: x,
637
- ...m
638
- } = n, [b, p] = A(
637
+ onBlur: x,
638
+ onFocus: w,
639
+ ...h
640
+ } = t, [b, p] = A(
639
641
  i != null ? String(i) : c != null ? String(c) : ""
640
- ), [f, v] = A(!1), u = ke(null), R = i != null ? String(i) : b, C = R || "white";
641
- be(f, () => v(!1));
642
- const { anchorRef: I, Popover: D } = at({
642
+ ), [m, v] = A(!1), u = ke(null), I = i != null ? String(i) : b, R = I || "white";
643
+ ve(m, () => v(!1));
644
+ const { anchorRef: y, Popover: D } = ct({
643
645
  placement: "bottom-start",
644
646
  onOutsideClick: () => v(!1)
645
647
  }), T = (k) => {
646
648
  p(k.target.value), g?.(k);
647
- }, E = (k) => {
648
- v(!0), x?.(k);
649
- }, L = (k) => {
650
- const B = k.target.value, O = nr(B);
651
- O && O !== B && u.current && bt(u.current, O), v(!1), w?.(k);
649
+ }, M = (k) => {
650
+ v(!0), w?.(k);
652
651
  }, P = (k) => {
653
- u.current && bt(u.current, k);
652
+ const B = k.target.value, O = nr(B);
653
+ O && O !== B && u.current && xt(u.current, O), v(!1), x?.(k);
654
+ }, z = (k) => {
655
+ u.current && xt(u.current, k);
654
656
  }, N = !!r || !!l;
655
657
  return /* @__PURE__ */ e(Q.Provider, { value: a, children: /* @__PURE__ */ d(
656
658
  "div",
657
659
  {
658
- className: h(
660
+ className: f(
659
661
  "flex flex-col",
660
- t
662
+ n
661
663
  ),
662
664
  children: [
663
665
  /* @__PURE__ */ e(J, { children: o }),
664
- /* @__PURE__ */ d("div", { className: "flex flex-col relative", ref: I, children: [
666
+ /* @__PURE__ */ d("div", { className: "flex flex-col relative", ref: y, children: [
665
667
  /* @__PURE__ */ e(
666
668
  "div",
667
669
  {
668
- className: h(
670
+ className: f(
669
671
  "absolute top-1/2 -translate-y-1/2 rounded-md border color-swatch",
670
- he[a],
671
- Lt[a]
672
+ pe[a],
673
+ Et[a]
672
674
  ),
673
- style: { backgroundColor: C }
675
+ style: { backgroundColor: R }
674
676
  }
675
677
  ),
676
678
  /* @__PURE__ */ e(
677
679
  "input",
678
680
  {
679
681
  ref: u,
680
- className: h(
682
+ className: f(
681
683
  "border input-base transition-all duration-150 rounded-xl shadow-sm ring-0 focus:ring-4 focus:outline-none",
682
684
  te[a],
683
685
  Y[a],
684
- Tt[a],
685
- N ? ue[a] : st[a],
686
+ Pt[a],
687
+ N ? me[a] : it[a],
686
688
  r && "input-error"
687
689
  ),
688
690
  value: i ?? b,
689
691
  onChange: T,
690
- onFocus: E,
691
- onBlur: L,
692
+ onFocus: M,
693
+ onBlur: P,
692
694
  onClick: () => v(!0),
693
- ...m
695
+ ...h
694
696
  }
695
697
  ),
696
698
  /* @__PURE__ */ d(fe, { children: [
697
699
  r && /* @__PURE__ */ e(ne, {}),
698
700
  l
699
701
  ] }),
700
- /* @__PURE__ */ e(D, { open: f, children: /* @__PURE__ */ e(ge, { padding: "md", children: /* @__PURE__ */ e(mr, { value: R, onChange: P }) }) })
702
+ /* @__PURE__ */ e(D, { open: m, children: /* @__PURE__ */ e(be, { padding: "md", children: /* @__PURE__ */ e(fr, { value: I, onChange: z }) }) })
701
703
  ] }),
702
704
  /* @__PURE__ */ e(V, { children: s }),
703
705
  /* @__PURE__ */ e(K, { children: r })
704
706
  ]
705
707
  }
706
708
  ) });
707
- }, q = (n) => {
709
+ }, q = (t) => {
708
710
  const {
709
- onClick: t,
711
+ onClick: n,
710
712
  Icon: o
711
- } = n;
713
+ } = t;
712
714
  return /* @__PURE__ */ e(
713
715
  "div",
714
716
  {
715
- onClick: t,
716
- className: h(
717
+ onClick: n,
718
+ className: f(
717
719
  "h-6 w-6 select-none rounded-full p-0.5",
718
- t && "ring-0 transition-all duration-150 input-icon-button-interactive active:ring-2 cursor-pointer hover:ring-4 group pointer-events-auto"
720
+ n && "ring-0 transition-all duration-150 input-icon-button-interactive active:ring-2 cursor-pointer hover:ring-4 group pointer-events-auto"
719
721
  ),
720
- children: /* @__PURE__ */ e(o, { className: h("h-5 w-5 input-icon-button-icon", t && "group-active:scale-[0.8] transition-transform origin-center") })
722
+ children: /* @__PURE__ */ e(o, { className: f("h-5 w-5 input-icon-button-icon", n && "group-active:scale-[0.8] transition-transform origin-center") })
721
723
  }
722
724
  );
723
- }, vl = (n) => {
725
+ }, vl = (t) => {
724
726
  const {
725
- type: t = "password",
727
+ type: n = "password",
726
728
  enableShowPasswordToggle: o = !0,
727
729
  ...s
728
- } = n, [r, l] = A(!1);
730
+ } = t, [r, l] = A(!1);
729
731
  return /* @__PURE__ */ e(
730
- Mt,
732
+ Bt,
731
733
  {
732
- type: r ? "text" : t,
733
- buttonTray: o ? /* @__PURE__ */ e(q, { Icon: r ? $t : Xt, onClick: () => {
734
+ type: r ? "text" : n,
735
+ buttonTray: o ? /* @__PURE__ */ e(q, { Icon: r ? jt : Vt, onClick: () => {
734
736
  l(!r);
735
737
  } }) : void 0,
736
738
  ...s
737
739
  }
738
740
  );
739
- }, xl = (n) => {
741
+ }, xl = (t) => {
740
742
  const {
741
- className: t,
743
+ className: n,
742
744
  label: o,
743
745
  description: s,
744
746
  error: r,
@@ -747,34 +749,34 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
747
749
  maxRows: i,
748
750
  ref: c,
749
751
  onChange: g,
750
- ...w
751
- } = n, x = y.useRef(null), m = y.useCallback(() => {
752
- const p = x.current;
752
+ ...x
753
+ } = t, w = C.useRef(null), h = C.useCallback(() => {
754
+ const p = w.current;
753
755
  if (!p) return;
754
756
  p.style.height = "auto";
755
- let f = p.scrollHeight;
757
+ let m = p.scrollHeight;
756
758
  if (i) {
757
- const v = window.getComputedStyle(p), u = parseFloat(v.lineHeight), R = parseFloat(v.paddingTop), C = parseFloat(v.paddingBottom), I = parseFloat(v.borderTopWidth), D = parseFloat(v.borderBottomWidth), T = u * i + R + C + I + D;
758
- f = Math.min(p.scrollHeight, T);
759
+ const v = window.getComputedStyle(p), u = parseFloat(v.lineHeight), I = parseFloat(v.paddingTop), R = parseFloat(v.paddingBottom), y = parseFloat(v.borderTopWidth), D = parseFloat(v.borderBottomWidth), T = u * i + I + R + y + D;
760
+ m = Math.min(p.scrollHeight, T);
759
761
  }
760
- p.style.height = `${f}px`;
762
+ p.style.height = `${m}px`;
761
763
  }, [i]);
762
- y.useLayoutEffect(() => {
764
+ C.useLayoutEffect(() => {
763
765
  if (!a) {
764
- x.current && (x.current.style.height = "");
766
+ w.current && (w.current.style.height = "");
765
767
  return;
766
768
  }
767
- m();
768
- }, [a, m, n.value, n.defaultValue, l]);
769
+ h();
770
+ }, [a, h, t.value, t.defaultValue, l]);
769
771
  const b = (p) => {
770
- g?.(p), a && m();
772
+ g?.(p), a && h();
771
773
  };
772
774
  return /* @__PURE__ */ e(Q.Provider, { value: l, children: /* @__PURE__ */ d(
773
775
  "div",
774
776
  {
775
- className: h(
777
+ className: f(
776
778
  "flex flex-col",
777
- t
779
+ n
778
780
  ),
779
781
  children: [
780
782
  /* @__PURE__ */ e(J, { children: o }),
@@ -782,18 +784,18 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
782
784
  /* @__PURE__ */ e(
783
785
  "textarea",
784
786
  {
785
- ref: c ? mn([c, x]) : x,
787
+ ref: c ? fn([c, w]) : w,
786
788
  onChange: b,
787
- className: h(
789
+ className: f(
788
790
  "py-2.5 border input-base transition-all duration-150 rounded-xl shadow-sm ring-0 focus:ring-4 focus:outline-none",
789
- zt[l],
791
+ Lt[l],
790
792
  Y[l],
791
- de[l],
792
- r ? ue[l] : st[l],
793
+ ue[l],
794
+ r ? me[l] : it[l],
793
795
  r && "input-error",
794
796
  a && (i ? "resize-none overflow-y-auto [scrollbar-width:none] [&::-webkit-scrollbar]:hidden" : "resize-none overflow-hidden")
795
797
  ),
796
- ...w
798
+ ...x
797
799
  }
798
800
  ),
799
801
  /* @__PURE__ */ e(fe, { className: "top-3.5 translate-y-0", children: r && /* @__PURE__ */ e(ne, {}) })
@@ -803,20 +805,20 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
803
805
  ]
804
806
  }
805
807
  ) });
806
- }, wl = (n) => {
808
+ }, wl = (t) => {
807
809
  const {
808
- className: t,
810
+ className: n,
809
811
  label: o,
810
812
  description: s,
811
813
  error: r,
812
814
  ...l
813
- } = n;
815
+ } = t;
814
816
  return /* @__PURE__ */ d(
815
817
  "div",
816
818
  {
817
- className: h(
819
+ className: f(
818
820
  "flex flex-col",
819
- t
821
+ n
820
822
  ),
821
823
  children: [
822
824
  /* @__PURE__ */ d("div", { className: "flex flex-row gap-3", children: [
@@ -828,9 +830,9 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
828
830
  ...l
829
831
  }
830
832
  ),
831
- o && /* @__PURE__ */ e("label", { htmlFor: n.id, className: h(
833
+ o && /* @__PURE__ */ e("label", { htmlFor: t.id, className: f(
832
834
  "input-label font-medium mb-1",
833
- n.id && "cursor-pointer"
835
+ t.id && "cursor-pointer"
834
836
  ), children: o })
835
837
  ] }),
836
838
  /* @__PURE__ */ e(V, { children: s }),
@@ -838,20 +840,20 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
838
840
  ]
839
841
  }
840
842
  );
841
- }, Nl = (n) => {
843
+ }, Nl = (t) => {
842
844
  const {
843
- className: t,
845
+ className: n,
844
846
  label: o,
845
847
  description: s,
846
848
  error: r,
847
849
  ...l
848
- } = n;
850
+ } = t;
849
851
  return /* @__PURE__ */ d(
850
852
  "div",
851
853
  {
852
- className: h(
854
+ className: f(
853
855
  "flex flex-col",
854
- t
856
+ n
855
857
  ),
856
858
  children: [
857
859
  /* @__PURE__ */ d("div", { className: "flex flex-row gap-3", children: [
@@ -864,17 +866,17 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
864
866
  ...l
865
867
  }
866
868
  ),
867
- /* @__PURE__ */ e("div", { className: h(
869
+ /* @__PURE__ */ e("div", { className: f(
868
870
  "rounded-full absolute border inset-0 mt-[2px] pointer-events-none transition-colors duration-150 ",
869
- n.checked ? "toggle-track-on" : "toggle-track-off"
870
- ), children: /* @__PURE__ */ e("div", { className: h(
871
+ t.checked ? "toggle-track-on" : "toggle-track-off"
872
+ ), children: /* @__PURE__ */ e("div", { className: f(
871
873
  "absolute top-1/2 -translate-y-1/2 left-1 h-4 w-4 rounded-full toggle-thumb shadow-md transition-all duration-150",
872
- n.checked && "translate-x-3.5 "
874
+ t.checked && "translate-x-3.5 "
873
875
  ) }) })
874
876
  ] }),
875
- o && /* @__PURE__ */ e("label", { htmlFor: n.id, className: h(
877
+ o && /* @__PURE__ */ e("label", { htmlFor: t.id, className: f(
876
878
  "input-label font-medium mb-1",
877
- n.id && "cursor-pointer"
879
+ t.id && "cursor-pointer"
878
880
  ), children: o })
879
881
  ] }),
880
882
  /* @__PURE__ */ e(V, { children: s }),
@@ -882,20 +884,20 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
882
884
  ]
883
885
  }
884
886
  );
885
- }, kl = (n) => {
887
+ }, kl = (t) => {
886
888
  const {
887
- className: t,
889
+ className: n,
888
890
  label: o,
889
891
  description: s,
890
892
  error: r,
891
893
  ...l
892
- } = n;
894
+ } = t;
893
895
  return /* @__PURE__ */ d(
894
896
  "div",
895
897
  {
896
- className: h(
898
+ className: f(
897
899
  "flex flex-col",
898
- t
900
+ n
899
901
  ),
900
902
  children: [
901
903
  /* @__PURE__ */ d("div", { className: "flex flex-row gap-3", children: [
@@ -907,9 +909,9 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
907
909
  ...l
908
910
  }
909
911
  ),
910
- o && /* @__PURE__ */ e("label", { htmlFor: n.id, className: h(
912
+ o && /* @__PURE__ */ e("label", { htmlFor: t.id, className: f(
911
913
  "input-label font-medium mb-1",
912
- n.id && "cursor-pointer"
914
+ t.id && "cursor-pointer"
913
915
  ), children: o })
914
916
  ] }),
915
917
  /* @__PURE__ */ e(V, { children: s }),
@@ -929,87 +931,87 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
929
931
  sm: "text-xs",
930
932
  md: "text-sm",
931
933
  lg: "text-sm"
932
- }, yl = (n) => {
934
+ }, yl = (t) => {
933
935
  const {
934
- label: t,
936
+ label: n,
935
937
  description: o,
936
938
  error: s,
937
939
  placeholder: r = "No file chosen",
938
940
  buttonText: l = "Choose",
939
- Icon: a = jt,
941
+ Icon: a = Kt,
940
942
  size: i = "md",
941
943
  value: c,
942
944
  isUploaded: g = !1,
943
- isUploading: w = !1,
944
- onChange: x,
945
- onDropRejected: m,
945
+ isUploading: x = !1,
946
+ onChange: w,
947
+ onDropRejected: h,
946
948
  accept: b,
947
949
  maxSize: p,
948
- minSize: f,
950
+ minSize: m,
949
951
  disabled: v = !1,
950
952
  className: u
951
- } = n, R = async (P) => {
952
- const [N] = P;
953
- N && await x?.(N);
953
+ } = t, I = async (z) => {
954
+ const [N] = z;
955
+ N && await w?.(N);
954
956
  }, {
955
- getRootProps: C,
956
- getInputProps: I,
957
+ getRootProps: R,
958
+ getInputProps: y,
957
959
  open: D,
958
960
  isDragActive: T,
959
- isFocused: E
960
- } = It({
961
+ isFocused: M
962
+ } = St({
961
963
  multiple: !1,
962
964
  accept: b,
963
965
  maxSize: p,
964
- minSize: f,
966
+ minSize: m,
965
967
  disabled: v,
966
- onDrop: R,
967
- onDropRejected: m
968
- }), L = c?.name;
969
- return /* @__PURE__ */ e(Q.Provider, { value: i, children: /* @__PURE__ */ d("div", { className: h("flex flex-col", u), children: [
970
- /* @__PURE__ */ e(J, { children: t }),
968
+ onDrop: I,
969
+ onDropRejected: h
970
+ }), P = c?.name;
971
+ return /* @__PURE__ */ e(Q.Provider, { value: i, children: /* @__PURE__ */ d("div", { className: f("flex flex-col", u), children: [
972
+ /* @__PURE__ */ e(J, { children: n }),
971
973
  /* @__PURE__ */ d(
972
974
  "div",
973
975
  {
974
- ...C({
975
- className: h(
976
+ ...R({
977
+ className: f(
976
978
  "flex flex-row items-center",
977
979
  "border input-base rounded-xl shadow-sm transition-all duration-150",
978
980
  "ring-0 focus:outline-none",
979
- (E || T) && "ring-4",
981
+ (M || T) && "ring-4",
980
982
  s && "input-error",
981
983
  v && "opacity-60 cursor-not-allowed",
982
984
  te[i],
983
- de[i],
985
+ ue[i],
984
986
  "gap-3"
985
987
  )
986
988
  }),
987
989
  children: [
988
- /* @__PURE__ */ e("input", { ...I() }),
989
- /* @__PURE__ */ e(a, { className: h("input-icon shrink-0", he[i]) }),
990
+ /* @__PURE__ */ e("input", { ...y() }),
991
+ /* @__PURE__ */ e(a, { className: f("input-icon shrink-0", pe[i]) }),
990
992
  /* @__PURE__ */ e(
991
993
  "span",
992
994
  {
993
- className: h(
995
+ className: f(
994
996
  "flex-1 truncate",
995
997
  Y[i],
996
- !L && "text-[var(--color-input-placeholder)]"
998
+ !P && "text-[var(--color-input-placeholder)]"
997
999
  ),
998
- children: L ?? r
1000
+ children: P ?? r
999
1001
  }
1000
1002
  ),
1001
1003
  s && /* @__PURE__ */ e(ne, {}),
1002
- w && !s && /* @__PURE__ */ e("div", { className: "h-5 w-5 flex items-center justify-center", children: /* @__PURE__ */ e(Re, { className: "h-4 w-4 text-[var(--color-input-icon)]" }) }),
1003
- g && !w && !s && /* @__PURE__ */ e("div", { className: "h-5 w-5", children: /* @__PURE__ */ e(et, { className: "h-5 w-5 text-[var(--color-status-success)]" }) }),
1004
+ x && !s && /* @__PURE__ */ e("div", { className: "h-5 w-5 flex items-center justify-center", children: /* @__PURE__ */ e(Re, { className: "h-4 w-4 text-[var(--color-input-icon)]" }) }),
1005
+ g && !x && !s && /* @__PURE__ */ e("div", { className: "h-5 w-5", children: /* @__PURE__ */ e(et, { className: "h-5 w-5 text-[var(--color-status-success)]" }) }),
1004
1006
  /* @__PURE__ */ e(
1005
1007
  "button",
1006
1008
  {
1007
1009
  type: "button",
1008
1010
  disabled: v,
1009
- onClick: (P) => {
1010
- P.stopPropagation(), D();
1011
+ onClick: (z) => {
1012
+ z.stopPropagation(), D();
1011
1013
  },
1012
- className: h(
1014
+ className: f(
1013
1015
  "inline-flex flex-row items-center justify-center shrink-0",
1014
1016
  "border button-white shadow-sm rounded-[calc(var(--border-radius-input)-0.25rem)]",
1015
1017
  "font-semibold cursor-pointer select-none transition-all duration-150",
@@ -1029,19 +1031,19 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
1029
1031
  /* @__PURE__ */ e(V, { children: o }),
1030
1032
  /* @__PURE__ */ e(K, { children: s })
1031
1033
  ] }) });
1032
- }, br = (n) => n < 1024 ? `${n} B` : n < 1024 * 1024 ? `${(n / 1024).toFixed(1)} KB` : n < 1024 * 1024 * 1024 ? `${(n / (1024 * 1024)).toFixed(1)} MB` : `${(n / (1024 * 1024 * 1024)).toFixed(1)} GB`, vr = (n) => {
1034
+ }, br = (t) => t < 1024 ? `${t} B` : t < 1024 * 1024 ? `${(t / 1024).toFixed(1)} KB` : t < 1024 * 1024 * 1024 ? `${(t / (1024 * 1024)).toFixed(1)} MB` : `${(t / (1024 * 1024 * 1024)).toFixed(1)} GB`, vr = (t) => {
1033
1035
  const {
1034
- file: t,
1036
+ file: n,
1035
1037
  isUploaded: o = !1,
1036
1038
  isUploading: s = !1,
1037
1039
  error: r,
1038
1040
  onRemove: l,
1039
1041
  className: a
1040
- } = n, i = s || o || !!r;
1042
+ } = t, i = s || o || !!r;
1041
1043
  return /* @__PURE__ */ d(
1042
1044
  "div",
1043
1045
  {
1044
- className: h(
1046
+ className: f(
1045
1047
  "flex flex-row items-center gap-3",
1046
1048
  "border input-base rounded-xl shadow-sm",
1047
1049
  "pl-4 pr-1 py-1",
@@ -1050,14 +1052,14 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
1050
1052
  ),
1051
1053
  children: [
1052
1054
  i && /* @__PURE__ */ e("div", { className: "shrink-0 h-5 w-5 flex items-center justify-center", children: r ? /* @__PURE__ */ e(Ze, { className: "h-5 w-5 input-error-icon" }) : s ? /* @__PURE__ */ e(Re, { className: "h-4 w-4 text-[var(--color-input-icon)]" }) : /* @__PURE__ */ e(et, { className: "h-5 w-5 text-[var(--color-status-success)]" }) }),
1053
- /* @__PURE__ */ e("div", { className: "flex-1 min-w-0 font-medium truncate", children: t.name }),
1054
- /* @__PURE__ */ e("div", { className: "shrink-0 text-sm text-[var(--color-input-description-text)]", children: br(t.size) }),
1055
+ /* @__PURE__ */ e("div", { className: "flex-1 min-w-0 font-medium truncate", children: n.name }),
1056
+ /* @__PURE__ */ e("div", { className: "shrink-0 text-sm text-[var(--color-input-description-text)]", children: br(n.size) }),
1055
1057
  l && /* @__PURE__ */ e(
1056
1058
  Je,
1057
1059
  {
1058
1060
  variant: "transparent",
1059
1061
  size: "sm",
1060
- Icon: ie,
1062
+ Icon: ce,
1061
1063
  onClick: l,
1062
1064
  "aria-label": "Remove file",
1063
1065
  className: "shrink-0"
@@ -1066,77 +1068,77 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
1066
1068
  ]
1067
1069
  }
1068
1070
  );
1069
- }, Cl = (n) => {
1071
+ }, Cl = (t) => {
1070
1072
  const {
1071
- label: t,
1073
+ label: n,
1072
1074
  description: o,
1073
1075
  error: s,
1074
1076
  title: r = "Drop files here",
1075
1077
  hint: l,
1076
- Icon: a = Vt,
1078
+ Icon: a = Gt,
1077
1079
  onUpload: i,
1078
1080
  onFileRemoved: c,
1079
1081
  onDropRejected: g,
1080
- renderFileTile: w,
1081
- accept: x,
1082
- maxSize: m,
1082
+ renderFileTile: x,
1083
+ accept: w,
1084
+ maxSize: h,
1083
1085
  minSize: b,
1084
1086
  maxFiles: p,
1085
- disabled: f = !1,
1087
+ disabled: m = !1,
1086
1088
  className: v
1087
- } = n, [u, R] = A([]), C = ke(0), I = (k, B) => {
1088
- R((O) => O.map((_) => _.id === k ? { ..._, ...B } : _));
1089
+ } = t, [u, I] = A([]), R = ke(0), y = (k, B) => {
1090
+ I((O) => O.map((_) => _.id === k ? { ..._, ...B } : _));
1089
1091
  }, D = (k) => {
1090
1092
  if (k.length === 0) return;
1091
1093
  const B = k.map((O) => ({
1092
- id: String(++C.current),
1094
+ id: String(++R.current),
1093
1095
  file: O,
1094
1096
  status: i ? "uploading" : "idle"
1095
1097
  }));
1096
- if (R((O) => [...O, ...B]), !!i)
1098
+ if (I((O) => [...O, ...B]), !!i)
1097
1099
  for (const O of B)
1098
- Promise.resolve().then(() => i(O.file)).then(() => I(O.id, { status: "uploaded" })).catch((_) => {
1099
- I(O.id, {
1100
+ Promise.resolve().then(() => i(O.file)).then(() => y(O.id, { status: "uploaded" })).catch((_) => {
1101
+ y(O.id, {
1100
1102
  status: "error",
1101
1103
  error: _ instanceof Error ? _ : new Error(String(_))
1102
1104
  });
1103
1105
  });
1104
1106
  }, T = (k) => {
1105
1107
  const B = u.find((O) => O.id === k);
1106
- R((O) => O.filter((_) => _.id !== k)), B && c?.(B.file);
1108
+ I((O) => O.filter((_) => _.id !== k)), B && c?.(B.file);
1107
1109
  }, {
1108
- getRootProps: E,
1109
- getInputProps: L,
1110
- isDragActive: P,
1110
+ getRootProps: M,
1111
+ getInputProps: P,
1112
+ isDragActive: z,
1111
1113
  isFocused: N
1112
- } = It({
1114
+ } = St({
1113
1115
  multiple: !0,
1114
- accept: x,
1115
- maxSize: m,
1116
+ accept: w,
1117
+ maxSize: h,
1116
1118
  minSize: b,
1117
1119
  maxFiles: p,
1118
- disabled: f,
1120
+ disabled: m,
1119
1121
  onDrop: D,
1120
1122
  onDropRejected: g
1121
1123
  });
1122
- return /* @__PURE__ */ d("div", { className: h("flex flex-col", v), children: [
1123
- /* @__PURE__ */ e(J, { children: t }),
1124
+ return /* @__PURE__ */ d("div", { className: f("flex flex-col", v), children: [
1125
+ /* @__PURE__ */ e(J, { children: n }),
1124
1126
  /* @__PURE__ */ d(
1125
1127
  "div",
1126
1128
  {
1127
- ...E({
1128
- className: h(
1129
+ ...M({
1130
+ className: f(
1129
1131
  "flex flex-col items-center justify-center gap-1",
1130
1132
  "border-2 border-dashed input-base rounded-xl bg-transparent!",
1131
1133
  "py-10 px-6 cursor-pointer transition-all duration-150",
1132
1134
  "ring-0 focus:outline-none",
1133
- (N || P) && "ring-4",
1135
+ (N || z) && "ring-4",
1134
1136
  s && "input-error",
1135
- f && "opacity-60 cursor-not-allowed"
1137
+ m && "opacity-60 cursor-not-allowed"
1136
1138
  )
1137
1139
  }),
1138
1140
  children: [
1139
- /* @__PURE__ */ e("input", { ...L() }),
1141
+ /* @__PURE__ */ e("input", { ...P() }),
1140
1142
  /* @__PURE__ */ e("div", { className: "h-14 w-14 rounded-xl flex items-center justify-center bg-[var(--color-input-file-icon-bg)] mb-2", children: /* @__PURE__ */ e(a, { className: "h-7 w-7 input-icon" }) }),
1141
1143
  /* @__PURE__ */ e("div", { className: "text-base font-semibold", children: r }),
1142
1144
  l && /* @__PURE__ */ e("div", { className: "text-sm text-[var(--color-input-description-text)] ", children: l })
@@ -1151,7 +1153,7 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
1151
1153
  error: k.status === "error" ? k.error?.message : void 0,
1152
1154
  onRemove: () => T(k.id)
1153
1155
  };
1154
- return /* @__PURE__ */ e(y.Fragment, { children: w ? w(k.file, B) : /* @__PURE__ */ e(vr, { ...B }) }, k.id);
1156
+ return /* @__PURE__ */ e(C.Fragment, { children: x ? x(k.file, B) : /* @__PURE__ */ e(vr, { ...B }) }, k.id);
1155
1157
  }) }),
1156
1158
  /* @__PURE__ */ e(V, { children: o }),
1157
1159
  /* @__PURE__ */ e(K, { children: s })
@@ -1159,10 +1161,10 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
1159
1161
  }, xr = [
1160
1162
  yn,
1161
1163
  Cn,
1162
- Rt,
1164
+ Dt,
1163
1165
  Sn,
1164
1166
  Tn
1165
- ], vt = {
1167
+ ], wt = {
1166
1168
  paragraph: "lexical-paragraph",
1167
1169
  heading: {
1168
1170
  h1: "lexical-h1",
@@ -1185,7 +1187,7 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
1185
1187
  italic: "lexical-italic",
1186
1188
  underline: "lexical-underline"
1187
1189
  }
1188
- }, Bt = {
1190
+ }, Ut = {
1189
1191
  isBold: !1,
1190
1192
  isItalic: !1,
1191
1193
  isUnderline: !1,
@@ -1196,64 +1198,64 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
1196
1198
  canUndo: !1,
1197
1199
  canRedo: !1
1198
1200
  }, Be = Qe({
1199
- state: Bt,
1201
+ state: Ut,
1200
1202
  tone: "light",
1201
1203
  orientation: "horizontal"
1202
- }), ve = () => qe(Be), At = () => {
1203
- const [n] = ce(), [t, o] = A(Bt);
1204
+ }), xe = () => qe(Be), Wt = () => {
1205
+ const [t] = de(), [n, o] = A(Ut);
1204
1206
  return $(() => {
1205
1207
  const s = () => {
1206
- n.getEditorState().read(() => {
1207
- const r = St();
1208
- if (!Dt(r))
1208
+ t.getEditorState().read(() => {
1209
+ const r = Ot();
1210
+ if (!zt(r))
1209
1211
  return;
1210
- const l = r.anchor.getNode(), a = Un(l, Rt), i = a && Dn(a) ? a.getListType() : null;
1212
+ const l = r.anchor.getNode(), a = Un(l, Dt), i = a && Dn(a) ? a.getListType() : null;
1211
1213
  let c = "paragraph";
1212
1214
  if (!i) {
1213
1215
  const b = l.getKey() === "root" ? l : l.getTopLevelElementOrThrow();
1214
1216
  In(b) && (c = b.getTag());
1215
1217
  }
1216
- const g = r.hasFormat("bold"), w = r.hasFormat("italic"), x = r.hasFormat("underline"), m = mt(l.getParent()) || mt(l);
1218
+ const g = r.hasFormat("bold"), x = r.hasFormat("italic"), w = r.hasFormat("underline"), h = pt(l.getParent()) || pt(l);
1217
1219
  o((b) => ({
1218
1220
  ...b,
1219
1221
  isBold: g,
1220
- isItalic: w,
1221
- isUnderline: x,
1222
- isLink: m,
1222
+ isItalic: x,
1223
+ isUnderline: w,
1224
+ isLink: h,
1223
1225
  isUnorderedList: i === "bullet",
1224
1226
  isOrderedList: i === "number",
1225
1227
  blockType: c
1226
1228
  }));
1227
1229
  });
1228
1230
  };
1229
- return Ot(
1230
- n.registerUpdateListener(() => s()),
1231
- n.registerCommand(
1231
+ return Tt(
1232
+ t.registerUpdateListener(() => s()),
1233
+ t.registerCommand(
1232
1234
  Ln,
1233
1235
  (r) => (o((l) => ({ ...l, canUndo: r })), !1),
1234
1236
  Le
1235
1237
  ),
1236
- n.registerCommand(
1238
+ t.registerCommand(
1237
1239
  Pn,
1238
1240
  (r) => (o((l) => ({ ...l, canRedo: r })), !1),
1239
1241
  Le
1240
1242
  )
1241
1243
  );
1242
- }, [n]), t;
1243
- }, Ut = Qe(void 0), wr = () => ({
1244
- dismiss: qe(Ut) || (() => {
1244
+ }, [t]), n;
1245
+ }, Ht = Qe(void 0), wr = () => ({
1246
+ dismiss: qe(Ht) || (() => {
1245
1247
  })
1246
- }), Ae = (n) => {
1247
- const { trigger: t, children: o, placement: s = "bottom-end", minWidth: r = 200, className: l } = n, [a, i] = A(!1), { Popover: c, anchorRef: g } = at({
1248
+ }), Ae = (t) => {
1249
+ const { trigger: n, children: o, placement: s = "bottom-end", minWidth: r = 200, className: l } = t, [a, i] = A(!1), { Popover: c, anchorRef: g } = ct({
1248
1250
  placement: s,
1249
1251
  onOutsideClick: () => i(!1),
1250
1252
  minWidth: r
1251
1253
  });
1252
1254
  return /* @__PURE__ */ d(ee, { children: [
1253
- /* @__PURE__ */ e("div", { ref: g, className: l, onClick: () => i(!a), children: t }),
1254
- /* @__PURE__ */ e(c, { open: a, children: /* @__PURE__ */ e(ge, { padding: "sm", children: /* @__PURE__ */ e(Ut.Provider, { value: () => i(!1), children: o }) }) })
1255
+ /* @__PURE__ */ e("div", { ref: g, className: l, onClick: () => i(!a), children: n }),
1256
+ /* @__PURE__ */ e(c, { open: a, children: /* @__PURE__ */ e(be, { padding: "sm", children: /* @__PURE__ */ e(Ht.Provider, { value: () => i(!1), children: o }) }) })
1255
1257
  ] });
1256
- }, Nr = "inline-flex flex-row items-center gap-3 h-10 px-3 font-semibold ring-0 dropdown-item rounded-lg cursor-pointer transition-all duration-150 select-none focus:outline-none focus:ring-0 border border-transparent bg-transparent", j = y.forwardRef((n, t) => {
1258
+ }, Nr = "inline-flex flex-row items-center gap-3 h-10 px-3 font-semibold ring-0 dropdown-item rounded-lg cursor-pointer transition-all duration-150 select-none focus:outline-none focus:ring-0 border border-transparent bg-transparent", j = C.forwardRef((t, n) => {
1257
1259
  const {
1258
1260
  className: o,
1259
1261
  children: s,
@@ -1261,14 +1263,14 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
1261
1263
  onClick: l,
1262
1264
  dismissOnClick: a = !0,
1263
1265
  ...i
1264
- } = n, { dismiss: c } = wr(), g = (w) => {
1265
- l && l(w), a && c();
1266
+ } = t, { dismiss: c } = wr(), g = (x) => {
1267
+ l && l(x), a && c();
1266
1268
  };
1267
1269
  return /* @__PURE__ */ d(
1268
1270
  "button",
1269
1271
  {
1270
- ref: t,
1271
- className: h(
1272
+ ref: n,
1273
+ className: f(
1272
1274
  Nr,
1273
1275
  o
1274
1276
  ),
@@ -1287,12 +1289,12 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
1287
1289
  { value: "h3", label: "Heading 3" },
1288
1290
  { value: "h4", label: "Heading 4" }
1289
1291
  ], kr = () => {
1290
- const [n] = ce(), { state: t, tone: o } = ve(), s = (l) => {
1291
- n.update(() => {
1292
- const a = St();
1293
- Dt(a) && (l === "paragraph" ? pt(a, () => En()) : pt(a, () => Rn(l)));
1292
+ const [t] = de(), { state: n, tone: o } = xe(), s = (l) => {
1293
+ t.update(() => {
1294
+ const a = Ot();
1295
+ zt(a) && (l === "paragraph" ? bt(a, () => En()) : bt(a, () => Rn(l)));
1294
1296
  });
1295
- }, r = Ke.find((l) => l.value === t.blockType) ?? Ke[0];
1297
+ }, r = Ke.find((l) => l.value === n.blockType) ?? Ke[0];
1296
1298
  return /* @__PURE__ */ e(
1297
1299
  Ae,
1298
1300
  {
@@ -1303,22 +1305,22 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
1303
1305
  {
1304
1306
  type: "button",
1305
1307
  onMouseDown: (l) => l.preventDefault(),
1306
- className: h(
1308
+ className: f(
1307
1309
  "lexical-tb-btn h-8 px-2 gap-1 text-sm font-medium",
1308
1310
  o === "dark" ? "lexical-tb-btn-dark" : "lexical-tb-btn-light"
1309
1311
  ),
1310
1312
  children: [
1311
1313
  r.label,
1312
- /* @__PURE__ */ e(pe, { className: "h-4 w-4" })
1314
+ /* @__PURE__ */ e(ge, { className: "h-4 w-4" })
1313
1315
  ]
1314
1316
  }
1315
1317
  ),
1316
1318
  children: Ke.map((l) => /* @__PURE__ */ e(
1317
1319
  j,
1318
1320
  {
1319
- Icon: l.value === t.blockType ? Ct : void 0,
1321
+ Icon: l.value === n.blockType ? Rt : void 0,
1320
1322
  onClick: () => s(l.value),
1321
- className: l.value === t.blockType ? void 0 : "pl-11",
1323
+ className: l.value === n.blockType ? void 0 : "pl-11",
1322
1324
  children: l.label
1323
1325
  },
1324
1326
  l.value
@@ -1328,18 +1330,18 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
1328
1330
  }, yr = {
1329
1331
  light: "lexical-tb-btn-light",
1330
1332
  dark: "lexical-tb-btn-dark"
1331
- }, ae = y.forwardRef(
1332
- (n, t) => {
1333
- const { Icon: o, active: s = !1, tone: r = "light", className: l, onMouseDown: a, ...i } = n;
1333
+ }, ie = C.forwardRef(
1334
+ (t, n) => {
1335
+ const { Icon: o, active: s = !1, tone: r = "light", className: l, onMouseDown: a, ...i } = t;
1334
1336
  return /* @__PURE__ */ e(
1335
1337
  "button",
1336
1338
  {
1337
- ref: t,
1339
+ ref: n,
1338
1340
  type: "button",
1339
1341
  onMouseDown: (g) => {
1340
1342
  g.preventDefault(), a?.(g);
1341
1343
  },
1342
- className: h(
1344
+ className: f(
1343
1345
  "lexical-tb-btn h-8 w-8",
1344
1346
  yr[r],
1345
1347
  s && "lexical-tb-btn-active",
@@ -1351,163 +1353,163 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
1351
1353
  );
1352
1354
  }
1353
1355
  ), Cr = () => {
1354
- const [n] = ce(), { state: t, tone: o } = ve();
1356
+ const [t] = de(), { state: n, tone: o } = xe();
1355
1357
  return /* @__PURE__ */ d(ee, { children: [
1356
1358
  /* @__PURE__ */ e(
1357
- ae,
1359
+ ie,
1358
1360
  {
1359
- Icon: Kt,
1361
+ Icon: Yt,
1360
1362
  tone: o,
1361
- active: t.isBold,
1363
+ active: n.isBold,
1362
1364
  "aria-label": "Bold",
1363
- onClick: () => n.dispatchCommand($e, "bold")
1365
+ onClick: () => t.dispatchCommand($e, "bold")
1364
1366
  }
1365
1367
  ),
1366
1368
  /* @__PURE__ */ e(
1367
- ae,
1369
+ ie,
1368
1370
  {
1369
- Icon: Gt,
1371
+ Icon: Jt,
1370
1372
  tone: o,
1371
- active: t.isItalic,
1373
+ active: n.isItalic,
1372
1374
  "aria-label": "Italic",
1373
- onClick: () => n.dispatchCommand($e, "italic")
1375
+ onClick: () => t.dispatchCommand($e, "italic")
1374
1376
  }
1375
1377
  ),
1376
1378
  /* @__PURE__ */ e(
1377
- ae,
1379
+ ie,
1378
1380
  {
1379
- Icon: Yt,
1381
+ Icon: Qt,
1380
1382
  tone: o,
1381
- active: t.isUnderline,
1383
+ active: n.isUnderline,
1382
1384
  "aria-label": "Underline",
1383
- onClick: () => n.dispatchCommand($e, "underline")
1385
+ onClick: () => t.dispatchCommand($e, "underline")
1384
1386
  }
1385
1387
  )
1386
1388
  ] });
1387
1389
  }, Ir = () => {
1388
- const [n] = ce(), { state: t, tone: o } = ve(), s = () => {
1389
- n.dispatchCommand(
1390
- t.isUnorderedList ? ft : On,
1390
+ const [t] = de(), { state: n, tone: o } = xe(), s = () => {
1391
+ t.dispatchCommand(
1392
+ n.isUnorderedList ? ht : On,
1391
1393
  void 0
1392
1394
  );
1393
1395
  }, r = () => {
1394
- n.dispatchCommand(
1395
- t.isOrderedList ? ft : zn,
1396
+ t.dispatchCommand(
1397
+ n.isOrderedList ? ht : zn,
1396
1398
  void 0
1397
1399
  );
1398
1400
  };
1399
1401
  return /* @__PURE__ */ d(ee, { children: [
1400
1402
  /* @__PURE__ */ e(
1401
- ae,
1403
+ ie,
1402
1404
  {
1403
1405
  Icon: Ye,
1404
1406
  tone: o,
1405
- active: t.isUnorderedList,
1407
+ active: n.isUnorderedList,
1406
1408
  "aria-label": "Bullet list",
1407
1409
  onClick: s
1408
1410
  }
1409
1411
  ),
1410
1412
  /* @__PURE__ */ e(
1411
- ae,
1413
+ ie,
1412
1414
  {
1413
- Icon: Jt,
1415
+ Icon: qt,
1414
1416
  tone: o,
1415
- active: t.isOrderedList,
1417
+ active: n.isOrderedList,
1416
1418
  "aria-label": "Numbered list",
1417
1419
  onClick: r
1418
1420
  }
1419
1421
  )
1420
1422
  ] });
1421
1423
  }, Rr = () => {
1422
- const [n] = ce(), { state: t, tone: o } = ve(), s = () => {
1423
- if (t.isLink) {
1424
- n.dispatchCommand(ht, null);
1424
+ const [t] = de(), { state: n, tone: o } = xe(), s = () => {
1425
+ if (n.isLink) {
1426
+ t.dispatchCommand(gt, null);
1425
1427
  return;
1426
1428
  }
1427
1429
  const r = window.prompt("Enter URL");
1428
- r && n.dispatchCommand(ht, r);
1430
+ r && t.dispatchCommand(gt, r);
1429
1431
  };
1430
1432
  return /* @__PURE__ */ e(
1431
- ae,
1433
+ ie,
1432
1434
  {
1433
- Icon: Qt,
1435
+ Icon: Zt,
1434
1436
  tone: o,
1435
- active: t.isLink,
1437
+ active: n.isLink,
1436
1438
  "aria-label": "Link",
1437
1439
  onClick: s
1438
1440
  }
1439
1441
  );
1440
1442
  }, Sr = () => {
1441
- const [n] = ce(), { state: t, tone: o } = ve();
1443
+ const [t] = de(), { state: n, tone: o } = xe();
1442
1444
  return /* @__PURE__ */ d(ee, { children: [
1443
1445
  /* @__PURE__ */ e(
1444
- ae,
1446
+ ie,
1445
1447
  {
1446
- Icon: qt,
1448
+ Icon: en,
1447
1449
  tone: o,
1448
- disabled: !t.canUndo,
1450
+ disabled: !n.canUndo,
1449
1451
  "aria-label": "Undo",
1450
- onClick: () => n.dispatchCommand(Mn, void 0)
1452
+ onClick: () => t.dispatchCommand(Mn, void 0)
1451
1453
  }
1452
1454
  ),
1453
1455
  /* @__PURE__ */ e(
1454
- ae,
1456
+ ie,
1455
1457
  {
1456
- Icon: Zt,
1458
+ Icon: tn,
1457
1459
  tone: o,
1458
- disabled: !t.canRedo,
1460
+ disabled: !n.canRedo,
1459
1461
  "aria-label": "Redo",
1460
- onClick: () => n.dispatchCommand(Fn, void 0)
1462
+ onClick: () => t.dispatchCommand(Fn, void 0)
1461
1463
  }
1462
1464
  )
1463
1465
  ] });
1464
1466
  }, Dr = {
1465
1467
  light: "lexical-tb-divider-light",
1466
1468
  dark: "lexical-tb-divider-dark"
1467
- }, Ge = (n) => {
1468
- const { tone: t, className: o } = n, { tone: s, orientation: r } = ve();
1469
+ }, Ge = (t) => {
1470
+ const { tone: n, className: o } = t, { tone: s, orientation: r } = xe();
1469
1471
  return /* @__PURE__ */ e(
1470
1472
  "div",
1471
1473
  {
1472
- className: h(
1474
+ className: f(
1473
1475
  r === "vertical" ? "h-px w-full my-1" : "w-px h-5 my-auto mx-1",
1474
1476
  "shrink-0",
1475
- Dr[t ?? s],
1477
+ Dr[n ?? s],
1476
1478
  o
1477
1479
  )
1478
1480
  }
1479
1481
  );
1480
- }, xt = 4, Or = 36, Wt = (n) => {
1481
- const t = [];
1482
- return y.Children.forEach(n, (o) => {
1483
- y.isValidElement(o) && o.type === y.Fragment ? t.push(...Wt(o.props.children)) : t.push(o);
1484
- }), t;
1485
- }, Ht = (n) => {
1486
- const { children: t } = n, { state: o, tone: s } = ve(), r = Wt(t), l = ke(null), a = ke(null), [i, c] = A(r.length), g = Te(() => {
1487
- const m = l.current, b = a.current;
1488
- if (!m || !b) return;
1489
- const p = m.clientWidth, f = Array.from(b.children).map((C) => C.offsetWidth);
1490
- if (f.reduce((C, I, D) => C + I + (D > 0 ? xt : 0), 0) <= p) {
1491
- c(f.length);
1482
+ }, Nt = 4, Or = 36, _t = (t) => {
1483
+ const n = [];
1484
+ return C.Children.forEach(t, (o) => {
1485
+ C.isValidElement(o) && o.type === C.Fragment ? n.push(..._t(o.props.children)) : n.push(o);
1486
+ }), n;
1487
+ }, $t = (t) => {
1488
+ const { children: n } = t, { state: o, tone: s } = xe(), r = _t(n), l = ke(null), a = ke(null), [i, c] = A(r.length), g = Te(() => {
1489
+ const h = l.current, b = a.current;
1490
+ if (!h || !b) return;
1491
+ const p = h.clientWidth, m = Array.from(b.children).map((R) => R.offsetWidth);
1492
+ if (m.reduce((R, y, D) => R + y + (D > 0 ? Nt : 0), 0) <= p) {
1493
+ c(m.length);
1492
1494
  return;
1493
1495
  }
1494
- let u = 0, R = 0;
1495
- for (let C = 0; C < f.length; C++) {
1496
- const I = f[C] + (C > 0 ? xt : 0);
1497
- if (u + I + Or > p) break;
1498
- u += I, R++;
1496
+ let u = 0, I = 0;
1497
+ for (let R = 0; R < m.length; R++) {
1498
+ const y = m[R] + (R > 0 ? Nt : 0);
1499
+ if (u + y + Or > p) break;
1500
+ u += y, I++;
1499
1501
  }
1500
- c(R);
1502
+ c(I);
1501
1503
  }, []);
1502
- yt(() => {
1504
+ It(() => {
1503
1505
  g();
1504
1506
  }), $(() => {
1505
- const m = l.current, b = a.current;
1506
- if (!m) return;
1507
+ const h = l.current, b = a.current;
1508
+ if (!h) return;
1507
1509
  const p = new ResizeObserver(() => g());
1508
- return p.observe(m), b && p.observe(b), () => p.disconnect();
1510
+ return p.observe(h), b && p.observe(b), () => p.disconnect();
1509
1511
  }, [g]);
1510
- const w = r.slice(0, i), x = r.slice(i);
1512
+ const x = r.slice(0, i), w = r.slice(i);
1511
1513
  return /* @__PURE__ */ d(
1512
1514
  "div",
1513
1515
  {
@@ -1520,11 +1522,11 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
1520
1522
  ref: a,
1521
1523
  "aria-hidden": !0,
1522
1524
  className: "pointer-events-none invisible absolute left-0 top-0 flex flex-row items-center gap-1 w-max",
1523
- children: r.map((m, b) => /* @__PURE__ */ e("div", { className: "flex flex-row items-center", children: m }, b))
1525
+ children: r.map((h, b) => /* @__PURE__ */ e("div", { className: "flex flex-row items-center", children: h }, b))
1524
1526
  }
1525
1527
  ),
1526
- w.map((m, b) => /* @__PURE__ */ e(y.Fragment, { children: m }, b)),
1527
- x.length > 0 && /* @__PURE__ */ e(
1528
+ x.map((h, b) => /* @__PURE__ */ e(C.Fragment, { children: h }, b)),
1529
+ w.length > 0 && /* @__PURE__ */ e(
1528
1530
  Ae,
1529
1531
  {
1530
1532
  placement: "bottom-end",
@@ -1534,20 +1536,20 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
1534
1536
  {
1535
1537
  type: "button",
1536
1538
  "aria-label": "More",
1537
- onMouseDown: (m) => m.preventDefault(),
1538
- className: h(
1539
+ onMouseDown: (h) => h.preventDefault(),
1540
+ className: f(
1539
1541
  "lexical-tb-btn h-8 w-8 shrink-0",
1540
1542
  s === "dark" ? "lexical-tb-btn-dark" : "lexical-tb-btn-light"
1541
1543
  ),
1542
- children: /* @__PURE__ */ e(en, { className: "h-[18px] w-[18px]" })
1544
+ children: /* @__PURE__ */ e(nn, { className: "h-[18px] w-[18px]" })
1543
1545
  }
1544
1546
  ),
1545
1547
  children: /* @__PURE__ */ e(Be.Provider, { value: { state: o, tone: "light", orientation: "vertical" }, children: /* @__PURE__ */ e(
1546
1548
  "div",
1547
1549
  {
1548
1550
  className: "flex flex-col items-stretch gap-1",
1549
- onMouseDown: (m) => m.preventDefault(),
1550
- children: x.map((m, b) => /* @__PURE__ */ e(y.Fragment, { children: m }, b))
1551
+ onMouseDown: (h) => h.preventDefault(),
1552
+ children: w.map((h, b) => /* @__PURE__ */ e(C.Fragment, { children: h }, b))
1551
1553
  }
1552
1554
  ) })
1553
1555
  }
@@ -1555,7 +1557,7 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
1555
1557
  ]
1556
1558
  }
1557
1559
  );
1558
- }, it = () => /* @__PURE__ */ d(ee, { children: [
1560
+ }, dt = () => /* @__PURE__ */ d(ee, { children: [
1559
1561
  /* @__PURE__ */ e(kr, {}),
1560
1562
  /* @__PURE__ */ e(Ge, {}),
1561
1563
  /* @__PURE__ */ e(Cr, {}),
@@ -1564,35 +1566,35 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
1564
1566
  /* @__PURE__ */ e(Rr, {}),
1565
1567
  /* @__PURE__ */ e(Ge, {}),
1566
1568
  /* @__PURE__ */ e(Sr, {})
1567
- ] }), Il = () => it(), zr = (n) => {
1568
- const { render: t, className: o } = n, [s] = ce(), r = At();
1569
+ ] }), Il = () => dt(), zr = (t) => {
1570
+ const { render: n, className: o } = t, [s] = de(), r = Wt();
1569
1571
  return /* @__PURE__ */ e(Be.Provider, { value: { state: r, tone: "light" }, children: /* @__PURE__ */ e(
1570
1572
  "div",
1571
1573
  {
1572
- className: h(
1574
+ className: f(
1573
1575
  "lexical-toolbar flex flex-row items-center p-1.5",
1574
1576
  o
1575
1577
  ),
1576
- children: /* @__PURE__ */ e(Ht, { children: t ? t({ editor: s, state: r, tone: "light" }) : it() })
1578
+ children: /* @__PURE__ */ e($t, { children: n ? n({ editor: s, state: r, tone: "light" }) : dt() })
1577
1579
  }
1578
1580
  ) });
1579
- }, Tr = (n) => {
1580
- const { render: t } = n, [o] = ce(), s = At(), [r, l] = A(!1), { refs: a, floatingStyles: i } = lt({
1581
+ }, Tr = (t) => {
1582
+ const { render: n } = t, [o] = de(), s = Wt(), [r, l] = A(!1), { refs: a, floatingStyles: i } = st({
1581
1583
  placement: "top-start",
1582
1584
  strategy: "fixed",
1583
1585
  middleware: [
1584
- an(8),
1585
- cn(),
1586
- dn({ padding: 8 }),
1587
- rt({
1586
+ dn(8),
1587
+ rt(),
1588
+ lt({ padding: 8 }),
1589
+ ot({
1588
1590
  apply({ rects: c, elements: g }) {
1589
1591
  g.floating.style.width = `${c.reference.width}px`;
1590
1592
  }
1591
1593
  })
1592
1594
  ],
1593
- whileElementsMounted: ot
1595
+ whileElementsMounted: at
1594
1596
  });
1595
- return $(() => o.registerRootListener((c) => a.setReference(c ?? null)), [o, a]), $(() => Ot(
1597
+ return $(() => o.registerRootListener((c) => a.setReference(c ?? null)), [o, a]), $(() => Tt(
1596
1598
  o.registerCommand(
1597
1599
  Bn,
1598
1600
  () => (l(!0), !1),
@@ -1611,12 +1613,12 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
1611
1613
  animate: { opacity: 1, y: 0 },
1612
1614
  exit: { opacity: 0, y: 4 },
1613
1615
  transition: { duration: 0.1, ease: "easeInOut" },
1614
- children: /* @__PURE__ */ e(Ht, { children: t ? t({ editor: o, state: s, tone: "dark" }) : it() })
1616
+ children: /* @__PURE__ */ e($t, { children: n ? n({ editor: o, state: s, tone: "dark" }) : dt() })
1615
1617
  }
1616
1618
  ) }) }) }) });
1617
- }, Rl = (n) => {
1619
+ }, Rl = (t) => {
1618
1620
  const {
1619
- label: t,
1621
+ label: n,
1620
1622
  description: o,
1621
1623
  error: s,
1622
1624
  placeholder: r,
@@ -1625,40 +1627,40 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
1625
1627
  size: i = "md",
1626
1628
  toolbar: c = "static",
1627
1629
  renderToolbar: g,
1628
- minRows: w = 4,
1629
- maxRows: x,
1630
- autogrow: m = !1,
1630
+ minRows: x = 4,
1631
+ maxRows: w,
1632
+ autogrow: h = !1,
1631
1633
  namespace: b = "InputLexical",
1632
1634
  nodes: p,
1633
- theme: f,
1635
+ theme: m,
1634
1636
  autoFocus: v = !1,
1635
1637
  children: u,
1636
- className: R
1637
- } = n, C = se(
1638
+ className: I
1639
+ } = t, R = ae(
1638
1640
  () => ({
1639
1641
  namespace: b,
1640
- theme: f ? { ...vt, ...f } : vt,
1642
+ theme: m ? { ...wt, ...m } : wt,
1641
1643
  nodes: [...xr, ...p ?? []],
1642
1644
  editorState: l ?? null,
1643
- onError: (P) => {
1644
- throw P;
1645
+ onError: (z) => {
1646
+ throw z;
1645
1647
  }
1646
1648
  }),
1647
1649
  // Lexical reads initialConfig once on mount; later prop changes are ignored by design.
1648
1650
  // eslint-disable-next-line react-hooks/exhaustive-deps
1649
1651
  []
1650
- ), I = Te(
1651
- (P) => {
1652
- a?.(JSON.stringify(P.toJSON()));
1652
+ ), y = Te(
1653
+ (z) => {
1654
+ a?.(JSON.stringify(z.toJSON()));
1653
1655
  },
1654
1656
  [a]
1655
- ), D = Y[i], T = !!s, E = (P) => `calc(${P} * 1lh + 1.5rem)`, L = m ? { minHeight: E(w), maxHeight: x ? E(x) : void 0 } : { height: E(w) };
1656
- return /* @__PURE__ */ e(Q.Provider, { value: i, children: /* @__PURE__ */ d("div", { className: h("flex flex-col", R), children: [
1657
- /* @__PURE__ */ e(J, { children: t }),
1658
- /* @__PURE__ */ e(hn, { initialConfig: C, children: /* @__PURE__ */ d(
1657
+ ), D = Y[i], T = !!s, M = (z) => `calc(${z} * 1lh + 1.5rem)`, P = h ? { minHeight: M(x), maxHeight: w ? M(w) : void 0 } : { height: M(x) };
1658
+ return /* @__PURE__ */ e(Q.Provider, { value: i, children: /* @__PURE__ */ d("div", { className: f("flex flex-col", I), children: [
1659
+ /* @__PURE__ */ e(J, { children: n }),
1660
+ /* @__PURE__ */ e(hn, { initialConfig: R, children: /* @__PURE__ */ d(
1659
1661
  "div",
1660
1662
  {
1661
- className: h(
1663
+ className: f(
1662
1664
  "relative flex flex-col border input-base rounded-xl shadow-sm overflow-hidden transition-all duration-150 ring-0 focus-within:ring-4 focus-within:outline-none",
1663
1665
  T && "input-error"
1664
1666
  ),
@@ -1670,16 +1672,16 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
1670
1672
  contentEditable: /* @__PURE__ */ e(
1671
1673
  gn,
1672
1674
  {
1673
- className: h(
1675
+ className: f(
1674
1676
  "lexical-content w-full outline-none px-3 py-3 leading-[1.55] overflow-y-auto mat-ui-hide-scrollbars",
1675
1677
  D
1676
1678
  ),
1677
- style: L,
1679
+ style: P,
1678
1680
  "aria-placeholder": r ?? "",
1679
1681
  placeholder: /* @__PURE__ */ e(
1680
1682
  "div",
1681
1683
  {
1682
- className: h(
1684
+ className: f(
1683
1685
  "lexical-placeholder pointer-events-none absolute left-3 top-3",
1684
1686
  D
1685
1687
  ),
@@ -1695,7 +1697,7 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
1695
1697
  /* @__PURE__ */ e(vn, {}),
1696
1698
  /* @__PURE__ */ e(xn, {}),
1697
1699
  v && /* @__PURE__ */ e(Nn, {}),
1698
- a && /* @__PURE__ */ e(wn, { onChange: I }),
1700
+ a && /* @__PURE__ */ e(wn, { onChange: y }),
1699
1701
  u,
1700
1702
  c === "floating" && /* @__PURE__ */ e(Tr, { render: g })
1701
1703
  ]
@@ -1704,22 +1706,22 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
1704
1706
  /* @__PURE__ */ e(V, { children: o }),
1705
1707
  /* @__PURE__ */ e(K, { children: s })
1706
1708
  ] }) });
1707
- }, Sl = (n) => {
1709
+ }, Sl = (t) => {
1708
1710
  const {
1709
- className: t,
1711
+ className: n,
1710
1712
  label: o,
1711
1713
  description: s,
1712
1714
  options: r,
1713
1715
  error: l,
1714
1716
  size: a = "md",
1715
1717
  ...i
1716
- } = n;
1718
+ } = t;
1717
1719
  return /* @__PURE__ */ e(Q.Provider, { value: a, children: /* @__PURE__ */ d(
1718
1720
  "div",
1719
1721
  {
1720
- className: h(
1722
+ className: f(
1721
1723
  "flex flex-col",
1722
- t
1724
+ n
1723
1725
  ),
1724
1726
  children: [
1725
1727
  /* @__PURE__ */ e(J, { children: o }),
@@ -1727,12 +1729,12 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
1727
1729
  /* @__PURE__ */ e(
1728
1730
  "select",
1729
1731
  {
1730
- className: h(
1732
+ className: f(
1731
1733
  "appearance-none border input-base bg-none transition-all duration-150 rounded-xl shadow-sm ring-0 focus:ring-4 focus:outline-none",
1732
1734
  te[a],
1733
1735
  Y[a],
1734
- de[a],
1735
- ue[a]
1736
+ ue[a],
1737
+ me[a]
1736
1738
  ),
1737
1739
  ...i,
1738
1740
  children: r && r.map((c, g) => /* @__PURE__ */ e(
@@ -1748,7 +1750,7 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
1748
1750
  ),
1749
1751
  /* @__PURE__ */ d(fe, { children: [
1750
1752
  l && /* @__PURE__ */ e(ne, {}),
1751
- /* @__PURE__ */ e(q, { Icon: pe })
1753
+ /* @__PURE__ */ e(q, { Icon: ge })
1752
1754
  ] })
1753
1755
  ] }),
1754
1756
  /* @__PURE__ */ e(V, { children: s }),
@@ -1756,7 +1758,7 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
1756
1758
  ]
1757
1759
  }
1758
1760
  ) });
1759
- }, Ue = y.forwardRef((n, t) => {
1761
+ }, Ue = C.forwardRef((t, n) => {
1760
1762
  const {
1761
1763
  children: o,
1762
1764
  onClick: s,
@@ -1765,14 +1767,14 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
1765
1767
  active: a = !1,
1766
1768
  className: i,
1767
1769
  ...c
1768
- } = n;
1770
+ } = t;
1769
1771
  return /* @__PURE__ */ d(
1770
1772
  "div",
1771
1773
  {
1772
- ref: t,
1774
+ ref: n,
1773
1775
  ...c,
1774
1776
  onClick: () => !l && s && s(),
1775
- className: h(
1777
+ className: f(
1776
1778
  "option-base px-4 py-2 rounded-xl cursor-pointer transition-all duration-150 select-none flex flex-row gap-3 items-center",
1777
1779
  r && !l && "option-selected",
1778
1780
  a && !l && "option-active",
@@ -1781,40 +1783,40 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
1781
1783
  ),
1782
1784
  children: [
1783
1785
  /* @__PURE__ */ e("div", { className: "flex-1 min-w-0 break-all line-clamp-1", children: o }),
1784
- r && !l && /* @__PURE__ */ e("div", { className: "shrink-0", children: /* @__PURE__ */ e(Ct, { className: "h-5 w-5" }) })
1786
+ r && !l && /* @__PURE__ */ e("div", { className: "shrink-0", children: /* @__PURE__ */ e(Rt, { className: "h-5 w-5" }) })
1785
1787
  ]
1786
1788
  }
1787
1789
  );
1788
- }), We = y.forwardRef((n, t) => {
1789
- const { children: o, className: s, ...r } = n;
1790
+ }), We = C.forwardRef((t, n) => {
1791
+ const { children: o, className: s, ...r } = t;
1790
1792
  return /* @__PURE__ */ e(
1791
1793
  "div",
1792
1794
  {
1793
- ref: t,
1795
+ ref: n,
1794
1796
  ...r,
1795
- className: h(
1797
+ className: f(
1796
1798
  "option-group-header px-4 pt-3 pb-1 text-xs font-semibold uppercase tracking-wide select-none",
1797
1799
  s
1798
1800
  ),
1799
1801
  children: o
1800
1802
  }
1801
1803
  );
1802
- }), He = y.forwardRef((n, t) => {
1803
- const { className: o, ...s } = n;
1804
+ }), He = C.forwardRef((t, n) => {
1805
+ const { className: o, ...s } = t;
1804
1806
  return /* @__PURE__ */ e(
1805
1807
  "div",
1806
1808
  {
1807
- ref: t,
1809
+ ref: n,
1808
1810
  ...s,
1809
- className: h(
1811
+ className: f(
1810
1812
  "option-divider my-1 h-px",
1811
1813
  o
1812
1814
  )
1813
1815
  }
1814
1816
  );
1815
- }), H = (n) => !("kind" in n), _e = (n) => {
1817
+ }), H = (t) => !("kind" in t), _e = (t) => {
1816
1818
  const {
1817
- placement: t = "bottom",
1819
+ placement: n = "bottom",
1818
1820
  onOutsideClick: o,
1819
1821
  fullWidth: s,
1820
1822
  minWidth: r,
@@ -1823,71 +1825,73 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
1823
1825
  onOpenChange: i,
1824
1826
  listRef: c,
1825
1827
  activeIndex: g,
1826
- onNavigate: w,
1827
- loop: x = !0,
1828
- disabledIndices: m
1829
- } = n, b = y.useMemo(() => [
1830
- rt({
1831
- apply({ rects: E, elements: L }) {
1832
- s && (L.floating.style.width = `${E.reference.width}px`), r && (L.floating.style.minWidth = `${r}px`), l && (L.floating.style.maxWidth = `${l}px`);
1828
+ onNavigate: x,
1829
+ loop: w = !0,
1830
+ disabledIndices: h
1831
+ } = t, b = C.useMemo(() => [
1832
+ rt({ padding: 8 }),
1833
+ lt({ padding: 8 }),
1834
+ ot({
1835
+ apply({ rects: P, elements: z }) {
1836
+ s && (z.floating.style.width = `${P.reference.width}px`), r && (z.floating.style.minWidth = `${r}px`), l && (z.floating.style.maxWidth = `${l}px`);
1833
1837
  }
1834
1838
  })
1835
- ], [s, l, r]), { refs: p, floatingStyles: f, context: v } = lt({
1836
- placement: t,
1839
+ ], [s, l, r]), { refs: p, floatingStyles: m, context: v, placement: u } = st({
1840
+ placement: n,
1837
1841
  open: a,
1838
1842
  onOpenChange: i,
1839
1843
  middleware: b,
1840
- whileElementsMounted: ot
1841
- }), u = un(v, {
1844
+ whileElementsMounted: at
1845
+ }), I = un(v, {
1842
1846
  listRef: c,
1843
1847
  activeIndex: g,
1844
- onNavigate: w,
1845
- loop: x,
1848
+ onNavigate: x,
1849
+ loop: w,
1846
1850
  virtual: !0,
1847
1851
  focusItemOnOpen: !1,
1848
- disabledIndices: m
1849
- }), { getReferenceProps: R, getFloatingProps: C, getItemProps: I } = fn([u]), D = y.useRef({
1852
+ disabledIndices: h
1853
+ }), { getReferenceProps: R, getFloatingProps: y, getItemProps: D } = mn([I]), T = C.useRef({
1850
1854
  onOutsideClick: o,
1851
- floatingStyles: f,
1855
+ floatingStyles: m,
1852
1856
  setFloating: p.setFloating,
1853
- placement: t,
1854
- getFloatingProps: C
1857
+ placement: n,
1858
+ getFloatingProps: y
1855
1859
  });
1856
- D.current = {
1860
+ T.current = {
1857
1861
  onOutsideClick: o,
1858
- floatingStyles: f,
1862
+ floatingStyles: m,
1859
1863
  setFloating: p.setFloating,
1860
- placement: t,
1861
- getFloatingProps: C
1864
+ placement: u,
1865
+ getFloatingProps: y
1862
1866
  };
1863
- const T = y.useMemo(() => {
1864
- const E = (L) => {
1865
- const { floatingStyles: P, setFloating: N, onOutsideClick: k, placement: B, getFloatingProps: O } = D.current, { className: _, open: X, children: re } = L;
1867
+ const M = C.useMemo(() => {
1868
+ const P = (z) => {
1869
+ const { floatingStyles: N, setFloating: k, onOutsideClick: B, placement: O, getFloatingProps: _ } = T.current, { className: X, open: re, children: le } = z;
1866
1870
  return /* @__PURE__ */ e(
1867
- Ft,
1871
+ At,
1868
1872
  {
1869
- open: X,
1870
- className: _,
1871
- onOutsideClick: k,
1872
- floatingStyles: P,
1873
- setFloating: N,
1874
- placement: B,
1875
- floatingProps: O(),
1876
- children: re
1873
+ open: re,
1874
+ className: X,
1875
+ onOutsideClick: B,
1876
+ floatingStyles: N,
1877
+ setFloating: k,
1878
+ placement: O,
1879
+ floatingProps: _(),
1880
+ children: le
1877
1881
  }
1878
1882
  );
1879
1883
  };
1880
- return y.memo(E);
1884
+ return C.memo(P);
1881
1885
  }, []);
1882
1886
  return {
1883
1887
  anchorRef: p.setReference,
1884
- Popover: T,
1888
+ Popover: M,
1885
1889
  getReferenceProps: R,
1886
- getItemProps: I
1890
+ getItemProps: D
1887
1891
  };
1888
- }, Lr = (n) => {
1892
+ }, Lr = (t) => {
1889
1893
  const {
1890
- className: t,
1894
+ className: n,
1891
1895
  label: o,
1892
1896
  description: s,
1893
1897
  options: r,
@@ -1896,14 +1900,14 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
1896
1900
  placeholder: i,
1897
1901
  maxHeight: c = 300,
1898
1902
  error: g,
1899
- size: w = "md",
1900
- disabled: x = !1,
1901
- clearable: m = !0
1902
- } = n, [b, p] = A(!1), [f, v] = A(null), u = y.useRef(null), R = y.useRef([]), C = r?.find((N) => H(N) && N.value === a), I = se(
1903
+ size: x = "md",
1904
+ disabled: w = !1,
1905
+ clearable: h = !0
1906
+ } = t, [b, p] = A(!1), [m, v] = A(null), u = C.useRef(null), I = C.useRef([]), R = r?.find((N) => H(N) && N.value === a), y = ae(
1903
1907
  () => r.map((N, k) => !H(N) || N.disabled ? k : -1).filter((N) => N !== -1),
1904
1908
  [r]
1905
1909
  );
1906
- be(b, () => p(!1)), $(() => {
1910
+ ve(b, () => p(!1)), $(() => {
1907
1911
  if (b) {
1908
1912
  u.current?.focus({ preventScroll: !0 });
1909
1913
  const N = r.findIndex((k) => H(k) && k.value === a);
@@ -1916,26 +1920,27 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
1916
1920
  } else
1917
1921
  v(null);
1918
1922
  }, [b]);
1919
- const { anchorRef: D, Popover: T, getReferenceProps: E, getItemProps: L } = _e({
1923
+ const { anchorRef: D, Popover: T, getReferenceProps: M, getItemProps: P } = _e({
1920
1924
  placement: "bottom",
1921
1925
  fullWidth: !0,
1926
+ minWidth: 200,
1922
1927
  onOutsideClick: () => p(!1),
1923
1928
  open: b,
1924
1929
  onOpenChange: p,
1925
- listRef: R,
1926
- activeIndex: f,
1930
+ listRef: I,
1931
+ activeIndex: m,
1927
1932
  onNavigate: v,
1928
- disabledIndices: I
1929
- }), P = (N) => {
1933
+ disabledIndices: y
1934
+ }), z = (N) => {
1930
1935
  const k = r[N];
1931
1936
  k && H(k) && !k.disabled && (l(k.value), p(!1));
1932
1937
  };
1933
- return /* @__PURE__ */ e(Q.Provider, { value: w, children: /* @__PURE__ */ d(
1938
+ return /* @__PURE__ */ e(Q.Provider, { value: x, children: /* @__PURE__ */ d(
1934
1939
  "div",
1935
1940
  {
1936
- className: h(
1941
+ className: f(
1937
1942
  "flex flex-col",
1938
- t
1943
+ n
1939
1944
  ),
1940
1945
  children: [
1941
1946
  /* @__PURE__ */ e(J, { children: o }),
@@ -1943,45 +1948,45 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
1943
1948
  /* @__PURE__ */ d(
1944
1949
  "div",
1945
1950
  {
1946
- ...E({
1951
+ ...M({
1947
1952
  ref: u,
1948
1953
  role: "button",
1949
- tabIndex: x ? -1 : 0,
1950
- "aria-disabled": x,
1954
+ tabIndex: w ? -1 : 0,
1955
+ "aria-disabled": w,
1951
1956
  onClick: () => {
1952
- x || p(!b);
1957
+ w || p(!b);
1953
1958
  },
1954
1959
  onKeyDown: (N) => {
1955
- x || (N.key === " " ? (N.preventDefault(), p((k) => !k)) : N.key === "Enter" && (N.preventDefault(), b && f != null ? P(f) : p(!0)));
1960
+ w || (N.key === " " ? (N.preventDefault(), p((k) => !k)) : N.key === "Enter" && (N.preventDefault(), b && m != null ? z(m) : p(!0)));
1956
1961
  }
1957
1962
  }),
1958
- className: h(
1963
+ className: f(
1959
1964
  "flex flex-row items-center border select-trigger transition-all duration-150 rounded-xl shadow-sm ring-0 focus:ring-4 focus:outline-none select-none",
1960
- te[w],
1961
- Y[w],
1962
- de[w],
1963
- m && a ? Fe[w] : ue[w],
1964
- x ? "select-trigger-disabled" : g && "select-trigger-error",
1965
- !x && b && "ring-4"
1965
+ te[x],
1966
+ Y[x],
1967
+ ue[x],
1968
+ h && a ? Fe[x] : me[x],
1969
+ w ? "select-trigger-disabled" : g && "select-trigger-error",
1970
+ !w && b && "ring-4"
1966
1971
  ),
1967
1972
  children: [
1968
- C && /* @__PURE__ */ e("span", { className: "flex-1 min-w-0 break-all line-clamp-1 text-left", children: C.label }),
1969
- !C && i && /* @__PURE__ */ e("span", { className: "flex-1 min-w-0 break-all line-clamp-1 text-left select-placeholder", children: i })
1973
+ R && /* @__PURE__ */ e("span", { className: "flex-1 min-w-0 break-all line-clamp-1 text-left", children: R.label }),
1974
+ !R && i && /* @__PURE__ */ e("span", { className: "flex-1 min-w-0 break-all line-clamp-1 text-left select-placeholder", children: i })
1970
1975
  ]
1971
1976
  }
1972
1977
  ),
1973
1978
  /* @__PURE__ */ d(fe, { children: [
1974
- !x && g && /* @__PURE__ */ e(ne, {}),
1975
- m && !!a && !x && /* @__PURE__ */ e(q, { Icon: ie, onClick: () => l(null) }),
1976
- /* @__PURE__ */ e(q, { Icon: pe })
1979
+ !w && g && /* @__PURE__ */ e(ne, {}),
1980
+ h && !!a && !w && /* @__PURE__ */ e(q, { Icon: ce, onClick: () => l(null) }),
1981
+ /* @__PURE__ */ e(q, { Icon: ge })
1977
1982
  ] }),
1978
- /* @__PURE__ */ e(T, { open: b, children: /* @__PURE__ */ e(ge, { className: "!p-0", style: { maxHeight: c }, children: /* @__PURE__ */ e("div", { className: "flex flex-col p-2 gap-1", children: r.map((N, k) => {
1983
+ /* @__PURE__ */ e(T, { open: b, children: /* @__PURE__ */ e(be, { className: "!p-0", style: { maxHeight: c }, children: /* @__PURE__ */ e("div", { className: "flex flex-col p-2 gap-1", children: r.map((N, k) => {
1979
1984
  if (!H(N))
1980
1985
  return N.kind === "header" ? /* @__PURE__ */ e(
1981
1986
  We,
1982
1987
  {
1983
1988
  ref: (O) => {
1984
- R.current[k] = O;
1989
+ I.current[k] = O;
1985
1990
  },
1986
1991
  children: N.label
1987
1992
  },
@@ -1990,7 +1995,7 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
1990
1995
  He,
1991
1996
  {
1992
1997
  ref: (O) => {
1993
- R.current[k] = O;
1998
+ I.current[k] = O;
1994
1999
  }
1995
2000
  },
1996
2001
  `divider-${k}`
@@ -1999,14 +2004,14 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
1999
2004
  return /* @__PURE__ */ e(
2000
2005
  Ue,
2001
2006
  {
2002
- ...L({
2007
+ ...P({
2003
2008
  ref(O) {
2004
- R.current[k] = O;
2009
+ I.current[k] = O;
2005
2010
  }
2006
2011
  }),
2007
- onClick: () => P(k),
2012
+ onClick: () => z(k),
2008
2013
  selected: B,
2009
- active: f === k,
2014
+ active: m === k,
2010
2015
  disabled: N.disabled,
2011
2016
  children: N.label
2012
2017
  },
@@ -2019,9 +2024,9 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
2019
2024
  ]
2020
2025
  }
2021
2026
  ) });
2022
- }, Dl = (n) => {
2027
+ }, Dl = (t) => {
2023
2028
  const {
2024
- className: t,
2029
+ className: n,
2025
2030
  label: o,
2026
2031
  description: s,
2027
2032
  options: r,
@@ -2030,53 +2035,54 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
2030
2035
  value: i,
2031
2036
  placeholder: c,
2032
2037
  maxHeight: g = 300,
2033
- error: w,
2034
- size: x = "md",
2035
- disabled: m = !1,
2038
+ error: x,
2039
+ size: w = "md",
2040
+ disabled: h = !1,
2036
2041
  clearable: b = !0
2037
- } = n, [p, f] = A(!1), [v, u] = A(r), [R, C] = A(""), [I, D] = A(null), T = y.useRef(null), E = y.useRef(null), L = y.useRef([]), P = r?.find((z) => H(z) && z.value === i), N = se(() => R !== "" ? v : r, [R, v, r]), k = se(
2038
- () => N.map((z, U) => !H(z) || z.disabled ? U : -1).filter((z) => z !== -1),
2042
+ } = t, [p, m] = A(!1), [v, u] = A(r), [I, R] = A(""), [y, D] = A(null), T = C.useRef(null), M = C.useRef(null), P = C.useRef([]), z = r?.find((L) => H(L) && L.value === i), N = ae(() => I !== "" ? v : r, [I, v, r]), k = ae(
2043
+ () => N.map((L, U) => !H(L) || L.disabled ? U : -1).filter((L) => L !== -1),
2039
2044
  [N]
2040
2045
  );
2041
- be(p, () => f(!1)), $(() => {
2042
- u(a(R));
2043
- }, [R, r, a]), $(() => {
2046
+ ve(p, () => m(!1)), $(() => {
2047
+ u(a(I));
2048
+ }, [I, r, a]), $(() => {
2044
2049
  if (p) {
2045
- setTimeout(() => E.current?.focus(), 100);
2046
- const z = r.findIndex((U) => H(U) && U.value === i);
2047
- if (z >= 0)
2048
- D(z);
2050
+ setTimeout(() => M.current?.focus(), 100);
2051
+ const L = r.findIndex((U) => H(U) && U.value === i);
2052
+ if (L >= 0)
2053
+ D(L);
2049
2054
  else {
2050
- const U = r.findIndex((le) => H(le) && !le.disabled);
2055
+ const U = r.findIndex((oe) => H(oe) && !oe.disabled);
2051
2056
  D(U >= 0 ? U : null);
2052
2057
  }
2053
2058
  } else
2054
- D(null), C("");
2059
+ D(null), R("");
2055
2060
  }, [p]), $(() => {
2056
2061
  if (!p) return;
2057
- const z = N.findIndex((U) => H(U) && !U.disabled);
2058
- D(z >= 0 ? z : null);
2059
- }, [R, p, N]);
2062
+ const L = N.findIndex((U) => H(U) && !U.disabled);
2063
+ D(L >= 0 ? L : null);
2064
+ }, [I, p, N]);
2060
2065
  const { anchorRef: B, Popover: O, getReferenceProps: _, getItemProps: X } = _e({
2061
2066
  placement: "bottom",
2062
2067
  fullWidth: !0,
2063
- onOutsideClick: () => f(!1),
2068
+ minWidth: 200,
2069
+ onOutsideClick: () => m(!1),
2064
2070
  open: p,
2065
- onOpenChange: f,
2066
- listRef: L,
2067
- activeIndex: I,
2071
+ onOpenChange: m,
2072
+ listRef: P,
2073
+ activeIndex: y,
2068
2074
  onNavigate: D,
2069
2075
  disabledIndices: k
2070
- }), re = (z) => {
2071
- const U = N[z];
2072
- U && H(U) && !U.disabled && (l(U.value), f(!1));
2073
- }, xe = N.some((z) => H(z));
2074
- return /* @__PURE__ */ e(Q.Provider, { value: x, children: /* @__PURE__ */ d(
2076
+ }), re = (L) => {
2077
+ const U = N[L];
2078
+ U && H(U) && !U.disabled && (l(U.value), m(!1));
2079
+ }, le = N.some((L) => H(L));
2080
+ return /* @__PURE__ */ e(Q.Provider, { value: w, children: /* @__PURE__ */ d(
2075
2081
  "div",
2076
2082
  {
2077
- className: h(
2083
+ className: f(
2078
2084
  "flex flex-col",
2079
- t
2085
+ n
2080
2086
  ),
2081
2087
  children: [
2082
2088
  /* @__PURE__ */ e(J, { children: o }),
@@ -2087,114 +2093,114 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
2087
2093
  ..._({
2088
2094
  ref: T,
2089
2095
  role: "button",
2090
- tabIndex: m ? -1 : 0,
2091
- "aria-disabled": m,
2096
+ tabIndex: h ? -1 : 0,
2097
+ "aria-disabled": h,
2092
2098
  onClick: () => {
2093
- m || f(!p);
2099
+ h || m(!p);
2094
2100
  },
2095
- onKeyDown: (z) => {
2096
- m || (z.key === " " ? (z.preventDefault(), f((U) => !U)) : z.key === "Enter" && !p && (z.preventDefault(), f(!0)));
2101
+ onKeyDown: (L) => {
2102
+ h || (L.key === " " ? (L.preventDefault(), m((U) => !U)) : L.key === "Enter" && !p && (L.preventDefault(), m(!0)));
2097
2103
  }
2098
2104
  }),
2099
- className: h(
2105
+ className: f(
2100
2106
  "flex flex-row items-center border select-trigger transition-all duration-150 rounded-xl shadow-sm ring-0 focus:ring-4 focus:outline-none select-none",
2101
- te[x],
2102
- Y[x],
2103
- de[x],
2104
- b && i ? Fe[x] : ue[x],
2105
- m ? "select-trigger-disabled" : w && "select-trigger-error",
2106
- !m && p && "ring-4"
2107
+ te[w],
2108
+ Y[w],
2109
+ ue[w],
2110
+ b && i ? Fe[w] : me[w],
2111
+ h ? "select-trigger-disabled" : x && "select-trigger-error",
2112
+ !h && p && "ring-4"
2107
2113
  ),
2108
2114
  children: [
2109
- P && /* @__PURE__ */ e("span", { className: "flex-1 min-w-0 break-all line-clamp-1 text-left", children: P.label }),
2110
- !P && c && /* @__PURE__ */ e("span", { className: "flex-1 min-w-0 break-all line-clamp-1 text-left select-placeholder", children: c })
2115
+ z && /* @__PURE__ */ e("span", { className: "flex-1 min-w-0 break-all line-clamp-1 text-left", children: z.label }),
2116
+ !z && c && /* @__PURE__ */ e("span", { className: "flex-1 min-w-0 break-all line-clamp-1 text-left select-placeholder", children: c })
2111
2117
  ]
2112
2118
  }
2113
2119
  ),
2114
2120
  /* @__PURE__ */ d(fe, { children: [
2115
- !m && w && /* @__PURE__ */ e(ne, {}),
2116
- b && !!i && !m && /* @__PURE__ */ e(q, { Icon: ie, onClick: () => l(null) }),
2117
- /* @__PURE__ */ e(q, { Icon: pe })
2121
+ !h && x && /* @__PURE__ */ e(ne, {}),
2122
+ b && !!i && !h && /* @__PURE__ */ e(q, { Icon: ce, onClick: () => l(null) }),
2123
+ /* @__PURE__ */ e(q, { Icon: ge })
2118
2124
  ] }),
2119
- /* @__PURE__ */ e(O, { open: p, children: /* @__PURE__ */ d(ge, { className: "gap-0 !p-0", style: { maxHeight: g }, children: [
2125
+ /* @__PURE__ */ e(O, { open: p, children: /* @__PURE__ */ d(be, { className: "gap-0 !p-0", style: { maxHeight: g }, children: [
2120
2126
  /* @__PURE__ */ d("div", { className: "sticky top-0 border-b select-search-bar py-1 backdrop-blur-sm", children: [
2121
2127
  /* @__PURE__ */ e(
2122
2128
  "input",
2123
2129
  {
2124
- ref: E,
2130
+ ref: M,
2125
2131
  type: "text",
2126
2132
  placeholder: "Search",
2127
- value: R,
2133
+ value: I,
2128
2134
  className: "appearance-none border-none w-full bg-transparent rounded- pl-10 transition-all duration-150 focus:outline-none ring-0 placeholder:text-[var(--color-input-placeholder)]",
2129
- onChange: (z) => C(z.target.value),
2130
- onKeyDown: (z) => {
2131
- z.key === "Enter" && I != null && (z.preventDefault(), re(I));
2135
+ onChange: (L) => R(L.target.value),
2136
+ onKeyDown: (L) => {
2137
+ L.key === "Enter" && y != null && (L.preventDefault(), re(y));
2132
2138
  }
2133
2139
  }
2134
2140
  ),
2135
2141
  /* @__PURE__ */ e(Ee, { className: "absolute select-search-icon left-4 top-4 h-4 w-4" })
2136
2142
  ] }),
2137
2143
  /* @__PURE__ */ d("div", { className: "flex flex-col gap-1 p-2", children: [
2138
- R !== "" && !xe && /* @__PURE__ */ e("div", { className: "flex flex-col items-center justify-center py-6", children: /* @__PURE__ */ e(tt, { className: "h-6 w-6 text-[var(--color-input-text)]" }) }),
2139
- N.map((z, U) => {
2140
- if (!H(z))
2141
- return z.kind === "header" ? /* @__PURE__ */ e(
2144
+ I !== "" && !le && /* @__PURE__ */ e("div", { className: "flex flex-col items-center justify-center py-6", children: /* @__PURE__ */ e(tt, { className: "h-6 w-6 text-[var(--color-input-text)]" }) }),
2145
+ N.map((L, U) => {
2146
+ if (!H(L))
2147
+ return L.kind === "header" ? /* @__PURE__ */ e(
2142
2148
  We,
2143
2149
  {
2144
2150
  ref: (Z) => {
2145
- L.current[U] = Z;
2151
+ P.current[U] = Z;
2146
2152
  },
2147
- children: z.label
2153
+ children: L.label
2148
2154
  },
2149
2155
  `header-${U}`
2150
2156
  ) : /* @__PURE__ */ e(
2151
2157
  He,
2152
2158
  {
2153
2159
  ref: (Z) => {
2154
- L.current[U] = Z;
2160
+ P.current[U] = Z;
2155
2161
  }
2156
2162
  },
2157
2163
  `divider-${U}`
2158
2164
  );
2159
- const le = z.value === i;
2165
+ const oe = L.value === i;
2160
2166
  return /* @__PURE__ */ e(
2161
2167
  Ue,
2162
2168
  {
2163
2169
  ...X({
2164
2170
  ref(Z) {
2165
- L.current[U] = Z;
2171
+ P.current[U] = Z;
2166
2172
  }
2167
2173
  }),
2168
2174
  onClick: () => re(U),
2169
- selected: le,
2170
- active: I === U,
2171
- disabled: z.disabled,
2172
- children: z.label
2175
+ selected: oe,
2176
+ active: y === U,
2177
+ disabled: L.disabled,
2178
+ children: L.label
2173
2179
  },
2174
- String(z.value)
2180
+ String(L.value)
2175
2181
  );
2176
2182
  })
2177
2183
  ] })
2178
2184
  ] }) })
2179
2185
  ] }),
2180
2186
  /* @__PURE__ */ e(V, { children: s }),
2181
- /* @__PURE__ */ e(K, { children: w })
2187
+ /* @__PURE__ */ e(K, { children: x })
2182
2188
  ]
2183
2189
  }
2184
2190
  ) });
2185
- }, Pr = (n, t) => {
2186
- const [o, s] = A(n);
2191
+ }, Pr = (t, n) => {
2192
+ const [o, s] = A(t);
2187
2193
  return $(() => {
2188
2194
  const r = setTimeout(() => {
2189
- s(n);
2190
- }, t);
2195
+ s(t);
2196
+ }, n);
2191
2197
  return () => {
2192
2198
  clearTimeout(r);
2193
2199
  };
2194
- }, [n, t]), o;
2195
- }, Ol = (n) => {
2200
+ }, [t, n]), o;
2201
+ }, Ol = (t) => {
2196
2202
  const {
2197
- className: t,
2203
+ className: n,
2198
2204
  label: o,
2199
2205
  description: s,
2200
2206
  onChange: r,
@@ -2203,88 +2209,89 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
2203
2209
  onSearchDebounceMs: i = 300,
2204
2210
  value: c,
2205
2211
  placeholder: g,
2206
- maxHeight: w = 300,
2207
- error: x,
2208
- size: m = "md",
2212
+ maxHeight: x = 300,
2213
+ error: w,
2214
+ size: h = "md",
2209
2215
  disabled: b = !1,
2210
2216
  clearable: p = !0
2211
- } = n, [f, v] = A(!1), u = y.useRef(null), [R, C] = A(""), [I, D] = A([]), [T, E] = A(null), L = y.useRef(null), [P, N] = A(!1), [k, B] = A(!1), [O, _] = A(null), X = y.useRef([]), re = se(
2212
- () => I.map((M, F) => !H(M) || M.disabled ? F : -1).filter((M) => M !== -1),
2213
- [I]
2217
+ } = t, [m, v] = A(!1), u = C.useRef(null), [I, R] = A(""), [y, D] = A([]), [T, M] = A(null), P = C.useRef(null), [z, N] = A(!1), [k, B] = A(!1), [O, _] = A(null), X = C.useRef([]), re = ae(
2218
+ () => y.map((E, F) => !H(E) || E.disabled ? F : -1).filter((E) => E !== -1),
2219
+ [y]
2214
2220
  );
2215
- be(f, () => v(!1));
2216
- const xe = Pr(R, i);
2221
+ ve(m, () => v(!1));
2222
+ const le = Pr(I, i);
2217
2223
  $(() => {
2218
2224
  (async () => {
2219
2225
  N(!0);
2220
- const F = await l(xe);
2226
+ const F = await l(le);
2221
2227
  D(F), N(!1);
2222
2228
  })();
2223
- }, [xe, l]), $(() => {
2229
+ }, [le, l]), $(() => {
2224
2230
  if (c == null) {
2225
- E(null);
2231
+ M(null);
2226
2232
  return;
2227
2233
  }
2228
- const M = I?.find((F) => H(F) && F.value === c);
2229
- M ? E(M) : (async () => {
2234
+ const E = y?.find((F) => H(F) && F.value === c);
2235
+ E ? M(E) : (async () => {
2230
2236
  B(!0);
2231
- const oe = await a(c);
2232
- E(oe), B(!1);
2237
+ const se = await a(c);
2238
+ M(se), B(!1);
2233
2239
  })();
2234
- }, [a, I, c]), $(() => {
2235
- f ? setTimeout(() => L.current?.focus(), 100) : (_(null), C(""));
2236
- }, [f]), $(() => {
2237
- if (!f) return;
2238
- const M = I.findIndex((F) => H(F) && !F.disabled);
2239
- _(M >= 0 ? M : null);
2240
- }, [I, f]);
2241
- const { anchorRef: z, Popover: U, getReferenceProps: le, getItemProps: Z } = _e({
2240
+ }, [a, y, c]), $(() => {
2241
+ m ? setTimeout(() => P.current?.focus(), 100) : (_(null), R(""));
2242
+ }, [m]), $(() => {
2243
+ if (!m) return;
2244
+ const E = y.findIndex((F) => H(F) && !F.disabled);
2245
+ _(E >= 0 ? E : null);
2246
+ }, [y, m]);
2247
+ const { anchorRef: L, Popover: U, getReferenceProps: oe, getItemProps: Z } = _e({
2242
2248
  placement: "bottom",
2243
2249
  fullWidth: !0,
2250
+ minWidth: 200,
2244
2251
  onOutsideClick: () => v(!1),
2245
- open: f,
2252
+ open: m,
2246
2253
  onOpenChange: v,
2247
2254
  listRef: X,
2248
2255
  activeIndex: O,
2249
2256
  onNavigate: _,
2250
2257
  disabledIndices: re
2251
- }), De = (M) => {
2252
- const F = I[M];
2258
+ }), De = (E) => {
2259
+ const F = y[E];
2253
2260
  F && H(F) && !F.disabled && (r(F.value), v(!1));
2254
- }, Oe = I.some((M) => H(M));
2255
- return /* @__PURE__ */ e(Q.Provider, { value: m, children: /* @__PURE__ */ d(
2261
+ }, Oe = y.some((E) => H(E));
2262
+ return /* @__PURE__ */ e(Q.Provider, { value: h, children: /* @__PURE__ */ d(
2256
2263
  "div",
2257
2264
  {
2258
- className: h(
2265
+ className: f(
2259
2266
  "flex flex-col",
2260
- t
2267
+ n
2261
2268
  ),
2262
2269
  children: [
2263
2270
  /* @__PURE__ */ e(J, { children: o }),
2264
- /* @__PURE__ */ d("div", { className: "relative flex w-full flex-col", ref: z, children: [
2271
+ /* @__PURE__ */ d("div", { className: "relative flex w-full flex-col", ref: L, children: [
2265
2272
  /* @__PURE__ */ d(
2266
2273
  "div",
2267
2274
  {
2268
- ...le({
2275
+ ...oe({
2269
2276
  ref: u,
2270
2277
  role: "button",
2271
2278
  tabIndex: b ? -1 : 0,
2272
2279
  "aria-disabled": b,
2273
2280
  onClick: () => {
2274
- b || v(!f);
2281
+ b || v(!m);
2275
2282
  },
2276
- onKeyDown: (M) => {
2277
- b || (M.key === " " ? (M.preventDefault(), v((F) => !F)) : M.key === "Enter" && !f && (M.preventDefault(), v(!0)));
2283
+ onKeyDown: (E) => {
2284
+ b || (E.key === " " ? (E.preventDefault(), v((F) => !F)) : E.key === "Enter" && !m && (E.preventDefault(), v(!0)));
2278
2285
  }
2279
2286
  }),
2280
- className: h(
2287
+ className: f(
2281
2288
  "flex flex-row items-center border select-trigger transition-all duration-150 rounded-xl shadow-sm ring-0 focus:ring-4 focus:outline-none select-none",
2282
- te[m],
2283
- Y[m],
2284
- de[m],
2285
- p && c ? Fe[m] : ue[m],
2286
- b ? "select-trigger-disabled" : x && "select-trigger-error",
2287
- !b && f && "ring-4"
2289
+ te[h],
2290
+ Y[h],
2291
+ ue[h],
2292
+ p && c ? Fe[h] : me[h],
2293
+ b ? "select-trigger-disabled" : w && "select-trigger-error",
2294
+ !b && m && "ring-4"
2288
2295
  ),
2289
2296
  children: [
2290
2297
  !k && T && /* @__PURE__ */ e("span", { className: "flex-1 min-w-0 break-all line-clamp-1 text-left", children: T.label }),
@@ -2294,74 +2301,74 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
2294
2301
  }
2295
2302
  ),
2296
2303
  /* @__PURE__ */ d(fe, { children: [
2297
- !b && x && /* @__PURE__ */ e(ne, {}),
2298
- p && !!c && !b && /* @__PURE__ */ e(q, { Icon: ie, onClick: () => r(null) }),
2299
- /* @__PURE__ */ e(q, { Icon: pe })
2304
+ !b && w && /* @__PURE__ */ e(ne, {}),
2305
+ p && !!c && !b && /* @__PURE__ */ e(q, { Icon: ce, onClick: () => r(null) }),
2306
+ /* @__PURE__ */ e(q, { Icon: ge })
2300
2307
  ] }),
2301
- /* @__PURE__ */ e(U, { open: f, children: /* @__PURE__ */ d(ge, { className: "gap-0 !p-0", style: { maxHeight: w }, children: [
2308
+ /* @__PURE__ */ e(U, { open: m, children: /* @__PURE__ */ d(be, { className: "gap-0 !p-0", style: { maxHeight: x }, children: [
2302
2309
  /* @__PURE__ */ d("div", { className: "sticky top-0 border-b select-search-bar py-1 backdrop-blur-sm", children: [
2303
2310
  /* @__PURE__ */ e(
2304
2311
  "input",
2305
2312
  {
2306
- ref: L,
2313
+ ref: P,
2307
2314
  type: "text",
2308
2315
  placeholder: "Search",
2309
- value: R,
2316
+ value: I,
2310
2317
  className: "appearance-none border-none w-full bg-transparent rounded- pl-10 transition-all duration-150 focus:outline-none ring-0 placeholder:text-[var(--color-input-placeholder)]",
2311
- onChange: (M) => C(M.target.value),
2312
- onKeyDown: (M) => {
2313
- M.key === "Enter" && O != null && (M.preventDefault(), De(O));
2318
+ onChange: (E) => R(E.target.value),
2319
+ onKeyDown: (E) => {
2320
+ E.key === "Enter" && O != null && (E.preventDefault(), De(O));
2314
2321
  }
2315
2322
  }
2316
2323
  ),
2317
2324
  /* @__PURE__ */ e(Ee, { className: "absolute select-search-icon left-4 top-4 h-4 w-4" })
2318
2325
  ] }),
2319
2326
  /* @__PURE__ */ d("div", { className: "flex flex-col gap-1 p-2", children: [
2320
- !P && !Oe && /* @__PURE__ */ e("div", { className: "flex flex-col items-center justify-center py-6", children: /* @__PURE__ */ e(tt, { className: "h-6 w-6 text-[var(--color-input-text)]" }) }),
2321
- P && /* @__PURE__ */ e("div", { className: "flex flex-col items-center justify-center py-6", children: /* @__PURE__ */ e(Re, { className: "h-6 w-6 text-[var(--color-input-text)]" }) }),
2322
- !P && I.map((M, F) => {
2323
- if (!H(M))
2324
- return M.kind === "header" ? /* @__PURE__ */ e(
2327
+ !z && !Oe && /* @__PURE__ */ e("div", { className: "flex flex-col items-center justify-center py-6", children: /* @__PURE__ */ e(tt, { className: "h-6 w-6 text-[var(--color-input-text)]" }) }),
2328
+ z && /* @__PURE__ */ e("div", { className: "flex flex-col items-center justify-center py-6", children: /* @__PURE__ */ e(Re, { className: "h-6 w-6 text-[var(--color-input-text)]" }) }),
2329
+ !z && y.map((E, F) => {
2330
+ if (!H(E))
2331
+ return E.kind === "header" ? /* @__PURE__ */ e(
2325
2332
  We,
2326
2333
  {
2327
- ref: (me) => {
2328
- X.current[F] = me;
2334
+ ref: (he) => {
2335
+ X.current[F] = he;
2329
2336
  },
2330
- children: M.label
2337
+ children: E.label
2331
2338
  },
2332
2339
  `header-${F}`
2333
2340
  ) : /* @__PURE__ */ e(
2334
2341
  He,
2335
2342
  {
2336
- ref: (me) => {
2337
- X.current[F] = me;
2343
+ ref: (he) => {
2344
+ X.current[F] = he;
2338
2345
  }
2339
2346
  },
2340
2347
  `divider-${F}`
2341
2348
  );
2342
- const oe = M.value === c;
2349
+ const se = E.value === c;
2343
2350
  return /* @__PURE__ */ e(
2344
2351
  Ue,
2345
2352
  {
2346
2353
  ...Z({
2347
- ref(me) {
2348
- X.current[F] = me;
2354
+ ref(he) {
2355
+ X.current[F] = he;
2349
2356
  }
2350
2357
  }),
2351
2358
  onClick: () => De(F),
2352
- selected: oe,
2359
+ selected: se,
2353
2360
  active: O === F,
2354
- disabled: M.disabled,
2355
- children: M.label
2361
+ disabled: E.disabled,
2362
+ children: E.label
2356
2363
  },
2357
- String(M.value)
2364
+ String(E.value)
2358
2365
  );
2359
2366
  })
2360
2367
  ] })
2361
2368
  ] }) })
2362
2369
  ] }),
2363
2370
  /* @__PURE__ */ e(V, { children: s }),
2364
- /* @__PURE__ */ e(K, { children: x })
2371
+ /* @__PURE__ */ e(K, { children: w })
2365
2372
  ]
2366
2373
  }
2367
2374
  ) });
@@ -2390,7 +2397,7 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
2390
2397
  stone: "bg-stone-100 text-stone-700 ring-stone-200 dark:bg-stone-950 dark:text-stone-300 dark:ring-stone-800",
2391
2398
  white: "bg-[var(--color-badge-white-bg)] text-[var(--color-badge-white-text)] ring-[var(--color-badge-white-ring)]",
2392
2399
  black: "bg-[var(--color-badge-black-bg)] text-[var(--color-badge-black-text)] ring-[var(--color-badge-black-ring)]"
2393
- }, Pe = y.forwardRef((n, t) => {
2400
+ }, Pe = C.forwardRef((t, n) => {
2394
2401
  const {
2395
2402
  className: o,
2396
2403
  children: s,
@@ -2398,47 +2405,47 @@ const h = (...n) => n.filter(Boolean).join(" "), Wn = [
2398
2405
  showCloseIcon: l,
2399
2406
  Icon: a,
2400
2407
  color: i = "gray"
2401
- } = n, c = h(
2408
+ } = t, c = f(
2402
2409
  "inline-flex align-top items-center gap-2 px-3 h-7 rounded-lg font-semibold",
2403
2410
  Er[i],
2404
2411
  o
2405
2412
  );
2406
- return r ? /* @__PURE__ */ e("div", { ref: t, children: /* @__PURE__ */ d(
2413
+ return r ? /* @__PURE__ */ e("div", { ref: n, children: /* @__PURE__ */ d(
2407
2414
  "button",
2408
2415
  {
2409
- className: h("cursor-pointer ring-0 hover:ring-4 active:ring-1 transition-all duration-100 select-none focus:outline-none focus:ring-4", c),
2416
+ className: f("cursor-pointer ring-0 hover:ring-4 active:ring-1 transition-all duration-100 select-none focus:outline-none focus:ring-4", c),
2410
2417
  onClick: r,
2411
2418
  children: [
2412
2419
  a && /* @__PURE__ */ e(a, { className: "h-4 w-4 shrink-0" }),
2413
2420
  /* @__PURE__ */ e("div", { className: "break-all line-clamp-1 text-left", children: s }),
2414
2421
  l && /* @__PURE__ */ e(
2415
- ie,
2422
+ ce,
2416
2423
  {
2417
2424
  className: "h-4 w-4 shrink-0"
2418
2425
  }
2419
2426
  )
2420
2427
  ]
2421
2428
  }
2422
- ) }) : /* @__PURE__ */ d("div", { className: c, ref: t, children: [
2429
+ ) }) : /* @__PURE__ */ d("div", { className: c, ref: n, children: [
2423
2430
  a && /* @__PURE__ */ e(a, { className: "h-4 w-4 shrink-0" }),
2424
2431
  /* @__PURE__ */ e("div", { className: "break-all line-clamp-1 text-left", children: s })
2425
2432
  ] });
2426
2433
  });
2427
- function Mr(n) {
2434
+ function Mr(t) {
2428
2435
  const {
2429
- enabled: t,
2436
+ enabled: n,
2430
2437
  triggerRef: o,
2431
2438
  measureRef: s,
2432
2439
  trayRef: r,
2433
2440
  itemCount: l,
2434
2441
  deps: a = [],
2435
2442
  gap: i = 4
2436
- } = n, [c, g] = A(0);
2437
- return yt(() => {
2438
- if (!t) return;
2439
- const w = o.current, x = s.current;
2440
- if (!w || !x) return;
2441
- const m = () => {
2443
+ } = t, [c, g] = A(0);
2444
+ return It(() => {
2445
+ if (!n) return;
2446
+ const x = o.current, w = s.current;
2447
+ if (!x || !w) return;
2448
+ const h = () => {
2442
2449
  if (l === 0) {
2443
2450
  g(0);
2444
2451
  return;
@@ -2447,37 +2454,37 @@ function Mr(n) {
2447
2454
  g(1);
2448
2455
  return;
2449
2456
  }
2450
- const p = window.getComputedStyle(w), f = parseFloat(p.paddingLeft || "0"), v = w.getBoundingClientRect(), u = v.left + f;
2451
- let R = v.right - parseFloat(p.paddingRight || "0");
2452
- const C = r?.current;
2453
- if (C) {
2454
- const N = C.getBoundingClientRect();
2455
- N.width > 0 && (R = Math.min(R, N.left - i));
2457
+ const p = window.getComputedStyle(x), m = parseFloat(p.paddingLeft || "0"), v = x.getBoundingClientRect(), u = v.left + m;
2458
+ let I = v.right - parseFloat(p.paddingRight || "0");
2459
+ const R = r?.current;
2460
+ if (R) {
2461
+ const N = R.getBoundingClientRect();
2462
+ N.width > 0 && (I = Math.min(I, N.left - i));
2456
2463
  }
2457
- const I = Math.max(0, R - u), D = Array.from(x.children);
2464
+ const y = Math.max(0, I - u), D = Array.from(w.children);
2458
2465
  if (D.length < l + 1) return;
2459
2466
  let T = 0;
2460
2467
  for (let N = 0; N < l; N++)
2461
2468
  T += D[N].offsetWidth + (N > 0 ? i : 0);
2462
- if (T <= I) {
2469
+ if (T <= y) {
2463
2470
  g(l);
2464
2471
  return;
2465
2472
  }
2466
- const E = D[l].offsetWidth;
2467
- let L = 0, P = 0;
2473
+ const M = D[l].offsetWidth;
2474
+ let P = 0, z = 0;
2468
2475
  for (let N = 0; N < l; N++) {
2469
- const k = D[N].offsetWidth, B = L + k + (N > 0 ? i : 0);
2470
- if (B + E + i > I) break;
2471
- L = B, P++;
2476
+ const k = D[N].offsetWidth, B = P + k + (N > 0 ? i : 0);
2477
+ if (B + M + i > y) break;
2478
+ P = B, z++;
2472
2479
  }
2473
- g(Math.max(1, P));
2474
- }, b = new ResizeObserver(m);
2475
- return b.observe(w), r?.current && b.observe(r.current), m(), () => b.disconnect();
2476
- }, [t, l, ...a]), c;
2480
+ g(Math.max(1, z));
2481
+ }, b = new ResizeObserver(h);
2482
+ return b.observe(x), r?.current && b.observe(r.current), h(), () => b.disconnect();
2483
+ }, [n, l, ...a]), c;
2477
2484
  }
2478
- const zl = (n) => {
2485
+ const zl = (t) => {
2479
2486
  const {
2480
- className: t,
2487
+ className: n,
2481
2488
  label: o,
2482
2489
  description: s,
2483
2490
  options: r,
@@ -2486,78 +2493,79 @@ const zl = (n) => {
2486
2493
  value: i,
2487
2494
  placeholder: c,
2488
2495
  maxHeight: g = 300,
2489
- error: w,
2490
- size: x = "md",
2491
- singleLine: m = !1,
2496
+ error: x,
2497
+ size: w = "md",
2498
+ singleLine: h = !1,
2492
2499
  color: b = "blue",
2493
2500
  disabled: p = !1,
2494
- clearable: f = !0
2495
- } = n, [v, u] = A(!1), [R, C] = A(r), [I, D] = A(""), [T, E] = A(null), L = y.useRef(null), P = y.useRef(null), N = y.useRef([]), k = y.useRef(null), B = y.useRef(null), O = se(
2501
+ clearable: m = !0
2502
+ } = t, [v, u] = A(!1), [I, R] = A(r), [y, D] = A(""), [T, M] = A(null), P = C.useRef(null), z = C.useRef(null), N = C.useRef([]), k = C.useRef(null), B = C.useRef(null), O = ae(
2496
2503
  () => i.map((S) => r.find((W) => H(W) && W.value === S)).filter((S) => S !== void 0),
2497
2504
  [i, r]
2498
2505
  ), _ = (S) => {
2499
2506
  if (S === "") return r;
2500
2507
  const W = S.toLowerCase();
2501
2508
  return r.filter((ye) => H(ye) && typeof ye.label == "string" ? ye.label.toLowerCase().includes(W) : !0);
2502
- }, X = se(
2503
- () => I !== "" ? R : r,
2504
- [I, R, r]
2505
- ), re = se(
2509
+ }, X = ae(
2510
+ () => y !== "" ? I : r,
2511
+ [y, I, r]
2512
+ ), re = ae(
2506
2513
  () => X.map((S, W) => !H(S) || S.disabled ? W : -1).filter((S) => S !== -1),
2507
2514
  [X]
2508
2515
  );
2509
- be(v, () => u(!1)), $(() => {
2510
- C((a ?? _)(I));
2511
- }, [I, r, a]), $(() => {
2516
+ ve(v, () => u(!1)), $(() => {
2517
+ R((a ?? _)(y));
2518
+ }, [y, r, a]), $(() => {
2512
2519
  if (v) {
2513
- setTimeout(() => P.current?.focus(), 100);
2520
+ setTimeout(() => z.current?.focus(), 100);
2514
2521
  const S = r.findIndex((W) => H(W) && !W.disabled);
2515
- E(S >= 0 ? S : null);
2522
+ M(S >= 0 ? S : null);
2516
2523
  } else
2517
- E(null), D("");
2524
+ M(null), D("");
2518
2525
  }, [v]), $(() => {
2519
2526
  if (!v) return;
2520
2527
  const S = X.findIndex((W) => H(W) && !W.disabled);
2521
- E(S >= 0 ? S : null);
2522
- }, [I, v, X]);
2523
- const xe = Mr({
2524
- enabled: m,
2525
- triggerRef: L,
2528
+ M(S >= 0 ? S : null);
2529
+ }, [y, v, X]);
2530
+ const le = Mr({
2531
+ enabled: h,
2532
+ triggerRef: P,
2526
2533
  measureRef: k,
2527
2534
  trayRef: B,
2528
2535
  itemCount: O.length,
2529
- deps: [O, w]
2530
- }), { anchorRef: z, Popover: U, getReferenceProps: le, getItemProps: Z } = _e({
2536
+ deps: [O, x]
2537
+ }), { anchorRef: L, Popover: U, getReferenceProps: oe, getItemProps: Z } = _e({
2531
2538
  placement: "bottom",
2532
2539
  fullWidth: !0,
2540
+ minWidth: 200,
2533
2541
  onOutsideClick: () => u(!1),
2534
2542
  open: v,
2535
2543
  onOpenChange: u,
2536
2544
  listRef: N,
2537
2545
  activeIndex: T,
2538
- onNavigate: E,
2546
+ onNavigate: M,
2539
2547
  disabledIndices: re
2540
2548
  }), De = (S) => {
2541
2549
  i.includes(S) ? l(i.filter((W) => W !== S)) : l([...i, S]);
2542
2550
  }, Oe = (S) => {
2543
2551
  const W = X[S];
2544
2552
  W && H(W) && !W.disabled && De(W.value);
2545
- }, M = X.some((S) => H(S)), F = i.length > 0, oe = m ? xe : O.length, me = O.slice(0, oe), ct = O.length - oe;
2546
- return /* @__PURE__ */ e(Q.Provider, { value: x, children: /* @__PURE__ */ d(
2553
+ }, E = X.some((S) => H(S)), F = i.length > 0, se = h ? le : O.length, he = O.slice(0, se), ut = O.length - se;
2554
+ return /* @__PURE__ */ e(Q.Provider, { value: w, children: /* @__PURE__ */ d(
2547
2555
  "div",
2548
2556
  {
2549
- className: h(
2557
+ className: f(
2550
2558
  "flex flex-col",
2551
- t
2559
+ n
2552
2560
  ),
2553
2561
  children: [
2554
2562
  /* @__PURE__ */ e(J, { children: o }),
2555
- /* @__PURE__ */ d("div", { className: "relative flex w-full flex-col", ref: z, children: [
2563
+ /* @__PURE__ */ d("div", { className: "relative flex w-full flex-col", ref: L, children: [
2556
2564
  /* @__PURE__ */ d(
2557
2565
  "div",
2558
2566
  {
2559
- ...le({
2560
- ref: L,
2567
+ ...oe({
2568
+ ref: P,
2561
2569
  role: "button",
2562
2570
  tabIndex: p ? -1 : 0,
2563
2571
  "aria-disabled": p,
@@ -2568,39 +2576,39 @@ const zl = (n) => {
2568
2576
  p || (S.key === " " ? (S.preventDefault(), u((W) => !W)) : S.key === "Enter" && !v ? (S.preventDefault(), u(!0)) : S.key === "Backspace" && !v && F && (S.preventDefault(), l(i.slice(0, -1))));
2569
2577
  }
2570
2578
  }),
2571
- className: h(
2579
+ className: f(
2572
2580
  "flex flex-row items-center gap-1 border select-trigger transition-all duration-150 rounded-xl shadow-sm ring-0 focus:ring-4 focus:outline-none select-none",
2573
- m && h("flex-nowrap overflow-hidden", te[x]),
2574
- !m && h("flex-wrap py-1.5", zt[x]),
2575
- Y[x],
2576
- de[x],
2577
- f && F ? Fe[x] : ue[x],
2578
- p ? "select-trigger-disabled" : w && "select-trigger-error",
2581
+ h && f("flex-nowrap overflow-hidden", te[w]),
2582
+ !h && f("flex-wrap py-1.5", Lt[w]),
2583
+ Y[w],
2584
+ ue[w],
2585
+ m && F ? Fe[w] : me[w],
2586
+ p ? "select-trigger-disabled" : x && "select-trigger-error",
2579
2587
  !p && v && "ring-4"
2580
2588
  ),
2581
2589
  children: [
2582
- F && me.map((S) => /* @__PURE__ */ e(
2590
+ F && he.map((S) => /* @__PURE__ */ e(
2583
2591
  Pe,
2584
2592
  {
2585
2593
  color: b,
2586
- className: h(
2587
- m && oe > 1 && "shrink-0",
2588
- (!m || oe === 1) && "max-w-full min-w-0"
2594
+ className: f(
2595
+ h && se > 1 && "shrink-0",
2596
+ (!h || se === 1) && "max-w-full min-w-0"
2589
2597
  ),
2590
2598
  children: S.label
2591
2599
  },
2592
2600
  String(S.value)
2593
2601
  )),
2594
- F && ct > 0 && /* @__PURE__ */ d("span", { className: "shrink-0 text-sm font-medium select-placeholder px-1", children: [
2602
+ F && ut > 0 && /* @__PURE__ */ d("span", { className: "shrink-0 text-sm font-medium select-placeholder px-1", children: [
2595
2603
  "+",
2596
- ct,
2604
+ ut,
2597
2605
  " more"
2598
2606
  ] }),
2599
2607
  !F && c && /* @__PURE__ */ e("span", { className: "select-placeholder", children: c })
2600
2608
  ]
2601
2609
  }
2602
2610
  ),
2603
- m && /* @__PURE__ */ d(
2611
+ h && /* @__PURE__ */ d(
2604
2612
  "div",
2605
2613
  {
2606
2614
  ref: k,
@@ -2617,30 +2625,30 @@ const zl = (n) => {
2617
2625
  }
2618
2626
  ),
2619
2627
  /* @__PURE__ */ d(fe, { ref: B, children: [
2620
- !p && w && /* @__PURE__ */ e(ne, {}),
2621
- f && F && !p && /* @__PURE__ */ e(q, { Icon: ie, onClick: () => l([]) }),
2622
- /* @__PURE__ */ e(q, { Icon: pe })
2628
+ !p && x && /* @__PURE__ */ e(ne, {}),
2629
+ m && F && !p && /* @__PURE__ */ e(q, { Icon: ce, onClick: () => l([]) }),
2630
+ /* @__PURE__ */ e(q, { Icon: ge })
2623
2631
  ] }),
2624
- /* @__PURE__ */ e(U, { open: v, children: /* @__PURE__ */ d(ge, { className: "gap-0 !p-0", style: { maxHeight: g }, children: [
2632
+ /* @__PURE__ */ e(U, { open: v, children: /* @__PURE__ */ d(be, { className: "gap-0 !p-0", style: { maxHeight: g }, children: [
2625
2633
  /* @__PURE__ */ d("div", { className: "sticky top-0 border-b select-search-bar py-1 backdrop-blur-sm", children: [
2626
2634
  /* @__PURE__ */ e(
2627
2635
  "input",
2628
2636
  {
2629
- ref: P,
2637
+ ref: z,
2630
2638
  type: "text",
2631
2639
  placeholder: "Search",
2632
- value: I,
2640
+ value: y,
2633
2641
  className: "appearance-none border-none w-full bg-transparent rounded- pl-10 transition-all duration-150 focus:outline-none ring-0 placeholder:text-[var(--color-input-placeholder)]",
2634
2642
  onChange: (S) => D(S.target.value),
2635
2643
  onKeyDown: (S) => {
2636
- S.key === "Enter" && T != null ? (S.preventDefault(), Oe(T)) : S.key === "Backspace" && I === "" && F && (S.preventDefault(), l(i.slice(0, -1)));
2644
+ S.key === "Enter" && T != null ? (S.preventDefault(), Oe(T)) : S.key === "Backspace" && y === "" && F && (S.preventDefault(), l(i.slice(0, -1)));
2637
2645
  }
2638
2646
  }
2639
2647
  ),
2640
2648
  /* @__PURE__ */ e(Ee, { className: "absolute select-search-icon left-4 top-4 h-4 w-4" })
2641
2649
  ] }),
2642
2650
  /* @__PURE__ */ d("div", { className: "flex flex-col gap-1 p-2", children: [
2643
- I !== "" && !M && /* @__PURE__ */ e("div", { className: "flex flex-col items-center justify-center py-6", children: /* @__PURE__ */ e(tt, { className: "h-6 w-6 text-[var(--color-input-text)]" }) }),
2651
+ y !== "" && !E && /* @__PURE__ */ e("div", { className: "flex flex-col items-center justify-center py-6", children: /* @__PURE__ */ e(tt, { className: "h-6 w-6 text-[var(--color-input-text)]" }) }),
2644
2652
  X.map((S, W) => {
2645
2653
  if (!H(S))
2646
2654
  return S.kind === "header" ? /* @__PURE__ */ e(
@@ -2683,21 +2691,21 @@ const zl = (n) => {
2683
2691
  ] }) })
2684
2692
  ] }),
2685
2693
  /* @__PURE__ */ e(V, { children: s }),
2686
- /* @__PURE__ */ e(K, { children: w })
2694
+ /* @__PURE__ */ e(K, { children: x })
2687
2695
  ]
2688
2696
  }
2689
2697
  ) });
2690
- }, Tl = y.forwardRef((n, t) => {
2698
+ }, Tl = C.forwardRef((t, n) => {
2691
2699
  const {
2692
2700
  className: o,
2693
2701
  children: s,
2694
2702
  ...r
2695
- } = n;
2703
+ } = t;
2696
2704
  return /* @__PURE__ */ e(
2697
2705
  "div",
2698
2706
  {
2699
- ref: t,
2700
- className: h(
2707
+ ref: n,
2708
+ className: f(
2701
2709
  "flex flex-col gap-6 border panel-base rounded-2xl shadow-sm px-6 py-6",
2702
2710
  o
2703
2711
  ),
@@ -2705,17 +2713,17 @@ const zl = (n) => {
2705
2713
  children: s
2706
2714
  }
2707
2715
  );
2708
- }), Ll = y.forwardRef((n, t) => {
2716
+ }), Ll = C.forwardRef((t, n) => {
2709
2717
  const {
2710
2718
  className: o,
2711
2719
  children: s,
2712
2720
  ...r
2713
- } = n;
2721
+ } = t;
2714
2722
  return /* @__PURE__ */ e(
2715
2723
  "div",
2716
2724
  {
2717
- ref: t,
2718
- className: h(
2725
+ ref: n,
2726
+ className: f(
2719
2727
  "flex flex-col gap-1 border panel-base rounded-2xl shadow-sm p-2",
2720
2728
  o
2721
2729
  ),
@@ -2723,66 +2731,66 @@ const zl = (n) => {
2723
2731
  children: s
2724
2732
  }
2725
2733
  );
2726
- }), wt = "input-description text-sm font-medium", Pl = (n) => {
2734
+ }), kt = "input-description text-sm font-medium", Pl = (t) => {
2727
2735
  const {
2728
- className: t,
2736
+ className: n,
2729
2737
  label: o,
2730
2738
  children: s,
2731
2739
  orientation: r = "vertical",
2732
2740
  ...l
2733
- } = n;
2741
+ } = t;
2734
2742
  return r === "horizontal" ? /* @__PURE__ */ d(
2735
2743
  "div",
2736
2744
  {
2737
- className: h(
2745
+ className: f(
2738
2746
  "flex flex-row items-center gap-3 px-3 py-2",
2739
- t
2747
+ n
2740
2748
  ),
2741
2749
  ...l,
2742
2750
  children: [
2743
- /* @__PURE__ */ e("div", { className: h(wt, "w-1/2 line-clamp-1 break-all"), children: o }),
2751
+ /* @__PURE__ */ e("div", { className: f(kt, "w-1/2 line-clamp-1 break-all"), children: o }),
2744
2752
  /* @__PURE__ */ e("div", { className: "w-1/2 line-clamp-1 break-all", children: s })
2745
2753
  ]
2746
2754
  }
2747
2755
  ) : /* @__PURE__ */ d(
2748
2756
  "div",
2749
2757
  {
2750
- className: h(
2758
+ className: f(
2751
2759
  "flex flex-col gap-1 px-3 py-2",
2752
- t
2760
+ n
2753
2761
  ),
2754
2762
  ...l,
2755
2763
  children: [
2756
- o && /* @__PURE__ */ e("div", { className: wt, children: o }),
2764
+ o && /* @__PURE__ */ e("div", { className: kt, children: o }),
2757
2765
  /* @__PURE__ */ e("div", { children: s })
2758
2766
  ]
2759
2767
  }
2760
2768
  );
2761
2769
  }, Fr = {
2762
2770
  error: Ze,
2763
- warning: nn,
2771
+ warning: ln,
2764
2772
  success: et,
2765
- info: tn
2773
+ info: rn
2766
2774
  }, Br = {
2767
2775
  error: "text-[var(--color-status-error)]",
2768
2776
  warning: "text-[var(--color-status-warning)]",
2769
2777
  success: "text-[var(--color-status-success)]",
2770
2778
  info: "text-[var(--color-status-info)]"
2771
- }, Nt = "inline-flex flex-row gap-3 items-center justify-between h-10 px-3 font-semibold ring-0 dropdown-item rounded-lg cursor-pointer transition-all duration-150 select-none focus:outline-none focus:ring-0 border border-transparent bg-transparent", El = (n) => {
2779
+ }, yt = "inline-flex flex-row gap-3 items-center justify-between h-10 px-3 font-semibold ring-0 dropdown-item rounded-lg cursor-pointer transition-all duration-150 select-none focus:outline-none focus:ring-0 border border-transparent bg-transparent", El = (t) => {
2772
2780
  const {
2773
- className: t,
2781
+ className: n,
2774
2782
  children: o,
2775
2783
  Icon: s,
2776
2784
  status: r,
2777
2785
  ...l
2778
- } = n, a = r ? Fr[r] : null, i = /* @__PURE__ */ d(ee, { children: [
2786
+ } = t, a = r ? Fr[r] : null, i = /* @__PURE__ */ d(ee, { children: [
2779
2787
  /* @__PURE__ */ d("span", { className: "inline-flex flex-row items-center gap-3 min-w-0", children: [
2780
2788
  s && /* @__PURE__ */ e(s, { className: "h-5 w-5 shrink-0" }),
2781
2789
  /* @__PURE__ */ e("span", { className: "truncate", children: o })
2782
2790
  ] }),
2783
2791
  /* @__PURE__ */ d("span", { className: "inline-flex flex-row items-center gap-2 shrink-0", children: [
2784
- a && r && /* @__PURE__ */ e(a, { className: h("h-5 w-5", Br[r]) }),
2785
- /* @__PURE__ */ e(rn, { className: "h-5 w-5 text-[var(--color-input-icon-button-icon)]" })
2792
+ a && r && /* @__PURE__ */ e(a, { className: f("h-5 w-5", Br[r]) }),
2793
+ /* @__PURE__ */ e(on, { className: "h-5 w-5 text-[var(--color-input-icon-button-icon)]" })
2786
2794
  ] })
2787
2795
  ] });
2788
2796
  if (l.href !== void 0) {
@@ -2791,7 +2799,7 @@ const zl = (n) => {
2791
2799
  "a",
2792
2800
  {
2793
2801
  href: c,
2794
- className: h(Nt, t),
2802
+ className: f(yt, n),
2795
2803
  ...g,
2796
2804
  children: i
2797
2805
  }
@@ -2800,36 +2808,36 @@ const zl = (n) => {
2800
2808
  return /* @__PURE__ */ e(
2801
2809
  "button",
2802
2810
  {
2803
- className: h(Nt, t),
2811
+ className: f(yt, n),
2804
2812
  ...l,
2805
2813
  children: i
2806
2814
  }
2807
2815
  );
2808
- }, Ml = (n) => {
2816
+ }, Ml = (t) => {
2809
2817
  const {
2810
- className: t,
2818
+ className: n,
2811
2819
  vertical: o = !1,
2812
2820
  ...s
2813
- } = n;
2821
+ } = t;
2814
2822
  return /* @__PURE__ */ e(
2815
2823
  "div",
2816
2824
  {
2817
- className: h(
2825
+ className: f(
2818
2826
  o ? "w-px h-full bg-[var(--color-divider)]" : "w-full h-px bg-[var(--color-divider)]",
2819
- t
2827
+ n
2820
2828
  ),
2821
2829
  ...s
2822
2830
  }
2823
2831
  );
2824
- }, Fl = (n) => {
2832
+ }, Fl = (t) => {
2825
2833
  const {
2826
- children: t,
2834
+ children: n,
2827
2835
  content: o,
2828
2836
  className: s,
2829
2837
  placement: r = "top",
2830
2838
  minWidth: l = 100,
2831
2839
  maxWidth: a = 200
2832
- } = n, [i, c] = A(!1), { anchorRef: g, Popover: w } = at({
2840
+ } = t, [i, c] = A(!1), { anchorRef: g, Popover: x } = ct({
2833
2841
  placement: r,
2834
2842
  minWidth: l,
2835
2843
  maxWidth: a
@@ -2842,14 +2850,14 @@ const zl = (n) => {
2842
2850
  onMouseEnter: () => c(!0),
2843
2851
  onMouseLeave: () => c(!1),
2844
2852
  children: [
2845
- t,
2846
- /* @__PURE__ */ e(w, { open: i, children: /* @__PURE__ */ e(ge, { children: o }) })
2853
+ n,
2854
+ /* @__PURE__ */ e(x, { open: i, children: /* @__PURE__ */ e(be, { children: o }) })
2847
2855
  ]
2848
2856
  }
2849
2857
  );
2850
- }, Bl = (n) => {
2858
+ }, Bl = (t) => {
2851
2859
  const {
2852
- open: t,
2860
+ open: n,
2853
2861
  onDismiss: o,
2854
2862
  enableDismissOnOutsideClick: s,
2855
2863
  enableDismissOnEscKey: r,
@@ -2857,9 +2865,9 @@ const zl = (n) => {
2857
2865
  className: a,
2858
2866
  children: i,
2859
2867
  maxWidth: c = 600
2860
- } = n;
2861
- return be(!!r && t, o || (() => {
2862
- })), /* @__PURE__ */ e(Se, { children: t && /* @__PURE__ */ d(Me, { children: [
2868
+ } = t;
2869
+ return ve(!!r && n, o || (() => {
2870
+ })), /* @__PURE__ */ e(Se, { children: n && /* @__PURE__ */ d(Me, { children: [
2863
2871
  /* @__PURE__ */ e(
2864
2872
  G.div,
2865
2873
  {
@@ -2882,7 +2890,7 @@ const zl = (n) => {
2882
2890
  /* @__PURE__ */ e("div", { className: "fixed inset-0 flex flex-col items-center pointer-events-none p-4 lg:p-12 overflow-y-auto z-50", children: /* @__PURE__ */ d(
2883
2891
  G.div,
2884
2892
  {
2885
- className: h(
2893
+ className: f(
2886
2894
  "flex flex-col modal-content rounded-2xl shadow-xl p-6 lg:p-12 pointer-events-auto w-full relative",
2887
2895
  a
2888
2896
  ),
@@ -2893,9 +2901,9 @@ const zl = (n) => {
2893
2901
  transition: { duration: 0.15, ease: "easeInOut" },
2894
2902
  children: [
2895
2903
  l && /* @__PURE__ */ e(
2896
- Et,
2904
+ Ft,
2897
2905
  {
2898
- Icon: ie,
2906
+ Icon: ce,
2899
2907
  className: "absolute top-4 right-4",
2900
2908
  variant: "transparent",
2901
2909
  size: "sm",
@@ -2907,9 +2915,9 @@ const zl = (n) => {
2907
2915
  }
2908
2916
  ) })
2909
2917
  ] }) });
2910
- }, Al = (n) => {
2918
+ }, Al = (t) => {
2911
2919
  const {
2912
- open: t,
2920
+ open: n,
2913
2921
  onDismiss: o,
2914
2922
  enableDismissOnOutsideClick: s,
2915
2923
  enableDismissOnEscKey: r,
@@ -2917,9 +2925,9 @@ const zl = (n) => {
2917
2925
  className: a,
2918
2926
  children: i,
2919
2927
  maxWidth: c = 480
2920
- } = n;
2921
- return be(!!r && t, o || (() => {
2922
- })), /* @__PURE__ */ e(Se, { children: t && /* @__PURE__ */ d(Me, { children: [
2928
+ } = t;
2929
+ return ve(!!r && n, o || (() => {
2930
+ })), /* @__PURE__ */ e(Se, { children: n && /* @__PURE__ */ d(Me, { children: [
2923
2931
  /* @__PURE__ */ e(
2924
2932
  G.div,
2925
2933
  {
@@ -2942,7 +2950,7 @@ const zl = (n) => {
2942
2950
  /* @__PURE__ */ e("div", { className: "fixed inset-0 flex flex-row justify-end pointer-events-none z-50", children: /* @__PURE__ */ d(
2943
2951
  G.div,
2944
2952
  {
2945
- className: h(
2953
+ className: f(
2946
2954
  "flex flex-col modal-content shadow-xl p-6 lg:p-12 pointer-events-auto h-full w-full overflow-y-auto relative",
2947
2955
  a
2948
2956
  ),
@@ -2953,9 +2961,9 @@ const zl = (n) => {
2953
2961
  transition: { duration: 0.25, ease: [0.32, 0.72, 0, 1] },
2954
2962
  children: [
2955
2963
  l && /* @__PURE__ */ e(
2956
- Et,
2964
+ Ft,
2957
2965
  {
2958
- Icon: ie,
2966
+ Icon: ce,
2959
2967
  className: "absolute top-4 right-4",
2960
2968
  variant: "transparent",
2961
2969
  size: "sm",
@@ -2967,16 +2975,16 @@ const zl = (n) => {
2967
2975
  }
2968
2976
  ) })
2969
2977
  ] }) });
2970
- }, Ar = (n) => {
2978
+ }, Ar = (t) => {
2971
2979
  const {
2972
- className: t,
2980
+ className: n,
2973
2981
  tabs: o
2974
- } = n;
2975
- return /* @__PURE__ */ e("div", { className: h(
2982
+ } = t;
2983
+ return /* @__PURE__ */ e("div", { className: f(
2976
2984
  "h-12 tab-container p-1 rounded-xl inline-flex flex-row space-x-1 overflow-x-auto mat-ui-hide-scrollbars",
2977
- t
2985
+ n
2978
2986
  ), children: o.map((s, r) => {
2979
- const l = h(
2987
+ const l = f(
2980
2988
  "shrink-0 px-4 h-full inline-flex flex-row items-center font-semibold rounded-xl cursor-pointer border border-transparent ing-0 tab-button transition-all duration-150 select-none focus:outline-none focus:ring-0",
2981
2989
  s.active && "tab-button-active shadow-sm"
2982
2990
  );
@@ -3004,43 +3012,43 @@ const zl = (n) => {
3004
3012
  r
3005
3013
  );
3006
3014
  }) });
3007
- }, Ul = (n) => {
3015
+ }, Ul = (t) => {
3008
3016
  const {
3009
- duration: t = 0.3,
3017
+ duration: n = 0.3,
3010
3018
  ease: o = "easeInOut",
3011
3019
  horizontal: s = !1,
3012
3020
  children: r,
3013
3021
  className: l,
3014
3022
  ...a
3015
- } = n, i = y.useRef(null), c = y.useRef(null), g = y.useRef(null);
3016
- return y.useEffect(() => {
3017
- const w = i.current, x = c.current;
3018
- if (!w || !x) return;
3019
- let m = !0;
3023
+ } = t, i = C.useRef(null), c = C.useRef(null), g = C.useRef(null);
3024
+ return C.useEffect(() => {
3025
+ const x = i.current, w = c.current;
3026
+ if (!x || !w) return;
3027
+ let h = !0;
3020
3028
  const b = () => {
3021
- const f = s ? w.scrollWidth - w.clientWidth : w.scrollHeight - w.clientHeight, v = s ? w.scrollLeft : w.scrollTop;
3022
- if (!(f <= 0 || Math.abs(f - v) < 1)) {
3023
- if (m) {
3024
- m = !1, s ? w.scrollLeft = f : w.scrollTop = f;
3029
+ const m = s ? x.scrollWidth - x.clientWidth : x.scrollHeight - x.clientHeight, v = s ? x.scrollLeft : x.scrollTop;
3030
+ if (!(m <= 0 || Math.abs(m - v) < 1)) {
3031
+ if (h) {
3032
+ h = !1, s ? x.scrollLeft = m : x.scrollTop = m;
3025
3033
  return;
3026
3034
  }
3027
- g.current?.stop(), g.current = _t(v, f, {
3028
- duration: t,
3035
+ g.current?.stop(), g.current = Xt(v, m, {
3036
+ duration: n,
3029
3037
  ease: o,
3030
3038
  onUpdate: (u) => {
3031
- s ? w.scrollLeft = u : w.scrollTop = u;
3039
+ s ? x.scrollLeft = u : x.scrollTop = u;
3032
3040
  }
3033
3041
  });
3034
3042
  }
3035
3043
  }, p = new ResizeObserver(b);
3036
- return p.observe(x), () => {
3044
+ return p.observe(w), () => {
3037
3045
  p.disconnect(), g.current?.stop();
3038
3046
  };
3039
- }, [t, o, s]), /* @__PURE__ */ e(
3047
+ }, [n, o, s]), /* @__PURE__ */ e(
3040
3048
  "div",
3041
3049
  {
3042
3050
  ref: i,
3043
- className: h(
3051
+ className: f(
3044
3052
  "min-h-0 min-w-0",
3045
3053
  s ? "overflow-x-auto" : "overflow-y-auto",
3046
3054
  l
@@ -3050,83 +3058,83 @@ const zl = (n) => {
3050
3058
  }
3051
3059
  );
3052
3060
  };
3053
- function Ur(n) {
3061
+ function Ur(t) {
3054
3062
  const {
3055
- onDelta: t,
3063
+ onDelta: n,
3056
3064
  onDragStart: o,
3057
3065
  onDragEnd: s,
3058
3066
  disabled: r = !1,
3059
3067
  primaryButtonOnly: l = !0,
3060
3068
  preventScrollOnMove: a = !0
3061
- } = n, [i, c] = y.useState(!1), g = y.useRef(!1), w = y.useRef(0), x = y.useRef(0), m = y.useRef(0), b = y.useRef(null), p = y.useRef(null), f = y.useRef({ onDelta: t, onDragStart: o, onDragEnd: s, preventScrollOnMove: a });
3062
- y.useEffect(() => {
3063
- f.current = { onDelta: t, onDragStart: o, onDragEnd: s, preventScrollOnMove: a };
3069
+ } = t, [i, c] = C.useState(!1), g = C.useRef(!1), x = C.useRef(0), w = C.useRef(0), h = C.useRef(0), b = C.useRef(null), p = C.useRef(null), m = C.useRef({ onDelta: n, onDragStart: o, onDragEnd: s, preventScrollOnMove: a });
3070
+ C.useEffect(() => {
3071
+ m.current = { onDelta: n, onDragStart: o, onDragEnd: s, preventScrollOnMove: a };
3064
3072
  });
3065
- const v = y.useRef({}), u = y.useCallback((C) => {
3073
+ const v = C.useRef({}), u = C.useCallback((R) => {
3066
3074
  if (!g.current) return;
3067
- const I = {
3068
- clientX: C ?? x.current,
3069
- startX: w.current,
3070
- totalDeltaX: m.current,
3075
+ const y = {
3076
+ clientX: R ?? w.current,
3077
+ startX: x.current,
3078
+ totalDeltaX: h.current,
3071
3079
  target: b.current
3072
3080
  };
3073
3081
  g.current = !1, c(!1);
3074
- const { move: D, up: T, keydown: E } = v.current;
3075
- D && window.removeEventListener("pointermove", D, !0), T && (window.removeEventListener("pointerup", T, !0), window.removeEventListener("pointercancel", T, !0)), E && window.removeEventListener("keydown", E, !0), v.current = {}, p.current != null && (cancelAnimationFrame(p.current), p.current = null), f.current.onDragEnd?.(I), b.current = null, m.current = 0;
3076
- }, []), R = y.useCallback((C) => {
3077
- if (r || l && C.button !== 0) return;
3078
- C.target.setPointerCapture?.(C.pointerId), w.current = C.clientX, x.current = C.clientX, m.current = 0, b.current = C.target, g.current = !0, c(!0);
3079
- const I = {
3080
- clientX: C.clientX,
3081
- startX: C.clientX,
3082
+ const { move: D, up: T, keydown: M } = v.current;
3083
+ D && window.removeEventListener("pointermove", D, !0), T && (window.removeEventListener("pointerup", T, !0), window.removeEventListener("pointercancel", T, !0)), M && window.removeEventListener("keydown", M, !0), v.current = {}, p.current != null && (cancelAnimationFrame(p.current), p.current = null), m.current.onDragEnd?.(y), b.current = null, h.current = 0;
3084
+ }, []), I = C.useCallback((R) => {
3085
+ if (r || l && R.button !== 0) return;
3086
+ R.target.setPointerCapture?.(R.pointerId), x.current = R.clientX, w.current = R.clientX, h.current = 0, b.current = R.target, g.current = !0, c(!0);
3087
+ const y = {
3088
+ clientX: R.clientX,
3089
+ startX: R.clientX,
3082
3090
  totalDeltaX: 0,
3083
- target: C.target
3091
+ target: R.target
3084
3092
  };
3085
- f.current.onDragStart?.(I);
3086
- const D = (L) => {
3093
+ m.current.onDragStart?.(y);
3094
+ const D = (P) => {
3087
3095
  g.current && p.current == null && (p.current = requestAnimationFrame(() => {
3088
3096
  p.current = null;
3089
- const P = L.clientX, N = P - x.current;
3097
+ const z = P.clientX, N = z - w.current;
3090
3098
  if (N === 0) return;
3091
- x.current = P, m.current += N;
3099
+ w.current = z, h.current += N;
3092
3100
  const k = {
3093
- clientX: P,
3094
- startX: w.current,
3095
- totalDeltaX: m.current,
3101
+ clientX: z,
3102
+ startX: x.current,
3103
+ totalDeltaX: h.current,
3096
3104
  target: b.current
3097
3105
  };
3098
- f.current.preventScrollOnMove && L.preventDefault(), f.current.onDelta(N, k);
3106
+ m.current.preventScrollOnMove && P.preventDefault(), m.current.onDelta(N, k);
3099
3107
  }));
3100
- }, T = (L) => {
3101
- u(L.clientX);
3102
- }, E = (L) => {
3103
- L.key === "Escape" && (L.preventDefault(), u());
3108
+ }, T = (P) => {
3109
+ u(P.clientX);
3110
+ }, M = (P) => {
3111
+ P.key === "Escape" && (P.preventDefault(), u());
3104
3112
  };
3105
- v.current = { move: D, up: T, keydown: E }, window.addEventListener("pointermove", D, {
3113
+ v.current = { move: D, up: T, keydown: M }, window.addEventListener("pointermove", D, {
3106
3114
  passive: !a,
3107
3115
  capture: !0
3108
- }), window.addEventListener("pointerup", T, { capture: !0 }), window.addEventListener("pointercancel", T, { capture: !0 }), window.addEventListener("keydown", E, !0);
3116
+ }), window.addEventListener("pointerup", T, { capture: !0 }), window.addEventListener("pointercancel", T, { capture: !0 }), window.addEventListener("keydown", M, !0);
3109
3117
  }, [u, r, a, l]);
3110
- return y.useEffect(() => () => {
3118
+ return C.useEffect(() => () => {
3111
3119
  g.current && u();
3112
3120
  }, [u]), {
3113
3121
  isDragging: i,
3114
3122
  bind: {
3115
- onPointerDown: R,
3123
+ onPointerDown: I,
3116
3124
  role: "separator",
3117
3125
  style: { touchAction: "none", cursor: "col-resize", userSelect: "none" }
3118
3126
  }
3119
3127
  };
3120
3128
  }
3121
- const Wr = (n) => {
3129
+ const Wr = (t) => {
3122
3130
  const {
3123
- column: t,
3131
+ column: n,
3124
3132
  width: o,
3125
3133
  height: s,
3126
3134
  onResize: r,
3127
3135
  sortDirection: l,
3128
3136
  onSortClick: a
3129
- } = n, i = !!t.sortable, { bind: c } = Ur({
3137
+ } = t, i = !!n.sortable, { bind: c } = Ur({
3130
3138
  onDelta: (g) => r(g)
3131
3139
  });
3132
3140
  return /* @__PURE__ */ d(
@@ -3138,15 +3146,15 @@ const Wr = (n) => {
3138
3146
  /* @__PURE__ */ d(
3139
3147
  "div",
3140
3148
  {
3141
- className: h(
3149
+ className: f(
3142
3150
  "flex-1 min-w-0 px-4 table-header-cell transition-colors duration-100 flex flex-row items-center gap-2",
3143
3151
  i && "cursor-pointer"
3144
3152
  ),
3145
3153
  onClick: i ? a : void 0,
3146
3154
  children: [
3147
- /* @__PURE__ */ e("span", { className: "truncate", children: t.header }),
3148
- i && l === "asc" && /* @__PURE__ */ e(ln, { className: "h-4 w-4 shrink-0" }),
3149
- i && l === "desc" && /* @__PURE__ */ e(pe, { className: "h-4 w-4 shrink-0" })
3155
+ /* @__PURE__ */ e("span", { className: "truncate", children: n.header }),
3156
+ i && l === "asc" && /* @__PURE__ */ e(sn, { className: "h-4 w-4 shrink-0" }),
3157
+ i && l === "desc" && /* @__PURE__ */ e(ge, { className: "h-4 w-4 shrink-0" })
3150
3158
  ]
3151
3159
  }
3152
3160
  ),
@@ -3166,14 +3174,14 @@ const Wr = (n) => {
3166
3174
  ]
3167
3175
  }
3168
3176
  );
3169
- }, Ne = 200, Hr = 60, _r = (n) => {
3170
- const t = {};
3171
- for (const o of n)
3172
- t[o.id] = o.defaultWidth ?? Ne;
3173
- return t;
3174
- }, $r = (n) => {
3177
+ }, Ne = 200, Hr = 60, _r = (t) => {
3178
+ const n = {};
3179
+ for (const o of t)
3180
+ n[o.id] = o.defaultWidth ?? Ne;
3181
+ return n;
3182
+ }, $r = (t) => {
3175
3183
  const {
3176
- columns: t,
3184
+ columns: n,
3177
3185
  rows: o,
3178
3186
  getRowId: s,
3179
3187
  onRowClick: r,
@@ -3182,20 +3190,20 @@ const Wr = (n) => {
3182
3190
  className: i,
3183
3191
  rowHeight: c = 44,
3184
3192
  headerHeight: g = 44
3185
- } = n, [w, x] = A(() => _r(t));
3193
+ } = t, [x, w] = A(() => _r(n));
3186
3194
  $(() => {
3187
- x((u) => {
3188
- const R = {};
3189
- let C = Object.keys(u).length !== t.length;
3190
- for (const I of t)
3191
- I.id in u ? R[I.id] = u[I.id] : (R[I.id] = I.defaultWidth ?? Ne, C = !0);
3192
- return C ? R : u;
3195
+ w((u) => {
3196
+ const I = {};
3197
+ let R = Object.keys(u).length !== n.length;
3198
+ for (const y of n)
3199
+ y.id in u ? I[y.id] = u[y.id] : (I[y.id] = y.defaultWidth ?? Ne, R = !0);
3200
+ return R ? I : u;
3193
3201
  });
3194
- }, [t]);
3195
- const m = Te((u, R, C) => {
3196
- x((I) => {
3197
- const D = I[u] ?? Ne, T = Math.max(C, D + R);
3198
- return T === D ? I : { ...I, [u]: T };
3202
+ }, [n]);
3203
+ const h = Te((u, I, R) => {
3204
+ w((y) => {
3205
+ const D = y[u] ?? Ne, T = Math.max(R, D + I);
3206
+ return T === D ? y : { ...y, [u]: T };
3199
3207
  });
3200
3208
  }, []), b = Te((u) => {
3201
3209
  if (a) {
@@ -3209,17 +3217,17 @@ const Wr = (n) => {
3209
3217
  }
3210
3218
  a(null);
3211
3219
  }
3212
- }, [l, a]), p = t.reduce(
3213
- (u, R) => u + (w[R.id] ?? R.defaultWidth ?? Ne),
3220
+ }, [l, a]), p = n.reduce(
3221
+ (u, I) => u + (x[I.id] ?? I.defaultWidth ?? Ne),
3214
3222
  0
3215
- ), f = ke(null), v = (u) => {
3216
- f.current && (f.current.scrollLeft = u.currentTarget.scrollLeft);
3223
+ ), m = ke(null), v = (u) => {
3224
+ m.current && (m.current.scrollLeft = u.currentTarget.scrollLeft);
3217
3225
  };
3218
- return /* @__PURE__ */ d("div", { className: h("flex flex-col h-full w-full", i), children: [
3226
+ return /* @__PURE__ */ d("div", { className: f("flex flex-col h-full w-full", i), children: [
3219
3227
  /* @__PURE__ */ e(
3220
3228
  "div",
3221
3229
  {
3222
- ref: f,
3230
+ ref: m,
3223
3231
  className: "overflow-hidden shrink-0 table-header-strip",
3224
3232
  style: { height: g },
3225
3233
  children: /* @__PURE__ */ e(
@@ -3227,13 +3235,13 @@ const Wr = (n) => {
3227
3235
  {
3228
3236
  className: "flex flex-row table-header font-medium",
3229
3237
  style: { width: p, minWidth: "100%" },
3230
- children: t.map((u) => /* @__PURE__ */ e(
3238
+ children: n.map((u) => /* @__PURE__ */ e(
3231
3239
  Wr,
3232
3240
  {
3233
3241
  column: u,
3234
- width: w[u.id] ?? u.defaultWidth ?? Ne,
3242
+ width: x[u.id] ?? u.defaultWidth ?? Ne,
3235
3243
  height: g,
3236
- onResize: (R) => m(u.id, R, u.minWidth ?? Hr),
3244
+ onResize: (I) => h(u.id, I, u.minWidth ?? Hr),
3237
3245
  sortDirection: l?.columnId === u.id ? l.direction : null,
3238
3246
  onSortClick: () => b(u.id)
3239
3247
  },
@@ -3253,38 +3261,38 @@ const Wr = (n) => {
3253
3261
  {
3254
3262
  className: "flex flex-col",
3255
3263
  style: { width: p, minWidth: "100%" },
3256
- children: o.map((u, R) => /* @__PURE__ */ e(
3264
+ children: o.map((u, I) => /* @__PURE__ */ e(
3257
3265
  "div",
3258
3266
  {
3259
- className: h(
3267
+ className: f(
3260
3268
  "flex flex-row table-body-row transition-colors duration-100",
3261
3269
  r && "cursor-pointer"
3262
3270
  ),
3263
- onClick: r ? () => r(u, R) : void 0,
3264
- children: t.map((C) => /* @__PURE__ */ e(
3271
+ onClick: r ? () => r(u, I) : void 0,
3272
+ children: n.map((R) => /* @__PURE__ */ e(
3265
3273
  "div",
3266
3274
  {
3267
3275
  className: "shrink-0 content-center px-4 relative",
3268
3276
  style: {
3269
- width: w[C.id] ?? C.defaultWidth ?? Ne,
3277
+ width: x[R.id] ?? R.defaultWidth ?? Ne,
3270
3278
  height: c
3271
3279
  },
3272
- children: /* @__PURE__ */ e("div", { className: "break-all line-clamp-1", children: C.renderCell(u, R) })
3280
+ children: /* @__PURE__ */ e("div", { className: "break-all line-clamp-1", children: R.renderCell(u, I) })
3273
3281
  },
3274
- C.id
3282
+ R.id
3275
3283
  ))
3276
3284
  },
3277
- s(u, R)
3285
+ s(u, I)
3278
3286
  ))
3279
3287
  }
3280
3288
  )
3281
3289
  }
3282
3290
  )
3283
3291
  ] });
3284
- }, kt = (n) => {
3285
- const { label: t, children: o, className: s } = n;
3286
- return /* @__PURE__ */ d("div", { className: h("flex flex-col dropdown-button-group", s), children: [
3287
- t && /* @__PURE__ */ e("div", { className: "mb-2 text-sm dropdown-group-label font-semibold px-3", children: t }),
3292
+ }, Ct = (t) => {
3293
+ const { label: n, children: o, className: s } = t;
3294
+ return /* @__PURE__ */ d("div", { className: f("flex flex-col dropdown-button-group", s), children: [
3295
+ n && /* @__PURE__ */ e("div", { className: "mb-2 text-sm dropdown-group-label font-semibold px-3", children: n }),
3288
3296
  o
3289
3297
  ] });
3290
3298
  }, Xr = () => /* @__PURE__ */ e("div", {}), jr = [
@@ -3301,15 +3309,15 @@ const Wr = (n) => {
3301
3309
  { id: 11, email: "ava.sanders@example.com", firstname: "Ava", lastname: "Sanders", status: "active" },
3302
3310
  { id: 12, email: "logan.bennett@company.io", firstname: "Logan", lastname: "Bennett", status: "inactive" }
3303
3311
  ], Vr = [
3304
- { id: "id", header: "ID", renderCell: (n) => n.id },
3312
+ { id: "id", header: "ID", renderCell: (t) => t.id },
3305
3313
  {
3306
3314
  id: "email",
3307
3315
  header: "Email",
3308
- renderCell: (n) => /* @__PURE__ */ e(Pe, { Icon: sn, onClick: () => {
3309
- }, children: n.email })
3316
+ renderCell: (t) => /* @__PURE__ */ e(Pe, { Icon: cn, onClick: () => {
3317
+ }, children: t.email })
3310
3318
  },
3311
- { id: "firstname", header: "First Name", renderCell: (n) => n.firstname },
3312
- { id: "lastname", header: "Last Name", renderCell: (n) => n.lastname },
3319
+ { id: "firstname", header: "First Name", renderCell: (t) => t.firstname },
3320
+ { id: "lastname", header: "Last Name", renderCell: (t) => t.lastname },
3313
3321
  {
3314
3322
  id: "status",
3315
3323
  header: "Status",
@@ -3317,23 +3325,23 @@ const Wr = (n) => {
3317
3325
  }
3318
3326
  ], Wl = () => /* @__PURE__ */ d("div", { className: "flex flex-col gap-6", children: [
3319
3327
  /* @__PURE__ */ d("div", { className: "flex flex-row items-center justify-start gap-3", children: [
3320
- /* @__PURE__ */ e(Mt, { Icon: Ee, placeholder: "Search..." }),
3321
- /* @__PURE__ */ e(Je, { Icon: dt }),
3322
- /* @__PURE__ */ e(Vn, { Icon: ut, children: "New" }),
3328
+ /* @__PURE__ */ e(Bt, { Icon: Ee, placeholder: "Search..." }),
3329
+ /* @__PURE__ */ e(Je, { Icon: mt }),
3330
+ /* @__PURE__ */ e(Vn, { Icon: ft, children: "New" }),
3323
3331
  /* @__PURE__ */ d(
3324
3332
  Ae,
3325
3333
  {
3326
- trigger: /* @__PURE__ */ e(Je, { Icon: dt }),
3334
+ trigger: /* @__PURE__ */ e(Je, { Icon: mt }),
3327
3335
  children: [
3328
- /* @__PURE__ */ e(j, { dismissOnClick: !1, Icon: ut, children: "Add new" }),
3329
- /* @__PURE__ */ e(j, { Icon: on, children: "Remove" }),
3330
- /* @__PURE__ */ d(kt, { label: "Test", className: "mt-2", children: [
3336
+ /* @__PURE__ */ e(j, { dismissOnClick: !1, Icon: ft, children: "Add new" }),
3337
+ /* @__PURE__ */ e(j, { Icon: an, children: "Remove" }),
3338
+ /* @__PURE__ */ d(Ct, { label: "Test", className: "mt-2", children: [
3331
3339
  /* @__PURE__ */ e(j, { children: "Item 1" }),
3332
3340
  /* @__PURE__ */ e(j, { children: "Item 2" }),
3333
3341
  /* @__PURE__ */ e(j, { children: "Item 3" }),
3334
3342
  /* @__PURE__ */ e(j, { children: "Item 4" })
3335
3343
  ] }),
3336
- /* @__PURE__ */ d(kt, { label: "Test", className: "mt-2", children: [
3344
+ /* @__PURE__ */ d(Ct, { label: "Test", className: "mt-2", children: [
3337
3345
  /* @__PURE__ */ e(j, { children: "Item 1" }),
3338
3346
  /* @__PURE__ */ e(j, { children: "Item 2" }),
3339
3347
  /* @__PURE__ */ e(j, { children: "Item 3" }),
@@ -3377,7 +3385,7 @@ const Wr = (n) => {
3377
3385
  className: "h-[300px] w-[300px]",
3378
3386
  columns: Vr,
3379
3387
  rows: jr,
3380
- getRowId: (n) => n.id
3388
+ getRowId: (t) => t.id
3381
3389
  }
3382
3390
  ),
3383
3391
  /* @__PURE__ */ e(Xr, {})
@@ -3400,14 +3408,14 @@ export {
3400
3408
  Pe as Badge,
3401
3409
  Er as BadgeColor,
3402
3410
  Vn as Button,
3403
- Et as ButtonIconRound,
3411
+ Ft as ButtonIconRound,
3404
3412
  Je as ButtonIconSquare,
3405
3413
  Ml as Divider,
3406
3414
  j as DropdownButton,
3407
- kt as DropdownButtonGroup,
3415
+ Ct as DropdownButtonGroup,
3408
3416
  Ae as DropdownMenu,
3409
- ge as DropdownPanel,
3410
- Mt as Input,
3417
+ be as DropdownPanel,
3418
+ Bt as Input,
3411
3419
  kl as InputCheck,
3412
3420
  bl as InputColor,
3413
3421
  V as InputDescription,
@@ -3440,15 +3448,15 @@ export {
3440
3448
  Rr as LexicalLinkButton,
3441
3449
  Ir as LexicalListButtons,
3442
3450
  zr as LexicalToolbar,
3443
- ae as LexicalToolbarButton,
3451
+ ie as LexicalToolbarButton,
3444
3452
  Ge as LexicalToolbarDivider,
3445
- Ht as LexicalToolbarItems,
3453
+ $t as LexicalToolbarItems,
3446
3454
  Bl as Modal,
3447
3455
  Tl as Panel,
3448
3456
  Pl as PanelField,
3449
3457
  El as PanelLink,
3450
3458
  Ll as PanelStack,
3451
- Ft as PopoverBase,
3459
+ At as PopoverBase,
3452
3460
  Al as SidebarModal,
3453
3461
  Re as Spinner,
3454
3462
  Ar as TabButtons,
@@ -3458,10 +3466,10 @@ export {
3458
3466
  Fl as Tooltip,
3459
3467
  vr as UploadFileTile,
3460
3468
  H as isSelectOption,
3461
- vt as lexicalTheme,
3462
- ve as useLexicalToolbar,
3463
- At as useLexicalToolbarState,
3464
- at as usePopover,
3469
+ wt as lexicalTheme,
3470
+ xe as useLexicalToolbar,
3471
+ Wt as useLexicalToolbarState,
3472
+ ct as usePopover,
3465
3473
  _e as useSelectPopover
3466
3474
  };
3467
3475
  //# sourceMappingURL=index.js.map