@nqlib/nqui 0.4.0 → 0.4.2

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.
Files changed (84) hide show
  1. package/INSTALLATION.md +215 -0
  2. package/README.md +2 -1
  3. package/dist/command-palette-BuYcxPCc.cjs +5 -0
  4. package/dist/command-palette-dEJ9aEk4.js +694 -0
  5. package/dist/command.cjs.js +1 -1
  6. package/dist/command.es.js +1 -1
  7. package/dist/components/custom/enhanced-badge.d.ts +1 -1
  8. package/dist/components/custom/enhanced-button.d.ts +6 -1
  9. package/dist/components/custom/enhanced-button.d.ts.map +1 -1
  10. package/dist/components/custom/enhanced-checkbox.d.ts +11 -0
  11. package/dist/components/custom/enhanced-checkbox.d.ts.map +1 -1
  12. package/dist/components/custom/enhanced-radio-group.d.ts +13 -4
  13. package/dist/components/custom/enhanced-radio-group.d.ts.map +1 -1
  14. package/dist/components/custom/enhanced-sonner.d.ts +5 -6
  15. package/dist/components/custom/enhanced-sonner.d.ts.map +1 -1
  16. package/dist/components/custom/enhanced-tabs.d.ts.map +1 -1
  17. package/dist/components/error-boundary.d.ts +20 -0
  18. package/dist/components/error-boundary.d.ts.map +1 -0
  19. package/dist/components/index.d.ts +102 -0
  20. package/dist/components/index.d.ts.map +1 -0
  21. package/dist/components/ui/badge.d.ts +1 -1
  22. package/dist/components/ui/button.d.ts +1 -1
  23. package/dist/components/ui/checkbox.d.ts +4 -1
  24. package/dist/components/ui/checkbox.d.ts.map +1 -1
  25. package/dist/components/ui/input-group.d.ts +1 -1
  26. package/dist/components/ui/input-group.d.ts.map +1 -1
  27. package/dist/components/ui/radio-group.d.ts +3 -1
  28. package/dist/components/ui/radio-group.d.ts.map +1 -1
  29. package/dist/components/ui/sidebar.d.ts.map +1 -1
  30. package/dist/debug-panel-AjzBdMMz.js +9198 -0
  31. package/dist/debug-panel-NaOmD68t.cjs +171 -0
  32. package/dist/debug.cjs.js +1 -0
  33. package/dist/debug.es.js +7 -0
  34. package/dist/drawer-Cqq0Ozb2.cjs +1 -0
  35. package/dist/{drawer-CU4lkcz7.js → drawer-pUXPg3lF.js} +2 -2
  36. package/dist/drawer.cjs.js +1 -1
  37. package/dist/drawer.es.js +1 -1
  38. package/dist/entries/debug.d.ts +14 -0
  39. package/dist/entries/debug.d.ts.map +1 -0
  40. package/dist/hooks/use-mobile.d.ts.map +1 -1
  41. package/dist/hooks/use-scroll-spy.d.ts.map +1 -1
  42. package/dist/index-CI756mSv.cjs +41 -0
  43. package/dist/index-CgfzsUO6.js +1069 -0
  44. package/dist/index.d.ts +2 -98
  45. package/dist/index.d.ts.map +1 -1
  46. package/dist/lib/index.d.ts +9 -0
  47. package/dist/lib/index.d.ts.map +1 -0
  48. package/dist/nqui.cjs.js +42 -212
  49. package/dist/nqui.es.js +8589 -17780
  50. package/dist/sonner-BtzU00r3.js +248 -0
  51. package/dist/sonner-Dfk26eds.cjs +54 -0
  52. package/dist/sonner.cjs.js +1 -1
  53. package/dist/sonner.es.js +1 -1
  54. package/dist/styles.css +3 -0
  55. package/docs/components/README.md +99 -1
  56. package/docs/components/nqui-card.md +7 -0
  57. package/docs/components/nqui-checkbox.md +23 -1
  58. package/docs/components/nqui-radio-group.md +45 -2
  59. package/docs/components/nqui-tabs.md +11 -1
  60. package/docs/nqui-skills/SKILL.md +95 -0
  61. package/docs/nqui-skills/design-system.md +130 -0
  62. package/docs/nqui-skills/rules/composition.md +183 -0
  63. package/docs/nqui-skills/rules/forms.md +190 -0
  64. package/docs/nqui-skills/rules/icons.md +158 -0
  65. package/docs/nqui-skills/rules/styling.md +192 -0
  66. package/package.json +23 -10
  67. package/scripts/cli.js +1 -0
  68. package/scripts/download-skills.js +91 -0
  69. package/scripts/examples/nextjs-layout-sidebar.tsx +100 -0
  70. package/scripts/examples/nextjs-page-sidebar.tsx +81 -0
  71. package/scripts/examples/vite-app.tsx +135 -0
  72. package/scripts/examples/vite-main.tsx +17 -0
  73. package/scripts/examples.js +92 -6
  74. package/scripts/generate-docs.js +169 -0
  75. package/scripts/init-css.js +34 -14
  76. package/scripts/init-cursor.js +8 -0
  77. package/scripts/post-install.js +41 -9
  78. package/scripts/resolve-target-dir.js +20 -1
  79. package/scripts/wizard.js +12 -7
  80. package/dist/command-palette-UHk8zZOg.cjs +0 -45
  81. package/dist/command-palette-d-TrdBsM.js +0 -1778
  82. package/dist/drawer-BcIxWRN8.cjs +0 -1
  83. package/dist/sonner-Co6YpYVs.js +0 -546
  84. package/dist/sonner-DbQhVp8m.cjs +0 -330
@@ -0,0 +1,1069 @@
1
+ import * as a from "react";
2
+ import { useState as Te } from "react";
3
+ import { jsx as A } from "react/jsx-runtime";
4
+ import * as Me from "react-dom";
5
+ import Le from "react-dom";
6
+ import { createSlot as De } from "@radix-ui/react-slot";
7
+ var ke = [
8
+ "a",
9
+ "button",
10
+ "div",
11
+ "form",
12
+ "h2",
13
+ "h3",
14
+ "img",
15
+ "input",
16
+ "label",
17
+ "li",
18
+ "nav",
19
+ "ol",
20
+ "p",
21
+ "select",
22
+ "span",
23
+ "svg",
24
+ "ul"
25
+ ], V = ke.reduce((e, t) => {
26
+ const n = De(`Primitive.${t}`), r = a.forwardRef((o, c) => {
27
+ const { asChild: u, ...i } = o, v = u ? n : t;
28
+ return typeof window < "u" && (window[/* @__PURE__ */ Symbol.for("radix-ui")] = !0), /* @__PURE__ */ A(v, { ...i, ref: c });
29
+ });
30
+ return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
31
+ }, {});
32
+ function xe(e, t) {
33
+ e && Me.flushSync(() => e.dispatchEvent(t));
34
+ }
35
+ function tn(e, t) {
36
+ const n = a.createContext(t), r = (c) => {
37
+ const { children: u, ...i } = c, v = a.useMemo(() => i, Object.values(i));
38
+ return /* @__PURE__ */ A(n.Provider, { value: v, children: u });
39
+ };
40
+ r.displayName = e + "Provider";
41
+ function o(c) {
42
+ const u = a.useContext(n);
43
+ if (u) return u;
44
+ if (t !== void 0) return t;
45
+ throw new Error(`\`${c}\` must be used within \`${e}\``);
46
+ }
47
+ return [r, o];
48
+ }
49
+ function nn(e, t = []) {
50
+ let n = [];
51
+ function r(c, u) {
52
+ const i = a.createContext(u), v = n.length;
53
+ n = [...n, u];
54
+ const l = (d) => {
55
+ const { scope: m, children: p, ...w } = d, s = m?.[e]?.[v] || i, h = a.useMemo(() => w, Object.values(w));
56
+ return /* @__PURE__ */ A(s.Provider, { value: h, children: p });
57
+ };
58
+ l.displayName = c + "Provider";
59
+ function f(d, m) {
60
+ const p = m?.[e]?.[v] || i, w = a.useContext(p);
61
+ if (w) return w;
62
+ if (u !== void 0) return u;
63
+ throw new Error(`\`${d}\` must be used within \`${c}\``);
64
+ }
65
+ return [l, f];
66
+ }
67
+ const o = () => {
68
+ const c = n.map((u) => a.createContext(u));
69
+ return function(i) {
70
+ const v = i?.[e] || c;
71
+ return a.useMemo(
72
+ () => ({ [`__scope${e}`]: { ...i, [e]: v } }),
73
+ [i, v]
74
+ );
75
+ };
76
+ };
77
+ return o.scopeName = e, [r, Ie(o, ...t)];
78
+ }
79
+ function Ie(...e) {
80
+ const t = e[0];
81
+ if (e.length === 1) return t;
82
+ const n = () => {
83
+ const r = e.map((o) => ({
84
+ useScope: o(),
85
+ scopeName: o.scopeName
86
+ }));
87
+ return function(c) {
88
+ const u = r.reduce((i, { useScope: v, scopeName: l }) => {
89
+ const d = v(c)[`__scope${l}`];
90
+ return { ...i, ...d };
91
+ }, {});
92
+ return a.useMemo(() => ({ [`__scope${t.scopeName}`]: u }), [u]);
93
+ };
94
+ };
95
+ return n.scopeName = t.scopeName, n;
96
+ }
97
+ function ae(e, t) {
98
+ if (typeof e == "function")
99
+ return e(t);
100
+ e != null && (e.current = t);
101
+ }
102
+ function Fe(...e) {
103
+ return (t) => {
104
+ let n = !1;
105
+ const r = e.map((o) => {
106
+ const c = ae(o, t);
107
+ return !n && typeof c == "function" && (n = !0), c;
108
+ });
109
+ if (n)
110
+ return () => {
111
+ for (let o = 0; o < r.length; o++) {
112
+ const c = r[o];
113
+ typeof c == "function" ? c() : ae(e[o], null);
114
+ }
115
+ };
116
+ };
117
+ }
118
+ function X(...e) {
119
+ return a.useCallback(Fe(...e), e);
120
+ }
121
+ function z(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
122
+ return function(o) {
123
+ if (e?.(o), n === !1 || !o.defaultPrevented)
124
+ return t?.(o);
125
+ };
126
+ }
127
+ var I = globalThis?.document ? a.useLayoutEffect : () => {
128
+ }, We = a[" useInsertionEffect ".trim().toString()] || I;
129
+ function rn({
130
+ prop: e,
131
+ defaultProp: t,
132
+ onChange: n = () => {
133
+ },
134
+ caller: r
135
+ }) {
136
+ const [o, c, u] = _e({
137
+ defaultProp: t,
138
+ onChange: n
139
+ }), i = e !== void 0, v = i ? e : o;
140
+ {
141
+ const f = a.useRef(e !== void 0);
142
+ a.useEffect(() => {
143
+ const d = f.current;
144
+ d !== i && console.warn(
145
+ `${r} is changing from ${d ? "controlled" : "uncontrolled"} to ${i ? "controlled" : "uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
146
+ ), f.current = i;
147
+ }, [i, r]);
148
+ }
149
+ const l = a.useCallback(
150
+ (f) => {
151
+ if (i) {
152
+ const d = Be(f) ? f(e) : f;
153
+ d !== e && u.current?.(d);
154
+ } else
155
+ c(f);
156
+ },
157
+ [i, e, c, u]
158
+ );
159
+ return [v, l];
160
+ }
161
+ function _e({
162
+ defaultProp: e,
163
+ onChange: t
164
+ }) {
165
+ const [n, r] = a.useState(e), o = a.useRef(n), c = a.useRef(t);
166
+ return We(() => {
167
+ c.current = t;
168
+ }, [t]), a.useEffect(() => {
169
+ o.current !== n && (c.current?.(n), o.current = n);
170
+ }, [n, o]), [n, r, c];
171
+ }
172
+ function Be(e) {
173
+ return typeof e == "function";
174
+ }
175
+ function Ue(e, t) {
176
+ return a.useReducer((n, r) => t[n][r] ?? n, e);
177
+ }
178
+ var je = (e) => {
179
+ const { present: t, children: n } = e, r = He(t), o = typeof n == "function" ? n({ present: r.isPresent }) : a.Children.only(n), c = X(r.ref, Ke(o));
180
+ return typeof n == "function" || r.isPresent ? a.cloneElement(o, { ref: c }) : null;
181
+ };
182
+ je.displayName = "Presence";
183
+ function He(e) {
184
+ const [t, n] = a.useState(), r = a.useRef(null), o = a.useRef(e), c = a.useRef("none"), u = e ? "mounted" : "unmounted", [i, v] = Ue(u, {
185
+ mounted: {
186
+ UNMOUNT: "unmounted",
187
+ ANIMATION_OUT: "unmountSuspended"
188
+ },
189
+ unmountSuspended: {
190
+ MOUNT: "mounted",
191
+ ANIMATION_END: "unmounted"
192
+ },
193
+ unmounted: {
194
+ MOUNT: "mounted"
195
+ }
196
+ });
197
+ return a.useEffect(() => {
198
+ const l = _(r.current);
199
+ c.current = i === "mounted" ? l : "none";
200
+ }, [i]), I(() => {
201
+ const l = r.current, f = o.current;
202
+ if (f !== e) {
203
+ const m = c.current, p = _(l);
204
+ e ? v("MOUNT") : p === "none" || l?.display === "none" ? v("UNMOUNT") : v(f && m !== p ? "ANIMATION_OUT" : "UNMOUNT"), o.current = e;
205
+ }
206
+ }, [e, v]), I(() => {
207
+ if (t) {
208
+ let l;
209
+ const f = t.ownerDocument.defaultView ?? window, d = (p) => {
210
+ const s = _(r.current).includes(CSS.escape(p.animationName));
211
+ if (p.target === t && s && (v("ANIMATION_END"), !o.current)) {
212
+ const h = t.style.animationFillMode;
213
+ t.style.animationFillMode = "forwards", l = f.setTimeout(() => {
214
+ t.style.animationFillMode === "forwards" && (t.style.animationFillMode = h);
215
+ });
216
+ }
217
+ }, m = (p) => {
218
+ p.target === t && (c.current = _(r.current));
219
+ };
220
+ return t.addEventListener("animationstart", m), t.addEventListener("animationcancel", d), t.addEventListener("animationend", d), () => {
221
+ f.clearTimeout(l), t.removeEventListener("animationstart", m), t.removeEventListener("animationcancel", d), t.removeEventListener("animationend", d);
222
+ };
223
+ } else
224
+ v("ANIMATION_END");
225
+ }, [t, v]), {
226
+ isPresent: ["mounted", "unmountSuspended"].includes(i),
227
+ ref: a.useCallback((l) => {
228
+ r.current = l ? getComputedStyle(l) : null, n(l);
229
+ }, [])
230
+ };
231
+ }
232
+ function _(e) {
233
+ return e?.animationName || "none";
234
+ }
235
+ function Ke(e) {
236
+ let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
237
+ 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);
238
+ }
239
+ var $e = a[" useId ".trim().toString()] || (() => {
240
+ }), Ve = 0;
241
+ function on(e) {
242
+ const [t, n] = a.useState($e());
243
+ return I(() => {
244
+ n((r) => r ?? String(Ve++));
245
+ }, [e]), e || (t ? `radix-${t}` : "");
246
+ }
247
+ function F(e) {
248
+ const t = a.useRef(e);
249
+ return a.useEffect(() => {
250
+ t.current = e;
251
+ }), a.useMemo(() => (...n) => t.current?.(...n), []);
252
+ }
253
+ function Xe(e, t = globalThis?.document) {
254
+ const n = F(e);
255
+ a.useEffect(() => {
256
+ const r = (o) => {
257
+ o.key === "Escape" && n(o);
258
+ };
259
+ return t.addEventListener("keydown", r, { capture: !0 }), () => t.removeEventListener("keydown", r, { capture: !0 });
260
+ }, [n, t]);
261
+ }
262
+ var Ye = "DismissableLayer", ne = "dismissableLayer.update", ze = "dismissableLayer.pointerDownOutside", Ge = "dismissableLayer.focusOutside", ie, Ee = a.createContext({
263
+ layers: /* @__PURE__ */ new Set(),
264
+ layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
265
+ branches: /* @__PURE__ */ new Set()
266
+ }), Ze = a.forwardRef(
267
+ (e, t) => {
268
+ const {
269
+ disableOutsidePointerEvents: n = !1,
270
+ onEscapeKeyDown: r,
271
+ onPointerDownOutside: o,
272
+ onFocusOutside: c,
273
+ onInteractOutside: u,
274
+ onDismiss: i,
275
+ ...v
276
+ } = e, l = a.useContext(Ee), [f, d] = a.useState(null), m = f?.ownerDocument ?? globalThis?.document, [, p] = a.useState({}), w = X(t, (E) => d(E)), s = Array.from(l.layers), [h] = [...l.layersWithOutsidePointerEventsDisabled].slice(-1), y = s.indexOf(h), g = f ? s.indexOf(f) : -1, b = l.layersWithOutsidePointerEventsDisabled.size > 0, S = g >= y, C = Je((E) => {
277
+ const N = E.target, T = [...l.branches].some((x) => x.contains(N));
278
+ !S || T || (o?.(E), u?.(E), E.defaultPrevented || i?.());
279
+ }, m), P = et((E) => {
280
+ const N = E.target;
281
+ [...l.branches].some((x) => x.contains(N)) || (c?.(E), u?.(E), E.defaultPrevented || i?.());
282
+ }, m);
283
+ return Xe((E) => {
284
+ g === l.layers.size - 1 && (r?.(E), !E.defaultPrevented && i && (E.preventDefault(), i()));
285
+ }, m), a.useEffect(() => {
286
+ if (f)
287
+ return n && (l.layersWithOutsidePointerEventsDisabled.size === 0 && (ie = m.body.style.pointerEvents, m.body.style.pointerEvents = "none"), l.layersWithOutsidePointerEventsDisabled.add(f)), l.layers.add(f), ce(), () => {
288
+ n && l.layersWithOutsidePointerEventsDisabled.size === 1 && (m.body.style.pointerEvents = ie);
289
+ };
290
+ }, [f, m, n, l]), a.useEffect(() => () => {
291
+ f && (l.layers.delete(f), l.layersWithOutsidePointerEventsDisabled.delete(f), ce());
292
+ }, [f, l]), a.useEffect(() => {
293
+ const E = () => p({});
294
+ return document.addEventListener(ne, E), () => document.removeEventListener(ne, E);
295
+ }, []), /* @__PURE__ */ A(
296
+ V.div,
297
+ {
298
+ ...v,
299
+ ref: w,
300
+ style: {
301
+ pointerEvents: b ? S ? "auto" : "none" : void 0,
302
+ ...e.style
303
+ },
304
+ onFocusCapture: z(e.onFocusCapture, P.onFocusCapture),
305
+ onBlurCapture: z(e.onBlurCapture, P.onBlurCapture),
306
+ onPointerDownCapture: z(
307
+ e.onPointerDownCapture,
308
+ C.onPointerDownCapture
309
+ )
310
+ }
311
+ );
312
+ }
313
+ );
314
+ Ze.displayName = Ye;
315
+ var qe = "DismissableLayerBranch", Qe = a.forwardRef((e, t) => {
316
+ const n = a.useContext(Ee), r = a.useRef(null), o = X(t, r);
317
+ return a.useEffect(() => {
318
+ const c = r.current;
319
+ if (c)
320
+ return n.branches.add(c), () => {
321
+ n.branches.delete(c);
322
+ };
323
+ }, [n.branches]), /* @__PURE__ */ A(V.div, { ...e, ref: o });
324
+ });
325
+ Qe.displayName = qe;
326
+ function Je(e, t = globalThis?.document) {
327
+ const n = F(e), r = a.useRef(!1), o = a.useRef(() => {
328
+ });
329
+ return a.useEffect(() => {
330
+ const c = (i) => {
331
+ if (i.target && !r.current) {
332
+ let v = function() {
333
+ ge(
334
+ ze,
335
+ n,
336
+ l,
337
+ { discrete: !0 }
338
+ );
339
+ };
340
+ const l = { originalEvent: i };
341
+ i.pointerType === "touch" ? (t.removeEventListener("click", o.current), o.current = v, t.addEventListener("click", o.current, { once: !0 })) : v();
342
+ } else
343
+ t.removeEventListener("click", o.current);
344
+ r.current = !1;
345
+ }, u = window.setTimeout(() => {
346
+ t.addEventListener("pointerdown", c);
347
+ }, 0);
348
+ return () => {
349
+ window.clearTimeout(u), t.removeEventListener("pointerdown", c), t.removeEventListener("click", o.current);
350
+ };
351
+ }, [t, n]), {
352
+ // ensures we check React component tree (not just DOM tree)
353
+ onPointerDownCapture: () => r.current = !0
354
+ };
355
+ }
356
+ function et(e, t = globalThis?.document) {
357
+ const n = F(e), r = a.useRef(!1);
358
+ return a.useEffect(() => {
359
+ const o = (c) => {
360
+ c.target && !r.current && ge(Ge, n, { originalEvent: c }, {
361
+ discrete: !1
362
+ });
363
+ };
364
+ return t.addEventListener("focusin", o), () => t.removeEventListener("focusin", o);
365
+ }, [t, n]), {
366
+ onFocusCapture: () => r.current = !0,
367
+ onBlurCapture: () => r.current = !1
368
+ };
369
+ }
370
+ function ce() {
371
+ const e = new CustomEvent(ne);
372
+ document.dispatchEvent(e);
373
+ }
374
+ function ge(e, t, n, { discrete: r }) {
375
+ const o = n.originalEvent.target, c = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
376
+ t && o.addEventListener(e, t, { once: !0 }), r ? xe(o, c) : o.dispatchEvent(c);
377
+ }
378
+ var G = "focusScope.autoFocusOnMount", Z = "focusScope.autoFocusOnUnmount", se = { bubbles: !1, cancelable: !0 }, tt = "FocusScope", nt = a.forwardRef((e, t) => {
379
+ const {
380
+ loop: n = !1,
381
+ trapped: r = !1,
382
+ onMountAutoFocus: o,
383
+ onUnmountAutoFocus: c,
384
+ ...u
385
+ } = e, [i, v] = a.useState(null), l = F(o), f = F(c), d = a.useRef(null), m = X(t, (s) => v(s)), p = a.useRef({
386
+ paused: !1,
387
+ pause() {
388
+ this.paused = !0;
389
+ },
390
+ resume() {
391
+ this.paused = !1;
392
+ }
393
+ }).current;
394
+ a.useEffect(() => {
395
+ if (r) {
396
+ let s = function(b) {
397
+ if (p.paused || !i) return;
398
+ const S = b.target;
399
+ i.contains(S) ? d.current = S : O(d.current, { select: !0 });
400
+ }, h = function(b) {
401
+ if (p.paused || !i) return;
402
+ const S = b.relatedTarget;
403
+ S !== null && (i.contains(S) || O(d.current, { select: !0 }));
404
+ }, y = function(b) {
405
+ if (document.activeElement === document.body)
406
+ for (const C of b)
407
+ C.removedNodes.length > 0 && O(i);
408
+ };
409
+ document.addEventListener("focusin", s), document.addEventListener("focusout", h);
410
+ const g = new MutationObserver(y);
411
+ return i && g.observe(i, { childList: !0, subtree: !0 }), () => {
412
+ document.removeEventListener("focusin", s), document.removeEventListener("focusout", h), g.disconnect();
413
+ };
414
+ }
415
+ }, [r, i, p.paused]), a.useEffect(() => {
416
+ if (i) {
417
+ le.add(p);
418
+ const s = document.activeElement;
419
+ if (!i.contains(s)) {
420
+ const y = new CustomEvent(G, se);
421
+ i.addEventListener(G, l), i.dispatchEvent(y), y.defaultPrevented || (rt(st(be(i)), { select: !0 }), document.activeElement === s && O(i));
422
+ }
423
+ return () => {
424
+ i.removeEventListener(G, l), setTimeout(() => {
425
+ const y = new CustomEvent(Z, se);
426
+ i.addEventListener(Z, f), i.dispatchEvent(y), y.defaultPrevented || O(s ?? document.body, { select: !0 }), i.removeEventListener(Z, f), le.remove(p);
427
+ }, 0);
428
+ };
429
+ }
430
+ }, [i, l, f, p]);
431
+ const w = a.useCallback(
432
+ (s) => {
433
+ if (!n && !r || p.paused) return;
434
+ const h = s.key === "Tab" && !s.altKey && !s.ctrlKey && !s.metaKey, y = document.activeElement;
435
+ if (h && y) {
436
+ const g = s.currentTarget, [b, S] = ot(g);
437
+ b && S ? !s.shiftKey && y === S ? (s.preventDefault(), n && O(b, { select: !0 })) : s.shiftKey && y === b && (s.preventDefault(), n && O(S, { select: !0 })) : y === g && s.preventDefault();
438
+ }
439
+ },
440
+ [n, r, p.paused]
441
+ );
442
+ return /* @__PURE__ */ A(V.div, { tabIndex: -1, ...u, ref: m, onKeyDown: w });
443
+ });
444
+ nt.displayName = tt;
445
+ function rt(e, { select: t = !1 } = {}) {
446
+ const n = document.activeElement;
447
+ for (const r of e)
448
+ if (O(r, { select: t }), document.activeElement !== n) return;
449
+ }
450
+ function ot(e) {
451
+ const t = be(e), n = ue(t, e), r = ue(t.reverse(), e);
452
+ return [n, r];
453
+ }
454
+ function be(e) {
455
+ const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
456
+ acceptNode: (r) => {
457
+ const o = r.tagName === "INPUT" && r.type === "hidden";
458
+ return r.disabled || r.hidden || o ? NodeFilter.FILTER_SKIP : r.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
459
+ }
460
+ });
461
+ for (; n.nextNode(); ) t.push(n.currentNode);
462
+ return t;
463
+ }
464
+ function ue(e, t) {
465
+ for (const n of e)
466
+ if (!at(n, { upTo: t })) return n;
467
+ }
468
+ function at(e, { upTo: t }) {
469
+ if (getComputedStyle(e).visibility === "hidden") return !0;
470
+ for (; e; ) {
471
+ if (t !== void 0 && e === t) return !1;
472
+ if (getComputedStyle(e).display === "none") return !0;
473
+ e = e.parentElement;
474
+ }
475
+ return !1;
476
+ }
477
+ function it(e) {
478
+ return e instanceof HTMLInputElement && "select" in e;
479
+ }
480
+ function O(e, { select: t = !1 } = {}) {
481
+ if (e && e.focus) {
482
+ const n = document.activeElement;
483
+ e.focus({ preventScroll: !0 }), e !== n && it(e) && t && e.select();
484
+ }
485
+ }
486
+ var le = ct();
487
+ function ct() {
488
+ let e = [];
489
+ return {
490
+ add(t) {
491
+ const n = e[0];
492
+ t !== n && n?.pause(), e = fe(e, t), e.unshift(t);
493
+ },
494
+ remove(t) {
495
+ e = fe(e, t), e[0]?.resume();
496
+ }
497
+ };
498
+ }
499
+ function fe(e, t) {
500
+ const n = [...e], r = n.indexOf(t);
501
+ return r !== -1 && n.splice(r, 1), n;
502
+ }
503
+ function st(e) {
504
+ return e.filter((t) => t.tagName !== "A");
505
+ }
506
+ var ut = "Portal", lt = a.forwardRef((e, t) => {
507
+ const { container: n, ...r } = e, [o, c] = a.useState(!1);
508
+ I(() => c(!0), []);
509
+ const u = n || o && globalThis?.document?.body;
510
+ return u ? Le.createPortal(/* @__PURE__ */ A(V.div, { ...r, ref: t }), u) : null;
511
+ });
512
+ lt.displayName = ut;
513
+ var q = 0;
514
+ function an() {
515
+ a.useEffect(() => {
516
+ const e = document.querySelectorAll("[data-radix-focus-guard]");
517
+ return document.body.insertAdjacentElement("afterbegin", e[0] ?? de()), document.body.insertAdjacentElement("beforeend", e[1] ?? de()), q++, () => {
518
+ q === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), q--;
519
+ };
520
+ }, []);
521
+ }
522
+ function de() {
523
+ const e = document.createElement("span");
524
+ 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;
525
+ }
526
+ var R = function() {
527
+ return R = Object.assign || function(t) {
528
+ for (var n, r = 1, o = arguments.length; r < o; r++) {
529
+ n = arguments[r];
530
+ for (var c in n) Object.prototype.hasOwnProperty.call(n, c) && (t[c] = n[c]);
531
+ }
532
+ return t;
533
+ }, R.apply(this, arguments);
534
+ };
535
+ function Se(e, t) {
536
+ var n = {};
537
+ for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
538
+ if (e != null && typeof Object.getOwnPropertySymbols == "function")
539
+ for (var o = 0, r = Object.getOwnPropertySymbols(e); o < r.length; o++)
540
+ t.indexOf(r[o]) < 0 && Object.prototype.propertyIsEnumerable.call(e, r[o]) && (n[r[o]] = e[r[o]]);
541
+ return n;
542
+ }
543
+ function ft(e, t, n) {
544
+ if (n || arguments.length === 2) for (var r = 0, o = t.length, c; r < o; r++)
545
+ (c || !(r in t)) && (c || (c = Array.prototype.slice.call(t, 0, r)), c[r] = t[r]);
546
+ return e.concat(c || Array.prototype.slice.call(t));
547
+ }
548
+ var K = "right-scroll-bar-position", $ = "width-before-scroll-bar", dt = "with-scroll-bars-hidden", vt = "--removed-body-scroll-bar-size";
549
+ function Q(e, t) {
550
+ return typeof e == "function" ? e(t) : e && (e.current = t), e;
551
+ }
552
+ function mt(e, t) {
553
+ var n = Te(function() {
554
+ return {
555
+ // value
556
+ value: e,
557
+ // last callback
558
+ callback: t,
559
+ // "memoized" public interface
560
+ facade: {
561
+ get current() {
562
+ return n.value;
563
+ },
564
+ set current(r) {
565
+ var o = n.value;
566
+ o !== r && (n.value = r, n.callback(r, o));
567
+ }
568
+ }
569
+ };
570
+ })[0];
571
+ return n.callback = t, n.facade;
572
+ }
573
+ var ht = typeof window < "u" ? a.useLayoutEffect : a.useEffect, ve = /* @__PURE__ */ new WeakMap();
574
+ function pt(e, t) {
575
+ var n = mt(null, function(r) {
576
+ return e.forEach(function(o) {
577
+ return Q(o, r);
578
+ });
579
+ });
580
+ return ht(function() {
581
+ var r = ve.get(n);
582
+ if (r) {
583
+ var o = new Set(r), c = new Set(e), u = n.current;
584
+ o.forEach(function(i) {
585
+ c.has(i) || Q(i, null);
586
+ }), c.forEach(function(i) {
587
+ o.has(i) || Q(i, u);
588
+ });
589
+ }
590
+ ve.set(n, e);
591
+ }, [e]), n;
592
+ }
593
+ function yt(e) {
594
+ return e;
595
+ }
596
+ function Et(e, t) {
597
+ t === void 0 && (t = yt);
598
+ var n = [], r = !1, o = {
599
+ read: function() {
600
+ if (r)
601
+ throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
602
+ return n.length ? n[n.length - 1] : e;
603
+ },
604
+ useMedium: function(c) {
605
+ var u = t(c, r);
606
+ return n.push(u), function() {
607
+ n = n.filter(function(i) {
608
+ return i !== u;
609
+ });
610
+ };
611
+ },
612
+ assignSyncMedium: function(c) {
613
+ for (r = !0; n.length; ) {
614
+ var u = n;
615
+ n = [], u.forEach(c);
616
+ }
617
+ n = {
618
+ push: function(i) {
619
+ return c(i);
620
+ },
621
+ filter: function() {
622
+ return n;
623
+ }
624
+ };
625
+ },
626
+ assignMedium: function(c) {
627
+ r = !0;
628
+ var u = [];
629
+ if (n.length) {
630
+ var i = n;
631
+ n = [], i.forEach(c), u = n;
632
+ }
633
+ var v = function() {
634
+ var f = u;
635
+ u = [], f.forEach(c);
636
+ }, l = function() {
637
+ return Promise.resolve().then(v);
638
+ };
639
+ l(), n = {
640
+ push: function(f) {
641
+ u.push(f), l();
642
+ },
643
+ filter: function(f) {
644
+ return u = u.filter(f), n;
645
+ }
646
+ };
647
+ }
648
+ };
649
+ return o;
650
+ }
651
+ function gt(e) {
652
+ e === void 0 && (e = {});
653
+ var t = Et(null);
654
+ return t.options = R({ async: !0, ssr: !1 }, e), t;
655
+ }
656
+ var we = function(e) {
657
+ var t = e.sideCar, n = Se(e, ["sideCar"]);
658
+ if (!t)
659
+ throw new Error("Sidecar: please provide `sideCar` property to import the right car");
660
+ var r = t.read();
661
+ if (!r)
662
+ throw new Error("Sidecar medium not found");
663
+ return a.createElement(r, R({}, n));
664
+ };
665
+ we.isSideCarExport = !0;
666
+ function bt(e, t) {
667
+ return e.useMedium(t), we;
668
+ }
669
+ var Ce = gt(), J = function() {
670
+ }, Y = a.forwardRef(function(e, t) {
671
+ var n = a.useRef(null), r = a.useState({
672
+ onScrollCapture: J,
673
+ onWheelCapture: J,
674
+ onTouchMoveCapture: J
675
+ }), o = r[0], c = r[1], u = e.forwardProps, i = e.children, v = e.className, l = e.removeScrollBar, f = e.enabled, d = e.shards, m = e.sideCar, p = e.noRelative, w = e.noIsolation, s = e.inert, h = e.allowPinchZoom, y = e.as, g = y === void 0 ? "div" : y, b = e.gapMode, S = Se(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), C = m, P = pt([n, t]), E = R(R({}, S), o);
676
+ return a.createElement(
677
+ a.Fragment,
678
+ null,
679
+ f && a.createElement(C, { sideCar: Ce, removeScrollBar: l, shards: d, noRelative: p, noIsolation: w, inert: s, setCallbacks: c, allowPinchZoom: !!h, lockRef: n, gapMode: b }),
680
+ u ? a.cloneElement(a.Children.only(i), R(R({}, E), { ref: P })) : a.createElement(g, R({}, E, { className: v, ref: P }), i)
681
+ );
682
+ });
683
+ Y.defaultProps = {
684
+ enabled: !0,
685
+ removeScrollBar: !0,
686
+ inert: !1
687
+ };
688
+ Y.classNames = {
689
+ fullWidth: $,
690
+ zeroRight: K
691
+ };
692
+ var St = function() {
693
+ if (typeof __webpack_nonce__ < "u")
694
+ return __webpack_nonce__;
695
+ };
696
+ function wt() {
697
+ if (!document)
698
+ return null;
699
+ var e = document.createElement("style");
700
+ e.type = "text/css";
701
+ var t = St();
702
+ return t && e.setAttribute("nonce", t), e;
703
+ }
704
+ function Ct(e, t) {
705
+ e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
706
+ }
707
+ function Pt(e) {
708
+ var t = document.head || document.getElementsByTagName("head")[0];
709
+ t.appendChild(e);
710
+ }
711
+ var Rt = function() {
712
+ var e = 0, t = null;
713
+ return {
714
+ add: function(n) {
715
+ e == 0 && (t = wt()) && (Ct(t, n), Pt(t)), e++;
716
+ },
717
+ remove: function() {
718
+ e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
719
+ }
720
+ };
721
+ }, Ot = function() {
722
+ var e = Rt();
723
+ return function(t, n) {
724
+ a.useEffect(function() {
725
+ return e.add(t), function() {
726
+ e.remove();
727
+ };
728
+ }, [t && n]);
729
+ };
730
+ }, Pe = function() {
731
+ var e = Ot(), t = function(n) {
732
+ var r = n.styles, o = n.dynamic;
733
+ return e(r, o), null;
734
+ };
735
+ return t;
736
+ }, Nt = {
737
+ left: 0,
738
+ top: 0,
739
+ right: 0,
740
+ gap: 0
741
+ }, ee = function(e) {
742
+ return parseInt(e || "", 10) || 0;
743
+ }, At = function(e) {
744
+ var t = window.getComputedStyle(document.body), n = t[e === "padding" ? "paddingLeft" : "marginLeft"], r = t[e === "padding" ? "paddingTop" : "marginTop"], o = t[e === "padding" ? "paddingRight" : "marginRight"];
745
+ return [ee(n), ee(r), ee(o)];
746
+ }, Tt = function(e) {
747
+ if (e === void 0 && (e = "margin"), typeof window > "u")
748
+ return Nt;
749
+ var t = At(e), n = document.documentElement.clientWidth, r = window.innerWidth;
750
+ return {
751
+ left: t[0],
752
+ top: t[1],
753
+ right: t[2],
754
+ gap: Math.max(0, r - n + t[2] - t[0])
755
+ };
756
+ }, Mt = Pe(), k = "data-scroll-locked", Lt = function(e, t, n, r) {
757
+ var o = e.left, c = e.top, u = e.right, i = e.gap;
758
+ return n === void 0 && (n = "margin"), `
759
+ .`.concat(dt, ` {
760
+ overflow: hidden `).concat(r, `;
761
+ padding-right: `).concat(i, "px ").concat(r, `;
762
+ }
763
+ body[`).concat(k, `] {
764
+ overflow: hidden `).concat(r, `;
765
+ overscroll-behavior: contain;
766
+ `).concat([
767
+ t && "position: relative ".concat(r, ";"),
768
+ n === "margin" && `
769
+ padding-left: `.concat(o, `px;
770
+ padding-top: `).concat(c, `px;
771
+ padding-right: `).concat(u, `px;
772
+ margin-left:0;
773
+ margin-top:0;
774
+ margin-right: `).concat(i, "px ").concat(r, `;
775
+ `),
776
+ n === "padding" && "padding-right: ".concat(i, "px ").concat(r, ";")
777
+ ].filter(Boolean).join(""), `
778
+ }
779
+
780
+ .`).concat(K, ` {
781
+ right: `).concat(i, "px ").concat(r, `;
782
+ }
783
+
784
+ .`).concat($, ` {
785
+ margin-right: `).concat(i, "px ").concat(r, `;
786
+ }
787
+
788
+ .`).concat(K, " .").concat(K, ` {
789
+ right: 0 `).concat(r, `;
790
+ }
791
+
792
+ .`).concat($, " .").concat($, ` {
793
+ margin-right: 0 `).concat(r, `;
794
+ }
795
+
796
+ body[`).concat(k, `] {
797
+ `).concat(vt, ": ").concat(i, `px;
798
+ }
799
+ `);
800
+ }, me = function() {
801
+ var e = parseInt(document.body.getAttribute(k) || "0", 10);
802
+ return isFinite(e) ? e : 0;
803
+ }, Dt = function() {
804
+ a.useEffect(function() {
805
+ return document.body.setAttribute(k, (me() + 1).toString()), function() {
806
+ var e = me() - 1;
807
+ e <= 0 ? document.body.removeAttribute(k) : document.body.setAttribute(k, e.toString());
808
+ };
809
+ }, []);
810
+ }, kt = function(e) {
811
+ var t = e.noRelative, n = e.noImportant, r = e.gapMode, o = r === void 0 ? "margin" : r;
812
+ Dt();
813
+ var c = a.useMemo(function() {
814
+ return Tt(o);
815
+ }, [o]);
816
+ return a.createElement(Mt, { styles: Lt(c, !t, o, n ? "" : "!important") });
817
+ }, re = !1;
818
+ if (typeof window < "u")
819
+ try {
820
+ var B = Object.defineProperty({}, "passive", {
821
+ get: function() {
822
+ return re = !0, !0;
823
+ }
824
+ });
825
+ window.addEventListener("test", B, B), window.removeEventListener("test", B, B);
826
+ } catch {
827
+ re = !1;
828
+ }
829
+ var M = re ? { passive: !1 } : !1, xt = function(e) {
830
+ return e.tagName === "TEXTAREA";
831
+ }, Re = function(e, t) {
832
+ if (!(e instanceof Element))
833
+ return !1;
834
+ var n = window.getComputedStyle(e);
835
+ return (
836
+ // not-not-scrollable
837
+ n[t] !== "hidden" && // contains scroll inside self
838
+ !(n.overflowY === n.overflowX && !xt(e) && n[t] === "visible")
839
+ );
840
+ }, It = function(e) {
841
+ return Re(e, "overflowY");
842
+ }, Ft = function(e) {
843
+ return Re(e, "overflowX");
844
+ }, he = function(e, t) {
845
+ var n = t.ownerDocument, r = t;
846
+ do {
847
+ typeof ShadowRoot < "u" && r instanceof ShadowRoot && (r = r.host);
848
+ var o = Oe(e, r);
849
+ if (o) {
850
+ var c = Ne(e, r), u = c[1], i = c[2];
851
+ if (u > i)
852
+ return !0;
853
+ }
854
+ r = r.parentNode;
855
+ } while (r && r !== n.body);
856
+ return !1;
857
+ }, Wt = function(e) {
858
+ var t = e.scrollTop, n = e.scrollHeight, r = e.clientHeight;
859
+ return [
860
+ t,
861
+ n,
862
+ r
863
+ ];
864
+ }, _t = function(e) {
865
+ var t = e.scrollLeft, n = e.scrollWidth, r = e.clientWidth;
866
+ return [
867
+ t,
868
+ n,
869
+ r
870
+ ];
871
+ }, Oe = function(e, t) {
872
+ return e === "v" ? It(t) : Ft(t);
873
+ }, Ne = function(e, t) {
874
+ return e === "v" ? Wt(t) : _t(t);
875
+ }, Bt = function(e, t) {
876
+ return e === "h" && t === "rtl" ? -1 : 1;
877
+ }, Ut = function(e, t, n, r, o) {
878
+ var c = Bt(e, window.getComputedStyle(t).direction), u = c * r, i = n.target, v = t.contains(i), l = !1, f = u > 0, d = 0, m = 0;
879
+ do {
880
+ if (!i)
881
+ break;
882
+ var p = Ne(e, i), w = p[0], s = p[1], h = p[2], y = s - h - c * w;
883
+ (w || y) && Oe(e, i) && (d += y, m += w);
884
+ var g = i.parentNode;
885
+ i = g && g.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? g.host : g;
886
+ } while (
887
+ // portaled content
888
+ !v && i !== document.body || // self content
889
+ v && (t.contains(i) || t === i)
890
+ );
891
+ return (f && Math.abs(d) < 1 || !f && Math.abs(m) < 1) && (l = !0), l;
892
+ }, U = function(e) {
893
+ return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
894
+ }, pe = function(e) {
895
+ return [e.deltaX, e.deltaY];
896
+ }, ye = function(e) {
897
+ return e && "current" in e ? e.current : e;
898
+ }, jt = function(e, t) {
899
+ return e[0] === t[0] && e[1] === t[1];
900
+ }, Ht = function(e) {
901
+ return `
902
+ .block-interactivity-`.concat(e, ` {pointer-events: none;}
903
+ .allow-interactivity-`).concat(e, ` {pointer-events: all;}
904
+ `);
905
+ }, Kt = 0, L = [];
906
+ function $t(e) {
907
+ var t = a.useRef([]), n = a.useRef([0, 0]), r = a.useRef(), o = a.useState(Kt++)[0], c = a.useState(Pe)[0], u = a.useRef(e);
908
+ a.useEffect(function() {
909
+ u.current = e;
910
+ }, [e]), a.useEffect(function() {
911
+ if (e.inert) {
912
+ document.body.classList.add("block-interactivity-".concat(o));
913
+ var s = ft([e.lockRef.current], (e.shards || []).map(ye), !0).filter(Boolean);
914
+ return s.forEach(function(h) {
915
+ return h.classList.add("allow-interactivity-".concat(o));
916
+ }), function() {
917
+ document.body.classList.remove("block-interactivity-".concat(o)), s.forEach(function(h) {
918
+ return h.classList.remove("allow-interactivity-".concat(o));
919
+ });
920
+ };
921
+ }
922
+ }, [e.inert, e.lockRef.current, e.shards]);
923
+ var i = a.useCallback(function(s, h) {
924
+ if ("touches" in s && s.touches.length === 2 || s.type === "wheel" && s.ctrlKey)
925
+ return !u.current.allowPinchZoom;
926
+ var y = U(s), g = n.current, b = "deltaX" in s ? s.deltaX : g[0] - y[0], S = "deltaY" in s ? s.deltaY : g[1] - y[1], C, P = s.target, E = Math.abs(b) > Math.abs(S) ? "h" : "v";
927
+ if ("touches" in s && E === "h" && P.type === "range")
928
+ return !1;
929
+ var N = window.getSelection(), T = N && N.anchorNode, x = T ? T === P || T.contains(P) : !1;
930
+ if (x)
931
+ return !1;
932
+ var W = he(E, P);
933
+ if (!W)
934
+ return !0;
935
+ if (W ? C = E : (C = E === "v" ? "h" : "v", W = he(E, P)), !W)
936
+ return !1;
937
+ if (!r.current && "changedTouches" in s && (b || S) && (r.current = C), !C)
938
+ return !0;
939
+ var oe = r.current || C;
940
+ return Ut(oe, h, s, oe === "h" ? b : S);
941
+ }, []), v = a.useCallback(function(s) {
942
+ var h = s;
943
+ if (!(!L.length || L[L.length - 1] !== c)) {
944
+ var y = "deltaY" in h ? pe(h) : U(h), g = t.current.filter(function(C) {
945
+ return C.name === h.type && (C.target === h.target || h.target === C.shadowParent) && jt(C.delta, y);
946
+ })[0];
947
+ if (g && g.should) {
948
+ h.cancelable && h.preventDefault();
949
+ return;
950
+ }
951
+ if (!g) {
952
+ var b = (u.current.shards || []).map(ye).filter(Boolean).filter(function(C) {
953
+ return C.contains(h.target);
954
+ }), S = b.length > 0 ? i(h, b[0]) : !u.current.noIsolation;
955
+ S && h.cancelable && h.preventDefault();
956
+ }
957
+ }
958
+ }, []), l = a.useCallback(function(s, h, y, g) {
959
+ var b = { name: s, delta: h, target: y, should: g, shadowParent: Vt(y) };
960
+ t.current.push(b), setTimeout(function() {
961
+ t.current = t.current.filter(function(S) {
962
+ return S !== b;
963
+ });
964
+ }, 1);
965
+ }, []), f = a.useCallback(function(s) {
966
+ n.current = U(s), r.current = void 0;
967
+ }, []), d = a.useCallback(function(s) {
968
+ l(s.type, pe(s), s.target, i(s, e.lockRef.current));
969
+ }, []), m = a.useCallback(function(s) {
970
+ l(s.type, U(s), s.target, i(s, e.lockRef.current));
971
+ }, []);
972
+ a.useEffect(function() {
973
+ return L.push(c), e.setCallbacks({
974
+ onScrollCapture: d,
975
+ onWheelCapture: d,
976
+ onTouchMoveCapture: m
977
+ }), document.addEventListener("wheel", v, M), document.addEventListener("touchmove", v, M), document.addEventListener("touchstart", f, M), function() {
978
+ L = L.filter(function(s) {
979
+ return s !== c;
980
+ }), document.removeEventListener("wheel", v, M), document.removeEventListener("touchmove", v, M), document.removeEventListener("touchstart", f, M);
981
+ };
982
+ }, []);
983
+ var p = e.removeScrollBar, w = e.inert;
984
+ return a.createElement(
985
+ a.Fragment,
986
+ null,
987
+ w ? a.createElement(c, { styles: Ht(o) }) : null,
988
+ p ? a.createElement(kt, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
989
+ );
990
+ }
991
+ function Vt(e) {
992
+ for (var t = null; e !== null; )
993
+ e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
994
+ return t;
995
+ }
996
+ const Xt = bt(Ce, $t);
997
+ var Yt = a.forwardRef(function(e, t) {
998
+ return a.createElement(Y, R({}, e, { ref: t, sideCar: Xt }));
999
+ });
1000
+ Yt.classNames = Y.classNames;
1001
+ var zt = function(e) {
1002
+ if (typeof document > "u")
1003
+ return null;
1004
+ var t = Array.isArray(e) ? e[0] : e;
1005
+ return t.ownerDocument.body;
1006
+ }, D = /* @__PURE__ */ new WeakMap(), j = /* @__PURE__ */ new WeakMap(), H = {}, te = 0, Ae = function(e) {
1007
+ return e && (e.host || Ae(e.parentNode));
1008
+ }, Gt = function(e, t) {
1009
+ return t.map(function(n) {
1010
+ if (e.contains(n))
1011
+ return n;
1012
+ var r = Ae(n);
1013
+ return r && e.contains(r) ? r : (console.error("aria-hidden", n, "in not contained inside", e, ". Doing nothing"), null);
1014
+ }).filter(function(n) {
1015
+ return !!n;
1016
+ });
1017
+ }, Zt = function(e, t, n, r) {
1018
+ var o = Gt(t, Array.isArray(e) ? e : [e]);
1019
+ H[n] || (H[n] = /* @__PURE__ */ new WeakMap());
1020
+ var c = H[n], u = [], i = /* @__PURE__ */ new Set(), v = new Set(o), l = function(d) {
1021
+ !d || i.has(d) || (i.add(d), l(d.parentNode));
1022
+ };
1023
+ o.forEach(l);
1024
+ var f = function(d) {
1025
+ !d || v.has(d) || Array.prototype.forEach.call(d.children, function(m) {
1026
+ if (i.has(m))
1027
+ f(m);
1028
+ else
1029
+ try {
1030
+ var p = m.getAttribute(r), w = p !== null && p !== "false", s = (D.get(m) || 0) + 1, h = (c.get(m) || 0) + 1;
1031
+ D.set(m, s), c.set(m, h), u.push(m), s === 1 && w && j.set(m, !0), h === 1 && m.setAttribute(n, "true"), w || m.setAttribute(r, "true");
1032
+ } catch (y) {
1033
+ console.error("aria-hidden: cannot operate on ", m, y);
1034
+ }
1035
+ });
1036
+ };
1037
+ return f(t), i.clear(), te++, function() {
1038
+ u.forEach(function(d) {
1039
+ var m = D.get(d) - 1, p = c.get(d) - 1;
1040
+ D.set(d, m), c.set(d, p), m || (j.has(d) || d.removeAttribute(r), j.delete(d)), p || d.removeAttribute(n);
1041
+ }), te--, te || (D = /* @__PURE__ */ new WeakMap(), D = /* @__PURE__ */ new WeakMap(), j = /* @__PURE__ */ new WeakMap(), H = {});
1042
+ };
1043
+ }, cn = function(e, t, n) {
1044
+ n === void 0 && (n = "data-aria-hidden");
1045
+ var r = Array.from(Array.isArray(e) ? e : [e]), o = zt(e);
1046
+ return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live], script"))), Zt(r, o, n, "aria-hidden")) : function() {
1047
+ return null;
1048
+ };
1049
+ };
1050
+ export {
1051
+ Ze as D,
1052
+ nt as F,
1053
+ V as P,
1054
+ Yt as R,
1055
+ tn as a,
1056
+ on as b,
1057
+ nn as c,
1058
+ X as d,
1059
+ z as e,
1060
+ je as f,
1061
+ lt as g,
1062
+ cn as h,
1063
+ an as i,
1064
+ I as j,
1065
+ F as k,
1066
+ Fe as l,
1067
+ xe as m,
1068
+ rn as u
1069
+ };