@sykoramaros/marosh-components 0.0.5 → 0.0.6

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.mjs CHANGED
@@ -1,12 +1,17 @@
1
- import { clsx as s } from "clsx";
2
- import { twMerge as d } from "tailwind-merge";
3
- import { jsx as o, Fragment as u } from "react/jsx-runtime";
4
- import { Slot as c } from "@radix-ui/react-slot";
5
- import { cva as g } from "class-variance-authority";
6
- function a(...e) {
7
- return d(s(e));
8
- }
9
- const v = g(
1
+ import { clsx as Xt } from "clsx";
2
+ import { twMerge as qt } from "tailwind-merge";
3
+ import { jsx as u, Fragment as Z, jsxs as A } from "react/jsx-runtime";
4
+ import { Slot as Zt, createSlot as ie } from "@radix-ui/react-slot";
5
+ import { cva as et } from "class-variance-authority";
6
+ import * as i from "react";
7
+ import B, { useState as Qt } from "react";
8
+ import * as Jt from "react-dom";
9
+ import tt from "react-dom";
10
+ import { XIcon as en, Menu as tn } from "lucide-react";
11
+ function k(...e) {
12
+ return qt(Xt(e));
13
+ }
14
+ const nn = et(
10
15
  "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
11
16
  {
12
17
  variants: {
@@ -33,42 +38,2139 @@ const v = g(
33
38
  }
34
39
  }
35
40
  );
36
- function l({
41
+ function nt({
37
42
  className: e,
38
- variant: r = "default",
39
- size: t = "default",
40
- asChild: i = !1,
41
- ...n
43
+ variant: t = "default",
44
+ size: n = "default",
45
+ asChild: o = !1,
46
+ ...r
42
47
  }) {
43
- return /* @__PURE__ */ o(
44
- i ? c : "button",
48
+ return /* @__PURE__ */ u(
49
+ o ? Zt : "button",
45
50
  {
46
51
  "data-slot": "button",
47
- "data-variant": r,
48
- "data-size": t,
49
- className: a(v({ variant: r, size: t, className: e })),
50
- ...n
52
+ "data-variant": t,
53
+ "data-size": n,
54
+ className: k(nn({ variant: t, size: n, className: e })),
55
+ ...r
51
56
  }
52
57
  );
53
58
  }
54
- const k = ({
59
+ const Ir = ({
55
60
  children: e,
56
- className: r,
57
- variant: t,
58
- size: i,
59
- ...n
60
- }) => /* @__PURE__ */ o(u, { children: /* @__PURE__ */ o(
61
- l,
61
+ className: t,
62
+ variant: n,
63
+ size: o,
64
+ ...r
65
+ }) => /* @__PURE__ */ u(Z, { children: /* @__PURE__ */ u(
66
+ nt,
62
67
  {
63
- className: a(r),
64
- variant: t,
65
- size: i,
66
- ...n,
68
+ className: k(t),
69
+ variant: n,
70
+ size: o,
71
+ ...r,
67
72
  children: e
68
73
  }
69
74
  ) });
75
+ function on(e, t) {
76
+ const n = i.createContext(t), o = (a) => {
77
+ const { children: c, ...s } = a, f = i.useMemo(() => s, Object.values(s));
78
+ return /* @__PURE__ */ u(n.Provider, { value: f, children: c });
79
+ };
80
+ o.displayName = e + "Provider";
81
+ function r(a) {
82
+ const c = i.useContext(n);
83
+ if (c) return c;
84
+ if (t !== void 0) return t;
85
+ throw new Error(`\`${a}\` must be used within \`${e}\``);
86
+ }
87
+ return [o, r];
88
+ }
89
+ function Me(e, t = []) {
90
+ let n = [];
91
+ function o(a, c) {
92
+ const s = i.createContext(c), f = n.length;
93
+ n = [...n, c];
94
+ const v = (m) => {
95
+ const { scope: p, children: y, ...C } = m, d = p?.[e]?.[f] || s, g = i.useMemo(() => C, Object.values(C));
96
+ return /* @__PURE__ */ u(d.Provider, { value: g, children: y });
97
+ };
98
+ v.displayName = a + "Provider";
99
+ function l(m, p) {
100
+ const y = p?.[e]?.[f] || s, C = i.useContext(y);
101
+ if (C) return C;
102
+ if (c !== void 0) return c;
103
+ throw new Error(`\`${m}\` must be used within \`${a}\``);
104
+ }
105
+ return [v, l];
106
+ }
107
+ const r = () => {
108
+ const a = n.map((c) => i.createContext(c));
109
+ return function(s) {
110
+ const f = s?.[e] || a;
111
+ return i.useMemo(
112
+ () => ({ [`__scope${e}`]: { ...s, [e]: f } }),
113
+ [s, f]
114
+ );
115
+ };
116
+ };
117
+ return r.scopeName = e, [o, rn(r, ...t)];
118
+ }
119
+ function rn(...e) {
120
+ const t = e[0];
121
+ if (e.length === 1) return t;
122
+ const n = () => {
123
+ const o = e.map((r) => ({
124
+ useScope: r(),
125
+ scopeName: r.scopeName
126
+ }));
127
+ return function(a) {
128
+ const c = o.reduce((s, { useScope: f, scopeName: v }) => {
129
+ const m = f(a)[`__scope${v}`];
130
+ return { ...s, ...m };
131
+ }, {});
132
+ return i.useMemo(() => ({ [`__scope${t.scopeName}`]: c }), [c]);
133
+ };
134
+ };
135
+ return n.scopeName = t.scopeName, n;
136
+ }
137
+ function x(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
138
+ return function(r) {
139
+ if (e?.(r), n === !1 || !r.defaultPrevented)
140
+ return t?.(r);
141
+ };
142
+ }
143
+ var an = [
144
+ "a",
145
+ "button",
146
+ "div",
147
+ "form",
148
+ "h2",
149
+ "h3",
150
+ "img",
151
+ "input",
152
+ "label",
153
+ "li",
154
+ "nav",
155
+ "ol",
156
+ "p",
157
+ "select",
158
+ "span",
159
+ "svg",
160
+ "ul"
161
+ ], P = an.reduce((e, t) => {
162
+ const n = ie(`Primitive.${t}`), o = i.forwardRef((r, a) => {
163
+ const { asChild: c, ...s } = r, f = c ? n : t;
164
+ return typeof window < "u" && (window[/* @__PURE__ */ Symbol.for("radix-ui")] = !0), /* @__PURE__ */ u(f, { ...s, ref: a });
165
+ });
166
+ return o.displayName = `Primitive.${t}`, { ...e, [t]: o };
167
+ }, {});
168
+ function ye(e, t) {
169
+ e && Jt.flushSync(() => e.dispatchEvent(t));
170
+ }
171
+ var K = globalThis?.document ? i.useLayoutEffect : () => {
172
+ }, sn = i[" useInsertionEffect ".trim().toString()] || K;
173
+ function xe({
174
+ prop: e,
175
+ defaultProp: t,
176
+ onChange: n = () => {
177
+ },
178
+ caller: o
179
+ }) {
180
+ const [r, a, c] = cn({
181
+ defaultProp: t,
182
+ onChange: n
183
+ }), s = e !== void 0, f = s ? e : r;
184
+ {
185
+ const l = i.useRef(e !== void 0);
186
+ i.useEffect(() => {
187
+ const m = l.current;
188
+ m !== s && console.warn(
189
+ `${o} is changing from ${m ? "controlled" : "uncontrolled"} to ${s ? "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.`
190
+ ), l.current = s;
191
+ }, [s, o]);
192
+ }
193
+ const v = i.useCallback(
194
+ (l) => {
195
+ if (s) {
196
+ const m = un(l) ? l(e) : l;
197
+ m !== e && c.current?.(m);
198
+ } else
199
+ a(l);
200
+ },
201
+ [s, e, a, c]
202
+ );
203
+ return [f, v];
204
+ }
205
+ function cn({
206
+ defaultProp: e,
207
+ onChange: t
208
+ }) {
209
+ const [n, o] = i.useState(e), r = i.useRef(n), a = i.useRef(t);
210
+ return sn(() => {
211
+ a.current = t;
212
+ }, [t]), i.useEffect(() => {
213
+ r.current !== n && (a.current?.(n), r.current = n);
214
+ }, [n, r]), [n, o, a];
215
+ }
216
+ function un(e) {
217
+ return typeof e == "function";
218
+ }
219
+ function Ve(e, t) {
220
+ if (typeof e == "function")
221
+ return e(t);
222
+ e != null && (e.current = t);
223
+ }
224
+ function ot(...e) {
225
+ return (t) => {
226
+ let n = !1;
227
+ const o = e.map((r) => {
228
+ const a = Ve(r, t);
229
+ return !n && typeof a == "function" && (n = !0), a;
230
+ });
231
+ if (n)
232
+ return () => {
233
+ for (let r = 0; r < o.length; r++) {
234
+ const a = o[r];
235
+ typeof a == "function" ? a() : Ve(e[r], null);
236
+ }
237
+ };
238
+ };
239
+ }
240
+ function O(...e) {
241
+ return i.useCallback(ot(...e), e);
242
+ }
243
+ var ln = i.createContext(void 0);
244
+ function dn(e) {
245
+ const t = i.useContext(ln);
246
+ return e || t || "ltr";
247
+ }
248
+ function fn(e, t) {
249
+ return i.useReducer((n, o) => t[n][o] ?? n, e);
250
+ }
251
+ var U = (e) => {
252
+ const { present: t, children: n } = e, o = vn(t), r = typeof n == "function" ? n({ present: o.isPresent }) : i.Children.only(n), a = O(o.ref, mn(r));
253
+ return typeof n == "function" || o.isPresent ? i.cloneElement(r, { ref: a }) : null;
254
+ };
255
+ U.displayName = "Presence";
256
+ function vn(e) {
257
+ const [t, n] = i.useState(), o = i.useRef(null), r = i.useRef(e), a = i.useRef("none"), c = e ? "mounted" : "unmounted", [s, f] = fn(c, {
258
+ mounted: {
259
+ UNMOUNT: "unmounted",
260
+ ANIMATION_OUT: "unmountSuspended"
261
+ },
262
+ unmountSuspended: {
263
+ MOUNT: "mounted",
264
+ ANIMATION_END: "unmounted"
265
+ },
266
+ unmounted: {
267
+ MOUNT: "mounted"
268
+ }
269
+ });
270
+ return i.useEffect(() => {
271
+ const v = Q(o.current);
272
+ a.current = s === "mounted" ? v : "none";
273
+ }, [s]), K(() => {
274
+ const v = o.current, l = r.current;
275
+ if (l !== e) {
276
+ const p = a.current, y = Q(v);
277
+ e ? f("MOUNT") : y === "none" || v?.display === "none" ? f("UNMOUNT") : f(l && p !== y ? "ANIMATION_OUT" : "UNMOUNT"), r.current = e;
278
+ }
279
+ }, [e, f]), K(() => {
280
+ if (t) {
281
+ let v;
282
+ const l = t.ownerDocument.defaultView ?? window, m = (y) => {
283
+ const d = Q(o.current).includes(CSS.escape(y.animationName));
284
+ if (y.target === t && d && (f("ANIMATION_END"), !r.current)) {
285
+ const g = t.style.animationFillMode;
286
+ t.style.animationFillMode = "forwards", v = l.setTimeout(() => {
287
+ t.style.animationFillMode === "forwards" && (t.style.animationFillMode = g);
288
+ });
289
+ }
290
+ }, p = (y) => {
291
+ y.target === t && (a.current = Q(o.current));
292
+ };
293
+ return t.addEventListener("animationstart", p), t.addEventListener("animationcancel", m), t.addEventListener("animationend", m), () => {
294
+ l.clearTimeout(v), t.removeEventListener("animationstart", p), t.removeEventListener("animationcancel", m), t.removeEventListener("animationend", m);
295
+ };
296
+ } else
297
+ f("ANIMATION_END");
298
+ }, [t, f]), {
299
+ isPresent: ["mounted", "unmountSuspended"].includes(s),
300
+ ref: i.useCallback((v) => {
301
+ o.current = v ? getComputedStyle(v) : null, n(v);
302
+ }, [])
303
+ };
304
+ }
305
+ function Q(e) {
306
+ return e?.animationName || "none";
307
+ }
308
+ function mn(e) {
309
+ let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
310
+ return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
311
+ }
312
+ var gn = i[" useId ".trim().toString()] || (() => {
313
+ }), pn = 0;
314
+ function q(e) {
315
+ const [t, n] = i.useState(gn());
316
+ return K(() => {
317
+ n((o) => o ?? String(pn++));
318
+ }, [e]), t ? `radix-${t}` : "";
319
+ }
320
+ function rt(e) {
321
+ const t = e + "CollectionProvider", [n, o] = Me(t), [r, a] = n(
322
+ t,
323
+ { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
324
+ ), c = (d) => {
325
+ const { scope: g, children: E } = d, N = B.useRef(null), h = B.useRef(/* @__PURE__ */ new Map()).current;
326
+ return /* @__PURE__ */ u(r, { scope: g, itemMap: h, collectionRef: N, children: E });
327
+ };
328
+ c.displayName = t;
329
+ const s = e + "CollectionSlot", f = ie(s), v = B.forwardRef(
330
+ (d, g) => {
331
+ const { scope: E, children: N } = d, h = a(s, E), b = O(g, h.collectionRef);
332
+ return /* @__PURE__ */ u(f, { ref: b, children: N });
333
+ }
334
+ );
335
+ v.displayName = s;
336
+ const l = e + "CollectionItemSlot", m = "data-radix-collection-item", p = ie(l), y = B.forwardRef(
337
+ (d, g) => {
338
+ const { scope: E, children: N, ...h } = d, b = B.useRef(null), w = O(g, b), R = a(l, E);
339
+ return B.useEffect(() => (R.itemMap.set(b, { ref: b, ...h }), () => {
340
+ R.itemMap.delete(b);
341
+ })), /* @__PURE__ */ u(p, { [m]: "", ref: w, children: N });
342
+ }
343
+ );
344
+ y.displayName = l;
345
+ function C(d) {
346
+ const g = a(e + "CollectionConsumer", d);
347
+ return B.useCallback(() => {
348
+ const N = g.collectionRef.current;
349
+ if (!N) return [];
350
+ const h = Array.from(N.querySelectorAll(`[${m}]`));
351
+ return Array.from(g.itemMap.values()).sort(
352
+ (R, S) => h.indexOf(R.ref.current) - h.indexOf(S.ref.current)
353
+ );
354
+ }, [g.collectionRef, g.itemMap]);
355
+ }
356
+ return [
357
+ { Provider: c, Slot: v, ItemSlot: y },
358
+ C,
359
+ o
360
+ ];
361
+ }
362
+ function D(e) {
363
+ const t = i.useRef(e);
364
+ return i.useEffect(() => {
365
+ t.current = e;
366
+ }), i.useMemo(() => (...n) => t.current?.(...n), []);
367
+ }
368
+ function hn(e, t = globalThis?.document) {
369
+ const n = D(e);
370
+ i.useEffect(() => {
371
+ const o = (r) => {
372
+ r.key === "Escape" && n(r);
373
+ };
374
+ return t.addEventListener("keydown", o, { capture: !0 }), () => t.removeEventListener("keydown", o, { capture: !0 });
375
+ }, [n, t]);
376
+ }
377
+ var yn = "DismissableLayer", be = "dismissableLayer.update", bn = "dismissableLayer.pointerDownOutside", En = "dismissableLayer.focusOutside", Ke, at = i.createContext({
378
+ layers: /* @__PURE__ */ new Set(),
379
+ layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
380
+ branches: /* @__PURE__ */ new Set()
381
+ }), Pe = i.forwardRef(
382
+ (e, t) => {
383
+ const {
384
+ disableOutsidePointerEvents: n = !1,
385
+ onEscapeKeyDown: o,
386
+ onPointerDownOutside: r,
387
+ onFocusOutside: a,
388
+ onInteractOutside: c,
389
+ onDismiss: s,
390
+ ...f
391
+ } = e, v = i.useContext(at), [l, m] = i.useState(null), p = l?.ownerDocument ?? globalThis?.document, [, y] = i.useState({}), C = O(t, (S) => m(S)), d = Array.from(v.layers), [g] = [...v.layersWithOutsidePointerEventsDisabled].slice(-1), E = d.indexOf(g), N = l ? d.indexOf(l) : -1, h = v.layersWithOutsidePointerEventsDisabled.size > 0, b = N >= E, w = Nn((S) => {
392
+ const T = S.target, M = [...v.branches].some((I) => I.contains(T));
393
+ !b || M || (r?.(S), c?.(S), S.defaultPrevented || s?.());
394
+ }, p), R = Rn((S) => {
395
+ const T = S.target;
396
+ [...v.branches].some((I) => I.contains(T)) || (a?.(S), c?.(S), S.defaultPrevented || s?.());
397
+ }, p);
398
+ return hn((S) => {
399
+ N === v.layers.size - 1 && (o?.(S), !S.defaultPrevented && s && (S.preventDefault(), s()));
400
+ }, p), i.useEffect(() => {
401
+ if (l)
402
+ return n && (v.layersWithOutsidePointerEventsDisabled.size === 0 && (Ke = p.body.style.pointerEvents, p.body.style.pointerEvents = "none"), v.layersWithOutsidePointerEventsDisabled.add(l)), v.layers.add(l), Ue(), () => {
403
+ n && v.layersWithOutsidePointerEventsDisabled.size === 1 && (p.body.style.pointerEvents = Ke);
404
+ };
405
+ }, [l, p, n, v]), i.useEffect(() => () => {
406
+ l && (v.layers.delete(l), v.layersWithOutsidePointerEventsDisabled.delete(l), Ue());
407
+ }, [l, v]), i.useEffect(() => {
408
+ const S = () => y({});
409
+ return document.addEventListener(be, S), () => document.removeEventListener(be, S);
410
+ }, []), /* @__PURE__ */ u(
411
+ P.div,
412
+ {
413
+ ...f,
414
+ ref: C,
415
+ style: {
416
+ pointerEvents: h ? b ? "auto" : "none" : void 0,
417
+ ...e.style
418
+ },
419
+ onFocusCapture: x(e.onFocusCapture, R.onFocusCapture),
420
+ onBlurCapture: x(e.onBlurCapture, R.onBlurCapture),
421
+ onPointerDownCapture: x(
422
+ e.onPointerDownCapture,
423
+ w.onPointerDownCapture
424
+ )
425
+ }
426
+ );
427
+ }
428
+ );
429
+ Pe.displayName = yn;
430
+ var wn = "DismissableLayerBranch", Cn = i.forwardRef((e, t) => {
431
+ const n = i.useContext(at), o = i.useRef(null), r = O(t, o);
432
+ return i.useEffect(() => {
433
+ const a = o.current;
434
+ if (a)
435
+ return n.branches.add(a), () => {
436
+ n.branches.delete(a);
437
+ };
438
+ }, [n.branches]), /* @__PURE__ */ u(P.div, { ...e, ref: r });
439
+ });
440
+ Cn.displayName = wn;
441
+ function Nn(e, t = globalThis?.document) {
442
+ const n = D(e), o = i.useRef(!1), r = i.useRef(() => {
443
+ });
444
+ return i.useEffect(() => {
445
+ const a = (s) => {
446
+ if (s.target && !o.current) {
447
+ let f = function() {
448
+ it(
449
+ bn,
450
+ n,
451
+ v,
452
+ { discrete: !0 }
453
+ );
454
+ };
455
+ const v = { originalEvent: s };
456
+ s.pointerType === "touch" ? (t.removeEventListener("click", r.current), r.current = f, t.addEventListener("click", r.current, { once: !0 })) : f();
457
+ } else
458
+ t.removeEventListener("click", r.current);
459
+ o.current = !1;
460
+ }, c = window.setTimeout(() => {
461
+ t.addEventListener("pointerdown", a);
462
+ }, 0);
463
+ return () => {
464
+ window.clearTimeout(c), t.removeEventListener("pointerdown", a), t.removeEventListener("click", r.current);
465
+ };
466
+ }, [t, n]), {
467
+ // ensures we check React component tree (not just DOM tree)
468
+ onPointerDownCapture: () => o.current = !0
469
+ };
470
+ }
471
+ function Rn(e, t = globalThis?.document) {
472
+ const n = D(e), o = i.useRef(!1);
473
+ return i.useEffect(() => {
474
+ const r = (a) => {
475
+ a.target && !o.current && it(En, n, { originalEvent: a }, {
476
+ discrete: !1
477
+ });
478
+ };
479
+ return t.addEventListener("focusin", r), () => t.removeEventListener("focusin", r);
480
+ }, [t, n]), {
481
+ onFocusCapture: () => o.current = !0,
482
+ onBlurCapture: () => o.current = !1
483
+ };
484
+ }
485
+ function Ue() {
486
+ const e = new CustomEvent(be);
487
+ document.dispatchEvent(e);
488
+ }
489
+ function it(e, t, n, { discrete: o }) {
490
+ const r = n.originalEvent.target, a = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
491
+ t && r.addEventListener(e, t, { once: !0 }), o ? ye(r, a) : r.dispatchEvent(a);
492
+ }
493
+ function Sn(e) {
494
+ const t = i.useRef({ value: e, previous: e });
495
+ return i.useMemo(() => (t.current.value !== e && (t.current.previous = t.current.value, t.current.value = e), t.current.previous), [e]);
496
+ }
497
+ var Mn = Object.freeze({
498
+ // See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
499
+ position: "absolute",
500
+ border: 0,
501
+ width: 1,
502
+ height: 1,
503
+ padding: 0,
504
+ margin: -1,
505
+ overflow: "hidden",
506
+ clip: "rect(0, 0, 0, 0)",
507
+ whiteSpace: "nowrap",
508
+ wordWrap: "normal"
509
+ }), xn = "VisuallyHidden", st = i.forwardRef(
510
+ (e, t) => /* @__PURE__ */ u(
511
+ P.span,
512
+ {
513
+ ...e,
514
+ ref: t,
515
+ style: { ...Mn, ...e.style }
516
+ }
517
+ )
518
+ );
519
+ st.displayName = xn;
520
+ var Pn = st, $ = "NavigationMenu", [Te, ct, Tn] = rt($), [Ee, In, On] = rt($), [Ie] = Me(
521
+ $,
522
+ [Tn, On]
523
+ ), [Dn, _] = Ie($), [An, _n] = Ie($), ut = i.forwardRef(
524
+ (e, t) => {
525
+ const {
526
+ __scopeNavigationMenu: n,
527
+ value: o,
528
+ onValueChange: r,
529
+ defaultValue: a,
530
+ delayDuration: c = 200,
531
+ skipDelayDuration: s = 300,
532
+ orientation: f = "horizontal",
533
+ dir: v,
534
+ ...l
535
+ } = e, [m, p] = i.useState(null), y = O(t, (M) => p(M)), C = dn(v), d = i.useRef(0), g = i.useRef(0), E = i.useRef(0), [N, h] = i.useState(!0), [b, w] = xe({
536
+ prop: o,
537
+ onChange: (M) => {
538
+ const I = M !== "", W = s > 0;
539
+ I ? (window.clearTimeout(E.current), W && h(!1)) : (window.clearTimeout(E.current), E.current = window.setTimeout(
540
+ () => h(!0),
541
+ s
542
+ )), r?.(M);
543
+ },
544
+ defaultProp: a ?? "",
545
+ caller: $
546
+ }), R = i.useCallback(() => {
547
+ window.clearTimeout(g.current), g.current = window.setTimeout(() => w(""), 150);
548
+ }, [w]), S = i.useCallback(
549
+ (M) => {
550
+ window.clearTimeout(g.current), w(M);
551
+ },
552
+ [w]
553
+ ), T = i.useCallback(
554
+ (M) => {
555
+ b === M ? window.clearTimeout(g.current) : d.current = window.setTimeout(() => {
556
+ window.clearTimeout(g.current), w(M);
557
+ }, c);
558
+ },
559
+ [b, w, c]
560
+ );
561
+ return i.useEffect(() => () => {
562
+ window.clearTimeout(d.current), window.clearTimeout(g.current), window.clearTimeout(E.current);
563
+ }, []), /* @__PURE__ */ u(
564
+ lt,
565
+ {
566
+ scope: n,
567
+ isRootMenu: !0,
568
+ value: b,
569
+ dir: C,
570
+ orientation: f,
571
+ rootNavigationMenu: m,
572
+ onTriggerEnter: (M) => {
573
+ window.clearTimeout(d.current), N ? T(M) : S(M);
574
+ },
575
+ onTriggerLeave: () => {
576
+ window.clearTimeout(d.current), R();
577
+ },
578
+ onContentEnter: () => window.clearTimeout(g.current),
579
+ onContentLeave: R,
580
+ onItemSelect: (M) => {
581
+ w((I) => I === M ? "" : M);
582
+ },
583
+ onItemDismiss: () => w(""),
584
+ children: /* @__PURE__ */ u(
585
+ P.nav,
586
+ {
587
+ "aria-label": "Main",
588
+ "data-orientation": f,
589
+ dir: C,
590
+ ...l,
591
+ ref: y
592
+ }
593
+ )
594
+ }
595
+ );
596
+ }
597
+ );
598
+ ut.displayName = $;
599
+ var we = "NavigationMenuSub", kn = i.forwardRef(
600
+ (e, t) => {
601
+ const {
602
+ __scopeNavigationMenu: n,
603
+ value: o,
604
+ onValueChange: r,
605
+ defaultValue: a,
606
+ orientation: c = "horizontal",
607
+ ...s
608
+ } = e, f = _(we, n), [v, l] = xe({
609
+ prop: o,
610
+ onChange: r,
611
+ defaultProp: a ?? "",
612
+ caller: we
613
+ });
614
+ return /* @__PURE__ */ u(
615
+ lt,
616
+ {
617
+ scope: n,
618
+ isRootMenu: !1,
619
+ value: v,
620
+ dir: f.dir,
621
+ orientation: c,
622
+ rootNavigationMenu: f.rootNavigationMenu,
623
+ onTriggerEnter: (m) => l(m),
624
+ onItemSelect: (m) => l(m),
625
+ onItemDismiss: () => l(""),
626
+ children: /* @__PURE__ */ u(P.div, { "data-orientation": c, ...s, ref: t })
627
+ }
628
+ );
629
+ }
630
+ );
631
+ kn.displayName = we;
632
+ var lt = (e) => {
633
+ const {
634
+ scope: t,
635
+ isRootMenu: n,
636
+ rootNavigationMenu: o,
637
+ dir: r,
638
+ orientation: a,
639
+ children: c,
640
+ value: s,
641
+ onItemSelect: f,
642
+ onItemDismiss: v,
643
+ onTriggerEnter: l,
644
+ onTriggerLeave: m,
645
+ onContentEnter: p,
646
+ onContentLeave: y
647
+ } = e, [C, d] = i.useState(null), [g, E] = i.useState(/* @__PURE__ */ new Map()), [N, h] = i.useState(null);
648
+ return /* @__PURE__ */ u(
649
+ Dn,
650
+ {
651
+ scope: t,
652
+ isRootMenu: n,
653
+ rootNavigationMenu: o,
654
+ value: s,
655
+ previousValue: Sn(s),
656
+ baseId: q(),
657
+ dir: r,
658
+ orientation: a,
659
+ viewport: C,
660
+ onViewportChange: d,
661
+ indicatorTrack: N,
662
+ onIndicatorTrackChange: h,
663
+ onTriggerEnter: D(l),
664
+ onTriggerLeave: D(m),
665
+ onContentEnter: D(p),
666
+ onContentLeave: D(y),
667
+ onItemSelect: D(f),
668
+ onItemDismiss: D(v),
669
+ onViewportContentChange: i.useCallback((b, w) => {
670
+ E((R) => (R.set(b, w), new Map(R)));
671
+ }, []),
672
+ onViewportContentRemove: i.useCallback((b) => {
673
+ E((w) => w.has(b) ? (w.delete(b), new Map(w)) : w);
674
+ }, []),
675
+ children: /* @__PURE__ */ u(Te.Provider, { scope: t, children: /* @__PURE__ */ u(An, { scope: t, items: g, children: c }) })
676
+ }
677
+ );
678
+ }, dt = "NavigationMenuList", ft = i.forwardRef(
679
+ (e, t) => {
680
+ const { __scopeNavigationMenu: n, ...o } = e, r = _(dt, n), a = /* @__PURE__ */ u(P.ul, { "data-orientation": r.orientation, ...o, ref: t });
681
+ return /* @__PURE__ */ u(P.div, { style: { position: "relative" }, ref: r.onIndicatorTrackChange, children: /* @__PURE__ */ u(Te.Slot, { scope: n, children: r.isRootMenu ? /* @__PURE__ */ u(bt, { asChild: !0, children: a }) : a }) });
682
+ }
683
+ );
684
+ ft.displayName = dt;
685
+ var vt = "NavigationMenuItem", [Ln, mt] = Ie(vt), gt = i.forwardRef(
686
+ (e, t) => {
687
+ const { __scopeNavigationMenu: n, value: o, ...r } = e, a = q(), c = o || a || "LEGACY_REACT_AUTO_VALUE", s = i.useRef(null), f = i.useRef(null), v = i.useRef(null), l = i.useRef(() => {
688
+ }), m = i.useRef(!1), p = i.useCallback((C = "start") => {
689
+ if (s.current) {
690
+ l.current();
691
+ const d = Ne(s.current);
692
+ d.length && Ae(C === "start" ? d : d.reverse());
693
+ }
694
+ }, []), y = i.useCallback(() => {
695
+ if (s.current) {
696
+ const C = Ne(s.current);
697
+ C.length && (l.current = Gn(C));
698
+ }
699
+ }, []);
700
+ return /* @__PURE__ */ u(
701
+ Ln,
702
+ {
703
+ scope: n,
704
+ value: c,
705
+ triggerRef: f,
706
+ contentRef: s,
707
+ focusProxyRef: v,
708
+ wasEscapeCloseRef: m,
709
+ onEntryKeyDown: p,
710
+ onFocusProxyEnter: p,
711
+ onRootContentClose: y,
712
+ onContentFocusOutside: y,
713
+ children: /* @__PURE__ */ u(P.li, { ...r, ref: t })
714
+ }
715
+ );
716
+ }
717
+ );
718
+ gt.displayName = vt;
719
+ var Ce = "NavigationMenuTrigger", Fn = i.forwardRef((e, t) => {
720
+ const { __scopeNavigationMenu: n, disabled: o, ...r } = e, a = _(Ce, e.__scopeNavigationMenu), c = mt(Ce, e.__scopeNavigationMenu), s = i.useRef(null), f = O(s, c.triggerRef, t), v = wt(a.baseId, c.value), l = Ct(a.baseId, c.value), m = i.useRef(!1), p = i.useRef(!1), y = c.value === a.value;
721
+ return /* @__PURE__ */ A(Z, { children: [
722
+ /* @__PURE__ */ u(Te.ItemSlot, { scope: n, value: c.value, children: /* @__PURE__ */ u(Et, { asChild: !0, children: /* @__PURE__ */ u(
723
+ P.button,
724
+ {
725
+ id: v,
726
+ disabled: o,
727
+ "data-disabled": o ? "" : void 0,
728
+ "data-state": _e(y),
729
+ "aria-expanded": y,
730
+ "aria-controls": l,
731
+ ...r,
732
+ ref: f,
733
+ onPointerEnter: x(e.onPointerEnter, () => {
734
+ p.current = !1, c.wasEscapeCloseRef.current = !1;
735
+ }),
736
+ onPointerMove: x(
737
+ e.onPointerMove,
738
+ se(() => {
739
+ o || p.current || c.wasEscapeCloseRef.current || m.current || (a.onTriggerEnter(c.value), m.current = !0);
740
+ })
741
+ ),
742
+ onPointerLeave: x(
743
+ e.onPointerLeave,
744
+ se(() => {
745
+ o || (a.onTriggerLeave(), m.current = !1);
746
+ })
747
+ ),
748
+ onClick: x(e.onClick, () => {
749
+ a.onItemSelect(c.value), p.current = y;
750
+ }),
751
+ onKeyDown: x(e.onKeyDown, (C) => {
752
+ const g = { horizontal: "ArrowDown", vertical: a.dir === "rtl" ? "ArrowLeft" : "ArrowRight" }[a.orientation];
753
+ y && C.key === g && (c.onEntryKeyDown(), C.preventDefault());
754
+ })
755
+ }
756
+ ) }) }),
757
+ y && /* @__PURE__ */ A(Z, { children: [
758
+ /* @__PURE__ */ u(
759
+ Pn,
760
+ {
761
+ "aria-hidden": !0,
762
+ tabIndex: 0,
763
+ ref: c.focusProxyRef,
764
+ onFocus: (C) => {
765
+ const d = c.contentRef.current, g = C.relatedTarget, E = g === s.current, N = d?.contains(g);
766
+ (E || !N) && c.onFocusProxyEnter(E ? "start" : "end");
767
+ }
768
+ }
769
+ ),
770
+ a.viewport && /* @__PURE__ */ u("span", { "aria-owns": l })
771
+ ] })
772
+ ] });
773
+ });
774
+ Fn.displayName = Ce;
775
+ var Wn = "NavigationMenuLink", Be = "navigationMenu.linkSelect", pt = i.forwardRef(
776
+ (e, t) => {
777
+ const { __scopeNavigationMenu: n, active: o, onSelect: r, ...a } = e;
778
+ return /* @__PURE__ */ u(Et, { asChild: !0, children: /* @__PURE__ */ u(
779
+ P.a,
780
+ {
781
+ "data-active": o ? "" : void 0,
782
+ "aria-current": o ? "page" : void 0,
783
+ ...a,
784
+ ref: t,
785
+ onClick: x(
786
+ e.onClick,
787
+ (c) => {
788
+ const s = c.target, f = new CustomEvent(Be, {
789
+ bubbles: !0,
790
+ cancelable: !0
791
+ });
792
+ if (s.addEventListener(Be, (v) => r?.(v), { once: !0 }), ye(s, f), !f.defaultPrevented && !c.metaKey) {
793
+ const v = new CustomEvent(oe, {
794
+ bubbles: !0,
795
+ cancelable: !0
796
+ });
797
+ ye(s, v);
798
+ }
799
+ },
800
+ { checkForDefaultPrevented: !1 }
801
+ )
802
+ }
803
+ ) });
804
+ }
805
+ );
806
+ pt.displayName = Wn;
807
+ var Oe = "NavigationMenuIndicator", Vn = i.forwardRef((e, t) => {
808
+ const { forceMount: n, ...o } = e, r = _(Oe, e.__scopeNavigationMenu), a = !!r.value;
809
+ return r.indicatorTrack ? tt.createPortal(
810
+ /* @__PURE__ */ u(U, { present: n || a, children: /* @__PURE__ */ u(Kn, { ...o, ref: t }) }),
811
+ r.indicatorTrack
812
+ ) : null;
813
+ });
814
+ Vn.displayName = Oe;
815
+ var Kn = i.forwardRef((e, t) => {
816
+ const { __scopeNavigationMenu: n, ...o } = e, r = _(Oe, n), a = ct(n), [c, s] = i.useState(
817
+ null
818
+ ), [f, v] = i.useState(null), l = r.orientation === "horizontal", m = !!r.value;
819
+ i.useEffect(() => {
820
+ const C = a().find((d) => d.value === r.value)?.ref.current;
821
+ C && s(C);
822
+ }, [a, r.value]);
823
+ const p = () => {
824
+ c && v({
825
+ size: l ? c.offsetWidth : c.offsetHeight,
826
+ offset: l ? c.offsetLeft : c.offsetTop
827
+ });
828
+ };
829
+ return Re(c, p), Re(r.indicatorTrack, p), f ? /* @__PURE__ */ u(
830
+ P.div,
831
+ {
832
+ "aria-hidden": !0,
833
+ "data-state": m ? "visible" : "hidden",
834
+ "data-orientation": r.orientation,
835
+ ...o,
836
+ ref: t,
837
+ style: {
838
+ position: "absolute",
839
+ ...l ? {
840
+ left: 0,
841
+ width: f.size + "px",
842
+ transform: `translateX(${f.offset}px)`
843
+ } : {
844
+ top: 0,
845
+ height: f.size + "px",
846
+ transform: `translateY(${f.offset}px)`
847
+ },
848
+ ...o.style
849
+ }
850
+ }
851
+ ) : null;
852
+ }), X = "NavigationMenuContent", Un = i.forwardRef((e, t) => {
853
+ const { forceMount: n, ...o } = e, r = _(X, e.__scopeNavigationMenu), a = mt(X, e.__scopeNavigationMenu), c = O(a.contentRef, t), s = a.value === r.value, f = {
854
+ value: a.value,
855
+ triggerRef: a.triggerRef,
856
+ focusProxyRef: a.focusProxyRef,
857
+ wasEscapeCloseRef: a.wasEscapeCloseRef,
858
+ onContentFocusOutside: a.onContentFocusOutside,
859
+ onRootContentClose: a.onRootContentClose,
860
+ ...o
861
+ };
862
+ return r.viewport ? /* @__PURE__ */ u(Bn, { forceMount: n, ...f, ref: c }) : /* @__PURE__ */ u(U, { present: n || s, children: /* @__PURE__ */ u(
863
+ ht,
864
+ {
865
+ "data-state": _e(s),
866
+ ...f,
867
+ ref: c,
868
+ onPointerEnter: x(e.onPointerEnter, r.onContentEnter),
869
+ onPointerLeave: x(
870
+ e.onPointerLeave,
871
+ se(r.onContentLeave)
872
+ ),
873
+ style: {
874
+ // Prevent interaction when animating out
875
+ pointerEvents: !s && r.isRootMenu ? "none" : void 0,
876
+ ...f.style
877
+ }
878
+ }
879
+ ) });
880
+ });
881
+ Un.displayName = X;
882
+ var Bn = i.forwardRef((e, t) => {
883
+ const n = _(X, e.__scopeNavigationMenu), { onViewportContentChange: o, onViewportContentRemove: r } = n;
884
+ return K(() => {
885
+ o(e.value, {
886
+ ref: t,
887
+ ...e
888
+ });
889
+ }, [e, t, o]), K(() => () => r(e.value), [e.value, r]), null;
890
+ }), oe = "navigationMenu.rootContentDismiss", ht = i.forwardRef((e, t) => {
891
+ const {
892
+ __scopeNavigationMenu: n,
893
+ value: o,
894
+ triggerRef: r,
895
+ focusProxyRef: a,
896
+ wasEscapeCloseRef: c,
897
+ onRootContentClose: s,
898
+ onContentFocusOutside: f,
899
+ ...v
900
+ } = e, l = _(X, n), m = i.useRef(null), p = O(m, t), y = wt(l.baseId, o), C = Ct(l.baseId, o), d = ct(n), g = i.useRef(null), { onItemDismiss: E } = l;
901
+ i.useEffect(() => {
902
+ const h = m.current;
903
+ if (l.isRootMenu && h) {
904
+ const b = () => {
905
+ E(), s(), h.contains(document.activeElement) && r.current?.focus();
906
+ };
907
+ return h.addEventListener(oe, b), () => h.removeEventListener(oe, b);
908
+ }
909
+ }, [l.isRootMenu, e.value, r, E, s]);
910
+ const N = i.useMemo(() => {
911
+ const b = d().map((I) => I.value);
912
+ l.dir === "rtl" && b.reverse();
913
+ const w = b.indexOf(l.value), R = b.indexOf(l.previousValue), S = o === l.value, T = R === b.indexOf(o);
914
+ if (!S && !T) return g.current;
915
+ const M = (() => {
916
+ if (w !== R) {
917
+ if (S && R !== -1) return w > R ? "from-end" : "from-start";
918
+ if (T && w !== -1) return w > R ? "to-start" : "to-end";
919
+ }
920
+ return null;
921
+ })();
922
+ return g.current = M, M;
923
+ }, [l.previousValue, l.value, l.dir, d, o]);
924
+ return /* @__PURE__ */ u(bt, { asChild: !0, children: /* @__PURE__ */ u(
925
+ Pe,
926
+ {
927
+ id: C,
928
+ "aria-labelledby": y,
929
+ "data-motion": N,
930
+ "data-orientation": l.orientation,
931
+ ...v,
932
+ ref: p,
933
+ disableOutsidePointerEvents: !1,
934
+ onDismiss: () => {
935
+ const h = new Event(oe, {
936
+ bubbles: !0,
937
+ cancelable: !0
938
+ });
939
+ m.current?.dispatchEvent(h);
940
+ },
941
+ onFocusOutside: x(e.onFocusOutside, (h) => {
942
+ f();
943
+ const b = h.target;
944
+ l.rootNavigationMenu?.contains(b) && h.preventDefault();
945
+ }),
946
+ onPointerDownOutside: x(e.onPointerDownOutside, (h) => {
947
+ const b = h.target, w = d().some((S) => S.ref.current?.contains(b)), R = l.isRootMenu && l.viewport?.contains(b);
948
+ (w || R || !l.isRootMenu) && h.preventDefault();
949
+ }),
950
+ onKeyDown: x(e.onKeyDown, (h) => {
951
+ const b = h.altKey || h.ctrlKey || h.metaKey;
952
+ if (h.key === "Tab" && !b) {
953
+ const R = Ne(h.currentTarget), S = document.activeElement, T = R.findIndex((W) => W === S), I = h.shiftKey ? R.slice(0, T).reverse() : R.slice(T + 1, R.length);
954
+ Ae(I) ? h.preventDefault() : a.current?.focus();
955
+ }
956
+ }),
957
+ onEscapeKeyDown: x(e.onEscapeKeyDown, (h) => {
958
+ c.current = !0;
959
+ })
960
+ }
961
+ ) });
962
+ }), De = "NavigationMenuViewport", yt = i.forwardRef((e, t) => {
963
+ const { forceMount: n, ...o } = e, a = !!_(De, e.__scopeNavigationMenu).value;
964
+ return /* @__PURE__ */ u(U, { present: n || a, children: /* @__PURE__ */ u(zn, { ...o, ref: t }) });
965
+ });
966
+ yt.displayName = De;
967
+ var zn = i.forwardRef((e, t) => {
968
+ const { __scopeNavigationMenu: n, children: o, ...r } = e, a = _(De, n), c = O(t, a.onViewportChange), s = _n(
969
+ X,
970
+ e.__scopeNavigationMenu
971
+ ), [f, v] = i.useState(null), [l, m] = i.useState(null), p = f ? f?.width + "px" : void 0, y = f ? f?.height + "px" : void 0, C = !!a.value, d = C ? a.value : a.previousValue;
972
+ return Re(l, () => {
973
+ l && v({ width: l.offsetWidth, height: l.offsetHeight });
974
+ }), /* @__PURE__ */ u(
975
+ P.div,
976
+ {
977
+ "data-state": _e(C),
978
+ "data-orientation": a.orientation,
979
+ ...r,
980
+ ref: c,
981
+ style: {
982
+ // Prevent interaction when animating out
983
+ pointerEvents: !C && a.isRootMenu ? "none" : void 0,
984
+ "--radix-navigation-menu-viewport-width": p,
985
+ "--radix-navigation-menu-viewport-height": y,
986
+ ...r.style
987
+ },
988
+ onPointerEnter: x(e.onPointerEnter, a.onContentEnter),
989
+ onPointerLeave: x(e.onPointerLeave, se(a.onContentLeave)),
990
+ children: Array.from(s.items).map(([E, { ref: N, forceMount: h, ...b }]) => {
991
+ const w = d === E;
992
+ return /* @__PURE__ */ u(U, { present: h || w, children: /* @__PURE__ */ u(
993
+ ht,
994
+ {
995
+ ...b,
996
+ ref: ot(N, (R) => {
997
+ w && R && m(R);
998
+ })
999
+ }
1000
+ ) }, E);
1001
+ })
1002
+ }
1003
+ );
1004
+ }), $n = "FocusGroup", bt = i.forwardRef(
1005
+ (e, t) => {
1006
+ const { __scopeNavigationMenu: n, ...o } = e, r = _($n, n);
1007
+ return /* @__PURE__ */ u(Ee.Provider, { scope: n, children: /* @__PURE__ */ u(Ee.Slot, { scope: n, children: /* @__PURE__ */ u(P.div, { dir: r.dir, ...o, ref: t }) }) });
1008
+ }
1009
+ ), ze = ["ArrowRight", "ArrowLeft", "ArrowUp", "ArrowDown"], Hn = "FocusGroupItem", Et = i.forwardRef(
1010
+ (e, t) => {
1011
+ const { __scopeNavigationMenu: n, ...o } = e, r = In(n), a = _(Hn, n);
1012
+ return /* @__PURE__ */ u(Ee.ItemSlot, { scope: n, children: /* @__PURE__ */ u(
1013
+ P.button,
1014
+ {
1015
+ ...o,
1016
+ ref: t,
1017
+ onKeyDown: x(e.onKeyDown, (c) => {
1018
+ if (["Home", "End", ...ze].includes(c.key)) {
1019
+ let f = r().map((m) => m.ref.current);
1020
+ if ([a.dir === "rtl" ? "ArrowRight" : "ArrowLeft", "ArrowUp", "End"].includes(c.key) && f.reverse(), ze.includes(c.key)) {
1021
+ const m = f.indexOf(c.currentTarget);
1022
+ f = f.slice(m + 1);
1023
+ }
1024
+ setTimeout(() => Ae(f)), c.preventDefault();
1025
+ }
1026
+ })
1027
+ }
1028
+ ) });
1029
+ }
1030
+ );
1031
+ function Ne(e) {
1032
+ const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
1033
+ acceptNode: (o) => {
1034
+ const r = o.tagName === "INPUT" && o.type === "hidden";
1035
+ return o.disabled || o.hidden || r ? NodeFilter.FILTER_SKIP : o.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
1036
+ }
1037
+ });
1038
+ for (; n.nextNode(); ) t.push(n.currentNode);
1039
+ return t;
1040
+ }
1041
+ function Ae(e) {
1042
+ const t = document.activeElement;
1043
+ return e.some((n) => n === t ? !0 : (n.focus(), document.activeElement !== t));
1044
+ }
1045
+ function Gn(e) {
1046
+ return e.forEach((t) => {
1047
+ t.dataset.tabindex = t.getAttribute("tabindex") || "", t.setAttribute("tabindex", "-1");
1048
+ }), () => {
1049
+ e.forEach((t) => {
1050
+ const n = t.dataset.tabindex;
1051
+ t.setAttribute("tabindex", n);
1052
+ });
1053
+ };
1054
+ }
1055
+ function Re(e, t) {
1056
+ const n = D(t);
1057
+ K(() => {
1058
+ let o = 0;
1059
+ if (e) {
1060
+ const r = new ResizeObserver(() => {
1061
+ cancelAnimationFrame(o), o = window.requestAnimationFrame(n);
1062
+ });
1063
+ return r.observe(e), () => {
1064
+ window.cancelAnimationFrame(o), r.unobserve(e);
1065
+ };
1066
+ }
1067
+ }, [e, n]);
1068
+ }
1069
+ function _e(e) {
1070
+ return e ? "open" : "closed";
1071
+ }
1072
+ function wt(e, t) {
1073
+ return `${e}-trigger-${t}`;
1074
+ }
1075
+ function Ct(e, t) {
1076
+ return `${e}-content-${t}`;
1077
+ }
1078
+ function se(e) {
1079
+ return (t) => t.pointerType === "mouse" ? e(t) : void 0;
1080
+ }
1081
+ var jn = ut, Yn = ft, Xn = gt, qn = pt, Zn = yt;
1082
+ function Qn({
1083
+ className: e,
1084
+ children: t,
1085
+ viewport: n = !0,
1086
+ ...o
1087
+ }) {
1088
+ return /* @__PURE__ */ A(
1089
+ jn,
1090
+ {
1091
+ "data-slot": "navigation-menu",
1092
+ "data-viewport": n,
1093
+ className: k(
1094
+ "group/navigation-menu relative flex max-w-max flex-1 items-center justify-center",
1095
+ e
1096
+ ),
1097
+ ...o,
1098
+ children: [
1099
+ t,
1100
+ n && /* @__PURE__ */ u(no, {})
1101
+ ]
1102
+ }
1103
+ );
1104
+ }
1105
+ function Jn({
1106
+ className: e,
1107
+ ...t
1108
+ }) {
1109
+ return /* @__PURE__ */ u(
1110
+ Yn,
1111
+ {
1112
+ "data-slot": "navigation-menu-list",
1113
+ className: k(
1114
+ "group flex flex-1 list-none items-center justify-center gap-1",
1115
+ e
1116
+ ),
1117
+ ...t
1118
+ }
1119
+ );
1120
+ }
1121
+ function eo({
1122
+ className: e,
1123
+ ...t
1124
+ }) {
1125
+ return /* @__PURE__ */ u(
1126
+ Xn,
1127
+ {
1128
+ "data-slot": "navigation-menu-item",
1129
+ className: k("relative", e),
1130
+ ...t
1131
+ }
1132
+ );
1133
+ }
1134
+ const to = et(
1135
+ "group inline-flex h-9 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=open]:hover:bg-accent data-[state=open]:text-accent-foreground data-[state=open]:focus:bg-accent data-[state=open]:bg-accent/50 focus-visible:ring-ring/50 outline-none transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1"
1136
+ );
1137
+ function no({
1138
+ className: e,
1139
+ ...t
1140
+ }) {
1141
+ return /* @__PURE__ */ u(
1142
+ "div",
1143
+ {
1144
+ className: k(
1145
+ "absolute top-full left-0 isolate z-50 flex justify-center"
1146
+ ),
1147
+ children: /* @__PURE__ */ u(
1148
+ Zn,
1149
+ {
1150
+ "data-slot": "navigation-menu-viewport",
1151
+ className: k(
1152
+ "origin-top-center bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border shadow md:w-[var(--radix-navigation-menu-viewport-width)]",
1153
+ e
1154
+ ),
1155
+ ...t
1156
+ }
1157
+ )
1158
+ }
1159
+ );
1160
+ }
1161
+ function oo({
1162
+ className: e,
1163
+ ...t
1164
+ }) {
1165
+ return /* @__PURE__ */ u(
1166
+ qn,
1167
+ {
1168
+ "data-slot": "navigation-menu-link",
1169
+ className: k(
1170
+ "data-[active=true]:focus:bg-accent data-[active=true]:hover:bg-accent data-[active=true]:bg-accent/50 data-[active=true]:text-accent-foreground hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus-visible:ring-ring/50 [&_svg:not([class*='text-'])]:text-muted-foreground flex flex-col gap-1 rounded-sm p-2 text-sm transition-all outline-none focus-visible:ring-[3px] focus-visible:outline-1 [&_svg:not([class*='size-'])]:size-4",
1171
+ e
1172
+ ),
1173
+ ...t
1174
+ }
1175
+ );
1176
+ }
1177
+ var de = "focusScope.autoFocusOnMount", fe = "focusScope.autoFocusOnUnmount", $e = { bubbles: !1, cancelable: !0 }, ro = "FocusScope", Nt = i.forwardRef((e, t) => {
1178
+ const {
1179
+ loop: n = !1,
1180
+ trapped: o = !1,
1181
+ onMountAutoFocus: r,
1182
+ onUnmountAutoFocus: a,
1183
+ ...c
1184
+ } = e, [s, f] = i.useState(null), v = D(r), l = D(a), m = i.useRef(null), p = O(t, (d) => f(d)), y = i.useRef({
1185
+ paused: !1,
1186
+ pause() {
1187
+ this.paused = !0;
1188
+ },
1189
+ resume() {
1190
+ this.paused = !1;
1191
+ }
1192
+ }).current;
1193
+ i.useEffect(() => {
1194
+ if (o) {
1195
+ let d = function(h) {
1196
+ if (y.paused || !s) return;
1197
+ const b = h.target;
1198
+ s.contains(b) ? m.current = b : V(m.current, { select: !0 });
1199
+ }, g = function(h) {
1200
+ if (y.paused || !s) return;
1201
+ const b = h.relatedTarget;
1202
+ b !== null && (s.contains(b) || V(m.current, { select: !0 }));
1203
+ }, E = function(h) {
1204
+ if (document.activeElement === document.body)
1205
+ for (const w of h)
1206
+ w.removedNodes.length > 0 && V(s);
1207
+ };
1208
+ document.addEventListener("focusin", d), document.addEventListener("focusout", g);
1209
+ const N = new MutationObserver(E);
1210
+ return s && N.observe(s, { childList: !0, subtree: !0 }), () => {
1211
+ document.removeEventListener("focusin", d), document.removeEventListener("focusout", g), N.disconnect();
1212
+ };
1213
+ }
1214
+ }, [o, s, y.paused]), i.useEffect(() => {
1215
+ if (s) {
1216
+ Ge.add(y);
1217
+ const d = document.activeElement;
1218
+ if (!s.contains(d)) {
1219
+ const E = new CustomEvent(de, $e);
1220
+ s.addEventListener(de, v), s.dispatchEvent(E), E.defaultPrevented || (ao(lo(Rt(s)), { select: !0 }), document.activeElement === d && V(s));
1221
+ }
1222
+ return () => {
1223
+ s.removeEventListener(de, v), setTimeout(() => {
1224
+ const E = new CustomEvent(fe, $e);
1225
+ s.addEventListener(fe, l), s.dispatchEvent(E), E.defaultPrevented || V(d ?? document.body, { select: !0 }), s.removeEventListener(fe, l), Ge.remove(y);
1226
+ }, 0);
1227
+ };
1228
+ }
1229
+ }, [s, v, l, y]);
1230
+ const C = i.useCallback(
1231
+ (d) => {
1232
+ if (!n && !o || y.paused) return;
1233
+ const g = d.key === "Tab" && !d.altKey && !d.ctrlKey && !d.metaKey, E = document.activeElement;
1234
+ if (g && E) {
1235
+ const N = d.currentTarget, [h, b] = io(N);
1236
+ h && b ? !d.shiftKey && E === b ? (d.preventDefault(), n && V(h, { select: !0 })) : d.shiftKey && E === h && (d.preventDefault(), n && V(b, { select: !0 })) : E === N && d.preventDefault();
1237
+ }
1238
+ },
1239
+ [n, o, y.paused]
1240
+ );
1241
+ return /* @__PURE__ */ u(P.div, { tabIndex: -1, ...c, ref: p, onKeyDown: C });
1242
+ });
1243
+ Nt.displayName = ro;
1244
+ function ao(e, { select: t = !1 } = {}) {
1245
+ const n = document.activeElement;
1246
+ for (const o of e)
1247
+ if (V(o, { select: t }), document.activeElement !== n) return;
1248
+ }
1249
+ function io(e) {
1250
+ const t = Rt(e), n = He(t, e), o = He(t.reverse(), e);
1251
+ return [n, o];
1252
+ }
1253
+ function Rt(e) {
1254
+ const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
1255
+ acceptNode: (o) => {
1256
+ const r = o.tagName === "INPUT" && o.type === "hidden";
1257
+ return o.disabled || o.hidden || r ? NodeFilter.FILTER_SKIP : o.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
1258
+ }
1259
+ });
1260
+ for (; n.nextNode(); ) t.push(n.currentNode);
1261
+ return t;
1262
+ }
1263
+ function He(e, t) {
1264
+ for (const n of e)
1265
+ if (!so(n, { upTo: t })) return n;
1266
+ }
1267
+ function so(e, { upTo: t }) {
1268
+ if (getComputedStyle(e).visibility === "hidden") return !0;
1269
+ for (; e; ) {
1270
+ if (t !== void 0 && e === t) return !1;
1271
+ if (getComputedStyle(e).display === "none") return !0;
1272
+ e = e.parentElement;
1273
+ }
1274
+ return !1;
1275
+ }
1276
+ function co(e) {
1277
+ return e instanceof HTMLInputElement && "select" in e;
1278
+ }
1279
+ function V(e, { select: t = !1 } = {}) {
1280
+ if (e && e.focus) {
1281
+ const n = document.activeElement;
1282
+ e.focus({ preventScroll: !0 }), e !== n && co(e) && t && e.select();
1283
+ }
1284
+ }
1285
+ var Ge = uo();
1286
+ function uo() {
1287
+ let e = [];
1288
+ return {
1289
+ add(t) {
1290
+ const n = e[0];
1291
+ t !== n && n?.pause(), e = je(e, t), e.unshift(t);
1292
+ },
1293
+ remove(t) {
1294
+ e = je(e, t), e[0]?.resume();
1295
+ }
1296
+ };
1297
+ }
1298
+ function je(e, t) {
1299
+ const n = [...e], o = n.indexOf(t);
1300
+ return o !== -1 && n.splice(o, 1), n;
1301
+ }
1302
+ function lo(e) {
1303
+ return e.filter((t) => t.tagName !== "A");
1304
+ }
1305
+ var fo = "Portal", St = i.forwardRef((e, t) => {
1306
+ const { container: n, ...o } = e, [r, a] = i.useState(!1);
1307
+ K(() => a(!0), []);
1308
+ const c = n || r && globalThis?.document?.body;
1309
+ return c ? tt.createPortal(/* @__PURE__ */ u(P.div, { ...o, ref: t }), c) : null;
1310
+ });
1311
+ St.displayName = fo;
1312
+ var ve = 0;
1313
+ function vo() {
1314
+ i.useEffect(() => {
1315
+ const e = document.querySelectorAll("[data-radix-focus-guard]");
1316
+ return document.body.insertAdjacentElement("afterbegin", e[0] ?? Ye()), document.body.insertAdjacentElement("beforeend", e[1] ?? Ye()), ve++, () => {
1317
+ ve === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), ve--;
1318
+ };
1319
+ }, []);
1320
+ }
1321
+ function Ye() {
1322
+ const e = document.createElement("span");
1323
+ 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;
1324
+ }
1325
+ var F = function() {
1326
+ return F = Object.assign || function(t) {
1327
+ for (var n, o = 1, r = arguments.length; o < r; o++) {
1328
+ n = arguments[o];
1329
+ for (var a in n) Object.prototype.hasOwnProperty.call(n, a) && (t[a] = n[a]);
1330
+ }
1331
+ return t;
1332
+ }, F.apply(this, arguments);
1333
+ };
1334
+ function Mt(e, t) {
1335
+ var n = {};
1336
+ for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
1337
+ if (e != null && typeof Object.getOwnPropertySymbols == "function")
1338
+ for (var r = 0, o = Object.getOwnPropertySymbols(e); r < o.length; r++)
1339
+ t.indexOf(o[r]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[r]) && (n[o[r]] = e[o[r]]);
1340
+ return n;
1341
+ }
1342
+ function mo(e, t, n) {
1343
+ if (n || arguments.length === 2) for (var o = 0, r = t.length, a; o < r; o++)
1344
+ (a || !(o in t)) && (a || (a = Array.prototype.slice.call(t, 0, o)), a[o] = t[o]);
1345
+ return e.concat(a || Array.prototype.slice.call(t));
1346
+ }
1347
+ var re = "right-scroll-bar-position", ae = "width-before-scroll-bar", go = "with-scroll-bars-hidden", po = "--removed-body-scroll-bar-size";
1348
+ function me(e, t) {
1349
+ return typeof e == "function" ? e(t) : e && (e.current = t), e;
1350
+ }
1351
+ function ho(e, t) {
1352
+ var n = Qt(function() {
1353
+ return {
1354
+ // value
1355
+ value: e,
1356
+ // last callback
1357
+ callback: t,
1358
+ // "memoized" public interface
1359
+ facade: {
1360
+ get current() {
1361
+ return n.value;
1362
+ },
1363
+ set current(o) {
1364
+ var r = n.value;
1365
+ r !== o && (n.value = o, n.callback(o, r));
1366
+ }
1367
+ }
1368
+ };
1369
+ })[0];
1370
+ return n.callback = t, n.facade;
1371
+ }
1372
+ var yo = typeof window < "u" ? i.useLayoutEffect : i.useEffect, Xe = /* @__PURE__ */ new WeakMap();
1373
+ function bo(e, t) {
1374
+ var n = ho(null, function(o) {
1375
+ return e.forEach(function(r) {
1376
+ return me(r, o);
1377
+ });
1378
+ });
1379
+ return yo(function() {
1380
+ var o = Xe.get(n);
1381
+ if (o) {
1382
+ var r = new Set(o), a = new Set(e), c = n.current;
1383
+ r.forEach(function(s) {
1384
+ a.has(s) || me(s, null);
1385
+ }), a.forEach(function(s) {
1386
+ r.has(s) || me(s, c);
1387
+ });
1388
+ }
1389
+ Xe.set(n, e);
1390
+ }, [e]), n;
1391
+ }
1392
+ function Eo(e) {
1393
+ return e;
1394
+ }
1395
+ function wo(e, t) {
1396
+ t === void 0 && (t = Eo);
1397
+ var n = [], o = !1, r = {
1398
+ read: function() {
1399
+ if (o)
1400
+ throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
1401
+ return n.length ? n[n.length - 1] : e;
1402
+ },
1403
+ useMedium: function(a) {
1404
+ var c = t(a, o);
1405
+ return n.push(c), function() {
1406
+ n = n.filter(function(s) {
1407
+ return s !== c;
1408
+ });
1409
+ };
1410
+ },
1411
+ assignSyncMedium: function(a) {
1412
+ for (o = !0; n.length; ) {
1413
+ var c = n;
1414
+ n = [], c.forEach(a);
1415
+ }
1416
+ n = {
1417
+ push: function(s) {
1418
+ return a(s);
1419
+ },
1420
+ filter: function() {
1421
+ return n;
1422
+ }
1423
+ };
1424
+ },
1425
+ assignMedium: function(a) {
1426
+ o = !0;
1427
+ var c = [];
1428
+ if (n.length) {
1429
+ var s = n;
1430
+ n = [], s.forEach(a), c = n;
1431
+ }
1432
+ var f = function() {
1433
+ var l = c;
1434
+ c = [], l.forEach(a);
1435
+ }, v = function() {
1436
+ return Promise.resolve().then(f);
1437
+ };
1438
+ v(), n = {
1439
+ push: function(l) {
1440
+ c.push(l), v();
1441
+ },
1442
+ filter: function(l) {
1443
+ return c = c.filter(l), n;
1444
+ }
1445
+ };
1446
+ }
1447
+ };
1448
+ return r;
1449
+ }
1450
+ function Co(e) {
1451
+ e === void 0 && (e = {});
1452
+ var t = wo(null);
1453
+ return t.options = F({ async: !0, ssr: !1 }, e), t;
1454
+ }
1455
+ var xt = function(e) {
1456
+ var t = e.sideCar, n = Mt(e, ["sideCar"]);
1457
+ if (!t)
1458
+ throw new Error("Sidecar: please provide `sideCar` property to import the right car");
1459
+ var o = t.read();
1460
+ if (!o)
1461
+ throw new Error("Sidecar medium not found");
1462
+ return i.createElement(o, F({}, n));
1463
+ };
1464
+ xt.isSideCarExport = !0;
1465
+ function No(e, t) {
1466
+ return e.useMedium(t), xt;
1467
+ }
1468
+ var Pt = Co(), ge = function() {
1469
+ }, ue = i.forwardRef(function(e, t) {
1470
+ var n = i.useRef(null), o = i.useState({
1471
+ onScrollCapture: ge,
1472
+ onWheelCapture: ge,
1473
+ onTouchMoveCapture: ge
1474
+ }), r = o[0], a = o[1], c = e.forwardProps, s = e.children, f = e.className, v = e.removeScrollBar, l = e.enabled, m = e.shards, p = e.sideCar, y = e.noRelative, C = e.noIsolation, d = e.inert, g = e.allowPinchZoom, E = e.as, N = E === void 0 ? "div" : E, h = e.gapMode, b = Mt(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), w = p, R = bo([n, t]), S = F(F({}, b), r);
1475
+ return i.createElement(
1476
+ i.Fragment,
1477
+ null,
1478
+ l && i.createElement(w, { sideCar: Pt, removeScrollBar: v, shards: m, noRelative: y, noIsolation: C, inert: d, setCallbacks: a, allowPinchZoom: !!g, lockRef: n, gapMode: h }),
1479
+ c ? i.cloneElement(i.Children.only(s), F(F({}, S), { ref: R })) : i.createElement(N, F({}, S, { className: f, ref: R }), s)
1480
+ );
1481
+ });
1482
+ ue.defaultProps = {
1483
+ enabled: !0,
1484
+ removeScrollBar: !0,
1485
+ inert: !1
1486
+ };
1487
+ ue.classNames = {
1488
+ fullWidth: ae,
1489
+ zeroRight: re
1490
+ };
1491
+ var Ro = function() {
1492
+ if (typeof __webpack_nonce__ < "u")
1493
+ return __webpack_nonce__;
1494
+ };
1495
+ function So() {
1496
+ if (!document)
1497
+ return null;
1498
+ var e = document.createElement("style");
1499
+ e.type = "text/css";
1500
+ var t = Ro();
1501
+ return t && e.setAttribute("nonce", t), e;
1502
+ }
1503
+ function Mo(e, t) {
1504
+ e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
1505
+ }
1506
+ function xo(e) {
1507
+ var t = document.head || document.getElementsByTagName("head")[0];
1508
+ t.appendChild(e);
1509
+ }
1510
+ var Po = function() {
1511
+ var e = 0, t = null;
1512
+ return {
1513
+ add: function(n) {
1514
+ e == 0 && (t = So()) && (Mo(t, n), xo(t)), e++;
1515
+ },
1516
+ remove: function() {
1517
+ e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
1518
+ }
1519
+ };
1520
+ }, To = function() {
1521
+ var e = Po();
1522
+ return function(t, n) {
1523
+ i.useEffect(function() {
1524
+ return e.add(t), function() {
1525
+ e.remove();
1526
+ };
1527
+ }, [t && n]);
1528
+ };
1529
+ }, Tt = function() {
1530
+ var e = To(), t = function(n) {
1531
+ var o = n.styles, r = n.dynamic;
1532
+ return e(o, r), null;
1533
+ };
1534
+ return t;
1535
+ }, Io = {
1536
+ left: 0,
1537
+ top: 0,
1538
+ right: 0,
1539
+ gap: 0
1540
+ }, pe = function(e) {
1541
+ return parseInt(e || "", 10) || 0;
1542
+ }, Oo = function(e) {
1543
+ var t = window.getComputedStyle(document.body), n = t[e === "padding" ? "paddingLeft" : "marginLeft"], o = t[e === "padding" ? "paddingTop" : "marginTop"], r = t[e === "padding" ? "paddingRight" : "marginRight"];
1544
+ return [pe(n), pe(o), pe(r)];
1545
+ }, Do = function(e) {
1546
+ if (e === void 0 && (e = "margin"), typeof window > "u")
1547
+ return Io;
1548
+ var t = Oo(e), n = document.documentElement.clientWidth, o = window.innerWidth;
1549
+ return {
1550
+ left: t[0],
1551
+ top: t[1],
1552
+ right: t[2],
1553
+ gap: Math.max(0, o - n + t[2] - t[0])
1554
+ };
1555
+ }, Ao = Tt(), Y = "data-scroll-locked", _o = function(e, t, n, o) {
1556
+ var r = e.left, a = e.top, c = e.right, s = e.gap;
1557
+ return n === void 0 && (n = "margin"), `
1558
+ .`.concat(go, ` {
1559
+ overflow: hidden `).concat(o, `;
1560
+ padding-right: `).concat(s, "px ").concat(o, `;
1561
+ }
1562
+ body[`).concat(Y, `] {
1563
+ overflow: hidden `).concat(o, `;
1564
+ overscroll-behavior: contain;
1565
+ `).concat([
1566
+ t && "position: relative ".concat(o, ";"),
1567
+ n === "margin" && `
1568
+ padding-left: `.concat(r, `px;
1569
+ padding-top: `).concat(a, `px;
1570
+ padding-right: `).concat(c, `px;
1571
+ margin-left:0;
1572
+ margin-top:0;
1573
+ margin-right: `).concat(s, "px ").concat(o, `;
1574
+ `),
1575
+ n === "padding" && "padding-right: ".concat(s, "px ").concat(o, ";")
1576
+ ].filter(Boolean).join(""), `
1577
+ }
1578
+
1579
+ .`).concat(re, ` {
1580
+ right: `).concat(s, "px ").concat(o, `;
1581
+ }
1582
+
1583
+ .`).concat(ae, ` {
1584
+ margin-right: `).concat(s, "px ").concat(o, `;
1585
+ }
1586
+
1587
+ .`).concat(re, " .").concat(re, ` {
1588
+ right: 0 `).concat(o, `;
1589
+ }
1590
+
1591
+ .`).concat(ae, " .").concat(ae, ` {
1592
+ margin-right: 0 `).concat(o, `;
1593
+ }
1594
+
1595
+ body[`).concat(Y, `] {
1596
+ `).concat(po, ": ").concat(s, `px;
1597
+ }
1598
+ `);
1599
+ }, qe = function() {
1600
+ var e = parseInt(document.body.getAttribute(Y) || "0", 10);
1601
+ return isFinite(e) ? e : 0;
1602
+ }, ko = function() {
1603
+ i.useEffect(function() {
1604
+ return document.body.setAttribute(Y, (qe() + 1).toString()), function() {
1605
+ var e = qe() - 1;
1606
+ e <= 0 ? document.body.removeAttribute(Y) : document.body.setAttribute(Y, e.toString());
1607
+ };
1608
+ }, []);
1609
+ }, Lo = function(e) {
1610
+ var t = e.noRelative, n = e.noImportant, o = e.gapMode, r = o === void 0 ? "margin" : o;
1611
+ ko();
1612
+ var a = i.useMemo(function() {
1613
+ return Do(r);
1614
+ }, [r]);
1615
+ return i.createElement(Ao, { styles: _o(a, !t, r, n ? "" : "!important") });
1616
+ }, Se = !1;
1617
+ if (typeof window < "u")
1618
+ try {
1619
+ var J = Object.defineProperty({}, "passive", {
1620
+ get: function() {
1621
+ return Se = !0, !0;
1622
+ }
1623
+ });
1624
+ window.addEventListener("test", J, J), window.removeEventListener("test", J, J);
1625
+ } catch {
1626
+ Se = !1;
1627
+ }
1628
+ var H = Se ? { passive: !1 } : !1, Fo = function(e) {
1629
+ return e.tagName === "TEXTAREA";
1630
+ }, It = function(e, t) {
1631
+ if (!(e instanceof Element))
1632
+ return !1;
1633
+ var n = window.getComputedStyle(e);
1634
+ return (
1635
+ // not-not-scrollable
1636
+ n[t] !== "hidden" && // contains scroll inside self
1637
+ !(n.overflowY === n.overflowX && !Fo(e) && n[t] === "visible")
1638
+ );
1639
+ }, Wo = function(e) {
1640
+ return It(e, "overflowY");
1641
+ }, Vo = function(e) {
1642
+ return It(e, "overflowX");
1643
+ }, Ze = function(e, t) {
1644
+ var n = t.ownerDocument, o = t;
1645
+ do {
1646
+ typeof ShadowRoot < "u" && o instanceof ShadowRoot && (o = o.host);
1647
+ var r = Ot(e, o);
1648
+ if (r) {
1649
+ var a = Dt(e, o), c = a[1], s = a[2];
1650
+ if (c > s)
1651
+ return !0;
1652
+ }
1653
+ o = o.parentNode;
1654
+ } while (o && o !== n.body);
1655
+ return !1;
1656
+ }, Ko = function(e) {
1657
+ var t = e.scrollTop, n = e.scrollHeight, o = e.clientHeight;
1658
+ return [
1659
+ t,
1660
+ n,
1661
+ o
1662
+ ];
1663
+ }, Uo = function(e) {
1664
+ var t = e.scrollLeft, n = e.scrollWidth, o = e.clientWidth;
1665
+ return [
1666
+ t,
1667
+ n,
1668
+ o
1669
+ ];
1670
+ }, Ot = function(e, t) {
1671
+ return e === "v" ? Wo(t) : Vo(t);
1672
+ }, Dt = function(e, t) {
1673
+ return e === "v" ? Ko(t) : Uo(t);
1674
+ }, Bo = function(e, t) {
1675
+ return e === "h" && t === "rtl" ? -1 : 1;
1676
+ }, zo = function(e, t, n, o, r) {
1677
+ var a = Bo(e, window.getComputedStyle(t).direction), c = a * o, s = n.target, f = t.contains(s), v = !1, l = c > 0, m = 0, p = 0;
1678
+ do {
1679
+ if (!s)
1680
+ break;
1681
+ var y = Dt(e, s), C = y[0], d = y[1], g = y[2], E = d - g - a * C;
1682
+ (C || E) && Ot(e, s) && (m += E, p += C);
1683
+ var N = s.parentNode;
1684
+ s = N && N.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? N.host : N;
1685
+ } while (
1686
+ // portaled content
1687
+ !f && s !== document.body || // self content
1688
+ f && (t.contains(s) || t === s)
1689
+ );
1690
+ return (l && Math.abs(m) < 1 || !l && Math.abs(p) < 1) && (v = !0), v;
1691
+ }, ee = function(e) {
1692
+ return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
1693
+ }, Qe = function(e) {
1694
+ return [e.deltaX, e.deltaY];
1695
+ }, Je = function(e) {
1696
+ return e && "current" in e ? e.current : e;
1697
+ }, $o = function(e, t) {
1698
+ return e[0] === t[0] && e[1] === t[1];
1699
+ }, Ho = function(e) {
1700
+ return `
1701
+ .block-interactivity-`.concat(e, ` {pointer-events: none;}
1702
+ .allow-interactivity-`).concat(e, ` {pointer-events: all;}
1703
+ `);
1704
+ }, Go = 0, G = [];
1705
+ function jo(e) {
1706
+ var t = i.useRef([]), n = i.useRef([0, 0]), o = i.useRef(), r = i.useState(Go++)[0], a = i.useState(Tt)[0], c = i.useRef(e);
1707
+ i.useEffect(function() {
1708
+ c.current = e;
1709
+ }, [e]), i.useEffect(function() {
1710
+ if (e.inert) {
1711
+ document.body.classList.add("block-interactivity-".concat(r));
1712
+ var d = mo([e.lockRef.current], (e.shards || []).map(Je), !0).filter(Boolean);
1713
+ return d.forEach(function(g) {
1714
+ return g.classList.add("allow-interactivity-".concat(r));
1715
+ }), function() {
1716
+ document.body.classList.remove("block-interactivity-".concat(r)), d.forEach(function(g) {
1717
+ return g.classList.remove("allow-interactivity-".concat(r));
1718
+ });
1719
+ };
1720
+ }
1721
+ }, [e.inert, e.lockRef.current, e.shards]);
1722
+ var s = i.useCallback(function(d, g) {
1723
+ if ("touches" in d && d.touches.length === 2 || d.type === "wheel" && d.ctrlKey)
1724
+ return !c.current.allowPinchZoom;
1725
+ var E = ee(d), N = n.current, h = "deltaX" in d ? d.deltaX : N[0] - E[0], b = "deltaY" in d ? d.deltaY : N[1] - E[1], w, R = d.target, S = Math.abs(h) > Math.abs(b) ? "h" : "v";
1726
+ if ("touches" in d && S === "h" && R.type === "range")
1727
+ return !1;
1728
+ var T = window.getSelection(), M = T && T.anchorNode, I = M ? M === R || M.contains(R) : !1;
1729
+ if (I)
1730
+ return !1;
1731
+ var W = Ze(S, R);
1732
+ if (!W)
1733
+ return !0;
1734
+ if (W ? w = S : (w = S === "v" ? "h" : "v", W = Ze(S, R)), !W)
1735
+ return !1;
1736
+ if (!o.current && "changedTouches" in d && (h || b) && (o.current = w), !w)
1737
+ return !0;
1738
+ var We = o.current || w;
1739
+ return zo(We, g, d, We === "h" ? h : b);
1740
+ }, []), f = i.useCallback(function(d) {
1741
+ var g = d;
1742
+ if (!(!G.length || G[G.length - 1] !== a)) {
1743
+ var E = "deltaY" in g ? Qe(g) : ee(g), N = t.current.filter(function(w) {
1744
+ return w.name === g.type && (w.target === g.target || g.target === w.shadowParent) && $o(w.delta, E);
1745
+ })[0];
1746
+ if (N && N.should) {
1747
+ g.cancelable && g.preventDefault();
1748
+ return;
1749
+ }
1750
+ if (!N) {
1751
+ var h = (c.current.shards || []).map(Je).filter(Boolean).filter(function(w) {
1752
+ return w.contains(g.target);
1753
+ }), b = h.length > 0 ? s(g, h[0]) : !c.current.noIsolation;
1754
+ b && g.cancelable && g.preventDefault();
1755
+ }
1756
+ }
1757
+ }, []), v = i.useCallback(function(d, g, E, N) {
1758
+ var h = { name: d, delta: g, target: E, should: N, shadowParent: Yo(E) };
1759
+ t.current.push(h), setTimeout(function() {
1760
+ t.current = t.current.filter(function(b) {
1761
+ return b !== h;
1762
+ });
1763
+ }, 1);
1764
+ }, []), l = i.useCallback(function(d) {
1765
+ n.current = ee(d), o.current = void 0;
1766
+ }, []), m = i.useCallback(function(d) {
1767
+ v(d.type, Qe(d), d.target, s(d, e.lockRef.current));
1768
+ }, []), p = i.useCallback(function(d) {
1769
+ v(d.type, ee(d), d.target, s(d, e.lockRef.current));
1770
+ }, []);
1771
+ i.useEffect(function() {
1772
+ return G.push(a), e.setCallbacks({
1773
+ onScrollCapture: m,
1774
+ onWheelCapture: m,
1775
+ onTouchMoveCapture: p
1776
+ }), document.addEventListener("wheel", f, H), document.addEventListener("touchmove", f, H), document.addEventListener("touchstart", l, H), function() {
1777
+ G = G.filter(function(d) {
1778
+ return d !== a;
1779
+ }), document.removeEventListener("wheel", f, H), document.removeEventListener("touchmove", f, H), document.removeEventListener("touchstart", l, H);
1780
+ };
1781
+ }, []);
1782
+ var y = e.removeScrollBar, C = e.inert;
1783
+ return i.createElement(
1784
+ i.Fragment,
1785
+ null,
1786
+ C ? i.createElement(a, { styles: Ho(r) }) : null,
1787
+ y ? i.createElement(Lo, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
1788
+ );
1789
+ }
1790
+ function Yo(e) {
1791
+ for (var t = null; e !== null; )
1792
+ e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
1793
+ return t;
1794
+ }
1795
+ const Xo = No(Pt, jo);
1796
+ var At = i.forwardRef(function(e, t) {
1797
+ return i.createElement(ue, F({}, e, { ref: t, sideCar: Xo }));
1798
+ });
1799
+ At.classNames = ue.classNames;
1800
+ var qo = function(e) {
1801
+ if (typeof document > "u")
1802
+ return null;
1803
+ var t = Array.isArray(e) ? e[0] : e;
1804
+ return t.ownerDocument.body;
1805
+ }, j = /* @__PURE__ */ new WeakMap(), te = /* @__PURE__ */ new WeakMap(), ne = {}, he = 0, _t = function(e) {
1806
+ return e && (e.host || _t(e.parentNode));
1807
+ }, Zo = function(e, t) {
1808
+ return t.map(function(n) {
1809
+ if (e.contains(n))
1810
+ return n;
1811
+ var o = _t(n);
1812
+ return o && e.contains(o) ? o : (console.error("aria-hidden", n, "in not contained inside", e, ". Doing nothing"), null);
1813
+ }).filter(function(n) {
1814
+ return !!n;
1815
+ });
1816
+ }, Qo = function(e, t, n, o) {
1817
+ var r = Zo(t, Array.isArray(e) ? e : [e]);
1818
+ ne[n] || (ne[n] = /* @__PURE__ */ new WeakMap());
1819
+ var a = ne[n], c = [], s = /* @__PURE__ */ new Set(), f = new Set(r), v = function(m) {
1820
+ !m || s.has(m) || (s.add(m), v(m.parentNode));
1821
+ };
1822
+ r.forEach(v);
1823
+ var l = function(m) {
1824
+ !m || f.has(m) || Array.prototype.forEach.call(m.children, function(p) {
1825
+ if (s.has(p))
1826
+ l(p);
1827
+ else
1828
+ try {
1829
+ var y = p.getAttribute(o), C = y !== null && y !== "false", d = (j.get(p) || 0) + 1, g = (a.get(p) || 0) + 1;
1830
+ j.set(p, d), a.set(p, g), c.push(p), d === 1 && C && te.set(p, !0), g === 1 && p.setAttribute(n, "true"), C || p.setAttribute(o, "true");
1831
+ } catch (E) {
1832
+ console.error("aria-hidden: cannot operate on ", p, E);
1833
+ }
1834
+ });
1835
+ };
1836
+ return l(t), s.clear(), he++, function() {
1837
+ c.forEach(function(m) {
1838
+ var p = j.get(m) - 1, y = a.get(m) - 1;
1839
+ j.set(m, p), a.set(m, y), p || (te.has(m) || m.removeAttribute(o), te.delete(m)), y || m.removeAttribute(n);
1840
+ }), he--, he || (j = /* @__PURE__ */ new WeakMap(), j = /* @__PURE__ */ new WeakMap(), te = /* @__PURE__ */ new WeakMap(), ne = {});
1841
+ };
1842
+ }, Jo = function(e, t, n) {
1843
+ n === void 0 && (n = "data-aria-hidden");
1844
+ var o = Array.from(Array.isArray(e) ? e : [e]), r = qo(e);
1845
+ return r ? (o.push.apply(o, Array.from(r.querySelectorAll("[aria-live], script"))), Qo(o, r, n, "aria-hidden")) : function() {
1846
+ return null;
1847
+ };
1848
+ }, le = "Dialog", [kt] = Me(le), [er, L] = kt(le), Lt = (e) => {
1849
+ const {
1850
+ __scopeDialog: t,
1851
+ children: n,
1852
+ open: o,
1853
+ defaultOpen: r,
1854
+ onOpenChange: a,
1855
+ modal: c = !0
1856
+ } = e, s = i.useRef(null), f = i.useRef(null), [v, l] = xe({
1857
+ prop: o,
1858
+ defaultProp: r ?? !1,
1859
+ onChange: a,
1860
+ caller: le
1861
+ });
1862
+ return /* @__PURE__ */ u(
1863
+ er,
1864
+ {
1865
+ scope: t,
1866
+ triggerRef: s,
1867
+ contentRef: f,
1868
+ contentId: q(),
1869
+ titleId: q(),
1870
+ descriptionId: q(),
1871
+ open: v,
1872
+ onOpenChange: l,
1873
+ onOpenToggle: i.useCallback(() => l((m) => !m), [l]),
1874
+ modal: c,
1875
+ children: n
1876
+ }
1877
+ );
1878
+ };
1879
+ Lt.displayName = le;
1880
+ var Ft = "DialogTrigger", Wt = i.forwardRef(
1881
+ (e, t) => {
1882
+ const { __scopeDialog: n, ...o } = e, r = L(Ft, n), a = O(t, r.triggerRef);
1883
+ return /* @__PURE__ */ u(
1884
+ P.button,
1885
+ {
1886
+ type: "button",
1887
+ "aria-haspopup": "dialog",
1888
+ "aria-expanded": r.open,
1889
+ "aria-controls": r.contentId,
1890
+ "data-state": Fe(r.open),
1891
+ ...o,
1892
+ ref: a,
1893
+ onClick: x(e.onClick, r.onOpenToggle)
1894
+ }
1895
+ );
1896
+ }
1897
+ );
1898
+ Wt.displayName = Ft;
1899
+ var ke = "DialogPortal", [tr, Vt] = kt(ke, {
1900
+ forceMount: void 0
1901
+ }), Kt = (e) => {
1902
+ const { __scopeDialog: t, forceMount: n, children: o, container: r } = e, a = L(ke, t);
1903
+ return /* @__PURE__ */ u(tr, { scope: t, forceMount: n, children: i.Children.map(o, (c) => /* @__PURE__ */ u(U, { present: n || a.open, children: /* @__PURE__ */ u(St, { asChild: !0, container: r, children: c }) })) });
1904
+ };
1905
+ Kt.displayName = ke;
1906
+ var ce = "DialogOverlay", Ut = i.forwardRef(
1907
+ (e, t) => {
1908
+ const n = Vt(ce, e.__scopeDialog), { forceMount: o = n.forceMount, ...r } = e, a = L(ce, e.__scopeDialog);
1909
+ return a.modal ? /* @__PURE__ */ u(U, { present: o || a.open, children: /* @__PURE__ */ u(or, { ...r, ref: t }) }) : null;
1910
+ }
1911
+ );
1912
+ Ut.displayName = ce;
1913
+ var nr = ie("DialogOverlay.RemoveScroll"), or = i.forwardRef(
1914
+ (e, t) => {
1915
+ const { __scopeDialog: n, ...o } = e, r = L(ce, n);
1916
+ return (
1917
+ // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
1918
+ // ie. when `Overlay` and `Content` are siblings
1919
+ /* @__PURE__ */ u(At, { as: nr, allowPinchZoom: !0, shards: [r.contentRef], children: /* @__PURE__ */ u(
1920
+ P.div,
1921
+ {
1922
+ "data-state": Fe(r.open),
1923
+ ...o,
1924
+ ref: t,
1925
+ style: { pointerEvents: "auto", ...o.style }
1926
+ }
1927
+ ) })
1928
+ );
1929
+ }
1930
+ ), z = "DialogContent", Bt = i.forwardRef(
1931
+ (e, t) => {
1932
+ const n = Vt(z, e.__scopeDialog), { forceMount: o = n.forceMount, ...r } = e, a = L(z, e.__scopeDialog);
1933
+ return /* @__PURE__ */ u(U, { present: o || a.open, children: a.modal ? /* @__PURE__ */ u(rr, { ...r, ref: t }) : /* @__PURE__ */ u(ar, { ...r, ref: t }) });
1934
+ }
1935
+ );
1936
+ Bt.displayName = z;
1937
+ var rr = i.forwardRef(
1938
+ (e, t) => {
1939
+ const n = L(z, e.__scopeDialog), o = i.useRef(null), r = O(t, n.contentRef, o);
1940
+ return i.useEffect(() => {
1941
+ const a = o.current;
1942
+ if (a) return Jo(a);
1943
+ }, []), /* @__PURE__ */ u(
1944
+ zt,
1945
+ {
1946
+ ...e,
1947
+ ref: r,
1948
+ trapFocus: n.open,
1949
+ disableOutsidePointerEvents: !0,
1950
+ onCloseAutoFocus: x(e.onCloseAutoFocus, (a) => {
1951
+ a.preventDefault(), n.triggerRef.current?.focus();
1952
+ }),
1953
+ onPointerDownOutside: x(e.onPointerDownOutside, (a) => {
1954
+ const c = a.detail.originalEvent, s = c.button === 0 && c.ctrlKey === !0;
1955
+ (c.button === 2 || s) && a.preventDefault();
1956
+ }),
1957
+ onFocusOutside: x(
1958
+ e.onFocusOutside,
1959
+ (a) => a.preventDefault()
1960
+ )
1961
+ }
1962
+ );
1963
+ }
1964
+ ), ar = i.forwardRef(
1965
+ (e, t) => {
1966
+ const n = L(z, e.__scopeDialog), o = i.useRef(!1), r = i.useRef(!1);
1967
+ return /* @__PURE__ */ u(
1968
+ zt,
1969
+ {
1970
+ ...e,
1971
+ ref: t,
1972
+ trapFocus: !1,
1973
+ disableOutsidePointerEvents: !1,
1974
+ onCloseAutoFocus: (a) => {
1975
+ e.onCloseAutoFocus?.(a), a.defaultPrevented || (o.current || n.triggerRef.current?.focus(), a.preventDefault()), o.current = !1, r.current = !1;
1976
+ },
1977
+ onInteractOutside: (a) => {
1978
+ e.onInteractOutside?.(a), a.defaultPrevented || (o.current = !0, a.detail.originalEvent.type === "pointerdown" && (r.current = !0));
1979
+ const c = a.target;
1980
+ n.triggerRef.current?.contains(c) && a.preventDefault(), a.detail.originalEvent.type === "focusin" && r.current && a.preventDefault();
1981
+ }
1982
+ }
1983
+ );
1984
+ }
1985
+ ), zt = i.forwardRef(
1986
+ (e, t) => {
1987
+ const { __scopeDialog: n, trapFocus: o, onOpenAutoFocus: r, onCloseAutoFocus: a, ...c } = e, s = L(z, n), f = i.useRef(null), v = O(t, f);
1988
+ return vo(), /* @__PURE__ */ A(Z, { children: [
1989
+ /* @__PURE__ */ u(
1990
+ Nt,
1991
+ {
1992
+ asChild: !0,
1993
+ loop: !0,
1994
+ trapped: o,
1995
+ onMountAutoFocus: r,
1996
+ onUnmountAutoFocus: a,
1997
+ children: /* @__PURE__ */ u(
1998
+ Pe,
1999
+ {
2000
+ role: "dialog",
2001
+ id: s.contentId,
2002
+ "aria-describedby": s.descriptionId,
2003
+ "aria-labelledby": s.titleId,
2004
+ "data-state": Fe(s.open),
2005
+ ...c,
2006
+ ref: v,
2007
+ onDismiss: () => s.onOpenChange(!1)
2008
+ }
2009
+ )
2010
+ }
2011
+ ),
2012
+ /* @__PURE__ */ A(Z, { children: [
2013
+ /* @__PURE__ */ u(cr, { titleId: s.titleId }),
2014
+ /* @__PURE__ */ u(lr, { contentRef: f, descriptionId: s.descriptionId })
2015
+ ] })
2016
+ ] });
2017
+ }
2018
+ ), Le = "DialogTitle", ir = i.forwardRef(
2019
+ (e, t) => {
2020
+ const { __scopeDialog: n, ...o } = e, r = L(Le, n);
2021
+ return /* @__PURE__ */ u(P.h2, { id: r.titleId, ...o, ref: t });
2022
+ }
2023
+ );
2024
+ ir.displayName = Le;
2025
+ var $t = "DialogDescription", sr = i.forwardRef(
2026
+ (e, t) => {
2027
+ const { __scopeDialog: n, ...o } = e, r = L($t, n);
2028
+ return /* @__PURE__ */ u(P.p, { id: r.descriptionId, ...o, ref: t });
2029
+ }
2030
+ );
2031
+ sr.displayName = $t;
2032
+ var Ht = "DialogClose", Gt = i.forwardRef(
2033
+ (e, t) => {
2034
+ const { __scopeDialog: n, ...o } = e, r = L(Ht, n);
2035
+ return /* @__PURE__ */ u(
2036
+ P.button,
2037
+ {
2038
+ type: "button",
2039
+ ...o,
2040
+ ref: t,
2041
+ onClick: x(e.onClick, () => r.onOpenChange(!1))
2042
+ }
2043
+ );
2044
+ }
2045
+ );
2046
+ Gt.displayName = Ht;
2047
+ function Fe(e) {
2048
+ return e ? "open" : "closed";
2049
+ }
2050
+ var jt = "DialogTitleWarning", [Or, Yt] = on(jt, {
2051
+ contentName: z,
2052
+ titleName: Le,
2053
+ docsSlug: "dialog"
2054
+ }), cr = ({ titleId: e }) => {
2055
+ const t = Yt(jt), n = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
2056
+
2057
+ If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
2058
+
2059
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;
2060
+ return i.useEffect(() => {
2061
+ e && (document.getElementById(e) || console.error(n));
2062
+ }, [n, e]), null;
2063
+ }, ur = "DialogDescriptionWarning", lr = ({ contentRef: e, descriptionId: t }) => {
2064
+ const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Yt(ur).contentName}}.`;
2065
+ return i.useEffect(() => {
2066
+ const r = e.current?.getAttribute("aria-describedby");
2067
+ t && r && (document.getElementById(t) || console.warn(o));
2068
+ }, [o, e, t]), null;
2069
+ }, dr = Lt, fr = Wt, vr = Kt, mr = Ut, gr = Bt, pr = Gt;
2070
+ function hr({ ...e }) {
2071
+ return /* @__PURE__ */ u(dr, { "data-slot": "sheet", ...e });
2072
+ }
2073
+ function yr({
2074
+ ...e
2075
+ }) {
2076
+ return /* @__PURE__ */ u(fr, { "data-slot": "sheet-trigger", ...e });
2077
+ }
2078
+ function br({
2079
+ ...e
2080
+ }) {
2081
+ return /* @__PURE__ */ u(vr, { "data-slot": "sheet-portal", ...e });
2082
+ }
2083
+ function Er({
2084
+ className: e,
2085
+ ...t
2086
+ }) {
2087
+ return /* @__PURE__ */ u(
2088
+ mr,
2089
+ {
2090
+ "data-slot": "sheet-overlay",
2091
+ className: k(
2092
+ "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
2093
+ e
2094
+ ),
2095
+ ...t
2096
+ }
2097
+ );
2098
+ }
2099
+ function wr({
2100
+ className: e,
2101
+ children: t,
2102
+ side: n = "right",
2103
+ ...o
2104
+ }) {
2105
+ return /* @__PURE__ */ A(br, { children: [
2106
+ /* @__PURE__ */ u(Er, {}),
2107
+ /* @__PURE__ */ A(
2108
+ gr,
2109
+ {
2110
+ "data-slot": "sheet-content",
2111
+ className: k(
2112
+ "bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
2113
+ n === "right" && "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",
2114
+ n === "left" && "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",
2115
+ n === "top" && "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",
2116
+ n === "bottom" && "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",
2117
+ e
2118
+ ),
2119
+ ...o,
2120
+ children: [
2121
+ t,
2122
+ /* @__PURE__ */ A(pr, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none", children: [
2123
+ /* @__PURE__ */ u(en, { className: "size-4" }),
2124
+ /* @__PURE__ */ u("span", { className: "sr-only", children: "Close" })
2125
+ ] })
2126
+ ]
2127
+ }
2128
+ )
2129
+ ] });
2130
+ }
2131
+ const Dr = ({
2132
+ navItems: e,
2133
+ LinkComponent: t = "a",
2134
+ className: n,
2135
+ ...o
2136
+ }) => /* @__PURE__ */ A("header", { className: k(n), ...o, children: [
2137
+ /* @__PURE__ */ u("nav", { className: "hidden sm:flex sticky top-0 z-10 items-center px-4 h-14", children: /* @__PURE__ */ u(Qn, { children: /* @__PURE__ */ u(Jn, { children: e.map((r) => /* @__PURE__ */ u(eo, { children: /* @__PURE__ */ u(
2138
+ oo,
2139
+ {
2140
+ asChild: !0,
2141
+ className: to(),
2142
+ children: /* @__PURE__ */ A(
2143
+ t,
2144
+ {
2145
+ to: r.url,
2146
+ className: "flex items-center gap-2",
2147
+ children: [
2148
+ r.icon && /* @__PURE__ */ u(r.icon, {}),
2149
+ /* @__PURE__ */ u("span", { children: r.title })
2150
+ ]
2151
+ }
2152
+ )
2153
+ }
2154
+ ) }, r.title)) }) }) }),
2155
+ /* @__PURE__ */ u("nav", { className: "flex sm:hidden", children: /* @__PURE__ */ A(hr, { children: [
2156
+ /* @__PURE__ */ u(yr, { asChild: !0, children: /* @__PURE__ */ u(nt, { variant: "ghost", size: "icon", children: /* @__PURE__ */ u(tn, {}) }) }),
2157
+ /* @__PURE__ */ u(wr, { side: "top", className: "p-8", children: /* @__PURE__ */ u("div", { className: "flex flex-col gap-4", children: e.map((r) => /* @__PURE__ */ A(
2158
+ t,
2159
+ {
2160
+ to: r.url,
2161
+ className: "flex items-center gap-2",
2162
+ children: [
2163
+ r.icon && /* @__PURE__ */ u(r.icon, {}),
2164
+ /* @__PURE__ */ u("span", { className: "text-base font-medium", children: r.title })
2165
+ ]
2166
+ },
2167
+ r.title
2168
+ )) }) })
2169
+ ] }) })
2170
+ ] });
70
2171
  export {
71
- k as CustomButton,
72
- a as cn
2172
+ Ir as CustomButton,
2173
+ Dr as MainNav,
2174
+ k as cn
73
2175
  };
74
2176
  //# sourceMappingURL=index.mjs.map