@purpurds/modal 6.12.4 → 7.0.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,39 +1,39 @@
1
- import { jsx as p, Fragment as ie, jsxs as R } from "react/jsx-runtime";
1
+ import { jsx as p, Fragment as ie, jsxs as D } from "react/jsx-runtime";
2
2
  import * as s from "react";
3
- import { useState as be, forwardRef as Oe, useRef as we, useCallback as er, useEffect as Ee } from "react";
4
- import * as tr from "react-dom";
5
- import rr from "react-dom";
3
+ import { useState as be, forwardRef as xe, useRef as we, useCallback as Jt, useEffect as Ee } from "react";
4
+ import * as er from "react-dom";
5
+ import tr from "react-dom";
6
6
  function I(e, t, { checkForDefaultPrevented: r = !0 } = {}) {
7
7
  return function(a) {
8
8
  if (e == null || e(a), r === !1 || !a.defaultPrevented)
9
9
  return t == null ? void 0 : t(a);
10
10
  };
11
11
  }
12
- function Ie(e, t) {
12
+ function $e(e, t) {
13
13
  if (typeof e == "function")
14
14
  return e(t);
15
15
  e != null && (e.current = t);
16
16
  }
17
- function pt(...e) {
17
+ function dt(...e) {
18
18
  return (t) => {
19
19
  let r = !1;
20
20
  const o = e.map((a) => {
21
- const n = Ie(a, t);
21
+ const n = $e(a, t);
22
22
  return !r && typeof n == "function" && (r = !0), n;
23
23
  });
24
24
  if (r)
25
25
  return () => {
26
26
  for (let a = 0; a < o.length; a++) {
27
27
  const n = o[a];
28
- typeof n == "function" ? n() : Ie(e[a], null);
28
+ typeof n == "function" ? n() : $e(e[a], null);
29
29
  }
30
30
  };
31
31
  };
32
32
  }
33
- function B(...e) {
34
- return s.useCallback(pt(...e), e);
33
+ function j(...e) {
34
+ return s.useCallback(dt(...e), e);
35
35
  }
36
- function nr(e, t) {
36
+ function rr(e, t) {
37
37
  const r = s.createContext(t), o = (n) => {
38
38
  const { children: i, ...u } = n, d = s.useMemo(() => u, Object.values(u));
39
39
  return /* @__PURE__ */ p(r.Provider, { value: d, children: i });
@@ -47,25 +47,25 @@ function nr(e, t) {
47
47
  }
48
48
  return [o, a];
49
49
  }
50
- function or(e, t = []) {
50
+ function nr(e, t = []) {
51
51
  let r = [];
52
52
  function o(n, i) {
53
53
  const u = s.createContext(i), d = r.length;
54
54
  r = [...r, i];
55
- const c = (v) => {
55
+ const l = (v) => {
56
56
  var _;
57
- const { scope: h, children: g, ...b } = v, l = ((_ = h == null ? void 0 : h[e]) == null ? void 0 : _[d]) || u, m = s.useMemo(() => b, Object.values(b));
58
- return /* @__PURE__ */ p(l.Provider, { value: m, children: g });
57
+ const { scope: h, children: g, ...b } = v, c = ((_ = h == null ? void 0 : h[e]) == null ? void 0 : _[d]) || u, m = s.useMemo(() => b, Object.values(b));
58
+ return /* @__PURE__ */ p(c.Provider, { value: m, children: g });
59
59
  };
60
- c.displayName = n + "Provider";
60
+ l.displayName = n + "Provider";
61
61
  function f(v, h) {
62
- var l;
63
- const g = ((l = h == null ? void 0 : h[e]) == null ? void 0 : l[d]) || u, b = s.useContext(g);
62
+ var c;
63
+ const g = ((c = h == null ? void 0 : h[e]) == null ? void 0 : c[d]) || u, b = s.useContext(g);
64
64
  if (b) return b;
65
65
  if (i !== void 0) return i;
66
66
  throw new Error(`\`${v}\` must be used within \`${n}\``);
67
67
  }
68
- return [c, f];
68
+ return [l, f];
69
69
  }
70
70
  const a = () => {
71
71
  const n = r.map((i) => s.createContext(i));
@@ -77,9 +77,9 @@ function or(e, t = []) {
77
77
  );
78
78
  };
79
79
  };
80
- return a.scopeName = e, [o, ar(a, ...t)];
80
+ return a.scopeName = e, [o, or(a, ...t)];
81
81
  }
82
- function ar(...e) {
82
+ function or(...e) {
83
83
  const t = e[0];
84
84
  if (e.length === 1) return t;
85
85
  const r = () => {
@@ -88,8 +88,8 @@ function ar(...e) {
88
88
  scopeName: a.scopeName
89
89
  }));
90
90
  return function(n) {
91
- const i = o.reduce((u, { useScope: d, scopeName: c }) => {
92
- const v = d(n)[`__scope${c}`];
91
+ const i = o.reduce((u, { useScope: d, scopeName: l }) => {
92
+ const v = d(n)[`__scope${l}`];
93
93
  return { ...u, ...v };
94
94
  }, {});
95
95
  return s.useMemo(() => ({ [`__scope${t.scopeName}`]: i }), [i]);
@@ -98,15 +98,15 @@ function ar(...e) {
98
98
  return r.scopeName = t.scopeName, r;
99
99
  }
100
100
  var ue = globalThis != null && globalThis.document ? s.useLayoutEffect : () => {
101
- }, ir = s.useId || (() => {
102
- }), ur = 0;
101
+ }, ar = s.useId || (() => {
102
+ }), ir = 0;
103
103
  function de(e) {
104
- const [t, r] = s.useState(ir());
104
+ const [t, r] = s.useState(ar());
105
105
  return ue(() => {
106
- r((o) => o ?? String(ur++));
106
+ r((o) => o ?? String(ir++));
107
107
  }, [e]), e || (t ? `radix-${t}` : "");
108
108
  }
109
- function W(e) {
109
+ function F(e) {
110
110
  const t = s.useRef(e);
111
111
  return s.useEffect(() => {
112
112
  t.current = e;
@@ -115,56 +115,56 @@ function W(e) {
115
115
  return (o = t.current) == null ? void 0 : o.call(t, ...r);
116
116
  }, []);
117
117
  }
118
- function sr({
118
+ function ur({
119
119
  prop: e,
120
120
  defaultProp: t,
121
121
  onChange: r = () => {
122
122
  }
123
123
  }) {
124
- const [o, a] = cr({ defaultProp: t, onChange: r }), n = e !== void 0, i = n ? e : o, u = W(r), d = s.useCallback(
125
- (c) => {
124
+ const [o, a] = sr({ defaultProp: t, onChange: r }), n = e !== void 0, i = n ? e : o, u = F(r), d = s.useCallback(
125
+ (l) => {
126
126
  if (n) {
127
- const v = typeof c == "function" ? c(e) : c;
127
+ const v = typeof l == "function" ? l(e) : l;
128
128
  v !== e && u(v);
129
129
  } else
130
- a(c);
130
+ a(l);
131
131
  },
132
132
  [n, e, a, u]
133
133
  );
134
134
  return [i, d];
135
135
  }
136
- function cr({
136
+ function sr({
137
137
  defaultProp: e,
138
138
  onChange: t
139
139
  }) {
140
- const r = s.useState(e), [o] = r, a = s.useRef(o), n = W(t);
140
+ const r = s.useState(e), [o] = r, a = s.useRef(o), n = F(t);
141
141
  return s.useEffect(() => {
142
142
  a.current !== o && (n(o), a.current = o);
143
143
  }, [o, a, n]), r;
144
144
  }
145
- var xe = s.forwardRef((e, t) => {
146
- const { children: r, ...o } = e, a = s.Children.toArray(r), n = a.find(dr);
145
+ var Oe = s.forwardRef((e, t) => {
146
+ const { children: r, ...o } = e, a = s.Children.toArray(r), n = a.find(lr);
147
147
  if (n) {
148
148
  const i = n.props.children, u = a.map((d) => d === n ? s.Children.count(i) > 1 ? s.Children.only(null) : s.isValidElement(i) ? i.props.children : null : d);
149
149
  return /* @__PURE__ */ p(Ce, { ...o, ref: t, children: s.isValidElement(i) ? s.cloneElement(i, void 0, u) : null });
150
150
  }
151
151
  return /* @__PURE__ */ p(Ce, { ...o, ref: t, children: r });
152
152
  });
153
- xe.displayName = "Slot";
153
+ Oe.displayName = "Slot";
154
154
  var Ce = s.forwardRef((e, t) => {
155
155
  const { children: r, ...o } = e;
156
156
  if (s.isValidElement(r)) {
157
- const a = fr(r), n = pr(o, r.props);
158
- return r.type !== s.Fragment && (n.ref = t ? pt(t, a) : a), s.cloneElement(r, n);
157
+ const a = pr(r), n = dr(o, r.props);
158
+ return r.type !== s.Fragment && (n.ref = t ? dt(t, a) : a), s.cloneElement(r, n);
159
159
  }
160
160
  return s.Children.count(r) > 1 ? s.Children.only(null) : null;
161
161
  });
162
162
  Ce.displayName = "SlotClone";
163
- var lr = ({ children: e }) => /* @__PURE__ */ p(ie, { children: e });
164
- function dr(e) {
165
- return s.isValidElement(e) && e.type === lr;
163
+ var cr = ({ children: e }) => /* @__PURE__ */ p(ie, { children: e });
164
+ function lr(e) {
165
+ return s.isValidElement(e) && e.type === cr;
166
166
  }
167
- function pr(e, t) {
167
+ function dr(e, t) {
168
168
  const r = { ...t };
169
169
  for (const o in t) {
170
170
  const a = e[o], n = t[o];
@@ -174,12 +174,12 @@ function pr(e, t) {
174
174
  }
175
175
  return { ...e, ...r };
176
176
  }
177
- function fr(e) {
177
+ function pr(e) {
178
178
  var o, a;
179
179
  let t = (o = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : o.get, r = t && "isReactWarning" in t && t.isReactWarning;
180
180
  return r ? e.ref : (t = (a = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : a.get, r = t && "isReactWarning" in t && t.isReactWarning, r ? e.props.ref : e.props.ref || e.ref);
181
181
  }
182
- var vr = [
182
+ var fr = [
183
183
  "a",
184
184
  "button",
185
185
  "div",
@@ -196,18 +196,18 @@ var vr = [
196
196
  "span",
197
197
  "svg",
198
198
  "ul"
199
- ], M = vr.reduce((e, t) => {
199
+ ], M = fr.reduce((e, t) => {
200
200
  const r = s.forwardRef((o, a) => {
201
- const { asChild: n, ...i } = o, u = n ? xe : t;
201
+ const { asChild: n, ...i } = o, u = n ? Oe : t;
202
202
  return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ p(u, { ...i, ref: a });
203
203
  });
204
204
  return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
205
205
  }, {});
206
- function hr(e, t) {
207
- e && tr.flushSync(() => e.dispatchEvent(t));
206
+ function vr(e, t) {
207
+ e && er.flushSync(() => e.dispatchEvent(t));
208
208
  }
209
- function mr(e, t = globalThis == null ? void 0 : globalThis.document) {
210
- const r = W(e);
209
+ function hr(e, t = globalThis == null ? void 0 : globalThis.document) {
210
+ const r = F(e);
211
211
  s.useEffect(() => {
212
212
  const o = (a) => {
213
213
  a.key === "Escape" && r(a);
@@ -215,11 +215,11 @@ function mr(e, t = globalThis == null ? void 0 : globalThis.document) {
215
215
  return t.addEventListener("keydown", o, { capture: !0 }), () => t.removeEventListener("keydown", o, { capture: !0 });
216
216
  }, [r, t]);
217
217
  }
218
- var gr = "DismissableLayer", Se = "dismissableLayer.update", _r = "dismissableLayer.pointerDownOutside", yr = "dismissableLayer.focusOutside", Le, ft = s.createContext({
218
+ var mr = "DismissableLayer", Se = "dismissableLayer.update", gr = "dismissableLayer.pointerDownOutside", _r = "dismissableLayer.focusOutside", Ie, pt = s.createContext({
219
219
  layers: /* @__PURE__ */ new Set(),
220
220
  layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
221
221
  branches: /* @__PURE__ */ new Set()
222
- }), vt = s.forwardRef(
222
+ }), ft = s.forwardRef(
223
223
  (e, t) => {
224
224
  const {
225
225
  disableOutsidePointerEvents: r = !1,
@@ -229,23 +229,23 @@ var gr = "DismissableLayer", Se = "dismissableLayer.update", _r = "dismissableLa
229
229
  onInteractOutside: i,
230
230
  onDismiss: u,
231
231
  ...d
232
- } = e, c = s.useContext(ft), [f, v] = s.useState(null), h = (f == null ? void 0 : f.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, g] = s.useState({}), b = B(t, (y) => v(y)), l = Array.from(c.layers), [m] = [...c.layersWithOutsidePointerEventsDisabled].slice(-1), _ = l.indexOf(m), S = f ? l.indexOf(f) : -1, w = c.layersWithOutsidePointerEventsDisabled.size > 0, E = S >= _, C = Er((y) => {
233
- const O = y.target, L = [...c.branches].some((D) => D.contains(O));
234
- !E || L || (a == null || a(y), i == null || i(y), y.defaultPrevented || u == null || u());
235
- }, h), x = Cr((y) => {
236
- const O = y.target;
237
- [...c.branches].some((D) => D.contains(O)) || (n == null || n(y), i == null || i(y), y.defaultPrevented || u == null || u());
232
+ } = e, l = s.useContext(pt), [f, v] = s.useState(null), h = (f == null ? void 0 : f.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, g] = s.useState({}), b = j(t, (y) => v(y)), c = Array.from(l.layers), [m] = [...l.layersWithOutsidePointerEventsDisabled].slice(-1), _ = c.indexOf(m), S = f ? c.indexOf(f) : -1, w = l.layersWithOutsidePointerEventsDisabled.size > 0, E = S >= _, C = wr((y) => {
233
+ const R = y.target, O = [...l.branches].some((H) => H.contains(R));
234
+ !E || O || (a == null || a(y), i == null || i(y), y.defaultPrevented || u == null || u());
235
+ }, h), P = Er((y) => {
236
+ const R = y.target;
237
+ [...l.branches].some((H) => H.contains(R)) || (n == null || n(y), i == null || i(y), y.defaultPrevented || u == null || u());
238
238
  }, h);
239
- return mr((y) => {
240
- S === c.layers.size - 1 && (o == null || o(y), !y.defaultPrevented && u && (y.preventDefault(), u()));
239
+ return hr((y) => {
240
+ S === l.layers.size - 1 && (o == null || o(y), !y.defaultPrevented && u && (y.preventDefault(), u()));
241
241
  }, h), s.useEffect(() => {
242
242
  if (f)
243
- return r && (c.layersWithOutsidePointerEventsDisabled.size === 0 && (Le = h.body.style.pointerEvents, h.body.style.pointerEvents = "none"), c.layersWithOutsidePointerEventsDisabled.add(f)), c.layers.add(f), ke(), () => {
244
- r && c.layersWithOutsidePointerEventsDisabled.size === 1 && (h.body.style.pointerEvents = Le);
243
+ return r && (l.layersWithOutsidePointerEventsDisabled.size === 0 && (Ie = h.body.style.pointerEvents, h.body.style.pointerEvents = "none"), l.layersWithOutsidePointerEventsDisabled.add(f)), l.layers.add(f), Le(), () => {
244
+ r && l.layersWithOutsidePointerEventsDisabled.size === 1 && (h.body.style.pointerEvents = Ie);
245
245
  };
246
- }, [f, h, r, c]), s.useEffect(() => () => {
247
- f && (c.layers.delete(f), c.layersWithOutsidePointerEventsDisabled.delete(f), ke());
248
- }, [f, c]), s.useEffect(() => {
246
+ }, [f, h, r, l]), s.useEffect(() => () => {
247
+ f && (l.layers.delete(f), l.layersWithOutsidePointerEventsDisabled.delete(f), Le());
248
+ }, [f, l]), s.useEffect(() => {
249
249
  const y = () => g({});
250
250
  return document.addEventListener(Se, y), () => document.removeEventListener(Se, y);
251
251
  }, []), /* @__PURE__ */ p(
@@ -257,8 +257,8 @@ var gr = "DismissableLayer", Se = "dismissableLayer.update", _r = "dismissableLa
257
257
  pointerEvents: w ? E ? "auto" : "none" : void 0,
258
258
  ...e.style
259
259
  },
260
- onFocusCapture: I(e.onFocusCapture, x.onFocusCapture),
261
- onBlurCapture: I(e.onBlurCapture, x.onBlurCapture),
260
+ onFocusCapture: I(e.onFocusCapture, P.onFocusCapture),
261
+ onBlurCapture: I(e.onBlurCapture, P.onBlurCapture),
262
262
  onPointerDownCapture: I(
263
263
  e.onPointerDownCapture,
264
264
  C.onPointerDownCapture
@@ -267,9 +267,9 @@ var gr = "DismissableLayer", Se = "dismissableLayer.update", _r = "dismissableLa
267
267
  );
268
268
  }
269
269
  );
270
- vt.displayName = gr;
271
- var br = "DismissableLayerBranch", wr = s.forwardRef((e, t) => {
272
- const r = s.useContext(ft), o = s.useRef(null), a = B(t, o);
270
+ ft.displayName = mr;
271
+ var yr = "DismissableLayerBranch", br = s.forwardRef((e, t) => {
272
+ const r = s.useContext(pt), o = s.useRef(null), a = j(t, o);
273
273
  return s.useEffect(() => {
274
274
  const n = o.current;
275
275
  if (n)
@@ -278,22 +278,22 @@ var br = "DismissableLayerBranch", wr = s.forwardRef((e, t) => {
278
278
  };
279
279
  }, [r.branches]), /* @__PURE__ */ p(M.div, { ...e, ref: a });
280
280
  });
281
- wr.displayName = br;
282
- function Er(e, t = globalThis == null ? void 0 : globalThis.document) {
283
- const r = W(e), o = s.useRef(!1), a = s.useRef(() => {
281
+ br.displayName = yr;
282
+ function wr(e, t = globalThis == null ? void 0 : globalThis.document) {
283
+ const r = F(e), o = s.useRef(!1), a = s.useRef(() => {
284
284
  });
285
285
  return s.useEffect(() => {
286
286
  const n = (u) => {
287
287
  if (u.target && !o.current) {
288
288
  let d = function() {
289
- ht(
290
- _r,
289
+ vt(
290
+ gr,
291
291
  r,
292
- c,
292
+ l,
293
293
  { discrete: !0 }
294
294
  );
295
295
  };
296
- const c = { originalEvent: u };
296
+ const l = { originalEvent: u };
297
297
  u.pointerType === "touch" ? (t.removeEventListener("click", a.current), a.current = d, t.addEventListener("click", a.current, { once: !0 })) : d();
298
298
  } else
299
299
  t.removeEventListener("click", a.current);
@@ -309,11 +309,11 @@ function Er(e, t = globalThis == null ? void 0 : globalThis.document) {
309
309
  onPointerDownCapture: () => o.current = !0
310
310
  };
311
311
  }
312
- function Cr(e, t = globalThis == null ? void 0 : globalThis.document) {
313
- const r = W(e), o = s.useRef(!1);
312
+ function Er(e, t = globalThis == null ? void 0 : globalThis.document) {
313
+ const r = F(e), o = s.useRef(!1);
314
314
  return s.useEffect(() => {
315
315
  const a = (n) => {
316
- n.target && !o.current && ht(yr, r, { originalEvent: n }, {
316
+ n.target && !o.current && vt(_r, r, { originalEvent: n }, {
317
317
  discrete: !1
318
318
  });
319
319
  };
@@ -323,22 +323,22 @@ function Cr(e, t = globalThis == null ? void 0 : globalThis.document) {
323
323
  onBlurCapture: () => o.current = !1
324
324
  };
325
325
  }
326
- function ke() {
326
+ function Le() {
327
327
  const e = new CustomEvent(Se);
328
328
  document.dispatchEvent(e);
329
329
  }
330
- function ht(e, t, r, { discrete: o }) {
330
+ function vt(e, t, r, { discrete: o }) {
331
331
  const a = r.originalEvent.target, n = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: r });
332
- t && a.addEventListener(e, t, { once: !0 }), o ? hr(a, n) : a.dispatchEvent(n);
332
+ t && a.addEventListener(e, t, { once: !0 }), o ? vr(a, n) : a.dispatchEvent(n);
333
333
  }
334
- var pe = "focusScope.autoFocusOnMount", fe = "focusScope.autoFocusOnUnmount", Fe = { bubbles: !1, cancelable: !0 }, Sr = "FocusScope", mt = s.forwardRef((e, t) => {
334
+ var pe = "focusScope.autoFocusOnMount", fe = "focusScope.autoFocusOnUnmount", ke = { bubbles: !1, cancelable: !0 }, Cr = "FocusScope", ht = s.forwardRef((e, t) => {
335
335
  const {
336
336
  loop: r = !1,
337
337
  trapped: o = !1,
338
338
  onMountAutoFocus: a,
339
339
  onUnmountAutoFocus: n,
340
340
  ...i
341
- } = e, [u, d] = s.useState(null), c = W(a), f = W(n), v = s.useRef(null), h = B(t, (l) => d(l)), g = s.useRef({
341
+ } = e, [u, d] = s.useState(null), l = F(a), f = F(n), v = s.useRef(null), h = j(t, (c) => d(c)), g = s.useRef({
342
342
  paused: !1,
343
343
  pause() {
344
344
  this.paused = !0;
@@ -349,7 +349,7 @@ var pe = "focusScope.autoFocusOnMount", fe = "focusScope.autoFocusOnUnmount", Fe
349
349
  }).current;
350
350
  s.useEffect(() => {
351
351
  if (o) {
352
- let l = function(w) {
352
+ let c = function(w) {
353
353
  if (g.paused || !u) return;
354
354
  const E = w.target;
355
355
  u.contains(E) ? v.current = E : $(v.current, { select: !0 });
@@ -362,52 +362,52 @@ var pe = "focusScope.autoFocusOnMount", fe = "focusScope.autoFocusOnUnmount", Fe
362
362
  for (const C of w)
363
363
  C.removedNodes.length > 0 && $(u);
364
364
  };
365
- document.addEventListener("focusin", l), document.addEventListener("focusout", m);
365
+ document.addEventListener("focusin", c), document.addEventListener("focusout", m);
366
366
  const S = new MutationObserver(_);
367
367
  return u && S.observe(u, { childList: !0, subtree: !0 }), () => {
368
- document.removeEventListener("focusin", l), document.removeEventListener("focusout", m), S.disconnect();
368
+ document.removeEventListener("focusin", c), document.removeEventListener("focusout", m), S.disconnect();
369
369
  };
370
370
  }
371
371
  }, [o, u, g.paused]), s.useEffect(() => {
372
372
  if (u) {
373
- je.add(g);
374
- const l = document.activeElement;
375
- if (!u.contains(l)) {
376
- const _ = new CustomEvent(pe, Fe);
377
- u.addEventListener(pe, c), u.dispatchEvent(_), _.defaultPrevented || (Nr(Ar(gt(u)), { select: !0 }), document.activeElement === l && $(u));
373
+ We.add(g);
374
+ const c = document.activeElement;
375
+ if (!u.contains(c)) {
376
+ const _ = new CustomEvent(pe, ke);
377
+ u.addEventListener(pe, l), u.dispatchEvent(_), _.defaultPrevented || (Sr(Rr(mt(u)), { select: !0 }), document.activeElement === c && $(u));
378
378
  }
379
379
  return () => {
380
- u.removeEventListener(pe, c), setTimeout(() => {
381
- const _ = new CustomEvent(fe, Fe);
382
- u.addEventListener(fe, f), u.dispatchEvent(_), _.defaultPrevented || $(l ?? document.body, { select: !0 }), u.removeEventListener(fe, f), je.remove(g);
380
+ u.removeEventListener(pe, l), setTimeout(() => {
381
+ const _ = new CustomEvent(fe, ke);
382
+ u.addEventListener(fe, f), u.dispatchEvent(_), _.defaultPrevented || $(c ?? document.body, { select: !0 }), u.removeEventListener(fe, f), We.remove(g);
383
383
  }, 0);
384
384
  };
385
385
  }
386
- }, [u, c, f, g]);
386
+ }, [u, l, f, g]);
387
387
  const b = s.useCallback(
388
- (l) => {
388
+ (c) => {
389
389
  if (!r && !o || g.paused) return;
390
- const m = l.key === "Tab" && !l.altKey && !l.ctrlKey && !l.metaKey, _ = document.activeElement;
390
+ const m = c.key === "Tab" && !c.altKey && !c.ctrlKey && !c.metaKey, _ = document.activeElement;
391
391
  if (m && _) {
392
- const S = l.currentTarget, [w, E] = Pr(S);
393
- w && E ? !l.shiftKey && _ === E ? (l.preventDefault(), r && $(w, { select: !0 })) : l.shiftKey && _ === w && (l.preventDefault(), r && $(E, { select: !0 })) : _ === S && l.preventDefault();
392
+ const S = c.currentTarget, [w, E] = Nr(S);
393
+ w && E ? !c.shiftKey && _ === E ? (c.preventDefault(), r && $(w, { select: !0 })) : c.shiftKey && _ === w && (c.preventDefault(), r && $(E, { select: !0 })) : _ === S && c.preventDefault();
394
394
  }
395
395
  },
396
396
  [r, o, g.paused]
397
397
  );
398
398
  return /* @__PURE__ */ p(M.div, { tabIndex: -1, ...i, ref: h, onKeyDown: b });
399
399
  });
400
- mt.displayName = Sr;
401
- function Nr(e, { select: t = !1 } = {}) {
400
+ ht.displayName = Cr;
401
+ function Sr(e, { select: t = !1 } = {}) {
402
402
  const r = document.activeElement;
403
403
  for (const o of e)
404
404
  if ($(o, { select: t }), document.activeElement !== r) return;
405
405
  }
406
- function Pr(e) {
407
- const t = gt(e), r = We(t, e), o = We(t.reverse(), e);
406
+ function Nr(e) {
407
+ const t = mt(e), r = Fe(t, e), o = Fe(t.reverse(), e);
408
408
  return [r, o];
409
409
  }
410
- function gt(e) {
410
+ function mt(e) {
411
411
  const t = [], r = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
412
412
  acceptNode: (o) => {
413
413
  const a = o.tagName === "INPUT" && o.type === "hidden";
@@ -417,11 +417,11 @@ function gt(e) {
417
417
  for (; r.nextNode(); ) t.push(r.currentNode);
418
418
  return t;
419
419
  }
420
- function We(e, t) {
420
+ function Fe(e, t) {
421
421
  for (const r of e)
422
- if (!Or(r, { upTo: t })) return r;
422
+ if (!Pr(r, { upTo: t })) return r;
423
423
  }
424
- function Or(e, { upTo: t }) {
424
+ function Pr(e, { upTo: t }) {
425
425
  if (getComputedStyle(e).visibility === "hidden") return !0;
426
426
  for (; e; ) {
427
427
  if (t !== void 0 && e === t) return !1;
@@ -439,45 +439,45 @@ function $(e, { select: t = !1 } = {}) {
439
439
  e.focus({ preventScroll: !0 }), e !== r && xr(e) && t && e.select();
440
440
  }
441
441
  }
442
- var je = Rr();
443
- function Rr() {
442
+ var We = Or();
443
+ function Or() {
444
444
  let e = [];
445
445
  return {
446
446
  add(t) {
447
447
  const r = e[0];
448
- t !== r && (r == null || r.pause()), e = Be(e, t), e.unshift(t);
448
+ t !== r && (r == null || r.pause()), e = je(e, t), e.unshift(t);
449
449
  },
450
450
  remove(t) {
451
451
  var r;
452
- e = Be(e, t), (r = e[0]) == null || r.resume();
452
+ e = je(e, t), (r = e[0]) == null || r.resume();
453
453
  }
454
454
  };
455
455
  }
456
- function Be(e, t) {
456
+ function je(e, t) {
457
457
  const r = [...e], o = r.indexOf(t);
458
458
  return o !== -1 && r.splice(o, 1), r;
459
459
  }
460
- function Ar(e) {
460
+ function Rr(e) {
461
461
  return e.filter((t) => t.tagName !== "A");
462
462
  }
463
- var Dr = "Portal", _t = s.forwardRef((e, t) => {
463
+ var Ar = "Portal", gt = s.forwardRef((e, t) => {
464
464
  var u;
465
465
  const { container: r, ...o } = e, [a, n] = s.useState(!1);
466
466
  ue(() => n(!0), []);
467
467
  const i = r || a && ((u = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : u.body);
468
- return i ? rr.createPortal(/* @__PURE__ */ p(M.div, { ...o, ref: t }), i) : null;
468
+ return i ? tr.createPortal(/* @__PURE__ */ p(M.div, { ...o, ref: t }), i) : null;
469
469
  });
470
- _t.displayName = Dr;
471
- function Tr(e, t) {
470
+ gt.displayName = Ar;
471
+ function Dr(e, t) {
472
472
  return s.useReducer((r, o) => t[r][o] ?? r, e);
473
473
  }
474
474
  var ce = (e) => {
475
- const { present: t, children: r } = e, o = Mr(t), a = typeof r == "function" ? r({ present: o.isPresent }) : s.Children.only(r), n = B(o.ref, $r(a));
475
+ const { present: t, children: r } = e, o = Tr(t), a = typeof r == "function" ? r({ present: o.isPresent }) : s.Children.only(r), n = j(o.ref, Mr(a));
476
476
  return typeof r == "function" || o.isPresent ? s.cloneElement(a, { ref: n }) : null;
477
477
  };
478
478
  ce.displayName = "Presence";
479
- function Mr(e) {
480
- const [t, r] = s.useState(), o = s.useRef({}), a = s.useRef(e), n = s.useRef("none"), i = e ? "mounted" : "unmounted", [u, d] = Tr(i, {
479
+ function Tr(e) {
480
+ const [t, r] = s.useState(), o = s.useRef({}), a = s.useRef(e), n = s.useRef("none"), i = e ? "mounted" : "unmounted", [u, d] = Dr(i, {
481
481
  mounted: {
482
482
  UNMOUNT: "unmounted",
483
483
  ANIMATION_OUT: "unmountSuspended"
@@ -491,22 +491,22 @@ function Mr(e) {
491
491
  }
492
492
  });
493
493
  return s.useEffect(() => {
494
- const c = Z(o.current);
495
- n.current = u === "mounted" ? c : "none";
494
+ const l = Z(o.current);
495
+ n.current = u === "mounted" ? l : "none";
496
496
  }, [u]), ue(() => {
497
- const c = o.current, f = a.current;
497
+ const l = o.current, f = a.current;
498
498
  if (f !== e) {
499
- const h = n.current, g = Z(c);
500
- e ? d("MOUNT") : g === "none" || (c == null ? void 0 : c.display) === "none" ? d("UNMOUNT") : d(f && h !== g ? "ANIMATION_OUT" : "UNMOUNT"), a.current = e;
499
+ const h = n.current, g = Z(l);
500
+ e ? d("MOUNT") : g === "none" || (l == null ? void 0 : l.display) === "none" ? d("UNMOUNT") : d(f && h !== g ? "ANIMATION_OUT" : "UNMOUNT"), a.current = e;
501
501
  }
502
502
  }, [e, d]), ue(() => {
503
503
  if (t) {
504
- let c;
504
+ let l;
505
505
  const f = t.ownerDocument.defaultView ?? window, v = (g) => {
506
- const l = Z(o.current).includes(g.animationName);
507
- if (g.target === t && l && (d("ANIMATION_END"), !a.current)) {
506
+ const c = Z(o.current).includes(g.animationName);
507
+ if (g.target === t && c && (d("ANIMATION_END"), !a.current)) {
508
508
  const m = t.style.animationFillMode;
509
- t.style.animationFillMode = "forwards", c = f.setTimeout(() => {
509
+ t.style.animationFillMode = "forwards", l = f.setTimeout(() => {
510
510
  t.style.animationFillMode === "forwards" && (t.style.animationFillMode = m);
511
511
  });
512
512
  }
@@ -514,27 +514,27 @@ function Mr(e) {
514
514
  g.target === t && (n.current = Z(o.current));
515
515
  };
516
516
  return t.addEventListener("animationstart", h), t.addEventListener("animationcancel", v), t.addEventListener("animationend", v), () => {
517
- f.clearTimeout(c), t.removeEventListener("animationstart", h), t.removeEventListener("animationcancel", v), t.removeEventListener("animationend", v);
517
+ f.clearTimeout(l), t.removeEventListener("animationstart", h), t.removeEventListener("animationcancel", v), t.removeEventListener("animationend", v);
518
518
  };
519
519
  } else
520
520
  d("ANIMATION_END");
521
521
  }, [t, d]), {
522
522
  isPresent: ["mounted", "unmountSuspended"].includes(u),
523
- ref: s.useCallback((c) => {
524
- c && (o.current = getComputedStyle(c)), r(c);
523
+ ref: s.useCallback((l) => {
524
+ l && (o.current = getComputedStyle(l)), r(l);
525
525
  }, [])
526
526
  };
527
527
  }
528
528
  function Z(e) {
529
529
  return (e == null ? void 0 : e.animationName) || "none";
530
530
  }
531
- function $r(e) {
531
+ function Mr(e) {
532
532
  var o, a;
533
533
  let t = (o = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : o.get, r = t && "isReactWarning" in t && t.isReactWarning;
534
534
  return r ? e.ref : (t = (a = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : a.get, r = t && "isReactWarning" in t && t.isReactWarning, r ? e.props.ref : e.props.ref || e.ref);
535
535
  }
536
536
  var ve = 0;
537
- function Ir() {
537
+ function $r() {
538
538
  s.useEffect(() => {
539
539
  const e = document.querySelectorAll("[data-radix-focus-guard]");
540
540
  return document.body.insertAdjacentElement("afterbegin", e[0] ?? qe()), document.body.insertAdjacentElement("beforeend", e[1] ?? qe()), ve++, () => {
@@ -555,7 +555,7 @@ var T = function() {
555
555
  return t;
556
556
  }, T.apply(this, arguments);
557
557
  };
558
- function yt(e, t) {
558
+ function _t(e, t) {
559
559
  var r = {};
560
560
  for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && t.indexOf(o) < 0 && (r[o] = e[o]);
561
561
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
@@ -563,16 +563,16 @@ function yt(e, t) {
563
563
  t.indexOf(o[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, o[a]) && (r[o[a]] = e[o[a]]);
564
564
  return r;
565
565
  }
566
- function Lr(e, t, r) {
566
+ function Ir(e, t, r) {
567
567
  if (r || arguments.length === 2) for (var o = 0, a = t.length, n; o < a; o++)
568
568
  (n || !(o in t)) && (n || (n = Array.prototype.slice.call(t, 0, o)), n[o] = t[o]);
569
569
  return e.concat(n || Array.prototype.slice.call(t));
570
570
  }
571
- var oe = "right-scroll-bar-position", ae = "width-before-scroll-bar", kr = "with-scroll-bars-hidden", Fr = "--removed-body-scroll-bar-size";
571
+ var oe = "right-scroll-bar-position", ae = "width-before-scroll-bar", Lr = "with-scroll-bars-hidden", kr = "--removed-body-scroll-bar-size";
572
572
  function he(e, t) {
573
573
  return typeof e == "function" ? e(t) : e && (e.current = t), e;
574
574
  }
575
- function Wr(e, t) {
575
+ function Fr(e, t) {
576
576
  var r = be(function() {
577
577
  return {
578
578
  // value
@@ -593,15 +593,15 @@ function Wr(e, t) {
593
593
  })[0];
594
594
  return r.callback = t, r.facade;
595
595
  }
596
- var jr = typeof window < "u" ? s.useLayoutEffect : s.useEffect, Ue = /* @__PURE__ */ new WeakMap();
597
- function Br(e, t) {
598
- var r = Wr(null, function(o) {
596
+ var Wr = typeof window < "u" ? s.useLayoutEffect : s.useEffect, Be = /* @__PURE__ */ new WeakMap();
597
+ function jr(e, t) {
598
+ var r = Fr(null, function(o) {
599
599
  return e.forEach(function(a) {
600
600
  return he(a, o);
601
601
  });
602
602
  });
603
- return jr(function() {
604
- var o = Ue.get(r);
603
+ return Wr(function() {
604
+ var o = Be.get(r);
605
605
  if (o) {
606
606
  var a = new Set(o), n = new Set(e), i = r.current;
607
607
  a.forEach(function(u) {
@@ -610,13 +610,13 @@ function Br(e, t) {
610
610
  a.has(u) || he(u, i);
611
611
  });
612
612
  }
613
- Ue.set(r, e);
613
+ Be.set(r, e);
614
614
  }, [e]), r;
615
615
  }
616
616
  function qr(e) {
617
617
  return e;
618
618
  }
619
- function Ur(e, t) {
619
+ function Br(e, t) {
620
620
  t === void 0 && (t = qr);
621
621
  var r = [], o = !1, a = {
622
622
  read: function() {
@@ -656,12 +656,12 @@ function Ur(e, t) {
656
656
  var d = function() {
657
657
  var f = i;
658
658
  i = [], f.forEach(n);
659
- }, c = function() {
659
+ }, l = function() {
660
660
  return Promise.resolve().then(d);
661
661
  };
662
- c(), r = {
662
+ l(), r = {
663
663
  push: function(f) {
664
- i.push(f), c();
664
+ i.push(f), l();
665
665
  },
666
666
  filter: function(f) {
667
667
  return i = i.filter(f), r;
@@ -671,13 +671,13 @@ function Ur(e, t) {
671
671
  };
672
672
  return a;
673
673
  }
674
- function Vr(e) {
674
+ function Ur(e) {
675
675
  e === void 0 && (e = {});
676
- var t = Ur(null);
676
+ var t = Br(null);
677
677
  return t.options = T({ async: !0, ssr: !1 }, e), t;
678
678
  }
679
- var bt = function(e) {
680
- var t = e.sideCar, r = yt(e, ["sideCar"]);
679
+ var yt = function(e) {
680
+ var t = e.sideCar, r = _t(e, ["sideCar"]);
681
681
  if (!t)
682
682
  throw new Error("Sidecar: please provide `sideCar` property to import the right car");
683
683
  var o = t.read();
@@ -685,22 +685,22 @@ var bt = function(e) {
685
685
  throw new Error("Sidecar medium not found");
686
686
  return s.createElement(o, T({}, r));
687
687
  };
688
- bt.isSideCarExport = !0;
689
- function zr(e, t) {
690
- return e.useMedium(t), bt;
688
+ yt.isSideCarExport = !0;
689
+ function Vr(e, t) {
690
+ return e.useMedium(t), yt;
691
691
  }
692
- var wt = Vr(), me = function() {
692
+ var bt = Ur(), me = function() {
693
693
  }, le = s.forwardRef(function(e, t) {
694
694
  var r = s.useRef(null), o = s.useState({
695
695
  onScrollCapture: me,
696
696
  onWheelCapture: me,
697
697
  onTouchMoveCapture: me
698
- }), a = o[0], n = o[1], i = e.forwardProps, u = e.children, d = e.className, c = e.removeScrollBar, f = e.enabled, v = e.shards, h = e.sideCar, g = e.noIsolation, b = e.inert, l = e.allowPinchZoom, m = e.as, _ = m === void 0 ? "div" : m, S = e.gapMode, w = yt(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), E = h, C = Br([r, t]), x = T(T({}, w), a);
698
+ }), a = o[0], n = o[1], i = e.forwardProps, u = e.children, d = e.className, l = e.removeScrollBar, f = e.enabled, v = e.shards, h = e.sideCar, g = e.noIsolation, b = e.inert, c = e.allowPinchZoom, m = e.as, _ = m === void 0 ? "div" : m, S = e.gapMode, w = _t(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), E = h, C = jr([r, t]), P = T(T({}, w), a);
699
699
  return s.createElement(
700
700
  s.Fragment,
701
701
  null,
702
- f && s.createElement(E, { sideCar: wt, removeScrollBar: c, shards: v, noIsolation: g, inert: b, setCallbacks: n, allowPinchZoom: !!l, lockRef: r, gapMode: S }),
703
- i ? s.cloneElement(s.Children.only(u), T(T({}, x), { ref: C })) : s.createElement(_, T({}, x, { className: d, ref: C }), u)
702
+ f && s.createElement(E, { sideCar: bt, removeScrollBar: l, shards: v, noIsolation: g, inert: b, setCallbacks: n, allowPinchZoom: !!c, lockRef: r, gapMode: S }),
703
+ i ? s.cloneElement(s.Children.only(u), T(T({}, P), { ref: C })) : s.createElement(_, T({}, P, { className: d, ref: C }), u)
704
704
  );
705
705
  });
706
706
  le.defaultProps = {
@@ -712,22 +712,22 @@ le.classNames = {
712
712
  fullWidth: ae,
713
713
  zeroRight: oe
714
714
  };
715
- var Hr = function() {
715
+ var zr = function() {
716
716
  if (typeof __webpack_nonce__ < "u")
717
717
  return __webpack_nonce__;
718
718
  };
719
- function Gr() {
719
+ function Hr() {
720
720
  if (!document)
721
721
  return null;
722
722
  var e = document.createElement("style");
723
723
  e.type = "text/css";
724
- var t = Hr();
724
+ var t = zr();
725
725
  return t && e.setAttribute("nonce", t), e;
726
726
  }
727
- function Kr(e, t) {
727
+ function Gr(e, t) {
728
728
  e.styleSheet ? e.styleSheet.cssText = t : e.appendChild(document.createTextNode(t));
729
729
  }
730
- function Xr(e) {
730
+ function Kr(e) {
731
731
  var t = document.head || document.getElementsByTagName("head")[0];
732
732
  t.appendChild(e);
733
733
  }
@@ -735,13 +735,13 @@ var Yr = function() {
735
735
  var e = 0, t = null;
736
736
  return {
737
737
  add: function(r) {
738
- e == 0 && (t = Gr()) && (Kr(t, r), Xr(t)), e++;
738
+ e == 0 && (t = Hr()) && (Gr(t, r), Kr(t)), e++;
739
739
  },
740
740
  remove: function() {
741
741
  e--, !e && t && (t.parentNode && t.parentNode.removeChild(t), t = null);
742
742
  }
743
743
  };
744
- }, Zr = function() {
744
+ }, Xr = function() {
745
745
  var e = Yr();
746
746
  return function(t, r) {
747
747
  s.useEffect(function() {
@@ -750,40 +750,40 @@ var Yr = function() {
750
750
  };
751
751
  }, [t && r]);
752
752
  };
753
- }, Et = function() {
754
- var e = Zr(), t = function(r) {
753
+ }, wt = function() {
754
+ var e = Xr(), t = function(r) {
755
755
  var o = r.styles, a = r.dynamic;
756
756
  return e(o, a), null;
757
757
  };
758
758
  return t;
759
- }, Qr = {
759
+ }, Zr = {
760
760
  left: 0,
761
761
  top: 0,
762
762
  right: 0,
763
763
  gap: 0
764
764
  }, ge = function(e) {
765
765
  return parseInt(e || "", 10) || 0;
766
- }, Jr = function(e) {
766
+ }, Qr = function(e) {
767
767
  var t = window.getComputedStyle(document.body), r = t[e === "padding" ? "paddingLeft" : "marginLeft"], o = t[e === "padding" ? "paddingTop" : "marginTop"], a = t[e === "padding" ? "paddingRight" : "marginRight"];
768
768
  return [ge(r), ge(o), ge(a)];
769
- }, en = function(e) {
769
+ }, Jr = function(e) {
770
770
  if (e === void 0 && (e = "margin"), typeof window > "u")
771
- return Qr;
772
- var t = Jr(e), r = document.documentElement.clientWidth, o = window.innerWidth;
771
+ return Zr;
772
+ var t = Qr(e), r = document.documentElement.clientWidth, o = window.innerWidth;
773
773
  return {
774
774
  left: t[0],
775
775
  top: t[1],
776
776
  right: t[2],
777
777
  gap: Math.max(0, o - r + t[2] - t[0])
778
778
  };
779
- }, tn = Et(), H = "data-scroll-locked", rn = function(e, t, r, o) {
779
+ }, en = wt(), z = "data-scroll-locked", tn = function(e, t, r, o) {
780
780
  var a = e.left, n = e.top, i = e.right, u = e.gap;
781
781
  return r === void 0 && (r = "margin"), `
782
- .`.concat(kr, ` {
782
+ .`.concat(Lr, ` {
783
783
  overflow: hidden `).concat(o, `;
784
784
  padding-right: `).concat(u, "px ").concat(o, `;
785
785
  }
786
- body[`).concat(H, `] {
786
+ body[`).concat(z, `] {
787
787
  overflow: hidden `).concat(o, `;
788
788
  overscroll-behavior: contain;
789
789
  `).concat([
@@ -816,27 +816,27 @@ var Yr = function() {
816
816
  margin-right: 0 `).concat(o, `;
817
817
  }
818
818
 
819
- body[`).concat(H, `] {
820
- `).concat(Fr, ": ").concat(u, `px;
819
+ body[`).concat(z, `] {
820
+ `).concat(kr, ": ").concat(u, `px;
821
821
  }
822
822
  `);
823
- }, Ve = function() {
824
- var e = parseInt(document.body.getAttribute(H) || "0", 10);
823
+ }, Ue = function() {
824
+ var e = parseInt(document.body.getAttribute(z) || "0", 10);
825
825
  return isFinite(e) ? e : 0;
826
- }, nn = function() {
826
+ }, rn = function() {
827
827
  s.useEffect(function() {
828
- return document.body.setAttribute(H, (Ve() + 1).toString()), function() {
829
- var e = Ve() - 1;
830
- e <= 0 ? document.body.removeAttribute(H) : document.body.setAttribute(H, e.toString());
828
+ return document.body.setAttribute(z, (Ue() + 1).toString()), function() {
829
+ var e = Ue() - 1;
830
+ e <= 0 ? document.body.removeAttribute(z) : document.body.setAttribute(z, e.toString());
831
831
  };
832
832
  }, []);
833
- }, on = function(e) {
833
+ }, nn = function(e) {
834
834
  var t = e.noRelative, r = e.noImportant, o = e.gapMode, a = o === void 0 ? "margin" : o;
835
- nn();
835
+ rn();
836
836
  var n = s.useMemo(function() {
837
- return en(a);
837
+ return Jr(a);
838
838
  }, [a]);
839
- return s.createElement(tn, { styles: rn(n, !t, a, r ? "" : "!important") });
839
+ return s.createElement(en, { styles: tn(n, !t, a, r ? "" : "!important") });
840
840
  }, Ne = !1;
841
841
  if (typeof window < "u")
842
842
  try {
@@ -849,202 +849,202 @@ if (typeof window < "u")
849
849
  } catch {
850
850
  Ne = !1;
851
851
  }
852
- var U = Ne ? { passive: !1 } : !1, an = function(e) {
852
+ var B = Ne ? { passive: !1 } : !1, on = function(e) {
853
853
  return e.tagName === "TEXTAREA";
854
- }, Ct = function(e, t) {
854
+ }, Et = function(e, t) {
855
855
  if (!(e instanceof Element))
856
856
  return !1;
857
857
  var r = window.getComputedStyle(e);
858
858
  return (
859
859
  // not-not-scrollable
860
860
  r[t] !== "hidden" && // contains scroll inside self
861
- !(r.overflowY === r.overflowX && !an(e) && r[t] === "visible")
861
+ !(r.overflowY === r.overflowX && !on(e) && r[t] === "visible")
862
862
  );
863
+ }, an = function(e) {
864
+ return Et(e, "overflowY");
863
865
  }, un = function(e) {
864
- return Ct(e, "overflowY");
865
- }, sn = function(e) {
866
- return Ct(e, "overflowX");
867
- }, ze = function(e, t) {
866
+ return Et(e, "overflowX");
867
+ }, Ve = function(e, t) {
868
868
  var r = t.ownerDocument, o = t;
869
869
  do {
870
870
  typeof ShadowRoot < "u" && o instanceof ShadowRoot && (o = o.host);
871
- var a = St(e, o);
871
+ var a = Ct(e, o);
872
872
  if (a) {
873
- var n = Nt(e, o), i = n[1], u = n[2];
873
+ var n = St(e, o), i = n[1], u = n[2];
874
874
  if (i > u)
875
875
  return !0;
876
876
  }
877
877
  o = o.parentNode;
878
878
  } while (o && o !== r.body);
879
879
  return !1;
880
- }, cn = function(e) {
880
+ }, sn = function(e) {
881
881
  var t = e.scrollTop, r = e.scrollHeight, o = e.clientHeight;
882
882
  return [
883
883
  t,
884
884
  r,
885
885
  o
886
886
  ];
887
- }, ln = function(e) {
887
+ }, cn = function(e) {
888
888
  var t = e.scrollLeft, r = e.scrollWidth, o = e.clientWidth;
889
889
  return [
890
890
  t,
891
891
  r,
892
892
  o
893
893
  ];
894
+ }, Ct = function(e, t) {
895
+ return e === "v" ? an(t) : un(t);
894
896
  }, St = function(e, t) {
895
- return e === "v" ? un(t) : sn(t);
896
- }, Nt = function(e, t) {
897
- return e === "v" ? cn(t) : ln(t);
898
- }, dn = function(e, t) {
897
+ return e === "v" ? sn(t) : cn(t);
898
+ }, ln = function(e, t) {
899
899
  return e === "h" && t === "rtl" ? -1 : 1;
900
- }, pn = function(e, t, r, o, a) {
901
- var n = dn(e, window.getComputedStyle(t).direction), i = n * o, u = r.target, d = t.contains(u), c = !1, f = i > 0, v = 0, h = 0;
900
+ }, dn = function(e, t, r, o, a) {
901
+ var n = ln(e, window.getComputedStyle(t).direction), i = n * o, u = r.target, d = t.contains(u), l = !1, f = i > 0, v = 0, h = 0;
902
902
  do {
903
- var g = Nt(e, u), b = g[0], l = g[1], m = g[2], _ = l - m - n * b;
904
- (b || _) && St(e, u) && (v += _, h += b), u instanceof ShadowRoot ? u = u.host : u = u.parentNode;
903
+ var g = St(e, u), b = g[0], c = g[1], m = g[2], _ = c - m - n * b;
904
+ (b || _) && Ct(e, u) && (v += _, h += b), u instanceof ShadowRoot ? u = u.host : u = u.parentNode;
905
905
  } while (
906
906
  // portaled content
907
907
  !d && u !== document.body || // self content
908
908
  d && (t.contains(u) || t === u)
909
909
  );
910
- return (f && Math.abs(v) < 1 || !f && Math.abs(h) < 1) && (c = !0), c;
910
+ return (f && Math.abs(v) < 1 || !f && Math.abs(h) < 1) && (l = !0), l;
911
911
  }, J = function(e) {
912
912
  return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
913
- }, He = function(e) {
913
+ }, ze = function(e) {
914
914
  return [e.deltaX, e.deltaY];
915
- }, Ge = function(e) {
915
+ }, He = function(e) {
916
916
  return e && "current" in e ? e.current : e;
917
- }, fn = function(e, t) {
917
+ }, pn = function(e, t) {
918
918
  return e[0] === t[0] && e[1] === t[1];
919
- }, vn = function(e) {
919
+ }, fn = function(e) {
920
920
  return `
921
921
  .block-interactivity-`.concat(e, ` {pointer-events: none;}
922
922
  .allow-interactivity-`).concat(e, ` {pointer-events: all;}
923
923
  `);
924
- }, hn = 0, V = [];
925
- function mn(e) {
926
- var t = s.useRef([]), r = s.useRef([0, 0]), o = s.useRef(), a = s.useState(hn++)[0], n = s.useState(Et)[0], i = s.useRef(e);
924
+ }, vn = 0, U = [];
925
+ function hn(e) {
926
+ var t = s.useRef([]), r = s.useRef([0, 0]), o = s.useRef(), a = s.useState(vn++)[0], n = s.useState(wt)[0], i = s.useRef(e);
927
927
  s.useEffect(function() {
928
928
  i.current = e;
929
929
  }, [e]), s.useEffect(function() {
930
930
  if (e.inert) {
931
931
  document.body.classList.add("block-interactivity-".concat(a));
932
- var l = Lr([e.lockRef.current], (e.shards || []).map(Ge), !0).filter(Boolean);
933
- return l.forEach(function(m) {
932
+ var c = Ir([e.lockRef.current], (e.shards || []).map(He), !0).filter(Boolean);
933
+ return c.forEach(function(m) {
934
934
  return m.classList.add("allow-interactivity-".concat(a));
935
935
  }), function() {
936
- document.body.classList.remove("block-interactivity-".concat(a)), l.forEach(function(m) {
936
+ document.body.classList.remove("block-interactivity-".concat(a)), c.forEach(function(m) {
937
937
  return m.classList.remove("allow-interactivity-".concat(a));
938
938
  });
939
939
  };
940
940
  }
941
941
  }, [e.inert, e.lockRef.current, e.shards]);
942
- var u = s.useCallback(function(l, m) {
943
- if ("touches" in l && l.touches.length === 2 || l.type === "wheel" && l.ctrlKey)
942
+ var u = s.useCallback(function(c, m) {
943
+ if ("touches" in c && c.touches.length === 2 || c.type === "wheel" && c.ctrlKey)
944
944
  return !i.current.allowPinchZoom;
945
- var _ = J(l), S = r.current, w = "deltaX" in l ? l.deltaX : S[0] - _[0], E = "deltaY" in l ? l.deltaY : S[1] - _[1], C, x = l.target, y = Math.abs(w) > Math.abs(E) ? "h" : "v";
946
- if ("touches" in l && y === "h" && x.type === "range")
945
+ var _ = J(c), S = r.current, w = "deltaX" in c ? c.deltaX : S[0] - _[0], E = "deltaY" in c ? c.deltaY : S[1] - _[1], C, P = c.target, y = Math.abs(w) > Math.abs(E) ? "h" : "v";
946
+ if ("touches" in c && y === "h" && P.type === "range")
947
947
  return !1;
948
- var O = ze(y, x);
949
- if (!O)
948
+ var R = Ve(y, P);
949
+ if (!R)
950
950
  return !0;
951
- if (O ? C = y : (C = y === "v" ? "h" : "v", O = ze(y, x)), !O)
951
+ if (R ? C = y : (C = y === "v" ? "h" : "v", R = Ve(y, P)), !R)
952
952
  return !1;
953
- if (!o.current && "changedTouches" in l && (w || E) && (o.current = C), !C)
953
+ if (!o.current && "changedTouches" in c && (w || E) && (o.current = C), !C)
954
954
  return !0;
955
- var L = o.current || C;
956
- return pn(L, m, l, L === "h" ? w : E);
957
- }, []), d = s.useCallback(function(l) {
958
- var m = l;
959
- if (!(!V.length || V[V.length - 1] !== n)) {
960
- var _ = "deltaY" in m ? He(m) : J(m), S = t.current.filter(function(C) {
961
- return C.name === m.type && (C.target === m.target || m.target === C.shadowParent) && fn(C.delta, _);
955
+ var O = o.current || C;
956
+ return dn(O, m, c, O === "h" ? w : E);
957
+ }, []), d = s.useCallback(function(c) {
958
+ var m = c;
959
+ if (!(!U.length || U[U.length - 1] !== n)) {
960
+ var _ = "deltaY" in m ? ze(m) : J(m), S = t.current.filter(function(C) {
961
+ return C.name === m.type && (C.target === m.target || m.target === C.shadowParent) && pn(C.delta, _);
962
962
  })[0];
963
963
  if (S && S.should) {
964
964
  m.cancelable && m.preventDefault();
965
965
  return;
966
966
  }
967
967
  if (!S) {
968
- var w = (i.current.shards || []).map(Ge).filter(Boolean).filter(function(C) {
968
+ var w = (i.current.shards || []).map(He).filter(Boolean).filter(function(C) {
969
969
  return C.contains(m.target);
970
970
  }), E = w.length > 0 ? u(m, w[0]) : !i.current.noIsolation;
971
971
  E && m.cancelable && m.preventDefault();
972
972
  }
973
973
  }
974
- }, []), c = s.useCallback(function(l, m, _, S) {
975
- var w = { name: l, delta: m, target: _, should: S, shadowParent: gn(_) };
974
+ }, []), l = s.useCallback(function(c, m, _, S) {
975
+ var w = { name: c, delta: m, target: _, should: S, shadowParent: mn(_) };
976
976
  t.current.push(w), setTimeout(function() {
977
977
  t.current = t.current.filter(function(E) {
978
978
  return E !== w;
979
979
  });
980
980
  }, 1);
981
- }, []), f = s.useCallback(function(l) {
982
- r.current = J(l), o.current = void 0;
983
- }, []), v = s.useCallback(function(l) {
984
- c(l.type, He(l), l.target, u(l, e.lockRef.current));
985
- }, []), h = s.useCallback(function(l) {
986
- c(l.type, J(l), l.target, u(l, e.lockRef.current));
981
+ }, []), f = s.useCallback(function(c) {
982
+ r.current = J(c), o.current = void 0;
983
+ }, []), v = s.useCallback(function(c) {
984
+ l(c.type, ze(c), c.target, u(c, e.lockRef.current));
985
+ }, []), h = s.useCallback(function(c) {
986
+ l(c.type, J(c), c.target, u(c, e.lockRef.current));
987
987
  }, []);
988
988
  s.useEffect(function() {
989
- return V.push(n), e.setCallbacks({
989
+ return U.push(n), e.setCallbacks({
990
990
  onScrollCapture: v,
991
991
  onWheelCapture: v,
992
992
  onTouchMoveCapture: h
993
- }), document.addEventListener("wheel", d, U), document.addEventListener("touchmove", d, U), document.addEventListener("touchstart", f, U), function() {
994
- V = V.filter(function(l) {
995
- return l !== n;
996
- }), document.removeEventListener("wheel", d, U), document.removeEventListener("touchmove", d, U), document.removeEventListener("touchstart", f, U);
993
+ }), document.addEventListener("wheel", d, B), document.addEventListener("touchmove", d, B), document.addEventListener("touchstart", f, B), function() {
994
+ U = U.filter(function(c) {
995
+ return c !== n;
996
+ }), document.removeEventListener("wheel", d, B), document.removeEventListener("touchmove", d, B), document.removeEventListener("touchstart", f, B);
997
997
  };
998
998
  }, []);
999
999
  var g = e.removeScrollBar, b = e.inert;
1000
1000
  return s.createElement(
1001
1001
  s.Fragment,
1002
1002
  null,
1003
- b ? s.createElement(n, { styles: vn(a) }) : null,
1004
- g ? s.createElement(on, { gapMode: e.gapMode }) : null
1003
+ b ? s.createElement(n, { styles: fn(a) }) : null,
1004
+ g ? s.createElement(nn, { gapMode: e.gapMode }) : null
1005
1005
  );
1006
1006
  }
1007
- function gn(e) {
1007
+ function mn(e) {
1008
1008
  for (var t = null; e !== null; )
1009
1009
  e instanceof ShadowRoot && (t = e.host, e = e.host), e = e.parentNode;
1010
1010
  return t;
1011
1011
  }
1012
- const _n = zr(wt, mn);
1013
- var Pt = s.forwardRef(function(e, t) {
1014
- return s.createElement(le, T({}, e, { ref: t, sideCar: _n }));
1012
+ const gn = Vr(bt, hn);
1013
+ var Nt = s.forwardRef(function(e, t) {
1014
+ return s.createElement(le, T({}, e, { ref: t, sideCar: gn }));
1015
1015
  });
1016
- Pt.classNames = le.classNames;
1017
- var yn = function(e) {
1016
+ Nt.classNames = le.classNames;
1017
+ var _n = function(e) {
1018
1018
  if (typeof document > "u")
1019
1019
  return null;
1020
1020
  var t = Array.isArray(e) ? e[0] : e;
1021
1021
  return t.ownerDocument.body;
1022
- }, z = /* @__PURE__ */ new WeakMap(), ee = /* @__PURE__ */ new WeakMap(), te = {}, _e = 0, Ot = function(e) {
1023
- return e && (e.host || Ot(e.parentNode));
1024
- }, bn = function(e, t) {
1022
+ }, V = /* @__PURE__ */ new WeakMap(), ee = /* @__PURE__ */ new WeakMap(), te = {}, _e = 0, Pt = function(e) {
1023
+ return e && (e.host || Pt(e.parentNode));
1024
+ }, yn = function(e, t) {
1025
1025
  return t.map(function(r) {
1026
1026
  if (e.contains(r))
1027
1027
  return r;
1028
- var o = Ot(r);
1028
+ var o = Pt(r);
1029
1029
  return o && e.contains(o) ? o : (console.error("aria-hidden", r, "in not contained inside", e, ". Doing nothing"), null);
1030
1030
  }).filter(function(r) {
1031
1031
  return !!r;
1032
1032
  });
1033
- }, wn = function(e, t, r, o) {
1034
- var a = bn(t, Array.isArray(e) ? e : [e]);
1033
+ }, bn = function(e, t, r, o) {
1034
+ var a = yn(t, Array.isArray(e) ? e : [e]);
1035
1035
  te[r] || (te[r] = /* @__PURE__ */ new WeakMap());
1036
- var n = te[r], i = [], u = /* @__PURE__ */ new Set(), d = new Set(a), c = function(v) {
1037
- !v || u.has(v) || (u.add(v), c(v.parentNode));
1036
+ var n = te[r], i = [], u = /* @__PURE__ */ new Set(), d = new Set(a), l = function(v) {
1037
+ !v || u.has(v) || (u.add(v), l(v.parentNode));
1038
1038
  };
1039
- a.forEach(c);
1039
+ a.forEach(l);
1040
1040
  var f = function(v) {
1041
1041
  !v || d.has(v) || Array.prototype.forEach.call(v.children, function(h) {
1042
1042
  if (u.has(h))
1043
1043
  f(h);
1044
1044
  else
1045
1045
  try {
1046
- var g = h.getAttribute(o), b = g !== null && g !== "false", l = (z.get(h) || 0) + 1, m = (n.get(h) || 0) + 1;
1047
- z.set(h, l), n.set(h, m), i.push(h), l === 1 && b && ee.set(h, !0), m === 1 && h.setAttribute(r, "true"), b || h.setAttribute(o, "true");
1046
+ var g = h.getAttribute(o), b = g !== null && g !== "false", c = (V.get(h) || 0) + 1, m = (n.get(h) || 0) + 1;
1047
+ V.set(h, c), n.set(h, m), i.push(h), c === 1 && b && ee.set(h, !0), m === 1 && h.setAttribute(r, "true"), b || h.setAttribute(o, "true");
1048
1048
  } catch (_) {
1049
1049
  console.error("aria-hidden: cannot operate on ", h, _);
1050
1050
  }
@@ -1052,17 +1052,17 @@ var yn = function(e) {
1052
1052
  };
1053
1053
  return f(t), u.clear(), _e++, function() {
1054
1054
  i.forEach(function(v) {
1055
- var h = z.get(v) - 1, g = n.get(v) - 1;
1056
- z.set(v, h), n.set(v, g), h || (ee.has(v) || v.removeAttribute(o), ee.delete(v)), g || v.removeAttribute(r);
1057
- }), _e--, _e || (z = /* @__PURE__ */ new WeakMap(), z = /* @__PURE__ */ new WeakMap(), ee = /* @__PURE__ */ new WeakMap(), te = {});
1055
+ var h = V.get(v) - 1, g = n.get(v) - 1;
1056
+ V.set(v, h), n.set(v, g), h || (ee.has(v) || v.removeAttribute(o), ee.delete(v)), g || v.removeAttribute(r);
1057
+ }), _e--, _e || (V = /* @__PURE__ */ new WeakMap(), V = /* @__PURE__ */ new WeakMap(), ee = /* @__PURE__ */ new WeakMap(), te = {});
1058
1058
  };
1059
- }, En = function(e, t, r) {
1059
+ }, wn = function(e, t, r) {
1060
1060
  r === void 0 && (r = "data-aria-hidden");
1061
- var o = Array.from(Array.isArray(e) ? e : [e]), a = yn(e);
1062
- return a ? (o.push.apply(o, Array.from(a.querySelectorAll("[aria-live]"))), wn(o, a, r, "aria-hidden")) : function() {
1061
+ var o = Array.from(Array.isArray(e) ? e : [e]), a = _n(e);
1062
+ return a ? (o.push.apply(o, Array.from(a.querySelectorAll("[aria-live]"))), bn(o, a, r, "aria-hidden")) : function() {
1063
1063
  return null;
1064
1064
  };
1065
- }, Re = "Dialog", [xt, Uo] = or(Re), [Cn, A] = xt(Re), Rt = (e) => {
1065
+ }, Re = "Dialog", [xt, qo] = nr(Re), [En, A] = xt(Re), Ot = (e) => {
1066
1066
  const {
1067
1067
  __scopeDialog: t,
1068
1068
  children: r,
@@ -1070,13 +1070,13 @@ var yn = function(e) {
1070
1070
  defaultOpen: a,
1071
1071
  onOpenChange: n,
1072
1072
  modal: i = !0
1073
- } = e, u = s.useRef(null), d = s.useRef(null), [c = !1, f] = sr({
1073
+ } = e, u = s.useRef(null), d = s.useRef(null), [l = !1, f] = ur({
1074
1074
  prop: o,
1075
1075
  defaultProp: a,
1076
1076
  onChange: n
1077
1077
  });
1078
1078
  return /* @__PURE__ */ p(
1079
- Cn,
1079
+ En,
1080
1080
  {
1081
1081
  scope: t,
1082
1082
  triggerRef: u,
@@ -1084,7 +1084,7 @@ var yn = function(e) {
1084
1084
  contentId: de(),
1085
1085
  titleId: de(),
1086
1086
  descriptionId: de(),
1087
- open: c,
1087
+ open: l,
1088
1088
  onOpenChange: f,
1089
1089
  onOpenToggle: s.useCallback(() => f((v) => !v), [f]),
1090
1090
  modal: i,
@@ -1092,10 +1092,10 @@ var yn = function(e) {
1092
1092
  }
1093
1093
  );
1094
1094
  };
1095
- Rt.displayName = Re;
1096
- var At = "DialogTrigger", Dt = s.forwardRef(
1095
+ Ot.displayName = Re;
1096
+ var Rt = "DialogTrigger", At = s.forwardRef(
1097
1097
  (e, t) => {
1098
- const { __scopeDialog: r, ...o } = e, a = A(At, r), n = B(t, a.triggerRef);
1098
+ const { __scopeDialog: r, ...o } = e, a = A(Rt, r), n = j(t, a.triggerRef);
1099
1099
  return /* @__PURE__ */ p(
1100
1100
  M.button,
1101
1101
  {
@@ -1111,28 +1111,28 @@ var At = "DialogTrigger", Dt = s.forwardRef(
1111
1111
  );
1112
1112
  }
1113
1113
  );
1114
- Dt.displayName = At;
1115
- var Ae = "DialogPortal", [Sn, Tt] = xt(Ae, {
1114
+ At.displayName = Rt;
1115
+ var Ae = "DialogPortal", [Cn, Dt] = xt(Ae, {
1116
1116
  forceMount: void 0
1117
- }), Mt = (e) => {
1117
+ }), Tt = (e) => {
1118
1118
  const { __scopeDialog: t, forceMount: r, children: o, container: a } = e, n = A(Ae, t);
1119
- return /* @__PURE__ */ p(Sn, { scope: t, forceMount: r, children: s.Children.map(o, (i) => /* @__PURE__ */ p(ce, { present: r || n.open, children: /* @__PURE__ */ p(_t, { asChild: !0, container: a, children: i }) })) });
1119
+ return /* @__PURE__ */ p(Cn, { scope: t, forceMount: r, children: s.Children.map(o, (i) => /* @__PURE__ */ p(ce, { present: r || n.open, children: /* @__PURE__ */ p(gt, { asChild: !0, container: a, children: i }) })) });
1120
1120
  };
1121
- Mt.displayName = Ae;
1122
- var se = "DialogOverlay", $t = s.forwardRef(
1121
+ Tt.displayName = Ae;
1122
+ var se = "DialogOverlay", Mt = s.forwardRef(
1123
1123
  (e, t) => {
1124
- const r = Tt(se, e.__scopeDialog), { forceMount: o = r.forceMount, ...a } = e, n = A(se, e.__scopeDialog);
1125
- return n.modal ? /* @__PURE__ */ p(ce, { present: o || n.open, children: /* @__PURE__ */ p(Nn, { ...a, ref: t }) }) : null;
1124
+ const r = Dt(se, e.__scopeDialog), { forceMount: o = r.forceMount, ...a } = e, n = A(se, e.__scopeDialog);
1125
+ return n.modal ? /* @__PURE__ */ p(ce, { present: o || n.open, children: /* @__PURE__ */ p(Sn, { ...a, ref: t }) }) : null;
1126
1126
  }
1127
1127
  );
1128
- $t.displayName = se;
1129
- var Nn = s.forwardRef(
1128
+ Mt.displayName = se;
1129
+ var Sn = s.forwardRef(
1130
1130
  (e, t) => {
1131
1131
  const { __scopeDialog: r, ...o } = e, a = A(se, r);
1132
1132
  return (
1133
1133
  // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
1134
1134
  // ie. when `Overlay` and `Content` are siblings
1135
- /* @__PURE__ */ p(Pt, { as: xe, allowPinchZoom: !0, shards: [a.contentRef], children: /* @__PURE__ */ p(
1135
+ /* @__PURE__ */ p(Nt, { as: Oe, allowPinchZoom: !0, shards: [a.contentRef], children: /* @__PURE__ */ p(
1136
1136
  M.div,
1137
1137
  {
1138
1138
  "data-state": Te(a.open),
@@ -1143,21 +1143,21 @@ var Nn = s.forwardRef(
1143
1143
  ) })
1144
1144
  );
1145
1145
  }
1146
- ), j = "DialogContent", It = s.forwardRef(
1146
+ ), W = "DialogContent", $t = s.forwardRef(
1147
1147
  (e, t) => {
1148
- const r = Tt(j, e.__scopeDialog), { forceMount: o = r.forceMount, ...a } = e, n = A(j, e.__scopeDialog);
1149
- return /* @__PURE__ */ p(ce, { present: o || n.open, children: n.modal ? /* @__PURE__ */ p(Pn, { ...a, ref: t }) : /* @__PURE__ */ p(On, { ...a, ref: t }) });
1148
+ const r = Dt(W, e.__scopeDialog), { forceMount: o = r.forceMount, ...a } = e, n = A(W, e.__scopeDialog);
1149
+ return /* @__PURE__ */ p(ce, { present: o || n.open, children: n.modal ? /* @__PURE__ */ p(Nn, { ...a, ref: t }) : /* @__PURE__ */ p(Pn, { ...a, ref: t }) });
1150
1150
  }
1151
1151
  );
1152
- It.displayName = j;
1153
- var Pn = s.forwardRef(
1152
+ $t.displayName = W;
1153
+ var Nn = s.forwardRef(
1154
1154
  (e, t) => {
1155
- const r = A(j, e.__scopeDialog), o = s.useRef(null), a = B(t, r.contentRef, o);
1155
+ const r = A(W, e.__scopeDialog), o = s.useRef(null), a = j(t, r.contentRef, o);
1156
1156
  return s.useEffect(() => {
1157
1157
  const n = o.current;
1158
- if (n) return En(n);
1158
+ if (n) return wn(n);
1159
1159
  }, []), /* @__PURE__ */ p(
1160
- Lt,
1160
+ It,
1161
1161
  {
1162
1162
  ...e,
1163
1163
  ref: a,
@@ -1178,11 +1178,11 @@ var Pn = s.forwardRef(
1178
1178
  }
1179
1179
  );
1180
1180
  }
1181
- ), On = s.forwardRef(
1181
+ ), Pn = s.forwardRef(
1182
1182
  (e, t) => {
1183
- const r = A(j, e.__scopeDialog), o = s.useRef(!1), a = s.useRef(!1);
1183
+ const r = A(W, e.__scopeDialog), o = s.useRef(!1), a = s.useRef(!1);
1184
1184
  return /* @__PURE__ */ p(
1185
- Lt,
1185
+ It,
1186
1186
  {
1187
1187
  ...e,
1188
1188
  ref: t,
@@ -1193,20 +1193,20 @@ var Pn = s.forwardRef(
1193
1193
  (i = e.onCloseAutoFocus) == null || i.call(e, n), n.defaultPrevented || (o.current || (u = r.triggerRef.current) == null || u.focus(), n.preventDefault()), o.current = !1, a.current = !1;
1194
1194
  },
1195
1195
  onInteractOutside: (n) => {
1196
- var d, c;
1196
+ var d, l;
1197
1197
  (d = e.onInteractOutside) == null || d.call(e, n), n.defaultPrevented || (o.current = !0, n.detail.originalEvent.type === "pointerdown" && (a.current = !0));
1198
1198
  const i = n.target;
1199
- ((c = r.triggerRef.current) == null ? void 0 : c.contains(i)) && n.preventDefault(), n.detail.originalEvent.type === "focusin" && a.current && n.preventDefault();
1199
+ ((l = r.triggerRef.current) == null ? void 0 : l.contains(i)) && n.preventDefault(), n.detail.originalEvent.type === "focusin" && a.current && n.preventDefault();
1200
1200
  }
1201
1201
  }
1202
1202
  );
1203
1203
  }
1204
- ), Lt = s.forwardRef(
1204
+ ), It = s.forwardRef(
1205
1205
  (e, t) => {
1206
- const { __scopeDialog: r, trapFocus: o, onOpenAutoFocus: a, onCloseAutoFocus: n, ...i } = e, u = A(j, r), d = s.useRef(null), c = B(t, d);
1207
- return Ir(), /* @__PURE__ */ R(ie, { children: [
1206
+ const { __scopeDialog: r, trapFocus: o, onOpenAutoFocus: a, onCloseAutoFocus: n, ...i } = e, u = A(W, r), d = s.useRef(null), l = j(t, d);
1207
+ return $r(), /* @__PURE__ */ D(ie, { children: [
1208
1208
  /* @__PURE__ */ p(
1209
- mt,
1209
+ ht,
1210
1210
  {
1211
1211
  asChild: !0,
1212
1212
  loop: !0,
@@ -1214,7 +1214,7 @@ var Pn = s.forwardRef(
1214
1214
  onMountAutoFocus: a,
1215
1215
  onUnmountAutoFocus: n,
1216
1216
  children: /* @__PURE__ */ p(
1217
- vt,
1217
+ ft,
1218
1218
  {
1219
1219
  role: "dialog",
1220
1220
  id: u.contentId,
@@ -1222,35 +1222,35 @@ var Pn = s.forwardRef(
1222
1222
  "aria-labelledby": u.titleId,
1223
1223
  "data-state": Te(u.open),
1224
1224
  ...i,
1225
- ref: c,
1225
+ ref: l,
1226
1226
  onDismiss: () => u.onOpenChange(!1)
1227
1227
  }
1228
1228
  )
1229
1229
  }
1230
1230
  ),
1231
- /* @__PURE__ */ R(ie, { children: [
1231
+ /* @__PURE__ */ D(ie, { children: [
1232
1232
  /* @__PURE__ */ p(xn, { titleId: u.titleId }),
1233
- /* @__PURE__ */ p(An, { contentRef: d, descriptionId: u.descriptionId })
1233
+ /* @__PURE__ */ p(Rn, { contentRef: d, descriptionId: u.descriptionId })
1234
1234
  ] })
1235
1235
  ] });
1236
1236
  }
1237
- ), De = "DialogTitle", kt = s.forwardRef(
1237
+ ), De = "DialogTitle", Lt = s.forwardRef(
1238
1238
  (e, t) => {
1239
1239
  const { __scopeDialog: r, ...o } = e, a = A(De, r);
1240
1240
  return /* @__PURE__ */ p(M.h2, { id: a.titleId, ...o, ref: t });
1241
1241
  }
1242
1242
  );
1243
- kt.displayName = De;
1244
- var Ft = "DialogDescription", Wt = s.forwardRef(
1243
+ Lt.displayName = De;
1244
+ var kt = "DialogDescription", Ft = s.forwardRef(
1245
1245
  (e, t) => {
1246
- const { __scopeDialog: r, ...o } = e, a = A(Ft, r);
1246
+ const { __scopeDialog: r, ...o } = e, a = A(kt, r);
1247
1247
  return /* @__PURE__ */ p(M.p, { id: a.descriptionId, ...o, ref: t });
1248
1248
  }
1249
1249
  );
1250
- Wt.displayName = Ft;
1251
- var jt = "DialogClose", Bt = s.forwardRef(
1250
+ Ft.displayName = kt;
1251
+ var Wt = "DialogClose", jt = s.forwardRef(
1252
1252
  (e, t) => {
1253
- const { __scopeDialog: r, ...o } = e, a = A(jt, r);
1253
+ const { __scopeDialog: r, ...o } = e, a = A(Wt, r);
1254
1254
  return /* @__PURE__ */ p(
1255
1255
  M.button,
1256
1256
  {
@@ -1262,16 +1262,16 @@ var jt = "DialogClose", Bt = s.forwardRef(
1262
1262
  );
1263
1263
  }
1264
1264
  );
1265
- Bt.displayName = jt;
1265
+ jt.displayName = Wt;
1266
1266
  function Te(e) {
1267
1267
  return e ? "open" : "closed";
1268
1268
  }
1269
- var qt = "DialogTitleWarning", [Vo, Ut] = nr(qt, {
1270
- contentName: j,
1269
+ var qt = "DialogTitleWarning", [Bo, Bt] = rr(qt, {
1270
+ contentName: W,
1271
1271
  titleName: De,
1272
1272
  docsSlug: "dialog"
1273
1273
  }), xn = ({ titleId: e }) => {
1274
- const t = Ut(qt), r = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
1274
+ const t = Bt(qt), r = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
1275
1275
 
1276
1276
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
1277
1277
 
@@ -1279,28 +1279,28 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
1279
1279
  return s.useEffect(() => {
1280
1280
  e && (document.getElementById(e) || console.error(r));
1281
1281
  }, [r, e]), null;
1282
- }, Rn = "DialogDescriptionWarning", An = ({ contentRef: e, descriptionId: t }) => {
1283
- const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Ut(Rn).contentName}}.`;
1282
+ }, On = "DialogDescriptionWarning", Rn = ({ contentRef: e, descriptionId: t }) => {
1283
+ const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Bt(On).contentName}}.`;
1284
1284
  return s.useEffect(() => {
1285
1285
  var n;
1286
1286
  const a = (n = e.current) == null ? void 0 : n.getAttribute("aria-describedby");
1287
1287
  t && a && (document.getElementById(t) || console.warn(o));
1288
1288
  }, [o, e, t]), null;
1289
- }, Dn = Rt, Tn = Dt, Mn = Mt, $n = $t, In = It, Ln = kt, Ke = Wt, kn = Bt;
1290
- const Fn = {
1289
+ }, An = Ot, Dn = At, Tn = Tt, Mn = Mt, $n = $t, In = Lt, Ge = Ft, Ln = jt;
1290
+ const kn = {
1291
1291
  LG: "lg"
1292
1292
  };
1293
- function Wn(e) {
1293
+ function Fn(e) {
1294
1294
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
1295
1295
  }
1296
- var Xe = { exports: {} };
1296
+ var Ke = { exports: {} };
1297
1297
  /*!
1298
1298
  Copyright (c) 2018 Jed Watson.
1299
1299
  Licensed under the MIT License (MIT), see
1300
1300
  http://jedwatson.github.io/classnames
1301
1301
  */
1302
1302
  var Ye;
1303
- function jn() {
1303
+ function Wn() {
1304
1304
  return Ye || (Ye = 1, function(e) {
1305
1305
  (function() {
1306
1306
  var t = {}.hasOwnProperty;
@@ -1330,10 +1330,10 @@ function jn() {
1330
1330
  }
1331
1331
  e.exports ? (r.default = r, e.exports = r) : window.classNames = r;
1332
1332
  })();
1333
- }(Xe)), Xe.exports;
1333
+ }(Ke)), Ke.exports;
1334
1334
  }
1335
- var Bn = jn();
1336
- const Ze = /* @__PURE__ */ Wn(Bn), qn = "_rotate_1xozj_1", Un = "_dash_1xozj_1", G = {
1335
+ var jn = Wn();
1336
+ const Xe = /* @__PURE__ */ Fn(jn), qn = "_rotate_1xozj_1", Bn = "_dash_1xozj_1", G = {
1337
1337
  "purpur-spinner": "_purpur-spinner_1xozj_1",
1338
1338
  rotate: qn,
1339
1339
  "purpur-spinner--xxs": "_purpur-spinner--xxs_1xozj_4",
@@ -1342,27 +1342,27 @@ const Ze = /* @__PURE__ */ Wn(Bn), qn = "_rotate_1xozj_1", Un = "_dash_1xozj_1",
1342
1342
  "purpur-spinner--md": "_purpur-spinner--md_1xozj_16",
1343
1343
  "purpur-spinner--lg": "_purpur-spinner--lg_1xozj_20",
1344
1344
  "purpur-spinner__circle": "_purpur-spinner__circle_1xozj_24",
1345
- dash: Un,
1345
+ dash: Bn,
1346
1346
  "purpur-spinner__circle--disabled": "_purpur-spinner__circle--disabled_1xozj_33",
1347
1347
  "purpur-spinner__circle--negative": "_purpur-spinner__circle--negative_1xozj_36"
1348
- }, K = "purpur-spinner", Vn = {
1348
+ }, K = "purpur-spinner", Un = {
1349
1349
  SM: "sm"
1350
- }, zn = ({
1350
+ }, Vn = ({
1351
1351
  ["data-testid"]: e,
1352
1352
  disabled: t = !1,
1353
1353
  negative: r = !1,
1354
- size: o = Vn.SM,
1354
+ size: o = Un.SM,
1355
1355
  ...a
1356
1356
  }) => /* @__PURE__ */ p(
1357
1357
  "div",
1358
1358
  {
1359
- className: Ze([G[K], G[`${K}--${o}`]]),
1359
+ className: Xe([G[K], G[`${K}--${o}`]]),
1360
1360
  "data-testid": e,
1361
1361
  ...a,
1362
1362
  children: /* @__PURE__ */ p("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ p(
1363
1363
  "circle",
1364
1364
  {
1365
- className: Ze(G[`${K}__circle`], {
1365
+ className: Xe(G[`${K}__circle`], {
1366
1366
  [G[`${K}__circle--disabled`]]: t,
1367
1367
  [G[`${K}__circle--negative`]]: r
1368
1368
  }),
@@ -1373,18 +1373,18 @@ const Ze = /* @__PURE__ */ Wn(Bn), qn = "_rotate_1xozj_1", Un = "_dash_1xozj_1",
1373
1373
  ) })
1374
1374
  }
1375
1375
  );
1376
- function Hn(e) {
1376
+ function zn(e) {
1377
1377
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
1378
1378
  }
1379
- var Qe = { exports: {} };
1379
+ var Ze = { exports: {} };
1380
1380
  /*!
1381
1381
  Copyright (c) 2018 Jed Watson.
1382
1382
  Licensed under the MIT License (MIT), see
1383
1383
  http://jedwatson.github.io/classnames
1384
1384
  */
1385
- var Je;
1386
- function Gn() {
1387
- return Je || (Je = 1, function(e) {
1385
+ var Qe;
1386
+ function Hn() {
1387
+ return Qe || (Qe = 1, function(e) {
1388
1388
  (function() {
1389
1389
  var t = {}.hasOwnProperty;
1390
1390
  function r() {
@@ -1413,10 +1413,10 @@ function Gn() {
1413
1413
  }
1414
1414
  e.exports ? (r.default = r, e.exports = r) : window.classNames = r;
1415
1415
  })();
1416
- }(Qe)), Qe.exports;
1416
+ }(Ze)), Ze.exports;
1417
1417
  }
1418
- var Kn = Gn();
1419
- const Xn = /* @__PURE__ */ Hn(Kn), Yn = {
1418
+ var Gn = Hn();
1419
+ const Kn = /* @__PURE__ */ zn(Gn), Yn = {
1420
1420
  "purpur-button": "_purpur-button_w455q_1",
1421
1421
  "purpur-button--xs": "_purpur-button--xs_w455q_33",
1422
1422
  "purpur-button--icon-only": "_purpur-button--icon-only_w455q_36",
@@ -1438,7 +1438,7 @@ const Xn = /* @__PURE__ */ Hn(Kn), Yn = {
1438
1438
  "purpur-button--tertiary-purple-negative": "_purpur-button--tertiary-purple-negative_w455q_166",
1439
1439
  "purpur-button--text-negative": "_purpur-button--text-negative_w455q_181",
1440
1440
  "purpur-button--text": "_purpur-button--text_w455q_181"
1441
- }, Zn = Xn.bind(Yn), F = "purpur-button", Qn = ({
1441
+ }, Xn = Kn.bind(Yn), k = "purpur-button", Zn = ({
1442
1442
  children: e,
1443
1443
  className: t,
1444
1444
  ["data-testid"]: r,
@@ -1448,30 +1448,30 @@ const Xn = /* @__PURE__ */ Hn(Kn), Yn = {
1448
1448
  loading: i = !1,
1449
1449
  negative: u = !1,
1450
1450
  onClick: d,
1451
- size: c = "md",
1451
+ size: l = "md",
1452
1452
  variant: f,
1453
1453
  type: v = "button",
1454
1454
  ...h
1455
1455
  }, g) => {
1456
1456
  if (n && f === "destructive")
1457
1457
  return null;
1458
- const b = Zn(
1458
+ const b = Xn(
1459
1459
  [
1460
- F,
1461
- `${F}--${u ? `${f}-negative` : f}`,
1462
- `${F}--${c}`
1460
+ k,
1461
+ `${k}--${u ? `${f}-negative` : f}`,
1462
+ `${k}--${l}`
1463
1463
  ],
1464
1464
  {
1465
- [`${F}--icon-only`]: n,
1466
- [`${F}--negative`]: u,
1467
- [`${F}--full-width`]: a,
1468
- [`${F}--disabled`]: o || i
1465
+ [`${k}--icon-only`]: n,
1466
+ [`${k}--negative`]: u,
1467
+ [`${k}--full-width`]: a,
1468
+ [`${k}--disabled`]: o || i
1469
1469
  },
1470
1470
  t
1471
- ), l = (_) => {
1471
+ ), c = (_) => {
1472
1472
  o || i ? _.preventDefault() : d && d(_);
1473
1473
  }, m = !!h["aria-disabled"] || o || i;
1474
- return /* @__PURE__ */ R(
1474
+ return /* @__PURE__ */ D(
1475
1475
  "button",
1476
1476
  {
1477
1477
  className: b,
@@ -1479,29 +1479,29 @@ const Xn = /* @__PURE__ */ Hn(Kn), Yn = {
1479
1479
  type: v,
1480
1480
  ref: g,
1481
1481
  "aria-disabled": m,
1482
- onClick: l,
1482
+ onClick: c,
1483
1483
  ...h,
1484
1484
  children: [
1485
- i && /* @__PURE__ */ p(zn, { size: c === Fn.LG ? "xs" : "xxs", negative: u, disabled: m }),
1485
+ i && /* @__PURE__ */ p(Vn, { size: l === kn.LG ? "xs" : "xxs", negative: u, disabled: m }),
1486
1486
  " ",
1487
1487
  e
1488
1488
  ]
1489
1489
  }
1490
1490
  );
1491
- }, Me = Oe(Qn);
1492
- Me.displayName = "Button";
1493
- function Jn(e) {
1491
+ }, Ut = xe(Zn);
1492
+ Ut.displayName = "Button";
1493
+ function Qn(e) {
1494
1494
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
1495
1495
  }
1496
- var et = { exports: {} };
1496
+ var Je = { exports: {} };
1497
1497
  /*!
1498
1498
  Copyright (c) 2018 Jed Watson.
1499
1499
  Licensed under the MIT License (MIT), see
1500
1500
  http://jedwatson.github.io/classnames
1501
1501
  */
1502
- var tt;
1503
- function eo() {
1504
- return tt || (tt = 1, function(e) {
1502
+ var et;
1503
+ function Jn() {
1504
+ return et || (et = 1, function(e) {
1505
1505
  (function() {
1506
1506
  var t = {}.hasOwnProperty;
1507
1507
  function r() {
@@ -1530,10 +1530,10 @@ function eo() {
1530
1530
  }
1531
1531
  e.exports ? (r.default = r, e.exports = r) : window.classNames = r;
1532
1532
  })();
1533
- }(et)), et.exports;
1533
+ }(Je)), Je.exports;
1534
1534
  }
1535
- var to = eo();
1536
- const ro = /* @__PURE__ */ Jn(to), re = {
1535
+ var eo = Jn();
1536
+ const to = /* @__PURE__ */ Qn(eo), re = {
1537
1537
  "purpur-heading": "_purpur-heading_k9fhq_1",
1538
1538
  "purpur-heading--hyphens": "_purpur-heading--hyphens_k9fhq_8",
1539
1539
  "purpur-heading--negative": "_purpur-heading--negative_k9fhq_11",
@@ -1549,7 +1549,7 @@ const ro = /* @__PURE__ */ Jn(to), re = {
1549
1549
  "purpur-heading--display-50": "_purpur-heading--display-50_k9fhq_68",
1550
1550
  "purpur-heading--display-100": "_purpur-heading--display-100_k9fhq_74",
1551
1551
  "purpur-heading--display-200": "_purpur-heading--display-200_k9fhq_80"
1552
- }, no = {
1552
+ }, ro = {
1553
1553
  TITLE100: "title-100"
1554
1554
  }, ne = "purpur-heading", Vt = ({
1555
1555
  children: e,
@@ -1557,10 +1557,10 @@ const ro = /* @__PURE__ */ Jn(to), re = {
1557
1557
  enableHyphenation: r = !1,
1558
1558
  negative: o = !1,
1559
1559
  tag: a,
1560
- variant: n = no.TITLE100,
1560
+ variant: n = ro.TITLE100,
1561
1561
  ...i
1562
1562
  }) => {
1563
- const u = a, d = ro([
1563
+ const u = a, d = to([
1564
1564
  t,
1565
1565
  re[ne],
1566
1566
  re[`${ne}--${n}`],
@@ -1572,18 +1572,18 @@ const ro = /* @__PURE__ */ Jn(to), re = {
1572
1572
  return /* @__PURE__ */ p(u, { className: d, ...i, children: e });
1573
1573
  };
1574
1574
  Vt.displayName = "Heading";
1575
- function oo(e) {
1575
+ function no(e) {
1576
1576
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
1577
1577
  }
1578
- var rt = { exports: {} };
1578
+ var tt = { exports: {} };
1579
1579
  /*!
1580
1580
  Copyright (c) 2018 Jed Watson.
1581
1581
  Licensed under the MIT License (MIT), see
1582
1582
  http://jedwatson.github.io/classnames
1583
1583
  */
1584
- var nt;
1585
- function ao() {
1586
- return nt || (nt = 1, function(e) {
1584
+ var rt;
1585
+ function oo() {
1586
+ return rt || (rt = 1, function(e) {
1587
1587
  (function() {
1588
1588
  var t = {}.hasOwnProperty;
1589
1589
  function r() {
@@ -1612,10 +1612,10 @@ function ao() {
1612
1612
  }
1613
1613
  e.exports ? (r.default = r, e.exports = r) : window.classNames = r;
1614
1614
  })();
1615
- }(rt)), rt.exports;
1615
+ }(tt)), tt.exports;
1616
1616
  }
1617
- var io = ao();
1618
- const uo = /* @__PURE__ */ oo(io), so = {
1617
+ var ao = oo();
1618
+ const io = /* @__PURE__ */ no(ao), uo = {
1619
1619
  "purpur-icon": "_purpur-icon_8u1lq_1",
1620
1620
  "purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
1621
1621
  "purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
@@ -1623,30 +1623,29 @@ const uo = /* @__PURE__ */ oo(io), so = {
1623
1623
  "purpur-icon--md": "_purpur-icon--md_8u1lq_16",
1624
1624
  "purpur-icon--lg": "_purpur-icon--lg_8u1lq_20",
1625
1625
  "purpur-icon--xl": "_purpur-icon--xl_8u1lq_24"
1626
- }, co = uo.bind(so), ot = "purpur-icon", lo = "md", po = (e) => e.filter((t) => Object.keys(t).length >= 1).map((t) => `${t.name}="${t.value}"`).join(" "), fo = ({ content: e = "", title: t } = {}) => {
1626
+ }, so = io.bind(uo), nt = "purpur-icon", co = "md", lo = (e) => e.filter((t) => Object.keys(t).length >= 1).map((t) => `${t.name}="${t.value}"`).join(" "), po = ({ content: e = "", title: t } = {}) => {
1627
1627
  const r = [
1628
1628
  { name: "xmlns", value: "http://www.w3.org/2000/svg" },
1629
1629
  { name: "fill", value: "currentColor" },
1630
1630
  { name: "viewBox", value: "0 0 24 24" },
1631
1631
  t ? { name: "role", value: "img" } : { name: "aria-hidden", value: "true" }
1632
1632
  ], o = t ? `<title>${t}</title>` : "";
1633
- return `<svg ${po(r)}>${o}${e}</svg>`;
1634
- }, vo = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), zt = ({
1633
+ return `<svg ${lo(r)}>${o}${e}</svg>`;
1634
+ }, fo = (e) => e.replace(/<(\/?)svg([^>]*)>/g, "").trim(), zt = ({
1635
1635
  ["data-testid"]: e,
1636
1636
  svg: t,
1637
1637
  allyTitle: r,
1638
1638
  className: o,
1639
- size: a = lo,
1639
+ size: a = co,
1640
1640
  ...n
1641
1641
  }) => {
1642
- const i = fo({
1643
- content: vo(t.svg),
1642
+ const i = po({
1643
+ content: fo(t.svg),
1644
1644
  title: r
1645
- }), u = co(o, ot, `${ot}--${a}`);
1645
+ }), u = so(o, nt, `${nt}--${a}`);
1646
1646
  return /* @__PURE__ */ p(
1647
1647
  "span",
1648
1648
  {
1649
- "aria-label": r,
1650
1649
  className: u,
1651
1650
  "data-testid": e,
1652
1651
  dangerouslySetInnerHTML: { __html: i },
@@ -1655,25 +1654,25 @@ const uo = /* @__PURE__ */ oo(io), so = {
1655
1654
  );
1656
1655
  };
1657
1656
  zt.displayName = "Icon";
1658
- const ho = {
1657
+ const vo = {
1659
1658
  name: "close",
1660
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>',
1661
1660
  keywords: ["close"],
1662
1661
  category: "utility"
1663
- }, Ht = (e) => /* @__PURE__ */ p(zt, { ...e, svg: ho });
1662
+ }, Ht = (e) => /* @__PURE__ */ p(zt, { ...e, svg: vo });
1664
1663
  Ht.displayName = "IconClose";
1665
- function mo(e) {
1664
+ function ho(e) {
1666
1665
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
1667
1666
  }
1668
- var at = { exports: {} };
1667
+ var ot = { exports: {} };
1669
1668
  /*!
1670
1669
  Copyright (c) 2018 Jed Watson.
1671
1670
  Licensed under the MIT License (MIT), see
1672
1671
  http://jedwatson.github.io/classnames
1673
1672
  */
1674
- var it;
1675
- function go() {
1676
- return it || (it = 1, function(e) {
1673
+ var at;
1674
+ function mo() {
1675
+ return at || (at = 1, function(e) {
1677
1676
  (function() {
1678
1677
  var t = {}.hasOwnProperty;
1679
1678
  function r() {
@@ -1702,10 +1701,10 @@ function go() {
1702
1701
  }
1703
1702
  e.exports ? (r.default = r, e.exports = r) : window.classNames = r;
1704
1703
  })();
1705
- }(at)), at.exports;
1704
+ }(ot)), ot.exports;
1706
1705
  }
1707
- var _o = go();
1708
- const yo = /* @__PURE__ */ mo(_o), X = {
1706
+ var go = mo();
1707
+ const _o = /* @__PURE__ */ ho(go), Y = {
1709
1708
  "purpur-paragraph": "_purpur-paragraph_1rh57_1",
1710
1709
  "purpur-paragraph--disabled": "_purpur-paragraph--disabled_1rh57_7",
1711
1710
  "purpur-paragraph--hyphens": "_purpur-paragraph--hyphens_1rh57_10",
@@ -1720,54 +1719,54 @@ const yo = /* @__PURE__ */ mo(_o), X = {
1720
1719
  "purpur-paragraph--additional-100-medium": "_purpur-paragraph--additional-100-medium_1rh57_60",
1721
1720
  "purpur-paragraph--overline-100": "_purpur-paragraph--overline-100_1rh57_67",
1722
1721
  "purpur-paragraph--overline-200": "_purpur-paragraph--overline-200_1rh57_75"
1723
- }, bo = {
1722
+ }, yo = {
1724
1723
  PARAGRAPH100: "paragraph-100"
1725
- }, Y = "purpur-paragraph", Gt = ({
1724
+ }, X = "purpur-paragraph", Gt = ({
1726
1725
  ["data-testid"]: e,
1727
1726
  children: t,
1728
1727
  className: r,
1729
1728
  disabled: o,
1730
1729
  enableHyphenation: a = !1,
1731
1730
  negative: n = !1,
1732
- variant: i = bo.PARAGRAPH100,
1731
+ variant: i = yo.PARAGRAPH100,
1733
1732
  ...u
1734
1733
  }) => {
1735
- const d = yo([
1734
+ const d = _o([
1736
1735
  r,
1737
- X[Y],
1738
- X[`${Y}--${i}`],
1736
+ Y[X],
1737
+ Y[`${X}--${i}`],
1739
1738
  {
1740
- [X[`${Y}--hyphens`]]: a,
1741
- [X[`${Y}--disabled`]]: o,
1742
- [X[`${Y}--negative`]]: n
1739
+ [Y[`${X}--hyphens`]]: a,
1740
+ [Y[`${X}--disabled`]]: o,
1741
+ [Y[`${X}--negative`]]: n
1743
1742
  }
1744
1743
  ]);
1745
1744
  return /* @__PURE__ */ p("p", { ...u, className: d, "data-testid": e, children: t });
1746
1745
  };
1747
1746
  Gt.displayName = "Paragraph";
1748
- function ut(e, t) {
1747
+ function it(e, t) {
1749
1748
  if (typeof e == "function")
1750
1749
  return e(t);
1751
1750
  e != null && (e.current = t);
1752
1751
  }
1753
- function wo(...e) {
1752
+ function bo(...e) {
1754
1753
  return (t) => {
1755
1754
  let r = !1;
1756
1755
  const o = e.map((a) => {
1757
- const n = ut(a, t);
1756
+ const n = it(a, t);
1758
1757
  return !r && typeof n == "function" && (r = !0), n;
1759
1758
  });
1760
1759
  if (r)
1761
1760
  return () => {
1762
1761
  for (let a = 0; a < o.length; a++) {
1763
1762
  const n = o[a];
1764
- typeof n == "function" ? n() : ut(e[a], null);
1763
+ typeof n == "function" ? n() : it(e[a], null);
1765
1764
  }
1766
1765
  };
1767
1766
  };
1768
1767
  }
1769
1768
  var Kt = s.forwardRef((e, t) => {
1770
- const { children: r, ...o } = e, a = s.Children.toArray(r), n = a.find(Co);
1769
+ const { children: r, ...o } = e, a = s.Children.toArray(r), n = a.find(Eo);
1771
1770
  if (n) {
1772
1771
  const i = n.props.children, u = a.map((d) => d === n ? s.Children.count(i) > 1 ? s.Children.only(null) : s.isValidElement(i) ? i.props.children : null : d);
1773
1772
  return /* @__PURE__ */ p(Pe, { ...o, ref: t, children: s.isValidElement(i) ? s.cloneElement(i, void 0, u) : null });
@@ -1778,17 +1777,17 @@ Kt.displayName = "Slot";
1778
1777
  var Pe = s.forwardRef((e, t) => {
1779
1778
  const { children: r, ...o } = e;
1780
1779
  if (s.isValidElement(r)) {
1781
- const a = No(r), n = So(o, r.props);
1782
- return r.type !== s.Fragment && (n.ref = t ? wo(t, a) : a), s.cloneElement(r, n);
1780
+ const a = So(r), n = Co(o, r.props);
1781
+ return r.type !== s.Fragment && (n.ref = t ? bo(t, a) : a), s.cloneElement(r, n);
1783
1782
  }
1784
1783
  return s.Children.count(r) > 1 ? s.Children.only(null) : null;
1785
1784
  });
1786
1785
  Pe.displayName = "SlotClone";
1787
- var Eo = ({ children: e }) => /* @__PURE__ */ p(ie, { children: e });
1788
- function Co(e) {
1789
- return s.isValidElement(e) && e.type === Eo;
1786
+ var wo = ({ children: e }) => /* @__PURE__ */ p(ie, { children: e });
1787
+ function Eo(e) {
1788
+ return s.isValidElement(e) && e.type === wo;
1790
1789
  }
1791
- function So(e, t) {
1790
+ function Co(e, t) {
1792
1791
  const r = { ...t };
1793
1792
  for (const o in t) {
1794
1793
  const a = e[o], n = t[o];
@@ -1798,12 +1797,12 @@ function So(e, t) {
1798
1797
  }
1799
1798
  return { ...e, ...r };
1800
1799
  }
1801
- function No(e) {
1800
+ function So(e) {
1802
1801
  var t, r;
1803
1802
  let o = (t = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : t.get, a = o && "isReactWarning" in o && o.isReactWarning;
1804
1803
  return a ? e.ref : (o = (r = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : r.get, a = o && "isReactWarning" in o && o.isReactWarning, a ? e.props.ref : e.props.ref || e.ref);
1805
1804
  }
1806
- var Po = [
1805
+ var No = [
1807
1806
  "a",
1808
1807
  "button",
1809
1808
  "div",
@@ -1820,15 +1819,15 @@ var Po = [
1820
1819
  "span",
1821
1820
  "svg",
1822
1821
  "ul"
1823
- ], Oo = Po.reduce((e, t) => {
1822
+ ], Po = No.reduce((e, t) => {
1824
1823
  const r = s.forwardRef((o, a) => {
1825
1824
  const { asChild: n, ...i } = o, u = n ? Kt : t;
1826
1825
  return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ p(u, { ...i, ref: a });
1827
1826
  });
1828
1827
  return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
1829
- }, {}), xo = "VisuallyHidden", Xt = s.forwardRef(
1828
+ }, {}), xo = "VisuallyHidden", Yt = s.forwardRef(
1830
1829
  (e, t) => /* @__PURE__ */ p(
1831
- Oo.span,
1830
+ Po.span,
1832
1831
  {
1833
1832
  ...e,
1834
1833
  ref: t,
@@ -1849,15 +1848,15 @@ var Po = [
1849
1848
  }
1850
1849
  )
1851
1850
  );
1852
- Xt.displayName = xo;
1853
- var Ro = Xt;
1854
- const Ao = ({
1851
+ Yt.displayName = xo;
1852
+ var Oo = Yt;
1853
+ const Ro = ({
1855
1854
  asChild: e,
1856
1855
  children: t,
1857
1856
  className: r = "",
1858
1857
  ["data-testid"]: o
1859
- }) => /* @__PURE__ */ p(Ro, { asChild: e, "data-testid": o, className: r, children: t });
1860
- function Do(e) {
1858
+ }) => /* @__PURE__ */ p(Oo, { asChild: e, "data-testid": o, className: r, children: t });
1859
+ function Ao(e) {
1861
1860
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
1862
1861
  }
1863
1862
  var ye = { exports: {} };
@@ -1866,9 +1865,9 @@ var ye = { exports: {} };
1866
1865
  Licensed under the MIT License (MIT), see
1867
1866
  http://jedwatson.github.io/classnames
1868
1867
  */
1869
- var st;
1870
- function To() {
1871
- return st || (st = 1, function(e) {
1868
+ var ut;
1869
+ function Do() {
1870
+ return ut || (ut = 1, function(e) {
1872
1871
  (function() {
1873
1872
  var t = {}.hasOwnProperty;
1874
1873
  function r() {
@@ -1899,29 +1898,28 @@ function To() {
1899
1898
  })();
1900
1899
  }(ye)), ye.exports;
1901
1900
  }
1902
- var Mo = To();
1903
- const $o = /* @__PURE__ */ Do(Mo), Io = "_fadeIn_1bcc3_1", Lo = {
1904
- "purpur-modal-content": "_purpur-modal-content_1bcc3_1",
1905
- fadeIn: Io,
1906
- "purpur-modal-content__overlay": "_purpur-modal-content__overlay_1bcc3_30",
1907
- "purpur-modal-content__close-button": "_purpur-modal-content__close-button_1bcc3_37",
1908
- "purpur-modal-content__wrapper": "_purpur-modal-content__wrapper_1bcc3_47",
1909
- "purpur-modal-content__wrapper-inner": "_purpur-modal-content__wrapper-inner_1bcc3_57",
1910
- "purpur-modal-content__image-wrapper": "_purpur-modal-content__image-wrapper_1bcc3_61",
1911
- "purpur-modal-content__header": "_purpur-modal-content__header_1bcc3_84",
1912
- "purpur-modal-content__title": "_purpur-modal-content__title_1bcc3_97",
1913
- "purpur-modal-content__description": "_purpur-modal-content__description_1bcc3_100",
1914
- "purpur-modal-content__body": "_purpur-modal-content__body_1bcc3_103",
1915
- "purpur-modal-content__body-inner": "_purpur-modal-content__body-inner_1bcc3_111",
1916
- "purpur-modal-content__actions-buttons": "_purpur-modal-content__actions-buttons_1bcc3_123",
1917
- "purpur-modal-content__actions-button": "_purpur-modal-content__actions-button_1bcc3_123",
1918
- "purpur-modal-content__notification": "_purpur-modal-content__notification_1bcc3_146",
1919
- "purpur-modal-content--with-image": "_purpur-modal-content--with-image_1bcc3_149",
1920
- "purpur-modal-content--overflow": "_purpur-modal-content--overflow_1bcc3_149",
1921
- "purpur-modal-content__actions": "_purpur-modal-content__actions_1bcc3_123",
1922
- "purpur-modal-content__actions-separator": "_purpur-modal-content__actions-separator_1bcc3_180",
1923
- "purpur-modal-content--sticky-footer": "_purpur-modal-content--sticky-footer_1bcc3_190"
1924
- }, ct = (e) => e.showCloseButton === !0, P = $o.bind(Lo), N = "purpur-modal-content", ko = Oe(
1901
+ var To = Do();
1902
+ const Mo = /* @__PURE__ */ Ao(To), $o = "_fadeIn_4aird_1", Io = {
1903
+ "purpur-modal-content": "_purpur-modal-content_4aird_1",
1904
+ fadeIn: $o,
1905
+ "purpur-modal-content__overlay": "_purpur-modal-content__overlay_4aird_30",
1906
+ "purpur-modal-content__close-button": "_purpur-modal-content__close-button_4aird_37",
1907
+ "purpur-modal-content__wrapper": "_purpur-modal-content__wrapper_4aird_47",
1908
+ "purpur-modal-content__wrapper-inner": "_purpur-modal-content__wrapper-inner_4aird_57",
1909
+ "purpur-modal-content__image-wrapper": "_purpur-modal-content__image-wrapper_4aird_61",
1910
+ "purpur-modal-content__header": "_purpur-modal-content__header_4aird_84",
1911
+ "purpur-modal-content__title": "_purpur-modal-content__title_4aird_97",
1912
+ "purpur-modal-content__description": "_purpur-modal-content__description_4aird_100",
1913
+ "purpur-modal-content__body": "_purpur-modal-content__body_4aird_103",
1914
+ "purpur-modal-content__body-inner": "_purpur-modal-content__body-inner_4aird_111",
1915
+ "purpur-modal-content__actions-buttons": "_purpur-modal-content__actions-buttons_4aird_123",
1916
+ "purpur-modal-content__notification": "_purpur-modal-content__notification_4aird_141",
1917
+ "purpur-modal-content--with-image": "_purpur-modal-content--with-image_4aird_144",
1918
+ "purpur-modal-content--overflow": "_purpur-modal-content--overflow_4aird_144",
1919
+ "purpur-modal-content__actions": "_purpur-modal-content__actions_4aird_123",
1920
+ "purpur-modal-content__actions-separator": "_purpur-modal-content__actions-separator_4aird_175",
1921
+ "purpur-modal-content--sticky-footer": "_purpur-modal-content--sticky-footer_4aird_185"
1922
+ }, st = (e) => e.showCloseButton === !0, x = Mo.bind(Io), N = "purpur-modal-content", Lo = xe(
1925
1923
  ({
1926
1924
  ["data-testid"]: e,
1927
1925
  actions: t,
@@ -1931,188 +1929,153 @@ const $o = /* @__PURE__ */ Do(Mo), Io = "_fadeIn_1bcc3_1", Lo = {
1931
1929
  disableCloseOnClickOutside: n,
1932
1930
  hideDescription: i,
1933
1931
  image: u,
1934
- primaryActionVariant: d = "primary",
1935
- stickyButtons: c = !0,
1936
- title: f,
1937
- notification: v = void 0,
1938
- zIndex: h,
1939
- onCloseAutoFocus: g,
1940
- ...b
1941
- }, l) => {
1942
- const { closeButtonAllyLabel: m, showCloseButton: _, ...S } = b, [w, E] = be(!1), [C, x] = be(0), y = we(null), O = we(null), L = P([
1932
+ stickyButtons: d = !0,
1933
+ title: l,
1934
+ notification: f = void 0,
1935
+ zIndex: v,
1936
+ onCloseAutoFocus: h,
1937
+ ...g
1938
+ }, b) => {
1939
+ const { closeButtonAriaLabel: c, showCloseButton: m, ..._ } = g, [S, w] = be(!1), [E, C] = be(0), P = we(null), y = we(null), R = x([
1943
1940
  N,
1944
1941
  { [`${N}--with-image`]: !!u },
1945
- { [`${N}--overflow`]: w },
1946
- { [`${N}--sticky-footer`]: c },
1942
+ { [`${N}--overflow`]: S },
1943
+ { [`${N}--sticky-footer`]: d },
1947
1944
  o
1948
- ]), D = (k) => e ? `${e} ${k}` : void 0, Yt = (k) => {
1949
- n && k.preventDefault();
1950
- }, q = er(() => {
1951
- if (!y.current || !O.current)
1945
+ ]), O = (L) => e ? `${e} ${L}` : void 0, H = (L) => {
1946
+ n && L.preventDefault();
1947
+ }, q = Jt(() => {
1948
+ if (!P.current || !y.current)
1952
1949
  return;
1953
- const k = window.getComputedStyle(y.current, null), Qt = parseFloat(k.getPropertyValue("height")), Jt = O.current.offsetHeight;
1954
- E(Qt < Jt), x(
1955
- (y.current.offsetWidth ?? 0) - (y.current.clientWidth ?? 0)
1950
+ const L = window.getComputedStyle(P.current, null), Zt = parseFloat(L.getPropertyValue("height")), Qt = y.current.offsetHeight;
1951
+ w(Zt < Qt), C(
1952
+ (P.current.offsetWidth ?? 0) - (P.current.clientWidth ?? 0)
1956
1953
  );
1957
- }, []), Zt = (k) => {
1958
- n && !_ && k.preventDefault();
1954
+ }, []), Xt = (L) => {
1955
+ n && !m && L.preventDefault();
1959
1956
  };
1960
1957
  return Ee(() => (window.addEventListener("resize", q), () => {
1961
1958
  window.removeEventListener("resize", q);
1962
1959
  }), [q]), Ee(() => {
1963
1960
  q();
1964
- }, [v, r, q]), /* @__PURE__ */ R(Mn, { children: [
1965
- /* @__PURE__ */ p($n, { className: P(`${N}__overlay`), style: { zIndex: h } }),
1966
- /* @__PURE__ */ R(
1967
- In,
1961
+ }, [f, r, q]), /* @__PURE__ */ D(Tn, { children: [
1962
+ /* @__PURE__ */ p(Mn, { className: x(`${N}__overlay`), style: { zIndex: v } }),
1963
+ /* @__PURE__ */ D(
1964
+ $n,
1968
1965
  {
1969
- ...S,
1970
- className: L,
1966
+ ..._,
1967
+ className: R,
1971
1968
  "data-testid": e,
1972
- ref: l,
1969
+ ref: b,
1973
1970
  ...!a && { "aria-describedby": void 0 },
1974
- onPointerDownOutside: Yt,
1971
+ onPointerDownOutside: H,
1975
1972
  onOpenAutoFocus: q,
1976
- onEscapeKeyDown: Zt,
1977
- onCloseAutoFocus: g,
1978
- style: { zIndex: `calc(${h} + 1)` },
1973
+ onEscapeKeyDown: Xt,
1974
+ onCloseAutoFocus: h,
1975
+ style: { zIndex: `calc(${v} + 1)` },
1979
1976
  children: [
1980
- /* @__PURE__ */ R("div", { ref: y, className: P(`${N}__wrapper`), children: [
1981
- ct(b) && m && u && /* @__PURE__ */ p(
1982
- lt,
1977
+ /* @__PURE__ */ D("div", { ref: P, className: x(`${N}__wrapper`), children: [
1978
+ st(g) && c && u && /* @__PURE__ */ p(
1979
+ ct,
1983
1980
  {
1984
- allyLabel: m,
1981
+ "aria-label": c,
1985
1982
  hasImage: !0,
1986
- scrollbarWidth: C,
1987
- "data-testid": D("close-button")
1983
+ scrollbarWidth: E,
1984
+ "data-testid": O("close-button")
1988
1985
  }
1989
1986
  ),
1990
- /* @__PURE__ */ R("div", { ref: O, className: P(`${N}__wrapper-inner`), children: [
1991
- /* @__PURE__ */ R("div", { className: P(`${N}__header`), children: [
1992
- ct(b) && m && !u && /* @__PURE__ */ p(
1993
- lt,
1987
+ /* @__PURE__ */ D("div", { ref: y, className: x(`${N}__wrapper-inner`), children: [
1988
+ /* @__PURE__ */ D("div", { className: x(`${N}__header`), children: [
1989
+ st(g) && c && !u && /* @__PURE__ */ p(
1990
+ ct,
1994
1991
  {
1995
- allyLabel: m,
1996
- "data-testid": D("close-button")
1992
+ "aria-label": c,
1993
+ "data-testid": O("close-button")
1997
1994
  }
1998
1995
  ),
1999
1996
  /* @__PURE__ */ p(
2000
- Ln,
1997
+ In,
2001
1998
  {
2002
1999
  asChild: !0,
2003
- className: P(`${N}__title`),
2004
- "data-testid": D("title"),
2005
- children: /* @__PURE__ */ p(Vt, { tag: "h2", variant: "title-200", children: f })
2000
+ className: x(`${N}__title`),
2001
+ "data-testid": O("title"),
2002
+ children: /* @__PURE__ */ p(Vt, { tag: "h2", variant: "title-200", children: l })
2006
2003
  }
2007
2004
  )
2008
2005
  ] }),
2009
2006
  u && /* @__PURE__ */ p(
2010
2007
  "div",
2011
2008
  {
2012
- className: P(`${N}__image-wrapper`),
2013
- "data-testid": D("image"),
2009
+ className: x(`${N}__image-wrapper`),
2010
+ "data-testid": O("image"),
2014
2011
  children: u
2015
2012
  }
2016
2013
  ),
2017
- /* @__PURE__ */ p("div", { className: P(`${N}__body`), children: /* @__PURE__ */ R("div", { className: P(`${N}__body-inner`), children: [
2018
- a && i && /* @__PURE__ */ p(Ao, { asChild: !0, children: /* @__PURE__ */ p(Ke, { "data-testid": D("description"), children: a }) }),
2014
+ /* @__PURE__ */ p("div", { className: x(`${N}__body`), children: /* @__PURE__ */ D("div", { className: x(`${N}__body-inner`), children: [
2015
+ a && i && /* @__PURE__ */ p(Ro, { asChild: !0, children: /* @__PURE__ */ p(Ge, { "data-testid": O("description"), children: a }) }),
2019
2016
  a && !i && /* @__PURE__ */ p(
2020
- Ke,
2017
+ Ge,
2021
2018
  {
2022
2019
  asChild: !0,
2023
- className: P(`${N}__description`),
2024
- "data-testid": D("description"),
2020
+ className: x(`${N}__description`),
2021
+ "data-testid": O("description"),
2025
2022
  children: /* @__PURE__ */ p(Gt, { variant: "paragraph-100", children: a })
2026
2023
  }
2027
2024
  ),
2028
2025
  /* @__PURE__ */ p("div", { children: r }),
2029
- !c && /* @__PURE__ */ p(
2030
- dt,
2031
- {
2032
- actions: t,
2033
- primaryActionVariant: d,
2034
- notification: v
2035
- }
2036
- )
2026
+ !d && /* @__PURE__ */ p(lt, { actions: t, notification: f })
2037
2027
  ] }) })
2038
2028
  ] })
2039
2029
  ] }),
2040
- c && /* @__PURE__ */ p(
2041
- dt,
2042
- {
2043
- actions: t,
2044
- primaryActionVariant: d,
2045
- notification: v
2046
- }
2047
- )
2030
+ d && /* @__PURE__ */ p(lt, { actions: t, notification: f })
2048
2031
  ]
2049
2032
  }
2050
2033
  )
2051
2034
  ] });
2052
2035
  }
2053
- ), lt = ({
2054
- allyLabel: e,
2036
+ ), ct = ({
2037
+ ["aria-label"]: e,
2055
2038
  hasImage: t,
2056
2039
  scrollbarWidth: r,
2057
2040
  ["data-testid"]: o
2058
- }) => /* @__PURE__ */ p(kn, { asChild: !0, children: /* @__PURE__ */ p(
2059
- Me,
2041
+ }) => /* @__PURE__ */ p(Ln, { asChild: !0, children: /* @__PURE__ */ p(
2042
+ Ut,
2060
2043
  {
2061
2044
  variant: t ? "primary" : "tertiary-purple",
2062
2045
  negative: t,
2063
2046
  size: "sm",
2064
2047
  iconOnly: !0,
2065
2048
  "aria-label": e,
2066
- className: P(`${N}__close-button`),
2049
+ className: x(`${N}__close-button`),
2067
2050
  style: { right: `calc(var(--purpur-spacing-100) + ${r || 0}px)` },
2068
2051
  "data-testid": o,
2069
2052
  children: /* @__PURE__ */ p(Ht, {})
2070
2053
  }
2071
- ) }), Fo = 3, dt = ({
2054
+ ) }), lt = ({
2072
2055
  actions: e,
2073
- primaryActionVariant: t,
2074
- notification: r
2056
+ notification: t
2075
2057
  }) => {
2076
- const o = we(null), a = [t, "secondary", "text"];
2058
+ const r = we(null);
2077
2059
  return Ee(() => {
2078
- var n, i;
2079
- r && ((i = (n = o == null ? void 0 : o.current) == null ? void 0 : n.scrollIntoView) == null || i.call(n, !1));
2080
- }, [r]), e && e.length > 0 ? /* @__PURE__ */ R("div", { className: P(`${N}__actions`), children: [
2081
- /* @__PURE__ */ p("div", { className: P(`${N}__actions-buttons`), "data-testid": "modal actions", children: e.slice(0, Fo).map(
2082
- ({ label: n, onClick: i, disabled: u, loading: d, iconPosition: c = "right", icon: f, ...v }, h) => /* @__PURE__ */ R(
2083
- Me,
2084
- {
2085
- "data-testid": "modal actions button",
2086
- variant: a[h] || "",
2087
- onClick: i,
2088
- disabled: u,
2089
- loading: d,
2090
- className: P(`${N}__actions-button`),
2091
- ...v,
2092
- children: [
2093
- c === "left" && f && f,
2094
- n,
2095
- c === "right" && f && f
2096
- ]
2097
- },
2098
- n
2099
- )
2100
- ) }),
2101
- r && /* @__PURE__ */ p("div", { className: P(`${N}__notification`), ref: o, children: r }),
2102
- /* @__PURE__ */ p("span", { className: P(`${N}__actions-separator`) })
2060
+ var o, a;
2061
+ t && ((a = (o = r == null ? void 0 : r.current) == null ? void 0 : o.scrollIntoView) == null || a.call(o, !1));
2062
+ }, [t]), e ? /* @__PURE__ */ D("div", { className: x(`${N}__actions`), children: [
2063
+ /* @__PURE__ */ p("div", { className: x(`${N}__actions-buttons`), "data-testid": "modal actions", children: e }),
2064
+ t && /* @__PURE__ */ p("div", { className: x(`${N}__notification`), ref: r, children: t }),
2065
+ /* @__PURE__ */ p("span", { className: x(`${N}__actions-separator`) })
2103
2066
  ] }) : null;
2104
- }, Wo = Oe(
2105
- ({ ["data-testid"]: e, children: t, className: r, ...o }, a) => /* @__PURE__ */ p(Tn, { asChild: !0, ref: a, "data-testid": e, className: r, ...o, children: t })
2106
- ), $e = ({
2067
+ }, ko = xe(
2068
+ ({ ["data-testid"]: e, children: t, className: r, ...o }, a) => /* @__PURE__ */ p(Dn, { asChild: !0, ref: a, "data-testid": e, className: r, ...o, children: t })
2069
+ ), Me = ({
2107
2070
  ["data-testid"]: e,
2108
2071
  children: t,
2109
2072
  open: r,
2110
2073
  onOpenChange: o
2111
- }) => /* @__PURE__ */ p(Dn, { open: r, onOpenChange: o, "data-testid": e, children: t });
2112
- $e.Trigger = Wo;
2113
- $e.Content = ko;
2114
- $e.displayName = "Modal";
2074
+ }) => /* @__PURE__ */ p(An, { open: r, onOpenChange: o, "data-testid": e, children: t });
2075
+ Me.Trigger = ko;
2076
+ Me.Content = Lo;
2077
+ Me.displayName = "Modal";
2115
2078
  export {
2116
- $e as Modal
2079
+ Me as Modal
2117
2080
  };
2118
2081
  //# sourceMappingURL=modal.es.js.map