@minimalstuff/ui 5.0.1 → 5.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,17 +1,44 @@
1
1
  import e from "clsx";
2
- import { cloneElement as t, createContext as n, isValidElement as r, useCallback as i, useContext as a, useEffect as o, useId as s, useLayoutEffect as c, useMemo as l, useRef as u, useState as d } from "react";
3
- import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
4
- import { arrow as h, autoUpdate as g, flip as _, offset as v, shift as y, useFloating as b } from "@floating-ui/react-dom";
5
- import { createPortal as x } from "react-dom";
6
- import { create as S } from "zustand";
7
- import { createCallable as C } from "react-call";
2
+ import { Fragment as t, jsx as n, jsxs as r } from "react/jsx-runtime";
3
+ import { cloneElement as i, createContext as a, isValidElement as o, useCallback as s, useContext as c, useEffect as l, useEffectEvent as u, useId as d, useLayoutEffect as f, useMemo as p, useRef as m, useState as h } from "react";
4
+ import { arrow as g, autoUpdate as _, flip as v, offset as y, shift as b, useFloating as x } from "@floating-ui/react-dom";
5
+ import { createPortal as S } from "react-dom";
6
+ import { create as C } from "zustand";
7
+ import { createCallable as w } from "react-call";
8
+ // src/components/shared/surface_tokens.ts
9
+ var T = "border-gray-300 dark:border-gray-600", E = "bg-white dark:bg-gray-800", D = "border-gray-200 dark:border-gray-700", O = "bg-white dark:bg-gray-900", k = "[scrollbar-color:theme(colors.gray.300)_transparent] hover:[scrollbar-color:theme(colors.gray.400)_transparent] dark:[scrollbar-color:theme(colors.gray.600)_transparent] dark:hover:[scrollbar-color:theme(colors.gray.500)_transparent]", A = `[scrollbar-width:thin] ${k}`;
10
+ `${k}`;
11
+ // src/components/app_bar/app_bar.tsx
12
+ var j = e("grid min-h-8 grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center gap-3 border-b text-xs", "pl-[max(0.75rem,env(safe-area-inset-left))] pr-[max(0.75rem,env(safe-area-inset-right))]", "text-gray-700 dark:text-gray-300", O, D);
13
+ function M(t) {
14
+ let { start: i, title: a, end: o, startClassName: s, titleClassName: c, endClassName: l, unstyled: u = !1, className: d, ...f } = t;
15
+ return /* @__PURE__ */ r("header", {
16
+ ...f,
17
+ className: e(!u && j, d),
18
+ children: [
19
+ /* @__PURE__ */ n("div", {
20
+ className: e("flex min-w-0 items-center justify-start", s),
21
+ children: i
22
+ }),
23
+ /* @__PURE__ */ n("div", {
24
+ className: e("min-w-0 truncate text-center", c),
25
+ children: a
26
+ }),
27
+ /* @__PURE__ */ n("div", {
28
+ className: e("flex min-w-0 items-center justify-end", l),
29
+ children: o
30
+ })
31
+ ]
32
+ });
33
+ }
8
34
  // src/components/shared/focus_styles.ts
9
- var w = "outline-hidden focus-visible:outline-2 focus-visible:outline-offset-2", T = "focus:outline-hidden focus:ring-2 focus:ring-blue-500 focus:border-transparent", E = "has-[:focus-visible]:outline-hidden has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-offset-2 has-[:focus-visible]:ring-offset-white dark:has-[:focus-visible]:ring-offset-gray-900", D = "has-[:focus-visible]:ring-blue-500", O = "has-[:focus-visible]:ring-red-500", k = "outline-hidden focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-blue-500 dark:focus-visible:outline-blue-400", A = {
35
+ var N = "outline-hidden focus-visible:outline-2 focus-visible:outline-offset-2", P = "focus:outline-hidden focus:ring-2 focus:ring-blue-500 focus:border-transparent", F = "has-[:focus-visible]:outline-hidden has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-offset-2 has-[:focus-visible]:ring-offset-white dark:has-[:focus-visible]:ring-offset-gray-900", I = "has-[:focus-visible]:ring-blue-500", L = "has-[:focus-visible]:ring-red-500", R = "outline-hidden focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-blue-500 dark:focus-visible:outline-blue-400", z = {
10
36
  primary: {
11
37
  solid: "border-transparent bg-blue-600 text-white interactive:hover:bg-blue-700 interactive:active:bg-blue-800",
12
38
  outline: "border-blue-300 bg-transparent text-blue-700 interactive:hover:bg-blue-50 interactive:active:bg-blue-100 dark:border-blue-800 dark:text-blue-400 dark:interactive:hover:bg-blue-950/40 dark:interactive:active:bg-blue-950/60",
13
39
  ghost: "border-transparent bg-transparent text-blue-700 interactive:hover:bg-blue-50 interactive:active:bg-blue-100 dark:text-blue-400 dark:interactive:hover:bg-blue-950/40 dark:interactive:active:bg-blue-950/60",
14
40
  subtle: "border-transparent bg-blue-50 text-blue-700 interactive:hover:bg-blue-100 interactive:active:bg-blue-200 dark:bg-blue-500/10 dark:text-blue-400 dark:interactive:hover:bg-blue-500/20 dark:interactive:active:bg-blue-500/30",
41
+ pressedSolid: "border-transparent bg-blue-800 text-white ring-2 ring-inset ring-white interactive:hover:bg-blue-900 interactive:active:bg-blue-950",
15
42
  focusOutline: "focus-visible:outline-blue-500"
16
43
  },
17
44
  neutral: {
@@ -19,6 +46,7 @@ var w = "outline-hidden focus-visible:outline-2 focus-visible:outline-offset-2",
19
46
  outline: "border-gray-300 bg-transparent text-gray-700 interactive:hover:bg-gray-50 interactive:active:bg-gray-100 dark:border-gray-600 dark:text-gray-300 dark:interactive:hover:bg-gray-800/50 dark:interactive:active:bg-gray-800/80",
20
47
  ghost: "border-transparent bg-transparent text-gray-700 interactive:hover:bg-gray-100 interactive:active:bg-gray-200 dark:text-gray-300 dark:interactive:hover:bg-gray-700/50 dark:interactive:active:bg-gray-700/80",
21
48
  subtle: "border-transparent bg-gray-100 text-gray-700 interactive:hover:bg-gray-200 interactive:active:bg-gray-300 dark:bg-gray-700/50 dark:text-gray-300 dark:interactive:hover:bg-gray-600/50 dark:interactive:active:bg-gray-600/80",
49
+ pressedSolid: "border-transparent bg-gray-400 text-gray-900 ring-2 ring-inset ring-gray-900 interactive:hover:bg-gray-300 interactive:active:bg-gray-200 dark:bg-gray-400 dark:text-gray-900 dark:interactive:hover:bg-gray-300 dark:interactive:active:bg-gray-200",
22
50
  focusOutline: "focus-visible:outline-gray-500 dark:focus-visible:outline-gray-400"
23
51
  },
24
52
  danger: {
@@ -26,6 +54,7 @@ var w = "outline-hidden focus-visible:outline-2 focus-visible:outline-offset-2",
26
54
  outline: "border-red-300 bg-transparent text-red-700 interactive:hover:bg-red-50 interactive:active:bg-red-100 dark:border-red-800 dark:text-red-400 dark:interactive:hover:bg-red-950/40 dark:interactive:active:bg-red-950/60",
27
55
  ghost: "border-transparent bg-transparent text-red-700 interactive:hover:bg-red-50 interactive:active:bg-red-100 dark:text-red-400 dark:interactive:hover:bg-red-950/40 dark:interactive:active:bg-red-950/60",
28
56
  subtle: "border-transparent bg-red-50 text-red-700 interactive:hover:bg-red-100 interactive:active:bg-red-200 dark:bg-red-500/10 dark:text-red-400 dark:interactive:hover:bg-red-500/20 dark:interactive:active:bg-red-500/30",
57
+ pressedSolid: "border-transparent bg-red-800 text-white ring-2 ring-inset ring-white interactive:hover:bg-red-900 interactive:active:bg-red-950",
29
58
  focusOutline: "focus-visible:outline-red-500"
30
59
  },
31
60
  success: {
@@ -33,6 +62,7 @@ var w = "outline-hidden focus-visible:outline-2 focus-visible:outline-offset-2",
33
62
  outline: "border-green-300 bg-transparent text-green-700 interactive:hover:bg-green-50 interactive:active:bg-green-100 dark:border-green-800 dark:text-green-400 dark:interactive:hover:bg-green-950/40 dark:interactive:active:bg-green-950/60",
34
63
  ghost: "border-transparent bg-transparent text-green-700 interactive:hover:bg-green-50 interactive:active:bg-green-100 dark:text-green-400 dark:interactive:hover:bg-green-950/40 dark:interactive:active:bg-green-950/60",
35
64
  subtle: "border-transparent bg-green-50 text-green-700 interactive:hover:bg-green-100 interactive:active:bg-green-200 dark:bg-green-500/10 dark:text-green-400 dark:interactive:hover:bg-green-500/20 dark:interactive:active:bg-green-500/30",
65
+ pressedSolid: "border-transparent bg-green-900 text-white ring-2 ring-inset ring-white interactive:hover:bg-green-950 interactive:active:bg-green-950",
36
66
  focusOutline: "focus-visible:outline-green-600"
37
67
  },
38
68
  warning: {
@@ -40,64 +70,88 @@ var w = "outline-hidden focus-visible:outline-2 focus-visible:outline-offset-2",
40
70
  outline: "border-yellow-300 bg-transparent text-yellow-700 interactive:hover:bg-yellow-50 interactive:active:bg-yellow-100 dark:border-yellow-800 dark:text-yellow-400 dark:interactive:hover:bg-yellow-950/40 dark:interactive:active:bg-yellow-950/60",
41
71
  ghost: "border-transparent bg-transparent text-yellow-700 interactive:hover:bg-yellow-50 interactive:active:bg-yellow-100 dark:text-yellow-400 dark:interactive:hover:bg-yellow-950/40 dark:interactive:active:bg-yellow-950/60",
42
72
  subtle: "border-transparent bg-yellow-50 text-yellow-700 interactive:hover:bg-yellow-100 interactive:active:bg-yellow-200 dark:bg-yellow-500/10 dark:text-yellow-400 dark:interactive:hover:bg-yellow-500/20 dark:interactive:active:bg-yellow-500/30",
73
+ pressedSolid: "border-transparent bg-yellow-900 text-white ring-2 ring-inset ring-white interactive:hover:bg-yellow-950 interactive:active:bg-yellow-950",
43
74
  focusOutline: "focus-visible:outline-yellow-700 dark:focus-visible:outline-yellow-500"
44
75
  }
45
- }, j = "inline-flex items-center justify-center disabled:opacity-50 disabled:cursor-not-allowed aria-disabled:opacity-50 aria-disabled:cursor-not-allowed", M = `cursor-pointer transition-[color,background-color,border-color,transform] duration-200 interactive:active:duration-75 ms-button-press ${w}`, N = {
76
+ }, B = "inline-flex items-center justify-center disabled:opacity-50 disabled:cursor-not-allowed aria-disabled:opacity-50 aria-disabled:cursor-not-allowed", V = `cursor-pointer transition-[color,background-color,border-color,transform] duration-200 interactive:active:duration-75 ms-button-press ${N}`;
77
+ function H(e, t, n) {
78
+ let r = z[e];
79
+ return n ? r.pressedSolid : r[t];
80
+ }
81
+ // src/components/shared/radius.ts
82
+ var U = {
46
83
  none: "rounded-none",
47
84
  sm: "rounded-sm",
48
85
  md: "rounded-md",
49
86
  lg: "rounded-lg",
50
87
  xl: "rounded-xl",
51
88
  full: "rounded-full"
52
- }, P = {
53
- ...N,
54
- full: N.lg
55
- }, F = {
89
+ }, ee = {
90
+ ...U,
91
+ full: U.lg
92
+ }, W = {
56
93
  xs: "h-6 w-6 text-xs",
57
94
  sm: "h-8 w-8 text-sm",
58
95
  md: "h-10 w-10 text-base",
59
96
  lg: "h-12 w-12 text-xl"
60
- }, I = new Intl.Segmenter(void 0, { granularity: "grapheme" });
61
- function L(e) {
97
+ }, te = new Intl.Segmenter(void 0, { granularity: "grapheme" });
98
+ function ne(e) {
62
99
  let t = e.trim();
63
100
  if (t.length === 0) return "";
64
- let [n] = I.segment(t);
101
+ let [n] = te.segment(t);
65
102
  return n.segment.toUpperCase();
66
103
  }
67
- function ee({ name: t, src: n, size: r = "sm", color: i = "primary", radius: a = "full", unstyled: o = !1, className: s }) {
68
- let [c, l] = d(null), u = n !== void 0 && n !== c, f = t.trim().length > 0, m = u ? /* @__PURE__ */ p("img", {
69
- src: n,
104
+ function re({ name: t, src: r, size: i = "sm", color: a = "primary", radius: o = "full", unstyled: s = !1, className: c }) {
105
+ let [l, u] = h(null), d = r !== void 0 && r !== l, f = t.trim().length > 0, p = d ? /* @__PURE__ */ n("img", {
106
+ src: r,
70
107
  alt: "",
71
- onError: () => l(n ?? null),
108
+ onError: () => u(r ?? null),
72
109
  className: "h-full w-full object-cover"
73
- }) : /* @__PURE__ */ p("span", {
110
+ }) : /* @__PURE__ */ n("span", {
74
111
  "aria-hidden": "true",
75
- children: L(t)
112
+ children: ne(t)
76
113
  });
77
- return /* @__PURE__ */ p("span", {
114
+ return /* @__PURE__ */ n("span", {
78
115
  role: f ? "img" : void 0,
79
116
  "aria-label": f ? t : void 0,
80
117
  "aria-hidden": !f || void 0,
81
- className: e("inline-flex flex-shrink-0 items-center justify-center overflow-hidden", F[r], !o && N[a], !o && !u && ["border font-semibold", A[i].solid], s),
82
- children: m
118
+ className: e("inline-flex flex-shrink-0 items-center justify-center overflow-hidden", W[i], !s && U[o], !s && !d && ["border font-semibold", z[a].solid], c),
119
+ children: p
83
120
  });
84
121
  }
85
122
  // src/components/badge/badge.tsx
86
- var R = {
123
+ var ie = {
87
124
  xs: "px-1.5 py-0.5 text-xs",
88
125
  sm: "px-2.5 py-1 text-sm",
89
126
  md: "px-3 py-1 text-base",
90
127
  lg: "px-3.5 py-1.5 text-lg"
91
- }, z = ({ children: t, color: n = "primary", variant: r = "subtle", size: i = "sm", radius: a = "md", unstyled: o = !1, className: s, ...c }) => /* @__PURE__ */ p("span", {
92
- className: e("inline-flex items-center", !o && [
128
+ }, ae = ({ children: t, color: r = "primary", variant: i = "subtle", size: a = "sm", radius: o = "md", unstyled: s = !1, className: c, ...l }) => /* @__PURE__ */ n("span", {
129
+ className: e("inline-flex items-center", !s && [
93
130
  "gap-1 border",
94
- N[a],
95
- R[i],
96
- A[n][r]
97
- ], s),
98
- ...c,
131
+ U[o],
132
+ ie[a],
133
+ z[r][i]
134
+ ], c),
135
+ ...l,
99
136
  children: t
100
- }), B = n({
137
+ }), G = {
138
+ xs: "px-2 py-1 text-xs",
139
+ sm: "px-3 py-1.5 text-sm",
140
+ md: "px-4 py-2 text-sm",
141
+ lg: "px-4 py-3 text-base"
142
+ };
143
+ function K(t = {}) {
144
+ let { variant: n = "solid", color: r = "primary", size: i = "md", radius: a = "md", fullWidth: o = !1, pressed: s = !1, unstyled: c = !1, className: l } = t;
145
+ return e(B, !c && [
146
+ V,
147
+ "gap-2 font-medium border",
148
+ U[a],
149
+ G[i],
150
+ H(r, n, s),
151
+ z[r].focusOutline
152
+ ], o && "w-full", l);
153
+ }
154
+ var q = a({
101
155
  close: "Close",
102
156
  confirm: "Confirm",
103
157
  cancel: "Cancel",
@@ -108,6 +162,7 @@ var R = {
108
162
  required: "required",
109
163
  copied: "Copied",
110
164
  loading: "Loading",
165
+ copy: "Copy",
111
166
  charactersRemaining: (e) => `${e} ${e === 1 ? "character" : "characters"} remaining`,
112
167
  currentTheme: (e) => `Current theme: ${e}`,
113
168
  overflowCount: (e) => `+${e} more`,
@@ -115,170 +170,165 @@ var R = {
115
170
  maxSelectedHint: (e) => `You can select up to ${e} items`
116
171
  });
117
172
  // src/components/ui_provider/use_labels.ts
118
- function V() {
119
- return a(B);
173
+ function J() {
174
+ return c(q);
120
175
  }
121
176
  // src/components/button/button.tsx
122
- var H = {
123
- xs: "px-2 py-1 text-xs",
124
- sm: "px-3 py-1.5 text-sm",
125
- md: "px-4 py-2 text-sm",
126
- lg: "px-4 py-3 text-base"
127
- }, te = {
177
+ var oe = {
128
178
  xs: "w-3.5 h-3.5",
129
179
  sm: "w-4 h-4",
130
180
  md: "w-4 h-4",
131
181
  lg: "w-5 h-5"
132
182
  };
133
- function U(t) {
134
- let { unstyled: n = !1, variant: r = "solid", color: i = "primary", size: a = "md", radius: o = "md", children: s, className: c, fullWidth: l = !1, loading: u = !1, startIcon: d, endIcon: f, disabled: h, onClick: g, "aria-label": _, ...v } = t, y = V(), b = _ !== void 0, x = u && b ? `${_} ${y.loading}` : _, S = A[i], C = te[a], w = (e) => {
135
- u ? e.preventDefault() : g?.(e);
183
+ function Y(t) {
184
+ let { unstyled: i = !1, variant: a = "solid", color: o = "primary", size: s = "md", radius: c = "md", children: l, className: u, fullWidth: d = !1, loading: f = !1, pressed: p, startIcon: m, endIcon: h, disabled: g, onClick: _, "aria-label": v, ...y } = t, b = J(), x = v !== void 0, S = f && x ? `${v} ${b.loading}` : v, C = oe[s], w = (e) => {
185
+ f ? e.preventDefault() : _?.(e);
136
186
  };
137
- return /* @__PURE__ */ m("button", {
187
+ return /* @__PURE__ */ r("button", {
138
188
  type: "button",
139
- className: e(j, !n && [
140
- M,
141
- "gap-2 font-medium border",
142
- N[o],
143
- H[a],
144
- S[r],
145
- S.focusOutline
146
- ], l && "w-full", c),
147
- disabled: h,
148
- "aria-disabled": u && !h || void 0,
149
- "aria-busy": u || void 0,
150
- "aria-label": x,
151
- ...v,
189
+ className: K({
190
+ variant: a,
191
+ color: o,
192
+ size: s,
193
+ radius: c,
194
+ fullWidth: d,
195
+ pressed: p,
196
+ unstyled: i,
197
+ className: u
198
+ }),
199
+ disabled: g,
200
+ "aria-disabled": f && !g || void 0,
201
+ "aria-busy": f || void 0,
202
+ "aria-pressed": p,
203
+ "aria-label": S,
204
+ ...y,
152
205
  onClick: w,
153
206
  children: [
154
- u && /* @__PURE__ */ p("span", {
207
+ f && /* @__PURE__ */ n("span", {
155
208
  className: e("i-svg-spinners-3-dots-fade", C),
156
209
  "aria-hidden": "true"
157
210
  }),
158
- !u && d && /* @__PURE__ */ p("span", {
159
- className: e(d, C),
211
+ !f && m && /* @__PURE__ */ n("span", {
212
+ className: e(m, C),
160
213
  "aria-hidden": "true"
161
214
  }),
162
- s,
163
- u && !b && /* @__PURE__ */ p("span", {
215
+ l,
216
+ f && !x && /* @__PURE__ */ n("span", {
164
217
  className: "sr-only",
165
- children: y.loading
218
+ children: b.loading
166
219
  }),
167
- !u && f && /* @__PURE__ */ p("span", {
168
- className: e(f, C),
220
+ !f && h && /* @__PURE__ */ n("span", {
221
+ className: e(h, C),
169
222
  "aria-hidden": "true"
170
223
  })
171
224
  ]
172
225
  });
173
226
  }
174
227
  // src/components/card/card_header.tsx
175
- var ne = {
228
+ var X = {
176
229
  2: "h2",
177
230
  3: "h3",
178
231
  4: "h4"
179
232
  };
180
- function re({ title: e, titleId: t, level: n, description: r, actions: i }) {
181
- let a = ne[n];
182
- return /* @__PURE__ */ m("div", {
233
+ function se({ title: e, titleId: t, level: i, description: a, actions: o }) {
234
+ let s = X[i];
235
+ return /* @__PURE__ */ r("div", {
183
236
  className: "mb-4",
184
- children: [/* @__PURE__ */ m("div", {
237
+ children: [/* @__PURE__ */ r("div", {
185
238
  className: "flex items-center justify-between gap-4",
186
- children: [/* @__PURE__ */ p(a, {
239
+ children: [/* @__PURE__ */ n(s, {
187
240
  id: t,
188
241
  className: "text-lg font-medium text-gray-900 dark:text-gray-100",
189
242
  children: e
190
- }), i]
191
- }), r && /* @__PURE__ */ p("p", {
243
+ }), o]
244
+ }), a && /* @__PURE__ */ n("p", {
192
245
  className: "mt-1 text-sm text-gray-500 dark:text-gray-400",
193
- children: r
246
+ children: a
194
247
  })]
195
248
  });
196
249
  }
197
- // src/components/shared/surface_tokens.ts
198
- var ie = "border-gray-300 dark:border-gray-600", W = "bg-white dark:bg-gray-800", ae = "border-gray-200 dark:border-gray-700", G = "[scrollbar-color:theme(colors.gray.300)_transparent] hover:[scrollbar-color:theme(colors.gray.400)_transparent] dark:[scrollbar-color:theme(colors.gray.600)_transparent] dark:hover:[scrollbar-color:theme(colors.gray.500)_transparent]", K = `[scrollbar-width:thin] ${G}`;
199
- `${G}`;
200
250
  // src/components/card/card.tsx
201
- var q = {
251
+ var ce = {
202
252
  none: "",
203
253
  sm: "p-4",
204
254
  md: "p-6",
205
255
  lg: "p-8"
206
256
  };
207
- function oe({ children: t, title: n, description: r, actions: i, headingLevel: a = 2, padding: o = "md", radius: c = "lg", unstyled: l = !1, className: u }) {
208
- let d = s(), f = !!n;
209
- return /* @__PURE__ */ m("div", {
210
- role: f ? "region" : void 0,
211
- "aria-labelledby": f ? d : void 0,
212
- className: e(!l && [
257
+ function le({ children: t, title: i, description: a, actions: o, headingLevel: s = 2, padding: c = "md", radius: l = "lg", unstyled: u = !1, className: f }) {
258
+ let p = d(), m = !!i;
259
+ return /* @__PURE__ */ r("div", {
260
+ role: m ? "region" : void 0,
261
+ "aria-labelledby": m ? p : void 0,
262
+ className: e(!u && [
213
263
  "border",
214
264
  "bg-white dark:bg-gray-800",
215
265
  "border-gray-200 dark:border-gray-700",
216
- N[c],
217
- q[o]
218
- ], u),
219
- children: [f && /* @__PURE__ */ p(re, {
220
- title: n,
221
- titleId: d,
222
- level: a,
223
- description: r,
224
- actions: i
266
+ U[l],
267
+ ce[c]
268
+ ], f),
269
+ children: [m && /* @__PURE__ */ n(se, {
270
+ title: i,
271
+ titleId: p,
272
+ level: s,
273
+ description: a,
274
+ actions: o
225
275
  }), t]
226
276
  });
227
277
  }
228
278
  // src/components/character_count/character_count.tsx
229
- var se = "text-xs text-gray-500 dark:text-gray-400 mt-1 text-right", J = .1;
230
- function ce(e, t) {
279
+ var ue = "text-xs text-gray-500 dark:text-gray-400 mt-1 text-right", de = .1;
280
+ function fe(e, t) {
231
281
  if (t === void 0) return "ok";
232
282
  let n = t - e;
233
- return n <= 0 ? "empty" : n <= Math.max(1, Math.ceil(t * J)) ? "low" : "ok";
283
+ return n <= 0 ? "empty" : n <= Math.max(1, Math.ceil(t * de)) ? "low" : "ok";
234
284
  }
235
- function Y(e, t) {
285
+ function Z(e, t) {
236
286
  return t ? "" : e === "overLimit" ? "text-red-600 dark:text-red-400" : e === "atLimit" ? "text-amber-700 dark:text-amber-400" : "";
237
287
  }
238
- function le({ current: t, min: n, max: r, showMin: i, showMax: a, unstyled: o = !1, id: s, className: c }) {
239
- let l = V(), u = ce(t, r), [h, g] = d({
240
- zone: u,
288
+ function pe({ current: i, min: a, max: o, showMin: s, showMax: c, unstyled: l = !1, id: u, className: d }) {
289
+ let f = J(), p = fe(i, o), [m, g] = h({
290
+ zone: p,
241
291
  message: ""
242
292
  });
243
- if (h.zone !== u) {
244
- let e = Math.max(0, (r ?? 0) - t);
293
+ if (m.zone !== p) {
294
+ let e = Math.max(0, (o ?? 0) - i);
245
295
  g({
246
- zone: u,
247
- message: u === "ok" ? "" : l.charactersRemaining(e)
296
+ zone: p,
297
+ message: p === "ok" ? "" : f.charactersRemaining(e)
248
298
  });
249
299
  }
250
- let _ = i === !0 || a === !0, v = n !== void 0 && t <= n ? "atLimit" : "ok", y = r !== void 0 && t > r ? "overLimit" : r !== void 0 && t >= r ? "atLimit" : "ok", b = _ ? `${t}/${n} min` : `${t} (min ${n})`, x = _ ? `${t}/${r} max` : `${t}/${r}`;
251
- return /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ m("div", {
252
- id: s,
253
- className: e(!o && se, c),
300
+ let _ = s === !0 || c === !0, v = a !== void 0 && i <= a ? "atLimit" : "ok", y = o !== void 0 && i > o ? "overLimit" : o !== void 0 && i >= o ? "atLimit" : "ok", b = _ ? `${i}/${a} min` : `${i} (min ${a})`, x = _ ? `${i}/${o} max` : `${i}/${o}`;
301
+ return /* @__PURE__ */ r(t, { children: [/* @__PURE__ */ r("div", {
302
+ id: u,
303
+ className: e(!l && ue, d),
254
304
  children: [
255
- i && n !== void 0 && /* @__PURE__ */ p("span", {
256
- className: Y(v, o),
305
+ s && a !== void 0 && /* @__PURE__ */ n("span", {
306
+ className: Z(v, l),
257
307
  children: b
258
308
  }),
259
- i && a && " · ",
260
- a && r !== void 0 && /* @__PURE__ */ p("span", {
261
- className: Y(y, o),
309
+ s && c && " · ",
310
+ c && o !== void 0 && /* @__PURE__ */ n("span", {
311
+ className: Z(y, l),
262
312
  children: x
263
313
  }),
264
- !i && !a && r !== void 0 && /* @__PURE__ */ p("span", {
265
- className: Y(y, o),
314
+ !s && !c && o !== void 0 && /* @__PURE__ */ n("span", {
315
+ className: Z(y, l),
266
316
  children: x
267
317
  }),
268
- !i && !a && n !== void 0 && r === void 0 && /* @__PURE__ */ p("span", {
269
- className: Y(v, o),
318
+ !s && !c && a !== void 0 && o === void 0 && /* @__PURE__ */ n("span", {
319
+ className: Z(v, l),
270
320
  children: b
271
321
  })
272
322
  ]
273
- }), /* @__PURE__ */ p("span", {
323
+ }), /* @__PURE__ */ n("span", {
274
324
  "aria-live": "polite",
275
325
  className: "sr-only",
276
- children: h.message
326
+ children: m.message
277
327
  })] });
278
328
  }
279
329
  // src/components/shared/checkmark_icon.tsx
280
- function ue() {
281
- return /* @__PURE__ */ p("svg", {
330
+ function me() {
331
+ return /* @__PURE__ */ n("svg", {
282
332
  className: "h-3 w-3 text-white",
283
333
  viewBox: "0 0 12 12",
284
334
  fill: "none",
@@ -286,19 +336,19 @@ function ue() {
286
336
  strokeWidth: "2.5",
287
337
  strokeLinecap: "round",
288
338
  strokeLinejoin: "round",
289
- children: /* @__PURE__ */ p("polyline", { points: "2 6 5 9 10 3" })
339
+ children: /* @__PURE__ */ n("polyline", { points: "2 6 5 9 10 3" })
290
340
  });
291
341
  }
292
342
  // src/components/shared/dash_icon.tsx
293
- function de() {
294
- return /* @__PURE__ */ p("svg", {
343
+ function he() {
344
+ return /* @__PURE__ */ n("svg", {
295
345
  className: "h-3 w-3 text-white",
296
346
  viewBox: "0 0 12 12",
297
347
  fill: "none",
298
348
  stroke: "currentColor",
299
349
  strokeWidth: "2.5",
300
350
  strokeLinecap: "round",
301
- children: /* @__PURE__ */ p("line", {
351
+ children: /* @__PURE__ */ n("line", {
302
352
  x1: "2.5",
303
353
  y1: "6",
304
354
  x2: "9.5",
@@ -306,63 +356,63 @@ function de() {
306
356
  })
307
357
  });
308
358
  }
309
- var fe = `w-full border ${ie} ${W} text-gray-900 dark:text-gray-100 placeholder-gray-500 dark:placeholder-gray-400 ${T} transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed`, pe = "text-sm font-medium text-gray-700 dark:text-gray-300", me = "text-red-500 dark:text-red-400 ml-1", he = "text-xs text-gray-600 dark:text-gray-400", ge = "text-xs text-red-600 dark:text-red-400", _e = "border-red-500 dark:border-red-400", ve = ({ id: t, description: n, className: r }) => n ? typeof n == "string" ? /* @__PURE__ */ p("p", {
359
+ var ge = `w-full border ${T} ${E} text-gray-900 dark:text-gray-100 placeholder-gray-500 dark:placeholder-gray-400 ${P} transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed`, _e = "text-sm font-medium text-gray-700 dark:text-gray-300", ve = "text-red-500 dark:text-red-400 ml-1", ye = "text-xs text-gray-600 dark:text-gray-400", be = "text-xs text-red-600 dark:text-red-400", xe = "border-red-500 dark:border-red-400", Se = ({ id: t, description: r, className: i }) => r ? typeof r == "string" ? /* @__PURE__ */ n("p", {
310
360
  id: t,
311
- className: e(he, r),
312
- children: n
313
- }) : /* @__PURE__ */ p("span", {
361
+ className: e(ye, i),
362
+ children: r
363
+ }) : /* @__PURE__ */ n("span", {
314
364
  id: t,
315
- className: e(he, "block", r),
316
- children: n
317
- }) : null, ye = n(!0);
318
- function be() {
319
- return a(ye);
365
+ className: e(ye, "block", i),
366
+ children: r
367
+ }) : null, Ce = a(!0);
368
+ function we() {
369
+ return c(Ce);
320
370
  }
321
371
  // src/components/shared/field_error.tsx
322
- var X = ({ id: t, error: n, className: r }) => {
323
- let i = be();
324
- return n ? /* @__PURE__ */ p("p", {
372
+ var Te = ({ id: t, error: r, className: i }) => {
373
+ let a = we();
374
+ return r ? /* @__PURE__ */ n("p", {
325
375
  id: t,
326
- className: e(ge, r),
327
- role: i ? "alert" : void 0,
328
- children: n
376
+ className: e(be, i),
377
+ role: a ? "alert" : void 0,
378
+ children: r
329
379
  }) : null;
330
380
  };
331
381
  // src/components/shared/join_ids.ts
332
- function Z(...e) {
382
+ function Q(...e) {
333
383
  return e.filter(Boolean).join(" ") || void 0;
334
384
  }
335
385
  // src/components/shared/option_card_styles.ts
336
- function xe(t) {
386
+ function Ee(t) {
337
387
  let { isSelected: n, isError: r, isDisabled: i, radius: a, unstyled: o } = t;
338
- return e("relative flex cursor-pointer items-start gap-3 transition-colors duration-150", E, r ? O : D, !o && [
339
- N[a],
388
+ return e("relative flex cursor-pointer items-start gap-3 transition-colors duration-150", F, r ? L : I, !o && [
389
+ U[a],
340
390
  "border px-3 py-2.5",
341
391
  n ? r ? e("border-red-500 dark:border-red-400", "bg-red-50 dark:bg-red-950/20") : "border-blue-500 bg-blue-50 dark:border-blue-500 dark:bg-blue-950/25" : r ? "border-red-300 bg-white dark:border-red-800/50 dark:bg-gray-800/50" : e("border-gray-200 dark:border-gray-700", "bg-gray-50 hover:border-gray-300 hover:bg-white dark:bg-gray-800/50 dark:hover:border-gray-600 dark:hover:bg-gray-800")
342
392
  ], i && "cursor-not-allowed opacity-50");
343
393
  }
344
- function Se(e) {
394
+ function De(e) {
345
395
  let { isSelected: t, isError: n } = e;
346
- return t ? n ? _e : "border-blue-600 dark:border-blue-500" : n ? "border-red-400 dark:border-red-600" : ie;
396
+ return t ? n ? xe : "border-blue-600 dark:border-blue-500" : n ? "border-red-400 dark:border-red-600" : T;
347
397
  }
348
398
  // src/components/shared/required_mark.tsx
349
- function Q() {
350
- return /* @__PURE__ */ p("span", {
351
- className: me,
399
+ function Oe() {
400
+ return /* @__PURE__ */ n("span", {
401
+ className: ve,
352
402
  "aria-hidden": "true",
353
403
  children: "*"
354
404
  });
355
405
  }
356
406
  // src/components/shared/use_controlled_state.ts
357
- function Ce(e, t) {
358
- let [n, r] = d(t), a = e !== void 0, o = i((e) => {
359
- a || r(e);
360
- }, [a]);
361
- return [a ? e : n, o];
407
+ function ke(e, t) {
408
+ let [n, r] = h(t), i = e !== void 0, a = s((e) => {
409
+ i || r(e);
410
+ }, [i]);
411
+ return [i ? e : n, a];
362
412
  }
363
413
  // src/components/shared/use_field_ids.ts
364
414
  function $(e) {
365
- let t = s(), n = e ?? t;
415
+ let t = d(), n = e ?? t;
366
416
  return {
367
417
  fieldId: n,
368
418
  errorId: `${n}-error`,
@@ -372,9 +422,9 @@ function $(e) {
372
422
  };
373
423
  }
374
424
  // src/components/shared/use_warn_unnamed.ts
375
- var we = "needs an accessible name. Provide a `label`, `aria-label` or `aria-labelledby` prop.";
376
- function Te(e, t, n = we) {
377
- o(() => {
425
+ var Ae = "needs an accessible name. Provide a `label`, `aria-label` or `aria-labelledby` prop.";
426
+ function je(e, t, n = Ae) {
427
+ l(() => {
378
428
  process.env.NODE_ENV === "production" || t || console.warn(`${e}: ${n}`);
379
429
  }, [
380
430
  e,
@@ -383,114 +433,114 @@ function Te(e, t, n = we) {
383
433
  ]);
384
434
  }
385
435
  // src/lib/merge_refs.ts
386
- function Ee(...e) {
436
+ function Me(...e) {
387
437
  return (t) => {
388
438
  for (let n of e) typeof n == "function" ? n(t) : n && (n.current = t);
389
439
  };
390
440
  }
391
441
  // src/components/checkbox/checkbox.tsx
392
- function De(e, t, n) {
393
- return e === void 0 ? null : typeof e == "string" ? /* @__PURE__ */ m("span", {
394
- className: t,
395
- children: [e, n && /* @__PURE__ */ p(Q, {})]
396
- }) : /* @__PURE__ */ m(f, { children: [e, n && /* @__PURE__ */ p(Q, {})] });
397
- }
398
- function Oe({ label: t, indeterminate: n = !1, description: r, error: i, radius: a = "sm", unstyled: s = !1, fullWidth: c = !1, variant: d = "inline", className: f, wrapperClassName: h, checked: g, defaultChecked: _ = !1, onChange: v, id: y, "aria-describedby": b, "aria-label": x, "aria-labelledby": S, ref: C, ...w }) {
399
- let { fieldId: T, errorId: E, descriptionId: D } = $(y), [O, k] = Ce(g, _), A = u(null), j = d === "card", M = O || n, P = Z(b, !!r && D, i && E);
400
- Te("Checkbox", !!t || !!x?.trim() || !!S?.trim());
401
- let F = l(() => Ee(A, C), [C]);
402
- o(() => {
403
- A.current && (A.current.indeterminate = n);
442
+ function Ne(e, i, a) {
443
+ return e === void 0 ? null : typeof e == "string" ? /* @__PURE__ */ r("span", {
444
+ className: i,
445
+ children: [e, a && /* @__PURE__ */ n(Oe, {})]
446
+ }) : /* @__PURE__ */ r(t, { children: [e, a && /* @__PURE__ */ n(Oe, {})] });
447
+ }
448
+ function Pe({ label: t, indeterminate: i = !1, description: a, error: o, radius: s = "sm", unstyled: c = !1, fullWidth: u = !1, variant: d = "inline", className: f, wrapperClassName: h, checked: g, defaultChecked: _ = !1, onChange: v, id: y, "aria-describedby": b, "aria-label": x, "aria-labelledby": S, ref: C, ...w }) {
449
+ let { fieldId: T, errorId: E, descriptionId: D } = $(y), [O, k] = ke(g, _), A = m(null), j = d === "card", M = O || i, N = Q(b, !!a && D, o && E);
450
+ je("Checkbox", !!t || !!x?.trim() || !!S?.trim());
451
+ let P = p(() => Me(A, C), [C]);
452
+ l(() => {
453
+ A.current && (A.current.indeterminate = i);
404
454
  });
405
- let I = (e) => {
406
- e.target.indeterminate = n, k(e.target.checked), v?.(e);
407
- }, L = j ? xe({
455
+ let F = (e) => {
456
+ e.target.indeterminate = i, k(e.target.checked), v?.(e);
457
+ }, I = j ? Ee({
408
458
  isSelected: M,
409
- isError: !!i,
459
+ isError: !!o,
410
460
  isDisabled: w.disabled === !0,
411
- radius: a,
412
- unstyled: s
413
- }) : e("flex items-start gap-3 cursor-pointer", w.disabled && "cursor-not-allowed opacity-50"), ee = j ? e("select-none text-sm font-medium", M ? i ? "text-red-700 dark:text-red-300" : "text-blue-700 dark:text-blue-300" : "text-gray-700 dark:text-gray-300") : e(pe, "select-none"), R = e("relative shrink-0", N[a], !j && ["has-[:focus-visible]:outline-hidden has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-offset-2 has-[:focus-visible]:ring-offset-white dark:has-[:focus-visible]:ring-offset-gray-900", i ? "has-[:focus-visible]:ring-red-500" : "has-[:focus-visible]:ring-blue-500"]), z = De(t, ee, w.required === !0);
414
- return /* @__PURE__ */ m("div", {
415
- className: e(c ? "w-full" : "w-fit", h),
461
+ radius: s,
462
+ unstyled: c
463
+ }) : e("flex items-start gap-3 cursor-pointer", w.disabled && "cursor-not-allowed opacity-50"), L = j ? e("select-none text-sm font-medium", M ? o ? "text-red-700 dark:text-red-300" : "text-blue-700 dark:text-blue-300" : "text-gray-700 dark:text-gray-300") : e(_e, "select-none"), R = e("relative shrink-0", U[s], !j && ["has-[:focus-visible]:outline-hidden has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-offset-2 has-[:focus-visible]:ring-offset-white dark:has-[:focus-visible]:ring-offset-gray-900", o ? "has-[:focus-visible]:ring-red-500" : "has-[:focus-visible]:ring-blue-500"]), z = Ne(t, L, w.required === !0);
464
+ return /* @__PURE__ */ r("div", {
465
+ className: e(u ? "w-full" : "w-fit", h),
416
466
  children: [
417
- /* @__PURE__ */ m("label", {
467
+ /* @__PURE__ */ r("label", {
418
468
  htmlFor: T,
419
- className: L,
420
- children: [/* @__PURE__ */ m("span", {
469
+ className: I,
470
+ children: [/* @__PURE__ */ r("span", {
421
471
  className: R,
422
- children: [/* @__PURE__ */ p("input", {
472
+ children: [/* @__PURE__ */ n("input", {
423
473
  type: "checkbox",
424
- ref: F,
474
+ ref: P,
425
475
  id: T,
426
476
  className: "sr-only",
427
477
  checked: O,
428
- onChange: I,
429
- "aria-invalid": !!i,
430
- "aria-describedby": P,
478
+ onChange: F,
479
+ "aria-invalid": !!o,
480
+ "aria-describedby": N,
431
481
  "aria-label": x,
432
482
  "aria-labelledby": S,
433
483
  ...w
434
- }), /* @__PURE__ */ p("span", {
435
- className: e("flex h-5 w-5 items-center justify-center transition-all duration-200", !s && [
436
- N[a],
484
+ }), /* @__PURE__ */ n("span", {
485
+ className: e("flex h-5 w-5 items-center justify-center transition-all duration-200", !c && [
486
+ U[s],
437
487
  "border-2",
438
488
  M ? e("border-blue-600 dark:border-blue-500", "bg-blue-600 dark:bg-blue-500") : e("border-gray-300 dark:border-gray-600", "bg-white dark:bg-gray-800"),
439
- i && "border-red-500 dark:border-red-400"
489
+ o && "border-red-500 dark:border-red-400"
440
490
  ], f),
441
491
  "aria-hidden": !0,
442
- children: n ? /* @__PURE__ */ p(de, {}) : O && /* @__PURE__ */ p(ue, {})
492
+ children: i ? /* @__PURE__ */ n(he, {}) : O && /* @__PURE__ */ n(me, {})
443
493
  })]
444
- }), j ? /* @__PURE__ */ m("span", {
494
+ }), j ? /* @__PURE__ */ r("span", {
445
495
  className: "flex min-w-0 flex-col",
446
- children: [z, r && /* @__PURE__ */ p("span", {
496
+ children: [z, a && /* @__PURE__ */ n("span", {
447
497
  id: D,
448
498
  className: e("text-xs text-gray-600 dark:text-gray-400", "mt-0.5"),
449
499
  "aria-hidden": "true",
450
- children: r
500
+ children: a
451
501
  })]
452
502
  }) : z]
453
503
  }),
454
- !j && /* @__PURE__ */ p(ve, {
504
+ !j && /* @__PURE__ */ n(Se, {
455
505
  id: D,
456
- description: r,
506
+ description: a,
457
507
  className: "mt-1 ml-8"
458
508
  }),
459
- /* @__PURE__ */ p(X, {
509
+ /* @__PURE__ */ n(Te, {
460
510
  id: E,
461
- error: i,
511
+ error: o,
462
512
  className: j ? "mt-1" : "mt-1 ml-8"
463
513
  })
464
514
  ]
465
515
  });
466
516
  }
467
517
  // src/components/shared/option_row.tsx
468
- function ke({ item: t, htmlFor: n, descriptionId: r, orientation: i, isSelected: a, isDisabled: o, isError: s, radius: c, unstyled: l, className: u, control: d, indicator: f }) {
469
- return /* @__PURE__ */ m("label", {
470
- htmlFor: n,
471
- className: e(xe({
472
- isSelected: a,
473
- isError: s,
474
- isDisabled: o,
475
- radius: c,
476
- unstyled: l
477
- }), i === "horizontal" && "flex-1", u),
518
+ function Fe({ item: t, htmlFor: i, descriptionId: a, orientation: o, isSelected: s, isDisabled: c, isError: l, radius: u, unstyled: d, className: f, control: p, indicator: m }) {
519
+ return /* @__PURE__ */ r("label", {
520
+ htmlFor: i,
521
+ className: e(Ee({
522
+ isSelected: s,
523
+ isError: l,
524
+ isDisabled: c,
525
+ radius: u,
526
+ unstyled: d
527
+ }), o === "horizontal" && "flex-1", f),
478
528
  children: [
479
- d,
480
- f,
481
- /* @__PURE__ */ m("span", {
529
+ p,
530
+ m,
531
+ /* @__PURE__ */ r("span", {
482
532
  className: "flex min-w-0 flex-col",
483
- children: [/* @__PURE__ */ m("span", {
533
+ children: [/* @__PURE__ */ r("span", {
484
534
  className: "flex items-center gap-1.5",
485
- children: [t.icon && /* @__PURE__ */ p("span", {
486
- className: e(t.icon, "h-4 w-4 shrink-0", a ? s ? "text-red-600 dark:text-red-400" : "text-blue-600 dark:text-blue-400" : "text-gray-500 dark:text-gray-400"),
535
+ children: [t.icon && /* @__PURE__ */ n("span", {
536
+ className: e(t.icon, "h-4 w-4 shrink-0", s ? l ? "text-red-600 dark:text-red-400" : "text-blue-600 dark:text-blue-400" : "text-gray-500 dark:text-gray-400"),
487
537
  "aria-hidden": !0
488
- }), /* @__PURE__ */ p("span", {
489
- className: e("select-none text-sm font-medium", a ? s ? "text-red-700 dark:text-red-300" : "text-blue-700 dark:text-blue-300" : "text-gray-700 dark:text-gray-300"),
538
+ }), /* @__PURE__ */ n("span", {
539
+ className: e("select-none text-sm font-medium", s ? l ? "text-red-700 dark:text-red-300" : "text-blue-700 dark:text-blue-300" : "text-gray-700 dark:text-gray-300"),
490
540
  children: t.label
491
541
  })]
492
- }), t.description && /* @__PURE__ */ p("span", {
493
- id: r,
542
+ }), t.description && /* @__PURE__ */ n("span", {
543
+ id: a,
494
544
  className: e("text-xs text-gray-600 dark:text-gray-400", "mt-0.5"),
495
545
  "aria-hidden": "true",
496
546
  children: t.description
@@ -500,96 +550,96 @@ function ke({ item: t, htmlFor: n, descriptionId: r, orientation: i, isSelected:
500
550
  });
501
551
  }
502
552
  // src/components/checkbox_options/checkbox_option_row.tsx
503
- function Ae({ option: t, optionId: n, descriptionId: r, name: i, orientation: a, isSelected: o, isDisabled: s, error: c, radius: l, unstyled: u, className: d, onToggle: f }) {
504
- let m = !!c;
505
- return /* @__PURE__ */ p(ke, {
553
+ function Ie({ option: t, optionId: r, descriptionId: i, name: a, orientation: o, isSelected: s, isDisabled: c, error: l, radius: u, unstyled: d, className: f, onToggle: p }) {
554
+ let m = !!l;
555
+ return /* @__PURE__ */ n(Fe, {
506
556
  item: t,
507
- htmlFor: n,
508
- descriptionId: r,
509
- orientation: a,
510
- isSelected: o,
511
- isDisabled: s,
557
+ htmlFor: r,
558
+ descriptionId: i,
559
+ orientation: o,
560
+ isSelected: s,
561
+ isDisabled: c,
512
562
  isError: m,
513
- radius: l,
514
- unstyled: u,
515
- className: d,
516
- control: /* @__PURE__ */ p("input", {
563
+ radius: u,
564
+ unstyled: d,
565
+ className: f,
566
+ control: /* @__PURE__ */ n("input", {
517
567
  type: "checkbox",
518
- id: n,
519
- name: i,
568
+ id: r,
569
+ name: a,
520
570
  value: t.value,
521
- checked: o,
522
- onChange: () => f(t.value),
523
- disabled: s,
524
- "aria-invalid": c ? !0 : void 0,
525
- "aria-describedby": t.description ? r : void 0,
571
+ checked: s,
572
+ onChange: () => p(t.value),
573
+ disabled: c,
574
+ "aria-invalid": l ? !0 : void 0,
575
+ "aria-describedby": t.description ? i : void 0,
526
576
  className: "sr-only"
527
577
  }),
528
- indicator: /* @__PURE__ */ p("span", {
529
- className: e("mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center border-2 transition-colors duration-150", N.sm, Se({
530
- isSelected: o,
578
+ indicator: /* @__PURE__ */ n("span", {
579
+ className: e("mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center border-2 transition-colors duration-150", U.sm, De({
580
+ isSelected: s,
531
581
  isError: m
532
- }), o && (m ? "bg-red-500 dark:bg-red-400" : "bg-blue-600 dark:bg-blue-500")),
582
+ }), s && (m ? "bg-red-500 dark:bg-red-400" : "bg-blue-600 dark:bg-blue-500")),
533
583
  "aria-hidden": !0,
534
- children: o && /* @__PURE__ */ p(ue, {})
584
+ children: s && /* @__PURE__ */ n(me, {})
535
585
  })
536
586
  });
537
587
  }
538
588
  // src/components/checkbox_options/checkbox_options.tsx
539
- function je(e, t, n) {
589
+ function Le(e, t, n) {
540
590
  let r = t.includes(n) ? t.filter((e) => e !== n) : [...t, n];
541
591
  return e.map((e) => e.value).filter((e) => r.includes(e));
542
592
  }
543
- function Me({ options: t, orientation: n = "vertical", values: r, defaultValues: i, onChange: a, name: o, label: s, error: c, required: l, requiredLabel: u, disabled: d, radius: h = "lg", unstyled: g = !1, className: _, wrapperClassName: v, id: y, "aria-describedby": b, ...x }) {
544
- let S = V(), { fieldId: C, errorId: w } = $(y), T = o ?? C, [E, D] = Ce(r, i ?? []), O = t.map((e) => typeof e == "string" ? {
593
+ function Re({ options: i, orientation: a = "vertical", values: o, defaultValues: s, onChange: c, name: l, label: u, error: d, required: f, requiredLabel: p, disabled: m, radius: h = "lg", unstyled: g = !1, className: _, wrapperClassName: v, id: y, "aria-describedby": b, ...x }) {
594
+ let S = J(), { fieldId: C, errorId: w } = $(y), T = l ?? C, [E, D] = ke(o, s ?? []), O = i.map((e) => typeof e == "string" ? {
545
595
  value: e,
546
596
  label: e
547
597
  } : e), k = (e) => {
548
- let t = je(O, E, e);
549
- D(t), a?.(t);
598
+ let t = Le(O, E, e);
599
+ D(t), c?.(t);
550
600
  };
551
- return /* @__PURE__ */ m("fieldset", {
601
+ return /* @__PURE__ */ r("fieldset", {
552
602
  className: e("m-0 border-0 p-0", v),
553
- disabled: d,
554
- "aria-describedby": Z(b, c && w),
603
+ disabled: m,
604
+ "aria-describedby": Q(b, d && w),
555
605
  ...x,
556
606
  children: [
557
- s && /* @__PURE__ */ m("legend", {
607
+ u && /* @__PURE__ */ r("legend", {
558
608
  className: e("text-sm font-medium text-gray-700 dark:text-gray-300", "mb-2"),
559
- children: [s, l && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(Q, {}), /* @__PURE__ */ p("span", {
609
+ children: [u, f && /* @__PURE__ */ r(t, { children: [/* @__PURE__ */ n(Oe, {}), /* @__PURE__ */ n("span", {
560
610
  className: "sr-only",
561
- children: ` (${u ?? S.required})`
611
+ children: ` (${p ?? S.required})`
562
612
  })] })]
563
613
  }),
564
- /* @__PURE__ */ p("div", {
565
- className: e(n === "horizontal" ? "flex flex-row gap-2" : "flex flex-col gap-2"),
566
- children: O.map((e, t) => /* @__PURE__ */ p(Ae, {
614
+ /* @__PURE__ */ n("div", {
615
+ className: e(a === "horizontal" ? "flex flex-row gap-2" : "flex flex-col gap-2"),
616
+ children: O.map((e, t) => /* @__PURE__ */ n(Ie, {
567
617
  option: e,
568
618
  optionId: `${C}-${t}`,
569
619
  descriptionId: `${C}-${t}-desc`,
570
620
  name: T,
571
- orientation: n,
621
+ orientation: a,
572
622
  isSelected: E.includes(e.value),
573
- isDisabled: d === !0 || e.disabled === !0,
574
- error: c,
623
+ isDisabled: m === !0 || e.disabled === !0,
624
+ error: d,
575
625
  radius: h,
576
626
  unstyled: g,
577
627
  className: _,
578
628
  onToggle: k
579
629
  }, e.value))
580
630
  }),
581
- /* @__PURE__ */ p(X, {
631
+ /* @__PURE__ */ n(Te, {
582
632
  id: w,
583
- error: c,
633
+ error: d,
584
634
  className: "mt-2"
585
635
  })
586
636
  ]
587
637
  });
588
638
  }
589
639
  // src/hooks/use_is_client/use_is_client.tsx
590
- var Ne = () => {
591
- let [e, t] = d(!1);
592
- return o(() => {
640
+ var ze = () => {
641
+ let [e, t] = h(!1);
642
+ return l(() => {
593
643
  let e = requestAnimationFrame(() => {
594
644
  t(!0);
595
645
  });
@@ -599,197 +649,201 @@ var Ne = () => {
599
649
  }, []), e;
600
650
  };
601
651
  // src/components/client_only/client_only.tsx
602
- function Pe({ children: e, fallback: t }) {
603
- return Ne() ? /* @__PURE__ */ p(f, { children: e }) : t ?? null;
652
+ function Be({ children: e, fallback: r }) {
653
+ return ze() ? /* @__PURE__ */ n(t, { children: e }) : r ?? null;
604
654
  }
605
655
  // src/components/shared/field.tsx
606
- var Fe = ({ fieldId: t, errorId: n, descriptionId: r, label: i, description: a, error: o, required: s = !1, wrapperClassName: c, children: l }) => /* @__PURE__ */ m("div", {
607
- className: e("w-full", c),
656
+ var Ve = ({ fieldId: t, errorId: i, descriptionId: a, label: o, description: s, error: c, required: l = !1, wrapperClassName: u, children: d }) => /* @__PURE__ */ r("div", {
657
+ className: e("w-full", u),
608
658
  children: [
609
- !!i && (typeof i == "string" ? /* @__PURE__ */ m("label", {
659
+ !!o && (typeof o == "string" ? /* @__PURE__ */ r("label", {
610
660
  id: `${t}-label`,
611
661
  className: e("text-sm font-medium text-gray-700 dark:text-gray-300", "block mb-1"),
612
662
  htmlFor: t,
613
- children: [i, s && /* @__PURE__ */ p("span", {
663
+ children: [o, l && /* @__PURE__ */ n("span", {
614
664
  className: "text-red-500 dark:text-red-400 ml-1",
615
665
  "aria-hidden": "true",
616
666
  children: "*"
617
667
  })]
618
- }) : /* @__PURE__ */ m("span", {
668
+ }) : /* @__PURE__ */ r("span", {
619
669
  id: `${t}-label`,
620
- children: [i, s && /* @__PURE__ */ p("span", {
670
+ children: [o, l && /* @__PURE__ */ n("span", {
621
671
  className: "text-red-500 dark:text-red-400 ml-1",
622
672
  "aria-hidden": "true",
623
673
  children: "*"
624
674
  })]
625
675
  })),
626
- l,
627
- r && /* @__PURE__ */ p(ve, {
628
- id: r,
629
- description: a,
676
+ d,
677
+ a && /* @__PURE__ */ n(Se, {
678
+ id: a,
679
+ description: s,
630
680
  className: "mt-1"
631
681
  }),
632
- /* @__PURE__ */ p(X, {
633
- id: n,
634
- error: o,
682
+ /* @__PURE__ */ n(Te, {
683
+ id: i,
684
+ error: c,
635
685
  className: "mt-1"
636
686
  })
637
687
  ]
638
688
  });
639
689
  // src/components/shared/resolve_node_labelled_by.ts
640
- function Ie(e, t, n) {
690
+ function He(e, t, n) {
641
691
  if (e && typeof e != "string" && !n) return t;
642
692
  }
643
693
  // src/components/shared/use_active_option.ts
644
- var Le = -1;
645
- function Re(e, t) {
646
- return e >= 0 && e < t ? e : Le;
647
- }
648
- function ze({ optionCount: e, getOptionId: t, isOpen: n }) {
649
- let [r, a] = d(Le), s = Re(r, e), c = i((t) => {
650
- e !== 0 && a((n) => {
651
- let r = Re(n, e) + t;
694
+ var Ue = -1;
695
+ function We(e, t) {
696
+ return e >= 0 && e < t ? e : Ue;
697
+ }
698
+ function Ge({ optionCount: e, getOptionId: t, isOpen: n }) {
699
+ let [r, i] = h(Ue), a = We(r, e), o = s((t) => {
700
+ e !== 0 && i((n) => {
701
+ let r = We(n, e) + t;
652
702
  return r < 0 ? e - 1 : r >= e ? 0 : r;
653
703
  });
654
- }, [e]), l = i(() => {
655
- a(0);
656
- }, []), u = i(() => {
657
- a(e - 1);
658
- }, [e]), f = i(() => {
659
- a(Le);
660
- }, []), p = n && s >= 0 ? t(s) : void 0;
661
- return o(() => {
662
- p !== void 0 && document.getElementById(p)?.scrollIntoView?.({ block: "nearest" });
663
- }, [p]), {
664
- activeIndex: s,
665
- activeOptionId: p,
666
- move: c,
667
- first: l,
704
+ }, [e]), c = s(() => {
705
+ i(0);
706
+ }, []), u = s(() => {
707
+ i(e - 1);
708
+ }, [e]), d = s(() => {
709
+ i(Ue);
710
+ }, []), f = n && a >= 0 ? t(a) : void 0;
711
+ return l(() => {
712
+ f !== void 0 && document.getElementById(f)?.scrollIntoView?.({ block: "nearest" });
713
+ }, [f]), {
714
+ activeIndex: a,
715
+ activeOptionId: f,
716
+ move: o,
717
+ first: c,
668
718
  last: u,
669
- reset: f
719
+ reset: d
670
720
  };
671
721
  }
672
722
  // src/components/combobox/combobox.tsx
673
- function Be({ options: t, label: n, description: r, "aria-label": i, error: a, placeholder: o, noResultsText: s, clearLabel: c, radius: f = "md", unstyled: h = !1, disabled: g = !1, required: _ = !1, className: v, wrapperClassName: y, value: b, defaultValue: x = "", onChange: S, id: C }) {
674
- let w = V(), { fieldId: T, errorId: E, descriptionId: D, labelId: O } = $(C), k = `${T}-listbox`, j = u(null), [M, P] = Ce(b, x), F = t.find((e) => e.value === M), [I, L] = d(""), [ee, R] = d(!1), [z, B] = d(!1), H = l(() => ee ? t.filter((e) => e.label.toLowerCase().includes(I.toLowerCase())) : t, [
723
+ function Ke(e, t) {
724
+ return e.label.toLowerCase().includes(t.toLowerCase());
725
+ }
726
+ function qe({ options: t, filterOption: i = Ke, label: a, description: o, "aria-label": s, error: c, placeholder: l, noResultsText: u, clearLabel: d, radius: f = "md", unstyled: g = !1, disabled: _ = !1, required: v = !1, className: y, wrapperClassName: b, value: x, defaultValue: S = "", onChange: C, id: w }) {
727
+ let T = J(), { fieldId: E, errorId: D, descriptionId: O, labelId: k } = $(w), A = `${E}-listbox`, j = m(null), [M, N] = ke(x, S), P = t.find((e) => e.value === M), [F, I] = h(""), [L, R] = h(!1), [B, V] = h(!1), H = p(() => L ? t.filter((e) => i(e, F)) : t, [
675
728
  t,
676
- ee,
677
- I
678
- ]), { activeIndex: te, activeOptionId: U, move: ne, first: re, last: ie, reset: W } = ze({
729
+ i,
730
+ L,
731
+ F
732
+ ]), { activeIndex: ee, activeOptionId: W, move: te, first: ne, last: re, reset: ie } = Ge({
679
733
  optionCount: H.length,
680
- getOptionId: (e) => `${k}-option-${e}`,
681
- isOpen: z
682
- }), ae = z ? I : F?.label ?? "", G = () => {
683
- g || (L(F?.label ?? ""), R(!1), B(!0), W());
734
+ getOptionId: (e) => `${A}-option-${e}`,
735
+ isOpen: B
736
+ }), ae = B ? F : P?.label ?? "", G = () => {
737
+ _ || (I(P?.label ?? ""), R(!1), V(!0), ie());
684
738
  }, K = () => {
685
- B(!1), R(!1), W();
739
+ V(!1), R(!1), ie();
686
740
  }, q = (e) => {
687
- P(e.value), S?.(e.value), K();
741
+ N(e.value), C?.(e.value), K();
688
742
  }, oe = () => {
689
- P(""), S?.(""), L(""), j.current?.focus();
743
+ N(""), C?.(""), I(""), j.current?.focus();
744
+ }, Y = (e) => {
745
+ I(e.target.value), R(!0), V(!0), ne();
746
+ }, X = () => {
747
+ B || G();
690
748
  }, se = (e) => {
691
- L(e.target.value), R(!0), B(!0), re();
692
- }, J = () => {
693
- z || G();
749
+ e.preventDefault(), e.altKey ? B || G() : B ? te(1) : (G(), ne());
694
750
  }, ce = (e) => {
695
- e.preventDefault(), e.altKey ? z || G() : z ? ne(1) : (G(), re());
696
- }, Y = (e) => {
697
- e.preventDefault(), e.altKey ? z && K() : z ? ne(-1) : (G(), ie());
751
+ e.preventDefault(), e.altKey ? B && K() : B ? te(-1) : (G(), re());
698
752
  }, le = (e) => {
699
- if (!z) return;
700
- let t = H[te];
753
+ if (!B) return;
754
+ let t = H[ee];
701
755
  t ? (e.preventDefault(), q(t)) : K();
702
756
  }, ue = (e) => {
703
- z && (e.preventDefault(), K());
757
+ B && (e.preventDefault(), K());
704
758
  };
705
- return /* @__PURE__ */ p(Fe, {
706
- fieldId: T,
707
- errorId: E,
708
- descriptionId: D,
709
- label: n,
710
- description: r,
711
- error: a,
712
- required: _,
713
- wrapperClassName: y,
714
- children: /* @__PURE__ */ m("div", {
759
+ return /* @__PURE__ */ n(Ve, {
760
+ fieldId: E,
761
+ errorId: D,
762
+ descriptionId: O,
763
+ label: a,
764
+ description: o,
765
+ error: c,
766
+ required: v,
767
+ wrapperClassName: b,
768
+ children: /* @__PURE__ */ r("div", {
715
769
  className: "relative",
716
770
  children: [
717
- !h && /* @__PURE__ */ p("span", {
771
+ !g && /* @__PURE__ */ n("span", {
718
772
  className: "i-mdi-magnify absolute left-2.5 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400 dark:text-gray-500 pointer-events-none",
719
773
  "aria-hidden": !0
720
774
  }),
721
- /* @__PURE__ */ p("input", {
775
+ /* @__PURE__ */ n("input", {
722
776
  ref: j,
723
- id: T,
777
+ id: E,
724
778
  role: "combobox",
725
779
  type: "text",
726
780
  autoComplete: "off",
727
- disabled: g,
728
- placeholder: o,
781
+ disabled: _,
782
+ placeholder: l,
729
783
  value: ae,
730
- onChange: se,
731
- onClick: J,
784
+ onChange: Y,
785
+ onClick: X,
732
786
  onBlur: K,
733
787
  onKeyDown: (e) => {
734
- if (e.key === "ArrowDown") return ce(e);
735
- if (e.key === "ArrowUp") return Y(e);
788
+ if (e.key === "ArrowDown") return se(e);
789
+ if (e.key === "ArrowUp") return ce(e);
736
790
  if (e.key === "Enter") return le(e);
737
791
  if (e.key === "Escape") return ue(e);
738
792
  },
739
- "aria-expanded": z,
740
- "aria-controls": k,
793
+ "aria-expanded": B,
794
+ "aria-controls": A,
741
795
  "aria-autocomplete": "list",
742
- "aria-label": i,
743
- "aria-labelledby": Ie(n, O, i),
744
- "aria-activedescendant": U,
745
- "aria-invalid": !!a,
746
- "aria-required": _ || void 0,
747
- "aria-describedby": Z(!!r && D, a && E),
748
- className: e("w-full disabled:opacity-50 disabled:cursor-not-allowed", !h && [
749
- fe,
750
- N[f],
796
+ "aria-label": s,
797
+ "aria-labelledby": He(a, k, s),
798
+ "aria-activedescendant": W,
799
+ "aria-invalid": !!c,
800
+ "aria-required": v || void 0,
801
+ "aria-describedby": Q(!!o && O, c && D),
802
+ className: e("w-full disabled:opacity-50 disabled:cursor-not-allowed", !g && [
803
+ ge,
804
+ U[f],
751
805
  "pl-9 pr-8 py-2 text-sm"
752
- ], !h && a && e("border-red-500 dark:border-red-400", "focus:ring-red-500"), v)
806
+ ], !g && c && e("border-red-500 dark:border-red-400", "focus:ring-red-500"), y)
753
807
  }),
754
- !h && F && !g && /* @__PURE__ */ p("button", {
808
+ !g && P && !_ && /* @__PURE__ */ n("button", {
755
809
  type: "button",
756
- "aria-label": c ?? w.clearSelection,
810
+ "aria-label": d ?? T.clearSelection,
757
811
  onMouseDown: (e) => {
758
812
  e.preventDefault();
759
813
  },
760
814
  onClick: oe,
761
- className: e("absolute right-2.5 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400 hover:text-gray-600 dark:text-gray-500 dark:hover:text-gray-300 before:content-[''] before:absolute before:-inset-[4px]", "outline-hidden focus-visible:outline-2 focus-visible:outline-offset-2", A.primary.focusOutline),
762
- children: /* @__PURE__ */ p("span", {
815
+ className: e("absolute right-2.5 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400 hover:text-gray-600 dark:text-gray-500 dark:hover:text-gray-300 before:content-[''] before:absolute before:-inset-[4px]", "outline-hidden focus-visible:outline-2 focus-visible:outline-offset-2", z.primary.focusOutline),
816
+ children: /* @__PURE__ */ n("span", {
763
817
  className: "i-mdi-close block w-4 h-4",
764
818
  "aria-hidden": !0
765
819
  })
766
820
  }),
767
- z && /* @__PURE__ */ m("div", {
768
- className: e("absolute z-10 mt-1 w-full text-sm shadow-lg", !h && [
821
+ B && /* @__PURE__ */ r("div", {
822
+ className: e("absolute z-10 mt-1 w-full text-sm shadow-lg", !g && [
769
823
  "border",
770
824
  "bg-white dark:bg-gray-900",
771
825
  "border-gray-100 dark:border-gray-800",
772
- N[f]
826
+ U[f]
773
827
  ]),
774
- children: [/* @__PURE__ */ p("ul", {
775
- id: k,
828
+ children: [/* @__PURE__ */ n("ul", {
829
+ id: A,
776
830
  role: "listbox",
777
- "aria-labelledby": n && !i ? O : void 0,
778
- "aria-label": i,
831
+ "aria-labelledby": a && !s ? k : void 0,
832
+ "aria-label": s,
779
833
  className: e("max-h-60 overflow-auto py-1", "[scrollbar-width:thin] [scrollbar-color:theme(colors.gray.300)_transparent] hover:[scrollbar-color:theme(colors.gray.400)_transparent] dark:[scrollbar-color:theme(colors.gray.600)_transparent] dark:hover:[scrollbar-color:theme(colors.gray.500)_transparent]"),
780
- children: H.map((t, n) => /* @__PURE__ */ p("li", {
781
- id: `${k}-option-${n}`,
834
+ children: H.map((t, r) => /* @__PURE__ */ n("li", {
835
+ id: `${A}-option-${r}`,
782
836
  role: "option",
783
837
  "aria-selected": t.value === M,
784
838
  onMouseDown: (e) => e.preventDefault(),
785
839
  onClick: () => q(t),
786
- className: e("px-3 py-2 cursor-pointer text-gray-900 dark:text-gray-100", n === te ? e("bg-blue-50 dark:bg-blue-900/40", "outline-2 -outline-offset-2 outline-blue-500 dark:outline-blue-400") : "hover:bg-gray-50 dark:hover:bg-gray-800/60", t.value === M && "font-medium"),
840
+ className: e("px-3 py-2 cursor-pointer text-gray-900 dark:text-gray-100", r === ee ? e("bg-blue-50 dark:bg-blue-900/40", "outline-2 -outline-offset-2 outline-blue-500 dark:outline-blue-400") : "hover:bg-gray-50 dark:hover:bg-gray-800/60", t.value === M && "font-medium"),
787
841
  children: t.label
788
842
  }, t.value))
789
- }), /* @__PURE__ */ p("div", {
843
+ }), /* @__PURE__ */ n("div", {
790
844
  role: "status",
791
845
  className: H.length === 0 ? "px-3 py-2 text-gray-500 dark:text-gray-400" : void 0,
792
- children: H.length === 0 ? s ?? w.noResults : ""
846
+ children: H.length === 0 ? u ?? T.noResults : ""
793
847
  })]
794
848
  })
795
849
  ]
@@ -797,112 +851,112 @@ function Be({ options: t, label: n, description: r, "aria-label": i, error: a, p
797
851
  });
798
852
  }
799
853
  // src/components/menu/find_typeahead_index.ts
800
- var Ve = -1;
801
- function He(e, t, n) {
854
+ var Je = -1;
855
+ function Ye(e, t, n) {
802
856
  let r = n.toLowerCase(), i = e.length;
803
857
  for (let n = 1; n <= i; n += 1) {
804
858
  let a = (t + n + i) % i;
805
859
  if (e[a]?.toLowerCase().startsWith(r)) return a;
806
860
  }
807
- return Ve;
861
+ return Je;
808
862
  }
809
863
  // src/components/menu/menu_context.ts
810
- var Ue = n(null);
811
- function We() {
812
- return a(Ue);
864
+ var Xe = a(null);
865
+ function Ze() {
866
+ return c(Xe);
813
867
  }
814
868
  // src/components/menu/menu_surface.tsx
815
- var Ge = ":not(:disabled):not([aria-disabled=\"true\"])", Ke = `[role="menuitem"]${Ge}, [role="menuitemradio"]${Ge}`;
816
- function qe(e) {
817
- return Array.from(e.querySelectorAll(Ke));
869
+ var Qe = ":not(:disabled):not([aria-disabled=\"true\"])", $e = `[role="menuitem"]${Qe}, [role="menuitemradio"]${Qe}`;
870
+ function et(e) {
871
+ return Array.from(e.querySelectorAll($e));
818
872
  }
819
- function Je(e, t) {
820
- let n = qe(e);
873
+ function tt(e, t) {
874
+ let n = et(e);
821
875
  n.length !== 0 && n[(t % n.length + n.length) % n.length]?.focus({ preventScroll: !0 });
822
876
  }
823
- function Ye(e, t, n, r) {
824
- if (e.key === "ArrowDown") Je(t, r + 1);
825
- else if (e.key === "ArrowUp") Je(t, r - 1);
826
- else if (e.key === "Home") Je(t, 0);
827
- else if (e.key === "End") Je(t, n.length - 1);
877
+ function nt(e, t, n, r) {
878
+ if (e.key === "ArrowDown") tt(t, r + 1);
879
+ else if (e.key === "ArrowUp") tt(t, r - 1);
880
+ else if (e.key === "Home") tt(t, 0);
881
+ else if (e.key === "End") tt(t, n.length - 1);
828
882
  else return !1;
829
883
  return e.preventDefault(), !0;
830
884
  }
831
- function Xe(e) {
885
+ function rt(e) {
832
886
  return e.key.length === 1 && e.key !== " " && !e.ctrlKey && !e.metaKey && !e.altKey;
833
887
  }
834
- function Ze(e, t, n, r) {
835
- let i = He(t.map((e) => e.textContent?.trim() ?? ""), n, r);
836
- i !== -1 && Je(e, i);
888
+ function it(e, t, n, r) {
889
+ let i = Ye(t.map((e) => e.textContent?.trim() ?? ""), n, r);
890
+ i !== -1 && tt(e, i);
837
891
  }
838
- function Qe({ setFloating: t, floatingStyles: n, isVisible: r, isPositioned: i, radius: a, unstyled: s = !1, panelClassName: c, onClose: l, children: d, id: h, labelledBy: g, "aria-label": _, initialFocus: v = "first", portalTarget: y = document.body }) {
839
- let b = u(null);
840
- return o(() => {
841
- if (!i) return;
892
+ function at({ setFloating: i, floatingStyles: a, isVisible: o, isPositioned: s, radius: c, unstyled: u = !1, panelClassName: d, onClose: f, children: p, id: h, labelledBy: g, "aria-label": _, initialFocus: v = "first", portalTarget: y = document.body }) {
893
+ let b = m(null);
894
+ return l(() => {
895
+ if (!s) return;
842
896
  let e = b.current;
843
897
  if (!e) return;
844
- let t = qe(e);
898
+ let t = et(e);
845
899
  (v === "last" ? t[t.length - 1] : t[0])?.focus({ preventScroll: !0 });
846
- }, [i, v]), x(/* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("div", {
900
+ }, [s, v]), S(/* @__PURE__ */ r(t, { children: [/* @__PURE__ */ n("div", {
847
901
  className: "fixed inset-0 z-40",
848
- onClick: l,
902
+ onClick: f,
849
903
  "aria-hidden": "true"
850
- }), /* @__PURE__ */ p("div", {
851
- ref: t,
852
- style: n,
904
+ }), /* @__PURE__ */ n("div", {
905
+ ref: i,
906
+ style: a,
853
907
  className: "z-50",
854
- children: /* @__PURE__ */ p("div", {
908
+ children: /* @__PURE__ */ n("div", {
855
909
  ref: b,
856
910
  id: h,
857
911
  role: "menu",
858
912
  "aria-label": _,
859
913
  "aria-labelledby": g,
860
914
  tabIndex: -1,
861
- "data-state": r ? "open" : "closed",
915
+ "data-state": o ? "open" : "closed",
862
916
  onKeyDown: (e) => {
863
917
  let t = b.current;
864
918
  if (!t) return;
865
- let n = qe(t), r = n.indexOf(document.activeElement);
866
- Ye(e, t, n, r) ? e.stopPropagation() : e.key === "Escape" ? (e.preventDefault(), e.stopPropagation(), l()) : e.key === "Tab" ? l() : Xe(e) && (e.stopPropagation(), Ze(t, n, r, e.key));
919
+ let n = et(t), r = n.indexOf(document.activeElement);
920
+ nt(e, t, n, r) ? e.stopPropagation() : e.key === "Escape" ? (e.preventDefault(), e.stopPropagation(), f()) : e.key === "Tab" ? f() : rt(e) && (e.stopPropagation(), it(t, n, r, e.key));
867
921
  },
868
- className: e("w-max", !s && [
922
+ className: e("w-max", !u && [
869
923
  "min-w-40 max-w-xs origin-top border py-1 shadow-lg backdrop-blur-sm",
870
924
  "transition-[opacity,transform] duration-150 ease-out",
871
- r ? "scale-100 opacity-100" : "ms-menu-surface-closed",
925
+ o ? "scale-100 opacity-100" : "ms-menu-surface-closed",
872
926
  "bg-white dark:bg-gray-900",
873
927
  "border-gray-100 dark:border-gray-800",
874
- N[a]
875
- ], c),
928
+ U[c]
929
+ ], d),
876
930
  onClick: (e) => e.stopPropagation(),
877
- children: /* @__PURE__ */ p(Ue.Provider, {
878
- value: l,
879
- children: d
931
+ children: /* @__PURE__ */ n(Xe.Provider, {
932
+ value: f,
933
+ children: p
880
934
  })
881
935
  })
882
936
  })] }), y);
883
937
  }
884
938
  // src/components/shared/dialog_portal_target.ts
885
- var $e = "dialog, [role=dialog], [role=alertdialog]";
886
- function et(e) {
887
- return e?.closest($e) ?? (e?.ownerDocument ?? document).body;
939
+ var ot = "dialog, [role=dialog], [role=alertdialog]";
940
+ function st(e) {
941
+ return e?.closest(ot) ?? (e?.ownerDocument ?? document).body;
888
942
  }
889
943
  // src/components/shared/use_overlay_state.ts
890
- function tt() {
891
- let [e, t] = d(!1), [n, r] = d(!1), a = u(void 0);
892
- return o(() => () => clearTimeout(a.current), []), {
944
+ function ct() {
945
+ let [e, t] = h(!1), [n, r] = h(!1), i = m(void 0);
946
+ return l(() => () => clearTimeout(i.current), []), {
893
947
  isMounted: e,
894
948
  isVisible: n,
895
949
  setIsVisible: r,
896
- open: i((e) => {
897
- clearTimeout(a.current), t(!0), e && r(!0);
950
+ open: s((e) => {
951
+ clearTimeout(i.current), t(!0), e && r(!0);
898
952
  }, []),
899
- close: i(() => {
900
- clearTimeout(a.current), r(!1), a.current = setTimeout(() => t(!1), 150);
953
+ close: s(() => {
954
+ clearTimeout(i.current), r(!1), i.current = setTimeout(() => t(!1), 150);
901
955
  }, [])
902
956
  };
903
957
  }
904
- function nt(e, t, n) {
905
- o(() => {
958
+ function lt(e, t, n) {
959
+ l(() => {
906
960
  if (!e || !t) return;
907
961
  let r = requestAnimationFrame(() => n(!0));
908
962
  return () => cancelAnimationFrame(r);
@@ -913,8 +967,8 @@ function nt(e, t, n) {
913
967
  ]);
914
968
  }
915
969
  // src/components/context_menu/context_menu.tsx
916
- var rt = 2;
917
- function it(e, t) {
970
+ var ut = 2;
971
+ function dt(e, t) {
918
972
  return { getBoundingClientRect: () => ({
919
973
  width: 0,
920
974
  height: 0,
@@ -926,7 +980,7 @@ function it(e, t) {
926
980
  bottom: t
927
981
  }) };
928
982
  }
929
- function at(e) {
983
+ function ft(e) {
930
984
  if (e.clientX !== 0 || e.clientY !== 0) return {
931
985
  x: e.clientX,
932
986
  y: e.clientY
@@ -940,360 +994,365 @@ function at(e) {
940
994
  y: 0
941
995
  };
942
996
  }
943
- function ot({ children: e, items: t, radius: n = "md", unstyled: r = !1, panelClassName: a, className: o, ref: s, "aria-label": c }) {
944
- let l = u(null), [f, h] = d(null), { isMounted: x, isVisible: S, setIsVisible: C, open: w, close: T } = tt(), { refs: E, floatingStyles: D, isPositioned: O } = b({
997
+ function pt({ children: e, items: t, radius: i = "md", unstyled: a = !1, panelClassName: o, className: c, ref: l, "aria-label": u }) {
998
+ let d = m(null), [f, p] = h(null), { isMounted: g, isVisible: S, setIsVisible: C, open: w, close: T } = ct(), { refs: E, floatingStyles: D, isPositioned: O } = x({
945
999
  placement: "bottom-start",
946
1000
  strategy: "fixed",
947
- open: x,
948
- whileElementsMounted: g,
1001
+ open: g,
1002
+ whileElementsMounted: _,
949
1003
  middleware: [
950
- v(rt),
951
- _(),
952
- y({ padding: 8 })
1004
+ y(ut),
1005
+ v(),
1006
+ b({ padding: 8 })
953
1007
  ]
954
1008
  });
955
- nt(x, O, C);
956
- let k = i((e) => Ee(h, s)(e), [s]), A = i(() => {
957
- T(), l.current?.focus({ preventScroll: !0 });
1009
+ lt(g, O, C);
1010
+ let k = s((e) => Me(p, l)(e), [l]), A = s(() => {
1011
+ T(), d.current?.focus({ preventScroll: !0 });
958
1012
  }, [T]);
959
- return /* @__PURE__ */ m("div", {
1013
+ return /* @__PURE__ */ r("div", {
960
1014
  ref: k,
961
- className: o,
1015
+ className: c,
962
1016
  onContextMenu: (e) => {
963
- e.preventDefault(), x || (l.current = document.activeElement);
964
- let { x: t, y: n } = at(e);
965
- E.setReference(it(t, n)), w(!1);
1017
+ e.preventDefault(), g || (d.current = document.activeElement);
1018
+ let { x: t, y: n } = ft(e);
1019
+ E.setReference(dt(t, n)), w(!1);
966
1020
  },
967
- children: [e, x && /* @__PURE__ */ p(Qe, {
968
- "aria-label": c,
1021
+ children: [e, g && /* @__PURE__ */ n(at, {
1022
+ "aria-label": u,
969
1023
  setFloating: E.setFloating,
970
1024
  floatingStyles: D,
971
1025
  isVisible: S,
972
1026
  isPositioned: O,
973
- radius: n,
974
- unstyled: r,
975
- panelClassName: a,
1027
+ radius: i,
1028
+ unstyled: a,
1029
+ panelClassName: o,
976
1030
  onClose: A,
977
- portalTarget: et(f),
1031
+ portalTarget: st(f),
978
1032
  children: t
979
1033
  })]
980
1034
  });
981
1035
  }
982
- // src/lib/surface_error.ts
983
- function st(e, t) {
984
- t ? t(e) : queueMicrotask(() => {
985
- throw e;
986
- });
987
- }
988
- // src/components/copy_button/copy_button.tsx
989
- var ct = 2e3, lt = 0;
990
- function ut({ value: e, children: t, onError: n }) {
991
- let r = V(), [i, a] = d(!1), [s, c] = d(""), l = u(void 0), h = u(void 0);
992
- o(() => () => {
993
- clearTimeout(l.current), clearTimeout(h.current);
994
- }, []);
995
- let g = () => {
996
- clearTimeout(h.current), c(""), h.current = setTimeout(() => c(r.copied), lt);
997
- }, _ = t({
998
- copied: i,
999
- copy: async () => {
1000
- try {
1001
- await navigator.clipboard.writeText(e), a(!0), g(), clearTimeout(l.current), l.current = setTimeout(() => {
1002
- a(!1), c("");
1003
- }, ct);
1004
- } catch (e) {
1005
- st(e, n);
1006
- }
1007
- }
1008
- });
1009
- return /* @__PURE__ */ m(f, { children: [_, /* @__PURE__ */ p("span", {
1010
- role: "status",
1011
- className: "sr-only",
1012
- children: s
1013
- })] });
1014
- }
1015
- // src/lib/split_into_highlight_segments.ts
1016
- function dt(e, t) {
1017
- if (t.length === 0) return [{
1018
- text: e,
1019
- isMatch: !1
1020
- }];
1021
- let n = [], r = 0;
1022
- for (let i = 0; i < t.length; i += 2) {
1023
- let a = t[i], o = t[i + 1];
1024
- a !== void 0 && o !== void 0 && (a > r && n.push({
1025
- text: e.slice(r, a),
1026
- isMatch: !1
1027
- }), n.push({
1028
- text: e.slice(a, o),
1029
- isMatch: !0
1030
- }), r = o);
1031
- }
1032
- return r < e.length && n.push({
1033
- text: e.slice(r),
1034
- isMatch: !1
1035
- }), n;
1036
- }
1037
- // src/components/highlight/highlight.tsx
1038
- var ft = "bg-yellow-200 text-yellow-900 dark:bg-yellow-800 dark:text-yellow-100";
1039
- function pt(e) {
1040
- let t = 0;
1041
- return e.map((e) => {
1042
- let n = t;
1043
- return t += e.text.length, {
1044
- ...e,
1045
- start: n
1046
- };
1047
- });
1048
- }
1049
- function mt({ text: t, ranges: n, radius: r = "sm", unstyled: i = !1, markClassName: a }) {
1050
- let o = pt(dt(t, n));
1051
- return /* @__PURE__ */ p(f, { children: o.map((t) => t.isMatch ? /* @__PURE__ */ p("mark", {
1052
- className: e(!i && [N[r], ft], a),
1053
- children: t.text
1054
- }, t.start) : /* @__PURE__ */ p("span", { children: t.text }, t.start)) });
1055
- }
1056
- // src/components/drawer/drawer_styles.ts
1057
- var ht = {
1058
- sm: "ms-drawer-width-sm",
1059
- md: "ms-drawer-width-md",
1060
- lg: "ms-drawer-width-lg"
1061
- }, gt = {
1062
- right: "right-0",
1063
- left: "left-0"
1064
- }, _t = {
1065
- right: "ms-drawer-offscreen-right",
1066
- left: "ms-drawer-offscreen-left"
1067
- }, vt = {
1068
- right: {
1069
- none: "rounded-l-none",
1070
- sm: "rounded-l-sm",
1071
- md: "rounded-l-md",
1072
- lg: "rounded-l-lg",
1073
- xl: "rounded-l-xl",
1074
- full: "rounded-l-lg"
1075
- },
1076
- left: {
1077
- none: "rounded-r-none",
1078
- sm: "rounded-r-sm",
1079
- md: "rounded-r-md",
1080
- lg: "rounded-r-lg",
1081
- xl: "rounded-r-xl",
1082
- full: "rounded-r-lg"
1083
- }
1084
- }, yt = n(null);
1085
- // src/components/modal/modal_footer_slot.tsx
1086
- function bt({ onSlotChange: t, children: n, unstyled: r = !1 }) {
1087
- return /* @__PURE__ */ p("div", {
1088
- ref: t,
1089
- className: e("flex items-center justify-end flex-shrink-0 empty:hidden", !r && ["gap-3 px-6 py-4 border-t", "border-gray-100 dark:border-gray-800"]),
1090
- children: n
1091
- });
1092
- }
1093
- // src/components/modal/modal_footer_slot_context.ts
1094
- var xt = n(null);
1095
1036
  // src/components/shared/accessible_name.ts
1096
- function St(e) {
1037
+ function mt(e) {
1097
1038
  return (e ?? "").replace(/\s+/g, " ").trim();
1098
1039
  }
1099
- function Ct(e, t) {
1040
+ function ht(e, t) {
1100
1041
  return t.split(/\s+/).map((t) => e.ownerDocument.getElementById(t)?.textContent).join(" ");
1101
1042
  }
1102
- function wt(e) {
1103
- let t = St(e.getAttribute("aria-label"));
1043
+ function gt(e) {
1044
+ let t = mt(e.getAttribute("aria-label"));
1104
1045
  if (t) return t;
1105
1046
  let n = e.getAttribute("aria-labelledby");
1106
- return (n ? St(Ct(e, n)) : "") || St(e.textContent);
1047
+ return (n ? mt(ht(e, n)) : "") || mt(e.textContent);
1107
1048
  }
1108
1049
  // src/components/shared/portal_target.ts
1109
- var Tt = "main, nav, aside, header, footer, form[aria-label], form[aria-labelledby], section[aria-label], section[aria-labelledby], [role=main], [role=navigation], [role=complementary], [role=banner], [role=contentinfo], [role=region], [role=search], [role=form], dialog, [role=dialog], [role=alertdialog]";
1110
- function Et(e) {
1111
- return e?.closest(Tt) ?? (e?.ownerDocument ?? document).body;
1050
+ var _t = "main, nav, aside, header, footer, form[aria-label], form[aria-labelledby], section[aria-label], section[aria-labelledby], [role=main], [role=navigation], [role=complementary], [role=banner], [role=contentinfo], [role=region], [role=search], [role=form], dialog, [role=dialog], [role=alertdialog]";
1051
+ function vt(e) {
1052
+ return e?.closest(_t) ?? (e?.ownerDocument ?? document).body;
1112
1053
  }
1113
1054
  // src/components/tooltip/tooltip.tsx
1114
- var Dt = 8, Ot = 8, kt = 100, At = {
1055
+ var yt = 8, bt = 8, xt = 100, St = {
1115
1056
  top: "ms-tooltip-enter-top",
1116
1057
  bottom: "ms-tooltip-enter-bottom",
1117
1058
  left: "ms-tooltip-enter-left",
1118
1059
  right: "ms-tooltip-enter-right"
1119
- }, jt = {
1060
+ }, Ct = {
1120
1061
  top: "bottom",
1121
1062
  bottom: "top",
1122
1063
  left: "right",
1123
1064
  right: "left"
1124
1065
  };
1125
- function Mt({ content: n, children: a, position: l = "top", showOnClick: S = !1, temporaryContent: C, temporaryDuration: w = 2e3, disabled: T = !1, radius: E = "lg", unstyled: D = !1, panelClassName: O, onTemporaryShow: k, className: A, describeChild: j, hoverable: M = !1, portalContainer: P, ref: F }) {
1126
- let { isMounted: I, isVisible: L, setIsVisible: ee, open: R, close: z } = tt(), [B, V] = d(!1), H = s(), te = u(null), [U, ne] = d(null), [re, ie] = d(null), [W, ae] = d(null), G = u(void 0), K = u(void 0), { refs: q, floatingStyles: oe, placement: se, middlewareData: J, isPositioned: ce } = b({
1127
- placement: l,
1066
+ function wt({ content: a, children: c, position: u = "top", showOnClick: p = !1, temporaryContent: C, temporaryDuration: w = 2e3, disabled: T = !1, radius: E = "lg", unstyled: D = !1, panelClassName: O, onTemporaryShow: k, className: A, describeChild: j, hoverable: M = !1, portalContainer: N, ref: P }) {
1067
+ let { isMounted: F, isVisible: I, setIsVisible: L, open: R, close: z } = ct(), [B, V] = h(!1), H = d(), ee = m(null), [W, te] = h(null), [ne, re] = h(null), [ie, ae] = h(null), G = m(void 0), K = m(void 0), { refs: q, floatingStyles: J, placement: oe, middlewareData: Y, isPositioned: X } = x({
1068
+ placement: u,
1128
1069
  strategy: "fixed",
1129
- open: I,
1130
- whileElementsMounted: g,
1070
+ open: F,
1071
+ whileElementsMounted: _,
1131
1072
  middleware: [
1132
- v(Dt),
1133
- _(),
1134
- y({ padding: 8 }),
1135
- h({ element: te })
1073
+ y(yt),
1074
+ v(),
1075
+ b({ padding: 8 }),
1076
+ g({ element: ee })
1136
1077
  ]
1137
- }), Y = se.split("-")[0];
1138
- nt(I, ce, ee);
1139
- let le = i((e) => Ee(q.setReference, ne, F)(e), [q, F]), ue = i((e) => Ee(q.setFloating, ie)(e), [q]);
1140
- c(() => {
1141
- let e = U?.firstElementChild;
1142
- ae(re && e ? St(re.textContent) === wt(e) : null);
1078
+ }), se = oe.split("-")[0];
1079
+ lt(F, X, L);
1080
+ let ce = s((e) => Me(q.setReference, te, P)(e), [q, P]), le = s((e) => Me(q.setFloating, re)(e), [q]);
1081
+ f(() => {
1082
+ let e = W?.firstElementChild;
1083
+ ae(ne && e ? mt(ne.textContent) === gt(e) : null);
1143
1084
  }, [
1144
- U,
1145
- re,
1146
- n,
1085
+ W,
1086
+ ne,
1087
+ a,
1147
1088
  C,
1148
1089
  B
1149
1090
  ]);
1150
- let de = i(() => {
1091
+ let ue = s(() => {
1151
1092
  V(!1), z();
1152
- }, [z]), fe = () => {
1153
- !T && C && (V(!0), R(ce), clearTimeout(G.current), G.current = setTimeout(de, w), k?.());
1154
- }, pe = () => {
1155
- T || R(ce);
1156
- }, me = i(() => {
1157
- clearTimeout(G.current), clearTimeout(K.current), de();
1158
- }, [de]), he = () => {
1093
+ }, [z]), de = () => {
1094
+ !T && C && (V(!0), R(X), clearTimeout(G.current), G.current = setTimeout(ue, w), k?.());
1095
+ }, fe = () => {
1096
+ T || R(X);
1097
+ }, Z = s(() => {
1098
+ clearTimeout(G.current), clearTimeout(K.current), ue();
1099
+ }, [ue]), pe = () => {
1159
1100
  clearTimeout(K.current);
1160
- }, ge = () => {
1161
- clearTimeout(K.current), K.current = setTimeout(me, kt);
1101
+ }, me = () => {
1102
+ clearTimeout(K.current), K.current = setTimeout(Z, xt);
1103
+ }, he = (e) => {
1104
+ e.target.matches(":focus-visible") && fe();
1105
+ }, ge = (e) => {
1106
+ e.pointerType !== "touch" && (pe(), fe());
1162
1107
  }, _e = (e) => {
1163
- e.target.matches(":focus-visible") && pe();
1108
+ e.pointerType !== "touch" && (M ? me() : Z());
1164
1109
  }, ve = (e) => {
1165
- e.pointerType !== "touch" && (he(), pe());
1166
- }, ye = (e) => {
1167
- e.pointerType !== "touch" && (M ? ge() : me());
1168
- }, be = (e) => {
1169
- e.pointerType !== "touch" && he();
1110
+ e.pointerType !== "touch" && pe();
1170
1111
  };
1171
- o(() => () => {
1112
+ l(() => () => {
1172
1113
  clearTimeout(G.current), clearTimeout(K.current);
1173
- }, []), o(() => {
1174
- if (!L || T) return;
1114
+ }, []), l(() => {
1115
+ if (!I || T) return;
1175
1116
  let e = (e) => {
1176
- e.key === "Escape" && (e.preventDefault(), me());
1117
+ e.key === "Escape" && (e.preventDefault(), Z());
1177
1118
  };
1178
1119
  return window.addEventListener("keydown", e, !0), () => window.removeEventListener("keydown", e, !0);
1179
1120
  }, [
1180
- L,
1121
+ I,
1181
1122
  T,
1182
- me
1123
+ Z
1183
1124
  ]);
1184
- let X = I && !T, xe = B && C ? C : n, Se = {
1125
+ let ye = F && !T, be = B && C ? C : a, xe = {
1185
1126
  onClick: (e) => {
1186
- S && C && fe(), r(a) && a.props.onClick?.(e);
1127
+ p && C && de(), o(c) && c.props.onClick?.(e);
1187
1128
  },
1188
- "aria-describedby": Z(r(a) ? a.props["aria-describedby"] : void 0, X && (j ?? (W !== null && !W)) && H)
1189
- }, Q = r(a) ? t(a, Se) : a, Ce = J.arrow?.x, $ = J.arrow?.y, we = jt[Y];
1190
- return /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ m("span", {
1191
- ref: le,
1129
+ "aria-describedby": Q(o(c) ? c.props["aria-describedby"] : void 0, ye && (j ?? (ie !== null && !ie)) && H)
1130
+ }, Se = o(c) ? i(c, xe) : c, Ce = Y.arrow?.x, we = Y.arrow?.y, Te = Ct[se];
1131
+ return /* @__PURE__ */ r(t, { children: [/* @__PURE__ */ r("span", {
1132
+ ref: ce,
1192
1133
  className: e("inline-flex", A),
1193
- onPointerEnter: ve,
1194
- onPointerLeave: ye,
1195
- onFocus: _e,
1196
- onBlur: me,
1197
- children: [Q, C !== void 0 && /* @__PURE__ */ p("span", {
1134
+ onPointerEnter: ge,
1135
+ onPointerLeave: _e,
1136
+ onFocus: he,
1137
+ onBlur: Z,
1138
+ children: [Se, C !== void 0 && /* @__PURE__ */ n("span", {
1198
1139
  role: "status",
1199
1140
  className: "sr-only",
1200
1141
  children: B ? C : null
1201
1142
  })]
1202
- }), X && x(/* @__PURE__ */ p("div", {
1203
- ref: ue,
1204
- style: oe,
1143
+ }), ye && S(/* @__PURE__ */ n("div", {
1144
+ ref: le,
1145
+ style: J,
1205
1146
  className: e("z-50 inline-block", !M && "pointer-events-none"),
1206
- onPointerEnter: M ? be : void 0,
1207
- onPointerLeave: M ? ye : void 0,
1208
- children: /* @__PURE__ */ m("div", {
1147
+ onPointerEnter: M ? ve : void 0,
1148
+ onPointerLeave: M ? _e : void 0,
1149
+ children: /* @__PURE__ */ r("div", {
1209
1150
  id: H,
1210
1151
  role: "tooltip",
1211
- "data-state": L ? "open" : "closed",
1152
+ "data-state": I ? "open" : "closed",
1212
1153
  className: e("whitespace-nowrap", !D && [
1213
1154
  "px-3 py-1.5 text-sm",
1214
1155
  "text-white dark:text-gray-900 bg-gray-900 dark:bg-gray-100 shadow-lg",
1215
1156
  "transition-[opacity,transform] duration-150 ease-out",
1216
- L ? "opacity-100" : "opacity-0",
1217
- At[Y],
1218
- N[E]
1157
+ I ? "opacity-100" : "opacity-0",
1158
+ St[se],
1159
+ U[E]
1219
1160
  ], O),
1220
- children: [xe, !D && /* @__PURE__ */ p("div", {
1221
- ref: te,
1161
+ children: [be, !D && /* @__PURE__ */ n("div", {
1162
+ ref: ee,
1222
1163
  style: {
1223
1164
  position: "absolute",
1224
- width: `${Ot}px`,
1225
- height: `${Ot}px`,
1165
+ width: `${bt}px`,
1166
+ height: `${bt}px`,
1226
1167
  left: Ce === void 0 ? void 0 : `${Ce}px`,
1227
- top: $ === void 0 ? void 0 : `${$}px`,
1228
- [we]: `-${Ot / 2}px`
1168
+ top: we === void 0 ? void 0 : `${we}px`,
1169
+ [Te]: `-${bt / 2}px`
1229
1170
  },
1230
1171
  className: "rotate-45 bg-gray-900 dark:bg-gray-100"
1231
1172
  })]
1232
1173
  })
1233
- }), P ?? Et(U))] });
1174
+ }), N ?? vt(W))] });
1234
1175
  }
1235
1176
  // src/components/icon_button/icon_button.tsx
1236
- var Nt = {
1177
+ var Tt = {
1237
1178
  xs: "p-1",
1238
1179
  sm: "p-2",
1239
1180
  md: "p-2",
1240
1181
  lg: "p-3"
1241
- }, Pt = {
1182
+ }, Et = {
1242
1183
  xs: "w-4 h-4",
1243
1184
  sm: "w-4 h-4",
1244
1185
  md: "w-5 h-5",
1245
1186
  lg: "w-6 h-6"
1246
1187
  };
1247
- function Ft(e) {
1188
+ function Dt(e) {
1248
1189
  if (e) return e === !0 ? {} : typeof e == "string" ? { position: e } : e;
1249
1190
  }
1250
- function It(t) {
1251
- let { icon: n, "aria-label": r, unstyled: i = !1, variant: a = "outline", color: o = "neutral", size: s = "md", radius: c = "md", className: l, children: u, tooltip: d, ref: f, ...h } = t, g = A[o], _ = Ft(d), v = /* @__PURE__ */ m("button", {
1252
- ref: f,
1191
+ function Ot(t) {
1192
+ let { icon: i, "aria-label": a, unstyled: o = !1, variant: s = "outline", color: c = "neutral", size: l = "md", radius: u = "md", className: d, children: f, tooltip: p, pressed: m, ref: h, ...g } = t, _ = z[c], v = Dt(p), y = /* @__PURE__ */ r("button", {
1193
+ ref: h,
1253
1194
  type: "button",
1254
- "aria-label": r,
1255
- className: e(j, !i && [
1256
- M,
1195
+ "aria-label": a,
1196
+ "aria-pressed": m,
1197
+ className: e(B, !o && [
1198
+ V,
1257
1199
  "border",
1258
- N[c],
1259
- Nt[s],
1260
- g[a],
1261
- g.focusOutline
1262
- ], l),
1263
- ...h,
1264
- children: [/* @__PURE__ */ p("span", { className: e(n, Pt[s], u && "mr-1") }), u]
1200
+ U[u],
1201
+ Tt[l],
1202
+ H(c, s, m ?? !1),
1203
+ _.focusOutline
1204
+ ], d),
1205
+ ...g,
1206
+ children: [/* @__PURE__ */ n("span", { className: e(i, Et[l], f && "mr-1") }), f]
1207
+ });
1208
+ if (!v) return y;
1209
+ let b = v.content !== void 0;
1210
+ return /* @__PURE__ */ n(wt, {
1211
+ content: b ? v.content : a,
1212
+ position: v.position,
1213
+ describeChild: b ? void 0 : !1,
1214
+ children: y
1215
+ });
1216
+ }
1217
+ // src/lib/surface_error.ts
1218
+ function kt(e, t) {
1219
+ t ? t(e) : queueMicrotask(() => {
1220
+ throw e;
1221
+ });
1222
+ }
1223
+ // src/components/copy_button/copy_button.tsx
1224
+ var At = 2e3, jt = 0;
1225
+ function Mt({ value: e, children: i, label: a, onError: o }) {
1226
+ let s = J(), [c, u] = h(!1), [d, f] = h(""), p = m(void 0), g = m(void 0);
1227
+ l(() => () => {
1228
+ clearTimeout(p.current), clearTimeout(g.current);
1229
+ }, []);
1230
+ let _ = () => {
1231
+ clearTimeout(g.current), f(""), g.current = setTimeout(() => f(s.copied), jt);
1232
+ }, v = async () => {
1233
+ try {
1234
+ await navigator.clipboard.writeText(e), u(!0), _(), clearTimeout(p.current), p.current = setTimeout(() => {
1235
+ u(!1), f("");
1236
+ }, At);
1237
+ } catch (e) {
1238
+ kt(e, o);
1239
+ }
1240
+ }, y = i?.({
1241
+ copied: c,
1242
+ copy: v
1243
+ }) ?? (i ? null : /* @__PURE__ */ n(Ot, {
1244
+ icon: c ? "i-mdi-check" : "i-mdi-content-copy",
1245
+ "aria-label": a ?? s.copy ?? "Copy",
1246
+ onClick: () => void v()
1247
+ }));
1248
+ return /* @__PURE__ */ r(t, { children: [y, /* @__PURE__ */ n("span", {
1249
+ role: "status",
1250
+ className: "sr-only",
1251
+ children: d
1252
+ })] });
1253
+ }
1254
+ // src/lib/split_into_highlight_segments.ts
1255
+ function Nt(e, t) {
1256
+ if (t.length === 0) return [{
1257
+ text: e,
1258
+ isMatch: !1
1259
+ }];
1260
+ let n = [], r = 0;
1261
+ for (let i = 0; i < t.length; i += 2) {
1262
+ let a = t[i], o = t[i + 1];
1263
+ a !== void 0 && o !== void 0 && (a > r && n.push({
1264
+ text: e.slice(r, a),
1265
+ isMatch: !1
1266
+ }), n.push({
1267
+ text: e.slice(a, o),
1268
+ isMatch: !0
1269
+ }), r = o);
1270
+ }
1271
+ return r < e.length && n.push({
1272
+ text: e.slice(r),
1273
+ isMatch: !1
1274
+ }), n;
1275
+ }
1276
+ // src/components/highlight/highlight.tsx
1277
+ var Pt = "bg-yellow-200 text-yellow-900 dark:bg-yellow-800 dark:text-yellow-100";
1278
+ function Ft(e) {
1279
+ let t = 0;
1280
+ return e.map((e) => {
1281
+ let n = t;
1282
+ return t += e.text.length, {
1283
+ ...e,
1284
+ start: n
1285
+ };
1265
1286
  });
1266
- if (!_) return v;
1267
- let y = _.content !== void 0;
1268
- return /* @__PURE__ */ p(Mt, {
1269
- content: y ? _.content : r,
1270
- position: _.position,
1271
- describeChild: y ? void 0 : !1,
1272
- children: v
1287
+ }
1288
+ function It({ text: r, ranges: i, radius: a = "sm", unstyled: o = !1, markClassName: s }) {
1289
+ let c = Ft(Nt(r, i));
1290
+ return /* @__PURE__ */ n(t, { children: c.map((t) => t.isMatch ? /* @__PURE__ */ n("mark", {
1291
+ className: e(!o && [U[a], Pt], s),
1292
+ children: t.text
1293
+ }, t.start) : /* @__PURE__ */ n("span", { children: t.text }, t.start)) });
1294
+ }
1295
+ // src/components/drawer/drawer_styles.ts
1296
+ var Lt = {
1297
+ sm: "ms-drawer-width-sm",
1298
+ md: "ms-drawer-width-md",
1299
+ lg: "ms-drawer-width-lg"
1300
+ }, Rt = {
1301
+ right: "right-0",
1302
+ left: "left-0"
1303
+ }, zt = {
1304
+ right: "ms-drawer-offscreen-right",
1305
+ left: "ms-drawer-offscreen-left"
1306
+ }, Bt = {
1307
+ right: {
1308
+ none: "rounded-l-none",
1309
+ sm: "rounded-l-sm",
1310
+ md: "rounded-l-md",
1311
+ lg: "rounded-l-lg",
1312
+ xl: "rounded-l-xl",
1313
+ full: "rounded-l-lg"
1314
+ },
1315
+ left: {
1316
+ none: "rounded-r-none",
1317
+ sm: "rounded-r-sm",
1318
+ md: "rounded-r-md",
1319
+ lg: "rounded-r-lg",
1320
+ xl: "rounded-r-xl",
1321
+ full: "rounded-r-lg"
1322
+ }
1323
+ }, Vt = a(null);
1324
+ // src/components/modal/modal_footer_slot.tsx
1325
+ function Ht({ onSlotChange: t, children: r, unstyled: i = !1 }) {
1326
+ return /* @__PURE__ */ n("div", {
1327
+ ref: t,
1328
+ className: e("flex items-center justify-end flex-shrink-0 empty:hidden", !i && ["gap-3 px-6 py-4 border-t", "border-gray-100 dark:border-gray-800"]),
1329
+ children: r
1273
1330
  });
1274
1331
  }
1332
+ // src/components/modal/modal_footer_slot_context.ts
1333
+ var Ut = a(null);
1275
1334
  // src/components/modal/modal_header.tsx
1276
- function Lt({ titleId: t, title: n, onDismiss: r, dismissible: i, closeLabel: a, unstyled: o = !1 }) {
1277
- let s = V(), c = a ?? s.close;
1278
- return /* @__PURE__ */ m("div", {
1279
- className: e("flex items-center justify-between flex-shrink-0", !o && "gap-4 px-6 pt-5 pb-4"),
1335
+ function Wt({ titleId: t, title: i, onDismiss: a, dismissible: o, closeLabel: s, unstyled: c = !1 }) {
1336
+ let l = J(), u = s ?? l.close;
1337
+ return /* @__PURE__ */ r("div", {
1338
+ className: e("flex items-center justify-between flex-shrink-0", !c && "gap-4 px-6 pt-5 pb-4"),
1280
1339
  children: [
1281
- /* @__PURE__ */ p("h2", {
1340
+ /* @__PURE__ */ n("h2", {
1282
1341
  id: t,
1283
- className: e(!o && "text-base font-medium tracking-tight text-gray-900 dark:text-gray-100"),
1284
- children: n
1342
+ className: e(!c && "text-base font-medium tracking-tight text-gray-900 dark:text-gray-100"),
1343
+ children: i
1285
1344
  }),
1286
- i && o && /* @__PURE__ */ p(It, {
1345
+ o && c && /* @__PURE__ */ n(Ot, {
1287
1346
  icon: "i-mdi-close",
1288
- onClick: r,
1289
- "aria-label": c,
1347
+ onClick: a,
1348
+ "aria-label": u,
1290
1349
  className: "min-h-6 min-w-6",
1291
1350
  unstyled: !0
1292
1351
  }),
1293
- i && !o && /* @__PURE__ */ p(It, {
1352
+ o && !c && /* @__PURE__ */ n(Ot, {
1294
1353
  icon: "i-mdi-close",
1295
- onClick: r,
1296
- "aria-label": c,
1354
+ onClick: a,
1355
+ "aria-label": u,
1297
1356
  variant: "subtle",
1298
1357
  size: "sm",
1299
1358
  radius: "full",
@@ -1303,65 +1362,65 @@ function Lt({ titleId: t, title: n, onDismiss: r, dismissible: i, closeLabel: a,
1303
1362
  });
1304
1363
  }
1305
1364
  // src/components/modal/use_guarded_dismiss.ts
1306
- function Rt(e) {
1365
+ function Gt(e) {
1307
1366
  try {
1308
1367
  return e();
1309
1368
  } catch (e) {
1310
- return st(e), null;
1369
+ return kt(e), null;
1311
1370
  }
1312
1371
  }
1313
- function zt({ onDismiss: e, isEnded: t }) {
1314
- let n = u(e), r = u(t), a = u([]), o = u(!1);
1315
- c(() => {
1372
+ function Kt({ onDismiss: e, isEnded: t }) {
1373
+ let n = m(e), r = m(t), i = m([]), a = m(!1);
1374
+ f(() => {
1316
1375
  n.current = e, r.current = t;
1317
1376
  });
1318
- let [s] = d(() => ({ register: (e) => (a.current = [...a.current, e], () => {
1319
- a.current = a.current.filter((t) => t !== e);
1320
- }) })), l = i((e) => {
1321
- o.current = !0, e.then((e) => {
1322
- o.current = !1, e && !r.current && n.current();
1377
+ let [o] = h(() => ({ register: (e) => (i.current = [...i.current, e], () => {
1378
+ i.current = i.current.filter((t) => t !== e);
1379
+ }) })), c = s((e) => {
1380
+ a.current = !0, e.then((e) => {
1381
+ a.current = !1, e && !r.current && n.current();
1323
1382
  }, (e) => {
1324
- o.current = !1, st(e);
1383
+ a.current = !1, kt(e);
1325
1384
  });
1326
1385
  }, []);
1327
1386
  return {
1328
- dismiss: i(() => {
1329
- if (o.current) return;
1330
- let e = a.current.at(-1);
1387
+ dismiss: s(() => {
1388
+ if (a.current) return;
1389
+ let e = i.current.at(-1);
1331
1390
  if (!e) {
1332
1391
  n.current();
1333
1392
  return;
1334
1393
  }
1335
- let t = Rt(e.current);
1336
- t !== null && (typeof t == "boolean" ? t && n.current() : l(t));
1337
- }, [l]),
1338
- registry: s
1394
+ let t = Gt(e.current);
1395
+ t !== null && (typeof t == "boolean" ? t && n.current() : c(t));
1396
+ }, [c]),
1397
+ registry: o
1339
1398
  };
1340
1399
  }
1341
1400
  // src/components/modal/keyboard_scroll_region_attribute.ts
1342
- var Bt = "data-keyboard-scroll-region", Vt = "a[href], button, input, select, textarea, summary, audio[controls], video[controls], [contenteditable]:not([contenteditable=\"false\"]), [tabindex]";
1343
- function Ht(e) {
1401
+ var qt = "data-keyboard-scroll-region", Jt = "a[href], button, input, select, textarea, summary, audio[controls], video[controls], [contenteditable]:not([contenteditable=\"false\"]), [tabindex]";
1402
+ function Yt(e) {
1344
1403
  return e.matches(":disabled");
1345
1404
  }
1346
- function Ut(e) {
1405
+ function Xt(e) {
1347
1406
  return e.getAttribute("tabindex") === "-1";
1348
1407
  }
1349
- function Wt(e) {
1408
+ function Zt(e) {
1350
1409
  return e.matches("input[type=\"hidden\"]");
1351
1410
  }
1352
- function Gt(e) {
1411
+ function Qt(e) {
1353
1412
  return e.closest("[inert]") !== null;
1354
1413
  }
1355
- function Kt(e) {
1414
+ function $t(e) {
1356
1415
  return typeof e.checkVisibility != "function" || e.checkVisibility();
1357
1416
  }
1358
- function qt(e) {
1359
- return !Ht(e) && !Ut(e) && !Wt(e) && !Gt(e) && Kt(e);
1417
+ function en(e) {
1418
+ return !Yt(e) && !Xt(e) && !Zt(e) && !Qt(e) && $t(e);
1360
1419
  }
1361
- function Jt(e) {
1420
+ function tn(e) {
1362
1421
  return e instanceof HTMLInputElement && e.type === "radio" && e.name !== "";
1363
1422
  }
1364
- function Yt(e) {
1423
+ function nn(e) {
1365
1424
  let t = /* @__PURE__ */ new Map();
1366
1425
  for (let n of e) {
1367
1426
  let e = t.get(n.form) ?? /* @__PURE__ */ new Map();
@@ -1371,24 +1430,24 @@ function Yt(e) {
1371
1430
  }
1372
1431
  return Array.from(t.values()).flatMap((e) => Array.from(e.values()));
1373
1432
  }
1374
- function Xt(e) {
1433
+ function rn(e) {
1375
1434
  return e.find((e) => e.checked) ?? e[0];
1376
1435
  }
1377
- function Zt(e) {
1378
- let t = Array.from(e.querySelectorAll(Vt)).filter(qt), n = t.filter(Jt), r = new Set(Yt(n).map(Xt));
1379
- return t.filter((e) => !Jt(e) || r.has(e));
1436
+ function an(e) {
1437
+ let t = Array.from(e.querySelectorAll(Jt)).filter(en), n = t.filter(tn), r = new Set(nn(n).map(rn));
1438
+ return t.filter((e) => !tn(e) || r.has(e));
1380
1439
  }
1381
1440
  // src/components/modal/use_keyboard_scrollable.ts
1382
- var Qt = {};
1383
- function $t(e) {
1384
- return e.scrollHeight > e.clientHeight && Zt(e).length === 0;
1441
+ var on = {};
1442
+ function sn(e) {
1443
+ return e.scrollHeight > e.clientHeight && an(e).length === 0;
1385
1444
  }
1386
- function en(e, { labelledBy: t, label: n }) {
1387
- let [r, i] = d(!1);
1388
- return o(() => {
1445
+ function cn(e, { labelledBy: t, label: n }) {
1446
+ let [r, i] = h(!1);
1447
+ return l(() => {
1389
1448
  let t = e.current;
1390
1449
  if (!t) return;
1391
- let n = () => i($t(t));
1450
+ let n = () => i(sn(t));
1392
1451
  n();
1393
1452
  let r = new MutationObserver(n);
1394
1453
  r.observe(t, {
@@ -1399,77 +1458,84 @@ function en(e, { labelledBy: t, label: n }) {
1399
1458
  return a?.observe(t), () => {
1400
1459
  r.disconnect(), a?.disconnect();
1401
1460
  };
1402
- }, [e]), !r || !(t || n) ? Qt : {
1461
+ }, [e]), !r || !(t || n) ? on : {
1403
1462
  tabIndex: 0,
1404
1463
  role: "region",
1405
- [Bt]: !0,
1464
+ [qt]: !0,
1406
1465
  "aria-labelledby": t,
1407
1466
  "aria-label": t ? void 0 : n,
1408
- focusClassName: k
1467
+ focusClassName: R
1409
1468
  };
1410
1469
  }
1411
1470
  // src/components/modal/body_scroll_lock.ts
1412
- var tn = "--scrollbar-compensation", nn = 0, rn;
1413
- function an() {
1471
+ var ln = "--scrollbar-compensation", un = 0, dn;
1472
+ function fn() {
1414
1473
  let { style: e } = document.documentElement;
1415
1474
  return {
1416
1475
  overflow: e.overflow,
1417
1476
  overflowX: e.overflowX,
1418
1477
  overflowY: e.overflowY,
1419
1478
  paddingRight: e.paddingRight,
1420
- scrollbarCompensation: e.getPropertyValue(tn)
1479
+ scrollbarCompensation: e.getPropertyValue(ln)
1421
1480
  };
1422
1481
  }
1423
- function on(e) {
1482
+ function pn(e) {
1424
1483
  let { style: t } = document.documentElement;
1425
- t.overflow = e.overflow, t.overflowX = e.overflowX, t.overflowY = e.overflowY, t.paddingRight = e.paddingRight, e.scrollbarCompensation === "" ? t.removeProperty(tn) : t.setProperty(tn, e.scrollbarCompensation);
1484
+ t.overflow = e.overflow, t.overflowX = e.overflowX, t.overflowY = e.overflowY, t.paddingRight = e.paddingRight, e.scrollbarCompensation === "" ? t.removeProperty(ln) : t.setProperty(ln, e.scrollbarCompensation);
1426
1485
  }
1427
- function sn(e, t) {
1486
+ function mn(e, t) {
1428
1487
  let { style: n } = document.documentElement;
1429
- n.paddingRight = `${t + e}px`, n.setProperty(tn, `${e}px`);
1488
+ n.paddingRight = `${t + e}px`, n.setProperty(ln, `${e}px`);
1430
1489
  }
1431
- function cn() {
1432
- if (nn === 0) {
1490
+ function hn() {
1491
+ if (un === 0) {
1433
1492
  let e = document.documentElement;
1434
- rn = an();
1493
+ dn = fn();
1435
1494
  let t = Number.parseFloat(getComputedStyle(e).paddingRight) || 0, n = e.clientWidth;
1436
1495
  e.style.overflow = "hidden";
1437
1496
  let r = e.clientWidth - n;
1438
- r > 0 && sn(r, t);
1497
+ r > 0 && mn(r, t);
1439
1498
  }
1440
- nn += 1;
1499
+ un += 1;
1441
1500
  }
1442
- function ln() {
1443
- --nn, nn === 0 && rn && (on(rn), rn = void 0);
1501
+ function gn() {
1502
+ --un, un === 0 && dn && (pn(dn), dn = void 0);
1444
1503
  }
1445
- function un() {
1446
- o(() => (cn(), ln), []);
1504
+ function _n() {
1505
+ l(() => (hn(), gn), []);
1447
1506
  }
1448
1507
  // src/components/modal/modal_stack.ts
1449
- var dn = [];
1450
- function fn(e) {
1451
- return dn.push(e), () => {
1452
- let t = dn.indexOf(e);
1453
- t !== -1 && dn.splice(t, 1);
1508
+ var vn = [];
1509
+ function yn(e, t) {
1510
+ return vn.push({
1511
+ token: e,
1512
+ requestDismiss: t
1513
+ }), () => {
1514
+ let t = vn.findIndex((t) => t.token === e);
1515
+ t !== -1 && vn.splice(t, 1);
1454
1516
  };
1455
1517
  }
1456
- function pn(e) {
1457
- return dn[dn.length - 1] === e;
1518
+ function bn(e) {
1519
+ return vn.at(-1)?.token === e;
1520
+ }
1521
+ function xn() {
1522
+ let e = vn.at(-1);
1523
+ return e ? (e.requestDismiss(), !0) : !1;
1458
1524
  }
1459
1525
  // src/components/modal/use_modal_dialog.ts
1460
- function mn(e) {
1461
- return Zt(e).filter((e) => !e.hasAttribute(Bt));
1526
+ function Sn(e) {
1527
+ return an(e).filter((e) => !e.hasAttribute(qt));
1462
1528
  }
1463
- function hn({ dialog: e, content: t, fallbackScope: n }) {
1464
- let r = t ? mn(t)[0] : void 0;
1465
- return r || n === "content" ? r : e ? mn(e)[0] : void 0;
1529
+ function Cn({ dialog: e, content: t, fallbackScope: n }) {
1530
+ let r = t ? Sn(t)[0] : void 0;
1531
+ return r || n === "content" ? r : e ? Sn(e)[0] : void 0;
1466
1532
  }
1467
- function gn(e) {
1468
- let t = hn(e);
1533
+ function wn(e) {
1534
+ let t = Cn(e);
1469
1535
  (e.initialFocusRef?.current ?? t ?? e.dialog)?.focus();
1470
1536
  }
1471
- function _n(e, t) {
1472
- let n = Zt(t);
1537
+ function Tn(e, t) {
1538
+ let n = an(t);
1473
1539
  if (n.length === 0) {
1474
1540
  e.preventDefault(), t.focus();
1475
1541
  return;
@@ -1477,115 +1543,115 @@ function _n(e, t) {
1477
1543
  let r = n[0], i = n[n.length - 1], a = document.activeElement;
1478
1544
  (a instanceof HTMLElement ? n.indexOf(a) : -1) === -1 ? (e.preventDefault(), (e.shiftKey ? i : r).focus()) : e.shiftKey && a === r ? (e.preventDefault(), i.focus()) : !e.shiftKey && a === i && (e.preventDefault(), r.focus());
1479
1545
  }
1480
- function vn() {
1546
+ function En() {
1481
1547
  return typeof document > "u" ? null : document.activeElement instanceof HTMLElement ? document.activeElement : null;
1482
1548
  }
1483
- function yn() {
1484
- let [e, t] = d(!1);
1485
- return o(() => {
1549
+ function Dn() {
1550
+ let [e, t] = h(!1);
1551
+ return l(() => {
1486
1552
  let e = requestAnimationFrame(() => {
1487
1553
  requestAnimationFrame(() => t(!0));
1488
1554
  });
1489
1555
  return () => cancelAnimationFrame(e);
1490
1556
  }, []), e;
1491
1557
  }
1492
- function bn(e, { isEnded: t, onDismiss: n, dismissible: r, modalToken: i }) {
1493
- o(() => {
1558
+ function On(e, { isEnded: t, modalToken: n }) {
1559
+ l(() => {
1494
1560
  if (t) return;
1495
- let a = (t) => {
1496
- if (pn(i)) {
1561
+ let r = (t) => {
1562
+ if (bn(n)) {
1497
1563
  if (t.key === "Escape") {
1498
1564
  if (t.defaultPrevented) return;
1499
- t.preventDefault(), r && n();
1500
- } else t.key === "Tab" && e.current && _n(t, e.current);
1565
+ t.preventDefault(), xn();
1566
+ } else t.key === "Tab" && e.current && Tn(t, e.current);
1501
1567
  }
1502
1568
  };
1503
- return document.addEventListener("keydown", a), () => document.removeEventListener("keydown", a);
1569
+ return document.addEventListener("keydown", r), () => document.removeEventListener("keydown", r);
1504
1570
  }, [
1505
1571
  t,
1506
1572
  n,
1507
- r,
1508
- i,
1509
1573
  e
1510
1574
  ]);
1511
1575
  }
1512
- function xn({ isEnded: e, onDismiss: t, dismissible: n, initialFocusRef: r, initialFocusFallbackScope: i = "dialog", getFocusFallback: a }) {
1513
- let [s] = d(() => Symbol("modal")), [c, l] = d(null), f = u(null), p = u(null), [m] = d(vn);
1514
- o(() => {
1515
- if (!e) return fn(s);
1516
- }, [e, s]), un();
1517
- let h = yn();
1518
- return o(() => {
1519
- c && !e && gn({
1520
- dialog: f.current,
1521
- content: p.current,
1576
+ function kn({ isEnded: e, onDismiss: t, dismissible: n, initialFocusRef: r, initialFocusFallbackScope: i = "dialog", getFocusFallback: a }) {
1577
+ let [o] = h(() => Symbol("modal")), [s, c] = h(null), u = m(null), d = m(null), [p] = h(En), g = m(() => {});
1578
+ f(() => {
1579
+ g.current = () => {
1580
+ n && t();
1581
+ };
1582
+ }), l(() => {
1583
+ if (!e) return yn(o, () => g.current());
1584
+ }, [e, o]), _n();
1585
+ let _ = Dn();
1586
+ return l(() => {
1587
+ s && !e && wn({
1588
+ dialog: u.current,
1589
+ content: d.current,
1522
1590
  initialFocusRef: r,
1523
1591
  fallbackScope: i
1524
1592
  });
1525
- }, [c, e]), o(() => {
1526
- e && (m?.isConnected ? m : a?.())?.focus({ preventScroll: !0 });
1593
+ }, [s, e]), l(() => {
1594
+ e && (p?.isConnected ? p : a?.())?.focus({ preventScroll: !0 });
1527
1595
  }, [
1528
1596
  e,
1529
- m,
1597
+ p,
1530
1598
  a
1531
- ]), bn(f, {
1599
+ ]), On(u, {
1532
1600
  isEnded: e,
1533
- onDismiss: t,
1534
- dismissible: n,
1535
- modalToken: s
1601
+ modalToken: o
1536
1602
  }), {
1537
- dialogRef: f,
1538
- contentRef: p,
1539
- footerSlot: c,
1540
- setFooterSlot: l,
1541
- isVisible: h && !e,
1603
+ dialogRef: u,
1604
+ contentRef: d,
1605
+ footerSlot: s,
1606
+ setFooterSlot: c,
1607
+ isVisible: _ && !e,
1542
1608
  handleBackdropClick: () => {
1543
1609
  !e && n && t();
1544
1610
  },
1545
1611
  handleBackdropMouseDown: (e) => {
1546
1612
  let t = e.target;
1547
- e.currentTarget.contains(t) && !f.current?.contains(t) && e.preventDefault();
1613
+ e.currentTarget.contains(t) && !u.current?.contains(t) && e.preventDefault();
1548
1614
  }
1549
1615
  };
1550
1616
  }
1551
1617
  // src/stores/global_hotkeys_store/global_hotkeys_store.ts
1552
- var Sn = S((e) => ({
1618
+ var An = C((e) => ({
1553
1619
  globalHotkeysEnabled: !0,
1554
1620
  setGlobalHotkeysEnabled: (t) => e({ globalHotkeysEnabled: t })
1555
- })), Cn = 0;
1556
- function wn() {
1557
- o(() => (Cn += 1, Cn === 1 && Sn.getState().setGlobalHotkeysEnabled(!1), () => {
1558
- --Cn, Cn === 0 && Sn.getState().setGlobalHotkeysEnabled(!0);
1621
+ })), jn = 0;
1622
+ function Mn() {
1623
+ l(() => (jn += 1, jn === 1 && An.getState().setGlobalHotkeysEnabled(!1), () => {
1624
+ --jn, jn === 0 && An.getState().setGlobalHotkeysEnabled(!0);
1559
1625
  }), []);
1560
1626
  }
1561
1627
  // src/components/drawer/drawer.tsx
1562
- function Tn() {
1628
+ function Nn() {
1563
1629
  let e = document.querySelector("main");
1564
1630
  return e && !e.hasAttribute("tabindex") && (e.tabIndex = -1), e;
1565
1631
  }
1566
- function En({ isEnded: t, onDismiss: n, title: r, children: i, footer: a, size: o, side: c, radius: l, className: u, panelClassName: d, backdropClassName: f, unstyled: h = !1, dismissible: g, closeLabel: _, initialFocusRef: v }) {
1567
- wn();
1568
- let y = s(), { dismiss: b, registry: S } = zt({
1569
- onDismiss: n,
1632
+ function Pn({ isEnded: t, onDismiss: i, title: a, children: o, footer: s, size: c, side: l, radius: u, className: f, panelClassName: p, backdropClassName: m, unstyled: h = !1, dismissible: g, closeLabel: _, initialFocusRef: v }) {
1633
+ Mn();
1634
+ let y = d(), { dismiss: b, registry: x } = Kt({
1635
+ onDismiss: i,
1570
1636
  isEnded: t
1571
- }), { dialogRef: C, contentRef: w, footerSlot: T, setFooterSlot: E, isVisible: D, handleBackdropClick: O, handleBackdropMouseDown: k } = xn({
1637
+ }), { dialogRef: C, contentRef: w, footerSlot: T, setFooterSlot: E, isVisible: D, handleBackdropClick: O, handleBackdropMouseDown: k } = kn({
1572
1638
  isEnded: t,
1573
1639
  onDismiss: b,
1574
1640
  dismissible: g,
1575
1641
  initialFocusRef: v,
1576
1642
  initialFocusFallbackScope: "content",
1577
- getFocusFallback: Tn
1578
- }), { focusClassName: A, ...j } = en(w, { labelledBy: y });
1579
- return /* @__PURE__ */ p(yt.Provider, {
1580
- value: S,
1581
- children: x(/* @__PURE__ */ m("div", {
1643
+ getFocusFallback: Nn
1644
+ }), { focusClassName: A, ...j } = cn(w, { labelledBy: y });
1645
+ return /* @__PURE__ */ n(Vt.Provider, {
1646
+ value: x,
1647
+ children: S(/* @__PURE__ */ r("div", {
1582
1648
  className: e("fixed inset-0 z-50", !h && "transition-opacity duration-200 ease-out", D ? "opacity-100" : "opacity-0"),
1583
1649
  onClick: O,
1584
1650
  onMouseDown: k,
1585
- children: [/* @__PURE__ */ p("div", {
1586
- className: e("fixed inset-0", !h && "bg-black/60 backdrop-blur-md", f),
1651
+ children: [/* @__PURE__ */ n("div", {
1652
+ className: e("fixed inset-0", !h && "bg-black/60 backdrop-blur-md", m),
1587
1653
  "aria-hidden": "true"
1588
- }), /* @__PURE__ */ m("div", {
1654
+ }), /* @__PURE__ */ r("div", {
1589
1655
  ref: C,
1590
1656
  role: "dialog",
1591
1657
  "aria-modal": "true",
@@ -1593,525 +1659,527 @@ function En({ isEnded: t, onDismiss: n, title: r, children: i, footer: a, size:
1593
1659
  tabIndex: -1,
1594
1660
  "data-state": D ? "open" : "closed",
1595
1661
  inert: t,
1596
- className: e("fixed inset-y-0 h-full flex flex-col overflow-hidden", gt[c], ht[o], "focus:outline-none", !h && [
1662
+ className: e("fixed inset-y-0 h-full flex flex-col overflow-hidden", Rt[l], Lt[c], "focus:outline-none", !h && [
1597
1663
  "bg-white dark:bg-gray-900",
1598
1664
  "[&,&_*]:[scrollbar-width:thin] [scrollbar-color:theme(colors.gray.300)_transparent] hover:[scrollbar-color:theme(colors.gray.400)_transparent] dark:[scrollbar-color:theme(colors.gray.600)_transparent] dark:hover:[scrollbar-color:theme(colors.gray.500)_transparent]",
1599
1665
  "shadow-2xl",
1600
- vt[c][l],
1666
+ Bt[l][u],
1601
1667
  "ms-drawer-transition"
1602
- ], !D && _t[c], d),
1668
+ ], !D && zt[l], p),
1603
1669
  onClick: (e) => e.stopPropagation(),
1604
1670
  children: [
1605
- /* @__PURE__ */ p(Lt, {
1671
+ /* @__PURE__ */ n(Wt, {
1606
1672
  titleId: y,
1607
- title: r,
1673
+ title: a,
1608
1674
  onDismiss: b,
1609
1675
  dismissible: g,
1610
1676
  closeLabel: _,
1611
1677
  unstyled: h
1612
1678
  }),
1613
- /* @__PURE__ */ p("div", {
1679
+ /* @__PURE__ */ n("div", {
1614
1680
  ref: w,
1615
1681
  ...j,
1616
- className: e("flex-1 overflow-y-auto min-h-0", !h && "px-6 pb-6 text-sm leading-relaxed text-gray-600 dark:text-gray-400", A, u),
1617
- children: /* @__PURE__ */ p(xt.Provider, {
1682
+ className: e("flex-1 overflow-y-auto min-h-0", !h && "px-6 pb-6 text-sm leading-relaxed text-gray-600 dark:text-gray-400", A, f),
1683
+ children: /* @__PURE__ */ n(Ut.Provider, {
1618
1684
  value: T,
1619
- children: i
1685
+ children: o
1620
1686
  })
1621
1687
  }),
1622
- /* @__PURE__ */ p(bt, {
1688
+ /* @__PURE__ */ n(Ht, {
1623
1689
  onSlotChange: E,
1624
1690
  unstyled: h,
1625
- children: a
1691
+ children: s
1626
1692
  })
1627
1693
  ]
1628
1694
  })]
1629
1695
  }), document.body)
1630
1696
  });
1631
1697
  }
1632
- function Dn(e) {
1633
- let [t, n] = d(!e);
1634
- return e && t && n(!1), o(() => {
1635
- if (e) return;
1636
- let t = setTimeout(() => n(!0), 200);
1698
+ function Fn(e, t) {
1699
+ let [n, r] = h(!e), i = u(() => t?.());
1700
+ return e && n && r(!1), l(() => {
1701
+ if (e || n) return;
1702
+ let t = setTimeout(() => {
1703
+ r(!0), i();
1704
+ }, 200);
1637
1705
  return () => clearTimeout(t);
1638
- }, [e]), e || !t;
1706
+ }, [e, n]), e || !n;
1639
1707
  }
1640
- function On({ isOpen: e, onClose: t, size: n = "md", side: r = "right", radius: i = "none", dismissible: a = !0, ...o }) {
1641
- return Dn(e) ? /* @__PURE__ */ p(En, {
1642
- ...o,
1708
+ function In({ isOpen: e, onClose: t, size: r = "md", side: i = "right", radius: a = "none", dismissible: o = !0, onExited: s, ...c }) {
1709
+ return Fn(e, s) ? /* @__PURE__ */ n(Pn, {
1710
+ ...c,
1643
1711
  isEnded: !e,
1644
1712
  onDismiss: t,
1645
- size: n,
1646
- side: r,
1647
- radius: i,
1648
- dismissible: a
1713
+ size: r,
1714
+ side: i,
1715
+ radius: a,
1716
+ dismissible: o
1649
1717
  }) : null;
1650
1718
  }
1651
1719
  // src/components/shared/use_controlled_length.ts
1652
- function kn(e) {
1720
+ function Ln(e) {
1653
1721
  return typeof e == "string" ? e.length : 0;
1654
1722
  }
1655
- function An(e, t) {
1656
- let [n, r] = d(kn(t)), i = e !== void 0;
1723
+ function Rn(e, t) {
1724
+ let [n, r] = h(Ln(t)), i = e !== void 0;
1657
1725
  return {
1658
- length: i ? kn(e) : n,
1726
+ length: i ? Ln(e) : n,
1659
1727
  trackLength: (e) => {
1660
1728
  i || r(e.length);
1661
1729
  }
1662
1730
  };
1663
1731
  }
1664
1732
  // src/components/input/input.tsx
1665
- function jn({ label: t, description: n, error: r, showCharCount: i = !1, minLength: a, maxLength: o, radius: s = "md", unstyled: c = !1, className: l, wrapperClassName: u, value: d, defaultValue: f, onChange: h, id: g, "aria-describedby": _, "aria-label": v, ...y }) {
1666
- let { fieldId: b, errorId: x, descriptionId: S, labelId: C, characterCountId: w } = $(g), { length: T, trackLength: E } = An(d, f), D = i && (a !== void 0 || o !== void 0), O = (e) => {
1733
+ function zn({ label: t, description: i, error: a, showCharCount: o = !1, minLength: s, maxLength: c, radius: l = "md", unstyled: u = !1, className: d, wrapperClassName: f, value: p, defaultValue: m, onChange: h, id: g, "aria-describedby": _, "aria-label": v, ...y }) {
1734
+ let { fieldId: b, errorId: x, descriptionId: S, labelId: C, characterCountId: w } = $(g), { length: T, trackLength: E } = Rn(p, m), D = o && (s !== void 0 || c !== void 0), O = (e) => {
1667
1735
  E(e.target.value), h?.(e);
1668
1736
  };
1669
- return /* @__PURE__ */ m(Fe, {
1737
+ return /* @__PURE__ */ r(Ve, {
1670
1738
  fieldId: b,
1671
1739
  errorId: x,
1672
1740
  descriptionId: S,
1673
1741
  label: t,
1674
- description: n,
1675
- error: r,
1742
+ description: i,
1743
+ error: a,
1676
1744
  required: y.required,
1677
- wrapperClassName: u,
1678
- children: [/* @__PURE__ */ p("input", {
1745
+ wrapperClassName: f,
1746
+ children: [/* @__PURE__ */ n("input", {
1679
1747
  id: b,
1680
- className: e("w-full disabled:opacity-50 disabled:cursor-not-allowed", !c && [
1681
- fe,
1682
- N[s],
1748
+ className: e("w-full disabled:opacity-50 disabled:cursor-not-allowed", !u && [
1749
+ ge,
1750
+ U[l],
1683
1751
  "px-3 py-2 text-sm"
1684
- ], !c && r && e("border-red-500 dark:border-red-400", "focus:ring-red-500"), l),
1685
- ...d === void 0 ? { defaultValue: f } : { value: d },
1686
- minLength: a,
1687
- maxLength: o,
1752
+ ], !u && a && e("border-red-500 dark:border-red-400", "focus:ring-red-500"), d),
1753
+ ...p === void 0 ? { defaultValue: m } : { value: p },
1754
+ minLength: s,
1755
+ maxLength: c,
1688
1756
  onChange: O,
1689
- "aria-invalid": !!r,
1757
+ "aria-invalid": !!a,
1690
1758
  "aria-label": v,
1691
- "aria-labelledby": Ie(t, C, v),
1692
- "aria-describedby": Z(_, !!n && S, r && x, D && w),
1759
+ "aria-labelledby": He(t, C, v),
1760
+ "aria-describedby": Q(_, !!i && S, a && x, D && w),
1693
1761
  ...y
1694
- }), D && /* @__PURE__ */ p(le, {
1762
+ }), D && /* @__PURE__ */ n(pe, {
1695
1763
  id: w,
1696
1764
  current: T,
1697
- min: a,
1698
- max: o,
1699
- showMin: a !== void 0,
1700
- showMax: o !== void 0
1765
+ min: s,
1766
+ max: c,
1767
+ showMin: s !== void 0,
1768
+ showMax: c !== void 0
1701
1769
  })]
1702
1770
  });
1703
1771
  }
1704
1772
  // src/components/kbd/kbd.tsx
1705
- var Mn = {
1773
+ var Bn = {
1706
1774
  xs: "px-1.5 py-0.5 text-xs",
1707
1775
  sm: "px-2 py-0.5 text-xs",
1708
1776
  md: "px-2.5 py-1 text-sm",
1709
1777
  lg: "px-3 py-1 text-base"
1710
- }, Nn = ({ children: t, size: n = "sm", radius: r = "sm", unstyled: i = !1, className: a }) => /* @__PURE__ */ p("kbd", {
1711
- className: e("inline-flex items-center", Mn[n], !i && [
1778
+ }, Vn = ({ children: t, size: r = "sm", radius: i = "sm", unstyled: a = !1, className: o }) => /* @__PURE__ */ n("kbd", {
1779
+ className: e("inline-flex items-center", Bn[r], !a && [
1712
1780
  "border font-semibold uppercase",
1713
1781
  "text-gray-600 dark:text-gray-300",
1714
1782
  "bg-gray-100 dark:bg-gray-700",
1715
1783
  "border-gray-200 dark:border-gray-600",
1716
- N[r]
1717
- ], a),
1784
+ U[i]
1785
+ ], o),
1718
1786
  children: t
1719
- }), Pn = 4;
1720
- function Fn(e, t) {
1787
+ }), Hn = 4;
1788
+ function Un(e, t) {
1721
1789
  return t === "center" ? e : `${e}-${t}`;
1722
1790
  }
1723
- function In({ trigger: n, children: a, side: c = "bottom", align: l = "start", radius: f = "md", unstyled: h = !1, panelClassName: x, className: S, disabled: C = !1, ref: w }) {
1724
- let T = u(null), [E, D] = d(null), [O, k] = d("first"), { isMounted: A, isVisible: j, setIsVisible: M, open: N, close: P } = tt(), { refs: F, floatingStyles: I, isPositioned: L } = b({
1725
- placement: Fn(c, l),
1791
+ function Wn({ trigger: t, children: a, side: c = "bottom", align: u = "start", radius: f = "md", unstyled: p = !1, panelClassName: g, className: S, disabled: C = !1, ref: w }) {
1792
+ let T = m(null), [E, D] = h(null), [O, k] = h("first"), { isMounted: A, isVisible: j, setIsVisible: M, open: N, close: P } = ct(), { refs: F, floatingStyles: I, isPositioned: L } = x({
1793
+ placement: Un(c, u),
1726
1794
  strategy: "fixed",
1727
1795
  open: A,
1728
- whileElementsMounted: g,
1796
+ whileElementsMounted: _,
1729
1797
  middleware: [
1730
- v(Pn),
1731
- _(),
1732
- y({ padding: 8 })
1798
+ y(Hn),
1799
+ v(),
1800
+ b({ padding: 8 })
1733
1801
  ]
1734
1802
  });
1735
- nt(A, L, M);
1736
- let ee = s(), R = (r(n) ? n.props.id : void 0) ?? ee, z = `${R}-menu`, B = i(() => {
1803
+ lt(A, L, M);
1804
+ let R = d(), z = (o(t) ? t.props.id : void 0) ?? R, B = `${z}-menu`, V = s(() => {
1737
1805
  P(), T.current?.querySelector("button, [href], [tabindex]")?.focus({ preventScroll: !0 });
1738
- }, [P]), V = i((e) => Ee(F.setReference, T, D, w)(e), [F, w]);
1739
- o(() => {
1806
+ }, [P]), H = s((e) => Me(F.setReference, T, D, w)(e), [F, w]);
1807
+ l(() => {
1740
1808
  C && A && P();
1741
1809
  }, [
1742
1810
  C,
1743
1811
  A,
1744
1812
  P
1745
1813
  ]);
1746
- let H = {
1747
- id: R,
1814
+ let U = {
1815
+ id: z,
1748
1816
  onClick: (e) => {
1749
- e.stopPropagation(), !C && (j ? P() : (k("first"), N(L)), r(n) && n.props.onClick?.(e));
1817
+ e.stopPropagation(), !C && (j ? P() : (k("first"), N(L)), o(t) && t.props.onClick?.(e));
1750
1818
  },
1751
1819
  onKeyDown: (e) => {
1752
- C || (!j && e.key === "ArrowDown" ? (e.preventDefault(), k("first"), N(L)) : !j && e.key === "ArrowUp" && (e.preventDefault(), k("last"), N(L)), r(n) && n.props.onKeyDown?.(e));
1820
+ C || (!j && e.key === "ArrowDown" ? (e.preventDefault(), k("first"), N(L)) : !j && e.key === "ArrowUp" && (e.preventDefault(), k("last"), N(L)), o(t) && t.props.onKeyDown?.(e));
1753
1821
  },
1754
1822
  "aria-haspopup": "menu",
1755
1823
  "aria-expanded": A,
1756
- "aria-controls": A ? z : void 0
1757
- }, te = r(n) ? t(n, H) : n;
1758
- return /* @__PURE__ */ m("span", {
1759
- ref: V,
1824
+ "aria-controls": A ? B : void 0
1825
+ }, ee = o(t) ? i(t, U) : t;
1826
+ return /* @__PURE__ */ r("span", {
1827
+ ref: H,
1760
1828
  className: e("inline-flex", S),
1761
- children: [te, A && /* @__PURE__ */ p(Qe, {
1762
- id: z,
1763
- labelledBy: R,
1829
+ children: [ee, A && /* @__PURE__ */ n(at, {
1830
+ id: B,
1831
+ labelledBy: z,
1764
1832
  setFloating: F.setFloating,
1765
1833
  floatingStyles: I,
1766
1834
  isVisible: j,
1767
1835
  isPositioned: L,
1768
1836
  radius: f,
1769
- unstyled: h,
1770
- panelClassName: x,
1771
- onClose: B,
1837
+ unstyled: p,
1838
+ panelClassName: g,
1839
+ onClose: V,
1772
1840
  initialFocus: O,
1773
- portalTarget: et(E),
1841
+ portalTarget: st(E),
1774
1842
  children: a
1775
1843
  })]
1776
1844
  });
1777
1845
  }
1778
1846
  // src/components/menu_group/menu_group.tsx
1779
- function Ln({ label: t, children: n, unstyled: r = !1, className: i, wrapperClassName: a }) {
1780
- let o = s();
1781
- return /* @__PURE__ */ m("div", {
1847
+ function Gn({ label: t, children: i, unstyled: a = !1, className: o, wrapperClassName: s }) {
1848
+ let c = d();
1849
+ return /* @__PURE__ */ r("div", {
1782
1850
  role: "group",
1783
- "aria-labelledby": o,
1784
- className: a,
1785
- children: [/* @__PURE__ */ p("div", {
1786
- id: o,
1851
+ "aria-labelledby": c,
1852
+ className: s,
1853
+ children: [/* @__PURE__ */ n("div", {
1854
+ id: c,
1787
1855
  role: "presentation",
1788
- className: e(!r && "px-3 pt-2 pb-1 text-xs font-medium text-gray-500 dark:text-gray-400", i),
1856
+ className: e(!a && "px-3 pt-2 pb-1 text-xs font-medium text-gray-500 dark:text-gray-400", o),
1789
1857
  children: t
1790
- }), n]
1858
+ }), i]
1791
1859
  });
1792
1860
  }
1793
1861
  // src/components/menu_item/menu_item_content.tsx
1794
- var Rn = ({ icon: t, danger: n = !1, unstyled: r = !1, children: i }) => /* @__PURE__ */ m(f, { children: [t && /* @__PURE__ */ p("span", {
1795
- className: e(t, "h-4 w-4 flex-shrink-0", !n && !r && "text-gray-500 dark:text-gray-400"),
1862
+ var Kn = ({ icon: i, danger: a = !1, unstyled: o = !1, children: s }) => /* @__PURE__ */ r(t, { children: [i && /* @__PURE__ */ n("span", {
1863
+ className: e(i, "h-4 w-4 flex-shrink-0", !a && !o && "text-gray-500 dark:text-gray-400"),
1796
1864
  "aria-hidden": "true"
1797
- }), i] });
1865
+ }), s] });
1798
1866
  // src/components/menu_item/menu_item_end.tsx
1799
- function zn({ trailing: t, selected: n, unstyled: r = !1 }) {
1800
- let i = n !== void 0;
1801
- return !t && !i ? null : /* @__PURE__ */ m("span", {
1867
+ function qn({ trailing: t, selected: i, unstyled: a = !1 }) {
1868
+ let o = i !== void 0;
1869
+ return !t && !o ? null : /* @__PURE__ */ r("span", {
1802
1870
  className: "ml-auto flex flex-shrink-0 items-center gap-2 pl-2",
1803
- children: [t && /* @__PURE__ */ p("span", {
1804
- className: e(!r && "text-xs text-gray-500 dark:text-gray-400"),
1871
+ children: [t && /* @__PURE__ */ n("span", {
1872
+ className: e(!a && "text-xs text-gray-500 dark:text-gray-400"),
1805
1873
  children: t
1806
- }), i && /* @__PURE__ */ p("span", {
1807
- className: e("i-mdi-check h-4 w-4", !r && "text-blue-600 dark:text-blue-400", !n && "invisible"),
1874
+ }), o && /* @__PURE__ */ n("span", {
1875
+ className: e("i-mdi-check h-4 w-4", !a && "text-blue-600 dark:text-blue-400", !i && "invisible"),
1808
1876
  "aria-hidden": "true"
1809
1877
  })]
1810
1878
  });
1811
1879
  }
1812
1880
  // src/components/menu_item/menu_item_styles.ts
1813
- var Bn = "flex w-full cursor-pointer items-center whitespace-nowrap text-left", Vn = "gap-2 px-3 py-2 text-sm transition-colors", Hn = {
1881
+ var Jn = "flex w-full cursor-pointer items-center whitespace-nowrap text-left", Yn = "gap-2 px-3 py-2 text-sm transition-colors", Xn = {
1814
1882
  default: "text-gray-900 dark:text-gray-100 focus-visible:bg-blue-50 dark:focus-visible:bg-blue-900/40",
1815
1883
  danger: "text-red-700 dark:text-red-400 focus-visible:bg-red-50 dark:focus-visible:bg-red-950/40"
1816
1884
  };
1817
- function Un({ hoverClasses: t, stateClasses: n, danger: r, unstyled: i, radius: a, className: o }) {
1885
+ function Zn({ hoverClasses: t, stateClasses: n, danger: r, unstyled: i, radius: a, className: o }) {
1818
1886
  let s = r ? "danger" : "default";
1819
- return e(Bn, !i && [
1887
+ return e(Jn, !i && [
1820
1888
  "outline-hidden focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-blue-500 dark:focus-visible:outline-blue-400",
1821
- Vn,
1822
- Hn[s],
1889
+ Yn,
1890
+ Xn[s],
1823
1891
  t[s],
1824
- a && N[a]
1892
+ a && U[a]
1825
1893
  ], n, o);
1826
1894
  }
1827
1895
  // src/components/menu_item/menu_item_button.tsx
1828
- var Wn = {
1896
+ var Qn = {
1829
1897
  default: "hover:enabled:bg-gray-50 dark:hover:enabled:bg-gray-800/60",
1830
1898
  danger: "hover:enabled:bg-red-50 dark:hover:enabled:bg-red-950/40"
1831
- }, Gn = ["disabled:cursor-not-allowed disabled:opacity-50"];
1832
- function Kn({ icon: e, trailing: t, onClick: n, selected: r, danger: i = !1, disabled: a = !1, children: o, radius: s, unstyled: c = !1, className: l, ref: u }) {
1833
- let d = We();
1834
- return /* @__PURE__ */ m("button", {
1835
- ref: u,
1899
+ }, $n = ["disabled:cursor-not-allowed disabled:opacity-50"];
1900
+ function er({ icon: e, trailing: t, onClick: i, selected: a, danger: o = !1, disabled: s = !1, children: c, radius: l, unstyled: u = !1, className: d, ref: f }) {
1901
+ let p = Ze();
1902
+ return /* @__PURE__ */ r("button", {
1903
+ ref: f,
1836
1904
  type: "button",
1837
- role: r === void 0 ? "menuitem" : "menuitemradio",
1838
- "aria-checked": r,
1905
+ role: a === void 0 ? "menuitem" : "menuitemradio",
1906
+ "aria-checked": a,
1839
1907
  tabIndex: -1,
1840
1908
  onClick: (e) => {
1841
- e.stopPropagation(), n(e), d?.();
1909
+ e.stopPropagation(), i(e), p?.();
1842
1910
  },
1843
- disabled: a,
1844
- className: Un({
1845
- hoverClasses: Wn,
1846
- stateClasses: Gn,
1847
- danger: i,
1848
- unstyled: c,
1849
- radius: s,
1850
- className: l
1911
+ disabled: s,
1912
+ className: Zn({
1913
+ hoverClasses: Qn,
1914
+ stateClasses: $n,
1915
+ danger: o,
1916
+ unstyled: u,
1917
+ radius: l,
1918
+ className: d
1851
1919
  }),
1852
- children: [/* @__PURE__ */ p(Rn, {
1920
+ children: [/* @__PURE__ */ n(Kn, {
1853
1921
  icon: e,
1854
- danger: i,
1855
- unstyled: c,
1856
- children: o
1857
- }), /* @__PURE__ */ p(zn, {
1922
+ danger: o,
1923
+ unstyled: u,
1924
+ children: c
1925
+ }), /* @__PURE__ */ n(qn, {
1858
1926
  trailing: t,
1859
- selected: r,
1860
- unstyled: c
1927
+ selected: a,
1928
+ unstyled: u
1861
1929
  })]
1862
1930
  });
1863
1931
  }
1864
1932
  // src/components/menu_item/menu_item_link.tsx
1865
- var qn = "_blank", Jn = "noopener noreferrer", Yn = {
1933
+ var tr = "_blank", nr = "noopener noreferrer", rr = {
1866
1934
  default: "hover:bg-gray-50 dark:hover:bg-gray-800/60",
1867
1935
  danger: "hover:bg-red-50 dark:hover:bg-red-950/40"
1868
- }, Xn = ["no-underline", "aria-disabled:pointer-events-none aria-disabled:cursor-not-allowed aria-disabled:opacity-50"];
1869
- function Zn({ icon: e, trailing: t, href: n, target: r, rel: i, danger: a = !1, disabled: o = !1, children: s, radius: c, unstyled: l = !1, className: u, ref: d }) {
1870
- let f = We();
1871
- return /* @__PURE__ */ m("a", {
1872
- ref: d,
1936
+ }, ir = ["no-underline", "aria-disabled:pointer-events-none aria-disabled:cursor-not-allowed aria-disabled:opacity-50"];
1937
+ function ar({ icon: e, trailing: t, href: i, target: a, rel: o, danger: s = !1, disabled: c = !1, children: l, radius: u, unstyled: d = !1, className: f, ref: p }) {
1938
+ let m = Ze();
1939
+ return /* @__PURE__ */ r("a", {
1940
+ ref: p,
1873
1941
  role: "menuitem",
1874
1942
  tabIndex: -1,
1875
- href: o ? void 0 : n,
1876
- target: r,
1877
- rel: i ?? (r === qn ? Jn : void 0),
1878
- "aria-disabled": o || void 0,
1943
+ href: c ? void 0 : i,
1944
+ target: a,
1945
+ rel: o ?? (a === tr ? nr : void 0),
1946
+ "aria-disabled": c || void 0,
1879
1947
  onClick: (e) => {
1880
- e.stopPropagation(), f?.();
1948
+ e.stopPropagation(), m?.();
1881
1949
  },
1882
- className: Un({
1883
- hoverClasses: Yn,
1884
- stateClasses: Xn,
1885
- danger: a,
1886
- unstyled: l,
1887
- radius: c,
1888
- className: u
1950
+ className: Zn({
1951
+ hoverClasses: rr,
1952
+ stateClasses: ir,
1953
+ danger: s,
1954
+ unstyled: d,
1955
+ radius: u,
1956
+ className: f
1889
1957
  }),
1890
- children: [/* @__PURE__ */ p(Rn, {
1958
+ children: [/* @__PURE__ */ n(Kn, {
1891
1959
  icon: e,
1892
- danger: a,
1893
- unstyled: l,
1894
- children: s
1895
- }), /* @__PURE__ */ p(zn, {
1960
+ danger: s,
1961
+ unstyled: d,
1962
+ children: l
1963
+ }), /* @__PURE__ */ n(qn, {
1896
1964
  trailing: t,
1897
- unstyled: l
1965
+ unstyled: d
1898
1966
  })]
1899
1967
  });
1900
1968
  }
1901
1969
  // src/components/menu_item/menu_item.tsx
1902
- function Qn(e) {
1903
- return e.href === void 0 ? /* @__PURE__ */ p(Kn, { ...e }) : /* @__PURE__ */ p(Zn, { ...e });
1970
+ function or(e) {
1971
+ return e.href === void 0 ? /* @__PURE__ */ n(er, { ...e }) : /* @__PURE__ */ n(ar, { ...e });
1904
1972
  }
1905
1973
  // src/components/menu_separator/menu_separator.tsx
1906
- var $n = ({ unstyled: t = !1, className: n }) => /* @__PURE__ */ p("hr", {
1974
+ var sr = ({ unstyled: t = !1, className: r }) => /* @__PURE__ */ n("hr", {
1907
1975
  "aria-orientation": "horizontal",
1908
- className: e("w-full", !t && ["my-1 border-0 border-t", "border-gray-100 dark:border-gray-800"], n)
1909
- }), er = {
1976
+ className: e("w-full", !t && ["my-1 border-0 border-t", "border-gray-100 dark:border-gray-800"], r)
1977
+ }), cr = {
1910
1978
  danger: "i-mdi-alert-circle",
1911
1979
  primary: "i-mdi-help-circle",
1912
1980
  success: "i-mdi-check-circle"
1913
- }, tr = {
1981
+ }, lr = {
1914
1982
  danger: "bg-red-50 text-red-600 dark:bg-red-500/10 dark:text-red-400",
1915
1983
  primary: "bg-blue-50 text-blue-600 dark:bg-blue-500/10 dark:text-blue-400",
1916
1984
  success: "bg-green-50 text-green-600 dark:bg-green-500/10 dark:text-green-400"
1917
1985
  };
1918
- function nr({ title: t, color: n }) {
1919
- return /* @__PURE__ */ m("div", {
1986
+ function ur({ title: t, color: i }) {
1987
+ return /* @__PURE__ */ r("div", {
1920
1988
  className: "flex items-center gap-3",
1921
- children: [/* @__PURE__ */ p("span", {
1922
- className: e("flex h-9 w-9 shrink-0 items-center justify-center rounded-full", tr[n]),
1989
+ children: [/* @__PURE__ */ n("span", {
1990
+ className: e("flex h-9 w-9 shrink-0 items-center justify-center rounded-full", lr[i]),
1923
1991
  "aria-hidden": "true",
1924
- children: /* @__PURE__ */ p("span", { className: e(er[n], "h-5 w-5") })
1992
+ children: /* @__PURE__ */ n("span", { className: e(cr[i], "h-5 w-5") })
1925
1993
  }), t]
1926
1994
  });
1927
1995
  }
1928
1996
  // src/components/modal/modal_shell.tsx
1929
- var rr = "a dialog needs an accessible name. Provide a non-empty `title` or `aria-label` prop.", ir = {
1997
+ var dr = "a dialog needs an accessible name. Provide a non-empty `title` or `aria-label` prop.", fr = {
1930
1998
  sm: "max-w-md",
1931
1999
  md: "max-w-lg",
1932
2000
  lg: "max-w-2xl",
1933
2001
  xl: "max-w-4xl"
1934
- }, ar = {
2002
+ }, pr = {
1935
2003
  auto: "",
1936
2004
  fixed: "ms-modal-height-fixed"
1937
- }, or = {
2005
+ }, mr = {
1938
2006
  auto: "overflow-y-auto",
1939
2007
  fixed: "overflow-hidden flex flex-col"
1940
2008
  };
1941
- function sr({ isEnded: t, onDismiss: n, title: r, children: i, footer: a, size: o = "md", height: c = "auto", radius: l = "xl", className: u, panelClassName: d, backdropClassName: f, unstyled: h = !1, dismissible: g = !0, closeLabel: _, role: v = "dialog", initialFocusRef: y, "aria-label": b }) {
1942
- let S = s(), C = s(), { dialogRef: w, contentRef: T, footerSlot: E, setFooterSlot: D, isVisible: O, handleBackdropClick: k, handleBackdropMouseDown: A } = xn({
2009
+ function hr({ isEnded: t, onDismiss: i, title: a, children: o, footer: s, size: c = "md", height: l = "auto", radius: u = "xl", className: f, panelClassName: p, backdropClassName: m, unstyled: h = !1, dismissible: g = !0, closeLabel: _, role: v = "dialog", initialFocusRef: y, "aria-label": b }) {
2010
+ let x = d(), C = d(), { dialogRef: w, contentRef: T, footerSlot: E, setFooterSlot: D, isVisible: O, handleBackdropClick: k, handleBackdropMouseDown: A } = kn({
1943
2011
  isEnded: t,
1944
- onDismiss: n,
2012
+ onDismiss: i,
1945
2013
  dismissible: g,
1946
2014
  initialFocusRef: y
1947
2015
  });
1948
- Te("Modal", !!r || !!b?.trim(), rr);
1949
- let { focusClassName: j, ...M } = en(T, {
1950
- labelledBy: r ? S : void 0,
2016
+ je("Modal", !!a || !!b?.trim(), dr);
2017
+ let { focusClassName: j, ...M } = cn(T, {
2018
+ labelledBy: a ? x : void 0,
1951
2019
  label: b
1952
- }), P = c === "auto", F = v === "alertdialog" && !!i;
1953
- return x(/* @__PURE__ */ m("div", {
2020
+ }), N = l === "auto", P = v === "alertdialog" && !!o;
2021
+ return S(/* @__PURE__ */ r("div", {
1954
2022
  className: e("fixed inset-0 z-50 flex items-start justify-center", "ms-modal-backdrop-padding", !h && "transition-opacity duration-200 ease-out", O ? "opacity-100" : "opacity-0"),
1955
2023
  onClick: k,
1956
2024
  onMouseDown: A,
1957
- children: [/* @__PURE__ */ p("div", {
2025
+ children: [/* @__PURE__ */ n("div", {
1958
2026
  className: e("fixed inset-0", !h && [
1959
2027
  "bg-black/60 backdrop-blur-md",
1960
2028
  "transition-opacity duration-200 ease-out",
1961
2029
  O ? "opacity-100" : "opacity-0"
1962
- ], f),
2030
+ ], m),
1963
2031
  "aria-hidden": "true"
1964
- }), /* @__PURE__ */ m("div", {
2032
+ }), /* @__PURE__ */ r("div", {
1965
2033
  ref: w,
1966
2034
  role: v,
1967
2035
  "aria-modal": "true",
1968
- "aria-labelledby": r ? S : void 0,
1969
- "aria-label": r ? void 0 : b,
1970
- "aria-describedby": F ? C : void 0,
2036
+ "aria-labelledby": a ? x : void 0,
2037
+ "aria-label": a ? void 0 : b,
2038
+ "aria-describedby": P ? C : void 0,
1971
2039
  tabIndex: -1,
1972
2040
  "data-state": O ? "open" : "closed",
1973
- className: e("relative w-full", ir[o], ar[c], "ms-modal-max-height overflow-hidden flex flex-col", "focus:outline-none", !h && [
2041
+ className: e("relative w-full", fr[c], pr[l], "ms-modal-max-height overflow-hidden flex flex-col", "focus:outline-none", !h && [
1974
2042
  "bg-white dark:bg-gray-900",
1975
2043
  "[&,&_*]:[scrollbar-width:thin] [scrollbar-color:theme(colors.gray.300)_transparent] hover:[scrollbar-color:theme(colors.gray.400)_transparent] dark:[scrollbar-color:theme(colors.gray.600)_transparent] dark:hover:[scrollbar-color:theme(colors.gray.500)_transparent]",
1976
2044
  "shadow-2xl",
1977
- N[l],
2045
+ U[u],
1978
2046
  "transition-all duration-200 ease-out",
1979
2047
  O ? "opacity-100" : "ms-modal-panel-closed"
1980
- ], d),
2048
+ ], p),
1981
2049
  onClick: (e) => e.stopPropagation(),
1982
2050
  children: [
1983
- r && /* @__PURE__ */ p(Lt, {
1984
- titleId: S,
1985
- title: r,
1986
- onDismiss: n,
2051
+ a && /* @__PURE__ */ n(Wt, {
2052
+ titleId: x,
2053
+ title: a,
2054
+ onDismiss: i,
1987
2055
  dismissible: g,
1988
2056
  closeLabel: _,
1989
2057
  unstyled: h
1990
2058
  }),
1991
- /* @__PURE__ */ p("div", {
2059
+ /* @__PURE__ */ n("div", {
1992
2060
  ref: T,
1993
- id: F ? C : void 0,
1994
- ...P ? M : void 0,
1995
- className: e("flex-1 min-h-0", !h && "px-6 pb-6 text-sm leading-relaxed text-gray-600 dark:text-gray-400", or[c], !h && !r && "pt-6", P && j, u),
1996
- children: /* @__PURE__ */ p(xt.Provider, {
2061
+ id: P ? C : void 0,
2062
+ ...N ? M : void 0,
2063
+ className: e("flex-1 min-h-0", !h && "px-6 pb-6 text-sm leading-relaxed text-gray-600 dark:text-gray-400", mr[l], !h && !a && "pt-6", N && j, f),
2064
+ children: /* @__PURE__ */ n(Ut.Provider, {
1997
2065
  value: E,
1998
- children: i
2066
+ children: o
1999
2067
  })
2000
2068
  }),
2001
- /* @__PURE__ */ p(bt, {
2069
+ /* @__PURE__ */ n(Ht, {
2002
2070
  onSlotChange: D,
2003
2071
  unstyled: h,
2004
- children: a
2072
+ children: s
2005
2073
  })
2006
2074
  ]
2007
2075
  })]
2008
2076
  }), document.body);
2009
2077
  }
2010
2078
  // src/components/modal/confirm_modal.tsx
2011
- var cr = C(({ call: e, title: t, children: n, confirmLabel: r, cancelLabel: i, confirmColor: a, radius: o, closeLabel: s, onConfirm: c, onError: l }) => {
2012
- wn();
2013
- let [h, g] = d(!1), _ = u(null), v = () => e.end(!1), y = async () => {
2014
- if (!c) e.end(!0);
2079
+ var gr = w(({ call: e, title: i, children: a, confirmLabel: o, cancelLabel: s, confirmColor: c, radius: l, closeLabel: u, onConfirm: d, onError: f }) => {
2080
+ Mn();
2081
+ let [p, g] = h(!1), _ = m(null), v = () => e.end(!1), y = async () => {
2082
+ if (!d) e.end(!0);
2015
2083
  else {
2016
2084
  g(!0);
2017
2085
  try {
2018
- await c(), e.end(!0);
2086
+ await d(), e.end(!0);
2019
2087
  } catch (e) {
2020
- g(!1), st(e, l);
2088
+ g(!1), kt(e, f);
2021
2089
  }
2022
2090
  }
2023
- }, b = V(), x = r ?? b.confirm, S = i ?? b.cancel, C = a ?? "primary";
2024
- return /* @__PURE__ */ p(sr, {
2091
+ }, b = J(), x = o ?? b.confirm, S = s ?? b.cancel, C = c ?? "primary";
2092
+ return /* @__PURE__ */ n(hr, {
2025
2093
  isEnded: e.ended,
2026
2094
  onDismiss: v,
2027
- title: /* @__PURE__ */ p(nr, {
2028
- title: t,
2095
+ title: /* @__PURE__ */ n(ur, {
2096
+ title: i,
2029
2097
  color: C
2030
2098
  }),
2031
2099
  size: "sm",
2032
- radius: o,
2033
- closeLabel: s,
2100
+ radius: l,
2101
+ closeLabel: u,
2034
2102
  role: "alertdialog",
2035
2103
  initialFocusRef: _,
2036
- footer: /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(U, {
2104
+ footer: /* @__PURE__ */ r(t, { children: [/* @__PURE__ */ n(Y, {
2037
2105
  ref: _,
2038
2106
  variant: "outline",
2039
2107
  color: "neutral",
2040
2108
  onClick: v,
2041
- disabled: h,
2109
+ disabled: p,
2042
2110
  size: "sm",
2043
2111
  children: S
2044
- }), /* @__PURE__ */ p(U, {
2112
+ }), /* @__PURE__ */ n(Y, {
2045
2113
  color: C,
2046
2114
  onClick: () => {
2047
2115
  y();
2048
2116
  },
2049
- loading: h,
2117
+ loading: p,
2050
2118
  size: "sm",
2051
2119
  children: x
2052
2120
  })] }),
2053
- children: n
2121
+ children: a
2054
2122
  });
2055
2123
  }, 200);
2056
2124
  // src/components/modal/modal.tsx
2057
- function lr(e, t) {
2125
+ function _r(e, t) {
2058
2126
  return typeof e == "function" ? e(t) : e;
2059
2127
  }
2060
- var ur = C(({ call: e, title: t, children: n, size: r, height: i, radius: a, className: o, panelClassName: s, backdropClassName: c, unstyled: l, dismissible: u, closeLabel: d, role: f, initialFocusRef: m, "aria-label": h }) => {
2061
- wn();
2062
- let { dismiss: g, registry: _ } = zt({
2128
+ var vr = w(({ call: e, title: t, children: r, size: i, height: a, radius: o, className: s, panelClassName: c, backdropClassName: l, unstyled: u, dismissible: d, closeLabel: f, role: p, initialFocusRef: m, "aria-label": h }) => {
2129
+ Mn();
2130
+ let { dismiss: g, registry: _ } = Kt({
2063
2131
  onDismiss: () => e.end(),
2064
2132
  isEnded: e.ended
2065
2133
  });
2066
- return /* @__PURE__ */ p(yt.Provider, {
2134
+ return /* @__PURE__ */ n(Vt.Provider, {
2067
2135
  value: _,
2068
- children: /* @__PURE__ */ p(sr, {
2136
+ children: /* @__PURE__ */ n(hr, {
2069
2137
  isEnded: e.ended,
2070
2138
  onDismiss: g,
2071
2139
  title: t,
2072
- size: r,
2073
- height: i,
2074
- radius: a,
2075
- className: o,
2076
- panelClassName: s,
2077
- backdropClassName: c,
2078
- unstyled: l,
2079
- dismissible: u,
2080
- closeLabel: d,
2081
- role: f,
2140
+ size: i,
2141
+ height: a,
2142
+ radius: o,
2143
+ className: s,
2144
+ panelClassName: c,
2145
+ backdropClassName: l,
2146
+ unstyled: u,
2147
+ dismissible: d,
2148
+ closeLabel: f,
2149
+ role: p,
2082
2150
  initialFocusRef: m,
2083
2151
  "aria-label": h,
2084
- children: lr(n, g)
2152
+ children: _r(r, g)
2085
2153
  })
2086
2154
  });
2087
2155
  }, 200);
2088
2156
  // src/components/modal/modal_footer.tsx
2089
- function dr({ children: e }) {
2090
- let t = a(xt);
2091
- return t ? x(e, t) : null;
2157
+ function yr({ children: e }) {
2158
+ let t = c(Ut);
2159
+ return t ? S(e, t) : null;
2092
2160
  }
2093
2161
  // src/components/modal/use_dismiss_guard.ts
2094
- function fr(e, t = !0) {
2095
- let n = a(yt), r = u(e);
2096
- if (c(() => {
2162
+ function br(e, t = !0) {
2163
+ let n = c(Vt), r = m(e);
2164
+ if (f(() => {
2097
2165
  r.current = e;
2098
- }), o(() => {
2166
+ }), l(() => {
2099
2167
  if (n && t) return n.register(r);
2100
2168
  }, [n, t]), !n) throw Error("useDismissGuard must be used inside a Modal or a Drawer");
2101
2169
  }
2102
2170
  // src/components/modal_provider/modal_provider.tsx
2103
- function pr() {
2104
- return /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(ur, {}), /* @__PURE__ */ p(cr, {})] });
2171
+ function xr() {
2172
+ return /* @__PURE__ */ r(t, { children: [/* @__PURE__ */ n(vr, {}), /* @__PURE__ */ n(gr, {})] });
2105
2173
  }
2106
2174
  // src/components/multi_combobox/multi_combobox.tsx
2107
- var mr = 2;
2108
- function hr(e, t, n, r) {
2175
+ var Sr = 2;
2176
+ function Cr(e, t, n, r) {
2109
2177
  return r?.(e, t) ? !0 : n === void 0 || t.includes(e) ? !1 : t.length >= n;
2110
2178
  }
2111
- function gr(e, t) {
2179
+ function wr(e, t) {
2112
2180
  return e.includes(t) ? e.filter((e) => e !== t) : [...e, t];
2113
2181
  }
2114
- function _r(e, t) {
2182
+ function Tr(e, t) {
2115
2183
  if (e.length <= t) return {
2116
2184
  visibleOptions: e,
2117
2185
  hiddenCount: 0
@@ -2122,143 +2190,147 @@ function _r(e, t) {
2122
2190
  hiddenCount: e.length - n
2123
2191
  };
2124
2192
  }
2125
- function vr(e, t, n) {
2193
+ function Er(e, t, n) {
2126
2194
  return typeof e == "string" ? `${e}, ${n}` : t ? `${t}, ${n}` : n;
2127
2195
  }
2128
- var yr = "inline-flex items-center rounded-full bg-gray-200 dark:bg-gray-700 px-2 py-0.5 text-xs text-gray-900 dark:text-gray-100";
2129
- function br({ options: t, label: n, description: r, "aria-label": a, error: s, placeholder: c, searchPlaceholder: h, noResultsText: g, clearLabel: _, clearText: v, maxSelectedValues: y, isOptionDisabled: b, maxDisplayedValues: x = mr, formatOverflowCount: S, formatSelectedCount: C, formatMaxSelectedHint: w, radius: T = "sm", unstyled: E = !1, disabled: D = !1, required: O = !1, className: k, wrapperClassName: j, values: M, defaultValues: F = [], onChange: I, onDropdownClose: L, id: ee }) {
2130
- let R = V(), { fieldId: z, errorId: B, descriptionId: H, labelId: te } = $(ee), U = `${z}-listbox`, ne = `${z}-max-hint`, re = `${z}-selection`, ie = n !== void 0 || !!a, W = u(null), ae = u(null), G = u(null), [K, q] = Ce(M, F), [oe, se] = d(""), [J, ce] = d(!1), Y = l(() => {
2131
- let e = oe.trim().toLowerCase();
2132
- return e ? t.filter((t) => t.label.toLowerCase().includes(e)) : t;
2133
- }, [t, oe]), { activeIndex: le, activeOptionId: ue, move: de, first: pe, last: me, reset: he } = ze({
2134
- optionCount: Y.length,
2135
- getOptionId: (e) => `${U}-option-${e}`,
2136
- isOpen: J
2137
- }), ge = l(() => t.filter((e) => K.includes(e.value)), [t, K]), _e = ie && ge.length > 0, { visibleOptions: ve, hiddenCount: ye } = _r(ge, x), be = () => {
2138
- D || ce(!0);
2139
- }, X = i(() => {
2140
- ce(!1), se(""), he(), L?.(K);
2196
+ function Dr(e, t) {
2197
+ return e.label.toLowerCase().includes(t.trim().toLowerCase());
2198
+ }
2199
+ var Or = "inline-flex items-center rounded-full bg-gray-200 dark:bg-gray-700 px-2 py-0.5 text-xs text-gray-900 dark:text-gray-100";
2200
+ function kr({ options: i, filterOption: a = Dr, label: o, description: c, "aria-label": u, error: d, placeholder: f, searchPlaceholder: g, noResultsText: _, clearLabel: v, clearText: y, maxSelectedValues: b, isOptionDisabled: x, maxDisplayedValues: S = Sr, formatOverflowCount: C, formatSelectedCount: w, formatMaxSelectedHint: T, radius: E = "sm", unstyled: D = !1, disabled: O = !1, required: k = !1, className: A, wrapperClassName: j, values: M, defaultValues: N = [], onChange: P, onDropdownClose: F, id: I }) {
2201
+ let L = J(), { fieldId: R, errorId: B, descriptionId: V, labelId: H } = $(I), W = `${R}-listbox`, te = `${R}-max-hint`, ne = `${R}-selection`, re = o !== void 0 || !!u, ie = m(null), ae = m(null), G = m(null), [K, q] = ke(M, N), [oe, Y] = h(""), [X, se] = h(!1), ce = p(() => oe.trim() ? i.filter((e) => a(e, oe)) : i, [
2202
+ i,
2203
+ a,
2204
+ oe
2205
+ ]), { activeIndex: le, activeOptionId: ue, move: de, first: fe, last: Z, reset: pe } = Ge({
2206
+ optionCount: ce.length,
2207
+ getOptionId: (e) => `${W}-option-${e}`,
2208
+ isOpen: X
2209
+ }), me = p(() => i.filter((e) => K.includes(e.value)), [i, K]), he = re && me.length > 0, { visibleOptions: _e, hiddenCount: ve } = Tr(me, S), ye = () => {
2210
+ O || se(!0);
2211
+ }, be = s(() => {
2212
+ se(!1), Y(""), pe(), F?.(K);
2141
2213
  }, [
2142
- he,
2143
- L,
2214
+ pe,
2215
+ F,
2144
2216
  K
2145
2217
  ]), xe = () => {
2146
- J ? X() : be();
2218
+ X ? be() : ye();
2147
2219
  }, Se = (e) => {
2148
- if (hr(e, K, y, b)) return;
2149
- let t = gr(K, e);
2150
- q(t), I?.(t);
2151
- }, Q = () => {
2152
- q([]), I?.([]);
2220
+ if (Cr(e, K, b, x)) return;
2221
+ let t = wr(K, e);
2222
+ q(t), P?.(t);
2223
+ }, Ce = () => {
2224
+ q([]), P?.([]);
2153
2225
  }, we = (e) => {
2154
- e.stopPropagation(), Q(), J || L?.([]), W.current?.focus();
2226
+ e.stopPropagation(), Ce(), X || F?.([]), ie.current?.focus();
2155
2227
  }, Te = () => {
2156
- Q(), G.current?.focus();
2228
+ Ce(), G.current?.focus();
2157
2229
  }, Ee = () => {
2158
- D || xe();
2230
+ O || xe();
2159
2231
  }, De = (e) => {
2160
- se(e.target.value), he();
2232
+ Y(e.target.value), pe();
2161
2233
  }, Oe = (e) => {
2162
- e.preventDefault(), J ? de(1) : (be(), pe());
2163
- }, ke = (e) => {
2164
- e.preventDefault(), J ? de(-1) : (be(), me());
2234
+ e.preventDefault(), X ? de(1) : (ye(), fe());
2165
2235
  }, Ae = (e) => {
2166
- if (!J) return;
2236
+ e.preventDefault(), X ? de(-1) : (ye(), Z());
2237
+ }, je = (e) => {
2238
+ if (!X) return;
2167
2239
  e.preventDefault();
2168
- let t = Y[le];
2240
+ let t = ce[le];
2169
2241
  t && Se(t.value);
2170
- }, je = (e) => {
2171
- J && (e.preventDefault(), X(), W.current?.focus());
2172
2242
  }, Me = (e) => {
2243
+ X && (e.preventDefault(), be(), ie.current?.focus());
2244
+ }, Ne = (e) => {
2173
2245
  if (e.key === "ArrowDown") return Oe(e);
2174
- if (e.key === "ArrowUp") return ke(e);
2175
- if (e.key === "Enter") return Ae(e);
2176
- if (e.key === "Escape") return je(e);
2246
+ if (e.key === "ArrowUp") return Ae(e);
2247
+ if (e.key === "Enter") return je(e);
2248
+ if (e.key === "Escape") return Me(e);
2177
2249
  };
2178
- return o(() => {
2179
- if (!J) return;
2250
+ return l(() => {
2251
+ if (!X) return;
2180
2252
  let e = (e) => {
2181
- ae.current && !ae.current.contains(e.target) && X();
2253
+ ae.current && !ae.current.contains(e.target) && be();
2182
2254
  };
2183
2255
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
2184
- }, [J, X]), /* @__PURE__ */ p(Fe, {
2185
- fieldId: z,
2256
+ }, [X, be]), /* @__PURE__ */ n(Ve, {
2257
+ fieldId: R,
2186
2258
  errorId: B,
2187
- descriptionId: H,
2188
- label: n,
2189
- description: r,
2190
- error: s,
2191
- required: O,
2259
+ descriptionId: V,
2260
+ label: o,
2261
+ description: c,
2262
+ error: d,
2263
+ required: k,
2192
2264
  wrapperClassName: j,
2193
- children: /* @__PURE__ */ m("div", {
2265
+ children: /* @__PURE__ */ r("div", {
2194
2266
  ref: ae,
2195
2267
  className: "relative",
2196
2268
  onBlur: (e) => {
2197
- if (!J) return;
2269
+ if (!X) return;
2198
2270
  let t = e.relatedTarget;
2199
- t instanceof Node && ae.current?.contains(t) || X();
2271
+ t instanceof Node && ae.current?.contains(t) || be();
2200
2272
  },
2201
2273
  children: [
2202
- _e && /* @__PURE__ */ p("span", {
2203
- id: re,
2274
+ he && /* @__PURE__ */ n("span", {
2275
+ id: ne,
2204
2276
  className: "sr-only",
2205
- children: ge.map((e) => e.label).join(", ")
2277
+ children: me.map((e) => e.label).join(", ")
2206
2278
  }),
2207
- /* @__PURE__ */ p("button", {
2208
- ref: W,
2279
+ /* @__PURE__ */ n("button", {
2280
+ ref: ie,
2209
2281
  type: "button",
2210
- id: z,
2282
+ id: R,
2211
2283
  role: "combobox",
2212
- disabled: D,
2213
- "aria-expanded": J,
2214
- "aria-controls": U,
2284
+ disabled: O,
2285
+ "aria-expanded": X,
2286
+ "aria-controls": W,
2215
2287
  "aria-haspopup": "listbox",
2216
- "aria-invalid": !!s,
2217
- "aria-required": O || void 0,
2218
- "aria-describedby": Z(_e && re, !!r && H, s && B),
2219
- "aria-labelledby": n && !a ? te : void 0,
2220
- "aria-label": a,
2288
+ "aria-invalid": !!d,
2289
+ "aria-required": k || void 0,
2290
+ "aria-describedby": Q(he && ne, !!c && V, d && B),
2291
+ "aria-labelledby": o && !u ? H : void 0,
2292
+ "aria-label": u,
2221
2293
  onClick: Ee,
2222
- onKeyDown: Me,
2223
- className: e("w-full flex flex-wrap items-center gap-1 text-left disabled:opacity-50 disabled:cursor-not-allowed", !E && [
2224
- fe,
2225
- N[T],
2294
+ onKeyDown: Ne,
2295
+ className: e("w-full flex flex-wrap items-center gap-1 text-left disabled:opacity-50 disabled:cursor-not-allowed", !D && [
2296
+ ge,
2297
+ U[E],
2226
2298
  "pl-3 pr-8 py-2 text-sm min-h-10"
2227
- ], !E && s && e("border-red-500 dark:border-red-400", "focus:ring-red-500"), k),
2228
- children: ge.length === 0 ? /* @__PURE__ */ p("span", {
2229
- className: e(!E && "text-gray-500 dark:text-gray-400"),
2230
- children: c
2231
- }) : /* @__PURE__ */ m(f, { children: [ve.map((t) => /* @__PURE__ */ p("span", {
2232
- className: e(!E && yr),
2299
+ ], !D && d && e("border-red-500 dark:border-red-400", "focus:ring-red-500"), A),
2300
+ children: me.length === 0 ? /* @__PURE__ */ n("span", {
2301
+ className: e(!D && "text-gray-500 dark:text-gray-400"),
2302
+ children: f
2303
+ }) : /* @__PURE__ */ r(t, { children: [_e.map((t) => /* @__PURE__ */ n("span", {
2304
+ className: e(!D && Or),
2233
2305
  children: t.label
2234
- }, t.value)), ye > 0 && /* @__PURE__ */ p("span", {
2235
- className: e(!E && yr),
2236
- children: (S ?? R.overflowCount)(ye)
2306
+ }, t.value)), ve > 0 && /* @__PURE__ */ n("span", {
2307
+ className: e(!D && Or),
2308
+ children: (C ?? L.overflowCount)(ve)
2237
2309
  })] })
2238
2310
  }),
2239
- !E && K.length > 0 && !D && /* @__PURE__ */ p("button", {
2311
+ !D && K.length > 0 && !O && /* @__PURE__ */ n("button", {
2240
2312
  type: "button",
2241
- "aria-label": _ ?? R.clearSelection,
2313
+ "aria-label": v ?? L.clearSelection,
2242
2314
  onMouseDown: (e) => e.preventDefault(),
2243
2315
  onClick: we,
2244
- className: e("absolute right-2.5 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400 hover:text-gray-600 dark:text-gray-500 dark:hover:text-gray-300 before:content-[''] before:absolute before:-inset-[4px]", "outline-hidden focus-visible:outline-2 focus-visible:outline-offset-2", A.primary.focusOutline),
2245
- children: /* @__PURE__ */ p("span", {
2316
+ className: e("absolute right-2.5 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400 hover:text-gray-600 dark:text-gray-500 dark:hover:text-gray-300 before:content-[''] before:absolute before:-inset-[4px]", "outline-hidden focus-visible:outline-2 focus-visible:outline-offset-2", z.primary.focusOutline),
2317
+ children: /* @__PURE__ */ n("span", {
2246
2318
  className: "i-mdi-close block w-4 h-4",
2247
2319
  "aria-hidden": !0
2248
2320
  })
2249
2321
  }),
2250
- J && /* @__PURE__ */ m("div", {
2322
+ X && /* @__PURE__ */ r("div", {
2251
2323
  onMouseDown: (e) => {
2252
2324
  e.target !== G.current && e.preventDefault();
2253
2325
  },
2254
- className: e("absolute z-10 mt-1 w-full text-sm shadow-lg", !E && [
2326
+ className: e("absolute z-10 mt-1 w-full text-sm shadow-lg", !D && [
2255
2327
  "border overflow-hidden",
2256
2328
  "bg-white dark:bg-gray-900",
2257
2329
  "border-gray-100 dark:border-gray-800",
2258
- P[T]
2330
+ ee[E]
2259
2331
  ]),
2260
2332
  children: [
2261
- /* @__PURE__ */ p("input", {
2333
+ /* @__PURE__ */ n("input", {
2262
2334
  ref: G,
2263
2335
  type: "text",
2264
2336
  autoFocus: !0,
@@ -2269,48 +2341,48 @@ function br({ options: t, label: n, description: r, "aria-label": a, error: s, p
2269
2341
  autoComplete: "off",
2270
2342
  value: oe,
2271
2343
  onChange: De,
2272
- onKeyDown: Me,
2273
- placeholder: h ?? R.search,
2274
- "aria-label": vr(n, a, h ?? R.search),
2275
- "aria-controls": U,
2344
+ onKeyDown: Ne,
2345
+ placeholder: g ?? L.search,
2346
+ "aria-label": Er(o, u, g ?? L.search),
2347
+ "aria-controls": W,
2276
2348
  "aria-activedescendant": ue,
2277
- "aria-describedby": y === void 0 ? void 0 : ne,
2278
- className: e("w-full", !E && [
2349
+ "aria-describedby": b === void 0 ? void 0 : te,
2350
+ className: e("w-full", !D && [
2279
2351
  "px-3 py-2 border-b bg-transparent",
2280
2352
  "outline-hidden focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-blue-500 dark:focus-visible:outline-blue-400",
2281
2353
  "text-gray-900 dark:text-gray-100 placeholder-gray-500 dark:placeholder-gray-400",
2282
2354
  "border-gray-100 dark:border-gray-800"
2283
2355
  ])
2284
2356
  }),
2285
- y !== void 0 && /* @__PURE__ */ p("div", {
2286
- id: ne,
2287
- className: e("px-3 py-1 text-xs", !E && ["border-b", "border-gray-100 dark:border-gray-800"], !E && "text-gray-500 dark:text-gray-400"),
2288
- children: (w ?? R.maxSelectedHint)(y)
2357
+ b !== void 0 && /* @__PURE__ */ n("div", {
2358
+ id: te,
2359
+ className: e("px-3 py-1 text-xs", !D && ["border-b", "border-gray-100 dark:border-gray-800"], !D && "text-gray-500 dark:text-gray-400"),
2360
+ children: (T ?? L.maxSelectedHint)(b)
2289
2361
  }),
2290
- /* @__PURE__ */ p("ul", {
2291
- id: U,
2362
+ /* @__PURE__ */ n("ul", {
2363
+ id: W,
2292
2364
  role: "listbox",
2293
- "aria-labelledby": n && !a ? te : void 0,
2294
- "aria-label": a,
2365
+ "aria-labelledby": o && !u ? H : void 0,
2366
+ "aria-label": u,
2295
2367
  "aria-multiselectable": !0,
2296
2368
  className: e("max-h-60 overflow-auto py-1", "[scrollbar-width:thin] [scrollbar-color:theme(colors.gray.300)_transparent] hover:[scrollbar-color:theme(colors.gray.400)_transparent] dark:[scrollbar-color:theme(colors.gray.600)_transparent] dark:hover:[scrollbar-color:theme(colors.gray.500)_transparent]"),
2297
- children: Y.map((t, n) => {
2298
- let r = K.includes(t.value), i = hr(t.value, K, y, b);
2299
- return /* @__PURE__ */ m("li", {
2300
- id: `${U}-option-${n}`,
2369
+ children: ce.map((t, i) => {
2370
+ let a = K.includes(t.value), o = Cr(t.value, K, b, x);
2371
+ return /* @__PURE__ */ r("li", {
2372
+ id: `${W}-option-${i}`,
2301
2373
  role: "option",
2302
- "aria-selected": r,
2303
- "aria-disabled": i,
2374
+ "aria-selected": a,
2375
+ "aria-disabled": o,
2304
2376
  onClick: () => Se(t.value),
2305
- className: e("px-3 py-2 flex items-center gap-2 text-gray-900 dark:text-gray-100", i ? "opacity-50 cursor-not-allowed" : "cursor-pointer", n === le ? e("bg-blue-50 dark:bg-blue-900/40", "outline-2 -outline-offset-2 outline-blue-500 dark:outline-blue-400") : !i && "hover:bg-gray-50 dark:hover:bg-gray-800/60"),
2306
- children: [/* @__PURE__ */ p("span", {
2377
+ className: e("px-3 py-2 flex items-center gap-2 text-gray-900 dark:text-gray-100", o ? "opacity-50 cursor-not-allowed" : "cursor-pointer", i === le ? e("bg-blue-50 dark:bg-blue-900/40", "outline-2 -outline-offset-2 outline-blue-500 dark:outline-blue-400") : !o && "hover:bg-gray-50 dark:hover:bg-gray-800/60"),
2378
+ children: [/* @__PURE__ */ n("span", {
2307
2379
  "aria-hidden": !0,
2308
- className: e("flex h-4 w-4 shrink-0 items-center justify-center", !E && [
2380
+ className: e("flex h-4 w-4 shrink-0 items-center justify-center", !D && [
2309
2381
  "border-2",
2310
- N[T],
2311
- r ? e("border-blue-600 dark:border-blue-500", "bg-blue-600 dark:bg-blue-500") : e("border-gray-300 dark:border-gray-600", "bg-white dark:bg-gray-800")
2382
+ U[E],
2383
+ a ? e("border-blue-600 dark:border-blue-500", "bg-blue-600 dark:bg-blue-500") : e("border-gray-300 dark:border-gray-600", "bg-white dark:bg-gray-800")
2312
2384
  ]),
2313
- children: r && /* @__PURE__ */ p("svg", {
2385
+ children: a && /* @__PURE__ */ n("svg", {
2314
2386
  className: "h-3 w-3 text-white",
2315
2387
  viewBox: "0 0 12 12",
2316
2388
  fill: "none",
@@ -2318,28 +2390,28 @@ function br({ options: t, label: n, description: r, "aria-label": a, error: s, p
2318
2390
  strokeWidth: "2.5",
2319
2391
  strokeLinecap: "round",
2320
2392
  strokeLinejoin: "round",
2321
- children: /* @__PURE__ */ p("polyline", { points: "2 6 5 9 10 3" })
2393
+ children: /* @__PURE__ */ n("polyline", { points: "2 6 5 9 10 3" })
2322
2394
  })
2323
2395
  }), t.label]
2324
2396
  }, t.value);
2325
2397
  })
2326
2398
  }),
2327
- /* @__PURE__ */ p("div", {
2399
+ /* @__PURE__ */ n("div", {
2328
2400
  role: "status",
2329
- className: Y.length === 0 ? "px-3 py-2 text-gray-500 dark:text-gray-400" : void 0,
2330
- children: Y.length === 0 ? g ?? R.noResults : ""
2401
+ className: ce.length === 0 ? "px-3 py-2 text-gray-500 dark:text-gray-400" : void 0,
2402
+ children: ce.length === 0 ? _ ?? L.noResults : ""
2331
2403
  }),
2332
- y !== void 0 && /* @__PURE__ */ m("div", {
2333
- className: e("flex items-center justify-between px-3 py-2", !E && ["border-t", "border-gray-100 dark:border-gray-800"]),
2334
- children: [/* @__PURE__ */ p("span", {
2404
+ b !== void 0 && /* @__PURE__ */ r("div", {
2405
+ className: e("flex items-center justify-between px-3 py-2", !D && ["border-t", "border-gray-100 dark:border-gray-800"]),
2406
+ children: [/* @__PURE__ */ n("span", {
2335
2407
  className: "text-xs text-gray-500 dark:text-gray-400",
2336
- children: (C ?? R.selectedCount)(K.length)
2337
- }), /* @__PURE__ */ p("button", {
2408
+ children: (w ?? L.selectedCount)(K.length)
2409
+ }), /* @__PURE__ */ n("button", {
2338
2410
  type: "button",
2339
2411
  disabled: K.length === 0,
2340
2412
  onClick: Te,
2341
2413
  className: "text-xs font-medium text-blue-600 hover:text-blue-700 disabled:opacity-50 disabled:cursor-not-allowed dark:text-blue-400 dark:hover:text-blue-300",
2342
- children: v ?? R.clear
2414
+ children: y ?? L.clear
2343
2415
  })]
2344
2416
  })
2345
2417
  ]
@@ -2349,244 +2421,283 @@ function br({ options: t, label: n, description: r, "aria-label": a, error: s, p
2349
2421
  });
2350
2422
  }
2351
2423
  // src/components/radio_options/radio_option_row.tsx
2352
- function xr({ option: t, optionId: n, descriptionId: r, name: i, orientation: a, isSelected: o, isDisabled: s, isFirstOption: c, required: l, error: u, radius: d, unstyled: f, className: m, onSelect: h }) {
2353
- let g = !!u;
2354
- return /* @__PURE__ */ p(ke, {
2424
+ function Ar({ option: t, optionId: r, descriptionId: i, name: a, orientation: o, isSelected: s, isDisabled: c, isFirstOption: l, required: u, error: d, radius: f, unstyled: p, className: m, onSelect: h }) {
2425
+ let g = !!d;
2426
+ return /* @__PURE__ */ n(Fe, {
2355
2427
  item: t,
2356
- htmlFor: n,
2357
- descriptionId: r,
2358
- orientation: a,
2359
- isSelected: o,
2360
- isDisabled: s,
2428
+ htmlFor: r,
2429
+ descriptionId: i,
2430
+ orientation: o,
2431
+ isSelected: s,
2432
+ isDisabled: c,
2361
2433
  isError: g,
2362
- radius: d,
2363
- unstyled: f,
2434
+ radius: f,
2435
+ unstyled: p,
2364
2436
  className: m,
2365
- control: /* @__PURE__ */ p("input", {
2437
+ control: /* @__PURE__ */ n("input", {
2366
2438
  type: "radio",
2367
- id: n,
2368
- name: i,
2439
+ id: r,
2440
+ name: a,
2369
2441
  value: t.value,
2370
- checked: o,
2442
+ checked: s,
2371
2443
  onChange: () => h(t.value),
2372
- disabled: s,
2373
- required: l && c,
2374
- "aria-describedby": t.description ? r : void 0,
2444
+ disabled: c,
2445
+ required: u && l,
2446
+ "aria-describedby": t.description ? i : void 0,
2375
2447
  className: "sr-only"
2376
2448
  }),
2377
- indicator: /* @__PURE__ */ p("span", {
2378
- className: e("mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded-full border-2 transition-colors duration-150", Se({
2379
- isSelected: o,
2449
+ indicator: /* @__PURE__ */ n("span", {
2450
+ className: e("mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded-full border-2 transition-colors duration-150", De({
2451
+ isSelected: s,
2380
2452
  isError: g
2381
2453
  })),
2382
2454
  "aria-hidden": !0,
2383
- children: o && /* @__PURE__ */ p("span", { className: e("h-2 w-2 rounded-full", u ? "bg-red-500 dark:bg-red-400" : "bg-blue-600 dark:bg-blue-500") })
2455
+ children: s && /* @__PURE__ */ n("span", { className: e("h-2 w-2 rounded-full", d ? "bg-red-500 dark:bg-red-400" : "bg-blue-600 dark:bg-blue-500") })
2384
2456
  })
2385
2457
  });
2386
2458
  }
2387
2459
  // src/components/radio_options/radio_options.tsx
2388
- function Sr({ options: t, orientation: n = "vertical", value: r, defaultValue: i, onChange: a, name: o, label: s, error: c, required: l, disabled: u, radius: d = "lg", unstyled: f = !1, className: h, wrapperClassName: g, id: _, "aria-describedby": v, ...y }) {
2389
- let { fieldId: b, errorId: x } = $(_), S = o ?? b, [C, w] = Ce(r, i ?? ""), T = t.map((e) => typeof e == "string" ? {
2460
+ function jr({ options: t, orientation: i = "vertical", value: a, defaultValue: o, onChange: s, name: c, label: l, error: u, required: d, disabled: f, radius: p = "lg", unstyled: m = !1, className: h, wrapperClassName: g, id: _, "aria-describedby": v, ...y }) {
2461
+ let { fieldId: b, errorId: x } = $(_), S = c ?? b, [C, w] = ke(a, o ?? ""), T = t.map((e) => typeof e == "string" ? {
2390
2462
  value: e,
2391
2463
  label: e
2392
2464
  } : e), E = (e) => {
2393
- w(e), a?.(e);
2465
+ w(e), s?.(e);
2394
2466
  };
2395
- return /* @__PURE__ */ m("fieldset", {
2467
+ return /* @__PURE__ */ r("fieldset", {
2396
2468
  className: e("m-0 border-0 p-0", g),
2397
2469
  role: "radiogroup",
2398
- disabled: u,
2399
- "aria-invalid": c ? !0 : void 0,
2400
- "aria-describedby": Z(v, c && x),
2470
+ disabled: f,
2471
+ "aria-invalid": u ? !0 : void 0,
2472
+ "aria-describedby": Q(v, u && x),
2401
2473
  ...y,
2402
2474
  children: [
2403
- s && /* @__PURE__ */ m("legend", {
2475
+ l && /* @__PURE__ */ r("legend", {
2404
2476
  className: e("text-sm font-medium text-gray-700 dark:text-gray-300", "mb-2"),
2405
- children: [s, l && /* @__PURE__ */ p(Q, {})]
2477
+ children: [l, d && /* @__PURE__ */ n(Oe, {})]
2406
2478
  }),
2407
- /* @__PURE__ */ p("div", {
2408
- className: e(n === "horizontal" ? "flex flex-row gap-2" : "flex flex-col gap-2"),
2409
- children: T.map((e, t) => /* @__PURE__ */ p(xr, {
2479
+ /* @__PURE__ */ n("div", {
2480
+ className: e(i === "horizontal" ? "flex flex-row gap-2" : "flex flex-col gap-2"),
2481
+ children: T.map((e, t) => /* @__PURE__ */ n(Ar, {
2410
2482
  option: e,
2411
2483
  optionId: `${b}-${t}`,
2412
2484
  descriptionId: `${b}-${t}-desc`,
2413
2485
  name: S,
2414
- orientation: n,
2486
+ orientation: i,
2415
2487
  isSelected: C === e.value,
2416
- isDisabled: u === !0 || e.disabled === !0,
2488
+ isDisabled: f === !0 || e.disabled === !0,
2417
2489
  isFirstOption: t === 0,
2418
- required: l,
2419
- error: c,
2420
- radius: d,
2421
- unstyled: f,
2490
+ required: d,
2491
+ error: u,
2492
+ radius: p,
2493
+ unstyled: m,
2422
2494
  className: h,
2423
2495
  onSelect: E
2424
2496
  }, e.value))
2425
2497
  }),
2426
- /* @__PURE__ */ p(X, {
2498
+ /* @__PURE__ */ n(Te, {
2427
2499
  id: x,
2428
- error: c,
2500
+ error: u,
2429
2501
  className: "mt-2"
2430
2502
  })
2431
2503
  ]
2432
2504
  });
2433
2505
  }
2434
2506
  // src/components/select/select.tsx
2435
- function Cr({ options: t, label: n, description: r, error: i, placeholder: a, radius: o = "md", unstyled: s = !1, className: c, wrapperClassName: l, value: u, defaultValue: d, onChange: f, id: h, "aria-describedby": g, "aria-label": _, ...v }) {
2507
+ function Mr({ options: t, label: i, description: a, error: o, placeholder: s, radius: c = "md", unstyled: l = !1, className: u, wrapperClassName: d, value: f, defaultValue: p, onChange: m, id: h, "aria-describedby": g, "aria-label": _, ...v }) {
2436
2508
  let { fieldId: y, errorId: b, descriptionId: x, labelId: S } = $(h);
2437
- return /* @__PURE__ */ p(Fe, {
2509
+ return /* @__PURE__ */ n(Ve, {
2438
2510
  fieldId: y,
2439
2511
  errorId: b,
2440
2512
  descriptionId: x,
2441
- label: n,
2442
- description: r,
2443
- error: i,
2513
+ label: i,
2514
+ description: a,
2515
+ error: o,
2444
2516
  required: v.required,
2445
- wrapperClassName: l,
2446
- children: /* @__PURE__ */ m("select", {
2517
+ wrapperClassName: d,
2518
+ children: /* @__PURE__ */ r("select", {
2447
2519
  id: y,
2448
- className: e("w-full disabled:opacity-50 disabled:cursor-not-allowed", !s && [
2449
- fe,
2450
- N[o],
2520
+ className: e("w-full disabled:opacity-50 disabled:cursor-not-allowed", !l && [
2521
+ ge,
2522
+ U[c],
2451
2523
  "pl-3 pr-8 py-2 text-sm appearance-none bg-[length:1rem_1rem] bg-[position:right_0.5rem_center] bg-no-repeat",
2452
2524
  "bg-[url(\"data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 fill=%27none%27 viewBox=%270 0 20 20%27%3e%3cpath stroke=%27%236b7280%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%271.5%27 d=%27M6 8l4 4 4-4%27/%3e%3c/svg%3e\")]"
2453
- ], !s && i && e("border-red-500 dark:border-red-400", "focus:ring-red-500"), c),
2454
- ...u === void 0 ? { defaultValue: d } : { value: u },
2455
- onChange: f,
2456
- "aria-invalid": !!i,
2525
+ ], !l && o && e("border-red-500 dark:border-red-400", "focus:ring-red-500"), u),
2526
+ ...f === void 0 ? { defaultValue: p } : { value: f },
2527
+ onChange: m,
2528
+ "aria-invalid": !!o,
2457
2529
  "aria-label": _,
2458
- "aria-labelledby": Ie(n, S, _),
2459
- "aria-describedby": Z(g, !!r && x, i && b),
2530
+ "aria-labelledby": He(i, S, _),
2531
+ "aria-describedby": Q(g, !!a && x, o && b),
2460
2532
  ...v,
2461
- children: [a !== void 0 && /* @__PURE__ */ p("option", {
2533
+ children: [s !== void 0 && /* @__PURE__ */ n("option", {
2462
2534
  value: "",
2463
- children: a
2464
- }), t.map((e) => /* @__PURE__ */ p("option", {
2535
+ children: s
2536
+ }), t.map((e) => /* @__PURE__ */ n("option", {
2465
2537
  value: e.value,
2466
2538
  children: e.label
2467
2539
  }, e.value))]
2468
2540
  })
2469
2541
  });
2470
2542
  }
2471
- var wr = "!rounded-l-none border-l", Tr = {
2543
+ var Nr = "!rounded-l-none border-l", Pr = {
2472
2544
  solid: "!border-l-white/40",
2473
2545
  outline: "!border-l-0",
2474
2546
  ghost: "!border-l-current/25",
2475
2547
  subtle: "!border-l-current/25"
2476
- }, Er = "!border-l-gray-400";
2477
- function Dr(e, t) {
2478
- return [wr, e === "solid" && t === "neutral" ? Er : Tr[e]];
2548
+ }, Fr = "!border-l-gray-400";
2549
+ function Ir(e, t) {
2550
+ return [Nr, e === "solid" && t === "neutral" ? Fr : Pr[e]];
2479
2551
  }
2480
2552
  // src/components/split_button/split_button.tsx
2481
- var Or = "i-mdi-chevron-down";
2482
- function kr(t) {
2483
- let { children: n, onClick: r, menu: i, menuLabel: a, menuIcon: o = Or, menuAlign: s = "end", startIcon: c, size: l = "md", loading: u = !1, disabled: d = !1, "aria-label": f, "aria-labelledby": h, className: g, ref: _, unstyled: v = !1, variant: y = "solid", color: b = "primary", radius: x = "md" } = t, S = v ? { unstyled: !0 } : {
2553
+ var Lr = "i-mdi-chevron-down";
2554
+ function Rr(t) {
2555
+ let { children: i, onClick: a, menu: o, menuLabel: s, menuIcon: c = Lr, menuAlign: l = "end", startIcon: u, size: d = "md", loading: f = !1, disabled: p = !1, "aria-label": m, "aria-labelledby": h, className: g, ref: _, unstyled: v = !1, variant: y = "solid", color: b = "primary", radius: x = "md" } = t, S = v ? { unstyled: !0 } : {
2484
2556
  variant: y,
2485
2557
  color: b,
2486
2558
  radius: x
2487
- }, C = /* @__PURE__ */ p(It, {
2488
- icon: o,
2489
- "aria-label": a,
2559
+ }, C = /* @__PURE__ */ n(Ot, {
2560
+ icon: c,
2561
+ "aria-label": s,
2490
2562
  tooltip: !0,
2491
- size: l,
2492
- disabled: d,
2493
- "aria-disabled": u && !d || void 0,
2494
- className: e(!v && ["relative focus-visible:z-10", Dr(y, b)]),
2563
+ size: d,
2564
+ disabled: p,
2565
+ "aria-disabled": f && !p || void 0,
2566
+ className: e(!v && ["relative focus-visible:z-10", Ir(y, b)]),
2495
2567
  ...S
2496
2568
  });
2497
- return /* @__PURE__ */ m("div", {
2569
+ return /* @__PURE__ */ r("div", {
2498
2570
  role: "group",
2499
- "aria-label": f,
2571
+ "aria-label": m,
2500
2572
  "aria-labelledby": h,
2501
2573
  className: e("inline-flex", g),
2502
- children: [/* @__PURE__ */ p(U, {
2574
+ children: [/* @__PURE__ */ n(Y, {
2503
2575
  ref: _,
2504
- size: l,
2505
- startIcon: c,
2506
- loading: u,
2507
- disabled: d,
2508
- onClick: r,
2576
+ size: d,
2577
+ startIcon: u,
2578
+ loading: f,
2579
+ disabled: p,
2580
+ onClick: a,
2509
2581
  className: e(!v && ["relative focus-visible:z-10", "!rounded-r-none"]),
2510
2582
  ...S,
2511
- children: n
2512
- }), /* @__PURE__ */ p(In, {
2583
+ children: i
2584
+ }), /* @__PURE__ */ n(Wn, {
2513
2585
  trigger: C,
2514
- align: s,
2586
+ align: l,
2515
2587
  radius: x,
2516
- disabled: d || u,
2517
- children: i
2588
+ disabled: p || f,
2589
+ children: o
2518
2590
  })]
2519
2591
  });
2520
2592
  }
2593
+ // src/components/spinner/spinner.tsx
2594
+ var zr = 0, Br = "inline-flex items-center gap-2", Vr = {
2595
+ xs: "text-xs",
2596
+ sm: "text-sm",
2597
+ md: "text-sm",
2598
+ lg: "text-base"
2599
+ }, Hr = {
2600
+ xs: "w-3.5 h-3.5",
2601
+ sm: "w-4 h-4",
2602
+ md: "w-5 h-5",
2603
+ lg: "w-6 h-6"
2604
+ };
2605
+ function Ur(t) {
2606
+ let { size: i = "md", label: a, unstyled: o = !1, className: s, iconClassName: c, labelClassName: u, ...d } = t, f = J(), [p, m] = h(!1);
2607
+ l(() => {
2608
+ let e = setTimeout(() => m(!0), zr);
2609
+ return () => clearTimeout(e);
2610
+ }, []);
2611
+ let g = a ?? f.loading, _ = e(!o && Hr[i], c);
2612
+ return /* @__PURE__ */ r("span", {
2613
+ role: "status",
2614
+ ...d,
2615
+ className: e(!o && [Br, Vr[i]], s),
2616
+ children: [
2617
+ /* @__PURE__ */ n("span", {
2618
+ className: e("i-svg-spinners-3-dots-fade ms-spinner-animated", _),
2619
+ "aria-hidden": "true"
2620
+ }),
2621
+ /* @__PURE__ */ n("span", {
2622
+ className: e("i-mdi-loading ms-spinner-static", _),
2623
+ "aria-hidden": "true"
2624
+ }),
2625
+ p && /* @__PURE__ */ n("span", {
2626
+ className: a === void 0 ? "sr-only" : u,
2627
+ children: g
2628
+ })
2629
+ ]
2630
+ });
2631
+ }
2521
2632
  // src/components/switch/switch.tsx
2522
- function Ar({ label: t, description: n, error: r, unstyled: i = !1, fullWidth: a = !1, className: o, wrapperClassName: s, checked: c, defaultChecked: l = !1, onChange: u, id: d, "aria-describedby": h, "aria-label": g, "aria-labelledby": _, ...v }) {
2523
- let { fieldId: y, errorId: b, descriptionId: x } = $(d), [S, C] = Ce(c, l), w = Z(h, !!n && x, r && b);
2524
- return Te("Switch", !!t || !!g?.trim() || !!_?.trim()), /* @__PURE__ */ m("div", {
2525
- className: e(a ? "w-full" : "w-fit", s),
2633
+ function Wr({ label: i, description: a, error: o, unstyled: s = !1, fullWidth: c = !1, className: l, wrapperClassName: u, checked: d, defaultChecked: f = !1, onChange: p, id: m, "aria-describedby": h, "aria-label": g, "aria-labelledby": _, ...v }) {
2634
+ let { fieldId: y, errorId: b, descriptionId: x } = $(m), [S, C] = ke(d, f), w = Q(h, !!a && x, o && b);
2635
+ return je("Switch", !!i || !!g?.trim() || !!_?.trim()), /* @__PURE__ */ r("div", {
2636
+ className: e(c ? "w-full" : "w-fit", u),
2526
2637
  children: [
2527
- /* @__PURE__ */ m("label", {
2638
+ /* @__PURE__ */ r("label", {
2528
2639
  htmlFor: y,
2529
2640
  className: e("flex items-center gap-3 cursor-pointer", v.disabled && "cursor-not-allowed opacity-50"),
2530
- children: [/* @__PURE__ */ m("span", {
2531
- className: e("relative inline-flex w-11 shrink-0", "transition-colors duration-200 ease-in-out", E, D, !i && [
2641
+ children: [/* @__PURE__ */ r("span", {
2642
+ className: e("relative inline-flex w-11 shrink-0", "transition-colors duration-200 ease-in-out", F, I, !s && [
2532
2643
  "rounded-full border-2 border-transparent",
2533
2644
  S ? "bg-blue-600 dark:bg-blue-500" : "bg-gray-200 dark:bg-gray-600",
2534
- r && "ring-2 ring-red-500 dark:ring-red-400"
2535
- ], o),
2536
- children: [/* @__PURE__ */ p("input", {
2645
+ o && "ring-2 ring-red-500 dark:ring-red-400"
2646
+ ], l),
2647
+ children: [/* @__PURE__ */ n("input", {
2537
2648
  type: "checkbox",
2538
2649
  role: "switch",
2539
2650
  id: y,
2540
2651
  className: "sr-only",
2541
2652
  checked: S,
2542
2653
  onChange: (e) => {
2543
- C(e.target.checked), u?.(e);
2654
+ C(e.target.checked), p?.(e);
2544
2655
  },
2545
- "aria-invalid": !!r,
2656
+ "aria-invalid": !!o,
2546
2657
  "aria-describedby": w,
2547
2658
  "aria-label": g,
2548
2659
  "aria-labelledby": _,
2549
2660
  ...v
2550
- }), /* @__PURE__ */ p("span", {
2661
+ }), /* @__PURE__ */ n("span", {
2551
2662
  className: e("pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0", "ms-switch-thumb-transition", S ? "translate-x-5.25" : "translate-x-0"),
2552
2663
  "aria-hidden": !0
2553
2664
  })]
2554
- }), t && /* @__PURE__ */ p(f, { children: typeof t == "string" ? /* @__PURE__ */ m("span", {
2665
+ }), i && /* @__PURE__ */ n(t, { children: typeof i == "string" ? /* @__PURE__ */ r("span", {
2555
2666
  className: e("text-sm font-medium text-gray-700 dark:text-gray-300", "select-none"),
2556
- children: [t, v.required && /* @__PURE__ */ p(Q, {})]
2557
- }) : /* @__PURE__ */ m(f, { children: [t, v.required && /* @__PURE__ */ p(Q, {})] }) })]
2667
+ children: [i, v.required && /* @__PURE__ */ n(Oe, {})]
2668
+ }) : /* @__PURE__ */ r(t, { children: [i, v.required && /* @__PURE__ */ n(Oe, {})] }) })]
2558
2669
  }),
2559
- /* @__PURE__ */ p(ve, {
2670
+ /* @__PURE__ */ n(Se, {
2560
2671
  id: x,
2561
- description: n,
2672
+ description: a,
2562
2673
  className: "mt-1 ml-14"
2563
2674
  }),
2564
- /* @__PURE__ */ p(X, {
2675
+ /* @__PURE__ */ n(Te, {
2565
2676
  id: b,
2566
- error: r,
2677
+ error: o,
2567
2678
  className: "mt-1 ml-14"
2568
2679
  })
2569
2680
  ]
2570
2681
  });
2571
2682
  }
2572
2683
  // src/components/tabs/tabs_styles.ts
2573
- var jr = {
2684
+ var Gr = {
2574
2685
  list: "gap-1 p-1 bg-gray-100 dark:bg-gray-800/50",
2575
2686
  tab: "",
2576
- indicator: `absolute inset-0 ${W} border border-gray-200 dark:border-gray-700`
2577
- }, Mr = {
2687
+ indicator: `absolute inset-0 ${E} border border-gray-200 dark:border-gray-700`
2688
+ }, Kr = {
2578
2689
  line: {
2579
2690
  activeTab: "border-transparent text-gray-900 dark:text-gray-100",
2580
2691
  idleTab: "border-transparent text-gray-500 dark:text-gray-400",
2581
2692
  idleHover: "hover:text-gray-900 hover:border-gray-300 dark:hover:text-gray-100 dark:hover:border-gray-600",
2582
2693
  byOrientation: {
2583
2694
  horizontal: {
2584
- list: `gap-1 border-b ${ae}`,
2695
+ list: `gap-1 border-b ${D}`,
2585
2696
  tab: "-mb-px border-b-2",
2586
2697
  indicator: "absolute inset-x-0 -bottom-0.5 h-0.5 bg-blue-600 dark:bg-blue-400"
2587
2698
  },
2588
2699
  vertical: {
2589
- list: `gap-1 border-r ${ae}`,
2700
+ list: `gap-1 border-r ${D}`,
2590
2701
  tab: "border-r-2",
2591
2702
  indicator: "absolute inset-y-0 -right-0.5 w-0.5 bg-blue-600 dark:bg-blue-400"
2592
2703
  }
@@ -2597,118 +2708,118 @@ var jr = {
2597
2708
  idleTab: "text-gray-600 dark:text-gray-400",
2598
2709
  idleHover: "hover:text-gray-900 dark:hover:text-gray-100",
2599
2710
  byOrientation: {
2600
- horizontal: jr,
2601
- vertical: jr
2711
+ horizontal: Gr,
2712
+ vertical: Gr
2602
2713
  }
2603
2714
  }
2604
- }, Nr = {
2715
+ }, qr = {
2605
2716
  xs: "px-2 py-1 text-xs",
2606
2717
  sm: "px-3 py-1.5 text-sm",
2607
2718
  md: "px-4 py-2.5 text-sm",
2608
2719
  lg: "px-5 py-3 text-base"
2609
- }, Pr = {
2720
+ }, Jr = {
2610
2721
  xs: "w-3.5 h-3.5",
2611
2722
  sm: "w-4 h-4",
2612
2723
  md: "w-4 h-4",
2613
2724
  lg: "w-5 h-5"
2614
- }, Fr = {
2615
- horizontal: e(w, A.primary.focusOutline),
2616
- vertical: e("outline-hidden focus-visible:outline-2", "focus-visible:-outline-offset-2", A.primary.focusOutline)
2617
- }, Ir = "items-center", Lr = e("flex-col items-stretch min-h-0 overflow-y-auto overflow-x-hidden", K), Rr = "w-48 shrink-0", zr = "justify-start text-left whitespace-normal", Br = "whitespace-nowrap", Vr = "flex min-h-0", Hr = e("flex-1 min-w-0 min-h-0 overflow-y-auto", K), Ur = "ml-6", Wr = "mt-4";
2618
- function Gr(t, n) {
2619
- return e("w-full", t === "vertical" && Vr, n);
2620
- }
2621
- function Kr(t) {
2725
+ }, Yr = {
2726
+ horizontal: e(N, z.primary.focusOutline),
2727
+ vertical: e("outline-hidden focus-visible:outline-2", "focus-visible:-outline-offset-2", z.primary.focusOutline)
2728
+ }, Xr = "items-center", Zr = e("flex-col items-stretch min-h-0 overflow-y-auto overflow-x-hidden", A), Qr = "w-48 shrink-0", $r = "justify-start text-left whitespace-normal", ei = "whitespace-nowrap", ti = "flex min-h-0", ni = e("flex-1 min-w-0 min-h-0 overflow-y-auto", A), ri = "ml-6", ii = "mt-4";
2729
+ function ai(t, n) {
2730
+ return e("w-full", t === "vertical" && ti, n);
2731
+ }
2732
+ function oi(t) {
2622
2733
  let { orientation: n, unstyled: r, className: i } = t, a = n === "vertical";
2623
- return e(a && Hr, !r && [a ? Ur : Wr, Fr[n]], i);
2734
+ return e(a && ni, !r && [a ? ri : ii, Yr[n]], i);
2624
2735
  }
2625
- function qr(t) {
2736
+ function si(t) {
2626
2737
  let { variant: n, orientation: r, radius: i, unstyled: a, isFullWidth: o, className: s } = t, c = r === "vertical";
2627
- return e("flex", c ? Lr : Ir, !c && o && "w-full", !a && c && Rr, !a && Mr[n].byOrientation[r].list, !a && n === "segmented" && N[i], s);
2738
+ return e("flex", c ? Zr : Xr, !c && o && "w-full", !a && c && Qr, !a && Kr[n].byOrientation[r].list, !a && n === "segmented" && U[i], s);
2628
2739
  }
2629
- function Jr(t) {
2630
- let { variant: n, orientation: r, size: i, radius: a, unstyled: o, isActive: s, isDisabled: c, isFullWidth: l, className: u } = t, d = r === "vertical", f = Mr[n];
2631
- return e("relative flex items-center gap-2", d ? zr : Br, !d && l && "flex-1 justify-center", c ? "opacity-50 cursor-not-allowed" : "cursor-pointer", !o && [
2740
+ function ci(t) {
2741
+ let { variant: n, orientation: r, size: i, radius: a, unstyled: o, isActive: s, isDisabled: c, isFullWidth: l, className: u } = t, d = r === "vertical", f = Kr[n];
2742
+ return e("relative flex items-center gap-2", d ? $r : ei, !d && l && "flex-1 justify-center", c ? "opacity-50 cursor-not-allowed" : "cursor-pointer", !o && [
2632
2743
  "font-medium transition-colors duration-200",
2633
- Nr[i],
2744
+ qr[i],
2634
2745
  f.byOrientation[r].tab,
2635
2746
  s ? f.activeTab : [f.idleTab, !c && f.idleHover],
2636
- n === "segmented" && N[a],
2637
- Fr[r]
2747
+ n === "segmented" && U[a],
2748
+ Yr[r]
2638
2749
  ], u);
2639
2750
  }
2640
- function Yr(t) {
2751
+ function li(t) {
2641
2752
  let { variant: n, orientation: r, radius: i } = t;
2642
- return e("tabs-indicator pointer-events-none", Mr[n].byOrientation[r].indicator, n === "segmented" && N[i]);
2753
+ return e("tabs-indicator pointer-events-none", Kr[n].byOrientation[r].indicator, n === "segmented" && U[i]);
2643
2754
  }
2644
2755
  // src/components/tabs/tab_button.tsx
2645
- function Xr({ item: t, isActive: n, hasMountedPanel: r, isTabStop: i, isFullWidth: a, variant: o, orientation: s, size: c, radius: l, unstyled: u, tabId: d, panelId: h, onSelect: g, onKeyDown: _, ref: v, indicatorRef: y }) {
2646
- let b = !!t.disabled;
2647
- return /* @__PURE__ */ m("button", {
2756
+ function ui({ item: i, isActive: a, hasMountedPanel: o, isTabStop: s, isFullWidth: c, variant: l, orientation: u, size: d, radius: f, unstyled: p, tabId: m, panelId: h, onSelect: g, onKeyDown: _, ref: v, indicatorRef: y }) {
2757
+ let b = !!i.disabled;
2758
+ return /* @__PURE__ */ r("button", {
2648
2759
  ref: v,
2649
- id: d,
2760
+ id: m,
2650
2761
  role: "tab",
2651
2762
  type: "button",
2652
- "aria-selected": n,
2653
- "aria-disabled": t.disabled,
2654
- "aria-controls": r ? h : void 0,
2655
- tabIndex: i ? 0 : -1,
2656
- disabled: t.disabled,
2763
+ "aria-selected": a,
2764
+ "aria-disabled": i.disabled,
2765
+ "aria-controls": o ? h : void 0,
2766
+ tabIndex: s ? 0 : -1,
2767
+ disabled: i.disabled,
2657
2768
  onClick: g,
2658
2769
  onKeyDown: _,
2659
- className: Jr({
2660
- variant: o,
2661
- orientation: s,
2662
- size: c,
2663
- radius: l,
2664
- unstyled: u,
2665
- isActive: n,
2770
+ className: ci({
2771
+ variant: l,
2772
+ orientation: u,
2773
+ size: d,
2774
+ radius: f,
2775
+ unstyled: p,
2776
+ isActive: a,
2666
2777
  isDisabled: b,
2667
- isFullWidth: a
2778
+ isFullWidth: c
2668
2779
  }),
2669
2780
  children: [
2670
- n && !u && /* @__PURE__ */ p("span", {
2781
+ a && !p && /* @__PURE__ */ n("span", {
2671
2782
  ref: y,
2672
2783
  "aria-hidden": "true",
2673
- className: Yr({
2674
- variant: o,
2675
- orientation: s,
2676
- radius: l
2784
+ className: li({
2785
+ variant: l,
2786
+ orientation: u,
2787
+ radius: f
2677
2788
  })
2678
2789
  }),
2679
- t.icon && /* @__PURE__ */ p("span", {
2790
+ i.icon && /* @__PURE__ */ n("span", {
2680
2791
  "aria-hidden": "true",
2681
- className: e("relative shrink-0", Pr[c], t.icon)
2792
+ className: e("relative shrink-0", Jr[d], i.icon)
2682
2793
  }),
2683
- /* @__PURE__ */ p("span", {
2794
+ /* @__PURE__ */ n("span", {
2684
2795
  className: "relative",
2685
- children: t.title
2796
+ children: i.title
2686
2797
  }),
2687
- t.badge ? /* @__PURE__ */ m(f, { children: [" ", t.badge] }) : null
2798
+ i.badge ? /* @__PURE__ */ r(t, { children: [" ", i.badge] }) : null
2688
2799
  ]
2689
2800
  });
2690
2801
  }
2691
2802
  // src/components/tabs/tab_panel.tsx
2692
- function Zr({ panelId: t, tabId: n, isHidden: r, isAnimated: i, className: a, contentKey: o, children: s }) {
2693
- return /* @__PURE__ */ p("div", {
2803
+ function di({ panelId: t, tabId: r, isHidden: i, isAnimated: a, className: o, contentKey: s, children: c }) {
2804
+ return /* @__PURE__ */ n("div", {
2694
2805
  role: "tabpanel",
2695
2806
  id: t,
2696
- "aria-labelledby": n,
2807
+ "aria-labelledby": r,
2697
2808
  tabIndex: 0,
2698
- hidden: r,
2699
- className: a,
2700
- children: /* @__PURE__ */ p("div", {
2701
- className: e(i && "tabs-panel-inner"),
2702
- children: s
2703
- }, o)
2809
+ hidden: i,
2810
+ className: o,
2811
+ children: /* @__PURE__ */ n("div", {
2812
+ className: e(a && "tabs-panel-inner"),
2813
+ children: c
2814
+ }, s)
2704
2815
  });
2705
2816
  }
2706
2817
  // src/components/tabs/use_tab_indicator_transition.ts
2707
- var Qr = 200, $r = "ease-out", ei = "(prefers-reduced-motion: reduce)";
2708
- function ti() {
2709
- return typeof window > "u" || typeof window.matchMedia != "function" ? !1 : window.matchMedia(ei).matches;
2818
+ var fi = 200, pi = "ease-out", mi = "(prefers-reduced-motion: reduce)";
2819
+ function hi() {
2820
+ return typeof window > "u" || typeof window.matchMedia != "function" ? !1 : window.matchMedia(mi).matches;
2710
2821
  }
2711
- function ni(e, t, n) {
2822
+ function gi(e, t, n) {
2712
2823
  return e === "vertical" ? [{
2713
2824
  transform: `translateY(${t.top - n.top}px)`,
2714
2825
  height: `${t.height}px`
@@ -2723,25 +2834,25 @@ function ni(e, t, n) {
2723
2834
  width: `${n.width}px`
2724
2835
  }];
2725
2836
  }
2726
- function ri(e, t, n, r) {
2727
- e.animate(ni(t, n, r), {
2728
- duration: Qr,
2729
- easing: $r
2837
+ function _i(e, t, n, r) {
2838
+ e.animate(gi(t, n, r), {
2839
+ duration: fi,
2840
+ easing: pi
2730
2841
  });
2731
2842
  }
2732
- function ii(e, t, n) {
2733
- return !e || !t || !n ? !1 : !ti();
2843
+ function vi(e, t, n) {
2844
+ return !e || !t || !n ? !1 : !hi();
2734
2845
  }
2735
- function ai(e) {
2736
- let { activeIndex: t, indicatorRef: n, isAnimated: r, orientation: i } = e, a = u(null);
2737
- c(() => {
2846
+ function yi(e) {
2847
+ let { activeIndex: t, indicatorRef: n, isAnimated: r, orientation: i } = e, a = m(null);
2848
+ f(() => {
2738
2849
  let e = n.current;
2739
2850
  if (!e) {
2740
2851
  a.current = null;
2741
2852
  return;
2742
2853
  }
2743
2854
  let t = e.getBoundingClientRect(), o = typeof e.animate == "function";
2744
- ii(a.current, r, o) && ri(e, i, a.current, t), a.current = t;
2855
+ vi(a.current, r, o) && _i(e, i, a.current, t), a.current = t;
2745
2856
  }, [
2746
2857
  t,
2747
2858
  n,
@@ -2750,34 +2861,34 @@ function ai(e) {
2750
2861
  ]);
2751
2862
  }
2752
2863
  // src/components/tabs/use_tabs_keyboard_navigation.ts
2753
- var oi = {
2864
+ var bi = {
2754
2865
  Home: () => 0,
2755
2866
  End: (e, t) => t - 1
2756
- }, si = (e, t) => (e + 1) % t, ci = (e, t) => (e - 1 + t) % t, li = {
2867
+ }, xi = (e, t) => (e + 1) % t, Si = (e, t) => (e - 1 + t) % t, Ci = {
2757
2868
  horizontal: {
2758
- ...oi,
2759
- ArrowRight: si,
2760
- ArrowLeft: ci
2869
+ ...bi,
2870
+ ArrowRight: xi,
2871
+ ArrowLeft: Si
2761
2872
  },
2762
2873
  vertical: {
2763
- ...oi,
2764
- ArrowDown: si,
2765
- ArrowUp: ci
2874
+ ...bi,
2875
+ ArrowDown: xi,
2876
+ ArrowUp: Si
2766
2877
  }
2767
2878
  };
2768
- function ui(e) {
2879
+ function wi(e) {
2769
2880
  return e.flatMap((e, t) => e.disabled ? [] : [t]);
2770
2881
  }
2771
- function di(e, t) {
2882
+ function Ti(e, t) {
2772
2883
  let n = e[t];
2773
- return n && !n.disabled ? t : ui(e)[0] ?? -1;
2884
+ return n && !n.disabled ? t : wi(e)[0] ?? -1;
2774
2885
  }
2775
- function fi(e) {
2886
+ function Ei(e) {
2776
2887
  let { items: t, activeIndex: n, orientation: r, onNavigate: i } = e;
2777
2888
  return (e) => {
2778
- let a = li[r][e.key];
2889
+ let a = Ci[r][e.key];
2779
2890
  if (!a) return;
2780
- let o = ui(t);
2891
+ let o = wi(t);
2781
2892
  if (o.length === 0) return;
2782
2893
  e.preventDefault();
2783
2894
  let s = a(o.indexOf(n), o.length);
@@ -2785,69 +2896,69 @@ function fi(e) {
2785
2896
  };
2786
2897
  }
2787
2898
  // src/components/tabs/tabs.tsx
2788
- function pi({ items: e, value: t, defaultIndex: n = 0, variant: r = "line", orientation: i = "horizontal", size: a = "md", radius: o = "md", fullWidth: c = !1, unstyled: l = !1, animated: d = !0, keepMounted: f = !1, "aria-label": h, "aria-labelledby": g, className: _, tabListClassName: v, panelClassName: y, onChange: b }) {
2789
- let [x, S] = Ce(t, n), C = s(), w = u([]), T = u(null), E = (t) => {
2899
+ function Di({ items: e, value: t, defaultIndex: i = 0, variant: a = "line", orientation: o = "horizontal", size: s = "md", radius: c = "md", fullWidth: l = !1, unstyled: u = !1, animated: f = !0, keepMounted: p = !1, "aria-label": h, "aria-labelledby": g, className: _, tabListClassName: v, panelClassName: y, onChange: b }) {
2900
+ let [x, S] = ke(t, i), C = d(), w = m([]), T = m(null), E = (t) => {
2790
2901
  e[t]?.disabled || (S(t), b?.(t));
2791
2902
  }, D = (e) => {
2792
2903
  w.current[e]?.focus(), E(e);
2793
- }, O = di(e, x), k = fi({
2904
+ }, O = Ti(e, x), k = Ei({
2794
2905
  items: e,
2795
2906
  activeIndex: O,
2796
- orientation: i,
2907
+ orientation: o,
2797
2908
  onNavigate: D
2798
- }), A = Kr({
2799
- orientation: i,
2800
- unstyled: l,
2909
+ }), A = oi({
2910
+ orientation: o,
2911
+ unstyled: u,
2801
2912
  className: y
2802
- }), j = d && !l;
2803
- return ai({
2913
+ }), j = f && !u;
2914
+ return yi({
2804
2915
  activeIndex: x,
2805
2916
  indicatorRef: T,
2806
- isAnimated: d,
2807
- orientation: i
2808
- }), /* @__PURE__ */ m("div", {
2809
- className: Gr(i, _),
2810
- children: [/* @__PURE__ */ p("div", {
2917
+ isAnimated: f,
2918
+ orientation: o
2919
+ }), /* @__PURE__ */ r("div", {
2920
+ className: ai(o, _),
2921
+ children: [/* @__PURE__ */ n("div", {
2811
2922
  role: "tablist",
2812
2923
  "aria-label": h,
2813
2924
  "aria-labelledby": g,
2814
- "aria-orientation": i,
2815
- className: qr({
2816
- variant: r,
2817
- orientation: i,
2818
- radius: o,
2819
- unstyled: l,
2820
- isFullWidth: c,
2925
+ "aria-orientation": o,
2926
+ className: si({
2927
+ variant: a,
2928
+ orientation: o,
2929
+ radius: c,
2930
+ unstyled: u,
2931
+ isFullWidth: l,
2821
2932
  className: v
2822
2933
  }),
2823
- children: e.map((e, t) => /* @__PURE__ */ p(Xr, {
2934
+ children: e.map((e, t) => /* @__PURE__ */ n(ui, {
2824
2935
  ref: (e) => {
2825
2936
  w.current[t] = e;
2826
2937
  },
2827
2938
  indicatorRef: T,
2828
2939
  item: e,
2829
2940
  isActive: x === t,
2830
- hasMountedPanel: f || x === t,
2941
+ hasMountedPanel: p || x === t,
2831
2942
  isTabStop: O === t,
2832
- isFullWidth: c,
2833
- variant: r,
2834
- orientation: i,
2835
- size: a,
2836
- radius: o,
2837
- unstyled: l,
2943
+ isFullWidth: l,
2944
+ variant: a,
2945
+ orientation: o,
2946
+ size: s,
2947
+ radius: c,
2948
+ unstyled: u,
2838
2949
  tabId: `${C}-tab-${t}`,
2839
2950
  panelId: `${C}-panel-${t}`,
2840
2951
  onSelect: () => E(t),
2841
2952
  onKeyDown: k
2842
2953
  }, e.title))
2843
- }), f ? e.map((e, t) => /* @__PURE__ */ p(Zr, {
2954
+ }), p ? e.map((e, t) => /* @__PURE__ */ n(di, {
2844
2955
  panelId: `${C}-panel-${t}`,
2845
2956
  tabId: `${C}-tab-${t}`,
2846
2957
  isHidden: t !== x,
2847
2958
  isAnimated: j,
2848
2959
  className: A,
2849
2960
  children: e.content
2850
- }, e.title)) : /* @__PURE__ */ p(Zr, {
2961
+ }, e.title)) : /* @__PURE__ */ n(di, {
2851
2962
  panelId: `${C}-panel-${x}`,
2852
2963
  tabId: `${C}-tab-${x}`,
2853
2964
  isHidden: !1,
@@ -2859,47 +2970,47 @@ function pi({ items: e, value: t, defaultIndex: n = 0, variant: r = "line", orie
2859
2970
  });
2860
2971
  }
2861
2972
  // src/components/textarea/textarea.tsx
2862
- function mi({ label: t, description: n, error: r, showCharCount: i = !1, minLength: a, maxLength: o, radius: s = "md", unstyled: c = !1, className: l, wrapperClassName: u, value: d, defaultValue: f, onChange: h, id: g, "aria-describedby": _, "aria-label": v, ...y }) {
2863
- let { fieldId: b, errorId: x, descriptionId: S, labelId: C, characterCountId: w } = $(g), { length: T, trackLength: E } = An(d, f), D = i && (a !== void 0 || o !== void 0), O = (e) => {
2973
+ function Oi({ label: t, description: i, error: a, showCharCount: o = !1, minLength: s, maxLength: c, radius: l = "md", unstyled: u = !1, className: d, wrapperClassName: f, value: p, defaultValue: m, onChange: h, id: g, "aria-describedby": _, "aria-label": v, ...y }) {
2974
+ let { fieldId: b, errorId: x, descriptionId: S, labelId: C, characterCountId: w } = $(g), { length: T, trackLength: E } = Rn(p, m), D = o && (s !== void 0 || c !== void 0), O = (e) => {
2864
2975
  E(e.target.value), h?.(e);
2865
2976
  };
2866
- return /* @__PURE__ */ m(Fe, {
2977
+ return /* @__PURE__ */ r(Ve, {
2867
2978
  fieldId: b,
2868
2979
  errorId: x,
2869
2980
  descriptionId: S,
2870
2981
  label: t,
2871
- description: n,
2872
- error: r,
2982
+ description: i,
2983
+ error: a,
2873
2984
  required: y.required,
2874
- wrapperClassName: u,
2875
- children: [/* @__PURE__ */ p("textarea", {
2985
+ wrapperClassName: f,
2986
+ children: [/* @__PURE__ */ n("textarea", {
2876
2987
  id: b,
2877
- className: e("w-full min-h-[80px] resize-y disabled:opacity-50 disabled:cursor-not-allowed", !c && [
2878
- fe,
2879
- N[s],
2988
+ className: e("w-full min-h-[80px] resize-y disabled:opacity-50 disabled:cursor-not-allowed", !u && [
2989
+ ge,
2990
+ U[l],
2880
2991
  "px-3 py-2 text-sm"
2881
- ], !c && r && e("border-red-500 dark:border-red-400", "focus:ring-red-500"), l),
2882
- ...d === void 0 ? { defaultValue: f } : { value: d },
2883
- minLength: a,
2884
- maxLength: o,
2992
+ ], !u && a && e("border-red-500 dark:border-red-400", "focus:ring-red-500"), d),
2993
+ ...p === void 0 ? { defaultValue: m } : { value: p },
2994
+ minLength: s,
2995
+ maxLength: c,
2885
2996
  onChange: O,
2886
- "aria-invalid": !!r,
2997
+ "aria-invalid": !!a,
2887
2998
  "aria-label": v,
2888
- "aria-labelledby": Ie(t, C, v),
2889
- "aria-describedby": Z(_, !!n && S, r && x, D && w),
2999
+ "aria-labelledby": He(t, C, v),
3000
+ "aria-describedby": Q(_, !!i && S, a && x, D && w),
2890
3001
  ...y
2891
- }), D && /* @__PURE__ */ p(le, {
3002
+ }), D && /* @__PURE__ */ n(pe, {
2892
3003
  id: w,
2893
3004
  current: T,
2894
- min: a,
2895
- max: o,
2896
- showMin: a !== void 0,
2897
- showMax: o !== void 0
3005
+ min: s,
3006
+ max: c,
3007
+ showMin: s !== void 0,
3008
+ showMax: c !== void 0
2898
3009
  })]
2899
3010
  });
2900
3011
  }
2901
3012
  // src/lib/is_webkit_gtk.ts
2902
- var hi = "AppleWebKit", gi = ["Linux", "X11"], _i = [
3013
+ var ki = "AppleWebKit", Ai = ["Linux", "X11"], ji = [
2903
3014
  "Chrome",
2904
3015
  "Chromium",
2905
3016
  "Edg",
@@ -2907,12 +3018,12 @@ var hi = "AppleWebKit", gi = ["Linux", "X11"], _i = [
2907
3018
  "CriOS",
2908
3019
  "FxiOS"
2909
3020
  ];
2910
- function vi(e) {
2911
- return !e.includes(hi) || !gi.some((t) => e.includes(t)) ? !1 : !_i.some((t) => e.includes(t));
3021
+ function Mi(e) {
3022
+ return !e.includes(ki) || !Ai.some((t) => e.includes(t)) ? !1 : !ji.some((t) => e.includes(t));
2912
3023
  }
2913
3024
  // src/lib/theme_transition.ts
2914
- var yi = 750, bi = "ease-in-out";
2915
- async function xi({ theme: e, element: t, transitionDuration: n = yi, transitionEasing: r = bi, applyThemeCallback: i }) {
3025
+ var Ni = 750, Pi = "ease-in-out";
3026
+ async function Fi({ theme: e, element: t, transitionDuration: n = Ni, transitionEasing: r = Pi, applyThemeCallback: i }) {
2916
3027
  if (!document.startViewTransition || globalThis.matchMedia("(prefers-reduced-motion: reduce)").matches) {
2917
3028
  i(e);
2918
3029
  return;
@@ -2926,102 +3037,103 @@ async function xi({ theme: e, element: t, transitionDuration: n = yi, transition
2926
3037
  pseudoElement: "::view-transition-new(root)"
2927
3038
  });
2928
3039
  }
2929
- function Si(e) {
3040
+ function Ii(e) {
2930
3041
  return e === "light" ? "dark" : e === "dark" ? "system" : "light";
2931
3042
  }
3043
+ // src/stores/theme_store/theme_storage_key.ts
3044
+ var Li = "theme";
2932
3045
  // src/stores/theme_store/theme_store.ts
2933
- var Ci = "theme";
2934
- function wi(e) {
3046
+ function Ri(e) {
2935
3047
  return e === "light" || e === "dark" || e === "system";
2936
3048
  }
2937
- function Ti() {
3049
+ function zi() {
2938
3050
  return globalThis.window !== void 0 && globalThis.document !== void 0;
2939
3051
  }
2940
- function Ei(e) {
3052
+ function Bi(e) {
2941
3053
  let t = window.matchMedia("(prefers-color-scheme: dark)").matches, n = e === "dark" || e === "system" && t;
2942
3054
  document.documentElement.classList.toggle("dark", n);
2943
3055
  }
2944
- function Di() {
2945
- if (!Ti()) return "system";
3056
+ function Vi() {
3057
+ if (!zi()) return "system";
2946
3058
  try {
2947
- let e = globalThis.localStorage.getItem(Ci);
2948
- return wi(e) ? e : "system";
3059
+ let e = globalThis.localStorage.getItem(Li);
3060
+ return Ri(e) ? e : "system";
2949
3061
  } catch {
2950
3062
  return "system";
2951
3063
  }
2952
3064
  }
2953
- function Oi(e) {
2954
- if (Ti()) try {
2955
- globalThis.localStorage.setItem(Ci, e);
3065
+ function Hi(e) {
3066
+ if (zi()) try {
3067
+ globalThis.localStorage.setItem(Li, e);
2956
3068
  } catch {
2957
3069
  return;
2958
3070
  }
2959
3071
  }
2960
- var ki = Di();
2961
- Ti() && Ei(ki);
2962
- var Ai = S((e) => ({
2963
- theme: ki,
3072
+ var Ui = Vi();
3073
+ zi() && Bi(Ui);
3074
+ var Wi = C((e) => ({
3075
+ theme: Ui,
2964
3076
  setTheme: (t) => {
2965
- Ei(t), Oi(t), e({ theme: t });
3077
+ Bi(t), Hi(t), e({ theme: t });
2966
3078
  }
2967
3079
  }));
2968
- Ti() && (globalThis.addEventListener("storage", (e) => {
2969
- if (e.key !== Ci) return;
2970
- let t = wi(e.newValue) ? e.newValue : "system";
2971
- Ei(t), Ai.setState({ theme: t });
3080
+ zi() && (globalThis.addEventListener("storage", (e) => {
3081
+ if (e.key !== "theme") return;
3082
+ let t = Ri(e.newValue) ? e.newValue : "system";
3083
+ Bi(t), Wi.setState({ theme: t });
2972
3084
  }), globalThis.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", () => {
2973
- Ai.getState().theme === "system" && Ei("system");
3085
+ Wi.getState().theme === "system" && Bi("system");
2974
3086
  }));
2975
3087
  // src/components/theme_toggle/theme_toggle.tsx
2976
- var ji = {
3088
+ var Gi = {
2977
3089
  light: "i-tabler-sun text-yellow-500",
2978
3090
  dark: "i-tabler-moon-stars text-gray-700 dark:text-yellow-500",
2979
3091
  system: "i-tabler-device-desktop text-blue-500"
2980
- }, Mi = {
3092
+ }, Ki = {
2981
3093
  light: "i-tabler-sun",
2982
3094
  dark: "i-tabler-moon-stars",
2983
3095
  system: "i-tabler-device-desktop"
2984
- }, Ni = "i-tabler-device-desktop text-gray-400", Pi = "i-tabler-device-desktop";
2985
- function Fi(e, t, n) {
3096
+ }, qi = "i-tabler-device-desktop text-gray-400", Ji = "i-tabler-device-desktop";
3097
+ function Yi(e, t, n) {
2986
3098
  return e ? { unstyled: !0 } : {
2987
3099
  radius: t,
2988
3100
  variant: n
2989
3101
  };
2990
3102
  }
2991
- function Ii(e, t, n) {
2992
- return n ? t ? Mi[e] : Pi : t ? ji[e] : Ni;
3103
+ function Xi(e, t, n) {
3104
+ return n ? t ? Ki[e] : Ji : t ? Gi[e] : qi;
2993
3105
  }
2994
- function Li({ isTransitionEnabled: e, transitionDuration: t, transitionEasing: n, size: r = "md", unstyled: a = !1, radius: o, variant: s, getAriaLabel: c, tooltip: l }) {
2995
- let d = Ai((e) => e.theme), f = Ai((e) => e.setTheme), m = V(), h = Ne(), g = u(null), _ = i(async () => {
2996
- let r = Si(d), i = g.current, a = e ?? !vi(navigator.userAgent);
2997
- i && a ? await xi({
2998
- theme: r,
3106
+ function Zi({ isTransitionEnabled: e, transitionDuration: t, transitionEasing: r, size: i = "md", unstyled: a = !1, radius: o, variant: c, getAriaLabel: l, tooltip: u }) {
3107
+ let d = Wi((e) => e.theme), f = Wi((e) => e.setTheme), p = J(), h = ze(), g = m(null), _ = s(async () => {
3108
+ let n = Ii(d), i = g.current, a = e ?? !Mi(navigator.userAgent);
3109
+ i && a ? await Fi({
3110
+ theme: n,
2999
3111
  element: i,
3000
3112
  transitionDuration: t,
3001
- transitionEasing: n,
3113
+ transitionEasing: r,
3002
3114
  applyThemeCallback: f
3003
- }) : f(r);
3115
+ }) : f(n);
3004
3116
  }, [
3005
3117
  d,
3006
3118
  e,
3007
3119
  t,
3008
- n,
3120
+ r,
3009
3121
  f
3010
- ]), v = Ii(d, h, a), y = Fi(a, o, s);
3011
- return /* @__PURE__ */ p(It, {
3122
+ ]), v = Xi(d, h, a), y = Yi(a, o, c);
3123
+ return /* @__PURE__ */ n(Ot, {
3012
3124
  ref: g,
3013
3125
  icon: v,
3014
- "aria-label": (c ?? m.currentTheme)(d),
3015
- size: r,
3126
+ "aria-label": (l ?? p.currentTheme)(d),
3127
+ size: i,
3016
3128
  ...y,
3017
- tooltip: l,
3129
+ tooltip: u,
3018
3130
  onClick: () => {
3019
3131
  _();
3020
3132
  }
3021
3133
  });
3022
3134
  }
3023
3135
  // src/components/toolbar/toolbar_items.ts
3024
- var Ri = "a[href], button, input:not([type=\"hidden\"]), select, textarea, summary, [contenteditable]:not([contenteditable=\"false\"]), [tabindex]", zi = [
3136
+ var Qi = "a[href], button, input:not([type=\"hidden\"]), select, textarea, summary, [contenteditable]:not([contenteditable=\"false\"]), [tabindex]", $i = [
3025
3137
  "textarea",
3026
3138
  "[contenteditable]:not([contenteditable=\"false\"])",
3027
3139
  `input:not(${[
@@ -3035,48 +3147,48 @@ var Ri = "a[href], button, input:not([type=\"hidden\"]), select, textarea, summa
3035
3147
  "reset",
3036
3148
  "submit"
3037
3149
  ].map((e) => `[type="${e}"]`).join(", ")})`
3038
- ].join(", "), Bi = "select, input[type=\"range\"], input[type=\"radio\"]";
3039
- function Vi(e) {
3150
+ ].join(", "), ea = "select, input[type=\"range\"], input[type=\"radio\"]";
3151
+ function ta(e) {
3040
3152
  return e.matches(":disabled, [aria-disabled=\"true\"]");
3041
3153
  }
3042
- function Hi(e) {
3043
- return Array.from(e.querySelectorAll(Ri));
3154
+ function na(e) {
3155
+ return Array.from(e.querySelectorAll(Qi));
3044
3156
  }
3045
- function Ui(e) {
3046
- return Hi(e).filter((e) => !Vi(e));
3157
+ function ra(e) {
3158
+ return na(e).filter((e) => !ta(e));
3047
3159
  }
3048
- function Wi(e) {
3049
- return e instanceof HTMLElement && e.matches(`${zi}, ${Bi}`);
3160
+ function ia(e) {
3161
+ return e instanceof HTMLElement && e.matches(`${$i}, ${ea}`);
3050
3162
  }
3051
3163
  // src/components/toolbar/toolbar_navigation.ts
3052
- var Gi = (e, t) => (e + 1) % t, Ki = (e, t) => (e - 1 + t) % t, qi = () => 0, Ji = (e, t) => t - 1, Yi = {
3164
+ var aa = (e, t) => (e + 1) % t, oa = (e, t) => (e - 1 + t) % t, sa = () => 0, ca = (e, t) => t - 1, la = {
3053
3165
  horizontal: {
3054
- ArrowRight: Gi,
3055
- ArrowLeft: Ki,
3056
- Home: qi,
3057
- End: Ji
3166
+ ArrowRight: aa,
3167
+ ArrowLeft: oa,
3168
+ Home: sa,
3169
+ End: ca
3058
3170
  },
3059
3171
  vertical: {
3060
- ArrowDown: Gi,
3061
- ArrowUp: Ki,
3062
- Home: qi,
3063
- End: Ji
3172
+ ArrowDown: aa,
3173
+ ArrowUp: oa,
3174
+ Home: sa,
3175
+ End: ca
3064
3176
  }
3065
3177
  };
3066
- function Xi(e) {
3067
- let { key: t, orientation: n, currentPosition: r, itemCount: i } = e, a = Yi[n][t];
3178
+ function ua(e) {
3179
+ let { key: t, orientation: n, currentPosition: r, itemCount: i } = e, a = la[n][t];
3068
3180
  if (a && i !== 0) return a(r, i);
3069
3181
  }
3070
3182
  // src/components/toolbar/use_toolbar_roving_focus.ts
3071
- var Zi = ["disabled", "aria-disabled"];
3072
- function Qi(e, t) {
3073
- let n = u(null), r = i(() => {
3183
+ var da = ["disabled", "aria-disabled"];
3184
+ function fa(e, t) {
3185
+ let n = m(null), r = s(() => {
3074
3186
  let t = e.current;
3075
3187
  if (!t) return;
3076
- let r = Ui(t), i = n.current, a = i && r.includes(i) ? i : r[0];
3077
- for (let e of Hi(t)) e.tabIndex = e === a ? 0 : -1;
3188
+ let r = ra(t), i = n.current, a = i && r.includes(i) ? i : r[0];
3189
+ for (let e of na(t)) e.tabIndex = e === a ? 0 : -1;
3078
3190
  }, [e]);
3079
- return o(() => {
3191
+ return l(() => {
3080
3192
  let t = e.current;
3081
3193
  if (!t) return;
3082
3194
  r();
@@ -3085,19 +3197,19 @@ function Qi(e, t) {
3085
3197
  subtree: !0,
3086
3198
  childList: !0,
3087
3199
  attributes: !0,
3088
- attributeFilter: Zi
3200
+ attributeFilter: da
3089
3201
  }), () => n.disconnect();
3090
3202
  }, [e, r]), {
3091
3203
  handleFocus: (t) => {
3092
3204
  let i = e.current;
3093
3205
  if (!i) return;
3094
- let a = Ui(i).find((e) => e === t.target);
3206
+ let a = ra(i).find((e) => e === t.target);
3095
3207
  a && (n.current = a, r());
3096
3208
  },
3097
3209
  handleKeyDown: (n) => {
3098
3210
  let r = e.current;
3099
- if (!r || !r.contains(n.target) || Wi(n.target)) return;
3100
- let i = Ui(r), a = Xi({
3211
+ if (!r || !r.contains(n.target) || ia(n.target)) return;
3212
+ let i = ra(r), a = ua({
3101
3213
  key: n.key,
3102
3214
  orientation: t,
3103
3215
  currentPosition: i.findIndex((e) => e === n.target),
@@ -3108,48 +3220,71 @@ function Qi(e, t) {
3108
3220
  };
3109
3221
  }
3110
3222
  // src/components/toolbar/toolbar.tsx
3111
- var $i = {
3223
+ var pa = {
3112
3224
  horizontal: "flex items-center gap-1",
3113
3225
  vertical: "flex flex-col items-stretch gap-1"
3114
3226
  };
3115
- function ea(t) {
3116
- let { orientation: n = "horizontal", unstyled: r = !1, className: i, ref: a, onFocus: o, onKeyDown: s, ...c } = t, l = u(null), { handleFocus: d, handleKeyDown: f } = Qi(l, n);
3117
- return /* @__PURE__ */ p("div", {
3118
- ...c,
3119
- ref: Ee(l, a),
3227
+ function ma(t) {
3228
+ let { orientation: r = "horizontal", unstyled: i = !1, className: a, ref: o, onFocus: s, onKeyDown: c, ...l } = t, u = m(null), { handleFocus: d, handleKeyDown: f } = fa(u, r);
3229
+ return /* @__PURE__ */ n("div", {
3230
+ ...l,
3231
+ ref: Me(u, o),
3120
3232
  role: "toolbar",
3121
- "aria-orientation": n,
3122
- className: e(!r && $i[n], i),
3233
+ "aria-orientation": r,
3234
+ className: e(!i && pa[r], a),
3123
3235
  onFocus: (e) => {
3124
- d(e), o?.(e);
3236
+ d(e), s?.(e);
3125
3237
  },
3126
3238
  onKeyDown: (e) => {
3127
- s?.(e), !e.defaultPrevented && f(e);
3239
+ c?.(e), !e.defaultPrevented && f(e);
3128
3240
  }
3129
3241
  });
3130
3242
  }
3243
+ // src/components/ui_provider/french_ui_labels.ts
3244
+ var ha = {
3245
+ light: "clair",
3246
+ dark: "sombre",
3247
+ system: "système"
3248
+ }, ga = {
3249
+ close: "Fermer",
3250
+ confirm: "Confirmer",
3251
+ cancel: "Annuler",
3252
+ noResults: "Aucun résultat",
3253
+ clearSelection: "Effacer la sélection",
3254
+ search: "Rechercher",
3255
+ clear: "Effacer",
3256
+ required: "obligatoire",
3257
+ copied: "Copié",
3258
+ loading: "Chargement",
3259
+ copy: "Copier",
3260
+ charactersRemaining: (e) => `${e} ${e > 1 ? "caractères restants" : "caractère restant"}`,
3261
+ currentTheme: (e) => `Thème actuel : ${ha[e]}`,
3262
+ overflowCount: (e) => `+${e} ${e > 1 ? "autres" : "autre"}`,
3263
+ selectedCount: (e) => `${e} ${e > 1 ? "sélectionnés" : "sélectionné"}`,
3264
+ maxSelectedHint: (e) => `Vous pouvez sélectionner jusqu'à ${e} ${e > 1 ? "éléments" : "élément"}`
3265
+ };
3131
3266
  // src/components/ui_provider/ui_provider.tsx
3132
- function ta(e = {}) {
3267
+ function _a(e = {}) {
3133
3268
  return Object.fromEntries(Object.entries(e).filter(([, e]) => e !== void 0));
3134
3269
  }
3135
- function na({ labels: e, announceFieldErrors: t, children: n }) {
3136
- let r = a(B), i = be(), o = l(() => ({
3137
- ...r,
3138
- ...ta(e)
3139
- }), [r, e]);
3140
- return /* @__PURE__ */ p(B.Provider, {
3270
+ function va({ labels: e, announceFieldErrors: t, children: r }) {
3271
+ let i = c(q), a = we(), o = p(() => ({
3272
+ ...i,
3273
+ ..._a(e)
3274
+ }), [i, e]);
3275
+ return /* @__PURE__ */ n(q.Provider, {
3141
3276
  value: o,
3142
- children: /* @__PURE__ */ p(ye.Provider, {
3143
- value: t ?? i,
3144
- children: n
3277
+ children: /* @__PURE__ */ n(Ce.Provider, {
3278
+ value: t ?? a,
3279
+ children: r
3145
3280
  })
3146
3281
  });
3147
3282
  }
3148
3283
  // src/hooks/use_is_client/with_client_only.tsx
3149
- var ra = (e) => {
3284
+ var ya = (e) => {
3150
3285
  function t(t) {
3151
- return Ne() ? /* @__PURE__ */ p(e, { ...t }) : null;
3286
+ return ze() ? /* @__PURE__ */ n(e, { ...t }) : null;
3152
3287
  }
3153
3288
  return t;
3154
- };
3155
- export { ee as Avatar, fe as BASE_INPUT_STYLES, z as Badge, U as Button, oe as Card, le as CharacterCount, Oe as Checkbox, Me as CheckboxOptions, Pe as ClientOnly, Be as Combobox, cr as ConfirmModal, ot as ContextMenu, ut as CopyButton, On as Drawer, mt as Highlight, It as IconButton, jn as Input, Nn as Kbd, In as Menu, Ln as MenuGroup, Qn as MenuItem, $n as MenuSeparator, ur as Modal, dr as ModalFooter, pr as ModalProvider, br as MultiCombobox, Sr as RadioOptions, Cr as Select, kr as SplitButton, Ar as Switch, pi as Tabs, mi as Textarea, Li as ThemeToggle, ea as Toolbar, Mt as Tooltip, na as UIProvider, dt as splitIntoHighlightSegments, wn as useDisableHotkeysWhileMounted, fr as useDismissGuard, Sn as useGlobalHotkeysStore, Ne as useIsClient, Ai as useThemeStore, ra as withClientOnly };
3289
+ }, ba = `(function(){var t=null;try{t=localStorage.getItem(${JSON.stringify(Li)})}catch(e){}var d=t==="dark"||(t!=="light"&&matchMedia("(prefers-color-scheme: dark)").matches);document.documentElement.classList.toggle("dark",d)})()`;
3290
+ export { M as AppBar, re as Avatar, ge as BASE_INPUT_STYLES, ae as Badge, Y as Button, le as Card, pe as CharacterCount, Pe as Checkbox, Re as CheckboxOptions, Be as ClientOnly, qe as Combobox, gr as ConfirmModal, pt as ContextMenu, Mt as CopyButton, In as Drawer, ga as FRENCH_UI_LABELS, It as Highlight, Ot as IconButton, zn as Input, Vn as Kbd, Wn as Menu, Gn as MenuGroup, or as MenuItem, sr as MenuSeparator, vr as Modal, yr as ModalFooter, xr as ModalProvider, kr as MultiCombobox, jr as RadioOptions, Mr as Select, Ur as Spinner, Rr as SplitButton, Wr as Switch, ba as THEME_INIT_SCRIPT, Di as Tabs, Oi as Textarea, Zi as ThemeToggle, ma as Toolbar, wt as Tooltip, va as UIProvider, K as buttonClassName, xn as dismissTopmostModal, Nt as splitIntoHighlightSegments, Mn as useDisableHotkeysWhileMounted, br as useDismissGuard, An as useGlobalHotkeysStore, ze as useIsClient, Wi as useThemeStore, ya as withClientOnly };