@purpurds/tooltip 5.10.1 → 5.11.1

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.
@@ -1,17 +1,13 @@
1
- import { jsxs as We, jsx as I } from "react/jsx-runtime";
1
+ import { jsxs as We, jsx as k } from "react/jsx-runtime";
2
2
  import * as N from "react";
3
- import { forwardRef as M, useCallback as F, createContext as Ue, useMemo as xe, createElement as _, useContext as Ot, Fragment as yn, Children as re, isValidElement as Ne, cloneElement as Ke, useEffect as R, useRef as L, useState as j, useLayoutEffect as At, useReducer as bn } from "react";
4
- import * as xn from "react-dom";
5
- import $n, { flushSync as Ct } from "react-dom";
3
+ import { forwardRef as M, useCallback as F, createContext as Ue, useMemo as be, createElement as _, useContext as Pt, Fragment as yn, Children as re, isValidElement as Ne, cloneElement as Ke, useEffect as R, useRef as L, useState as j, useLayoutEffect as Ot, useReducer as xn } from "react";
4
+ import * as bn from "react-dom";
5
+ import $n, { flushSync as At } from "react-dom";
6
6
  const wn = {
7
- SM: "sm",
8
- MD: "md",
9
- LG: "lg"
10
- }, _n = {
11
7
  PRIMARY: "primary",
12
8
  SECONDARY: "secondary",
13
9
  EXPRESSIVE: "expressive"
14
- }, ut = {
10
+ }, _n = {
15
11
  SM: "sm",
16
12
  MD: "md",
17
13
  LG: "lg"
@@ -19,7 +15,7 @@ const wn = {
19
15
  function Pn(e) {
20
16
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
21
17
  }
22
- var Et = { exports: {} };
18
+ var Ct = { exports: {} };
23
19
  /*!
24
20
  Copyright (c) 2018 Jed Watson.
25
21
  Licensed under the MIT License (MIT), see
@@ -54,9 +50,9 @@ var Et = { exports: {} };
54
50
  }
55
51
  e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
56
52
  })();
57
- })(Et);
58
- var On = Et.exports;
59
- const dt = /* @__PURE__ */ Pn(On), An = "_rotate_1xozj_1", Cn = "_dash_1xozj_1", me = {
53
+ })(Ct);
54
+ var On = Ct.exports;
55
+ const ut = /* @__PURE__ */ Pn(On), An = "_rotate_1xozj_1", Cn = "_dash_1xozj_1", me = {
60
56
  "purpur-spinner": "_purpur-spinner_1xozj_1",
61
57
  rotate: An,
62
58
  "purpur-spinner--xxs": "_purpur-spinner--xxs_1xozj_4",
@@ -80,16 +76,16 @@ const dt = /* @__PURE__ */ Pn(On), An = "_rotate_1xozj_1", Cn = "_dash_1xozj_1",
80
76
  negative: n = !1,
81
77
  size: o = En.SM,
82
78
  ...i
83
- }) => /* @__PURE__ */ I(
79
+ }) => /* @__PURE__ */ k(
84
80
  "div",
85
81
  {
86
- className: dt([me[ve], me[`${ve}--${o}`]]),
82
+ className: ut([me[ve], me[`${ve}--${o}`]]),
87
83
  "data-testid": e,
88
84
  ...i,
89
- children: /* @__PURE__ */ I("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ I(
85
+ children: /* @__PURE__ */ k("svg", { viewBox: "0 0 50 50", children: /* @__PURE__ */ k(
90
86
  "circle",
91
87
  {
92
- className: dt(me[`${ve}__circle`], {
88
+ className: ut(me[`${ve}__circle`], {
93
89
  [me[`${ve}__circle--disabled`]]: t,
94
90
  [me[`${ve}__circle--negative`]]: n
95
91
  }),
@@ -103,7 +99,7 @@ const dt = /* @__PURE__ */ Pn(On), An = "_rotate_1xozj_1", Cn = "_dash_1xozj_1",
103
99
  function Rn(e) {
104
100
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
105
101
  }
106
- var Tt = { exports: {} };
102
+ var Et = { exports: {} };
107
103
  /*!
108
104
  Copyright (c) 2018 Jed Watson.
109
105
  Licensed under the MIT License (MIT), see
@@ -138,35 +134,35 @@ var Tt = { exports: {} };
138
134
  }
139
135
  e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
140
136
  })();
141
- })(Tt);
142
- var Sn = Tt.exports;
137
+ })(Et);
138
+ var Sn = Et.exports;
143
139
  const Dn = /* @__PURE__ */ Rn(Sn), Nn = {
144
- "purpur-button": "_purpur-button_u2yv5_1",
145
- "purpur-button--sm": "_purpur-button--sm_u2yv5_33",
146
- "purpur-button--icon-only": "_purpur-button--icon-only_u2yv5_36",
147
- "purpur-button--md": "_purpur-button--md_u2yv5_39",
148
- "purpur-button--lg": "_purpur-button--lg_u2yv5_45",
149
- "purpur-button--full-width": "_purpur-button--full-width_u2yv5_51",
150
- "purpur-button--primary": "_purpur-button--primary_u2yv5_54",
151
- "purpur-button--disabled": "_purpur-button--disabled_u2yv5_58",
152
- "purpur-button--primary-negative": "_purpur-button--primary-negative_u2yv5_64",
153
- "purpur-button--secondary": "_purpur-button--secondary_u2yv5_76",
154
- "purpur-button--secondary-negative": "_purpur-button--secondary-negative_u2yv5_87",
155
- "purpur-button--expressive": "_purpur-button--expressive_u2yv5_98",
156
- "purpur-button--expressive-negative": "_purpur-button--expressive-negative_u2yv5_108",
157
- "purpur-button--negative": "_purpur-button--negative_u2yv5_120",
158
- "purpur-button--destructive": "_purpur-button--destructive_u2yv5_127",
159
- "purpur-button--destructive-negative": "_purpur-button--destructive-negative_u2yv5_137",
160
- "purpur-button--tertiary-purple": "_purpur-button--tertiary-purple_u2yv5_147",
161
- "purpur-button--tertiary-purple-negative": "_purpur-button--tertiary-purple-negative_u2yv5_160",
162
- "purpur-button--text-negative": "_purpur-button--text-negative_u2yv5_175",
163
- "purpur-button--text": "_purpur-button--text_u2yv5_175"
140
+ "purpur-button": "_purpur-button_1acxn_1",
141
+ "purpur-button--sm": "_purpur-button--sm_1acxn_33",
142
+ "purpur-button--icon-only": "_purpur-button--icon-only_1acxn_36",
143
+ "purpur-button--md": "_purpur-button--md_1acxn_39",
144
+ "purpur-button--lg": "_purpur-button--lg_1acxn_45",
145
+ "purpur-button--full-width": "_purpur-button--full-width_1acxn_51",
146
+ "purpur-button--primary": "_purpur-button--primary_1acxn_54",
147
+ "purpur-button--disabled": "_purpur-button--disabled_1acxn_58",
148
+ "purpur-button--primary-negative": "_purpur-button--primary-negative_1acxn_64",
149
+ "purpur-button--secondary": "_purpur-button--secondary_1acxn_76",
150
+ "purpur-button--secondary-negative": "_purpur-button--secondary-negative_1acxn_87",
151
+ "purpur-button--expressive": "_purpur-button--expressive_1acxn_98",
152
+ "purpur-button--expressive-negative": "_purpur-button--expressive-negative_1acxn_108",
153
+ "purpur-button--negative": "_purpur-button--negative_1acxn_120",
154
+ "purpur-button--destructive": "_purpur-button--destructive_1acxn_127",
155
+ "purpur-button--destructive-negative": "_purpur-button--destructive-negative_1acxn_137",
156
+ "purpur-button--tertiary-purple": "_purpur-button--tertiary-purple_1acxn_147",
157
+ "purpur-button--tertiary-purple-negative": "_purpur-button--tertiary-purple-negative_1acxn_160",
158
+ "purpur-button--text-negative": "_purpur-button--text-negative_1acxn_175",
159
+ "purpur-button--text": "_purpur-button--text_1acxn_175"
164
160
  }, Ln = {
165
- ..._n,
161
+ ...wn,
166
162
  DESTRUCTIVE: "destructive",
167
163
  TERTIARY_PURPLE: "tertiary-purple",
168
164
  TEXT: "text"
169
- }, Mn = Dn.bind(Nn), ne = "purpur-button", In = ({
165
+ }, Mn = Dn.bind(Nn), ne = "purpur-button", kn = ({
170
166
  children: e,
171
167
  className: t,
172
168
  ["data-testid"]: n,
@@ -176,7 +172,7 @@ const Dn = /* @__PURE__ */ Rn(Sn), Nn = {
176
172
  loading: s = !1,
177
173
  negative: a = !1,
178
174
  onClick: c,
179
- size: l = ut.MD,
175
+ size: l = "md",
180
176
  variant: u,
181
177
  type: d = "button",
182
178
  ...p
@@ -210,18 +206,18 @@ const Dn = /* @__PURE__ */ Rn(Sn), Nn = {
210
206
  onClick: g,
211
207
  ...p,
212
208
  children: [
213
- s && /* @__PURE__ */ I(Tn, { size: l === ut.LG ? "xs" : "xxs", negative: a, disabled: m }),
209
+ s && /* @__PURE__ */ k(Tn, { size: l === _n.LG ? "xs" : "xxs", negative: a, disabled: m }),
214
210
  " ",
215
211
  e
216
212
  ]
217
213
  }
218
214
  );
219
- }, Rt = M(In);
220
- Rt.displayName = "Button";
221
- function kn(e) {
215
+ }, Tt = M(kn);
216
+ Tt.displayName = "Button";
217
+ function In(e) {
222
218
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
223
219
  }
224
- var St = { exports: {} };
220
+ var Rt = { exports: {} };
225
221
  /*!
226
222
  Copyright (c) 2018 Jed Watson.
227
223
  Licensed under the MIT License (MIT), see
@@ -256,9 +252,9 @@ var St = { exports: {} };
256
252
  }
257
253
  e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
258
254
  })();
259
- })(St);
260
- var Fn = St.exports;
261
- const Hn = /* @__PURE__ */ kn(Fn), Bn = {
255
+ })(Rt);
256
+ var Fn = Rt.exports;
257
+ const Hn = /* @__PURE__ */ In(Fn), Bn = {
262
258
  "purpur-icon": "_purpur-icon_8u1lq_1",
263
259
  "purpur-icon--xxs": "_purpur-icon--xxs_8u1lq_4",
264
260
  "purpur-icon--xs": "_purpur-icon--xs_8u1lq_8",
@@ -271,15 +267,15 @@ const Hn = /* @__PURE__ */ kn(Fn), Bn = {
271
267
  svg: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M11 8.18c0 .537.469.979 1.007.979.524 0 .993-.442.993-.98s-.469-.979-.993-.979c-.538 0-1.007.441-1.007.98Zm.152 1.958v6.897h1.696v-6.897h-1.696Z"/><path fill-rule="evenodd" d="M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Zm-1.75 0a8.25 8.25 0 1 1-16.5 0 8.25 8.25 0 0 1 16.5 0Z" clip-rule="evenodd"/></svg>',
272
268
  keywords: ["info"],
273
269
  category: "status"
274
- }, Dt = (e) => /* @__PURE__ */ I(
270
+ }, St = (e) => /* @__PURE__ */ k(
275
271
  Xn,
276
272
  {
277
273
  ...e,
278
274
  svg: jn
279
275
  }
280
276
  );
281
- Dt.displayName = "IconInfo";
282
- const zn = Hn.bind(Bn), ft = "purpur-icon", Wn = "md", Un = (e) => e.filter((t) => Object.keys(t).length >= 1).map((t) => `${t.name}="${t.value}"`).join(" "), Vn = ({ content: e = "", title: t } = {}) => {
277
+ St.displayName = "IconInfo";
278
+ const zn = Hn.bind(Bn), dt = "purpur-icon", Wn = "md", Un = (e) => e.filter((t) => Object.keys(t).length >= 1).map((t) => `${t.name}="${t.value}"`).join(" "), Vn = ({ content: e = "", title: t } = {}) => {
283
279
  const n = [
284
280
  { name: "xmlns", value: "http://www.w3.org/2000/svg" },
285
281
  { name: "fill", value: "currentColor" },
@@ -291,15 +287,15 @@ const zn = Hn.bind(Bn), ft = "purpur-icon", Wn = "md", Un = (e) => e.filter((t)
291
287
  ["data-testid"]: e,
292
288
  svg: t,
293
289
  allyTitle: n,
294
- className: o = "",
290
+ className: o,
295
291
  size: i = Wn,
296
292
  ...r
297
293
  }) => {
298
294
  const s = Vn({
299
295
  content: Gn(t.svg),
300
296
  title: n
301
- }), a = zn(o, ft, `${ft}--${i}`);
302
- return /* @__PURE__ */ I(
297
+ }), a = zn(o, dt, `${dt}--${i}`);
298
+ return /* @__PURE__ */ k(
303
299
  "span",
304
300
  {
305
301
  "aria-label": n,
@@ -313,7 +309,7 @@ const zn = Hn.bind(Bn), ft = "purpur-icon", Wn = "md", Un = (e) => e.filter((t)
313
309
  function Yn(e) {
314
310
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
315
311
  }
316
- var Nt = { exports: {} };
312
+ var Dt = { exports: {} };
317
313
  /*!
318
314
  Copyright (c) 2018 Jed Watson.
319
315
  Licensed under the MIT License (MIT), see
@@ -348,8 +344,8 @@ var Nt = { exports: {} };
348
344
  }
349
345
  e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
350
346
  })();
351
- })(Nt);
352
- var qn = Nt.exports;
347
+ })(Dt);
348
+ var qn = Dt.exports;
353
349
  const Kn = /* @__PURE__ */ Yn(qn), ye = {
354
350
  "purpur-paragraph": "_purpur-paragraph_1rh57_1",
355
351
  "purpur-paragraph--disabled": "_purpur-paragraph--disabled_1rh57_7",
@@ -365,7 +361,7 @@ const Kn = /* @__PURE__ */ Yn(qn), ye = {
365
361
  "purpur-paragraph--additional-100-medium": "_purpur-paragraph--additional-100-medium_1rh57_60",
366
362
  "purpur-paragraph--overline-100": "_purpur-paragraph--overline-100_1rh57_67",
367
363
  "purpur-paragraph--overline-200": "_purpur-paragraph--overline-200_1rh57_75"
368
- }, Lt = {
364
+ }, Nt = {
369
365
  PARAGRAPH100: "paragraph-100",
370
366
  PARAGRAPH100MEDIUM: "paragraph-100-medium",
371
367
  PARAGRAPH100BOLD: "paragraph-100-bold",
@@ -376,28 +372,30 @@ const Kn = /* @__PURE__ */ Yn(qn), ye = {
376
372
  ADDITIONAL100MEDIUM: "additional-100-medium",
377
373
  OVERLINE100: "overline-100",
378
374
  OVERLINE200: "overline-200"
379
- }, be = "purpur-paragraph", Zn = ({
375
+ }, xe = "purpur-paragraph", Lt = ({
380
376
  ["data-testid"]: e,
381
377
  children: t,
382
- className: n = "",
378
+ className: n,
383
379
  disabled: o,
384
380
  enableHyphenation: i = !1,
385
381
  negative: r = !1,
386
- variant: s = Lt.PARAGRAPH100,
382
+ variant: s = Nt.PARAGRAPH100,
387
383
  ...a
388
384
  }) => {
389
385
  const c = Kn([
390
386
  n,
391
- ye[be],
392
- ye[`${be}--${s}`],
387
+ ye[xe],
388
+ ye[`${xe}--${s}`],
393
389
  {
394
- [ye[`${be}--hyphens`]]: i,
395
- [ye[`${be}--disabled`]]: o,
396
- [ye[`${be}--negative`]]: r
390
+ [ye[`${xe}--hyphens`]]: i,
391
+ [ye[`${xe}--disabled`]]: o,
392
+ [ye[`${xe}--negative`]]: r
397
393
  }
398
394
  ]);
399
- return /* @__PURE__ */ I("p", { ...a, className: c, "data-testid": e, children: t });
400
- }, Qn = "400ms";
395
+ return /* @__PURE__ */ k("p", { ...a, className: c, "data-testid": e, children: t });
396
+ };
397
+ Lt.displayName = "Paragraph";
398
+ const Zn = "400ms";
401
399
  function S() {
402
400
  return S = Object.assign ? Object.assign.bind() : function(e) {
403
401
  for (var t = 1; t < arguments.length; t++) {
@@ -410,8 +408,7 @@ function S() {
410
408
  }
411
409
  function G(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
412
410
  return function(i) {
413
- if (e == null || e(i), n === !1 || !i.defaultPrevented)
414
- return t == null ? void 0 : t(i);
411
+ if (e == null || e(i), n === !1 || !i.defaultPrevented) return t == null ? void 0 : t(i);
415
412
  };
416
413
  }
417
414
  function Jn(e, t) {
@@ -425,7 +422,7 @@ function Mt(...e) {
425
422
  function de(...e) {
426
423
  return F(Mt(...e), e);
427
424
  }
428
- function It(e, t = []) {
425
+ function kt(e, t = []) {
429
426
  let n = [];
430
427
  function o(r, s) {
431
428
  const a = /* @__PURE__ */ Ue(s), c = n.length;
@@ -434,7 +431,7 @@ function It(e, t = []) {
434
431
  s
435
432
  ];
436
433
  function l(d) {
437
- const { scope: p, children: f, ...h } = d, g = (p == null ? void 0 : p[e][c]) || a, m = xe(
434
+ const { scope: p, children: f, ...h } = d, g = (p == null ? void 0 : p[e][c]) || a, m = be(
438
435
  () => h,
439
436
  Object.values(h)
440
437
  );
@@ -443,11 +440,9 @@ function It(e, t = []) {
443
440
  }, f);
444
441
  }
445
442
  function u(d, p) {
446
- const f = (p == null ? void 0 : p[e][c]) || a, h = Ot(f);
447
- if (h)
448
- return h;
449
- if (s !== void 0)
450
- return s;
443
+ const f = (p == null ? void 0 : p[e][c]) || a, h = Pt(f);
444
+ if (h) return h;
445
+ if (s !== void 0) return s;
451
446
  throw new Error(`\`${d}\` must be used within \`${r}\``);
452
447
  }
453
448
  return l.displayName = r + "Provider", [
@@ -459,7 +454,7 @@ function It(e, t = []) {
459
454
  const r = n.map((s) => /* @__PURE__ */ Ue(s));
460
455
  return function(a) {
461
456
  const c = (a == null ? void 0 : a[e]) || r;
462
- return xe(
457
+ return be(
463
458
  () => ({
464
459
  [`__scope${e}`]: {
465
460
  ...a,
@@ -475,13 +470,12 @@ function It(e, t = []) {
475
470
  };
476
471
  return i.scopeName = e, [
477
472
  o,
478
- er(i, ...t)
473
+ Qn(i, ...t)
479
474
  ];
480
475
  }
481
- function er(...e) {
476
+ function Qn(...e) {
482
477
  const t = e[0];
483
- if (e.length === 1)
484
- return t;
478
+ if (e.length === 1) return t;
485
479
  const n = () => {
486
480
  const o = e.map(
487
481
  (i) => ({
@@ -497,7 +491,7 @@ function er(...e) {
497
491
  ...d
498
492
  };
499
493
  }, {});
500
- return xe(
494
+ return be(
501
495
  () => ({
502
496
  [`__scope${t.scopeName}`]: s
503
497
  }),
@@ -509,8 +503,8 @@ function er(...e) {
509
503
  };
510
504
  return n.scopeName = t.scopeName, n;
511
505
  }
512
- const kt = /* @__PURE__ */ M((e, t) => {
513
- const { children: n, ...o } = e, i = re.toArray(n), r = i.find(tr);
506
+ const It = /* @__PURE__ */ M((e, t) => {
507
+ const { children: n, ...o } = e, i = re.toArray(n), r = i.find(er);
514
508
  if (r) {
515
509
  const s = r.props.children, a = i.map((c) => c === r ? re.count(s) > 1 ? re.only(null) : /* @__PURE__ */ Ne(s) ? s.props.children : null : c);
516
510
  return /* @__PURE__ */ _(Ve, S({}, o, {
@@ -521,20 +515,20 @@ const kt = /* @__PURE__ */ M((e, t) => {
521
515
  ref: t
522
516
  }), n);
523
517
  });
524
- kt.displayName = "Slot";
518
+ It.displayName = "Slot";
525
519
  const Ve = /* @__PURE__ */ M((e, t) => {
526
520
  const { children: n, ...o } = e;
527
521
  return /* @__PURE__ */ Ne(n) ? /* @__PURE__ */ Ke(n, {
528
- ...nr(o, n.props),
522
+ ...tr(o, n.props),
529
523
  ref: t ? Mt(t, n.ref) : n.ref
530
524
  }) : re.count(n) > 1 ? re.only(null) : null;
531
525
  });
532
526
  Ve.displayName = "SlotClone";
533
527
  const Ft = ({ children: e }) => /* @__PURE__ */ _(yn, null, e);
534
- function tr(e) {
528
+ function er(e) {
535
529
  return /* @__PURE__ */ Ne(e) && e.type === Ft;
536
530
  }
537
- function nr(e, t) {
531
+ function tr(e, t) {
538
532
  const n = {
539
533
  ...t
540
534
  };
@@ -555,7 +549,7 @@ function nr(e, t) {
555
549
  ...n
556
550
  };
557
551
  }
558
- const rr = [
552
+ const nr = [
559
553
  "a",
560
554
  "button",
561
555
  "div",
@@ -572,9 +566,9 @@ const rr = [
572
566
  "span",
573
567
  "svg",
574
568
  "ul"
575
- ], ie = rr.reduce((e, t) => {
569
+ ], ie = nr.reduce((e, t) => {
576
570
  const n = /* @__PURE__ */ M((o, i) => {
577
- const { asChild: r, ...s } = o, a = r ? kt : t;
571
+ const { asChild: r, ...s } = o, a = r ? It : t;
578
572
  return R(() => {
579
573
  window[Symbol.for("radix-ui")] = !0;
580
574
  }, []), /* @__PURE__ */ _(a, S({}, s, {
@@ -586,8 +580,8 @@ const rr = [
586
580
  [t]: n
587
581
  };
588
582
  }, {});
589
- function or(e, t) {
590
- e && Ct(
583
+ function rr(e, t) {
584
+ e && At(
591
585
  () => e.dispatchEvent(t)
592
586
  );
593
587
  }
@@ -595,7 +589,7 @@ function fe(e) {
595
589
  const t = L(e);
596
590
  return R(() => {
597
591
  t.current = e;
598
- }), xe(
592
+ }), be(
599
593
  () => (...n) => {
600
594
  var o;
601
595
  return (o = t.current) === null || o === void 0 ? void 0 : o.call(t, ...n);
@@ -603,7 +597,7 @@ function fe(e) {
603
597
  []
604
598
  );
605
599
  }
606
- function ir(e, t = globalThis == null ? void 0 : globalThis.document) {
600
+ function or(e, t = globalThis == null ? void 0 : globalThis.document) {
607
601
  const n = fe(e);
608
602
  R(() => {
609
603
  const o = (i) => {
@@ -615,27 +609,27 @@ function ir(e, t = globalThis == null ? void 0 : globalThis.document) {
615
609
  t
616
610
  ]);
617
611
  }
618
- const Ge = "dismissableLayer.update", sr = "dismissableLayer.pointerDownOutside", ar = "dismissableLayer.focusOutside";
619
- let pt;
620
- const cr = /* @__PURE__ */ Ue({
612
+ const Ge = "dismissableLayer.update", ir = "dismissableLayer.pointerDownOutside", sr = "dismissableLayer.focusOutside";
613
+ let ft;
614
+ const ar = /* @__PURE__ */ Ue({
621
615
  layers: /* @__PURE__ */ new Set(),
622
616
  layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
623
617
  branches: /* @__PURE__ */ new Set()
624
- }), lr = /* @__PURE__ */ M((e, t) => {
618
+ }), cr = /* @__PURE__ */ M((e, t) => {
625
619
  var n;
626
- const { disableOutsidePointerEvents: o = !1, onEscapeKeyDown: i, onPointerDownOutside: r, onFocusOutside: s, onInteractOutside: a, onDismiss: c, ...l } = e, u = Ot(cr), [d, p] = j(null), f = (n = d == null ? void 0 : d.ownerDocument) !== null && n !== void 0 ? n : globalThis == null ? void 0 : globalThis.document, [, h] = j({}), g = de(
620
+ const { disableOutsidePointerEvents: o = !1, onEscapeKeyDown: i, onPointerDownOutside: r, onFocusOutside: s, onInteractOutside: a, onDismiss: c, ...l } = e, u = Pt(ar), [d, p] = j(null), f = (n = d == null ? void 0 : d.ownerDocument) !== null && n !== void 0 ? n : globalThis == null ? void 0 : globalThis.document, [, h] = j({}), g = de(
627
621
  t,
628
622
  (P) => p(P)
629
623
  ), m = Array.from(u.layers), [v] = [
630
624
  ...u.layersWithOutsidePointerEventsDisabled
631
- ].slice(-1), y = m.indexOf(v), x = d ? m.indexOf(d) : -1, $ = u.layersWithOutsidePointerEventsDisabled.size > 0, b = x >= y, w = ur((P) => {
632
- const T = P.target, k = [
625
+ ].slice(-1), y = m.indexOf(v), b = d ? m.indexOf(d) : -1, $ = u.layersWithOutsidePointerEventsDisabled.size > 0, x = b >= y, w = lr((P) => {
626
+ const T = P.target, I = [
633
627
  ...u.branches
634
628
  ].some(
635
629
  (E) => E.contains(T)
636
630
  );
637
- !b || k || (r == null || r(P), a == null || a(P), P.defaultPrevented || c == null || c());
638
- }, f), A = dr((P) => {
631
+ !x || I || (r == null || r(P), a == null || a(P), P.defaultPrevented || c == null || c());
632
+ }, f), A = ur((P) => {
639
633
  const T = P.target;
640
634
  [
641
635
  ...u.branches
@@ -643,12 +637,12 @@ const cr = /* @__PURE__ */ Ue({
643
637
  (E) => E.contains(T)
644
638
  ) || (s == null || s(P), a == null || a(P), P.defaultPrevented || c == null || c());
645
639
  }, f);
646
- return ir((P) => {
647
- x === u.layers.size - 1 && (i == null || i(P), !P.defaultPrevented && c && (P.preventDefault(), c()));
640
+ return or((P) => {
641
+ b === u.layers.size - 1 && (i == null || i(P), !P.defaultPrevented && c && (P.preventDefault(), c()));
648
642
  }, f), R(() => {
649
643
  if (d)
650
- return o && (u.layersWithOutsidePointerEventsDisabled.size === 0 && (pt = f.body.style.pointerEvents, f.body.style.pointerEvents = "none"), u.layersWithOutsidePointerEventsDisabled.add(d)), u.layers.add(d), ht(), () => {
651
- o && u.layersWithOutsidePointerEventsDisabled.size === 1 && (f.body.style.pointerEvents = pt);
644
+ return o && (u.layersWithOutsidePointerEventsDisabled.size === 0 && (ft = f.body.style.pointerEvents, f.body.style.pointerEvents = "none"), u.layersWithOutsidePointerEventsDisabled.add(d)), u.layers.add(d), pt(), () => {
645
+ o && u.layersWithOutsidePointerEventsDisabled.size === 1 && (f.body.style.pointerEvents = ft);
652
646
  };
653
647
  }, [
654
648
  d,
@@ -656,7 +650,7 @@ const cr = /* @__PURE__ */ Ue({
656
650
  o,
657
651
  u
658
652
  ]), R(() => () => {
659
- d && (u.layers.delete(d), u.layersWithOutsidePointerEventsDisabled.delete(d), ht());
653
+ d && (u.layers.delete(d), u.layersWithOutsidePointerEventsDisabled.delete(d), pt());
660
654
  }, [
661
655
  d,
662
656
  u
@@ -666,7 +660,7 @@ const cr = /* @__PURE__ */ Ue({
666
660
  }, []), /* @__PURE__ */ _(ie.div, S({}, l, {
667
661
  ref: g,
668
662
  style: {
669
- pointerEvents: $ ? b ? "auto" : "none" : void 0,
663
+ pointerEvents: $ ? x ? "auto" : "none" : void 0,
670
664
  ...e.style
671
665
  },
672
666
  onFocusCapture: G(e.onFocusCapture, A.onFocusCapture),
@@ -674,14 +668,14 @@ const cr = /* @__PURE__ */ Ue({
674
668
  onPointerDownCapture: G(e.onPointerDownCapture, w.onPointerDownCapture)
675
669
  }));
676
670
  });
677
- function ur(e, t = globalThis == null ? void 0 : globalThis.document) {
671
+ function lr(e, t = globalThis == null ? void 0 : globalThis.document) {
678
672
  const n = fe(e), o = L(!1), i = L(() => {
679
673
  });
680
674
  return R(() => {
681
675
  const r = (a) => {
682
676
  if (a.target && !o.current) {
683
677
  let l = function() {
684
- Ht(sr, n, c, {
678
+ Ht(ir, n, c, {
685
679
  discrete: !0
686
680
  });
687
681
  };
@@ -708,11 +702,11 @@ function ur(e, t = globalThis == null ? void 0 : globalThis.document) {
708
702
  onPointerDownCapture: () => o.current = !0
709
703
  };
710
704
  }
711
- function dr(e, t = globalThis == null ? void 0 : globalThis.document) {
705
+ function ur(e, t = globalThis == null ? void 0 : globalThis.document) {
712
706
  const n = fe(e), o = L(!1);
713
707
  return R(() => {
714
708
  const i = (r) => {
715
- r.target && !o.current && Ht(ar, n, {
709
+ r.target && !o.current && Ht(sr, n, {
716
710
  originalEvent: r
717
711
  }, {
718
712
  discrete: !1
@@ -727,7 +721,7 @@ function dr(e, t = globalThis == null ? void 0 : globalThis.document) {
727
721
  onBlurCapture: () => o.current = !1
728
722
  };
729
723
  }
730
- function ht() {
724
+ function pt() {
731
725
  const e = new CustomEvent(Ge);
732
726
  document.dispatchEvent(e);
733
727
  }
@@ -739,36 +733,36 @@ function Ht(e, t, n, { discrete: o }) {
739
733
  });
740
734
  t && i.addEventListener(e, t, {
741
735
  once: !0
742
- }), o ? or(i, r) : i.dispatchEvent(r);
736
+ }), o ? rr(i, r) : i.dispatchEvent(r);
743
737
  }
744
- const le = globalThis != null && globalThis.document ? At : () => {
745
- }, fr = N.useId || (() => {
738
+ const le = globalThis != null && globalThis.document ? Ot : () => {
739
+ }, dr = N.useId || (() => {
746
740
  });
747
- let pr = 0;
748
- function hr(e) {
749
- const [t, n] = N.useState(fr());
741
+ let fr = 0;
742
+ function pr(e) {
743
+ const [t, n] = N.useState(dr());
750
744
  return le(() => {
751
745
  n(
752
- (o) => o ?? String(pr++)
746
+ (o) => o ?? String(fr++)
753
747
  );
754
748
  }, [
755
749
  e
756
750
  ]), t ? `radix-${t}` : "";
757
751
  }
758
- const gr = ["top", "right", "bottom", "left"], J = Math.min, B = Math.max, Le = Math.round, Re = Math.floor, ee = (e) => ({
752
+ const hr = ["top", "right", "bottom", "left"], Q = Math.min, B = Math.max, Le = Math.round, Re = Math.floor, ee = (e) => ({
759
753
  x: e,
760
754
  y: e
761
- }), mr = {
755
+ }), gr = {
762
756
  left: "right",
763
757
  right: "left",
764
758
  bottom: "top",
765
759
  top: "bottom"
766
- }, vr = {
760
+ }, mr = {
767
761
  start: "end",
768
762
  end: "start"
769
763
  };
770
764
  function Xe(e, t, n) {
771
- return B(e, J(t, n));
765
+ return B(e, Q(t, n));
772
766
  }
773
767
  function X(e, t) {
774
768
  return typeof e == "function" ? e(t) : e;
@@ -782,27 +776,27 @@ function pe(e) {
782
776
  function Ze(e) {
783
777
  return e === "x" ? "y" : "x";
784
778
  }
785
- function Qe(e) {
779
+ function Je(e) {
786
780
  return e === "y" ? "height" : "width";
787
781
  }
788
782
  function he(e) {
789
783
  return ["top", "bottom"].includes(Y(e)) ? "y" : "x";
790
784
  }
791
- function Je(e) {
785
+ function Qe(e) {
792
786
  return Ze(he(e));
793
787
  }
794
- function yr(e, t, n) {
788
+ function vr(e, t, n) {
795
789
  n === void 0 && (n = !1);
796
- const o = pe(e), i = Je(e), r = Qe(i);
790
+ const o = pe(e), i = Qe(e), r = Je(i);
797
791
  let s = i === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
798
792
  return t.reference[r] > t.floating[r] && (s = Me(s)), [s, Me(s)];
799
793
  }
800
- function br(e) {
794
+ function yr(e) {
801
795
  const t = Me(e);
802
796
  return [Ye(e), t, Ye(t)];
803
797
  }
804
798
  function Ye(e) {
805
- return e.replace(/start|end/g, (t) => vr[t]);
799
+ return e.replace(/start|end/g, (t) => mr[t]);
806
800
  }
807
801
  function xr(e, t, n) {
808
802
  const o = ["left", "right"], i = ["right", "left"], r = ["top", "bottom"], s = ["bottom", "top"];
@@ -817,15 +811,15 @@ function xr(e, t, n) {
817
811
  return [];
818
812
  }
819
813
  }
820
- function $r(e, t, n, o) {
814
+ function br(e, t, n, o) {
821
815
  const i = pe(e);
822
816
  let r = xr(Y(e), n === "start", o);
823
817
  return i && (r = r.map((s) => s + "-" + i), t && (r = r.concat(r.map(Ye)))), r;
824
818
  }
825
819
  function Me(e) {
826
- return e.replace(/left|right|bottom|top/g, (t) => mr[t]);
820
+ return e.replace(/left|right|bottom|top/g, (t) => gr[t]);
827
821
  }
828
- function wr(e) {
822
+ function $r(e) {
829
823
  return {
830
824
  top: 0,
831
825
  right: 0,
@@ -835,14 +829,14 @@ function wr(e) {
835
829
  };
836
830
  }
837
831
  function Bt(e) {
838
- return typeof e != "number" ? wr(e) : {
832
+ return typeof e != "number" ? $r(e) : {
839
833
  top: e,
840
834
  right: e,
841
835
  bottom: e,
842
836
  left: e
843
837
  };
844
838
  }
845
- function Ie(e) {
839
+ function ke(e) {
846
840
  return {
847
841
  ...e,
848
842
  top: e.y,
@@ -851,12 +845,12 @@ function Ie(e) {
851
845
  bottom: e.y + e.height
852
846
  };
853
847
  }
854
- function gt(e, t, n) {
848
+ function ht(e, t, n) {
855
849
  let {
856
850
  reference: o,
857
851
  floating: i
858
852
  } = e;
859
- const r = he(t), s = Je(t), a = Qe(s), c = Y(t), l = r === "y", u = o.x + o.width / 2 - i.width / 2, d = o.y + o.height / 2 - i.height / 2, p = o[a] / 2 - i[a] / 2;
853
+ const r = he(t), s = Qe(t), a = Je(s), c = Y(t), l = r === "y", u = o.x + o.width / 2 - i.width / 2, d = o.y + o.height / 2 - i.height / 2, p = o[a] / 2 - i[a] / 2;
860
854
  let f;
861
855
  switch (c) {
862
856
  case "top":
@@ -899,7 +893,7 @@ function gt(e, t, n) {
899
893
  }
900
894
  return f;
901
895
  }
902
- const _r = async (e, t, n) => {
896
+ const wr = async (e, t, n) => {
903
897
  const {
904
898
  placement: o = "bottom",
905
899
  strategy: i = "absolute",
@@ -913,16 +907,16 @@ const _r = async (e, t, n) => {
913
907
  }), {
914
908
  x: u,
915
909
  y: d
916
- } = gt(l, o, c), p = o, f = {}, h = 0;
910
+ } = ht(l, o, c), p = o, f = {}, h = 0;
917
911
  for (let g = 0; g < a.length; g++) {
918
912
  const {
919
913
  name: m,
920
914
  fn: v
921
915
  } = a[g], {
922
916
  x: y,
923
- y: x,
917
+ y: b,
924
918
  data: $,
925
- reset: b
919
+ reset: x
926
920
  } = await v({
927
921
  x: u,
928
922
  y: d,
@@ -937,21 +931,21 @@ const _r = async (e, t, n) => {
937
931
  floating: t
938
932
  }
939
933
  });
940
- if (u = y ?? u, d = x ?? d, f = {
934
+ if (u = y ?? u, d = b ?? d, f = {
941
935
  ...f,
942
936
  [m]: {
943
937
  ...f[m],
944
938
  ...$
945
939
  }
946
- }, b && h <= 50) {
947
- h++, typeof b == "object" && (b.placement && (p = b.placement), b.rects && (l = b.rects === !0 ? await s.getElementRects({
940
+ }, x && h <= 50) {
941
+ h++, typeof x == "object" && (x.placement && (p = x.placement), x.rects && (l = x.rects === !0 ? await s.getElementRects({
948
942
  reference: e,
949
943
  floating: t,
950
944
  strategy: i
951
- }) : b.rects), {
945
+ }) : x.rects), {
952
946
  x: u,
953
947
  y: d
954
- } = gt(l, p, c)), g = -1;
948
+ } = ht(l, p, c)), g = -1;
955
949
  continue;
956
950
  }
957
951
  }
@@ -979,7 +973,7 @@ async function $e(e, t) {
979
973
  elementContext: d = "floating",
980
974
  altBoundary: p = !1,
981
975
  padding: f = 0
982
- } = X(t, e), h = Bt(f), m = a[p ? d === "floating" ? "reference" : "floating" : d], v = Ie(await r.getClippingRect({
976
+ } = X(t, e), h = Bt(f), m = a[p ? d === "floating" ? "reference" : "floating" : d], v = ke(await r.getClippingRect({
983
977
  element: (n = await (r.isElement == null ? void 0 : r.isElement(m))) == null || n ? m : m.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(a.floating)),
984
978
  boundary: l,
985
979
  rootBoundary: u,
@@ -988,25 +982,25 @@ async function $e(e, t) {
988
982
  ...s.floating,
989
983
  x: o,
990
984
  y: i
991
- } : s.reference, x = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(a.floating)), $ = await (r.isElement == null ? void 0 : r.isElement(x)) ? await (r.getScale == null ? void 0 : r.getScale(x)) || {
985
+ } : s.reference, b = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(a.floating)), $ = await (r.isElement == null ? void 0 : r.isElement(b)) ? await (r.getScale == null ? void 0 : r.getScale(b)) || {
992
986
  x: 1,
993
987
  y: 1
994
988
  } : {
995
989
  x: 1,
996
990
  y: 1
997
- }, b = Ie(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
991
+ }, x = ke(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
998
992
  rect: y,
999
- offsetParent: x,
993
+ offsetParent: b,
1000
994
  strategy: c
1001
995
  }) : y);
1002
996
  return {
1003
- top: (v.top - b.top + h.top) / $.y,
1004
- bottom: (b.bottom - v.bottom + h.bottom) / $.y,
1005
- left: (v.left - b.left + h.left) / $.x,
1006
- right: (b.right - v.right + h.right) / $.x
997
+ top: (v.top - x.top + h.top) / $.y,
998
+ bottom: (x.bottom - v.bottom + h.bottom) / $.y,
999
+ left: (v.left - x.left + h.left) / $.x,
1000
+ right: (x.right - v.right + h.right) / $.x
1007
1001
  };
1008
1002
  }
1009
- const mt = (e) => ({
1003
+ const gt = (e) => ({
1010
1004
  name: "arrow",
1011
1005
  options: e,
1012
1006
  async fn(t) {
@@ -1026,10 +1020,10 @@ const mt = (e) => ({
1026
1020
  const u = Bt(l), d = {
1027
1021
  x: n,
1028
1022
  y: o
1029
- }, p = Je(i), f = Qe(p), h = await s.getDimensions(c), g = p === "y", m = g ? "top" : "left", v = g ? "bottom" : "right", y = g ? "clientHeight" : "clientWidth", x = r.reference[f] + r.reference[p] - d[p] - r.floating[f], $ = d[p] - r.reference[p], b = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(c));
1030
- let w = b ? b[y] : 0;
1031
- (!w || !await (s.isElement == null ? void 0 : s.isElement(b))) && (w = a.floating[y] || r.floating[f]);
1032
- const A = x / 2 - $ / 2, P = w / 2 - h[f] / 2 - 1, T = J(u[m], P), k = J(u[v], P), E = T, H = w - h[f] - k, D = w / 2 - h[f] / 2 + A, C = Xe(E, D, H), O = pe(i) != null && D != C && r.reference[f] / 2 - (D < E ? T : k) - h[f] / 2 < 0 ? D < E ? E - D : H - D : 0;
1023
+ }, p = Qe(i), f = Je(p), h = await s.getDimensions(c), g = p === "y", m = g ? "top" : "left", v = g ? "bottom" : "right", y = g ? "clientHeight" : "clientWidth", b = r.reference[f] + r.reference[p] - d[p] - r.floating[f], $ = d[p] - r.reference[p], x = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(c));
1024
+ let w = x ? x[y] : 0;
1025
+ (!w || !await (s.isElement == null ? void 0 : s.isElement(x))) && (w = a.floating[y] || r.floating[f]);
1026
+ const A = b / 2 - $ / 2, P = w / 2 - h[f] / 2 - 1, T = Q(u[m], P), I = Q(u[v], P), E = T, H = w - h[f] - I, D = w / 2 - h[f] / 2 + A, C = Xe(E, D, H), O = pe(i) != null && D != C && r.reference[f] / 2 - (D < E ? T : I) - h[f] / 2 < 0 ? D < E ? E - D : H - D : 0;
1033
1027
  return {
1034
1028
  [p]: d[p] - O,
1035
1029
  data: {
@@ -1038,7 +1032,7 @@ const mt = (e) => ({
1038
1032
  }
1039
1033
  };
1040
1034
  }
1041
- }), Pr = function(e) {
1035
+ }), _r = function(e) {
1042
1036
  return e === void 0 && (e = {}), {
1043
1037
  name: "flip",
1044
1038
  options: e,
@@ -1059,13 +1053,13 @@ const mt = (e) => ({
1059
1053
  fallbackAxisSideDirection: f = "none",
1060
1054
  flipAlignment: h = !0,
1061
1055
  ...g
1062
- } = X(e, t), m = Y(o), v = Y(s) === s, y = await (a.isRTL == null ? void 0 : a.isRTL(c.floating)), x = d || (v || !h ? [Me(s)] : br(s));
1063
- !d && f !== "none" && x.push(...$r(s, h, f, y));
1064
- const $ = [s, ...x], b = await $e(t, g), w = [];
1056
+ } = X(e, t), m = Y(o), v = Y(s) === s, y = await (a.isRTL == null ? void 0 : a.isRTL(c.floating)), b = d || (v || !h ? [Me(s)] : yr(s));
1057
+ !d && f !== "none" && b.push(...br(s, h, f, y));
1058
+ const $ = [s, ...b], x = await $e(t, g), w = [];
1065
1059
  let A = ((n = i.flip) == null ? void 0 : n.overflows) || [];
1066
- if (l && w.push(b[m]), u) {
1067
- const E = yr(o, r, y);
1068
- w.push(b[E[0]], b[E[1]]);
1060
+ if (l && w.push(x[m]), u) {
1061
+ const E = vr(o, r, y);
1062
+ w.push(x[E[0]], x[E[1]]);
1069
1063
  }
1070
1064
  if (A = [...A, {
1071
1065
  placement: o,
@@ -1087,8 +1081,8 @@ const mt = (e) => ({
1087
1081
  if (!D)
1088
1082
  switch (p) {
1089
1083
  case "bestFit": {
1090
- var k;
1091
- const C = (k = A.map((W) => [W.placement, W.overflows.filter((O) => O > 0).reduce((O, Z) => O + Z, 0)]).sort((W, O) => W[1] - O[1])[0]) == null ? void 0 : k[0];
1084
+ var I;
1085
+ const C = (I = A.map((W) => [W.placement, W.overflows.filter((O) => O > 0).reduce((O, Z) => O + Z, 0)]).sort((W, O) => W[1] - O[1])[0]) == null ? void 0 : I[0];
1092
1086
  C && (D = C);
1093
1087
  break;
1094
1088
  }
@@ -1107,7 +1101,7 @@ const mt = (e) => ({
1107
1101
  }
1108
1102
  };
1109
1103
  };
1110
- function vt(e, t) {
1104
+ function mt(e, t) {
1111
1105
  return {
1112
1106
  top: e.top - t.height,
1113
1107
  right: e.right - t.width,
@@ -1115,10 +1109,10 @@ function vt(e, t) {
1115
1109
  left: e.left - t.width
1116
1110
  };
1117
1111
  }
1118
- function yt(e) {
1119
- return gr.some((t) => e[t] >= 0);
1112
+ function vt(e) {
1113
+ return hr.some((t) => e[t] >= 0);
1120
1114
  }
1121
- const Or = function(e) {
1115
+ const Pr = function(e) {
1122
1116
  return e === void 0 && (e = {}), {
1123
1117
  name: "hide",
1124
1118
  options: e,
@@ -1134,11 +1128,11 @@ const Or = function(e) {
1134
1128
  const r = await $e(t, {
1135
1129
  ...i,
1136
1130
  elementContext: "reference"
1137
- }), s = vt(r, n.reference);
1131
+ }), s = mt(r, n.reference);
1138
1132
  return {
1139
1133
  data: {
1140
1134
  referenceHiddenOffsets: s,
1141
- referenceHidden: yt(s)
1135
+ referenceHidden: vt(s)
1142
1136
  }
1143
1137
  };
1144
1138
  }
@@ -1146,11 +1140,11 @@ const Or = function(e) {
1146
1140
  const r = await $e(t, {
1147
1141
  ...i,
1148
1142
  altBoundary: !0
1149
- }), s = vt(r, n.floating);
1143
+ }), s = mt(r, n.floating);
1150
1144
  return {
1151
1145
  data: {
1152
1146
  escapedOffsets: s,
1153
- escaped: yt(s)
1147
+ escaped: vt(s)
1154
1148
  }
1155
1149
  };
1156
1150
  }
@@ -1160,7 +1154,7 @@ const Or = function(e) {
1160
1154
  }
1161
1155
  };
1162
1156
  };
1163
- async function Ar(e, t) {
1157
+ async function Or(e, t) {
1164
1158
  const {
1165
1159
  placement: n,
1166
1160
  platform: o,
@@ -1188,7 +1182,7 @@ async function Ar(e, t) {
1188
1182
  y: f * u
1189
1183
  };
1190
1184
  }
1191
- const Cr = function(e) {
1185
+ const Ar = function(e) {
1192
1186
  return e === void 0 && (e = 0), {
1193
1187
  name: "offset",
1194
1188
  options: e,
@@ -1196,7 +1190,7 @@ const Cr = function(e) {
1196
1190
  const {
1197
1191
  x: n,
1198
1192
  y: o
1199
- } = t, i = await Ar(t, e);
1193
+ } = t, i = await Or(t, e);
1200
1194
  return {
1201
1195
  x: n + i.x,
1202
1196
  y: o + i.y,
@@ -1204,7 +1198,7 @@ const Cr = function(e) {
1204
1198
  };
1205
1199
  }
1206
1200
  };
1207
- }, Er = function(e) {
1201
+ }, Cr = function(e) {
1208
1202
  return e === void 0 && (e = {}), {
1209
1203
  name: "shift",
1210
1204
  options: e,
@@ -1235,12 +1229,12 @@ const Cr = function(e) {
1235
1229
  }, u = await $e(t, c), d = he(Y(i)), p = Ze(d);
1236
1230
  let f = l[p], h = l[d];
1237
1231
  if (r) {
1238
- const m = p === "y" ? "top" : "left", v = p === "y" ? "bottom" : "right", y = f + u[m], x = f - u[v];
1239
- f = Xe(y, f, x);
1232
+ const m = p === "y" ? "top" : "left", v = p === "y" ? "bottom" : "right", y = f + u[m], b = f - u[v];
1233
+ f = Xe(y, f, b);
1240
1234
  }
1241
1235
  if (s) {
1242
- const m = d === "y" ? "top" : "left", v = d === "y" ? "bottom" : "right", y = h + u[m], x = h - u[v];
1243
- h = Xe(y, h, x);
1236
+ const m = d === "y" ? "top" : "left", v = d === "y" ? "bottom" : "right", y = h + u[m], b = h - u[v];
1237
+ h = Xe(y, h, b);
1244
1238
  }
1245
1239
  const g = a.fn({
1246
1240
  ...t,
@@ -1256,7 +1250,7 @@ const Cr = function(e) {
1256
1250
  };
1257
1251
  }
1258
1252
  };
1259
- }, Tr = function(e) {
1253
+ }, Er = function(e) {
1260
1254
  return e === void 0 && (e = {}), {
1261
1255
  options: e,
1262
1256
  fn(t) {
@@ -1284,13 +1278,13 @@ const Cr = function(e) {
1284
1278
  ...g
1285
1279
  };
1286
1280
  if (c) {
1287
- const x = p === "y" ? "height" : "width", $ = r.reference[p] - r.floating[x] + m.mainAxis, b = r.reference[p] + r.reference[x] - m.mainAxis;
1288
- f < $ ? f = $ : f > b && (f = b);
1281
+ const b = p === "y" ? "height" : "width", $ = r.reference[p] - r.floating[b] + m.mainAxis, x = r.reference[p] + r.reference[b] - m.mainAxis;
1282
+ f < $ ? f = $ : f > x && (f = x);
1289
1283
  }
1290
1284
  if (l) {
1291
1285
  var v, y;
1292
- const x = p === "y" ? "width" : "height", $ = ["top", "left"].includes(Y(i)), b = r.reference[d] - r.floating[x] + ($ && ((v = s.offset) == null ? void 0 : v[d]) || 0) + ($ ? 0 : m.crossAxis), w = r.reference[d] + r.reference[x] + ($ ? 0 : ((y = s.offset) == null ? void 0 : y[d]) || 0) - ($ ? m.crossAxis : 0);
1293
- h < b ? h = b : h > w && (h = w);
1286
+ const b = p === "y" ? "width" : "height", $ = ["top", "left"].includes(Y(i)), x = r.reference[d] - r.floating[b] + ($ && ((v = s.offset) == null ? void 0 : v[d]) || 0) + ($ ? 0 : m.crossAxis), w = r.reference[d] + r.reference[b] + ($ ? 0 : ((y = s.offset) == null ? void 0 : y[d]) || 0) - ($ ? m.crossAxis : 0);
1287
+ h < x ? h = x : h > w && (h = w);
1294
1288
  }
1295
1289
  return {
1296
1290
  [p]: f,
@@ -1298,7 +1292,7 @@ const Cr = function(e) {
1298
1292
  };
1299
1293
  }
1300
1294
  };
1301
- }, Rr = function(e) {
1295
+ }, Tr = function(e) {
1302
1296
  return e === void 0 && (e = {}), {
1303
1297
  name: "size",
1304
1298
  options: e,
@@ -1319,25 +1313,25 @@ const Cr = function(e) {
1319
1313
  let h, g;
1320
1314
  l === "top" || l === "bottom" ? (h = l, g = u === (await (i.isRTL == null ? void 0 : i.isRTL(r.floating)) ? "start" : "end") ? "left" : "right") : (g = l, h = u === "end" ? "top" : "bottom");
1321
1315
  const m = f - c[h], v = p - c[g], y = !t.middlewareData.shift;
1322
- let x = m, $ = v;
1316
+ let b = m, $ = v;
1323
1317
  if (d) {
1324
1318
  const w = p - c.left - c.right;
1325
- $ = u || y ? J(v, w) : w;
1319
+ $ = u || y ? Q(v, w) : w;
1326
1320
  } else {
1327
1321
  const w = f - c.top - c.bottom;
1328
- x = u || y ? J(m, w) : w;
1322
+ b = u || y ? Q(m, w) : w;
1329
1323
  }
1330
1324
  if (y && !u) {
1331
1325
  const w = B(c.left, 0), A = B(c.right, 0), P = B(c.top, 0), T = B(c.bottom, 0);
1332
- d ? $ = p - 2 * (w !== 0 || A !== 0 ? w + A : B(c.left, c.right)) : x = f - 2 * (P !== 0 || T !== 0 ? P + T : B(c.top, c.bottom));
1326
+ d ? $ = p - 2 * (w !== 0 || A !== 0 ? w + A : B(c.left, c.right)) : b = f - 2 * (P !== 0 || T !== 0 ? P + T : B(c.top, c.bottom));
1333
1327
  }
1334
1328
  await s({
1335
1329
  ...t,
1336
1330
  availableWidth: $,
1337
- availableHeight: x
1331
+ availableHeight: b
1338
1332
  });
1339
- const b = await i.getDimensions(r.floating);
1340
- return p !== b.width || f !== b.height ? {
1333
+ const x = await i.getDimensions(r.floating);
1334
+ return p !== x.width || f !== x.height ? {
1341
1335
  reset: {
1342
1336
  rects: !0
1343
1337
  }
@@ -1365,7 +1359,7 @@ function q(e) {
1365
1359
  function V(e) {
1366
1360
  return e instanceof HTMLElement || e instanceof z(e).HTMLElement;
1367
1361
  }
1368
- function bt(e) {
1362
+ function yt(e) {
1369
1363
  return typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof z(e).ShadowRoot;
1370
1364
  }
1371
1365
  function Pe(e) {
@@ -1377,14 +1371,14 @@ function Pe(e) {
1377
1371
  } = U(e);
1378
1372
  return /auto|scroll|overlay|hidden|clip/.test(t + o + n) && !["inline", "contents"].includes(i);
1379
1373
  }
1380
- function Sr(e) {
1374
+ function Rr(e) {
1381
1375
  return ["table", "td", "th"].includes(te(e));
1382
1376
  }
1383
1377
  function et(e) {
1384
1378
  const t = tt(), n = U(e);
1385
1379
  return n.transform !== "none" || n.perspective !== "none" || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((o) => (n.willChange || "").includes(o)) || ["paint", "layout", "strict", "content"].some((o) => (n.contain || "").includes(o));
1386
1380
  }
1387
- function Dr(e) {
1381
+ function Sr(e) {
1388
1382
  let t = ue(e);
1389
1383
  for (; V(t) && !Fe(t); ) {
1390
1384
  if (et(t))
@@ -1418,10 +1412,10 @@ function ue(e) {
1418
1412
  // Step into the shadow DOM of the parent of a slotted node.
1419
1413
  e.assignedSlot || // DOM Element detected.
1420
1414
  e.parentNode || // ShadowRoot detected.
1421
- bt(e) && e.host || // Fallback.
1415
+ yt(e) && e.host || // Fallback.
1422
1416
  K(e)
1423
1417
  );
1424
- return bt(t) ? t.host : t;
1418
+ return yt(t) ? t.host : t;
1425
1419
  }
1426
1420
  function zt(e) {
1427
1421
  const t = ue(e);
@@ -1461,15 +1455,15 @@ function ce(e) {
1461
1455
  y: a
1462
1456
  };
1463
1457
  }
1464
- const Nr = /* @__PURE__ */ ee(0);
1458
+ const Dr = /* @__PURE__ */ ee(0);
1465
1459
  function Ut(e) {
1466
1460
  const t = z(e);
1467
- return !tt() || !t.visualViewport ? Nr : {
1461
+ return !tt() || !t.visualViewport ? Dr : {
1468
1462
  x: t.visualViewport.offsetLeft,
1469
1463
  y: t.visualViewport.offsetTop
1470
1464
  };
1471
1465
  }
1472
- function Lr(e, t, n) {
1466
+ function Nr(e, t, n) {
1473
1467
  return t === void 0 && (t = !1), !n || t && n !== z(e) ? !1 : t;
1474
1468
  }
1475
1469
  function oe(e, t, n, o) {
@@ -1477,24 +1471,24 @@ function oe(e, t, n, o) {
1477
1471
  const i = e.getBoundingClientRect(), r = nt(e);
1478
1472
  let s = ee(1);
1479
1473
  t && (o ? q(o) && (s = ce(o)) : s = ce(e));
1480
- const a = Lr(r, n, o) ? Ut(r) : ee(0);
1474
+ const a = Nr(r, n, o) ? Ut(r) : ee(0);
1481
1475
  let c = (i.left + a.x) / s.x, l = (i.top + a.y) / s.y, u = i.width / s.x, d = i.height / s.y;
1482
1476
  if (r) {
1483
1477
  const p = z(r), f = o && q(o) ? z(o) : o;
1484
1478
  let h = p.frameElement;
1485
1479
  for (; h && o && f !== p; ) {
1486
- const g = ce(h), m = h.getBoundingClientRect(), v = U(h), y = m.left + (h.clientLeft + parseFloat(v.paddingLeft)) * g.x, x = m.top + (h.clientTop + parseFloat(v.paddingTop)) * g.y;
1487
- c *= g.x, l *= g.y, u *= g.x, d *= g.y, c += y, l += x, h = z(h).frameElement;
1480
+ const g = ce(h), m = h.getBoundingClientRect(), v = U(h), y = m.left + (h.clientLeft + parseFloat(v.paddingLeft)) * g.x, b = m.top + (h.clientTop + parseFloat(v.paddingTop)) * g.y;
1481
+ c *= g.x, l *= g.y, u *= g.x, d *= g.y, c += y, l += b, h = z(h).frameElement;
1488
1482
  }
1489
1483
  }
1490
- return Ie({
1484
+ return ke({
1491
1485
  width: u,
1492
1486
  height: d,
1493
1487
  x: c,
1494
1488
  y: l
1495
1489
  });
1496
1490
  }
1497
- function Mr(e) {
1491
+ function Lr(e) {
1498
1492
  let {
1499
1493
  rect: t,
1500
1494
  offsetParent: n,
@@ -1519,7 +1513,7 @@ function Mr(e) {
1519
1513
  y: t.y * a.y - s.scrollTop * a.y + c.y
1520
1514
  };
1521
1515
  }
1522
- function Ir(e) {
1516
+ function Mr(e) {
1523
1517
  return Array.from(e.getClientRects());
1524
1518
  }
1525
1519
  function Vt(e) {
@@ -1536,7 +1530,7 @@ function kr(e) {
1536
1530
  y: a
1537
1531
  };
1538
1532
  }
1539
- function Fr(e, t) {
1533
+ function Ir(e, t) {
1540
1534
  const n = z(e), o = K(e), i = n.visualViewport;
1541
1535
  let r = o.clientWidth, s = o.clientHeight, a = 0, c = 0;
1542
1536
  if (i) {
@@ -1551,7 +1545,7 @@ function Fr(e, t) {
1551
1545
  y: c
1552
1546
  };
1553
1547
  }
1554
- function Hr(e, t) {
1548
+ function Fr(e, t) {
1555
1549
  const n = oe(e, !0, t === "fixed"), o = n.top + e.clientTop, i = n.left + e.clientLeft, r = V(e) ? ce(e) : ee(1), s = e.clientWidth * r.x, a = e.clientHeight * r.y, c = i * r.x, l = o * r.y;
1556
1550
  return {
1557
1551
  width: s,
@@ -1563,11 +1557,11 @@ function Hr(e, t) {
1563
1557
  function xt(e, t, n) {
1564
1558
  let o;
1565
1559
  if (t === "viewport")
1566
- o = Fr(e, n);
1560
+ o = Ir(e, n);
1567
1561
  else if (t === "document")
1568
1562
  o = kr(K(e));
1569
1563
  else if (q(t))
1570
- o = Hr(t, n);
1564
+ o = Fr(t, n);
1571
1565
  else {
1572
1566
  const i = Ut(e);
1573
1567
  o = {
@@ -1576,13 +1570,13 @@ function xt(e, t, n) {
1576
1570
  y: t.y - i.y
1577
1571
  };
1578
1572
  }
1579
- return Ie(o);
1573
+ return ke(o);
1580
1574
  }
1581
1575
  function Gt(e, t) {
1582
1576
  const n = ue(e);
1583
1577
  return n === t || !q(n) || Fe(n) ? !1 : U(n).position === "fixed" || Gt(n, t);
1584
1578
  }
1585
- function Br(e, t) {
1579
+ function Hr(e, t) {
1586
1580
  const n = t.get(e);
1587
1581
  if (n)
1588
1582
  return n;
@@ -1595,16 +1589,16 @@ function Br(e, t) {
1595
1589
  }
1596
1590
  return t.set(e, o), o;
1597
1591
  }
1598
- function jr(e) {
1592
+ function Br(e) {
1599
1593
  let {
1600
1594
  element: t,
1601
1595
  boundary: n,
1602
1596
  rootBoundary: o,
1603
1597
  strategy: i
1604
1598
  } = e;
1605
- const s = [...n === "clippingAncestors" ? Br(t, this._c) : [].concat(n), o], a = s[0], c = s.reduce((l, u) => {
1599
+ const s = [...n === "clippingAncestors" ? Hr(t, this._c) : [].concat(n), o], a = s[0], c = s.reduce((l, u) => {
1606
1600
  const d = xt(t, u, i);
1607
- return l.top = B(d.top, l.top), l.right = J(d.right, l.right), l.bottom = J(d.bottom, l.bottom), l.left = B(d.left, l.left), l;
1601
+ return l.top = B(d.top, l.top), l.right = Q(d.right, l.right), l.bottom = Q(d.bottom, l.bottom), l.left = B(d.left, l.left), l;
1608
1602
  }, xt(t, a, i));
1609
1603
  return {
1610
1604
  width: c.right - c.left,
@@ -1613,10 +1607,10 @@ function jr(e) {
1613
1607
  y: c.top
1614
1608
  };
1615
1609
  }
1616
- function zr(e) {
1610
+ function jr(e) {
1617
1611
  return Wt(e);
1618
1612
  }
1619
- function Wr(e, t, n) {
1613
+ function zr(e, t, n) {
1620
1614
  const o = V(t), i = K(t), r = n === "fixed", s = oe(e, !0, r, t);
1621
1615
  let a = {
1622
1616
  scrollLeft: 0,
@@ -1627,8 +1621,7 @@ function Wr(e, t, n) {
1627
1621
  if ((te(t) !== "body" || Pe(i)) && (a = He(t)), o) {
1628
1622
  const l = oe(t, !0, r, t);
1629
1623
  c.x = l.x + t.clientLeft, c.y = l.y + t.clientTop;
1630
- } else
1631
- i && (c.x = Vt(i));
1624
+ } else i && (c.x = Vt(i));
1632
1625
  return {
1633
1626
  x: s.left + a.scrollLeft - c.x,
1634
1627
  y: s.top + a.scrollTop - c.y,
@@ -1636,19 +1629,19 @@ function Wr(e, t, n) {
1636
1629
  height: s.height
1637
1630
  };
1638
1631
  }
1639
- function $t(e, t) {
1632
+ function bt(e, t) {
1640
1633
  return !V(e) || U(e).position === "fixed" ? null : t ? t(e) : e.offsetParent;
1641
1634
  }
1642
1635
  function Xt(e, t) {
1643
1636
  const n = z(e);
1644
1637
  if (!V(e))
1645
1638
  return n;
1646
- let o = $t(e, t);
1647
- for (; o && Sr(o) && U(o).position === "static"; )
1648
- o = $t(o, t);
1649
- return o && (te(o) === "html" || te(o) === "body" && U(o).position === "static" && !et(o)) ? n : o || Dr(e) || n;
1639
+ let o = bt(e, t);
1640
+ for (; o && Rr(o) && U(o).position === "static"; )
1641
+ o = bt(o, t);
1642
+ return o && (te(o) === "html" || te(o) === "body" && U(o).position === "static" && !et(o)) ? n : o || Sr(e) || n;
1650
1643
  }
1651
- const Ur = async function(e) {
1644
+ const Wr = async function(e) {
1652
1645
  let {
1653
1646
  reference: t,
1654
1647
  floating: n,
@@ -1656,7 +1649,7 @@ const Ur = async function(e) {
1656
1649
  } = e;
1657
1650
  const i = this.getOffsetParent || Xt, r = this.getDimensions;
1658
1651
  return {
1659
- reference: Wr(t, await i(n), o),
1652
+ reference: zr(t, await i(n), o),
1660
1653
  floating: {
1661
1654
  x: 0,
1662
1655
  y: 0,
@@ -1664,22 +1657,22 @@ const Ur = async function(e) {
1664
1657
  }
1665
1658
  };
1666
1659
  };
1667
- function Vr(e) {
1660
+ function Ur(e) {
1668
1661
  return U(e).direction === "rtl";
1669
1662
  }
1670
- const Gr = {
1671
- convertOffsetParentRelativeRectToViewportRelativeRect: Mr,
1663
+ const Vr = {
1664
+ convertOffsetParentRelativeRectToViewportRelativeRect: Lr,
1672
1665
  getDocumentElement: K,
1673
- getClippingRect: jr,
1666
+ getClippingRect: Br,
1674
1667
  getOffsetParent: Xt,
1675
- getElementRects: Ur,
1676
- getClientRects: Ir,
1677
- getDimensions: zr,
1668
+ getElementRects: Wr,
1669
+ getClientRects: Mr,
1670
+ getDimensions: jr,
1678
1671
  getScale: ce,
1679
1672
  isElement: q,
1680
- isRTL: Vr
1673
+ isRTL: Ur
1681
1674
  };
1682
- function Xr(e, t) {
1675
+ function Gr(e, t) {
1683
1676
  let n = null, o;
1684
1677
  const i = K(e);
1685
1678
  function r() {
@@ -1697,19 +1690,19 @@ function Xr(e, t) {
1697
1690
  return;
1698
1691
  const f = Re(u), h = Re(i.clientWidth - (l + d)), g = Re(i.clientHeight - (u + p)), m = Re(l), y = {
1699
1692
  rootMargin: -f + "px " + -h + "px " + -g + "px " + -m + "px",
1700
- threshold: B(0, J(1, c)) || 1
1693
+ threshold: B(0, Q(1, c)) || 1
1701
1694
  };
1702
- let x = !0;
1703
- function $(b) {
1704
- const w = b[0].intersectionRatio;
1695
+ let b = !0;
1696
+ function $(x) {
1697
+ const w = x[0].intersectionRatio;
1705
1698
  if (w !== c) {
1706
- if (!x)
1699
+ if (!b)
1707
1700
  return s();
1708
1701
  w ? s(!1, w) : o = setTimeout(() => {
1709
1702
  s(!1, 1e-7);
1710
1703
  }, 100);
1711
1704
  }
1712
- x = !1;
1705
+ b = !1;
1713
1706
  }
1714
1707
  try {
1715
1708
  n = new IntersectionObserver($, {
@@ -1724,7 +1717,7 @@ function Xr(e, t) {
1724
1717
  }
1725
1718
  return s(!0), r;
1726
1719
  }
1727
- function Yr(e, t, n, o) {
1720
+ function Xr(e, t, n, o) {
1728
1721
  o === void 0 && (o = {});
1729
1722
  const {
1730
1723
  ancestorScroll: i = !0,
@@ -1738,7 +1731,7 @@ function Yr(e, t, n, o) {
1738
1731
  passive: !0
1739
1732
  }), r && v.addEventListener("resize", n);
1740
1733
  });
1741
- const d = l && a ? Xr(l, n) : null;
1734
+ const d = l && a ? Gr(l, n) : null;
1742
1735
  let p = -1, f = null;
1743
1736
  s && (f = new ResizeObserver((v) => {
1744
1737
  let [y] = v;
@@ -1758,19 +1751,19 @@ function Yr(e, t, n, o) {
1758
1751
  }), d && d(), f && f.disconnect(), f = null, c && cancelAnimationFrame(h);
1759
1752
  };
1760
1753
  }
1761
- const qr = (e, t, n) => {
1754
+ const Yr = (e, t, n) => {
1762
1755
  const o = /* @__PURE__ */ new Map(), i = {
1763
- platform: Gr,
1756
+ platform: Vr,
1764
1757
  ...n
1765
1758
  }, r = {
1766
1759
  ...i.platform,
1767
1760
  _c: o
1768
1761
  };
1769
- return _r(e, t, {
1762
+ return wr(e, t, {
1770
1763
  ...i,
1771
1764
  platform: r
1772
1765
  });
1773
- }, Kr = (e) => {
1766
+ }, qr = (e) => {
1774
1767
  function t(n) {
1775
1768
  return {}.hasOwnProperty.call(n, "current");
1776
1769
  }
@@ -1782,18 +1775,18 @@ const qr = (e, t, n) => {
1782
1775
  element: o,
1783
1776
  padding: i
1784
1777
  } = typeof e == "function" ? e(n) : e;
1785
- return o && t(o) ? o.current != null ? mt({
1778
+ return o && t(o) ? o.current != null ? gt({
1786
1779
  element: o.current,
1787
1780
  padding: i
1788
- }).fn(n) : {} : o ? mt({
1781
+ }).fn(n) : {} : o ? gt({
1789
1782
  element: o,
1790
1783
  padding: i
1791
1784
  }).fn(n) : {};
1792
1785
  }
1793
1786
  };
1794
1787
  };
1795
- var De = typeof document < "u" ? At : R;
1796
- function ke(e, t) {
1788
+ var De = typeof document < "u" ? Ot : R;
1789
+ function Ie(e, t) {
1797
1790
  if (e === t)
1798
1791
  return !0;
1799
1792
  if (typeof e != typeof t)
@@ -1803,10 +1796,9 @@ function ke(e, t) {
1803
1796
  let n, o, i;
1804
1797
  if (e && t && typeof e == "object") {
1805
1798
  if (Array.isArray(e)) {
1806
- if (n = e.length, n != t.length)
1807
- return !1;
1799
+ if (n = e.length, n != t.length) return !1;
1808
1800
  for (o = n; o-- !== 0; )
1809
- if (!ke(e[o], t[o]))
1801
+ if (!Ie(e[o], t[o]))
1810
1802
  return !1;
1811
1803
  return !0;
1812
1804
  }
@@ -1817,7 +1809,7 @@ function ke(e, t) {
1817
1809
  return !1;
1818
1810
  for (o = n; o-- !== 0; ) {
1819
1811
  const r = i[o];
1820
- if (!(r === "_owner" && e.$$typeof) && !ke(e[r], t[r]))
1812
+ if (!(r === "_owner" && e.$$typeof) && !Ie(e[r], t[r]))
1821
1813
  return !1;
1822
1814
  }
1823
1815
  return !0;
@@ -1827,17 +1819,17 @@ function ke(e, t) {
1827
1819
  function Yt(e) {
1828
1820
  return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
1829
1821
  }
1830
- function wt(e, t) {
1822
+ function $t(e, t) {
1831
1823
  const n = Yt(e);
1832
1824
  return Math.round(t * n) / n;
1833
1825
  }
1834
- function _t(e) {
1826
+ function wt(e) {
1835
1827
  const t = N.useRef(e);
1836
1828
  return De(() => {
1837
1829
  t.current = e;
1838
1830
  }), t;
1839
1831
  }
1840
- function Zr(e) {
1832
+ function Kr(e) {
1841
1833
  e === void 0 && (e = {});
1842
1834
  const {
1843
1835
  placement: t = "bottom",
@@ -1859,12 +1851,12 @@ function Zr(e) {
1859
1851
  middlewareData: {},
1860
1852
  isPositioned: !1
1861
1853
  }), [p, f] = N.useState(o);
1862
- ke(p, o) || f(o);
1854
+ Ie(p, o) || f(o);
1863
1855
  const [h, g] = N.useState(null), [m, v] = N.useState(null), y = N.useCallback((O) => {
1864
1856
  O != w.current && (w.current = O, g(O));
1865
- }, [g]), x = N.useCallback((O) => {
1857
+ }, [g]), b = N.useCallback((O) => {
1866
1858
  O !== A.current && (A.current = O, v(O));
1867
- }, [v]), $ = r || h, b = s || m, w = N.useRef(null), A = N.useRef(null), P = N.useRef(u), T = _t(c), k = _t(i), E = N.useCallback(() => {
1859
+ }, [v]), $ = r || h, x = s || m, w = N.useRef(null), A = N.useRef(null), P = N.useRef(u), T = wt(c), I = wt(i), E = N.useCallback(() => {
1868
1860
  if (!w.current || !A.current)
1869
1861
  return;
1870
1862
  const O = {
@@ -1872,16 +1864,16 @@ function Zr(e) {
1872
1864
  strategy: n,
1873
1865
  middleware: p
1874
1866
  };
1875
- k.current && (O.platform = k.current), qr(w.current, A.current, O).then((Z) => {
1876
- const Q = {
1867
+ I.current && (O.platform = I.current), Yr(w.current, A.current, O).then((Z) => {
1868
+ const J = {
1877
1869
  ...Z,
1878
1870
  isPositioned: !0
1879
1871
  };
1880
- H.current && !ke(P.current, Q) && (P.current = Q, xn.flushSync(() => {
1881
- d(Q);
1872
+ H.current && !Ie(P.current, J) && (P.current = J, bn.flushSync(() => {
1873
+ d(J);
1882
1874
  }));
1883
1875
  });
1884
- }, [p, t, n, k]);
1876
+ }, [p, t, n, I]);
1885
1877
  De(() => {
1886
1878
  l === !1 && P.current.isPositioned && (P.current.isPositioned = !1, d((O) => ({
1887
1879
  ...O,
@@ -1892,21 +1884,21 @@ function Zr(e) {
1892
1884
  De(() => (H.current = !0, () => {
1893
1885
  H.current = !1;
1894
1886
  }), []), De(() => {
1895
- if ($ && (w.current = $), b && (A.current = b), $ && b) {
1887
+ if ($ && (w.current = $), x && (A.current = x), $ && x) {
1896
1888
  if (T.current)
1897
- return T.current($, b, E);
1889
+ return T.current($, x, E);
1898
1890
  E();
1899
1891
  }
1900
- }, [$, b, E, T]);
1892
+ }, [$, x, E, T]);
1901
1893
  const D = N.useMemo(() => ({
1902
1894
  reference: w,
1903
1895
  floating: A,
1904
1896
  setReference: y,
1905
- setFloating: x
1906
- }), [y, x]), C = N.useMemo(() => ({
1897
+ setFloating: b
1898
+ }), [y, b]), C = N.useMemo(() => ({
1907
1899
  reference: $,
1908
- floating: b
1909
- }), [$, b]), W = N.useMemo(() => {
1900
+ floating: x
1901
+ }), [$, x]), W = N.useMemo(() => {
1910
1902
  const O = {
1911
1903
  position: n,
1912
1904
  left: 0,
@@ -1914,17 +1906,17 @@ function Zr(e) {
1914
1906
  };
1915
1907
  if (!C.floating)
1916
1908
  return O;
1917
- const Z = wt(C.floating, u.x), Q = wt(C.floating, u.y);
1909
+ const Z = $t(C.floating, u.x), J = $t(C.floating, u.y);
1918
1910
  return a ? {
1919
1911
  ...O,
1920
- transform: "translate(" + Z + "px, " + Q + "px)",
1912
+ transform: "translate(" + Z + "px, " + J + "px)",
1921
1913
  ...Yt(C.floating) >= 1.5 && {
1922
1914
  willChange: "transform"
1923
1915
  }
1924
1916
  } : {
1925
1917
  position: n,
1926
1918
  left: Z,
1927
- top: Q
1919
+ top: J
1928
1920
  };
1929
1921
  }, [n, a, C.floating, u.x, u.y]);
1930
1922
  return N.useMemo(() => ({
@@ -1935,7 +1927,7 @@ function Zr(e) {
1935
1927
  floatingStyles: W
1936
1928
  }), [u, E, D, C, W]);
1937
1929
  }
1938
- const Qr = /* @__PURE__ */ M((e, t) => {
1930
+ const Zr = /* @__PURE__ */ M((e, t) => {
1939
1931
  const { children: n, width: o = 10, height: i = 5, ...r } = e;
1940
1932
  return /* @__PURE__ */ _(ie.svg, S({}, r, {
1941
1933
  ref: t,
@@ -1946,8 +1938,8 @@ const Qr = /* @__PURE__ */ M((e, t) => {
1946
1938
  }), e.asChild ? n : /* @__PURE__ */ _("polygon", {
1947
1939
  points: "0,0 30,0 15,10"
1948
1940
  }));
1949
- }), Jr = Qr;
1950
- function eo(e) {
1941
+ }), Jr = Zr;
1942
+ function Qr(e) {
1951
1943
  const [t, n] = j(void 0);
1952
1944
  return le(() => {
1953
1945
  if (e) {
@@ -1956,8 +1948,7 @@ function eo(e) {
1956
1948
  height: e.offsetHeight
1957
1949
  });
1958
1950
  const o = new ResizeObserver((i) => {
1959
- if (!Array.isArray(i) || !i.length)
1960
- return;
1951
+ if (!Array.isArray(i) || !i.length) return;
1961
1952
  const r = i[0];
1962
1953
  let s, a;
1963
1954
  if ("borderBoxSize" in r) {
@@ -1979,26 +1970,26 @@ function eo(e) {
1979
1970
  e
1980
1971
  ]), t;
1981
1972
  }
1982
- const qt = "Popper", [Kt, Zt] = It(qt), [to, Qt] = Kt(qt), no = (e) => {
1973
+ const qt = "Popper", [Kt, Zt] = kt(qt), [eo, Jt] = Kt(qt), to = (e) => {
1983
1974
  const { __scopePopper: t, children: n } = e, [o, i] = j(null);
1984
- return /* @__PURE__ */ _(to, {
1975
+ return /* @__PURE__ */ _(eo, {
1985
1976
  scope: t,
1986
1977
  anchor: o,
1987
1978
  onAnchorChange: i
1988
1979
  }, n);
1989
- }, ro = "PopperAnchor", oo = /* @__PURE__ */ M((e, t) => {
1990
- const { __scopePopper: n, virtualRef: o, ...i } = e, r = Qt(ro, n), s = L(null), a = de(t, s);
1980
+ }, no = "PopperAnchor", ro = /* @__PURE__ */ M((e, t) => {
1981
+ const { __scopePopper: n, virtualRef: o, ...i } = e, r = Jt(no, n), s = L(null), a = de(t, s);
1991
1982
  return R(() => {
1992
1983
  r.onAnchorChange((o == null ? void 0 : o.current) || s.current);
1993
1984
  }), o ? null : /* @__PURE__ */ _(ie.div, S({}, i, {
1994
1985
  ref: a
1995
1986
  }));
1996
- }), Jt = "PopperContent", [io, so] = Kt(Jt), ao = /* @__PURE__ */ M((e, t) => {
1987
+ }), Qt = "PopperContent", [oo, io] = Kt(Qt), so = /* @__PURE__ */ M((e, t) => {
1997
1988
  var n, o, i, r, s, a, c, l;
1998
- const { __scopePopper: u, side: d = "bottom", sideOffset: p = 0, align: f = "center", alignOffset: h = 0, arrowPadding: g = 0, avoidCollisions: m = !0, collisionBoundary: v = [], collisionPadding: y = 0, sticky: x = "partial", hideWhenDetached: $ = !1, updatePositionStrategy: b = "optimized", onPlaced: w, ...A } = e, P = Qt(Jt, u), [T, k] = j(null), E = de(
1989
+ const { __scopePopper: u, side: d = "bottom", sideOffset: p = 0, align: f = "center", alignOffset: h = 0, arrowPadding: g = 0, avoidCollisions: m = !0, collisionBoundary: v = [], collisionPadding: y = 0, sticky: b = "partial", hideWhenDetached: $ = !1, updatePositionStrategy: x = "optimized", onPlaced: w, ...A } = e, P = Jt(Qt, u), [T, I] = j(null), E = de(
1999
1990
  t,
2000
- (ge) => k(ge)
2001
- ), [H, D] = j(null), C = eo(H), W = (n = C == null ? void 0 : C.width) !== null && n !== void 0 ? n : 0, O = (o = C == null ? void 0 : C.height) !== null && o !== void 0 ? o : 0, Z = d + (f !== "center" ? "-" + f : ""), Q = typeof y == "number" ? y : {
1991
+ (ge) => I(ge)
1992
+ ), [H, D] = j(null), C = Qr(H), W = (n = C == null ? void 0 : C.width) !== null && n !== void 0 ? n : 0, O = (o = C == null ? void 0 : C.height) !== null && o !== void 0 ? o : 0, Z = d + (f !== "center" ? "-" + f : ""), J = typeof y == "number" ? y : {
2002
1993
  top: 0,
2003
1994
  right: 0,
2004
1995
  bottom: 0,
@@ -2007,50 +1998,50 @@ const qt = "Popper", [Kt, Zt] = It(qt), [to, Qt] = Kt(qt), no = (e) => {
2007
1998
  }, st = Array.isArray(v) ? v : [
2008
1999
  v
2009
2000
  ], on = st.length > 0, Ae = {
2010
- padding: Q,
2011
- boundary: st.filter(fo),
2001
+ padding: J,
2002
+ boundary: st.filter(uo),
2012
2003
  // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
2013
2004
  altBoundary: on
2014
- }, { refs: sn, floatingStyles: at, placement: an, isPositioned: Ce, middlewareData: se } = Zr({
2005
+ }, { refs: sn, floatingStyles: at, placement: an, isPositioned: Ce, middlewareData: se } = Kr({
2015
2006
  // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
2016
2007
  strategy: "fixed",
2017
2008
  placement: Z,
2018
- whileElementsMounted: (...ge) => Yr(...ge, {
2019
- animationFrame: b === "always"
2009
+ whileElementsMounted: (...ge) => Xr(...ge, {
2010
+ animationFrame: x === "always"
2020
2011
  }),
2021
2012
  elements: {
2022
2013
  reference: P.anchor
2023
2014
  },
2024
2015
  middleware: [
2025
- Cr({
2016
+ Ar({
2026
2017
  mainAxis: p + O,
2027
2018
  alignmentAxis: h
2028
2019
  }),
2029
- m && Er({
2020
+ m && Cr({
2030
2021
  mainAxis: !0,
2031
2022
  crossAxis: !1,
2032
- limiter: x === "partial" ? Tr() : void 0,
2023
+ limiter: b === "partial" ? Er() : void 0,
2033
2024
  ...Ae
2034
2025
  }),
2035
- m && Pr({
2026
+ m && _r({
2036
2027
  ...Ae
2037
2028
  }),
2038
- Rr({
2029
+ Tr({
2039
2030
  ...Ae,
2040
2031
  apply: ({ elements: ge, rects: lt, availableWidth: hn, availableHeight: gn }) => {
2041
2032
  const { width: mn, height: vn } = lt.reference, Te = ge.floating.style;
2042
2033
  Te.setProperty("--radix-popper-available-width", `${hn}px`), Te.setProperty("--radix-popper-available-height", `${gn}px`), Te.setProperty("--radix-popper-anchor-width", `${mn}px`), Te.setProperty("--radix-popper-anchor-height", `${vn}px`);
2043
2034
  }
2044
2035
  }),
2045
- H && Kr({
2036
+ H && qr({
2046
2037
  element: H,
2047
2038
  padding: g
2048
2039
  }),
2049
- po({
2040
+ fo({
2050
2041
  arrowWidth: W,
2051
2042
  arrowHeight: O
2052
2043
  }),
2053
- $ && Or({
2044
+ $ && Pr({
2054
2045
  strategy: "referenceHidden",
2055
2046
  ...Ae
2056
2047
  })
@@ -2082,7 +2073,7 @@ const qt = "Popper", [Kt, Zt] = It(qt), [to, Qt] = Kt(qt), no = (e) => {
2082
2073
  ].join(" ")
2083
2074
  },
2084
2075
  dir: e.dir
2085
- }, /* @__PURE__ */ _(io, {
2076
+ }, /* @__PURE__ */ _(oo, {
2086
2077
  scope: u,
2087
2078
  placedSide: ct,
2088
2079
  onArrowChange: D,
@@ -2103,13 +2094,13 @@ const qt = "Popper", [Kt, Zt] = It(qt), [to, Qt] = Kt(qt), no = (e) => {
2103
2094
  opacity: (l = se.hide) !== null && l !== void 0 && l.referenceHidden ? 0 : void 0
2104
2095
  }
2105
2096
  }))));
2106
- }), co = "PopperArrow", lo = {
2097
+ }), ao = "PopperArrow", co = {
2107
2098
  top: "bottom",
2108
2099
  right: "left",
2109
2100
  bottom: "top",
2110
2101
  left: "right"
2111
- }, uo = /* @__PURE__ */ M(function(t, n) {
2112
- const { __scopePopper: o, ...i } = t, r = so(co, o), s = lo[r.placedSide];
2102
+ }, lo = /* @__PURE__ */ M(function(t, n) {
2103
+ const { __scopePopper: o, ...i } = t, r = io(ao, o), s = co[r.placedSide];
2113
2104
  return (
2114
2105
  // we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
2115
2106
  // doesn't report size as we'd expect on SVG elements.
@@ -2145,10 +2136,10 @@ const qt = "Popper", [Kt, Zt] = It(qt), [to, Qt] = Kt(qt), no = (e) => {
2145
2136
  })))
2146
2137
  );
2147
2138
  });
2148
- function fo(e) {
2139
+ function uo(e) {
2149
2140
  return e !== null;
2150
2141
  }
2151
- const po = (e) => ({
2142
+ const fo = (e) => ({
2152
2143
  name: "transformOrigin",
2153
2144
  options: e,
2154
2145
  fn(t) {
@@ -2158,10 +2149,10 @@ const po = (e) => ({
2158
2149
  center: "50%",
2159
2150
  end: "100%"
2160
2151
  }[g], v = ((o = (i = l.arrow) === null || i === void 0 ? void 0 : i.x) !== null && o !== void 0 ? o : 0) + p / 2, y = ((r = (s = l.arrow) === null || s === void 0 ? void 0 : s.y) !== null && r !== void 0 ? r : 0) + f / 2;
2161
- let x = "", $ = "";
2162
- return h === "bottom" ? (x = d ? m : `${v}px`, $ = `${-f}px`) : h === "top" ? (x = d ? m : `${v}px`, $ = `${c.floating.height + f}px`) : h === "right" ? (x = `${-f}px`, $ = d ? m : `${y}px`) : h === "left" && (x = `${c.floating.width + f}px`, $ = d ? m : `${y}px`), {
2152
+ let b = "", $ = "";
2153
+ return h === "bottom" ? (b = d ? m : `${v}px`, $ = `${-f}px`) : h === "top" ? (b = d ? m : `${v}px`, $ = `${c.floating.height + f}px`) : h === "right" ? (b = `${-f}px`, $ = d ? m : `${y}px`) : h === "left" && (b = `${c.floating.width + f}px`, $ = d ? m : `${y}px`), {
2163
2154
  data: {
2164
- x,
2155
+ x: b,
2165
2156
  y: $
2166
2157
  }
2167
2158
  };
@@ -2174,15 +2165,15 @@ function en(e) {
2174
2165
  n
2175
2166
  ];
2176
2167
  }
2177
- const ho = no, go = oo, mo = ao, vo = uo, yo = /* @__PURE__ */ M((e, t) => {
2168
+ const po = to, ho = ro, go = so, mo = lo, vo = /* @__PURE__ */ M((e, t) => {
2178
2169
  var n;
2179
2170
  const { container: o = globalThis == null || (n = globalThis.document) === null || n === void 0 ? void 0 : n.body, ...i } = e;
2180
2171
  return o ? /* @__PURE__ */ $n.createPortal(/* @__PURE__ */ _(ie.div, S({}, i, {
2181
2172
  ref: t
2182
2173
  })), o) : null;
2183
2174
  });
2184
- function bo(e, t) {
2185
- return bn((n, o) => {
2175
+ function yo(e, t) {
2176
+ return xn((n, o) => {
2186
2177
  const i = t[n][o];
2187
2178
  return i ?? n;
2188
2179
  }, e);
@@ -2197,7 +2188,7 @@ const rt = (e) => {
2197
2188
  };
2198
2189
  rt.displayName = "Presence";
2199
2190
  function xo(e) {
2200
- const [t, n] = j(), o = L({}), i = L(e), r = L("none"), s = e ? "mounted" : "unmounted", [a, c] = bo(s, {
2191
+ const [t, n] = j(), o = L({}), i = L(e), r = L("none"), s = e ? "mounted" : "unmounted", [a, c] = yo(s, {
2201
2192
  mounted: {
2202
2193
  UNMOUNT: "unmounted",
2203
2194
  ANIMATION_OUT: "unmountSuspended"
@@ -2228,7 +2219,7 @@ function xo(e) {
2228
2219
  if (t) {
2229
2220
  const l = (d) => {
2230
2221
  const f = Se(o.current).includes(d.animationName);
2231
- d.target === t && f && Ct(
2222
+ d.target === t && f && At(
2232
2223
  () => c("ANIMATION_END")
2233
2224
  );
2234
2225
  }, u = (d) => {
@@ -2255,17 +2246,16 @@ function xo(e) {
2255
2246
  function Se(e) {
2256
2247
  return (e == null ? void 0 : e.animationName) || "none";
2257
2248
  }
2258
- function $o({ prop: e, defaultProp: t, onChange: n = () => {
2249
+ function bo({ prop: e, defaultProp: t, onChange: n = () => {
2259
2250
  } }) {
2260
- const [o, i] = wo({
2251
+ const [o, i] = $o({
2261
2252
  defaultProp: t,
2262
2253
  onChange: n
2263
2254
  }), r = e !== void 0, s = r ? e : o, a = fe(n), c = F((l) => {
2264
2255
  if (r) {
2265
2256
  const d = typeof l == "function" ? l(e) : l;
2266
2257
  d !== e && a(d);
2267
- } else
2268
- i(l);
2258
+ } else i(l);
2269
2259
  }, [
2270
2260
  r,
2271
2261
  e,
@@ -2277,7 +2267,7 @@ function $o({ prop: e, defaultProp: t, onChange: n = () => {
2277
2267
  c
2278
2268
  ];
2279
2269
  }
2280
- function wo({ defaultProp: e, onChange: t }) {
2270
+ function $o({ defaultProp: e, onChange: t }) {
2281
2271
  const n = j(e), [o] = n, i = L(o), r = fe(t);
2282
2272
  return R(() => {
2283
2273
  i.current !== o && (r(o), i.current = o);
@@ -2287,7 +2277,7 @@ function wo({ defaultProp: e, onChange: t }) {
2287
2277
  r
2288
2278
  ]), n;
2289
2279
  }
2290
- const _o = /* @__PURE__ */ M((e, t) => /* @__PURE__ */ _(ie.span, S({}, e, {
2280
+ const wo = /* @__PURE__ */ M((e, t) => /* @__PURE__ */ _(ie.span, S({}, e, {
2291
2281
  ref: t,
2292
2282
  style: {
2293
2283
  // See: https://github.com/twbs/bootstrap/blob/master/scss/mixins/_screen-reader.scss
@@ -2303,14 +2293,14 @@ const _o = /* @__PURE__ */ M((e, t) => /* @__PURE__ */ _(ie.span, S({}, e, {
2303
2293
  wordWrap: "normal",
2304
2294
  ...e.style
2305
2295
  }
2306
- }))), Po = _o, [Be, pi] = It("Tooltip", [
2296
+ }))), _o = wo, [Be, fi] = kt("Tooltip", [
2307
2297
  Zt
2308
- ]), je = Zt(), Oo = "TooltipProvider", Ao = 700, qe = "tooltip.open", [Co, ot] = Be(Oo), Eo = (e) => {
2309
- const { __scopeTooltip: t, delayDuration: n = Ao, skipDelayDuration: o = 300, disableHoverableContent: i = !1, children: r } = e, [s, a] = j(!0), c = L(!1), l = L(0);
2298
+ ]), je = Zt(), Po = "TooltipProvider", Oo = 700, qe = "tooltip.open", [Ao, ot] = Be(Po), Co = (e) => {
2299
+ const { __scopeTooltip: t, delayDuration: n = Oo, skipDelayDuration: o = 300, disableHoverableContent: i = !1, children: r } = e, [s, a] = j(!0), c = L(!1), l = L(0);
2310
2300
  return R(() => {
2311
2301
  const u = l.current;
2312
2302
  return () => window.clearTimeout(u);
2313
- }, []), /* @__PURE__ */ _(Co, {
2303
+ }, []), /* @__PURE__ */ _(Ao, {
2314
2304
  scope: t,
2315
2305
  isOpenDelayed: s,
2316
2306
  delayDuration: n,
@@ -2331,20 +2321,20 @@ const _o = /* @__PURE__ */ M((e, t) => /* @__PURE__ */ _(ie.span, S({}, e, {
2331
2321
  }, []),
2332
2322
  disableHoverableContent: i
2333
2323
  }, r);
2334
- }, it = "Tooltip", [To, Oe] = Be(it), Ro = (e) => {
2335
- const { __scopeTooltip: t, children: n, open: o, defaultOpen: i = !1, onOpenChange: r, disableHoverableContent: s, delayDuration: a } = e, c = ot(it, e.__scopeTooltip), l = je(t), [u, d] = j(null), p = hr(), f = L(0), h = s ?? c.disableHoverableContent, g = a ?? c.delayDuration, m = L(!1), [v = !1, y] = $o({
2324
+ }, it = "Tooltip", [Eo, Oe] = Be(it), To = (e) => {
2325
+ const { __scopeTooltip: t, children: n, open: o, defaultOpen: i = !1, onOpenChange: r, disableHoverableContent: s, delayDuration: a } = e, c = ot(it, e.__scopeTooltip), l = je(t), [u, d] = j(null), p = pr(), f = L(0), h = s ?? c.disableHoverableContent, g = a ?? c.delayDuration, m = L(!1), [v = !1, y] = bo({
2336
2326
  prop: o,
2337
2327
  defaultProp: i,
2338
2328
  onChange: (A) => {
2339
2329
  A ? (c.onOpen(), document.dispatchEvent(new CustomEvent(qe))) : c.onClose(), r == null || r(A);
2340
2330
  }
2341
- }), x = xe(() => v ? m.current ? "delayed-open" : "instant-open" : "closed", [
2331
+ }), b = be(() => v ? m.current ? "delayed-open" : "instant-open" : "closed", [
2342
2332
  v
2343
2333
  ]), $ = F(() => {
2344
2334
  window.clearTimeout(f.current), m.current = !1, y(!0);
2345
2335
  }, [
2346
2336
  y
2347
- ]), b = F(() => {
2337
+ ]), x = F(() => {
2348
2338
  window.clearTimeout(f.current), y(!1);
2349
2339
  }, [
2350
2340
  y
@@ -2356,11 +2346,11 @@ const _o = /* @__PURE__ */ M((e, t) => /* @__PURE__ */ _(ie.span, S({}, e, {
2356
2346
  g,
2357
2347
  y
2358
2348
  ]);
2359
- return R(() => () => window.clearTimeout(f.current), []), /* @__PURE__ */ _(ho, l, /* @__PURE__ */ _(To, {
2349
+ return R(() => () => window.clearTimeout(f.current), []), /* @__PURE__ */ _(po, l, /* @__PURE__ */ _(Eo, {
2360
2350
  scope: t,
2361
2351
  contentId: p,
2362
2352
  open: v,
2363
- stateAttribute: x,
2353
+ stateAttribute: b,
2364
2354
  trigger: u,
2365
2355
  onTriggerChange: d,
2366
2356
  onTriggerEnter: F(() => {
@@ -2371,23 +2361,23 @@ const _o = /* @__PURE__ */ M((e, t) => /* @__PURE__ */ _(ie.span, S({}, e, {
2371
2361
  $
2372
2362
  ]),
2373
2363
  onTriggerLeave: F(() => {
2374
- h ? b() : window.clearTimeout(f.current);
2364
+ h ? x() : window.clearTimeout(f.current);
2375
2365
  }, [
2376
- b,
2366
+ x,
2377
2367
  h
2378
2368
  ]),
2379
2369
  onOpen: $,
2380
- onClose: b,
2370
+ onClose: x,
2381
2371
  disableHoverableContent: h
2382
2372
  }, n));
2383
- }, Pt = "TooltipTrigger", So = /* @__PURE__ */ M((e, t) => {
2384
- const { __scopeTooltip: n, ...o } = e, i = Oe(Pt, n), r = ot(Pt, n), s = je(n), a = L(null), c = de(t, a, i.onTriggerChange), l = L(!1), u = L(!1), d = F(
2373
+ }, _t = "TooltipTrigger", Ro = /* @__PURE__ */ M((e, t) => {
2374
+ const { __scopeTooltip: n, ...o } = e, i = Oe(_t, n), r = ot(_t, n), s = je(n), a = L(null), c = de(t, a, i.onTriggerChange), l = L(!1), u = L(!1), d = F(
2385
2375
  () => l.current = !1,
2386
2376
  []
2387
2377
  );
2388
2378
  return R(() => () => document.removeEventListener("pointerup", d), [
2389
2379
  d
2390
- ]), /* @__PURE__ */ _(go, S({
2380
+ ]), /* @__PURE__ */ _(ho, S({
2391
2381
  asChild: !0
2392
2382
  }, s), /* @__PURE__ */ _(ie.button, S({
2393
2383
  // We purposefully avoid adding `type=button` here because tooltip triggers are also
@@ -2413,33 +2403,33 @@ const _o = /* @__PURE__ */ M((e, t) => /* @__PURE__ */ _(ie.span, S({}, e, {
2413
2403
  onBlur: G(e.onBlur, i.onClose),
2414
2404
  onClick: G(e.onClick, i.onClose)
2415
2405
  })));
2416
- }), tn = "TooltipPortal", [Do, No] = Be(tn, {
2406
+ }), tn = "TooltipPortal", [So, Do] = Be(tn, {
2417
2407
  forceMount: void 0
2418
- }), Lo = (e) => {
2408
+ }), No = (e) => {
2419
2409
  const { __scopeTooltip: t, forceMount: n, children: o, container: i } = e, r = Oe(tn, t);
2420
- return /* @__PURE__ */ _(Do, {
2410
+ return /* @__PURE__ */ _(So, {
2421
2411
  scope: t,
2422
2412
  forceMount: n
2423
2413
  }, /* @__PURE__ */ _(rt, {
2424
2414
  present: n || r.open
2425
- }, /* @__PURE__ */ _(yo, {
2415
+ }, /* @__PURE__ */ _(vo, {
2426
2416
  asChild: !0,
2427
2417
  container: i
2428
2418
  }, o)));
2429
- }, _e = "TooltipContent", Mo = /* @__PURE__ */ M((e, t) => {
2430
- const n = No(_e, e.__scopeTooltip), { forceMount: o = n.forceMount, side: i = "top", ...r } = e, s = Oe(_e, e.__scopeTooltip);
2419
+ }, _e = "TooltipContent", Lo = /* @__PURE__ */ M((e, t) => {
2420
+ const n = Do(_e, e.__scopeTooltip), { forceMount: o = n.forceMount, side: i = "top", ...r } = e, s = Oe(_e, e.__scopeTooltip);
2431
2421
  return /* @__PURE__ */ _(rt, {
2432
2422
  present: o || s.open
2433
2423
  }, s.disableHoverableContent ? /* @__PURE__ */ _(nn, S({
2434
2424
  side: i
2435
2425
  }, r, {
2436
2426
  ref: t
2437
- })) : /* @__PURE__ */ _(Io, S({
2427
+ })) : /* @__PURE__ */ _(Mo, S({
2438
2428
  side: i
2439
2429
  }, r, {
2440
2430
  ref: t
2441
2431
  })));
2442
- }), Io = /* @__PURE__ */ M((e, t) => {
2432
+ }), Mo = /* @__PURE__ */ M((e, t) => {
2443
2433
  const n = Oe(_e, e.__scopeTooltip), o = ot(_e, e.__scopeTooltip), i = L(null), r = de(t, i), [s, a] = j(null), { trigger: c, onClose: l } = n, u = i.current, { onPointerInTransitChange: d } = o, p = F(() => {
2444
2434
  a(null), d(!1);
2445
2435
  }, [
@@ -2448,11 +2438,11 @@ const _o = /* @__PURE__ */ M((e, t) => /* @__PURE__ */ _(ie.span, S({}, e, {
2448
2438
  const m = h.currentTarget, v = {
2449
2439
  x: h.clientX,
2450
2440
  y: h.clientY
2451
- }, y = jo(v, m.getBoundingClientRect()), x = zo(v, y), $ = Wo(g.getBoundingClientRect()), b = Vo([
2452
- ...x,
2441
+ }, y = Bo(v, m.getBoundingClientRect()), b = jo(v, y), $ = zo(g.getBoundingClientRect()), x = Uo([
2442
+ ...b,
2453
2443
  ...$
2454
2444
  ]);
2455
- a(b), d(!0);
2445
+ a(x), d(!0);
2456
2446
  }, [
2457
2447
  d
2458
2448
  ]);
@@ -2476,8 +2466,8 @@ const _o = /* @__PURE__ */ M((e, t) => /* @__PURE__ */ _(ie.span, S({}, e, {
2476
2466
  const m = g.target, v = {
2477
2467
  x: g.clientX,
2478
2468
  y: g.clientY
2479
- }, y = (c == null ? void 0 : c.contains(m)) || (u == null ? void 0 : u.contains(m)), x = !Uo(v, s);
2480
- y ? p() : x && (p(), l());
2469
+ }, y = (c == null ? void 0 : c.contains(m)) || (u == null ? void 0 : u.contains(m)), b = !Wo(v, s);
2470
+ y ? p() : b && (p(), l());
2481
2471
  };
2482
2472
  return document.addEventListener("pointermove", h), () => document.removeEventListener("pointermove", h);
2483
2473
  }
@@ -2490,7 +2480,7 @@ const _o = /* @__PURE__ */ M((e, t) => /* @__PURE__ */ _(ie.span, S({}, e, {
2490
2480
  ]), /* @__PURE__ */ _(nn, S({}, e, {
2491
2481
  ref: r
2492
2482
  }));
2493
- }), [ko, Fo] = Be(it, {
2483
+ }), [ko, Io] = Be(it, {
2494
2484
  isInside: !1
2495
2485
  }), nn = /* @__PURE__ */ M((e, t) => {
2496
2486
  const { __scopeTooltip: n, children: o, "aria-label": i, onEscapeKeyDown: r, onPointerDownOutside: s, ...a } = e, c = Oe(_e, n), l = je(n), { onClose: u } = c;
@@ -2511,14 +2501,14 @@ const _o = /* @__PURE__ */ M((e, t) => /* @__PURE__ */ _(ie.span, S({}, e, {
2511
2501
  }, [
2512
2502
  c.trigger,
2513
2503
  u
2514
- ]), /* @__PURE__ */ _(lr, {
2504
+ ]), /* @__PURE__ */ _(cr, {
2515
2505
  asChild: !0,
2516
2506
  disableOutsidePointerEvents: !1,
2517
2507
  onEscapeKeyDown: r,
2518
2508
  onPointerDownOutside: s,
2519
2509
  onFocusOutside: (d) => d.preventDefault(),
2520
2510
  onDismiss: u
2521
- }, /* @__PURE__ */ _(mo, S({
2511
+ }, /* @__PURE__ */ _(go, S({
2522
2512
  "data-state": c.stateAttribute
2523
2513
  }, l, a, {
2524
2514
  ref: t,
@@ -2533,17 +2523,17 @@ const _o = /* @__PURE__ */ M((e, t) => /* @__PURE__ */ _(ie.span, S({}, e, {
2533
2523
  }), /* @__PURE__ */ _(Ft, null, o), /* @__PURE__ */ _(ko, {
2534
2524
  scope: n,
2535
2525
  isInside: !0
2536
- }, /* @__PURE__ */ _(Po, {
2526
+ }, /* @__PURE__ */ _(_o, {
2537
2527
  id: c.contentId,
2538
2528
  role: "tooltip"
2539
2529
  }, i || o))));
2540
- }), Ho = "TooltipArrow", Bo = /* @__PURE__ */ M((e, t) => {
2530
+ }), Fo = "TooltipArrow", Ho = /* @__PURE__ */ M((e, t) => {
2541
2531
  const { __scopeTooltip: n, ...o } = e, i = je(n);
2542
- return Fo(Ho, n).isInside ? null : /* @__PURE__ */ _(vo, S({}, i, o, {
2532
+ return Io(Fo, n).isInside ? null : /* @__PURE__ */ _(mo, S({}, i, o, {
2543
2533
  ref: t
2544
2534
  }));
2545
2535
  });
2546
- function jo(e, t) {
2536
+ function Bo(e, t) {
2547
2537
  const n = Math.abs(t.top - e.y), o = Math.abs(t.bottom - e.y), i = Math.abs(t.right - e.x), r = Math.abs(t.left - e.x);
2548
2538
  switch (Math.min(n, o, i, r)) {
2549
2539
  case r:
@@ -2558,7 +2548,7 @@ function jo(e, t) {
2558
2548
  throw new Error("unreachable");
2559
2549
  }
2560
2550
  }
2561
- function zo(e, t, n = 5) {
2551
+ function jo(e, t, n = 5) {
2562
2552
  const o = [];
2563
2553
  switch (t) {
2564
2554
  case "top":
@@ -2600,7 +2590,7 @@ function zo(e, t, n = 5) {
2600
2590
  }
2601
2591
  return o;
2602
2592
  }
2603
- function Wo(e) {
2593
+ function zo(e) {
2604
2594
  const { top: t, right: n, bottom: o, left: i } = e;
2605
2595
  return [
2606
2596
  {
@@ -2621,7 +2611,7 @@ function Wo(e) {
2621
2611
  }
2622
2612
  ];
2623
2613
  }
2624
- function Uo(e, t) {
2614
+ function Wo(e, t) {
2625
2615
  const { x: n, y: o } = e;
2626
2616
  let i = !1;
2627
2617
  for (let r = 0, s = t.length - 1; r < t.length; s = r++) {
@@ -2630,22 +2620,19 @@ function Uo(e, t) {
2630
2620
  }
2631
2621
  return i;
2632
2622
  }
2633
- function Vo(e) {
2623
+ function Uo(e) {
2634
2624
  const t = e.slice();
2635
- return t.sort((n, o) => n.x < o.x ? -1 : n.x > o.x ? 1 : n.y < o.y ? -1 : n.y > o.y ? 1 : 0), Go(t);
2625
+ return t.sort((n, o) => n.x < o.x ? -1 : n.x > o.x ? 1 : n.y < o.y ? -1 : n.y > o.y ? 1 : 0), Vo(t);
2636
2626
  }
2637
- function Go(e) {
2638
- if (e.length <= 1)
2639
- return e.slice();
2627
+ function Vo(e) {
2628
+ if (e.length <= 1) return e.slice();
2640
2629
  const t = [];
2641
2630
  for (let o = 0; o < e.length; o++) {
2642
2631
  const i = e[o];
2643
2632
  for (; t.length >= 2; ) {
2644
2633
  const r = t[t.length - 1], s = t[t.length - 2];
2645
- if ((r.x - s.x) * (i.y - s.y) >= (r.y - s.y) * (i.x - s.x))
2646
- t.pop();
2647
- else
2648
- break;
2634
+ if ((r.x - s.x) * (i.y - s.y) >= (r.y - s.y) * (i.x - s.x)) t.pop();
2635
+ else break;
2649
2636
  }
2650
2637
  t.push(i);
2651
2638
  }
@@ -2655,16 +2642,14 @@ function Go(e) {
2655
2642
  const i = e[o];
2656
2643
  for (; n.length >= 2; ) {
2657
2644
  const r = n[n.length - 1], s = n[n.length - 2];
2658
- if ((r.x - s.x) * (i.y - s.y) >= (r.y - s.y) * (i.x - s.x))
2659
- n.pop();
2660
- else
2661
- break;
2645
+ if ((r.x - s.x) * (i.y - s.y) >= (r.y - s.y) * (i.x - s.x)) n.pop();
2646
+ else break;
2662
2647
  }
2663
2648
  n.push(i);
2664
2649
  }
2665
2650
  return n.pop(), t.length === 1 && n.length === 1 && t[0].x === n[0].x && t[0].y === n[0].y ? t : t.concat(n);
2666
2651
  }
2667
- const Xo = Eo, Yo = Ro, qo = So, Ko = Lo, Zo = Mo, Qo = Bo;
2652
+ const Go = Co, Xo = To, Yo = Ro, qo = No, Ko = Lo, Zo = Ho;
2668
2653
  function Jo(e) {
2669
2654
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
2670
2655
  }
@@ -2704,37 +2689,37 @@ var rn = { exports: {} };
2704
2689
  e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
2705
2690
  })();
2706
2691
  })(rn);
2707
- var ei = rn.exports;
2708
- const ti = /* @__PURE__ */ Jo(ei), ni = "_slideDownAndFade_fkagk_1", ri = "_slideLeftAndFade_fkagk_1", oi = "_slideUpAndFade_fkagk_1", ii = "_slideRightAndFade_fkagk_1", si = {
2692
+ var Qo = rn.exports;
2693
+ const ei = /* @__PURE__ */ Jo(Qo), ti = "_slideDownAndFade_fkagk_1", ni = "_slideLeftAndFade_fkagk_1", ri = "_slideUpAndFade_fkagk_1", oi = "_slideRightAndFade_fkagk_1", ii = {
2709
2694
  "purpur-tooltip": "_purpur-tooltip_fkagk_1",
2710
2695
  "purpur-tooltip__content": "_purpur-tooltip__content_fkagk_4",
2711
2696
  "purpur-tooltip__content--primary": "_purpur-tooltip__content--primary_fkagk_14",
2712
2697
  "purpur-tooltip__content--primary-negative": "_purpur-tooltip__content--primary-negative_fkagk_17",
2713
- slideDownAndFade: ni,
2714
- slideLeftAndFade: ri,
2715
- slideUpAndFade: oi,
2716
- slideRightAndFade: ii,
2698
+ slideDownAndFade: ti,
2699
+ slideLeftAndFade: ni,
2700
+ slideUpAndFade: ri,
2701
+ slideRightAndFade: oi,
2717
2702
  "purpur-tooltip__arrow--primary": "_purpur-tooltip__arrow--primary_fkagk_32",
2718
2703
  "purpur-tooltip__arrow--primary-negative": "_purpur-tooltip__arrow--primary-negative_fkagk_35"
2719
- }, ze = ti.bind(si), ai = {
2704
+ }, ze = ei.bind(ii), si = {
2720
2705
  TOP: "top",
2721
2706
  BOTTOM: "bottom",
2722
2707
  LEFT: "left",
2723
2708
  RIGHT: "right"
2724
- }, ci = {
2709
+ }, ai = {
2725
2710
  START: "start",
2726
2711
  CENTER: "center",
2727
2712
  END: "end"
2728
- }, ae = "purpur-tooltip", li = M(
2713
+ }, ae = "purpur-tooltip", ci = M(
2729
2714
  ({
2730
2715
  ["data-testid"]: e,
2731
- buttonSize: t = wn.MD,
2716
+ buttonSize: t = "md",
2732
2717
  children: n,
2733
2718
  className: o,
2734
2719
  contentClassName: i,
2735
2720
  negative: r = !1,
2736
- position: s = ai.TOP,
2737
- align: a = ci.CENTER,
2721
+ position: s = si.TOP,
2722
+ align: a = ai.CENTER,
2738
2723
  triggerAriaLabel: c = "",
2739
2724
  triggerElement: l,
2740
2725
  ...u
@@ -2743,8 +2728,8 @@ const ti = /* @__PURE__ */ Jo(ei), ni = "_slideDownAndFade_fkagk_1", ri = "_slid
2743
2728
  o,
2744
2729
  ae,
2745
2730
  `${ae}--primary${r ? "-negative" : ""}`
2746
- ]), g = /* @__PURE__ */ I(
2747
- Rt,
2731
+ ]), g = /* @__PURE__ */ k(
2732
+ Tt,
2748
2733
  {
2749
2734
  ref: d,
2750
2735
  "aria-label": c,
@@ -2753,12 +2738,12 @@ const ti = /* @__PURE__ */ Jo(ei), ni = "_slideDownAndFade_fkagk_1", ri = "_slid
2753
2738
  iconOnly: !0,
2754
2739
  "data-testid": `${e}-trigger-button`,
2755
2740
  size: t,
2756
- children: /* @__PURE__ */ I(Dt, { size: "md" })
2741
+ children: /* @__PURE__ */ k(St, { size: "md" })
2757
2742
  }
2758
2743
  );
2759
- return /* @__PURE__ */ I("div", { "data-testid": e, className: h, children: /* @__PURE__ */ I(Xo, { delayDuration: parseInt(Qn), children: /* @__PURE__ */ We(Yo, { open: p, onOpenChange: f, ...u, children: [
2760
- /* @__PURE__ */ I(
2761
- qo,
2744
+ return /* @__PURE__ */ k("div", { "data-testid": e, className: h, children: /* @__PURE__ */ k(Go, { delayDuration: parseInt(Zn), children: /* @__PURE__ */ We(Xo, { open: p, onOpenChange: f, ...u, children: [
2745
+ /* @__PURE__ */ k(
2746
+ Yo,
2762
2747
  {
2763
2748
  asChild: !0,
2764
2749
  onClick: (m) => {
@@ -2767,8 +2752,8 @@ const ti = /* @__PURE__ */ Jo(ei), ni = "_slideDownAndFade_fkagk_1", ri = "_slid
2767
2752
  children: re.count(l) === 0 ? g : l
2768
2753
  }
2769
2754
  ),
2770
- /* @__PURE__ */ I(Ko, { children: /* @__PURE__ */ We(
2771
- Zo,
2755
+ /* @__PURE__ */ k(qo, { children: /* @__PURE__ */ We(
2756
+ Ko,
2772
2757
  {
2773
2758
  side: s,
2774
2759
  align: a,
@@ -2780,17 +2765,17 @@ const ti = /* @__PURE__ */ Jo(ei), ni = "_slideDownAndFade_fkagk_1", ri = "_slid
2780
2765
  sideOffset: -5,
2781
2766
  "data-testid": `${e}-content`,
2782
2767
  children: [
2783
- typeof n == "string" ? /* @__PURE__ */ I(
2784
- Zn,
2768
+ typeof n == "string" ? /* @__PURE__ */ k(
2769
+ Lt,
2785
2770
  {
2786
- variant: Lt.PARAGRAPH100,
2771
+ variant: Nt.PARAGRAPH100,
2787
2772
  negative: !r,
2788
2773
  "data-testid": `${e}-paragraph`,
2789
2774
  children: n
2790
2775
  }
2791
2776
  ) : n,
2792
- /* @__PURE__ */ I(
2793
- Qo,
2777
+ /* @__PURE__ */ k(
2778
+ Zo,
2794
2779
  {
2795
2780
  className: ze([
2796
2781
  `${ae}__arrow`,
@@ -2804,10 +2789,10 @@ const ti = /* @__PURE__ */ Jo(ei), ni = "_slideDownAndFade_fkagk_1", ri = "_slid
2804
2789
  ] }) }) });
2805
2790
  }
2806
2791
  );
2807
- li.displayName = "Tooltip";
2792
+ ci.displayName = "Tooltip";
2808
2793
  export {
2809
- ci as TOOLTIP_ALIGN,
2810
- ai as TOOLTIP_POSITION,
2811
- li as Tooltip
2794
+ ai as TOOLTIP_ALIGN,
2795
+ si as TOOLTIP_POSITION,
2796
+ ci as Tooltip
2812
2797
  };
2813
2798
  //# sourceMappingURL=tooltip.es.js.map