@sykoramaros/marosh-components 0.0.6 → 0.0.8

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,17 +1,656 @@
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";
1
+ import { clsx as Xn } from "clsx";
2
+ import { twMerge as Zn } from "tailwind-merge";
3
+ import { jsx as v, Fragment as ie, jsxs as D } from "react/jsx-runtime";
4
+ import { Slot as Qn, createSlot as Se } from "@radix-ui/react-slot";
5
+ import { cva as Ht } from "class-variance-authority";
6
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(
7
+ import K, { useRef as Jn, useState as er } from "react";
8
+ import * as tr from "react-dom";
9
+ import jt, { flushSync as nr } from "react-dom";
10
+ import { XIcon as rr, Menu as or } from "lucide-react";
11
+ function F(...e) {
12
+ return Zn(Xn(e));
13
+ }
14
+ function ar(e) {
15
+ return typeof e == "function";
16
+ }
17
+ function yt(e, t) {
18
+ return ar(e) ? e(t) : e;
19
+ }
20
+ const ir = Object.prototype.hasOwnProperty;
21
+ function Yt(e, t) {
22
+ if (e === t)
23
+ return e;
24
+ const n = t, r = wt(e) && wt(n);
25
+ if (!r && !(Re(e) && Re(n))) return n;
26
+ const o = r ? e : Et(e);
27
+ if (!o) return n;
28
+ const a = r ? n : Et(n);
29
+ if (!a) return n;
30
+ const c = o.length, s = a.length, m = r ? new Array(s) : {};
31
+ let f = 0;
32
+ for (let l = 0; l < s; l++) {
33
+ const d = r ? l : a[l], h = e[d], p = n[d];
34
+ if (h === p) {
35
+ m[d] = h, (r ? l < c : ir.call(e, d)) && f++;
36
+ continue;
37
+ }
38
+ if (h === null || p === null || typeof h != "object" || typeof p != "object") {
39
+ m[d] = p;
40
+ continue;
41
+ }
42
+ const y = Yt(h, p);
43
+ m[d] = y, y === h && f++;
44
+ }
45
+ return c === s && f === c ? e : m;
46
+ }
47
+ function Et(e) {
48
+ const t = [], n = Object.getOwnPropertyNames(e);
49
+ for (const o of n) {
50
+ if (!Object.prototype.propertyIsEnumerable.call(e, o)) return !1;
51
+ t.push(o);
52
+ }
53
+ const r = Object.getOwnPropertySymbols(e);
54
+ for (const o of r) {
55
+ if (!Object.prototype.propertyIsEnumerable.call(e, o)) return !1;
56
+ t.push(o);
57
+ }
58
+ return t;
59
+ }
60
+ function Re(e) {
61
+ if (!bt(e))
62
+ return !1;
63
+ const t = e.constructor;
64
+ if (typeof t > "u")
65
+ return !0;
66
+ const n = t.prototype;
67
+ return !(!bt(n) || !n.hasOwnProperty("isPrototypeOf"));
68
+ }
69
+ function bt(e) {
70
+ return Object.prototype.toString.call(e) === "[object Object]";
71
+ }
72
+ function wt(e) {
73
+ return Array.isArray(e) && e.length === Object.keys(e).length;
74
+ }
75
+ function Ee(e, t, n) {
76
+ if (e === t)
77
+ return !0;
78
+ if (typeof e != typeof t)
79
+ return !1;
80
+ if (Array.isArray(e) && Array.isArray(t)) {
81
+ if (e.length !== t.length) return !1;
82
+ for (let r = 0, o = e.length; r < o; r++)
83
+ if (!Ee(e[r], t[r], n)) return !1;
84
+ return !0;
85
+ }
86
+ if (Re(e) && Re(t)) {
87
+ const r = n?.ignoreUndefined ?? !0;
88
+ if (n?.partial) {
89
+ for (const c in t)
90
+ if ((!r || t[c] !== void 0) && !Ee(e[c], t[c], n))
91
+ return !1;
92
+ return !0;
93
+ }
94
+ let o = 0;
95
+ if (!r)
96
+ o = Object.keys(e).length;
97
+ else
98
+ for (const c in e)
99
+ e[c] !== void 0 && o++;
100
+ let a = 0;
101
+ for (const c in t)
102
+ if ((!r || t[c] !== void 0) && (a++, a > o || !Ee(e[c], t[c], n)))
103
+ return !1;
104
+ return o === a;
105
+ }
106
+ return !1;
107
+ }
108
+ function _e(e, t) {
109
+ return e?.endsWith("/") && e !== "/" && e !== `${t}/` ? e.slice(0, -1) : e;
110
+ }
111
+ function sr(e, t, n) {
112
+ return _e(e, n) === _e(t, n);
113
+ }
114
+ const cr = "Error preloading route! ☝️";
115
+ var ur = process.env.NODE_ENV === "production";
116
+ function lr(e, t) {
117
+ if (!ur) {
118
+ if (e)
119
+ return;
120
+ var n = "Warning: " + t;
121
+ typeof console < "u" && console.warn(n);
122
+ try {
123
+ throw Error(n);
124
+ } catch {
125
+ }
126
+ }
127
+ }
128
+ var fe = { exports: {} }, Ie = {}, ve = { exports: {} }, De = {};
129
+ var Ct;
130
+ function dr() {
131
+ if (Ct) return De;
132
+ Ct = 1;
133
+ var e = K;
134
+ function t(d, h) {
135
+ return d === h && (d !== 0 || 1 / d === 1 / h) || d !== d && h !== h;
136
+ }
137
+ var n = typeof Object.is == "function" ? Object.is : t, r = e.useState, o = e.useEffect, a = e.useLayoutEffect, c = e.useDebugValue;
138
+ function s(d, h) {
139
+ var p = h(), y = r({ inst: { value: p, getSnapshot: h } }), u = y[0].inst, g = y[1];
140
+ return a(
141
+ function() {
142
+ u.value = p, u.getSnapshot = h, m(u) && g({ inst: u });
143
+ },
144
+ [d, p, h]
145
+ ), o(
146
+ function() {
147
+ return m(u) && g({ inst: u }), d(function() {
148
+ m(u) && g({ inst: u });
149
+ });
150
+ },
151
+ [d]
152
+ ), c(p), p;
153
+ }
154
+ function m(d) {
155
+ var h = d.getSnapshot;
156
+ d = d.value;
157
+ try {
158
+ var p = h();
159
+ return !n(d, p);
160
+ } catch {
161
+ return !0;
162
+ }
163
+ }
164
+ function f(d, h) {
165
+ return h();
166
+ }
167
+ var l = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? f : s;
168
+ return De.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : l, De;
169
+ }
170
+ var Ae = {};
171
+ var St;
172
+ function fr() {
173
+ return St || (St = 1, process.env.NODE_ENV !== "production" && (function() {
174
+ function e(p, y) {
175
+ return p === y && (p !== 0 || 1 / p === 1 / y) || p !== p && y !== y;
176
+ }
177
+ function t(p, y) {
178
+ l || o.startTransition === void 0 || (l = !0, console.error(
179
+ "You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
180
+ ));
181
+ var u = y();
182
+ if (!d) {
183
+ var g = y();
184
+ a(u, g) || (console.error(
185
+ "The result of getSnapshot should be cached to avoid an infinite loop"
186
+ ), d = !0);
187
+ }
188
+ g = c({
189
+ inst: { value: u, getSnapshot: y }
190
+ });
191
+ var w = g[0].inst, R = g[1];
192
+ return m(
193
+ function() {
194
+ w.value = u, w.getSnapshot = y, n(w) && R({ inst: w });
195
+ },
196
+ [p, u, y]
197
+ ), s(
198
+ function() {
199
+ return n(w) && R({ inst: w }), p(function() {
200
+ n(w) && R({ inst: w });
201
+ });
202
+ },
203
+ [p]
204
+ ), f(u), u;
205
+ }
206
+ function n(p) {
207
+ var y = p.getSnapshot;
208
+ p = p.value;
209
+ try {
210
+ var u = y();
211
+ return !a(p, u);
212
+ } catch {
213
+ return !0;
214
+ }
215
+ }
216
+ function r(p, y) {
217
+ return y();
218
+ }
219
+ typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
220
+ var o = K, a = typeof Object.is == "function" ? Object.is : e, c = o.useState, s = o.useEffect, m = o.useLayoutEffect, f = o.useDebugValue, l = !1, d = !1, h = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? r : t;
221
+ Ae.useSyncExternalStore = o.useSyncExternalStore !== void 0 ? o.useSyncExternalStore : h, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
222
+ })()), Ae;
223
+ }
224
+ var Rt;
225
+ function qt() {
226
+ return Rt || (Rt = 1, process.env.NODE_ENV === "production" ? ve.exports = dr() : ve.exports = fr()), ve.exports;
227
+ }
228
+ var _t;
229
+ function vr() {
230
+ if (_t) return Ie;
231
+ _t = 1;
232
+ var e = K, t = qt();
233
+ function n(f, l) {
234
+ return f === l && (f !== 0 || 1 / f === 1 / l) || f !== f && l !== l;
235
+ }
236
+ var r = typeof Object.is == "function" ? Object.is : n, o = t.useSyncExternalStore, a = e.useRef, c = e.useEffect, s = e.useMemo, m = e.useDebugValue;
237
+ return Ie.useSyncExternalStoreWithSelector = function(f, l, d, h, p) {
238
+ var y = a(null);
239
+ if (y.current === null) {
240
+ var u = { hasValue: !1, value: null };
241
+ y.current = u;
242
+ } else u = y.current;
243
+ y = s(
244
+ function() {
245
+ function w(C) {
246
+ if (!R) {
247
+ if (R = !0, b = C, C = h(C), p !== void 0 && u.hasValue) {
248
+ var _ = u.value;
249
+ if (p(_, C))
250
+ return E = _;
251
+ }
252
+ return E = C;
253
+ }
254
+ if (_ = E, r(b, C)) return _;
255
+ var T = h(C);
256
+ return p !== void 0 && p(_, T) ? (b = C, _) : (b = C, E = T);
257
+ }
258
+ var R = !1, b, E, S = d === void 0 ? null : d;
259
+ return [
260
+ function() {
261
+ return w(l());
262
+ },
263
+ S === null ? void 0 : function() {
264
+ return w(S());
265
+ }
266
+ ];
267
+ },
268
+ [l, d, h, p]
269
+ );
270
+ var g = o(f, y[0], y[1]);
271
+ return c(
272
+ function() {
273
+ u.hasValue = !0, u.value = g;
274
+ },
275
+ [g]
276
+ ), m(g), g;
277
+ }, Ie;
278
+ }
279
+ var Le = {};
280
+ var Ot;
281
+ function mr() {
282
+ return Ot || (Ot = 1, process.env.NODE_ENV !== "production" && (function() {
283
+ function e(f, l) {
284
+ return f === l && (f !== 0 || 1 / f === 1 / l) || f !== f && l !== l;
285
+ }
286
+ typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
287
+ var t = K, n = qt(), r = typeof Object.is == "function" ? Object.is : e, o = n.useSyncExternalStore, a = t.useRef, c = t.useEffect, s = t.useMemo, m = t.useDebugValue;
288
+ Le.useSyncExternalStoreWithSelector = function(f, l, d, h, p) {
289
+ var y = a(null);
290
+ if (y.current === null) {
291
+ var u = { hasValue: !1, value: null };
292
+ y.current = u;
293
+ } else u = y.current;
294
+ y = s(
295
+ function() {
296
+ function w(C) {
297
+ if (!R) {
298
+ if (R = !0, b = C, C = h(C), p !== void 0 && u.hasValue) {
299
+ var _ = u.value;
300
+ if (p(_, C))
301
+ return E = _;
302
+ }
303
+ return E = C;
304
+ }
305
+ if (_ = E, r(b, C))
306
+ return _;
307
+ var T = h(C);
308
+ return p !== void 0 && p(_, T) ? (b = C, _) : (b = C, E = T);
309
+ }
310
+ var R = !1, b, E, S = d === void 0 ? null : d;
311
+ return [
312
+ function() {
313
+ return w(l());
314
+ },
315
+ S === null ? void 0 : function() {
316
+ return w(S());
317
+ }
318
+ ];
319
+ },
320
+ [l, d, h, p]
321
+ );
322
+ var g = o(f, y[0], y[1]);
323
+ return c(
324
+ function() {
325
+ u.hasValue = !0, u.value = g;
326
+ },
327
+ [g]
328
+ ), m(g), g;
329
+ }, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
330
+ })()), Le;
331
+ }
332
+ var Nt;
333
+ function pr() {
334
+ return Nt || (Nt = 1, process.env.NODE_ENV === "production" ? fe.exports = vr() : fe.exports = mr()), fe.exports;
335
+ }
336
+ var hr = pr();
337
+ function gr(e, t = (r) => r, n = {}) {
338
+ const r = n.equal ?? yr;
339
+ return hr.useSyncExternalStoreWithSelector(
340
+ e.subscribe,
341
+ () => e.state,
342
+ () => e.state,
343
+ t,
344
+ r
345
+ );
346
+ }
347
+ function yr(e, t) {
348
+ if (Object.is(e, t))
349
+ return !0;
350
+ if (typeof e != "object" || e === null || typeof t != "object" || t === null)
351
+ return !1;
352
+ if (e instanceof Map && t instanceof Map) {
353
+ if (e.size !== t.size) return !1;
354
+ for (const [r, o] of e)
355
+ if (!t.has(r) || !Object.is(o, t.get(r))) return !1;
356
+ return !0;
357
+ }
358
+ if (e instanceof Set && t instanceof Set) {
359
+ if (e.size !== t.size) return !1;
360
+ for (const r of e)
361
+ if (!t.has(r)) return !1;
362
+ return !0;
363
+ }
364
+ if (e instanceof Date && t instanceof Date)
365
+ return e.getTime() === t.getTime();
366
+ const n = Tt(e);
367
+ if (n.length !== Tt(t).length)
368
+ return !1;
369
+ for (let r = 0; r < n.length; r++)
370
+ if (!Object.prototype.hasOwnProperty.call(t, n[r]) || !Object.is(e[n[r]], t[n[r]]))
371
+ return !1;
372
+ return !0;
373
+ }
374
+ function Tt(e) {
375
+ return Object.keys(e).concat(
376
+ Object.getOwnPropertySymbols(e)
377
+ );
378
+ }
379
+ const ke = i.createContext(null);
380
+ function Er() {
381
+ return typeof document > "u" ? ke : window.__TSR_ROUTER_CONTEXT__ ? window.__TSR_ROUTER_CONTEXT__ : (window.__TSR_ROUTER_CONTEXT__ = ke, ke);
382
+ }
383
+ function Xt(e) {
384
+ const t = i.useContext(Er());
385
+ return lr(
386
+ !((e?.warn ?? !0) && !t),
387
+ "useRouter must be used inside a <RouterProvider> component!"
388
+ ), t;
389
+ }
390
+ function xt(e) {
391
+ const t = Xt({
392
+ warn: e?.router === void 0
393
+ }), n = e?.router || t, r = Jn(void 0);
394
+ return gr(n.__store, (o) => {
395
+ if (e?.select) {
396
+ if (e.structuralSharing ?? n.options.defaultStructuralSharing) {
397
+ const a = Yt(
398
+ r.current,
399
+ e.select(o)
400
+ );
401
+ return r.current = a, a;
402
+ }
403
+ return e.select(o);
404
+ }
405
+ return o;
406
+ });
407
+ }
408
+ function br(e, t, n = {}, r = {}) {
409
+ i.useEffect(() => {
410
+ if (!e.current || r.disabled || typeof IntersectionObserver != "function")
411
+ return;
412
+ const o = new IntersectionObserver(([a]) => {
413
+ t(a);
414
+ }, n);
415
+ return o.observe(e.current), () => {
416
+ o.disconnect();
417
+ };
418
+ }, [t, n, r.disabled, e]);
419
+ }
420
+ function wr(e) {
421
+ const t = i.useRef(null);
422
+ return i.useImperativeHandle(e, () => t.current, []), t;
423
+ }
424
+ function Cr(e, t) {
425
+ const n = Xt(), [r, o] = i.useState(!1), a = i.useRef(!1), c = wr(t), {
426
+ // custom props
427
+ activeProps: s,
428
+ inactiveProps: m,
429
+ activeOptions: f,
430
+ to: l,
431
+ preload: d,
432
+ preloadDelay: h,
433
+ hashScrollIntoView: p,
434
+ replace: y,
435
+ startTransition: u,
436
+ resetScroll: g,
437
+ viewTransition: w,
438
+ // element props
439
+ children: R,
440
+ target: b,
441
+ disabled: E,
442
+ style: S,
443
+ className: C,
444
+ onClick: _,
445
+ onFocus: T,
446
+ onMouseEnter: O,
447
+ onMouseLeave: P,
448
+ onTouchStart: L,
449
+ ignoreBlocker: se,
450
+ // prevent these from being returned
451
+ params: Ya,
452
+ search: qa,
453
+ hash: Xa,
454
+ state: Za,
455
+ mask: Qa,
456
+ reloadDocument: Ja,
457
+ unsafeRelative: ei,
458
+ from: ti,
459
+ _fromLocation: ni,
460
+ ...ft
461
+ } = e, $n = xt({
462
+ select: (N) => N.location.search,
463
+ structuralSharing: !0
464
+ }), vt = e.from, ne = i.useMemo(
465
+ () => ({ ...e, from: vt }),
466
+ // eslint-disable-next-line react-hooks/exhaustive-deps
467
+ [
468
+ n,
469
+ $n,
470
+ vt,
471
+ e._fromLocation,
472
+ e.hash,
473
+ e.to,
474
+ e.search,
475
+ e.params,
476
+ e.state,
477
+ e.mask,
478
+ e.unsafeRelative
479
+ ]
480
+ ), B = i.useMemo(
481
+ () => n.buildLocation({ ...ne }),
482
+ [n, ne]
483
+ ), ce = i.useMemo(() => {
484
+ if (E)
485
+ return;
486
+ let N = B.maskedLocation ? B.maskedLocation.url.href : B.url.href, I = !1;
487
+ return n.origin && (N.startsWith(n.origin) ? N = n.history.createHref(N.replace(n.origin, "")) || "/" : I = !0), { href: N, external: I };
488
+ }, [E, B.maskedLocation, B.url, n.origin, n.history]), ue = i.useMemo(() => {
489
+ if (ce?.external)
490
+ return ce.href;
491
+ try {
492
+ return new URL(l), l;
493
+ } catch {
494
+ }
495
+ }, [l, ce]), X = e.reloadDocument || ue ? !1 : d ?? n.options.defaultPreload, Me = h ?? n.options.defaultPreloadDelay ?? 0, Pe = xt({
496
+ select: (N) => {
497
+ if (ue) return !1;
498
+ if (f?.exact) {
499
+ if (!sr(
500
+ N.location.pathname,
501
+ B.pathname,
502
+ n.basepath
503
+ ))
504
+ return !1;
505
+ } else {
506
+ const I = _e(
507
+ N.location.pathname,
508
+ n.basepath
509
+ ), W = _e(
510
+ B.pathname,
511
+ n.basepath
512
+ );
513
+ if (!(I.startsWith(W) && (I.length === W.length || I[W.length] === "/")))
514
+ return !1;
515
+ }
516
+ return (f?.includeSearch ?? !0) && !Ee(N.location.search, B.search, {
517
+ partial: !f?.exact,
518
+ ignoreUndefined: !f?.explicitUndefined
519
+ }) ? !1 : f?.includeHash ? N.location.hash === B.hash : !0;
520
+ }
521
+ }), j = i.useCallback(() => {
522
+ n.preloadRoute({ ...ne }).catch((N) => {
523
+ console.warn(N), console.warn(cr);
524
+ });
525
+ }, [n, ne]), Gn = i.useCallback(
526
+ (N) => {
527
+ N?.isIntersecting && j();
528
+ },
529
+ [j]
530
+ );
531
+ br(
532
+ c,
533
+ Gn,
534
+ Nr,
535
+ { disabled: !!E || X !== "viewport" }
536
+ ), i.useEffect(() => {
537
+ a.current || !E && X === "render" && (j(), a.current = !0);
538
+ }, [E, j, X]);
539
+ const Hn = (N) => {
540
+ const I = N.currentTarget.getAttribute("target"), W = b !== void 0 ? b : I;
541
+ if (!E && !Tr(N) && !N.defaultPrevented && (!W || W === "_self") && N.button === 0) {
542
+ N.preventDefault(), nr(() => {
543
+ o(!0);
544
+ });
545
+ const gt = n.subscribe("onResolved", () => {
546
+ gt(), o(!1);
547
+ });
548
+ n.navigate({
549
+ ...ne,
550
+ replace: y,
551
+ resetScroll: g,
552
+ hashScrollIntoView: p,
553
+ startTransition: u,
554
+ viewTransition: w,
555
+ ignoreBlocker: se
556
+ });
557
+ }
558
+ };
559
+ if (ue)
560
+ return {
561
+ ...ft,
562
+ ref: c,
563
+ href: ue,
564
+ ...R && { children: R },
565
+ ...b && { target: b },
566
+ ...E && { disabled: E },
567
+ ...S && { style: S },
568
+ ...C && { className: C },
569
+ ..._ && { onClick: _ },
570
+ ...T && { onFocus: T },
571
+ ...O && { onMouseEnter: O },
572
+ ...P && { onMouseLeave: P },
573
+ ...L && { onTouchStart: L }
574
+ };
575
+ const mt = (N) => {
576
+ E || X && j();
577
+ }, jn = mt, Yn = (N) => {
578
+ if (!(E || !X))
579
+ if (!Me)
580
+ j();
581
+ else {
582
+ const I = N.target;
583
+ if (re.has(I))
584
+ return;
585
+ const W = setTimeout(() => {
586
+ re.delete(I), j();
587
+ }, Me);
588
+ re.set(I, W);
589
+ }
590
+ }, qn = (N) => {
591
+ if (E || !X || !Me) return;
592
+ const I = N.target, W = re.get(I);
593
+ W && (clearTimeout(W), re.delete(I));
594
+ }, le = Pe ? yt(s, {}) ?? Sr : Fe, de = Pe ? Fe : yt(m, {}) ?? Fe, pt = [
595
+ C,
596
+ le.className,
597
+ de.className
598
+ ].filter(Boolean).join(" "), ht = (S || le.style || de.style) && {
599
+ ...S,
600
+ ...le.style,
601
+ ...de.style
602
+ };
603
+ return {
604
+ ...ft,
605
+ ...le,
606
+ ...de,
607
+ href: ce?.href,
608
+ ref: c,
609
+ onClick: oe([_, Hn]),
610
+ onFocus: oe([T, mt]),
611
+ onMouseEnter: oe([O, Yn]),
612
+ onMouseLeave: oe([P, qn]),
613
+ onTouchStart: oe([L, jn]),
614
+ disabled: !!E,
615
+ target: b,
616
+ ...ht && { style: ht },
617
+ ...pt && { className: pt },
618
+ ...E && Rr,
619
+ ...Pe && _r,
620
+ ...r && Or
621
+ };
622
+ }
623
+ const Fe = {}, Sr = { className: "active" }, Rr = { role: "link", "aria-disabled": !0 }, _r = { "data-status": "active", "aria-current": "page" }, Or = { "data-transitioning": "transitioning" }, re = /* @__PURE__ */ new WeakMap(), Nr = {
624
+ rootMargin: "100px"
625
+ }, oe = (e) => (t) => {
626
+ for (const n of e)
627
+ if (n) {
628
+ if (t.defaultPrevented) return;
629
+ n(t);
630
+ }
631
+ }, Mt = i.forwardRef(
632
+ (e, t) => {
633
+ const { _asChild: n, ...r } = e, {
634
+ type: o,
635
+ ref: a,
636
+ ...c
637
+ } = Cr(r, t), s = typeof r.children == "function" ? r.children({
638
+ isActive: c["data-status"] === "active"
639
+ }) : r.children;
640
+ return n === void 0 && delete c.disabled, i.createElement(
641
+ n || "a",
642
+ {
643
+ ...c,
644
+ ref: a
645
+ },
646
+ s
647
+ );
648
+ }
649
+ );
650
+ function Tr(e) {
651
+ return !!(e.metaKey || e.altKey || e.ctrlKey || e.shiftKey);
652
+ }
653
+ const xr = Ht(
15
654
  "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",
16
655
  {
17
656
  variants: {
@@ -38,96 +677,96 @@ const nn = et(
38
677
  }
39
678
  }
40
679
  );
41
- function nt({
680
+ function Je({
42
681
  className: e,
43
682
  variant: t = "default",
44
683
  size: n = "default",
45
- asChild: o = !1,
46
- ...r
684
+ asChild: r = !1,
685
+ ...o
47
686
  }) {
48
- return /* @__PURE__ */ u(
49
- o ? Zt : "button",
687
+ return /* @__PURE__ */ v(
688
+ r ? Qn : "button",
50
689
  {
51
690
  "data-slot": "button",
52
691
  "data-variant": t,
53
692
  "data-size": n,
54
- className: k(nn({ variant: t, size: n, className: e })),
55
- ...r
693
+ className: F(xr({ variant: t, size: n, className: e })),
694
+ ...o
56
695
  }
57
696
  );
58
697
  }
59
- const Ir = ({
698
+ const di = ({
60
699
  children: e,
61
700
  className: t,
62
701
  variant: n,
63
- size: o,
64
- ...r
65
- }) => /* @__PURE__ */ u(Z, { children: /* @__PURE__ */ u(
66
- nt,
702
+ size: r,
703
+ ...o
704
+ }) => /* @__PURE__ */ v(ie, { children: /* @__PURE__ */ v(
705
+ Je,
67
706
  {
68
- className: k(t),
707
+ className: F(t),
69
708
  variant: n,
70
- size: o,
71
- ...r,
709
+ size: r,
710
+ ...o,
72
711
  children: e
73
712
  }
74
713
  ) });
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 });
714
+ function Mr(e, t) {
715
+ const n = i.createContext(t), r = (a) => {
716
+ const { children: c, ...s } = a, m = i.useMemo(() => s, Object.values(s));
717
+ return /* @__PURE__ */ v(n.Provider, { value: m, children: c });
79
718
  };
80
- o.displayName = e + "Provider";
81
- function r(a) {
719
+ r.displayName = e + "Provider";
720
+ function o(a) {
82
721
  const c = i.useContext(n);
83
722
  if (c) return c;
84
723
  if (t !== void 0) return t;
85
724
  throw new Error(`\`${a}\` must be used within \`${e}\``);
86
725
  }
87
- return [o, r];
726
+ return [r, o];
88
727
  }
89
- function Me(e, t = []) {
728
+ function et(e, t = []) {
90
729
  let n = [];
91
- function o(a, c) {
92
- const s = i.createContext(c), f = n.length;
730
+ function r(a, c) {
731
+ const s = i.createContext(c), m = n.length;
93
732
  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 });
733
+ const f = (d) => {
734
+ const { scope: h, children: p, ...y } = d, u = h?.[e]?.[m] || s, g = i.useMemo(() => y, Object.values(y));
735
+ return /* @__PURE__ */ v(u.Provider, { value: g, children: p });
97
736
  };
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;
737
+ f.displayName = a + "Provider";
738
+ function l(d, h) {
739
+ const p = h?.[e]?.[m] || s, y = i.useContext(p);
740
+ if (y) return y;
102
741
  if (c !== void 0) return c;
103
- throw new Error(`\`${m}\` must be used within \`${a}\``);
742
+ throw new Error(`\`${d}\` must be used within \`${a}\``);
104
743
  }
105
- return [v, l];
744
+ return [f, l];
106
745
  }
107
- const r = () => {
746
+ const o = () => {
108
747
  const a = n.map((c) => i.createContext(c));
109
748
  return function(s) {
110
- const f = s?.[e] || a;
749
+ const m = s?.[e] || a;
111
750
  return i.useMemo(
112
- () => ({ [`__scope${e}`]: { ...s, [e]: f } }),
113
- [s, f]
751
+ () => ({ [`__scope${e}`]: { ...s, [e]: m } }),
752
+ [s, m]
114
753
  );
115
754
  };
116
755
  };
117
- return r.scopeName = e, [o, rn(r, ...t)];
756
+ return o.scopeName = e, [r, Pr(o, ...t)];
118
757
  }
119
- function rn(...e) {
758
+ function Pr(...e) {
120
759
  const t = e[0];
121
760
  if (e.length === 1) return t;
122
761
  const n = () => {
123
- const o = e.map((r) => ({
124
- useScope: r(),
125
- scopeName: r.scopeName
762
+ const r = e.map((o) => ({
763
+ useScope: o(),
764
+ scopeName: o.scopeName
126
765
  }));
127
766
  return function(a) {
128
- const c = o.reduce((s, { useScope: f, scopeName: v }) => {
129
- const m = f(a)[`__scope${v}`];
130
- return { ...s, ...m };
767
+ const c = r.reduce((s, { useScope: m, scopeName: f }) => {
768
+ const d = m(a)[`__scope${f}`];
769
+ return { ...s, ...d };
131
770
  }, {});
132
771
  return i.useMemo(() => ({ [`__scope${t.scopeName}`]: c }), [c]);
133
772
  };
@@ -135,12 +774,12 @@ function rn(...e) {
135
774
  return n.scopeName = t.scopeName, n;
136
775
  }
137
776
  function x(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
138
- return function(r) {
139
- if (e?.(r), n === !1 || !r.defaultPrevented)
140
- return t?.(r);
777
+ return function(o) {
778
+ if (e?.(o), n === !1 || !o.defaultPrevented)
779
+ return t?.(o);
141
780
  };
142
781
  }
143
- var an = [
782
+ var Ir = [
144
783
  "a",
145
784
  "button",
146
785
  "div",
@@ -158,103 +797,103 @@ var an = [
158
797
  "span",
159
798
  "svg",
160
799
  "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 });
800
+ ], M = Ir.reduce((e, t) => {
801
+ const n = Se(`Primitive.${t}`), r = i.forwardRef((o, a) => {
802
+ const { asChild: c, ...s } = o, m = c ? n : t;
803
+ return typeof window < "u" && (window[/* @__PURE__ */ Symbol.for("radix-ui")] = !0), /* @__PURE__ */ v(m, { ...s, ref: a });
165
804
  });
166
- return o.displayName = `Primitive.${t}`, { ...e, [t]: o };
805
+ return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
167
806
  }, {});
168
- function ye(e, t) {
169
- e && Jt.flushSync(() => e.dispatchEvent(t));
807
+ function Ge(e, t) {
808
+ e && tr.flushSync(() => e.dispatchEvent(t));
170
809
  }
171
- var K = globalThis?.document ? i.useLayoutEffect : () => {
172
- }, sn = i[" useInsertionEffect ".trim().toString()] || K;
173
- function xe({
810
+ var G = globalThis?.document ? i.useLayoutEffect : () => {
811
+ }, Dr = i[" useInsertionEffect ".trim().toString()] || G;
812
+ function tt({
174
813
  prop: e,
175
814
  defaultProp: t,
176
815
  onChange: n = () => {
177
816
  },
178
- caller: o
817
+ caller: r
179
818
  }) {
180
- const [r, a, c] = cn({
819
+ const [o, a, c] = Ar({
181
820
  defaultProp: t,
182
821
  onChange: n
183
- }), s = e !== void 0, f = s ? e : r;
822
+ }), s = e !== void 0, m = s ? e : o;
184
823
  {
185
824
  const l = i.useRef(e !== void 0);
186
825
  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.`
826
+ const d = l.current;
827
+ d !== s && console.warn(
828
+ `${r} is changing from ${d ? "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
829
  ), l.current = s;
191
- }, [s, o]);
830
+ }, [s, r]);
192
831
  }
193
- const v = i.useCallback(
832
+ const f = i.useCallback(
194
833
  (l) => {
195
834
  if (s) {
196
- const m = un(l) ? l(e) : l;
197
- m !== e && c.current?.(m);
835
+ const d = Lr(l) ? l(e) : l;
836
+ d !== e && c.current?.(d);
198
837
  } else
199
838
  a(l);
200
839
  },
201
840
  [s, e, a, c]
202
841
  );
203
- return [f, v];
842
+ return [m, f];
204
843
  }
205
- function cn({
844
+ function Ar({
206
845
  defaultProp: e,
207
846
  onChange: t
208
847
  }) {
209
- const [n, o] = i.useState(e), r = i.useRef(n), a = i.useRef(t);
210
- return sn(() => {
848
+ const [n, r] = i.useState(e), o = i.useRef(n), a = i.useRef(t);
849
+ return Dr(() => {
211
850
  a.current = t;
212
851
  }, [t]), i.useEffect(() => {
213
- r.current !== n && (a.current?.(n), r.current = n);
214
- }, [n, r]), [n, o, a];
852
+ o.current !== n && (a.current?.(n), o.current = n);
853
+ }, [n, o]), [n, r, a];
215
854
  }
216
- function un(e) {
855
+ function Lr(e) {
217
856
  return typeof e == "function";
218
857
  }
219
- function Ve(e, t) {
858
+ function Pt(e, t) {
220
859
  if (typeof e == "function")
221
860
  return e(t);
222
861
  e != null && (e.current = t);
223
862
  }
224
- function ot(...e) {
863
+ function Zt(...e) {
225
864
  return (t) => {
226
865
  let n = !1;
227
- const o = e.map((r) => {
228
- const a = Ve(r, t);
866
+ const r = e.map((o) => {
867
+ const a = Pt(o, t);
229
868
  return !n && typeof a == "function" && (n = !0), a;
230
869
  });
231
870
  if (n)
232
871
  return () => {
233
- for (let r = 0; r < o.length; r++) {
234
- const a = o[r];
235
- typeof a == "function" ? a() : Ve(e[r], null);
872
+ for (let o = 0; o < r.length; o++) {
873
+ const a = r[o];
874
+ typeof a == "function" ? a() : Pt(e[o], null);
236
875
  }
237
876
  };
238
877
  };
239
878
  }
240
- function O(...e) {
241
- return i.useCallback(ot(...e), e);
879
+ function A(...e) {
880
+ return i.useCallback(Zt(...e), e);
242
881
  }
243
- var ln = i.createContext(void 0);
244
- function dn(e) {
245
- const t = i.useContext(ln);
882
+ var kr = i.createContext(void 0);
883
+ function Fr(e) {
884
+ const t = i.useContext(kr);
246
885
  return e || t || "ltr";
247
886
  }
248
- function fn(e, t) {
249
- return i.useReducer((n, o) => t[n][o] ?? n, e);
887
+ function Vr(e, t) {
888
+ return i.useReducer((n, r) => t[n][r] ?? n, e);
250
889
  }
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;
890
+ var H = (e) => {
891
+ const { present: t, children: n } = e, r = Wr(t), o = typeof n == "function" ? n({ present: r.isPresent }) : i.Children.only(n), a = A(r.ref, Kr(o));
892
+ return typeof n == "function" || r.isPresent ? i.cloneElement(o, { ref: a }) : null;
254
893
  };
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, {
894
+ H.displayName = "Presence";
895
+ function Wr(e) {
896
+ const [t, n] = i.useState(), r = i.useRef(null), o = i.useRef(e), a = i.useRef("none"), c = e ? "mounted" : "unmounted", [s, m] = Vr(c, {
258
897
  mounted: {
259
898
  UNMOUNT: "unmounted",
260
899
  ANIMATION_OUT: "unmountSuspended"
@@ -268,233 +907,233 @@ function vn(e) {
268
907
  }
269
908
  });
270
909
  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;
910
+ const f = me(r.current);
911
+ a.current = s === "mounted" ? f : "none";
912
+ }, [s]), G(() => {
913
+ const f = r.current, l = o.current;
275
914
  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;
915
+ const h = a.current, p = me(f);
916
+ e ? m("MOUNT") : p === "none" || f?.display === "none" ? m("UNMOUNT") : m(l && h !== p ? "ANIMATION_OUT" : "UNMOUNT"), o.current = e;
278
917
  }
279
- }, [e, f]), K(() => {
918
+ }, [e, m]), G(() => {
280
919
  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)) {
920
+ let f;
921
+ const l = t.ownerDocument.defaultView ?? window, d = (p) => {
922
+ const u = me(r.current).includes(CSS.escape(p.animationName));
923
+ if (p.target === t && u && (m("ANIMATION_END"), !o.current)) {
285
924
  const g = t.style.animationFillMode;
286
- t.style.animationFillMode = "forwards", v = l.setTimeout(() => {
925
+ t.style.animationFillMode = "forwards", f = l.setTimeout(() => {
287
926
  t.style.animationFillMode === "forwards" && (t.style.animationFillMode = g);
288
927
  });
289
928
  }
290
- }, p = (y) => {
291
- y.target === t && (a.current = Q(o.current));
929
+ }, h = (p) => {
930
+ p.target === t && (a.current = me(r.current));
292
931
  };
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);
932
+ return t.addEventListener("animationstart", h), t.addEventListener("animationcancel", d), t.addEventListener("animationend", d), () => {
933
+ l.clearTimeout(f), t.removeEventListener("animationstart", h), t.removeEventListener("animationcancel", d), t.removeEventListener("animationend", d);
295
934
  };
296
935
  } else
297
- f("ANIMATION_END");
298
- }, [t, f]), {
936
+ m("ANIMATION_END");
937
+ }, [t, m]), {
299
938
  isPresent: ["mounted", "unmountSuspended"].includes(s),
300
- ref: i.useCallback((v) => {
301
- o.current = v ? getComputedStyle(v) : null, n(v);
939
+ ref: i.useCallback((f) => {
940
+ r.current = f ? getComputedStyle(f) : null, n(f);
302
941
  }, [])
303
942
  };
304
943
  }
305
- function Q(e) {
944
+ function me(e) {
306
945
  return e?.animationName || "none";
307
946
  }
308
- function mn(e) {
947
+ function Kr(e) {
309
948
  let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
310
949
  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
950
  }
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++));
951
+ var Ur = i[" useId ".trim().toString()] || (() => {
952
+ }), zr = 0;
953
+ function ae(e) {
954
+ const [t, n] = i.useState(Ur());
955
+ return G(() => {
956
+ n((r) => r ?? String(zr++));
318
957
  }, [e]), t ? `radix-${t}` : "";
319
958
  }
320
- function rt(e) {
321
- const t = e + "CollectionProvider", [n, o] = Me(t), [r, a] = n(
959
+ function Qt(e) {
960
+ const t = e + "CollectionProvider", [n, r] = et(t), [o, a] = n(
322
961
  t,
323
962
  { 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 });
963
+ ), c = (u) => {
964
+ const { scope: g, children: w } = u, R = K.useRef(null), b = K.useRef(/* @__PURE__ */ new Map()).current;
965
+ return /* @__PURE__ */ v(o, { scope: g, itemMap: b, collectionRef: R, children: w });
327
966
  };
328
967
  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 });
968
+ const s = e + "CollectionSlot", m = Se(s), f = K.forwardRef(
969
+ (u, g) => {
970
+ const { scope: w, children: R } = u, b = a(s, w), E = A(g, b.collectionRef);
971
+ return /* @__PURE__ */ v(m, { ref: E, children: R });
333
972
  }
334
973
  );
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 });
974
+ f.displayName = s;
975
+ const l = e + "CollectionItemSlot", d = "data-radix-collection-item", h = Se(l), p = K.forwardRef(
976
+ (u, g) => {
977
+ const { scope: w, children: R, ...b } = u, E = K.useRef(null), S = A(g, E), C = a(l, w);
978
+ return K.useEffect(() => (C.itemMap.set(E, { ref: E, ...b }), () => {
979
+ C.itemMap.delete(E);
980
+ })), /* @__PURE__ */ v(h, { [d]: "", ref: S, children: R });
342
981
  }
343
982
  );
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}]`));
983
+ p.displayName = l;
984
+ function y(u) {
985
+ const g = a(e + "CollectionConsumer", u);
986
+ return K.useCallback(() => {
987
+ const R = g.collectionRef.current;
988
+ if (!R) return [];
989
+ const b = Array.from(R.querySelectorAll(`[${d}]`));
351
990
  return Array.from(g.itemMap.values()).sort(
352
- (R, S) => h.indexOf(R.ref.current) - h.indexOf(S.ref.current)
991
+ (C, _) => b.indexOf(C.ref.current) - b.indexOf(_.ref.current)
353
992
  );
354
993
  }, [g.collectionRef, g.itemMap]);
355
994
  }
356
995
  return [
357
- { Provider: c, Slot: v, ItemSlot: y },
358
- C,
359
- o
996
+ { Provider: c, Slot: f, ItemSlot: p },
997
+ y,
998
+ r
360
999
  ];
361
1000
  }
362
- function D(e) {
1001
+ function k(e) {
363
1002
  const t = i.useRef(e);
364
1003
  return i.useEffect(() => {
365
1004
  t.current = e;
366
1005
  }), i.useMemo(() => (...n) => t.current?.(...n), []);
367
1006
  }
368
- function hn(e, t = globalThis?.document) {
369
- const n = D(e);
1007
+ function Br(e, t = globalThis?.document) {
1008
+ const n = k(e);
370
1009
  i.useEffect(() => {
371
- const o = (r) => {
372
- r.key === "Escape" && n(r);
1010
+ const r = (o) => {
1011
+ o.key === "Escape" && n(o);
373
1012
  };
374
- return t.addEventListener("keydown", o, { capture: !0 }), () => t.removeEventListener("keydown", o, { capture: !0 });
1013
+ return t.addEventListener("keydown", r, { capture: !0 }), () => t.removeEventListener("keydown", r, { capture: !0 });
375
1014
  }, [n, t]);
376
1015
  }
377
- var yn = "DismissableLayer", be = "dismissableLayer.update", bn = "dismissableLayer.pointerDownOutside", En = "dismissableLayer.focusOutside", Ke, at = i.createContext({
1016
+ var $r = "DismissableLayer", He = "dismissableLayer.update", Gr = "dismissableLayer.pointerDownOutside", Hr = "dismissableLayer.focusOutside", It, Jt = i.createContext({
378
1017
  layers: /* @__PURE__ */ new Set(),
379
1018
  layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
380
1019
  branches: /* @__PURE__ */ new Set()
381
- }), Pe = i.forwardRef(
1020
+ }), nt = i.forwardRef(
382
1021
  (e, t) => {
383
1022
  const {
384
1023
  disableOutsidePointerEvents: n = !1,
385
- onEscapeKeyDown: o,
386
- onPointerDownOutside: r,
1024
+ onEscapeKeyDown: r,
1025
+ onPointerDownOutside: o,
387
1026
  onFocusOutside: a,
388
1027
  onInteractOutside: c,
389
1028
  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(() => {
1029
+ ...m
1030
+ } = e, f = i.useContext(Jt), [l, d] = i.useState(null), h = l?.ownerDocument ?? globalThis?.document, [, p] = i.useState({}), y = A(t, (_) => d(_)), u = Array.from(f.layers), [g] = [...f.layersWithOutsidePointerEventsDisabled].slice(-1), w = u.indexOf(g), R = l ? u.indexOf(l) : -1, b = f.layersWithOutsidePointerEventsDisabled.size > 0, E = R >= w, S = qr((_) => {
1031
+ const T = _.target, O = [...f.branches].some((P) => P.contains(T));
1032
+ !E || O || (o?.(_), c?.(_), _.defaultPrevented || s?.());
1033
+ }, h), C = Xr((_) => {
1034
+ const T = _.target;
1035
+ [...f.branches].some((P) => P.contains(T)) || (a?.(_), c?.(_), _.defaultPrevented || s?.());
1036
+ }, h);
1037
+ return Br((_) => {
1038
+ R === f.layers.size - 1 && (r?.(_), !_.defaultPrevented && s && (_.preventDefault(), s()));
1039
+ }, h), i.useEffect(() => {
401
1040
  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);
1041
+ return n && (f.layersWithOutsidePointerEventsDisabled.size === 0 && (It = h.body.style.pointerEvents, h.body.style.pointerEvents = "none"), f.layersWithOutsidePointerEventsDisabled.add(l)), f.layers.add(l), Dt(), () => {
1042
+ n && f.layersWithOutsidePointerEventsDisabled.size === 1 && (h.body.style.pointerEvents = It);
404
1043
  };
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,
1044
+ }, [l, h, n, f]), i.useEffect(() => () => {
1045
+ l && (f.layers.delete(l), f.layersWithOutsidePointerEventsDisabled.delete(l), Dt());
1046
+ }, [l, f]), i.useEffect(() => {
1047
+ const _ = () => p({});
1048
+ return document.addEventListener(He, _), () => document.removeEventListener(He, _);
1049
+ }, []), /* @__PURE__ */ v(
1050
+ M.div,
412
1051
  {
413
- ...f,
414
- ref: C,
1052
+ ...m,
1053
+ ref: y,
415
1054
  style: {
416
- pointerEvents: h ? b ? "auto" : "none" : void 0,
1055
+ pointerEvents: b ? E ? "auto" : "none" : void 0,
417
1056
  ...e.style
418
1057
  },
419
- onFocusCapture: x(e.onFocusCapture, R.onFocusCapture),
420
- onBlurCapture: x(e.onBlurCapture, R.onBlurCapture),
1058
+ onFocusCapture: x(e.onFocusCapture, C.onFocusCapture),
1059
+ onBlurCapture: x(e.onBlurCapture, C.onBlurCapture),
421
1060
  onPointerDownCapture: x(
422
1061
  e.onPointerDownCapture,
423
- w.onPointerDownCapture
1062
+ S.onPointerDownCapture
424
1063
  )
425
1064
  }
426
1065
  );
427
1066
  }
428
1067
  );
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);
1068
+ nt.displayName = $r;
1069
+ var jr = "DismissableLayerBranch", Yr = i.forwardRef((e, t) => {
1070
+ const n = i.useContext(Jt), r = i.useRef(null), o = A(t, r);
432
1071
  return i.useEffect(() => {
433
- const a = o.current;
1072
+ const a = r.current;
434
1073
  if (a)
435
1074
  return n.branches.add(a), () => {
436
1075
  n.branches.delete(a);
437
1076
  };
438
- }, [n.branches]), /* @__PURE__ */ u(P.div, { ...e, ref: r });
1077
+ }, [n.branches]), /* @__PURE__ */ v(M.div, { ...e, ref: o });
439
1078
  });
440
- Cn.displayName = wn;
441
- function Nn(e, t = globalThis?.document) {
442
- const n = D(e), o = i.useRef(!1), r = i.useRef(() => {
1079
+ Yr.displayName = jr;
1080
+ function qr(e, t = globalThis?.document) {
1081
+ const n = k(e), r = i.useRef(!1), o = i.useRef(() => {
443
1082
  });
444
1083
  return i.useEffect(() => {
445
1084
  const a = (s) => {
446
- if (s.target && !o.current) {
447
- let f = function() {
448
- it(
449
- bn,
1085
+ if (s.target && !r.current) {
1086
+ let m = function() {
1087
+ en(
1088
+ Gr,
450
1089
  n,
451
- v,
1090
+ f,
452
1091
  { discrete: !0 }
453
1092
  );
454
1093
  };
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();
1094
+ const f = { originalEvent: s };
1095
+ s.pointerType === "touch" ? (t.removeEventListener("click", o.current), o.current = m, t.addEventListener("click", o.current, { once: !0 })) : m();
457
1096
  } else
458
- t.removeEventListener("click", r.current);
459
- o.current = !1;
1097
+ t.removeEventListener("click", o.current);
1098
+ r.current = !1;
460
1099
  }, c = window.setTimeout(() => {
461
1100
  t.addEventListener("pointerdown", a);
462
1101
  }, 0);
463
1102
  return () => {
464
- window.clearTimeout(c), t.removeEventListener("pointerdown", a), t.removeEventListener("click", r.current);
1103
+ window.clearTimeout(c), t.removeEventListener("pointerdown", a), t.removeEventListener("click", o.current);
465
1104
  };
466
1105
  }, [t, n]), {
467
1106
  // ensures we check React component tree (not just DOM tree)
468
- onPointerDownCapture: () => o.current = !0
1107
+ onPointerDownCapture: () => r.current = !0
469
1108
  };
470
1109
  }
471
- function Rn(e, t = globalThis?.document) {
472
- const n = D(e), o = i.useRef(!1);
1110
+ function Xr(e, t = globalThis?.document) {
1111
+ const n = k(e), r = i.useRef(!1);
473
1112
  return i.useEffect(() => {
474
- const r = (a) => {
475
- a.target && !o.current && it(En, n, { originalEvent: a }, {
1113
+ const o = (a) => {
1114
+ a.target && !r.current && en(Hr, n, { originalEvent: a }, {
476
1115
  discrete: !1
477
1116
  });
478
1117
  };
479
- return t.addEventListener("focusin", r), () => t.removeEventListener("focusin", r);
1118
+ return t.addEventListener("focusin", o), () => t.removeEventListener("focusin", o);
480
1119
  }, [t, n]), {
481
- onFocusCapture: () => o.current = !0,
482
- onBlurCapture: () => o.current = !1
1120
+ onFocusCapture: () => r.current = !0,
1121
+ onBlurCapture: () => r.current = !1
483
1122
  };
484
1123
  }
485
- function Ue() {
486
- const e = new CustomEvent(be);
1124
+ function Dt() {
1125
+ const e = new CustomEvent(He);
487
1126
  document.dispatchEvent(e);
488
1127
  }
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);
1128
+ function en(e, t, n, { discrete: r }) {
1129
+ const o = n.originalEvent.target, a = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
1130
+ t && o.addEventListener(e, t, { once: !0 }), r ? Ge(o, a) : o.dispatchEvent(a);
492
1131
  }
493
- function Sn(e) {
1132
+ function Zr(e) {
494
1133
  const t = i.useRef({ value: e, previous: e });
495
1134
  return i.useMemo(() => (t.current.value !== e && (t.current.previous = t.current.value, t.current.value = e), t.current.previous), [e]);
496
1135
  }
497
- var Mn = Object.freeze({
1136
+ var Qr = Object.freeze({
498
1137
  // See: https://github.com/twbs/bootstrap/blob/main/scss/mixins/_visually-hidden.scss
499
1138
  position: "absolute",
500
1139
  border: 0,
@@ -506,295 +1145,295 @@ var Mn = Object.freeze({
506
1145
  clip: "rect(0, 0, 0, 0)",
507
1146
  whiteSpace: "nowrap",
508
1147
  wordWrap: "normal"
509
- }), xn = "VisuallyHidden", st = i.forwardRef(
510
- (e, t) => /* @__PURE__ */ u(
511
- P.span,
1148
+ }), Jr = "VisuallyHidden", tn = i.forwardRef(
1149
+ (e, t) => /* @__PURE__ */ v(
1150
+ M.span,
512
1151
  {
513
1152
  ...e,
514
1153
  ref: t,
515
- style: { ...Mn, ...e.style }
1154
+ style: { ...Qr, ...e.style }
516
1155
  }
517
1156
  )
518
1157
  );
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(
1158
+ tn.displayName = Jr;
1159
+ var eo = tn, q = "NavigationMenu", [rt, nn, to] = Qt(q), [je, no, ro] = Qt(q), [ot] = et(
1160
+ q,
1161
+ [to, ro]
1162
+ ), [oo, V] = ot(q), [ao, io] = ot(q), rn = i.forwardRef(
524
1163
  (e, t) => {
525
1164
  const {
526
1165
  __scopeNavigationMenu: n,
527
- value: o,
528
- onValueChange: r,
1166
+ value: r,
1167
+ onValueChange: o,
529
1168
  defaultValue: a,
530
1169
  delayDuration: c = 200,
531
1170
  skipDelayDuration: s = 300,
532
- orientation: f = "horizontal",
533
- dir: v,
1171
+ orientation: m = "horizontal",
1172
+ dir: f,
534
1173
  ...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),
1174
+ } = e, [d, h] = i.useState(null), p = A(t, (O) => h(O)), y = Fr(f), u = i.useRef(0), g = i.useRef(0), w = i.useRef(0), [R, b] = i.useState(!0), [E, S] = tt({
1175
+ prop: r,
1176
+ onChange: (O) => {
1177
+ const P = O !== "", L = s > 0;
1178
+ P ? (window.clearTimeout(w.current), L && b(!1)) : (window.clearTimeout(w.current), w.current = window.setTimeout(
1179
+ () => b(!0),
541
1180
  s
542
- )), r?.(M);
1181
+ )), o?.(O);
543
1182
  },
544
1183
  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);
1184
+ caller: q
1185
+ }), C = i.useCallback(() => {
1186
+ window.clearTimeout(g.current), g.current = window.setTimeout(() => S(""), 150);
1187
+ }, [S]), _ = i.useCallback(
1188
+ (O) => {
1189
+ window.clearTimeout(g.current), S(O);
551
1190
  },
552
- [w]
1191
+ [S]
553
1192
  ), T = i.useCallback(
554
- (M) => {
555
- b === M ? window.clearTimeout(g.current) : d.current = window.setTimeout(() => {
556
- window.clearTimeout(g.current), w(M);
1193
+ (O) => {
1194
+ E === O ? window.clearTimeout(g.current) : u.current = window.setTimeout(() => {
1195
+ window.clearTimeout(g.current), S(O);
557
1196
  }, c);
558
1197
  },
559
- [b, w, c]
1198
+ [E, S, c]
560
1199
  );
561
1200
  return i.useEffect(() => () => {
562
- window.clearTimeout(d.current), window.clearTimeout(g.current), window.clearTimeout(E.current);
563
- }, []), /* @__PURE__ */ u(
564
- lt,
1201
+ window.clearTimeout(u.current), window.clearTimeout(g.current), window.clearTimeout(w.current);
1202
+ }, []), /* @__PURE__ */ v(
1203
+ on,
565
1204
  {
566
1205
  scope: n,
567
1206
  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);
1207
+ value: E,
1208
+ dir: y,
1209
+ orientation: m,
1210
+ rootNavigationMenu: d,
1211
+ onTriggerEnter: (O) => {
1212
+ window.clearTimeout(u.current), R ? T(O) : _(O);
574
1213
  },
575
1214
  onTriggerLeave: () => {
576
- window.clearTimeout(d.current), R();
1215
+ window.clearTimeout(u.current), C();
577
1216
  },
578
1217
  onContentEnter: () => window.clearTimeout(g.current),
579
- onContentLeave: R,
580
- onItemSelect: (M) => {
581
- w((I) => I === M ? "" : M);
1218
+ onContentLeave: C,
1219
+ onItemSelect: (O) => {
1220
+ S((P) => P === O ? "" : O);
582
1221
  },
583
- onItemDismiss: () => w(""),
584
- children: /* @__PURE__ */ u(
585
- P.nav,
1222
+ onItemDismiss: () => S(""),
1223
+ children: /* @__PURE__ */ v(
1224
+ M.nav,
586
1225
  {
587
1226
  "aria-label": "Main",
588
- "data-orientation": f,
589
- dir: C,
1227
+ "data-orientation": m,
1228
+ dir: y,
590
1229
  ...l,
591
- ref: y
1230
+ ref: p
592
1231
  }
593
1232
  )
594
1233
  }
595
1234
  );
596
1235
  }
597
1236
  );
598
- ut.displayName = $;
599
- var we = "NavigationMenuSub", kn = i.forwardRef(
1237
+ rn.displayName = q;
1238
+ var Ye = "NavigationMenuSub", so = i.forwardRef(
600
1239
  (e, t) => {
601
1240
  const {
602
1241
  __scopeNavigationMenu: n,
603
- value: o,
604
- onValueChange: r,
1242
+ value: r,
1243
+ onValueChange: o,
605
1244
  defaultValue: a,
606
1245
  orientation: c = "horizontal",
607
1246
  ...s
608
- } = e, f = _(we, n), [v, l] = xe({
609
- prop: o,
610
- onChange: r,
1247
+ } = e, m = V(Ye, n), [f, l] = tt({
1248
+ prop: r,
1249
+ onChange: o,
611
1250
  defaultProp: a ?? "",
612
- caller: we
1251
+ caller: Ye
613
1252
  });
614
- return /* @__PURE__ */ u(
615
- lt,
1253
+ return /* @__PURE__ */ v(
1254
+ on,
616
1255
  {
617
1256
  scope: n,
618
1257
  isRootMenu: !1,
619
- value: v,
620
- dir: f.dir,
1258
+ value: f,
1259
+ dir: m.dir,
621
1260
  orientation: c,
622
- rootNavigationMenu: f.rootNavigationMenu,
623
- onTriggerEnter: (m) => l(m),
624
- onItemSelect: (m) => l(m),
1261
+ rootNavigationMenu: m.rootNavigationMenu,
1262
+ onTriggerEnter: (d) => l(d),
1263
+ onItemSelect: (d) => l(d),
625
1264
  onItemDismiss: () => l(""),
626
- children: /* @__PURE__ */ u(P.div, { "data-orientation": c, ...s, ref: t })
1265
+ children: /* @__PURE__ */ v(M.div, { "data-orientation": c, ...s, ref: t })
627
1266
  }
628
1267
  );
629
1268
  }
630
1269
  );
631
- kn.displayName = we;
632
- var lt = (e) => {
1270
+ so.displayName = Ye;
1271
+ var on = (e) => {
633
1272
  const {
634
1273
  scope: t,
635
1274
  isRootMenu: n,
636
- rootNavigationMenu: o,
637
- dir: r,
1275
+ rootNavigationMenu: r,
1276
+ dir: o,
638
1277
  orientation: a,
639
1278
  children: c,
640
1279
  value: s,
641
- onItemSelect: f,
642
- onItemDismiss: v,
1280
+ onItemSelect: m,
1281
+ onItemDismiss: f,
643
1282
  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,
1283
+ onTriggerLeave: d,
1284
+ onContentEnter: h,
1285
+ onContentLeave: p
1286
+ } = e, [y, u] = i.useState(null), [g, w] = i.useState(/* @__PURE__ */ new Map()), [R, b] = i.useState(null);
1287
+ return /* @__PURE__ */ v(
1288
+ oo,
650
1289
  {
651
1290
  scope: t,
652
1291
  isRootMenu: n,
653
- rootNavigationMenu: o,
1292
+ rootNavigationMenu: r,
654
1293
  value: s,
655
- previousValue: Sn(s),
656
- baseId: q(),
657
- dir: r,
1294
+ previousValue: Zr(s),
1295
+ baseId: ae(),
1296
+ dir: o,
658
1297
  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)));
1298
+ viewport: y,
1299
+ onViewportChange: u,
1300
+ indicatorTrack: R,
1301
+ onIndicatorTrackChange: b,
1302
+ onTriggerEnter: k(l),
1303
+ onTriggerLeave: k(d),
1304
+ onContentEnter: k(h),
1305
+ onContentLeave: k(p),
1306
+ onItemSelect: k(m),
1307
+ onItemDismiss: k(f),
1308
+ onViewportContentChange: i.useCallback((E, S) => {
1309
+ w((C) => (C.set(E, S), new Map(C)));
671
1310
  }, []),
672
- onViewportContentRemove: i.useCallback((b) => {
673
- E((w) => w.has(b) ? (w.delete(b), new Map(w)) : w);
1311
+ onViewportContentRemove: i.useCallback((E) => {
1312
+ w((S) => S.has(E) ? (S.delete(E), new Map(S)) : S);
674
1313
  }, []),
675
- children: /* @__PURE__ */ u(Te.Provider, { scope: t, children: /* @__PURE__ */ u(An, { scope: t, items: g, children: c }) })
1314
+ children: /* @__PURE__ */ v(rt.Provider, { scope: t, children: /* @__PURE__ */ v(ao, { scope: t, items: g, children: c }) })
676
1315
  }
677
1316
  );
678
- }, dt = "NavigationMenuList", ft = i.forwardRef(
1317
+ }, an = "NavigationMenuList", sn = i.forwardRef(
679
1318
  (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 }) });
1319
+ const { __scopeNavigationMenu: n, ...r } = e, o = V(an, n), a = /* @__PURE__ */ v(M.ul, { "data-orientation": o.orientation, ...r, ref: t });
1320
+ return /* @__PURE__ */ v(M.div, { style: { position: "relative" }, ref: o.onIndicatorTrackChange, children: /* @__PURE__ */ v(rt.Slot, { scope: n, children: o.isRootMenu ? /* @__PURE__ */ v(mn, { asChild: !0, children: a }) : a }) });
682
1321
  }
683
1322
  );
684
- ft.displayName = dt;
685
- var vt = "NavigationMenuItem", [Ln, mt] = Ie(vt), gt = i.forwardRef(
1323
+ sn.displayName = an;
1324
+ var cn = "NavigationMenuItem", [co, un] = ot(cn), ln = i.forwardRef(
686
1325
  (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") => {
1326
+ const { __scopeNavigationMenu: n, value: r, ...o } = e, a = ae(), c = r || a || "LEGACY_REACT_AUTO_VALUE", s = i.useRef(null), m = i.useRef(null), f = i.useRef(null), l = i.useRef(() => {
1327
+ }), d = i.useRef(!1), h = i.useCallback((y = "start") => {
689
1328
  if (s.current) {
690
1329
  l.current();
691
- const d = Ne(s.current);
692
- d.length && Ae(C === "start" ? d : d.reverse());
1330
+ const u = Xe(s.current);
1331
+ u.length && st(y === "start" ? u : u.reverse());
693
1332
  }
694
- }, []), y = i.useCallback(() => {
1333
+ }, []), p = i.useCallback(() => {
695
1334
  if (s.current) {
696
- const C = Ne(s.current);
697
- C.length && (l.current = Gn(C));
1335
+ const y = Xe(s.current);
1336
+ y.length && (l.current = Eo(y));
698
1337
  }
699
1338
  }, []);
700
- return /* @__PURE__ */ u(
701
- Ln,
1339
+ return /* @__PURE__ */ v(
1340
+ co,
702
1341
  {
703
1342
  scope: n,
704
1343
  value: c,
705
- triggerRef: f,
1344
+ triggerRef: m,
706
1345
  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 })
1346
+ focusProxyRef: f,
1347
+ wasEscapeCloseRef: d,
1348
+ onEntryKeyDown: h,
1349
+ onFocusProxyEnter: h,
1350
+ onRootContentClose: p,
1351
+ onContentFocusOutside: p,
1352
+ children: /* @__PURE__ */ v(M.li, { ...o, ref: t })
714
1353
  }
715
1354
  );
716
1355
  }
717
1356
  );
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,
1357
+ ln.displayName = cn;
1358
+ var qe = "NavigationMenuTrigger", uo = i.forwardRef((e, t) => {
1359
+ const { __scopeNavigationMenu: n, disabled: r, ...o } = e, a = V(qe, e.__scopeNavigationMenu), c = un(qe, e.__scopeNavigationMenu), s = i.useRef(null), m = A(s, c.triggerRef, t), f = hn(a.baseId, c.value), l = gn(a.baseId, c.value), d = i.useRef(!1), h = i.useRef(!1), p = c.value === a.value;
1360
+ return /* @__PURE__ */ D(ie, { children: [
1361
+ /* @__PURE__ */ v(rt.ItemSlot, { scope: n, value: c.value, children: /* @__PURE__ */ v(pn, { asChild: !0, children: /* @__PURE__ */ v(
1362
+ M.button,
724
1363
  {
725
- id: v,
726
- disabled: o,
727
- "data-disabled": o ? "" : void 0,
728
- "data-state": _e(y),
729
- "aria-expanded": y,
1364
+ id: f,
1365
+ disabled: r,
1366
+ "data-disabled": r ? "" : void 0,
1367
+ "data-state": ct(p),
1368
+ "aria-expanded": p,
730
1369
  "aria-controls": l,
731
- ...r,
732
- ref: f,
1370
+ ...o,
1371
+ ref: m,
733
1372
  onPointerEnter: x(e.onPointerEnter, () => {
734
- p.current = !1, c.wasEscapeCloseRef.current = !1;
1373
+ h.current = !1, c.wasEscapeCloseRef.current = !1;
735
1374
  }),
736
1375
  onPointerMove: x(
737
1376
  e.onPointerMove,
738
- se(() => {
739
- o || p.current || c.wasEscapeCloseRef.current || m.current || (a.onTriggerEnter(c.value), m.current = !0);
1377
+ Oe(() => {
1378
+ r || h.current || c.wasEscapeCloseRef.current || d.current || (a.onTriggerEnter(c.value), d.current = !0);
740
1379
  })
741
1380
  ),
742
1381
  onPointerLeave: x(
743
1382
  e.onPointerLeave,
744
- se(() => {
745
- o || (a.onTriggerLeave(), m.current = !1);
1383
+ Oe(() => {
1384
+ r || (a.onTriggerLeave(), d.current = !1);
746
1385
  })
747
1386
  ),
748
1387
  onClick: x(e.onClick, () => {
749
- a.onItemSelect(c.value), p.current = y;
1388
+ a.onItemSelect(c.value), h.current = p;
750
1389
  }),
751
- onKeyDown: x(e.onKeyDown, (C) => {
1390
+ onKeyDown: x(e.onKeyDown, (y) => {
752
1391
  const g = { horizontal: "ArrowDown", vertical: a.dir === "rtl" ? "ArrowLeft" : "ArrowRight" }[a.orientation];
753
- y && C.key === g && (c.onEntryKeyDown(), C.preventDefault());
1392
+ p && y.key === g && (c.onEntryKeyDown(), y.preventDefault());
754
1393
  })
755
1394
  }
756
1395
  ) }) }),
757
- y && /* @__PURE__ */ A(Z, { children: [
758
- /* @__PURE__ */ u(
759
- Pn,
1396
+ p && /* @__PURE__ */ D(ie, { children: [
1397
+ /* @__PURE__ */ v(
1398
+ eo,
760
1399
  {
761
1400
  "aria-hidden": !0,
762
1401
  tabIndex: 0,
763
1402
  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");
1403
+ onFocus: (y) => {
1404
+ const u = c.contentRef.current, g = y.relatedTarget, w = g === s.current, R = u?.contains(g);
1405
+ (w || !R) && c.onFocusProxyEnter(w ? "start" : "end");
767
1406
  }
768
1407
  }
769
1408
  ),
770
- a.viewport && /* @__PURE__ */ u("span", { "aria-owns": l })
1409
+ a.viewport && /* @__PURE__ */ v("span", { "aria-owns": l })
771
1410
  ] })
772
1411
  ] });
773
1412
  });
774
- Fn.displayName = Ce;
775
- var Wn = "NavigationMenuLink", Be = "navigationMenu.linkSelect", pt = i.forwardRef(
1413
+ uo.displayName = qe;
1414
+ var lo = "NavigationMenuLink", At = "navigationMenu.linkSelect", dn = i.forwardRef(
776
1415
  (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,
1416
+ const { __scopeNavigationMenu: n, active: r, onSelect: o, ...a } = e;
1417
+ return /* @__PURE__ */ v(pn, { asChild: !0, children: /* @__PURE__ */ v(
1418
+ M.a,
780
1419
  {
781
- "data-active": o ? "" : void 0,
782
- "aria-current": o ? "page" : void 0,
1420
+ "data-active": r ? "" : void 0,
1421
+ "aria-current": r ? "page" : void 0,
783
1422
  ...a,
784
1423
  ref: t,
785
1424
  onClick: x(
786
1425
  e.onClick,
787
1426
  (c) => {
788
- const s = c.target, f = new CustomEvent(Be, {
1427
+ const s = c.target, m = new CustomEvent(At, {
789
1428
  bubbles: !0,
790
1429
  cancelable: !0
791
1430
  });
792
- if (s.addEventListener(Be, (v) => r?.(v), { once: !0 }), ye(s, f), !f.defaultPrevented && !c.metaKey) {
793
- const v = new CustomEvent(oe, {
1431
+ if (s.addEventListener(At, (f) => o?.(f), { once: !0 }), Ge(s, m), !m.defaultPrevented && !c.metaKey) {
1432
+ const f = new CustomEvent(be, {
794
1433
  bubbles: !0,
795
1434
  cancelable: !0
796
1435
  });
797
- ye(s, v);
1436
+ Ge(s, f);
798
1437
  }
799
1438
  },
800
1439
  { checkForDefaultPrevented: !1 }
@@ -803,246 +1442,246 @@ var Wn = "NavigationMenuLink", Be = "navigationMenu.linkSelect", pt = i.forwardR
803
1442
  ) });
804
1443
  }
805
1444
  );
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
1445
+ dn.displayName = lo;
1446
+ var at = "NavigationMenuIndicator", fo = i.forwardRef((e, t) => {
1447
+ const { forceMount: n, ...r } = e, o = V(at, e.__scopeNavigationMenu), a = !!o.value;
1448
+ return o.indicatorTrack ? jt.createPortal(
1449
+ /* @__PURE__ */ v(H, { present: n || a, children: /* @__PURE__ */ v(vo, { ...r, ref: t }) }),
1450
+ o.indicatorTrack
812
1451
  ) : null;
813
1452
  });
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(
1453
+ fo.displayName = at;
1454
+ var vo = i.forwardRef((e, t) => {
1455
+ const { __scopeNavigationMenu: n, ...r } = e, o = V(at, n), a = nn(n), [c, s] = i.useState(
817
1456
  null
818
- ), [f, v] = i.useState(null), l = r.orientation === "horizontal", m = !!r.value;
1457
+ ), [m, f] = i.useState(null), l = o.orientation === "horizontal", d = !!o.value;
819
1458
  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({
1459
+ const y = a().find((u) => u.value === o.value)?.ref.current;
1460
+ y && s(y);
1461
+ }, [a, o.value]);
1462
+ const h = () => {
1463
+ c && f({
825
1464
  size: l ? c.offsetWidth : c.offsetHeight,
826
1465
  offset: l ? c.offsetLeft : c.offsetTop
827
1466
  });
828
1467
  };
829
- return Re(c, p), Re(r.indicatorTrack, p), f ? /* @__PURE__ */ u(
830
- P.div,
1468
+ return Ze(c, h), Ze(o.indicatorTrack, h), m ? /* @__PURE__ */ v(
1469
+ M.div,
831
1470
  {
832
1471
  "aria-hidden": !0,
833
- "data-state": m ? "visible" : "hidden",
834
- "data-orientation": r.orientation,
835
- ...o,
1472
+ "data-state": d ? "visible" : "hidden",
1473
+ "data-orientation": o.orientation,
1474
+ ...r,
836
1475
  ref: t,
837
1476
  style: {
838
1477
  position: "absolute",
839
1478
  ...l ? {
840
1479
  left: 0,
841
- width: f.size + "px",
842
- transform: `translateX(${f.offset}px)`
1480
+ width: m.size + "px",
1481
+ transform: `translateX(${m.offset}px)`
843
1482
  } : {
844
1483
  top: 0,
845
- height: f.size + "px",
846
- transform: `translateY(${f.offset}px)`
1484
+ height: m.size + "px",
1485
+ transform: `translateY(${m.offset}px)`
847
1486
  },
848
- ...o.style
1487
+ ...r.style
849
1488
  }
850
1489
  }
851
1490
  ) : 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 = {
1491
+ }), te = "NavigationMenuContent", mo = i.forwardRef((e, t) => {
1492
+ const { forceMount: n, ...r } = e, o = V(te, e.__scopeNavigationMenu), a = un(te, e.__scopeNavigationMenu), c = A(a.contentRef, t), s = a.value === o.value, m = {
854
1493
  value: a.value,
855
1494
  triggerRef: a.triggerRef,
856
1495
  focusProxyRef: a.focusProxyRef,
857
1496
  wasEscapeCloseRef: a.wasEscapeCloseRef,
858
1497
  onContentFocusOutside: a.onContentFocusOutside,
859
1498
  onRootContentClose: a.onRootContentClose,
860
- ...o
1499
+ ...r
861
1500
  };
862
- return r.viewport ? /* @__PURE__ */ u(Bn, { forceMount: n, ...f, ref: c }) : /* @__PURE__ */ u(U, { present: n || s, children: /* @__PURE__ */ u(
863
- ht,
1501
+ return o.viewport ? /* @__PURE__ */ v(po, { forceMount: n, ...m, ref: c }) : /* @__PURE__ */ v(H, { present: n || s, children: /* @__PURE__ */ v(
1502
+ fn,
864
1503
  {
865
- "data-state": _e(s),
866
- ...f,
1504
+ "data-state": ct(s),
1505
+ ...m,
867
1506
  ref: c,
868
- onPointerEnter: x(e.onPointerEnter, r.onContentEnter),
1507
+ onPointerEnter: x(e.onPointerEnter, o.onContentEnter),
869
1508
  onPointerLeave: x(
870
1509
  e.onPointerLeave,
871
- se(r.onContentLeave)
1510
+ Oe(o.onContentLeave)
872
1511
  ),
873
1512
  style: {
874
1513
  // Prevent interaction when animating out
875
- pointerEvents: !s && r.isRootMenu ? "none" : void 0,
876
- ...f.style
1514
+ pointerEvents: !s && o.isRootMenu ? "none" : void 0,
1515
+ ...m.style
877
1516
  }
878
1517
  }
879
1518
  ) });
880
1519
  });
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, {
1520
+ mo.displayName = te;
1521
+ var po = i.forwardRef((e, t) => {
1522
+ const n = V(te, e.__scopeNavigationMenu), { onViewportContentChange: r, onViewportContentRemove: o } = n;
1523
+ return G(() => {
1524
+ r(e.value, {
886
1525
  ref: t,
887
1526
  ...e
888
1527
  });
889
- }, [e, t, o]), K(() => () => r(e.value), [e.value, r]), null;
890
- }), oe = "navigationMenu.rootContentDismiss", ht = i.forwardRef((e, t) => {
1528
+ }, [e, t, r]), G(() => () => o(e.value), [e.value, o]), null;
1529
+ }), be = "navigationMenu.rootContentDismiss", fn = i.forwardRef((e, t) => {
891
1530
  const {
892
1531
  __scopeNavigationMenu: n,
893
- value: o,
894
- triggerRef: r,
1532
+ value: r,
1533
+ triggerRef: o,
895
1534
  focusProxyRef: a,
896
1535
  wasEscapeCloseRef: c,
897
1536
  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;
1537
+ onContentFocusOutside: m,
1538
+ ...f
1539
+ } = e, l = V(te, n), d = i.useRef(null), h = A(d, t), p = hn(l.baseId, r), y = gn(l.baseId, r), u = nn(n), g = i.useRef(null), { onItemDismiss: w } = l;
901
1540
  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();
1541
+ const b = d.current;
1542
+ if (l.isRootMenu && b) {
1543
+ const E = () => {
1544
+ w(), s(), b.contains(document.activeElement) && o.current?.focus();
906
1545
  };
907
- return h.addEventListener(oe, b), () => h.removeEventListener(oe, b);
1546
+ return b.addEventListener(be, E), () => b.removeEventListener(be, E);
908
1547
  }
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";
1548
+ }, [l.isRootMenu, e.value, o, w, s]);
1549
+ const R = i.useMemo(() => {
1550
+ const E = u().map((P) => P.value);
1551
+ l.dir === "rtl" && E.reverse();
1552
+ const S = E.indexOf(l.value), C = E.indexOf(l.previousValue), _ = r === l.value, T = C === E.indexOf(r);
1553
+ if (!_ && !T) return g.current;
1554
+ const O = (() => {
1555
+ if (S !== C) {
1556
+ if (_ && C !== -1) return S > C ? "from-end" : "from-start";
1557
+ if (T && S !== -1) return S > C ? "to-start" : "to-end";
919
1558
  }
920
1559
  return null;
921
1560
  })();
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,
1561
+ return g.current = O, O;
1562
+ }, [l.previousValue, l.value, l.dir, u, r]);
1563
+ return /* @__PURE__ */ v(mn, { asChild: !0, children: /* @__PURE__ */ v(
1564
+ nt,
926
1565
  {
927
- id: C,
928
- "aria-labelledby": y,
929
- "data-motion": N,
1566
+ id: y,
1567
+ "aria-labelledby": p,
1568
+ "data-motion": R,
930
1569
  "data-orientation": l.orientation,
931
- ...v,
932
- ref: p,
1570
+ ...f,
1571
+ ref: h,
933
1572
  disableOutsidePointerEvents: !1,
934
1573
  onDismiss: () => {
935
- const h = new Event(oe, {
1574
+ const b = new Event(be, {
936
1575
  bubbles: !0,
937
1576
  cancelable: !0
938
1577
  });
939
- m.current?.dispatchEvent(h);
1578
+ d.current?.dispatchEvent(b);
940
1579
  },
941
- onFocusOutside: x(e.onFocusOutside, (h) => {
942
- f();
943
- const b = h.target;
944
- l.rootNavigationMenu?.contains(b) && h.preventDefault();
1580
+ onFocusOutside: x(e.onFocusOutside, (b) => {
1581
+ m();
1582
+ const E = b.target;
1583
+ l.rootNavigationMenu?.contains(E) && b.preventDefault();
945
1584
  }),
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();
1585
+ onPointerDownOutside: x(e.onPointerDownOutside, (b) => {
1586
+ const E = b.target, S = u().some((_) => _.ref.current?.contains(E)), C = l.isRootMenu && l.viewport?.contains(E);
1587
+ (S || C || !l.isRootMenu) && b.preventDefault();
949
1588
  }),
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();
1589
+ onKeyDown: x(e.onKeyDown, (b) => {
1590
+ const E = b.altKey || b.ctrlKey || b.metaKey;
1591
+ if (b.key === "Tab" && !E) {
1592
+ const C = Xe(b.currentTarget), _ = document.activeElement, T = C.findIndex((L) => L === _), P = b.shiftKey ? C.slice(0, T).reverse() : C.slice(T + 1, C.length);
1593
+ st(P) ? b.preventDefault() : a.current?.focus();
955
1594
  }
956
1595
  }),
957
- onEscapeKeyDown: x(e.onEscapeKeyDown, (h) => {
1596
+ onEscapeKeyDown: x(e.onEscapeKeyDown, (b) => {
958
1597
  c.current = !0;
959
1598
  })
960
1599
  }
961
1600
  ) });
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 }) });
1601
+ }), it = "NavigationMenuViewport", vn = i.forwardRef((e, t) => {
1602
+ const { forceMount: n, ...r } = e, a = !!V(it, e.__scopeNavigationMenu).value;
1603
+ return /* @__PURE__ */ v(H, { present: n || a, children: /* @__PURE__ */ v(ho, { ...r, ref: t }) });
965
1604
  });
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,
1605
+ vn.displayName = it;
1606
+ var ho = i.forwardRef((e, t) => {
1607
+ const { __scopeNavigationMenu: n, children: r, ...o } = e, a = V(it, n), c = A(t, a.onViewportChange), s = io(
1608
+ te,
970
1609
  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,
1610
+ ), [m, f] = i.useState(null), [l, d] = i.useState(null), h = m ? m?.width + "px" : void 0, p = m ? m?.height + "px" : void 0, y = !!a.value, u = y ? a.value : a.previousValue;
1611
+ return Ze(l, () => {
1612
+ l && f({ width: l.offsetWidth, height: l.offsetHeight });
1613
+ }), /* @__PURE__ */ v(
1614
+ M.div,
976
1615
  {
977
- "data-state": _e(C),
1616
+ "data-state": ct(y),
978
1617
  "data-orientation": a.orientation,
979
- ...r,
1618
+ ...o,
980
1619
  ref: c,
981
1620
  style: {
982
1621
  // 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
1622
+ pointerEvents: !y && a.isRootMenu ? "none" : void 0,
1623
+ "--radix-navigation-menu-viewport-width": h,
1624
+ "--radix-navigation-menu-viewport-height": p,
1625
+ ...o.style
987
1626
  },
988
1627
  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,
1628
+ onPointerLeave: x(e.onPointerLeave, Oe(a.onContentLeave)),
1629
+ children: Array.from(s.items).map(([w, { ref: R, forceMount: b, ...E }]) => {
1630
+ const S = u === w;
1631
+ return /* @__PURE__ */ v(H, { present: b || S, children: /* @__PURE__ */ v(
1632
+ fn,
994
1633
  {
995
- ...b,
996
- ref: ot(N, (R) => {
997
- w && R && m(R);
1634
+ ...E,
1635
+ ref: Zt(R, (C) => {
1636
+ S && C && d(C);
998
1637
  })
999
1638
  }
1000
- ) }, E);
1639
+ ) }, w);
1001
1640
  })
1002
1641
  }
1003
1642
  );
1004
- }), $n = "FocusGroup", bt = i.forwardRef(
1643
+ }), go = "FocusGroup", mn = i.forwardRef(
1005
1644
  (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 }) }) });
1645
+ const { __scopeNavigationMenu: n, ...r } = e, o = V(go, n);
1646
+ return /* @__PURE__ */ v(je.Provider, { scope: n, children: /* @__PURE__ */ v(je.Slot, { scope: n, children: /* @__PURE__ */ v(M.div, { dir: o.dir, ...r, ref: t }) }) });
1008
1647
  }
1009
- ), ze = ["ArrowRight", "ArrowLeft", "ArrowUp", "ArrowDown"], Hn = "FocusGroupItem", Et = i.forwardRef(
1648
+ ), Lt = ["ArrowRight", "ArrowLeft", "ArrowUp", "ArrowDown"], yo = "FocusGroupItem", pn = i.forwardRef(
1010
1649
  (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,
1650
+ const { __scopeNavigationMenu: n, ...r } = e, o = no(n), a = V(yo, n);
1651
+ return /* @__PURE__ */ v(je.ItemSlot, { scope: n, children: /* @__PURE__ */ v(
1652
+ M.button,
1014
1653
  {
1015
- ...o,
1654
+ ...r,
1016
1655
  ref: t,
1017
1656
  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);
1657
+ if (["Home", "End", ...Lt].includes(c.key)) {
1658
+ let m = o().map((d) => d.ref.current);
1659
+ if ([a.dir === "rtl" ? "ArrowRight" : "ArrowLeft", "ArrowUp", "End"].includes(c.key) && m.reverse(), Lt.includes(c.key)) {
1660
+ const d = m.indexOf(c.currentTarget);
1661
+ m = m.slice(d + 1);
1023
1662
  }
1024
- setTimeout(() => Ae(f)), c.preventDefault();
1663
+ setTimeout(() => st(m)), c.preventDefault();
1025
1664
  }
1026
1665
  })
1027
1666
  }
1028
1667
  ) });
1029
1668
  }
1030
1669
  );
1031
- function Ne(e) {
1670
+ function Xe(e) {
1032
1671
  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;
1672
+ acceptNode: (r) => {
1673
+ const o = r.tagName === "INPUT" && r.type === "hidden";
1674
+ return r.disabled || r.hidden || o ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
1036
1675
  }
1037
1676
  });
1038
1677
  for (; n.nextNode(); ) t.push(n.currentNode);
1039
1678
  return t;
1040
1679
  }
1041
- function Ae(e) {
1680
+ function st(e) {
1042
1681
  const t = document.activeElement;
1043
1682
  return e.some((n) => n === t ? !0 : (n.focus(), document.activeElement !== t));
1044
1683
  }
1045
- function Gn(e) {
1684
+ function Eo(e) {
1046
1685
  return e.forEach((t) => {
1047
1686
  t.dataset.tabindex = t.getAttribute("tabindex") || "", t.setAttribute("tabindex", "-1");
1048
1687
  }), () => {
@@ -1052,65 +1691,65 @@ function Gn(e) {
1052
1691
  });
1053
1692
  };
1054
1693
  }
1055
- function Re(e, t) {
1056
- const n = D(t);
1057
- K(() => {
1058
- let o = 0;
1694
+ function Ze(e, t) {
1695
+ const n = k(t);
1696
+ G(() => {
1697
+ let r = 0;
1059
1698
  if (e) {
1060
- const r = new ResizeObserver(() => {
1061
- cancelAnimationFrame(o), o = window.requestAnimationFrame(n);
1699
+ const o = new ResizeObserver(() => {
1700
+ cancelAnimationFrame(r), r = window.requestAnimationFrame(n);
1062
1701
  });
1063
- return r.observe(e), () => {
1064
- window.cancelAnimationFrame(o), r.unobserve(e);
1702
+ return o.observe(e), () => {
1703
+ window.cancelAnimationFrame(r), o.unobserve(e);
1065
1704
  };
1066
1705
  }
1067
1706
  }, [e, n]);
1068
1707
  }
1069
- function _e(e) {
1708
+ function ct(e) {
1070
1709
  return e ? "open" : "closed";
1071
1710
  }
1072
- function wt(e, t) {
1711
+ function hn(e, t) {
1073
1712
  return `${e}-trigger-${t}`;
1074
1713
  }
1075
- function Ct(e, t) {
1714
+ function gn(e, t) {
1076
1715
  return `${e}-content-${t}`;
1077
1716
  }
1078
- function se(e) {
1717
+ function Oe(e) {
1079
1718
  return (t) => t.pointerType === "mouse" ? e(t) : void 0;
1080
1719
  }
1081
- var jn = ut, Yn = ft, Xn = gt, qn = pt, Zn = yt;
1082
- function Qn({
1720
+ var bo = rn, wo = sn, Co = ln, So = dn, Ro = vn;
1721
+ function _o({
1083
1722
  className: e,
1084
1723
  children: t,
1085
1724
  viewport: n = !0,
1086
- ...o
1725
+ ...r
1087
1726
  }) {
1088
- return /* @__PURE__ */ A(
1089
- jn,
1727
+ return /* @__PURE__ */ D(
1728
+ bo,
1090
1729
  {
1091
1730
  "data-slot": "navigation-menu",
1092
1731
  "data-viewport": n,
1093
- className: k(
1732
+ className: F(
1094
1733
  "group/navigation-menu relative flex max-w-max flex-1 items-center justify-center",
1095
1734
  e
1096
1735
  ),
1097
- ...o,
1736
+ ...r,
1098
1737
  children: [
1099
1738
  t,
1100
- n && /* @__PURE__ */ u(no, {})
1739
+ n && /* @__PURE__ */ v(xo, {})
1101
1740
  ]
1102
1741
  }
1103
1742
  );
1104
1743
  }
1105
- function Jn({
1744
+ function Oo({
1106
1745
  className: e,
1107
1746
  ...t
1108
1747
  }) {
1109
- return /* @__PURE__ */ u(
1110
- Yn,
1748
+ return /* @__PURE__ */ v(
1749
+ wo,
1111
1750
  {
1112
1751
  "data-slot": "navigation-menu-list",
1113
- className: k(
1752
+ className: F(
1114
1753
  "group flex flex-1 list-none items-center justify-center gap-1",
1115
1754
  e
1116
1755
  ),
@@ -1118,37 +1757,37 @@ function Jn({
1118
1757
  }
1119
1758
  );
1120
1759
  }
1121
- function eo({
1760
+ function No({
1122
1761
  className: e,
1123
1762
  ...t
1124
1763
  }) {
1125
- return /* @__PURE__ */ u(
1126
- Xn,
1764
+ return /* @__PURE__ */ v(
1765
+ Co,
1127
1766
  {
1128
1767
  "data-slot": "navigation-menu-item",
1129
- className: k("relative", e),
1768
+ className: F("relative", e),
1130
1769
  ...t
1131
1770
  }
1132
1771
  );
1133
1772
  }
1134
- const to = et(
1773
+ const To = Ht(
1135
1774
  "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
1775
  );
1137
- function no({
1776
+ function xo({
1138
1777
  className: e,
1139
1778
  ...t
1140
1779
  }) {
1141
- return /* @__PURE__ */ u(
1780
+ return /* @__PURE__ */ v(
1142
1781
  "div",
1143
1782
  {
1144
- className: k(
1783
+ className: F(
1145
1784
  "absolute top-full left-0 isolate z-50 flex justify-center"
1146
1785
  ),
1147
- children: /* @__PURE__ */ u(
1148
- Zn,
1786
+ children: /* @__PURE__ */ v(
1787
+ Ro,
1149
1788
  {
1150
1789
  "data-slot": "navigation-menu-viewport",
1151
- className: k(
1790
+ className: F(
1152
1791
  "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
1792
  e
1154
1793
  ),
@@ -1158,15 +1797,15 @@ function no({
1158
1797
  }
1159
1798
  );
1160
1799
  }
1161
- function oo({
1800
+ function Mo({
1162
1801
  className: e,
1163
1802
  ...t
1164
1803
  }) {
1165
- return /* @__PURE__ */ u(
1166
- qn,
1804
+ return /* @__PURE__ */ v(
1805
+ So,
1167
1806
  {
1168
1807
  "data-slot": "navigation-menu-link",
1169
- className: k(
1808
+ className: F(
1170
1809
  "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
1810
  e
1172
1811
  ),
@@ -1174,14 +1813,14 @@ function oo({
1174
1813
  }
1175
1814
  );
1176
1815
  }
1177
- var de = "focusScope.autoFocusOnMount", fe = "focusScope.autoFocusOnUnmount", $e = { bubbles: !1, cancelable: !0 }, ro = "FocusScope", Nt = i.forwardRef((e, t) => {
1816
+ var Ve = "focusScope.autoFocusOnMount", We = "focusScope.autoFocusOnUnmount", kt = { bubbles: !1, cancelable: !0 }, Po = "FocusScope", yn = i.forwardRef((e, t) => {
1178
1817
  const {
1179
1818
  loop: n = !1,
1180
- trapped: o = !1,
1181
- onMountAutoFocus: r,
1819
+ trapped: r = !1,
1820
+ onMountAutoFocus: o,
1182
1821
  onUnmountAutoFocus: a,
1183
1822
  ...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({
1823
+ } = e, [s, m] = i.useState(null), f = k(o), l = k(a), d = i.useRef(null), h = A(t, (u) => m(u)), p = i.useRef({
1185
1824
  paused: !1,
1186
1825
  pause() {
1187
1826
  this.paused = !0;
@@ -1191,80 +1830,80 @@ var de = "focusScope.autoFocusOnMount", fe = "focusScope.autoFocusOnUnmount", $e
1191
1830
  }
1192
1831
  }).current;
1193
1832
  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) {
1833
+ if (r) {
1834
+ let u = function(b) {
1835
+ if (p.paused || !s) return;
1836
+ const E = b.target;
1837
+ s.contains(E) ? d.current = E : $(d.current, { select: !0 });
1838
+ }, g = function(b) {
1839
+ if (p.paused || !s) return;
1840
+ const E = b.relatedTarget;
1841
+ E !== null && (s.contains(E) || $(d.current, { select: !0 }));
1842
+ }, w = function(b) {
1204
1843
  if (document.activeElement === document.body)
1205
- for (const w of h)
1206
- w.removedNodes.length > 0 && V(s);
1844
+ for (const S of b)
1845
+ S.removedNodes.length > 0 && $(s);
1207
1846
  };
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();
1847
+ document.addEventListener("focusin", u), document.addEventListener("focusout", g);
1848
+ const R = new MutationObserver(w);
1849
+ return s && R.observe(s, { childList: !0, subtree: !0 }), () => {
1850
+ document.removeEventListener("focusin", u), document.removeEventListener("focusout", g), R.disconnect();
1212
1851
  };
1213
1852
  }
1214
- }, [o, s, y.paused]), i.useEffect(() => {
1853
+ }, [r, s, p.paused]), i.useEffect(() => {
1215
1854
  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));
1855
+ Vt.add(p);
1856
+ const u = document.activeElement;
1857
+ if (!s.contains(u)) {
1858
+ const w = new CustomEvent(Ve, kt);
1859
+ s.addEventListener(Ve, f), s.dispatchEvent(w), w.defaultPrevented || (Io(Fo(En(s)), { select: !0 }), document.activeElement === u && $(s));
1221
1860
  }
1222
1861
  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);
1862
+ s.removeEventListener(Ve, f), setTimeout(() => {
1863
+ const w = new CustomEvent(We, kt);
1864
+ s.addEventListener(We, l), s.dispatchEvent(w), w.defaultPrevented || $(u ?? document.body, { select: !0 }), s.removeEventListener(We, l), Vt.remove(p);
1226
1865
  }, 0);
1227
1866
  };
1228
1867
  }
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();
1868
+ }, [s, f, l, p]);
1869
+ const y = i.useCallback(
1870
+ (u) => {
1871
+ if (!n && !r || p.paused) return;
1872
+ const g = u.key === "Tab" && !u.altKey && !u.ctrlKey && !u.metaKey, w = document.activeElement;
1873
+ if (g && w) {
1874
+ const R = u.currentTarget, [b, E] = Do(R);
1875
+ b && E ? !u.shiftKey && w === E ? (u.preventDefault(), n && $(b, { select: !0 })) : u.shiftKey && w === b && (u.preventDefault(), n && $(E, { select: !0 })) : w === R && u.preventDefault();
1237
1876
  }
1238
1877
  },
1239
- [n, o, y.paused]
1878
+ [n, r, p.paused]
1240
1879
  );
1241
- return /* @__PURE__ */ u(P.div, { tabIndex: -1, ...c, ref: p, onKeyDown: C });
1880
+ return /* @__PURE__ */ v(M.div, { tabIndex: -1, ...c, ref: h, onKeyDown: y });
1242
1881
  });
1243
- Nt.displayName = ro;
1244
- function ao(e, { select: t = !1 } = {}) {
1882
+ yn.displayName = Po;
1883
+ function Io(e, { select: t = !1 } = {}) {
1245
1884
  const n = document.activeElement;
1246
- for (const o of e)
1247
- if (V(o, { select: t }), document.activeElement !== n) return;
1885
+ for (const r of e)
1886
+ if ($(r, { select: t }), document.activeElement !== n) return;
1248
1887
  }
1249
- function io(e) {
1250
- const t = Rt(e), n = He(t, e), o = He(t.reverse(), e);
1251
- return [n, o];
1888
+ function Do(e) {
1889
+ const t = En(e), n = Ft(t, e), r = Ft(t.reverse(), e);
1890
+ return [n, r];
1252
1891
  }
1253
- function Rt(e) {
1892
+ function En(e) {
1254
1893
  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;
1894
+ acceptNode: (r) => {
1895
+ const o = r.tagName === "INPUT" && r.type === "hidden";
1896
+ return r.disabled || r.hidden || o ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
1258
1897
  }
1259
1898
  });
1260
1899
  for (; n.nextNode(); ) t.push(n.currentNode);
1261
1900
  return t;
1262
1901
  }
1263
- function He(e, t) {
1902
+ function Ft(e, t) {
1264
1903
  for (const n of e)
1265
- if (!so(n, { upTo: t })) return n;
1904
+ if (!Ao(n, { upTo: t })) return n;
1266
1905
  }
1267
- function so(e, { upTo: t }) {
1906
+ function Ao(e, { upTo: t }) {
1268
1907
  if (getComputedStyle(e).visibility === "hidden") return !0;
1269
1908
  for (; e; ) {
1270
1909
  if (t !== void 0 && e === t) return !1;
@@ -1273,83 +1912,83 @@ function so(e, { upTo: t }) {
1273
1912
  }
1274
1913
  return !1;
1275
1914
  }
1276
- function co(e) {
1915
+ function Lo(e) {
1277
1916
  return e instanceof HTMLInputElement && "select" in e;
1278
1917
  }
1279
- function V(e, { select: t = !1 } = {}) {
1918
+ function $(e, { select: t = !1 } = {}) {
1280
1919
  if (e && e.focus) {
1281
1920
  const n = document.activeElement;
1282
- e.focus({ preventScroll: !0 }), e !== n && co(e) && t && e.select();
1921
+ e.focus({ preventScroll: !0 }), e !== n && Lo(e) && t && e.select();
1283
1922
  }
1284
1923
  }
1285
- var Ge = uo();
1286
- function uo() {
1924
+ var Vt = ko();
1925
+ function ko() {
1287
1926
  let e = [];
1288
1927
  return {
1289
1928
  add(t) {
1290
1929
  const n = e[0];
1291
- t !== n && n?.pause(), e = je(e, t), e.unshift(t);
1930
+ t !== n && n?.pause(), e = Wt(e, t), e.unshift(t);
1292
1931
  },
1293
1932
  remove(t) {
1294
- e = je(e, t), e[0]?.resume();
1933
+ e = Wt(e, t), e[0]?.resume();
1295
1934
  }
1296
1935
  };
1297
1936
  }
1298
- function je(e, t) {
1299
- const n = [...e], o = n.indexOf(t);
1300
- return o !== -1 && n.splice(o, 1), n;
1937
+ function Wt(e, t) {
1938
+ const n = [...e], r = n.indexOf(t);
1939
+ return r !== -1 && n.splice(r, 1), n;
1301
1940
  }
1302
- function lo(e) {
1941
+ function Fo(e) {
1303
1942
  return e.filter((t) => t.tagName !== "A");
1304
1943
  }
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;
1944
+ var Vo = "Portal", bn = i.forwardRef((e, t) => {
1945
+ const { container: n, ...r } = e, [o, a] = i.useState(!1);
1946
+ G(() => a(!0), []);
1947
+ const c = n || o && globalThis?.document?.body;
1948
+ return c ? jt.createPortal(/* @__PURE__ */ v(M.div, { ...r, ref: t }), c) : null;
1310
1949
  });
1311
- St.displayName = fo;
1312
- var ve = 0;
1313
- function vo() {
1950
+ bn.displayName = Vo;
1951
+ var Ke = 0;
1952
+ function Wo() {
1314
1953
  i.useEffect(() => {
1315
1954
  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--;
1955
+ return document.body.insertAdjacentElement("afterbegin", e[0] ?? Kt()), document.body.insertAdjacentElement("beforeend", e[1] ?? Kt()), Ke++, () => {
1956
+ Ke === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), Ke--;
1318
1957
  };
1319
1958
  }, []);
1320
1959
  }
1321
- function Ye() {
1960
+ function Kt() {
1322
1961
  const e = document.createElement("span");
1323
1962
  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
1963
  }
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];
1964
+ var z = function() {
1965
+ return z = Object.assign || function(t) {
1966
+ for (var n, r = 1, o = arguments.length; r < o; r++) {
1967
+ n = arguments[r];
1329
1968
  for (var a in n) Object.prototype.hasOwnProperty.call(n, a) && (t[a] = n[a]);
1330
1969
  }
1331
1970
  return t;
1332
- }, F.apply(this, arguments);
1971
+ }, z.apply(this, arguments);
1333
1972
  };
1334
- function Mt(e, t) {
1973
+ function wn(e, t) {
1335
1974
  var n = {};
1336
- for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
1975
+ for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
1337
1976
  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]]);
1977
+ for (var o = 0, r = Object.getOwnPropertySymbols(e); o < r.length; o++)
1978
+ t.indexOf(r[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[o]) && (n[r[o]] = e[r[o]]);
1340
1979
  return n;
1341
1980
  }
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]);
1981
+ function Ko(e, t, n) {
1982
+ if (n || arguments.length === 2) for (var r = 0, o = t.length, a; r < o; r++)
1983
+ (a || !(r in t)) && (a || (a = Array.prototype.slice.call(t, 0, r)), a[r] = t[r]);
1345
1984
  return e.concat(a || Array.prototype.slice.call(t));
1346
1985
  }
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) {
1986
+ var we = "right-scroll-bar-position", Ce = "width-before-scroll-bar", Uo = "with-scroll-bars-hidden", zo = "--removed-body-scroll-bar-size";
1987
+ function Ue(e, t) {
1349
1988
  return typeof e == "function" ? e(t) : e && (e.current = t), e;
1350
1989
  }
1351
- function ho(e, t) {
1352
- var n = Qt(function() {
1990
+ function Bo(e, t) {
1991
+ var n = er(function() {
1353
1992
  return {
1354
1993
  // value
1355
1994
  value: e,
@@ -1360,48 +1999,48 @@ function ho(e, t) {
1360
1999
  get current() {
1361
2000
  return n.value;
1362
2001
  },
1363
- set current(o) {
1364
- var r = n.value;
1365
- r !== o && (n.value = o, n.callback(o, r));
2002
+ set current(r) {
2003
+ var o = n.value;
2004
+ o !== r && (n.value = r, n.callback(r, o));
1366
2005
  }
1367
2006
  }
1368
2007
  };
1369
2008
  })[0];
1370
2009
  return n.callback = t, n.facade;
1371
2010
  }
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);
2011
+ var $o = typeof window < "u" ? i.useLayoutEffect : i.useEffect, Ut = /* @__PURE__ */ new WeakMap();
2012
+ function Go(e, t) {
2013
+ var n = Bo(null, function(r) {
2014
+ return e.forEach(function(o) {
2015
+ return Ue(o, r);
1377
2016
  });
1378
2017
  });
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);
2018
+ return $o(function() {
2019
+ var r = Ut.get(n);
2020
+ if (r) {
2021
+ var o = new Set(r), a = new Set(e), c = n.current;
2022
+ o.forEach(function(s) {
2023
+ a.has(s) || Ue(s, null);
1385
2024
  }), a.forEach(function(s) {
1386
- r.has(s) || me(s, c);
2025
+ o.has(s) || Ue(s, c);
1387
2026
  });
1388
2027
  }
1389
- Xe.set(n, e);
2028
+ Ut.set(n, e);
1390
2029
  }, [e]), n;
1391
2030
  }
1392
- function Eo(e) {
2031
+ function Ho(e) {
1393
2032
  return e;
1394
2033
  }
1395
- function wo(e, t) {
1396
- t === void 0 && (t = Eo);
1397
- var n = [], o = !1, r = {
2034
+ function jo(e, t) {
2035
+ t === void 0 && (t = Ho);
2036
+ var n = [], r = !1, o = {
1398
2037
  read: function() {
1399
- if (o)
2038
+ if (r)
1400
2039
  throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
1401
2040
  return n.length ? n[n.length - 1] : e;
1402
2041
  },
1403
2042
  useMedium: function(a) {
1404
- var c = t(a, o);
2043
+ var c = t(a, r);
1405
2044
  return n.push(c), function() {
1406
2045
  n = n.filter(function(s) {
1407
2046
  return s !== c;
@@ -1409,7 +2048,7 @@ function wo(e, t) {
1409
2048
  };
1410
2049
  },
1411
2050
  assignSyncMedium: function(a) {
1412
- for (o = !0; n.length; ) {
2051
+ for (r = !0; n.length; ) {
1413
2052
  var c = n;
1414
2053
  n = [], c.forEach(a);
1415
2054
  }
@@ -1423,21 +2062,21 @@ function wo(e, t) {
1423
2062
  };
1424
2063
  },
1425
2064
  assignMedium: function(a) {
1426
- o = !0;
2065
+ r = !0;
1427
2066
  var c = [];
1428
2067
  if (n.length) {
1429
2068
  var s = n;
1430
2069
  n = [], s.forEach(a), c = n;
1431
2070
  }
1432
- var f = function() {
2071
+ var m = function() {
1433
2072
  var l = c;
1434
2073
  c = [], l.forEach(a);
1435
- }, v = function() {
1436
- return Promise.resolve().then(f);
2074
+ }, f = function() {
2075
+ return Promise.resolve().then(m);
1437
2076
  };
1438
- v(), n = {
2077
+ f(), n = {
1439
2078
  push: function(l) {
1440
- c.push(l), v();
2079
+ c.push(l), f();
1441
2080
  },
1442
2081
  filter: function(l) {
1443
2082
  return c = c.filter(l), n;
@@ -1445,80 +2084,80 @@ function wo(e, t) {
1445
2084
  };
1446
2085
  }
1447
2086
  };
1448
- return r;
2087
+ return o;
1449
2088
  }
1450
- function Co(e) {
2089
+ function Yo(e) {
1451
2090
  e === void 0 && (e = {});
1452
- var t = wo(null);
1453
- return t.options = F({ async: !0, ssr: !1 }, e), t;
2091
+ var t = jo(null);
2092
+ return t.options = z({ async: !0, ssr: !1 }, e), t;
1454
2093
  }
1455
- var xt = function(e) {
1456
- var t = e.sideCar, n = Mt(e, ["sideCar"]);
2094
+ var Cn = function(e) {
2095
+ var t = e.sideCar, n = wn(e, ["sideCar"]);
1457
2096
  if (!t)
1458
2097
  throw new Error("Sidecar: please provide `sideCar` property to import the right car");
1459
- var o = t.read();
1460
- if (!o)
2098
+ var r = t.read();
2099
+ if (!r)
1461
2100
  throw new Error("Sidecar medium not found");
1462
- return i.createElement(o, F({}, n));
2101
+ return i.createElement(r, z({}, n));
1463
2102
  };
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);
2103
+ Cn.isSideCarExport = !0;
2104
+ function qo(e, t) {
2105
+ return e.useMedium(t), Cn;
2106
+ }
2107
+ var Sn = Yo(), ze = function() {
2108
+ }, Te = i.forwardRef(function(e, t) {
2109
+ var n = i.useRef(null), r = i.useState({
2110
+ onScrollCapture: ze,
2111
+ onWheelCapture: ze,
2112
+ onTouchMoveCapture: ze
2113
+ }), o = r[0], a = r[1], c = e.forwardProps, s = e.children, m = e.className, f = e.removeScrollBar, l = e.enabled, d = e.shards, h = e.sideCar, p = e.noRelative, y = e.noIsolation, u = e.inert, g = e.allowPinchZoom, w = e.as, R = w === void 0 ? "div" : w, b = e.gapMode, E = wn(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), S = h, C = Go([n, t]), _ = z(z({}, E), o);
1475
2114
  return i.createElement(
1476
2115
  i.Fragment,
1477
2116
  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)
2117
+ l && i.createElement(S, { sideCar: Sn, removeScrollBar: f, shards: d, noRelative: p, noIsolation: y, inert: u, setCallbacks: a, allowPinchZoom: !!g, lockRef: n, gapMode: b }),
2118
+ c ? i.cloneElement(i.Children.only(s), z(z({}, _), { ref: C })) : i.createElement(R, z({}, _, { className: m, ref: C }), s)
1480
2119
  );
1481
2120
  });
1482
- ue.defaultProps = {
2121
+ Te.defaultProps = {
1483
2122
  enabled: !0,
1484
2123
  removeScrollBar: !0,
1485
2124
  inert: !1
1486
2125
  };
1487
- ue.classNames = {
1488
- fullWidth: ae,
1489
- zeroRight: re
2126
+ Te.classNames = {
2127
+ fullWidth: Ce,
2128
+ zeroRight: we
1490
2129
  };
1491
- var Ro = function() {
2130
+ var Xo = function() {
1492
2131
  if (typeof __webpack_nonce__ < "u")
1493
2132
  return __webpack_nonce__;
1494
2133
  };
1495
- function So() {
2134
+ function Zo() {
1496
2135
  if (!document)
1497
2136
  return null;
1498
2137
  var e = document.createElement("style");
1499
2138
  e.type = "text/css";
1500
- var t = Ro();
2139
+ var t = Xo();
1501
2140
  return t && e.setAttribute("nonce", t), e;
1502
2141
  }
1503
- function Mo(e, t) {
2142
+ function Qo(e, t) {
1504
2143
  e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
1505
2144
  }
1506
- function xo(e) {
2145
+ function Jo(e) {
1507
2146
  var t = document.head || document.getElementsByTagName("head")[0];
1508
2147
  t.appendChild(e);
1509
2148
  }
1510
- var Po = function() {
2149
+ var ea = function() {
1511
2150
  var e = 0, t = null;
1512
2151
  return {
1513
2152
  add: function(n) {
1514
- e == 0 && (t = So()) && (Mo(t, n), xo(t)), e++;
2153
+ e == 0 && (t = Zo()) && (Qo(t, n), Jo(t)), e++;
1515
2154
  },
1516
2155
  remove: function() {
1517
2156
  e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
1518
2157
  }
1519
2158
  };
1520
- }, To = function() {
1521
- var e = Po();
2159
+ }, ta = function() {
2160
+ var e = ea();
1522
2161
  return function(t, n) {
1523
2162
  i.useEffect(function() {
1524
2163
  return e.add(t), function() {
@@ -1526,425 +2165,425 @@ var Po = function() {
1526
2165
  };
1527
2166
  }, [t && n]);
1528
2167
  };
1529
- }, Tt = function() {
1530
- var e = To(), t = function(n) {
1531
- var o = n.styles, r = n.dynamic;
1532
- return e(o, r), null;
2168
+ }, Rn = function() {
2169
+ var e = ta(), t = function(n) {
2170
+ var r = n.styles, o = n.dynamic;
2171
+ return e(r, o), null;
1533
2172
  };
1534
2173
  return t;
1535
- }, Io = {
2174
+ }, na = {
1536
2175
  left: 0,
1537
2176
  top: 0,
1538
2177
  right: 0,
1539
2178
  gap: 0
1540
- }, pe = function(e) {
2179
+ }, Be = function(e) {
1541
2180
  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) {
2181
+ }, ra = function(e) {
2182
+ var t = window.getComputedStyle(document.body), n = t[e === "padding" ? "paddingLeft" : "marginLeft"], r = t[e === "padding" ? "paddingTop" : "marginTop"], o = t[e === "padding" ? "paddingRight" : "marginRight"];
2183
+ return [Be(n), Be(r), Be(o)];
2184
+ }, oa = function(e) {
1546
2185
  if (e === void 0 && (e = "margin"), typeof window > "u")
1547
- return Io;
1548
- var t = Oo(e), n = document.documentElement.clientWidth, o = window.innerWidth;
2186
+ return na;
2187
+ var t = ra(e), n = document.documentElement.clientWidth, r = window.innerWidth;
1549
2188
  return {
1550
2189
  left: t[0],
1551
2190
  top: t[1],
1552
2191
  right: t[2],
1553
- gap: Math.max(0, o - n + t[2] - t[0])
2192
+ gap: Math.max(0, r - n + t[2] - t[0])
1554
2193
  };
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;
2194
+ }, aa = Rn(), ee = "data-scroll-locked", ia = function(e, t, n, r) {
2195
+ var o = e.left, a = e.top, c = e.right, s = e.gap;
1557
2196
  return n === void 0 && (n = "margin"), `
1558
- .`.concat(go, ` {
1559
- overflow: hidden `).concat(o, `;
1560
- padding-right: `).concat(s, "px ").concat(o, `;
2197
+ .`.concat(Uo, ` {
2198
+ overflow: hidden `).concat(r, `;
2199
+ padding-right: `).concat(s, "px ").concat(r, `;
1561
2200
  }
1562
- body[`).concat(Y, `] {
1563
- overflow: hidden `).concat(o, `;
2201
+ body[`).concat(ee, `] {
2202
+ overflow: hidden `).concat(r, `;
1564
2203
  overscroll-behavior: contain;
1565
2204
  `).concat([
1566
- t && "position: relative ".concat(o, ";"),
2205
+ t && "position: relative ".concat(r, ";"),
1567
2206
  n === "margin" && `
1568
- padding-left: `.concat(r, `px;
2207
+ padding-left: `.concat(o, `px;
1569
2208
  padding-top: `).concat(a, `px;
1570
2209
  padding-right: `).concat(c, `px;
1571
2210
  margin-left:0;
1572
2211
  margin-top:0;
1573
- margin-right: `).concat(s, "px ").concat(o, `;
2212
+ margin-right: `).concat(s, "px ").concat(r, `;
1574
2213
  `),
1575
- n === "padding" && "padding-right: ".concat(s, "px ").concat(o, ";")
2214
+ n === "padding" && "padding-right: ".concat(s, "px ").concat(r, ";")
1576
2215
  ].filter(Boolean).join(""), `
1577
2216
  }
1578
2217
 
1579
- .`).concat(re, ` {
1580
- right: `).concat(s, "px ").concat(o, `;
2218
+ .`).concat(we, ` {
2219
+ right: `).concat(s, "px ").concat(r, `;
1581
2220
  }
1582
2221
 
1583
- .`).concat(ae, ` {
1584
- margin-right: `).concat(s, "px ").concat(o, `;
2222
+ .`).concat(Ce, ` {
2223
+ margin-right: `).concat(s, "px ").concat(r, `;
1585
2224
  }
1586
2225
 
1587
- .`).concat(re, " .").concat(re, ` {
1588
- right: 0 `).concat(o, `;
2226
+ .`).concat(we, " .").concat(we, ` {
2227
+ right: 0 `).concat(r, `;
1589
2228
  }
1590
2229
 
1591
- .`).concat(ae, " .").concat(ae, ` {
1592
- margin-right: 0 `).concat(o, `;
2230
+ .`).concat(Ce, " .").concat(Ce, ` {
2231
+ margin-right: 0 `).concat(r, `;
1593
2232
  }
1594
2233
 
1595
- body[`).concat(Y, `] {
1596
- `).concat(po, ": ").concat(s, `px;
2234
+ body[`).concat(ee, `] {
2235
+ `).concat(zo, ": ").concat(s, `px;
1597
2236
  }
1598
2237
  `);
1599
- }, qe = function() {
1600
- var e = parseInt(document.body.getAttribute(Y) || "0", 10);
2238
+ }, zt = function() {
2239
+ var e = parseInt(document.body.getAttribute(ee) || "0", 10);
1601
2240
  return isFinite(e) ? e : 0;
1602
- }, ko = function() {
2241
+ }, sa = function() {
1603
2242
  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());
2243
+ return document.body.setAttribute(ee, (zt() + 1).toString()), function() {
2244
+ var e = zt() - 1;
2245
+ e <= 0 ? document.body.removeAttribute(ee) : document.body.setAttribute(ee, e.toString());
1607
2246
  };
1608
2247
  }, []);
1609
- }, Lo = function(e) {
1610
- var t = e.noRelative, n = e.noImportant, o = e.gapMode, r = o === void 0 ? "margin" : o;
1611
- ko();
2248
+ }, ca = function(e) {
2249
+ var t = e.noRelative, n = e.noImportant, r = e.gapMode, o = r === void 0 ? "margin" : r;
2250
+ sa();
1612
2251
  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;
2252
+ return oa(o);
2253
+ }, [o]);
2254
+ return i.createElement(aa, { styles: ia(a, !t, o, n ? "" : "!important") });
2255
+ }, Qe = !1;
1617
2256
  if (typeof window < "u")
1618
2257
  try {
1619
- var J = Object.defineProperty({}, "passive", {
2258
+ var pe = Object.defineProperty({}, "passive", {
1620
2259
  get: function() {
1621
- return Se = !0, !0;
2260
+ return Qe = !0, !0;
1622
2261
  }
1623
2262
  });
1624
- window.addEventListener("test", J, J), window.removeEventListener("test", J, J);
2263
+ window.addEventListener("test", pe, pe), window.removeEventListener("test", pe, pe);
1625
2264
  } catch {
1626
- Se = !1;
2265
+ Qe = !1;
1627
2266
  }
1628
- var H = Se ? { passive: !1 } : !1, Fo = function(e) {
2267
+ var Z = Qe ? { passive: !1 } : !1, ua = function(e) {
1629
2268
  return e.tagName === "TEXTAREA";
1630
- }, It = function(e, t) {
2269
+ }, _n = function(e, t) {
1631
2270
  if (!(e instanceof Element))
1632
2271
  return !1;
1633
2272
  var n = window.getComputedStyle(e);
1634
2273
  return (
1635
2274
  // not-not-scrollable
1636
2275
  n[t] !== "hidden" && // contains scroll inside self
1637
- !(n.overflowY === n.overflowX && !Fo(e) && n[t] === "visible")
2276
+ !(n.overflowY === n.overflowX && !ua(e) && n[t] === "visible")
1638
2277
  );
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;
2278
+ }, la = function(e) {
2279
+ return _n(e, "overflowY");
2280
+ }, da = function(e) {
2281
+ return _n(e, "overflowX");
2282
+ }, Bt = function(e, t) {
2283
+ var n = t.ownerDocument, r = t;
1645
2284
  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];
2285
+ typeof ShadowRoot < "u" && r instanceof ShadowRoot && (r = r.host);
2286
+ var o = On(e, r);
2287
+ if (o) {
2288
+ var a = Nn(e, r), c = a[1], s = a[2];
1650
2289
  if (c > s)
1651
2290
  return !0;
1652
2291
  }
1653
- o = o.parentNode;
1654
- } while (o && o !== n.body);
2292
+ r = r.parentNode;
2293
+ } while (r && r !== n.body);
1655
2294
  return !1;
1656
- }, Ko = function(e) {
1657
- var t = e.scrollTop, n = e.scrollHeight, o = e.clientHeight;
2295
+ }, fa = function(e) {
2296
+ var t = e.scrollTop, n = e.scrollHeight, r = e.clientHeight;
1658
2297
  return [
1659
2298
  t,
1660
2299
  n,
1661
- o
2300
+ r
1662
2301
  ];
1663
- }, Uo = function(e) {
1664
- var t = e.scrollLeft, n = e.scrollWidth, o = e.clientWidth;
2302
+ }, va = function(e) {
2303
+ var t = e.scrollLeft, n = e.scrollWidth, r = e.clientWidth;
1665
2304
  return [
1666
2305
  t,
1667
2306
  n,
1668
- o
2307
+ r
1669
2308
  ];
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) {
2309
+ }, On = function(e, t) {
2310
+ return e === "v" ? la(t) : da(t);
2311
+ }, Nn = function(e, t) {
2312
+ return e === "v" ? fa(t) : va(t);
2313
+ }, ma = function(e, t) {
1675
2314
  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;
2315
+ }, pa = function(e, t, n, r, o) {
2316
+ var a = ma(e, window.getComputedStyle(t).direction), c = a * r, s = n.target, m = t.contains(s), f = !1, l = c > 0, d = 0, h = 0;
1678
2317
  do {
1679
2318
  if (!s)
1680
2319
  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;
2320
+ var p = Nn(e, s), y = p[0], u = p[1], g = p[2], w = u - g - a * y;
2321
+ (y || w) && On(e, s) && (d += w, h += y);
2322
+ var R = s.parentNode;
2323
+ s = R && R.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? R.host : R;
1685
2324
  } while (
1686
2325
  // portaled content
1687
- !f && s !== document.body || // self content
1688
- f && (t.contains(s) || t === s)
2326
+ !m && s !== document.body || // self content
2327
+ m && (t.contains(s) || t === s)
1689
2328
  );
1690
- return (l && Math.abs(m) < 1 || !l && Math.abs(p) < 1) && (v = !0), v;
1691
- }, ee = function(e) {
2329
+ return (l && Math.abs(d) < 1 || !l && Math.abs(h) < 1) && (f = !0), f;
2330
+ }, he = function(e) {
1692
2331
  return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
1693
- }, Qe = function(e) {
2332
+ }, $t = function(e) {
1694
2333
  return [e.deltaX, e.deltaY];
1695
- }, Je = function(e) {
2334
+ }, Gt = function(e) {
1696
2335
  return e && "current" in e ? e.current : e;
1697
- }, $o = function(e, t) {
2336
+ }, ha = function(e, t) {
1698
2337
  return e[0] === t[0] && e[1] === t[1];
1699
- }, Ho = function(e) {
2338
+ }, ga = function(e) {
1700
2339
  return `
1701
2340
  .block-interactivity-`.concat(e, ` {pointer-events: none;}
1702
2341
  .allow-interactivity-`).concat(e, ` {pointer-events: all;}
1703
2342
  `);
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);
2343
+ }, ya = 0, Q = [];
2344
+ function Ea(e) {
2345
+ var t = i.useRef([]), n = i.useRef([0, 0]), r = i.useRef(), o = i.useState(ya++)[0], a = i.useState(Rn)[0], c = i.useRef(e);
1707
2346
  i.useEffect(function() {
1708
2347
  c.current = e;
1709
2348
  }, [e]), i.useEffect(function() {
1710
2349
  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));
2350
+ document.body.classList.add("block-interactivity-".concat(o));
2351
+ var u = Ko([e.lockRef.current], (e.shards || []).map(Gt), !0).filter(Boolean);
2352
+ return u.forEach(function(g) {
2353
+ return g.classList.add("allow-interactivity-".concat(o));
1715
2354
  }), function() {
1716
- document.body.classList.remove("block-interactivity-".concat(r)), d.forEach(function(g) {
1717
- return g.classList.remove("allow-interactivity-".concat(r));
2355
+ document.body.classList.remove("block-interactivity-".concat(o)), u.forEach(function(g) {
2356
+ return g.classList.remove("allow-interactivity-".concat(o));
1718
2357
  });
1719
2358
  };
1720
2359
  }
1721
2360
  }, [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)
2361
+ var s = i.useCallback(function(u, g) {
2362
+ if ("touches" in u && u.touches.length === 2 || u.type === "wheel" && u.ctrlKey)
1724
2363
  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")
2364
+ var w = he(u), R = n.current, b = "deltaX" in u ? u.deltaX : R[0] - w[0], E = "deltaY" in u ? u.deltaY : R[1] - w[1], S, C = u.target, _ = Math.abs(b) > Math.abs(E) ? "h" : "v";
2365
+ if ("touches" in u && _ === "h" && C.type === "range")
1727
2366
  return !1;
1728
- var T = window.getSelection(), M = T && T.anchorNode, I = M ? M === R || M.contains(R) : !1;
1729
- if (I)
2367
+ var T = window.getSelection(), O = T && T.anchorNode, P = O ? O === C || O.contains(C) : !1;
2368
+ if (P)
1730
2369
  return !1;
1731
- var W = Ze(S, R);
1732
- if (!W)
2370
+ var L = Bt(_, C);
2371
+ if (!L)
1733
2372
  return !0;
1734
- if (W ? w = S : (w = S === "v" ? "h" : "v", W = Ze(S, R)), !W)
2373
+ if (L ? S = _ : (S = _ === "v" ? "h" : "v", L = Bt(_, C)), !L)
1735
2374
  return !1;
1736
- if (!o.current && "changedTouches" in d && (h || b) && (o.current = w), !w)
2375
+ if (!r.current && "changedTouches" in u && (b || E) && (r.current = S), !S)
1737
2376
  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);
2377
+ var se = r.current || S;
2378
+ return pa(se, g, u, se === "h" ? b : E);
2379
+ }, []), m = i.useCallback(function(u) {
2380
+ var g = u;
2381
+ if (!(!Q.length || Q[Q.length - 1] !== a)) {
2382
+ var w = "deltaY" in g ? $t(g) : he(g), R = t.current.filter(function(S) {
2383
+ return S.name === g.type && (S.target === g.target || g.target === S.shadowParent) && ha(S.delta, w);
1745
2384
  })[0];
1746
- if (N && N.should) {
2385
+ if (R && R.should) {
1747
2386
  g.cancelable && g.preventDefault();
1748
2387
  return;
1749
2388
  }
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();
2389
+ if (!R) {
2390
+ var b = (c.current.shards || []).map(Gt).filter(Boolean).filter(function(S) {
2391
+ return S.contains(g.target);
2392
+ }), E = b.length > 0 ? s(g, b[0]) : !c.current.noIsolation;
2393
+ E && g.cancelable && g.preventDefault();
1755
2394
  }
1756
2395
  }
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;
2396
+ }, []), f = i.useCallback(function(u, g, w, R) {
2397
+ var b = { name: u, delta: g, target: w, should: R, shadowParent: ba(w) };
2398
+ t.current.push(b), setTimeout(function() {
2399
+ t.current = t.current.filter(function(E) {
2400
+ return E !== b;
1762
2401
  });
1763
2402
  }, 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));
2403
+ }, []), l = i.useCallback(function(u) {
2404
+ n.current = he(u), r.current = void 0;
2405
+ }, []), d = i.useCallback(function(u) {
2406
+ f(u.type, $t(u), u.target, s(u, e.lockRef.current));
2407
+ }, []), h = i.useCallback(function(u) {
2408
+ f(u.type, he(u), u.target, s(u, e.lockRef.current));
1770
2409
  }, []);
1771
2410
  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);
2411
+ return Q.push(a), e.setCallbacks({
2412
+ onScrollCapture: d,
2413
+ onWheelCapture: d,
2414
+ onTouchMoveCapture: h
2415
+ }), document.addEventListener("wheel", m, Z), document.addEventListener("touchmove", m, Z), document.addEventListener("touchstart", l, Z), function() {
2416
+ Q = Q.filter(function(u) {
2417
+ return u !== a;
2418
+ }), document.removeEventListener("wheel", m, Z), document.removeEventListener("touchmove", m, Z), document.removeEventListener("touchstart", l, Z);
1780
2419
  };
1781
2420
  }, []);
1782
- var y = e.removeScrollBar, C = e.inert;
2421
+ var p = e.removeScrollBar, y = e.inert;
1783
2422
  return i.createElement(
1784
2423
  i.Fragment,
1785
2424
  null,
1786
- C ? i.createElement(a, { styles: Ho(r) }) : null,
1787
- y ? i.createElement(Lo, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
2425
+ y ? i.createElement(a, { styles: ga(o) }) : null,
2426
+ p ? i.createElement(ca, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
1788
2427
  );
1789
2428
  }
1790
- function Yo(e) {
2429
+ function ba(e) {
1791
2430
  for (var t = null; e !== null; )
1792
2431
  e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
1793
2432
  return t;
1794
2433
  }
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 }));
2434
+ const wa = qo(Sn, Ea);
2435
+ var Tn = i.forwardRef(function(e, t) {
2436
+ return i.createElement(Te, z({}, e, { ref: t, sideCar: wa }));
1798
2437
  });
1799
- At.classNames = ue.classNames;
1800
- var qo = function(e) {
2438
+ Tn.classNames = Te.classNames;
2439
+ var Ca = function(e) {
1801
2440
  if (typeof document > "u")
1802
2441
  return null;
1803
2442
  var t = Array.isArray(e) ? e[0] : e;
1804
2443
  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) {
2444
+ }, J = /* @__PURE__ */ new WeakMap(), ge = /* @__PURE__ */ new WeakMap(), ye = {}, $e = 0, xn = function(e) {
2445
+ return e && (e.host || xn(e.parentNode));
2446
+ }, Sa = function(e, t) {
1808
2447
  return t.map(function(n) {
1809
2448
  if (e.contains(n))
1810
2449
  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);
2450
+ var r = xn(n);
2451
+ return r && e.contains(r) ? r : (console.error("aria-hidden", n, "in not contained inside", e, ". Doing nothing"), null);
1813
2452
  }).filter(function(n) {
1814
2453
  return !!n;
1815
2454
  });
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));
2455
+ }, Ra = function(e, t, n, r) {
2456
+ var o = Sa(t, Array.isArray(e) ? e : [e]);
2457
+ ye[n] || (ye[n] = /* @__PURE__ */ new WeakMap());
2458
+ var a = ye[n], c = [], s = /* @__PURE__ */ new Set(), m = new Set(o), f = function(d) {
2459
+ !d || s.has(d) || (s.add(d), f(d.parentNode));
1821
2460
  };
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);
2461
+ o.forEach(f);
2462
+ var l = function(d) {
2463
+ !d || m.has(d) || Array.prototype.forEach.call(d.children, function(h) {
2464
+ if (s.has(h))
2465
+ l(h);
1827
2466
  else
1828
2467
  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);
2468
+ var p = h.getAttribute(r), y = p !== null && p !== "false", u = (J.get(h) || 0) + 1, g = (a.get(h) || 0) + 1;
2469
+ J.set(h, u), a.set(h, g), c.push(h), u === 1 && y && ge.set(h, !0), g === 1 && h.setAttribute(n, "true"), y || h.setAttribute(r, "true");
2470
+ } catch (w) {
2471
+ console.error("aria-hidden: cannot operate on ", h, w);
1833
2472
  }
1834
2473
  });
1835
2474
  };
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 = {});
2475
+ return l(t), s.clear(), $e++, function() {
2476
+ c.forEach(function(d) {
2477
+ var h = J.get(d) - 1, p = a.get(d) - 1;
2478
+ J.set(d, h), a.set(d, p), h || (ge.has(d) || d.removeAttribute(r), ge.delete(d)), p || d.removeAttribute(n);
2479
+ }), $e--, $e || (J = /* @__PURE__ */ new WeakMap(), J = /* @__PURE__ */ new WeakMap(), ge = /* @__PURE__ */ new WeakMap(), ye = {});
1841
2480
  };
1842
- }, Jo = function(e, t, n) {
2481
+ }, _a = function(e, t, n) {
1843
2482
  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() {
2483
+ var r = Array.from(Array.isArray(e) ? e : [e]), o = Ca(e);
2484
+ return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live], script"))), Ra(r, o, n, "aria-hidden")) : function() {
1846
2485
  return null;
1847
2486
  };
1848
- }, le = "Dialog", [kt] = Me(le), [er, L] = kt(le), Lt = (e) => {
2487
+ }, xe = "Dialog", [Mn] = et(xe), [Oa, U] = Mn(xe), Pn = (e) => {
1849
2488
  const {
1850
2489
  __scopeDialog: t,
1851
2490
  children: n,
1852
- open: o,
1853
- defaultOpen: r,
2491
+ open: r,
2492
+ defaultOpen: o,
1854
2493
  onOpenChange: a,
1855
2494
  modal: c = !0
1856
- } = e, s = i.useRef(null), f = i.useRef(null), [v, l] = xe({
1857
- prop: o,
1858
- defaultProp: r ?? !1,
2495
+ } = e, s = i.useRef(null), m = i.useRef(null), [f, l] = tt({
2496
+ prop: r,
2497
+ defaultProp: o ?? !1,
1859
2498
  onChange: a,
1860
- caller: le
2499
+ caller: xe
1861
2500
  });
1862
- return /* @__PURE__ */ u(
1863
- er,
2501
+ return /* @__PURE__ */ v(
2502
+ Oa,
1864
2503
  {
1865
2504
  scope: t,
1866
2505
  triggerRef: s,
1867
- contentRef: f,
1868
- contentId: q(),
1869
- titleId: q(),
1870
- descriptionId: q(),
1871
- open: v,
2506
+ contentRef: m,
2507
+ contentId: ae(),
2508
+ titleId: ae(),
2509
+ descriptionId: ae(),
2510
+ open: f,
1872
2511
  onOpenChange: l,
1873
- onOpenToggle: i.useCallback(() => l((m) => !m), [l]),
2512
+ onOpenToggle: i.useCallback(() => l((d) => !d), [l]),
1874
2513
  modal: c,
1875
2514
  children: n
1876
2515
  }
1877
2516
  );
1878
2517
  };
1879
- Lt.displayName = le;
1880
- var Ft = "DialogTrigger", Wt = i.forwardRef(
2518
+ Pn.displayName = xe;
2519
+ var In = "DialogTrigger", Dn = i.forwardRef(
1881
2520
  (e, t) => {
1882
- const { __scopeDialog: n, ...o } = e, r = L(Ft, n), a = O(t, r.triggerRef);
1883
- return /* @__PURE__ */ u(
1884
- P.button,
2521
+ const { __scopeDialog: n, ...r } = e, o = U(In, n), a = A(t, o.triggerRef);
2522
+ return /* @__PURE__ */ v(
2523
+ M.button,
1885
2524
  {
1886
2525
  type: "button",
1887
2526
  "aria-haspopup": "dialog",
1888
- "aria-expanded": r.open,
1889
- "aria-controls": r.contentId,
1890
- "data-state": Fe(r.open),
1891
- ...o,
2527
+ "aria-expanded": o.open,
2528
+ "aria-controls": o.contentId,
2529
+ "data-state": dt(o.open),
2530
+ ...r,
1892
2531
  ref: a,
1893
- onClick: x(e.onClick, r.onOpenToggle)
2532
+ onClick: x(e.onClick, o.onOpenToggle)
1894
2533
  }
1895
2534
  );
1896
2535
  }
1897
2536
  );
1898
- Wt.displayName = Ft;
1899
- var ke = "DialogPortal", [tr, Vt] = kt(ke, {
2537
+ Dn.displayName = In;
2538
+ var ut = "DialogPortal", [Na, An] = Mn(ut, {
1900
2539
  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 }) })) });
2540
+ }), Ln = (e) => {
2541
+ const { __scopeDialog: t, forceMount: n, children: r, container: o } = e, a = U(ut, t);
2542
+ return /* @__PURE__ */ v(Na, { scope: t, forceMount: n, children: i.Children.map(r, (c) => /* @__PURE__ */ v(H, { present: n || a.open, children: /* @__PURE__ */ v(bn, { asChild: !0, container: o, children: c }) })) });
1904
2543
  };
1905
- Kt.displayName = ke;
1906
- var ce = "DialogOverlay", Ut = i.forwardRef(
2544
+ Ln.displayName = ut;
2545
+ var Ne = "DialogOverlay", kn = i.forwardRef(
1907
2546
  (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;
2547
+ const n = An(Ne, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, a = U(Ne, e.__scopeDialog);
2548
+ return a.modal ? /* @__PURE__ */ v(H, { present: r || a.open, children: /* @__PURE__ */ v(xa, { ...o, ref: t }) }) : null;
1910
2549
  }
1911
2550
  );
1912
- Ut.displayName = ce;
1913
- var nr = ie("DialogOverlay.RemoveScroll"), or = i.forwardRef(
2551
+ kn.displayName = Ne;
2552
+ var Ta = Se("DialogOverlay.RemoveScroll"), xa = i.forwardRef(
1914
2553
  (e, t) => {
1915
- const { __scopeDialog: n, ...o } = e, r = L(ce, n);
2554
+ const { __scopeDialog: n, ...r } = e, o = U(Ne, n);
1916
2555
  return (
1917
2556
  // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
1918
2557
  // ie. when `Overlay` and `Content` are siblings
1919
- /* @__PURE__ */ u(At, { as: nr, allowPinchZoom: !0, shards: [r.contentRef], children: /* @__PURE__ */ u(
1920
- P.div,
2558
+ /* @__PURE__ */ v(Tn, { as: Ta, allowPinchZoom: !0, shards: [o.contentRef], children: /* @__PURE__ */ v(
2559
+ M.div,
1921
2560
  {
1922
- "data-state": Fe(r.open),
1923
- ...o,
2561
+ "data-state": dt(o.open),
2562
+ ...r,
1924
2563
  ref: t,
1925
- style: { pointerEvents: "auto", ...o.style }
2564
+ style: { pointerEvents: "auto", ...r.style }
1926
2565
  }
1927
2566
  ) })
1928
2567
  );
1929
2568
  }
1930
- ), z = "DialogContent", Bt = i.forwardRef(
2569
+ ), Y = "DialogContent", Fn = i.forwardRef(
1931
2570
  (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 }) });
2571
+ const n = An(Y, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, a = U(Y, e.__scopeDialog);
2572
+ return /* @__PURE__ */ v(H, { present: r || a.open, children: a.modal ? /* @__PURE__ */ v(Ma, { ...o, ref: t }) : /* @__PURE__ */ v(Pa, { ...o, ref: t }) });
1934
2573
  }
1935
2574
  );
1936
- Bt.displayName = z;
1937
- var rr = i.forwardRef(
2575
+ Fn.displayName = Y;
2576
+ var Ma = i.forwardRef(
1938
2577
  (e, t) => {
1939
- const n = L(z, e.__scopeDialog), o = i.useRef(null), r = O(t, n.contentRef, o);
2578
+ const n = U(Y, e.__scopeDialog), r = i.useRef(null), o = A(t, n.contentRef, r);
1940
2579
  return i.useEffect(() => {
1941
- const a = o.current;
1942
- if (a) return Jo(a);
1943
- }, []), /* @__PURE__ */ u(
1944
- zt,
2580
+ const a = r.current;
2581
+ if (a) return _a(a);
2582
+ }, []), /* @__PURE__ */ v(
2583
+ Vn,
1945
2584
  {
1946
2585
  ...e,
1947
- ref: r,
2586
+ ref: o,
1948
2587
  trapFocus: n.open,
1949
2588
  disableOutsidePointerEvents: !0,
1950
2589
  onCloseAutoFocus: x(e.onCloseAutoFocus, (a) => {
@@ -1961,98 +2600,98 @@ var rr = i.forwardRef(
1961
2600
  }
1962
2601
  );
1963
2602
  }
1964
- ), ar = i.forwardRef(
2603
+ ), Pa = i.forwardRef(
1965
2604
  (e, t) => {
1966
- const n = L(z, e.__scopeDialog), o = i.useRef(!1), r = i.useRef(!1);
1967
- return /* @__PURE__ */ u(
1968
- zt,
2605
+ const n = U(Y, e.__scopeDialog), r = i.useRef(!1), o = i.useRef(!1);
2606
+ return /* @__PURE__ */ v(
2607
+ Vn,
1969
2608
  {
1970
2609
  ...e,
1971
2610
  ref: t,
1972
2611
  trapFocus: !1,
1973
2612
  disableOutsidePointerEvents: !1,
1974
2613
  onCloseAutoFocus: (a) => {
1975
- e.onCloseAutoFocus?.(a), a.defaultPrevented || (o.current || n.triggerRef.current?.focus(), a.preventDefault()), o.current = !1, r.current = !1;
2614
+ e.onCloseAutoFocus?.(a), a.defaultPrevented || (r.current || n.triggerRef.current?.focus(), a.preventDefault()), r.current = !1, o.current = !1;
1976
2615
  },
1977
2616
  onInteractOutside: (a) => {
1978
- e.onInteractOutside?.(a), a.defaultPrevented || (o.current = !0, a.detail.originalEvent.type === "pointerdown" && (r.current = !0));
2617
+ e.onInteractOutside?.(a), a.defaultPrevented || (r.current = !0, a.detail.originalEvent.type === "pointerdown" && (o.current = !0));
1979
2618
  const c = a.target;
1980
- n.triggerRef.current?.contains(c) && a.preventDefault(), a.detail.originalEvent.type === "focusin" && r.current && a.preventDefault();
2619
+ n.triggerRef.current?.contains(c) && a.preventDefault(), a.detail.originalEvent.type === "focusin" && o.current && a.preventDefault();
1981
2620
  }
1982
2621
  }
1983
2622
  );
1984
2623
  }
1985
- ), zt = i.forwardRef(
2624
+ ), Vn = i.forwardRef(
1986
2625
  (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,
2626
+ const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: a, ...c } = e, s = U(Y, n), m = i.useRef(null), f = A(t, m);
2627
+ return Wo(), /* @__PURE__ */ D(ie, { children: [
2628
+ /* @__PURE__ */ v(
2629
+ yn,
1991
2630
  {
1992
2631
  asChild: !0,
1993
2632
  loop: !0,
1994
- trapped: o,
1995
- onMountAutoFocus: r,
2633
+ trapped: r,
2634
+ onMountAutoFocus: o,
1996
2635
  onUnmountAutoFocus: a,
1997
- children: /* @__PURE__ */ u(
1998
- Pe,
2636
+ children: /* @__PURE__ */ v(
2637
+ nt,
1999
2638
  {
2000
2639
  role: "dialog",
2001
2640
  id: s.contentId,
2002
2641
  "aria-describedby": s.descriptionId,
2003
2642
  "aria-labelledby": s.titleId,
2004
- "data-state": Fe(s.open),
2643
+ "data-state": dt(s.open),
2005
2644
  ...c,
2006
- ref: v,
2645
+ ref: f,
2007
2646
  onDismiss: () => s.onOpenChange(!1)
2008
2647
  }
2009
2648
  )
2010
2649
  }
2011
2650
  ),
2012
- /* @__PURE__ */ A(Z, { children: [
2013
- /* @__PURE__ */ u(cr, { titleId: s.titleId }),
2014
- /* @__PURE__ */ u(lr, { contentRef: f, descriptionId: s.descriptionId })
2651
+ /* @__PURE__ */ D(ie, { children: [
2652
+ /* @__PURE__ */ v(Aa, { titleId: s.titleId }),
2653
+ /* @__PURE__ */ v(ka, { contentRef: m, descriptionId: s.descriptionId })
2015
2654
  ] })
2016
2655
  ] });
2017
2656
  }
2018
- ), Le = "DialogTitle", ir = i.forwardRef(
2657
+ ), lt = "DialogTitle", Ia = i.forwardRef(
2019
2658
  (e, t) => {
2020
- const { __scopeDialog: n, ...o } = e, r = L(Le, n);
2021
- return /* @__PURE__ */ u(P.h2, { id: r.titleId, ...o, ref: t });
2659
+ const { __scopeDialog: n, ...r } = e, o = U(lt, n);
2660
+ return /* @__PURE__ */ v(M.h2, { id: o.titleId, ...r, ref: t });
2022
2661
  }
2023
2662
  );
2024
- ir.displayName = Le;
2025
- var $t = "DialogDescription", sr = i.forwardRef(
2663
+ Ia.displayName = lt;
2664
+ var Wn = "DialogDescription", Da = i.forwardRef(
2026
2665
  (e, t) => {
2027
- const { __scopeDialog: n, ...o } = e, r = L($t, n);
2028
- return /* @__PURE__ */ u(P.p, { id: r.descriptionId, ...o, ref: t });
2666
+ const { __scopeDialog: n, ...r } = e, o = U(Wn, n);
2667
+ return /* @__PURE__ */ v(M.p, { id: o.descriptionId, ...r, ref: t });
2029
2668
  }
2030
2669
  );
2031
- sr.displayName = $t;
2032
- var Ht = "DialogClose", Gt = i.forwardRef(
2670
+ Da.displayName = Wn;
2671
+ var Kn = "DialogClose", Un = i.forwardRef(
2033
2672
  (e, t) => {
2034
- const { __scopeDialog: n, ...o } = e, r = L(Ht, n);
2035
- return /* @__PURE__ */ u(
2036
- P.button,
2673
+ const { __scopeDialog: n, ...r } = e, o = U(Kn, n);
2674
+ return /* @__PURE__ */ v(
2675
+ M.button,
2037
2676
  {
2038
2677
  type: "button",
2039
- ...o,
2678
+ ...r,
2040
2679
  ref: t,
2041
- onClick: x(e.onClick, () => r.onOpenChange(!1))
2680
+ onClick: x(e.onClick, () => o.onOpenChange(!1))
2042
2681
  }
2043
2682
  );
2044
2683
  }
2045
2684
  );
2046
- Gt.displayName = Ht;
2047
- function Fe(e) {
2685
+ Un.displayName = Kn;
2686
+ function dt(e) {
2048
2687
  return e ? "open" : "closed";
2049
2688
  }
2050
- var jt = "DialogTitleWarning", [Or, Yt] = on(jt, {
2051
- contentName: z,
2052
- titleName: Le,
2689
+ var zn = "DialogTitleWarning", [fi, Bn] = Mr(zn, {
2690
+ contentName: Y,
2691
+ titleName: lt,
2053
2692
  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.
2693
+ }), Aa = ({ titleId: e }) => {
2694
+ const t = Bn(zn), n = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
2056
2695
 
2057
2696
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
2058
2697
 
@@ -2060,35 +2699,35 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
2060
2699
  return i.useEffect(() => {
2061
2700
  e && (document.getElementById(e) || console.error(n));
2062
2701
  }, [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}}.`;
2702
+ }, La = "DialogDescriptionWarning", ka = ({ contentRef: e, descriptionId: t }) => {
2703
+ const r = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Bn(La).contentName}}.`;
2065
2704
  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({
2705
+ const o = e.current?.getAttribute("aria-describedby");
2706
+ t && o && (document.getElementById(t) || console.warn(r));
2707
+ }, [r, e, t]), null;
2708
+ }, Fa = Pn, Va = Dn, Wa = Ln, Ka = kn, Ua = Fn, za = Un;
2709
+ function Ba({ ...e }) {
2710
+ return /* @__PURE__ */ v(Fa, { "data-slot": "sheet", ...e });
2711
+ }
2712
+ function $a({
2074
2713
  ...e
2075
2714
  }) {
2076
- return /* @__PURE__ */ u(fr, { "data-slot": "sheet-trigger", ...e });
2715
+ return /* @__PURE__ */ v(Va, { "data-slot": "sheet-trigger", ...e });
2077
2716
  }
2078
- function br({
2717
+ function Ga({
2079
2718
  ...e
2080
2719
  }) {
2081
- return /* @__PURE__ */ u(vr, { "data-slot": "sheet-portal", ...e });
2720
+ return /* @__PURE__ */ v(Wa, { "data-slot": "sheet-portal", ...e });
2082
2721
  }
2083
- function Er({
2722
+ function Ha({
2084
2723
  className: e,
2085
2724
  ...t
2086
2725
  }) {
2087
- return /* @__PURE__ */ u(
2088
- mr,
2726
+ return /* @__PURE__ */ v(
2727
+ Ka,
2089
2728
  {
2090
2729
  "data-slot": "sheet-overlay",
2091
- className: k(
2730
+ className: F(
2092
2731
  "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
2732
  e
2094
2733
  ),
@@ -2096,19 +2735,19 @@ function Er({
2096
2735
  }
2097
2736
  );
2098
2737
  }
2099
- function wr({
2738
+ function ja({
2100
2739
  className: e,
2101
2740
  children: t,
2102
2741
  side: n = "right",
2103
- ...o
2742
+ ...r
2104
2743
  }) {
2105
- return /* @__PURE__ */ A(br, { children: [
2106
- /* @__PURE__ */ u(Er, {}),
2107
- /* @__PURE__ */ A(
2108
- gr,
2744
+ return /* @__PURE__ */ D(Ga, { children: [
2745
+ /* @__PURE__ */ v(Ha, {}),
2746
+ /* @__PURE__ */ D(
2747
+ Ua,
2109
2748
  {
2110
2749
  "data-slot": "sheet-content",
2111
- className: k(
2750
+ className: F(
2112
2751
  "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
2752
  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
2753
  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",
@@ -2116,61 +2755,79 @@ function wr({
2116
2755
  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
2756
  e
2118
2757
  ),
2119
- ...o,
2758
+ ...r,
2120
2759
  children: [
2121
2760
  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" })
2761
+ /* @__PURE__ */ D(za, { 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: [
2762
+ /* @__PURE__ */ v(rr, { className: "size-4" }),
2763
+ /* @__PURE__ */ v("span", { className: "sr-only", children: "Close" })
2125
2764
  ] })
2126
2765
  ]
2127
2766
  }
2128
2767
  )
2129
2768
  ] });
2130
2769
  }
2131
- const Dr = ({
2770
+ const vi = ({
2132
2771
  navItems: e,
2133
2772
  LinkComponent: t = "a",
2134
2773
  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,
2774
+ ...r
2775
+ }) => /* @__PURE__ */ D("header", { className: F(n), ...r, children: [
2776
+ /* @__PURE__ */ v("nav", { className: "hidden sm:flex sticky top-0 z-10 items-center px-4 h-14", children: /* @__PURE__ */ v(_o, { children: /* @__PURE__ */ v(Oo, { children: e.map((o) => /* @__PURE__ */ v(No, { children: /* @__PURE__ */ v(
2777
+ Mo,
2139
2778
  {
2140
2779
  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
- )
2780
+ className: To(),
2781
+ children: /* @__PURE__ */ D(t, { to: o.url, className: "flex items-center", children: [
2782
+ o.icon && /* @__PURE__ */ v(o.icon, {}),
2783
+ /* @__PURE__ */ v("span", { children: o.title })
2784
+ ] })
2153
2785
  }
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(
2786
+ ) }, o.title)) }) }) }),
2787
+ /* @__PURE__ */ v("nav", { className: "flex sm:hidden", children: /* @__PURE__ */ D(Ba, { children: [
2788
+ /* @__PURE__ */ v($a, { asChild: !0, children: /* @__PURE__ */ v(Je, { variant: "ghost", size: "icon", children: /* @__PURE__ */ v(or, {}) }) }),
2789
+ /* @__PURE__ */ v(ja, { side: "top", className: "p-8", children: /* @__PURE__ */ v("div", { className: "flex flex-col gap-4", children: e.map((o) => /* @__PURE__ */ D(
2158
2790
  t,
2159
2791
  {
2160
- to: r.url,
2792
+ to: o.url,
2161
2793
  className: "flex items-center gap-2",
2162
2794
  children: [
2163
- r.icon && /* @__PURE__ */ u(r.icon, {}),
2164
- /* @__PURE__ */ u("span", { className: "text-base font-medium", children: r.title })
2795
+ o.icon && /* @__PURE__ */ v(o.icon, {}),
2796
+ /* @__PURE__ */ v("span", { className: "text-base font-medium", children: o.title })
2165
2797
  ]
2166
2798
  },
2167
- r.title
2799
+ o.title
2168
2800
  )) }) })
2169
2801
  ] }) })
2170
- ] });
2802
+ ] }), mi = ({
2803
+ links: e,
2804
+ copyright: t,
2805
+ socialProfiles: n,
2806
+ className: r,
2807
+ ...o
2808
+ }) => /* @__PURE__ */ v("footer", { className: F(r), ...o, children: /* @__PURE__ */ D("div", { className: "flex flex-col items-center justify-center gap-5 bg-background py-8 border-t", children: [
2809
+ /* @__PURE__ */ v("div", { className: "flex justify-center gap-5 sm:gap-8 xl:gap-13", children: n.map((a) => /* @__PURE__ */ v(
2810
+ Je,
2811
+ {
2812
+ variant: "secondary",
2813
+ size: "icon",
2814
+ className: "rounded-xl",
2815
+ children: /* @__PURE__ */ v(Mt, { to: a.url, children: a.icon && /* @__PURE__ */ v(a.icon, {}) })
2816
+ },
2817
+ a.title
2818
+ )) }),
2819
+ /* @__PURE__ */ v("div", { className: "flex justify-center gap-5 sm:gap-8 xl:gap-13", children: e.map((a) => /* @__PURE__ */ v(Mt, { to: a.url, children: a.title }, a.title)) }),
2820
+ /* @__PURE__ */ D("div", { className: "text-muted", children: [
2821
+ t,
2822
+ " ",
2823
+ (/* @__PURE__ */ new Date()).getFullYear()
2824
+ ] })
2825
+ ] }) });
2171
2826
  export {
2172
- Ir as CustomButton,
2173
- Dr as MainNav,
2174
- k as cn
2827
+ di as CustomButton,
2828
+ mi as Footer,
2829
+ Mt as Link,
2830
+ vi as MainNav,
2831
+ F as cn
2175
2832
  };
2176
2833
  //# sourceMappingURL=index.mjs.map