mimir-ui-kit 1.34.5 → 1.34.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. package/dist/{ProgressBar-C0dC7o7N.js → ProgressBar-DEFs1tWq.js} +3 -3
  2. package/dist/components/DatePicker/DatePicker.js +49 -49
  3. package/dist/components/DatePicker/DatePickerModal.js +44 -44
  4. package/dist/components/DatePicker/MonthPickerModal.js +29 -29
  5. package/dist/components/DatePicker/YearPickerModal.js +33 -33
  6. package/dist/components/DatePicker/constants.d.ts +1 -1
  7. package/dist/components/DatePicker/constants.js +1 -1
  8. package/dist/components/Drawer/Drawer.js +15 -15
  9. package/dist/components/InputPassword/InputPassword.js +28 -26
  10. package/dist/components/OtpInput/OtpInput.js +21 -15
  11. package/dist/components/SelectSearch/SelectSearch.d.ts +1 -0
  12. package/dist/components/SelectSearch/SelectSearch.js +531 -503
  13. package/dist/components/SelectSearch/types.d.ts +2 -0
  14. package/dist/components/Skeleton/SkeletonBrick/SkeletonBrick.js +14 -13
  15. package/dist/components/Skeleton/SkeletonCircle/SkeletonCircle.js +2 -1
  16. package/dist/components/Skeleton/SkeletonText/SkeletonText.js +26 -17
  17. package/dist/components/Slider/Slider.js +8 -1
  18. package/dist/components/Steps/Steps.js +10 -9
  19. package/dist/components/TextArea/TextArea.js +23 -23
  20. package/dist/components/Toasts/ProgressBar.js +1 -1
  21. package/dist/components/Toasts/Toast.js +1 -1
  22. package/dist/components/Toasts/ToastList.js +20 -19
  23. package/dist/components/Toasts/ToastsProvider.js +1 -1
  24. package/dist/components/UniversalUploader/UniversalUploader.d.ts +7 -2
  25. package/dist/components/UniversalUploader/UniversalUploader.js +65 -43
  26. package/dist/components/UniversalUploader/types.d.ts +2 -9
  27. package/dist/components/Uploader/Uploader.d.ts +13 -0
  28. package/dist/components/Uploader/Uploader.js +45 -39
  29. package/package.json +1 -1
@@ -1,17 +1,17 @@
1
- import { jsx as ie, jsxs as Xe, Fragment as ut } from "react/jsx-runtime";
1
+ import { jsx as Q, jsxs as Xe, Fragment as ut } from "react/jsx-runtime";
2
2
  import { c as de } from "../../index-DIxK0V-G.js";
3
- import * as y from "react";
4
- import j, { useReducer as on, useMemo as q, useSyncExternalStore as Vn, useId as Ue, useEffect as ne, useCallback as He, useRef as Y, useLayoutEffect as rn, createContext as ve, useContext as ae, useState as ue, Fragment as rt, createRef as Wn, forwardRef as Bn } from "react";
3
+ import * as E from "react";
4
+ import j, { useReducer as ln, useMemo as q, useSyncExternalStore as Wn, useId as Ue, useEffect as oe, useCallback as He, useRef as Y, useLayoutEffect as an, createContext as ve, useContext as ae, useState as ue, Fragment as rt, createRef as Bn, forwardRef as jn } from "react";
5
5
  import { ESelectSearchSize as Le } from "./constants.js";
6
- import { Icon as Dt } from "../../icons/Icon.js";
7
- import { I as jn } from "../../Input-DGr0q5AJ.js";
6
+ import { Icon as Lt } from "../../icons/Icon.js";
7
+ import { I as Ft } from "../../Input-DGr0q5AJ.js";
8
8
  import { EInputVariant as Un, EInputSize as ft } from "../Input/constants.js";
9
- import { n as U, u as Et, d as Me, s as Ae, o as A, p as sn, t as Yn, e as ke, W as be, y as Oe, T as Kn, H as xe, M as $t, a as Te, $ as ln, b as an, D as Rt, c as X } from "../../keyboard-B0lm_zyn.js";
9
+ import { n as U, u as St, d as Me, s as Ae, o as A, p as cn, t as Yn, e as ze, W as be, y as Oe, T as Kn, H as xe, M as Nt, a as Te, $ as un, b as fn, D as Ot, c as X } from "../../keyboard-B0lm_zyn.js";
10
10
  import * as Ve from "react-dom";
11
11
  import { flushSync as ye, createPortal as qn } from "react-dom";
12
12
  import { w as Gn } from "../../use-active-press-86hajhdd.js";
13
13
  import { u as Jn } from "../../use-by-comparator-CVuf9KBq.js";
14
- import { K as Xn, a as Qn, b as Zn, T as eo, z as to, j as no, u as oo, I as St, G as io } from "../../label-y3ANLTNC.js";
14
+ import { K as Xn, a as Qn, b as Zn, T as eo, z as to, j as no, u as oo, I as Ct, G as io } from "../../label-y3ANLTNC.js";
15
15
  import { A as ro, h as so, f as lo, _ as ao } from "../../focus-management-XwV-9qkO.js";
16
16
  import { T as co } from "../../use-resolve-button-type-BAxjHhds.js";
17
17
  import { c as uo, i as et, u as fo, V as po, A as mo } from "../../open-closed-Cy6VDfYc.js";
@@ -28,10 +28,10 @@ import '../../assets/SelectSearch.css';function Fe(e, n, t) {
28
28
  o = u;
29
29
  let g;
30
30
  if (t.key && ((l = t.debug) != null && l.call(t)) && (g = Date.now()), i = n(...u), t.key && ((s = t.debug) != null && s.call(t))) {
31
- const c = Math.round((Date.now() - f) * 100) / 100, m = Math.round((Date.now() - g) * 100) / 100, p = m / 16, h = (b, w) => {
32
- for (b = String(b); b.length < w; )
33
- b = " " + b;
34
- return b;
31
+ const c = Math.round((Date.now() - f) * 100) / 100, m = Math.round((Date.now() - g) * 100) / 100, p = m / 16, h = (v, w) => {
32
+ for (v = String(v); v.length < w; )
33
+ v = " " + v;
34
+ return v;
35
35
  };
36
36
  console.info(
37
37
  `%c⏱ ${h(m, 5)} /${h(c, 5)} ms`,
@@ -91,7 +91,7 @@ const go = (e, n) => Math.abs(e - n) < 1, vo = (e, n, t) => {
91
91
  return r.observe(t, { box: "border-box" }), () => {
92
92
  r.unobserve(t);
93
93
  };
94
- }, Lt = {
94
+ }, zt = {
95
95
  passive: !0
96
96
  }, yo = typeof window > "u" ? !0 : "onscrollend" in window, Eo = (e, n) => {
97
97
  const t = e.scrollElement;
@@ -111,7 +111,7 @@ const go = (e, n) => Math.abs(e - n) < 1, vo = (e, n, t) => {
111
111
  ), l = (f) => () => {
112
112
  i = t[e.options.horizontal ? "scrollLeft" : "scrollTop"], r(), n(i, f);
113
113
  }, s = l(!0), a = l(!1);
114
- return a(), t.addEventListener("scroll", s, Lt), t.addEventListener("scrollend", a, Lt), () => {
114
+ return a(), t.addEventListener("scroll", s, zt), t.addEventListener("scrollend", a, zt), () => {
115
115
  t.removeEventListener("scroll", s), t.removeEventListener("scrollend", a);
116
116
  };
117
117
  }, Ro = (e, n, t) => {
@@ -266,24 +266,24 @@ class Oo {
266
266
  for (let d = f; d < t; d++) {
267
267
  let g = (a = this.measurementsCache[d]) == null ? void 0 : a.measureElement;
268
268
  g || (g = (x) => {
269
- const E = r(d), S = this.elementsCache.get(E);
269
+ const y = r(d), S = this.elementsCache.get(y);
270
270
  if (!x) {
271
- S && (this.observer.unobserve(S), this.elementsCache.delete(E));
271
+ S && (this.observer.unobserve(S), this.elementsCache.delete(y));
272
272
  return;
273
273
  }
274
- S !== x && (S && this.observer.unobserve(S), this.observer.observe(x), this.elementsCache.set(E, x)), x.isConnected && this.resizeItem(
274
+ S !== x && (S && this.observer.unobserve(S), this.observer.observe(x), this.elementsCache.set(y, x)), x.isConnected && this.resizeItem(
275
275
  d,
276
276
  this.options.measureElement(x, void 0, this)
277
277
  );
278
278
  });
279
- const c = r(d), m = this.options.lanes === 1 ? u[d - 1] : this.getFurthestMeasurement(u, d), p = m ? m.end + this.options.gap : o + i, h = s.get(c), b = typeof h == "number" ? h : this.options.estimateSize(d), w = p + b, v = m ? m.lane : d % this.options.lanes;
279
+ const c = r(d), m = this.options.lanes === 1 ? u[d - 1] : this.getFurthestMeasurement(u, d), p = m ? m.end + this.options.gap : o + i, h = s.get(c), v = typeof h == "number" ? h : this.options.estimateSize(d), w = p + v, b = m ? m.lane : d % this.options.lanes;
280
280
  u[d] = {
281
281
  index: d,
282
282
  start: p,
283
- size: b,
283
+ size: v,
284
284
  end: w,
285
285
  key: c,
286
- lane: v,
286
+ lane: b,
287
287
  measureElement: g
288
288
  };
289
289
  }
@@ -365,7 +365,7 @@ class Oo {
365
365
  const o = this.getMeasurements();
366
366
  if (o.length !== 0)
367
367
  return dt(
368
- o[cn(
368
+ o[dn(
369
369
  0,
370
370
  o.length - 1,
371
371
  (i) => dt(o[i]).start,
@@ -444,7 +444,7 @@ class Oo {
444
444
  }, this.setOptions(n);
445
445
  }
446
446
  }
447
- const cn = (e, n, t, o) => {
447
+ const dn = (e, n, t, o) => {
448
448
  for (; e <= n; ) {
449
449
  const i = (e + n) / 2 | 0, r = t(i);
450
450
  if (r < o)
@@ -461,24 +461,24 @@ function Co({
461
461
  outerSize: n,
462
462
  scrollOffset: t
463
463
  }) {
464
- const o = e.length - 1, r = cn(0, o, (s) => e[s].start, t);
464
+ const o = e.length - 1, r = dn(0, o, (s) => e[s].start, t);
465
465
  let l = r;
466
466
  for (; l < o && e[l].end < t + n; )
467
467
  l++;
468
468
  return { startIndex: r, endIndex: l };
469
469
  }
470
- const To = typeof document < "u" ? y.useLayoutEffect : y.useEffect;
470
+ const To = typeof document < "u" ? E.useLayoutEffect : E.useEffect;
471
471
  function Io(e) {
472
- const n = y.useReducer(() => ({}), {})[1], t = {
472
+ const n = E.useReducer(() => ({}), {})[1], t = {
473
473
  ...e,
474
474
  onChange: (i, r) => {
475
475
  var l;
476
476
  r ? ye(n) : n(), (l = e.onChange) == null || l.call(e, i, r);
477
477
  }
478
- }, [o] = y.useState(
478
+ }, [o] = E.useState(
479
479
  () => new Oo(t)
480
480
  );
481
- return o.setOptions(t), y.useEffect(() => o._didMount(), []), To(() => o._willUpdate()), o;
481
+ return o.setOptions(t), E.useEffect(() => o._didMount(), []), To(() => o._willUpdate()), o;
482
482
  }
483
483
  function Mo(e) {
484
484
  return Io({
@@ -493,8 +493,8 @@ function Po(e) {
493
493
  let { width: n, height: t } = e.getBoundingClientRect();
494
494
  return { width: n, height: t };
495
495
  }
496
- function Ft(e, n = !1) {
497
- let t = e === null ? null : "current" in e ? e.current : e, [o, i] = on(() => ({}), {}), r = q(() => Po(t), [t, o]);
496
+ function kt(e, n = !1) {
497
+ let t = e === null ? null : "current" in e ? e.current : e, [o, i] = ln(() => ({}), {}), r = q(() => Po(t), [t, o]);
498
498
  return U(() => {
499
499
  if (!t) return;
500
500
  let l = new ResizeObserver(i);
@@ -512,7 +512,7 @@ let Ao = class extends Map {
512
512
  return t === void 0 && (t = this.factory(n), this.set(n, t)), t;
513
513
  }
514
514
  };
515
- function un(e, n) {
515
+ function pn(e, n) {
516
516
  let t = e(), o = /* @__PURE__ */ new Set();
517
517
  return { getSnapshot() {
518
518
  return t;
@@ -523,10 +523,10 @@ function un(e, n) {
523
523
  l && (t = l, o.forEach((s) => s()));
524
524
  } };
525
525
  }
526
- function fn(e) {
527
- return Vn(e.subscribe, e.getSnapshot, e.getSnapshot);
526
+ function mn(e) {
527
+ return Wn(e.subscribe, e.getSnapshot, e.getSnapshot);
528
528
  }
529
- let _o = new Ao(() => un(() => [], { ADD(e) {
529
+ let _o = new Ao(() => pn(() => [], { ADD(e) {
530
530
  return this.includes(e) ? this : [...this, e];
531
531
  }, REMOVE(e) {
532
532
  let n = this.indexOf(e);
@@ -534,42 +534,42 @@ let _o = new Ao(() => un(() => [], { ADD(e) {
534
534
  let t = this.slice();
535
535
  return t.splice(n, 1), t;
536
536
  } }));
537
- function Ot(e, n) {
538
- let t = _o.get(n), o = Ue(), i = fn(t);
537
+ function Tt(e, n) {
538
+ let t = _o.get(n), o = Ue(), i = mn(t);
539
539
  if (U(() => {
540
540
  if (e) return t.dispatch("ADD", o), () => t.dispatch("REMOVE", o);
541
541
  }, [t, e]), !e) return !1;
542
542
  let r = i.indexOf(o), l = i.length;
543
543
  return r === -1 && (r = l, l += 1), r === l - 1;
544
544
  }
545
- let bt = /* @__PURE__ */ new Map(), ze = /* @__PURE__ */ new Map();
546
- function Nt(e) {
545
+ let bt = /* @__PURE__ */ new Map(), ke = /* @__PURE__ */ new Map();
546
+ function Ht(e) {
547
547
  var n;
548
- let t = (n = ze.get(e)) != null ? n : 0;
549
- return ze.set(e, t + 1), t !== 0 ? () => kt(e) : (bt.set(e, { "aria-hidden": e.getAttribute("aria-hidden"), inert: e.inert }), e.setAttribute("aria-hidden", "true"), e.inert = !0, () => kt(e));
548
+ let t = (n = ke.get(e)) != null ? n : 0;
549
+ return ke.set(e, t + 1), t !== 0 ? () => Vt(e) : (bt.set(e, { "aria-hidden": e.getAttribute("aria-hidden"), inert: e.inert }), e.setAttribute("aria-hidden", "true"), e.inert = !0, () => Vt(e));
550
550
  }
551
- function kt(e) {
551
+ function Vt(e) {
552
552
  var n;
553
- let t = (n = ze.get(e)) != null ? n : 1;
554
- if (t === 1 ? ze.delete(e) : ze.set(e, t - 1), t !== 1) return;
553
+ let t = (n = ke.get(e)) != null ? n : 1;
554
+ if (t === 1 ? ke.delete(e) : ke.set(e, t - 1), t !== 1) return;
555
555
  let o = bt.get(e);
556
556
  o && (o["aria-hidden"] === null ? e.removeAttribute("aria-hidden") : e.setAttribute("aria-hidden", o["aria-hidden"]), e.inert = o.inert, bt.delete(e));
557
557
  }
558
558
  function Do(e, { allowed: n, disallowed: t } = {}) {
559
- let o = Ot(e, "inert-others");
559
+ let o = Tt(e, "inert-others");
560
560
  U(() => {
561
561
  var i, r;
562
562
  if (!o) return;
563
563
  let l = Me();
564
- for (let a of (i = t == null ? void 0 : t()) != null ? i : []) a && l.add(Nt(a));
564
+ for (let a of (i = t == null ? void 0 : t()) != null ? i : []) a && l.add(Ht(a));
565
565
  let s = (r = n == null ? void 0 : n()) != null ? r : [];
566
566
  for (let a of s) {
567
567
  if (!a) continue;
568
- let f = Et(a);
568
+ let f = St(a);
569
569
  if (!f) continue;
570
570
  let u = a.parentElement;
571
571
  for (; u && u !== f.body; ) {
572
- for (let d of u.children) s.some((g) => d.contains(g)) || l.add(Nt(d));
572
+ for (let d of u.children) s.some((g) => d.contains(g)) || l.add(Ht(d));
573
573
  u = u.parentElement;
574
574
  }
575
575
  }
@@ -581,7 +581,7 @@ function $o(e, n, t) {
581
581
  let r = i.getBoundingClientRect();
582
582
  r.x === 0 && r.y === 0 && r.width === 0 && r.height === 0 && t();
583
583
  });
584
- ne(() => {
584
+ oe(() => {
585
585
  if (!e) return;
586
586
  let i = n === null ? null : n instanceof HTMLElement ? n : n.current;
587
587
  if (!i) return;
@@ -597,18 +597,18 @@ function $o(e, n, t) {
597
597
  return () => r.dispose();
598
598
  }, [n, o, e]);
599
599
  }
600
- function dn() {
600
+ function hn() {
601
601
  return /iPhone/gi.test(window.navigator.platform) || /Mac/gi.test(window.navigator.platform) && window.navigator.maxTouchPoints > 0;
602
602
  }
603
603
  function Lo() {
604
604
  return /Android/gi.test(window.navigator.userAgent);
605
605
  }
606
- function pn() {
607
- return dn() || Lo();
606
+ function gn() {
607
+ return hn() || Lo();
608
608
  }
609
609
  function Ne(e, n, t, o) {
610
610
  let i = Ae(t);
611
- ne(() => {
611
+ oe(() => {
612
612
  if (!e) return;
613
613
  function r(l) {
614
614
  i.current(l);
@@ -618,7 +618,7 @@ function Ne(e, n, t, o) {
618
618
  }
619
619
  function Fo(e, n, t, o) {
620
620
  let i = Ae(t);
621
- ne(() => {
621
+ oe(() => {
622
622
  if (!e) return;
623
623
  function r(l) {
624
624
  i.current(l);
@@ -626,9 +626,9 @@ function Fo(e, n, t, o) {
626
626
  return window.addEventListener(n, r, o), () => window.removeEventListener(n, r, o);
627
627
  }, [e, n, o]);
628
628
  }
629
- const zt = 30;
629
+ const Wt = 30;
630
630
  function No(e, n, t) {
631
- let o = Ot(e, "outside-click"), i = Ae(t), r = He(function(a, f) {
631
+ let o = Tt(e, "outside-click"), i = Ae(t), r = He(function(a, f) {
632
632
  if (a.defaultPrevented) return;
633
633
  let u = f(a);
634
634
  if (u === null || !u.getRootNode().contains(u) || !u.isConnected) return;
@@ -649,22 +649,22 @@ function No(e, n, t) {
649
649
  var f, u;
650
650
  l.current = ((u = (f = a.composedPath) == null ? void 0 : f.call(a)) == null ? void 0 : u[0]) || a.target;
651
651
  }, !0), Ne(o, "click", (a) => {
652
- pn() || l.current && (r(a, () => l.current), l.current = null);
652
+ gn() || l.current && (r(a, () => l.current), l.current = null);
653
653
  }, !0);
654
654
  let s = Y({ x: 0, y: 0 });
655
655
  Ne(o, "touchstart", (a) => {
656
656
  s.current.x = a.touches[0].clientX, s.current.y = a.touches[0].clientY;
657
657
  }, !0), Ne(o, "touchend", (a) => {
658
658
  let f = { x: a.changedTouches[0].clientX, y: a.changedTouches[0].clientY };
659
- if (!(Math.abs(f.x - s.current.x) >= zt || Math.abs(f.y - s.current.y) >= zt)) return r(a, () => a.target instanceof HTMLElement ? a.target : null);
659
+ if (!(Math.abs(f.x - s.current.x) >= Wt || Math.abs(f.y - s.current.y) >= Wt)) return r(a, () => a.target instanceof HTMLElement ? a.target : null);
660
660
  }, !0), Fo(o, "blur", (a) => r(a, () => window.document.activeElement instanceof HTMLIFrameElement ? window.document.activeElement : null), !0);
661
661
  }
662
662
  function st(...e) {
663
- return q(() => Et(...e), [...e]);
663
+ return q(() => St(...e), [...e]);
664
664
  }
665
- function ko(e, n, t, o) {
665
+ function zo(e, n, t, o) {
666
666
  let i = Ae(t);
667
- ne(() => {
667
+ oe(() => {
668
668
  e = e ?? window;
669
669
  function r(l) {
670
670
  i.current(l);
@@ -672,9 +672,9 @@ function ko(e, n, t, o) {
672
672
  return e.addEventListener(n, r, o), () => e.removeEventListener(n, r, o);
673
673
  }, [e, n, o]);
674
674
  }
675
- function mn(e) {
675
+ function vn(e) {
676
676
  let n = Y({ value: "", selectionStart: null, selectionEnd: null });
677
- return ko(e.current, "blur", (t) => {
677
+ return zo(e.current, "blur", (t) => {
678
678
  let o = t.target;
679
679
  o instanceof HTMLInputElement && (n.current = { value: o.value, selectionStart: o.selectionStart, selectionEnd: o.selectionEnd });
680
680
  }), A(() => {
@@ -689,7 +689,7 @@ function mn(e) {
689
689
  }
690
690
  });
691
691
  }
692
- function zo() {
692
+ function ko() {
693
693
  let e;
694
694
  return { before({ doc: n }) {
695
695
  var t;
@@ -701,7 +701,7 @@ function zo() {
701
701
  } };
702
702
  }
703
703
  function Ho() {
704
- return dn() ? { before({ doc: e, d: n, meta: t }) {
704
+ return hn() ? { before({ doc: e, d: n, meta: t }) {
705
705
  function o(i) {
706
706
  return t.containers.flatMap((r) => r()).some((r) => r.contains(i));
707
707
  }
@@ -753,7 +753,7 @@ function Wo(e) {
753
753
  for (let t of e) Object.assign(n, t(n));
754
754
  return n;
755
755
  }
756
- let Ee = un(() => /* @__PURE__ */ new Map(), { PUSH(e, n) {
756
+ let Ee = pn(() => /* @__PURE__ */ new Map(), { PUSH(e, n) {
757
757
  var t;
758
758
  let o = (t = this.get(e)) != null ? t : { doc: e, count: 0, d: Me(), meta: /* @__PURE__ */ new Set() };
759
759
  return o.count++, o.meta.add(n), this.set(e, o), this;
@@ -761,7 +761,7 @@ let Ee = un(() => /* @__PURE__ */ new Map(), { PUSH(e, n) {
761
761
  let t = this.get(e);
762
762
  return t && (t.count--, t.meta.delete(n)), this;
763
763
  }, SCROLL_PREVENT({ doc: e, d: n, meta: t }) {
764
- let o = { doc: e, d: n, meta: Wo(t) }, i = [Ho(), zo(), Vo()];
764
+ let o = { doc: e, d: n, meta: Wo(t) }, i = [Ho(), ko(), Vo()];
765
765
  i.forEach(({ before: r }) => r == null ? void 0 : r(o)), i.forEach(({ after: r }) => r == null ? void 0 : r(o));
766
766
  }, SCROLL_ALLOW({ d: e }) {
767
767
  e.dispose();
@@ -777,45 +777,45 @@ Ee.subscribe(() => {
777
777
  }
778
778
  });
779
779
  function Bo(e, n, t = () => ({ containers: [] })) {
780
- let o = fn(Ee), i = n ? o.get(n) : void 0, r = i ? i.count > 0 : !1;
780
+ let o = mn(Ee), i = n ? o.get(n) : void 0, r = i ? i.count > 0 : !1;
781
781
  return U(() => {
782
782
  if (!(!n || !e)) return Ee.dispatch("PUSH", n, t), () => Ee.dispatch("POP", n, t);
783
783
  }, [e, n]), r;
784
784
  }
785
785
  function jo(e, n, t = () => [document.body]) {
786
- let o = Ot(e, "scroll-lock");
786
+ let o = Tt(e, "scroll-lock");
787
787
  Bo(o, n, (i) => {
788
788
  var r;
789
789
  return { containers: [...(r = i.containers) != null ? r : [], t] };
790
790
  });
791
791
  }
792
- function Ht(e) {
792
+ function Bt(e) {
793
793
  return [e.screenX, e.screenY];
794
794
  }
795
795
  function Uo() {
796
796
  let e = Y([-1, -1]);
797
797
  return { wasMoved(n) {
798
- let t = Ht(n);
798
+ let t = Bt(n);
799
799
  return e.current[0] === t[0] && e.current[1] === t[1] ? !1 : (e.current = t, !0);
800
800
  }, update(n) {
801
- e.current = Ht(n);
801
+ e.current = Bt(n);
802
802
  } };
803
803
  }
804
804
  function Yo(e, { container: n, accept: t, walk: o }) {
805
805
  let i = Y(t), r = Y(o);
806
- ne(() => {
806
+ oe(() => {
807
807
  i.current = t, r.current = o;
808
808
  }, [t, o]), U(() => {
809
809
  if (!n || !e) return;
810
- let l = Et(n);
810
+ let l = St(n);
811
811
  if (!l) return;
812
812
  let s = i.current, a = r.current, f = Object.assign((d) => s(d), { acceptNode: s }), u = l.createTreeWalker(n, NodeFilter.SHOW_ELEMENT, f, !1);
813
813
  for (; u.nextNode(); ) a(u.currentNode);
814
814
  }, [n, e, i, r]);
815
815
  }
816
- function Vt(e, n) {
816
+ function jt(e, n) {
817
817
  let t = Y([]), o = A(e);
818
- ne(() => {
818
+ oe(() => {
819
819
  let i = [...t.current];
820
820
  for (let [r, l] of n.entries()) if (t.current[r] !== l) {
821
821
  let s = o(n, i);
@@ -824,27 +824,27 @@ function Vt(e, n) {
824
824
  }, [o, ...n]);
825
825
  }
826
826
  function _e(e) {
827
- return hn(e) ? (e.nodeName || "").toLowerCase() : "#document";
827
+ return bn(e) ? (e.nodeName || "").toLowerCase() : "#document";
828
828
  }
829
- function Z(e) {
829
+ function ee(e) {
830
830
  var n;
831
831
  return (e == null || (n = e.ownerDocument) == null ? void 0 : n.defaultView) || window;
832
832
  }
833
833
  function fe(e) {
834
834
  var n;
835
- return (n = (hn(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : n.documentElement;
835
+ return (n = (bn(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : n.documentElement;
836
836
  }
837
- function hn(e) {
838
- return e instanceof Node || e instanceof Z(e).Node;
837
+ function bn(e) {
838
+ return e instanceof Node || e instanceof ee(e).Node;
839
839
  }
840
840
  function G(e) {
841
- return e instanceof Element || e instanceof Z(e).Element;
841
+ return e instanceof Element || e instanceof ee(e).Element;
842
842
  }
843
843
  function ce(e) {
844
- return e instanceof HTMLElement || e instanceof Z(e).HTMLElement;
844
+ return e instanceof HTMLElement || e instanceof ee(e).HTMLElement;
845
845
  }
846
- function Wt(e) {
847
- return typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof Z(e).ShadowRoot;
846
+ function Ut(e) {
847
+ return typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof ee(e).ShadowRoot;
848
848
  }
849
849
  function Ye(e) {
850
850
  const {
@@ -867,8 +867,8 @@ function lt(e) {
867
867
  }
868
868
  });
869
869
  }
870
- function Ct(e) {
871
- const n = Tt(), t = re(e);
870
+ function It(e) {
871
+ const n = Mt(), t = re(e);
872
872
  return t.transform !== "none" || t.perspective !== "none" || (t.containerType ? t.containerType !== "normal" : !1) || !n && (t.backdropFilter ? t.backdropFilter !== "none" : !1) || !n && (t.filter ? t.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((o) => (t.willChange || "").includes(o)) || ["paint", "layout", "strict", "content"].some((o) => (t.contain || "").includes(o));
873
873
  }
874
874
  function qo(e) {
@@ -876,20 +876,20 @@ function qo(e) {
876
876
  for (; ce(n) && !Pe(n); ) {
877
877
  if (lt(n))
878
878
  return null;
879
- if (Ct(n))
879
+ if (It(n))
880
880
  return n;
881
881
  n = me(n);
882
882
  }
883
883
  return null;
884
884
  }
885
- function Tt() {
885
+ function Mt() {
886
886
  return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
887
887
  }
888
888
  function Pe(e) {
889
889
  return ["html", "body", "#document"].includes(_e(e));
890
890
  }
891
891
  function re(e) {
892
- return Z(e).getComputedStyle(e);
892
+ return ee(e).getComputedStyle(e);
893
893
  }
894
894
  function at(e) {
895
895
  return G(e) ? {
@@ -907,19 +907,19 @@ function me(e) {
907
907
  // Step into the shadow DOM of the parent of a slotted node.
908
908
  e.assignedSlot || // DOM Element detected.
909
909
  e.parentNode || // ShadowRoot detected.
910
- Wt(e) && e.host || // Fallback.
910
+ Ut(e) && e.host || // Fallback.
911
911
  fe(e)
912
912
  );
913
- return Wt(n) ? n.host : n;
913
+ return Ut(n) ? n.host : n;
914
914
  }
915
- function gn(e) {
915
+ function xn(e) {
916
916
  const n = me(e);
917
- return Pe(n) ? e.ownerDocument ? e.ownerDocument.body : e.body : ce(n) && Ye(n) ? n : gn(n);
917
+ return Pe(n) ? e.ownerDocument ? e.ownerDocument.body : e.body : ce(n) && Ye(n) ? n : xn(n);
918
918
  }
919
919
  function We(e, n, t) {
920
920
  var o;
921
921
  n === void 0 && (n = []), t === void 0 && (t = !0);
922
- const i = gn(e), r = i === ((o = e.ownerDocument) == null ? void 0 : o.body), l = Z(i);
922
+ const i = xn(e), r = i === ((o = e.ownerDocument) == null ? void 0 : o.body), l = ee(i);
923
923
  return r ? n.concat(l, l.visualViewport || [], Ye(i) ? i : [], l.frameElement && t ? We(l.frameElement) : []) : n.concat(i, We(i, [], t));
924
924
  }
925
925
  function Go() {
@@ -932,7 +932,7 @@ function Go() {
932
932
  return t + "/" + o;
933
933
  }).join(" ") : navigator.userAgent;
934
934
  }
935
- const pe = Math.min, Q = Math.max, tt = Math.round, Qe = Math.floor, he = (e) => ({
935
+ const pe = Math.min, Z = Math.max, tt = Math.round, Qe = Math.floor, he = (e) => ({
936
936
  x: e,
937
937
  y: e
938
938
  }), Jo = {
@@ -944,8 +944,8 @@ const pe = Math.min, Q = Math.max, tt = Math.round, Qe = Math.floor, he = (e) =>
944
944
  start: "end",
945
945
  end: "start"
946
946
  };
947
- function Bt(e, n, t) {
948
- return Q(e, pe(n, t));
947
+ function Yt(e, n, t) {
948
+ return Z(e, pe(n, t));
949
949
  }
950
950
  function De(e, n) {
951
951
  return typeof e == "function" ? e(n) : e;
@@ -956,21 +956,21 @@ function ge(e) {
956
956
  function Ke(e) {
957
957
  return e.split("-")[1];
958
958
  }
959
- function vn(e) {
959
+ function wn(e) {
960
960
  return e === "x" ? "y" : "x";
961
961
  }
962
- function bn(e) {
962
+ function yn(e) {
963
963
  return e === "y" ? "height" : "width";
964
964
  }
965
965
  function Re(e) {
966
966
  return ["top", "bottom"].includes(ge(e)) ? "y" : "x";
967
967
  }
968
- function xn(e) {
969
- return vn(Re(e));
968
+ function En(e) {
969
+ return wn(Re(e));
970
970
  }
971
971
  function Qo(e, n, t) {
972
972
  t === void 0 && (t = !1);
973
- const o = Ke(e), i = xn(e), r = bn(i);
973
+ const o = Ke(e), i = En(e), r = yn(i);
974
974
  let l = i === "x" ? o === (t ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
975
975
  return n.reference[r] > n.floating[r] && (l = nt(l)), [l, nt(l)];
976
976
  }
@@ -1037,12 +1037,12 @@ function ot(e) {
1037
1037
  y: t
1038
1038
  };
1039
1039
  }
1040
- function jt(e, n, t) {
1040
+ function Kt(e, n, t) {
1041
1041
  let {
1042
1042
  reference: o,
1043
1043
  floating: i
1044
1044
  } = e;
1045
- const r = Re(n), l = xn(n), s = bn(l), a = ge(n), f = r === "y", u = o.x + o.width / 2 - i.width / 2, d = o.y + o.height / 2 - i.height / 2, g = o[s] / 2 - i[s] / 2;
1045
+ const r = Re(n), l = En(n), s = yn(l), a = ge(n), f = r === "y", u = o.x + o.width / 2 - i.width / 2, d = o.y + o.height / 2 - i.height / 2, g = o[s] / 2 - i[s] / 2;
1046
1046
  let c;
1047
1047
  switch (a) {
1048
1048
  case "top":
@@ -1099,17 +1099,17 @@ const ii = async (e, n, t) => {
1099
1099
  }), {
1100
1100
  x: u,
1101
1101
  y: d
1102
- } = jt(f, o, a), g = o, c = {}, m = 0;
1102
+ } = Kt(f, o, a), g = o, c = {}, m = 0;
1103
1103
  for (let p = 0; p < s.length; p++) {
1104
1104
  const {
1105
1105
  name: h,
1106
- fn: b
1106
+ fn: v
1107
1107
  } = s[p], {
1108
1108
  x: w,
1109
- y: v,
1109
+ y: b,
1110
1110
  data: x,
1111
- reset: E
1112
- } = await b({
1111
+ reset: y
1112
+ } = await v({
1113
1113
  x: u,
1114
1114
  y: d,
1115
1115
  initialPlacement: o,
@@ -1123,20 +1123,20 @@ const ii = async (e, n, t) => {
1123
1123
  floating: n
1124
1124
  }
1125
1125
  });
1126
- u = w ?? u, d = v ?? d, c = {
1126
+ u = w ?? u, d = b ?? d, c = {
1127
1127
  ...c,
1128
1128
  [h]: {
1129
1129
  ...c[h],
1130
1130
  ...x
1131
1131
  }
1132
- }, E && m <= 50 && (m++, typeof E == "object" && (E.placement && (g = E.placement), E.rects && (f = E.rects === !0 ? await l.getElementRects({
1132
+ }, y && m <= 50 && (m++, typeof y == "object" && (y.placement && (g = y.placement), y.rects && (f = y.rects === !0 ? await l.getElementRects({
1133
1133
  reference: e,
1134
1134
  floating: n,
1135
1135
  strategy: i
1136
- }) : E.rects), {
1136
+ }) : y.rects), {
1137
1137
  x: u,
1138
1138
  y: d
1139
- } = jt(f, g, a)), p = -1);
1139
+ } = Kt(f, g, a)), p = -1);
1140
1140
  }
1141
1141
  return {
1142
1142
  x: u,
@@ -1162,7 +1162,7 @@ async function ct(e, n) {
1162
1162
  elementContext: d = "floating",
1163
1163
  altBoundary: g = !1,
1164
1164
  padding: c = 0
1165
- } = De(n, e), m = oi(c), h = s[g ? d === "floating" ? "reference" : "floating" : d], b = ot(await r.getClippingRect({
1165
+ } = De(n, e), m = oi(c), h = s[g ? d === "floating" ? "reference" : "floating" : d], v = ot(await r.getClippingRect({
1166
1166
  element: (t = await (r.isElement == null ? void 0 : r.isElement(h))) == null || t ? h : h.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(s.floating)),
1167
1167
  boundary: f,
1168
1168
  rootBoundary: u,
@@ -1172,23 +1172,23 @@ async function ct(e, n) {
1172
1172
  y: i,
1173
1173
  width: l.floating.width,
1174
1174
  height: l.floating.height
1175
- } : l.reference, v = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(s.floating)), x = await (r.isElement == null ? void 0 : r.isElement(v)) ? await (r.getScale == null ? void 0 : r.getScale(v)) || {
1175
+ } : l.reference, b = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(s.floating)), x = await (r.isElement == null ? void 0 : r.isElement(b)) ? await (r.getScale == null ? void 0 : r.getScale(b)) || {
1176
1176
  x: 1,
1177
1177
  y: 1
1178
1178
  } : {
1179
1179
  x: 1,
1180
1180
  y: 1
1181
- }, E = ot(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
1181
+ }, y = ot(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
1182
1182
  elements: s,
1183
1183
  rect: w,
1184
- offsetParent: v,
1184
+ offsetParent: b,
1185
1185
  strategy: a
1186
1186
  }) : w);
1187
1187
  return {
1188
- top: (b.top - E.top + m.top) / x.y,
1189
- bottom: (E.bottom - b.bottom + m.bottom) / x.y,
1190
- left: (b.left - E.left + m.left) / x.x,
1191
- right: (E.right - b.right + m.right) / x.x
1188
+ top: (v.top - y.top + m.top) / x.y,
1189
+ bottom: (y.bottom - v.bottom + m.bottom) / x.y,
1190
+ left: (v.left - y.left + m.left) / x.x,
1191
+ right: (y.right - v.right + m.right) / x.x
1192
1192
  };
1193
1193
  }
1194
1194
  const ri = function(e) {
@@ -1215,44 +1215,44 @@ const ri = function(e) {
1215
1215
  } = De(e, n);
1216
1216
  if ((t = r.arrow) != null && t.alignmentOffset)
1217
1217
  return {};
1218
- const b = ge(i), w = Re(s), v = ge(s) === s, x = await (a.isRTL == null ? void 0 : a.isRTL(f.floating)), E = g || (v || !p ? [nt(s)] : Zo(s)), S = m !== "none";
1219
- !g && S && E.push(...ti(s, p, m, x));
1220
- const O = [s, ...E], $ = await ct(n, h), M = [];
1221
- let P = ((o = r.flip) == null ? void 0 : o.overflows) || [];
1222
- if (u && M.push($[b]), d) {
1223
- const I = Qo(i, l, x);
1224
- M.push($[I[0]], $[I[1]]);
1218
+ const v = ge(i), w = Re(s), b = ge(s) === s, x = await (a.isRTL == null ? void 0 : a.isRTL(f.floating)), y = g || (b || !p ? [nt(s)] : Zo(s)), S = m !== "none";
1219
+ !g && S && y.push(...ti(s, p, m, x));
1220
+ const O = [s, ...y], D = await ct(n, h), N = [];
1221
+ let M = ((o = r.flip) == null ? void 0 : o.overflows) || [];
1222
+ if (u && N.push(D[v]), d) {
1223
+ const P = Qo(i, l, x);
1224
+ N.push(D[P[0]], D[P[1]]);
1225
1225
  }
1226
- if (P = [...P, {
1226
+ if (M = [...M, {
1227
1227
  placement: i,
1228
- overflows: M
1229
- }], !M.every((I) => I <= 0)) {
1230
- var D, H;
1231
- const I = (((D = r.flip) == null ? void 0 : D.index) || 0) + 1, L = O[I];
1228
+ overflows: N
1229
+ }], !N.every((P) => P <= 0)) {
1230
+ var T, $;
1231
+ const P = (((T = r.flip) == null ? void 0 : T.index) || 0) + 1, L = O[P];
1232
1232
  if (L)
1233
1233
  return {
1234
1234
  data: {
1235
- index: I,
1236
- overflows: P
1235
+ index: P,
1236
+ overflows: M
1237
1237
  },
1238
1238
  reset: {
1239
1239
  placement: L
1240
1240
  }
1241
1241
  };
1242
- let V = (H = P.filter((R) => R.overflows[0] <= 0).sort((R, k) => R.overflows[1] - k.overflows[1])[0]) == null ? void 0 : H.placement;
1242
+ let V = ($ = M.filter((R) => R.overflows[0] <= 0).sort((R, k) => R.overflows[1] - k.overflows[1])[0]) == null ? void 0 : $.placement;
1243
1243
  if (!V)
1244
1244
  switch (c) {
1245
1245
  case "bestFit": {
1246
- var N;
1247
- const R = (N = P.filter((k) => {
1246
+ var z;
1247
+ const R = (z = M.filter((k) => {
1248
1248
  if (S) {
1249
- const T = Re(k.placement);
1250
- return T === w || // Create a bias to the `y` side axis due to horizontal
1249
+ const I = Re(k.placement);
1250
+ return I === w || // Create a bias to the `y` side axis due to horizontal
1251
1251
  // reading directions favoring greater width.
1252
- T === "y";
1252
+ I === "y";
1253
1253
  }
1254
1254
  return !0;
1255
- }).map((k) => [k.placement, k.overflows.filter((T) => T > 0).reduce((T, ee) => T + ee, 0)]).sort((k, T) => k[1] - T[1])[0]) == null ? void 0 : N[0];
1255
+ }).map((k) => [k.placement, k.overflows.filter((I) => I > 0).reduce((I, te) => I + te, 0)]).sort((k, I) => k[1] - I[1])[0]) == null ? void 0 : z[0];
1256
1256
  R && (V = R);
1257
1257
  break;
1258
1258
  }
@@ -1336,11 +1336,11 @@ const li = function(e) {
1336
1336
  limiter: s = {
1337
1337
  fn: (h) => {
1338
1338
  let {
1339
- x: b,
1339
+ x: v,
1340
1340
  y: w
1341
1341
  } = h;
1342
1342
  return {
1343
- x: b,
1343
+ x: v,
1344
1344
  y: w
1345
1345
  };
1346
1346
  }
@@ -1349,15 +1349,15 @@ const li = function(e) {
1349
1349
  } = De(e, n), f = {
1350
1350
  x: t,
1351
1351
  y: o
1352
- }, u = await ct(n, a), d = Re(ge(i)), g = vn(d);
1352
+ }, u = await ct(n, a), d = Re(ge(i)), g = wn(d);
1353
1353
  let c = f[g], m = f[d];
1354
1354
  if (r) {
1355
- const h = g === "y" ? "top" : "left", b = g === "y" ? "bottom" : "right", w = c + u[h], v = c - u[b];
1356
- c = Bt(w, c, v);
1355
+ const h = g === "y" ? "top" : "left", v = g === "y" ? "bottom" : "right", w = c + u[h], b = c - u[v];
1356
+ c = Yt(w, c, b);
1357
1357
  }
1358
1358
  if (l) {
1359
- const h = d === "y" ? "top" : "left", b = d === "y" ? "bottom" : "right", w = m + u[h], v = m - u[b];
1360
- m = Bt(w, m, v);
1359
+ const h = d === "y" ? "top" : "left", v = d === "y" ? "bottom" : "right", w = m + u[h], b = m - u[v];
1360
+ m = Yt(w, m, b);
1361
1361
  }
1362
1362
  const p = s.fn({
1363
1363
  ...n,
@@ -1393,16 +1393,16 @@ const li = function(e) {
1393
1393
  } = o.floating;
1394
1394
  let m, p;
1395
1395
  f === "top" || f === "bottom" ? (m = f, p = u === (await (i.isRTL == null ? void 0 : i.isRTL(r.floating)) ? "start" : "end") ? "left" : "right") : (p = f, m = u === "end" ? "top" : "bottom");
1396
- const h = c - a.top - a.bottom, b = g - a.left - a.right, w = pe(c - a[m], h), v = pe(g - a[p], b), x = !n.middlewareData.shift;
1397
- let E = w, S = v;
1398
- if (d ? S = u || x ? pe(v, b) : b : E = u || x ? pe(w, h) : h, x && !u) {
1399
- const $ = Q(a.left, 0), M = Q(a.right, 0), P = Q(a.top, 0), D = Q(a.bottom, 0);
1400
- d ? S = g - 2 * ($ !== 0 || M !== 0 ? $ + M : Q(a.left, a.right)) : E = c - 2 * (P !== 0 || D !== 0 ? P + D : Q(a.top, a.bottom));
1396
+ const h = c - a.top - a.bottom, v = g - a.left - a.right, w = pe(c - a[m], h), b = pe(g - a[p], v), x = !n.middlewareData.shift;
1397
+ let y = w, S = b;
1398
+ if (d ? S = u || x ? pe(b, v) : v : y = u || x ? pe(w, h) : h, x && !u) {
1399
+ const D = Z(a.left, 0), N = Z(a.right, 0), M = Z(a.top, 0), T = Z(a.bottom, 0);
1400
+ d ? S = g - 2 * (D !== 0 || N !== 0 ? D + N : Z(a.left, a.right)) : y = c - 2 * (M !== 0 || T !== 0 ? M + T : Z(a.top, a.bottom));
1401
1401
  }
1402
1402
  await l({
1403
1403
  ...n,
1404
1404
  availableWidth: S,
1405
- availableHeight: E
1405
+ availableHeight: y
1406
1406
  });
1407
1407
  const O = await i.getDimensions(r.floating);
1408
1408
  return g !== O.width || c !== O.height ? {
@@ -1413,7 +1413,7 @@ const li = function(e) {
1413
1413
  }
1414
1414
  };
1415
1415
  };
1416
- function wn(e) {
1416
+ function Rn(e) {
1417
1417
  const n = re(e);
1418
1418
  let t = parseFloat(n.width) || 0, o = parseFloat(n.height) || 0;
1419
1419
  const i = ce(e), r = i ? e.offsetWidth : t, l = i ? e.offsetHeight : o, s = tt(t) !== r || tt(o) !== l;
@@ -1423,18 +1423,18 @@ function wn(e) {
1423
1423
  $: s
1424
1424
  };
1425
1425
  }
1426
- function It(e) {
1426
+ function Pt(e) {
1427
1427
  return G(e) ? e : e.contextElement;
1428
1428
  }
1429
1429
  function Ie(e) {
1430
- const n = It(e);
1430
+ const n = Pt(e);
1431
1431
  if (!ce(n))
1432
1432
  return he(1);
1433
1433
  const t = n.getBoundingClientRect(), {
1434
1434
  width: o,
1435
1435
  height: i,
1436
1436
  $: r
1437
- } = wn(n);
1437
+ } = Rn(n);
1438
1438
  let l = (r ? tt(t.width) : t.width) / o, s = (r ? tt(t.height) : t.height) / i;
1439
1439
  return (!l || !Number.isFinite(l)) && (l = 1), (!s || !Number.isFinite(s)) && (s = 1), {
1440
1440
  x: l,
@@ -1442,29 +1442,29 @@ function Ie(e) {
1442
1442
  };
1443
1443
  }
1444
1444
  const ui = /* @__PURE__ */ he(0);
1445
- function yn(e) {
1446
- const n = Z(e);
1447
- return !Tt() || !n.visualViewport ? ui : {
1445
+ function Sn(e) {
1446
+ const n = ee(e);
1447
+ return !Mt() || !n.visualViewport ? ui : {
1448
1448
  x: n.visualViewport.offsetLeft,
1449
1449
  y: n.visualViewport.offsetTop
1450
1450
  };
1451
1451
  }
1452
1452
  function fi(e, n, t) {
1453
- return n === void 0 && (n = !1), !t || n && t !== Z(e) ? !1 : n;
1453
+ return n === void 0 && (n = !1), !t || n && t !== ee(e) ? !1 : n;
1454
1454
  }
1455
1455
  function Se(e, n, t, o) {
1456
1456
  n === void 0 && (n = !1), t === void 0 && (t = !1);
1457
- const i = e.getBoundingClientRect(), r = It(e);
1457
+ const i = e.getBoundingClientRect(), r = Pt(e);
1458
1458
  let l = he(1);
1459
1459
  n && (o ? G(o) && (l = Ie(o)) : l = Ie(e));
1460
- const s = fi(r, t, o) ? yn(r) : he(0);
1460
+ const s = fi(r, t, o) ? Sn(r) : he(0);
1461
1461
  let a = (i.left + s.x) / l.x, f = (i.top + s.y) / l.y, u = i.width / l.x, d = i.height / l.y;
1462
1462
  if (r) {
1463
- const g = Z(r), c = o && G(o) ? Z(o) : o;
1463
+ const g = ee(r), c = o && G(o) ? ee(o) : o;
1464
1464
  let m = g, p = m.frameElement;
1465
1465
  for (; p && o && c !== m; ) {
1466
- const h = Ie(p), b = p.getBoundingClientRect(), w = re(p), v = b.left + (p.clientLeft + parseFloat(w.paddingLeft)) * h.x, x = b.top + (p.clientTop + parseFloat(w.paddingTop)) * h.y;
1467
- a *= h.x, f *= h.y, u *= h.x, d *= h.y, a += v, f += x, m = Z(p), p = m.frameElement;
1466
+ const h = Ie(p), v = p.getBoundingClientRect(), w = re(p), b = v.left + (p.clientLeft + parseFloat(w.paddingLeft)) * h.x, x = v.top + (p.clientTop + parseFloat(w.paddingTop)) * h.y;
1467
+ a *= h.x, f *= h.y, u *= h.x, d *= h.y, a += b, f += x, m = ee(p), p = m.frameElement;
1468
1468
  }
1469
1469
  }
1470
1470
  return ot({
@@ -1503,14 +1503,14 @@ function di(e) {
1503
1503
  function pi(e) {
1504
1504
  return Array.from(e.getClientRects());
1505
1505
  }
1506
- function En(e) {
1506
+ function On(e) {
1507
1507
  return Se(fe(e)).left + at(e).scrollLeft;
1508
1508
  }
1509
1509
  function mi(e) {
1510
- const n = fe(e), t = at(e), o = e.ownerDocument.body, i = Q(n.scrollWidth, n.clientWidth, o.scrollWidth, o.clientWidth), r = Q(n.scrollHeight, n.clientHeight, o.scrollHeight, o.clientHeight);
1511
- let l = -t.scrollLeft + En(e);
1510
+ const n = fe(e), t = at(e), o = e.ownerDocument.body, i = Z(n.scrollWidth, n.clientWidth, o.scrollWidth, o.clientWidth), r = Z(n.scrollHeight, n.clientHeight, o.scrollHeight, o.clientHeight);
1511
+ let l = -t.scrollLeft + On(e);
1512
1512
  const s = -t.scrollTop;
1513
- return re(o).direction === "rtl" && (l += Q(n.clientWidth, o.clientWidth) - i), {
1513
+ return re(o).direction === "rtl" && (l += Z(n.clientWidth, o.clientWidth) - i), {
1514
1514
  width: i,
1515
1515
  height: r,
1516
1516
  x: l,
@@ -1518,11 +1518,11 @@ function mi(e) {
1518
1518
  };
1519
1519
  }
1520
1520
  function hi(e, n) {
1521
- const t = Z(e), o = fe(e), i = t.visualViewport;
1521
+ const t = ee(e), o = fe(e), i = t.visualViewport;
1522
1522
  let r = o.clientWidth, l = o.clientHeight, s = 0, a = 0;
1523
1523
  if (i) {
1524
1524
  r = i.width, l = i.height;
1525
- const f = Tt();
1525
+ const f = Mt();
1526
1526
  (!f || f && n === "fixed") && (s = i.offsetLeft, a = i.offsetTop);
1527
1527
  }
1528
1528
  return {
@@ -1541,7 +1541,7 @@ function gi(e, n) {
1541
1541
  y: f
1542
1542
  };
1543
1543
  }
1544
- function Ut(e, n, t) {
1544
+ function qt(e, n, t) {
1545
1545
  let o;
1546
1546
  if (n === "viewport")
1547
1547
  o = hi(e, t);
@@ -1550,7 +1550,7 @@ function Ut(e, n, t) {
1550
1550
  else if (G(n))
1551
1551
  o = gi(n, t);
1552
1552
  else {
1553
- const i = yn(e);
1553
+ const i = Sn(e);
1554
1554
  o = {
1555
1555
  ...n,
1556
1556
  x: n.x - i.x,
@@ -1559,9 +1559,9 @@ function Ut(e, n, t) {
1559
1559
  }
1560
1560
  return ot(o);
1561
1561
  }
1562
- function Rn(e, n) {
1562
+ function Cn(e, n) {
1563
1563
  const t = me(e);
1564
- return t === n || !G(t) || Pe(t) ? !1 : re(t).position === "fixed" || Rn(t, n);
1564
+ return t === n || !G(t) || Pe(t) ? !1 : re(t).position === "fixed" || Cn(t, n);
1565
1565
  }
1566
1566
  function vi(e, n) {
1567
1567
  const t = n.get(e);
@@ -1571,8 +1571,8 @@ function vi(e, n) {
1571
1571
  const r = re(e).position === "fixed";
1572
1572
  let l = r ? me(e) : e;
1573
1573
  for (; G(l) && !Pe(l); ) {
1574
- const s = re(l), a = Ct(l);
1575
- !a && s.position === "fixed" && (i = null), (r ? !a && !i : !a && s.position === "static" && !!i && ["absolute", "fixed"].includes(i.position) || Ye(l) && !a && Rn(e, l)) ? o = o.filter((u) => u !== l) : i = s, l = me(l);
1574
+ const s = re(l), a = It(l);
1575
+ !a && s.position === "fixed" && (i = null), (r ? !a && !i : !a && s.position === "static" && !!i && ["absolute", "fixed"].includes(i.position) || Ye(l) && !a && Cn(e, l)) ? o = o.filter((u) => u !== l) : i = s, l = me(l);
1576
1576
  }
1577
1577
  return n.set(e, o), o;
1578
1578
  }
@@ -1584,9 +1584,9 @@ function bi(e) {
1584
1584
  strategy: i
1585
1585
  } = e;
1586
1586
  const l = [...t === "clippingAncestors" ? lt(n) ? [] : vi(n, this._c) : [].concat(t), o], s = l[0], a = l.reduce((f, u) => {
1587
- const d = Ut(n, u, i);
1588
- return f.top = Q(d.top, f.top), f.right = pe(d.right, f.right), f.bottom = pe(d.bottom, f.bottom), f.left = Q(d.left, f.left), f;
1589
- }, Ut(n, s, i));
1587
+ const d = qt(n, u, i);
1588
+ return f.top = Z(d.top, f.top), f.right = pe(d.right, f.right), f.bottom = pe(d.bottom, f.bottom), f.left = Z(d.left, f.left), f;
1589
+ }, qt(n, s, i));
1590
1590
  return {
1591
1591
  width: a.right - a.left,
1592
1592
  height: a.bottom - a.top,
@@ -1598,7 +1598,7 @@ function xi(e) {
1598
1598
  const {
1599
1599
  width: n,
1600
1600
  height: t
1601
- } = wn(e);
1601
+ } = Rn(e);
1602
1602
  return {
1603
1603
  width: n,
1604
1604
  height: t
@@ -1615,7 +1615,7 @@ function wi(e, n, t) {
1615
1615
  if ((_e(n) !== "body" || Ye(i)) && (s = at(n)), o) {
1616
1616
  const d = Se(n, !0, r, n);
1617
1617
  a.x = d.x + n.clientLeft, a.y = d.y + n.clientTop;
1618
- } else i && (a.x = En(i));
1618
+ } else i && (a.x = On(i));
1619
1619
  const f = l.left + s.scrollLeft - a.x, u = l.top + s.scrollTop - a.y;
1620
1620
  return {
1621
1621
  x: f,
@@ -1627,11 +1627,11 @@ function wi(e, n, t) {
1627
1627
  function pt(e) {
1628
1628
  return re(e).position === "static";
1629
1629
  }
1630
- function Yt(e, n) {
1630
+ function Gt(e, n) {
1631
1631
  return !ce(e) || re(e).position === "fixed" ? null : n ? n(e) : e.offsetParent;
1632
1632
  }
1633
- function Sn(e, n) {
1634
- const t = Z(e);
1633
+ function Tn(e, n) {
1634
+ const t = ee(e);
1635
1635
  if (lt(e))
1636
1636
  return t;
1637
1637
  if (!ce(e)) {
@@ -1643,13 +1643,13 @@ function Sn(e, n) {
1643
1643
  }
1644
1644
  return t;
1645
1645
  }
1646
- let o = Yt(e, n);
1646
+ let o = Gt(e, n);
1647
1647
  for (; o && Ko(o) && pt(o); )
1648
- o = Yt(o, n);
1649
- return o && Pe(o) && pt(o) && !Ct(o) ? t : o || qo(e) || t;
1648
+ o = Gt(o, n);
1649
+ return o && Pe(o) && pt(o) && !It(o) ? t : o || qo(e) || t;
1650
1650
  }
1651
1651
  const yi = async function(e) {
1652
- const n = this.getOffsetParent || Sn, t = this.getDimensions, o = await t(e.floating);
1652
+ const n = this.getOffsetParent || Tn, t = this.getDimensions, o = await t(e.floating);
1653
1653
  return {
1654
1654
  reference: wi(e.reference, await n(e.floating), e.strategy),
1655
1655
  floating: {
@@ -1667,7 +1667,7 @@ const Ri = {
1667
1667
  convertOffsetParentRelativeRectToViewportRelativeRect: di,
1668
1668
  getDocumentElement: fe,
1669
1669
  getClippingRect: bi,
1670
- getOffsetParent: Sn,
1670
+ getOffsetParent: Tn,
1671
1671
  getElementRects: yi,
1672
1672
  getClientRects: pi,
1673
1673
  getDimensions: xi,
@@ -1694,19 +1694,19 @@ function Si(e, n) {
1694
1694
  return;
1695
1695
  const c = Qe(u), m = Qe(i.clientWidth - (f + d)), p = Qe(i.clientHeight - (u + g)), h = Qe(f), w = {
1696
1696
  rootMargin: -c + "px " + -m + "px " + -p + "px " + -h + "px",
1697
- threshold: Q(0, pe(1, a)) || 1
1697
+ threshold: Z(0, pe(1, a)) || 1
1698
1698
  };
1699
- let v = !0;
1700
- function x(E) {
1701
- const S = E[0].intersectionRatio;
1699
+ let b = !0;
1700
+ function x(y) {
1701
+ const S = y[0].intersectionRatio;
1702
1702
  if (S !== a) {
1703
- if (!v)
1703
+ if (!b)
1704
1704
  return l();
1705
1705
  S ? l(!1, S) : o = setTimeout(() => {
1706
1706
  l(!1, 1e-7);
1707
1707
  }, 1e3);
1708
1708
  }
1709
- v = !1;
1709
+ b = !1;
1710
1710
  }
1711
1711
  try {
1712
1712
  t = new IntersectionObserver(x, {
@@ -1729,32 +1729,32 @@ function Oi(e, n, t, o) {
1729
1729
  elementResize: l = typeof ResizeObserver == "function",
1730
1730
  layoutShift: s = typeof IntersectionObserver == "function",
1731
1731
  animationFrame: a = !1
1732
- } = o, f = It(e), u = i || r ? [...f ? We(f) : [], ...We(n)] : [];
1733
- u.forEach((b) => {
1734
- i && b.addEventListener("scroll", t, {
1732
+ } = o, f = Pt(e), u = i || r ? [...f ? We(f) : [], ...We(n)] : [];
1733
+ u.forEach((v) => {
1734
+ i && v.addEventListener("scroll", t, {
1735
1735
  passive: !0
1736
- }), r && b.addEventListener("resize", t);
1736
+ }), r && v.addEventListener("resize", t);
1737
1737
  });
1738
1738
  const d = f && s ? Si(f, t) : null;
1739
1739
  let g = -1, c = null;
1740
- l && (c = new ResizeObserver((b) => {
1741
- let [w] = b;
1740
+ l && (c = new ResizeObserver((v) => {
1741
+ let [w] = v;
1742
1742
  w && w.target === f && c && (c.unobserve(n), cancelAnimationFrame(g), g = requestAnimationFrame(() => {
1743
- var v;
1744
- (v = c) == null || v.observe(n);
1743
+ var b;
1744
+ (b = c) == null || b.observe(n);
1745
1745
  })), t();
1746
1746
  }), f && !a && c.observe(f), c.observe(n));
1747
1747
  let m, p = a ? Se(e) : null;
1748
1748
  a && h();
1749
1749
  function h() {
1750
- const b = Se(e);
1751
- p && (b.x !== p.x || b.y !== p.y || b.width !== p.width || b.height !== p.height) && t(), p = b, m = requestAnimationFrame(h);
1750
+ const v = Se(e);
1751
+ p && (v.x !== p.x || v.y !== p.y || v.width !== p.width || v.height !== p.height) && t(), p = v, m = requestAnimationFrame(h);
1752
1752
  }
1753
1753
  return t(), () => {
1754
- var b;
1754
+ var v;
1755
1755
  u.forEach((w) => {
1756
1756
  i && w.removeEventListener("scroll", t), r && w.removeEventListener("resize", t);
1757
- }), d == null || d(), (b = c) == null || b.disconnect(), c = null, a && cancelAnimationFrame(m);
1757
+ }), d == null || d(), (v = c) == null || v.disconnect(), c = null, a && cancelAnimationFrame(m);
1758
1758
  };
1759
1759
  }
1760
1760
  const mt = ct, Ci = li, Ti = ai, Ii = ri, Mi = ci, Pi = (e, n, t) => {
@@ -1770,7 +1770,7 @@ const mt = ct, Ci = li, Ti = ai, Ii = ri, Mi = ci, Pi = (e, n, t) => {
1770
1770
  platform: r
1771
1771
  });
1772
1772
  };
1773
- var Ze = typeof document < "u" ? rn : ne;
1773
+ var Ze = typeof document < "u" ? an : oe;
1774
1774
  function it(e, n) {
1775
1775
  if (e === n)
1776
1776
  return !0;
@@ -1801,15 +1801,15 @@ function it(e, n) {
1801
1801
  }
1802
1802
  return e !== e && n !== n;
1803
1803
  }
1804
- function On(e) {
1804
+ function In(e) {
1805
1805
  return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
1806
1806
  }
1807
- function Kt(e, n) {
1808
- const t = On(e);
1807
+ function Jt(e, n) {
1808
+ const t = In(e);
1809
1809
  return Math.round(n * t) / t;
1810
1810
  }
1811
- function qt(e) {
1812
- const n = y.useRef(e);
1811
+ function Xt(e) {
1812
+ const n = E.useRef(e);
1813
1813
  return Ze(() => {
1814
1814
  n.current = e;
1815
1815
  }), n;
@@ -1828,20 +1828,20 @@ function Ai(e) {
1828
1828
  transform: s = !0,
1829
1829
  whileElementsMounted: a,
1830
1830
  open: f
1831
- } = e, [u, d] = y.useState({
1831
+ } = e, [u, d] = E.useState({
1832
1832
  x: 0,
1833
1833
  y: 0,
1834
1834
  strategy: t,
1835
1835
  placement: n,
1836
1836
  middlewareData: {},
1837
1837
  isPositioned: !1
1838
- }), [g, c] = y.useState(o);
1838
+ }), [g, c] = E.useState(o);
1839
1839
  it(g, o) || c(o);
1840
- const [m, p] = y.useState(null), [h, b] = y.useState(null), w = y.useCallback((R) => {
1840
+ const [m, p] = E.useState(null), [h, v] = E.useState(null), w = E.useCallback((R) => {
1841
1841
  R !== S.current && (S.current = R, p(R));
1842
- }, []), v = y.useCallback((R) => {
1843
- R !== O.current && (O.current = R, b(R));
1844
- }, []), x = r || m, E = l || h, S = y.useRef(null), O = y.useRef(null), $ = y.useRef(u), M = a != null, P = qt(a), D = qt(i), H = y.useCallback(() => {
1842
+ }, []), b = E.useCallback((R) => {
1843
+ R !== O.current && (O.current = R, v(R));
1844
+ }, []), x = r || m, y = l || h, S = E.useRef(null), O = E.useRef(null), D = E.useRef(u), N = a != null, M = Xt(a), T = Xt(i), $ = E.useCallback(() => {
1845
1845
  if (!S.current || !O.current)
1846
1846
  return;
1847
1847
  const R = {
@@ -1849,41 +1849,41 @@ function Ai(e) {
1849
1849
  strategy: t,
1850
1850
  middleware: g
1851
1851
  };
1852
- D.current && (R.platform = D.current), Pi(S.current, O.current, R).then((k) => {
1853
- const T = {
1852
+ T.current && (R.platform = T.current), Pi(S.current, O.current, R).then((k) => {
1853
+ const I = {
1854
1854
  ...k,
1855
1855
  isPositioned: !0
1856
1856
  };
1857
- N.current && !it($.current, T) && ($.current = T, Ve.flushSync(() => {
1858
- d(T);
1857
+ z.current && !it(D.current, I) && (D.current = I, Ve.flushSync(() => {
1858
+ d(I);
1859
1859
  }));
1860
1860
  });
1861
- }, [g, n, t, D]);
1861
+ }, [g, n, t, T]);
1862
1862
  Ze(() => {
1863
- f === !1 && $.current.isPositioned && ($.current.isPositioned = !1, d((R) => ({
1863
+ f === !1 && D.current.isPositioned && (D.current.isPositioned = !1, d((R) => ({
1864
1864
  ...R,
1865
1865
  isPositioned: !1
1866
1866
  })));
1867
1867
  }, [f]);
1868
- const N = y.useRef(!1);
1869
- Ze(() => (N.current = !0, () => {
1870
- N.current = !1;
1868
+ const z = E.useRef(!1);
1869
+ Ze(() => (z.current = !0, () => {
1870
+ z.current = !1;
1871
1871
  }), []), Ze(() => {
1872
- if (x && (S.current = x), E && (O.current = E), x && E) {
1873
- if (P.current)
1874
- return P.current(x, E, H);
1875
- H();
1872
+ if (x && (S.current = x), y && (O.current = y), x && y) {
1873
+ if (M.current)
1874
+ return M.current(x, y, $);
1875
+ $();
1876
1876
  }
1877
- }, [x, E, H, P, M]);
1878
- const I = y.useMemo(() => ({
1877
+ }, [x, y, $, M, N]);
1878
+ const P = E.useMemo(() => ({
1879
1879
  reference: S,
1880
1880
  floating: O,
1881
1881
  setReference: w,
1882
- setFloating: v
1883
- }), [w, v]), L = y.useMemo(() => ({
1882
+ setFloating: b
1883
+ }), [w, b]), L = E.useMemo(() => ({
1884
1884
  reference: x,
1885
- floating: E
1886
- }), [x, E]), V = y.useMemo(() => {
1885
+ floating: y
1886
+ }), [x, y]), V = E.useMemo(() => {
1887
1887
  const R = {
1888
1888
  position: t,
1889
1889
  left: 0,
@@ -1891,28 +1891,28 @@ function Ai(e) {
1891
1891
  };
1892
1892
  if (!L.floating)
1893
1893
  return R;
1894
- const k = Kt(L.floating, u.x), T = Kt(L.floating, u.y);
1894
+ const k = Jt(L.floating, u.x), I = Jt(L.floating, u.y);
1895
1895
  return s ? {
1896
1896
  ...R,
1897
- transform: "translate(" + k + "px, " + T + "px)",
1898
- ...On(L.floating) >= 1.5 && {
1897
+ transform: "translate(" + k + "px, " + I + "px)",
1898
+ ...In(L.floating) >= 1.5 && {
1899
1899
  willChange: "transform"
1900
1900
  }
1901
1901
  } : {
1902
1902
  position: t,
1903
1903
  left: k,
1904
- top: T
1904
+ top: I
1905
1905
  };
1906
1906
  }, [t, s, L.floating, u.x, u.y]);
1907
- return y.useMemo(() => ({
1907
+ return E.useMemo(() => ({
1908
1908
  ...u,
1909
- update: H,
1910
- refs: I,
1909
+ update: $,
1910
+ refs: P,
1911
1911
  elements: L,
1912
1912
  floatingStyles: V
1913
- }), [u, H, I, L, V]);
1913
+ }), [u, $, P, L, V]);
1914
1914
  }
1915
- const Cn = (e, n) => ({
1915
+ const Mn = (e, n) => ({
1916
1916
  ...Ci(e),
1917
1917
  options: [e, n]
1918
1918
  }), _i = (e, n) => ({
@@ -1924,38 +1924,38 @@ const Cn = (e, n) => ({
1924
1924
  }), $i = (e, n) => ({
1925
1925
  ...Mi(e),
1926
1926
  options: [e, n]
1927
- }), Tn = {
1928
- ...y
1929
- }, Li = Tn.useInsertionEffect, Fi = Li || ((e) => e());
1930
- function In(e) {
1931
- const n = y.useRef(() => {
1927
+ }), Pn = {
1928
+ ...E
1929
+ }, Li = Pn.useInsertionEffect, Fi = Li || ((e) => e());
1930
+ function An(e) {
1931
+ const n = E.useRef(() => {
1932
1932
  if (process.env.NODE_ENV !== "production")
1933
1933
  throw new Error("Cannot call an event handler while rendering.");
1934
1934
  });
1935
1935
  return Fi(() => {
1936
1936
  n.current = e;
1937
- }), y.useCallback(function() {
1937
+ }), E.useCallback(function() {
1938
1938
  for (var t = arguments.length, o = new Array(t), i = 0; i < t; i++)
1939
1939
  o[i] = arguments[i];
1940
1940
  return n.current == null ? void 0 : n.current(...o);
1941
1941
  }, []);
1942
1942
  }
1943
- var wt = typeof document < "u" ? rn : ne;
1944
- let Gt = !1, Ni = 0;
1945
- const Jt = () => (
1943
+ var wt = typeof document < "u" ? an : oe;
1944
+ let Qt = !1, Ni = 0;
1945
+ const Zt = () => (
1946
1946
  // Ensure the id is unique with multiple independent versions of Floating UI
1947
1947
  // on <React 18
1948
1948
  "floating-ui-" + Math.random().toString(36).slice(2, 6) + Ni++
1949
1949
  );
1950
- function ki() {
1951
- const [e, n] = y.useState(() => Gt ? Jt() : void 0);
1950
+ function zi() {
1951
+ const [e, n] = E.useState(() => Qt ? Zt() : void 0);
1952
1952
  return wt(() => {
1953
- e == null && n(Jt());
1954
- }, []), y.useEffect(() => {
1955
- Gt = !0;
1953
+ e == null && n(Zt());
1954
+ }, []), E.useEffect(() => {
1955
+ Qt = !0;
1956
1956
  }, []), e;
1957
1957
  }
1958
- const zi = Tn.useId, Hi = zi || ki;
1958
+ const ki = Pn.useId, Hi = ki || zi;
1959
1959
  let Be;
1960
1960
  process.env.NODE_ENV !== "production" && (Be = /* @__PURE__ */ new Set());
1961
1961
  function Vi() {
@@ -1992,35 +1992,35 @@ function Bi() {
1992
1992
  }
1993
1993
  };
1994
1994
  }
1995
- const ji = /* @__PURE__ */ y.createContext(null), Ui = /* @__PURE__ */ y.createContext(null), Yi = () => {
1995
+ const ji = /* @__PURE__ */ E.createContext(null), Ui = /* @__PURE__ */ E.createContext(null), Yi = () => {
1996
1996
  var e;
1997
- return ((e = y.useContext(ji)) == null ? void 0 : e.id) || null;
1998
- }, Ki = () => y.useContext(Ui);
1997
+ return ((e = E.useContext(ji)) == null ? void 0 : e.id) || null;
1998
+ }, Ki = () => E.useContext(Ui);
1999
1999
  function qi(e) {
2000
2000
  const {
2001
2001
  open: n = !1,
2002
2002
  onOpenChange: t,
2003
2003
  elements: o
2004
- } = e, i = Hi(), r = y.useRef({}), [l] = y.useState(() => Bi()), s = Yi() != null;
2004
+ } = e, i = Hi(), r = E.useRef({}), [l] = E.useState(() => Bi()), s = Yi() != null;
2005
2005
  if (process.env.NODE_ENV !== "production") {
2006
2006
  const c = o.reference;
2007
2007
  c && !G(c) && Wi("Cannot pass a virtual element to the `elements.reference` option,", "as it must be a real DOM element. Use `refs.setPositionReference()`", "instead.");
2008
2008
  }
2009
- const [a, f] = y.useState(o.reference), u = In((c, m, p) => {
2009
+ const [a, f] = E.useState(o.reference), u = An((c, m, p) => {
2010
2010
  r.current.openEvent = c ? m : void 0, l.emit("openchange", {
2011
2011
  open: c,
2012
2012
  event: m,
2013
2013
  reason: p,
2014
2014
  nested: s
2015
2015
  }), t == null || t(c, m, p);
2016
- }), d = y.useMemo(() => ({
2016
+ }), d = E.useMemo(() => ({
2017
2017
  setPositionReference: f
2018
- }), []), g = y.useMemo(() => ({
2018
+ }), []), g = E.useMemo(() => ({
2019
2019
  reference: a || o.reference || null,
2020
2020
  floating: o.floating || null,
2021
2021
  domReference: o.reference
2022
2022
  }), [a, o.reference, o.floating]);
2023
- return y.useMemo(() => ({
2023
+ return E.useMemo(() => ({
2024
2024
  dataRef: r,
2025
2025
  open: n,
2026
2026
  onOpenChange: u,
@@ -2041,7 +2041,7 @@ function Gi(e) {
2041
2041
  floating: null,
2042
2042
  ...e.elements
2043
2043
  }
2044
- }), o = e.rootContext || t, i = o.elements, [r, l] = y.useState(null), [s, a] = y.useState(null), u = (i == null ? void 0 : i.reference) || r, d = y.useRef(null), g = Ki();
2044
+ }), o = e.rootContext || t, i = o.elements, [r, l] = E.useState(null), [s, a] = E.useState(null), u = (i == null ? void 0 : i.reference) || r, d = E.useRef(null), g = Ki();
2045
2045
  wt(() => {
2046
2046
  u && (d.current = u);
2047
2047
  }, [u]);
@@ -2053,51 +2053,51 @@ function Gi(e) {
2053
2053
  reference: s
2054
2054
  }
2055
2055
  }
2056
- }), m = y.useCallback((v) => {
2057
- const x = G(v) ? {
2058
- getBoundingClientRect: () => v.getBoundingClientRect(),
2059
- contextElement: v
2060
- } : v;
2056
+ }), m = E.useCallback((b) => {
2057
+ const x = G(b) ? {
2058
+ getBoundingClientRect: () => b.getBoundingClientRect(),
2059
+ contextElement: b
2060
+ } : b;
2061
2061
  a(x), c.refs.setReference(x);
2062
- }, [c.refs]), p = y.useCallback((v) => {
2063
- (G(v) || v === null) && (d.current = v, l(v)), (G(c.refs.reference.current) || c.refs.reference.current === null || // Don't allow setting virtual elements using the old technique back to
2062
+ }, [c.refs]), p = E.useCallback((b) => {
2063
+ (G(b) || b === null) && (d.current = b, l(b)), (G(c.refs.reference.current) || c.refs.reference.current === null || // Don't allow setting virtual elements using the old technique back to
2064
2064
  // `null` to support `positionReference` + an unstable `reference`
2065
2065
  // callback ref.
2066
- v !== null && !G(v)) && c.refs.setReference(v);
2067
- }, [c.refs]), h = y.useMemo(() => ({
2066
+ b !== null && !G(b)) && c.refs.setReference(b);
2067
+ }, [c.refs]), h = E.useMemo(() => ({
2068
2068
  ...c.refs,
2069
2069
  setReference: p,
2070
2070
  setPositionReference: m,
2071
2071
  domReference: d
2072
- }), [c.refs, p, m]), b = y.useMemo(() => ({
2072
+ }), [c.refs, p, m]), v = E.useMemo(() => ({
2073
2073
  ...c.elements,
2074
2074
  domReference: u
2075
- }), [c.elements, u]), w = y.useMemo(() => ({
2075
+ }), [c.elements, u]), w = E.useMemo(() => ({
2076
2076
  ...c,
2077
2077
  ...o,
2078
2078
  refs: h,
2079
- elements: b,
2079
+ elements: v,
2080
2080
  nodeId: n
2081
- }), [c, h, b, n, o]);
2081
+ }), [c, h, v, n, o]);
2082
2082
  return wt(() => {
2083
2083
  o.dataRef.current.floatingContext = w;
2084
- const v = g == null ? void 0 : g.nodesRef.current.find((x) => x.id === n);
2085
- v && (v.context = w);
2086
- }), y.useMemo(() => ({
2084
+ const b = g == null ? void 0 : g.nodesRef.current.find((x) => x.id === n);
2085
+ b && (b.context = w);
2086
+ }), E.useMemo(() => ({
2087
2087
  ...c,
2088
2088
  context: w,
2089
2089
  refs: h,
2090
- elements: b
2091
- }), [c, h, b, w]);
2090
+ elements: v
2091
+ }), [c, h, v, w]);
2092
2092
  }
2093
- const Xt = "active", Qt = "selected";
2093
+ const en = "active", tn = "selected";
2094
2094
  function ht(e, n, t) {
2095
2095
  const o = /* @__PURE__ */ new Map(), i = t === "item";
2096
2096
  let r = e;
2097
2097
  if (i && e) {
2098
2098
  const {
2099
- [Xt]: l,
2100
- [Qt]: s,
2099
+ [en]: l,
2100
+ [tn]: s,
2101
2101
  ...a
2102
2102
  } = e;
2103
2103
  r = a;
@@ -2112,7 +2112,7 @@ function ht(e, n, t) {
2112
2112
  return typeof s == "function" ? e ? s(e) : null : s;
2113
2113
  }).concat(e).reduce((l, s) => (s && Object.entries(s).forEach((a) => {
2114
2114
  let [f, u] = a;
2115
- if (!(i && [Xt, Qt].includes(f)))
2115
+ if (!(i && [en, tn].includes(f)))
2116
2116
  if (f.indexOf("on") === 0) {
2117
2117
  if (o.has(f) || o.set(f, []), typeof u == "function") {
2118
2118
  var d;
@@ -2129,26 +2129,26 @@ function ht(e, n, t) {
2129
2129
  }
2130
2130
  function Ji(e) {
2131
2131
  e === void 0 && (e = []);
2132
- const n = e.map((s) => s == null ? void 0 : s.reference), t = e.map((s) => s == null ? void 0 : s.floating), o = e.map((s) => s == null ? void 0 : s.item), i = y.useCallback(
2132
+ const n = e.map((s) => s == null ? void 0 : s.reference), t = e.map((s) => s == null ? void 0 : s.floating), o = e.map((s) => s == null ? void 0 : s.item), i = E.useCallback(
2133
2133
  (s) => ht(s, e, "reference"),
2134
2134
  // eslint-disable-next-line react-hooks/exhaustive-deps
2135
2135
  n
2136
- ), r = y.useCallback(
2136
+ ), r = E.useCallback(
2137
2137
  (s) => ht(s, e, "floating"),
2138
2138
  // eslint-disable-next-line react-hooks/exhaustive-deps
2139
2139
  t
2140
- ), l = y.useCallback(
2140
+ ), l = E.useCallback(
2141
2141
  (s) => ht(s, e, "item"),
2142
2142
  // eslint-disable-next-line react-hooks/exhaustive-deps
2143
2143
  o
2144
2144
  );
2145
- return y.useMemo(() => ({
2145
+ return E.useMemo(() => ({
2146
2146
  getReferenceProps: i,
2147
2147
  getFloatingProps: r,
2148
2148
  getItemProps: l
2149
2149
  }), [i, r, l]);
2150
2150
  }
2151
- function Zt(e, n) {
2151
+ function nn(e, n) {
2152
2152
  return {
2153
2153
  ...e,
2154
2154
  rects: {
@@ -2184,16 +2184,16 @@ const Xi = (e) => ({
2184
2184
  return {};
2185
2185
  const m = {
2186
2186
  ...n,
2187
- ...await Cn(-c.offsetTop - g.clientTop - d.reference.height / 2 - c.offsetHeight / 2 - r).fn(n)
2188
- }, p = (f == null ? void 0 : f.current) || g, h = await mt(Zt(m, p.scrollHeight), u), b = await mt(m, {
2187
+ ...await Mn(-c.offsetTop - g.clientTop - d.reference.height / 2 - c.offsetHeight / 2 - r).fn(n)
2188
+ }, p = (f == null ? void 0 : f.current) || g, h = await mt(nn(m, p.scrollHeight), u), v = await mt(m, {
2189
2189
  ...u,
2190
2190
  elementContext: "reference"
2191
- }), w = Math.max(0, h.top), v = m.y + w, x = Math.max(0, p.scrollHeight - w - Math.max(0, h.bottom));
2192
- return p.style.maxHeight = x + "px", p.scrollTop = w, i && (p.offsetHeight < c.offsetHeight * Math.min(s, t.current.length - 1) - 1 || b.top >= -a || b.bottom >= -a ? Ve.flushSync(() => i(!0)) : Ve.flushSync(() => i(!1))), o && (o.current = await mt(Zt({
2191
+ }), w = Math.max(0, h.top), b = m.y + w, x = Math.max(0, p.scrollHeight - w - Math.max(0, h.bottom));
2192
+ return p.style.maxHeight = x + "px", p.scrollTop = w, i && (p.offsetHeight < c.offsetHeight * Math.min(s, t.current.length - 1) - 1 || v.top >= -a || v.bottom >= -a ? Ve.flushSync(() => i(!0)) : Ve.flushSync(() => i(!1))), o && (o.current = await mt(nn({
2193
2193
  ...m,
2194
- y: v
2194
+ y: b
2195
2195
  }, p.offsetHeight), u)), {
2196
- y: v
2196
+ y: b
2197
2197
  };
2198
2198
  }
2199
2199
  });
@@ -2206,15 +2206,15 @@ function Qi(e, n) {
2206
2206
  overflowRef: r,
2207
2207
  scrollRef: l,
2208
2208
  onChange: s
2209
- } = n, a = In(s), f = y.useRef(!1), u = y.useRef(null), d = y.useRef(null);
2210
- y.useEffect(() => {
2209
+ } = n, a = An(s), f = E.useRef(!1), u = E.useRef(null), d = E.useRef(null);
2210
+ E.useEffect(() => {
2211
2211
  if (!i) return;
2212
2212
  function c(p) {
2213
2213
  if (p.ctrlKey || !m || r.current == null)
2214
2214
  return;
2215
- const h = p.deltaY, b = r.current.top >= -0.5, w = r.current.bottom >= -0.5, v = m.scrollHeight - m.clientHeight, x = h < 0 ? -1 : 1, E = h < 0 ? "max" : "min";
2216
- m.scrollHeight <= m.clientHeight || (!b && h > 0 || !w && h < 0 ? (p.preventDefault(), Ve.flushSync(() => {
2217
- a((S) => S + Math[E](h, v * x));
2215
+ const h = p.deltaY, v = r.current.top >= -0.5, w = r.current.bottom >= -0.5, b = m.scrollHeight - m.clientHeight, x = h < 0 ? -1 : 1, y = h < 0 ? "max" : "min";
2216
+ m.scrollHeight <= m.clientHeight || (!v && h > 0 || !w && h < 0 ? (p.preventDefault(), Ve.flushSync(() => {
2217
+ a((S) => S + Math[y](h, b * x));
2218
2218
  })) : /firefox/i.test(Go()) && (m.scrollTop += h));
2219
2219
  }
2220
2220
  const m = (l == null ? void 0 : l.current) || o.floating;
@@ -2227,7 +2227,7 @@ function Qi(e, n) {
2227
2227
  u.current = null, d.current = null, m.removeEventListener("wheel", c);
2228
2228
  };
2229
2229
  }, [i, t, o.floating, r, l, a]);
2230
- const g = y.useMemo(() => ({
2230
+ const g = E.useMemo(() => ({
2231
2231
  onKeyDown() {
2232
2232
  f.current = !0;
2233
2233
  },
@@ -2250,7 +2250,7 @@ function Qi(e, n) {
2250
2250
  }
2251
2251
  }
2252
2252
  }), [o.floating, a, r, l]);
2253
- return y.useMemo(() => i ? {
2253
+ return E.useMemo(() => i ? {
2254
2254
  floating: g
2255
2255
  } : {}, [i, g]);
2256
2256
  }
@@ -2258,8 +2258,8 @@ let qe = ve({ styles: void 0, setReference: () => {
2258
2258
  }, setFloating: () => {
2259
2259
  }, getReferenceProps: () => ({}), getFloatingProps: () => ({}), slot: {} });
2260
2260
  qe.displayName = "FloatingContext";
2261
- let Mt = ve(null);
2262
- Mt.displayName = "PlacementContext";
2261
+ let At = ve(null);
2262
+ At.displayName = "PlacementContext";
2263
2263
  function Zi(e) {
2264
2264
  return q(() => e ? typeof e == "string" ? { to: e } : e : null, [e]);
2265
2265
  }
@@ -2272,14 +2272,14 @@ function tr() {
2272
2272
  }
2273
2273
  function nr(e = null) {
2274
2274
  e === !1 && (e = null), typeof e == "string" && (e = { to: e });
2275
- let n = ae(Mt), t = q(() => e, [JSON.stringify(e, typeof HTMLElement < "u" ? (i, r) => r instanceof HTMLElement ? r.outerHTML : r : void 0)]);
2275
+ let n = ae(At), t = q(() => e, [JSON.stringify(e, typeof HTMLElement < "u" ? (i, r) => r instanceof HTMLElement ? r.outerHTML : r : void 0)]);
2276
2276
  U(() => {
2277
2277
  n == null || n(t ?? null);
2278
2278
  }, [n, t]);
2279
2279
  let o = ae(qe);
2280
2280
  return q(() => [o.setFloating, e ? o.styles : {}], [o.setFloating, e, o.styles]);
2281
2281
  }
2282
- let en = 4;
2282
+ let on = 4;
2283
2283
  function or({ children: e, enabled: n = !0 }) {
2284
2284
  let [t, o] = ue(null), [i, r] = ue(0), l = Y(null), [s, a] = ue(null);
2285
2285
  ir(s);
@@ -2287,32 +2287,32 @@ function or({ children: e, enabled: n = !0 }) {
2287
2287
  U(() => {
2288
2288
  f && r(0);
2289
2289
  }, [f]);
2290
- let { refs: b, floatingStyles: w, context: v } = Gi({ open: f, placement: p === "selection" ? h === "center" ? "bottom" : `bottom-${h}` : h === "center" ? `${p}` : `${p}-${h}`, strategy: "absolute", transform: !1, middleware: [Cn({ mainAxis: p === "selection" ? 0 : d, crossAxis: g }), _i({ padding: c }), p !== "selection" && Di({ padding: c }), p === "selection" && m ? Xi({ ...m, padding: c, overflowRef: l, offset: i, minItemsVisible: en, referenceOverflowThreshold: c, onFallbackChange(D) {
2291
- var H, N;
2292
- if (!D) return;
2293
- let I = v.elements.floating;
2294
- if (!I) return;
2295
- let L = parseFloat(getComputedStyle(I).scrollPaddingBottom) || 0, V = Math.min(en, I.childElementCount), R = 0, k = 0;
2296
- for (let T of (N = (H = v.elements.floating) == null ? void 0 : H.childNodes) != null ? N : []) if (T instanceof HTMLElement) {
2297
- let ee = T.offsetTop, Ce = ee + T.clientHeight + L, C = I.scrollTop, J = C + I.clientHeight;
2298
- if (ee >= C && Ce <= J) V--;
2290
+ let { refs: v, floatingStyles: w, context: b } = Gi({ open: f, placement: p === "selection" ? h === "center" ? "bottom" : `bottom-${h}` : h === "center" ? `${p}` : `${p}-${h}`, strategy: "absolute", transform: !1, middleware: [Mn({ mainAxis: p === "selection" ? 0 : d, crossAxis: g }), _i({ padding: c }), p !== "selection" && Di({ padding: c }), p === "selection" && m ? Xi({ ...m, padding: c, overflowRef: l, offset: i, minItemsVisible: on, referenceOverflowThreshold: c, onFallbackChange(T) {
2291
+ var $, z;
2292
+ if (!T) return;
2293
+ let P = b.elements.floating;
2294
+ if (!P) return;
2295
+ let L = parseFloat(getComputedStyle(P).scrollPaddingBottom) || 0, V = Math.min(on, P.childElementCount), R = 0, k = 0;
2296
+ for (let I of (z = ($ = b.elements.floating) == null ? void 0 : $.childNodes) != null ? z : []) if (I instanceof HTMLElement) {
2297
+ let te = I.offsetTop, Ce = te + I.clientHeight + L, C = P.scrollTop, J = C + P.clientHeight;
2298
+ if (te >= C && Ce <= J) V--;
2299
2299
  else {
2300
- k = Math.max(0, Math.min(Ce, J) - Math.max(ee, C)), R = T.clientHeight;
2300
+ k = Math.max(0, Math.min(Ce, J) - Math.max(te, C)), R = I.clientHeight;
2301
2301
  break;
2302
2302
  }
2303
2303
  }
2304
- V >= 1 && r((T) => {
2305
- let ee = R * V - k + L;
2306
- return T >= ee ? T : ee;
2304
+ V >= 1 && r((I) => {
2305
+ let te = R * V - k + L;
2306
+ return I >= te ? I : te;
2307
2307
  });
2308
- } }) : null, $i({ padding: c, apply({ availableWidth: D, availableHeight: H, elements: N }) {
2309
- Object.assign(N.floating.style, { overflow: "auto", maxWidth: `${D}px`, maxHeight: `min(var(--anchor-max-height, 100vh), ${H}px)` });
2310
- } })].filter(Boolean), whileElementsMounted: Oi }), [x = p, E = h] = v.placement.split("-");
2308
+ } }) : null, $i({ padding: c, apply({ availableWidth: T, availableHeight: $, elements: z }) {
2309
+ Object.assign(z.floating.style, { overflow: "auto", maxWidth: `${T}px`, maxHeight: `min(var(--anchor-max-height, 100vh), ${$}px)` });
2310
+ } })].filter(Boolean), whileElementsMounted: Oi }), [x = p, y = h] = b.placement.split("-");
2311
2311
  p === "selection" && (x = "selection");
2312
- let S = q(() => ({ anchor: [x, E].filter(Boolean).join(" ") }), [x, E]), O = Qi(v, { overflowRef: l, onChange: r }), { getReferenceProps: $, getFloatingProps: M } = Ji([O]), P = A((D) => {
2313
- a(D), b.setFloating(D);
2312
+ let S = q(() => ({ anchor: [x, y].filter(Boolean).join(" ") }), [x, y]), O = Qi(b, { overflowRef: l, onChange: r }), { getReferenceProps: D, getFloatingProps: N } = Ji([O]), M = A((T) => {
2313
+ a(T), v.setFloating(T);
2314
2314
  });
2315
- return y.createElement(Mt.Provider, { value: o }, y.createElement(qe.Provider, { value: { setFloating: P, setReference: b.setReference, styles: w, getReferenceProps: $, getFloatingProps: M, slot: S } }, e));
2315
+ return E.createElement(At.Provider, { value: o }, E.createElement(qe.Provider, { value: { setFloating: M, setReference: v.setReference, styles: w, getReferenceProps: D, getFloatingProps: N, slot: S } }, e));
2316
2316
  }
2317
2317
  function ir(e) {
2318
2318
  U(() => {
@@ -2334,28 +2334,28 @@ function rr(e, n) {
2334
2334
  return { ...e, gap: r, offset: l, padding: s };
2335
2335
  }
2336
2336
  function gt(e, n, t = void 0) {
2337
- let o = sn(), i = A((a, f) => {
2337
+ let o = cn(), i = A((a, f) => {
2338
2338
  if (a == null) return [t, null];
2339
2339
  if (typeof a == "number") return [a, null];
2340
2340
  if (typeof a == "string") {
2341
2341
  if (!f) return [t, null];
2342
- let u = tn(a, f);
2342
+ let u = rn(a, f);
2343
2343
  return [u, (d) => {
2344
- let g = Mn(a);
2344
+ let g = _n(a);
2345
2345
  {
2346
2346
  let c = g.map((m) => window.getComputedStyle(f).getPropertyValue(m));
2347
2347
  o.requestAnimationFrame(function m() {
2348
2348
  o.nextFrame(m);
2349
2349
  let p = !1;
2350
- for (let [b, w] of g.entries()) {
2351
- let v = window.getComputedStyle(f).getPropertyValue(w);
2352
- if (c[b] !== v) {
2353
- c[b] = v, p = !0;
2350
+ for (let [v, w] of g.entries()) {
2351
+ let b = window.getComputedStyle(f).getPropertyValue(w);
2352
+ if (c[v] !== b) {
2353
+ c[v] = b, p = !0;
2354
2354
  break;
2355
2355
  }
2356
2356
  }
2357
2357
  if (!p) return;
2358
- let h = tn(a, f);
2358
+ let h = rn(a, f);
2359
2359
  u !== h && (d(h), u = h);
2360
2360
  });
2361
2361
  }
@@ -2369,17 +2369,17 @@ function gt(e, n, t = void 0) {
2369
2369
  if (s(a), !!f) return f(s);
2370
2370
  }, [e, n]), l;
2371
2371
  }
2372
- function Mn(e) {
2372
+ function _n(e) {
2373
2373
  let n = /var\((.*)\)/.exec(e);
2374
2374
  if (n) {
2375
2375
  let t = n[1].indexOf(",");
2376
2376
  if (t === -1) return [n[1]];
2377
2377
  let o = n[1].slice(0, t).trim(), i = n[1].slice(t + 1).trim();
2378
- return i ? [o, ...Mn(i)] : [o];
2378
+ return i ? [o, ..._n(i)] : [o];
2379
2379
  }
2380
2380
  return [];
2381
2381
  }
2382
- function tn(e, n) {
2382
+ function rn(e, n) {
2383
2383
  let t = document.createElement("div");
2384
2384
  n.appendChild(t), t.style.setProperty("margin-top", "0px", "important"), t.style.setProperty("margin-top", e, "important");
2385
2385
  let o = parseFloat(window.getComputedStyle(t).marginTop) || 0;
@@ -2412,7 +2412,7 @@ function ar(e) {
2412
2412
  throw new Error("Unexpected object: " + e);
2413
2413
  }
2414
2414
  var B = ((e) => (e[e.First = 0] = "First", e[e.Previous = 1] = "Previous", e[e.Next = 2] = "Next", e[e.Last = 3] = "Last", e[e.Specific = 4] = "Specific", e[e.Nothing = 5] = "Nothing", e))(B || {});
2415
- function nn(e, n) {
2415
+ function sn(e, n) {
2416
2416
  let t = n.resolveItems();
2417
2417
  if (t.length <= 0) return null;
2418
2418
  let o = n.resolveActiveIndex(), i = o ?? -1;
@@ -2444,10 +2444,10 @@ function nn(e, n) {
2444
2444
  ar(e);
2445
2445
  }
2446
2446
  }
2447
- var Pt = ((e) => (e[e.Left = 0] = "Left", e[e.Right = 2] = "Right", e))(Pt || {});
2447
+ var _t = ((e) => (e[e.Left = 0] = "Left", e[e.Right = 2] = "Right", e))(_t || {});
2448
2448
  function cr(e) {
2449
2449
  let n = A(e), t = Y(!1);
2450
- ne(() => (t.current = !1, () => {
2450
+ oe(() => (t.current = !1, () => {
2451
2451
  t.current = !0, Yn(() => {
2452
2452
  t.current && n();
2453
2453
  });
@@ -2455,42 +2455,42 @@ function cr(e) {
2455
2455
  }
2456
2456
  function ur() {
2457
2457
  let e = typeof document > "u";
2458
- return "useSyncExternalStore" in y ? ((n) => n.useSyncExternalStore)(y)(() => () => {
2458
+ return "useSyncExternalStore" in E ? ((n) => n.useSyncExternalStore)(E)(() => () => {
2459
2459
  }, () => !1, () => !e) : !1;
2460
2460
  }
2461
2461
  function fr() {
2462
- let e = ur(), [n, t] = y.useState(ke.isHandoffComplete);
2463
- return n && ke.isHandoffComplete === !1 && t(!1), y.useEffect(() => {
2462
+ let e = ur(), [n, t] = E.useState(ze.isHandoffComplete);
2463
+ return n && ze.isHandoffComplete === !1 && t(!1), E.useEffect(() => {
2464
2464
  n !== !0 && t(!0);
2465
- }, [n]), y.useEffect(() => ke.handoff(), []), e ? !1 : n;
2465
+ }, [n]), E.useEffect(() => ze.handoff(), []), e ? !1 : n;
2466
2466
  }
2467
2467
  let dr = ve(!1);
2468
2468
  function pr() {
2469
2469
  return ae(dr);
2470
2470
  }
2471
2471
  function mr(e) {
2472
- let n = pr(), t = ae(An), o = st(e), [i, r] = ue(() => {
2472
+ let n = pr(), t = ae($n), o = st(e), [i, r] = ue(() => {
2473
2473
  var l;
2474
2474
  if (!n && t !== null) return (l = t.current) != null ? l : null;
2475
- if (ke.isServer) return null;
2475
+ if (ze.isServer) return null;
2476
2476
  let s = o == null ? void 0 : o.getElementById("headlessui-portal-root");
2477
2477
  if (s) return s;
2478
2478
  if (o === null) return null;
2479
2479
  let a = o.createElement("div");
2480
2480
  return a.setAttribute("id", "headlessui-portal-root"), o.body.appendChild(a);
2481
2481
  });
2482
- return ne(() => {
2482
+ return oe(() => {
2483
2483
  i !== null && (o != null && o.body.contains(i) || o == null || o.body.appendChild(i));
2484
- }, [i, o]), ne(() => {
2484
+ }, [i, o]), oe(() => {
2485
2485
  n || t !== null && r(t.current);
2486
2486
  }, [t, r, n]), i;
2487
2487
  }
2488
- let Pn = rt, hr = be(function(e, n) {
2488
+ let Dn = rt, hr = be(function(e, n) {
2489
2489
  let t = e, o = Y(null), i = Oe(Kn((u) => {
2490
2490
  o.current = u;
2491
2491
  }), n), r = st(o), l = mr(o), [s] = ue(() => {
2492
2492
  var u;
2493
- return ke.isServer ? null : (u = r == null ? void 0 : r.createElement("div")) != null ? u : null;
2493
+ return ze.isServer ? null : (u = r == null ? void 0 : r.createElement("div")) != null ? u : null;
2494
2494
  }), a = ae(xr), f = fr();
2495
2495
  return U(() => {
2496
2496
  !l || !s || l.contains(s) || (s.setAttribute("data-headlessui-portal", ""), l.appendChild(s));
@@ -2499,16 +2499,16 @@ let Pn = rt, hr = be(function(e, n) {
2499
2499
  }, [a, s]), cr(() => {
2500
2500
  var u;
2501
2501
  !l || !s || (s instanceof Node && l.contains(s) && l.removeChild(s), l.childNodes.length <= 0 && ((u = l.parentElement) == null || u.removeChild(l)));
2502
- }), f ? !l || !s ? null : qn(xe({ ourProps: { ref: i }, theirProps: t, slot: {}, defaultTag: Pn, name: "Portal" }), s) : null;
2502
+ }), f ? !l || !s ? null : qn(xe({ ourProps: { ref: i }, theirProps: t, slot: {}, defaultTag: Dn, name: "Portal" }), s) : null;
2503
2503
  });
2504
2504
  function gr(e, n) {
2505
2505
  let t = Oe(n), { enabled: o = !0, ...i } = e;
2506
- return o ? j.createElement(hr, { ...i, ref: t }) : xe({ ourProps: { ref: t }, theirProps: i, slot: {}, defaultTag: Pn, name: "Portal" });
2506
+ return o ? j.createElement(hr, { ...i, ref: t }) : xe({ ourProps: { ref: t }, theirProps: i, slot: {}, defaultTag: Dn, name: "Portal" });
2507
2507
  }
2508
- let vr = rt, An = ve(null);
2508
+ let vr = rt, $n = ve(null);
2509
2509
  function br(e, n) {
2510
2510
  let { target: t, ...o } = e, i = { ref: Oe(n) };
2511
- return j.createElement(An.Provider, { value: t }, xe({ ourProps: i, theirProps: o, defaultTag: vr, name: "Popover.Group" }));
2511
+ return j.createElement($n.Provider, { value: t }, xe({ ourProps: i, theirProps: o, defaultTag: vr, name: "Popover.Group" }));
2512
2512
  }
2513
2513
  let xr = ve(null), wr = be(gr), yr = be(br), Er = Object.assign(wr, { Group: yr });
2514
2514
  var Rr = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(Rr || {}), Sr = ((e) => (e[e.Single = 0] = "Single", e[e.Multi = 1] = "Multi", e))(Sr || {}), Or = ((e) => (e[e.Pointer = 0] = "Pointer", e[e.Focus = 1] = "Focus", e[e.Other = 2] = "Other", e))(Or || {}), Cr = ((e) => (e[e.OpenCombobox = 0] = "OpenCombobox", e[e.CloseCombobox = 1] = "CloseCombobox", e[e.GoToOption = 2] = "GoToOption", e[e.SetTyping = 3] = "SetTyping", e[e.RegisterOption = 4] = "RegisterOption", e[e.UnregisterOption = 5] = "UnregisterOption", e[e.SetActivationTrigger = 6] = "SetActivationTrigger", e[e.UpdateVirtualConfiguration = 7] = "UpdateVirtualConfiguration", e))(Cr || {});
@@ -2533,7 +2533,7 @@ let Tr = { 1(e) {
2533
2533
  var t, o, i, r, l;
2534
2534
  if ((t = e.dataRef.current) != null && t.disabled || (o = e.dataRef.current) != null && o.optionsRef.current && !((i = e.dataRef.current) != null && i.optionsPropsRef.current.static) && e.comboboxState === 1) return e;
2535
2535
  if (e.virtual) {
2536
- let { options: u, disabled: d } = e.virtual, g = n.focus === B.Specific ? n.idx : nn(n, { resolveItems: () => u, resolveActiveIndex: () => {
2536
+ let { options: u, disabled: d } = e.virtual, g = n.focus === B.Specific ? n.idx : sn(n, { resolveItems: () => u, resolveActiveIndex: () => {
2537
2537
  var m, p;
2538
2538
  return (p = (m = e.activeOptionIndex) != null ? m : u.findIndex((h) => !d(h))) != null ? p : null;
2539
2539
  }, resolveDisabled: d, resolveId() {
@@ -2546,7 +2546,7 @@ let Tr = { 1(e) {
2546
2546
  let u = s.options.findIndex((d) => !d.dataRef.current.disabled);
2547
2547
  u !== -1 && (s.activeOptionIndex = u);
2548
2548
  }
2549
- let a = n.focus === B.Specific ? n.idx : nn(n, { resolveItems: () => s.options, resolveActiveIndex: () => s.activeOptionIndex, resolveId: (u) => u.id, resolveDisabled: (u) => u.dataRef.current.disabled }), f = (l = n.trigger) != null ? l : 2;
2549
+ let a = n.focus === B.Specific ? n.idx : sn(n, { resolveItems: () => s.options, resolveActiveIndex: () => s.activeOptionIndex, resolveId: (u) => u.id, resolveDisabled: (u) => u.dataRef.current.disabled }), f = (l = n.trigger) != null ? l : 2;
2550
2550
  return e.activeOptionIndex === a && e.activationTrigger === f ? e : { ...e, ...s, isTyping: !1, activeOptionIndex: a, activationTrigger: f, __demoMode: !1 };
2551
2551
  }, 4: (e, n) => {
2552
2552
  var t, o, i;
@@ -2573,17 +2573,17 @@ let Tr = { 1(e) {
2573
2573
  r !== -1 ? i = r : i = null;
2574
2574
  }
2575
2575
  return { ...e, activeOptionIndex: i, virtual: { options: n.options, disabled: (o = n.disabled) != null ? o : () => !1 } };
2576
- } }, At = ve(null);
2577
- At.displayName = "ComboboxActionsContext";
2576
+ } }, Dt = ve(null);
2577
+ Dt.displayName = "ComboboxActionsContext";
2578
2578
  function Ge(e) {
2579
- let n = ae(At);
2579
+ let n = ae(Dt);
2580
2580
  if (n === null) {
2581
2581
  let t = new Error(`<${e} /> is missing a parent <Combobox /> component.`);
2582
2582
  throw Error.captureStackTrace && Error.captureStackTrace(t, Ge), t;
2583
2583
  }
2584
2584
  return n;
2585
2585
  }
2586
- let _n = ve(null);
2586
+ let Ln = ve(null);
2587
2587
  function Ir(e) {
2588
2588
  let n = $e("VirtualProvider"), { options: t } = n.virtual, [o, i] = q(() => {
2589
2589
  let f = n.optionsRef.current;
@@ -2600,7 +2600,7 @@ function Ir(e) {
2600
2600
  s((f) => f + 1);
2601
2601
  }, [t]);
2602
2602
  let a = r.getVirtualItems();
2603
- return a.length === 0 ? null : j.createElement(_n.Provider, { value: r }, j.createElement("div", { style: { position: "relative", width: "100%", height: `${r.getTotalSize()}px` }, ref: (f) => {
2603
+ return a.length === 0 ? null : j.createElement(Ln.Provider, { value: r }, j.createElement("div", { style: { position: "relative", width: "100%", height: `${r.getTotalSize()}px` }, ref: (f) => {
2604
2604
  if (f) {
2605
2605
  if (typeof process < "u" && process.env.JEST_WORKER_ID !== void 0 || n.activationTrigger === 0) return;
2606
2606
  n.activeOptionIndex !== null && t.length > n.activeOptionIndex && r.scrollToIndex(n.activeOptionIndex);
@@ -2626,20 +2626,20 @@ function Mr(e, n) {
2626
2626
  let Pr = rt;
2627
2627
  function Ar(e, n) {
2628
2628
  var t, o;
2629
- let i = Qn(), { value: r, defaultValue: l, onChange: s, form: a, name: f, by: u, disabled: d = i || !1, onClose: g, __demoMode: c = !1, multiple: m = !1, immediate: p = !1, virtual: h = null, nullable: b, ...w } = e, v = Zn(l), [x = m ? [] : void 0, E] = eo(r, s, v), [S, O] = on(Mr, { dataRef: Wn(), comboboxState: c ? 0 : 1, isTyping: !1, options: [], virtual: h ? { options: h.options, disabled: (t = h.disabled) != null ? t : () => !1 } : null, activeOptionIndex: null, activationTrigger: 2, __demoMode: c }), $ = Y(!1), M = Y({ static: !1, hold: !1 }), P = Y(null), D = Y(null), H = Y(null), N = Jn(u), I = A((_) => h ? u === null ? h.options.indexOf(_) : h.options.findIndex((z) => N(z, _)) : S.options.findIndex((z) => N(z.dataRef.current.value, _))), L = He((_) => Te(R.mode, { 1: () => x.some((z) => N(z, _)), 0: () => N(x, _) }), [x]), V = A((_) => S.activeOptionIndex === I(_)), R = q(() => ({ ...S, immediate: p, optionsPropsRef: M, inputRef: P, buttonRef: D, optionsRef: H, value: x, defaultValue: v, disabled: d, mode: m ? 1 : 0, virtual: h ? S.virtual : null, get activeOptionIndex() {
2630
- if ($.current && S.activeOptionIndex === null && (h ? h.options.length > 0 : S.options.length > 0)) {
2629
+ let i = Qn(), { value: r, defaultValue: l, onChange: s, form: a, name: f, by: u, disabled: d = i || !1, onClose: g, __demoMode: c = !1, multiple: m = !1, immediate: p = !1, virtual: h = null, nullable: v, ...w } = e, b = Zn(l), [x = m ? [] : void 0, y] = eo(r, s, b), [S, O] = ln(Mr, { dataRef: Bn(), comboboxState: c ? 0 : 1, isTyping: !1, options: [], virtual: h ? { options: h.options, disabled: (t = h.disabled) != null ? t : () => !1 } : null, activeOptionIndex: null, activationTrigger: 2, __demoMode: c }), D = Y(!1), N = Y({ static: !1, hold: !1 }), M = Y(null), T = Y(null), $ = Y(null), z = Jn(u), P = A((_) => h ? u === null ? h.options.indexOf(_) : h.options.findIndex((H) => z(H, _)) : S.options.findIndex((H) => z(H.dataRef.current.value, _))), L = He((_) => Te(R.mode, { 1: () => x.some((H) => z(H, _)), 0: () => z(x, _) }), [x]), V = A((_) => S.activeOptionIndex === P(_)), R = q(() => ({ ...S, immediate: p, optionsPropsRef: N, inputRef: M, buttonRef: T, optionsRef: $, value: x, defaultValue: b, disabled: d, mode: m ? 1 : 0, virtual: h ? S.virtual : null, get activeOptionIndex() {
2630
+ if (D.current && S.activeOptionIndex === null && (h ? h.options.length > 0 : S.options.length > 0)) {
2631
2631
  if (h) {
2632
- let z = h.options.findIndex((le) => {
2633
- var Je, _t;
2634
- return !((_t = (Je = h.disabled) == null ? void 0 : Je.call(h, le)) != null && _t);
2632
+ let H = h.options.findIndex((le) => {
2633
+ var Je, $t;
2634
+ return !(($t = (Je = h.disabled) == null ? void 0 : Je.call(h, le)) != null && $t);
2635
2635
  });
2636
- if (z !== -1) return z;
2636
+ if (H !== -1) return H;
2637
2637
  }
2638
- let _ = S.options.findIndex((z) => !z.dataRef.current.disabled);
2638
+ let _ = S.options.findIndex((H) => !H.dataRef.current.disabled);
2639
2639
  if (_ !== -1) return _;
2640
2640
  }
2641
2641
  return S.activeOptionIndex;
2642
- }, calculateIndex: I, compare: N, isSelected: L, isActive: V }), [x, v, d, m, c, S, h]);
2642
+ }, calculateIndex: P, compare: z, isSelected: L, isActive: V }), [x, b, d, m, c, S, h]);
2643
2643
  U(() => {
2644
2644
  var _;
2645
2645
  h && O({ type: 7, options: h.options, disabled: (_ = h.disabled) != null ? _ : null });
@@ -2648,10 +2648,10 @@ function Ar(e, n) {
2648
2648
  }, [R]);
2649
2649
  let k = R.comboboxState === 0;
2650
2650
  No(k, [R.buttonRef, R.inputRef, R.optionsRef], () => se.closeCombobox());
2651
- let T = q(() => {
2652
- var _, z, le;
2653
- return { open: R.comboboxState === 0, disabled: d, activeIndex: R.activeOptionIndex, activeOption: R.activeOptionIndex === null ? null : R.virtual ? R.virtual.options[(_ = R.activeOptionIndex) != null ? _ : 0] : (le = (z = R.options[R.activeOptionIndex]) == null ? void 0 : z.dataRef.current.value) != null ? le : null, value: x };
2654
- }, [R, d, x]), ee = A(() => {
2651
+ let I = q(() => {
2652
+ var _, H, le;
2653
+ return { open: R.comboboxState === 0, disabled: d, activeIndex: R.activeOptionIndex, activeOption: R.activeOptionIndex === null ? null : R.virtual ? R.virtual.options[(_ = R.activeOptionIndex) != null ? _ : 0] : (le = (H = R.options[R.activeOptionIndex]) == null ? void 0 : H.dataRef.current.value) != null ? le : null, value: x };
2654
+ }, [R, d, x]), te = A(() => {
2655
2655
  if (R.activeOptionIndex !== null) {
2656
2656
  if (se.setIsTyping(!1), R.virtual) W(R.virtual.options[R.activeOptionIndex]);
2657
2657
  else {
@@ -2661,58 +2661,58 @@ function Ar(e, n) {
2661
2661
  se.goToOption(B.Specific, R.activeOptionIndex);
2662
2662
  }
2663
2663
  }), Ce = A(() => {
2664
- O({ type: 0 }), $.current = !0;
2664
+ O({ type: 0 }), D.current = !0;
2665
2665
  }), C = A(() => {
2666
- O({ type: 1 }), $.current = !1, g == null || g();
2666
+ O({ type: 1 }), D.current = !1, g == null || g();
2667
2667
  }), J = A((_) => {
2668
2668
  O({ type: 3, isTyping: _ });
2669
- }), K = A((_, z, le) => ($.current = !1, _ === B.Specific ? O({ type: 2, focus: B.Specific, idx: z, trigger: le }) : O({ type: 2, focus: _, trigger: le }))), oe = A((_, z) => (O({ type: 4, payload: { id: _, dataRef: z } }), () => {
2670
- R.isActive(z.current.value) && ($.current = !0), O({ type: 5, id: _ });
2669
+ }), K = A((_, H, le) => (D.current = !1, _ === B.Specific ? O({ type: 2, focus: B.Specific, idx: H, trigger: le }) : O({ type: 2, focus: _, trigger: le }))), ie = A((_, H) => (O({ type: 4, payload: { id: _, dataRef: H } }), () => {
2670
+ R.isActive(H.current.value) && (D.current = !0), O({ type: 5, id: _ });
2671
2671
  })), W = A((_) => Te(R.mode, { 0() {
2672
- return E == null ? void 0 : E(_);
2672
+ return y == null ? void 0 : y(_);
2673
2673
  }, 1() {
2674
- let z = R.value.slice(), le = z.findIndex((Je) => N(Je, _));
2675
- return le === -1 ? z.push(_) : z.splice(le, 1), E == null ? void 0 : E(z);
2676
- } })), te = A((_) => {
2674
+ let H = R.value.slice(), le = H.findIndex((Je) => z(Je, _));
2675
+ return le === -1 ? H.push(_) : H.splice(le, 1), y == null ? void 0 : y(H);
2676
+ } })), ne = A((_) => {
2677
2677
  O({ type: 6, trigger: _ });
2678
- }), se = q(() => ({ onChange: W, registerOption: oe, goToOption: K, setIsTyping: J, closeCombobox: C, openCombobox: Ce, setActivationTrigger: te, selectActiveOption: ee }), []), [Nn, kn] = to(), zn = n === null ? {} : { ref: n }, Hn = He(() => {
2679
- if (v !== void 0) return E == null ? void 0 : E(v);
2680
- }, [E, v]);
2681
- return j.createElement(kn, { value: Nn, props: { htmlFor: (o = R.inputRef.current) == null ? void 0 : o.id }, slot: { open: R.comboboxState === 0, disabled: d } }, j.createElement(or, null, j.createElement(At.Provider, { value: se }, j.createElement(je.Provider, { value: R }, j.createElement(uo, { value: Te(R.comboboxState, { 0: et.Open, 1: et.Closed }) }, f != null && j.createElement(no, { disabled: d, data: x != null ? { [f]: x } : {}, form: a, onReset: Hn }), xe({ ourProps: zn, theirProps: w, slot: T, defaultTag: Pr, name: "Combobox" }))))));
2678
+ }), se = q(() => ({ onChange: W, registerOption: ie, goToOption: K, setIsTyping: J, closeCombobox: C, openCombobox: Ce, setActivationTrigger: ne, selectActiveOption: te }), []), [zn, kn] = to(), Hn = n === null ? {} : { ref: n }, Vn = He(() => {
2679
+ if (b !== void 0) return y == null ? void 0 : y(b);
2680
+ }, [y, b]);
2681
+ return j.createElement(kn, { value: zn, props: { htmlFor: (o = R.inputRef.current) == null ? void 0 : o.id }, slot: { open: R.comboboxState === 0, disabled: d } }, j.createElement(or, null, j.createElement(Dt.Provider, { value: se }, j.createElement(je.Provider, { value: R }, j.createElement(uo, { value: Te(R.comboboxState, { 0: et.Open, 1: et.Closed }) }, f != null && j.createElement(no, { disabled: d, data: x != null ? { [f]: x } : {}, form: a, onReset: Vn }), xe({ ourProps: Hn, theirProps: w, slot: I, defaultTag: Pr, name: "Combobox" }))))));
2682
2682
  }
2683
2683
  let _r = "input";
2684
2684
  function Dr(e, n) {
2685
2685
  var t, o, i, r, l;
2686
- let s = $e("Combobox.Input"), a = Ge("Combobox.Input"), f = Ue(), u = oo(), { id: d = u || `headlessui-combobox-input-${f}`, onChange: g, displayValue: c, disabled: m = s.disabled || !1, autoFocus: p = !1, type: h = "text", ...b } = e, w = Oe(s.inputRef, n, er()), v = st(s.inputRef), x = sn(), E = A(() => {
2686
+ let s = $e("Combobox.Input"), a = Ge("Combobox.Input"), f = Ue(), u = oo(), { id: d = u || `headlessui-combobox-input-${f}`, onChange: g, displayValue: c, disabled: m = s.disabled || !1, autoFocus: p = !1, type: h = "text", ...v } = e, w = Oe(s.inputRef, n, er()), b = st(s.inputRef), x = cn(), y = A(() => {
2687
2687
  a.onChange(null), s.optionsRef.current && (s.optionsRef.current.scrollTop = 0), a.goToOption(B.Nothing);
2688
2688
  }), S = q(() => {
2689
2689
  var C;
2690
2690
  return typeof c == "function" && s.value !== void 0 ? (C = c(s.value)) != null ? C : "" : typeof s.value == "string" ? s.value : "";
2691
2691
  }, [s.value, c]);
2692
- Vt(([C, J], [K, oe]) => {
2692
+ jt(([C, J], [K, ie]) => {
2693
2693
  if (s.isTyping) return;
2694
2694
  let W = s.inputRef.current;
2695
- W && ((oe === 0 && J === 1 || C !== K) && (W.value = C), requestAnimationFrame(() => {
2696
- if (s.isTyping || !W || (v == null ? void 0 : v.activeElement) !== W) return;
2697
- let { selectionStart: te, selectionEnd: se } = W;
2698
- Math.abs((se ?? 0) - (te ?? 0)) === 0 && te === 0 && W.setSelectionRange(W.value.length, W.value.length);
2695
+ W && ((ie === 0 && J === 1 || C !== K) && (W.value = C), requestAnimationFrame(() => {
2696
+ if (s.isTyping || !W || (b == null ? void 0 : b.activeElement) !== W) return;
2697
+ let { selectionStart: ne, selectionEnd: se } = W;
2698
+ Math.abs((se ?? 0) - (ne ?? 0)) === 0 && ne === 0 && W.setSelectionRange(W.value.length, W.value.length);
2699
2699
  }));
2700
- }, [S, s.comboboxState, v, s.isTyping]), Vt(([C], [J]) => {
2700
+ }, [S, s.comboboxState, b, s.isTyping]), jt(([C], [J]) => {
2701
2701
  if (C === 0 && J === 1) {
2702
2702
  if (s.isTyping) return;
2703
2703
  let K = s.inputRef.current;
2704
2704
  if (!K) return;
2705
- let oe = K.value, { selectionStart: W, selectionEnd: te, selectionDirection: se } = K;
2706
- K.value = "", K.value = oe, se !== null ? K.setSelectionRange(W, te, se) : K.setSelectionRange(W, te);
2705
+ let ie = K.value, { selectionStart: W, selectionEnd: ne, selectionDirection: se } = K;
2706
+ K.value = "", K.value = ie, se !== null ? K.setSelectionRange(W, ne, se) : K.setSelectionRange(W, ne);
2707
2707
  }
2708
2708
  }, [s.comboboxState]);
2709
- let O = Y(!1), $ = A(() => {
2709
+ let O = Y(!1), D = A(() => {
2710
2710
  O.current = !0;
2711
- }), M = A(() => {
2711
+ }), N = A(() => {
2712
2712
  x.nextFrame(() => {
2713
2713
  O.current = !1;
2714
2714
  });
2715
- }), P = A((C) => {
2715
+ }), M = A((C) => {
2716
2716
  switch (a.setIsTyping(!0), C.key) {
2717
2717
  case X.Enter:
2718
2718
  if (s.comboboxState !== 0 || O.current) return;
@@ -2739,31 +2739,31 @@ function Dr(e, n) {
2739
2739
  case X.PageDown:
2740
2740
  return C.preventDefault(), C.stopPropagation(), a.goToOption(B.Last);
2741
2741
  case X.Escape:
2742
- return s.comboboxState !== 0 ? void 0 : (C.preventDefault(), s.optionsRef.current && !s.optionsPropsRef.current.static && C.stopPropagation(), s.mode === 0 && s.value === null && E(), a.closeCombobox());
2742
+ return s.comboboxState !== 0 ? void 0 : (C.preventDefault(), s.optionsRef.current && !s.optionsPropsRef.current.static && C.stopPropagation(), s.mode === 0 && s.value === null && y(), a.closeCombobox());
2743
2743
  case X.Tab:
2744
2744
  if (s.comboboxState !== 0) return;
2745
2745
  s.mode === 0 && s.activationTrigger !== 1 && a.selectActiveOption(), a.closeCombobox();
2746
2746
  break;
2747
2747
  }
2748
- }), D = A((C) => {
2749
- g == null || g(C), s.mode === 0 && C.target.value === "" && E(), a.openCombobox();
2750
- }), H = A((C) => {
2751
- var J, K, oe;
2752
- let W = (J = C.relatedTarget) != null ? J : we.find((te) => te !== C.currentTarget);
2753
- if (!((K = s.optionsRef.current) != null && K.contains(W)) && !((oe = s.buttonRef.current) != null && oe.contains(W)) && s.comboboxState === 0) return C.preventDefault(), s.mode === 0 && s.value === null && E(), a.closeCombobox();
2754
- }), N = A((C) => {
2755
- var J, K, oe;
2756
- let W = (J = C.relatedTarget) != null ? J : we.find((te) => te !== C.currentTarget);
2757
- (K = s.buttonRef.current) != null && K.contains(W) || (oe = s.optionsRef.current) != null && oe.contains(W) || s.disabled || s.immediate && s.comboboxState !== 0 && x.microTask(() => {
2748
+ }), T = A((C) => {
2749
+ g == null || g(C), s.mode === 0 && C.target.value === "" && y(), a.openCombobox();
2750
+ }), $ = A((C) => {
2751
+ var J, K, ie;
2752
+ let W = (J = C.relatedTarget) != null ? J : we.find((ne) => ne !== C.currentTarget);
2753
+ if (!((K = s.optionsRef.current) != null && K.contains(W)) && !((ie = s.buttonRef.current) != null && ie.contains(W)) && s.comboboxState === 0) return C.preventDefault(), s.mode === 0 && s.value === null && y(), a.closeCombobox();
2754
+ }), z = A((C) => {
2755
+ var J, K, ie;
2756
+ let W = (J = C.relatedTarget) != null ? J : we.find((ne) => ne !== C.currentTarget);
2757
+ (K = s.buttonRef.current) != null && K.contains(W) || (ie = s.optionsRef.current) != null && ie.contains(W) || s.disabled || s.immediate && s.comboboxState !== 0 && x.microTask(() => {
2758
2758
  ye(() => a.openCombobox()), a.setActivationTrigger(1);
2759
2759
  });
2760
- }), I = St(), L = io(), { isFocused: V, focusProps: R } = ln({ autoFocus: p }), { isHovered: k, hoverProps: T } = an({ isDisabled: m }), ee = q(() => ({ open: s.comboboxState === 0, disabled: m, hover: k, focus: V, autofocus: p }), [s, k, V, p, m]), Ce = Rt({ ref: w, id: d, role: "combobox", type: h, "aria-controls": (t = s.optionsRef.current) == null ? void 0 : t.id, "aria-expanded": s.comboboxState === 0, "aria-activedescendant": s.activeOptionIndex === null ? void 0 : s.virtual ? (o = s.options.find((C) => !C.dataRef.current.disabled && s.compare(C.dataRef.current.value, s.virtual.options[s.activeOptionIndex]))) == null ? void 0 : o.id : (i = s.options[s.activeOptionIndex]) == null ? void 0 : i.id, "aria-labelledby": I, "aria-describedby": L, "aria-autocomplete": "list", defaultValue: (l = (r = e.defaultValue) != null ? r : s.defaultValue !== void 0 ? c == null ? void 0 : c(s.defaultValue) : null) != null ? l : s.defaultValue, disabled: m || void 0, autoFocus: p, onCompositionStart: $, onCompositionEnd: M, onKeyDown: P, onChange: D, onFocus: N, onBlur: H }, R, T);
2761
- return xe({ ourProps: Ce, theirProps: b, slot: ee, defaultTag: _r, name: "Combobox.Input" });
2760
+ }), P = Ct(), L = io(), { isFocused: V, focusProps: R } = un({ autoFocus: p }), { isHovered: k, hoverProps: I } = fn({ isDisabled: m }), te = q(() => ({ open: s.comboboxState === 0, disabled: m, hover: k, focus: V, autofocus: p }), [s, k, V, p, m]), Ce = Ot({ ref: w, id: d, role: "combobox", type: h, "aria-controls": (t = s.optionsRef.current) == null ? void 0 : t.id, "aria-expanded": s.comboboxState === 0, "aria-activedescendant": s.activeOptionIndex === null ? void 0 : s.virtual ? (o = s.options.find((C) => !C.dataRef.current.disabled && s.compare(C.dataRef.current.value, s.virtual.options[s.activeOptionIndex]))) == null ? void 0 : o.id : (i = s.options[s.activeOptionIndex]) == null ? void 0 : i.id, "aria-labelledby": P, "aria-describedby": L, "aria-autocomplete": "list", defaultValue: (l = (r = e.defaultValue) != null ? r : s.defaultValue !== void 0 ? c == null ? void 0 : c(s.defaultValue) : null) != null ? l : s.defaultValue, disabled: m || void 0, autoFocus: p, onCompositionStart: D, onCompositionEnd: N, onKeyDown: M, onChange: T, onFocus: z, onBlur: $ }, R, I);
2761
+ return xe({ ourProps: Ce, theirProps: v, slot: te, defaultTag: _r, name: "Combobox.Input" });
2762
2762
  }
2763
2763
  let $r = "button";
2764
2764
  function Lr(e, n) {
2765
2765
  var t;
2766
- let o = $e("Combobox.Button"), i = Ge("Combobox.Button"), r = Oe(o.buttonRef, n), l = Ue(), { id: s = `headlessui-combobox-button-${l}`, disabled: a = o.disabled || !1, autoFocus: f = !1, ...u } = e, d = mn(o.inputRef), g = A((O) => {
2766
+ let o = $e("Combobox.Button"), i = Ge("Combobox.Button"), r = Oe(o.buttonRef, n), l = Ue(), { id: s = `headlessui-combobox-button-${l}`, disabled: a = o.disabled || !1, autoFocus: f = !1, ...u } = e, d = vn(o.inputRef), g = A((O) => {
2767
2767
  switch (O.key) {
2768
2768
  case X.Space:
2769
2769
  case X.Enter:
@@ -2783,45 +2783,45 @@ function Lr(e, n) {
2783
2783
  return;
2784
2784
  }
2785
2785
  }), c = A((O) => {
2786
- O.preventDefault(), !ho(O.currentTarget) && (O.button === Pt.Left && (o.comboboxState === 0 ? i.closeCombobox() : i.openCombobox()), d());
2787
- }), m = St([s]), { isFocusVisible: p, focusProps: h } = ln({ autoFocus: f }), { isHovered: b, hoverProps: w } = an({ isDisabled: a }), { pressed: v, pressProps: x } = Gn({ disabled: a }), E = q(() => ({ open: o.comboboxState === 0, active: v || o.comboboxState === 0, disabled: a, value: o.value, hover: b, focus: p }), [o, b, p, v, a]), S = Rt({ ref: r, id: s, type: co(e, o.buttonRef), tabIndex: -1, "aria-haspopup": "listbox", "aria-controls": (t = o.optionsRef.current) == null ? void 0 : t.id, "aria-expanded": o.comboboxState === 0, "aria-labelledby": m, disabled: a || void 0, autoFocus: f, onMouseDown: c, onKeyDown: g }, h, w, x);
2788
- return xe({ ourProps: S, theirProps: u, slot: E, defaultTag: $r, name: "Combobox.Button" });
2786
+ O.preventDefault(), !ho(O.currentTarget) && (O.button === _t.Left && (o.comboboxState === 0 ? i.closeCombobox() : i.openCombobox()), d());
2787
+ }), m = Ct([s]), { isFocusVisible: p, focusProps: h } = un({ autoFocus: f }), { isHovered: v, hoverProps: w } = fn({ isDisabled: a }), { pressed: b, pressProps: x } = Gn({ disabled: a }), y = q(() => ({ open: o.comboboxState === 0, active: b || o.comboboxState === 0, disabled: a, value: o.value, hover: v, focus: p }), [o, v, p, b, a]), S = Ot({ ref: r, id: s, type: co(e, o.buttonRef), tabIndex: -1, "aria-haspopup": "listbox", "aria-controls": (t = o.optionsRef.current) == null ? void 0 : t.id, "aria-expanded": o.comboboxState === 0, "aria-labelledby": m, disabled: a || void 0, autoFocus: f, onMouseDown: c, onKeyDown: g }, h, w, x);
2788
+ return xe({ ourProps: S, theirProps: u, slot: y, defaultTag: $r, name: "Combobox.Button" });
2789
2789
  }
2790
- let Fr = "div", Nr = $t.RenderStrategy | $t.Static;
2791
- function kr(e, n) {
2790
+ let Fr = "div", Nr = Nt.RenderStrategy | Nt.Static;
2791
+ function zr(e, n) {
2792
2792
  var t, o, i;
2793
2793
  let r = Ue(), { id: l = `headlessui-combobox-options-${r}`, hold: s = !1, anchor: a, portal: f = !1, modal: u = !0, transition: d = !1, ...g } = e, c = $e("Combobox.Options"), m = Ge("Combobox.Options"), p = Zi(a);
2794
2794
  p && (f = !0);
2795
- let [h, b] = nr(p), w = tr(), v = Oe(c.optionsRef, n, p ? h : null), x = st(c.optionsRef), E = fo(), [S, O] = po(d, c.optionsRef, E !== null ? (E & et.Open) === et.Open : c.comboboxState === 0);
2795
+ let [h, v] = nr(p), w = tr(), b = Oe(c.optionsRef, n, p ? h : null), x = st(c.optionsRef), y = fo(), [S, O] = po(d, c.optionsRef, y !== null ? (y & et.Open) === et.Open : c.comboboxState === 0);
2796
2796
  $o(S, c.inputRef, m.closeCombobox);
2797
- let $ = c.__demoMode ? !1 : u && c.comboboxState === 0;
2798
- jo($, x);
2799
- let M = c.__demoMode ? !1 : u && c.comboboxState === 0;
2800
- Do(M, { allowed: A(() => [c.inputRef.current, c.buttonRef.current, c.optionsRef.current]) }), U(() => {
2801
- var T;
2802
- c.optionsPropsRef.current.static = (T = e.static) != null ? T : !1;
2797
+ let D = c.__demoMode ? !1 : u && c.comboboxState === 0;
2798
+ jo(D, x);
2799
+ let N = c.__demoMode ? !1 : u && c.comboboxState === 0;
2800
+ Do(N, { allowed: A(() => [c.inputRef.current, c.buttonRef.current, c.optionsRef.current]) }), U(() => {
2801
+ var I;
2802
+ c.optionsPropsRef.current.static = (I = e.static) != null ? I : !1;
2803
2803
  }, [c.optionsPropsRef, e.static]), U(() => {
2804
2804
  c.optionsPropsRef.current.hold = s;
2805
- }, [c.optionsPropsRef, s]), Yo(c.comboboxState === 0, { container: c.optionsRef.current, accept(T) {
2806
- return T.getAttribute("role") === "option" ? NodeFilter.FILTER_REJECT : T.hasAttribute("role") ? NodeFilter.FILTER_SKIP : NodeFilter.FILTER_ACCEPT;
2807
- }, walk(T) {
2808
- T.setAttribute("role", "none");
2805
+ }, [c.optionsPropsRef, s]), Yo(c.comboboxState === 0, { container: c.optionsRef.current, accept(I) {
2806
+ return I.getAttribute("role") === "option" ? NodeFilter.FILTER_REJECT : I.hasAttribute("role") ? NodeFilter.FILTER_SKIP : NodeFilter.FILTER_ACCEPT;
2807
+ }, walk(I) {
2808
+ I.setAttribute("role", "none");
2809
2809
  } });
2810
- let P = St([(t = c.buttonRef.current) == null ? void 0 : t.id]), D = q(() => ({ open: c.comboboxState === 0, option: void 0 }), [c.comboboxState]), H = A(() => {
2810
+ let M = Ct([(t = c.buttonRef.current) == null ? void 0 : t.id]), T = q(() => ({ open: c.comboboxState === 0, option: void 0 }), [c.comboboxState]), $ = A(() => {
2811
2811
  m.setActivationTrigger(0);
2812
- }), N = A((T) => {
2813
- T.preventDefault(), m.setActivationTrigger(0);
2814
- }), I = Rt(p ? w() : {}, { "aria-labelledby": P, role: "listbox", "aria-multiselectable": c.mode === 1 ? !0 : void 0, id: l, ref: v, style: { ...g.style, ...b, "--input-width": Ft(c.inputRef, !0).width, "--button-width": Ft(c.buttonRef, !0).width }, onWheel: c.activationTrigger === 0 ? void 0 : H, onMouseDown: N, ...mo(O) }), L = S && c.comboboxState === 1, V = yt(L, (o = c.virtual) == null ? void 0 : o.options), R = yt(L, c.value), k = A((T) => c.compare(R, T));
2812
+ }), z = A((I) => {
2813
+ I.preventDefault(), m.setActivationTrigger(0);
2814
+ }), P = Ot(p ? w() : {}, { "aria-labelledby": M, role: "listbox", "aria-multiselectable": c.mode === 1 ? !0 : void 0, id: l, ref: b, style: { ...g.style, ...v, "--input-width": kt(c.inputRef, !0).width, "--button-width": kt(c.buttonRef, !0).width }, onWheel: c.activationTrigger === 0 ? void 0 : $, onMouseDown: z, ...mo(O) }), L = S && c.comboboxState === 1, V = yt(L, (o = c.virtual) == null ? void 0 : o.options), R = yt(L, c.value), k = A((I) => c.compare(R, I));
2815
2815
  if (c.virtual) {
2816
2816
  if (V === void 0) throw new Error("Missing `options` in virtual mode");
2817
- Object.assign(g, { children: j.createElement(je.Provider, { value: V !== c.virtual.options ? { ...c, virtual: { ...c.virtual, options: V } } : c }, j.createElement(Ir, { slot: D }, g.children)) });
2817
+ Object.assign(g, { children: j.createElement(je.Provider, { value: V !== c.virtual.options ? { ...c, virtual: { ...c.virtual, options: V } } : c }, j.createElement(Ir, { slot: T }, g.children)) });
2818
2818
  }
2819
- return j.createElement(Er, { enabled: f ? e.static || S : !1 }, j.createElement(je.Provider, { value: c.mode === 1 ? c : { ...c, isSelected: k } }, xe({ ourProps: I, theirProps: { ...g, children: j.createElement(sr, { freeze: L }, typeof g.children == "function" ? (i = g.children) == null ? void 0 : i.call(g, D) : g.children) }, slot: D, defaultTag: Fr, features: Nr, visible: S, name: "Combobox.Options" })));
2819
+ return j.createElement(Er, { enabled: f ? e.static || S : !1 }, j.createElement(je.Provider, { value: c.mode === 1 ? c : { ...c, isSelected: k } }, xe({ ourProps: P, theirProps: { ...g, children: j.createElement(sr, { freeze: L }, typeof g.children == "function" ? (i = g.children) == null ? void 0 : i.call(g, T) : g.children) }, slot: T, defaultTag: Fr, features: Nr, visible: S, name: "Combobox.Options" })));
2820
2820
  }
2821
- let zr = "div";
2821
+ let kr = "div";
2822
2822
  function Hr(e, n) {
2823
2823
  var t, o, i, r;
2824
- let l = $e("Combobox.Option"), s = Ge("Combobox.Option"), a = Ue(), { id: f = `headlessui-combobox-option-${a}`, value: u, disabled: d = (i = (o = (t = l.virtual) == null ? void 0 : t.disabled) == null ? void 0 : o.call(t, u)) != null ? i : !1, order: g = null, ...c } = e, m = mn(l.inputRef), p = l.virtual ? l.activeOptionIndex === l.calculateIndex(u) : l.activeOptionIndex === null ? !1 : ((r = l.options[l.activeOptionIndex]) == null ? void 0 : r.id) === f, h = l.isSelected(u), b = Y(null), w = Ae({ disabled: d, value: u, domRef: b, order: g }), v = ae(_n), x = Oe(n, b, v ? v.measureElement : null), E = A(() => {
2824
+ let l = $e("Combobox.Option"), s = Ge("Combobox.Option"), a = Ue(), { id: f = `headlessui-combobox-option-${a}`, value: u, disabled: d = (i = (o = (t = l.virtual) == null ? void 0 : t.disabled) == null ? void 0 : o.call(t, u)) != null ? i : !1, order: g = null, ...c } = e, m = vn(l.inputRef), p = l.virtual ? l.activeOptionIndex === l.calculateIndex(u) : l.activeOptionIndex === null ? !1 : ((r = l.options[l.activeOptionIndex]) == null ? void 0 : r.id) === f, h = l.isSelected(u), v = Y(null), w = Ae({ disabled: d, value: u, domRef: v, order: g }), b = ae(Ln), x = Oe(n, v, b ? b.measureElement : null), y = A(() => {
2825
2825
  s.setIsTyping(!1), s.onChange(u);
2826
2826
  });
2827
2827
  U(() => s.registerOption(f, w), [w, f]);
@@ -2832,26 +2832,26 @@ function Hr(e, n) {
2832
2832
  });
2833
2833
  }, [l.virtual, l.__demoMode]), U(() => {
2834
2834
  if (S.current && l.comboboxState === 0 && p && l.activationTrigger !== 0) return Me().requestAnimationFrame(() => {
2835
- var I, L;
2836
- (L = (I = b.current) == null ? void 0 : I.scrollIntoView) == null || L.call(I, { block: "nearest" });
2835
+ var P, L;
2836
+ (L = (P = v.current) == null ? void 0 : P.scrollIntoView) == null || L.call(P, { block: "nearest" });
2837
2837
  });
2838
- }, [b, p, l.comboboxState, l.activationTrigger, l.activeOptionIndex]);
2839
- let O = A((I) => {
2840
- I.preventDefault(), I.button === Pt.Left && (d || (E(), pn() || requestAnimationFrame(() => m()), l.mode === 0 && s.closeCombobox()));
2841
- }), $ = A(() => {
2838
+ }, [v, p, l.comboboxState, l.activationTrigger, l.activeOptionIndex]);
2839
+ let O = A((P) => {
2840
+ P.preventDefault(), P.button === _t.Left && (d || (y(), gn() || requestAnimationFrame(() => m()), l.mode === 0 && s.closeCombobox()));
2841
+ }), D = A(() => {
2842
2842
  if (d) return s.goToOption(B.Nothing);
2843
- let I = l.calculateIndex(u);
2844
- s.goToOption(B.Specific, I);
2845
- }), M = Uo(), P = A((I) => M.update(I)), D = A((I) => {
2846
- if (!M.wasMoved(I) || d || p) return;
2843
+ let P = l.calculateIndex(u);
2844
+ s.goToOption(B.Specific, P);
2845
+ }), N = Uo(), M = A((P) => N.update(P)), T = A((P) => {
2846
+ if (!N.wasMoved(P) || d || p) return;
2847
2847
  let L = l.calculateIndex(u);
2848
2848
  s.goToOption(B.Specific, L, 0);
2849
- }), H = A((I) => {
2850
- M.wasMoved(I) && (d || p && (l.optionsPropsRef.current.hold || s.goToOption(B.Nothing)));
2851
- }), N = q(() => ({ active: p, focus: p, selected: h, disabled: d }), [p, h, d]);
2852
- return xe({ ourProps: { id: f, ref: x, role: "option", tabIndex: d === !0 ? void 0 : -1, "aria-disabled": d === !0 ? !0 : void 0, "aria-selected": h, disabled: void 0, onMouseDown: O, onFocus: $, onPointerEnter: P, onMouseEnter: P, onPointerMove: D, onMouseMove: D, onPointerLeave: H, onMouseLeave: H }, theirProps: c, slot: N, defaultTag: zr, name: "Combobox.Option" });
2849
+ }), $ = A((P) => {
2850
+ N.wasMoved(P) && (d || p && (l.optionsPropsRef.current.hold || s.goToOption(B.Nothing)));
2851
+ }), z = q(() => ({ active: p, focus: p, selected: h, disabled: d }), [p, h, d]);
2852
+ return xe({ ourProps: { id: f, ref: x, role: "option", tabIndex: d === !0 ? void 0 : -1, "aria-disabled": d === !0 ? !0 : void 0, "aria-selected": h, disabled: void 0, onMouseDown: O, onFocus: D, onPointerEnter: M, onMouseEnter: M, onPointerMove: T, onMouseMove: T, onPointerLeave: $, onMouseLeave: $ }, theirProps: c, slot: z, defaultTag: kr, name: "Combobox.Option" });
2853
2853
  }
2854
- let Vr = be(Ar), Dn = be(Lr), $n = be(Dr), Wr = Xn, Ln = be(kr), Fn = be(Hr), Br = Object.assign(Vr, { Input: $n, Button: Dn, Label: Wr, Options: Ln, Option: Fn });
2854
+ let Vr = be(Ar), Et = be(Lr), Rt = be(Dr), Wr = Xn, Fn = be(zr), Nn = be(Hr), Br = Object.assign(Vr, { Input: Rt, Button: Et, Label: Wr, Options: Fn, Option: Nn });
2855
2855
  const jr = "_disabled_a63ul_5", Ur = "_container_a63ul_9", Yr = "_full_a63ul_22", Kr = "_button_a63ul_34", qr = "_options_a63ul_52", Gr = "_top_a63ul_63", Jr = "_bottom_a63ul_68", Xr = "_m_a63ul_95", Qr = "_l_a63ul_108", Zr = "_option_a63ul_52", F = {
2856
2856
  "select-search": "_select-search_a63ul_2",
2857
2857
  disabled: jr,
@@ -2872,7 +2872,7 @@ const jr = "_disabled_a63ul_5", Ur = "_container_a63ul_9", Yr = "_full_a63ul_22"
2872
2872
  option: Zr,
2873
2873
  "option-active": "_option-active_a63ul_137",
2874
2874
  "option-inner": "_option-inner_a63ul_140"
2875
- }, vs = Bn(
2875
+ }, vs = jn(
2876
2876
  (e, n) => {
2877
2877
  const {
2878
2878
  placeholder: t,
@@ -2890,8 +2890,9 @@ const jr = "_disabled_a63ul_5", Ur = "_container_a63ul_9", Yr = "_full_a63ul_22"
2890
2890
  menuPlacement: m = "bottom",
2891
2891
  disabled: p = !1,
2892
2892
  searchProps: h,
2893
- withClearButton: b = !1
2894
- } = e, w = String((i == null ? void 0 : i[u]) || ""), [v, x] = ue(w), E = (M) => {
2893
+ withClearButton: v = !1,
2894
+ disableInput: w = !1
2895
+ } = e, b = String((i == null ? void 0 : i[u]) || ""), [x, y] = ue(b), S = (M) => {
2895
2896
  switch (M) {
2896
2897
  case Le.M:
2897
2898
  return ft.M;
@@ -2900,20 +2901,21 @@ const jr = "_disabled_a63ul_5", Ur = "_container_a63ul_9", Yr = "_full_a63ul_22"
2900
2901
  default:
2901
2902
  return ft.M;
2902
2903
  }
2903
- }, S = q(() => !d || i && (i.id || i.name) ? a : v.trim().toLowerCase() ? a.filter(
2904
- (M) => M.name.toLowerCase().includes(v.toLowerCase())
2905
- ) : a, [v, a, i, d]), O = (M) => {
2906
- M ? (x(M.name), r == null || r(M)) : (x(""), r == null || r({ id: "", name: "" }));
2907
- }, $ = He(
2904
+ }, O = q(() => !d || i && (i.id || i.name) ? a : x.trim().toLowerCase() ? a.filter(
2905
+ (M) => M.name.toLowerCase().includes(x.toLowerCase())
2906
+ ) : a, [x, a, i, d]), D = (M) => {
2907
+ M ? (y(M.name), r == null || r(M)) : (y(""), r == null || r({ id: "", name: "" }));
2908
+ }, N = He(
2908
2909
  (M) => {
2909
- const P = M.target.value;
2910
- x(P), g == null || g(P), !P && i && (r == null || r({ id: "", name: "" }));
2910
+ if (w) return;
2911
+ const T = M.target.value;
2912
+ y(T), g == null || g(T), !T && i && (r == null || r({ id: "", name: "" }));
2911
2913
  },
2912
- [r, g, i]
2914
+ [w, r, g, i]
2913
2915
  );
2914
- return ne(() => {
2915
- x(w);
2916
- }, [w]), /* @__PURE__ */ ie(
2916
+ return oe(() => {
2917
+ y(b);
2918
+ }, [b]), /* @__PURE__ */ Q(
2917
2919
  Br,
2918
2920
  {
2919
2921
  as: "div",
@@ -2922,10 +2924,10 @@ const jr = "_disabled_a63ul_5", Ur = "_container_a63ul_9", Yr = "_full_a63ul_22"
2922
2924
  [F.full]: l,
2923
2925
  [F.disabled]: p
2924
2926
  }),
2925
- onChange: O,
2927
+ onChange: D,
2926
2928
  ref: n,
2927
2929
  disabled: p,
2928
- virtual: { options: S },
2930
+ virtual: { options: O },
2929
2931
  children: ({ open: M }) => /* @__PURE__ */ Xe(ut, { children: [
2930
2932
  /* @__PURE__ */ Xe(
2931
2933
  "div",
@@ -2934,31 +2936,57 @@ const jr = "_disabled_a63ul_5", Ur = "_container_a63ul_9", Yr = "_full_a63ul_22"
2934
2936
  [F["container-open"]]: M
2935
2937
  }),
2936
2938
  children: [
2937
- /* @__PURE__ */ ie(
2938
- $n,
2939
+ w && /* @__PURE__ */ Q(Et, { disabled: p, style: { width: "100%" }, children: /* @__PURE__ */ Q(
2940
+ Rt,
2941
+ {
2942
+ as: Ft,
2943
+ label: t,
2944
+ size: S(o),
2945
+ className: F["custom-input-class"],
2946
+ onChange: N,
2947
+ value: x,
2948
+ disabled: p,
2949
+ variant: c,
2950
+ withClearButton: v,
2951
+ "data-testid": "select-search-input",
2952
+ onFocus: (T) => {
2953
+ w && T.target.blur();
2954
+ },
2955
+ rightAddon: {
2956
+ addonType: "icon",
2957
+ addonContent: M ? "DropdownArrowUp16px" : "DropdownArrowBottom16px"
2958
+ },
2959
+ ...h
2960
+ }
2961
+ ) }),
2962
+ !w && /* @__PURE__ */ Q(
2963
+ Rt,
2939
2964
  {
2940
- as: jn,
2965
+ as: Ft,
2941
2966
  label: t,
2942
- size: E(o),
2967
+ size: S(o),
2943
2968
  className: F["custom-input-class"],
2944
- onChange: $,
2945
- value: v,
2969
+ onChange: N,
2970
+ value: x,
2946
2971
  disabled: p,
2947
2972
  variant: c,
2948
- withClearButton: b,
2973
+ withClearButton: v,
2949
2974
  "data-testid": "select-search-input",
2975
+ onFocus: (T) => {
2976
+ w && T.target.blur();
2977
+ },
2950
2978
  ...h
2951
2979
  }
2952
2980
  ),
2953
- s && /* @__PURE__ */ ie(
2954
- Dn,
2981
+ s && !w && /* @__PURE__ */ Q(
2982
+ Et,
2955
2983
  {
2956
2984
  className: de(F.button, {
2957
2985
  [F.disabled]: p
2958
2986
  }),
2959
2987
  disabled: p,
2960
- children: /* @__PURE__ */ ie(
2961
- Dt,
2988
+ children: /* @__PURE__ */ Q(
2989
+ Lt,
2962
2990
  {
2963
2991
  iconName: o == Le.M ? "DropdownArrowBottom16px" : "DropdownArrowDown24px",
2964
2992
  className: de(F["selector-icon"], {
@@ -2971,8 +2999,8 @@ const jr = "_disabled_a63ul_5", Ur = "_container_a63ul_9", Yr = "_full_a63ul_22"
2971
2999
  ]
2972
3000
  }
2973
3001
  ),
2974
- M && /* @__PURE__ */ ie(ut, { children: a.length ? S.length ? /* @__PURE__ */ ie(
2975
- Ln,
3002
+ M && /* @__PURE__ */ Q(ut, { children: a.length ? O.length ? /* @__PURE__ */ Q(
3003
+ Fn,
2976
3004
  {
2977
3005
  "data-testid": "select-search-options",
2978
3006
  className: de(
@@ -2980,26 +3008,26 @@ const jr = "_disabled_a63ul_5", Ur = "_container_a63ul_9", Yr = "_full_a63ul_22"
2980
3008
  F[o],
2981
3009
  F[m]
2982
3010
  ),
2983
- children: ({ option: P }) => /* @__PURE__ */ ie(
2984
- Fn,
3011
+ children: ({ option: T }) => /* @__PURE__ */ Q(
3012
+ Nn,
2985
3013
  {
2986
- value: P,
2987
- className: ({ focus: D }) => de(
3014
+ value: T,
3015
+ className: ({ focus: $ }) => de(
2988
3016
  F.option,
2989
3017
  f,
2990
3018
  o && F[o],
2991
3019
  {
2992
- [F["option-active"]]: D
3020
+ [F["option-active"]]: $
2993
3021
  }
2994
3022
  ),
2995
- "data-testid": `select-search-option-${P.id}`,
2996
- children: ({ selected: D }) => /* @__PURE__ */ Xe(ut, { children: [
3023
+ "data-testid": `select-search-option-${T.id}`,
3024
+ children: ({ selected: $ }) => /* @__PURE__ */ Xe(ut, { children: [
2997
3025
  /* @__PURE__ */ Xe("div", { className: F["option-inner"], children: [
2998
- P.name,
2999
- P.bottom && /* @__PURE__ */ ie("div", { children: P.bottom })
3026
+ T.name,
3027
+ T.bottom && /* @__PURE__ */ Q("div", { children: T.bottom })
3000
3028
  ] }),
3001
- D && /* @__PURE__ */ ie(
3002
- Dt,
3029
+ $ && /* @__PURE__ */ Q(
3030
+ Lt,
3003
3031
  {
3004
3032
  iconName: o === Le.M ? "Done16px" : "Done24px",
3005
3033
  className: F["selected-icon"]
@@ -3007,10 +3035,10 @@ const jr = "_disabled_a63ul_5", Ur = "_container_a63ul_9", Yr = "_full_a63ul_22"
3007
3035
  )
3008
3036
  ] })
3009
3037
  },
3010
- P.id
3038
+ T.id
3011
3039
  )
3012
3040
  }
3013
- ) : /* @__PURE__ */ ie(
3041
+ ) : /* @__PURE__ */ Q(
3014
3042
  "div",
3015
3043
  {
3016
3044
  className: de(
@@ -3020,7 +3048,7 @@ const jr = "_disabled_a63ul_5", Ur = "_container_a63ul_9", Yr = "_full_a63ul_22"
3020
3048
  ),
3021
3049
  children: "Ничего не найдено"
3022
3050
  }
3023
- ) : /* @__PURE__ */ ie(
3051
+ ) : /* @__PURE__ */ Q(
3024
3052
  "div",
3025
3053
  {
3026
3054
  className: de(