@plyaz/ui 0.6.8 → 0.6.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,52 +1,55 @@
1
- var Q = Object.defineProperty;
2
- var Z = (t, e, a) => e in t ? Q(t, e, { enumerable: !0, configurable: !0, writable: !0, value: a }) : t[e] = a;
3
- var k = (t, e, a) => Z(t, typeof e != "symbol" ? e + "" : e, a);
4
- import { jsx as o, jsxs as y } from "react/jsx-runtime";
5
- import { c as i } from "./utils-BlazSa45.js";
6
- import { clsx as J } from "clsx";
7
- import { Slot as X } from "@radix-ui/react-slot";
8
- import Y, { memo as ee } from "react";
9
- import * as u from "@radix-ui/react-select";
10
- import { CheckIcon as te, ChevronDownIcon as j, ChevronUpIcon as ae } from "lucide-react";
11
- import { useTranslations as C } from "next-intl";
12
- const w = ({ children: t, element: e = "div", className: a = "", ...r }) => /* @__PURE__ */ o(e, { className: a, ...r, "data-testid": "box", children: t }), Fe = ({ className: t = "", children: e, element: a, ...r }) => /* @__PURE__ */ o(
13
- w,
1
+ var en = Object.defineProperty;
2
+ var tn = (e, t, n) => t in e ? en(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var Q = (e, t, n) => tn(e, typeof t != "symbol" ? t + "" : t, n);
4
+ import { jsx as l, jsxs as L, Fragment as _e } from "react/jsx-runtime";
5
+ import { c as E } from "./utils-BlazSa45.js";
6
+ import { clsx as nn } from "clsx";
7
+ import { Slot as rn, createSlot as He, createSlottable as on } from "@radix-ui/react-slot";
8
+ import * as s from "react";
9
+ import an, { memo as sn, useState as cn } from "react";
10
+ import * as D from "@radix-ui/react-select";
11
+ import { CheckIcon as ln, ChevronDownIcon as Xe, ChevronUpIcon as un } from "lucide-react";
12
+ import { useTranslations as qe } from "next-intl";
13
+ import * as dn from "react-dom";
14
+ import fn from "react-dom";
15
+ const q = ({ children: e, element: t = "div", className: n = "", ...r }) => /* @__PURE__ */ l(t, { className: n, ...r, "data-testid": "box", children: e }), Ho = ({ className: e = "", children: t, element: n, ...r }) => /* @__PURE__ */ l(
16
+ q,
14
17
  {
15
- element: a,
16
- className: i("mx-auto px-4 sm:px-6 lg:px-8 max-w-7xl", t),
18
+ element: n,
19
+ className: E("mx-auto px-4 sm:px-6 lg:px-8 max-w-7xl", e),
17
20
  ...r,
18
- children: e
21
+ children: t
19
22
  }
20
- ), T = (t) => typeof t == "boolean" ? `${t}` : t === 0 ? "0" : t, M = J, re = (t, e) => (a) => {
23
+ ), Me = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Le = nn, vn = (e, t) => (n) => {
21
24
  var r;
22
- if ((e == null ? void 0 : e.variants) == null) return M(t, a == null ? void 0 : a.class, a == null ? void 0 : a.className);
23
- const { variants: n, defaultVariants: s } = e, l = Object.keys(n).map((g) => {
24
- const x = a == null ? void 0 : a[g], h = s == null ? void 0 : s[g];
25
- if (x === null) return null;
26
- const v = T(x) || T(h);
27
- return n[g][v];
28
- }), d = a && Object.entries(a).reduce((g, x) => {
29
- let [h, v] = x;
30
- return v === void 0 || (g[h] = v), g;
31
- }, {}), m = e == null || (r = e.compoundVariants) === null || r === void 0 ? void 0 : r.reduce((g, x) => {
32
- let { class: h, className: v, ...q } = x;
33
- return Object.entries(q).every((H) => {
34
- let [A, S] = H;
35
- return Array.isArray(S) ? S.includes({
36
- ...s,
37
- ...d
38
- }[A]) : {
39
- ...s,
40
- ...d
41
- }[A] === S;
25
+ if ((t == null ? void 0 : t.variants) == null) return Le(e, n == null ? void 0 : n.class, n == null ? void 0 : n.className);
26
+ const { variants: o, defaultVariants: a } = t, c = Object.keys(o).map((u) => {
27
+ const f = n == null ? void 0 : n[u], g = a == null ? void 0 : a[u];
28
+ if (f === null) return null;
29
+ const m = Me(f) || Me(g);
30
+ return o[u][m];
31
+ }), i = n && Object.entries(n).reduce((u, f) => {
32
+ let [g, m] = f;
33
+ return m === void 0 || (u[g] = m), u;
34
+ }, {}), v = t == null || (r = t.compoundVariants) === null || r === void 0 ? void 0 : r.reduce((u, f) => {
35
+ let { class: g, className: m, ...h } = f;
36
+ return Object.entries(h).every((x) => {
37
+ let [d, p] = x;
38
+ return Array.isArray(p) ? p.includes({
39
+ ...a,
40
+ ...i
41
+ }[d]) : {
42
+ ...a,
43
+ ...i
44
+ }[d] === p;
42
45
  }) ? [
43
- ...g,
44
- h,
45
- v
46
- ] : g;
46
+ ...u,
47
+ g,
48
+ m
49
+ ] : u;
47
50
  }, []);
48
- return M(t, l, m, a == null ? void 0 : a.class, a == null ? void 0 : a.className);
49
- }, F = {
51
+ return Le(e, c, v, n == null ? void 0 : n.class, n == null ? void 0 : n.className);
52
+ }, Ze = {
50
53
  start: "justify-start",
51
54
  end: "justify-end",
52
55
  center: "justify-center",
@@ -54,17 +57,17 @@ const w = ({ children: t, element: e = "div", className: a = "", ...r }) => /* @
54
57
  around: "justify-around",
55
58
  evenly: "justify-evenly",
56
59
  stretch: "justify-stretch"
57
- }, D = {
60
+ }, Qe = {
58
61
  start: "items-start",
59
62
  end: "items-end",
60
63
  center: "items-center",
61
64
  baseline: "items-baseline",
62
65
  stretch: "items-stretch"
63
- }, ne = {
66
+ }, gn = {
64
67
  body: "font-general",
65
68
  heading: "font-general",
66
69
  caption: "font-general"
67
- }, se = {
70
+ }, mn = {
68
71
  xs: "text-xs",
69
72
  sm: "text-sm",
70
73
  base: "text-base",
@@ -78,13 +81,13 @@ const w = ({ children: t, element: e = "div", className: a = "", ...r }) => /* @
78
81
  "7xl": "text-7xl",
79
82
  "8xl": "text-8xl",
80
83
  "9xl": "text-9xl"
81
- }, oe = {
84
+ }, pn = {
82
85
  normal: "font-normal",
83
86
  medium: "font-medium",
84
87
  semibold: "font-semibold",
85
88
  bold: "font-bold",
86
89
  light: "font-light"
87
- }, le = {
90
+ }, hn = {
88
91
  1: "grid-cols-1",
89
92
  2: "grid-cols-2",
90
93
  3: "grid-cols-3",
@@ -94,7 +97,7 @@ const w = ({ children: t, element: e = "div", className: a = "", ...r }) => /* @
94
97
  7: "grid-cols-7",
95
98
  8: "grid-cols-8",
96
99
  9: "grid-cols-9"
97
- }, ie = {
100
+ }, bn = {
98
101
  1: "grid-rows-1",
99
102
  2: "grid-rows-2",
100
103
  3: "grid-rows-3",
@@ -104,7 +107,7 @@ const w = ({ children: t, element: e = "div", className: a = "", ...r }) => /* @
104
107
  7: "grid-rows-7",
105
108
  8: "grid-rows-8",
106
109
  9: "grid-rows-9"
107
- }, V = {
110
+ }, Je = {
108
111
  1: "gap-1",
109
112
  2: "gap-2",
110
113
  3: "gap-3",
@@ -114,7 +117,7 @@ const w = ({ children: t, element: e = "div", className: a = "", ...r }) => /* @
114
117
  7: "gap-7",
115
118
  8: "gap-8",
116
119
  9: "gap-9"
117
- }, ce = re(
120
+ }, Ae = vn(
118
121
  "inline-flex justify-center items-center gap-2 disabled:opacity-50 aria-invalid:border-destructive focus-visible:border-ring rounded-md outline-none aria-invalid:ring-destructive/20 focus-visible:ring-[3px] focus-visible:ring-ring/50 dark:aria-invalid:ring-destructive/40 [&_svg:not([class*='size-'])]:size-4 font-medium text-sm whitespace-nowrap transition-all [&_svg]:pointer-events-none disabled:pointer-events-none shrink-0 [&_svg]:shrink-0",
119
122
  {
120
123
  variants: {
@@ -168,68 +171,68 @@ const w = ({ children: t, element: e = "div", className: a = "", ...r }) => /* @
168
171
  size: "default"
169
172
  }
170
173
  }
171
- ), de = {
174
+ ), yn = {
172
175
  row: "flex-row",
173
176
  col: "flex-col",
174
177
  row_reverse: "flex-row-reverse",
175
178
  col_reverse: "flex-col-reverse"
176
- }, ue = {
179
+ }, En = {
177
180
  wrap: "flex-wrap",
178
181
  nowrap: "flex-nowrap",
179
182
  wrap_reverse: "flex-wrap-reverse"
180
- }, De = ({
181
- children: t,
182
- gap: e,
183
- direction: a,
183
+ }, Xo = ({
184
+ children: e,
185
+ gap: t,
186
+ direction: n,
184
187
  justify: r,
185
- align: n,
186
- wrap: s,
187
- className: l = "",
188
- element: d,
189
- ...m
190
- }) => /* @__PURE__ */ o(
191
- w,
188
+ align: o,
189
+ wrap: a,
190
+ className: c = "",
191
+ element: i,
192
+ ...v
193
+ }) => /* @__PURE__ */ l(
194
+ q,
192
195
  {
193
- element: d,
194
- className: i(
196
+ element: i,
197
+ className: E(
195
198
  "flex",
196
- a && de[a],
197
- r && F[r],
198
- n && D[n],
199
- s && ue[s],
200
- e && V[e],
201
- l
199
+ n && yn[n],
200
+ r && Ze[r],
201
+ o && Qe[o],
202
+ a && En[a],
203
+ t && Je[t],
204
+ c
202
205
  ),
203
- ...m,
204
- children: t
206
+ ...v,
207
+ children: e
205
208
  }
206
- ), Ve = ({
207
- children: t,
208
- className: e,
209
- cols: a,
209
+ ), qo = ({
210
+ children: e,
211
+ className: t,
212
+ cols: n,
210
213
  rows: r,
211
- gap: n,
212
- justify: s,
213
- align: l,
214
- element: d,
215
- ...m
216
- }) => /* @__PURE__ */ o(
217
- w,
214
+ gap: o,
215
+ justify: a,
216
+ align: c,
217
+ element: i,
218
+ ...v
219
+ }) => /* @__PURE__ */ l(
220
+ q,
218
221
  {
219
- element: d,
220
- className: i(
222
+ element: i,
223
+ className: E(
221
224
  "grid",
222
- a && le[a],
223
- r && ie[r],
224
- n && V[n],
225
- s && F[s],
226
- l && D[l],
227
- e
225
+ n && hn[n],
226
+ r && bn[r],
227
+ o && Je[o],
228
+ a && Ze[a],
229
+ c && Qe[c],
230
+ t
228
231
  ),
229
- ...m,
230
- children: t
232
+ ...v,
233
+ children: e
231
234
  }
232
- ), ge = {
235
+ ), xn = {
233
236
  xs: "xs",
234
237
  sm: "sm",
235
238
  base: "base",
@@ -238,101 +241,101 @@ const w = ({ children: t, element: e = "div", className: a = "", ...r }) => /* @
238
241
  "2xl": "2xl",
239
242
  "3xl": "3xl",
240
243
  "4xl": "4xl"
241
- }, $e = ({ children: t, element: e, className: a, size: r, ...n }) => /* @__PURE__ */ o(
242
- N,
244
+ }, Zo = ({ children: e, element: t, className: n, size: r, ...o }) => /* @__PURE__ */ l(
245
+ Z,
243
246
  {
244
- className: a,
245
- element: e,
246
- size: ge[r],
247
+ className: n,
248
+ element: t,
249
+ size: xn[r],
247
250
  variant: "heading",
248
251
  weight: "medium",
249
- ...n,
250
- children: t
252
+ ...o,
253
+ children: e
251
254
  }
252
- ), Be = ({ children: t, className: e, href: a, ...r }) => /* @__PURE__ */ o(
255
+ ), Qo = ({ children: e, className: t, href: n, ...r }) => /* @__PURE__ */ l(
253
256
  "a",
254
257
  {
255
258
  "data-testid": "link",
256
- href: a,
259
+ href: n,
257
260
  rel: "noopener noreferrer",
258
261
  target: "_blank",
259
- className: i(
262
+ className: E(
260
263
  "focus:outline-none text-blue-600 active:text-blue-900 visited:text-purple-600 hover:underline",
261
- e
264
+ t
262
265
  ),
263
266
  ...r,
264
- children: t
267
+ children: e
265
268
  }
266
- ), fe = {
269
+ ), wn = {
267
270
  xs: "xs",
268
271
  sm: "sm",
269
272
  base: "base",
270
273
  lg: "lg"
271
- }, Ke = ({ children: t, className: e, size: a, ...r }) => /* @__PURE__ */ o(
272
- N,
274
+ }, Jo = ({ children: e, className: t, size: n, ...r }) => /* @__PURE__ */ l(
275
+ Z,
273
276
  {
274
- className: e,
277
+ className: t,
275
278
  element: "p",
276
- size: fe[a],
279
+ size: wn[n],
277
280
  variant: "body",
278
281
  weight: "normal",
279
282
  ...r,
280
- children: t
283
+ children: e
281
284
  }
282
- ), Ue = ({ className: t = "", children: e, ...a }) => /* @__PURE__ */ o(w, { element: "section", className: t, ...a, children: e }), Ge = ({
283
- children: t,
284
- direction: e = "horizontal",
285
- spacing: a = "space-x-2",
286
- element: r,
287
- className: n,
288
- ...s
289
- }) => /* @__PURE__ */ o(w, { className: i("flex", e === "vertical" ? "flex-col" : "flex-row", a, n), element: r, ...s, children: t }), N = ({
290
- className: t,
285
+ ), ea = ({ className: e = "", children: t, ...n }) => /* @__PURE__ */ l(q, { element: "section", className: e, ...n, children: t }), ta = ({
291
286
  children: e,
292
- element: a,
287
+ direction: t = "horizontal",
288
+ spacing: n = "space-x-2",
289
+ element: r,
290
+ className: o,
291
+ ...a
292
+ }) => /* @__PURE__ */ l(q, { className: E("flex", t === "vertical" ? "flex-col" : "flex-row", n, o), element: r, ...a, children: e }), Z = ({
293
+ className: e,
294
+ children: t,
295
+ element: n,
293
296
  weight: r,
294
- variant: n,
295
- size: s,
296
- ...l
297
- }) => /* @__PURE__ */ o(
298
- a,
297
+ variant: o,
298
+ size: a,
299
+ ...c
300
+ }) => /* @__PURE__ */ l(
301
+ n,
299
302
  {
300
303
  "data-testid": "text",
301
- className: i(
304
+ className: E(
302
305
  "font-normal text-base",
303
- s && se[s],
304
- r && oe[r],
305
- n && ne[n],
306
- t
306
+ a && mn[a],
307
+ r && pn[r],
308
+ o && gn[o],
309
+ e
307
310
  ),
308
- ...l,
309
- children: e
311
+ ...c,
312
+ children: t
310
313
  }
311
314
  );
312
- function Oe({
313
- className: t,
314
- variant: e,
315
- size: a,
315
+ function na({
316
+ className: e,
317
+ variant: t,
318
+ size: n,
316
319
  asChild: r = !1,
317
- ...n
320
+ ...o
318
321
  }) {
319
- return /* @__PURE__ */ o(
320
- r ? X : "button",
322
+ return /* @__PURE__ */ l(
323
+ r ? rn : "button",
321
324
  {
322
325
  "data-slot": "button",
323
- className: i(ce({ variant: e, size: a, className: t })),
324
- ...n,
326
+ className: E(Ae({ variant: t, size: n, className: e })),
327
+ ...o,
325
328
  "data-testid": "button"
326
329
  }
327
330
  );
328
331
  }
329
- function We({ className: t, type: e, ...a }) {
330
- return /* @__PURE__ */ o(
332
+ function ra({ className: e, type: t, ...n }) {
333
+ return /* @__PURE__ */ l(
331
334
  "input",
332
335
  {
333
- type: e,
336
+ type: t,
334
337
  "data-slot": "input",
335
- className: i(
338
+ className: E(
336
339
  `
337
340
  flex h-9 w-full min-w-0 rounded-md border border-input bg-transparent
338
341
  px-3 py-1 text-base shadow-xs transition-[color,box-shadow]
@@ -354,46 +357,46 @@ function We({ className: t, type: e, ...a }) {
354
357
  aria-invalid:border-destructive aria-invalid:ring-destructive/20
355
358
  dark:aria-invalid:ring-destructive/40
356
359
  `,
357
- t
360
+ e
358
361
  ),
359
- ...a,
362
+ ...n,
360
363
  "data-testid": "input"
361
364
  }
362
365
  );
363
366
  }
364
- const me = ee(
367
+ const Nn = sn(
365
368
  ({
366
- children: t,
367
- className: e = "",
368
- colors: a = ["#FF0080", "#7928CA", "#0070F3", "#38bdf8"],
369
+ children: e,
370
+ className: t = "",
371
+ colors: n = ["#FF0080", "#7928CA", "#0070F3", "#38bdf8"],
369
372
  speed: r = 1
370
373
  }) => {
371
- const n = {
372
- backgroundImage: `linear-gradient(135deg, ${a.join(", ")}, ${a[0]})`,
374
+ const o = {
375
+ backgroundImage: `linear-gradient(135deg, ${n.join(", ")}, ${n[0]})`,
373
376
  WebkitBackgroundClip: "text",
374
377
  WebkitTextFillColor: "transparent",
375
378
  animationDuration: `${10 / r}s`
376
379
  };
377
- return /* @__PURE__ */ y(
380
+ return /* @__PURE__ */ L(
378
381
  "span",
379
382
  {
380
383
  className: `
381
384
  relative inline-block
382
- ${e}
385
+ ${t}
383
386
  `,
384
387
  "data-testid": "auroraText",
385
388
  children: [
386
- /* @__PURE__ */ o("span", { className: "sr-only", children: t }),
387
- /* @__PURE__ */ o(
389
+ /* @__PURE__ */ l("span", { className: "sr-only", children: e }),
390
+ /* @__PURE__ */ l(
388
391
  "span",
389
392
  {
390
393
  className: `
391
394
  relative animate-aurora bg-clip-text text-transparent
392
395
  bg-[length:200%_auto]
393
396
  `,
394
- style: n,
397
+ style: o,
395
398
  "aria-hidden": "true",
396
- children: t
399
+ children: e
397
400
  }
398
401
  )
399
402
  ]
@@ -401,28 +404,28 @@ const me = ee(
401
404
  );
402
405
  }
403
406
  );
404
- me.displayName = "AuroraText";
405
- function pe({ ...t }) {
406
- return /* @__PURE__ */ o(u.Root, { "data-slot": "select", ...t });
407
+ Nn.displayName = "AuroraText";
408
+ function Sn({ ...e }) {
409
+ return /* @__PURE__ */ l(D.Root, { "data-slot": "select", ...e });
407
410
  }
408
- function qe({ ...t }) {
409
- return /* @__PURE__ */ o(u.Group, { "data-slot": "select-group", ...t });
411
+ function oa({ ...e }) {
412
+ return /* @__PURE__ */ l(D.Group, { "data-slot": "select-group", ...e });
410
413
  }
411
- function xe({ ...t }) {
412
- return /* @__PURE__ */ o(u.Value, { "data-slot": "select-value", ...t });
414
+ function Cn({ ...e }) {
415
+ return /* @__PURE__ */ l(D.Value, { "data-slot": "select-value", ...e });
413
416
  }
414
- function ve({
415
- className: t,
416
- size: e = "default",
417
- children: a,
417
+ function An({
418
+ className: e,
419
+ size: t = "default",
420
+ children: n,
418
421
  ...r
419
422
  }) {
420
- return /* @__PURE__ */ y(
421
- u.Trigger,
423
+ return /* @__PURE__ */ L(
424
+ D.Trigger,
422
425
  {
423
426
  "data-slot": "select-trigger",
424
- "data-size": e,
425
- className: i(
427
+ "data-size": t,
428
+ className: E(
426
429
  `
427
430
  flex w-fit items-center justify-between gap-2 rounded-md border
428
431
  border-input bg-transparent px-3 py-2 text-sm whitespace-nowrap
@@ -444,27 +447,27 @@ function ve({
444
447
  [&_svg:not([class*='size-'])]:size-4
445
448
  [&_svg:not([class*='text-'])]:text-muted-foreground
446
449
  `,
447
- t
450
+ e
448
451
  ),
449
452
  ...r,
450
453
  children: [
451
- a,
452
- /* @__PURE__ */ o(u.Icon, { asChild: !0, children: /* @__PURE__ */ o(j, { className: "size-4 opacity-50" }) })
454
+ n,
455
+ /* @__PURE__ */ l(D.Icon, { asChild: !0, children: /* @__PURE__ */ l(Xe, { className: "size-4 opacity-50" }) })
453
456
  ]
454
457
  }
455
458
  );
456
459
  }
457
- function be({
458
- className: t,
459
- children: e,
460
- position: a = "popper",
460
+ function Dn({
461
+ className: e,
462
+ children: t,
463
+ position: n = "popper",
461
464
  ...r
462
465
  }) {
463
- return /* @__PURE__ */ o(u.Portal, { "data-testid": "select", children: /* @__PURE__ */ y(
464
- u.Content,
466
+ return /* @__PURE__ */ l(D.Portal, { "data-testid": "select", children: /* @__PURE__ */ L(
467
+ D.Content,
465
468
  {
466
469
  "data-slot": "select-content",
467
- className: i(
470
+ className: E(
468
471
  `
469
472
  relative z-50 max-h-(--radix-select-content-available-height)
470
473
  min-w-[8rem] origin-(--radix-select-content-transform-origin)
@@ -479,56 +482,56 @@ function be({
479
482
  data-[state=open]:animate-in data-[state=open]:fade-in-0
480
483
  data-[state=open]:zoom-in-95
481
484
  `,
482
- a === "popper" && `
485
+ n === "popper" && `
483
486
  data-[side=bottom]:translate-y-1
484
487
  data-[side=left]:-translate-x-1
485
488
  data-[side=right]:translate-x-1
486
489
  data-[side=top]:-translate-y-1
487
490
  `,
488
- t
491
+ e
489
492
  ),
490
- position: a,
493
+ position: n,
491
494
  ...r,
492
495
  children: [
493
- /* @__PURE__ */ o(ye, {}),
494
- /* @__PURE__ */ o(
495
- u.Viewport,
496
+ /* @__PURE__ */ l(Rn, {}),
497
+ /* @__PURE__ */ l(
498
+ D.Viewport,
496
499
  {
497
- className: i(
500
+ className: E(
498
501
  "p-1",
499
- a === "popper" && `
502
+ n === "popper" && `
500
503
  h-[var(--radix-select-trigger-height)] w-full
501
504
  min-w-[var(--radix-select-trigger-width)] scroll-my-1
502
505
  `
503
506
  ),
504
- children: e
507
+ children: t
505
508
  }
506
509
  ),
507
- /* @__PURE__ */ o(we, {})
510
+ /* @__PURE__ */ l(Tn, {})
508
511
  ]
509
512
  }
510
513
  ) });
511
514
  }
512
- function He({ className: t, ...e }) {
513
- return /* @__PURE__ */ o(
514
- u.Label,
515
+ function aa({ className: e, ...t }) {
516
+ return /* @__PURE__ */ l(
517
+ D.Label,
515
518
  {
516
519
  "data-slot": "select-label",
517
- className: i("px-2 py-1.5 text-xs text-muted-foreground", t),
518
- ...e
520
+ className: E("px-2 py-1.5 text-xs text-muted-foreground", e),
521
+ ...t
519
522
  }
520
523
  );
521
524
  }
522
- function he({
523
- className: t,
524
- children: e,
525
- ...a
525
+ function Pn({
526
+ className: e,
527
+ children: t,
528
+ ...n
526
529
  }) {
527
- return /* @__PURE__ */ y(
528
- u.Item,
530
+ return /* @__PURE__ */ L(
531
+ D.Item,
529
532
  {
530
533
  "data-slot": "select-item",
531
- className: i(
534
+ className: E(
532
535
  `
533
536
  relative flex w-full cursor-default items-center gap-2 rounded-sm
534
537
  py-1.5 pr-8 pl-2 text-sm outline-hidden select-none
@@ -539,198 +542,1682 @@ function he({
539
542
  [&_svg:not([class*='text-'])]:text-muted-foreground
540
543
  *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2
541
544
  `,
542
- t
545
+ e
543
546
  ),
544
- ...a,
547
+ ...n,
545
548
  children: [
546
- /* @__PURE__ */ o("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ o(u.ItemIndicator, { children: /* @__PURE__ */ o(te, { className: "size-4" }) }) }),
547
- /* @__PURE__ */ o(u.ItemText, { children: e })
549
+ /* @__PURE__ */ l("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ l(D.ItemIndicator, { children: /* @__PURE__ */ l(ln, { className: "size-4" }) }) }),
550
+ /* @__PURE__ */ l(D.ItemText, { children: t })
548
551
  ]
549
552
  }
550
553
  );
551
554
  }
552
- function Qe({
553
- className: t,
554
- ...e
555
+ function ia({
556
+ className: e,
557
+ ...t
555
558
  }) {
556
- return /* @__PURE__ */ o(
557
- u.Separator,
559
+ return /* @__PURE__ */ l(
560
+ D.Separator,
558
561
  {
559
562
  "data-slot": "select-separator",
560
- className: i("pointer-events-none -mx-1 my-1 h-px bg-border", t),
561
- ...e
563
+ className: E("pointer-events-none -mx-1 my-1 h-px bg-border", e),
564
+ ...t
562
565
  }
563
566
  );
564
567
  }
565
- function ye({
566
- className: t,
567
- ...e
568
+ function Rn({
569
+ className: e,
570
+ ...t
568
571
  }) {
569
- return /* @__PURE__ */ o(
570
- u.ScrollUpButton,
572
+ return /* @__PURE__ */ l(
573
+ D.ScrollUpButton,
571
574
  {
572
575
  "data-slot": "select-scroll-up-button",
573
- className: i("flex cursor-default items-center justify-center py-1", t),
574
- ...e,
575
- children: /* @__PURE__ */ o(ae, { className: "size-4" })
576
+ className: E("flex cursor-default items-center justify-center py-1", e),
577
+ ...t,
578
+ children: /* @__PURE__ */ l(un, { className: "size-4" })
576
579
  }
577
580
  );
578
581
  }
579
- function we({
580
- className: t,
581
- ...e
582
+ function Tn({
583
+ className: e,
584
+ ...t
582
585
  }) {
583
- return /* @__PURE__ */ o(
584
- u.ScrollDownButton,
586
+ return /* @__PURE__ */ l(
587
+ D.ScrollDownButton,
585
588
  {
586
589
  "data-slot": "select-scroll-down-button",
587
- className: i("flex cursor-default items-center justify-center py-1", t),
588
- ...e,
589
- children: /* @__PURE__ */ o(j, { className: "size-4" })
590
+ className: E("flex cursor-default items-center justify-center py-1", e),
591
+ ...t,
592
+ children: /* @__PURE__ */ l(Xe, { className: "size-4" })
593
+ }
594
+ );
595
+ }
596
+ function On(e, t) {
597
+ const n = s.createContext(t), r = (a) => {
598
+ const { children: c, ...i } = a, v = s.useMemo(() => i, Object.values(i));
599
+ return /* @__PURE__ */ l(n.Provider, { value: v, children: c });
600
+ };
601
+ r.displayName = e + "Provider";
602
+ function o(a) {
603
+ const c = s.useContext(n);
604
+ if (c) return c;
605
+ if (t !== void 0) return t;
606
+ throw new Error(`\`${a}\` must be used within \`${e}\``);
607
+ }
608
+ return [r, o];
609
+ }
610
+ function et(e, t = []) {
611
+ let n = [];
612
+ function r(a, c) {
613
+ const i = s.createContext(c), v = n.length;
614
+ n = [...n, c];
615
+ const u = (g) => {
616
+ var b;
617
+ const { scope: m, children: h, ...x } = g, d = ((b = m == null ? void 0 : m[e]) == null ? void 0 : b[v]) || i, p = s.useMemo(() => x, Object.values(x));
618
+ return /* @__PURE__ */ l(d.Provider, { value: p, children: h });
619
+ };
620
+ u.displayName = a + "Provider";
621
+ function f(g, m) {
622
+ var d;
623
+ const h = ((d = m == null ? void 0 : m[e]) == null ? void 0 : d[v]) || i, x = s.useContext(h);
624
+ if (x) return x;
625
+ if (c !== void 0) return c;
626
+ throw new Error(`\`${g}\` must be used within \`${a}\``);
627
+ }
628
+ return [u, f];
629
+ }
630
+ const o = () => {
631
+ const a = n.map((c) => s.createContext(c));
632
+ return function(i) {
633
+ const v = (i == null ? void 0 : i[e]) || a;
634
+ return s.useMemo(
635
+ () => ({ [`__scope${e}`]: { ...i, [e]: v } }),
636
+ [i, v]
637
+ );
638
+ };
639
+ };
640
+ return o.scopeName = e, [r, _n(o, ...t)];
641
+ }
642
+ function _n(...e) {
643
+ const t = e[0];
644
+ if (e.length === 1) return t;
645
+ const n = () => {
646
+ const r = e.map((o) => ({
647
+ useScope: o(),
648
+ scopeName: o.scopeName
649
+ }));
650
+ return function(a) {
651
+ const c = r.reduce((i, { useScope: v, scopeName: u }) => {
652
+ const g = v(a)[`__scope${u}`];
653
+ return { ...i, ...g };
654
+ }, {});
655
+ return s.useMemo(() => ({ [`__scope${t.scopeName}`]: c }), [c]);
656
+ };
657
+ };
658
+ return n.scopeName = t.scopeName, n;
659
+ }
660
+ function Ie(e, t) {
661
+ if (typeof e == "function")
662
+ return e(t);
663
+ e != null && (e.current = t);
664
+ }
665
+ function Mn(...e) {
666
+ return (t) => {
667
+ let n = !1;
668
+ const r = e.map((o) => {
669
+ const a = Ie(o, t);
670
+ return !n && typeof a == "function" && (n = !0), a;
671
+ });
672
+ if (n)
673
+ return () => {
674
+ for (let o = 0; o < r.length; o++) {
675
+ const a = r[o];
676
+ typeof a == "function" ? a() : Ie(e[o], null);
677
+ }
678
+ };
679
+ };
680
+ }
681
+ function I(...e) {
682
+ return s.useCallback(Mn(...e), e);
683
+ }
684
+ function M(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
685
+ return function(o) {
686
+ if (e == null || e(o), n === !1 || !o.defaultPrevented)
687
+ return t == null ? void 0 : t(o);
688
+ };
689
+ }
690
+ var H = globalThis != null && globalThis.document ? s.useLayoutEffect : () => {
691
+ }, Ln = s[" useId ".trim().toString()] || (() => {
692
+ }), In = 0;
693
+ function ve(e) {
694
+ const [t, n] = s.useState(Ln());
695
+ return H(() => {
696
+ n((r) => r ?? String(In++));
697
+ }, [e]), e || (t ? `radix-${t}` : "");
698
+ }
699
+ var kn = s[" useInsertionEffect ".trim().toString()] || H;
700
+ function Fn({
701
+ prop: e,
702
+ defaultProp: t,
703
+ onChange: n = () => {
704
+ },
705
+ caller: r
706
+ }) {
707
+ const [o, a, c] = Wn({
708
+ defaultProp: t,
709
+ onChange: n
710
+ }), i = e !== void 0, v = i ? e : o;
711
+ {
712
+ const f = s.useRef(e !== void 0);
713
+ s.useEffect(() => {
714
+ const g = f.current;
715
+ g !== i && console.warn(
716
+ `${r} is changing from ${g ? "controlled" : "uncontrolled"} to ${i ? "controlled" : "uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
717
+ ), f.current = i;
718
+ }, [i, r]);
719
+ }
720
+ const u = s.useCallback(
721
+ (f) => {
722
+ var g;
723
+ if (i) {
724
+ const m = $n(f) ? f(e) : f;
725
+ m !== e && ((g = c.current) == null || g.call(c, m));
726
+ } else
727
+ a(f);
728
+ },
729
+ [i, e, a, c]
730
+ );
731
+ return [v, u];
732
+ }
733
+ function Wn({
734
+ defaultProp: e,
735
+ onChange: t
736
+ }) {
737
+ const [n, r] = s.useState(e), o = s.useRef(n), a = s.useRef(t);
738
+ return kn(() => {
739
+ a.current = t;
740
+ }, [t]), s.useEffect(() => {
741
+ var c;
742
+ o.current !== n && ((c = a.current) == null || c.call(a, n), o.current = n);
743
+ }, [n, o]), [n, r, a];
744
+ }
745
+ function $n(e) {
746
+ return typeof e == "function";
747
+ }
748
+ var Bn = [
749
+ "a",
750
+ "button",
751
+ "div",
752
+ "form",
753
+ "h2",
754
+ "h3",
755
+ "img",
756
+ "input",
757
+ "label",
758
+ "li",
759
+ "nav",
760
+ "ol",
761
+ "p",
762
+ "select",
763
+ "span",
764
+ "svg",
765
+ "ul"
766
+ ], k = Bn.reduce((e, t) => {
767
+ const n = He(`Primitive.${t}`), r = s.forwardRef((o, a) => {
768
+ const { asChild: c, ...i } = o, v = c ? n : t;
769
+ return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ l(v, { ...i, ref: a });
770
+ });
771
+ return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
772
+ }, {});
773
+ function Un(e, t) {
774
+ e && dn.flushSync(() => e.dispatchEvent(t));
775
+ }
776
+ function X(e) {
777
+ const t = s.useRef(e);
778
+ return s.useEffect(() => {
779
+ t.current = e;
780
+ }), s.useMemo(() => (...n) => {
781
+ var r;
782
+ return (r = t.current) == null ? void 0 : r.call(t, ...n);
783
+ }, []);
784
+ }
785
+ function zn(e, t = globalThis == null ? void 0 : globalThis.document) {
786
+ const n = X(e);
787
+ s.useEffect(() => {
788
+ const r = (o) => {
789
+ o.key === "Escape" && n(o);
790
+ };
791
+ return t.addEventListener("keydown", r, { capture: !0 }), () => t.removeEventListener("keydown", r, { capture: !0 });
792
+ }, [n, t]);
793
+ }
794
+ var jn = "DismissableLayer", Ne = "dismissableLayer.update", Vn = "dismissableLayer.pointerDownOutside", Gn = "dismissableLayer.focusOutside", ke, tt = s.createContext({
795
+ layers: /* @__PURE__ */ new Set(),
796
+ layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
797
+ branches: /* @__PURE__ */ new Set()
798
+ }), nt = s.forwardRef(
799
+ (e, t) => {
800
+ const {
801
+ disableOutsidePointerEvents: n = !1,
802
+ onEscapeKeyDown: r,
803
+ onPointerDownOutside: o,
804
+ onFocusOutside: a,
805
+ onInteractOutside: c,
806
+ onDismiss: i,
807
+ ...v
808
+ } = e, u = s.useContext(tt), [f, g] = s.useState(null), m = (f == null ? void 0 : f.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, h] = s.useState({}), x = I(t, (y) => g(y)), d = Array.from(u.layers), [p] = [...u.layersWithOutsidePointerEventsDisabled].slice(-1), b = d.indexOf(p), w = f ? d.indexOf(f) : -1, N = u.layersWithOutsidePointerEventsDisabled.size > 0, S = w >= b, C = Hn((y) => {
809
+ const _ = y.target, Y = [...u.branches].some((fe) => fe.contains(_));
810
+ !S || Y || (o == null || o(y), c == null || c(y), y.defaultPrevented || i == null || i());
811
+ }, m), O = Xn((y) => {
812
+ const _ = y.target;
813
+ [...u.branches].some((fe) => fe.contains(_)) || (a == null || a(y), c == null || c(y), y.defaultPrevented || i == null || i());
814
+ }, m);
815
+ return zn((y) => {
816
+ w === u.layers.size - 1 && (r == null || r(y), !y.defaultPrevented && i && (y.preventDefault(), i()));
817
+ }, m), s.useEffect(() => {
818
+ if (f)
819
+ return n && (u.layersWithOutsidePointerEventsDisabled.size === 0 && (ke = m.body.style.pointerEvents, m.body.style.pointerEvents = "none"), u.layersWithOutsidePointerEventsDisabled.add(f)), u.layers.add(f), Fe(), () => {
820
+ n && u.layersWithOutsidePointerEventsDisabled.size === 1 && (m.body.style.pointerEvents = ke);
821
+ };
822
+ }, [f, m, n, u]), s.useEffect(() => () => {
823
+ f && (u.layers.delete(f), u.layersWithOutsidePointerEventsDisabled.delete(f), Fe());
824
+ }, [f, u]), s.useEffect(() => {
825
+ const y = () => h({});
826
+ return document.addEventListener(Ne, y), () => document.removeEventListener(Ne, y);
827
+ }, []), /* @__PURE__ */ l(
828
+ k.div,
829
+ {
830
+ ...v,
831
+ ref: x,
832
+ style: {
833
+ pointerEvents: N ? S ? "auto" : "none" : void 0,
834
+ ...e.style
835
+ },
836
+ onFocusCapture: M(e.onFocusCapture, O.onFocusCapture),
837
+ onBlurCapture: M(e.onBlurCapture, O.onBlurCapture),
838
+ onPointerDownCapture: M(
839
+ e.onPointerDownCapture,
840
+ C.onPointerDownCapture
841
+ )
842
+ }
843
+ );
844
+ }
845
+ );
846
+ nt.displayName = jn;
847
+ var Kn = "DismissableLayerBranch", Yn = s.forwardRef((e, t) => {
848
+ const n = s.useContext(tt), r = s.useRef(null), o = I(t, r);
849
+ return s.useEffect(() => {
850
+ const a = r.current;
851
+ if (a)
852
+ return n.branches.add(a), () => {
853
+ n.branches.delete(a);
854
+ };
855
+ }, [n.branches]), /* @__PURE__ */ l(k.div, { ...e, ref: o });
856
+ });
857
+ Yn.displayName = Kn;
858
+ function Hn(e, t = globalThis == null ? void 0 : globalThis.document) {
859
+ const n = X(e), r = s.useRef(!1), o = s.useRef(() => {
860
+ });
861
+ return s.useEffect(() => {
862
+ const a = (i) => {
863
+ if (i.target && !r.current) {
864
+ let v = function() {
865
+ rt(
866
+ Vn,
867
+ n,
868
+ u,
869
+ { discrete: !0 }
870
+ );
871
+ };
872
+ const u = { originalEvent: i };
873
+ i.pointerType === "touch" ? (t.removeEventListener("click", o.current), o.current = v, t.addEventListener("click", o.current, { once: !0 })) : v();
874
+ } else
875
+ t.removeEventListener("click", o.current);
876
+ r.current = !1;
877
+ }, c = window.setTimeout(() => {
878
+ t.addEventListener("pointerdown", a);
879
+ }, 0);
880
+ return () => {
881
+ window.clearTimeout(c), t.removeEventListener("pointerdown", a), t.removeEventListener("click", o.current);
882
+ };
883
+ }, [t, n]), {
884
+ // ensures we check React component tree (not just DOM tree)
885
+ onPointerDownCapture: () => r.current = !0
886
+ };
887
+ }
888
+ function Xn(e, t = globalThis == null ? void 0 : globalThis.document) {
889
+ const n = X(e), r = s.useRef(!1);
890
+ return s.useEffect(() => {
891
+ const o = (a) => {
892
+ a.target && !r.current && rt(Gn, n, { originalEvent: a }, {
893
+ discrete: !1
894
+ });
895
+ };
896
+ return t.addEventListener("focusin", o), () => t.removeEventListener("focusin", o);
897
+ }, [t, n]), {
898
+ onFocusCapture: () => r.current = !0,
899
+ onBlurCapture: () => r.current = !1
900
+ };
901
+ }
902
+ function Fe() {
903
+ const e = new CustomEvent(Ne);
904
+ document.dispatchEvent(e);
905
+ }
906
+ function rt(e, t, n, { discrete: r }) {
907
+ const o = n.originalEvent.target, a = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
908
+ t && o.addEventListener(e, t, { once: !0 }), r ? Un(o, a) : o.dispatchEvent(a);
909
+ }
910
+ var ge = "focusScope.autoFocusOnMount", me = "focusScope.autoFocusOnUnmount", We = { bubbles: !1, cancelable: !0 }, qn = "FocusScope", ot = s.forwardRef((e, t) => {
911
+ const {
912
+ loop: n = !1,
913
+ trapped: r = !1,
914
+ onMountAutoFocus: o,
915
+ onUnmountAutoFocus: a,
916
+ ...c
917
+ } = e, [i, v] = s.useState(null), u = X(o), f = X(a), g = s.useRef(null), m = I(t, (d) => v(d)), h = s.useRef({
918
+ paused: !1,
919
+ pause() {
920
+ this.paused = !0;
921
+ },
922
+ resume() {
923
+ this.paused = !1;
924
+ }
925
+ }).current;
926
+ s.useEffect(() => {
927
+ if (r) {
928
+ let d = function(N) {
929
+ if (h.paused || !i) return;
930
+ const S = N.target;
931
+ i.contains(S) ? g.current = S : W(g.current, { select: !0 });
932
+ }, p = function(N) {
933
+ if (h.paused || !i) return;
934
+ const S = N.relatedTarget;
935
+ S !== null && (i.contains(S) || W(g.current, { select: !0 }));
936
+ }, b = function(N) {
937
+ if (document.activeElement === document.body)
938
+ for (const C of N)
939
+ C.removedNodes.length > 0 && W(i);
940
+ };
941
+ document.addEventListener("focusin", d), document.addEventListener("focusout", p);
942
+ const w = new MutationObserver(b);
943
+ return i && w.observe(i, { childList: !0, subtree: !0 }), () => {
944
+ document.removeEventListener("focusin", d), document.removeEventListener("focusout", p), w.disconnect();
945
+ };
946
+ }
947
+ }, [r, i, h.paused]), s.useEffect(() => {
948
+ if (i) {
949
+ Be.add(h);
950
+ const d = document.activeElement;
951
+ if (!i.contains(d)) {
952
+ const b = new CustomEvent(ge, We);
953
+ i.addEventListener(ge, u), i.dispatchEvent(b), b.defaultPrevented || (Zn(nr(at(i)), { select: !0 }), document.activeElement === d && W(i));
954
+ }
955
+ return () => {
956
+ i.removeEventListener(ge, u), setTimeout(() => {
957
+ const b = new CustomEvent(me, We);
958
+ i.addEventListener(me, f), i.dispatchEvent(b), b.defaultPrevented || W(d ?? document.body, { select: !0 }), i.removeEventListener(me, f), Be.remove(h);
959
+ }, 0);
960
+ };
961
+ }
962
+ }, [i, u, f, h]);
963
+ const x = s.useCallback(
964
+ (d) => {
965
+ if (!n && !r || h.paused) return;
966
+ const p = d.key === "Tab" && !d.altKey && !d.ctrlKey && !d.metaKey, b = document.activeElement;
967
+ if (p && b) {
968
+ const w = d.currentTarget, [N, S] = Qn(w);
969
+ N && S ? !d.shiftKey && b === S ? (d.preventDefault(), n && W(N, { select: !0 })) : d.shiftKey && b === N && (d.preventDefault(), n && W(S, { select: !0 })) : b === w && d.preventDefault();
970
+ }
971
+ },
972
+ [n, r, h.paused]
973
+ );
974
+ return /* @__PURE__ */ l(k.div, { tabIndex: -1, ...c, ref: m, onKeyDown: x });
975
+ });
976
+ ot.displayName = qn;
977
+ function Zn(e, { select: t = !1 } = {}) {
978
+ const n = document.activeElement;
979
+ for (const r of e)
980
+ if (W(r, { select: t }), document.activeElement !== n) return;
981
+ }
982
+ function Qn(e) {
983
+ const t = at(e), n = $e(t, e), r = $e(t.reverse(), e);
984
+ return [n, r];
985
+ }
986
+ function at(e) {
987
+ const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
988
+ acceptNode: (r) => {
989
+ const o = r.tagName === "INPUT" && r.type === "hidden";
990
+ return r.disabled || r.hidden || o ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
991
+ }
992
+ });
993
+ for (; n.nextNode(); ) t.push(n.currentNode);
994
+ return t;
995
+ }
996
+ function $e(e, t) {
997
+ for (const n of e)
998
+ if (!Jn(n, { upTo: t })) return n;
999
+ }
1000
+ function Jn(e, { upTo: t }) {
1001
+ if (getComputedStyle(e).visibility === "hidden") return !0;
1002
+ for (; e; ) {
1003
+ if (t !== void 0 && e === t) return !1;
1004
+ if (getComputedStyle(e).display === "none") return !0;
1005
+ e = e.parentElement;
1006
+ }
1007
+ return !1;
1008
+ }
1009
+ function er(e) {
1010
+ return e instanceof HTMLInputElement && "select" in e;
1011
+ }
1012
+ function W(e, { select: t = !1 } = {}) {
1013
+ if (e && e.focus) {
1014
+ const n = document.activeElement;
1015
+ e.focus({ preventScroll: !0 }), e !== n && er(e) && t && e.select();
1016
+ }
1017
+ }
1018
+ var Be = tr();
1019
+ function tr() {
1020
+ let e = [];
1021
+ return {
1022
+ add(t) {
1023
+ const n = e[0];
1024
+ t !== n && (n == null || n.pause()), e = Ue(e, t), e.unshift(t);
1025
+ },
1026
+ remove(t) {
1027
+ var n;
1028
+ e = Ue(e, t), (n = e[0]) == null || n.resume();
1029
+ }
1030
+ };
1031
+ }
1032
+ function Ue(e, t) {
1033
+ const n = [...e], r = n.indexOf(t);
1034
+ return r !== -1 && n.splice(r, 1), n;
1035
+ }
1036
+ function nr(e) {
1037
+ return e.filter((t) => t.tagName !== "A");
1038
+ }
1039
+ var rr = "Portal", it = s.forwardRef((e, t) => {
1040
+ var i;
1041
+ const { container: n, ...r } = e, [o, a] = s.useState(!1);
1042
+ H(() => a(!0), []);
1043
+ const c = n || o && ((i = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : i.body);
1044
+ return c ? fn.createPortal(/* @__PURE__ */ l(k.div, { ...r, ref: t }), c) : null;
1045
+ });
1046
+ it.displayName = rr;
1047
+ function or(e, t) {
1048
+ return s.useReducer((n, r) => t[n][r] ?? n, e);
1049
+ }
1050
+ var ce = (e) => {
1051
+ const { present: t, children: n } = e, r = ar(t), o = typeof n == "function" ? n({ present: r.isPresent }) : s.Children.only(n), a = I(r.ref, ir(o));
1052
+ return typeof n == "function" || r.isPresent ? s.cloneElement(o, { ref: a }) : null;
1053
+ };
1054
+ ce.displayName = "Presence";
1055
+ function ar(e) {
1056
+ const [t, n] = s.useState(), r = s.useRef(null), o = s.useRef(e), a = s.useRef("none"), c = e ? "mounted" : "unmounted", [i, v] = or(c, {
1057
+ mounted: {
1058
+ UNMOUNT: "unmounted",
1059
+ ANIMATION_OUT: "unmountSuspended"
1060
+ },
1061
+ unmountSuspended: {
1062
+ MOUNT: "mounted",
1063
+ ANIMATION_END: "unmounted"
1064
+ },
1065
+ unmounted: {
1066
+ MOUNT: "mounted"
1067
+ }
1068
+ });
1069
+ return s.useEffect(() => {
1070
+ const u = J(r.current);
1071
+ a.current = i === "mounted" ? u : "none";
1072
+ }, [i]), H(() => {
1073
+ const u = r.current, f = o.current;
1074
+ if (f !== e) {
1075
+ const m = a.current, h = J(u);
1076
+ e ? v("MOUNT") : h === "none" || (u == null ? void 0 : u.display) === "none" ? v("UNMOUNT") : v(f && m !== h ? "ANIMATION_OUT" : "UNMOUNT"), o.current = e;
1077
+ }
1078
+ }, [e, v]), H(() => {
1079
+ if (t) {
1080
+ let u;
1081
+ const f = t.ownerDocument.defaultView ?? window, g = (h) => {
1082
+ const d = J(r.current).includes(h.animationName);
1083
+ if (h.target === t && d && (v("ANIMATION_END"), !o.current)) {
1084
+ const p = t.style.animationFillMode;
1085
+ t.style.animationFillMode = "forwards", u = f.setTimeout(() => {
1086
+ t.style.animationFillMode === "forwards" && (t.style.animationFillMode = p);
1087
+ });
1088
+ }
1089
+ }, m = (h) => {
1090
+ h.target === t && (a.current = J(r.current));
1091
+ };
1092
+ return t.addEventListener("animationstart", m), t.addEventListener("animationcancel", g), t.addEventListener("animationend", g), () => {
1093
+ f.clearTimeout(u), t.removeEventListener("animationstart", m), t.removeEventListener("animationcancel", g), t.removeEventListener("animationend", g);
1094
+ };
1095
+ } else
1096
+ v("ANIMATION_END");
1097
+ }, [t, v]), {
1098
+ isPresent: ["mounted", "unmountSuspended"].includes(i),
1099
+ ref: s.useCallback((u) => {
1100
+ r.current = u ? getComputedStyle(u) : null, n(u);
1101
+ }, [])
1102
+ };
1103
+ }
1104
+ function J(e) {
1105
+ return (e == null ? void 0 : e.animationName) || "none";
1106
+ }
1107
+ function ir(e) {
1108
+ var r, o;
1109
+ let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
1110
+ return n ? e.ref : (t = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
1111
+ }
1112
+ var pe = 0;
1113
+ function sr() {
1114
+ s.useEffect(() => {
1115
+ const e = document.querySelectorAll("[data-radix-focus-guard]");
1116
+ return document.body.insertAdjacentElement("afterbegin", e[0] ?? ze()), document.body.insertAdjacentElement("beforeend", e[1] ?? ze()), pe++, () => {
1117
+ pe === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), pe--;
1118
+ };
1119
+ }, []);
1120
+ }
1121
+ function ze() {
1122
+ const e = document.createElement("span");
1123
+ return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
1124
+ }
1125
+ var T = function() {
1126
+ return T = Object.assign || function(t) {
1127
+ for (var n, r = 1, o = arguments.length; r < o; r++) {
1128
+ n = arguments[r];
1129
+ for (var a in n) Object.prototype.hasOwnProperty.call(n, a) && (t[a] = n[a]);
1130
+ }
1131
+ return t;
1132
+ }, T.apply(this, arguments);
1133
+ };
1134
+ function st(e, t) {
1135
+ var n = {};
1136
+ for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
1137
+ if (e != null && typeof Object.getOwnPropertySymbols == "function")
1138
+ for (var o = 0, r = Object.getOwnPropertySymbols(e); o < r.length; o++)
1139
+ t.indexOf(r[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[o]) && (n[r[o]] = e[r[o]]);
1140
+ return n;
1141
+ }
1142
+ function cr(e, t, n) {
1143
+ if (n || arguments.length === 2) for (var r = 0, o = t.length, a; r < o; r++)
1144
+ (a || !(r in t)) && (a || (a = Array.prototype.slice.call(t, 0, r)), a[r] = t[r]);
1145
+ return e.concat(a || Array.prototype.slice.call(t));
1146
+ }
1147
+ var oe = "right-scroll-bar-position", ae = "width-before-scroll-bar", lr = "with-scroll-bars-hidden", ur = "--removed-body-scroll-bar-size";
1148
+ function he(e, t) {
1149
+ return typeof e == "function" ? e(t) : e && (e.current = t), e;
1150
+ }
1151
+ function dr(e, t) {
1152
+ var n = cn(function() {
1153
+ return {
1154
+ // value
1155
+ value: e,
1156
+ // last callback
1157
+ callback: t,
1158
+ // "memoized" public interface
1159
+ facade: {
1160
+ get current() {
1161
+ return n.value;
1162
+ },
1163
+ set current(r) {
1164
+ var o = n.value;
1165
+ o !== r && (n.value = r, n.callback(r, o));
1166
+ }
1167
+ }
1168
+ };
1169
+ })[0];
1170
+ return n.callback = t, n.facade;
1171
+ }
1172
+ var fr = typeof window < "u" ? s.useLayoutEffect : s.useEffect, je = /* @__PURE__ */ new WeakMap();
1173
+ function vr(e, t) {
1174
+ var n = dr(null, function(r) {
1175
+ return e.forEach(function(o) {
1176
+ return he(o, r);
1177
+ });
1178
+ });
1179
+ return fr(function() {
1180
+ var r = je.get(n);
1181
+ if (r) {
1182
+ var o = new Set(r), a = new Set(e), c = n.current;
1183
+ o.forEach(function(i) {
1184
+ a.has(i) || he(i, null);
1185
+ }), a.forEach(function(i) {
1186
+ o.has(i) || he(i, c);
1187
+ });
1188
+ }
1189
+ je.set(n, e);
1190
+ }, [e]), n;
1191
+ }
1192
+ function gr(e) {
1193
+ return e;
1194
+ }
1195
+ function mr(e, t) {
1196
+ t === void 0 && (t = gr);
1197
+ var n = [], r = !1, o = {
1198
+ read: function() {
1199
+ if (r)
1200
+ throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
1201
+ return n.length ? n[n.length - 1] : e;
1202
+ },
1203
+ useMedium: function(a) {
1204
+ var c = t(a, r);
1205
+ return n.push(c), function() {
1206
+ n = n.filter(function(i) {
1207
+ return i !== c;
1208
+ });
1209
+ };
1210
+ },
1211
+ assignSyncMedium: function(a) {
1212
+ for (r = !0; n.length; ) {
1213
+ var c = n;
1214
+ n = [], c.forEach(a);
1215
+ }
1216
+ n = {
1217
+ push: function(i) {
1218
+ return a(i);
1219
+ },
1220
+ filter: function() {
1221
+ return n;
1222
+ }
1223
+ };
1224
+ },
1225
+ assignMedium: function(a) {
1226
+ r = !0;
1227
+ var c = [];
1228
+ if (n.length) {
1229
+ var i = n;
1230
+ n = [], i.forEach(a), c = n;
1231
+ }
1232
+ var v = function() {
1233
+ var f = c;
1234
+ c = [], f.forEach(a);
1235
+ }, u = function() {
1236
+ return Promise.resolve().then(v);
1237
+ };
1238
+ u(), n = {
1239
+ push: function(f) {
1240
+ c.push(f), u();
1241
+ },
1242
+ filter: function(f) {
1243
+ return c = c.filter(f), n;
1244
+ }
1245
+ };
1246
+ }
1247
+ };
1248
+ return o;
1249
+ }
1250
+ function pr(e) {
1251
+ e === void 0 && (e = {});
1252
+ var t = mr(null);
1253
+ return t.options = T({ async: !0, ssr: !1 }, e), t;
1254
+ }
1255
+ var ct = function(e) {
1256
+ var t = e.sideCar, n = st(e, ["sideCar"]);
1257
+ if (!t)
1258
+ throw new Error("Sidecar: please provide `sideCar` property to import the right car");
1259
+ var r = t.read();
1260
+ if (!r)
1261
+ throw new Error("Sidecar medium not found");
1262
+ return s.createElement(r, T({}, n));
1263
+ };
1264
+ ct.isSideCarExport = !0;
1265
+ function hr(e, t) {
1266
+ return e.useMedium(t), ct;
1267
+ }
1268
+ var lt = pr(), be = function() {
1269
+ }, le = s.forwardRef(function(e, t) {
1270
+ var n = s.useRef(null), r = s.useState({
1271
+ onScrollCapture: be,
1272
+ onWheelCapture: be,
1273
+ onTouchMoveCapture: be
1274
+ }), o = r[0], a = r[1], c = e.forwardProps, i = e.children, v = e.className, u = e.removeScrollBar, f = e.enabled, g = e.shards, m = e.sideCar, h = e.noRelative, x = e.noIsolation, d = e.inert, p = e.allowPinchZoom, b = e.as, w = b === void 0 ? "div" : b, N = e.gapMode, S = st(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), C = m, O = vr([n, t]), y = T(T({}, S), o);
1275
+ return s.createElement(
1276
+ s.Fragment,
1277
+ null,
1278
+ f && s.createElement(C, { sideCar: lt, removeScrollBar: u, shards: g, noRelative: h, noIsolation: x, inert: d, setCallbacks: a, allowPinchZoom: !!p, lockRef: n, gapMode: N }),
1279
+ c ? s.cloneElement(s.Children.only(i), T(T({}, y), { ref: O })) : s.createElement(w, T({}, y, { className: v, ref: O }), i)
1280
+ );
1281
+ });
1282
+ le.defaultProps = {
1283
+ enabled: !0,
1284
+ removeScrollBar: !0,
1285
+ inert: !1
1286
+ };
1287
+ le.classNames = {
1288
+ fullWidth: ae,
1289
+ zeroRight: oe
1290
+ };
1291
+ var br = function() {
1292
+ if (typeof __webpack_nonce__ < "u")
1293
+ return __webpack_nonce__;
1294
+ };
1295
+ function yr() {
1296
+ if (!document)
1297
+ return null;
1298
+ var e = document.createElement("style");
1299
+ e.type = "text/css";
1300
+ var t = br();
1301
+ return t && e.setAttribute("nonce", t), e;
1302
+ }
1303
+ function Er(e, t) {
1304
+ e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
1305
+ }
1306
+ function xr(e) {
1307
+ var t = document.head || document.getElementsByTagName("head")[0];
1308
+ t.appendChild(e);
1309
+ }
1310
+ var wr = function() {
1311
+ var e = 0, t = null;
1312
+ return {
1313
+ add: function(n) {
1314
+ e == 0 && (t = yr()) && (Er(t, n), xr(t)), e++;
1315
+ },
1316
+ remove: function() {
1317
+ e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
1318
+ }
1319
+ };
1320
+ }, Nr = function() {
1321
+ var e = wr();
1322
+ return function(t, n) {
1323
+ s.useEffect(function() {
1324
+ return e.add(t), function() {
1325
+ e.remove();
1326
+ };
1327
+ }, [t && n]);
1328
+ };
1329
+ }, ut = function() {
1330
+ var e = Nr(), t = function(n) {
1331
+ var r = n.styles, o = n.dynamic;
1332
+ return e(r, o), null;
1333
+ };
1334
+ return t;
1335
+ }, Sr = {
1336
+ left: 0,
1337
+ top: 0,
1338
+ right: 0,
1339
+ gap: 0
1340
+ }, ye = function(e) {
1341
+ return parseInt(e || "", 10) || 0;
1342
+ }, Cr = function(e) {
1343
+ var t = window.getComputedStyle(document.body), n = t[e === "padding" ? "paddingLeft" : "marginLeft"], r = t[e === "padding" ? "paddingTop" : "marginTop"], o = t[e === "padding" ? "paddingRight" : "marginRight"];
1344
+ return [ye(n), ye(r), ye(o)];
1345
+ }, Ar = function(e) {
1346
+ if (e === void 0 && (e = "margin"), typeof window > "u")
1347
+ return Sr;
1348
+ var t = Cr(e), n = document.documentElement.clientWidth, r = window.innerWidth;
1349
+ return {
1350
+ left: t[0],
1351
+ top: t[1],
1352
+ right: t[2],
1353
+ gap: Math.max(0, r - n + t[2] - t[0])
1354
+ };
1355
+ }, Dr = ut(), V = "data-scroll-locked", Pr = function(e, t, n, r) {
1356
+ var o = e.left, a = e.top, c = e.right, i = e.gap;
1357
+ return n === void 0 && (n = "margin"), `
1358
+ .`.concat(lr, ` {
1359
+ overflow: hidden `).concat(r, `;
1360
+ padding-right: `).concat(i, "px ").concat(r, `;
1361
+ }
1362
+ body[`).concat(V, `] {
1363
+ overflow: hidden `).concat(r, `;
1364
+ overscroll-behavior: contain;
1365
+ `).concat([
1366
+ t && "position: relative ".concat(r, ";"),
1367
+ n === "margin" && `
1368
+ padding-left: `.concat(o, `px;
1369
+ padding-top: `).concat(a, `px;
1370
+ padding-right: `).concat(c, `px;
1371
+ margin-left:0;
1372
+ margin-top:0;
1373
+ margin-right: `).concat(i, "px ").concat(r, `;
1374
+ `),
1375
+ n === "padding" && "padding-right: ".concat(i, "px ").concat(r, ";")
1376
+ ].filter(Boolean).join(""), `
1377
+ }
1378
+
1379
+ .`).concat(oe, ` {
1380
+ right: `).concat(i, "px ").concat(r, `;
1381
+ }
1382
+
1383
+ .`).concat(ae, ` {
1384
+ margin-right: `).concat(i, "px ").concat(r, `;
1385
+ }
1386
+
1387
+ .`).concat(oe, " .").concat(oe, ` {
1388
+ right: 0 `).concat(r, `;
1389
+ }
1390
+
1391
+ .`).concat(ae, " .").concat(ae, ` {
1392
+ margin-right: 0 `).concat(r, `;
1393
+ }
1394
+
1395
+ body[`).concat(V, `] {
1396
+ `).concat(ur, ": ").concat(i, `px;
1397
+ }
1398
+ `);
1399
+ }, Ve = function() {
1400
+ var e = parseInt(document.body.getAttribute(V) || "0", 10);
1401
+ return isFinite(e) ? e : 0;
1402
+ }, Rr = function() {
1403
+ s.useEffect(function() {
1404
+ return document.body.setAttribute(V, (Ve() + 1).toString()), function() {
1405
+ var e = Ve() - 1;
1406
+ e <= 0 ? document.body.removeAttribute(V) : document.body.setAttribute(V, e.toString());
1407
+ };
1408
+ }, []);
1409
+ }, Tr = function(e) {
1410
+ var t = e.noRelative, n = e.noImportant, r = e.gapMode, o = r === void 0 ? "margin" : r;
1411
+ Rr();
1412
+ var a = s.useMemo(function() {
1413
+ return Ar(o);
1414
+ }, [o]);
1415
+ return s.createElement(Dr, { styles: Pr(a, !t, o, n ? "" : "!important") });
1416
+ }, Se = !1;
1417
+ if (typeof window < "u")
1418
+ try {
1419
+ var ee = Object.defineProperty({}, "passive", {
1420
+ get: function() {
1421
+ return Se = !0, !0;
1422
+ }
1423
+ });
1424
+ window.addEventListener("test", ee, ee), window.removeEventListener("test", ee, ee);
1425
+ } catch {
1426
+ Se = !1;
1427
+ }
1428
+ var U = Se ? { passive: !1 } : !1, Or = function(e) {
1429
+ return e.tagName === "TEXTAREA";
1430
+ }, dt = function(e, t) {
1431
+ if (!(e instanceof Element))
1432
+ return !1;
1433
+ var n = window.getComputedStyle(e);
1434
+ return (
1435
+ // not-not-scrollable
1436
+ n[t] !== "hidden" && // contains scroll inside self
1437
+ !(n.overflowY === n.overflowX && !Or(e) && n[t] === "visible")
1438
+ );
1439
+ }, _r = function(e) {
1440
+ return dt(e, "overflowY");
1441
+ }, Mr = function(e) {
1442
+ return dt(e, "overflowX");
1443
+ }, Ge = function(e, t) {
1444
+ var n = t.ownerDocument, r = t;
1445
+ do {
1446
+ typeof ShadowRoot < "u" && r instanceof ShadowRoot && (r = r.host);
1447
+ var o = ft(e, r);
1448
+ if (o) {
1449
+ var a = vt(e, r), c = a[1], i = a[2];
1450
+ if (c > i)
1451
+ return !0;
1452
+ }
1453
+ r = r.parentNode;
1454
+ } while (r && r !== n.body);
1455
+ return !1;
1456
+ }, Lr = function(e) {
1457
+ var t = e.scrollTop, n = e.scrollHeight, r = e.clientHeight;
1458
+ return [
1459
+ t,
1460
+ n,
1461
+ r
1462
+ ];
1463
+ }, Ir = function(e) {
1464
+ var t = e.scrollLeft, n = e.scrollWidth, r = e.clientWidth;
1465
+ return [
1466
+ t,
1467
+ n,
1468
+ r
1469
+ ];
1470
+ }, ft = function(e, t) {
1471
+ return e === "v" ? _r(t) : Mr(t);
1472
+ }, vt = function(e, t) {
1473
+ return e === "v" ? Lr(t) : Ir(t);
1474
+ }, kr = function(e, t) {
1475
+ return e === "h" && t === "rtl" ? -1 : 1;
1476
+ }, Fr = function(e, t, n, r, o) {
1477
+ var a = kr(e, window.getComputedStyle(t).direction), c = a * r, i = n.target, v = t.contains(i), u = !1, f = c > 0, g = 0, m = 0;
1478
+ do {
1479
+ if (!i)
1480
+ break;
1481
+ var h = vt(e, i), x = h[0], d = h[1], p = h[2], b = d - p - a * x;
1482
+ (x || b) && ft(e, i) && (g += b, m += x);
1483
+ var w = i.parentNode;
1484
+ i = w && w.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? w.host : w;
1485
+ } while (
1486
+ // portaled content
1487
+ !v && i !== document.body || // self content
1488
+ v && (t.contains(i) || t === i)
1489
+ );
1490
+ return (f && Math.abs(g) < 1 || !f && Math.abs(m) < 1) && (u = !0), u;
1491
+ }, te = function(e) {
1492
+ return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
1493
+ }, Ke = function(e) {
1494
+ return [e.deltaX, e.deltaY];
1495
+ }, Ye = function(e) {
1496
+ return e && "current" in e ? e.current : e;
1497
+ }, Wr = function(e, t) {
1498
+ return e[0] === t[0] && e[1] === t[1];
1499
+ }, $r = function(e) {
1500
+ return `
1501
+ .block-interactivity-`.concat(e, ` {pointer-events: none;}
1502
+ .allow-interactivity-`).concat(e, ` {pointer-events: all;}
1503
+ `);
1504
+ }, Br = 0, z = [];
1505
+ function Ur(e) {
1506
+ var t = s.useRef([]), n = s.useRef([0, 0]), r = s.useRef(), o = s.useState(Br++)[0], a = s.useState(ut)[0], c = s.useRef(e);
1507
+ s.useEffect(function() {
1508
+ c.current = e;
1509
+ }, [e]), s.useEffect(function() {
1510
+ if (e.inert) {
1511
+ document.body.classList.add("block-interactivity-".concat(o));
1512
+ var d = cr([e.lockRef.current], (e.shards || []).map(Ye), !0).filter(Boolean);
1513
+ return d.forEach(function(p) {
1514
+ return p.classList.add("allow-interactivity-".concat(o));
1515
+ }), function() {
1516
+ document.body.classList.remove("block-interactivity-".concat(o)), d.forEach(function(p) {
1517
+ return p.classList.remove("allow-interactivity-".concat(o));
1518
+ });
1519
+ };
1520
+ }
1521
+ }, [e.inert, e.lockRef.current, e.shards]);
1522
+ var i = s.useCallback(function(d, p) {
1523
+ if ("touches" in d && d.touches.length === 2 || d.type === "wheel" && d.ctrlKey)
1524
+ return !c.current.allowPinchZoom;
1525
+ var b = te(d), w = n.current, N = "deltaX" in d ? d.deltaX : w[0] - b[0], S = "deltaY" in d ? d.deltaY : w[1] - b[1], C, O = d.target, y = Math.abs(N) > Math.abs(S) ? "h" : "v";
1526
+ if ("touches" in d && y === "h" && O.type === "range")
1527
+ return !1;
1528
+ var _ = Ge(y, O);
1529
+ if (!_)
1530
+ return !0;
1531
+ if (_ ? C = y : (C = y === "v" ? "h" : "v", _ = Ge(y, O)), !_)
1532
+ return !1;
1533
+ if (!r.current && "changedTouches" in d && (N || S) && (r.current = C), !C)
1534
+ return !0;
1535
+ var Y = r.current || C;
1536
+ return Fr(Y, p, d, Y === "h" ? N : S);
1537
+ }, []), v = s.useCallback(function(d) {
1538
+ var p = d;
1539
+ if (!(!z.length || z[z.length - 1] !== a)) {
1540
+ var b = "deltaY" in p ? Ke(p) : te(p), w = t.current.filter(function(C) {
1541
+ return C.name === p.type && (C.target === p.target || p.target === C.shadowParent) && Wr(C.delta, b);
1542
+ })[0];
1543
+ if (w && w.should) {
1544
+ p.cancelable && p.preventDefault();
1545
+ return;
1546
+ }
1547
+ if (!w) {
1548
+ var N = (c.current.shards || []).map(Ye).filter(Boolean).filter(function(C) {
1549
+ return C.contains(p.target);
1550
+ }), S = N.length > 0 ? i(p, N[0]) : !c.current.noIsolation;
1551
+ S && p.cancelable && p.preventDefault();
1552
+ }
1553
+ }
1554
+ }, []), u = s.useCallback(function(d, p, b, w) {
1555
+ var N = { name: d, delta: p, target: b, should: w, shadowParent: zr(b) };
1556
+ t.current.push(N), setTimeout(function() {
1557
+ t.current = t.current.filter(function(S) {
1558
+ return S !== N;
1559
+ });
1560
+ }, 1);
1561
+ }, []), f = s.useCallback(function(d) {
1562
+ n.current = te(d), r.current = void 0;
1563
+ }, []), g = s.useCallback(function(d) {
1564
+ u(d.type, Ke(d), d.target, i(d, e.lockRef.current));
1565
+ }, []), m = s.useCallback(function(d) {
1566
+ u(d.type, te(d), d.target, i(d, e.lockRef.current));
1567
+ }, []);
1568
+ s.useEffect(function() {
1569
+ return z.push(a), e.setCallbacks({
1570
+ onScrollCapture: g,
1571
+ onWheelCapture: g,
1572
+ onTouchMoveCapture: m
1573
+ }), document.addEventListener("wheel", v, U), document.addEventListener("touchmove", v, U), document.addEventListener("touchstart", f, U), function() {
1574
+ z = z.filter(function(d) {
1575
+ return d !== a;
1576
+ }), document.removeEventListener("wheel", v, U), document.removeEventListener("touchmove", v, U), document.removeEventListener("touchstart", f, U);
1577
+ };
1578
+ }, []);
1579
+ var h = e.removeScrollBar, x = e.inert;
1580
+ return s.createElement(
1581
+ s.Fragment,
1582
+ null,
1583
+ x ? s.createElement(a, { styles: $r(o) }) : null,
1584
+ h ? s.createElement(Tr, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
1585
+ );
1586
+ }
1587
+ function zr(e) {
1588
+ for (var t = null; e !== null; )
1589
+ e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
1590
+ return t;
1591
+ }
1592
+ const jr = hr(lt, Ur);
1593
+ var gt = s.forwardRef(function(e, t) {
1594
+ return s.createElement(le, T({}, e, { ref: t, sideCar: jr }));
1595
+ });
1596
+ gt.classNames = le.classNames;
1597
+ var Vr = function(e) {
1598
+ if (typeof document > "u")
1599
+ return null;
1600
+ var t = Array.isArray(e) ? e[0] : e;
1601
+ return t.ownerDocument.body;
1602
+ }, j = /* @__PURE__ */ new WeakMap(), ne = /* @__PURE__ */ new WeakMap(), re = {}, Ee = 0, mt = function(e) {
1603
+ return e && (e.host || mt(e.parentNode));
1604
+ }, Gr = function(e, t) {
1605
+ return t.map(function(n) {
1606
+ if (e.contains(n))
1607
+ return n;
1608
+ var r = mt(n);
1609
+ return r && e.contains(r) ? r : (console.error("aria-hidden", n, "in not contained inside", e, ". Doing nothing"), null);
1610
+ }).filter(function(n) {
1611
+ return !!n;
1612
+ });
1613
+ }, Kr = function(e, t, n, r) {
1614
+ var o = Gr(t, Array.isArray(e) ? e : [e]);
1615
+ re[n] || (re[n] = /* @__PURE__ */ new WeakMap());
1616
+ var a = re[n], c = [], i = /* @__PURE__ */ new Set(), v = new Set(o), u = function(g) {
1617
+ !g || i.has(g) || (i.add(g), u(g.parentNode));
1618
+ };
1619
+ o.forEach(u);
1620
+ var f = function(g) {
1621
+ !g || v.has(g) || Array.prototype.forEach.call(g.children, function(m) {
1622
+ if (i.has(m))
1623
+ f(m);
1624
+ else
1625
+ try {
1626
+ var h = m.getAttribute(r), x = h !== null && h !== "false", d = (j.get(m) || 0) + 1, p = (a.get(m) || 0) + 1;
1627
+ j.set(m, d), a.set(m, p), c.push(m), d === 1 && x && ne.set(m, !0), p === 1 && m.setAttribute(n, "true"), x || m.setAttribute(r, "true");
1628
+ } catch (b) {
1629
+ console.error("aria-hidden: cannot operate on ", m, b);
1630
+ }
1631
+ });
1632
+ };
1633
+ return f(t), i.clear(), Ee++, function() {
1634
+ c.forEach(function(g) {
1635
+ var m = j.get(g) - 1, h = a.get(g) - 1;
1636
+ j.set(g, m), a.set(g, h), m || (ne.has(g) || g.removeAttribute(r), ne.delete(g)), h || g.removeAttribute(n);
1637
+ }), Ee--, Ee || (j = /* @__PURE__ */ new WeakMap(), j = /* @__PURE__ */ new WeakMap(), ne = /* @__PURE__ */ new WeakMap(), re = {});
1638
+ };
1639
+ }, Yr = function(e, t, n) {
1640
+ n === void 0 && (n = "data-aria-hidden");
1641
+ var r = Array.from(Array.isArray(e) ? e : [e]), o = Vr(e);
1642
+ return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live], script"))), Kr(r, o, n, "aria-hidden")) : function() {
1643
+ return null;
1644
+ };
1645
+ }, ue = "Dialog", [pt, ht] = et(ue), [Hr, R] = pt(ue), bt = (e) => {
1646
+ const {
1647
+ __scopeDialog: t,
1648
+ children: n,
1649
+ open: r,
1650
+ defaultOpen: o,
1651
+ onOpenChange: a,
1652
+ modal: c = !0
1653
+ } = e, i = s.useRef(null), v = s.useRef(null), [u, f] = Fn({
1654
+ prop: r,
1655
+ defaultProp: o ?? !1,
1656
+ onChange: a,
1657
+ caller: ue
1658
+ });
1659
+ return /* @__PURE__ */ l(
1660
+ Hr,
1661
+ {
1662
+ scope: t,
1663
+ triggerRef: i,
1664
+ contentRef: v,
1665
+ contentId: ve(),
1666
+ titleId: ve(),
1667
+ descriptionId: ve(),
1668
+ open: u,
1669
+ onOpenChange: f,
1670
+ onOpenToggle: s.useCallback(() => f((g) => !g), [f]),
1671
+ modal: c,
1672
+ children: n
590
1673
  }
591
1674
  );
1675
+ };
1676
+ bt.displayName = ue;
1677
+ var yt = "DialogTrigger", Et = s.forwardRef(
1678
+ (e, t) => {
1679
+ const { __scopeDialog: n, ...r } = e, o = R(yt, n), a = I(t, o.triggerRef);
1680
+ return /* @__PURE__ */ l(
1681
+ k.button,
1682
+ {
1683
+ type: "button",
1684
+ "aria-haspopup": "dialog",
1685
+ "aria-expanded": o.open,
1686
+ "aria-controls": o.contentId,
1687
+ "data-state": Re(o.open),
1688
+ ...r,
1689
+ ref: a,
1690
+ onClick: M(e.onClick, o.onOpenToggle)
1691
+ }
1692
+ );
1693
+ }
1694
+ );
1695
+ Et.displayName = yt;
1696
+ var De = "DialogPortal", [Xr, xt] = pt(De, {
1697
+ forceMount: void 0
1698
+ }), wt = (e) => {
1699
+ const { __scopeDialog: t, forceMount: n, children: r, container: o } = e, a = R(De, t);
1700
+ return /* @__PURE__ */ l(Xr, { scope: t, forceMount: n, children: s.Children.map(r, (c) => /* @__PURE__ */ l(ce, { present: n || a.open, children: /* @__PURE__ */ l(it, { asChild: !0, container: o, children: c }) })) });
1701
+ };
1702
+ wt.displayName = De;
1703
+ var ie = "DialogOverlay", Nt = s.forwardRef(
1704
+ (e, t) => {
1705
+ const n = xt(ie, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, a = R(ie, e.__scopeDialog);
1706
+ return a.modal ? /* @__PURE__ */ l(ce, { present: r || a.open, children: /* @__PURE__ */ l(Zr, { ...o, ref: t }) }) : null;
1707
+ }
1708
+ );
1709
+ Nt.displayName = ie;
1710
+ var qr = He("DialogOverlay.RemoveScroll"), Zr = s.forwardRef(
1711
+ (e, t) => {
1712
+ const { __scopeDialog: n, ...r } = e, o = R(ie, n);
1713
+ return (
1714
+ // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
1715
+ // ie. when `Overlay` and `Content` are siblings
1716
+ /* @__PURE__ */ l(gt, { as: qr, allowPinchZoom: !0, shards: [o.contentRef], children: /* @__PURE__ */ l(
1717
+ k.div,
1718
+ {
1719
+ "data-state": Re(o.open),
1720
+ ...r,
1721
+ ref: t,
1722
+ style: { pointerEvents: "auto", ...r.style }
1723
+ }
1724
+ ) })
1725
+ );
1726
+ }
1727
+ ), B = "DialogContent", St = s.forwardRef(
1728
+ (e, t) => {
1729
+ const n = xt(B, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, a = R(B, e.__scopeDialog);
1730
+ return /* @__PURE__ */ l(ce, { present: r || a.open, children: a.modal ? /* @__PURE__ */ l(Qr, { ...o, ref: t }) : /* @__PURE__ */ l(Jr, { ...o, ref: t }) });
1731
+ }
1732
+ );
1733
+ St.displayName = B;
1734
+ var Qr = s.forwardRef(
1735
+ (e, t) => {
1736
+ const n = R(B, e.__scopeDialog), r = s.useRef(null), o = I(t, n.contentRef, r);
1737
+ return s.useEffect(() => {
1738
+ const a = r.current;
1739
+ if (a) return Yr(a);
1740
+ }, []), /* @__PURE__ */ l(
1741
+ Ct,
1742
+ {
1743
+ ...e,
1744
+ ref: o,
1745
+ trapFocus: n.open,
1746
+ disableOutsidePointerEvents: !0,
1747
+ onCloseAutoFocus: M(e.onCloseAutoFocus, (a) => {
1748
+ var c;
1749
+ a.preventDefault(), (c = n.triggerRef.current) == null || c.focus();
1750
+ }),
1751
+ onPointerDownOutside: M(e.onPointerDownOutside, (a) => {
1752
+ const c = a.detail.originalEvent, i = c.button === 0 && c.ctrlKey === !0;
1753
+ (c.button === 2 || i) && a.preventDefault();
1754
+ }),
1755
+ onFocusOutside: M(
1756
+ e.onFocusOutside,
1757
+ (a) => a.preventDefault()
1758
+ )
1759
+ }
1760
+ );
1761
+ }
1762
+ ), Jr = s.forwardRef(
1763
+ (e, t) => {
1764
+ const n = R(B, e.__scopeDialog), r = s.useRef(!1), o = s.useRef(!1);
1765
+ return /* @__PURE__ */ l(
1766
+ Ct,
1767
+ {
1768
+ ...e,
1769
+ ref: t,
1770
+ trapFocus: !1,
1771
+ disableOutsidePointerEvents: !1,
1772
+ onCloseAutoFocus: (a) => {
1773
+ var c, i;
1774
+ (c = e.onCloseAutoFocus) == null || c.call(e, a), a.defaultPrevented || (r.current || (i = n.triggerRef.current) == null || i.focus(), a.preventDefault()), r.current = !1, o.current = !1;
1775
+ },
1776
+ onInteractOutside: (a) => {
1777
+ var v, u;
1778
+ (v = e.onInteractOutside) == null || v.call(e, a), a.defaultPrevented || (r.current = !0, a.detail.originalEvent.type === "pointerdown" && (o.current = !0));
1779
+ const c = a.target;
1780
+ ((u = n.triggerRef.current) == null ? void 0 : u.contains(c)) && a.preventDefault(), a.detail.originalEvent.type === "focusin" && o.current && a.preventDefault();
1781
+ }
1782
+ }
1783
+ );
1784
+ }
1785
+ ), Ct = s.forwardRef(
1786
+ (e, t) => {
1787
+ const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: a, ...c } = e, i = R(B, n), v = s.useRef(null), u = I(t, v);
1788
+ return sr(), /* @__PURE__ */ L(_e, { children: [
1789
+ /* @__PURE__ */ l(
1790
+ ot,
1791
+ {
1792
+ asChild: !0,
1793
+ loop: !0,
1794
+ trapped: r,
1795
+ onMountAutoFocus: o,
1796
+ onUnmountAutoFocus: a,
1797
+ children: /* @__PURE__ */ l(
1798
+ nt,
1799
+ {
1800
+ role: "dialog",
1801
+ id: i.contentId,
1802
+ "aria-describedby": i.descriptionId,
1803
+ "aria-labelledby": i.titleId,
1804
+ "data-state": Re(i.open),
1805
+ ...c,
1806
+ ref: u,
1807
+ onDismiss: () => i.onOpenChange(!1)
1808
+ }
1809
+ )
1810
+ }
1811
+ ),
1812
+ /* @__PURE__ */ L(_e, { children: [
1813
+ /* @__PURE__ */ l(to, { titleId: i.titleId }),
1814
+ /* @__PURE__ */ l(ro, { contentRef: v, descriptionId: i.descriptionId })
1815
+ ] })
1816
+ ] });
1817
+ }
1818
+ ), Pe = "DialogTitle", At = s.forwardRef(
1819
+ (e, t) => {
1820
+ const { __scopeDialog: n, ...r } = e, o = R(Pe, n);
1821
+ return /* @__PURE__ */ l(k.h2, { id: o.titleId, ...r, ref: t });
1822
+ }
1823
+ );
1824
+ At.displayName = Pe;
1825
+ var Dt = "DialogDescription", Pt = s.forwardRef(
1826
+ (e, t) => {
1827
+ const { __scopeDialog: n, ...r } = e, o = R(Dt, n);
1828
+ return /* @__PURE__ */ l(k.p, { id: o.descriptionId, ...r, ref: t });
1829
+ }
1830
+ );
1831
+ Pt.displayName = Dt;
1832
+ var Rt = "DialogClose", Tt = s.forwardRef(
1833
+ (e, t) => {
1834
+ const { __scopeDialog: n, ...r } = e, o = R(Rt, n);
1835
+ return /* @__PURE__ */ l(
1836
+ k.button,
1837
+ {
1838
+ type: "button",
1839
+ ...r,
1840
+ ref: t,
1841
+ onClick: M(e.onClick, () => o.onOpenChange(!1))
1842
+ }
1843
+ );
1844
+ }
1845
+ );
1846
+ Tt.displayName = Rt;
1847
+ function Re(e) {
1848
+ return e ? "open" : "closed";
592
1849
  }
593
- const Ze = ({
594
- translationKey: t,
595
- translationOptions: e,
596
- namespace: a,
1850
+ var Ot = "DialogTitleWarning", [eo, _t] = On(Ot, {
1851
+ contentName: B,
1852
+ titleName: Pe,
1853
+ docsSlug: "dialog"
1854
+ }), to = ({ titleId: e }) => {
1855
+ const t = _t(Ot), n = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
1856
+
1857
+ If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
1858
+
1859
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;
1860
+ return s.useEffect(() => {
1861
+ e && (document.getElementById(e) || console.error(n));
1862
+ }, [n, e]), null;
1863
+ }, no = "DialogDescriptionWarning", ro = ({ contentRef: e, descriptionId: t }) => {
1864
+ const r = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${_t(no).contentName}}.`;
1865
+ return s.useEffect(() => {
1866
+ var a;
1867
+ const o = (a = e.current) == null ? void 0 : a.getAttribute("aria-describedby");
1868
+ t && o && (document.getElementById(t) || console.warn(r));
1869
+ }, [r, e, t]), null;
1870
+ }, oo = bt, ao = Et, io = wt, so = Nt, co = St, lo = At, uo = Pt, Mt = Tt, Lt = "AlertDialog", [fo, sa] = et(Lt, [
1871
+ ht
1872
+ ]), F = ht(), It = (e) => {
1873
+ const { __scopeAlertDialog: t, ...n } = e, r = F(t);
1874
+ return /* @__PURE__ */ l(oo, { ...r, ...n, modal: !0 });
1875
+ };
1876
+ It.displayName = Lt;
1877
+ var vo = "AlertDialogTrigger", kt = s.forwardRef(
1878
+ (e, t) => {
1879
+ const { __scopeAlertDialog: n, ...r } = e, o = F(n);
1880
+ return /* @__PURE__ */ l(ao, { ...o, ...r, ref: t });
1881
+ }
1882
+ );
1883
+ kt.displayName = vo;
1884
+ var go = "AlertDialogPortal", Ft = (e) => {
1885
+ const { __scopeAlertDialog: t, ...n } = e, r = F(t);
1886
+ return /* @__PURE__ */ l(io, { ...r, ...n });
1887
+ };
1888
+ Ft.displayName = go;
1889
+ var mo = "AlertDialogOverlay", Wt = s.forwardRef(
1890
+ (e, t) => {
1891
+ const { __scopeAlertDialog: n, ...r } = e, o = F(n);
1892
+ return /* @__PURE__ */ l(so, { ...o, ...r, ref: t });
1893
+ }
1894
+ );
1895
+ Wt.displayName = mo;
1896
+ var G = "AlertDialogContent", [po, ho] = fo(G), bo = on("AlertDialogContent"), $t = s.forwardRef(
1897
+ (e, t) => {
1898
+ const { __scopeAlertDialog: n, children: r, ...o } = e, a = F(n), c = s.useRef(null), i = I(t, c), v = s.useRef(null);
1899
+ return /* @__PURE__ */ l(
1900
+ eo,
1901
+ {
1902
+ contentName: G,
1903
+ titleName: Bt,
1904
+ docsSlug: "alert-dialog",
1905
+ children: /* @__PURE__ */ l(po, { scope: n, cancelRef: v, children: /* @__PURE__ */ L(
1906
+ co,
1907
+ {
1908
+ role: "alertdialog",
1909
+ ...a,
1910
+ ...o,
1911
+ ref: i,
1912
+ onOpenAutoFocus: M(o.onOpenAutoFocus, (u) => {
1913
+ var f;
1914
+ u.preventDefault(), (f = v.current) == null || f.focus({ preventScroll: !0 });
1915
+ }),
1916
+ onPointerDownOutside: (u) => u.preventDefault(),
1917
+ onInteractOutside: (u) => u.preventDefault(),
1918
+ children: [
1919
+ /* @__PURE__ */ l(bo, { children: r }),
1920
+ /* @__PURE__ */ l(Eo, { contentRef: c })
1921
+ ]
1922
+ }
1923
+ ) })
1924
+ }
1925
+ );
1926
+ }
1927
+ );
1928
+ $t.displayName = G;
1929
+ var Bt = "AlertDialogTitle", Ut = s.forwardRef(
1930
+ (e, t) => {
1931
+ const { __scopeAlertDialog: n, ...r } = e, o = F(n);
1932
+ return /* @__PURE__ */ l(lo, { ...o, ...r, ref: t });
1933
+ }
1934
+ );
1935
+ Ut.displayName = Bt;
1936
+ var zt = "AlertDialogDescription", jt = s.forwardRef((e, t) => {
1937
+ const { __scopeAlertDialog: n, ...r } = e, o = F(n);
1938
+ return /* @__PURE__ */ l(uo, { ...o, ...r, ref: t });
1939
+ });
1940
+ jt.displayName = zt;
1941
+ var yo = "AlertDialogAction", Vt = s.forwardRef(
1942
+ (e, t) => {
1943
+ const { __scopeAlertDialog: n, ...r } = e, o = F(n);
1944
+ return /* @__PURE__ */ l(Mt, { ...o, ...r, ref: t });
1945
+ }
1946
+ );
1947
+ Vt.displayName = yo;
1948
+ var Gt = "AlertDialogCancel", Kt = s.forwardRef(
1949
+ (e, t) => {
1950
+ const { __scopeAlertDialog: n, ...r } = e, { cancelRef: o } = ho(Gt, n), a = F(n), c = I(t, o);
1951
+ return /* @__PURE__ */ l(Mt, { ...a, ...r, ref: c });
1952
+ }
1953
+ );
1954
+ Kt.displayName = Gt;
1955
+ var Eo = ({ contentRef: e }) => {
1956
+ const t = `\`${G}\` requires a description for the component to be accessible for screen reader users.
1957
+
1958
+ You can add a description to the \`${G}\` by passing a \`${zt}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
1959
+
1960
+ Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${G}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
1961
+
1962
+ For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;
1963
+ return s.useEffect(() => {
1964
+ var r;
1965
+ document.getElementById(
1966
+ (r = e.current) == null ? void 0 : r.getAttribute("aria-describedby")
1967
+ ) || console.warn(t);
1968
+ }, [t, e]), null;
1969
+ }, xo = It, wo = kt, No = Ft, So = Wt, Co = $t, Ao = Vt, Do = Kt, Po = Ut, Ro = jt;
1970
+ function ca({ ...e }) {
1971
+ return /* @__PURE__ */ l(xo, { "data-slot": "alert-dialog", ...e });
1972
+ }
1973
+ function la({
1974
+ ...e
1975
+ }) {
1976
+ return /* @__PURE__ */ l(wo, { "data-slot": "alert-dialog-trigger", ...e });
1977
+ }
1978
+ function To({ ...e }) {
1979
+ return /* @__PURE__ */ l(No, { "data-slot": "alert-dialog-portal", ...e });
1980
+ }
1981
+ function Oo({
1982
+ className: e,
1983
+ ...t
1984
+ }) {
1985
+ return /* @__PURE__ */ l(
1986
+ So,
1987
+ {
1988
+ "data-slot": "alert-dialog-overlay",
1989
+ className: E(
1990
+ "z-50 fixed inset-0 bg-black/50 data-[state=closed]:animate-out data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
1991
+ e
1992
+ ),
1993
+ ...t
1994
+ }
1995
+ );
1996
+ }
1997
+ function ua({
1998
+ className: e,
1999
+ ...t
2000
+ }) {
2001
+ return /* @__PURE__ */ L(To, { children: [
2002
+ /* @__PURE__ */ l(Oo, {}),
2003
+ /* @__PURE__ */ l(
2004
+ Co,
2005
+ {
2006
+ "data-slot": "alert-dialog-content",
2007
+ className: E(
2008
+ "top-[50%] left-[50%] z-50 fixed gap-4 grid bg-background shadow-lg p-6 border rounded-lg w-full max-w-[calc(100%-2rem)] sm:max-w-lg translate-x-[-50%] translate-y-[-50%] data-[state=closed]:animate-out data-[state=open]:animate-in duration-200 data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
2009
+ e
2010
+ ),
2011
+ ...t
2012
+ }
2013
+ )
2014
+ ] });
2015
+ }
2016
+ function da({ className: e, ...t }) {
2017
+ return /* @__PURE__ */ l(
2018
+ "div",
2019
+ {
2020
+ "data-slot": "alert-dialog-header",
2021
+ className: E("flex flex-col gap-2 sm:text-left text-center", e),
2022
+ ...t
2023
+ }
2024
+ );
2025
+ }
2026
+ function fa({ className: e, ...t }) {
2027
+ return /* @__PURE__ */ l(
2028
+ "div",
2029
+ {
2030
+ "data-slot": "alert-dialog-footer",
2031
+ className: E("flex sm:flex-row flex-col-reverse sm:justify-end gap-2", e),
2032
+ ...t
2033
+ }
2034
+ );
2035
+ }
2036
+ function va({
2037
+ className: e,
2038
+ ...t
2039
+ }) {
2040
+ return /* @__PURE__ */ l(
2041
+ Po,
2042
+ {
2043
+ "data-slot": "alert-dialog-title",
2044
+ className: E("font-semibold text-lg", e),
2045
+ ...t
2046
+ }
2047
+ );
2048
+ }
2049
+ function ga({
2050
+ className: e,
2051
+ ...t
2052
+ }) {
2053
+ return /* @__PURE__ */ l(
2054
+ Ro,
2055
+ {
2056
+ "data-slot": "alert-dialog-description",
2057
+ className: E("text-muted-foreground text-sm", e),
2058
+ ...t
2059
+ }
2060
+ );
2061
+ }
2062
+ function ma({
2063
+ className: e,
2064
+ ...t
2065
+ }) {
2066
+ return /* @__PURE__ */ l(Ao, { className: E(Ae(), e), ...t });
2067
+ }
2068
+ function pa({
2069
+ className: e,
2070
+ ...t
2071
+ }) {
2072
+ return /* @__PURE__ */ l(
2073
+ Do,
2074
+ {
2075
+ className: E(Ae({ variant: "outline" }), e),
2076
+ ...t
2077
+ }
2078
+ );
2079
+ }
2080
+ const ha = ({
2081
+ translationKey: e,
2082
+ translationOptions: t,
2083
+ namespace: n,
597
2084
  ...r
598
2085
  }) => {
599
- const s = C(a)(
600
- t,
601
- e == null ? void 0 : e.args
2086
+ const a = qe(n)(
2087
+ e,
2088
+ t == null ? void 0 : t.args
602
2089
  );
603
- return /* @__PURE__ */ o(N, { ...r, children: s });
604
- }, Je = ({
605
- translationKey: t,
606
- translationOptions: e,
607
- namespace: a,
2090
+ return /* @__PURE__ */ l(Z, { ...r, children: a });
2091
+ }, ba = ({
2092
+ translationKey: e,
2093
+ translationOptions: t,
2094
+ namespace: n,
608
2095
  className: r,
609
- tag: n = "div"
2096
+ tag: o = "div"
610
2097
  }) => {
611
- const l = C(a)(
612
- t,
613
- e == null ? void 0 : e.args
2098
+ const c = qe(n)(
2099
+ e,
2100
+ t == null ? void 0 : t.args
614
2101
  );
615
- return Y.createElement(n, { className: r, "data-testid": "translated-html" }, l);
2102
+ return an.createElement(o, { className: r, "data-testid": "translated-html" }, c);
616
2103
  };
617
- var Ne = Object.defineProperty, c = (t, e) => Ne(t, "name", { value: e, configurable: !0 }), E = /* @__PURE__ */ new Map(), _ = /* @__PURE__ */ new Map();
618
- function I(t, e) {
619
- return `${t}:${JSON.stringify(e ?? {})}`;
620
- }
621
- c(I, "getFormatterKey");
622
- function $(t) {
623
- const e = typeof t == "string" || typeof t == "number" ? new Date(t) : t;
624
- return e instanceof Date && !Number.isNaN(e.getTime()) ? e : null;
625
- }
626
- c($, "parseDate");
627
- function B(t, e = "en", a) {
628
- var s;
629
- const r = $(t);
2104
+ var _o = Object.defineProperty, A = (e, t) => _o(e, "name", { value: t, configurable: !0 }), xe = /* @__PURE__ */ new Map(), we = /* @__PURE__ */ new Map();
2105
+ function Te(e, t) {
2106
+ return `${e}:${JSON.stringify(t ?? {})}`;
2107
+ }
2108
+ A(Te, "getFormatterKey");
2109
+ function Yt(e) {
2110
+ const t = typeof e == "string" || typeof e == "number" ? new Date(e) : e;
2111
+ return t instanceof Date && !Number.isNaN(t.getTime()) ? t : null;
2112
+ }
2113
+ A(Yt, "parseDate");
2114
+ function Ht(e, t = "en", n) {
2115
+ var a;
2116
+ const r = Yt(e);
630
2117
  if (!r)
631
2118
  return "";
632
- const n = I(e, a);
633
- return E.has(n) || E.set(n, new Intl.DateTimeFormat(e, a)), ((s = E.get(n)) == null ? void 0 : s.format(r)) ?? "";
2119
+ const o = Te(t, n);
2120
+ return xe.has(o) || xe.set(o, new Intl.DateTimeFormat(t, n)), ((a = xe.get(o)) == null ? void 0 : a.format(r)) ?? "";
634
2121
  }
635
- c(B, "formatDate");
636
- function K(t, e = "en", a) {
637
- var n;
638
- if (typeof t != "number" || Number.isNaN(t))
2122
+ A(Ht, "formatDate");
2123
+ function Xt(e, t = "en", n) {
2124
+ var o;
2125
+ if (typeof e != "number" || Number.isNaN(e))
639
2126
  return "";
640
- const r = I(e, a);
641
- return _.has(r) || _.set(r, new Intl.NumberFormat(e, a)), ((n = _.get(r)) == null ? void 0 : n.format(t)) ?? "";
2127
+ const r = Te(t, n);
2128
+ return we.has(r) || we.set(r, new Intl.NumberFormat(t, n)), ((o = we.get(r)) == null ? void 0 : o.format(e)) ?? "";
642
2129
  }
643
- c(K, "formatNumber");
644
- var P = {
2130
+ A(Xt, "formatNumber");
2131
+ var de = {
645
2132
  defaultLocale: "en",
646
2133
  supportedLocales: ["en", "es", "fr", "it", "pt-BR", "pt-PT"],
647
2134
  fallbackLocale: "en"
648
2135
  };
649
- function ke() {
650
- return P.supportedLocales;
651
- }
652
- c(ke, "getSupportedLanguages");
653
- function Le() {
654
- return P.defaultLocale;
655
- }
656
- c(Le, "getDefaultLanguage");
657
- function Pe() {
658
- return P.fallbackLocale;
659
- }
660
- c(Pe, "getFallbackLanguage");
661
- function Se(t) {
662
- return P.supportedLocales.includes(t);
663
- }
664
- c(Se, "isSupportedLanguage");
665
- var p = /* @__PURE__ */ new Map();
666
- function Ee({
667
- value: t,
668
- forms: e,
669
- lang: a,
2136
+ function Mo() {
2137
+ return de.supportedLocales;
2138
+ }
2139
+ A(Mo, "getSupportedLanguages");
2140
+ function Lo() {
2141
+ return de.defaultLocale;
2142
+ }
2143
+ A(Lo, "getDefaultLanguage");
2144
+ function Io() {
2145
+ return de.fallbackLocale;
2146
+ }
2147
+ A(Io, "getFallbackLanguage");
2148
+ function ko(e) {
2149
+ return de.supportedLocales.includes(e);
2150
+ }
2151
+ A(ko, "isSupportedLanguage");
2152
+ var $ = /* @__PURE__ */ new Map();
2153
+ function Fo({
2154
+ value: e,
2155
+ forms: t,
2156
+ lang: n,
670
2157
  type: r = "cardinal"
671
2158
  }) {
672
- if (!G(t, e))
2159
+ if (!Zt(e, t))
673
2160
  return "";
674
- if (t === 0 && e.zero)
675
- return z(e.zero, t);
676
- const s = O(a, r).select(t), l = U(e, s) ?? e.other ?? Object.values(e)[0];
677
- return l ? z(l, t) : "";
678
- }
679
- c(Ee, "pluralize");
680
- function R(t, e) {
681
- return `${t}:${e}`;
682
- }
683
- c(R, "getPluralRulesKey");
684
- var _e = /{count}|#/g;
685
- function U(t, e) {
686
- switch (e) {
2161
+ if (e === 0 && t.zero)
2162
+ return Ce(t.zero, e);
2163
+ const a = Qt(n, r).select(e), c = qt(t, a) ?? t.other ?? Object.values(t)[0];
2164
+ return c ? Ce(c, e) : "";
2165
+ }
2166
+ A(Fo, "pluralize");
2167
+ function Oe(e, t) {
2168
+ return `${e}:${t}`;
2169
+ }
2170
+ A(Oe, "getPluralRulesKey");
2171
+ var Wo = /{count}|#/g;
2172
+ function qt(e, t) {
2173
+ switch (t) {
687
2174
  case "zero":
688
- return t.zero;
2175
+ return e.zero;
689
2176
  case "one":
690
- return t.one;
2177
+ return e.one;
691
2178
  case "two":
692
- return t.two;
2179
+ return e.two;
693
2180
  case "few":
694
- return t.few;
2181
+ return e.few;
695
2182
  case "many":
696
- return t.many;
2183
+ return e.many;
697
2184
  case "other":
698
- return t.other;
2185
+ return e.other;
699
2186
  default:
700
2187
  return;
701
2188
  }
702
2189
  }
703
- c(U, "selectTemplate");
704
- function G(t, e) {
705
- return typeof t == "number" && e && typeof e == "object";
2190
+ A(qt, "selectTemplate");
2191
+ function Zt(e, t) {
2192
+ return typeof e == "number" && t && typeof t == "object";
706
2193
  }
707
- c(G, "isValidInput");
708
- function z(t, e) {
709
- return t.replaceAll(_e, e.toString());
2194
+ A(Zt, "isValidInput");
2195
+ function Ce(e, t) {
2196
+ return e.replaceAll(Wo, t.toString());
710
2197
  }
711
- c(z, "replacePlaceholders");
712
- function O(t, e) {
713
- const a = R(t, e);
714
- if (!p.has(a))
2198
+ A(Ce, "replacePlaceholders");
2199
+ function Qt(e, t) {
2200
+ const n = Oe(e, t);
2201
+ if (!$.has(n))
715
2202
  try {
716
- p.set(a, new Intl.PluralRules(t, { type: e }));
2203
+ $.set(n, new Intl.PluralRules(e, { type: t }));
717
2204
  } catch {
718
- return L(a, e);
2205
+ return se(n, t);
719
2206
  }
720
- return p.get(a) ?? L(a, e);
2207
+ return $.get(n) ?? se(n, t);
721
2208
  }
722
- c(O, "getPluralRules");
723
- function L(t, e) {
724
- const a = R("en", e);
725
- p.has(a) || p.set(a, new Intl.PluralRules("en", { type: e }));
726
- const r = p.get(a) ?? L(a, e);
727
- return p.set(t, r), r;
2209
+ A(Qt, "getPluralRules");
2210
+ function se(e, t) {
2211
+ const n = Oe("en", t);
2212
+ $.has(n) || $.set(n, new Intl.PluralRules("en", { type: t }));
2213
+ const r = $.get(n) ?? se(n, t);
2214
+ return $.set(e, r), r;
728
2215
  }
729
- c(L, "getFallbackPluralRules");
730
- var f;
731
- f = class {
2216
+ A(se, "getFallbackPluralRules");
2217
+ var P;
2218
+ P = class {
732
2219
  constructor() {
733
- k(this, "fallbackLocale");
2220
+ Q(this, "fallbackLocale");
734
2221
  this.fallbackLocale = "en";
735
2222
  }
736
2223
  /**
@@ -738,15 +2225,15 @@ f = class {
738
2225
  * @returns {LocaleDetector} The singleton instance.
739
2226
  */
740
2227
  static getInstance() {
741
- return f.instance || (f.instance = new f()), f.instance;
2228
+ return P.instance || (P.instance = new P()), P.instance;
742
2229
  }
743
2230
  /**
744
2231
  * Detect locale using server-side request or client-side settings.
745
2232
  * @param {any} [request] - Optional server request object.
746
2233
  * @returns {string} Detected locale string.
747
2234
  */
748
- detectLocale(e) {
749
- return e ? this.detectFromRequest(e) : this.fallbackLocale;
2235
+ detectLocale(t) {
2236
+ return t ? this.detectFromRequest(t) : this.fallbackLocale;
750
2237
  }
751
2238
  /**
752
2239
  * Detect locale from a server request (query, headers, cookies).
@@ -754,10 +2241,10 @@ f = class {
754
2241
  * @returns {string} Detected locale string.
755
2242
  * @private
756
2243
  */
757
- detectFromRequest(e) {
758
- var s, l, d;
759
- const a = (s = e.url.split("?")[1]) == null ? void 0 : s.split("=")[1], r = e.headers.get("accept-language"), n = (d = (l = e.headers.get("cookie")) == null ? void 0 : l.split("; ").find((m) => m.startsWith("locale="))) == null ? void 0 : d.split("=")[1];
760
- return a ?? n ?? this.parseAcceptLanguage(r ?? "") ?? this.fallbackLocale;
2244
+ detectFromRequest(t) {
2245
+ var a, c, i;
2246
+ const n = (a = t.url.split("?")[1]) == null ? void 0 : a.split("=")[1], r = t.headers.get("accept-language"), o = (i = (c = t.headers.get("cookie")) == null ? void 0 : c.split("; ").find((v) => v.startsWith("locale="))) == null ? void 0 : i.split("=")[1];
2247
+ return n ?? o ?? this.parseAcceptLanguage(r ?? "") ?? this.fallbackLocale;
761
2248
  }
762
2249
  /**
763
2250
  * Parse Accept-Language header and return the highest priority language.
@@ -765,40 +2252,40 @@ f = class {
765
2252
  * @returns {string|null} Best language or null.
766
2253
  * @private
767
2254
  */
768
- parseAcceptLanguage(e) {
769
- if (!e)
2255
+ parseAcceptLanguage(t) {
2256
+ if (!t)
770
2257
  return null;
771
- let a = null, r = 0;
772
- for (const n of e.split(",")) {
773
- const { lang: s, q: l } = this.parseLangAndQ(n.trim());
774
- if (l > r && (r = l, a = s, l === 1))
2258
+ let n = null, r = 0;
2259
+ for (const o of t.split(",")) {
2260
+ const { lang: a, q: c } = this.parseLangAndQ(o.trim());
2261
+ if (c > r && (r = c, n = a, c === 1))
775
2262
  break;
776
2263
  }
777
- return a;
2264
+ return n;
778
2265
  }
779
- parseLangAndQ(e) {
780
- const a = e.indexOf(";"), r = a === -1 ? e : e.slice(0, Math.max(0, a));
781
- let n = 1;
782
- if (a !== -1) {
783
- const s = /q=(?<q>[\d.]+)/.exec(e.slice(a + 1));
784
- n = s != null && s.groups ? Number.parseFloat(s.groups.q) || 0 : 1;
2266
+ parseLangAndQ(t) {
2267
+ const n = t.indexOf(";"), r = n === -1 ? t : t.slice(0, Math.max(0, n));
2268
+ let o = 1;
2269
+ if (n !== -1) {
2270
+ const a = /q=(?<q>[\d.]+)/.exec(t.slice(n + 1));
2271
+ o = a != null && a.groups ? Number.parseFloat(a.groups.q) || 0 : 1;
785
2272
  }
786
- return { lang: r, q: n };
2273
+ return { lang: r, q: o };
787
2274
  }
788
2275
  /**
789
2276
  * Set the fallback locale.
790
2277
  * @param {string} locale - Fallback locale string.
791
2278
  * @internal
792
2279
  */
793
- setFallbackLocale(e) {
794
- this.fallbackLocale = e;
2280
+ setFallbackLocale(t) {
2281
+ this.fallbackLocale = t;
795
2282
  }
796
- }, c(f, "LocaleDetector"), k(f, "instance");
797
- var b;
798
- b = class {
799
- constructor(e) {
800
- k(this, "namespaces");
801
- this.namespaces = e ? new Map(e) : /* @__PURE__ */ new Map();
2283
+ }, A(P, "LocaleDetector"), Q(P, "instance");
2284
+ var K;
2285
+ K = class {
2286
+ constructor(t) {
2287
+ Q(this, "namespaces");
2288
+ this.namespaces = t ? new Map(t) : /* @__PURE__ */ new Map();
802
2289
  }
803
2290
  /**
804
2291
  * Add a namespace with its translations.
@@ -806,18 +2293,18 @@ b = class {
806
2293
  * @param {Record<string, string>} translations - Translation key-value pairs.
807
2294
  * @throws {Error} If the namespace name is invalid.
808
2295
  */
809
- addNamespace(e, a) {
810
- if (!W(e))
2296
+ addNamespace(t, n) {
2297
+ if (!Jt(t))
811
2298
  throw new Error("Invalid namespace name");
812
- this.namespaces.set(e, a);
2299
+ this.namespaces.set(t, n);
813
2300
  }
814
2301
  /**
815
2302
  * Get a namespace by name.
816
2303
  * @param {string} name - Namespace name.
817
2304
  * @returns {Record<string, string> | undefined} Namespace translations or undefined.
818
2305
  */
819
- getNamespace(e) {
820
- return this.namespaces.get(e);
2306
+ getNamespace(t) {
2307
+ return this.namespaces.get(t);
821
2308
  }
822
2309
  /**
823
2310
  * Get all namespace names.
@@ -831,9 +2318,9 @@ b = class {
831
2318
  * @param {string} target - Target namespace name.
832
2319
  * @param {string} source - Source namespace name.
833
2320
  */
834
- mergeNamespaces(e, a) {
835
- const r = this.namespaces.get(e) ?? {}, n = this.namespaces.get(a) ?? {};
836
- this.namespaces.set(e, { ...r, ...n });
2321
+ mergeNamespaces(t, n) {
2322
+ const r = this.namespaces.get(t) ?? {}, o = this.namespaces.get(n) ?? {};
2323
+ this.namespaces.set(t, { ...r, ...o });
837
2324
  }
838
2325
  /**
839
2326
  * Validate a namespace against a schema.
@@ -841,115 +2328,126 @@ b = class {
841
2328
  * @param {Record<string, string>} [schema] - Optional schema to validate against.
842
2329
  * @returns {boolean} True if valid, false otherwise.
843
2330
  */
844
- validateNamespace(e, a) {
845
- const r = this.namespaces.get(e);
846
- return r ? a ? Object.entries(a).every(([n, s]) => {
847
- var d;
848
- const l = (d = Object.getOwnPropertyDescriptor(r, n)) == null ? void 0 : d.value;
849
- return l !== void 0 && typeof l === s;
2331
+ validateNamespace(t, n) {
2332
+ const r = this.namespaces.get(t);
2333
+ return r ? n ? Object.entries(n).every(([o, a]) => {
2334
+ var i;
2335
+ const c = (i = Object.getOwnPropertyDescriptor(r, o)) == null ? void 0 : i.value;
2336
+ return c !== void 0 && typeof c === a;
850
2337
  }) : !0 : !1;
851
2338
  }
852
- }, c(b, "NamespaceManager");
853
- function W(t) {
854
- return /^\w+$/.test(t);
2339
+ }, A(K, "NamespaceManager");
2340
+ function Jt(e) {
2341
+ return /^\w+$/.test(e);
855
2342
  }
856
- c(W, "isSafeKey");
857
- const Xe = ({
858
- date: t,
859
- formatOptions: e,
860
- locale: a,
2343
+ A(Jt, "isSafeKey");
2344
+ const ya = ({
2345
+ date: e,
2346
+ formatOptions: t,
2347
+ locale: n,
861
2348
  ...r
862
2349
  }) => {
863
- const n = B(t, a, e);
864
- return /* @__PURE__ */ o(N, { ...r, children: n });
865
- }, Ye = ({
866
- value: t,
867
- formatOptions: e,
868
- locale: a,
2350
+ const o = Ht(e, n, t);
2351
+ return /* @__PURE__ */ l(Z, { ...r, children: o });
2352
+ }, Ea = ({
2353
+ value: e,
2354
+ formatOptions: t,
2355
+ locale: n,
869
2356
  ...r
870
2357
  }) => {
871
- const n = K(t, a, e);
872
- return /* @__PURE__ */ o(N, { ...r, children: n });
2358
+ const o = Xt(e, n, t);
2359
+ return /* @__PURE__ */ l(Z, { ...r, children: o });
873
2360
  };
874
- function et({
875
- locale: t,
876
- locales: e,
877
- onChange: a,
2361
+ function xa({
2362
+ locale: e,
2363
+ locales: t,
2364
+ onChange: n,
878
2365
  getLabel: r,
879
- disabled: n
2366
+ disabled: o
880
2367
  }) {
881
- return /* @__PURE__ */ y(pe, { value: t, onValueChange: a, disabled: n, children: [
882
- /* @__PURE__ */ o(ve, { children: /* @__PURE__ */ o(xe, { placeholder: r(t) }) }),
883
- /* @__PURE__ */ o(be, { children: e.map((s) => /* @__PURE__ */ o(he, { value: s, children: r(s) }, s)) })
2368
+ return /* @__PURE__ */ L(Sn, { value: e, onValueChange: n, disabled: o, children: [
2369
+ /* @__PURE__ */ l(An, { children: /* @__PURE__ */ l(Cn, { placeholder: r(e) }) }),
2370
+ /* @__PURE__ */ l(Dn, { children: t.map((a) => /* @__PURE__ */ l(Pn, { value: a, children: r(a) }, a)) })
884
2371
  ] });
885
2372
  }
886
- function tt({
887
- className: t,
888
- reverse: e = !1,
889
- pauseOnHover: a = !1,
2373
+ function wa({
2374
+ className: e,
2375
+ reverse: t = !1,
2376
+ pauseOnHover: n = !1,
890
2377
  paused: r = !1,
891
- children: n,
892
- vertical: s = !1,
893
- repeat: l = 4,
894
- ...d
2378
+ children: o,
2379
+ vertical: a = !1,
2380
+ repeat: c = 4,
2381
+ ...i
895
2382
  }) {
896
- return /* @__PURE__ */ o(
2383
+ return /* @__PURE__ */ l(
897
2384
  "div",
898
2385
  {
899
- ...d,
900
- className: i(
2386
+ ...i,
2387
+ className: E(
901
2388
  "group flex overflow-hidden p-2 [--duration:40s] [--gap:1rem] [gap:var(--gap)]",
902
2389
  {
903
- "flex-row": !s,
904
- "flex-col": s
2390
+ "flex-row": !a,
2391
+ "flex-col": a
905
2392
  },
906
- t
2393
+ e
907
2394
  ),
908
- children: Array(l).fill(0).map((m, g) => /* @__PURE__ */ o(
2395
+ children: Array(c).fill(0).map((v, u) => /* @__PURE__ */ l(
909
2396
  "div",
910
2397
  {
911
- className: i("flex shrink-0 justify-around [gap:var(--gap)]", {
912
- "animate-marquee flex-row": !s,
913
- "animate-marquee-vertical flex-col": s,
914
- "group-hover:[animation-play-state:paused]": a,
915
- "[animation-direction:reverse]": e,
2398
+ className: E("flex shrink-0 justify-around [gap:var(--gap)]", {
2399
+ "animate-marquee flex-row": !a,
2400
+ "animate-marquee-vertical flex-col": a,
2401
+ "group-hover:[animation-play-state:paused]": n,
2402
+ "[animation-direction:reverse]": t,
916
2403
  "[animation-play-state:paused]": r
917
2404
  }),
918
- children: n
2405
+ children: o
919
2406
  },
920
- g
2407
+ u
921
2408
  ))
922
2409
  }
923
2410
  );
924
2411
  }
925
2412
  export {
926
- me as AuroraText,
927
- w as Box,
928
- Oe as Button,
929
- Fe as Container,
930
- Be as ExternalLink,
931
- De as Flex,
932
- Xe as FormattedDate,
933
- Ye as FormattedNumber,
934
- Ve as Grid,
935
- $e as Heading,
936
- We as Input,
937
- et as LanguageSelector,
938
- tt as Marquee,
939
- Ke as Paragraph,
940
- Ue as Section,
941
- pe as Select,
942
- be as SelectContent,
943
- qe as SelectGroup,
944
- he as SelectItem,
945
- He as SelectLabel,
946
- we as SelectScrollDownButton,
947
- ye as SelectScrollUpButton,
948
- Qe as SelectSeparator,
949
- ve as SelectTrigger,
950
- xe as SelectValue,
951
- Ge as Stack,
952
- N as Text,
953
- Je as TranslatedHtml,
954
- Ze as TranslatedText
2413
+ ca as AlertDialog,
2414
+ ma as AlertDialogAction,
2415
+ pa as AlertDialogCancel,
2416
+ ua as AlertDialogContent,
2417
+ ga as AlertDialogDescription,
2418
+ fa as AlertDialogFooter,
2419
+ da as AlertDialogHeader,
2420
+ Oo as AlertDialogOverlay,
2421
+ To as AlertDialogPortal,
2422
+ va as AlertDialogTitle,
2423
+ la as AlertDialogTrigger,
2424
+ Nn as AuroraText,
2425
+ q as Box,
2426
+ na as Button,
2427
+ Ho as Container,
2428
+ Qo as ExternalLink,
2429
+ Xo as Flex,
2430
+ ya as FormattedDate,
2431
+ Ea as FormattedNumber,
2432
+ qo as Grid,
2433
+ Zo as Heading,
2434
+ ra as Input,
2435
+ xa as LanguageSelector,
2436
+ wa as Marquee,
2437
+ Jo as Paragraph,
2438
+ ea as Section,
2439
+ Sn as Select,
2440
+ Dn as SelectContent,
2441
+ oa as SelectGroup,
2442
+ Pn as SelectItem,
2443
+ aa as SelectLabel,
2444
+ Tn as SelectScrollDownButton,
2445
+ Rn as SelectScrollUpButton,
2446
+ ia as SelectSeparator,
2447
+ An as SelectTrigger,
2448
+ Cn as SelectValue,
2449
+ ta as Stack,
2450
+ Z as Text,
2451
+ ba as TranslatedHtml,
2452
+ ha as TranslatedText
955
2453
  };