highsoft-ui 1.0.49 → 1.0.51

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