@purpurds/modal 5.27.3 → 5.27.5

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
1
  import { jsxs as F, jsx as b } from "react/jsx-runtime";
2
2
  import * as m from "react";
3
- import { useCallback as J, useMemo as ae, createElement as g, createContext as ge, useContext as Le, useLayoutEffect as Rt, useRef as N, useEffect as A, useState as H, forwardRef as S, Children as L, isValidElement as W, Fragment as Me, cloneElement as ie, useReducer as kt } from "react";
4
- import Ft, { flushSync as ot } from "react-dom";
3
+ import { useCallback as Q, createContext as Oe, useMemo as me, createElement as _, useContext as rt, useLayoutEffect as Rt, useRef as N, useEffect as A, useState as H, forwardRef as S, Children as L, isValidElement as U, cloneElement as ae, Fragment as Le, useReducer as Mt } from "react";
4
+ import kt, { flushSync as ot } from "react-dom";
5
5
  function P() {
6
6
  return P = Object.assign ? Object.assign.bind() : function(e) {
7
7
  for (var n = 1; n < arguments.length; n++) {
@@ -16,58 +16,36 @@ function B(e, n, { checkForDefaultPrevented: t = !0 } = {}) {
16
16
  if (e == null || e(a), t === !1 || !a.defaultPrevented) return n == null ? void 0 : n(a);
17
17
  };
18
18
  }
19
- function jt(e, n) {
19
+ function Ft(e, n) {
20
20
  typeof e == "function" ? e(n) : e != null && (e.current = n);
21
21
  }
22
22
  function at(...e) {
23
23
  return (n) => e.forEach(
24
- (t) => jt(t, n)
24
+ (t) => Ft(t, n)
25
25
  );
26
26
  }
27
- function ee(...e) {
28
- return J(at(...e), e);
27
+ function J(...e) {
28
+ return Q(at(...e), e);
29
29
  }
30
- function Bt(e, n) {
31
- const t = /* @__PURE__ */ ge(n);
32
- function o(r) {
33
- const { children: i, ...c } = r, u = ae(
34
- () => c,
35
- Object.values(c)
36
- );
37
- return /* @__PURE__ */ g(t.Provider, {
38
- value: u
39
- }, i);
40
- }
41
- function a(r) {
42
- const i = Le(t);
43
- if (i) return i;
44
- if (n !== void 0) return n;
45
- throw new Error(`\`${r}\` must be used within \`${e}\``);
46
- }
47
- return o.displayName = e + "Provider", [
48
- o,
49
- a
50
- ];
51
- }
52
- function Wt(e, n = []) {
30
+ function jt(e, n = []) {
53
31
  let t = [];
54
32
  function o(r, i) {
55
- const c = /* @__PURE__ */ ge(i), u = t.length;
33
+ const c = /* @__PURE__ */ Oe(i), s = t.length;
56
34
  t = [
57
35
  ...t,
58
36
  i
59
37
  ];
60
38
  function d(l) {
61
- const { scope: f, children: v, ...E } = l, s = (f == null ? void 0 : f[e][u]) || c, h = ae(
39
+ const { scope: f, children: v, ...E } = l, u = (f == null ? void 0 : f[e][s]) || c, h = me(
62
40
  () => E,
63
41
  Object.values(E)
64
42
  );
65
- return /* @__PURE__ */ g(s.Provider, {
43
+ return /* @__PURE__ */ _(u.Provider, {
66
44
  value: h
67
45
  }, v);
68
46
  }
69
47
  function p(l, f) {
70
- const v = (f == null ? void 0 : f[e][u]) || c, E = Le(v);
48
+ const v = (f == null ? void 0 : f[e][s]) || c, E = rt(v);
71
49
  if (E) return E;
72
50
  if (i !== void 0) return i;
73
51
  throw new Error(`\`${l}\` must be used within \`${r}\``);
@@ -78,29 +56,29 @@ function Wt(e, n = []) {
78
56
  ];
79
57
  }
80
58
  const a = () => {
81
- const r = t.map((i) => /* @__PURE__ */ ge(i));
59
+ const r = t.map((i) => /* @__PURE__ */ Oe(i));
82
60
  return function(c) {
83
- const u = (c == null ? void 0 : c[e]) || r;
84
- return ae(
61
+ const s = (c == null ? void 0 : c[e]) || r;
62
+ return me(
85
63
  () => ({
86
64
  [`__scope${e}`]: {
87
65
  ...c,
88
- [e]: u
66
+ [e]: s
89
67
  }
90
68
  }),
91
69
  [
92
70
  c,
93
- u
71
+ s
94
72
  ]
95
73
  );
96
74
  };
97
75
  };
98
76
  return a.scopeName = e, [
99
77
  o,
100
- Ut(a, ...n)
78
+ Bt(a, ...n)
101
79
  ];
102
80
  }
103
- function Ut(...e) {
81
+ function Bt(...e) {
104
82
  const n = e[0];
105
83
  if (e.length === 1) return n;
106
84
  const t = () => {
@@ -111,14 +89,14 @@ function Ut(...e) {
111
89
  })
112
90
  );
113
91
  return function(r) {
114
- const i = o.reduce((c, { useScope: u, scopeName: d }) => {
115
- const l = u(r)[`__scope${d}`];
92
+ const i = o.reduce((c, { useScope: s, scopeName: d }) => {
93
+ const l = s(r)[`__scope${d}`];
116
94
  return {
117
95
  ...c,
118
96
  ...l
119
97
  };
120
98
  }, {});
121
- return ae(
99
+ return me(
122
100
  () => ({
123
101
  [`__scope${n.scopeName}`]: i
124
102
  }),
@@ -131,24 +109,24 @@ function Ut(...e) {
131
109
  return t.scopeName = n.scopeName, t;
132
110
  }
133
111
  const Ne = globalThis != null && globalThis.document ? Rt : () => {
134
- }, zt = m.useId || (() => {
112
+ }, Ut = m.useId || (() => {
135
113
  });
136
- let qt = 0;
137
- function $e(e) {
138
- const [n, t] = m.useState(zt());
114
+ let Wt = 0;
115
+ function be(e) {
116
+ const [n, t] = m.useState(Ut());
139
117
  return Ne(() => {
140
118
  e || t(
141
- (o) => o ?? String(qt++)
119
+ (o) => o ?? String(Wt++)
142
120
  );
143
121
  }, [
144
122
  e
145
123
  ]), e || (n ? `radix-${n}` : "");
146
124
  }
147
- function K(e) {
125
+ function V(e) {
148
126
  const n = N(e);
149
127
  return A(() => {
150
128
  n.current = e;
151
- }), ae(
129
+ }), me(
152
130
  () => (...t) => {
153
131
  var o;
154
132
  return (o = n.current) === null || o === void 0 ? void 0 : o.call(n, ...t);
@@ -156,12 +134,12 @@ function K(e) {
156
134
  []
157
135
  );
158
136
  }
159
- function Ht({ prop: e, defaultProp: n, onChange: t = () => {
137
+ function zt({ prop: e, defaultProp: n, onChange: t = () => {
160
138
  } }) {
161
- const [o, a] = Kt({
139
+ const [o, a] = qt({
162
140
  defaultProp: n,
163
141
  onChange: t
164
- }), r = e !== void 0, i = r ? e : o, c = K(t), u = J((d) => {
142
+ }), r = e !== void 0, i = r ? e : o, c = V(t), s = Q((d) => {
165
143
  if (r) {
166
144
  const l = typeof d == "function" ? d(e) : d;
167
145
  l !== e && c(l);
@@ -174,11 +152,11 @@ function Ht({ prop: e, defaultProp: n, onChange: t = () => {
174
152
  ]);
175
153
  return [
176
154
  i,
177
- u
155
+ s
178
156
  ];
179
157
  }
180
- function Kt({ defaultProp: e, onChange: n }) {
181
- const t = H(e), [o] = t, a = N(o), r = K(n);
158
+ function qt({ defaultProp: e, onChange: n }) {
159
+ const t = H(e), [o] = t, a = N(o), r = V(n);
182
160
  return A(() => {
183
161
  a.current !== o && (r(o), a.current = o);
184
162
  }, [
@@ -188,31 +166,31 @@ function Kt({ defaultProp: e, onChange: n }) {
188
166
  ]), t;
189
167
  }
190
168
  const Re = /* @__PURE__ */ S((e, n) => {
191
- const { children: t, ...o } = e, a = L.toArray(t), r = a.find(Gt);
169
+ const { children: t, ...o } = e, a = L.toArray(t), r = a.find(Vt);
192
170
  if (r) {
193
- const i = r.props.children, c = a.map((u) => u === r ? L.count(i) > 1 ? L.only(null) : /* @__PURE__ */ W(i) ? i.props.children : null : u);
194
- return /* @__PURE__ */ g(Pe, P({}, o, {
171
+ 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);
172
+ return /* @__PURE__ */ _(Pe, P({}, o, {
195
173
  ref: n
196
- }), /* @__PURE__ */ W(i) ? /* @__PURE__ */ ie(i, void 0, c) : null);
174
+ }), /* @__PURE__ */ U(i) ? /* @__PURE__ */ ae(i, void 0, c) : null);
197
175
  }
198
- return /* @__PURE__ */ g(Pe, P({}, o, {
176
+ return /* @__PURE__ */ _(Pe, P({}, o, {
199
177
  ref: n
200
178
  }), t);
201
179
  });
202
180
  Re.displayName = "Slot";
203
181
  const Pe = /* @__PURE__ */ S((e, n) => {
204
182
  const { children: t, ...o } = e;
205
- return /* @__PURE__ */ W(t) ? /* @__PURE__ */ ie(t, {
206
- ...Xt(o, t.props),
183
+ return /* @__PURE__ */ U(t) ? /* @__PURE__ */ ae(t, {
184
+ ...Kt(o, t.props),
207
185
  ref: n ? at(n, t.ref) : t.ref
208
186
  }) : L.count(t) > 1 ? L.only(null) : null;
209
187
  });
210
188
  Pe.displayName = "SlotClone";
211
- const Vt = ({ children: e }) => /* @__PURE__ */ g(Me, null, e);
212
- function Gt(e) {
213
- return /* @__PURE__ */ W(e) && e.type === Vt;
189
+ const Ht = ({ children: e }) => /* @__PURE__ */ _(Le, null, e);
190
+ function Vt(e) {
191
+ return /* @__PURE__ */ U(e) && e.type === Ht;
214
192
  }
215
- function Xt(e, n) {
193
+ function Kt(e, n) {
216
194
  const t = {
217
195
  ...n
218
196
  };
@@ -233,7 +211,7 @@ function Xt(e, n) {
233
211
  ...t
234
212
  };
235
213
  }
236
- const Yt = [
214
+ const Xt = [
237
215
  "a",
238
216
  "button",
239
217
  "div",
@@ -250,12 +228,12 @@ const Yt = [
250
228
  "span",
251
229
  "svg",
252
230
  "ul"
253
- ], U = Yt.reduce((e, n) => {
231
+ ], W = Xt.reduce((e, n) => {
254
232
  const t = /* @__PURE__ */ S((o, a) => {
255
233
  const { asChild: r, ...i } = o, c = r ? Re : n;
256
234
  return A(() => {
257
235
  window[Symbol.for("radix-ui")] = !0;
258
- }, []), /* @__PURE__ */ g(c, P({}, i, {
236
+ }, []), /* @__PURE__ */ _(c, P({}, i, {
259
237
  ref: a
260
238
  }));
261
239
  });
@@ -264,13 +242,13 @@ const Yt = [
264
242
  [n]: t
265
243
  };
266
244
  }, {});
267
- function Zt(e, n) {
245
+ function Gt(e, n) {
268
246
  e && ot(
269
247
  () => e.dispatchEvent(n)
270
248
  );
271
249
  }
272
- function Qt(e, n = globalThis == null ? void 0 : globalThis.document) {
273
- const t = K(e);
250
+ function Yt(e, n = globalThis == null ? void 0 : globalThis.document) {
251
+ const t = V(e);
274
252
  A(() => {
275
253
  const o = (a) => {
276
254
  a.key === "Escape" && t(a);
@@ -281,40 +259,40 @@ function Qt(e, n = globalThis == null ? void 0 : globalThis.document) {
281
259
  n
282
260
  ]);
283
261
  }
284
- const Ae = "dismissableLayer.update", Jt = "dismissableLayer.pointerDownOutside", en = "dismissableLayer.focusOutside";
285
- let Be;
286
- const tn = /* @__PURE__ */ ge({
262
+ const Ae = "dismissableLayer.update", Zt = "dismissableLayer.pointerDownOutside", Qt = "dismissableLayer.focusOutside";
263
+ let je;
264
+ const Jt = /* @__PURE__ */ Oe({
287
265
  layers: /* @__PURE__ */ new Set(),
288
266
  layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
289
267
  branches: /* @__PURE__ */ new Set()
290
- }), nn = /* @__PURE__ */ S((e, n) => {
268
+ }), en = /* @__PURE__ */ S((e, n) => {
291
269
  var t;
292
- const { disableOutsidePointerEvents: o = !1, onEscapeKeyDown: a, onPointerDownOutside: r, onFocusOutside: i, onInteractOutside: c, onDismiss: u, ...d } = e, p = Le(tn), [l, f] = H(null), v = (t = l == null ? void 0 : l.ownerDocument) !== null && t !== void 0 ? t : globalThis == null ? void 0 : globalThis.document, [, E] = H({}), s = ee(
270
+ const { disableOutsidePointerEvents: o = !1, onEscapeKeyDown: a, onPointerDownOutside: r, onFocusOutside: i, onInteractOutside: c, onDismiss: s, ...d } = e, p = rt(Jt), [l, f] = H(null), v = (t = l == null ? void 0 : l.ownerDocument) !== null && t !== void 0 ? t : globalThis == null ? void 0 : globalThis.document, [, E] = H({}), u = J(
293
271
  n,
294
272
  (w) => f(w)
295
- ), h = Array.from(p.layers), [_] = [
273
+ ), h = Array.from(p.layers), [g] = [
296
274
  ...p.layersWithOutsidePointerEventsDisabled
297
- ].slice(-1), C = h.indexOf(_), y = l ? h.indexOf(l) : -1, $ = p.layersWithOutsidePointerEventsDisabled.size > 0, x = y >= C, z = rn((w) => {
298
- const I = w.target, ce = [
275
+ ].slice(-1), C = h.indexOf(g), y = l ? h.indexOf(l) : -1, $ = p.layersWithOutsidePointerEventsDisabled.size > 0, x = y >= C, z = tn((w) => {
276
+ const I = w.target, ie = [
299
277
  ...p.branches
300
278
  ].some(
301
- (M) => M.contains(I)
279
+ (R) => R.contains(I)
302
280
  );
303
- !x || ce || (r == null || r(w), c == null || c(w), w.defaultPrevented || u == null || u());
304
- }, v), D = on((w) => {
281
+ !x || ie || (r == null || r(w), c == null || c(w), w.defaultPrevented || s == null || s());
282
+ }, v), D = nn((w) => {
305
283
  const I = w.target;
306
284
  [
307
285
  ...p.branches
308
286
  ].some(
309
- (M) => M.contains(I)
310
- ) || (i == null || i(w), c == null || c(w), w.defaultPrevented || u == null || u());
287
+ (R) => R.contains(I)
288
+ ) || (i == null || i(w), c == null || c(w), w.defaultPrevented || s == null || s());
311
289
  }, v);
312
- return Qt((w) => {
313
- y === p.layers.size - 1 && (a == null || a(w), !w.defaultPrevented && u && (w.preventDefault(), u()));
290
+ return Yt((w) => {
291
+ y === p.layers.size - 1 && (a == null || a(w), !w.defaultPrevented && s && (w.preventDefault(), s()));
314
292
  }, v), A(() => {
315
293
  if (l)
316
- return o && (p.layersWithOutsidePointerEventsDisabled.size === 0 && (Be = v.body.style.pointerEvents, v.body.style.pointerEvents = "none"), p.layersWithOutsidePointerEventsDisabled.add(l)), p.layers.add(l), We(), () => {
317
- o && p.layersWithOutsidePointerEventsDisabled.size === 1 && (v.body.style.pointerEvents = Be);
294
+ return o && (p.layersWithOutsidePointerEventsDisabled.size === 0 && (je = v.body.style.pointerEvents, v.body.style.pointerEvents = "none"), p.layersWithOutsidePointerEventsDisabled.add(l)), p.layers.add(l), Be(), () => {
295
+ o && p.layersWithOutsidePointerEventsDisabled.size === 1 && (v.body.style.pointerEvents = je);
318
296
  };
319
297
  }, [
320
298
  l,
@@ -322,15 +300,15 @@ const tn = /* @__PURE__ */ ge({
322
300
  o,
323
301
  p
324
302
  ]), A(() => () => {
325
- l && (p.layers.delete(l), p.layersWithOutsidePointerEventsDisabled.delete(l), We());
303
+ l && (p.layers.delete(l), p.layersWithOutsidePointerEventsDisabled.delete(l), Be());
326
304
  }, [
327
305
  l,
328
306
  p
329
307
  ]), A(() => {
330
308
  const w = () => E({});
331
309
  return document.addEventListener(Ae, w), () => document.removeEventListener(Ae, w);
332
- }, []), /* @__PURE__ */ g(U.div, P({}, d, {
333
- ref: s,
310
+ }, []), /* @__PURE__ */ _(W.div, P({}, d, {
311
+ ref: u,
334
312
  style: {
335
313
  pointerEvents: $ ? x ? "auto" : "none" : void 0,
336
314
  ...e.style
@@ -340,18 +318,18 @@ const tn = /* @__PURE__ */ ge({
340
318
  onPointerDownCapture: B(e.onPointerDownCapture, z.onPointerDownCapture)
341
319
  }));
342
320
  });
343
- function rn(e, n = globalThis == null ? void 0 : globalThis.document) {
344
- const t = K(e), o = N(!1), a = N(() => {
321
+ function tn(e, n = globalThis == null ? void 0 : globalThis.document) {
322
+ const t = V(e), o = N(!1), a = N(() => {
345
323
  });
346
324
  return A(() => {
347
325
  const r = (c) => {
348
326
  if (c.target && !o.current) {
349
327
  let d = function() {
350
- it(Jt, t, u, {
328
+ it(Zt, t, s, {
351
329
  discrete: !0
352
330
  });
353
331
  };
354
- const u = {
332
+ const s = {
355
333
  originalEvent: c
356
334
  };
357
335
  c.pointerType === "touch" ? (n.removeEventListener("click", a.current), a.current = d, n.addEventListener("click", a.current, {
@@ -374,11 +352,11 @@ function rn(e, n = globalThis == null ? void 0 : globalThis.document) {
374
352
  onPointerDownCapture: () => o.current = !0
375
353
  };
376
354
  }
377
- function on(e, n = globalThis == null ? void 0 : globalThis.document) {
378
- const t = K(e), o = N(!1);
355
+ function nn(e, n = globalThis == null ? void 0 : globalThis.document) {
356
+ const t = V(e), o = N(!1);
379
357
  return A(() => {
380
358
  const a = (r) => {
381
- r.target && !o.current && it(en, t, {
359
+ r.target && !o.current && it(Qt, t, {
382
360
  originalEvent: r
383
361
  }, {
384
362
  discrete: !1
@@ -393,7 +371,7 @@ function on(e, n = globalThis == null ? void 0 : globalThis.document) {
393
371
  onBlurCapture: () => o.current = !1
394
372
  };
395
373
  }
396
- function We() {
374
+ function Be() {
397
375
  const e = new CustomEvent(Ae);
398
376
  document.dispatchEvent(e);
399
377
  }
@@ -405,15 +383,15 @@ function it(e, n, t, { discrete: o }) {
405
383
  });
406
384
  n && a.addEventListener(e, n, {
407
385
  once: !0
408
- }), o ? Zt(a, r) : a.dispatchEvent(r);
386
+ }), o ? Gt(a, r) : a.dispatchEvent(r);
409
387
  }
410
- const ye = "focusScope.autoFocusOnMount", Ee = "focusScope.autoFocusOnUnmount", Ue = {
388
+ const $e = "focusScope.autoFocusOnMount", ye = "focusScope.autoFocusOnUnmount", Ue = {
411
389
  bubbles: !1,
412
390
  cancelable: !0
413
- }, an = /* @__PURE__ */ S((e, n) => {
414
- const { loop: t = !1, trapped: o = !1, onMountAutoFocus: a, onUnmountAutoFocus: r, ...i } = e, [c, u] = H(null), d = K(a), p = K(r), l = N(null), f = ee(
391
+ }, rn = /* @__PURE__ */ S((e, n) => {
392
+ const { loop: t = !1, trapped: o = !1, onMountAutoFocus: a, onUnmountAutoFocus: r, ...i } = e, [c, s] = H(null), d = V(a), p = V(r), l = N(null), f = J(
415
393
  n,
416
- (s) => u(s)
394
+ (u) => s(u)
417
395
  ), v = N({
418
396
  paused: !1,
419
397
  pause() {
@@ -425,7 +403,7 @@ const ye = "focusScope.autoFocusOnMount", Ee = "focusScope.autoFocusOnUnmount",
425
403
  }).current;
426
404
  A(() => {
427
405
  if (o) {
428
- let s = function(y) {
406
+ let u = function(y) {
429
407
  if (v.paused || !c) return;
430
408
  const $ = y.target;
431
409
  c.contains($) ? l.current = $ : j(l.current, {
@@ -437,17 +415,17 @@ const ye = "focusScope.autoFocusOnMount", Ee = "focusScope.autoFocusOnUnmount",
437
415
  $ !== null && (c.contains($) || j(l.current, {
438
416
  select: !0
439
417
  }));
440
- }, _ = function(y) {
418
+ }, g = function(y) {
441
419
  if (document.activeElement === document.body)
442
420
  for (const x of y) x.removedNodes.length > 0 && j(c);
443
421
  };
444
- document.addEventListener("focusin", s), document.addEventListener("focusout", h);
445
- const C = new MutationObserver(_);
422
+ document.addEventListener("focusin", u), document.addEventListener("focusout", h);
423
+ const C = new MutationObserver(g);
446
424
  return c && C.observe(c, {
447
425
  childList: !0,
448
426
  subtree: !0
449
427
  }), () => {
450
- document.removeEventListener("focusin", s), document.removeEventListener("focusout", h), C.disconnect();
428
+ document.removeEventListener("focusin", u), document.removeEventListener("focusout", h), C.disconnect();
451
429
  };
452
430
  }
453
431
  }, [
@@ -456,20 +434,20 @@ const ye = "focusScope.autoFocusOnMount", Ee = "focusScope.autoFocusOnUnmount",
456
434
  v.paused
457
435
  ]), A(() => {
458
436
  if (c) {
459
- qe.add(v);
460
- const s = document.activeElement;
461
- if (!c.contains(s)) {
462
- const _ = new CustomEvent(ye, Ue);
463
- c.addEventListener(ye, d), c.dispatchEvent(_), _.defaultPrevented || (cn(pn(ct(c)), {
437
+ ze.add(v);
438
+ const u = document.activeElement;
439
+ if (!c.contains(u)) {
440
+ const g = new CustomEvent($e, Ue);
441
+ c.addEventListener($e, d), c.dispatchEvent(g), g.defaultPrevented || (on(ln(ct(c)), {
464
442
  select: !0
465
- }), document.activeElement === s && j(c));
443
+ }), document.activeElement === u && j(c));
466
444
  }
467
445
  return () => {
468
- c.removeEventListener(ye, d), setTimeout(() => {
469
- const _ = new CustomEvent(Ee, Ue);
470
- c.addEventListener(Ee, p), c.dispatchEvent(_), _.defaultPrevented || j(s ?? document.body, {
446
+ c.removeEventListener($e, d), setTimeout(() => {
447
+ const g = new CustomEvent(ye, Ue);
448
+ c.addEventListener(ye, p), c.dispatchEvent(g), g.defaultPrevented || j(u ?? document.body, {
471
449
  select: !0
472
- }), c.removeEventListener(Ee, p), qe.remove(v);
450
+ }), c.removeEventListener(ye, p), ze.remove(v);
473
451
  }, 0);
474
452
  };
475
453
  }
@@ -479,38 +457,38 @@ const ye = "focusScope.autoFocusOnMount", Ee = "focusScope.autoFocusOnUnmount",
479
457
  p,
480
458
  v
481
459
  ]);
482
- const E = J((s) => {
460
+ const E = Q((u) => {
483
461
  if (!t && !o || v.paused) return;
484
- const h = s.key === "Tab" && !s.altKey && !s.ctrlKey && !s.metaKey, _ = document.activeElement;
485
- if (h && _) {
486
- const C = s.currentTarget, [y, $] = un(C);
487
- y && $ ? !s.shiftKey && _ === $ ? (s.preventDefault(), t && j(y, {
462
+ const h = u.key === "Tab" && !u.altKey && !u.ctrlKey && !u.metaKey, g = document.activeElement;
463
+ if (h && g) {
464
+ const C = u.currentTarget, [y, $] = an(C);
465
+ y && $ ? !u.shiftKey && g === $ ? (u.preventDefault(), t && j(y, {
488
466
  select: !0
489
- })) : s.shiftKey && _ === y && (s.preventDefault(), t && j($, {
467
+ })) : u.shiftKey && g === y && (u.preventDefault(), t && j($, {
490
468
  select: !0
491
- })) : _ === C && s.preventDefault();
469
+ })) : g === C && u.preventDefault();
492
470
  }
493
471
  }, [
494
472
  t,
495
473
  o,
496
474
  v.paused
497
475
  ]);
498
- return /* @__PURE__ */ g(U.div, P({
476
+ return /* @__PURE__ */ _(W.div, P({
499
477
  tabIndex: -1
500
478
  }, i, {
501
479
  ref: f,
502
480
  onKeyDown: E
503
481
  }));
504
482
  });
505
- function cn(e, { select: n = !1 } = {}) {
483
+ function on(e, { select: n = !1 } = {}) {
506
484
  const t = document.activeElement;
507
485
  for (const o of e)
508
486
  if (j(o, {
509
487
  select: n
510
488
  }), document.activeElement !== t) return;
511
489
  }
512
- function un(e) {
513
- const n = ct(e), t = ze(n, e), o = ze(n.reverse(), e);
490
+ function an(e) {
491
+ const n = ct(e), t = We(n, e), o = We(n.reverse(), e);
514
492
  return [
515
493
  t,
516
494
  o
@@ -526,13 +504,13 @@ function ct(e) {
526
504
  for (; t.nextNode(); ) n.push(t.currentNode);
527
505
  return n;
528
506
  }
529
- function ze(e, n) {
507
+ function We(e, n) {
530
508
  for (const t of e)
531
- if (!sn(t, {
509
+ if (!cn(t, {
532
510
  upTo: n
533
511
  })) return t;
534
512
  }
535
- function sn(e, { upTo: n }) {
513
+ function cn(e, { upTo: n }) {
536
514
  if (getComputedStyle(e).visibility === "hidden") return !0;
537
515
  for (; e; ) {
538
516
  if (n !== void 0 && e === n) return !1;
@@ -541,7 +519,7 @@ function sn(e, { upTo: n }) {
541
519
  }
542
520
  return !1;
543
521
  }
544
- function ln(e) {
522
+ function un(e) {
545
523
  return e instanceof HTMLInputElement && "select" in e;
546
524
  }
547
525
  function j(e, { select: n = !1 } = {}) {
@@ -549,58 +527,58 @@ function j(e, { select: n = !1 } = {}) {
549
527
  const t = document.activeElement;
550
528
  e.focus({
551
529
  preventScroll: !0
552
- }), e !== t && ln(e) && n && e.select();
530
+ }), e !== t && un(e) && n && e.select();
553
531
  }
554
532
  }
555
- const qe = dn();
556
- function dn() {
533
+ const ze = sn();
534
+ function sn() {
557
535
  let e = [];
558
536
  return {
559
537
  add(n) {
560
538
  const t = e[0];
561
- n !== t && (t == null || t.pause()), e = He(e, n), e.unshift(n);
539
+ n !== t && (t == null || t.pause()), e = qe(e, n), e.unshift(n);
562
540
  },
563
541
  remove(n) {
564
542
  var t;
565
- e = He(e, n), (t = e[0]) === null || t === void 0 || t.resume();
543
+ e = qe(e, n), (t = e[0]) === null || t === void 0 || t.resume();
566
544
  }
567
545
  };
568
546
  }
569
- function He(e, n) {
547
+ function qe(e, n) {
570
548
  const t = [
571
549
  ...e
572
550
  ], o = t.indexOf(n);
573
551
  return o !== -1 && t.splice(o, 1), t;
574
552
  }
575
- function pn(e) {
553
+ function ln(e) {
576
554
  return e.filter(
577
555
  (n) => n.tagName !== "A"
578
556
  );
579
557
  }
580
- const fn = /* @__PURE__ */ S((e, n) => {
558
+ const dn = /* @__PURE__ */ S((e, n) => {
581
559
  var t;
582
560
  const { container: o = globalThis == null || (t = globalThis.document) === null || t === void 0 ? void 0 : t.body, ...a } = e;
583
- return o ? /* @__PURE__ */ Ft.createPortal(/* @__PURE__ */ g(U.div, P({}, a, {
561
+ return o ? /* @__PURE__ */ kt.createPortal(/* @__PURE__ */ _(W.div, P({}, a, {
584
562
  ref: n
585
563
  })), o) : null;
586
564
  });
587
- function vn(e, n) {
588
- return kt((t, o) => {
565
+ function pn(e, n) {
566
+ return Mt((t, o) => {
589
567
  const a = n[t][o];
590
568
  return a ?? t;
591
569
  }, e);
592
570
  }
593
- const _e = (e) => {
594
- const { present: n, children: t } = e, o = hn(n), a = typeof t == "function" ? t({
571
+ const ge = (e) => {
572
+ const { present: n, children: t } = e, o = fn(n), a = typeof t == "function" ? t({
595
573
  present: o.isPresent
596
- }) : L.only(t), r = ee(o.ref, a.ref);
597
- return typeof t == "function" || o.isPresent ? /* @__PURE__ */ ie(a, {
574
+ }) : L.only(t), r = J(o.ref, a.ref);
575
+ return typeof t == "function" || o.isPresent ? /* @__PURE__ */ ae(a, {
598
576
  ref: r
599
577
  }) : null;
600
578
  };
601
- _e.displayName = "Presence";
602
- function hn(e) {
603
- const [n, t] = H(), o = N({}), a = N(e), r = N("none"), i = e ? "mounted" : "unmounted", [c, u] = vn(i, {
579
+ ge.displayName = "Presence";
580
+ function fn(e) {
581
+ const [n, t] = H(), o = N({}), a = N(e), r = N("none"), i = e ? "mounted" : "unmounted", [c, s] = pn(i, {
604
582
  mounted: {
605
583
  UNMOUNT: "unmounted",
606
584
  ANIMATION_OUT: "unmountSuspended"
@@ -614,63 +592,63 @@ function hn(e) {
614
592
  }
615
593
  });
616
594
  return A(() => {
617
- const d = ue(o.current);
595
+ const d = ce(o.current);
618
596
  r.current = c === "mounted" ? d : "none";
619
597
  }, [
620
598
  c
621
599
  ]), Ne(() => {
622
600
  const d = o.current, p = a.current;
623
601
  if (p !== e) {
624
- const f = r.current, v = ue(d);
625
- e ? u("MOUNT") : v === "none" || (d == null ? void 0 : d.display) === "none" ? u("UNMOUNT") : u(p && f !== v ? "ANIMATION_OUT" : "UNMOUNT"), a.current = e;
602
+ const f = r.current, v = ce(d);
603
+ e ? s("MOUNT") : v === "none" || (d == null ? void 0 : d.display) === "none" ? s("UNMOUNT") : s(p && f !== v ? "ANIMATION_OUT" : "UNMOUNT"), a.current = e;
626
604
  }
627
605
  }, [
628
606
  e,
629
- u
607
+ s
630
608
  ]), Ne(() => {
631
609
  if (n) {
632
610
  const d = (l) => {
633
- const v = ue(o.current).includes(l.animationName);
611
+ const v = ce(o.current).includes(l.animationName);
634
612
  l.target === n && v && ot(
635
- () => u("ANIMATION_END")
613
+ () => s("ANIMATION_END")
636
614
  );
637
615
  }, p = (l) => {
638
- l.target === n && (r.current = ue(o.current));
616
+ l.target === n && (r.current = ce(o.current));
639
617
  };
640
618
  return n.addEventListener("animationstart", p), n.addEventListener("animationcancel", d), n.addEventListener("animationend", d), () => {
641
619
  n.removeEventListener("animationstart", p), n.removeEventListener("animationcancel", d), n.removeEventListener("animationend", d);
642
620
  };
643
621
  } else
644
- u("ANIMATION_END");
622
+ s("ANIMATION_END");
645
623
  }, [
646
624
  n,
647
- u
625
+ s
648
626
  ]), {
649
627
  isPresent: [
650
628
  "mounted",
651
629
  "unmountSuspended"
652
630
  ].includes(c),
653
- ref: J((d) => {
631
+ ref: Q((d) => {
654
632
  d && (o.current = getComputedStyle(d)), t(d);
655
633
  }, [])
656
634
  };
657
635
  }
658
- function ue(e) {
636
+ function ce(e) {
659
637
  return (e == null ? void 0 : e.animationName) || "none";
660
638
  }
661
- let we = 0;
662
- function mn() {
639
+ let Ee = 0;
640
+ function vn() {
663
641
  A(() => {
664
642
  var e, n;
665
643
  const t = document.querySelectorAll("[data-radix-focus-guard]");
666
- return document.body.insertAdjacentElement("afterbegin", (e = t[0]) !== null && e !== void 0 ? e : Ke()), document.body.insertAdjacentElement("beforeend", (n = t[1]) !== null && n !== void 0 ? n : Ke()), we++, () => {
667
- we === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach(
644
+ return document.body.insertAdjacentElement("afterbegin", (e = t[0]) !== null && e !== void 0 ? e : He()), document.body.insertAdjacentElement("beforeend", (n = t[1]) !== null && n !== void 0 ? n : He()), Ee++, () => {
645
+ Ee === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach(
668
646
  (o) => o.remove()
669
- ), we--;
647
+ ), Ee--;
670
648
  };
671
649
  }, []);
672
650
  }
673
- function Ke() {
651
+ function He() {
674
652
  const e = document.createElement("span");
675
653
  return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.cssText = "outline: none; opacity: 0; position: fixed; pointer-events: none", e;
676
654
  }
@@ -691,16 +669,16 @@ function ut(e, n) {
691
669
  n.indexOf(o[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[a]) && (t[o[a]] = e[o[a]]);
692
670
  return t;
693
671
  }
694
- function gn(e, n, t) {
672
+ function hn(e, n, t) {
695
673
  if (t || arguments.length === 2) for (var o = 0, a = n.length, r; o < a; o++)
696
674
  (r || !(o in n)) && (r || (r = Array.prototype.slice.call(n, 0, o)), r[o] = n[o]);
697
675
  return e.concat(r || Array.prototype.slice.call(n));
698
676
  }
699
- var he = "right-scroll-bar-position", me = "width-before-scroll-bar", _n = "with-scroll-bars-hidden", bn = "--removed-body-scroll-bar-size";
700
- function xe(e, n) {
677
+ var ve = "right-scroll-bar-position", he = "width-before-scroll-bar", mn = "with-scroll-bars-hidden", gn = "--removed-body-scroll-bar-size";
678
+ function we(e, n) {
701
679
  return typeof e == "function" ? e(n) : e && (e.current = n), e;
702
680
  }
703
- function $n(e, n) {
681
+ function _n(e, n) {
704
682
  var t = H(function() {
705
683
  return {
706
684
  // value
@@ -721,31 +699,31 @@ function $n(e, n) {
721
699
  })[0];
722
700
  return t.callback = n, t.facade;
723
701
  }
724
- var yn = typeof window < "u" ? m.useLayoutEffect : m.useEffect, Ve = /* @__PURE__ */ new WeakMap();
725
- function En(e, n) {
726
- var t = $n(null, function(o) {
702
+ var bn = typeof window < "u" ? m.useLayoutEffect : m.useEffect, Ve = /* @__PURE__ */ new WeakMap();
703
+ function $n(e, n) {
704
+ var t = _n(null, function(o) {
727
705
  return e.forEach(function(a) {
728
- return xe(a, o);
706
+ return we(a, o);
729
707
  });
730
708
  });
731
- return yn(function() {
709
+ return bn(function() {
732
710
  var o = Ve.get(t);
733
711
  if (o) {
734
712
  var a = new Set(o), r = new Set(e), i = t.current;
735
713
  a.forEach(function(c) {
736
- r.has(c) || xe(c, null);
714
+ r.has(c) || we(c, null);
737
715
  }), r.forEach(function(c) {
738
- a.has(c) || xe(c, i);
716
+ a.has(c) || we(c, i);
739
717
  });
740
718
  }
741
719
  Ve.set(t, e);
742
720
  }, [e]), t;
743
721
  }
744
- function wn(e) {
722
+ function yn(e) {
745
723
  return e;
746
724
  }
747
- function xn(e, n) {
748
- n === void 0 && (n = wn);
725
+ function En(e, n) {
726
+ n === void 0 && (n = yn);
749
727
  var t = [], o = !1, a = {
750
728
  read: function() {
751
729
  if (o)
@@ -781,11 +759,11 @@ function xn(e, n) {
781
759
  var c = t;
782
760
  t = [], c.forEach(r), i = t;
783
761
  }
784
- var u = function() {
762
+ var s = function() {
785
763
  var p = i;
786
764
  i = [], p.forEach(r);
787
765
  }, d = function() {
788
- return Promise.resolve().then(u);
766
+ return Promise.resolve().then(s);
789
767
  };
790
768
  d(), t = {
791
769
  push: function(p) {
@@ -799,9 +777,9 @@ function xn(e, n) {
799
777
  };
800
778
  return a;
801
779
  }
802
- function Sn(e) {
780
+ function wn(e) {
803
781
  e === void 0 && (e = {});
804
- var n = xn(null);
782
+ var n = En(null);
805
783
  return n.options = k({ async: !0, ssr: !1 }, e), n;
806
784
  }
807
785
  var st = function(e) {
@@ -814,63 +792,63 @@ var st = function(e) {
814
792
  return m.createElement(o, k({}, t));
815
793
  };
816
794
  st.isSideCarExport = !0;
817
- function Cn(e, n) {
795
+ function xn(e, n) {
818
796
  return e.useMedium(n), st;
819
797
  }
820
- var lt = Sn(), Se = function() {
821
- }, be = m.forwardRef(function(e, n) {
798
+ var lt = wn(), xe = function() {
799
+ }, _e = m.forwardRef(function(e, n) {
822
800
  var t = m.useRef(null), o = m.useState({
823
- onScrollCapture: Se,
824
- onWheelCapture: Se,
825
- onTouchMoveCapture: Se
826
- }), a = o[0], r = o[1], i = e.forwardProps, c = e.children, u = e.className, d = e.removeScrollBar, p = e.enabled, l = e.shards, f = e.sideCar, v = e.noIsolation, E = e.inert, s = e.allowPinchZoom, h = e.as, _ = h === void 0 ? "div" : h, C = ut(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as"]), y = f, $ = En([t, n]), x = k(k({}, C), a);
801
+ onScrollCapture: xe,
802
+ onWheelCapture: xe,
803
+ onTouchMoveCapture: xe
804
+ }), a = o[0], r = o[1], i = e.forwardProps, c = e.children, s = e.className, d = e.removeScrollBar, p = e.enabled, l = e.shards, f = e.sideCar, v = e.noIsolation, E = e.inert, u = e.allowPinchZoom, h = e.as, g = h === void 0 ? "div" : h, C = ut(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as"]), y = f, $ = $n([t, n]), x = k(k({}, C), a);
827
805
  return m.createElement(
828
806
  m.Fragment,
829
807
  null,
830
- p && m.createElement(y, { sideCar: lt, removeScrollBar: d, shards: l, noIsolation: v, inert: E, setCallbacks: r, allowPinchZoom: !!s, lockRef: t }),
831
- i ? m.cloneElement(m.Children.only(c), k(k({}, x), { ref: $ })) : m.createElement(_, k({}, x, { className: u, ref: $ }), c)
808
+ p && m.createElement(y, { sideCar: lt, removeScrollBar: d, shards: l, noIsolation: v, inert: E, setCallbacks: r, allowPinchZoom: !!u, lockRef: t }),
809
+ i ? m.cloneElement(m.Children.only(c), k(k({}, x), { ref: $ })) : m.createElement(g, k({}, x, { className: s, ref: $ }), c)
832
810
  );
833
811
  });
834
- be.defaultProps = {
812
+ _e.defaultProps = {
835
813
  enabled: !0,
836
814
  removeScrollBar: !0,
837
815
  inert: !1
838
816
  };
839
- be.classNames = {
840
- fullWidth: me,
841
- zeroRight: he
817
+ _e.classNames = {
818
+ fullWidth: he,
819
+ zeroRight: ve
842
820
  };
843
- var On = function() {
821
+ var Sn = function() {
844
822
  if (typeof __webpack_nonce__ < "u")
845
823
  return __webpack_nonce__;
846
824
  };
847
- function Nn() {
825
+ function Cn() {
848
826
  if (!document)
849
827
  return null;
850
828
  var e = document.createElement("style");
851
829
  e.type = "text/css";
852
- var n = On();
830
+ var n = Sn();
853
831
  return n && e.setAttribute("nonce", n), e;
854
832
  }
855
- function Pn(e, n) {
833
+ function On(e, n) {
856
834
  e.styleSheet ? e.styleSheet.cssText = n : e.appendChild(document.createTextNode(n));
857
835
  }
858
- function An(e) {
836
+ function Nn(e) {
859
837
  var n = document.head || document.getElementsByTagName("head")[0];
860
838
  n.appendChild(e);
861
839
  }
862
- var Tn = function() {
840
+ var Pn = function() {
863
841
  var e = 0, n = null;
864
842
  return {
865
843
  add: function(t) {
866
- e == 0 && (n = Nn()) && (Pn(n, t), An(n)), e++;
844
+ e == 0 && (n = Cn()) && (On(n, t), Nn(n)), e++;
867
845
  },
868
846
  remove: function() {
869
847
  e--, !e && n && (n.parentNode && n.parentNode.removeChild(n), n = null);
870
848
  }
871
849
  };
872
- }, Dn = function() {
873
- var e = Tn();
850
+ }, An = function() {
851
+ var e = Pn();
874
852
  return function(n, t) {
875
853
  m.useEffect(function() {
876
854
  return e.add(n), function() {
@@ -879,35 +857,35 @@ var Tn = function() {
879
857
  }, [n && t]);
880
858
  };
881
859
  }, dt = function() {
882
- var e = Dn(), n = function(t) {
860
+ var e = An(), n = function(t) {
883
861
  var o = t.styles, a = t.dynamic;
884
862
  return e(o, a), null;
885
863
  };
886
864
  return n;
887
- }, In = {
865
+ }, Tn = {
888
866
  left: 0,
889
867
  top: 0,
890
868
  right: 0,
891
869
  gap: 0
892
- }, Ce = function(e) {
870
+ }, Se = function(e) {
893
871
  return parseInt(e || "", 10) || 0;
894
- }, Ln = function(e) {
872
+ }, Dn = function(e) {
895
873
  var n = window.getComputedStyle(document.body), t = n[e === "padding" ? "paddingLeft" : "marginLeft"], o = n[e === "padding" ? "paddingTop" : "marginTop"], a = n[e === "padding" ? "paddingRight" : "marginRight"];
896
- return [Ce(t), Ce(o), Ce(a)];
897
- }, Mn = function(e) {
874
+ return [Se(t), Se(o), Se(a)];
875
+ }, In = function(e) {
898
876
  if (e === void 0 && (e = "margin"), typeof window > "u")
899
- return In;
900
- var n = Ln(e), t = document.documentElement.clientWidth, o = window.innerWidth;
877
+ return Tn;
878
+ var n = Dn(e), t = document.documentElement.clientWidth, o = window.innerWidth;
901
879
  return {
902
880
  left: n[0],
903
881
  top: n[1],
904
882
  right: n[2],
905
883
  gap: Math.max(0, o - t + n[2] - n[0])
906
884
  };
907
- }, Rn = dt(), Y = "data-scroll-locked", kn = function(e, n, t, o) {
885
+ }, Ln = dt(), Y = "data-scroll-locked", Rn = function(e, n, t, o) {
908
886
  var a = e.left, r = e.top, i = e.right, c = e.gap;
909
887
  return t === void 0 && (t = "margin"), `
910
- .`.concat(_n, ` {
888
+ .`.concat(mn, ` {
911
889
  overflow: hidden `).concat(o, `;
912
890
  padding-right: `).concat(c, "px ").concat(o, `;
913
891
  }
@@ -928,67 +906,67 @@ var Tn = function() {
928
906
  ].filter(Boolean).join(""), `
929
907
  }
930
908
 
931
- .`).concat(he, ` {
909
+ .`).concat(ve, ` {
932
910
  right: `).concat(c, "px ").concat(o, `;
933
911
  }
934
912
 
935
- .`).concat(me, ` {
913
+ .`).concat(he, ` {
936
914
  margin-right: `).concat(c, "px ").concat(o, `;
937
915
  }
938
916
 
939
- .`).concat(he, " .").concat(he, ` {
917
+ .`).concat(ve, " .").concat(ve, ` {
940
918
  right: 0 `).concat(o, `;
941
919
  }
942
920
 
943
- .`).concat(me, " .").concat(me, ` {
921
+ .`).concat(he, " .").concat(he, ` {
944
922
  margin-right: 0 `).concat(o, `;
945
923
  }
946
924
 
947
925
  body[`).concat(Y, `] {
948
- `).concat(bn, ": ").concat(c, `px;
926
+ `).concat(gn, ": ").concat(c, `px;
949
927
  }
950
928
  `);
951
- }, Ge = function() {
929
+ }, Ke = function() {
952
930
  var e = parseInt(document.body.getAttribute(Y) || "0", 10);
953
931
  return isFinite(e) ? e : 0;
954
- }, Fn = function() {
932
+ }, Mn = function() {
955
933
  m.useEffect(function() {
956
- return document.body.setAttribute(Y, (Ge() + 1).toString()), function() {
957
- var e = Ge() - 1;
934
+ return document.body.setAttribute(Y, (Ke() + 1).toString()), function() {
935
+ var e = Ke() - 1;
958
936
  e <= 0 ? document.body.removeAttribute(Y) : document.body.setAttribute(Y, e.toString());
959
937
  };
960
938
  }, []);
961
- }, jn = function(e) {
939
+ }, kn = function(e) {
962
940
  var n = e.noRelative, t = e.noImportant, o = e.gapMode, a = o === void 0 ? "margin" : o;
963
- Fn();
941
+ Mn();
964
942
  var r = m.useMemo(function() {
965
- return Mn(a);
943
+ return In(a);
966
944
  }, [a]);
967
- return m.createElement(Rn, { styles: kn(r, !n, a, t ? "" : "!important") });
945
+ return m.createElement(Ln, { styles: Rn(r, !n, a, t ? "" : "!important") });
968
946
  }, Te = !1;
969
947
  if (typeof window < "u")
970
948
  try {
971
- var se = Object.defineProperty({}, "passive", {
949
+ var ue = Object.defineProperty({}, "passive", {
972
950
  get: function() {
973
951
  return Te = !0, !0;
974
952
  }
975
953
  });
976
- window.addEventListener("test", se, se), window.removeEventListener("test", se, se);
954
+ window.addEventListener("test", ue, ue), window.removeEventListener("test", ue, ue);
977
955
  } catch {
978
956
  Te = !1;
979
957
  }
980
- var V = Te ? {} : !1, Bn = function(e) {
958
+ var K = Te ? { passive: !1 } : !1, Fn = function(e) {
981
959
  return e.tagName === "TEXTAREA";
982
960
  }, pt = function(e, n) {
983
961
  var t = window.getComputedStyle(e);
984
962
  return (
985
963
  // not-not-scrollable
986
964
  t[n] !== "hidden" && // contains scroll inside self
987
- !(t.overflowY === t.overflowX && !Bn(e) && t[n] === "visible")
965
+ !(t.overflowY === t.overflowX && !Fn(e) && t[n] === "visible")
988
966
  );
989
- }, Wn = function(e) {
967
+ }, jn = function(e) {
990
968
  return pt(e, "overflowY");
991
- }, Un = function(e) {
969
+ }, Bn = function(e) {
992
970
  return pt(e, "overflowX");
993
971
  }, Xe = function(e, n) {
994
972
  var t = n;
@@ -1003,14 +981,14 @@ var V = Te ? {} : !1, Bn = function(e) {
1003
981
  t = t.parentNode;
1004
982
  } while (t && t !== document.body);
1005
983
  return !1;
1006
- }, zn = function(e) {
984
+ }, Un = function(e) {
1007
985
  var n = e.scrollTop, t = e.scrollHeight, o = e.clientHeight;
1008
986
  return [
1009
987
  n,
1010
988
  t,
1011
989
  o
1012
990
  ];
1013
- }, qn = function(e) {
991
+ }, Wn = function(e) {
1014
992
  var n = e.scrollLeft, t = e.scrollWidth, o = e.clientWidth;
1015
993
  return [
1016
994
  n,
@@ -1018,38 +996,38 @@ var V = Te ? {} : !1, Bn = function(e) {
1018
996
  o
1019
997
  ];
1020
998
  }, ft = function(e, n) {
1021
- return e === "v" ? Wn(n) : Un(n);
999
+ return e === "v" ? jn(n) : Bn(n);
1022
1000
  }, vt = function(e, n) {
1023
- return e === "v" ? zn(n) : qn(n);
1024
- }, Hn = function(e, n) {
1001
+ return e === "v" ? Un(n) : Wn(n);
1002
+ }, zn = function(e, n) {
1025
1003
  return e === "h" && n === "rtl" ? -1 : 1;
1026
- }, Kn = function(e, n, t, o, a) {
1027
- var r = Hn(e, window.getComputedStyle(n).direction), i = r * o, c = t.target, u = n.contains(c), d = !1, p = i > 0, l = 0, f = 0;
1004
+ }, qn = function(e, n, t, o, a) {
1005
+ var r = zn(e, window.getComputedStyle(n).direction), i = r * o, c = t.target, s = n.contains(c), d = !1, p = i > 0, l = 0, f = 0;
1028
1006
  do {
1029
- var v = vt(e, c), E = v[0], s = v[1], h = v[2], _ = s - h - r * E;
1030
- (E || _) && ft(e, c) && (l += _, f += E), c = c.parentNode;
1007
+ var v = vt(e, c), E = v[0], u = v[1], h = v[2], g = u - h - r * E;
1008
+ (E || g) && ft(e, c) && (l += g, f += E), c = c.parentNode;
1031
1009
  } while (
1032
1010
  // portaled content
1033
- !u && c !== document.body || // self content
1034
- u && (n.contains(c) || n === c)
1011
+ !s && c !== document.body || // self content
1012
+ s && (n.contains(c) || n === c)
1035
1013
  );
1036
1014
  return (p && (l === 0 || !a) || !p && (f === 0 || !a)) && (d = !0), d;
1037
- }, le = function(e) {
1015
+ }, se = function(e) {
1038
1016
  return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
1039
- }, Ye = function(e) {
1017
+ }, Ge = function(e) {
1040
1018
  return [e.deltaX, e.deltaY];
1041
- }, Ze = function(e) {
1019
+ }, Ye = function(e) {
1042
1020
  return e && "current" in e ? e.current : e;
1043
- }, Vn = function(e, n) {
1021
+ }, Hn = function(e, n) {
1044
1022
  return e[0] === n[0] && e[1] === n[1];
1045
- }, Gn = function(e) {
1023
+ }, Vn = function(e) {
1046
1024
  return `
1047
1025
  .block-interactivity-`.concat(e, ` {pointer-events: none;}
1048
1026
  .allow-interactivity-`).concat(e, ` {pointer-events: all;}
1049
1027
  `);
1050
- }, Xn = 0, G = [];
1051
- function Yn(e) {
1052
- var n = m.useRef([]), t = m.useRef([0, 0]), o = m.useRef(), a = m.useState(Xn++)[0], r = m.useState(function() {
1028
+ }, Kn = 0, X = [];
1029
+ function Xn(e) {
1030
+ var n = m.useRef([]), t = m.useRef([0, 0]), o = m.useRef(), a = m.useState(Kn++)[0], r = m.useState(function() {
1053
1031
  return dt();
1054
1032
  })[0], i = m.useRef(e);
1055
1033
  m.useEffect(function() {
@@ -1057,94 +1035,94 @@ function Yn(e) {
1057
1035
  }, [e]), m.useEffect(function() {
1058
1036
  if (e.inert) {
1059
1037
  document.body.classList.add("block-interactivity-".concat(a));
1060
- var s = gn([e.lockRef.current], (e.shards || []).map(Ze), !0).filter(Boolean);
1061
- return s.forEach(function(h) {
1038
+ var u = hn([e.lockRef.current], (e.shards || []).map(Ye), !0).filter(Boolean);
1039
+ return u.forEach(function(h) {
1062
1040
  return h.classList.add("allow-interactivity-".concat(a));
1063
1041
  }), function() {
1064
- document.body.classList.remove("block-interactivity-".concat(a)), s.forEach(function(h) {
1042
+ document.body.classList.remove("block-interactivity-".concat(a)), u.forEach(function(h) {
1065
1043
  return h.classList.remove("allow-interactivity-".concat(a));
1066
1044
  });
1067
1045
  };
1068
1046
  }
1069
1047
  }, [e.inert, e.lockRef.current, e.shards]);
1070
- var c = m.useCallback(function(s, h) {
1071
- if ("touches" in s && s.touches.length === 2)
1048
+ var c = m.useCallback(function(u, h) {
1049
+ if ("touches" in u && u.touches.length === 2)
1072
1050
  return !i.current.allowPinchZoom;
1073
- var _ = le(s), C = t.current, y = "deltaX" in s ? s.deltaX : C[0] - _[0], $ = "deltaY" in s ? s.deltaY : C[1] - _[1], x, z = s.target, D = Math.abs(y) > Math.abs($) ? "h" : "v";
1074
- if ("touches" in s && D === "h" && z.type === "range")
1051
+ var g = se(u), C = t.current, y = "deltaX" in u ? u.deltaX : C[0] - g[0], $ = "deltaY" in u ? u.deltaY : C[1] - g[1], x, z = u.target, D = Math.abs(y) > Math.abs($) ? "h" : "v";
1052
+ if ("touches" in u && D === "h" && z.type === "range")
1075
1053
  return !1;
1076
1054
  var w = Xe(D, z);
1077
1055
  if (!w)
1078
1056
  return !0;
1079
1057
  if (w ? x = D : (x = D === "v" ? "h" : "v", w = Xe(D, z)), !w)
1080
1058
  return !1;
1081
- if (!o.current && "changedTouches" in s && (y || $) && (o.current = x), !x)
1059
+ if (!o.current && "changedTouches" in u && (y || $) && (o.current = x), !x)
1082
1060
  return !0;
1083
1061
  var I = o.current || x;
1084
- return Kn(I, h, s, I === "h" ? y : $, !0);
1085
- }, []), u = m.useCallback(function(s) {
1086
- var h = s;
1087
- if (!(!G.length || G[G.length - 1] !== r)) {
1088
- var _ = "deltaY" in h ? Ye(h) : le(h), C = n.current.filter(function(x) {
1089
- return x.name === h.type && x.target === h.target && Vn(x.delta, _);
1062
+ return qn(I, h, u, I === "h" ? y : $, !0);
1063
+ }, []), s = m.useCallback(function(u) {
1064
+ var h = u;
1065
+ if (!(!X.length || X[X.length - 1] !== r)) {
1066
+ var g = "deltaY" in h ? Ge(h) : se(h), C = n.current.filter(function(x) {
1067
+ return x.name === h.type && x.target === h.target && Hn(x.delta, g);
1090
1068
  })[0];
1091
1069
  if (C && C.should) {
1092
1070
  h.cancelable && h.preventDefault();
1093
1071
  return;
1094
1072
  }
1095
1073
  if (!C) {
1096
- var y = (i.current.shards || []).map(Ze).filter(Boolean).filter(function(x) {
1074
+ var y = (i.current.shards || []).map(Ye).filter(Boolean).filter(function(x) {
1097
1075
  return x.contains(h.target);
1098
1076
  }), $ = y.length > 0 ? c(h, y[0]) : !i.current.noIsolation;
1099
1077
  $ && h.cancelable && h.preventDefault();
1100
1078
  }
1101
1079
  }
1102
- }, []), d = m.useCallback(function(s, h, _, C) {
1103
- var y = { name: s, delta: h, target: _, should: C };
1080
+ }, []), d = m.useCallback(function(u, h, g, C) {
1081
+ var y = { name: u, delta: h, target: g, should: C };
1104
1082
  n.current.push(y), setTimeout(function() {
1105
1083
  n.current = n.current.filter(function($) {
1106
1084
  return $ !== y;
1107
1085
  });
1108
1086
  }, 1);
1109
- }, []), p = m.useCallback(function(s) {
1110
- t.current = le(s), o.current = void 0;
1111
- }, []), l = m.useCallback(function(s) {
1112
- d(s.type, Ye(s), s.target, c(s, e.lockRef.current));
1113
- }, []), f = m.useCallback(function(s) {
1114
- d(s.type, le(s), s.target, c(s, e.lockRef.current));
1087
+ }, []), p = m.useCallback(function(u) {
1088
+ t.current = se(u), o.current = void 0;
1089
+ }, []), l = m.useCallback(function(u) {
1090
+ d(u.type, Ge(u), u.target, c(u, e.lockRef.current));
1091
+ }, []), f = m.useCallback(function(u) {
1092
+ d(u.type, se(u), u.target, c(u, e.lockRef.current));
1115
1093
  }, []);
1116
1094
  m.useEffect(function() {
1117
- return G.push(r), e.setCallbacks({
1095
+ return X.push(r), e.setCallbacks({
1118
1096
  onScrollCapture: l,
1119
1097
  onWheelCapture: l,
1120
1098
  onTouchMoveCapture: f
1121
- }), document.addEventListener("wheel", u, V), document.addEventListener("touchmove", u, V), document.addEventListener("touchstart", p, V), function() {
1122
- G = G.filter(function(s) {
1123
- return s !== r;
1124
- }), document.removeEventListener("wheel", u, V), document.removeEventListener("touchmove", u, V), document.removeEventListener("touchstart", p, V);
1099
+ }), document.addEventListener("wheel", s, K), document.addEventListener("touchmove", s, K), document.addEventListener("touchstart", p, K), function() {
1100
+ X = X.filter(function(u) {
1101
+ return u !== r;
1102
+ }), document.removeEventListener("wheel", s, K), document.removeEventListener("touchmove", s, K), document.removeEventListener("touchstart", p, K);
1125
1103
  };
1126
1104
  }, []);
1127
1105
  var v = e.removeScrollBar, E = e.inert;
1128
1106
  return m.createElement(
1129
1107
  m.Fragment,
1130
1108
  null,
1131
- E ? m.createElement(r, { styles: Gn(a) }) : null,
1132
- v ? m.createElement(jn, { gapMode: "margin" }) : null
1109
+ E ? m.createElement(r, { styles: Vn(a) }) : null,
1110
+ v ? m.createElement(kn, { gapMode: "margin" }) : null
1133
1111
  );
1134
1112
  }
1135
- const Zn = Cn(lt, Yn);
1113
+ const Gn = xn(lt, Xn);
1136
1114
  var ht = m.forwardRef(function(e, n) {
1137
- return m.createElement(be, k({}, e, { ref: n, sideCar: Zn }));
1115
+ return m.createElement(_e, k({}, e, { ref: n, sideCar: Gn }));
1138
1116
  });
1139
- ht.classNames = be.classNames;
1140
- var Qn = function(e) {
1117
+ ht.classNames = _e.classNames;
1118
+ var Yn = function(e) {
1141
1119
  if (typeof document > "u")
1142
1120
  return null;
1143
1121
  var n = Array.isArray(e) ? e[0] : e;
1144
1122
  return n.ownerDocument.body;
1145
- }, X = /* @__PURE__ */ new WeakMap(), de = /* @__PURE__ */ new WeakMap(), pe = {}, Oe = 0, mt = function(e) {
1123
+ }, G = /* @__PURE__ */ new WeakMap(), le = /* @__PURE__ */ new WeakMap(), de = {}, Ce = 0, mt = function(e) {
1146
1124
  return e && (e.host || mt(e.parentNode));
1147
- }, Jn = function(e, n) {
1125
+ }, Zn = function(e, n) {
1148
1126
  return n.map(function(t) {
1149
1127
  if (e.contains(t))
1150
1128
  return t;
@@ -1153,55 +1131,55 @@ var Qn = function(e) {
1153
1131
  }).filter(function(t) {
1154
1132
  return !!t;
1155
1133
  });
1156
- }, er = function(e, n, t, o) {
1157
- var a = Jn(n, Array.isArray(e) ? e : [e]);
1158
- pe[t] || (pe[t] = /* @__PURE__ */ new WeakMap());
1159
- var r = pe[t], i = [], c = /* @__PURE__ */ new Set(), u = new Set(a), d = function(l) {
1134
+ }, Qn = function(e, n, t, o) {
1135
+ var a = Zn(n, Array.isArray(e) ? e : [e]);
1136
+ de[t] || (de[t] = /* @__PURE__ */ new WeakMap());
1137
+ var r = de[t], i = [], c = /* @__PURE__ */ new Set(), s = new Set(a), d = function(l) {
1160
1138
  !l || c.has(l) || (c.add(l), d(l.parentNode));
1161
1139
  };
1162
1140
  a.forEach(d);
1163
1141
  var p = function(l) {
1164
- !l || u.has(l) || Array.prototype.forEach.call(l.children, function(f) {
1142
+ !l || s.has(l) || Array.prototype.forEach.call(l.children, function(f) {
1165
1143
  if (c.has(f))
1166
1144
  p(f);
1167
1145
  else
1168
1146
  try {
1169
- var v = f.getAttribute(o), E = v !== null && v !== "false", s = (X.get(f) || 0) + 1, h = (r.get(f) || 0) + 1;
1170
- X.set(f, s), r.set(f, h), i.push(f), s === 1 && E && de.set(f, !0), h === 1 && f.setAttribute(t, "true"), E || f.setAttribute(o, "true");
1171
- } catch (_) {
1172
- console.error("aria-hidden: cannot operate on ", f, _);
1147
+ var v = f.getAttribute(o), E = v !== null && v !== "false", u = (G.get(f) || 0) + 1, h = (r.get(f) || 0) + 1;
1148
+ G.set(f, u), r.set(f, h), i.push(f), u === 1 && E && le.set(f, !0), h === 1 && f.setAttribute(t, "true"), E || f.setAttribute(o, "true");
1149
+ } catch (g) {
1150
+ console.error("aria-hidden: cannot operate on ", f, g);
1173
1151
  }
1174
1152
  });
1175
1153
  };
1176
- return p(n), c.clear(), Oe++, function() {
1154
+ return p(n), c.clear(), Ce++, function() {
1177
1155
  i.forEach(function(l) {
1178
- var f = X.get(l) - 1, v = r.get(l) - 1;
1179
- X.set(l, f), r.set(l, v), f || (de.has(l) || l.removeAttribute(o), de.delete(l)), v || l.removeAttribute(t);
1180
- }), Oe--, Oe || (X = /* @__PURE__ */ new WeakMap(), X = /* @__PURE__ */ new WeakMap(), de = /* @__PURE__ */ new WeakMap(), pe = {});
1156
+ var f = G.get(l) - 1, v = r.get(l) - 1;
1157
+ G.set(l, f), r.set(l, v), f || (le.has(l) || l.removeAttribute(o), le.delete(l)), v || l.removeAttribute(t);
1158
+ }), Ce--, Ce || (G = /* @__PURE__ */ new WeakMap(), G = /* @__PURE__ */ new WeakMap(), le = /* @__PURE__ */ new WeakMap(), de = {});
1181
1159
  };
1182
- }, tr = function(e, n, t) {
1160
+ }, Jn = function(e, n, t) {
1183
1161
  t === void 0 && (t = "data-aria-hidden");
1184
- var o = Array.from(Array.isArray(e) ? e : [e]), a = Qn(e);
1185
- return a ? (o.push.apply(o, Array.from(a.querySelectorAll("[aria-live]"))), er(o, a, t, "aria-hidden")) : function() {
1162
+ var o = Array.from(Array.isArray(e) ? e : [e]), a = Yn(e);
1163
+ return a ? (o.push.apply(o, Array.from(a.querySelectorAll("[aria-live]"))), Qn(o, a, t, "aria-hidden")) : function() {
1186
1164
  return null;
1187
1165
  };
1188
1166
  };
1189
- const gt = "Dialog", [_t, So] = Wt(gt), [nr, R] = _t(gt), rr = (e) => {
1190
- const { __scopeDialog: n, children: t, open: o, defaultOpen: a, onOpenChange: r, modal: i = !0 } = e, c = N(null), u = N(null), [d = !1, p] = Ht({
1167
+ const gt = "Dialog", [_t, wo] = jt(gt), [er, M] = _t(gt), tr = (e) => {
1168
+ const { __scopeDialog: n, children: t, open: o, defaultOpen: a, onOpenChange: r, modal: i = !0 } = e, c = N(null), s = N(null), [d = !1, p] = zt({
1191
1169
  prop: o,
1192
1170
  defaultProp: a,
1193
1171
  onChange: r
1194
1172
  });
1195
- return /* @__PURE__ */ g(nr, {
1173
+ return /* @__PURE__ */ _(er, {
1196
1174
  scope: n,
1197
1175
  triggerRef: c,
1198
- contentRef: u,
1199
- contentId: $e(),
1200
- titleId: $e(),
1201
- descriptionId: $e(),
1176
+ contentRef: s,
1177
+ contentId: be(),
1178
+ titleId: be(),
1179
+ descriptionId: be(),
1202
1180
  open: d,
1203
1181
  onOpenChange: p,
1204
- onOpenToggle: J(
1182
+ onOpenToggle: Q(
1205
1183
  () => p(
1206
1184
  (l) => !l
1207
1185
  ),
@@ -1211,54 +1189,54 @@ const gt = "Dialog", [_t, So] = Wt(gt), [nr, R] = _t(gt), rr = (e) => {
1211
1189
  ),
1212
1190
  modal: i
1213
1191
  }, t);
1214
- }, or = "DialogTrigger", ar = /* @__PURE__ */ S((e, n) => {
1215
- const { __scopeDialog: t, ...o } = e, a = R(or, t), r = ee(n, a.triggerRef);
1216
- return /* @__PURE__ */ g(U.button, P({
1192
+ }, nr = "DialogTrigger", rr = /* @__PURE__ */ S((e, n) => {
1193
+ const { __scopeDialog: t, ...o } = e, a = M(nr, t), r = J(n, a.triggerRef);
1194
+ return /* @__PURE__ */ _(W.button, P({
1217
1195
  type: "button",
1218
1196
  "aria-haspopup": "dialog",
1219
1197
  "aria-expanded": a.open,
1220
1198
  "aria-controls": a.contentId,
1221
- "data-state": ke(a.open)
1199
+ "data-state": Me(a.open)
1222
1200
  }, o, {
1223
1201
  ref: r,
1224
1202
  onClick: B(e.onClick, a.onOpenToggle)
1225
1203
  }));
1226
- }), bt = "DialogPortal", [ir, $t] = _t(bt, {
1204
+ }), bt = "DialogPortal", [or, $t] = _t(bt, {
1227
1205
  forceMount: void 0
1228
- }), cr = (e) => {
1229
- const { __scopeDialog: n, forceMount: t, children: o, container: a } = e, r = R(bt, n);
1230
- return /* @__PURE__ */ g(ir, {
1206
+ }), ar = (e) => {
1207
+ const { __scopeDialog: n, forceMount: t, children: o, container: a } = e, r = M(bt, n);
1208
+ return /* @__PURE__ */ _(or, {
1231
1209
  scope: n,
1232
1210
  forceMount: t
1233
1211
  }, L.map(
1234
1212
  o,
1235
- (i) => /* @__PURE__ */ g(_e, {
1213
+ (i) => /* @__PURE__ */ _(ge, {
1236
1214
  present: t || r.open
1237
- }, /* @__PURE__ */ g(fn, {
1215
+ }, /* @__PURE__ */ _(dn, {
1238
1216
  asChild: !0,
1239
1217
  container: a
1240
1218
  }, i))
1241
1219
  ));
1242
- }, De = "DialogOverlay", ur = /* @__PURE__ */ S((e, n) => {
1243
- const t = $t(De, e.__scopeDialog), { forceMount: o = t.forceMount, ...a } = e, r = R(De, e.__scopeDialog);
1244
- return r.modal ? /* @__PURE__ */ g(_e, {
1220
+ }, De = "DialogOverlay", ir = /* @__PURE__ */ S((e, n) => {
1221
+ const t = $t(De, e.__scopeDialog), { forceMount: o = t.forceMount, ...a } = e, r = M(De, e.__scopeDialog);
1222
+ return r.modal ? /* @__PURE__ */ _(ge, {
1245
1223
  present: o || r.open
1246
- }, /* @__PURE__ */ g(sr, P({}, a, {
1224
+ }, /* @__PURE__ */ _(cr, P({}, a, {
1247
1225
  ref: n
1248
1226
  }))) : null;
1249
- }), sr = /* @__PURE__ */ S((e, n) => {
1250
- const { __scopeDialog: t, ...o } = e, a = R(De, t);
1227
+ }), cr = /* @__PURE__ */ S((e, n) => {
1228
+ const { __scopeDialog: t, ...o } = e, a = M(De, t);
1251
1229
  return (
1252
1230
  // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
1253
1231
  // ie. when `Overlay` and `Content` are siblings
1254
- /* @__PURE__ */ g(ht, {
1232
+ /* @__PURE__ */ _(ht, {
1255
1233
  as: Re,
1256
1234
  allowPinchZoom: !0,
1257
1235
  shards: [
1258
1236
  a.contentRef
1259
1237
  ]
1260
- }, /* @__PURE__ */ g(U.div, P({
1261
- "data-state": ke(a.open)
1238
+ }, /* @__PURE__ */ _(W.div, P({
1239
+ "data-state": Me(a.open)
1262
1240
  }, o, {
1263
1241
  ref: n,
1264
1242
  style: {
@@ -1267,21 +1245,21 @@ const gt = "Dialog", [_t, So] = Wt(gt), [nr, R] = _t(gt), rr = (e) => {
1267
1245
  }
1268
1246
  })))
1269
1247
  );
1270
- }), Z = "DialogContent", lr = /* @__PURE__ */ S((e, n) => {
1271
- const t = $t(Z, e.__scopeDialog), { forceMount: o = t.forceMount, ...a } = e, r = R(Z, e.__scopeDialog);
1272
- return /* @__PURE__ */ g(_e, {
1248
+ }), oe = "DialogContent", ur = /* @__PURE__ */ S((e, n) => {
1249
+ const t = $t(oe, e.__scopeDialog), { forceMount: o = t.forceMount, ...a } = e, r = M(oe, e.__scopeDialog);
1250
+ return /* @__PURE__ */ _(ge, {
1273
1251
  present: o || r.open
1274
- }, r.modal ? /* @__PURE__ */ g(dr, P({}, a, {
1252
+ }, r.modal ? /* @__PURE__ */ _(sr, P({}, a, {
1275
1253
  ref: n
1276
- })) : /* @__PURE__ */ g(pr, P({}, a, {
1254
+ })) : /* @__PURE__ */ _(lr, P({}, a, {
1277
1255
  ref: n
1278
1256
  })));
1279
- }), dr = /* @__PURE__ */ S((e, n) => {
1280
- const t = R(Z, e.__scopeDialog), o = N(null), a = ee(n, t.contentRef, o);
1257
+ }), sr = /* @__PURE__ */ S((e, n) => {
1258
+ const t = M(oe, e.__scopeDialog), o = N(null), a = J(n, t.contentRef, o);
1281
1259
  return A(() => {
1282
1260
  const r = o.current;
1283
- if (r) return tr(r);
1284
- }, []), /* @__PURE__ */ g(yt, P({}, e, {
1261
+ if (r) return Jn(r);
1262
+ }, []), /* @__PURE__ */ _(yt, P({}, e, {
1285
1263
  ref: a,
1286
1264
  trapFocus: t.open,
1287
1265
  disableOutsidePointerEvents: !0,
@@ -1298,9 +1276,9 @@ const gt = "Dialog", [_t, So] = Wt(gt), [nr, R] = _t(gt), rr = (e) => {
1298
1276
  (r) => r.preventDefault()
1299
1277
  )
1300
1278
  }));
1301
- }), pr = /* @__PURE__ */ S((e, n) => {
1302
- const t = R(Z, e.__scopeDialog), o = N(!1), a = N(!1);
1303
- return /* @__PURE__ */ g(yt, P({}, e, {
1279
+ }), lr = /* @__PURE__ */ S((e, n) => {
1280
+ const t = M(oe, e.__scopeDialog), o = N(!1), a = N(!1);
1281
+ return /* @__PURE__ */ _(yt, P({}, e, {
1304
1282
  ref: n,
1305
1283
  trapFocus: !1,
1306
1284
  disableOutsidePointerEvents: !1,
@@ -1315,45 +1293,45 @@ const gt = "Dialog", [_t, So] = Wt(gt), [nr, R] = _t(gt), rr = (e) => {
1315
1293
  onInteractOutside: (r) => {
1316
1294
  var i, c;
1317
1295
  (i = e.onInteractOutside) === null || i === void 0 || i.call(e, r), r.defaultPrevented || (o.current = !0, r.detail.originalEvent.type === "pointerdown" && (a.current = !0));
1318
- const u = r.target;
1319
- ((c = t.triggerRef.current) === null || c === void 0 ? void 0 : c.contains(u)) && r.preventDefault(), r.detail.originalEvent.type === "focusin" && a.current && r.preventDefault();
1296
+ const s = r.target;
1297
+ ((c = t.triggerRef.current) === null || c === void 0 ? void 0 : c.contains(s)) && r.preventDefault(), r.detail.originalEvent.type === "focusin" && a.current && r.preventDefault();
1320
1298
  }
1321
1299
  }));
1322
1300
  }), yt = /* @__PURE__ */ S((e, n) => {
1323
- const { __scopeDialog: t, trapFocus: o, onOpenAutoFocus: a, onCloseAutoFocus: r, ...i } = e, c = R(Z, t), u = N(null), d = ee(n, u);
1324
- return mn(), /* @__PURE__ */ g(Me, null, /* @__PURE__ */ g(an, {
1301
+ const { __scopeDialog: t, trapFocus: o, onOpenAutoFocus: a, onCloseAutoFocus: r, ...i } = e, c = M(oe, t), s = N(null), d = J(n, s);
1302
+ return vn(), /* @__PURE__ */ _(Le, null, /* @__PURE__ */ _(rn, {
1325
1303
  asChild: !0,
1326
1304
  loop: !0,
1327
1305
  trapped: o,
1328
1306
  onMountAutoFocus: a,
1329
1307
  onUnmountAutoFocus: r
1330
- }, /* @__PURE__ */ g(nn, P({
1308
+ }, /* @__PURE__ */ _(en, P({
1331
1309
  role: "dialog",
1332
1310
  id: c.contentId,
1333
1311
  "aria-describedby": c.descriptionId,
1334
1312
  "aria-labelledby": c.titleId,
1335
- "data-state": ke(c.open)
1313
+ "data-state": Me(c.open)
1336
1314
  }, i, {
1337
1315
  ref: d,
1338
1316
  onDismiss: () => c.onOpenChange(!1)
1339
1317
  }))), !1);
1340
- }), Et = "DialogTitle", fr = /* @__PURE__ */ S((e, n) => {
1341
- const { __scopeDialog: t, ...o } = e, a = R(Et, t);
1342
- return /* @__PURE__ */ g(U.h2, P({
1318
+ }), dr = "DialogTitle", pr = /* @__PURE__ */ S((e, n) => {
1319
+ const { __scopeDialog: t, ...o } = e, a = M(dr, t);
1320
+ return /* @__PURE__ */ _(W.h2, P({
1343
1321
  id: a.titleId
1344
1322
  }, o, {
1345
1323
  ref: n
1346
1324
  }));
1347
- }), vr = "DialogDescription", hr = /* @__PURE__ */ S((e, n) => {
1348
- const { __scopeDialog: t, ...o } = e, a = R(vr, t);
1349
- return /* @__PURE__ */ g(U.p, P({
1325
+ }), fr = "DialogDescription", vr = /* @__PURE__ */ S((e, n) => {
1326
+ const { __scopeDialog: t, ...o } = e, a = M(fr, t);
1327
+ return /* @__PURE__ */ _(W.p, P({
1350
1328
  id: a.descriptionId
1351
1329
  }, o, {
1352
1330
  ref: n
1353
1331
  }));
1354
- }), mr = "DialogClose", gr = /* @__PURE__ */ S((e, n) => {
1355
- const { __scopeDialog: t, ...o } = e, a = R(mr, t);
1356
- return /* @__PURE__ */ g(U.button, P({
1332
+ }), hr = "DialogClose", mr = /* @__PURE__ */ S((e, n) => {
1333
+ const { __scopeDialog: t, ...o } = e, a = M(hr, t);
1334
+ return /* @__PURE__ */ _(W.button, P({
1357
1335
  type: "button"
1358
1336
  }, o, {
1359
1337
  ref: n,
@@ -1363,22 +1341,18 @@ const gt = "Dialog", [_t, So] = Wt(gt), [nr, R] = _t(gt), rr = (e) => {
1363
1341
  )
1364
1342
  }));
1365
1343
  });
1366
- function ke(e) {
1344
+ function Me(e) {
1367
1345
  return e ? "open" : "closed";
1368
1346
  }
1369
- const _r = "DialogTitleWarning";
1370
- Bt(_r, {
1371
- contentName: Z,
1372
- titleName: Et,
1373
- docsSlug: "dialog"
1374
- });
1375
- const br = rr, $r = ar, yr = cr, Er = ur, wr = lr, xr = fr, Qe = hr, Sr = gr, Cr = {
1347
+ const gr = tr, _r = rr, br = ar, $r = ir, yr = ur, Er = pr, Ze = vr, wr = mr, xr = {
1348
+ SM: "sm",
1349
+ MD: "md",
1376
1350
  LG: "lg"
1377
1351
  };
1378
- function Or(e) {
1352
+ function Sr(e) {
1379
1353
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
1380
1354
  }
1381
- var wt = { exports: {} };
1355
+ var Et = { exports: {} };
1382
1356
  /*!
1383
1357
  Copyright (c) 2018 Jed Watson.
1384
1358
  Licensed under the MIT License (MIT), see
@@ -1413,40 +1387,44 @@ var wt = { exports: {} };
1413
1387
  }
1414
1388
  e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
1415
1389
  })();
1416
- })(wt);
1417
- var Nr = wt.exports;
1418
- const Je = /* @__PURE__ */ Or(Nr), Pr = "_rotate_1xozj_1", Ar = "_dash_1xozj_1", te = {
1390
+ })(Et);
1391
+ var Cr = Et.exports;
1392
+ const Qe = /* @__PURE__ */ Sr(Cr), Or = "_rotate_1xozj_1", Nr = "_dash_1xozj_1", ee = {
1419
1393
  "purpur-spinner": "_purpur-spinner_1xozj_1",
1420
- rotate: Pr,
1394
+ rotate: Or,
1421
1395
  "purpur-spinner--xxs": "_purpur-spinner--xxs_1xozj_4",
1422
1396
  "purpur-spinner--xs": "_purpur-spinner--xs_1xozj_8",
1423
1397
  "purpur-spinner--sm": "_purpur-spinner--sm_1xozj_12",
1424
1398
  "purpur-spinner--md": "_purpur-spinner--md_1xozj_16",
1425
1399
  "purpur-spinner--lg": "_purpur-spinner--lg_1xozj_20",
1426
1400
  "purpur-spinner__circle": "_purpur-spinner__circle_1xozj_24",
1427
- dash: Ar,
1401
+ dash: Nr,
1428
1402
  "purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_1xozj_33",
1429
1403
  "purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_1xozj_36"
1430
- }, ne = "purpur-spinner", Tr = {
1431
- SM: "sm"
1432
- }, Dr = ({
1404
+ }, te = "purpur-spinner", Pr = {
1405
+ XXS: "xxs",
1406
+ XS: "xs",
1407
+ SM: "sm",
1408
+ MD: "md",
1409
+ LG: "lg"
1410
+ }, Ar = ({
1433
1411
  ["data-testid"]: e,
1434
1412
  disabled: n = !1,
1435
1413
  negative: t = !1,
1436
- size: o = Tr.SM,
1414
+ size: o = Pr.SM,
1437
1415
  ...a
1438
1416
  }) => /* @__PURE__ */ b(
1439
1417
  "div",
1440
1418
  {
1441
- className: Je([te[ne], te[`${ne}--${o}`]]),
1419
+ className: Qe([ee[te], ee[`${te}--${o}`]]),
1442
1420
  "data-testid": e,
1443
1421
  ...a,
1444
1422
  children: /* @__PURE__ */ b("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ b(
1445
1423
  "circle",
1446
1424
  {
1447
- className: Je(te[`${ne}__circle`], {
1448
- [te[`${ne}__circle--disabled`]]: n,
1449
- [te[`${ne}__circle--negative`]]: t
1425
+ className: Qe(ee[`${te}__circle`], {
1426
+ [ee[`${te}__circle--disabled`]]: n,
1427
+ [ee[`${te}__circle--negative`]]: t
1450
1428
  }),
1451
1429
  cx: "25",
1452
1430
  cy: "25",
@@ -1455,10 +1433,10 @@ const Je = /* @__PURE__ */ Or(Nr), Pr = "_rotate_1xozj_1", Ar = "_dash_1xozj_1",
1455
1433
  ) })
1456
1434
  }
1457
1435
  );
1458
- function Ir(e) {
1436
+ function Tr(e) {
1459
1437
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
1460
1438
  }
1461
- var xt = { exports: {} };
1439
+ var wt = { exports: {} };
1462
1440
  /*!
1463
1441
  Copyright (c) 2018 Jed Watson.
1464
1442
  Licensed under the MIT License (MIT), see
@@ -1493,9 +1471,9 @@ var xt = { exports: {} };
1493
1471
  }
1494
1472
  e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
1495
1473
  })();
1496
- })(xt);
1497
- var Lr = xt.exports;
1498
- const Mr = /* @__PURE__ */ Ir(Lr), Rr = {
1474
+ })(wt);
1475
+ var Dr = wt.exports;
1476
+ const Ir = /* @__PURE__ */ Tr(Dr), Lr = {
1499
1477
  "purpur-button": "_purpur-button_1acxn_1",
1500
1478
  "purpur-button--sm": "_purpur-button--sm_1acxn_33",
1501
1479
  "purpur-button--icon-only": "_purpur-button--icon-only_1acxn_36",
@@ -1516,7 +1494,7 @@ const Mr = /* @__PURE__ */ Ir(Lr), Rr = {
1516
1494
  "purpur-button--tertiary-purple-negative": "_purpur-button--tertiary-purple-negative_1acxn_160",
1517
1495
  "purpur-button--text-negative": "_purpur-button--text-negative_1acxn_175",
1518
1496
  "purpur-button--text": "_purpur-button--text_1acxn_175"
1519
- }, kr = Mr.bind(Rr), q = "purpur-button", Fr = ({
1497
+ }, Rr = Ir.bind(Lr), q = "purpur-button", Mr = ({
1520
1498
  children: e,
1521
1499
  className: n,
1522
1500
  ["data-testid"]: t,
@@ -1525,7 +1503,7 @@ const Mr = /* @__PURE__ */ Ir(Lr), Rr = {
1525
1503
  iconOnly: r,
1526
1504
  loading: i = !1,
1527
1505
  negative: c = !1,
1528
- onClick: u,
1506
+ onClick: s,
1529
1507
  size: d = "md",
1530
1508
  variant: p,
1531
1509
  type: l = "button",
@@ -1533,7 +1511,7 @@ const Mr = /* @__PURE__ */ Ir(Lr), Rr = {
1533
1511
  }, v) => {
1534
1512
  if (r && p === "destructive")
1535
1513
  return null;
1536
- const E = kr(
1514
+ const E = Rr(
1537
1515
  [
1538
1516
  q,
1539
1517
  `${q}--${c ? `${p}-negative` : p}`,
@@ -1546,8 +1524,8 @@ const Mr = /* @__PURE__ */ Ir(Lr), Rr = {
1546
1524
  [`${q}--disabled`]: o || i
1547
1525
  },
1548
1526
  n
1549
- ), s = (_) => {
1550
- o || i ? _.preventDefault() : u && u(_);
1527
+ ), u = (g) => {
1528
+ o || i ? g.preventDefault() : s && s(g);
1551
1529
  }, h = !!f["aria-disabled"] || o || i;
1552
1530
  return /* @__PURE__ */ F(
1553
1531
  "button",
@@ -1557,21 +1535,21 @@ const Mr = /* @__PURE__ */ Ir(Lr), Rr = {
1557
1535
  type: l,
1558
1536
  ref: v,
1559
1537
  "aria-disabled": h,
1560
- onClick: s,
1538
+ onClick: u,
1561
1539
  ...f,
1562
1540
  children: [
1563
- i && /* @__PURE__ */ b(Dr, { size: d === Cr.LG ? "xs" : "xxs", negative: c, disabled: h }),
1541
+ i && /* @__PURE__ */ b(Ar, { size: d === xr.LG ? "xs" : "xxs", negative: c, disabled: h }),
1564
1542
  " ",
1565
1543
  e
1566
1544
  ]
1567
1545
  }
1568
1546
  );
1569
- }, Fe = S(Fr);
1570
- Fe.displayName = "Button";
1571
- function jr(e) {
1547
+ }, ke = S(Mr);
1548
+ ke.displayName = "Button";
1549
+ function kr(e) {
1572
1550
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
1573
1551
  }
1574
- var St = { exports: {} };
1552
+ var xt = { exports: {} };
1575
1553
  /*!
1576
1554
  Copyright (c) 2018 Jed Watson.
1577
1555
  Licensed under the MIT License (MIT), see
@@ -1606,9 +1584,9 @@ var St = { exports: {} };
1606
1584
  }
1607
1585
  e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
1608
1586
  })();
1609
- })(St);
1610
- var Br = St.exports;
1611
- const Wr = /* @__PURE__ */ jr(Br), fe = {
1587
+ })(xt);
1588
+ var Fr = xt.exports;
1589
+ const jr = /* @__PURE__ */ kr(Fr), pe = {
1612
1590
  "purpur-heading": "_purpur-heading_k9fhq_1",
1613
1591
  "purpur-heading--hyphens": "_purpur-heading--hyphens_k9fhq_8",
1614
1592
  "purpur-heading--negative": "_purpur-heading--negative_k9fhq_11",
@@ -1624,34 +1602,41 @@ const Wr = /* @__PURE__ */ jr(Br), fe = {
1624
1602
  "purpur-heading--display-50": "_purpur-heading--display-50_k9fhq_68",
1625
1603
  "purpur-heading--display-100": "_purpur-heading--display-100_k9fhq_74",
1626
1604
  "purpur-heading--display-200": "_purpur-heading--display-200_k9fhq_80"
1627
- }, Ur = {
1628
- TITLE100: "title-100"
1629
- }, ve = "purpur-heading", Ct = ({
1605
+ }, Br = {
1606
+ TITLE100: "title-100",
1607
+ TITLE200: "title-200",
1608
+ TITLE300: "title-300",
1609
+ TITLE400: "title-400",
1610
+ TITLE500: "title-500",
1611
+ TITLE600: "title-600",
1612
+ TITLE700: "title-700",
1613
+ SUBSECTION100: "subsection-100"
1614
+ }, fe = "purpur-heading", St = ({
1630
1615
  ["data-testid"]: e,
1631
1616
  children: n,
1632
1617
  className: t = "",
1633
1618
  enableHyphenation: o = !1,
1634
1619
  negative: a = !1,
1635
1620
  tag: r,
1636
- variant: i = Ur.TITLE100,
1621
+ variant: i = Br.TITLE100,
1637
1622
  ...c
1638
1623
  }) => {
1639
- const u = r, d = Wr([
1624
+ const s = r, d = jr([
1640
1625
  t,
1641
- fe[ve],
1642
- fe[`${ve}--${i}`],
1626
+ pe[fe],
1627
+ pe[`${fe}--${i}`],
1643
1628
  {
1644
- [fe[`${ve}--hyphens`]]: o,
1645
- [fe[`${ve}--negative`]]: a
1629
+ [pe[`${fe}--hyphens`]]: o,
1630
+ [pe[`${fe}--negative`]]: a
1646
1631
  }
1647
1632
  ]);
1648
- return /* @__PURE__ */ b(u, { ...c, className: d, "data-testid": e, children: n });
1633
+ return /* @__PURE__ */ b(s, { ...c, className: d, "data-testid": e, children: n });
1649
1634
  };
1650
- Ct.displayName = "Heading";
1651
- function zr(e) {
1635
+ St.displayName = "Heading";
1636
+ function Ur(e) {
1652
1637
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
1653
1638
  }
1654
- var Ot = { exports: {} };
1639
+ var Ct = { exports: {} };
1655
1640
  /*!
1656
1641
  Copyright (c) 2018 Jed Watson.
1657
1642
  Licensed under the MIT License (MIT), see
@@ -1686,9 +1671,9 @@ var Ot = { exports: {} };
1686
1671
  }
1687
1672
  e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
1688
1673
  })();
1689
- })(Ot);
1690
- var qr = Ot.exports;
1691
- const Hr = /* @__PURE__ */ zr(qr), Kr = {
1674
+ })(Ct);
1675
+ var Wr = Ct.exports;
1676
+ const zr = /* @__PURE__ */ Ur(Wr), qr = {
1692
1677
  "purpur-icon": "_purpur-icon_8u1lq_1",
1693
1678
  "purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
1694
1679
  "purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
@@ -1696,39 +1681,39 @@ const Hr = /* @__PURE__ */ zr(qr), Kr = {
1696
1681
  "purpur-icon--md": "_purpur-icon--md_8u1lq_16",
1697
1682
  "purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
1698
1683
  "purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
1699
- }, Vr = {
1684
+ }, Hr = {
1700
1685
  name: "close",
1701
1686
  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>',
1702
1687
  keywords: ["close"],
1703
1688
  category: "utility"
1704
- }, Nt = (e) => /* @__PURE__ */ b(
1705
- Pt,
1689
+ }, Ot = (e) => /* @__PURE__ */ b(
1690
+ Nt,
1706
1691
  {
1707
1692
  ...e,
1708
- svg: Vr
1693
+ svg: Hr
1709
1694
  }
1710
1695
  );
1711
- Nt.displayName = "IconClose";
1712
- const Gr = Hr.bind(Kr), et = "purpur-icon", Xr = "md", Yr = (e) => e.filter((n) => Object.keys(n).length >= 1).map((n) => `${n.name}="${n.value}"`).join(" "), Zr = ({ content: e = "", title: n } = {}) => {
1696
+ Ot.displayName = "IconClose";
1697
+ const Vr = zr.bind(qr), Je = "purpur-icon", Kr = "md", Xr = (e) => e.filter((n) => Object.keys(n).length >= 1).map((n) => `${n.name}="${n.value}"`).join(" "), Gr = ({ content: e = "", title: n } = {}) => {
1713
1698
  const t = [
1714
1699
  { name: "xmlns", value: "http://www.w3.org/2000/svg" },
1715
1700
  { name: "fill", value: "currentColor" },
1716
1701
  { name: "viewBox", value: "0 0 24 24" },
1717
1702
  n ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
1718
1703
  ], o = n ? `<title>${n}</title>` : "";
1719
- return `<svg ${Yr(t)}>${o}${e}</svg>`;
1720
- }, Qr = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), Pt = ({
1704
+ return `<svg ${Xr(t)}>${o}${e}</svg>`;
1705
+ }, Yr = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), Nt = ({
1721
1706
  ["data-testid"]: e,
1722
1707
  svg: n,
1723
1708
  allyTitle: t,
1724
1709
  className: o,
1725
- size: a = Xr,
1710
+ size: a = Kr,
1726
1711
  ...r
1727
1712
  }) => {
1728
- const i = Zr({
1729
- content: Qr(n.svg),
1713
+ const i = Gr({
1714
+ content: Yr(n.svg),
1730
1715
  title: t
1731
- }), c = Gr(o, et, `${et}--${a}`);
1716
+ }), c = Vr(o, Je, `${Je}--${a}`);
1732
1717
  return /* @__PURE__ */ b(
1733
1718
  "span",
1734
1719
  {
@@ -1740,11 +1725,11 @@ const Gr = Hr.bind(Kr), et = "purpur-icon", Xr = "md", Yr = (e) => e.filter((n)
1740
1725
  }
1741
1726
  );
1742
1727
  };
1743
- Pt.displayName = "Icon";
1744
- function Jr(e) {
1728
+ Nt.displayName = "Icon";
1729
+ function Zr(e) {
1745
1730
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
1746
1731
  }
1747
- var At = { exports: {} };
1732
+ var Pt = { exports: {} };
1748
1733
  /*!
1749
1734
  Copyright (c) 2018 Jed Watson.
1750
1735
  Licensed under the MIT License (MIT), see
@@ -1779,9 +1764,9 @@ var At = { exports: {} };
1779
1764
  }
1780
1765
  e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
1781
1766
  })();
1782
- })(At);
1783
- var eo = At.exports;
1784
- const to = /* @__PURE__ */ Jr(eo), re = {
1767
+ })(Pt);
1768
+ var Qr = Pt.exports;
1769
+ const Jr = /* @__PURE__ */ Zr(Qr), ne = {
1785
1770
  "purpur-paragraph": "_purpur-paragraph_1rh57_1",
1786
1771
  "purpur-paragraph--disabled": "_purpur-paragraph--disabled_1rh57_7",
1787
1772
  "purpur-paragraph--hyphens": "_purpur-paragraph--hyphens_1rh57_10",
@@ -1796,74 +1781,83 @@ const to = /* @__PURE__ */ Jr(eo), re = {
1796
1781
  "purpur-paragraph--additional-100-medium": "_purpur-paragraph--additional-100-medium_1rh57_60",
1797
1782
  "purpur-paragraph--overline-100": "_purpur-paragraph--overline-100_1rh57_67",
1798
1783
  "purpur-paragraph--overline-200": "_purpur-paragraph--overline-200_1rh57_75"
1799
- }, no = {
1800
- PARAGRAPH100: "paragraph-100"
1801
- }, oe = "purpur-paragraph", Tt = ({
1784
+ }, eo = {
1785
+ PARAGRAPH100: "paragraph-100",
1786
+ PARAGRAPH100MEDIUM: "paragraph-100-medium",
1787
+ PARAGRAPH100BOLD: "paragraph-100-bold",
1788
+ PARAGRAPH200: "paragraph-200",
1789
+ PREAMBLE100: "preamble-100",
1790
+ PREAMBLE200: "preamble-200",
1791
+ ADDITIONAL100: "additional-100",
1792
+ ADDITIONAL100MEDIUM: "additional-100-medium",
1793
+ OVERLINE100: "overline-100",
1794
+ OVERLINE200: "overline-200"
1795
+ }, re = "purpur-paragraph", At = ({
1802
1796
  ["data-testid"]: e,
1803
1797
  children: n,
1804
1798
  className: t,
1805
1799
  disabled: o,
1806
1800
  enableHyphenation: a = !1,
1807
1801
  negative: r = !1,
1808
- variant: i = no.PARAGRAPH100,
1802
+ variant: i = eo.PARAGRAPH100,
1809
1803
  ...c
1810
1804
  }) => {
1811
- const u = to([
1805
+ const s = Jr([
1812
1806
  t,
1813
- re[oe],
1814
- re[`${oe}--${i}`],
1807
+ ne[re],
1808
+ ne[`${re}--${i}`],
1815
1809
  {
1816
- [re[`${oe}--hyphens`]]: a,
1817
- [re[`${oe}--disabled`]]: o,
1818
- [re[`${oe}--negative`]]: r
1810
+ [ne[`${re}--hyphens`]]: a,
1811
+ [ne[`${re}--disabled`]]: o,
1812
+ [ne[`${re}--negative`]]: r
1819
1813
  }
1820
1814
  ]);
1821
- return /* @__PURE__ */ b("p", { ...c, className: u, "data-testid": e, children: n });
1815
+ return /* @__PURE__ */ b("p", { ...c, className: s, "data-testid": e, children: n });
1822
1816
  };
1823
- Tt.displayName = "Paragraph";
1824
- function Q() {
1825
- return Q = Object.assign ? Object.assign.bind() : function(e) {
1817
+ At.displayName = "Paragraph";
1818
+ function Z() {
1819
+ return Z = Object.assign ? Object.assign.bind() : function(e) {
1826
1820
  for (var n = 1; n < arguments.length; n++) {
1827
1821
  var t = arguments[n];
1828
1822
  for (var o in t) ({}).hasOwnProperty.call(t, o) && (e[o] = t[o]);
1829
1823
  }
1830
1824
  return e;
1831
- }, Q.apply(null, arguments);
1825
+ }, Z.apply(null, arguments);
1832
1826
  }
1833
- function ro(e, n) {
1827
+ function to(e, n) {
1834
1828
  typeof e == "function" ? e(n) : e != null && (e.current = n);
1835
1829
  }
1836
- function oo(...e) {
1830
+ function no(...e) {
1837
1831
  return (n) => e.forEach(
1838
- (t) => ro(t, n)
1832
+ (t) => to(t, n)
1839
1833
  );
1840
1834
  }
1841
- const Dt = /* @__PURE__ */ S((e, n) => {
1842
- const { children: t, ...o } = e, a = L.toArray(t), r = a.find(io);
1835
+ const Tt = /* @__PURE__ */ S((e, n) => {
1836
+ const { children: t, ...o } = e, a = L.toArray(t), r = a.find(oo);
1843
1837
  if (r) {
1844
- const i = r.props.children, c = a.map((u) => u === r ? L.count(i) > 1 ? L.only(null) : /* @__PURE__ */ W(i) ? i.props.children : null : u);
1845
- return /* @__PURE__ */ g(Ie, Q({}, o, {
1838
+ 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);
1839
+ return /* @__PURE__ */ _(Ie, Z({}, o, {
1846
1840
  ref: n
1847
- }), /* @__PURE__ */ W(i) ? /* @__PURE__ */ ie(i, void 0, c) : null);
1841
+ }), /* @__PURE__ */ U(i) ? /* @__PURE__ */ ae(i, void 0, c) : null);
1848
1842
  }
1849
- return /* @__PURE__ */ g(Ie, Q({}, o, {
1843
+ return /* @__PURE__ */ _(Ie, Z({}, o, {
1850
1844
  ref: n
1851
1845
  }), t);
1852
1846
  });
1853
- Dt.displayName = "Slot";
1847
+ Tt.displayName = "Slot";
1854
1848
  const Ie = /* @__PURE__ */ S((e, n) => {
1855
1849
  const { children: t, ...o } = e;
1856
- return /* @__PURE__ */ W(t) ? /* @__PURE__ */ ie(t, {
1857
- ...co(o, t.props),
1858
- ref: n ? oo(n, t.ref) : t.ref
1850
+ return /* @__PURE__ */ U(t) ? /* @__PURE__ */ ae(t, {
1851
+ ...ao(o, t.props),
1852
+ ref: n ? no(n, t.ref) : t.ref
1859
1853
  }) : L.count(t) > 1 ? L.only(null) : null;
1860
1854
  });
1861
1855
  Ie.displayName = "SlotClone";
1862
- const ao = ({ children: e }) => /* @__PURE__ */ g(Me, null, e);
1863
- function io(e) {
1864
- return /* @__PURE__ */ W(e) && e.type === ao;
1856
+ const ro = ({ children: e }) => /* @__PURE__ */ _(Le, null, e);
1857
+ function oo(e) {
1858
+ return /* @__PURE__ */ U(e) && e.type === ro;
1865
1859
  }
1866
- function co(e, n) {
1860
+ function ao(e, n) {
1867
1861
  const t = {
1868
1862
  ...n
1869
1863
  };
@@ -1884,7 +1878,7 @@ function co(e, n) {
1884
1878
  ...t
1885
1879
  };
1886
1880
  }
1887
- const uo = [
1881
+ const io = [
1888
1882
  "a",
1889
1883
  "button",
1890
1884
  "div",
@@ -1901,12 +1895,12 @@ const uo = [
1901
1895
  "span",
1902
1896
  "svg",
1903
1897
  "ul"
1904
- ], so = uo.reduce((e, n) => {
1898
+ ], co = io.reduce((e, n) => {
1905
1899
  const t = /* @__PURE__ */ S((o, a) => {
1906
- const { asChild: r, ...i } = o, c = r ? Dt : n;
1900
+ const { asChild: r, ...i } = o, c = r ? Tt : n;
1907
1901
  return A(() => {
1908
1902
  window[Symbol.for("radix-ui")] = !0;
1909
- }, []), /* @__PURE__ */ g(c, Q({}, i, {
1903
+ }, []), /* @__PURE__ */ _(c, Z({}, i, {
1910
1904
  ref: a
1911
1905
  }));
1912
1906
  });
@@ -1914,7 +1908,7 @@ const uo = [
1914
1908
  ...e,
1915
1909
  [n]: t
1916
1910
  };
1917
- }, {}), lo = /* @__PURE__ */ S((e, n) => /* @__PURE__ */ g(so.span, Q({}, e, {
1911
+ }, {}), uo = /* @__PURE__ */ S((e, n) => /* @__PURE__ */ _(co.span, Z({}, e, {
1918
1912
  ref: n,
1919
1913
  style: {
1920
1914
  // See: https://github.com/twbs/bootstrap/blob/master/scss/mixins/_screen-reader.scss
@@ -1930,16 +1924,16 @@ const uo = [
1930
1924
  wordWrap: "normal",
1931
1925
  ...e.style
1932
1926
  }
1933
- }))), po = lo, fo = ({
1927
+ }))), so = uo, lo = ({
1934
1928
  asChild: e,
1935
1929
  children: n,
1936
1930
  className: t = "",
1937
1931
  ["data-testid"]: o
1938
- }) => /* @__PURE__ */ b(po, { asChild: e, "data-testid": o, className: t, children: n });
1939
- function vo(e) {
1932
+ }) => /* @__PURE__ */ b(so, { asChild: e, "data-testid": o, className: t, children: n });
1933
+ function po(e) {
1940
1934
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
1941
1935
  }
1942
- var It = { exports: {} };
1936
+ var Dt = { exports: {} };
1943
1937
  /*!
1944
1938
  Copyright (c) 2018 Jed Watson.
1945
1939
  Licensed under the MIT License (MIT), see
@@ -1974,11 +1968,11 @@ var It = { exports: {} };
1974
1968
  }
1975
1969
  e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
1976
1970
  })();
1977
- })(It);
1978
- var ho = It.exports;
1979
- const mo = /* @__PURE__ */ vo(ho), go = "_fadeIn_1ifm3_1", _o = {
1971
+ })(Dt);
1972
+ var fo = Dt.exports;
1973
+ const vo = /* @__PURE__ */ po(fo), ho = "_fadeIn_1ifm3_1", mo = {
1980
1974
  "purpur-modal-content": "_purpur-modal-content_1ifm3_1",
1981
- fadeIn: go,
1975
+ fadeIn: ho,
1982
1976
  "purpur-modal-content__overlay": "_purpur-modal-content__overlay_1ifm3_30",
1983
1977
  "purpur-modal-content__close-button": "_purpur-modal-content__close-button_1ifm3_37",
1984
1978
  "purpur-modal-content__wrapper": "_purpur-modal-content__wrapper_1ifm3_48",
@@ -1997,7 +1991,7 @@ const mo = /* @__PURE__ */ vo(ho), go = "_fadeIn_1ifm3_1", _o = {
1997
1991
  "purpur-modal-content__actions": "_purpur-modal-content__actions_1ifm3_124",
1998
1992
  "purpur-modal-content__actions-separator": "_purpur-modal-content__actions-separator_1ifm3_181",
1999
1993
  "purpur-modal-content--sticky-footer": "_purpur-modal-content--sticky-footer_1ifm3_191"
2000
- }, tt = (e) => e.showCloseButton === !0, T = mo.bind(_o), O = "purpur-modal-content", bo = S(
1994
+ }, et = (e) => e.showCloseButton === !0, T = vo.bind(mo), O = "purpur-modal-content", go = S(
2001
1995
  ({
2002
1996
  ["data-testid"]: e,
2003
1997
  actions: n,
@@ -2007,73 +2001,73 @@ const mo = /* @__PURE__ */ vo(ho), go = "_fadeIn_1ifm3_1", _o = {
2007
2001
  disableCloseOnClickOutside: r,
2008
2002
  hideDescription: i,
2009
2003
  image: c,
2010
- primaryActionVariant: u = "primary",
2004
+ primaryActionVariant: s = "primary",
2011
2005
  stickyButtons: d = !0,
2012
2006
  title: p,
2013
2007
  notification: l = void 0,
2014
2008
  zIndex: f,
2015
2009
  ...v
2016
2010
  }, E) => {
2017
- const { closeButtonAllyLabel: s, showCloseButton: h, ..._ } = v, [C, y] = H(!1), $ = N(null), x = N(null), z = T([
2011
+ const { closeButtonAllyLabel: u, showCloseButton: h, ...g } = v, [C, y] = H(!1), $ = N(null), x = N(null), z = T([
2018
2012
  O,
2019
2013
  { [`${O}--with-image`]: !!c },
2020
2014
  { [`${O}--overflow`]: C },
2021
2015
  { [`${O}--sticky-footer`]: d },
2022
2016
  o
2023
- ]), D = (M) => e ? `${e} ${M}` : void 0, w = (M) => {
2024
- r && M.preventDefault();
2025
- }, I = J(() => {
2017
+ ]), D = (R) => e ? `${e} ${R}` : void 0, w = (R) => {
2018
+ r && R.preventDefault();
2019
+ }, I = Q(() => {
2026
2020
  if (!$.current || !x.current)
2027
2021
  return;
2028
- const M = window.getComputedStyle($.current, null), Lt = parseFloat(M.getPropertyValue("height")), Mt = x.current.offsetHeight;
2029
- y(Lt < Mt);
2030
- }, []), ce = (M) => {
2031
- r && !h && M.preventDefault();
2022
+ const R = window.getComputedStyle($.current, null), It = parseFloat(R.getPropertyValue("height")), Lt = x.current.offsetHeight;
2023
+ y(It < Lt);
2024
+ }, []), ie = (R) => {
2025
+ r && !h && R.preventDefault();
2032
2026
  };
2033
2027
  return A(() => (window.addEventListener("resize", I), () => {
2034
2028
  window.removeEventListener("resize", I);
2035
2029
  }), [I]), A(() => {
2036
2030
  I();
2037
- }, [l, t, I]), /* @__PURE__ */ F(yr, { children: [
2038
- /* @__PURE__ */ b(Er, { className: T(`${O}__overlay`), style: { zIndex: f } }),
2031
+ }, [l, t, I]), /* @__PURE__ */ F(br, { children: [
2032
+ /* @__PURE__ */ b($r, { className: T(`${O}__overlay`), style: { zIndex: f } }),
2039
2033
  /* @__PURE__ */ F(
2040
- wr,
2034
+ yr,
2041
2035
  {
2042
- ..._,
2036
+ ...g,
2043
2037
  className: z,
2044
2038
  "data-testid": e,
2045
2039
  ref: E,
2046
2040
  ...!a && { "aria-describedby": void 0 },
2047
2041
  onPointerDownOutside: w,
2048
2042
  onOpenAutoFocus: I,
2049
- onEscapeKeyDown: ce,
2043
+ onEscapeKeyDown: ie,
2050
2044
  style: { zIndex: `calc(${f} + 1)` },
2051
2045
  children: [
2052
2046
  /* @__PURE__ */ F("div", { ref: $, className: T(`${O}__wrapper`), children: [
2053
- tt(v) && s && c && /* @__PURE__ */ b(
2054
- nt,
2047
+ et(v) && u && c && /* @__PURE__ */ b(
2048
+ tt,
2055
2049
  {
2056
- allyLabel: s,
2050
+ allyLabel: u,
2057
2051
  hasImage: !0,
2058
2052
  "data-testid": D("close-button")
2059
2053
  }
2060
2054
  ),
2061
2055
  /* @__PURE__ */ F("div", { ref: x, className: T(`${O}__wrapper-inner`), children: [
2062
2056
  /* @__PURE__ */ F("div", { className: T(`${O}__header`), children: [
2063
- tt(v) && s && !c && /* @__PURE__ */ b(
2064
- nt,
2057
+ et(v) && u && !c && /* @__PURE__ */ b(
2058
+ tt,
2065
2059
  {
2066
- allyLabel: s,
2060
+ allyLabel: u,
2067
2061
  "data-testid": D("close-button")
2068
2062
  }
2069
2063
  ),
2070
2064
  /* @__PURE__ */ b(
2071
- xr,
2065
+ Er,
2072
2066
  {
2073
2067
  asChild: !0,
2074
2068
  className: T(`${O}__title`),
2075
2069
  "data-testid": D("title"),
2076
- children: /* @__PURE__ */ b(Ct, { tag: "h2", variant: "title-200", children: p })
2070
+ children: /* @__PURE__ */ b(St, { tag: "h2", variant: "title-200", children: p })
2077
2071
  }
2078
2072
  )
2079
2073
  ] }),
@@ -2086,22 +2080,22 @@ const mo = /* @__PURE__ */ vo(ho), go = "_fadeIn_1ifm3_1", _o = {
2086
2080
  }
2087
2081
  ),
2088
2082
  /* @__PURE__ */ b("div", { className: T(`${O}__body`), children: /* @__PURE__ */ F("div", { className: T(`${O}__body-inner`), children: [
2089
- a && i && /* @__PURE__ */ b(fo, { asChild: !0, children: /* @__PURE__ */ b(Qe, { "data-testid": D("description"), children: a }) }),
2083
+ a && i && /* @__PURE__ */ b(lo, { asChild: !0, children: /* @__PURE__ */ b(Ze, { "data-testid": D("description"), children: a }) }),
2090
2084
  a && !i && /* @__PURE__ */ b(
2091
- Qe,
2085
+ Ze,
2092
2086
  {
2093
2087
  asChild: !0,
2094
2088
  className: T(`${O}__description`),
2095
2089
  "data-testid": D("description"),
2096
- children: /* @__PURE__ */ b(Tt, { variant: "paragraph-100", children: a })
2090
+ children: /* @__PURE__ */ b(At, { variant: "paragraph-100", children: a })
2097
2091
  }
2098
2092
  ),
2099
2093
  /* @__PURE__ */ b("div", { children: t }),
2100
2094
  !d && /* @__PURE__ */ b(
2101
- rt,
2095
+ nt,
2102
2096
  {
2103
2097
  actions: n,
2104
- primaryActionVariant: u,
2098
+ primaryActionVariant: s,
2105
2099
  notification: l
2106
2100
  }
2107
2101
  )
@@ -2109,10 +2103,10 @@ const mo = /* @__PURE__ */ vo(ho), go = "_fadeIn_1ifm3_1", _o = {
2109
2103
  ] })
2110
2104
  ] }),
2111
2105
  d && /* @__PURE__ */ b(
2112
- rt,
2106
+ nt,
2113
2107
  {
2114
2108
  actions: n,
2115
- primaryActionVariant: u,
2109
+ primaryActionVariant: s,
2116
2110
  notification: l
2117
2111
  }
2118
2112
  )
@@ -2121,12 +2115,12 @@ const mo = /* @__PURE__ */ vo(ho), go = "_fadeIn_1ifm3_1", _o = {
2121
2115
  )
2122
2116
  ] });
2123
2117
  }
2124
- ), nt = ({
2118
+ ), tt = ({
2125
2119
  allyLabel: e,
2126
2120
  hasImage: n,
2127
2121
  ["data-testid"]: t
2128
- }) => /* @__PURE__ */ b(Sr, { asChild: !0, children: /* @__PURE__ */ b(
2129
- Fe,
2122
+ }) => /* @__PURE__ */ b(wr, { asChild: !0, children: /* @__PURE__ */ b(
2123
+ ke,
2130
2124
  {
2131
2125
  variant: n ? "primary" : "tertiary-purple",
2132
2126
  negative: n,
@@ -2135,9 +2129,9 @@ const mo = /* @__PURE__ */ vo(ho), go = "_fadeIn_1ifm3_1", _o = {
2135
2129
  "aria-label": e,
2136
2130
  className: T(`${O}__close-button`),
2137
2131
  "data-testid": t,
2138
- children: /* @__PURE__ */ b(Nt, {})
2132
+ children: /* @__PURE__ */ b(Ot, {})
2139
2133
  }
2140
- ) }), $o = 3, rt = ({
2134
+ ) }), _o = 3, nt = ({
2141
2135
  actions: e,
2142
2136
  primaryActionVariant: n,
2143
2137
  notification: t
@@ -2147,15 +2141,15 @@ const mo = /* @__PURE__ */ vo(ho), go = "_fadeIn_1ifm3_1", _o = {
2147
2141
  var r, i;
2148
2142
  t && ((i = (r = o == null ? void 0 : o.current) == null ? void 0 : r.scrollIntoView) == null || i.call(r, !1));
2149
2143
  }, [t]), e && e.length > 0 ? /* @__PURE__ */ F("div", { className: T(`${O}__actions`), children: [
2150
- /* @__PURE__ */ b("div", { className: T(`${O}__actions-buttons`), "data-testid": "modal actions", children: e.slice(0, $o).map(
2151
- ({ label: r, onClick: i, disabled: c, loading: u, iconPosition: d = "right", icon: p, ...l }, f) => /* @__PURE__ */ F(
2152
- Fe,
2144
+ /* @__PURE__ */ b("div", { className: T(`${O}__actions-buttons`), "data-testid": "modal actions", children: e.slice(0, _o).map(
2145
+ ({ label: r, onClick: i, disabled: c, loading: s, iconPosition: d = "right", icon: p, ...l }, f) => /* @__PURE__ */ F(
2146
+ ke,
2153
2147
  {
2154
2148
  "data-testid": "modal actions button",
2155
2149
  variant: a[f] || "",
2156
2150
  onClick: i,
2157
2151
  disabled: c,
2158
- loading: u,
2152
+ loading: s,
2159
2153
  className: T(`${O}__actions-button`),
2160
2154
  ...l,
2161
2155
  children: [
@@ -2170,9 +2164,9 @@ const mo = /* @__PURE__ */ vo(ho), go = "_fadeIn_1ifm3_1", _o = {
2170
2164
  t && /* @__PURE__ */ b("div", { className: T(`${O}__notification`), ref: o, children: t }),
2171
2165
  /* @__PURE__ */ b("span", { className: T(`${O}__actions-separator`) })
2172
2166
  ] }) : null;
2173
- }, yo = S(
2167
+ }, bo = S(
2174
2168
  ({ ["data-testid"]: e, children: n, className: t, ...o }, a) => /* @__PURE__ */ b(
2175
- $r,
2169
+ _r,
2176
2170
  {
2177
2171
  asChild: !0,
2178
2172
  ref: a,
@@ -2182,16 +2176,16 @@ const mo = /* @__PURE__ */ vo(ho), go = "_fadeIn_1ifm3_1", _o = {
2182
2176
  children: n
2183
2177
  }
2184
2178
  )
2185
- ), je = ({
2179
+ ), Fe = ({
2186
2180
  ["data-testid"]: e,
2187
2181
  children: n,
2188
2182
  open: t,
2189
2183
  onOpenChange: o
2190
- }) => /* @__PURE__ */ b(br, { open: t, onOpenChange: o, "data-testid": e, children: n });
2191
- je.Trigger = yo;
2192
- je.Content = bo;
2193
- je.displayName = "Modal";
2184
+ }) => /* @__PURE__ */ b(gr, { open: t, onOpenChange: o, "data-testid": e, children: n });
2185
+ Fe.Trigger = bo;
2186
+ Fe.Content = go;
2187
+ Fe.displayName = "Modal";
2194
2188
  export {
2195
- je as Modal
2189
+ Fe as Modal
2196
2190
  };
2197
2191
  //# sourceMappingURL=modal.es.js.map