@purpurds/modal 8.18.0 → 8.20.0

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/modal.es.js CHANGED
@@ -1,37 +1,37 @@
1
- import { jsx as p, jsxs as $, Fragment as xe } from "react/jsx-runtime";
1
+ import { jsx as p, jsxs as $, Fragment as De } from "react/jsx-runtime";
2
2
  import * as s from "react";
3
- import { useState as ye, forwardRef as Ce, useRef as be, useCallback as Zt, useEffect as Ee } from "react";
3
+ import { useState as be, forwardRef as Ne, useRef as Ee, useCallback as Zt, useEffect as we } from "react";
4
4
  import * as Qt from "react-dom";
5
5
  import Jt from "react-dom";
6
- function F(e, t, { checkForDefaultPrevented: r = !0 } = {}) {
6
+ function k(e, t, { checkForDefaultPrevented: r = !0 } = {}) {
7
7
  return function(a) {
8
8
  if (e?.(a), r === !1 || !a.defaultPrevented)
9
9
  return t?.(a);
10
10
  };
11
11
  }
12
- function De(e, t) {
12
+ function Ae(e, t) {
13
13
  if (typeof e == "function")
14
14
  return e(t);
15
15
  e != null && (e.current = t);
16
16
  }
17
- function st(...e) {
17
+ function ct(...e) {
18
18
  return (t) => {
19
19
  let r = !1;
20
20
  const o = e.map((a) => {
21
- const n = De(a, t);
21
+ const n = Ae(a, t);
22
22
  return !r && typeof n == "function" && (r = !0), n;
23
23
  });
24
24
  if (r)
25
25
  return () => {
26
26
  for (let a = 0; a < o.length; a++) {
27
27
  const n = o[a];
28
- typeof n == "function" ? n() : De(e[a], null);
28
+ typeof n == "function" ? n() : Ae(e[a], null);
29
29
  }
30
30
  };
31
31
  };
32
32
  }
33
- function j(...e) {
34
- return s.useCallback(st(...e), e);
33
+ function B(...e) {
34
+ return s.useCallback(ct(...e), e);
35
35
  }
36
36
  function er(e, t) {
37
37
  const r = s.createContext(t), o = (n) => {
@@ -98,7 +98,7 @@ function rr(...e) {
98
98
  var q = globalThis?.document ? s.useLayoutEffect : () => {
99
99
  }, nr = s[" useId ".trim().toString()] || (() => {
100
100
  }), or = 0;
101
- function le(e) {
101
+ function de(e) {
102
102
  const [t, r] = s.useState(nr());
103
103
  return q(() => {
104
104
  r((o) => o ?? String(or++));
@@ -152,7 +152,7 @@ function sr(e) {
152
152
  return typeof e == "function";
153
153
  }
154
154
  // @__NO_SIDE_EFFECTS__
155
- function ct(e) {
155
+ function lt(e) {
156
156
  const t = /* @__PURE__ */ cr(e), r = s.forwardRef((o, a) => {
157
157
  const { children: n, ...u } = o, i = s.Children.toArray(n), d = i.find(dr);
158
158
  if (d) {
@@ -169,13 +169,13 @@ function cr(e) {
169
169
  const { children: a, ...n } = r;
170
170
  if (s.isValidElement(a)) {
171
171
  const u = fr(a), i = pr(n, a.props);
172
- return a.type !== s.Fragment && (i.ref = o ? st(o, u) : u), s.cloneElement(a, i);
172
+ return a.type !== s.Fragment && (i.ref = o ? ct(o, u) : u), s.cloneElement(a, i);
173
173
  }
174
174
  return s.Children.count(a) > 1 ? s.Children.only(null) : null;
175
175
  });
176
176
  return t.displayName = `${e}.SlotClone`, t;
177
177
  }
178
- var lr = Symbol("radix.slottable");
178
+ var lr = /* @__PURE__ */ Symbol("radix.slottable");
179
179
  function dr(e) {
180
180
  return s.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === lr;
181
181
  }
@@ -212,10 +212,10 @@ var vr = [
212
212
  "span",
213
213
  "svg",
214
214
  "ul"
215
- ], M = vr.reduce((e, t) => {
216
- const r = /* @__PURE__ */ ct(`Primitive.${t}`), o = s.forwardRef((a, n) => {
215
+ ], I = vr.reduce((e, t) => {
216
+ const r = /* @__PURE__ */ lt(`Primitive.${t}`), o = s.forwardRef((a, n) => {
217
217
  const { asChild: u, ...i } = a, d = u ? r : t;
218
- return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ p(d, { ...i, ref: n });
218
+ return typeof window < "u" && (window[/* @__PURE__ */ Symbol.for("radix-ui")] = !0), /* @__PURE__ */ p(d, { ...i, ref: n });
219
219
  });
220
220
  return o.displayName = `Primitive.${t}`, { ...e, [t]: o };
221
221
  }, {});
@@ -237,11 +237,11 @@ function mr(e, t = globalThis?.document) {
237
237
  return t.addEventListener("keydown", o, { capture: !0 }), () => t.removeEventListener("keydown", o, { capture: !0 });
238
238
  }, [r, t]);
239
239
  }
240
- var gr = "DismissableLayer", we = "dismissableLayer.update", _r = "dismissableLayer.pointerDownOutside", yr = "dismissableLayer.focusOutside", Ae, lt = s.createContext({
240
+ var gr = "DismissableLayer", Se = "dismissableLayer.update", _r = "dismissableLayer.pointerDownOutside", yr = "dismissableLayer.focusOutside", $e, dt = s.createContext({
241
241
  layers: /* @__PURE__ */ new Set(),
242
242
  layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
243
243
  branches: /* @__PURE__ */ new Set()
244
- }), dt = s.forwardRef(
244
+ }), pt = s.forwardRef(
245
245
  (e, t) => {
246
246
  const {
247
247
  disableOutsidePointerEvents: r = !1,
@@ -251,27 +251,27 @@ var gr = "DismissableLayer", we = "dismissableLayer.update", _r = "dismissableLa
251
251
  onInteractOutside: u,
252
252
  onDismiss: i,
253
253
  ...d
254
- } = e, c = s.useContext(lt), [f, v] = s.useState(null), h = f?.ownerDocument ?? globalThis?.document, [, g] = s.useState({}), b = j(t, (y) => v(y)), l = Array.from(c.layers), [m] = [...c.layersWithOutsidePointerEventsDisabled].slice(-1), _ = l.indexOf(m), E = f ? l.indexOf(f) : -1, w = c.layersWithOutsidePointerEventsDisabled.size > 0, S = E >= _, C = wr((y) => {
255
- const x = y.target, P = [...c.branches].some((V) => V.contains(x));
254
+ } = e, c = s.useContext(dt), [f, v] = s.useState(null), h = f?.ownerDocument ?? globalThis?.document, [, g] = s.useState({}), b = B(t, (y) => v(y)), l = Array.from(c.layers), [m] = [...c.layersWithOutsidePointerEventsDisabled].slice(-1), _ = l.indexOf(m), E = f ? l.indexOf(f) : -1, w = c.layersWithOutsidePointerEventsDisabled.size > 0, S = E >= _, C = wr((y) => {
255
+ const M = y.target, P = [...c.branches].some((j) => j.contains(M));
256
256
  !S || P || (a?.(y), u?.(y), y.defaultPrevented || i?.());
257
257
  }, h), O = Sr((y) => {
258
- const x = y.target;
259
- [...c.branches].some((V) => V.contains(x)) || (n?.(y), u?.(y), y.defaultPrevented || i?.());
258
+ const M = y.target;
259
+ [...c.branches].some((j) => j.contains(M)) || (n?.(y), u?.(y), y.defaultPrevented || i?.());
260
260
  }, h);
261
261
  return mr((y) => {
262
262
  E === c.layers.size - 1 && (o?.(y), !y.defaultPrevented && i && (y.preventDefault(), i()));
263
263
  }, h), s.useEffect(() => {
264
264
  if (f)
265
- return r && (c.layersWithOutsidePointerEventsDisabled.size === 0 && (Ae = h.body.style.pointerEvents, h.body.style.pointerEvents = "none"), c.layersWithOutsidePointerEventsDisabled.add(f)), c.layers.add(f), $e(), () => {
266
- r && c.layersWithOutsidePointerEventsDisabled.size === 1 && (h.body.style.pointerEvents = Ae);
265
+ return r && (c.layersWithOutsidePointerEventsDisabled.size === 0 && ($e = h.body.style.pointerEvents, h.body.style.pointerEvents = "none"), c.layersWithOutsidePointerEventsDisabled.add(f)), c.layers.add(f), Te(), () => {
266
+ r && c.layersWithOutsidePointerEventsDisabled.size === 1 && (h.body.style.pointerEvents = $e);
267
267
  };
268
268
  }, [f, h, r, c]), s.useEffect(() => () => {
269
- f && (c.layers.delete(f), c.layersWithOutsidePointerEventsDisabled.delete(f), $e());
269
+ f && (c.layers.delete(f), c.layersWithOutsidePointerEventsDisabled.delete(f), Te());
270
270
  }, [f, c]), s.useEffect(() => {
271
271
  const y = () => g({});
272
- return document.addEventListener(we, y), () => document.removeEventListener(we, y);
272
+ return document.addEventListener(Se, y), () => document.removeEventListener(Se, y);
273
273
  }, []), /* @__PURE__ */ p(
274
- M.div,
274
+ I.div,
275
275
  {
276
276
  ...d,
277
277
  ref: b,
@@ -279,9 +279,9 @@ var gr = "DismissableLayer", we = "dismissableLayer.update", _r = "dismissableLa
279
279
  pointerEvents: w ? S ? "auto" : "none" : void 0,
280
280
  ...e.style
281
281
  },
282
- onFocusCapture: F(e.onFocusCapture, O.onFocusCapture),
283
- onBlurCapture: F(e.onBlurCapture, O.onBlurCapture),
284
- onPointerDownCapture: F(
282
+ onFocusCapture: k(e.onFocusCapture, O.onFocusCapture),
283
+ onBlurCapture: k(e.onBlurCapture, O.onBlurCapture),
284
+ onPointerDownCapture: k(
285
285
  e.onPointerDownCapture,
286
286
  C.onPointerDownCapture
287
287
  )
@@ -289,16 +289,16 @@ var gr = "DismissableLayer", we = "dismissableLayer.update", _r = "dismissableLa
289
289
  );
290
290
  }
291
291
  );
292
- dt.displayName = gr;
292
+ pt.displayName = gr;
293
293
  var br = "DismissableLayerBranch", Er = s.forwardRef((e, t) => {
294
- const r = s.useContext(lt), o = s.useRef(null), a = j(t, o);
294
+ const r = s.useContext(dt), o = s.useRef(null), a = B(t, o);
295
295
  return s.useEffect(() => {
296
296
  const n = o.current;
297
297
  if (n)
298
298
  return r.branches.add(n), () => {
299
299
  r.branches.delete(n);
300
300
  };
301
- }, [r.branches]), /* @__PURE__ */ p(M.div, { ...e, ref: a });
301
+ }, [r.branches]), /* @__PURE__ */ p(I.div, { ...e, ref: a });
302
302
  });
303
303
  Er.displayName = br;
304
304
  function wr(e, t = globalThis?.document) {
@@ -308,7 +308,7 @@ function wr(e, t = globalThis?.document) {
308
308
  const n = (i) => {
309
309
  if (i.target && !o.current) {
310
310
  let d = function() {
311
- pt(
311
+ ft(
312
312
  _r,
313
313
  r,
314
314
  c,
@@ -335,7 +335,7 @@ function Sr(e, t = globalThis?.document) {
335
335
  const r = Y(e), o = s.useRef(!1);
336
336
  return s.useEffect(() => {
337
337
  const a = (n) => {
338
- n.target && !o.current && pt(yr, r, { originalEvent: n }, {
338
+ n.target && !o.current && ft(yr, r, { originalEvent: n }, {
339
339
  discrete: !1
340
340
  });
341
341
  };
@@ -345,22 +345,22 @@ function Sr(e, t = globalThis?.document) {
345
345
  onBlurCapture: () => o.current = !1
346
346
  };
347
347
  }
348
- function $e() {
349
- const e = new CustomEvent(we);
348
+ function Te() {
349
+ const e = new CustomEvent(Se);
350
350
  document.dispatchEvent(e);
351
351
  }
352
- function pt(e, t, r, { discrete: o }) {
352
+ function ft(e, t, r, { discrete: o }) {
353
353
  const a = r.originalEvent.target, n = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: r });
354
354
  t && a.addEventListener(e, t, { once: !0 }), o ? hr(a, n) : a.dispatchEvent(n);
355
355
  }
356
- var de = "focusScope.autoFocusOnMount", pe = "focusScope.autoFocusOnUnmount", Te = { bubbles: !1, cancelable: !0 }, Cr = "FocusScope", ft = s.forwardRef((e, t) => {
356
+ var pe = "focusScope.autoFocusOnMount", fe = "focusScope.autoFocusOnUnmount", Me = { bubbles: !1, cancelable: !0 }, Cr = "FocusScope", vt = s.forwardRef((e, t) => {
357
357
  const {
358
358
  loop: r = !1,
359
359
  trapped: o = !1,
360
360
  onMountAutoFocus: a,
361
361
  onUnmountAutoFocus: n,
362
362
  ...u
363
- } = e, [i, d] = s.useState(null), c = Y(a), f = Y(n), v = s.useRef(null), h = j(t, (l) => d(l)), g = s.useRef({
363
+ } = e, [i, d] = s.useState(null), c = Y(a), f = Y(n), v = s.useRef(null), h = B(t, (l) => d(l)), g = s.useRef({
364
364
  paused: !1,
365
365
  pause() {
366
366
  this.paused = !0;
@@ -374,15 +374,15 @@ var de = "focusScope.autoFocusOnMount", pe = "focusScope.autoFocusOnUnmount", Te
374
374
  let l = function(w) {
375
375
  if (g.paused || !i) return;
376
376
  const S = w.target;
377
- i.contains(S) ? v.current = S : L(v.current, { select: !0 });
377
+ i.contains(S) ? v.current = S : F(v.current, { select: !0 });
378
378
  }, m = function(w) {
379
379
  if (g.paused || !i) return;
380
380
  const S = w.relatedTarget;
381
- S !== null && (i.contains(S) || L(v.current, { select: !0 }));
381
+ S !== null && (i.contains(S) || F(v.current, { select: !0 }));
382
382
  }, _ = function(w) {
383
383
  if (document.activeElement === document.body)
384
384
  for (const C of w)
385
- C.removedNodes.length > 0 && L(i);
385
+ C.removedNodes.length > 0 && F(i);
386
386
  };
387
387
  document.addEventListener("focusin", l), document.addEventListener("focusout", m);
388
388
  const E = new MutationObserver(_);
@@ -392,16 +392,16 @@ var de = "focusScope.autoFocusOnMount", pe = "focusScope.autoFocusOnUnmount", Te
392
392
  }
393
393
  }, [o, i, g.paused]), s.useEffect(() => {
394
394
  if (i) {
395
- Ie.add(g);
395
+ Le.add(g);
396
396
  const l = document.activeElement;
397
397
  if (!i.contains(l)) {
398
- const _ = new CustomEvent(de, Te);
399
- i.addEventListener(de, c), i.dispatchEvent(_), _.defaultPrevented || (Nr(Dr(vt(i)), { select: !0 }), document.activeElement === l && L(i));
398
+ const _ = new CustomEvent(pe, Me);
399
+ i.addEventListener(pe, c), i.dispatchEvent(_), _.defaultPrevented || (Nr(Dr(ht(i)), { select: !0 }), document.activeElement === l && F(i));
400
400
  }
401
401
  return () => {
402
- i.removeEventListener(de, c), setTimeout(() => {
403
- const _ = new CustomEvent(pe, Te);
404
- i.addEventListener(pe, f), i.dispatchEvent(_), _.defaultPrevented || L(l ?? document.body, { select: !0 }), i.removeEventListener(pe, f), Ie.remove(g);
402
+ i.removeEventListener(pe, c), setTimeout(() => {
403
+ const _ = new CustomEvent(fe, Me);
404
+ i.addEventListener(fe, f), i.dispatchEvent(_), _.defaultPrevented || F(l ?? document.body, { select: !0 }), i.removeEventListener(fe, f), Le.remove(g);
405
405
  }, 0);
406
406
  };
407
407
  }
@@ -412,24 +412,24 @@ var de = "focusScope.autoFocusOnMount", pe = "focusScope.autoFocusOnUnmount", Te
412
412
  const m = l.key === "Tab" && !l.altKey && !l.ctrlKey && !l.metaKey, _ = document.activeElement;
413
413
  if (m && _) {
414
414
  const E = l.currentTarget, [w, S] = Or(E);
415
- w && S ? !l.shiftKey && _ === S ? (l.preventDefault(), r && L(w, { select: !0 })) : l.shiftKey && _ === w && (l.preventDefault(), r && L(S, { select: !0 })) : _ === E && l.preventDefault();
415
+ w && S ? !l.shiftKey && _ === S ? (l.preventDefault(), r && F(w, { select: !0 })) : l.shiftKey && _ === w && (l.preventDefault(), r && F(S, { select: !0 })) : _ === E && l.preventDefault();
416
416
  }
417
417
  },
418
418
  [r, o, g.paused]
419
419
  );
420
- return /* @__PURE__ */ p(M.div, { tabIndex: -1, ...u, ref: h, onKeyDown: b });
420
+ return /* @__PURE__ */ p(I.div, { tabIndex: -1, ...u, ref: h, onKeyDown: b });
421
421
  });
422
- ft.displayName = Cr;
422
+ vt.displayName = Cr;
423
423
  function Nr(e, { select: t = !1 } = {}) {
424
424
  const r = document.activeElement;
425
425
  for (const o of e)
426
- if (L(o, { select: t }), document.activeElement !== r) return;
426
+ if (F(o, { select: t }), document.activeElement !== r) return;
427
427
  }
428
428
  function Or(e) {
429
- const t = vt(e), r = Me(t, e), o = Me(t.reverse(), e);
429
+ const t = ht(e), r = Ie(t, e), o = Ie(t.reverse(), e);
430
430
  return [r, o];
431
431
  }
432
- function vt(e) {
432
+ function ht(e) {
433
433
  const t = [], r = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
434
434
  acceptNode: (o) => {
435
435
  const a = o.tagName === "INPUT" && o.type === "hidden";
@@ -439,7 +439,7 @@ function vt(e) {
439
439
  for (; r.nextNode(); ) t.push(r.currentNode);
440
440
  return t;
441
441
  }
442
- function Me(e, t) {
442
+ function Ie(e, t) {
443
443
  for (const r of e)
444
444
  if (!Rr(r, { upTo: t })) return r;
445
445
  }
@@ -455,47 +455,47 @@ function Rr(e, { upTo: t }) {
455
455
  function Pr(e) {
456
456
  return e instanceof HTMLInputElement && "select" in e;
457
457
  }
458
- function L(e, { select: t = !1 } = {}) {
458
+ function F(e, { select: t = !1 } = {}) {
459
459
  if (e && e.focus) {
460
460
  const r = document.activeElement;
461
461
  e.focus({ preventScroll: !0 }), e !== r && Pr(e) && t && e.select();
462
462
  }
463
463
  }
464
- var Ie = xr();
464
+ var Le = xr();
465
465
  function xr() {
466
466
  let e = [];
467
467
  return {
468
468
  add(t) {
469
469
  const r = e[0];
470
- t !== r && r?.pause(), e = Le(e, t), e.unshift(t);
470
+ t !== r && r?.pause(), e = Fe(e, t), e.unshift(t);
471
471
  },
472
472
  remove(t) {
473
- e = Le(e, t), e[0]?.resume();
473
+ e = Fe(e, t), e[0]?.resume();
474
474
  }
475
475
  };
476
476
  }
477
- function Le(e, t) {
477
+ function Fe(e, t) {
478
478
  const r = [...e], o = r.indexOf(t);
479
479
  return o !== -1 && r.splice(o, 1), r;
480
480
  }
481
481
  function Dr(e) {
482
482
  return e.filter((t) => t.tagName !== "A");
483
483
  }
484
- var Ar = "Portal", ht = s.forwardRef((e, t) => {
484
+ var Ar = "Portal", mt = s.forwardRef((e, t) => {
485
485
  const { container: r, ...o } = e, [a, n] = s.useState(!1);
486
486
  q(() => n(!0), []);
487
487
  const u = r || a && globalThis?.document?.body;
488
- return u ? Jt.createPortal(/* @__PURE__ */ p(M.div, { ...o, ref: t }), u) : null;
488
+ return u ? Jt.createPortal(/* @__PURE__ */ p(I.div, { ...o, ref: t }), u) : null;
489
489
  });
490
- ht.displayName = Ar;
490
+ mt.displayName = Ar;
491
491
  function $r(e, t) {
492
492
  return s.useReducer((r, o) => t[r][o] ?? r, e);
493
493
  }
494
- var ue = (e) => {
495
- const { present: t, children: r } = e, o = Tr(t), a = typeof r == "function" ? r({ present: o.isPresent }) : s.Children.only(r), n = j(o.ref, Mr(a));
494
+ var se = (e) => {
495
+ const { present: t, children: r } = e, o = Tr(t), a = typeof r == "function" ? r({ present: o.isPresent }) : s.Children.only(r), n = B(o.ref, Mr(a));
496
496
  return typeof r == "function" || o.isPresent ? s.cloneElement(a, { ref: n }) : null;
497
497
  };
498
- ue.displayName = "Presence";
498
+ se.displayName = "Presence";
499
499
  function Tr(e) {
500
500
  const [t, r] = s.useState(), o = s.useRef(null), a = s.useRef(e), n = s.useRef("none"), u = e ? "mounted" : "unmounted", [i, d] = $r(u, {
501
501
  mounted: {
@@ -511,19 +511,19 @@ function Tr(e) {
511
511
  }
512
512
  });
513
513
  return s.useEffect(() => {
514
- const c = Z(o.current);
514
+ const c = Q(o.current);
515
515
  n.current = i === "mounted" ? c : "none";
516
516
  }, [i]), q(() => {
517
517
  const c = o.current, f = a.current;
518
518
  if (f !== e) {
519
- const h = n.current, g = Z(c);
519
+ const h = n.current, g = Q(c);
520
520
  e ? d("MOUNT") : g === "none" || c?.display === "none" ? d("UNMOUNT") : d(f && h !== g ? "ANIMATION_OUT" : "UNMOUNT"), a.current = e;
521
521
  }
522
522
  }, [e, d]), q(() => {
523
523
  if (t) {
524
524
  let c;
525
525
  const f = t.ownerDocument.defaultView ?? window, v = (g) => {
526
- const l = Z(o.current).includes(CSS.escape(g.animationName));
526
+ const l = Q(o.current).includes(CSS.escape(g.animationName));
527
527
  if (g.target === t && l && (d("ANIMATION_END"), !a.current)) {
528
528
  const m = t.style.animationFillMode;
529
529
  t.style.animationFillMode = "forwards", c = f.setTimeout(() => {
@@ -531,7 +531,7 @@ function Tr(e) {
531
531
  });
532
532
  }
533
533
  }, h = (g) => {
534
- g.target === t && (n.current = Z(o.current));
534
+ g.target === t && (n.current = Q(o.current));
535
535
  };
536
536
  return t.addEventListener("animationstart", h), t.addEventListener("animationcancel", v), t.addEventListener("animationend", v), () => {
537
537
  f.clearTimeout(c), t.removeEventListener("animationstart", h), t.removeEventListener("animationcancel", v), t.removeEventListener("animationend", v);
@@ -545,23 +545,23 @@ function Tr(e) {
545
545
  }, [])
546
546
  };
547
547
  }
548
- function Z(e) {
548
+ function Q(e) {
549
549
  return e?.animationName || "none";
550
550
  }
551
551
  function Mr(e) {
552
552
  let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, r = t && "isReactWarning" in t && t.isReactWarning;
553
553
  return r ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, r = t && "isReactWarning" in t && t.isReactWarning, r ? e.props.ref : e.props.ref || e.ref);
554
554
  }
555
- var fe = 0;
555
+ var ve = 0;
556
556
  function Ir() {
557
557
  s.useEffect(() => {
558
558
  const e = document.querySelectorAll("[data-radix-focus-guard]");
559
- return document.body.insertAdjacentElement("afterbegin", e[0] ?? Fe()), document.body.insertAdjacentElement("beforeend", e[1] ?? Fe()), fe++, () => {
560
- fe === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), fe--;
559
+ return document.body.insertAdjacentElement("afterbegin", e[0] ?? ke()), document.body.insertAdjacentElement("beforeend", e[1] ?? ke()), ve++, () => {
560
+ ve === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), ve--;
561
561
  };
562
562
  }, []);
563
563
  }
564
- function Fe() {
564
+ function ke() {
565
565
  const e = document.createElement("span");
566
566
  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;
567
567
  }
@@ -574,7 +574,7 @@ var T = function() {
574
574
  return t;
575
575
  }, T.apply(this, arguments);
576
576
  };
577
- function mt(e, t) {
577
+ function gt(e, t) {
578
578
  var r = {};
579
579
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (r[o] = e[o]);
580
580
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
@@ -587,12 +587,12 @@ function Lr(e, t, r) {
587
587
  (n || !(o in t)) && (n || (n = Array.prototype.slice.call(t, 0, o)), n[o] = t[o]);
588
588
  return e.concat(n || Array.prototype.slice.call(t));
589
589
  }
590
- var oe = "right-scroll-bar-position", ae = "width-before-scroll-bar", Fr = "with-scroll-bars-hidden", kr = "--removed-body-scroll-bar-size";
591
- function ve(e, t) {
590
+ var ae = "right-scroll-bar-position", ie = "width-before-scroll-bar", Fr = "with-scroll-bars-hidden", kr = "--removed-body-scroll-bar-size";
591
+ function he(e, t) {
592
592
  return typeof e == "function" ? e(t) : e && (e.current = t), e;
593
593
  }
594
594
  function jr(e, t) {
595
- var r = ye(function() {
595
+ var r = be(function() {
596
596
  return {
597
597
  // value
598
598
  value: e,
@@ -612,24 +612,24 @@ function jr(e, t) {
612
612
  })[0];
613
613
  return r.callback = t, r.facade;
614
614
  }
615
- var Wr = typeof window < "u" ? s.useLayoutEffect : s.useEffect, ke = /* @__PURE__ */ new WeakMap();
615
+ var Wr = typeof window < "u" ? s.useLayoutEffect : s.useEffect, je = /* @__PURE__ */ new WeakMap();
616
616
  function Br(e, t) {
617
617
  var r = jr(null, function(o) {
618
618
  return e.forEach(function(a) {
619
- return ve(a, o);
619
+ return he(a, o);
620
620
  });
621
621
  });
622
622
  return Wr(function() {
623
- var o = ke.get(r);
623
+ var o = je.get(r);
624
624
  if (o) {
625
625
  var a = new Set(o), n = new Set(e), u = r.current;
626
626
  a.forEach(function(i) {
627
- n.has(i) || ve(i, null);
627
+ n.has(i) || he(i, null);
628
628
  }), n.forEach(function(i) {
629
- a.has(i) || ve(i, u);
629
+ a.has(i) || he(i, u);
630
630
  });
631
631
  }
632
- ke.set(r, e);
632
+ je.set(r, e);
633
633
  }, [e]), r;
634
634
  }
635
635
  function Ur(e) {
@@ -695,8 +695,8 @@ function Hr(e) {
695
695
  var t = zr(null);
696
696
  return t.options = T({ async: !0, ssr: !1 }, e), t;
697
697
  }
698
- var gt = function(e) {
699
- var t = e.sideCar, r = mt(e, ["sideCar"]);
698
+ var _t = function(e) {
699
+ var t = e.sideCar, r = gt(e, ["sideCar"]);
700
700
  if (!t)
701
701
  throw new Error("Sidecar: please provide `sideCar` property to import the right car");
702
702
  var o = t.read();
@@ -704,32 +704,32 @@ var gt = function(e) {
704
704
  throw new Error("Sidecar medium not found");
705
705
  return s.createElement(o, T({}, r));
706
706
  };
707
- gt.isSideCarExport = !0;
707
+ _t.isSideCarExport = !0;
708
708
  function Vr(e, t) {
709
- return e.useMedium(t), gt;
709
+ return e.useMedium(t), _t;
710
710
  }
711
- var _t = Hr(), he = function() {
712
- }, se = s.forwardRef(function(e, t) {
711
+ var yt = Hr(), me = function() {
712
+ }, ce = s.forwardRef(function(e, t) {
713
713
  var r = s.useRef(null), o = s.useState({
714
- onScrollCapture: he,
715
- onWheelCapture: he,
716
- onTouchMoveCapture: he
717
- }), a = o[0], n = o[1], u = e.forwardProps, i = e.children, d = e.className, c = e.removeScrollBar, f = e.enabled, v = e.shards, h = e.sideCar, g = e.noRelative, b = e.noIsolation, l = e.inert, m = e.allowPinchZoom, _ = e.as, E = _ === void 0 ? "div" : _, w = e.gapMode, S = mt(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), C = h, O = Br([r, t]), y = T(T({}, S), a);
714
+ onScrollCapture: me,
715
+ onWheelCapture: me,
716
+ onTouchMoveCapture: me
717
+ }), a = o[0], n = o[1], u = e.forwardProps, i = e.children, d = e.className, c = e.removeScrollBar, f = e.enabled, v = e.shards, h = e.sideCar, g = e.noRelative, b = e.noIsolation, l = e.inert, m = e.allowPinchZoom, _ = e.as, E = _ === void 0 ? "div" : _, w = e.gapMode, S = gt(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), C = h, O = Br([r, t]), y = T(T({}, S), a);
718
718
  return s.createElement(
719
719
  s.Fragment,
720
720
  null,
721
- f && s.createElement(C, { sideCar: _t, removeScrollBar: c, shards: v, noRelative: g, noIsolation: b, inert: l, setCallbacks: n, allowPinchZoom: !!m, lockRef: r, gapMode: w }),
721
+ f && s.createElement(C, { sideCar: yt, removeScrollBar: c, shards: v, noRelative: g, noIsolation: b, inert: l, setCallbacks: n, allowPinchZoom: !!m, lockRef: r, gapMode: w }),
722
722
  u ? s.cloneElement(s.Children.only(i), T(T({}, y), { ref: O })) : s.createElement(E, T({}, y, { className: d, ref: O }), i)
723
723
  );
724
724
  });
725
- se.defaultProps = {
725
+ ce.defaultProps = {
726
726
  enabled: !0,
727
727
  removeScrollBar: !0,
728
728
  inert: !1
729
729
  };
730
- se.classNames = {
731
- fullWidth: ae,
732
- zeroRight: oe
730
+ ce.classNames = {
731
+ fullWidth: ie,
732
+ zeroRight: ae
733
733
  };
734
734
  var Kr = function() {
735
735
  if (typeof __webpack_nonce__ < "u")
@@ -769,7 +769,7 @@ var Xr = function() {
769
769
  };
770
770
  }, [t && r]);
771
771
  };
772
- }, yt = function() {
772
+ }, bt = function() {
773
773
  var e = Zr(), t = function(r) {
774
774
  var o = r.styles, a = r.dynamic;
775
775
  return e(o, a), null;
@@ -780,11 +780,11 @@ var Xr = function() {
780
780
  top: 0,
781
781
  right: 0,
782
782
  gap: 0
783
- }, me = function(e) {
783
+ }, ge = function(e) {
784
784
  return parseInt(e || "", 10) || 0;
785
785
  }, Jr = function(e) {
786
786
  var t = window.getComputedStyle(document.body), r = t[e === "padding" ? "paddingLeft" : "marginLeft"], o = t[e === "padding" ? "paddingTop" : "marginTop"], a = t[e === "padding" ? "paddingRight" : "marginRight"];
787
- return [me(r), me(o), me(a)];
787
+ return [ge(r), ge(o), ge(a)];
788
788
  }, en = function(e) {
789
789
  if (e === void 0 && (e = "margin"), typeof window > "u")
790
790
  return Qr;
@@ -795,14 +795,14 @@ var Xr = function() {
795
795
  right: t[2],
796
796
  gap: Math.max(0, o - r + t[2] - t[0])
797
797
  };
798
- }, tn = yt(), H = "data-scroll-locked", rn = function(e, t, r, o) {
798
+ }, tn = bt(), V = "data-scroll-locked", rn = function(e, t, r, o) {
799
799
  var a = e.left, n = e.top, u = e.right, i = e.gap;
800
800
  return r === void 0 && (r = "margin"), `
801
801
  .`.concat(Fr, ` {
802
802
  overflow: hidden `).concat(o, `;
803
803
  padding-right: `).concat(i, "px ").concat(o, `;
804
804
  }
805
- body[`).concat(H, `] {
805
+ body[`).concat(V, `] {
806
806
  overflow: hidden `).concat(o, `;
807
807
  overscroll-behavior: contain;
808
808
  `).concat([
@@ -819,34 +819,34 @@ var Xr = function() {
819
819
  ].filter(Boolean).join(""), `
820
820
  }
821
821
 
822
- .`).concat(oe, ` {
822
+ .`).concat(ae, ` {
823
823
  right: `).concat(i, "px ").concat(o, `;
824
824
  }
825
825
 
826
- .`).concat(ae, ` {
826
+ .`).concat(ie, ` {
827
827
  margin-right: `).concat(i, "px ").concat(o, `;
828
828
  }
829
829
 
830
- .`).concat(oe, " .").concat(oe, ` {
830
+ .`).concat(ae, " .").concat(ae, ` {
831
831
  right: 0 `).concat(o, `;
832
832
  }
833
833
 
834
- .`).concat(ae, " .").concat(ae, ` {
834
+ .`).concat(ie, " .").concat(ie, ` {
835
835
  margin-right: 0 `).concat(o, `;
836
836
  }
837
837
 
838
- body[`).concat(H, `] {
838
+ body[`).concat(V, `] {
839
839
  `).concat(kr, ": ").concat(i, `px;
840
840
  }
841
841
  `);
842
- }, je = function() {
843
- var e = parseInt(document.body.getAttribute(H) || "0", 10);
842
+ }, We = function() {
843
+ var e = parseInt(document.body.getAttribute(V) || "0", 10);
844
844
  return isFinite(e) ? e : 0;
845
845
  }, nn = function() {
846
846
  s.useEffect(function() {
847
- return document.body.setAttribute(H, (je() + 1).toString()), function() {
848
- var e = je() - 1;
849
- e <= 0 ? document.body.removeAttribute(H) : document.body.setAttribute(H, e.toString());
847
+ return document.body.setAttribute(V, (We() + 1).toString()), function() {
848
+ var e = We() - 1;
849
+ e <= 0 ? document.body.removeAttribute(V) : document.body.setAttribute(V, e.toString());
850
850
  };
851
851
  }, []);
852
852
  }, on = function(e) {
@@ -856,21 +856,21 @@ var Xr = function() {
856
856
  return en(a);
857
857
  }, [a]);
858
858
  return s.createElement(tn, { styles: rn(n, !t, a, r ? "" : "!important") });
859
- }, Se = !1;
859
+ }, Ce = !1;
860
860
  if (typeof window < "u")
861
861
  try {
862
- var Q = Object.defineProperty({}, "passive", {
862
+ var J = Object.defineProperty({}, "passive", {
863
863
  get: function() {
864
- return Se = !0, !0;
864
+ return Ce = !0, !0;
865
865
  }
866
866
  });
867
- window.addEventListener("test", Q, Q), window.removeEventListener("test", Q, Q);
867
+ window.addEventListener("test", J, J), window.removeEventListener("test", J, J);
868
868
  } catch {
869
- Se = !1;
869
+ Ce = !1;
870
870
  }
871
- var B = Se ? { passive: !1 } : !1, an = function(e) {
871
+ var U = Ce ? { passive: !1 } : !1, an = function(e) {
872
872
  return e.tagName === "TEXTAREA";
873
- }, bt = function(e, t) {
873
+ }, Et = function(e, t) {
874
874
  if (!(e instanceof Element))
875
875
  return !1;
876
876
  var r = window.getComputedStyle(e);
@@ -880,16 +880,16 @@ var B = Se ? { passive: !1 } : !1, an = function(e) {
880
880
  !(r.overflowY === r.overflowX && !an(e) && r[t] === "visible")
881
881
  );
882
882
  }, un = function(e) {
883
- return bt(e, "overflowY");
883
+ return Et(e, "overflowY");
884
884
  }, sn = function(e) {
885
- return bt(e, "overflowX");
886
- }, We = function(e, t) {
885
+ return Et(e, "overflowX");
886
+ }, Be = function(e, t) {
887
887
  var r = t.ownerDocument, o = t;
888
888
  do {
889
889
  typeof ShadowRoot < "u" && o instanceof ShadowRoot && (o = o.host);
890
- var a = Et(e, o);
890
+ var a = wt(e, o);
891
891
  if (a) {
892
- var n = wt(e, o), u = n[1], i = n[2];
892
+ var n = St(e, o), u = n[1], i = n[2];
893
893
  if (u > i)
894
894
  return !0;
895
895
  }
@@ -910,9 +910,9 @@ var B = Se ? { passive: !1 } : !1, an = function(e) {
910
910
  r,
911
911
  o
912
912
  ];
913
- }, Et = function(e, t) {
914
- return e === "v" ? un(t) : sn(t);
915
913
  }, wt = function(e, t) {
914
+ return e === "v" ? un(t) : sn(t);
915
+ }, St = function(e, t) {
916
916
  return e === "v" ? cn(t) : ln(t);
917
917
  }, dn = function(e, t) {
918
918
  return e === "h" && t === "rtl" ? -1 : 1;
@@ -921,8 +921,8 @@ var B = Se ? { passive: !1 } : !1, an = function(e) {
921
921
  do {
922
922
  if (!i)
923
923
  break;
924
- var g = wt(e, i), b = g[0], l = g[1], m = g[2], _ = l - m - n * b;
925
- (b || _) && Et(e, i) && (v += _, h += b);
924
+ var g = St(e, i), b = g[0], l = g[1], m = g[2], _ = l - m - n * b;
925
+ (b || _) && wt(e, i) && (v += _, h += b);
926
926
  var E = i.parentNode;
927
927
  i = E && E.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? E.host : E;
928
928
  } while (
@@ -931,11 +931,11 @@ var B = Se ? { passive: !1 } : !1, an = function(e) {
931
931
  d && (t.contains(i) || t === i)
932
932
  );
933
933
  return (f && Math.abs(v) < 1 || !f && Math.abs(h) < 1) && (c = !0), c;
934
- }, J = function(e) {
934
+ }, ee = function(e) {
935
935
  return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
936
- }, Be = function(e) {
937
- return [e.deltaX, e.deltaY];
938
936
  }, Ue = function(e) {
937
+ return [e.deltaX, e.deltaY];
938
+ }, ze = function(e) {
939
939
  return e && "current" in e ? e.current : e;
940
940
  }, fn = function(e, t) {
941
941
  return e[0] === t[0] && e[1] === t[1];
@@ -944,15 +944,15 @@ var B = Se ? { passive: !1 } : !1, an = function(e) {
944
944
  .block-interactivity-`.concat(e, ` {pointer-events: none;}
945
945
  .allow-interactivity-`).concat(e, ` {pointer-events: all;}
946
946
  `);
947
- }, hn = 0, U = [];
947
+ }, hn = 0, z = [];
948
948
  function mn(e) {
949
- var t = s.useRef([]), r = s.useRef([0, 0]), o = s.useRef(), a = s.useState(hn++)[0], n = s.useState(yt)[0], u = s.useRef(e);
949
+ var t = s.useRef([]), r = s.useRef([0, 0]), o = s.useRef(), a = s.useState(hn++)[0], n = s.useState(bt)[0], u = s.useRef(e);
950
950
  s.useEffect(function() {
951
951
  u.current = e;
952
952
  }, [e]), s.useEffect(function() {
953
953
  if (e.inert) {
954
954
  document.body.classList.add("block-interactivity-".concat(a));
955
- var l = Lr([e.lockRef.current], (e.shards || []).map(Ue), !0).filter(Boolean);
955
+ var l = Lr([e.lockRef.current], (e.shards || []).map(ze), !0).filter(Boolean);
956
956
  return l.forEach(function(m) {
957
957
  return m.classList.add("allow-interactivity-".concat(a));
958
958
  }), function() {
@@ -965,22 +965,25 @@ function mn(e) {
965
965
  var i = s.useCallback(function(l, m) {
966
966
  if ("touches" in l && l.touches.length === 2 || l.type === "wheel" && l.ctrlKey)
967
967
  return !u.current.allowPinchZoom;
968
- var _ = J(l), E = r.current, w = "deltaX" in l ? l.deltaX : E[0] - _[0], S = "deltaY" in l ? l.deltaY : E[1] - _[1], C, O = l.target, y = Math.abs(w) > Math.abs(S) ? "h" : "v";
968
+ var _ = ee(l), E = r.current, w = "deltaX" in l ? l.deltaX : E[0] - _[0], S = "deltaY" in l ? l.deltaY : E[1] - _[1], C, O = l.target, y = Math.abs(w) > Math.abs(S) ? "h" : "v";
969
969
  if ("touches" in l && y === "h" && O.type === "range")
970
970
  return !1;
971
- var x = We(y, O);
971
+ var M = window.getSelection(), P = M && M.anchorNode, j = P ? P === O || P.contains(O) : !1;
972
+ if (j)
973
+ return !1;
974
+ var x = Be(y, O);
972
975
  if (!x)
973
976
  return !0;
974
- if (x ? C = y : (C = y === "v" ? "h" : "v", x = We(y, O)), !x)
977
+ if (x ? C = y : (C = y === "v" ? "h" : "v", x = Be(y, O)), !x)
975
978
  return !1;
976
979
  if (!o.current && "changedTouches" in l && (w || S) && (o.current = C), !C)
977
980
  return !0;
978
- var P = o.current || C;
979
- return pn(P, m, l, P === "h" ? w : S);
981
+ var X = o.current || C;
982
+ return pn(X, m, l, X === "h" ? w : S);
980
983
  }, []), d = s.useCallback(function(l) {
981
984
  var m = l;
982
- if (!(!U.length || U[U.length - 1] !== n)) {
983
- var _ = "deltaY" in m ? Be(m) : J(m), E = t.current.filter(function(C) {
985
+ if (!(!z.length || z[z.length - 1] !== n)) {
986
+ var _ = "deltaY" in m ? Ue(m) : ee(m), E = t.current.filter(function(C) {
984
987
  return C.name === m.type && (C.target === m.target || m.target === C.shadowParent) && fn(C.delta, _);
985
988
  })[0];
986
989
  if (E && E.should) {
@@ -988,7 +991,7 @@ function mn(e) {
988
991
  return;
989
992
  }
990
993
  if (!E) {
991
- var w = (u.current.shards || []).map(Ue).filter(Boolean).filter(function(C) {
994
+ var w = (u.current.shards || []).map(ze).filter(Boolean).filter(function(C) {
992
995
  return C.contains(m.target);
993
996
  }), S = w.length > 0 ? i(m, w[0]) : !u.current.noIsolation;
994
997
  S && m.cancelable && m.preventDefault();
@@ -1002,21 +1005,21 @@ function mn(e) {
1002
1005
  });
1003
1006
  }, 1);
1004
1007
  }, []), f = s.useCallback(function(l) {
1005
- r.current = J(l), o.current = void 0;
1008
+ r.current = ee(l), o.current = void 0;
1006
1009
  }, []), v = s.useCallback(function(l) {
1007
- c(l.type, Be(l), l.target, i(l, e.lockRef.current));
1010
+ c(l.type, Ue(l), l.target, i(l, e.lockRef.current));
1008
1011
  }, []), h = s.useCallback(function(l) {
1009
- c(l.type, J(l), l.target, i(l, e.lockRef.current));
1012
+ c(l.type, ee(l), l.target, i(l, e.lockRef.current));
1010
1013
  }, []);
1011
1014
  s.useEffect(function() {
1012
- return U.push(n), e.setCallbacks({
1015
+ return z.push(n), e.setCallbacks({
1013
1016
  onScrollCapture: v,
1014
1017
  onWheelCapture: v,
1015
1018
  onTouchMoveCapture: h
1016
- }), document.addEventListener("wheel", d, B), document.addEventListener("touchmove", d, B), document.addEventListener("touchstart", f, B), function() {
1017
- U = U.filter(function(l) {
1019
+ }), document.addEventListener("wheel", d, U), document.addEventListener("touchmove", d, U), document.addEventListener("touchstart", f, U), function() {
1020
+ z = z.filter(function(l) {
1018
1021
  return l !== n;
1019
- }), document.removeEventListener("wheel", d, B), document.removeEventListener("touchmove", d, B), document.removeEventListener("touchstart", f, B);
1022
+ }), document.removeEventListener("wheel", d, U), document.removeEventListener("touchmove", d, U), document.removeEventListener("touchstart", f, U);
1020
1023
  };
1021
1024
  }, []);
1022
1025
  var g = e.removeScrollBar, b = e.inert;
@@ -1032,31 +1035,31 @@ function gn(e) {
1032
1035
  e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
1033
1036
  return t;
1034
1037
  }
1035
- const _n = Vr(_t, mn);
1036
- var St = s.forwardRef(function(e, t) {
1037
- return s.createElement(se, T({}, e, { ref: t, sideCar: _n }));
1038
+ const _n = Vr(yt, mn);
1039
+ var Ct = s.forwardRef(function(e, t) {
1040
+ return s.createElement(ce, T({}, e, { ref: t, sideCar: _n }));
1038
1041
  });
1039
- St.classNames = se.classNames;
1042
+ Ct.classNames = ce.classNames;
1040
1043
  var yn = function(e) {
1041
1044
  if (typeof document > "u")
1042
1045
  return null;
1043
1046
  var t = Array.isArray(e) ? e[0] : e;
1044
1047
  return t.ownerDocument.body;
1045
- }, z = /* @__PURE__ */ new WeakMap(), ee = /* @__PURE__ */ new WeakMap(), te = {}, ge = 0, Ct = function(e) {
1046
- return e && (e.host || Ct(e.parentNode));
1048
+ }, H = /* @__PURE__ */ new WeakMap(), te = /* @__PURE__ */ new WeakMap(), re = {}, _e = 0, Nt = function(e) {
1049
+ return e && (e.host || Nt(e.parentNode));
1047
1050
  }, bn = function(e, t) {
1048
1051
  return t.map(function(r) {
1049
1052
  if (e.contains(r))
1050
1053
  return r;
1051
- var o = Ct(r);
1054
+ var o = Nt(r);
1052
1055
  return o && e.contains(o) ? o : (console.error("aria-hidden", r, "in not contained inside", e, ". Doing nothing"), null);
1053
1056
  }).filter(function(r) {
1054
1057
  return !!r;
1055
1058
  });
1056
1059
  }, En = function(e, t, r, o) {
1057
1060
  var a = bn(t, Array.isArray(e) ? e : [e]);
1058
- te[r] || (te[r] = /* @__PURE__ */ new WeakMap());
1059
- var n = te[r], u = [], i = /* @__PURE__ */ new Set(), d = new Set(a), c = function(v) {
1061
+ re[r] || (re[r] = /* @__PURE__ */ new WeakMap());
1062
+ var n = re[r], u = [], i = /* @__PURE__ */ new Set(), d = new Set(a), c = function(v) {
1060
1063
  !v || i.has(v) || (i.add(v), c(v.parentNode));
1061
1064
  };
1062
1065
  a.forEach(c);
@@ -1066,18 +1069,18 @@ var yn = function(e) {
1066
1069
  f(h);
1067
1070
  else
1068
1071
  try {
1069
- var g = h.getAttribute(o), b = g !== null && g !== "false", l = (z.get(h) || 0) + 1, m = (n.get(h) || 0) + 1;
1070
- z.set(h, l), n.set(h, m), u.push(h), l === 1 && b && ee.set(h, !0), m === 1 && h.setAttribute(r, "true"), b || h.setAttribute(o, "true");
1072
+ var g = h.getAttribute(o), b = g !== null && g !== "false", l = (H.get(h) || 0) + 1, m = (n.get(h) || 0) + 1;
1073
+ H.set(h, l), n.set(h, m), u.push(h), l === 1 && b && te.set(h, !0), m === 1 && h.setAttribute(r, "true"), b || h.setAttribute(o, "true");
1071
1074
  } catch (_) {
1072
1075
  console.error("aria-hidden: cannot operate on ", h, _);
1073
1076
  }
1074
1077
  });
1075
1078
  };
1076
- return f(t), i.clear(), ge++, function() {
1079
+ return f(t), i.clear(), _e++, function() {
1077
1080
  u.forEach(function(v) {
1078
- var h = z.get(v) - 1, g = n.get(v) - 1;
1079
- z.set(v, h), n.set(v, g), h || (ee.has(v) || v.removeAttribute(o), ee.delete(v)), g || v.removeAttribute(r);
1080
- }), ge--, ge || (z = /* @__PURE__ */ new WeakMap(), z = /* @__PURE__ */ new WeakMap(), ee = /* @__PURE__ */ new WeakMap(), te = {});
1081
+ var h = H.get(v) - 1, g = n.get(v) - 1;
1082
+ H.set(v, h), n.set(v, g), h || (te.has(v) || v.removeAttribute(o), te.delete(v)), g || v.removeAttribute(r);
1083
+ }), _e--, _e || (H = /* @__PURE__ */ new WeakMap(), H = /* @__PURE__ */ new WeakMap(), te = /* @__PURE__ */ new WeakMap(), re = {});
1081
1084
  };
1082
1085
  }, wn = function(e, t, r) {
1083
1086
  r === void 0 && (r = "data-aria-hidden");
@@ -1085,7 +1088,7 @@ var yn = function(e) {
1085
1088
  return a ? (o.push.apply(o, Array.from(a.querySelectorAll("[aria-live], script"))), En(o, a, r, "aria-hidden")) : function() {
1086
1089
  return null;
1087
1090
  };
1088
- }, ce = "Dialog", [Nt] = tr(ce), [Sn, D] = Nt(ce), Ot = (e) => {
1091
+ }, le = "Dialog", [Ot] = tr(le), [Sn, D] = Ot(le), Rt = (e) => {
1089
1092
  const {
1090
1093
  __scopeDialog: t,
1091
1094
  children: r,
@@ -1097,7 +1100,7 @@ var yn = function(e) {
1097
1100
  prop: o,
1098
1101
  defaultProp: a ?? !1,
1099
1102
  onChange: n,
1100
- caller: ce
1103
+ caller: le
1101
1104
  });
1102
1105
  return /* @__PURE__ */ p(
1103
1106
  Sn,
@@ -1105,9 +1108,9 @@ var yn = function(e) {
1105
1108
  scope: t,
1106
1109
  triggerRef: i,
1107
1110
  contentRef: d,
1108
- contentId: le(),
1109
- titleId: le(),
1110
- descriptionId: le(),
1111
+ contentId: de(),
1112
+ titleId: de(),
1113
+ descriptionId: de(),
1111
1114
  open: c,
1112
1115
  onOpenChange: f,
1113
1116
  onOpenToggle: s.useCallback(() => f((v) => !v), [f]),
@@ -1116,50 +1119,50 @@ var yn = function(e) {
1116
1119
  }
1117
1120
  );
1118
1121
  };
1119
- Ot.displayName = ce;
1120
- var Rt = "DialogTrigger", Pt = s.forwardRef(
1122
+ Rt.displayName = le;
1123
+ var Pt = "DialogTrigger", xt = s.forwardRef(
1121
1124
  (e, t) => {
1122
- const { __scopeDialog: r, ...o } = e, a = D(Rt, r), n = j(t, a.triggerRef);
1125
+ const { __scopeDialog: r, ...o } = e, a = D(Pt, r), n = B(t, a.triggerRef);
1123
1126
  return /* @__PURE__ */ p(
1124
- M.button,
1127
+ I.button,
1125
1128
  {
1126
1129
  type: "button",
1127
1130
  "aria-haspopup": "dialog",
1128
1131
  "aria-expanded": a.open,
1129
1132
  "aria-controls": a.contentId,
1130
- "data-state": Re(a.open),
1133
+ "data-state": Pe(a.open),
1131
1134
  ...o,
1132
1135
  ref: n,
1133
- onClick: F(e.onClick, a.onOpenToggle)
1136
+ onClick: k(e.onClick, a.onOpenToggle)
1134
1137
  }
1135
1138
  );
1136
1139
  }
1137
1140
  );
1138
- Pt.displayName = Rt;
1139
- var Ne = "DialogPortal", [Cn, xt] = Nt(Ne, {
1141
+ xt.displayName = Pt;
1142
+ var Oe = "DialogPortal", [Cn, Dt] = Ot(Oe, {
1140
1143
  forceMount: void 0
1141
- }), Dt = (e) => {
1142
- const { __scopeDialog: t, forceMount: r, children: o, container: a } = e, n = D(Ne, t);
1143
- return /* @__PURE__ */ p(Cn, { scope: t, forceMount: r, children: s.Children.map(o, (u) => /* @__PURE__ */ p(ue, { present: r || n.open, children: /* @__PURE__ */ p(ht, { asChild: !0, container: a, children: u }) })) });
1144
+ }), At = (e) => {
1145
+ const { __scopeDialog: t, forceMount: r, children: o, container: a } = e, n = D(Oe, t);
1146
+ return /* @__PURE__ */ p(Cn, { scope: t, forceMount: r, children: s.Children.map(o, (u) => /* @__PURE__ */ p(se, { present: r || n.open, children: /* @__PURE__ */ p(mt, { asChild: !0, container: a, children: u }) })) });
1144
1147
  };
1145
- Dt.displayName = Ne;
1146
- var ie = "DialogOverlay", At = s.forwardRef(
1148
+ At.displayName = Oe;
1149
+ var ue = "DialogOverlay", $t = s.forwardRef(
1147
1150
  (e, t) => {
1148
- const r = xt(ie, e.__scopeDialog), { forceMount: o = r.forceMount, ...a } = e, n = D(ie, e.__scopeDialog);
1149
- return n.modal ? /* @__PURE__ */ p(ue, { present: o || n.open, children: /* @__PURE__ */ p(On, { ...a, ref: t }) }) : null;
1151
+ const r = Dt(ue, e.__scopeDialog), { forceMount: o = r.forceMount, ...a } = e, n = D(ue, e.__scopeDialog);
1152
+ return n.modal ? /* @__PURE__ */ p(se, { present: o || n.open, children: /* @__PURE__ */ p(On, { ...a, ref: t }) }) : null;
1150
1153
  }
1151
1154
  );
1152
- At.displayName = ie;
1153
- var Nn = /* @__PURE__ */ ct("DialogOverlay.RemoveScroll"), On = s.forwardRef(
1155
+ $t.displayName = ue;
1156
+ var Nn = /* @__PURE__ */ lt("DialogOverlay.RemoveScroll"), On = s.forwardRef(
1154
1157
  (e, t) => {
1155
- const { __scopeDialog: r, ...o } = e, a = D(ie, r);
1158
+ const { __scopeDialog: r, ...o } = e, a = D(ue, r);
1156
1159
  return (
1157
1160
  // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
1158
1161
  // ie. when `Overlay` and `Content` are siblings
1159
- /* @__PURE__ */ p(St, { as: Nn, allowPinchZoom: !0, shards: [a.contentRef], children: /* @__PURE__ */ p(
1160
- M.div,
1162
+ /* @__PURE__ */ p(Ct, { as: Nn, allowPinchZoom: !0, shards: [a.contentRef], children: /* @__PURE__ */ p(
1163
+ I.div,
1161
1164
  {
1162
- "data-state": Re(a.open),
1165
+ "data-state": Pe(a.open),
1163
1166
  ...o,
1164
1167
  ref: t,
1165
1168
  style: { pointerEvents: "auto", ...o.style }
@@ -1167,34 +1170,34 @@ var Nn = /* @__PURE__ */ ct("DialogOverlay.RemoveScroll"), On = s.forwardRef(
1167
1170
  ) })
1168
1171
  );
1169
1172
  }
1170
- ), k = "DialogContent", $t = s.forwardRef(
1173
+ ), W = "DialogContent", Tt = s.forwardRef(
1171
1174
  (e, t) => {
1172
- const r = xt(k, e.__scopeDialog), { forceMount: o = r.forceMount, ...a } = e, n = D(k, e.__scopeDialog);
1173
- return /* @__PURE__ */ p(ue, { present: o || n.open, children: n.modal ? /* @__PURE__ */ p(Rn, { ...a, ref: t }) : /* @__PURE__ */ p(Pn, { ...a, ref: t }) });
1175
+ const r = Dt(W, e.__scopeDialog), { forceMount: o = r.forceMount, ...a } = e, n = D(W, e.__scopeDialog);
1176
+ return /* @__PURE__ */ p(se, { present: o || n.open, children: n.modal ? /* @__PURE__ */ p(Rn, { ...a, ref: t }) : /* @__PURE__ */ p(Pn, { ...a, ref: t }) });
1174
1177
  }
1175
1178
  );
1176
- $t.displayName = k;
1179
+ Tt.displayName = W;
1177
1180
  var Rn = s.forwardRef(
1178
1181
  (e, t) => {
1179
- const r = D(k, e.__scopeDialog), o = s.useRef(null), a = j(t, r.contentRef, o);
1182
+ const r = D(W, e.__scopeDialog), o = s.useRef(null), a = B(t, r.contentRef, o);
1180
1183
  return s.useEffect(() => {
1181
1184
  const n = o.current;
1182
1185
  if (n) return wn(n);
1183
1186
  }, []), /* @__PURE__ */ p(
1184
- Tt,
1187
+ Mt,
1185
1188
  {
1186
1189
  ...e,
1187
1190
  ref: a,
1188
1191
  trapFocus: r.open,
1189
1192
  disableOutsidePointerEvents: !0,
1190
- onCloseAutoFocus: F(e.onCloseAutoFocus, (n) => {
1193
+ onCloseAutoFocus: k(e.onCloseAutoFocus, (n) => {
1191
1194
  n.preventDefault(), r.triggerRef.current?.focus();
1192
1195
  }),
1193
- onPointerDownOutside: F(e.onPointerDownOutside, (n) => {
1196
+ onPointerDownOutside: k(e.onPointerDownOutside, (n) => {
1194
1197
  const u = n.detail.originalEvent, i = u.button === 0 && u.ctrlKey === !0;
1195
1198
  (u.button === 2 || i) && n.preventDefault();
1196
1199
  }),
1197
- onFocusOutside: F(
1200
+ onFocusOutside: k(
1198
1201
  e.onFocusOutside,
1199
1202
  (n) => n.preventDefault()
1200
1203
  )
@@ -1203,9 +1206,9 @@ var Rn = s.forwardRef(
1203
1206
  }
1204
1207
  ), Pn = s.forwardRef(
1205
1208
  (e, t) => {
1206
- const r = D(k, e.__scopeDialog), o = s.useRef(!1), a = s.useRef(!1);
1209
+ const r = D(W, e.__scopeDialog), o = s.useRef(!1), a = s.useRef(!1);
1207
1210
  return /* @__PURE__ */ p(
1208
- Tt,
1211
+ Mt,
1209
1212
  {
1210
1213
  ...e,
1211
1214
  ref: t,
@@ -1222,12 +1225,12 @@ var Rn = s.forwardRef(
1222
1225
  }
1223
1226
  );
1224
1227
  }
1225
- ), Tt = s.forwardRef(
1228
+ ), Mt = s.forwardRef(
1226
1229
  (e, t) => {
1227
- const { __scopeDialog: r, trapFocus: o, onOpenAutoFocus: a, onCloseAutoFocus: n, ...u } = e, i = D(k, r), d = s.useRef(null), c = j(t, d);
1228
- return Ir(), /* @__PURE__ */ $(xe, { children: [
1230
+ const { __scopeDialog: r, trapFocus: o, onOpenAutoFocus: a, onCloseAutoFocus: n, ...u } = e, i = D(W, r), d = s.useRef(null), c = B(t, d);
1231
+ return Ir(), /* @__PURE__ */ $(De, { children: [
1229
1232
  /* @__PURE__ */ p(
1230
- ft,
1233
+ vt,
1231
1234
  {
1232
1235
  asChild: !0,
1233
1236
  loop: !0,
@@ -1235,13 +1238,13 @@ var Rn = s.forwardRef(
1235
1238
  onMountAutoFocus: a,
1236
1239
  onUnmountAutoFocus: n,
1237
1240
  children: /* @__PURE__ */ p(
1238
- dt,
1241
+ pt,
1239
1242
  {
1240
1243
  role: "dialog",
1241
1244
  id: i.contentId,
1242
1245
  "aria-describedby": i.descriptionId,
1243
1246
  "aria-labelledby": i.titleId,
1244
- "data-state": Re(i.open),
1247
+ "data-state": Pe(i.open),
1245
1248
  ...u,
1246
1249
  ref: c,
1247
1250
  onDismiss: () => i.onOpenChange(!1)
@@ -1249,50 +1252,50 @@ var Rn = s.forwardRef(
1249
1252
  )
1250
1253
  }
1251
1254
  ),
1252
- /* @__PURE__ */ $(xe, { children: [
1255
+ /* @__PURE__ */ $(De, { children: [
1253
1256
  /* @__PURE__ */ p(xn, { titleId: i.titleId }),
1254
1257
  /* @__PURE__ */ p(An, { contentRef: d, descriptionId: i.descriptionId })
1255
1258
  ] })
1256
1259
  ] });
1257
1260
  }
1258
- ), Oe = "DialogTitle", Mt = s.forwardRef(
1261
+ ), Re = "DialogTitle", It = s.forwardRef(
1259
1262
  (e, t) => {
1260
- const { __scopeDialog: r, ...o } = e, a = D(Oe, r);
1261
- return /* @__PURE__ */ p(M.h2, { id: a.titleId, ...o, ref: t });
1263
+ const { __scopeDialog: r, ...o } = e, a = D(Re, r);
1264
+ return /* @__PURE__ */ p(I.h2, { id: a.titleId, ...o, ref: t });
1262
1265
  }
1263
1266
  );
1264
- Mt.displayName = Oe;
1265
- var It = "DialogDescription", Lt = s.forwardRef(
1267
+ It.displayName = Re;
1268
+ var Lt = "DialogDescription", Ft = s.forwardRef(
1266
1269
  (e, t) => {
1267
- const { __scopeDialog: r, ...o } = e, a = D(It, r);
1268
- return /* @__PURE__ */ p(M.p, { id: a.descriptionId, ...o, ref: t });
1270
+ const { __scopeDialog: r, ...o } = e, a = D(Lt, r);
1271
+ return /* @__PURE__ */ p(I.p, { id: a.descriptionId, ...o, ref: t });
1269
1272
  }
1270
1273
  );
1271
- Lt.displayName = It;
1272
- var Ft = "DialogClose", kt = s.forwardRef(
1274
+ Ft.displayName = Lt;
1275
+ var kt = "DialogClose", jt = s.forwardRef(
1273
1276
  (e, t) => {
1274
- const { __scopeDialog: r, ...o } = e, a = D(Ft, r);
1277
+ const { __scopeDialog: r, ...o } = e, a = D(kt, r);
1275
1278
  return /* @__PURE__ */ p(
1276
- M.button,
1279
+ I.button,
1277
1280
  {
1278
1281
  type: "button",
1279
1282
  ...o,
1280
1283
  ref: t,
1281
- onClick: F(e.onClick, () => a.onOpenChange(!1))
1284
+ onClick: k(e.onClick, () => a.onOpenChange(!1))
1282
1285
  }
1283
1286
  );
1284
1287
  }
1285
1288
  );
1286
- kt.displayName = Ft;
1287
- function Re(e) {
1289
+ jt.displayName = kt;
1290
+ function Pe(e) {
1288
1291
  return e ? "open" : "closed";
1289
1292
  }
1290
- var jt = "DialogTitleWarning", [Yo, Wt] = er(jt, {
1291
- contentName: k,
1292
- titleName: Oe,
1293
+ var Wt = "DialogTitleWarning", [Yo, Bt] = er(Wt, {
1294
+ contentName: W,
1295
+ titleName: Re,
1293
1296
  docsSlug: "dialog"
1294
1297
  }), xn = ({ titleId: e }) => {
1295
- const t = Wt(jt), r = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
1298
+ const t = Bt(Wt), r = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
1296
1299
 
1297
1300
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
1298
1301
 
@@ -1301,21 +1304,21 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
1301
1304
  e && (document.getElementById(e) || console.error(r));
1302
1305
  }, [r, e]), null;
1303
1306
  }, Dn = "DialogDescriptionWarning", An = ({ contentRef: e, descriptionId: t }) => {
1304
- const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Wt(Dn).contentName}}.`;
1307
+ const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Bt(Dn).contentName}}.`;
1305
1308
  return s.useEffect(() => {
1306
1309
  const a = e.current?.getAttribute("aria-describedby");
1307
1310
  t && a && (document.getElementById(t) || console.warn(o));
1308
1311
  }, [o, e, t]), null;
1309
- }, $n = Ot, Tn = Pt, Mn = Dt, In = At, Ln = $t, Fn = Mt, ze = Lt, kn = kt;
1312
+ }, $n = Rt, Tn = xt, Mn = At, In = $t, Ln = Tt, Fn = It, He = Ft, kn = jt;
1310
1313
  const jn = {
1311
1314
  LG: "lg"
1312
1315
  };
1313
1316
  function Wn(e) {
1314
1317
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
1315
1318
  }
1316
- var He = { exports: {} }, Ve;
1319
+ var Ve = { exports: {} }, Ke;
1317
1320
  function Bn() {
1318
- return Ve || (Ve = 1, (function(e) {
1321
+ return Ke || (Ke = 1, (function(e) {
1319
1322
  (function() {
1320
1323
  var t = {}.hasOwnProperty;
1321
1324
  function r() {
@@ -1344,7 +1347,7 @@ function Bn() {
1344
1347
  }
1345
1348
  e.exports ? (r.default = r, e.exports = r) : window.classNames = r;
1346
1349
  })();
1347
- })(He)), He.exports;
1350
+ })(Ve)), Ve.exports;
1348
1351
  }
1349
1352
  var Un = Bn();
1350
1353
  const zn = /* @__PURE__ */ Wn(Un), Hn = "_rotate_12t9p_1", Vn = "_dash_12t9p_1", Kn = {
@@ -1359,18 +1362,18 @@ const zn = /* @__PURE__ */ Wn(Un), Hn = "_rotate_12t9p_1", Vn = "_dash_12t9p_1",
1359
1362
  dash: Vn,
1360
1363
  "purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_12t9p_41",
1361
1364
  "purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_12t9p_44"
1362
- }, Ke = zn.bind(Kn), K = "purpur-spinner", Gn = {
1365
+ }, Ge = zn.bind(Kn), K = "purpur-spinner", Gn = {
1363
1366
  SM: "sm"
1364
- }, Bt = ({
1367
+ }, Ut = ({
1365
1368
  disabled: e = !1,
1366
1369
  negative: t = !1,
1367
1370
  size: r = Gn.SM,
1368
1371
  className: o,
1369
1372
  ...a
1370
- }) => /* @__PURE__ */ p("div", { className: Ke(K, `${K}--${r}`, o), ...a, children: /* @__PURE__ */ p("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ p(
1373
+ }) => /* @__PURE__ */ p("div", { className: Ge(K, `${K}--${r}`, o), ...a, children: /* @__PURE__ */ p("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ p(
1371
1374
  "circle",
1372
1375
  {
1373
- className: Ke(`${K}__circle`, {
1376
+ className: Ge(`${K}__circle`, {
1374
1377
  [`${K}__circle--disabled`]: e,
1375
1378
  [`${K}__circle--negative`]: t
1376
1379
  }),
@@ -1379,13 +1382,13 @@ const zn = /* @__PURE__ */ Wn(Un), Hn = "_rotate_12t9p_1", Vn = "_dash_12t9p_1",
1379
1382
  r: "20"
1380
1383
  }
1381
1384
  ) }) });
1382
- Bt.displayName = "Spinner";
1385
+ Ut.displayName = "Spinner";
1383
1386
  function qn(e) {
1384
1387
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
1385
1388
  }
1386
- var Ge = { exports: {} }, qe;
1389
+ var qe = { exports: {} }, Ye;
1387
1390
  function Yn() {
1388
- return qe || (qe = 1, (function(e) {
1391
+ return Ye || (Ye = 1, (function(e) {
1389
1392
  (function() {
1390
1393
  var t = {}.hasOwnProperty;
1391
1394
  function r() {
@@ -1414,7 +1417,7 @@ function Yn() {
1414
1417
  }
1415
1418
  e.exports ? (r.default = r, e.exports = r) : window.classNames = r;
1416
1419
  })();
1417
- })(Ge)), Ge.exports;
1420
+ })(qe)), qe.exports;
1418
1421
  }
1419
1422
  var Xn = Yn();
1420
1423
  const Zn = /* @__PURE__ */ qn(Xn), Qn = {
@@ -1440,7 +1443,7 @@ const Zn = /* @__PURE__ */ qn(Xn), Qn = {
1440
1443
  "purpur-button--text-negative": "_purpur-button--text-negative_10jh0_185",
1441
1444
  "purpur-button--text": "_purpur-button--text_10jh0_185",
1442
1445
  "purpur-button__spinner": "_purpur-button__spinner_10jh0_235"
1443
- }, Ye = Zn.bind(Qn), I = "purpur-button", Ut = Ce(
1446
+ }, Xe = Zn.bind(Qn), L = "purpur-button", zt = Ne(
1444
1447
  ({
1445
1448
  children: e,
1446
1449
  className: t,
@@ -1457,17 +1460,17 @@ const Zn = /* @__PURE__ */ qn(Xn), Qn = {
1457
1460
  }, h) => {
1458
1461
  if (a && c === "destructive")
1459
1462
  return null;
1460
- const g = Ye(
1463
+ const g = Xe(
1461
1464
  [
1462
- I,
1463
- `${I}--${u ? `${c}-negative` : c}`,
1464
- `${I}--${d}`
1465
+ L,
1466
+ `${L}--${u ? `${c}-negative` : c}`,
1467
+ `${L}--${d}`
1465
1468
  ],
1466
1469
  {
1467
- [`${I}--icon-only`]: a,
1468
- [`${I}--negative`]: u,
1469
- [`${I}--full-width`]: o,
1470
- [`${I}--disabled`]: r || n
1470
+ [`${L}--icon-only`]: a,
1471
+ [`${L}--negative`]: u,
1472
+ [`${L}--full-width`]: o,
1473
+ [`${L}--disabled`]: r || n
1471
1474
  },
1472
1475
  t
1473
1476
  ), b = (m) => {
@@ -1484,12 +1487,12 @@ const Zn = /* @__PURE__ */ qn(Xn), Qn = {
1484
1487
  ...v,
1485
1488
  children: [
1486
1489
  n && /* @__PURE__ */ p(
1487
- Bt,
1490
+ Ut,
1488
1491
  {
1489
1492
  size: d === jn.LG ? "xs" : "xxs",
1490
1493
  negative: u,
1491
1494
  disabled: l,
1492
- className: Ye(`${I}__spinner`)
1495
+ className: Xe(`${L}__spinner`)
1493
1496
  }
1494
1497
  ),
1495
1498
  " ",
@@ -1499,13 +1502,13 @@ const Zn = /* @__PURE__ */ qn(Xn), Qn = {
1499
1502
  );
1500
1503
  }
1501
1504
  );
1502
- Ut.displayName = "Button";
1505
+ zt.displayName = "Button";
1503
1506
  function Jn(e) {
1504
1507
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
1505
1508
  }
1506
- var Xe = { exports: {} }, Ze;
1509
+ var Ze = { exports: {} }, Qe;
1507
1510
  function eo() {
1508
- return Ze || (Ze = 1, (function(e) {
1511
+ return Qe || (Qe = 1, (function(e) {
1509
1512
  (function() {
1510
1513
  var t = {}.hasOwnProperty;
1511
1514
  function r() {
@@ -1534,10 +1537,10 @@ function eo() {
1534
1537
  }
1535
1538
  e.exports ? (r.default = r, e.exports = r) : window.classNames = r;
1536
1539
  })();
1537
- })(Xe)), Xe.exports;
1540
+ })(Ze)), Ze.exports;
1538
1541
  }
1539
1542
  var to = eo();
1540
- const ro = /* @__PURE__ */ Jn(to), re = {
1543
+ const ro = /* @__PURE__ */ Jn(to), ne = {
1541
1544
  "purpur-heading": "_purpur-heading_vo751_1",
1542
1545
  "purpur-heading--hyphens": "_purpur-heading--hyphens_vo751_8",
1543
1546
  "purpur-heading--negative": "_purpur-heading--negative_vo751_11",
@@ -1559,7 +1562,7 @@ const ro = /* @__PURE__ */ Jn(to), re = {
1559
1562
  "purpur-heading--display-200": "_purpur-heading--display-200_vo751_104"
1560
1563
  }, no = {
1561
1564
  TITLE100: "title-100"
1562
- }, ne = "purpur-heading", zt = ({
1565
+ }, oe = "purpur-heading", Ht = ({
1563
1566
  children: e,
1564
1567
  className: t = "",
1565
1568
  enableHyphenation: r = !1,
@@ -1570,22 +1573,22 @@ const ro = /* @__PURE__ */ Jn(to), re = {
1570
1573
  }) => {
1571
1574
  const i = a, d = ro([
1572
1575
  t,
1573
- re[ne],
1574
- re[`${ne}--${n}`],
1576
+ ne[oe],
1577
+ ne[`${oe}--${n}`],
1575
1578
  {
1576
- [re[`${ne}--hyphens`]]: r,
1577
- [re[`${ne}--negative`]]: o
1579
+ [ne[`${oe}--hyphens`]]: r,
1580
+ [ne[`${oe}--negative`]]: o
1578
1581
  }
1579
1582
  ]);
1580
1583
  return /* @__PURE__ */ p(i, { className: d, ...u, children: e });
1581
1584
  };
1582
- zt.displayName = "Heading";
1585
+ Ht.displayName = "Heading";
1583
1586
  function oo(e) {
1584
1587
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
1585
1588
  }
1586
- var Qe = { exports: {} }, Je;
1589
+ var Je = { exports: {} }, et;
1587
1590
  function ao() {
1588
- return Je || (Je = 1, (function(e) {
1591
+ return et || (et = 1, (function(e) {
1589
1592
  (function() {
1590
1593
  var t = {}.hasOwnProperty;
1591
1594
  function r() {
@@ -1614,7 +1617,7 @@ function ao() {
1614
1617
  }
1615
1618
  e.exports ? (r.default = r, e.exports = r) : window.classNames = r;
1616
1619
  })();
1617
- })(Qe)), Qe.exports;
1620
+ })(Je)), Je.exports;
1618
1621
  }
1619
1622
  var io = ao();
1620
1623
  const uo = /* @__PURE__ */ oo(io), so = {
@@ -1625,7 +1628,7 @@ const uo = /* @__PURE__ */ oo(io), so = {
1625
1628
  "purpur-icon--md": "_purpur-icon--md_8u1lq_16",
1626
1629
  "purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
1627
1630
  "purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
1628
- }, co = uo.bind(so), et = "purpur-icon", lo = "md", po = (e) => e.filter((t) => Object.keys(t).length >= 1).map((t) => `${t.name}="${t.value}"`).join(" "), fo = ({ content: e = "", title: t } = {}) => {
1631
+ }, co = uo.bind(so), tt = "purpur-icon", lo = "md", po = (e) => e.filter((t) => Object.keys(t).length >= 1).map((t) => `${t.name}="${t.value}"`).join(" "), fo = ({ content: e = "", title: t } = {}) => {
1629
1632
  const r = [
1630
1633
  { name: "xmlns", value: "http://www.w3.org/2000/svg" },
1631
1634
  { name: "fill", value: "currentColor" },
@@ -1633,27 +1636,27 @@ const uo = /* @__PURE__ */ oo(io), so = {
1633
1636
  t ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
1634
1637
  ], o = t ? `<title>${t}</title>` : "";
1635
1638
  return `<svg ${po(r)}>${o}${e}</svg>`;
1636
- }, vo = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), Ht = ({ svg: e, allyTitle: t, className: r, size: o = lo, ...a }) => {
1639
+ }, vo = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), Vt = ({ svg: e, allyTitle: t, className: r, size: o = lo, ...a }) => {
1637
1640
  const n = fo({
1638
1641
  content: vo(e.svg),
1639
1642
  title: t
1640
- }), u = co(et, `${et}--${o}`, r);
1643
+ }), u = co(tt, `${tt}--${o}`, r);
1641
1644
  return /* @__PURE__ */ p("span", { className: u, dangerouslySetInnerHTML: { __html: n }, ...a });
1642
1645
  };
1643
- Ht.displayName = "Icon";
1646
+ Vt.displayName = "Icon";
1644
1647
  const ho = {
1645
1648
  name: "close",
1646
1649
  svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M4.864 4.864a.9.9 0 0 1 1.273 0L12 10.727l5.864-5.863a.9.9 0 0 1 1.272 1.272L13.273 12l5.863 5.864a.9.9 0 1 1-1.272 1.272L12 13.273l-5.863 5.863a.9.9 0 0 1-1.273-1.272L10.727 12 4.864 6.136a.9.9 0 0 1 0-1.272Z" clip-rule="evenodd"/></svg>',
1647
1650
  keywords: ["close"],
1648
1651
  category: "utility"
1649
- }, Vt = (e) => /* @__PURE__ */ p(Ht, { ...e, svg: ho });
1650
- Vt.displayName = "IconClose";
1652
+ }, Kt = (e) => /* @__PURE__ */ p(Vt, { ...e, svg: ho });
1653
+ Kt.displayName = "IconClose";
1651
1654
  function mo(e) {
1652
1655
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
1653
1656
  }
1654
- var tt = { exports: {} }, rt;
1657
+ var rt = { exports: {} }, nt;
1655
1658
  function go() {
1656
- return rt || (rt = 1, (function(e) {
1659
+ return nt || (nt = 1, (function(e) {
1657
1660
  (function() {
1658
1661
  var t = {}.hasOwnProperty;
1659
1662
  function r() {
@@ -1682,7 +1685,7 @@ function go() {
1682
1685
  }
1683
1686
  e.exports ? (r.default = r, e.exports = r) : window.classNames = r;
1684
1687
  })();
1685
- })(tt)), tt.exports;
1688
+ })(rt)), rt.exports;
1686
1689
  }
1687
1690
  var _o = go();
1688
1691
  const yo = /* @__PURE__ */ mo(_o), bo = {
@@ -1703,7 +1706,7 @@ const yo = /* @__PURE__ */ mo(_o), bo = {
1703
1706
  "purpur-paragraph--overline-200": "_purpur-paragraph--overline-200_1vz75_82"
1704
1707
  }, Eo = yo.bind(bo), wo = {
1705
1708
  PARAGRAPH100: "paragraph-100"
1706
- }, G = "purpur-paragraph", Kt = ({
1709
+ }, G = "purpur-paragraph", Gt = ({
1707
1710
  children: e,
1708
1711
  className: t,
1709
1712
  disabled: r,
@@ -1719,8 +1722,8 @@ const yo = /* @__PURE__ */ mo(_o), bo = {
1719
1722
  });
1720
1723
  return /* @__PURE__ */ p("p", { ...u, className: i, children: e });
1721
1724
  };
1722
- Kt.displayName = "Paragraph";
1723
- function nt(e, t) {
1725
+ Gt.displayName = "Paragraph";
1726
+ function ot(e, t) {
1724
1727
  if (typeof e == "function")
1725
1728
  return e(t);
1726
1729
  e != null && (e.current = t);
@@ -1729,14 +1732,14 @@ function So(...e) {
1729
1732
  return (t) => {
1730
1733
  let r = !1;
1731
1734
  const o = e.map((a) => {
1732
- const n = nt(a, t);
1735
+ const n = ot(a, t);
1733
1736
  return !r && typeof n == "function" && (r = !0), n;
1734
1737
  });
1735
1738
  if (r)
1736
1739
  return () => {
1737
1740
  for (let a = 0; a < o.length; a++) {
1738
1741
  const n = o[a];
1739
- typeof n == "function" ? n() : nt(e[a], null);
1742
+ typeof n == "function" ? n() : ot(e[a], null);
1740
1743
  }
1741
1744
  };
1742
1745
  };
@@ -1765,7 +1768,7 @@ function No(e) {
1765
1768
  });
1766
1769
  return t.displayName = `${e}.SlotClone`, t;
1767
1770
  }
1768
- var Oo = Symbol("radix.slottable");
1771
+ var Oo = /* @__PURE__ */ Symbol("radix.slottable");
1769
1772
  function Ro(e) {
1770
1773
  return s.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === Oo;
1771
1774
  }
@@ -1803,10 +1806,10 @@ var Do = [
1803
1806
  ], Ao = Do.reduce((e, t) => {
1804
1807
  const r = /* @__PURE__ */ Co(`Primitive.${t}`), o = s.forwardRef((a, n) => {
1805
1808
  const { asChild: u, ...i } = a, d = u ? r : t;
1806
- return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ p(d, { ...i, ref: n });
1809
+ return typeof window < "u" && (window[/* @__PURE__ */ Symbol.for("radix-ui")] = !0), /* @__PURE__ */ p(d, { ...i, ref: n });
1807
1810
  });
1808
1811
  return o.displayName = `Primitive.${t}`, { ...e, [t]: o };
1809
- }, {}), $o = "VisuallyHidden", Gt = s.forwardRef(
1812
+ }, {}), $o = "VisuallyHidden", qt = s.forwardRef(
1810
1813
  (e, t) => /* @__PURE__ */ p(
1811
1814
  Ao.span,
1812
1815
  {
@@ -1829,16 +1832,16 @@ var Do = [
1829
1832
  }
1830
1833
  )
1831
1834
  );
1832
- Gt.displayName = $o;
1833
- var To = Gt;
1835
+ qt.displayName = $o;
1836
+ var To = qt;
1834
1837
  const Mo = ({ asChild: e, children: t, ...r }) => /* @__PURE__ */ p(To, { asChild: e, ...r, children: t });
1835
1838
  function Io(e) {
1836
1839
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
1837
1840
  }
1838
- var _e = { exports: {} };
1839
- var ot;
1841
+ var ye = { exports: {} };
1842
+ var at;
1840
1843
  function Lo() {
1841
- return ot || (ot = 1, (function(e) {
1844
+ return at || (at = 1, (function(e) {
1842
1845
  (function() {
1843
1846
  var t = {}.hasOwnProperty;
1844
1847
  function r() {
@@ -1867,7 +1870,7 @@ function Lo() {
1867
1870
  }
1868
1871
  e.exports ? (r.default = r, e.exports = r) : window.classNames = r;
1869
1872
  })();
1870
- })(_e)), _e.exports;
1873
+ })(ye)), ye.exports;
1871
1874
  }
1872
1875
  var Fo = Lo();
1873
1876
  const ko = /* @__PURE__ */ Io(Fo), jo = "_fadeIn_slvdi_1", Wo = "_fadeOut_slvdi_1", Bo = "_slideUp_slvdi_1", Uo = "_slideDown_slvdi_1", zo = {
@@ -1893,7 +1896,7 @@ const ko = /* @__PURE__ */ Io(Fo), jo = "_fadeIn_slvdi_1", Wo = "_fadeOut_slvdi_
1893
1896
  "purpur-modal-content__actions": "_purpur-modal-content__actions_slvdi_151",
1894
1897
  "purpur-modal-content__actions-separator": "_purpur-modal-content__actions-separator_slvdi_203",
1895
1898
  "purpur-modal-content--sticky-footer": "_purpur-modal-content--sticky-footer_slvdi_213"
1896
- }, at = (e) => e.showCloseButton === !0, R = ko.bind(zo), N = "purpur-modal-content", Ho = Ce(
1899
+ }, it = (e) => e.showCloseButton === !0, R = ko.bind(zo), N = "purpur-modal-content", Ho = Ne(
1897
1900
  ({
1898
1901
  ["data-testid"]: e,
1899
1902
  actions: t,
@@ -1910,57 +1913,57 @@ const ko = /* @__PURE__ */ Io(Fo), jo = "_fadeIn_slvdi_1", Wo = "_fadeOut_slvdi_
1910
1913
  onCloseAutoFocus: h,
1911
1914
  ...g
1912
1915
  }, b) => {
1913
- const { closeButtonAriaLabel: l, showCloseButton: m, ..._ } = g, [E, w] = ye(!1), [S, C] = ye(0), O = be(null), y = be(null), x = R(
1916
+ const { closeButtonAriaLabel: l, showCloseButton: m, ..._ } = g, [E, w] = be(!1), [S, C] = be(0), O = Ee(null), y = Ee(null), M = R(
1914
1917
  N,
1915
1918
  { [`${N}--with-image`]: !!i },
1916
1919
  { [`${N}--overflow`]: E },
1917
1920
  { [`${N}--sticky-footer`]: d },
1918
1921
  o
1919
- ), P = (A) => e ? `${e} ${A}` : void 0, V = (A) => {
1922
+ ), P = (A) => e ? `${e} ${A}` : void 0, j = (A) => {
1920
1923
  n && A.preventDefault();
1921
- }, W = Zt(() => {
1924
+ }, x = Zt(() => {
1922
1925
  if (!O.current || !y.current)
1923
1926
  return;
1924
- const A = window.getComputedStyle(O.current, null), X = parseFloat(A.getPropertyValue("height")), Xt = y.current.offsetHeight;
1925
- w(X < Xt), C(
1927
+ const A = window.getComputedStyle(O.current, null), Z = parseFloat(A.getPropertyValue("height")), Xt = y.current.offsetHeight;
1928
+ w(Z < Xt), C(
1926
1929
  (O.current.offsetWidth ?? 0) - (O.current.clientWidth ?? 0)
1927
1930
  );
1928
- }, []), qt = () => {
1931
+ }, []), X = () => {
1929
1932
  const A = y.current;
1930
1933
  if (A) {
1931
- const X = A.querySelector("h2");
1932
- X && setTimeout(() => {
1933
- X.focus();
1934
+ const Z = A.querySelector("h2");
1935
+ Z && setTimeout(() => {
1936
+ Z.focus();
1934
1937
  });
1935
1938
  }
1936
1939
  }, Yt = (A) => {
1937
1940
  n && !m && A.preventDefault();
1938
1941
  };
1939
- return Ee(() => (window.addEventListener("resize", W), () => {
1940
- window.removeEventListener("resize", W);
1941
- }), [W]), Ee(() => {
1942
- W();
1943
- }, [f, r, W]), /* @__PURE__ */ $(Mn, { children: [
1942
+ return we(() => (window.addEventListener("resize", x), () => {
1943
+ window.removeEventListener("resize", x);
1944
+ }), [x]), we(() => {
1945
+ x();
1946
+ }, [f, r, x]), /* @__PURE__ */ $(Mn, { children: [
1944
1947
  /* @__PURE__ */ p(In, { className: R(`${N}__overlay`), style: { zIndex: v } }),
1945
1948
  /* @__PURE__ */ $(
1946
1949
  Ln,
1947
1950
  {
1948
1951
  ..._,
1949
- className: x,
1952
+ className: M,
1950
1953
  "data-testid": e,
1951
1954
  ref: b,
1952
1955
  ...!a && { "aria-describedby": void 0 },
1953
- onPointerDownOutside: V,
1956
+ onPointerDownOutside: j,
1954
1957
  onOpenAutoFocus: () => {
1955
- W(), qt();
1958
+ x(), X();
1956
1959
  },
1957
1960
  onEscapeKeyDown: Yt,
1958
1961
  onCloseAutoFocus: h,
1959
1962
  style: { zIndex: `calc(${v} + 1)` },
1960
1963
  children: [
1961
1964
  /* @__PURE__ */ $("div", { ref: O, className: R(`${N}__wrapper`), children: [
1962
- at(g) && l && i && /* @__PURE__ */ p(
1963
- it,
1965
+ it(g) && l && i && /* @__PURE__ */ p(
1966
+ ut,
1964
1967
  {
1965
1968
  "aria-label": l,
1966
1969
  hasImage: !0,
@@ -1970,8 +1973,8 @@ const ko = /* @__PURE__ */ Io(Fo), jo = "_fadeIn_slvdi_1", Wo = "_fadeOut_slvdi_
1970
1973
  ),
1971
1974
  /* @__PURE__ */ $("div", { ref: y, className: R(`${N}__wrapper-inner`), children: [
1972
1975
  /* @__PURE__ */ $("div", { className: R(`${N}__header`), children: [
1973
- at(g) && l && !i && /* @__PURE__ */ p(
1974
- it,
1976
+ it(g) && l && !i && /* @__PURE__ */ p(
1977
+ ut,
1975
1978
  {
1976
1979
  "aria-label": l,
1977
1980
  "data-testid": P("close-button")
@@ -1983,7 +1986,7 @@ const ko = /* @__PURE__ */ Io(Fo), jo = "_fadeIn_slvdi_1", Wo = "_fadeOut_slvdi_
1983
1986
  asChild: !0,
1984
1987
  className: R(`${N}__title`),
1985
1988
  "data-testid": P("title"),
1986
- children: /* @__PURE__ */ p(zt, { tag: "h2", variant: "title-200", tabIndex: -1, children: c })
1989
+ children: /* @__PURE__ */ p(Ht, { tag: "h2", variant: "title-200", tabIndex: -1, children: c })
1987
1990
  }
1988
1991
  )
1989
1992
  ] }),
@@ -1996,34 +1999,34 @@ const ko = /* @__PURE__ */ Io(Fo), jo = "_fadeIn_slvdi_1", Wo = "_fadeOut_slvdi_
1996
1999
  }
1997
2000
  ),
1998
2001
  /* @__PURE__ */ p("div", { className: R(`${N}__body`), children: /* @__PURE__ */ $("div", { className: R(`${N}__body-inner`), children: [
1999
- a && u && /* @__PURE__ */ p(Mo, { asChild: !0, children: /* @__PURE__ */ p(ze, { "data-testid": P("description"), children: a }) }),
2002
+ a && u && /* @__PURE__ */ p(Mo, { asChild: !0, children: /* @__PURE__ */ p(He, { "data-testid": P("description"), children: a }) }),
2000
2003
  a && !u && /* @__PURE__ */ p(
2001
- ze,
2004
+ He,
2002
2005
  {
2003
2006
  asChild: !0,
2004
2007
  className: R(`${N}__description`),
2005
2008
  "data-testid": P("description"),
2006
- children: /* @__PURE__ */ p(Kt, { variant: "paragraph-100", children: a })
2009
+ children: /* @__PURE__ */ p(Gt, { variant: "paragraph-100", children: a })
2007
2010
  }
2008
2011
  ),
2009
2012
  /* @__PURE__ */ p("div", { children: r }),
2010
- !d && /* @__PURE__ */ p(ut, { actions: t, notification: f })
2013
+ !d && /* @__PURE__ */ p(st, { actions: t, notification: f })
2011
2014
  ] }) })
2012
2015
  ] })
2013
2016
  ] }),
2014
- d && /* @__PURE__ */ p(ut, { actions: t, notification: f })
2017
+ d && /* @__PURE__ */ p(st, { actions: t, notification: f })
2015
2018
  ]
2016
2019
  }
2017
2020
  )
2018
2021
  ] });
2019
2022
  }
2020
- ), it = ({
2023
+ ), ut = ({
2021
2024
  ["aria-label"]: e,
2022
2025
  hasImage: t,
2023
2026
  scrollbarWidth: r,
2024
2027
  ["data-testid"]: o
2025
2028
  }) => /* @__PURE__ */ p(kn, { asChild: !0, children: /* @__PURE__ */ p(
2026
- Ut,
2029
+ zt,
2027
2030
  {
2028
2031
  variant: t ? "primary" : "tertiary-purple",
2029
2032
  negative: t,
@@ -2033,32 +2036,32 @@ const ko = /* @__PURE__ */ Io(Fo), jo = "_fadeIn_slvdi_1", Wo = "_fadeOut_slvdi_
2033
2036
  className: R(`${N}__close-button`),
2034
2037
  style: { right: `calc(var(--purpur-spacing-100) + ${r || 0}px)` },
2035
2038
  "data-testid": o,
2036
- children: /* @__PURE__ */ p(Vt, {})
2039
+ children: /* @__PURE__ */ p(Kt, {})
2037
2040
  }
2038
- ) }), ut = ({
2041
+ ) }), st = ({
2039
2042
  actions: e,
2040
2043
  notification: t
2041
2044
  }) => {
2042
- const r = be(null);
2043
- return Ee(() => {
2045
+ const r = Ee(null);
2046
+ return we(() => {
2044
2047
  t && r?.current?.scrollIntoView?.(!1);
2045
2048
  }, [t]), e ? /* @__PURE__ */ $("div", { className: R(`${N}__actions`), children: [
2046
2049
  /* @__PURE__ */ p("div", { className: R(`${N}__actions-buttons`), "data-testid": "modal actions", children: e }),
2047
2050
  t && /* @__PURE__ */ p("div", { className: R(`${N}__notification`), ref: r, children: t }),
2048
2051
  /* @__PURE__ */ p("span", { className: R(`${N}__actions-separator`) })
2049
2052
  ] }) : null;
2050
- }, Vo = Ce(
2053
+ }, Vo = Ne(
2051
2054
  ({ children: e, ...t }, r) => /* @__PURE__ */ p(Tn, { asChild: !0, ref: r, ...t, children: e })
2052
- ), Pe = ({
2055
+ ), xe = ({
2053
2056
  ["data-testid"]: e,
2054
2057
  children: t,
2055
2058
  open: r,
2056
2059
  onOpenChange: o
2057
2060
  }) => /* @__PURE__ */ p($n, { open: r, onOpenChange: o, "data-testid": e, children: t });
2058
- Pe.Trigger = Vo;
2059
- Pe.Content = Ho;
2060
- Pe.displayName = "Modal";
2061
+ xe.Trigger = Vo;
2062
+ xe.Content = Ho;
2063
+ xe.displayName = "Modal";
2061
2064
  export {
2062
- Pe as Modal
2065
+ xe as Modal
2063
2066
  };
2064
2067
  //# sourceMappingURL=modal.es.js.map