@purpurds/modal 5.11.2 → 5.13.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,7 +1,7 @@
1
- import { jsxs as U, jsx as _ } from "react/jsx-runtime";
1
+ import { jsxs as j, jsx as _ } from "react/jsx-runtime";
2
2
  import * as m from "react";
3
- import { useCallback as Q, createContext as Ce, useMemo as me, createElement as g, useContext as et, useLayoutEffect as It, useRef as C, useEffect as A, useState as K, forwardRef as S, Children as R, isValidElement as z, cloneElement as ae, Fragment as Ie, useReducer as Rt } from "react";
4
- import Lt, { flushSync as tt } from "react-dom";
3
+ import { useCallback as Z, createContext as Se, useMemo as he, createElement as g, useContext as Je, useLayoutEffect as At, useRef as P, useEffect as A, useState as H, forwardRef as S, Children as L, isValidElement as U, cloneElement as oe, Fragment as De, useReducer as Tt } from "react";
4
+ import Dt, { flushSync as et } from "react-dom";
5
5
  function N() {
6
6
  return N = Object.assign ? Object.assign.bind() : function(e) {
7
7
  for (var n = 1; n < arguments.length; n++) {
@@ -12,32 +12,32 @@ function N() {
12
12
  return e;
13
13
  }, N.apply(this, arguments);
14
14
  }
15
- function W(e, n, { checkForDefaultPrevented: t = !0 } = {}) {
15
+ function B(e, n, { checkForDefaultPrevented: t = !0 } = {}) {
16
16
  return function(a) {
17
17
  if (e == null || e(a), t === !1 || !a.defaultPrevented) return n == null ? void 0 : n(a);
18
18
  };
19
19
  }
20
- function Mt(e, n) {
20
+ function It(e, n) {
21
21
  typeof e == "function" ? e(n) : e != null && (e.current = n);
22
22
  }
23
- function nt(...e) {
23
+ function tt(...e) {
24
24
  return (n) => e.forEach(
25
- (t) => Mt(t, n)
25
+ (t) => It(t, n)
26
26
  );
27
27
  }
28
- function J(...e) {
29
- return Q(nt(...e), e);
28
+ function Q(...e) {
29
+ return Z(tt(...e), e);
30
30
  }
31
- function kt(e, n = []) {
31
+ function Lt(e, n = []) {
32
32
  let t = [];
33
33
  function o(r, i) {
34
- const c = /* @__PURE__ */ Ce(i), s = t.length;
34
+ const c = /* @__PURE__ */ Se(i), s = t.length;
35
35
  t = [
36
36
  ...t,
37
37
  i
38
38
  ];
39
39
  function d(l) {
40
- const { scope: h, children: f, ...E } = l, u = (h == null ? void 0 : h[e][s]) || c, v = me(
40
+ const { scope: h, children: f, ...E } = l, u = (h == null ? void 0 : h[e][s]) || c, v = he(
41
41
  () => E,
42
42
  Object.values(E)
43
43
  );
@@ -46,7 +46,7 @@ function kt(e, n = []) {
46
46
  }, f);
47
47
  }
48
48
  function p(l, h) {
49
- const f = (h == null ? void 0 : h[e][s]) || c, E = et(f);
49
+ const f = (h == null ? void 0 : h[e][s]) || c, E = Je(f);
50
50
  if (E) return E;
51
51
  if (i !== void 0) return i;
52
52
  throw new Error(`\`${l}\` must be used within \`${r}\``);
@@ -57,10 +57,10 @@ function kt(e, n = []) {
57
57
  ];
58
58
  }
59
59
  const a = () => {
60
- const r = t.map((i) => /* @__PURE__ */ Ce(i));
60
+ const r = t.map((i) => /* @__PURE__ */ Se(i));
61
61
  return function(c) {
62
62
  const s = (c == null ? void 0 : c[e]) || r;
63
- return me(
63
+ return he(
64
64
  () => ({
65
65
  [`__scope${e}`]: {
66
66
  ...c,
@@ -76,10 +76,10 @@ function kt(e, n = []) {
76
76
  };
77
77
  return a.scopeName = e, [
78
78
  o,
79
- Ft(a, ...n)
79
+ Rt(a, ...n)
80
80
  ];
81
81
  }
82
- function Ft(...e) {
82
+ function Rt(...e) {
83
83
  const n = e[0];
84
84
  if (e.length === 1) return n;
85
85
  const t = () => {
@@ -97,7 +97,7 @@ function Ft(...e) {
97
97
  ...l
98
98
  };
99
99
  }, {});
100
- return me(
100
+ return he(
101
101
  () => ({
102
102
  [`__scope${n.scopeName}`]: i
103
103
  }),
@@ -109,25 +109,25 @@ function Ft(...e) {
109
109
  };
110
110
  return t.scopeName = n.scopeName, t;
111
111
  }
112
- const Oe = globalThis != null && globalThis.document ? It : () => {
113
- }, jt = m.useId || (() => {
112
+ const Ce = globalThis != null && globalThis.document ? At : () => {
113
+ }, Mt = m.useId || (() => {
114
114
  });
115
- let Bt = 0;
116
- function be(e) {
117
- const [n, t] = m.useState(jt());
118
- return Oe(() => {
115
+ let kt = 0;
116
+ function _e(e) {
117
+ const [n, t] = m.useState(Mt());
118
+ return Ce(() => {
119
119
  e || t(
120
- (o) => o ?? String(Bt++)
120
+ (o) => o ?? String(kt++)
121
121
  );
122
122
  }, [
123
123
  e
124
124
  ]), e || (n ? `radix-${n}` : "");
125
125
  }
126
- function G(e) {
127
- const n = C(e);
126
+ function K(e) {
127
+ const n = P(e);
128
128
  return A(() => {
129
129
  n.current = e;
130
- }), me(
130
+ }), he(
131
131
  () => (...t) => {
132
132
  var o;
133
133
  return (o = n.current) === null || o === void 0 ? void 0 : o.call(n, ...t);
@@ -135,12 +135,12 @@ function G(e) {
135
135
  []
136
136
  );
137
137
  }
138
- function Ut({ prop: e, defaultProp: n, onChange: t = () => {
138
+ function Ft({ prop: e, defaultProp: n, onChange: t = () => {
139
139
  } }) {
140
- const [o, a] = Wt({
140
+ const [o, a] = jt({
141
141
  defaultProp: n,
142
142
  onChange: t
143
- }), r = e !== void 0, i = r ? e : o, c = G(t), s = Q((d) => {
143
+ }), r = e !== void 0, i = r ? e : o, c = K(t), s = Z((d) => {
144
144
  if (r) {
145
145
  const l = typeof d == "function" ? d(e) : d;
146
146
  l !== e && c(l);
@@ -156,8 +156,8 @@ function Ut({ prop: e, defaultProp: n, onChange: t = () => {
156
156
  s
157
157
  ];
158
158
  }
159
- function Wt({ defaultProp: e, onChange: n }) {
160
- const t = K(e), [o] = t, a = C(o), r = G(n);
159
+ function jt({ defaultProp: e, onChange: n }) {
160
+ const t = H(e), [o] = t, a = P(o), r = K(n);
161
161
  return A(() => {
162
162
  a.current !== o && (r(o), a.current = o);
163
163
  }, [
@@ -166,32 +166,32 @@ function Wt({ defaultProp: e, onChange: n }) {
166
166
  r
167
167
  ]), t;
168
168
  }
169
- const Re = /* @__PURE__ */ S((e, n) => {
170
- const { children: t, ...o } = e, a = R.toArray(t), r = a.find(qt);
169
+ const Ie = /* @__PURE__ */ S((e, n) => {
170
+ const { children: t, ...o } = e, a = L.toArray(t), r = a.find(Ut);
171
171
  if (r) {
172
- const i = r.props.children, c = a.map((s) => s === r ? R.count(i) > 1 ? R.only(null) : /* @__PURE__ */ z(i) ? i.props.children : null : s);
173
- return /* @__PURE__ */ g(Pe, N({}, o, {
172
+ const i = r.props.children, c = a.map((s) => s === r ? L.count(i) > 1 ? L.only(null) : /* @__PURE__ */ U(i) ? i.props.children : null : s);
173
+ return /* @__PURE__ */ g(Oe, N({}, o, {
174
174
  ref: n
175
- }), /* @__PURE__ */ z(i) ? /* @__PURE__ */ ae(i, void 0, c) : null);
175
+ }), /* @__PURE__ */ U(i) ? /* @__PURE__ */ oe(i, void 0, c) : null);
176
176
  }
177
- return /* @__PURE__ */ g(Pe, N({}, o, {
177
+ return /* @__PURE__ */ g(Oe, N({}, o, {
178
178
  ref: n
179
179
  }), t);
180
180
  });
181
- Re.displayName = "Slot";
182
- const Pe = /* @__PURE__ */ S((e, n) => {
181
+ Ie.displayName = "Slot";
182
+ const Oe = /* @__PURE__ */ S((e, n) => {
183
183
  const { children: t, ...o } = e;
184
- return /* @__PURE__ */ z(t) ? /* @__PURE__ */ ae(t, {
185
- ...Ht(o, t.props),
186
- ref: n ? nt(n, t.ref) : t.ref
187
- }) : R.count(t) > 1 ? R.only(null) : null;
184
+ return /* @__PURE__ */ U(t) ? /* @__PURE__ */ oe(t, {
185
+ ...Wt(o, t.props),
186
+ ref: n ? tt(n, t.ref) : t.ref
187
+ }) : L.count(t) > 1 ? L.only(null) : null;
188
188
  });
189
- Pe.displayName = "SlotClone";
190
- const zt = ({ children: e }) => /* @__PURE__ */ g(Ie, null, e);
191
- function qt(e) {
192
- return /* @__PURE__ */ z(e) && e.type === zt;
189
+ Oe.displayName = "SlotClone";
190
+ const Bt = ({ children: e }) => /* @__PURE__ */ g(De, null, e);
191
+ function Ut(e) {
192
+ return /* @__PURE__ */ U(e) && e.type === Bt;
193
193
  }
194
- function Ht(e, n) {
194
+ function Wt(e, n) {
195
195
  const t = {
196
196
  ...n
197
197
  };
@@ -212,7 +212,7 @@ function Ht(e, n) {
212
212
  ...t
213
213
  };
214
214
  }
215
- const Kt = [
215
+ const zt = [
216
216
  "a",
217
217
  "button",
218
218
  "div",
@@ -229,9 +229,9 @@ const Kt = [
229
229
  "span",
230
230
  "svg",
231
231
  "ul"
232
- ], q = Kt.reduce((e, n) => {
232
+ ], W = zt.reduce((e, n) => {
233
233
  const t = /* @__PURE__ */ S((o, a) => {
234
- const { asChild: r, ...i } = o, c = r ? Re : n;
234
+ const { asChild: r, ...i } = o, c = r ? Ie : n;
235
235
  return A(() => {
236
236
  window[Symbol.for("radix-ui")] = !0;
237
237
  }, []), /* @__PURE__ */ g(c, N({}, i, {
@@ -243,13 +243,13 @@ const Kt = [
243
243
  [n]: t
244
244
  };
245
245
  }, {});
246
- function Gt(e, n) {
247
- e && tt(
246
+ function qt(e, n) {
247
+ e && et(
248
248
  () => e.dispatchEvent(n)
249
249
  );
250
250
  }
251
- function Vt(e, n = globalThis == null ? void 0 : globalThis.document) {
252
- const t = G(e);
251
+ function Ht(e, n = globalThis == null ? void 0 : globalThis.document) {
252
+ const t = K(e);
253
253
  A(() => {
254
254
  const o = (a) => {
255
255
  a.key === "Escape" && t(a);
@@ -260,40 +260,40 @@ function Vt(e, n = globalThis == null ? void 0 : globalThis.document) {
260
260
  n
261
261
  ]);
262
262
  }
263
- const Ne = "dismissableLayer.update", Xt = "dismissableLayer.pointerDownOutside", Yt = "dismissableLayer.focusOutside";
264
- let Fe;
265
- const Zt = /* @__PURE__ */ Ce({
263
+ const Pe = "dismissableLayer.update", Kt = "dismissableLayer.pointerDownOutside", Gt = "dismissableLayer.focusOutside";
264
+ let ke;
265
+ const Vt = /* @__PURE__ */ Se({
266
266
  layers: /* @__PURE__ */ new Set(),
267
267
  layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
268
268
  branches: /* @__PURE__ */ new Set()
269
- }), Qt = /* @__PURE__ */ S((e, n) => {
269
+ }), Xt = /* @__PURE__ */ S((e, n) => {
270
270
  var t;
271
- const { disableOutsidePointerEvents: o = !1, onEscapeKeyDown: a, onPointerDownOutside: r, onFocusOutside: i, onInteractOutside: c, onDismiss: s, ...d } = e, p = et(Zt), [l, h] = K(null), f = (t = l == null ? void 0 : l.ownerDocument) !== null && t !== void 0 ? t : globalThis == null ? void 0 : globalThis.document, [, E] = K({}), u = J(
271
+ const { disableOutsidePointerEvents: o = !1, onEscapeKeyDown: a, onPointerDownOutside: r, onFocusOutside: i, onInteractOutside: c, onDismiss: s, ...d } = e, p = Je(Vt), [l, h] = H(null), f = (t = l == null ? void 0 : l.ownerDocument) !== null && t !== void 0 ? t : globalThis == null ? void 0 : globalThis.document, [, E] = H({}), u = Q(
272
272
  n,
273
273
  (x) => h(x)
274
274
  ), v = Array.from(p.layers), [b] = [
275
275
  ...p.layersWithOutsidePointerEventsDisabled
276
- ].slice(-1), O = v.indexOf(b), y = l ? v.indexOf(l) : -1, $ = p.layersWithOutsidePointerEventsDisabled.size > 0, w = y >= O, F = Jt((x) => {
277
- const D = x.target, ie = [
276
+ ].slice(-1), C = v.indexOf(b), y = l ? v.indexOf(l) : -1, $ = p.layersWithOutsidePointerEventsDisabled.size > 0, w = y >= C, z = Yt((x) => {
277
+ const I = x.target, ae = [
278
278
  ...p.branches
279
279
  ].some(
280
- (M) => M.contains(D)
280
+ (R) => R.contains(I)
281
281
  );
282
- !w || ie || (r == null || r(x), c == null || c(x), x.defaultPrevented || s == null || s());
283
- }, f), I = en((x) => {
284
- const D = x.target;
282
+ !w || ae || (r == null || r(x), c == null || c(x), x.defaultPrevented || s == null || s());
283
+ }, f), D = Zt((x) => {
284
+ const I = x.target;
285
285
  [
286
286
  ...p.branches
287
287
  ].some(
288
- (M) => M.contains(D)
288
+ (R) => R.contains(I)
289
289
  ) || (i == null || i(x), c == null || c(x), x.defaultPrevented || s == null || s());
290
290
  }, f);
291
- return Vt((x) => {
291
+ return Ht((x) => {
292
292
  y === p.layers.size - 1 && (a == null || a(x), !x.defaultPrevented && s && (x.preventDefault(), s()));
293
293
  }, f), A(() => {
294
294
  if (l)
295
- return o && (p.layersWithOutsidePointerEventsDisabled.size === 0 && (Fe = f.body.style.pointerEvents, f.body.style.pointerEvents = "none"), p.layersWithOutsidePointerEventsDisabled.add(l)), p.layers.add(l), je(), () => {
296
- o && p.layersWithOutsidePointerEventsDisabled.size === 1 && (f.body.style.pointerEvents = Fe);
295
+ return o && (p.layersWithOutsidePointerEventsDisabled.size === 0 && (ke = f.body.style.pointerEvents, f.body.style.pointerEvents = "none"), p.layersWithOutsidePointerEventsDisabled.add(l)), p.layers.add(l), Fe(), () => {
296
+ o && p.layersWithOutsidePointerEventsDisabled.size === 1 && (f.body.style.pointerEvents = ke);
297
297
  };
298
298
  }, [
299
299
  l,
@@ -301,32 +301,32 @@ const Zt = /* @__PURE__ */ Ce({
301
301
  o,
302
302
  p
303
303
  ]), A(() => () => {
304
- l && (p.layers.delete(l), p.layersWithOutsidePointerEventsDisabled.delete(l), je());
304
+ l && (p.layers.delete(l), p.layersWithOutsidePointerEventsDisabled.delete(l), Fe());
305
305
  }, [
306
306
  l,
307
307
  p
308
308
  ]), A(() => {
309
309
  const x = () => E({});
310
- return document.addEventListener(Ne, x), () => document.removeEventListener(Ne, x);
311
- }, []), /* @__PURE__ */ g(q.div, N({}, d, {
310
+ return document.addEventListener(Pe, x), () => document.removeEventListener(Pe, x);
311
+ }, []), /* @__PURE__ */ g(W.div, N({}, d, {
312
312
  ref: u,
313
313
  style: {
314
314
  pointerEvents: $ ? w ? "auto" : "none" : void 0,
315
315
  ...e.style
316
316
  },
317
- onFocusCapture: W(e.onFocusCapture, I.onFocusCapture),
318
- onBlurCapture: W(e.onBlurCapture, I.onBlurCapture),
319
- onPointerDownCapture: W(e.onPointerDownCapture, F.onPointerDownCapture)
317
+ onFocusCapture: B(e.onFocusCapture, D.onFocusCapture),
318
+ onBlurCapture: B(e.onBlurCapture, D.onBlurCapture),
319
+ onPointerDownCapture: B(e.onPointerDownCapture, z.onPointerDownCapture)
320
320
  }));
321
321
  });
322
- function Jt(e, n = globalThis == null ? void 0 : globalThis.document) {
323
- const t = G(e), o = C(!1), a = C(() => {
322
+ function Yt(e, n = globalThis == null ? void 0 : globalThis.document) {
323
+ const t = K(e), o = P(!1), a = P(() => {
324
324
  });
325
325
  return A(() => {
326
326
  const r = (c) => {
327
327
  if (c.target && !o.current) {
328
328
  let d = function() {
329
- rt(Xt, t, s, {
329
+ nt(Kt, t, s, {
330
330
  discrete: !0
331
331
  });
332
332
  };
@@ -353,11 +353,11 @@ function Jt(e, n = globalThis == null ? void 0 : globalThis.document) {
353
353
  onPointerDownCapture: () => o.current = !0
354
354
  };
355
355
  }
356
- function en(e, n = globalThis == null ? void 0 : globalThis.document) {
357
- const t = G(e), o = C(!1);
356
+ function Zt(e, n = globalThis == null ? void 0 : globalThis.document) {
357
+ const t = K(e), o = P(!1);
358
358
  return A(() => {
359
359
  const a = (r) => {
360
- r.target && !o.current && rt(Yt, t, {
360
+ r.target && !o.current && nt(Gt, t, {
361
361
  originalEvent: r
362
362
  }, {
363
363
  discrete: !1
@@ -372,11 +372,11 @@ function en(e, n = globalThis == null ? void 0 : globalThis.document) {
372
372
  onBlurCapture: () => o.current = !1
373
373
  };
374
374
  }
375
- function je() {
376
- const e = new CustomEvent(Ne);
375
+ function Fe() {
376
+ const e = new CustomEvent(Pe);
377
377
  document.dispatchEvent(e);
378
378
  }
379
- function rt(e, n, t, { discrete: o }) {
379
+ function nt(e, n, t, { discrete: o }) {
380
380
  const a = t.originalEvent.target, r = new CustomEvent(e, {
381
381
  bubbles: !1,
382
382
  cancelable: !0,
@@ -384,16 +384,16 @@ function rt(e, n, t, { discrete: o }) {
384
384
  });
385
385
  n && a.addEventListener(e, n, {
386
386
  once: !0
387
- }), o ? Gt(a, r) : a.dispatchEvent(r);
387
+ }), o ? qt(a, r) : a.dispatchEvent(r);
388
388
  }
389
- const $e = "focusScope.autoFocusOnMount", ye = "focusScope.autoFocusOnUnmount", Be = {
389
+ const be = "focusScope.autoFocusOnMount", $e = "focusScope.autoFocusOnUnmount", je = {
390
390
  bubbles: !1,
391
391
  cancelable: !0
392
- }, tn = /* @__PURE__ */ S((e, n) => {
393
- const { loop: t = !1, trapped: o = !1, onMountAutoFocus: a, onUnmountAutoFocus: r, ...i } = e, [c, s] = K(null), d = G(a), p = G(r), l = C(null), h = J(
392
+ }, Qt = /* @__PURE__ */ S((e, n) => {
393
+ const { loop: t = !1, trapped: o = !1, onMountAutoFocus: a, onUnmountAutoFocus: r, ...i } = e, [c, s] = H(null), d = K(a), p = K(r), l = P(null), h = Q(
394
394
  n,
395
395
  (u) => s(u)
396
- ), f = C({
396
+ ), f = P({
397
397
  paused: !1,
398
398
  pause() {
399
399
  this.paused = !0;
@@ -407,26 +407,26 @@ const $e = "focusScope.autoFocusOnMount", ye = "focusScope.autoFocusOnUnmount",
407
407
  let u = function(y) {
408
408
  if (f.paused || !c) return;
409
409
  const $ = y.target;
410
- c.contains($) ? l.current = $ : B(l.current, {
410
+ c.contains($) ? l.current = $ : F(l.current, {
411
411
  select: !0
412
412
  });
413
413
  }, v = function(y) {
414
414
  if (f.paused || !c) return;
415
415
  const $ = y.relatedTarget;
416
- $ !== null && (c.contains($) || B(l.current, {
416
+ $ !== null && (c.contains($) || F(l.current, {
417
417
  select: !0
418
418
  }));
419
419
  }, b = function(y) {
420
420
  if (document.activeElement === document.body)
421
- for (const w of y) w.removedNodes.length > 0 && B(c);
421
+ for (const w of y) w.removedNodes.length > 0 && F(c);
422
422
  };
423
423
  document.addEventListener("focusin", u), document.addEventListener("focusout", v);
424
- const O = new MutationObserver(b);
425
- return c && O.observe(c, {
424
+ const C = new MutationObserver(b);
425
+ return c && C.observe(c, {
426
426
  childList: !0,
427
427
  subtree: !0
428
428
  }), () => {
429
- document.removeEventListener("focusin", u), document.removeEventListener("focusout", v), O.disconnect();
429
+ document.removeEventListener("focusin", u), document.removeEventListener("focusout", v), C.disconnect();
430
430
  };
431
431
  }
432
432
  }, [
@@ -435,20 +435,20 @@ const $e = "focusScope.autoFocusOnMount", ye = "focusScope.autoFocusOnUnmount",
435
435
  f.paused
436
436
  ]), A(() => {
437
437
  if (c) {
438
- We.add(f);
438
+ Ue.add(f);
439
439
  const u = document.activeElement;
440
440
  if (!c.contains(u)) {
441
- const b = new CustomEvent($e, Be);
442
- c.addEventListener($e, d), c.dispatchEvent(b), b.defaultPrevented || (nn(un(ot(c)), {
441
+ const b = new CustomEvent(be, je);
442
+ c.addEventListener(be, d), c.dispatchEvent(b), b.defaultPrevented || (Jt(on(rt(c)), {
443
443
  select: !0
444
- }), document.activeElement === u && B(c));
444
+ }), document.activeElement === u && F(c));
445
445
  }
446
446
  return () => {
447
- c.removeEventListener($e, d), setTimeout(() => {
448
- const b = new CustomEvent(ye, Be);
449
- c.addEventListener(ye, p), c.dispatchEvent(b), b.defaultPrevented || B(u ?? document.body, {
447
+ c.removeEventListener(be, d), setTimeout(() => {
448
+ const b = new CustomEvent($e, je);
449
+ c.addEventListener($e, p), c.dispatchEvent(b), b.defaultPrevented || F(u ?? document.body, {
450
450
  select: !0
451
- }), c.removeEventListener(ye, p), We.remove(f);
451
+ }), c.removeEventListener($e, p), Ue.remove(f);
452
452
  }, 0);
453
453
  };
454
454
  }
@@ -458,44 +458,44 @@ const $e = "focusScope.autoFocusOnMount", ye = "focusScope.autoFocusOnUnmount",
458
458
  p,
459
459
  f
460
460
  ]);
461
- const E = Q((u) => {
461
+ const E = Z((u) => {
462
462
  if (!t && !o || f.paused) return;
463
463
  const v = u.key === "Tab" && !u.altKey && !u.ctrlKey && !u.metaKey, b = document.activeElement;
464
464
  if (v && b) {
465
- const O = u.currentTarget, [y, $] = rn(O);
466
- y && $ ? !u.shiftKey && b === $ ? (u.preventDefault(), t && B(y, {
465
+ const C = u.currentTarget, [y, $] = en(C);
466
+ y && $ ? !u.shiftKey && b === $ ? (u.preventDefault(), t && F(y, {
467
467
  select: !0
468
- })) : u.shiftKey && b === y && (u.preventDefault(), t && B($, {
468
+ })) : u.shiftKey && b === y && (u.preventDefault(), t && F($, {
469
469
  select: !0
470
- })) : b === O && u.preventDefault();
470
+ })) : b === C && u.preventDefault();
471
471
  }
472
472
  }, [
473
473
  t,
474
474
  o,
475
475
  f.paused
476
476
  ]);
477
- return /* @__PURE__ */ g(q.div, N({
477
+ return /* @__PURE__ */ g(W.div, N({
478
478
  tabIndex: -1
479
479
  }, i, {
480
480
  ref: h,
481
481
  onKeyDown: E
482
482
  }));
483
483
  });
484
- function nn(e, { select: n = !1 } = {}) {
484
+ function Jt(e, { select: n = !1 } = {}) {
485
485
  const t = document.activeElement;
486
486
  for (const o of e)
487
- if (B(o, {
487
+ if (F(o, {
488
488
  select: n
489
489
  }), document.activeElement !== t) return;
490
490
  }
491
- function rn(e) {
492
- const n = ot(e), t = Ue(n, e), o = Ue(n.reverse(), e);
491
+ function en(e) {
492
+ const n = rt(e), t = Be(n, e), o = Be(n.reverse(), e);
493
493
  return [
494
494
  t,
495
495
  o
496
496
  ];
497
497
  }
498
- function ot(e) {
498
+ function rt(e) {
499
499
  const n = [], t = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
500
500
  acceptNode: (o) => {
501
501
  const a = o.tagName === "INPUT" && o.type === "hidden";
@@ -505,13 +505,13 @@ function ot(e) {
505
505
  for (; t.nextNode(); ) n.push(t.currentNode);
506
506
  return n;
507
507
  }
508
- function Ue(e, n) {
508
+ function Be(e, n) {
509
509
  for (const t of e)
510
- if (!on(t, {
510
+ if (!tn(t, {
511
511
  upTo: n
512
512
  })) return t;
513
513
  }
514
- function on(e, { upTo: n }) {
514
+ function tn(e, { upTo: n }) {
515
515
  if (getComputedStyle(e).visibility === "hidden") return !0;
516
516
  for (; e; ) {
517
517
  if (n !== void 0 && e === n) return !1;
@@ -520,66 +520,66 @@ function on(e, { upTo: n }) {
520
520
  }
521
521
  return !1;
522
522
  }
523
- function an(e) {
523
+ function nn(e) {
524
524
  return e instanceof HTMLInputElement && "select" in e;
525
525
  }
526
- function B(e, { select: n = !1 } = {}) {
526
+ function F(e, { select: n = !1 } = {}) {
527
527
  if (e && e.focus) {
528
528
  const t = document.activeElement;
529
529
  e.focus({
530
530
  preventScroll: !0
531
- }), e !== t && an(e) && n && e.select();
531
+ }), e !== t && nn(e) && n && e.select();
532
532
  }
533
533
  }
534
- const We = cn();
535
- function cn() {
534
+ const Ue = rn();
535
+ function rn() {
536
536
  let e = [];
537
537
  return {
538
538
  add(n) {
539
539
  const t = e[0];
540
- n !== t && (t == null || t.pause()), e = ze(e, n), e.unshift(n);
540
+ n !== t && (t == null || t.pause()), e = We(e, n), e.unshift(n);
541
541
  },
542
542
  remove(n) {
543
543
  var t;
544
- e = ze(e, n), (t = e[0]) === null || t === void 0 || t.resume();
544
+ e = We(e, n), (t = e[0]) === null || t === void 0 || t.resume();
545
545
  }
546
546
  };
547
547
  }
548
- function ze(e, n) {
548
+ function We(e, n) {
549
549
  const t = [
550
550
  ...e
551
551
  ], o = t.indexOf(n);
552
552
  return o !== -1 && t.splice(o, 1), t;
553
553
  }
554
- function un(e) {
554
+ function on(e) {
555
555
  return e.filter(
556
556
  (n) => n.tagName !== "A"
557
557
  );
558
558
  }
559
- const sn = /* @__PURE__ */ S((e, n) => {
559
+ const an = /* @__PURE__ */ S((e, n) => {
560
560
  var t;
561
561
  const { container: o = globalThis == null || (t = globalThis.document) === null || t === void 0 ? void 0 : t.body, ...a } = e;
562
- return o ? /* @__PURE__ */ Lt.createPortal(/* @__PURE__ */ g(q.div, N({}, a, {
562
+ return o ? /* @__PURE__ */ Dt.createPortal(/* @__PURE__ */ g(W.div, N({}, a, {
563
563
  ref: n
564
564
  })), o) : null;
565
565
  });
566
- function ln(e, n) {
567
- return Rt((t, o) => {
566
+ function cn(e, n) {
567
+ return Tt((t, o) => {
568
568
  const a = n[t][o];
569
569
  return a ?? t;
570
570
  }, e);
571
571
  }
572
- const ge = (e) => {
573
- const { present: n, children: t } = e, o = dn(n), a = typeof t == "function" ? t({
572
+ const me = (e) => {
573
+ const { present: n, children: t } = e, o = un(n), a = typeof t == "function" ? t({
574
574
  present: o.isPresent
575
- }) : R.only(t), r = J(o.ref, a.ref);
576
- return typeof t == "function" || o.isPresent ? /* @__PURE__ */ ae(a, {
575
+ }) : L.only(t), r = Q(o.ref, a.ref);
576
+ return typeof t == "function" || o.isPresent ? /* @__PURE__ */ oe(a, {
577
577
  ref: r
578
578
  }) : null;
579
579
  };
580
- ge.displayName = "Presence";
581
- function dn(e) {
582
- const [n, t] = K(), o = C({}), a = C(e), r = C("none"), i = e ? "mounted" : "unmounted", [c, s] = ln(i, {
580
+ me.displayName = "Presence";
581
+ function un(e) {
582
+ const [n, t] = H(), o = P({}), a = P(e), r = P("none"), i = e ? "mounted" : "unmounted", [c, s] = cn(i, {
583
583
  mounted: {
584
584
  UNMOUNT: "unmounted",
585
585
  ANIMATION_OUT: "unmountSuspended"
@@ -593,28 +593,28 @@ function dn(e) {
593
593
  }
594
594
  });
595
595
  return A(() => {
596
- const d = ce(o.current);
596
+ const d = ie(o.current);
597
597
  r.current = c === "mounted" ? d : "none";
598
598
  }, [
599
599
  c
600
- ]), Oe(() => {
600
+ ]), Ce(() => {
601
601
  const d = o.current, p = a.current;
602
602
  if (p !== e) {
603
- const h = r.current, f = ce(d);
603
+ const h = r.current, f = ie(d);
604
604
  e ? s("MOUNT") : f === "none" || (d == null ? void 0 : d.display) === "none" ? s("UNMOUNT") : s(p && h !== f ? "ANIMATION_OUT" : "UNMOUNT"), a.current = e;
605
605
  }
606
606
  }, [
607
607
  e,
608
608
  s
609
- ]), Oe(() => {
609
+ ]), Ce(() => {
610
610
  if (n) {
611
611
  const d = (l) => {
612
- const f = ce(o.current).includes(l.animationName);
613
- l.target === n && f && tt(
612
+ const f = ie(o.current).includes(l.animationName);
613
+ l.target === n && f && et(
614
614
  () => s("ANIMATION_END")
615
615
  );
616
616
  }, p = (l) => {
617
- l.target === n && (r.current = ce(o.current));
617
+ l.target === n && (r.current = ie(o.current));
618
618
  };
619
619
  return n.addEventListener("animationstart", p), n.addEventListener("animationcancel", d), n.addEventListener("animationend", d), () => {
620
620
  n.removeEventListener("animationstart", p), n.removeEventListener("animationcancel", d), n.removeEventListener("animationend", d);
@@ -629,27 +629,27 @@ function dn(e) {
629
629
  "mounted",
630
630
  "unmountSuspended"
631
631
  ].includes(c),
632
- ref: Q((d) => {
632
+ ref: Z((d) => {
633
633
  d && (o.current = getComputedStyle(d)), t(d);
634
634
  }, [])
635
635
  };
636
636
  }
637
- function ce(e) {
637
+ function ie(e) {
638
638
  return (e == null ? void 0 : e.animationName) || "none";
639
639
  }
640
- let Ee = 0;
641
- function pn() {
640
+ let ye = 0;
641
+ function sn() {
642
642
  A(() => {
643
643
  var e, n;
644
644
  const t = document.querySelectorAll("[data-radix-focus-guard]");
645
- return document.body.insertAdjacentElement("afterbegin", (e = t[0]) !== null && e !== void 0 ? e : qe()), document.body.insertAdjacentElement("beforeend", (n = t[1]) !== null && n !== void 0 ? n : qe()), Ee++, () => {
646
- Ee === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach(
645
+ return document.body.insertAdjacentElement("afterbegin", (e = t[0]) !== null && e !== void 0 ? e : ze()), document.body.insertAdjacentElement("beforeend", (n = t[1]) !== null && n !== void 0 ? n : ze()), ye++, () => {
646
+ ye === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach(
647
647
  (o) => o.remove()
648
- ), Ee--;
648
+ ), ye--;
649
649
  };
650
650
  }, []);
651
651
  }
652
- function qe() {
652
+ function ze() {
653
653
  const e = document.createElement("span");
654
654
  return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.cssText = "outline: none; opacity: 0; position: fixed; pointer-events: none", e;
655
655
  }
@@ -662,7 +662,7 @@ var k = function() {
662
662
  return n;
663
663
  }, k.apply(this, arguments);
664
664
  };
665
- function at(e, n) {
665
+ function ot(e, n) {
666
666
  var t = {};
667
667
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && n.indexOf(o) < 0 && (t[o] = e[o]);
668
668
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
@@ -670,17 +670,17 @@ function at(e, n) {
670
670
  n.indexOf(o[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[a]) && (t[o[a]] = e[o[a]]);
671
671
  return t;
672
672
  }
673
- function fn(e, n, t) {
673
+ function ln(e, n, t) {
674
674
  if (t || arguments.length === 2) for (var o = 0, a = n.length, r; o < a; o++)
675
675
  (r || !(o in n)) && (r || (r = Array.prototype.slice.call(n, 0, o)), r[o] = n[o]);
676
676
  return e.concat(r || Array.prototype.slice.call(n));
677
677
  }
678
- var ve = "right-scroll-bar-position", he = "width-before-scroll-bar", vn = "with-scroll-bars-hidden", hn = "--removed-body-scroll-bar-size";
679
- function mn(e, n) {
678
+ var fe = "right-scroll-bar-position", ve = "width-before-scroll-bar", dn = "with-scroll-bars-hidden", pn = "--removed-body-scroll-bar-size";
679
+ function fn(e, n) {
680
680
  return typeof e == "function" ? e(n) : e && (e.current = n), e;
681
681
  }
682
- function gn(e, n) {
683
- var t = K(function() {
682
+ function vn(e, n) {
683
+ var t = H(function() {
684
684
  return {
685
685
  // value
686
686
  value: e,
@@ -700,18 +700,18 @@ function gn(e, n) {
700
700
  })[0];
701
701
  return t.callback = n, t.facade;
702
702
  }
703
- function _n(e, n) {
704
- return gn(null, function(t) {
703
+ function hn(e, n) {
704
+ return vn(null, function(t) {
705
705
  return e.forEach(function(o) {
706
- return mn(o, t);
706
+ return fn(o, t);
707
707
  });
708
708
  });
709
709
  }
710
- function bn(e) {
710
+ function mn(e) {
711
711
  return e;
712
712
  }
713
- function $n(e, n) {
714
- n === void 0 && (n = bn);
713
+ function gn(e, n) {
714
+ n === void 0 && (n = mn);
715
715
  var t = [], o = !1, a = {
716
716
  read: function() {
717
717
  if (o)
@@ -765,13 +765,13 @@ function $n(e, n) {
765
765
  };
766
766
  return a;
767
767
  }
768
- function yn(e) {
768
+ function _n(e) {
769
769
  e === void 0 && (e = {});
770
- var n = $n(null);
770
+ var n = gn(null);
771
771
  return n.options = k({ async: !0, ssr: !1 }, e), n;
772
772
  }
773
- var it = function(e) {
774
- var n = e.sideCar, t = at(e, ["sideCar"]);
773
+ var at = function(e) {
774
+ var n = e.sideCar, t = ot(e, ["sideCar"]);
775
775
  if (!n)
776
776
  throw new Error("Sidecar: please provide `sideCar` property to import the right car");
777
777
  var o = n.read();
@@ -779,64 +779,64 @@ var it = function(e) {
779
779
  throw new Error("Sidecar medium not found");
780
780
  return m.createElement(o, k({}, t));
781
781
  };
782
- it.isSideCarExport = !0;
783
- function En(e, n) {
784
- return e.useMedium(n), it;
782
+ at.isSideCarExport = !0;
783
+ function bn(e, n) {
784
+ return e.useMedium(n), at;
785
785
  }
786
- var ct = yn(), xe = function() {
787
- }, _e = m.forwardRef(function(e, n) {
786
+ var it = _n(), Ee = function() {
787
+ }, ge = m.forwardRef(function(e, n) {
788
788
  var t = m.useRef(null), o = m.useState({
789
- onScrollCapture: xe,
790
- onWheelCapture: xe,
791
- onTouchMoveCapture: xe
792
- }), a = o[0], r = o[1], i = e.forwardProps, c = e.children, s = e.className, d = e.removeScrollBar, p = e.enabled, l = e.shards, h = e.sideCar, f = e.noIsolation, E = e.inert, u = e.allowPinchZoom, v = e.as, b = v === void 0 ? "div" : v, O = at(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as"]), y = h, $ = _n([t, n]), w = k(k({}, O), a);
789
+ onScrollCapture: Ee,
790
+ onWheelCapture: Ee,
791
+ onTouchMoveCapture: Ee
792
+ }), a = o[0], r = o[1], i = e.forwardProps, c = e.children, s = e.className, d = e.removeScrollBar, p = e.enabled, l = e.shards, h = e.sideCar, f = e.noIsolation, E = e.inert, u = e.allowPinchZoom, v = e.as, b = v === void 0 ? "div" : v, C = ot(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as"]), y = h, $ = hn([t, n]), w = k(k({}, C), a);
793
793
  return m.createElement(
794
794
  m.Fragment,
795
795
  null,
796
- p && m.createElement(y, { sideCar: ct, removeScrollBar: d, shards: l, noIsolation: f, inert: E, setCallbacks: r, allowPinchZoom: !!u, lockRef: t }),
796
+ p && m.createElement(y, { sideCar: it, removeScrollBar: d, shards: l, noIsolation: f, inert: E, setCallbacks: r, allowPinchZoom: !!u, lockRef: t }),
797
797
  i ? m.cloneElement(m.Children.only(c), k(k({}, w), { ref: $ })) : m.createElement(b, k({}, w, { className: s, ref: $ }), c)
798
798
  );
799
799
  });
800
- _e.defaultProps = {
800
+ ge.defaultProps = {
801
801
  enabled: !0,
802
802
  removeScrollBar: !0,
803
803
  inert: !1
804
804
  };
805
- _e.classNames = {
806
- fullWidth: he,
807
- zeroRight: ve
805
+ ge.classNames = {
806
+ fullWidth: ve,
807
+ zeroRight: fe
808
808
  };
809
- var xn = function() {
809
+ var $n = function() {
810
810
  if (typeof __webpack_nonce__ < "u")
811
811
  return __webpack_nonce__;
812
812
  };
813
- function wn() {
813
+ function yn() {
814
814
  if (!document)
815
815
  return null;
816
816
  var e = document.createElement("style");
817
817
  e.type = "text/css";
818
- var n = xn();
818
+ var n = $n();
819
819
  return n && e.setAttribute("nonce", n), e;
820
820
  }
821
- function Sn(e, n) {
821
+ function En(e, n) {
822
822
  e.styleSheet ? e.styleSheet.cssText = n : e.appendChild(document.createTextNode(n));
823
823
  }
824
- function Cn(e) {
824
+ function xn(e) {
825
825
  var n = document.head || document.getElementsByTagName("head")[0];
826
826
  n.appendChild(e);
827
827
  }
828
- var On = function() {
828
+ var wn = function() {
829
829
  var e = 0, n = null;
830
830
  return {
831
831
  add: function(t) {
832
- e == 0 && (n = wn()) && (Sn(n, t), Cn(n)), e++;
832
+ e == 0 && (n = yn()) && (En(n, t), xn(n)), e++;
833
833
  },
834
834
  remove: function() {
835
835
  e--, !e && n && (n.parentNode && n.parentNode.removeChild(n), n = null);
836
836
  }
837
837
  };
838
- }, Pn = function() {
839
- var e = On();
838
+ }, Sn = function() {
839
+ var e = wn();
840
840
  return function(n, t) {
841
841
  m.useEffect(function() {
842
842
  return e.add(n), function() {
@@ -844,36 +844,36 @@ var On = function() {
844
844
  };
845
845
  }, [n && t]);
846
846
  };
847
- }, ut = function() {
848
- var e = Pn(), n = function(t) {
847
+ }, ct = function() {
848
+ var e = Sn(), n = function(t) {
849
849
  var o = t.styles, a = t.dynamic;
850
850
  return e(o, a), null;
851
851
  };
852
852
  return n;
853
- }, Nn = {
853
+ }, Cn = {
854
854
  left: 0,
855
855
  top: 0,
856
856
  right: 0,
857
857
  gap: 0
858
- }, we = function(e) {
858
+ }, xe = function(e) {
859
859
  return parseInt(e || "", 10) || 0;
860
- }, An = function(e) {
860
+ }, On = function(e) {
861
861
  var n = window.getComputedStyle(document.body), t = n[e === "padding" ? "paddingLeft" : "marginLeft"], o = n[e === "padding" ? "paddingTop" : "marginTop"], a = n[e === "padding" ? "paddingRight" : "marginRight"];
862
- return [we(t), we(o), we(a)];
863
- }, Tn = function(e) {
862
+ return [xe(t), xe(o), xe(a)];
863
+ }, Pn = function(e) {
864
864
  if (e === void 0 && (e = "margin"), typeof window > "u")
865
- return Nn;
866
- var n = An(e), t = document.documentElement.clientWidth, o = window.innerWidth;
865
+ return Cn;
866
+ var n = On(e), t = document.documentElement.clientWidth, o = window.innerWidth;
867
867
  return {
868
868
  left: n[0],
869
869
  top: n[1],
870
870
  right: n[2],
871
871
  gap: Math.max(0, o - t + n[2] - n[0])
872
872
  };
873
- }, Dn = ut(), In = function(e, n, t, o) {
873
+ }, Nn = ct(), An = function(e, n, t, o) {
874
874
  var a = e.left, r = e.top, i = e.right, c = e.gap;
875
875
  return t === void 0 && (t = "margin"), `
876
- .`.concat(vn, ` {
876
+ .`.concat(dn, ` {
877
877
  overflow: hidden `).concat(o, `;
878
878
  padding-right: `).concat(c, "px ").concat(o, `;
879
879
  }
@@ -894,124 +894,124 @@ var On = function() {
894
894
  ].filter(Boolean).join(""), `
895
895
  }
896
896
 
897
- .`).concat(ve, ` {
897
+ .`).concat(fe, ` {
898
898
  right: `).concat(c, "px ").concat(o, `;
899
899
  }
900
900
 
901
- .`).concat(he, ` {
901
+ .`).concat(ve, ` {
902
902
  margin-right: `).concat(c, "px ").concat(o, `;
903
903
  }
904
904
 
905
- .`).concat(ve, " .").concat(ve, ` {
905
+ .`).concat(fe, " .").concat(fe, ` {
906
906
  right: 0 `).concat(o, `;
907
907
  }
908
908
 
909
- .`).concat(he, " .").concat(he, ` {
909
+ .`).concat(ve, " .").concat(ve, ` {
910
910
  margin-right: 0 `).concat(o, `;
911
911
  }
912
912
 
913
913
  body {
914
- `).concat(hn, ": ").concat(c, `px;
914
+ `).concat(pn, ": ").concat(c, `px;
915
915
  }
916
916
  `);
917
- }, Rn = function(e) {
917
+ }, Tn = function(e) {
918
918
  var n = e.noRelative, t = e.noImportant, o = e.gapMode, a = o === void 0 ? "margin" : o, r = m.useMemo(function() {
919
- return Tn(a);
919
+ return Pn(a);
920
920
  }, [a]);
921
- return m.createElement(Dn, { styles: In(r, !n, a, t ? "" : "!important") });
922
- }, Ae = !1;
921
+ return m.createElement(Nn, { styles: An(r, !n, a, t ? "" : "!important") });
922
+ }, Ne = !1;
923
923
  if (typeof window < "u")
924
924
  try {
925
- var ue = Object.defineProperty({}, "passive", {
925
+ var ce = Object.defineProperty({}, "passive", {
926
926
  get: function() {
927
- return Ae = !0, !0;
927
+ return Ne = !0, !0;
928
928
  }
929
929
  });
930
- window.addEventListener("test", ue, ue), window.removeEventListener("test", ue, ue);
930
+ window.addEventListener("test", ce, ce), window.removeEventListener("test", ce, ce);
931
931
  } catch {
932
- Ae = !1;
932
+ Ne = !1;
933
933
  }
934
- var V = Ae ? { passive: !1 } : !1, Ln = function(e) {
934
+ var G = Ne ? { passive: !1 } : !1, Dn = function(e) {
935
935
  return e.tagName === "TEXTAREA";
936
- }, st = function(e, n) {
936
+ }, ut = function(e, n) {
937
937
  var t = window.getComputedStyle(e);
938
938
  return (
939
939
  // not-not-scrollable
940
940
  t[n] !== "hidden" && // contains scroll inside self
941
- !(t.overflowY === t.overflowX && !Ln(e) && t[n] === "visible")
941
+ !(t.overflowY === t.overflowX && !Dn(e) && t[n] === "visible")
942
942
  );
943
- }, Mn = function(e) {
944
- return st(e, "overflowY");
945
- }, kn = function(e) {
946
- return st(e, "overflowX");
947
- }, He = function(e, n) {
943
+ }, In = function(e) {
944
+ return ut(e, "overflowY");
945
+ }, Ln = function(e) {
946
+ return ut(e, "overflowX");
947
+ }, qe = function(e, n) {
948
948
  var t = n;
949
949
  do {
950
950
  typeof ShadowRoot < "u" && t instanceof ShadowRoot && (t = t.host);
951
- var o = lt(e, t);
951
+ var o = st(e, t);
952
952
  if (o) {
953
- var a = dt(e, t), r = a[1], i = a[2];
953
+ var a = lt(e, t), r = a[1], i = a[2];
954
954
  if (r > i)
955
955
  return !0;
956
956
  }
957
957
  t = t.parentNode;
958
958
  } while (t && t !== document.body);
959
959
  return !1;
960
- }, Fn = function(e) {
960
+ }, Rn = function(e) {
961
961
  var n = e.scrollTop, t = e.scrollHeight, o = e.clientHeight;
962
962
  return [
963
963
  n,
964
964
  t,
965
965
  o
966
966
  ];
967
- }, jn = function(e) {
967
+ }, Mn = function(e) {
968
968
  var n = e.scrollLeft, t = e.scrollWidth, o = e.clientWidth;
969
969
  return [
970
970
  n,
971
971
  t,
972
972
  o
973
973
  ];
974
+ }, st = function(e, n) {
975
+ return e === "v" ? In(n) : Ln(n);
974
976
  }, lt = function(e, n) {
975
- return e === "v" ? Mn(n) : kn(n);
976
- }, dt = function(e, n) {
977
- return e === "v" ? Fn(n) : jn(n);
978
- }, Bn = function(e, n) {
977
+ return e === "v" ? Rn(n) : Mn(n);
978
+ }, kn = function(e, n) {
979
979
  return e === "h" && n === "rtl" ? -1 : 1;
980
- }, Un = function(e, n, t, o, a) {
981
- var r = Bn(e, window.getComputedStyle(n).direction), i = r * o, c = t.target, s = n.contains(c), d = !1, p = i > 0, l = 0, h = 0;
980
+ }, Fn = function(e, n, t, o, a) {
981
+ var r = kn(e, window.getComputedStyle(n).direction), i = r * o, c = t.target, s = n.contains(c), d = !1, p = i > 0, l = 0, h = 0;
982
982
  do {
983
- var f = dt(e, c), E = f[0], u = f[1], v = f[2], b = u - v - r * E;
984
- (E || b) && lt(e, c) && (l += b, h += E), c = c.parentNode;
983
+ var f = lt(e, c), E = f[0], u = f[1], v = f[2], b = u - v - r * E;
984
+ (E || b) && st(e, c) && (l += b, h += E), c = c.parentNode;
985
985
  } while (
986
986
  // portaled content
987
987
  !s && c !== document.body || // self content
988
988
  s && (n.contains(c) || n === c)
989
989
  );
990
990
  return (p && (l === 0 || !a) || !p && (h === 0 || !a)) && (d = !0), d;
991
- }, se = function(e) {
991
+ }, ue = function(e) {
992
992
  return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
993
- }, Ke = function(e) {
993
+ }, He = function(e) {
994
994
  return [e.deltaX, e.deltaY];
995
- }, Ge = function(e) {
995
+ }, Ke = function(e) {
996
996
  return e && "current" in e ? e.current : e;
997
- }, Wn = function(e, n) {
997
+ }, jn = function(e, n) {
998
998
  return e[0] === n[0] && e[1] === n[1];
999
- }, zn = function(e) {
999
+ }, Bn = function(e) {
1000
1000
  return `
1001
1001
  .block-interactivity-`.concat(e, ` {pointer-events: none;}
1002
1002
  .allow-interactivity-`).concat(e, ` {pointer-events: all;}
1003
1003
  `);
1004
- }, qn = 0, X = [];
1005
- function Hn(e) {
1006
- var n = m.useRef([]), t = m.useRef([0, 0]), o = m.useRef(), a = m.useState(qn++)[0], r = m.useState(function() {
1007
- return ut();
1004
+ }, Un = 0, V = [];
1005
+ function Wn(e) {
1006
+ var n = m.useRef([]), t = m.useRef([0, 0]), o = m.useRef(), a = m.useState(Un++)[0], r = m.useState(function() {
1007
+ return ct();
1008
1008
  })[0], i = m.useRef(e);
1009
1009
  m.useEffect(function() {
1010
1010
  i.current = e;
1011
1011
  }, [e]), m.useEffect(function() {
1012
1012
  if (e.inert) {
1013
1013
  document.body.classList.add("block-interactivity-".concat(a));
1014
- var u = fn([e.lockRef.current], (e.shards || []).map(Ge), !0).filter(Boolean);
1014
+ var u = ln([e.lockRef.current], (e.shards || []).map(Ke), !0).filter(Boolean);
1015
1015
  return u.forEach(function(v) {
1016
1016
  return v.classList.add("allow-interactivity-".concat(a));
1017
1017
  }), function() {
@@ -1024,93 +1024,93 @@ function Hn(e) {
1024
1024
  var c = m.useCallback(function(u, v) {
1025
1025
  if ("touches" in u && u.touches.length === 2)
1026
1026
  return !i.current.allowPinchZoom;
1027
- var b = se(u), O = t.current, y = "deltaX" in u ? u.deltaX : O[0] - b[0], $ = "deltaY" in u ? u.deltaY : O[1] - b[1], w, F = u.target, I = Math.abs(y) > Math.abs($) ? "h" : "v";
1028
- if ("touches" in u && I === "h" && F.type === "range")
1027
+ var b = ue(u), C = t.current, y = "deltaX" in u ? u.deltaX : C[0] - b[0], $ = "deltaY" in u ? u.deltaY : C[1] - b[1], w, z = u.target, D = Math.abs(y) > Math.abs($) ? "h" : "v";
1028
+ if ("touches" in u && D === "h" && z.type === "range")
1029
1029
  return !1;
1030
- var x = He(I, F);
1030
+ var x = qe(D, z);
1031
1031
  if (!x)
1032
1032
  return !0;
1033
- if (x ? w = I : (w = I === "v" ? "h" : "v", x = He(I, F)), !x)
1033
+ if (x ? w = D : (w = D === "v" ? "h" : "v", x = qe(D, z)), !x)
1034
1034
  return !1;
1035
1035
  if (!o.current && "changedTouches" in u && (y || $) && (o.current = w), !w)
1036
1036
  return !0;
1037
- var D = o.current || w;
1038
- return Un(D, v, u, D === "h" ? y : $, !0);
1037
+ var I = o.current || w;
1038
+ return Fn(I, v, u, I === "h" ? y : $, !0);
1039
1039
  }, []), s = m.useCallback(function(u) {
1040
1040
  var v = u;
1041
- if (!(!X.length || X[X.length - 1] !== r)) {
1042
- var b = "deltaY" in v ? Ke(v) : se(v), O = n.current.filter(function(w) {
1043
- return w.name === v.type && w.target === v.target && Wn(w.delta, b);
1041
+ if (!(!V.length || V[V.length - 1] !== r)) {
1042
+ var b = "deltaY" in v ? He(v) : ue(v), C = n.current.filter(function(w) {
1043
+ return w.name === v.type && w.target === v.target && jn(w.delta, b);
1044
1044
  })[0];
1045
- if (O && O.should) {
1045
+ if (C && C.should) {
1046
1046
  v.cancelable && v.preventDefault();
1047
1047
  return;
1048
1048
  }
1049
- if (!O) {
1050
- var y = (i.current.shards || []).map(Ge).filter(Boolean).filter(function(w) {
1049
+ if (!C) {
1050
+ var y = (i.current.shards || []).map(Ke).filter(Boolean).filter(function(w) {
1051
1051
  return w.contains(v.target);
1052
1052
  }), $ = y.length > 0 ? c(v, y[0]) : !i.current.noIsolation;
1053
1053
  $ && v.cancelable && v.preventDefault();
1054
1054
  }
1055
1055
  }
1056
- }, []), d = m.useCallback(function(u, v, b, O) {
1057
- var y = { name: u, delta: v, target: b, should: O };
1056
+ }, []), d = m.useCallback(function(u, v, b, C) {
1057
+ var y = { name: u, delta: v, target: b, should: C };
1058
1058
  n.current.push(y), setTimeout(function() {
1059
1059
  n.current = n.current.filter(function($) {
1060
1060
  return $ !== y;
1061
1061
  });
1062
1062
  }, 1);
1063
1063
  }, []), p = m.useCallback(function(u) {
1064
- t.current = se(u), o.current = void 0;
1064
+ t.current = ue(u), o.current = void 0;
1065
1065
  }, []), l = m.useCallback(function(u) {
1066
- d(u.type, Ke(u), u.target, c(u, e.lockRef.current));
1066
+ d(u.type, He(u), u.target, c(u, e.lockRef.current));
1067
1067
  }, []), h = m.useCallback(function(u) {
1068
- d(u.type, se(u), u.target, c(u, e.lockRef.current));
1068
+ d(u.type, ue(u), u.target, c(u, e.lockRef.current));
1069
1069
  }, []);
1070
1070
  m.useEffect(function() {
1071
- return X.push(r), e.setCallbacks({
1071
+ return V.push(r), e.setCallbacks({
1072
1072
  onScrollCapture: l,
1073
1073
  onWheelCapture: l,
1074
1074
  onTouchMoveCapture: h
1075
- }), document.addEventListener("wheel", s, V), document.addEventListener("touchmove", s, V), document.addEventListener("touchstart", p, V), function() {
1076
- X = X.filter(function(u) {
1075
+ }), document.addEventListener("wheel", s, G), document.addEventListener("touchmove", s, G), document.addEventListener("touchstart", p, G), function() {
1076
+ V = V.filter(function(u) {
1077
1077
  return u !== r;
1078
- }), document.removeEventListener("wheel", s, V), document.removeEventListener("touchmove", s, V), document.removeEventListener("touchstart", p, V);
1078
+ }), document.removeEventListener("wheel", s, G), document.removeEventListener("touchmove", s, G), document.removeEventListener("touchstart", p, G);
1079
1079
  };
1080
1080
  }, []);
1081
1081
  var f = e.removeScrollBar, E = e.inert;
1082
1082
  return m.createElement(
1083
1083
  m.Fragment,
1084
1084
  null,
1085
- E ? m.createElement(r, { styles: zn(a) }) : null,
1086
- f ? m.createElement(Rn, { gapMode: "margin" }) : null
1085
+ E ? m.createElement(r, { styles: Bn(a) }) : null,
1086
+ f ? m.createElement(Tn, { gapMode: "margin" }) : null
1087
1087
  );
1088
1088
  }
1089
- const Kn = En(ct, Hn);
1090
- var pt = m.forwardRef(function(e, n) {
1091
- return m.createElement(_e, k({}, e, { ref: n, sideCar: Kn }));
1089
+ const zn = bn(it, Wn);
1090
+ var dt = m.forwardRef(function(e, n) {
1091
+ return m.createElement(ge, k({}, e, { ref: n, sideCar: zn }));
1092
1092
  });
1093
- pt.classNames = _e.classNames;
1094
- var Gn = function(e) {
1093
+ dt.classNames = ge.classNames;
1094
+ var qn = function(e) {
1095
1095
  if (typeof document > "u")
1096
1096
  return null;
1097
1097
  var n = Array.isArray(e) ? e[0] : e;
1098
1098
  return n.ownerDocument.body;
1099
- }, Y = /* @__PURE__ */ new WeakMap(), le = /* @__PURE__ */ new WeakMap(), de = {}, Se = 0, ft = function(e) {
1100
- return e && (e.host || ft(e.parentNode));
1101
- }, Vn = function(e, n) {
1099
+ }, X = /* @__PURE__ */ new WeakMap(), se = /* @__PURE__ */ new WeakMap(), le = {}, we = 0, pt = function(e) {
1100
+ return e && (e.host || pt(e.parentNode));
1101
+ }, Hn = function(e, n) {
1102
1102
  return n.map(function(t) {
1103
1103
  if (e.contains(t))
1104
1104
  return t;
1105
- var o = ft(t);
1105
+ var o = pt(t);
1106
1106
  return o && e.contains(o) ? o : (console.error("aria-hidden", t, "in not contained inside", e, ". Doing nothing"), null);
1107
1107
  }).filter(function(t) {
1108
1108
  return !!t;
1109
1109
  });
1110
- }, Xn = function(e, n, t, o) {
1111
- var a = Vn(n, Array.isArray(e) ? e : [e]);
1112
- de[t] || (de[t] = /* @__PURE__ */ new WeakMap());
1113
- var r = de[t], i = [], c = /* @__PURE__ */ new Set(), s = new Set(a), d = function(l) {
1110
+ }, Kn = function(e, n, t, o) {
1111
+ var a = Hn(n, Array.isArray(e) ? e : [e]);
1112
+ le[t] || (le[t] = /* @__PURE__ */ new WeakMap());
1113
+ var r = le[t], i = [], c = /* @__PURE__ */ new Set(), s = new Set(a), d = function(l) {
1114
1114
  !l || c.has(l) || (c.add(l), d(l.parentNode));
1115
1115
  };
1116
1116
  a.forEach(d);
@@ -1119,40 +1119,40 @@ var Gn = function(e) {
1119
1119
  if (c.has(h))
1120
1120
  p(h);
1121
1121
  else {
1122
- var f = h.getAttribute(o), E = f !== null && f !== "false", u = (Y.get(h) || 0) + 1, v = (r.get(h) || 0) + 1;
1123
- Y.set(h, u), r.set(h, v), i.push(h), u === 1 && E && le.set(h, !0), v === 1 && h.setAttribute(t, "true"), E || h.setAttribute(o, "true");
1122
+ var f = h.getAttribute(o), E = f !== null && f !== "false", u = (X.get(h) || 0) + 1, v = (r.get(h) || 0) + 1;
1123
+ X.set(h, u), r.set(h, v), i.push(h), u === 1 && E && se.set(h, !0), v === 1 && h.setAttribute(t, "true"), E || h.setAttribute(o, "true");
1124
1124
  }
1125
1125
  });
1126
1126
  };
1127
- return p(n), c.clear(), Se++, function() {
1127
+ return p(n), c.clear(), we++, function() {
1128
1128
  i.forEach(function(l) {
1129
- var h = Y.get(l) - 1, f = r.get(l) - 1;
1130
- Y.set(l, h), r.set(l, f), h || (le.has(l) || l.removeAttribute(o), le.delete(l)), f || l.removeAttribute(t);
1131
- }), Se--, Se || (Y = /* @__PURE__ */ new WeakMap(), Y = /* @__PURE__ */ new WeakMap(), le = /* @__PURE__ */ new WeakMap(), de = {});
1129
+ var h = X.get(l) - 1, f = r.get(l) - 1;
1130
+ X.set(l, h), r.set(l, f), h || (se.has(l) || l.removeAttribute(o), se.delete(l)), f || l.removeAttribute(t);
1131
+ }), we--, we || (X = /* @__PURE__ */ new WeakMap(), X = /* @__PURE__ */ new WeakMap(), se = /* @__PURE__ */ new WeakMap(), le = {});
1132
1132
  };
1133
- }, Yn = function(e, n, t) {
1133
+ }, Gn = function(e, n, t) {
1134
1134
  t === void 0 && (t = "data-aria-hidden");
1135
- var o = Array.from(Array.isArray(e) ? e : [e]), a = Gn(e);
1136
- return a ? (o.push.apply(o, Array.from(a.querySelectorAll("[aria-live]"))), Xn(o, a, t, "aria-hidden")) : function() {
1135
+ var o = Array.from(Array.isArray(e) ? e : [e]), a = qn(e);
1136
+ return a ? (o.push.apply(o, Array.from(a.querySelectorAll("[aria-live]"))), Kn(o, a, t, "aria-hidden")) : function() {
1137
1137
  return null;
1138
1138
  };
1139
1139
  };
1140
- const vt = "Dialog", [ht, Eo] = kt(vt), [Zn, L] = ht(vt), Qn = (e) => {
1141
- const { __scopeDialog: n, children: t, open: o, defaultOpen: a, onOpenChange: r, modal: i = !0 } = e, c = C(null), s = C(null), [d = !1, p] = Ut({
1140
+ const ft = "Dialog", [vt, _o] = Lt(ft), [Vn, M] = vt(ft), Xn = (e) => {
1141
+ const { __scopeDialog: n, children: t, open: o, defaultOpen: a, onOpenChange: r, modal: i = !0 } = e, c = P(null), s = P(null), [d = !1, p] = Ft({
1142
1142
  prop: o,
1143
1143
  defaultProp: a,
1144
1144
  onChange: r
1145
1145
  });
1146
- return /* @__PURE__ */ g(Zn, {
1146
+ return /* @__PURE__ */ g(Vn, {
1147
1147
  scope: n,
1148
1148
  triggerRef: c,
1149
1149
  contentRef: s,
1150
- contentId: be(),
1151
- titleId: be(),
1152
- descriptionId: be(),
1150
+ contentId: _e(),
1151
+ titleId: _e(),
1152
+ descriptionId: _e(),
1153
1153
  open: d,
1154
1154
  onOpenChange: p,
1155
- onOpenToggle: Q(
1155
+ onOpenToggle: Z(
1156
1156
  () => p(
1157
1157
  (l) => !l
1158
1158
  ),
@@ -1162,9 +1162,9 @@ const vt = "Dialog", [ht, Eo] = kt(vt), [Zn, L] = ht(vt), Qn = (e) => {
1162
1162
  ),
1163
1163
  modal: i
1164
1164
  }, t);
1165
- }, Jn = "DialogTrigger", er = /* @__PURE__ */ S((e, n) => {
1166
- const { __scopeDialog: t, ...o } = e, a = L(Jn, t), r = J(n, a.triggerRef);
1167
- return /* @__PURE__ */ g(q.button, N({
1165
+ }, Yn = "DialogTrigger", Zn = /* @__PURE__ */ S((e, n) => {
1166
+ const { __scopeDialog: t, ...o } = e, a = M(Yn, t), r = Q(n, a.triggerRef);
1167
+ return /* @__PURE__ */ g(W.button, N({
1168
1168
  type: "button",
1169
1169
  "aria-haspopup": "dialog",
1170
1170
  "aria-expanded": a.open,
@@ -1172,43 +1172,43 @@ const vt = "Dialog", [ht, Eo] = kt(vt), [Zn, L] = ht(vt), Qn = (e) => {
1172
1172
  "data-state": Le(a.open)
1173
1173
  }, o, {
1174
1174
  ref: r,
1175
- onClick: W(e.onClick, a.onOpenToggle)
1175
+ onClick: B(e.onClick, a.onOpenToggle)
1176
1176
  }));
1177
- }), mt = "DialogPortal", [tr, gt] = ht(mt, {
1177
+ }), ht = "DialogPortal", [Qn, mt] = vt(ht, {
1178
1178
  forceMount: void 0
1179
- }), nr = (e) => {
1180
- const { __scopeDialog: n, forceMount: t, children: o, container: a } = e, r = L(mt, n);
1181
- return /* @__PURE__ */ g(tr, {
1179
+ }), Jn = (e) => {
1180
+ const { __scopeDialog: n, forceMount: t, children: o, container: a } = e, r = M(ht, n);
1181
+ return /* @__PURE__ */ g(Qn, {
1182
1182
  scope: n,
1183
1183
  forceMount: t
1184
- }, R.map(
1184
+ }, L.map(
1185
1185
  o,
1186
- (i) => /* @__PURE__ */ g(ge, {
1186
+ (i) => /* @__PURE__ */ g(me, {
1187
1187
  present: t || r.open
1188
- }, /* @__PURE__ */ g(sn, {
1188
+ }, /* @__PURE__ */ g(an, {
1189
1189
  asChild: !0,
1190
1190
  container: a
1191
1191
  }, i))
1192
1192
  ));
1193
- }, Te = "DialogOverlay", rr = /* @__PURE__ */ S((e, n) => {
1194
- const t = gt(Te, e.__scopeDialog), { forceMount: o = t.forceMount, ...a } = e, r = L(Te, e.__scopeDialog);
1195
- return r.modal ? /* @__PURE__ */ g(ge, {
1193
+ }, Ae = "DialogOverlay", er = /* @__PURE__ */ S((e, n) => {
1194
+ const t = mt(Ae, e.__scopeDialog), { forceMount: o = t.forceMount, ...a } = e, r = M(Ae, e.__scopeDialog);
1195
+ return r.modal ? /* @__PURE__ */ g(me, {
1196
1196
  present: o || r.open
1197
- }, /* @__PURE__ */ g(or, N({}, a, {
1197
+ }, /* @__PURE__ */ g(tr, N({}, a, {
1198
1198
  ref: n
1199
1199
  }))) : null;
1200
- }), or = /* @__PURE__ */ S((e, n) => {
1201
- const { __scopeDialog: t, ...o } = e, a = L(Te, t);
1200
+ }), tr = /* @__PURE__ */ S((e, n) => {
1201
+ const { __scopeDialog: t, ...o } = e, a = M(Ae, t);
1202
1202
  return (
1203
1203
  // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
1204
1204
  // ie. when `Overlay` and `Content` are siblings
1205
- /* @__PURE__ */ g(pt, {
1206
- as: Re,
1205
+ /* @__PURE__ */ g(dt, {
1206
+ as: Ie,
1207
1207
  allowPinchZoom: !0,
1208
1208
  shards: [
1209
1209
  a.contentRef
1210
1210
  ]
1211
- }, /* @__PURE__ */ g(q.div, N({
1211
+ }, /* @__PURE__ */ g(W.div, N({
1212
1212
  "data-state": Le(a.open)
1213
1213
  }, o, {
1214
1214
  ref: n,
@@ -1218,40 +1218,40 @@ const vt = "Dialog", [ht, Eo] = kt(vt), [Zn, L] = ht(vt), Qn = (e) => {
1218
1218
  }
1219
1219
  })))
1220
1220
  );
1221
- }), oe = "DialogContent", ar = /* @__PURE__ */ S((e, n) => {
1222
- const t = gt(oe, e.__scopeDialog), { forceMount: o = t.forceMount, ...a } = e, r = L(oe, e.__scopeDialog);
1223
- return /* @__PURE__ */ g(ge, {
1221
+ }), re = "DialogContent", nr = /* @__PURE__ */ S((e, n) => {
1222
+ const t = mt(re, e.__scopeDialog), { forceMount: o = t.forceMount, ...a } = e, r = M(re, e.__scopeDialog);
1223
+ return /* @__PURE__ */ g(me, {
1224
1224
  present: o || r.open
1225
- }, r.modal ? /* @__PURE__ */ g(ir, N({}, a, {
1225
+ }, r.modal ? /* @__PURE__ */ g(rr, N({}, a, {
1226
1226
  ref: n
1227
- })) : /* @__PURE__ */ g(cr, N({}, a, {
1227
+ })) : /* @__PURE__ */ g(or, N({}, a, {
1228
1228
  ref: n
1229
1229
  })));
1230
- }), ir = /* @__PURE__ */ S((e, n) => {
1231
- const t = L(oe, e.__scopeDialog), o = C(null), a = J(n, t.contentRef, o);
1230
+ }), rr = /* @__PURE__ */ S((e, n) => {
1231
+ const t = M(re, e.__scopeDialog), o = P(null), a = Q(n, t.contentRef, o);
1232
1232
  return A(() => {
1233
1233
  const r = o.current;
1234
- if (r) return Yn(r);
1235
- }, []), /* @__PURE__ */ g(_t, N({}, e, {
1234
+ if (r) return Gn(r);
1235
+ }, []), /* @__PURE__ */ g(gt, N({}, e, {
1236
1236
  ref: a,
1237
1237
  trapFocus: t.open,
1238
1238
  disableOutsidePointerEvents: !0,
1239
- onCloseAutoFocus: W(e.onCloseAutoFocus, (r) => {
1239
+ onCloseAutoFocus: B(e.onCloseAutoFocus, (r) => {
1240
1240
  var i;
1241
1241
  r.preventDefault(), (i = t.triggerRef.current) === null || i === void 0 || i.focus();
1242
1242
  }),
1243
- onPointerDownOutside: W(e.onPointerDownOutside, (r) => {
1243
+ onPointerDownOutside: B(e.onPointerDownOutside, (r) => {
1244
1244
  const i = r.detail.originalEvent, c = i.button === 0 && i.ctrlKey === !0;
1245
1245
  (i.button === 2 || c) && r.preventDefault();
1246
1246
  }),
1247
- onFocusOutside: W(
1247
+ onFocusOutside: B(
1248
1248
  e.onFocusOutside,
1249
1249
  (r) => r.preventDefault()
1250
1250
  )
1251
1251
  }));
1252
- }), cr = /* @__PURE__ */ S((e, n) => {
1253
- const t = L(oe, e.__scopeDialog), o = C(!1), a = C(!1);
1254
- return /* @__PURE__ */ g(_t, N({}, e, {
1252
+ }), or = /* @__PURE__ */ S((e, n) => {
1253
+ const t = M(re, e.__scopeDialog), o = P(!1), a = P(!1);
1254
+ return /* @__PURE__ */ g(gt, N({}, e, {
1255
1255
  ref: n,
1256
1256
  trapFocus: !1,
1257
1257
  disableOutsidePointerEvents: !1,
@@ -1270,15 +1270,15 @@ const vt = "Dialog", [ht, Eo] = kt(vt), [Zn, L] = ht(vt), Qn = (e) => {
1270
1270
  ((c = t.triggerRef.current) === null || c === void 0 ? void 0 : c.contains(s)) && r.preventDefault(), r.detail.originalEvent.type === "focusin" && a.current && r.preventDefault();
1271
1271
  }
1272
1272
  }));
1273
- }), _t = /* @__PURE__ */ S((e, n) => {
1274
- const { __scopeDialog: t, trapFocus: o, onOpenAutoFocus: a, onCloseAutoFocus: r, ...i } = e, c = L(oe, t), s = C(null), d = J(n, s);
1275
- return pn(), /* @__PURE__ */ g(Ie, null, /* @__PURE__ */ g(tn, {
1273
+ }), gt = /* @__PURE__ */ S((e, n) => {
1274
+ const { __scopeDialog: t, trapFocus: o, onOpenAutoFocus: a, onCloseAutoFocus: r, ...i } = e, c = M(re, t), s = P(null), d = Q(n, s);
1275
+ return sn(), /* @__PURE__ */ g(De, null, /* @__PURE__ */ g(Qt, {
1276
1276
  asChild: !0,
1277
1277
  loop: !0,
1278
1278
  trapped: o,
1279
1279
  onMountAutoFocus: a,
1280
1280
  onUnmountAutoFocus: r
1281
- }, /* @__PURE__ */ g(Qt, N({
1281
+ }, /* @__PURE__ */ g(Xt, N({
1282
1282
  role: "dialog",
1283
1283
  id: c.contentId,
1284
1284
  "aria-describedby": c.descriptionId,
@@ -1288,27 +1288,27 @@ const vt = "Dialog", [ht, Eo] = kt(vt), [Zn, L] = ht(vt), Qn = (e) => {
1288
1288
  ref: d,
1289
1289
  onDismiss: () => c.onOpenChange(!1)
1290
1290
  }))), !1);
1291
- }), ur = "DialogTitle", sr = /* @__PURE__ */ S((e, n) => {
1292
- const { __scopeDialog: t, ...o } = e, a = L(ur, t);
1293
- return /* @__PURE__ */ g(q.h2, N({
1291
+ }), ar = "DialogTitle", ir = /* @__PURE__ */ S((e, n) => {
1292
+ const { __scopeDialog: t, ...o } = e, a = M(ar, t);
1293
+ return /* @__PURE__ */ g(W.h2, N({
1294
1294
  id: a.titleId
1295
1295
  }, o, {
1296
1296
  ref: n
1297
1297
  }));
1298
- }), lr = "DialogDescription", dr = /* @__PURE__ */ S((e, n) => {
1299
- const { __scopeDialog: t, ...o } = e, a = L(lr, t);
1300
- return /* @__PURE__ */ g(q.p, N({
1298
+ }), cr = "DialogDescription", ur = /* @__PURE__ */ S((e, n) => {
1299
+ const { __scopeDialog: t, ...o } = e, a = M(cr, t);
1300
+ return /* @__PURE__ */ g(W.p, N({
1301
1301
  id: a.descriptionId
1302
1302
  }, o, {
1303
1303
  ref: n
1304
1304
  }));
1305
- }), pr = "DialogClose", fr = /* @__PURE__ */ S((e, n) => {
1306
- const { __scopeDialog: t, ...o } = e, a = L(pr, t);
1307
- return /* @__PURE__ */ g(q.button, N({
1305
+ }), sr = "DialogClose", lr = /* @__PURE__ */ S((e, n) => {
1306
+ const { __scopeDialog: t, ...o } = e, a = M(sr, t);
1307
+ return /* @__PURE__ */ g(W.button, N({
1308
1308
  type: "button"
1309
1309
  }, o, {
1310
1310
  ref: n,
1311
- onClick: W(
1311
+ onClick: B(
1312
1312
  e.onClick,
1313
1313
  () => a.onOpenChange(!1)
1314
1314
  )
@@ -1317,15 +1317,15 @@ const vt = "Dialog", [ht, Eo] = kt(vt), [Zn, L] = ht(vt), Qn = (e) => {
1317
1317
  function Le(e) {
1318
1318
  return e ? "open" : "closed";
1319
1319
  }
1320
- const vr = Qn, hr = er, mr = nr, gr = rr, _r = ar, br = sr, Ve = dr, $r = fr, yr = {
1320
+ const dr = Xn, pr = Zn, fr = Jn, vr = er, hr = nr, mr = ir, Ge = ur, gr = lr, _r = {
1321
1321
  SM: "sm",
1322
1322
  MD: "md",
1323
1323
  LG: "lg"
1324
1324
  };
1325
- function Er(e) {
1325
+ function br(e) {
1326
1326
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
1327
1327
  }
1328
- var bt = { exports: {} };
1328
+ var _t = { exports: {} };
1329
1329
  /*!
1330
1330
  Copyright (c) 2018 Jed Watson.
1331
1331
  Licensed under the MIT License (MIT), see
@@ -1360,44 +1360,44 @@ var bt = { exports: {} };
1360
1360
  }
1361
1361
  e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
1362
1362
  })();
1363
- })(bt);
1364
- var xr = bt.exports;
1365
- const Xe = /* @__PURE__ */ Er(xr), wr = "_rotate_1xozj_1", Sr = "_dash_1xozj_1", ee = {
1363
+ })(_t);
1364
+ var $r = _t.exports;
1365
+ const Ve = /* @__PURE__ */ br($r), yr = "_rotate_1xozj_1", Er = "_dash_1xozj_1", J = {
1366
1366
  "purpur-spinner": "_purpur-spinner_1xozj_1",
1367
- rotate: wr,
1367
+ rotate: yr,
1368
1368
  "purpur-spinner--xxs": "_purpur-spinner--xxs_1xozj_4",
1369
1369
  "purpur-spinner--xs": "_purpur-spinner--xs_1xozj_8",
1370
1370
  "purpur-spinner--sm": "_purpur-spinner--sm_1xozj_12",
1371
1371
  "purpur-spinner--md": "_purpur-spinner--md_1xozj_16",
1372
1372
  "purpur-spinner--lg": "_purpur-spinner--lg_1xozj_20",
1373
1373
  "purpur-spinner__circle": "_purpur-spinner__circle_1xozj_24",
1374
- dash: Sr,
1374
+ dash: Er,
1375
1375
  "purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_1xozj_33",
1376
1376
  "purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_1xozj_36"
1377
- }, te = "purpur-spinner", Cr = {
1377
+ }, ee = "purpur-spinner", xr = {
1378
1378
  XXS: "xxs",
1379
1379
  XS: "xs",
1380
1380
  SM: "sm",
1381
1381
  MD: "md",
1382
1382
  LG: "lg"
1383
- }, Or = ({
1383
+ }, wr = ({
1384
1384
  ["data-testid"]: e,
1385
1385
  disabled: n = !1,
1386
1386
  negative: t = !1,
1387
- size: o = Cr.SM,
1387
+ size: o = xr.SM,
1388
1388
  ...a
1389
1389
  }) => /* @__PURE__ */ _(
1390
1390
  "div",
1391
1391
  {
1392
- className: Xe([ee[te], ee[`${te}--${o}`]]),
1392
+ className: Ve([J[ee], J[`${ee}--${o}`]]),
1393
1393
  "data-testid": e,
1394
1394
  ...a,
1395
1395
  children: /* @__PURE__ */ _("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ _(
1396
1396
  "circle",
1397
1397
  {
1398
- className: Xe(ee[`${te}__circle`], {
1399
- [ee[`${te}__circle--disabled`]]: n,
1400
- [ee[`${te}__circle--negative`]]: t
1398
+ className: Ve(J[`${ee}__circle`], {
1399
+ [J[`${ee}__circle--disabled`]]: n,
1400
+ [J[`${ee}__circle--negative`]]: t
1401
1401
  }),
1402
1402
  cx: "25",
1403
1403
  cy: "25",
@@ -1406,10 +1406,10 @@ const Xe = /* @__PURE__ */ Er(xr), wr = "_rotate_1xozj_1", Sr = "_dash_1xozj_1",
1406
1406
  ) })
1407
1407
  }
1408
1408
  );
1409
- function Pr(e) {
1409
+ function Sr(e) {
1410
1410
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
1411
1411
  }
1412
- var $t = { exports: {} };
1412
+ var bt = { exports: {} };
1413
1413
  /*!
1414
1414
  Copyright (c) 2018 Jed Watson.
1415
1415
  Licensed under the MIT License (MIT), see
@@ -1444,9 +1444,9 @@ var $t = { exports: {} };
1444
1444
  }
1445
1445
  e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
1446
1446
  })();
1447
- })($t);
1448
- var Nr = $t.exports;
1449
- const Ar = /* @__PURE__ */ Pr(Nr), Tr = {
1447
+ })(bt);
1448
+ var Cr = bt.exports;
1449
+ const Or = /* @__PURE__ */ Sr(Cr), Pr = {
1450
1450
  "purpur-button": "_purpur-button_1acxn_1",
1451
1451
  "purpur-button--sm": "_purpur-button--sm_1acxn_33",
1452
1452
  "purpur-button--icon-only": "_purpur-button--icon-only_1acxn_36",
@@ -1467,7 +1467,7 @@ const Ar = /* @__PURE__ */ Pr(Nr), Tr = {
1467
1467
  "purpur-button--tertiary-purple-negative": "_purpur-button--tertiary-purple-negative_1acxn_160",
1468
1468
  "purpur-button--text-negative": "_purpur-button--text-negative_1acxn_175",
1469
1469
  "purpur-button--text": "_purpur-button--text_1acxn_175"
1470
- }, Dr = Ar.bind(Tr), H = "purpur-button", Ir = ({
1470
+ }, Nr = Or.bind(Pr), q = "purpur-button", Ar = ({
1471
1471
  children: e,
1472
1472
  className: n,
1473
1473
  ["data-testid"]: t,
@@ -1484,23 +1484,23 @@ const Ar = /* @__PURE__ */ Pr(Nr), Tr = {
1484
1484
  }, f) => {
1485
1485
  if (r && p === "destructive")
1486
1486
  return null;
1487
- const E = Dr(
1487
+ const E = Nr(
1488
1488
  [
1489
- H,
1490
- `${H}--${c ? `${p}-negative` : p}`,
1491
- `${H}--${d}`
1489
+ q,
1490
+ `${q}--${c ? `${p}-negative` : p}`,
1491
+ `${q}--${d}`
1492
1492
  ],
1493
1493
  {
1494
- [`${H}--icon-only`]: r,
1495
- [`${H}--negative`]: c,
1496
- [`${H}--full-width`]: a,
1497
- [`${H}--disabled`]: o || i
1494
+ [`${q}--icon-only`]: r,
1495
+ [`${q}--negative`]: c,
1496
+ [`${q}--full-width`]: a,
1497
+ [`${q}--disabled`]: o || i
1498
1498
  },
1499
1499
  n
1500
1500
  ), u = (b) => {
1501
1501
  o || i ? b.preventDefault() : s && s(b);
1502
1502
  }, v = !!h["aria-disabled"] || o || i;
1503
- return /* @__PURE__ */ U(
1503
+ return /* @__PURE__ */ j(
1504
1504
  "button",
1505
1505
  {
1506
1506
  className: E,
@@ -1511,18 +1511,18 @@ const Ar = /* @__PURE__ */ Pr(Nr), Tr = {
1511
1511
  onClick: u,
1512
1512
  ...h,
1513
1513
  children: [
1514
- i && /* @__PURE__ */ _(Or, { size: d === yr.LG ? "xs" : "xxs", negative: c, disabled: v }),
1514
+ i && /* @__PURE__ */ _(wr, { size: d === _r.LG ? "xs" : "xxs", negative: c, disabled: v }),
1515
1515
  " ",
1516
1516
  e
1517
1517
  ]
1518
1518
  }
1519
1519
  );
1520
- }, Me = S(Ir);
1521
- Me.displayName = "Button";
1522
- function Rr(e) {
1520
+ }, Re = S(Ar);
1521
+ Re.displayName = "Button";
1522
+ function Tr(e) {
1523
1523
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
1524
1524
  }
1525
- var yt = { exports: {} };
1525
+ var $t = { exports: {} };
1526
1526
  /*!
1527
1527
  Copyright (c) 2018 Jed Watson.
1528
1528
  Licensed under the MIT License (MIT), see
@@ -1557,9 +1557,9 @@ var yt = { exports: {} };
1557
1557
  }
1558
1558
  e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
1559
1559
  })();
1560
- })(yt);
1561
- var Lr = yt.exports;
1562
- const Mr = /* @__PURE__ */ Rr(Lr), pe = {
1560
+ })($t);
1561
+ var Dr = $t.exports;
1562
+ const Ir = /* @__PURE__ */ Tr(Dr), de = {
1563
1563
  "purpur-heading": "_purpur-heading_k9fhq_1",
1564
1564
  "purpur-heading--hyphens": "_purpur-heading--hyphens_k9fhq_8",
1565
1565
  "purpur-heading--negative": "_purpur-heading--negative_k9fhq_11",
@@ -1575,7 +1575,7 @@ const Mr = /* @__PURE__ */ Rr(Lr), pe = {
1575
1575
  "purpur-heading--display-50": "_purpur-heading--display-50_k9fhq_68",
1576
1576
  "purpur-heading--display-100": "_purpur-heading--display-100_k9fhq_74",
1577
1577
  "purpur-heading--display-200": "_purpur-heading--display-200_k9fhq_80"
1578
- }, kr = {
1578
+ }, Lr = {
1579
1579
  TITLE100: "title-100",
1580
1580
  TITLE200: "title-200",
1581
1581
  TITLE300: "title-300",
@@ -1584,32 +1584,32 @@ const Mr = /* @__PURE__ */ Rr(Lr), pe = {
1584
1584
  TITLE600: "title-600",
1585
1585
  TITLE700: "title-700",
1586
1586
  SUBSECTION100: "subsection-100"
1587
- }, fe = "purpur-heading", Et = ({
1587
+ }, pe = "purpur-heading", yt = ({
1588
1588
  ["data-testid"]: e,
1589
1589
  children: n,
1590
1590
  className: t = "",
1591
1591
  enableHyphenation: o = !1,
1592
1592
  negative: a = !1,
1593
1593
  tag: r,
1594
- variant: i = kr.TITLE100,
1594
+ variant: i = Lr.TITLE100,
1595
1595
  ...c
1596
1596
  }) => {
1597
- const s = r, d = Mr([
1597
+ const s = r, d = Ir([
1598
1598
  t,
1599
- pe[fe],
1600
- pe[`${fe}--${i}`],
1599
+ de[pe],
1600
+ de[`${pe}--${i}`],
1601
1601
  {
1602
- [pe[`${fe}--hyphens`]]: o,
1603
- [pe[`${fe}--negative`]]: a
1602
+ [de[`${pe}--hyphens`]]: o,
1603
+ [de[`${pe}--negative`]]: a
1604
1604
  }
1605
1605
  ]);
1606
1606
  return /* @__PURE__ */ _(s, { ...c, className: d, "data-testid": e, children: n });
1607
1607
  };
1608
- Et.displayName = "Heading";
1609
- function Fr(e) {
1608
+ yt.displayName = "Heading";
1609
+ function Rr(e) {
1610
1610
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
1611
1611
  }
1612
- var xt = { exports: {} };
1612
+ var Et = { exports: {} };
1613
1613
  /*!
1614
1614
  Copyright (c) 2018 Jed Watson.
1615
1615
  Licensed under the MIT License (MIT), see
@@ -1644,9 +1644,9 @@ var xt = { exports: {} };
1644
1644
  }
1645
1645
  e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
1646
1646
  })();
1647
- })(xt);
1648
- var jr = xt.exports;
1649
- const Br = /* @__PURE__ */ Fr(jr), Ur = {
1647
+ })(Et);
1648
+ var Mr = Et.exports;
1649
+ const kr = /* @__PURE__ */ Rr(Mr), Fr = {
1650
1650
  "purpur-icon": "_purpur-icon_8u1lq_1",
1651
1651
  "purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
1652
1652
  "purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
@@ -1654,39 +1654,39 @@ const Br = /* @__PURE__ */ Fr(jr), Ur = {
1654
1654
  "purpur-icon--md": "_purpur-icon--md_8u1lq_16",
1655
1655
  "purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
1656
1656
  "purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
1657
- }, Wr = {
1657
+ }, jr = {
1658
1658
  name: "close",
1659
1659
  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>',
1660
1660
  keywords: ["close"],
1661
1661
  category: "utility"
1662
- }, wt = (e) => /* @__PURE__ */ _(
1663
- Vr,
1662
+ }, xt = (e) => /* @__PURE__ */ _(
1663
+ Hr,
1664
1664
  {
1665
1665
  ...e,
1666
- svg: Wr
1666
+ svg: jr
1667
1667
  }
1668
1668
  );
1669
- wt.displayName = "IconClose";
1670
- const zr = Br.bind(Ur), Ye = "purpur-icon", qr = "md", Hr = (e) => e.filter((n) => Object.keys(n).length >= 1).map((n) => `${n.name}="${n.value}"`).join(" "), Kr = ({ content: e = "", title: n } = {}) => {
1669
+ xt.displayName = "IconClose";
1670
+ const Br = kr.bind(Fr), Xe = "purpur-icon", Ur = "md", Wr = (e) => e.filter((n) => Object.keys(n).length >= 1).map((n) => `${n.name}="${n.value}"`).join(" "), zr = ({ content: e = "", title: n } = {}) => {
1671
1671
  const t = [
1672
1672
  { name: "xmlns", value: "http://www.w3.org/2000/svg" },
1673
1673
  { name: "fill", value: "currentColor" },
1674
1674
  { name: "viewBox", value: "0 0 24 24" },
1675
1675
  n ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
1676
1676
  ], o = n ? `<title>${n}</title>` : "";
1677
- return `<svg ${Hr(t)}>${o}${e}</svg>`;
1678
- }, Gr = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), Vr = ({
1677
+ return `<svg ${Wr(t)}>${o}${e}</svg>`;
1678
+ }, qr = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), Hr = ({
1679
1679
  ["data-testid"]: e,
1680
1680
  svg: n,
1681
1681
  allyTitle: t,
1682
1682
  className: o,
1683
- size: a = qr,
1683
+ size: a = Ur,
1684
1684
  ...r
1685
1685
  }) => {
1686
- const i = Kr({
1687
- content: Gr(n.svg),
1686
+ const i = zr({
1687
+ content: qr(n.svg),
1688
1688
  title: t
1689
- }), c = zr(o, Ye, `${Ye}--${a}`);
1689
+ }), c = Br(o, Xe, `${Xe}--${a}`);
1690
1690
  return /* @__PURE__ */ _(
1691
1691
  "span",
1692
1692
  {
@@ -1698,10 +1698,10 @@ const zr = Br.bind(Ur), Ye = "purpur-icon", qr = "md", Hr = (e) => e.filter((n)
1698
1698
  }
1699
1699
  );
1700
1700
  };
1701
- function Xr(e) {
1701
+ function Kr(e) {
1702
1702
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
1703
1703
  }
1704
- var St = { exports: {} };
1704
+ var wt = { exports: {} };
1705
1705
  /*!
1706
1706
  Copyright (c) 2018 Jed Watson.
1707
1707
  Licensed under the MIT License (MIT), see
@@ -1736,9 +1736,9 @@ var St = { exports: {} };
1736
1736
  }
1737
1737
  e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
1738
1738
  })();
1739
- })(St);
1740
- var Yr = St.exports;
1741
- const Zr = /* @__PURE__ */ Xr(Yr), ne = {
1739
+ })(wt);
1740
+ var Gr = wt.exports;
1741
+ const Vr = /* @__PURE__ */ Kr(Gr), te = {
1742
1742
  "purpur-paragraph": "_purpur-paragraph_1rh57_1",
1743
1743
  "purpur-paragraph--disabled": "_purpur-paragraph--disabled_1rh57_7",
1744
1744
  "purpur-paragraph--hyphens": "_purpur-paragraph--hyphens_1rh57_10",
@@ -1753,7 +1753,7 @@ const Zr = /* @__PURE__ */ Xr(Yr), ne = {
1753
1753
  "purpur-paragraph--additional-100-medium": "_purpur-paragraph--additional-100-medium_1rh57_60",
1754
1754
  "purpur-paragraph--overline-100": "_purpur-paragraph--overline-100_1rh57_67",
1755
1755
  "purpur-paragraph--overline-200": "_purpur-paragraph--overline-200_1rh57_75"
1756
- }, Qr = {
1756
+ }, Xr = {
1757
1757
  PARAGRAPH100: "paragraph-100",
1758
1758
  PARAGRAPH100MEDIUM: "paragraph-100-medium",
1759
1759
  PARAGRAPH100BOLD: "paragraph-100-bold",
@@ -1764,74 +1764,73 @@ const Zr = /* @__PURE__ */ Xr(Yr), ne = {
1764
1764
  ADDITIONAL100MEDIUM: "additional-100-medium",
1765
1765
  OVERLINE100: "overline-100",
1766
1766
  OVERLINE200: "overline-200"
1767
- }, re = "purpur-paragraph", Ct = ({
1767
+ }, ne = "purpur-paragraph", St = ({
1768
1768
  ["data-testid"]: e,
1769
1769
  children: n,
1770
1770
  className: t,
1771
1771
  disabled: o,
1772
1772
  enableHyphenation: a = !1,
1773
1773
  negative: r = !1,
1774
- variant: i = Qr.PARAGRAPH100,
1774
+ variant: i = Xr.PARAGRAPH100,
1775
1775
  ...c
1776
1776
  }) => {
1777
- const s = Zr([
1777
+ const s = Vr([
1778
1778
  t,
1779
- ne[re],
1780
- ne[`${re}--${i}`],
1779
+ te[ne],
1780
+ te[`${ne}--${i}`],
1781
1781
  {
1782
- [ne[`${re}--hyphens`]]: a,
1783
- [ne[`${re}--disabled`]]: o,
1784
- [ne[`${re}--negative`]]: r
1782
+ [te[`${ne}--hyphens`]]: a,
1783
+ [te[`${ne}--disabled`]]: o,
1784
+ [te[`${ne}--negative`]]: r
1785
1785
  }
1786
1786
  ]);
1787
1787
  return /* @__PURE__ */ _("p", { ...c, className: s, "data-testid": e, children: n });
1788
1788
  };
1789
- Ct.displayName = "Paragraph";
1790
- const Jr = "600px";
1791
- function Z() {
1792
- return Z = Object.assign ? Object.assign.bind() : function(e) {
1789
+ St.displayName = "Paragraph";
1790
+ function Y() {
1791
+ return Y = Object.assign ? Object.assign.bind() : function(e) {
1793
1792
  for (var n = 1; n < arguments.length; n++) {
1794
1793
  var t = arguments[n];
1795
1794
  for (var o in t)
1796
1795
  Object.prototype.hasOwnProperty.call(t, o) && (e[o] = t[o]);
1797
1796
  }
1798
1797
  return e;
1799
- }, Z.apply(this, arguments);
1798
+ }, Y.apply(this, arguments);
1800
1799
  }
1801
- function eo(e, n) {
1800
+ function Yr(e, n) {
1802
1801
  typeof e == "function" ? e(n) : e != null && (e.current = n);
1803
1802
  }
1804
- function to(...e) {
1803
+ function Zr(...e) {
1805
1804
  return (n) => e.forEach(
1806
- (t) => eo(t, n)
1805
+ (t) => Yr(t, n)
1807
1806
  );
1808
1807
  }
1809
- const Ot = /* @__PURE__ */ S((e, n) => {
1810
- const { children: t, ...o } = e, a = R.toArray(t), r = a.find(ro);
1808
+ const Ct = /* @__PURE__ */ S((e, n) => {
1809
+ const { children: t, ...o } = e, a = L.toArray(t), r = a.find(Jr);
1811
1810
  if (r) {
1812
- const i = r.props.children, c = a.map((s) => s === r ? R.count(i) > 1 ? R.only(null) : /* @__PURE__ */ z(i) ? i.props.children : null : s);
1813
- return /* @__PURE__ */ g(De, Z({}, o, {
1811
+ const i = r.props.children, c = a.map((s) => s === r ? L.count(i) > 1 ? L.only(null) : /* @__PURE__ */ U(i) ? i.props.children : null : s);
1812
+ return /* @__PURE__ */ g(Te, Y({}, o, {
1814
1813
  ref: n
1815
- }), /* @__PURE__ */ z(i) ? /* @__PURE__ */ ae(i, void 0, c) : null);
1814
+ }), /* @__PURE__ */ U(i) ? /* @__PURE__ */ oe(i, void 0, c) : null);
1816
1815
  }
1817
- return /* @__PURE__ */ g(De, Z({}, o, {
1816
+ return /* @__PURE__ */ g(Te, Y({}, o, {
1818
1817
  ref: n
1819
1818
  }), t);
1820
1819
  });
1821
- Ot.displayName = "Slot";
1822
- const De = /* @__PURE__ */ S((e, n) => {
1820
+ Ct.displayName = "Slot";
1821
+ const Te = /* @__PURE__ */ S((e, n) => {
1823
1822
  const { children: t, ...o } = e;
1824
- return /* @__PURE__ */ z(t) ? /* @__PURE__ */ ae(t, {
1825
- ...oo(o, t.props),
1826
- ref: n ? to(n, t.ref) : t.ref
1827
- }) : R.count(t) > 1 ? R.only(null) : null;
1823
+ return /* @__PURE__ */ U(t) ? /* @__PURE__ */ oe(t, {
1824
+ ...eo(o, t.props),
1825
+ ref: n ? Zr(n, t.ref) : t.ref
1826
+ }) : L.count(t) > 1 ? L.only(null) : null;
1828
1827
  });
1829
- De.displayName = "SlotClone";
1830
- const no = ({ children: e }) => /* @__PURE__ */ g(Ie, null, e);
1831
- function ro(e) {
1832
- return /* @__PURE__ */ z(e) && e.type === no;
1828
+ Te.displayName = "SlotClone";
1829
+ const Qr = ({ children: e }) => /* @__PURE__ */ g(De, null, e);
1830
+ function Jr(e) {
1831
+ return /* @__PURE__ */ U(e) && e.type === Qr;
1833
1832
  }
1834
- function oo(e, n) {
1833
+ function eo(e, n) {
1835
1834
  const t = {
1836
1835
  ...n
1837
1836
  };
@@ -1852,7 +1851,7 @@ function oo(e, n) {
1852
1851
  ...t
1853
1852
  };
1854
1853
  }
1855
- const ao = [
1854
+ const to = [
1856
1855
  "a",
1857
1856
  "button",
1858
1857
  "div",
@@ -1869,12 +1868,12 @@ const ao = [
1869
1868
  "span",
1870
1869
  "svg",
1871
1870
  "ul"
1872
- ], io = ao.reduce((e, n) => {
1871
+ ], no = to.reduce((e, n) => {
1873
1872
  const t = /* @__PURE__ */ S((o, a) => {
1874
- const { asChild: r, ...i } = o, c = r ? Ot : n;
1873
+ const { asChild: r, ...i } = o, c = r ? Ct : n;
1875
1874
  return A(() => {
1876
1875
  window[Symbol.for("radix-ui")] = !0;
1877
- }, []), /* @__PURE__ */ g(c, Z({}, i, {
1876
+ }, []), /* @__PURE__ */ g(c, Y({}, i, {
1878
1877
  ref: a
1879
1878
  }));
1880
1879
  });
@@ -1882,7 +1881,7 @@ const ao = [
1882
1881
  ...e,
1883
1882
  [n]: t
1884
1883
  };
1885
- }, {}), co = /* @__PURE__ */ S((e, n) => /* @__PURE__ */ g(io.span, Z({}, e, {
1884
+ }, {}), ro = /* @__PURE__ */ S((e, n) => /* @__PURE__ */ g(no.span, Y({}, e, {
1886
1885
  ref: n,
1887
1886
  style: {
1888
1887
  // See: https://github.com/twbs/bootstrap/blob/master/scss/mixins/_screen-reader.scss
@@ -1898,16 +1897,16 @@ const ao = [
1898
1897
  wordWrap: "normal",
1899
1898
  ...e.style
1900
1899
  }
1901
- }))), uo = co, so = ({
1900
+ }))), oo = ro, ao = ({
1902
1901
  asChild: e,
1903
1902
  children: n,
1904
1903
  className: t = "",
1905
1904
  ["data-testid"]: o
1906
- }) => /* @__PURE__ */ _(uo, { asChild: e, "data-testid": o, className: t, children: n });
1907
- function lo(e) {
1905
+ }) => /* @__PURE__ */ _(oo, { asChild: e, "data-testid": o, className: t, children: n });
1906
+ function io(e) {
1908
1907
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
1909
1908
  }
1910
- var Pt = { exports: {} };
1909
+ var Ot = { exports: {} };
1911
1910
  /*!
1912
1911
  Copyright (c) 2018 Jed Watson.
1913
1912
  Licensed under the MIT License (MIT), see
@@ -1942,30 +1941,30 @@ var Pt = { exports: {} };
1942
1941
  }
1943
1942
  e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
1944
1943
  })();
1945
- })(Pt);
1946
- var po = Pt.exports;
1947
- const fo = /* @__PURE__ */ lo(po), vo = "_fadeIn_rblrn_1", ho = {
1948
- "purpur-modal-content": "_purpur-modal-content_rblrn_1",
1949
- fadeIn: vo,
1950
- "purpur-modal-content__overlay": "_purpur-modal-content__overlay_rblrn_30",
1951
- "purpur-modal-content__close-button": "_purpur-modal-content__close-button_rblrn_37",
1952
- "purpur-modal-content__wrapper": "_purpur-modal-content__wrapper_rblrn_48",
1953
- "purpur-modal-content__wrapper-inner": "_purpur-modal-content__wrapper-inner_rblrn_59",
1954
- "purpur-modal-content__image-wrapper": "_purpur-modal-content__image-wrapper_rblrn_68",
1955
- "purpur-modal-content__header": "_purpur-modal-content__header_rblrn_91",
1956
- "purpur-modal-content__title": "_purpur-modal-content__title_rblrn_105",
1957
- "purpur-modal-content__description": "_purpur-modal-content__description_rblrn_108",
1958
- "purpur-modal-content__body": "_purpur-modal-content__body_rblrn_111",
1959
- "purpur-modal-content__body-inner": "_purpur-modal-content__body-inner_rblrn_121",
1960
- "purpur-modal-content__actions-buttons": "_purpur-modal-content__actions-buttons_rblrn_133",
1961
- "purpur-modal-content__actions-button": "_purpur-modal-content__actions-button_rblrn_133",
1962
- "purpur-modal-content__notification": "_purpur-modal-content__notification_rblrn_156",
1963
- "purpur-modal-content--with-image": "_purpur-modal-content--with-image_rblrn_159",
1964
- "purpur-modal-content--overflow": "_purpur-modal-content--overflow_rblrn_159",
1965
- "purpur-modal-content__actions": "_purpur-modal-content__actions_rblrn_133",
1966
- "purpur-modal-content__actions-separator": "_purpur-modal-content__actions-separator_rblrn_190",
1967
- "purpur-modal-content--sticky-footer": "_purpur-modal-content--sticky-footer_rblrn_200"
1968
- }, Ze = (e) => e.showCloseButton === !0, T = fo.bind(ho), P = "purpur-modal-content", mo = S(
1944
+ })(Ot);
1945
+ var co = Ot.exports;
1946
+ const uo = /* @__PURE__ */ io(co), so = "_fadeIn_1ifm3_1", lo = {
1947
+ "purpur-modal-content": "_purpur-modal-content_1ifm3_1",
1948
+ fadeIn: so,
1949
+ "purpur-modal-content__overlay": "_purpur-modal-content__overlay_1ifm3_30",
1950
+ "purpur-modal-content__close-button": "_purpur-modal-content__close-button_1ifm3_37",
1951
+ "purpur-modal-content__wrapper": "_purpur-modal-content__wrapper_1ifm3_48",
1952
+ "purpur-modal-content__wrapper-inner": "_purpur-modal-content__wrapper-inner_1ifm3_58",
1953
+ "purpur-modal-content__image-wrapper": "_purpur-modal-content__image-wrapper_1ifm3_62",
1954
+ "purpur-modal-content__header": "_purpur-modal-content__header_1ifm3_85",
1955
+ "purpur-modal-content__title": "_purpur-modal-content__title_1ifm3_98",
1956
+ "purpur-modal-content__description": "_purpur-modal-content__description_1ifm3_101",
1957
+ "purpur-modal-content__body": "_purpur-modal-content__body_1ifm3_104",
1958
+ "purpur-modal-content__body-inner": "_purpur-modal-content__body-inner_1ifm3_112",
1959
+ "purpur-modal-content__actions-buttons": "_purpur-modal-content__actions-buttons_1ifm3_124",
1960
+ "purpur-modal-content__actions-button": "_purpur-modal-content__actions-button_1ifm3_124",
1961
+ "purpur-modal-content__notification": "_purpur-modal-content__notification_1ifm3_147",
1962
+ "purpur-modal-content--with-image": "_purpur-modal-content--with-image_1ifm3_150",
1963
+ "purpur-modal-content--overflow": "_purpur-modal-content--overflow_1ifm3_150",
1964
+ "purpur-modal-content__actions": "_purpur-modal-content__actions_1ifm3_124",
1965
+ "purpur-modal-content__actions-separator": "_purpur-modal-content__actions-separator_1ifm3_181",
1966
+ "purpur-modal-content--sticky-footer": "_purpur-modal-content--sticky-footer_1ifm3_191"
1967
+ }, Ye = (e) => e.showCloseButton === !0, T = uo.bind(lo), O = "purpur-modal-content", po = S(
1969
1968
  ({
1970
1969
  ["data-testid"]: e,
1971
1970
  actions: n,
@@ -1982,94 +1981,91 @@ const fo = /* @__PURE__ */ lo(po), vo = "_fadeIn_rblrn_1", ho = {
1982
1981
  zIndex: h,
1983
1982
  ...f
1984
1983
  }, E) => {
1985
- const { closeButtonAllyLabel: u, showCloseButton: v, ...b } = f, [O, y] = K(!1), $ = C(null), w = C(null), F = C(null), I = C(null), x = T([
1986
- P,
1987
- { [`${P}--with-image`]: !!c },
1988
- { [`${P}--overflow`]: O },
1989
- { [`${P}--sticky-footer`]: d },
1984
+ const { closeButtonAllyLabel: u, showCloseButton: v, ...b } = f, [C, y] = H(!1), $ = P(null), w = P(null), z = T([
1985
+ O,
1986
+ { [`${O}--with-image`]: !!c },
1987
+ { [`${O}--overflow`]: C },
1988
+ { [`${O}--sticky-footer`]: d },
1990
1989
  o
1991
- ]), D = (j) => e ? `${e} ${j}` : void 0, ie = (j) => {
1992
- r && j.preventDefault();
1993
- }, M = Q(() => {
1994
- if (!$.current || !w.current || !F.current || !I.current)
1990
+ ]), D = (R) => e ? `${e} ${R}` : void 0, x = (R) => {
1991
+ r && R.preventDefault();
1992
+ }, I = Z(() => {
1993
+ if (!$.current || !w.current)
1995
1994
  return;
1996
- const j = window.innerWidth < parseInt(Jr), At = window.getComputedStyle(
1997
- j ? $.current : F.current,
1998
- null
1999
- ), Tt = parseFloat(At.getPropertyValue("height")), Dt = j ? w.current.offsetHeight : I.current.offsetHeight;
2000
- y(Tt < Dt);
2001
- }, []), Nt = (j) => {
2002
- r && !v && j.preventDefault();
1995
+ const R = window.getComputedStyle($.current, null), Pt = parseFloat(R.getPropertyValue("height")), Nt = w.current.offsetHeight;
1996
+ y(Pt < Nt);
1997
+ }, []), ae = (R) => {
1998
+ r && !v && R.preventDefault();
2003
1999
  };
2004
- return A(() => (window.addEventListener("resize", M), () => {
2005
- window.removeEventListener("resize", M);
2006
- }), [M]), A(() => {
2007
- M();
2008
- }, [l, M]), /* @__PURE__ */ U(mr, { children: [
2009
- /* @__PURE__ */ _(gr, { className: T(`${P}__overlay`), style: { zIndex: h } }),
2010
- /* @__PURE__ */ U(
2011
- _r,
2000
+ return A(() => (window.addEventListener("resize", I), () => {
2001
+ window.removeEventListener("resize", I);
2002
+ }), [I]), A(() => {
2003
+ I();
2004
+ }, [l, I]), /* @__PURE__ */ j(fr, { children: [
2005
+ /* @__PURE__ */ _(vr, { className: T(`${O}__overlay`), style: { zIndex: h } }),
2006
+ /* @__PURE__ */ j(
2007
+ hr,
2012
2008
  {
2013
2009
  ...b,
2014
- className: x,
2010
+ className: z,
2015
2011
  "data-testid": e,
2016
2012
  ref: E,
2017
2013
  ...!a && { "aria-describedby": void 0 },
2018
- onPointerDownOutside: ie,
2019
- onOpenAutoFocus: M,
2020
- onEscapeKeyDown: Nt,
2014
+ onPointerDownOutside: x,
2015
+ onOpenAutoFocus: I,
2016
+ onEscapeKeyDown: ae,
2021
2017
  style: { zIndex: `calc(${h} + 1)` },
2022
2018
  children: [
2023
- /* @__PURE__ */ U("div", { ref: $, className: T(`${P}__wrapper`), children: [
2024
- Ze(f) && u && c && /* @__PURE__ */ _(
2025
- Qe,
2019
+ /* @__PURE__ */ j("div", { ref: $, className: T(`${O}__wrapper`), children: [
2020
+ Ye(f) && u && c && /* @__PURE__ */ _(
2021
+ Ze,
2026
2022
  {
2027
2023
  allyLabel: u,
2028
2024
  hasImage: !0,
2029
2025
  "data-testid": D("close-button")
2030
2026
  }
2031
2027
  ),
2032
- /* @__PURE__ */ U("div", { ref: w, className: T(`${P}__wrapper-inner`), children: [
2033
- /* @__PURE__ */ U("div", { className: T(`${P}__header`), children: [
2034
- Ze(f) && u && !c && /* @__PURE__ */ _(
2035
- Qe,
2028
+ /* @__PURE__ */ j("div", { ref: w, className: T(`${O}__wrapper-inner`), children: [
2029
+ /* @__PURE__ */ j("div", { className: T(`${O}__header`), children: [
2030
+ Ye(f) && u && !c && /* @__PURE__ */ _(
2031
+ Ze,
2036
2032
  {
2037
2033
  allyLabel: u,
2038
2034
  "data-testid": D("close-button")
2039
2035
  }
2040
2036
  ),
2041
2037
  /* @__PURE__ */ _(
2042
- br,
2038
+ mr,
2043
2039
  {
2044
2040
  asChild: !0,
2045
- className: T(`${P}__title`),
2041
+ className: T(`${O}__title`),
2046
2042
  "data-testid": D("title"),
2047
- children: /* @__PURE__ */ _(Et, { tag: "h2", variant: "title-200", children: p })
2043
+ children: /* @__PURE__ */ _(yt, { tag: "h2", variant: "title-200", children: p })
2048
2044
  }
2049
2045
  )
2050
2046
  ] }),
2051
2047
  c && /* @__PURE__ */ _(
2052
2048
  "div",
2053
2049
  {
2054
- className: T(`${P}__image-wrapper`),
2050
+ className: T(`${O}__image-wrapper`),
2055
2051
  "data-testid": D("image"),
2056
2052
  children: c
2057
2053
  }
2058
2054
  ),
2059
- /* @__PURE__ */ _("div", { ref: F, className: T(`${P}__body`), children: /* @__PURE__ */ U("div", { ref: I, className: T(`${P}__body-inner`), children: [
2060
- a && i && /* @__PURE__ */ _(so, { asChild: !0, children: /* @__PURE__ */ _(Ve, { "data-testid": D("description"), children: a }) }),
2055
+ /* @__PURE__ */ _("div", { className: T(`${O}__body`), children: /* @__PURE__ */ j("div", { className: T(`${O}__body-inner`), children: [
2056
+ a && i && /* @__PURE__ */ _(ao, { asChild: !0, children: /* @__PURE__ */ _(Ge, { "data-testid": D("description"), children: a }) }),
2061
2057
  a && !i && /* @__PURE__ */ _(
2062
- Ve,
2058
+ Ge,
2063
2059
  {
2064
2060
  asChild: !0,
2065
- className: T(`${P}__description`),
2061
+ className: T(`${O}__description`),
2066
2062
  "data-testid": D("description"),
2067
- children: /* @__PURE__ */ _(Ct, { variant: "paragraph-100", children: a })
2063
+ children: /* @__PURE__ */ _(St, { variant: "paragraph-100", children: a })
2068
2064
  }
2069
2065
  ),
2070
2066
  /* @__PURE__ */ _("div", { children: t }),
2071
2067
  !d && /* @__PURE__ */ _(
2072
- Je,
2068
+ Qe,
2073
2069
  {
2074
2070
  actions: n,
2075
2071
  primaryActionVariant: s,
@@ -2080,7 +2076,7 @@ const fo = /* @__PURE__ */ lo(po), vo = "_fadeIn_rblrn_1", ho = {
2080
2076
  ] })
2081
2077
  ] }),
2082
2078
  d && /* @__PURE__ */ _(
2083
- Je,
2079
+ Qe,
2084
2080
  {
2085
2081
  actions: n,
2086
2082
  primaryActionVariant: s,
@@ -2092,49 +2088,51 @@ const fo = /* @__PURE__ */ lo(po), vo = "_fadeIn_rblrn_1", ho = {
2092
2088
  )
2093
2089
  ] });
2094
2090
  }
2095
- ), Qe = ({
2091
+ ), Ze = ({
2096
2092
  allyLabel: e,
2097
2093
  hasImage: n,
2098
2094
  ["data-testid"]: t
2099
- }) => /* @__PURE__ */ _($r, { asChild: !0, children: /* @__PURE__ */ _(
2100
- Me,
2095
+ }) => /* @__PURE__ */ _(gr, { asChild: !0, children: /* @__PURE__ */ _(
2096
+ Re,
2101
2097
  {
2102
2098
  variant: n ? "primary" : "tertiary-purple",
2103
2099
  negative: n,
2104
2100
  size: "sm",
2105
2101
  iconOnly: !0,
2106
2102
  "aria-label": e,
2107
- className: T(`${P}__close-button`),
2103
+ className: T(`${O}__close-button`),
2108
2104
  "data-testid": t,
2109
- children: /* @__PURE__ */ _(wt, {})
2105
+ children: /* @__PURE__ */ _(xt, {})
2110
2106
  }
2111
- ) }), go = 3, Je = ({
2107
+ ) }), fo = 3, Qe = ({
2112
2108
  actions: e,
2113
2109
  primaryActionVariant: n,
2114
2110
  notification: t
2115
2111
  }) => {
2116
- const o = C(null), a = [n, "secondary", "text"];
2112
+ const o = P(null), a = [n, "secondary", "text"];
2117
2113
  return A(() => {
2118
2114
  var r, i;
2119
2115
  t && ((i = (r = o == null ? void 0 : o.current) == null ? void 0 : r.scrollIntoView) == null || i.call(r, !1));
2120
- }, [t]), e && e.length > 0 ? /* @__PURE__ */ U("div", { className: T(`${P}__actions`), children: [
2121
- /* @__PURE__ */ _("div", { className: T(`${P}__actions-buttons`), "data-testid": "modal actions", children: e.slice(0, go).map(({ label: r, onClick: i }, c) => /* @__PURE__ */ _(
2122
- Me,
2116
+ }, [t]), e && e.length > 0 ? /* @__PURE__ */ j("div", { className: T(`${O}__actions`), children: [
2117
+ /* @__PURE__ */ _("div", { className: T(`${O}__actions-buttons`), "data-testid": "modal actions", children: e.slice(0, fo).map(({ label: r, onClick: i, disabled: c, loading: s }, d) => /* @__PURE__ */ _(
2118
+ Re,
2123
2119
  {
2124
2120
  "data-testid": "modal actions button",
2125
- variant: a[c] || "",
2121
+ variant: a[d] || "",
2126
2122
  onClick: i,
2127
- className: T(`${P}__actions-button`),
2123
+ disabled: c,
2124
+ loading: s,
2125
+ className: T(`${O}__actions-button`),
2128
2126
  children: r
2129
2127
  },
2130
2128
  r
2131
2129
  )) }),
2132
- t && /* @__PURE__ */ _("div", { className: T(`${P}__notification`), ref: o, children: t }),
2133
- /* @__PURE__ */ _("span", { className: T(`${P}__actions-separator`) })
2130
+ t && /* @__PURE__ */ _("div", { className: T(`${O}__notification`), ref: o, children: t }),
2131
+ /* @__PURE__ */ _("span", { className: T(`${O}__actions-separator`) })
2134
2132
  ] }) : null;
2135
- }, _o = S(
2133
+ }, vo = S(
2136
2134
  ({ ["data-testid"]: e, children: n, className: t, ...o }, a) => /* @__PURE__ */ _(
2137
- hr,
2135
+ pr,
2138
2136
  {
2139
2137
  asChild: !0,
2140
2138
  ref: a,
@@ -2144,16 +2142,16 @@ const fo = /* @__PURE__ */ lo(po), vo = "_fadeIn_rblrn_1", ho = {
2144
2142
  children: n
2145
2143
  }
2146
2144
  )
2147
- ), ke = ({
2145
+ ), Me = ({
2148
2146
  ["data-testid"]: e,
2149
2147
  children: n,
2150
2148
  open: t,
2151
2149
  onOpenChange: o
2152
- }) => /* @__PURE__ */ _(vr, { open: t, onOpenChange: o, "data-testid": e, children: n });
2153
- ke.Trigger = _o;
2154
- ke.Content = mo;
2155
- ke.displayName = "Modal";
2150
+ }) => /* @__PURE__ */ _(dr, { open: t, onOpenChange: o, "data-testid": e, children: n });
2151
+ Me.Trigger = vo;
2152
+ Me.Content = po;
2153
+ Me.displayName = "Modal";
2156
2154
  export {
2157
- ke as Modal
2155
+ Me as Modal
2158
2156
  };
2159
2157
  //# sourceMappingURL=modal.es.js.map