@minimalstuff/ui 5.8.0 → 5.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -272,6 +272,7 @@ function X(t) {
272
272
  className: e(I, !i && [
273
273
  L,
274
274
  "border",
275
+ "min-h-[var(--ms-control-min-height,0px)] min-w-[var(--ms-control-min-height,0px)]",
275
276
  z[c],
276
277
  Y[s],
277
278
  R(o, a, f ?? !1),
@@ -331,8 +332,11 @@ var le = {
331
332
  danger: "danger"
332
333
  }, pe = l({
333
334
  close: "Close",
335
+ enterFullScreen: "Full screen",
336
+ exitFullScreen: "Exit full screen",
334
337
  confirm: "Confirm",
335
338
  cancel: "Cancel",
339
+ collapsePanel: "Collapse panel",
336
340
  noResults: "No results found",
337
341
  clearSelection: "Clear selection",
338
342
  search: "Search",
@@ -482,24 +486,31 @@ function Ae(t = {}) {
482
486
  return e(I, !c && [
483
487
  L,
484
488
  "gap-2 font-medium border",
489
+ "min-h-[var(--ms-control-min-height,0px)]",
485
490
  z[a],
486
491
  ke[i],
487
492
  R(r, n, s),
488
493
  F[r].focusOutline
489
494
  ], o && "w-full", l);
490
495
  }
491
- // src/components/button/button.tsx
492
- var je = {
496
+ var je = `w-full border ${ge} ${_e} text-gray-900 dark:text-gray-100 placeholder-gray-500 dark:placeholder-gray-400 ${k} transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed`, Me = "text-sm font-medium text-gray-700 dark:text-gray-300", Ne = "text-red-500 dark:text-red-400 ml-1", Pe = "text-xs text-gray-600 dark:text-gray-400", Fe = "text-xs text-red-600 dark:text-red-400", Ie = "border-red-500 dark:border-red-400", Le = ({ id: t, description: n, className: r }) => n ? typeof n == "string" ? /* @__PURE__ */ w("p", {
497
+ id: t,
498
+ className: e(Pe, r),
499
+ children: n
500
+ }) : /* @__PURE__ */ w("span", {
501
+ id: t,
502
+ className: e(Pe, "block", r),
503
+ children: n
504
+ }) : null, Re = {
493
505
  xs: "w-3.5 h-3.5",
494
506
  sm: "w-4 h-4",
495
507
  md: "w-4 h-4",
496
508
  lg: "w-5 h-5"
497
509
  };
498
- function Me(t) {
499
- let { unstyled: n = !1, variant: r = "solid", color: i = "primary", size: a = "md", radius: o = "md", children: s, className: c, fullWidth: l = !1, loading: u = !1, pressed: d, startIcon: f, endIcon: p, disabled: m, onClick: h, "aria-label": g, ..._ } = t, v = Q(), y = g !== void 0, b = u && y ? `${g} ${v.loading}` : g, x = je[a], S = (e) => {
500
- u ? e.preventDefault() : h?.(e);
501
- };
502
- return /* @__PURE__ */ T("button", {
510
+ function ze(t) {
511
+ let { unstyled: n = !1, variant: r = "solid", color: i = "primary", size: a = "md", radius: o = "md", children: s, className: c, fullWidth: l = !1, loading: u = !1, pressed: d, startIcon: f, endIcon: p, disabled: m, disabledReason: h, onClick: _, "aria-describedby": v, "aria-label": y, ...b } = t, x = Q(), S = y !== void 0, E = u && S ? `${y} ${x.loading}` : y, D = Re[a], O = g(), k = !m && !!h, A = u || k, j = (e) => {
512
+ A ? e.preventDefault() : _?.(e);
513
+ }, M = /* @__PURE__ */ T("button", {
503
514
  type: "button",
504
515
  className: Ae({
505
516
  variant: r,
@@ -512,57 +523,65 @@ function Me(t) {
512
523
  className: c
513
524
  }),
514
525
  disabled: m,
515
- "aria-disabled": u && !m || void 0,
526
+ "aria-disabled": A && !m || void 0,
516
527
  "aria-busy": u || void 0,
517
528
  "aria-pressed": d,
518
- "aria-label": b,
519
- ..._,
520
- onClick: S,
529
+ "aria-label": E,
530
+ "aria-describedby": W(v, k && O),
531
+ ...b,
532
+ onClick: j,
521
533
  children: [
522
534
  u && /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w("span", {
523
- className: e("i-svg-spinners-3-dots-fade ms-spinner-animated", x),
535
+ className: e("i-svg-spinners-3-dots-fade ms-spinner-animated", D),
524
536
  "aria-hidden": "true"
525
537
  }), /* @__PURE__ */ w("span", {
526
- className: e("i-mdi-loading ms-spinner-static", x),
538
+ className: e("i-mdi-loading ms-spinner-static", D),
527
539
  "aria-hidden": "true"
528
540
  })] }),
529
541
  !u && f && /* @__PURE__ */ w("span", {
530
- className: e(f, x),
542
+ className: e(f, D),
531
543
  "aria-hidden": "true"
532
544
  }),
533
545
  s,
534
- u && !y && /* @__PURE__ */ w("span", {
546
+ u && !S && /* @__PURE__ */ w("span", {
535
547
  className: "sr-only",
536
- children: v.loading
548
+ children: x.loading
537
549
  }),
538
550
  !u && p && /* @__PURE__ */ w("span", {
539
- className: e(p, x),
551
+ className: e(p, D),
540
552
  "aria-hidden": "true"
541
553
  })
542
554
  ]
543
555
  });
556
+ return k ? /* @__PURE__ */ T("div", {
557
+ className: e("gap-1", l ? "flex w-full flex-col" : "inline-flex flex-col items-start"),
558
+ children: [M, /* @__PURE__ */ w(Le, {
559
+ id: O,
560
+ description: h
561
+ })]
562
+ }) : M;
544
563
  }
545
564
  // src/components/card/card_header.tsx
546
- var Ne = {
565
+ var Be = {
547
566
  sm: "text-base",
548
567
  md: "text-lg"
549
- }, Pe = {
568
+ }, Ve = {
550
569
  sm: "mb-3",
551
570
  md: "mb-4"
552
- }, Fe = {
571
+ }, He = {
553
572
  2: "h2",
554
573
  3: "h3",
555
574
  4: "h4"
556
575
  };
557
- function Ie({ title: t, titleId: n, level: r, size: i, description: a, actions: o }) {
558
- let s = Fe[r];
576
+ function Ue({ title: t, titleId: n, level: r, size: i, description: a, actions: o }) {
577
+ let s = He[r];
559
578
  return /* @__PURE__ */ T("div", {
560
- className: Pe[i],
579
+ className: Ve[i],
561
580
  children: [/* @__PURE__ */ T("div", {
562
581
  className: "flex items-center justify-between gap-4",
563
582
  children: [/* @__PURE__ */ w(s, {
564
583
  id: n,
565
- className: e(Ne[i], "font-medium text-gray-900 dark:text-gray-100"),
584
+ className: e(Be[i], "font-medium text-gray-900 dark:text-gray-100"),
566
585
  children: t
567
586
  }), o]
568
587
  }), a && /* @__PURE__ */ w("p", {
@@ -572,13 +591,13 @@ function Ie({ title: t, titleId: n, level: r, size: i, description: a, actions:
572
591
  });
573
592
  }
574
593
  // src/components/card/card.tsx
575
- var Le = {
594
+ var We = {
576
595
  none: "",
577
596
  sm: "p-4",
578
597
  md: "p-6",
579
598
  lg: "p-8"
580
599
  };
581
- function Re({ children: t, title: n, description: r, actions: i, headingLevel: a = 2, titleSize: o = "md", padding: s = "md", radius: c = "lg", unstyled: l = !1, className: u }) {
600
+ function Ge({ children: t, title: n, description: r, actions: i, headingLevel: a = 2, titleSize: o = "md", padding: s = "md", radius: c = "lg", unstyled: l = !1, className: u }) {
582
601
  let d = g(), f = !!n;
583
602
  return /* @__PURE__ */ T("div", {
584
603
  role: f ? "region" : void 0,
@@ -588,9 +607,9 @@ function Re({ children: t, title: n, description: r, actions: i, headingLevel: a
588
607
  "bg-white dark:bg-gray-800",
589
608
  "border-gray-200 dark:border-gray-700",
590
609
  z[c],
591
- Le[s]
610
+ We[s]
592
611
  ], u),
593
- children: [f && /* @__PURE__ */ w(Ie, {
612
+ children: [f && /* @__PURE__ */ w(Ue, {
594
613
  title: n,
595
614
  titleId: d,
596
615
  level: a,
@@ -601,17 +620,17 @@ function Re({ children: t, title: n, description: r, actions: i, headingLevel: a
601
620
  });
602
621
  }
603
622
  // src/components/character_count/character_count.tsx
604
- var ze = "text-xs text-gray-500 dark:text-gray-400 mt-1 text-right", Be = .1;
605
- function Ve(e, t) {
623
+ var Ke = "text-xs text-gray-500 dark:text-gray-400 mt-1 text-right", qe = .1;
624
+ function Je(e, t) {
606
625
  if (t === void 0) return "ok";
607
626
  let n = t - e;
608
- return n <= 0 ? "empty" : n <= Math.max(1, Math.ceil(t * Be)) ? "low" : "ok";
627
+ return n <= 0 ? "empty" : n <= Math.max(1, Math.ceil(t * qe)) ? "low" : "ok";
609
628
  }
610
- function He(e, t) {
629
+ function Ye(e, t) {
611
630
  return t ? "" : e === "overLimit" ? "text-red-600 dark:text-red-400" : e === "atLimit" ? "text-amber-700 dark:text-amber-400" : "";
612
631
  }
613
- function Ue({ current: t, min: n, max: r, showMin: i, showMax: a, unstyled: o = !1, id: s, className: c }) {
614
- let l = Q(), u = Ve(t, r), [d, f] = b({
632
+ function Xe({ current: t, min: n, max: r, showMin: i, showMax: a, unstyled: o = !1, id: s, className: c }) {
633
+ let l = Q(), u = Je(t, r), [d, f] = b({
615
634
  zone: u,
616
635
  message: ""
617
636
  });
@@ -625,23 +644,23 @@ function Ue({ current: t, min: n, max: r, showMin: i, showMax: a, unstyled: o =
625
644
  let p = i === !0 || a === !0, m = n !== void 0 && t <= n ? "atLimit" : "ok", h = r !== void 0 && t > r ? "overLimit" : r !== void 0 && t >= r ? "atLimit" : "ok", g = p ? `${t}/${n} min` : `${t} (min ${n})`, _ = p ? `${t}/${r} max` : `${t}/${r}`;
626
645
  return /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ T("div", {
627
646
  id: s,
628
- className: e(!o && ze, c),
647
+ className: e(!o && Ke, c),
629
648
  children: [
630
649
  i && n !== void 0 && /* @__PURE__ */ w("span", {
631
- className: He(m, o),
650
+ className: Ye(m, o),
632
651
  children: g
633
652
  }),
634
653
  i && a && " · ",
635
654
  a && r !== void 0 && /* @__PURE__ */ w("span", {
636
- className: He(h, o),
655
+ className: Ye(h, o),
637
656
  children: _
638
657
  }),
639
658
  !i && !a && r !== void 0 && /* @__PURE__ */ w("span", {
640
- className: He(h, o),
659
+ className: Ye(h, o),
641
660
  children: _
642
661
  }),
643
662
  !i && !a && n !== void 0 && r === void 0 && /* @__PURE__ */ w("span", {
644
- className: He(m, o),
663
+ className: Ye(m, o),
645
664
  children: g
646
665
  })
647
666
  ]
@@ -652,7 +671,7 @@ function Ue({ current: t, min: n, max: r, showMin: i, showMax: a, unstyled: o =
652
671
  })] });
653
672
  }
654
673
  // src/components/shared/checkmark_icon.tsx
655
- function We() {
674
+ function Ze() {
656
675
  return /* @__PURE__ */ w("svg", {
657
676
  className: "h-3 w-3 text-white",
658
677
  viewBox: "0 0 12 12",
@@ -665,7 +684,7 @@ function We() {
665
684
  });
666
685
  }
667
686
  // src/components/shared/dash_icon.tsx
668
- function Ge() {
687
+ function Qe() {
669
688
  return /* @__PURE__ */ w("svg", {
670
689
  className: "h-3 w-3 text-white",
671
690
  viewBox: "0 0 12 12",
@@ -681,15 +700,8 @@ function Ge() {
681
700
  })
682
701
  });
683
702
  }
684
- var Ke = `w-full border ${ge} ${_e} text-gray-900 dark:text-gray-100 placeholder-gray-500 dark:placeholder-gray-400 ${k} transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed`, qe = "text-sm font-medium text-gray-700 dark:text-gray-300", Je = "text-red-500 dark:text-red-400 ml-1", Ye = "text-xs text-gray-600 dark:text-gray-400", Xe = "text-xs text-red-600 dark:text-red-400", Ze = "border-red-500 dark:border-red-400", Qe = ({ id: t, description: n, className: r }) => n ? typeof n == "string" ? /* @__PURE__ */ w("p", {
685
- id: t,
686
- className: e(Ye, r),
687
- children: n
688
- }) : /* @__PURE__ */ w("span", {
689
- id: t,
690
- className: e(Ye, "block", r),
691
- children: n
692
- }) : null, $e = l(!0);
703
+ // src/components/ui_provider/use_announce_field_errors.ts
704
+ var $e = l(!0);
693
705
  function et() {
694
706
  return p($e);
695
707
  }
@@ -698,7 +710,7 @@ var tt = ({ id: t, error: n, className: r }) => {
698
710
  let i = et();
699
711
  return n ? /* @__PURE__ */ w("p", {
700
712
  id: t,
701
- className: e(Xe, r),
713
+ className: e(Fe, r),
702
714
  role: i ? "alert" : void 0,
703
715
  children: n
704
716
  }) : null;
@@ -714,12 +726,12 @@ function nt(t) {
714
726
  }
715
727
  function rt(e) {
716
728
  let { isSelected: t, isError: n } = e;
717
- return t ? n ? Ze : "border-blue-600 dark:border-blue-500" : n ? "border-red-400 dark:border-red-600" : ge;
729
+ return t ? n ? Ie : "border-blue-600 dark:border-blue-500" : n ? "border-red-400 dark:border-red-600" : ge;
718
730
  }
719
731
  // src/components/shared/required_mark.tsx
720
732
  function it() {
721
733
  return /* @__PURE__ */ w("span", {
722
- className: Je,
734
+ className: Ne,
723
735
  "aria-hidden": "true",
724
736
  children: "*"
725
737
  });
@@ -803,7 +815,7 @@ function gt({ label: t, indeterminate: n = !1, description: r, error: i, radius:
803
815
  isDisabled: S.disabled === !0,
804
816
  radius: a,
805
817
  unstyled: o
806
- }) : e("flex items-start gap-3 cursor-pointer", S.disabled && "cursor-not-allowed opacity-50"), R = j ? e("select-none text-sm font-medium", N ? i ? "text-red-700 dark:text-red-300" : "text-blue-700 dark:text-blue-300" : "text-gray-700 dark:text-gray-300") : e(qe, "select-none"), B = e("shrink-0", (M || !j) && "relative", z[a], !j && ["has-[:focus-visible]:outline-hidden has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-offset-2 has-[:focus-visible]:ring-offset-white dark:has-[:focus-visible]:ring-offset-gray-900", i ? "has-[:focus-visible]:ring-red-500" : "has-[:focus-visible]:ring-blue-500"]), V = ft(t, R, S.required === !0);
818
+ }) : e("flex items-start gap-3 cursor-pointer", S.disabled && "cursor-not-allowed opacity-50"), R = j ? e("select-none text-sm font-medium", N ? i ? "text-red-700 dark:text-red-300" : "text-blue-700 dark:text-blue-300" : "text-gray-700 dark:text-gray-300") : e(Me, "select-none"), B = e("shrink-0", (M || !j) && "relative", z[a], !j && ["has-[:focus-visible]:outline-hidden has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-offset-2 has-[:focus-visible]:ring-offset-white dark:has-[:focus-visible]:ring-offset-gray-900", i ? "has-[:focus-visible]:ring-red-500" : "has-[:focus-visible]:ring-blue-500"]), V = ft(t, R, S.required === !0);
807
819
  return /* @__PURE__ */ T("div", {
808
820
  className: e(s ? "w-full" : "w-fit", u),
809
821
  children: [
@@ -836,7 +848,7 @@ function gt({ label: t, indeterminate: n = !1, description: r, error: i, radius:
836
848
  i && "border-red-500 dark:border-red-400"
837
849
  ], l),
838
850
  "aria-hidden": !0,
839
- children: n ? /* @__PURE__ */ w(Ge, {}) : O && /* @__PURE__ */ w(We, {})
851
+ children: n ? /* @__PURE__ */ w(Qe, {}) : O && /* @__PURE__ */ w(Ze, {})
840
852
  })]
841
853
  }), j ? /* @__PURE__ */ T("span", {
842
854
  className: "flex min-w-0 flex-col",
@@ -848,7 +860,7 @@ function gt({ label: t, indeterminate: n = !1, description: r, error: i, radius:
848
860
  })]
849
861
  }) : V]
850
862
  }),
851
- !j && /* @__PURE__ */ w(Qe, {
863
+ !j && /* @__PURE__ */ w(Le, {
852
864
  id: D,
853
865
  description: r,
854
866
  className: "mt-1 ml-8"
@@ -930,7 +942,7 @@ function vt({ option: t, optionId: n, descriptionId: r, name: i, orientation: a,
930
942
  isError: p
931
943
  }), o && (p ? "bg-red-500 dark:bg-red-400" : "bg-blue-600 dark:bg-blue-500")),
932
944
  "aria-hidden": !0,
933
- children: o && /* @__PURE__ */ w(We, {})
945
+ children: o && /* @__PURE__ */ w(Ze, {})
934
946
  })
935
947
  });
936
948
  }
@@ -1023,7 +1035,7 @@ var Ct = ({ fieldId: t, errorId: n, descriptionId: r, label: i, description: a,
1023
1035
  })]
1024
1036
  })),
1025
1037
  l,
1026
- r && /* @__PURE__ */ w(Qe, {
1038
+ r && /* @__PURE__ */ w(Le, {
1027
1039
  id: r,
1028
1040
  description: a,
1029
1041
  className: "mt-1"
@@ -1517,9 +1529,10 @@ function hn({ options: t, filterOption: n, label: r, description: i, "aria-label
1517
1529
  "aria-required": p || void 0,
1518
1530
  "aria-describedby": W(!!i && A, o && k),
1519
1531
  className: e("w-full disabled:opacity-50 disabled:cursor-not-allowed", !d && [
1520
- Ke,
1532
+ je,
1521
1533
  z[u],
1522
- "pl-9 pr-8 py-2 text-sm"
1534
+ "pl-9 pr-8 py-2 text-sm",
1535
+ "min-h-[var(--ms-control-min-height,0px)]"
1523
1536
  ], !d && o && e("border-red-500 dark:border-red-400", "focus:ring-red-500"), m)
1524
1537
  }),
1525
1538
  !d && R && !f && /* @__PURE__ */ w("button", {
@@ -1811,40 +1824,264 @@ function Un({ text: t, ranges: n, radius: r = "sm", unstyled: i = !1, markClassN
1811
1824
  children: t.text
1812
1825
  }, t.start) : /* @__PURE__ */ w("span", { children: t.text }, t.start)) });
1813
1826
  }
1814
- // src/components/drawer/drawer_styles.ts
1815
- var Wn = {
1816
- sm: "ms-drawer-width-sm",
1817
- md: "ms-drawer-width-md",
1818
- lg: "ms-drawer-width-lg"
1819
- }, Gn = {
1820
- right: "right-0",
1821
- left: "left-0"
1822
- }, Kn = {
1823
- right: "pt-[env(safe-area-inset-top)] pb-[env(safe-area-inset-bottom)] pr-[env(safe-area-inset-right)]",
1824
- left: "pt-[env(safe-area-inset-top)] pb-[env(safe-area-inset-bottom)] pl-[env(safe-area-inset-left)]"
1825
- }, qn = {
1826
- right: "ms-drawer-offscreen-right",
1827
- left: "ms-drawer-offscreen-left"
1828
- }, Jn = {
1829
- right: {
1830
- none: "rounded-l-none",
1831
- sm: "rounded-l-sm",
1832
- md: "rounded-l-md",
1833
- lg: "rounded-l-lg",
1834
- xl: "rounded-l-xl",
1835
- full: "rounded-l-lg"
1836
- },
1837
- left: {
1838
- none: "rounded-r-none",
1839
- sm: "rounded-r-sm",
1840
- md: "rounded-r-md",
1841
- lg: "rounded-r-lg",
1842
- xl: "rounded-r-xl",
1843
- full: "rounded-r-lg"
1827
+ // src/components/bottom_sheet/bottom_sheet_expand_button.tsx
1828
+ function Wn({ isExpanded: e, onToggle: t, unstyled: n }) {
1829
+ let r = Q(), i = e ? "i-mdi-fullscreen-exit" : "i-mdi-fullscreen", a = e ? r.exitFullScreen ?? "Exit full screen" : r.enterFullScreen ?? "Full screen";
1830
+ return n ? /* @__PURE__ */ w(X, {
1831
+ icon: i,
1832
+ onClick: t,
1833
+ "aria-label": a,
1834
+ className: "min-h-6 min-w-6",
1835
+ unstyled: !0
1836
+ }) : /* @__PURE__ */ w(X, {
1837
+ icon: i,
1838
+ onClick: t,
1839
+ "aria-label": a,
1840
+ variant: "subtle",
1841
+ size: "sm",
1842
+ radius: "full"
1843
+ });
1844
+ }
1845
+ // src/components/bottom_sheet/sheet_drag_decision.ts
1846
+ var Gn = .25, Kn = .25, qn = .5, Jn = .5, Yn = 100;
1847
+ function Xn(e, t) {
1848
+ return [...e.filter((e) => e.time >= t.time - Yn), t];
1849
+ }
1850
+ function Zn(e) {
1851
+ let t = e.at(-1);
1852
+ if (t === void 0) return 0;
1853
+ let n = e.filter((e) => e.time >= t.time - Yn), r = t.time - n[0].time;
1854
+ return r <= 0 ? 0 : (t.y - n[0].y) / r;
1855
+ }
1856
+ function Qn({ distance: e, panelHeight: t, velocity: n }) {
1857
+ return e > t * Gn || n > qn;
1858
+ }
1859
+ function $n({ growth: e, currentHeight: t, fullHeight: n, upwardVelocity: r }) {
1860
+ let i = n - t;
1861
+ return i <= 0 ? !1 : e > i * Kn || r > Jn;
1862
+ }
1863
+ // src/components/bottom_sheet/use_sheet_drag_core.ts
1864
+ var er = 6, tr = 100, nr = "--ms-sheet-drag-offset", rr = "--ms-sheet-drag-height", ir = "--ms-keyboard-inset", ar = "data-dragging", or = "grow";
1865
+ function sr({ dialogRef: e, isEnded: t, isExpanded: n, canExpand: r, onExpand: i, onRelease: a }) {
1866
+ let o = y(null), s = y(!1), c = y(void 0), l = y(a), u = y(t), d = y(r), f = y(i);
1867
+ _(() => {
1868
+ l.current = a, u.current = t, d.current = r, f.current = i;
1869
+ });
1870
+ let p = () => {
1871
+ e.current?.removeAttribute(ar), e.current?.style.removeProperty(nr), e.current?.style.removeProperty(rr);
1872
+ };
1873
+ _(() => {
1874
+ clearTimeout(c.current), p();
1875
+ }, [t, n]), m(() => () => clearTimeout(c.current), []);
1876
+ let h = (t, n) => {
1877
+ let r = e.current;
1878
+ if (r === null) return;
1879
+ s.current = !1, clearTimeout(c.current);
1880
+ let i = Number.parseFloat(r.style.getPropertyValue(ir)) || 0;
1881
+ o.current = {
1882
+ startY: t,
1883
+ panelHeight: r.getBoundingClientRect().height,
1884
+ fullHeight: window.innerHeight - i,
1885
+ direction: n,
1886
+ samples: [{
1887
+ y: t,
1888
+ time: performance.now()
1889
+ }],
1890
+ isDragging: !1
1891
+ };
1892
+ }, g = (e, t) => {
1893
+ let n = Math.max(0, e.fullHeight - e.panelHeight);
1894
+ return Math.min(n, Math.max(0, e.startY - t));
1895
+ }, v = (e, t, n) => {
1896
+ let r = e.direction ?? (n > 0 ? "down" : "up");
1897
+ r === "up" && !d.current ? o.current = null : (e.direction = r, e.isDragging = !0, s.current = !0, t.setAttribute(ar, r === "up" ? or : ""));
1898
+ }, b = (t) => {
1899
+ let n = o.current, r = e.current;
1900
+ if (n === null || r === null) return;
1901
+ n.samples = Xn(n.samples, {
1902
+ y: t,
1903
+ time: performance.now()
1904
+ });
1905
+ let i = t - n.startY;
1906
+ !n.isDragging && Math.abs(i) > er && v(n, r, i), n.isDragging && (n.direction === "up" ? r.style.setProperty(rr, `${n.panelHeight + g(n, t)}px`) : r.style.setProperty(nr, `${Math.max(0, i)}px`));
1907
+ }, x = () => {
1908
+ l.current() ? c.current = setTimeout(() => {
1909
+ u.current || p();
1910
+ }, tr) : p();
1911
+ }, S = (e, t) => {
1912
+ let n = Xn(e.samples, {
1913
+ y: t,
1914
+ time: performance.now()
1915
+ });
1916
+ $n({
1917
+ growth: g(e, t),
1918
+ currentHeight: e.panelHeight,
1919
+ fullHeight: e.fullHeight,
1920
+ upwardVelocity: -Zn(n)
1921
+ }) ? f.current() : p();
1922
+ }, C = (e, t) => {
1923
+ let n = Xn(e.samples, {
1924
+ y: t,
1925
+ time: performance.now()
1926
+ });
1927
+ Qn({
1928
+ distance: Math.max(0, t - e.startY),
1929
+ panelHeight: e.panelHeight,
1930
+ velocity: Zn(n)
1931
+ }) ? x() : p();
1932
+ };
1933
+ return {
1934
+ begin: h,
1935
+ track: b,
1936
+ release: (e) => {
1937
+ let t = o.current;
1938
+ o.current = null, t !== null && t.isDragging && (t.direction === "up" ? S(t, e) : C(t, e));
1939
+ },
1940
+ cancel: () => {
1941
+ s.current = !1;
1942
+ let e = o.current;
1943
+ o.current = null, e?.isDragging && p();
1944
+ },
1945
+ consumeWasDragged: () => {
1946
+ let e = s.current;
1947
+ return s.current = !1, e;
1948
+ }
1949
+ };
1950
+ }
1951
+ // src/components/bottom_sheet/get_sheet_handle_drag_handlers.ts
1952
+ function cr(e) {
1953
+ return {
1954
+ onPointerDown: (t) => {
1955
+ t.isPrimary && (t.currentTarget.setPointerCapture(t.pointerId), e.begin(t.clientY));
1956
+ },
1957
+ onPointerMove: (t) => e.track(t.clientY),
1958
+ onPointerUp: (t) => e.release(t.clientY),
1959
+ onPointerCancel: e.cancel
1960
+ };
1961
+ }
1962
+ // src/components/bottom_sheet/bottom_sheet_handle.tsx
1963
+ function lr({ core: t, unstyled: n }) {
1964
+ return /* @__PURE__ */ w("div", {
1965
+ "aria-hidden": "true",
1966
+ "data-sheet-handle": "",
1967
+ className: "flex flex-shrink-0 items-center justify-center h-6 touch-none",
1968
+ ...cr(t),
1969
+ children: /* @__PURE__ */ w("span", { className: e("block w-9 h-1 rounded-full", !n && "bg-gray-300 dark:bg-gray-600") })
1970
+ });
1971
+ }
1972
+ // src/components/bottom_sheet/bottom_sheet_styles.ts
1973
+ var ur = {
1974
+ auto: "ms-bottom-sheet-height-auto",
1975
+ fixed: "ms-bottom-sheet-height-fixed"
1976
+ }, dr = "ms-bottom-sheet-expanded", fr = "fixed inset-x-0 bottom-[var(--ms-keyboard-inset,0px)] flex flex-col overflow-hidden pl-[env(safe-area-inset-left)] pr-[env(safe-area-inset-right)] pb-[max(0px,calc(env(safe-area-inset-bottom)_-_var(--ms-keyboard-inset,0px)))] focus:outline-none data-[dragging]:translate-y-[var(--ms-sheet-drag-offset,0px)] data-[dragging]:transition-none data-[dragging=grow]:h-[var(--ms-sheet-drag-height)] data-[dragging=grow]:max-h-none", pr = {
1977
+ none: "rounded-t-none",
1978
+ sm: "rounded-t-sm",
1979
+ md: "rounded-t-md",
1980
+ lg: "rounded-t-lg",
1981
+ xl: "rounded-t-xl",
1982
+ full: "rounded-t-lg"
1983
+ }, mr = "--ms-keyboard-inset";
1984
+ function hr(e) {
1985
+ let t = window.innerHeight - e.height - e.offsetTop;
1986
+ return Math.max(0, Math.round(t));
1987
+ }
1988
+ function gr(e, t) {
1989
+ m(() => {
1990
+ let n = e.current, r = window.visualViewport;
1991
+ if (t || n === null || !r) return;
1992
+ let i = () => {
1993
+ r.scale > 1 || n.style.setProperty(mr, `${hr(r)}px`);
1994
+ };
1995
+ return i(), r.addEventListener("resize", i), r.addEventListener("scroll", i), () => {
1996
+ r.removeEventListener("resize", i), r.removeEventListener("scroll", i);
1997
+ };
1998
+ }, [e, t]);
1999
+ }
2000
+ // src/components/bottom_sheet/is_sheet_drag_excluded.ts
2001
+ var _r = "input, textarea, select, [contenteditable]:not([contenteditable=\"false\"]), [role=\"slider\"], [data-sheet-no-drag], [data-sheet-handle]";
2002
+ function vr(e, t) {
2003
+ let n = e;
2004
+ for (; n !== null && !t.includes(n);) {
2005
+ if (n.scrollTop > 0) return !0;
2006
+ n = n.parentElement;
1844
2007
  }
1845
- }, Yn = l(null);
2008
+ return !1;
2009
+ }
2010
+ function yr(e, t) {
2011
+ return !(e instanceof Element) || e.closest(_r) !== null || vr(e, t);
2012
+ }
2013
+ // src/components/bottom_sheet/use_sheet_content_drag.ts
2014
+ var br = 8, xr = 400;
2015
+ function Sr({ dialogRef: e, bodyRef: t, footerSlot: n, core: r, canDragDown: i, canDragUp: a }) {
2016
+ let o = y(r), s = y(n), c = y(i), l = y(a), u = y({ phase: "idle" }), d = y(!1);
2017
+ _(() => {
2018
+ o.current = r, s.current = n, c.current = i, l.current = a;
2019
+ }), m(() => {
2020
+ let n = e.current;
2021
+ if (n === null) return;
2022
+ let r, i = () => (t.current?.scrollTop ?? 0) <= 0, a = (e) => e instanceof Node && s.current?.contains(e) === !0, f = (e) => e instanceof Node && n.contains(e) && !t.current?.contains(e) && !a(e), p = (e) => {
2023
+ let r = e.touches[0], o = [n, t.current].filter((e) => e !== null), s = !f(e.target), u = c.current && (!s || i()), d = l.current && f(e.target);
2024
+ return e.touches.length !== 1 || a(e.target) || yr(e.target, o) || !(u || d) ? { phase: "ignored" } : {
2025
+ phase: "pending",
2026
+ startX: r.clientX,
2027
+ startY: r.clientY,
2028
+ canDragDown: u,
2029
+ canDragUp: d,
2030
+ isFromBody: s
2031
+ };
2032
+ }, m = () => {
2033
+ let e = u.current.phase === "dragging";
2034
+ u.current = { phase: "ignored" }, e && o.current.cancel();
2035
+ }, h = (e) => {
2036
+ clearTimeout(r), d.current = !1, e.touches.length === 1 ? u.current = p(e) : m();
2037
+ }, g = (e, t) => {
2038
+ let n = t.clientX - e.startX, r = t.clientY - e.startY;
2039
+ if (Math.max(Math.abs(n), Math.abs(r)) <= br) return;
2040
+ let a = Math.abs(r) > Math.abs(n), s = r > 0 ? "down" : "up", c = s === "down" ? e.canDragDown && (!e.isFromBody || i()) : e.canDragUp;
2041
+ !a || !c ? u.current = { phase: "ignored" } : (u.current = { phase: "dragging" }, o.current.begin(e.startY, s));
2042
+ }, _ = (e) => {
2043
+ if (e.touches.length !== 1) {
2044
+ m();
2045
+ return;
2046
+ }
2047
+ let t = e.touches[0], n = u.current;
2048
+ n.phase === "pending" && g(n, t), u.current.phase === "dragging" && (e.cancelable && e.preventDefault(), o.current.track(t.clientY));
2049
+ }, v = (e) => {
2050
+ let t = u.current.phase === "dragging";
2051
+ u.current = { phase: "idle" }, t && (o.current.release(e.changedTouches[0].clientY), o.current.consumeWasDragged(), d.current = !0, r = setTimeout(() => {
2052
+ d.current = !1;
2053
+ }, xr));
2054
+ }, y = () => {
2055
+ let e = u.current.phase === "dragging";
2056
+ u.current = { phase: "idle" }, e && o.current.cancel();
2057
+ }, b = (e) => {
2058
+ d.current && (d.current = !1, e.stopPropagation(), e.preventDefault());
2059
+ };
2060
+ return n.addEventListener("touchstart", h, { passive: !0 }), n.addEventListener("touchmove", _, { passive: !1 }), n.addEventListener("touchend", v), n.addEventListener("touchcancel", y), n.addEventListener("click", b, !0), () => {
2061
+ clearTimeout(r), n.removeEventListener("touchstart", h), n.removeEventListener("touchmove", _), n.removeEventListener("touchend", v), n.removeEventListener("touchcancel", y), n.removeEventListener("click", b, !0);
2062
+ };
2063
+ }, [e, t]);
2064
+ }
2065
+ // src/components/bottom_sheet/use_sheet_expansion.ts
2066
+ function Cr({ isEnded: e, onExpandedChange: t }) {
2067
+ let [n, r] = b(!1), i = y(!1), a = h((e) => t?.(e));
2068
+ e && n && r(!1), m(() => {
2069
+ i.current && !n && e && a(!1), i.current = n;
2070
+ }, [n, e]);
2071
+ let o = (e) => {
2072
+ r(e), t?.(e);
2073
+ };
2074
+ return {
2075
+ isExpanded: n,
2076
+ toggle: () => o(!n),
2077
+ expand: () => o(!0),
2078
+ collapse: () => o(!1)
2079
+ };
2080
+ }
2081
+ // src/components/modal/dismiss_guard_context.ts
2082
+ var wr = l(null);
1846
2083
  // src/components/modal/modal_footer_slot.tsx
1847
- function Xn({ onSlotChange: t, children: n, unstyled: r = !1 }) {
2084
+ function Tr({ onSlotChange: t, children: n, unstyled: r = !1 }) {
1848
2085
  return /* @__PURE__ */ w("div", {
1849
2086
  ref: t,
1850
2087
  className: e("flex items-center justify-end flex-shrink-0 empty:hidden", !r && ["gap-3 px-6 py-4 border-t", "border-gray-100 dark:border-gray-800"]),
@@ -1852,46 +2089,45 @@ function Xn({ onSlotChange: t, children: n, unstyled: r = !1 }) {
1852
2089
  });
1853
2090
  }
1854
2091
  // src/components/modal/modal_footer_slot_context.ts
1855
- var Zn = l(null);
2092
+ var Er = l(null);
1856
2093
  // src/components/modal/modal_header.tsx
1857
- function Qn({ titleId: t, title: n, onDismiss: r, dismissible: i, closeLabel: a, unstyled: o = !1 }) {
1858
- let s = Q(), c = a ?? s.close;
2094
+ function Dr({ titleId: t, title: n, onDismiss: r, dismissible: i, closeLabel: a, unstyled: o = !1, actions: s }) {
2095
+ let c = Q(), l = a ?? c.close, u = /* @__PURE__ */ T(C, { children: [i && o && /* @__PURE__ */ w(X, {
2096
+ icon: "i-mdi-close",
2097
+ onClick: r,
2098
+ "aria-label": l,
2099
+ className: "min-h-6 min-w-6",
2100
+ unstyled: !0
2101
+ }), i && !o && /* @__PURE__ */ w(X, {
2102
+ icon: "i-mdi-close",
2103
+ onClick: r,
2104
+ "aria-label": l,
2105
+ variant: "subtle",
2106
+ size: "sm",
2107
+ radius: "full",
2108
+ className: "-mr-1"
2109
+ })] });
1859
2110
  return /* @__PURE__ */ T("div", {
1860
2111
  className: e("flex items-center justify-between flex-shrink-0", !o && "gap-4 px-6 pt-5 pb-4"),
1861
- children: [
1862
- /* @__PURE__ */ w("h2", {
1863
- id: t,
1864
- className: e(!o && "text-base font-medium tracking-tight text-gray-900 dark:text-gray-100"),
1865
- children: n
1866
- }),
1867
- i && o && /* @__PURE__ */ w(X, {
1868
- icon: "i-mdi-close",
1869
- onClick: r,
1870
- "aria-label": c,
1871
- className: "min-h-6 min-w-6",
1872
- unstyled: !0
1873
- }),
1874
- i && !o && /* @__PURE__ */ w(X, {
1875
- icon: "i-mdi-close",
1876
- onClick: r,
1877
- "aria-label": c,
1878
- variant: "subtle",
1879
- size: "sm",
1880
- radius: "full",
1881
- className: "-mr-1"
1882
- })
1883
- ]
2112
+ children: [/* @__PURE__ */ w("h2", {
2113
+ id: t,
2114
+ className: e(!o && "text-base font-medium tracking-tight text-gray-900 dark:text-gray-100"),
2115
+ children: n
2116
+ }), s ? /* @__PURE__ */ T("div", {
2117
+ className: e("flex items-center", !o && "gap-1"),
2118
+ children: [s, u]
2119
+ }) : u]
1884
2120
  });
1885
2121
  }
1886
2122
  // src/components/modal/use_guarded_dismiss.ts
1887
- function $n(e) {
2123
+ function Or(e) {
1888
2124
  try {
1889
2125
  return e();
1890
2126
  } catch (e) {
1891
2127
  return In(e), null;
1892
2128
  }
1893
2129
  }
1894
- function er({ onDismiss: e, isEnded: t }) {
2130
+ function kr({ onDismiss: e, isEnded: t }) {
1895
2131
  let n = y(e), r = y(t), i = y([]), a = y(!1);
1896
2132
  _(() => {
1897
2133
  n.current = e, r.current = t;
@@ -1907,42 +2143,39 @@ function er({ onDismiss: e, isEnded: t }) {
1907
2143
  }, []);
1908
2144
  return {
1909
2145
  dismiss: f(() => {
1910
- if (a.current) return;
2146
+ if (a.current) return !1;
1911
2147
  let e = i.current.at(-1);
1912
- if (!e) {
1913
- n.current();
1914
- return;
1915
- }
1916
- let t = $n(e.current);
1917
- t !== null && (typeof t == "boolean" ? t && n.current() : s(t));
2148
+ if (!e) return n.current(), !0;
2149
+ let t = Or(e.current);
2150
+ return t === null ? !1 : typeof t == "boolean" ? (t && n.current(), t) : (s(t), !1);
1918
2151
  }, [s]),
1919
2152
  registry: o
1920
2153
  };
1921
2154
  }
1922
2155
  // src/components/modal/keyboard_scroll_region_attribute.ts
1923
- var tr = "data-keyboard-scroll-region", nr = "a[href], button, input, select, textarea, summary, audio[controls], video[controls], [contenteditable]:not([contenteditable=\"false\"]), [tabindex]";
1924
- function rr(e) {
2156
+ var Ar = "data-keyboard-scroll-region", jr = "a[href], button, input, select, textarea, summary, audio[controls], video[controls], [contenteditable]:not([contenteditable=\"false\"]), [tabindex]";
2157
+ function Mr(e) {
1925
2158
  return e.matches(":disabled");
1926
2159
  }
1927
- function ir(e) {
2160
+ function Nr(e) {
1928
2161
  return e.getAttribute("tabindex") === "-1";
1929
2162
  }
1930
- function ar(e) {
2163
+ function Pr(e) {
1931
2164
  return e.matches("input[type=\"hidden\"]");
1932
2165
  }
1933
- function or(e) {
2166
+ function Fr(e) {
1934
2167
  return e.closest("[inert]") !== null;
1935
2168
  }
1936
- function sr(e) {
2169
+ function Ir(e) {
1937
2170
  return typeof e.checkVisibility != "function" || e.checkVisibility();
1938
2171
  }
1939
- function cr(e) {
1940
- return !rr(e) && !ir(e) && !ar(e) && !or(e) && sr(e);
2172
+ function Lr(e) {
2173
+ return !Mr(e) && !Nr(e) && !Pr(e) && !Fr(e) && Ir(e);
1941
2174
  }
1942
- function lr(e) {
2175
+ function Rr(e) {
1943
2176
  return e instanceof HTMLInputElement && e.type === "radio" && e.name !== "";
1944
2177
  }
1945
- function ur(e) {
2178
+ function zr(e) {
1946
2179
  let t = /* @__PURE__ */ new Map();
1947
2180
  for (let n of e) {
1948
2181
  let e = t.get(n.form) ?? /* @__PURE__ */ new Map();
@@ -1952,19 +2185,19 @@ function ur(e) {
1952
2185
  }
1953
2186
  return Array.from(t.values()).flatMap((e) => Array.from(e.values()));
1954
2187
  }
1955
- function dr(e) {
2188
+ function Br(e) {
1956
2189
  return e.find((e) => e.checked) ?? e[0];
1957
2190
  }
1958
- function fr(e) {
1959
- let t = Array.from(e.querySelectorAll(nr)).filter(cr), n = t.filter(lr), r = new Set(ur(n).map(dr));
1960
- return t.filter((e) => !lr(e) || r.has(e));
2191
+ function Vr(e) {
2192
+ let t = Array.from(e.querySelectorAll(jr)).filter(Lr), n = t.filter(Rr), r = new Set(zr(n).map(Br));
2193
+ return t.filter((e) => !Rr(e) || r.has(e));
1961
2194
  }
1962
2195
  // src/components/modal/use_keyboard_scroll_region.ts
1963
- var pr = {};
1964
- function mr(e) {
1965
- return e.scrollHeight > e.clientHeight && fr(e).length === 0;
2196
+ var Hr = {};
2197
+ function Ur(e) {
2198
+ return e.scrollHeight > e.clientHeight && Vr(e).length === 0;
1966
2199
  }
1967
- var hr = [
2200
+ var Wr = [
1968
2201
  "disabled",
1969
2202
  "tabindex",
1970
2203
  "hidden",
@@ -1972,39 +2205,39 @@ var hr = [
1972
2205
  "href",
1973
2206
  "contenteditable"
1974
2207
  ];
1975
- function gr(e, t) {
2208
+ function Gr(e, t) {
1976
2209
  e.disconnect(), e.observe(t);
1977
2210
  for (let n of t.children) e.observe(n);
1978
2211
  }
1979
- function _r(e, t) {
2212
+ function Kr(e, t) {
1980
2213
  let n = typeof ResizeObserver > "u" ? void 0 : new ResizeObserver(t), r = new MutationObserver(() => {
1981
- t(), n && gr(n, e);
2214
+ t(), n && Gr(n, e);
1982
2215
  });
1983
2216
  return r.observe(e, {
1984
2217
  childList: !0,
1985
2218
  subtree: !0,
1986
2219
  attributes: !0,
1987
- attributeFilter: hr
1988
- }), n && gr(n, e), () => {
2220
+ attributeFilter: Wr
2221
+ }), n && Gr(n, e), () => {
1989
2222
  r.disconnect(), n?.disconnect();
1990
2223
  };
1991
2224
  }
1992
- function vr({ labelledBy: e, label: t }) {
2225
+ function qr({ labelledBy: e, label: t }) {
1993
2226
  let [n, r] = b(null), [i, a] = b(null);
1994
2227
  return m(() => {
1995
2228
  if (!n) return;
1996
- let e = () => a(mr(n) ? n : null);
1997
- return e(), _r(n, e);
2229
+ let e = () => a(Ur(n) ? n : null);
2230
+ return e(), Kr(n, e);
1998
2231
  }, [n]), n === null || i !== n || !(e || t) ? {
1999
2232
  ref: r,
2000
- scrollableProps: pr,
2233
+ scrollableProps: Hr,
2001
2234
  focusClassName: void 0
2002
2235
  } : {
2003
2236
  ref: r,
2004
2237
  scrollableProps: {
2005
2238
  tabIndex: 0,
2006
2239
  role: "region",
2007
- [tr]: !0,
2240
+ [Ar]: !0,
2008
2241
  "aria-labelledby": e,
2009
2242
  "aria-label": e ? void 0 : t
2010
2243
  },
@@ -2012,74 +2245,77 @@ function vr({ labelledBy: e, label: t }) {
2012
2245
  };
2013
2246
  }
2014
2247
  // src/components/modal/body_scroll_lock.ts
2015
- var yr = "--scrollbar-compensation", br = 0, xr;
2016
- function Sr() {
2248
+ var Jr = "--scrollbar-compensation", Yr = 0, Xr;
2249
+ function Zr() {
2017
2250
  let { style: e } = document.documentElement;
2018
2251
  return {
2019
2252
  overflow: e.overflow,
2020
2253
  overflowX: e.overflowX,
2021
2254
  overflowY: e.overflowY,
2022
2255
  paddingRight: e.paddingRight,
2023
- scrollbarCompensation: e.getPropertyValue(yr)
2256
+ scrollbarCompensation: e.getPropertyValue(Jr)
2024
2257
  };
2025
2258
  }
2026
- function Cr(e) {
2259
+ function Qr(e) {
2027
2260
  let { style: t } = document.documentElement;
2028
- t.overflow = e.overflow, t.overflowX = e.overflowX, t.overflowY = e.overflowY, t.paddingRight = e.paddingRight, e.scrollbarCompensation === "" ? t.removeProperty(yr) : t.setProperty(yr, e.scrollbarCompensation);
2261
+ t.overflow = e.overflow, t.overflowX = e.overflowX, t.overflowY = e.overflowY, t.paddingRight = e.paddingRight, e.scrollbarCompensation === "" ? t.removeProperty(Jr) : t.setProperty(Jr, e.scrollbarCompensation);
2029
2262
  }
2030
- function wr(e, t) {
2263
+ function $r(e, t) {
2031
2264
  let { style: n } = document.documentElement;
2032
- n.paddingRight = `${t + e}px`, n.setProperty(yr, `${e}px`);
2265
+ n.paddingRight = `${t + e}px`, n.setProperty(Jr, `${e}px`);
2033
2266
  }
2034
- function Tr() {
2035
- if (br === 0) {
2267
+ function ei() {
2268
+ if (Yr === 0) {
2036
2269
  let e = document.documentElement;
2037
- xr = Sr();
2270
+ Xr = Zr();
2038
2271
  let t = Number.parseFloat(getComputedStyle(e).paddingRight) || 0, n = e.clientWidth;
2039
2272
  e.style.overflow = "hidden";
2040
2273
  let r = e.clientWidth - n;
2041
- r > 0 && wr(r, t);
2274
+ r > 0 && $r(r, t);
2042
2275
  }
2043
- br += 1;
2276
+ Yr += 1;
2044
2277
  }
2045
- function Er() {
2046
- --br, br === 0 && xr && (Cr(xr), xr = void 0);
2278
+ function ti() {
2279
+ --Yr, Yr === 0 && Xr && (Qr(Xr), Xr = void 0);
2047
2280
  }
2048
- function Dr() {
2049
- m(() => (Tr(), Er), []);
2281
+ function ni() {
2282
+ m(() => (ei(), ti), []);
2050
2283
  }
2051
2284
  // src/components/modal/modal_stack.ts
2052
- var Or = [];
2053
- function kr(e, t) {
2054
- return Or.push({
2285
+ var ri = [];
2286
+ function ii(e, t) {
2287
+ return ri.push({
2055
2288
  token: e,
2056
2289
  requestDismiss: t
2057
2290
  }), () => {
2058
- let t = Or.findIndex((t) => t.token === e);
2059
- t !== -1 && Or.splice(t, 1);
2291
+ let t = ri.findIndex((t) => t.token === e);
2292
+ t !== -1 && ri.splice(t, 1);
2060
2293
  };
2061
2294
  }
2062
- function Ar(e) {
2063
- return Or.at(-1)?.token === e;
2295
+ function ai(e) {
2296
+ return ri.at(-1)?.token === e;
2297
+ }
2298
+ function oi() {
2299
+ return ri.length > 0;
2064
2300
  }
2065
- function jr() {
2066
- let e = Or.at(-1);
2301
+ function si() {
2302
+ let e = ri.at(-1);
2067
2303
  return e ? (e.requestDismiss(), !0) : !1;
2068
2304
  }
2069
2305
  // src/components/modal/use_modal_dialog.ts
2070
- function Mr(e) {
2071
- return fr(e).filter((e) => !e.hasAttribute(tr));
2306
+ function ci(e) {
2307
+ return Vr(e).filter((e) => !e.hasAttribute(Ar));
2072
2308
  }
2073
- function Nr({ dialog: e, content: t, fallbackScope: n }) {
2074
- let r = t ? Mr(t)[0] : void 0;
2075
- return r || n === "content" ? r : e ? Mr(e)[0] : void 0;
2309
+ function li({ dialog: e, content: t, fallbackScope: n }) {
2310
+ let r = t ? ci(t)[0] : void 0;
2311
+ return r || n === "content" ? r : e ? ci(e)[0] : void 0;
2076
2312
  }
2077
- function Pr(e) {
2078
- let t = Nr(e);
2313
+ function ui(e) {
2314
+ let t = li(e);
2079
2315
  (e.initialFocusRef?.current ?? t ?? e.dialog)?.focus();
2080
2316
  }
2081
- function Fr(e, t) {
2082
- let n = fr(t);
2317
+ function di(e, t) {
2318
+ let n = Vr(t);
2083
2319
  if (n.length === 0) {
2084
2320
  e.preventDefault(), t.focus();
2085
2321
  return;
@@ -2087,10 +2323,10 @@ function Fr(e, t) {
2087
2323
  let r = n[0], i = n[n.length - 1], a = document.activeElement;
2088
2324
  (a instanceof HTMLElement ? n.indexOf(a) : -1) === -1 ? (e.preventDefault(), (e.shiftKey ? i : r).focus()) : e.shiftKey && a === r ? (e.preventDefault(), i.focus()) : !e.shiftKey && a === i && (e.preventDefault(), r.focus());
2089
2325
  }
2090
- function Ir() {
2326
+ function fi() {
2091
2327
  return typeof document > "u" ? null : document.activeElement instanceof HTMLElement ? document.activeElement : null;
2092
2328
  }
2093
- function Lr() {
2329
+ function pi() {
2094
2330
  let [e, t] = b(!1);
2095
2331
  return m(() => {
2096
2332
  let e = requestAnimationFrame(() => {
@@ -2099,15 +2335,15 @@ function Lr() {
2099
2335
  return () => cancelAnimationFrame(e);
2100
2336
  }, []), e;
2101
2337
  }
2102
- function Rr(e, { isEnded: t, modalToken: n }) {
2338
+ function mi(e, { isEnded: t, modalToken: n }) {
2103
2339
  m(() => {
2104
2340
  if (t) return;
2105
2341
  let r = (t) => {
2106
- if (Ar(n)) {
2342
+ if (ai(n)) {
2107
2343
  if (t.key === "Escape") {
2108
2344
  if (t.defaultPrevented) return;
2109
- t.preventDefault(), jr();
2110
- } else t.key === "Tab" && e.current && Fr(t, e.current);
2345
+ t.preventDefault(), si();
2346
+ } else t.key === "Tab" && e.current && di(t, e.current);
2111
2347
  }
2112
2348
  };
2113
2349
  return document.addEventListener("keydown", r), () => document.removeEventListener("keydown", r);
@@ -2117,18 +2353,18 @@ function Rr(e, { isEnded: t, modalToken: n }) {
2117
2353
  e
2118
2354
  ]);
2119
2355
  }
2120
- function zr({ isEnded: e, onDismiss: t, dismissible: n, initialFocusRef: r, initialFocusFallbackScope: i = "dialog", getFocusFallback: a }) {
2121
- let [o] = b(() => Symbol("modal")), [s, c] = b(null), l = y(null), u = y(null), [d] = b(Ir), f = y(() => {});
2356
+ function hi({ isEnded: e, onDismiss: t, dismissible: n, initialFocusRef: r, initialFocusFallbackScope: i = "dialog", getFocusFallback: a }) {
2357
+ let [o] = b(() => Symbol("modal")), [s, c] = b(null), l = y(null), u = y(null), [d] = b(fi), f = y(() => {});
2122
2358
  _(() => {
2123
2359
  f.current = () => {
2124
2360
  n && t();
2125
2361
  };
2126
2362
  }), m(() => {
2127
- if (!e) return kr(o, () => f.current());
2128
- }, [e, o]), Dr();
2129
- let p = Lr();
2363
+ if (!e) return ii(o, () => f.current());
2364
+ }, [e, o]), ni();
2365
+ let p = pi();
2130
2366
  return m(() => {
2131
- s && !e && Pr({
2367
+ s && !e && ui({
2132
2368
  dialog: l.current,
2133
2369
  content: u.current,
2134
2370
  initialFocusRef: r,
@@ -2140,7 +2376,7 @@ function zr({ isEnded: e, onDismiss: t, dismissible: n, initialFocusRef: r, init
2140
2376
  e,
2141
2377
  d,
2142
2378
  a
2143
- ]), Rr(l, {
2379
+ ]), mi(l, {
2144
2380
  isEnded: e,
2145
2381
  modalToken: o
2146
2382
  }), {
@@ -2158,8 +2394,13 @@ function zr({ isEnded: e, onDismiss: t, dismissible: n, initialFocusRef: r, init
2158
2394
  }
2159
2395
  };
2160
2396
  }
2397
+ // src/components/shared/get_main_element.ts
2398
+ function gi() {
2399
+ let e = document.querySelector("main");
2400
+ return e && !e.hasAttribute("tabindex") && (e.tabIndex = -1), e;
2401
+ }
2161
2402
  // src/components/toast/toast_announcer_slot.tsx
2162
- var Br = () => /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w("div", {
2403
+ var _i = () => /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w("div", {
2163
2404
  role: "status",
2164
2405
  className: "sr-only",
2165
2406
  "data-ms-toast-announcer": "polite"
@@ -2167,34 +2408,182 @@ var Br = () => /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w("div", {
2167
2408
  role: "alert",
2168
2409
  className: "sr-only",
2169
2410
  "data-ms-toast-announcer": "assertive"
2170
- })] }), Vr = E((e) => ({
2411
+ })] }), vi = E((e) => ({
2171
2412
  globalHotkeysEnabled: !0,
2172
2413
  setGlobalHotkeysEnabled: (t) => e({ globalHotkeysEnabled: t })
2173
- })), Hr = 0;
2174
- function Ur() {
2175
- m(() => (Hr += 1, Hr === 1 && Vr.getState().setGlobalHotkeysEnabled(!1), () => {
2176
- --Hr, Hr === 0 && Vr.getState().setGlobalHotkeysEnabled(!0);
2414
+ })), yi = 0;
2415
+ function bi() {
2416
+ m(() => (yi += 1, yi === 1 && vi.getState().setGlobalHotkeysEnabled(!1), () => {
2417
+ --yi, yi === 0 && vi.getState().setGlobalHotkeysEnabled(!0);
2177
2418
  }), []);
2178
2419
  }
2179
- // src/components/drawer/drawer.tsx
2180
- function Wr() {
2181
- let e = document.querySelector("main");
2182
- return e && !e.hasAttribute("tabindex") && (e.tabIndex = -1), e;
2420
+ // src/components/bottom_sheet/bottom_sheet_dialog.tsx
2421
+ function xi({ isEnded: t, onDismiss: n, title: r, children: i, footer: a, height: o, radius: s, expandable: c, onExpandedChange: l, className: u, panelClassName: d, backdropClassName: f, unstyled: p = !1, dismissible: m, closeLabel: h, initialFocusRef: _ }) {
2422
+ bi();
2423
+ let y = g(), { dismiss: b, registry: x } = kr({
2424
+ onDismiss: n,
2425
+ isEnded: t
2426
+ }), { dialogRef: C, contentRef: E, footerSlot: D, setFooterSlot: O, isVisible: k, handleBackdropClick: A, handleBackdropMouseDown: j } = hi({
2427
+ isEnded: t,
2428
+ onDismiss: b,
2429
+ dismissible: m,
2430
+ initialFocusRef: _,
2431
+ initialFocusFallbackScope: "content",
2432
+ getFocusFallback: gi
2433
+ }), { isExpanded: M, toggle: N, expand: P, collapse: F } = Cr({
2434
+ isEnded: t,
2435
+ onExpandedChange: l
2436
+ }), I = () => M ? (F(), !1) : b(), L = c && !M, R = sr({
2437
+ dialogRef: C,
2438
+ isEnded: t,
2439
+ isExpanded: M,
2440
+ canExpand: L,
2441
+ onExpand: P,
2442
+ onRelease: I
2443
+ });
2444
+ Sr({
2445
+ dialogRef: C,
2446
+ bodyRef: E,
2447
+ footerSlot: D,
2448
+ core: R,
2449
+ canDragDown: m || M,
2450
+ canDragUp: L
2451
+ }), gr(C, t);
2452
+ let { ref: z, scrollableProps: B, focusClassName: V } = qr({ labelledBy: y }), H = v(() => K(E, z), [E, z]), U = c && /* @__PURE__ */ w(Wn, {
2453
+ isExpanded: M,
2454
+ onToggle: N,
2455
+ unstyled: p
2456
+ }), W = M ? "rounded-t-none" : pr[s];
2457
+ return /* @__PURE__ */ w(wr.Provider, {
2458
+ value: x,
2459
+ children: S(/* @__PURE__ */ T("div", {
2460
+ className: e("fixed inset-0 z-50", !p && "transition-opacity duration-200 ease-out", k ? "opacity-100" : "opacity-0"),
2461
+ onClick: A,
2462
+ onMouseDown: j,
2463
+ children: [/* @__PURE__ */ w("div", {
2464
+ className: e("fixed inset-0", !p && "bg-black/60 backdrop-blur-md", f),
2465
+ "aria-hidden": "true"
2466
+ }), /* @__PURE__ */ T("div", {
2467
+ ref: C,
2468
+ role: "dialog",
2469
+ "aria-modal": "true",
2470
+ "aria-labelledby": y,
2471
+ tabIndex: -1,
2472
+ "data-bottom-sheet": "",
2473
+ "data-state": k ? "open" : "closed",
2474
+ inert: t,
2475
+ className: e(fr, M ? dr : ur[o], !p && [
2476
+ "bg-white dark:bg-gray-900",
2477
+ "[&,&_*]:[scrollbar-width:thin] [scrollbar-color:theme(colors.gray.300)_transparent] hover:[scrollbar-color:theme(colors.gray.400)_transparent] dark:[scrollbar-color:theme(colors.gray.600)_transparent] dark:hover:[scrollbar-color:theme(colors.gray.500)_transparent]",
2478
+ "shadow-2xl",
2479
+ W,
2480
+ "ms-bottom-sheet-transition"
2481
+ ], !k && "ms-bottom-sheet-offscreen", d),
2482
+ onClick: (e) => e.stopPropagation(),
2483
+ children: [
2484
+ m && !M && /* @__PURE__ */ w(lr, {
2485
+ core: R,
2486
+ unstyled: p
2487
+ }),
2488
+ /* @__PURE__ */ w(_i, {}),
2489
+ /* @__PURE__ */ w(Dr, {
2490
+ titleId: y,
2491
+ title: r,
2492
+ onDismiss: b,
2493
+ dismissible: m,
2494
+ closeLabel: h,
2495
+ unstyled: p,
2496
+ actions: U
2497
+ }),
2498
+ /* @__PURE__ */ w("div", {
2499
+ ref: H,
2500
+ ...B,
2501
+ className: e("flex-1 overflow-y-auto min-h-0 overscroll-y-contain", !p && "px-6 pb-6 text-sm leading-relaxed text-gray-600 dark:text-gray-400", V, u),
2502
+ children: /* @__PURE__ */ w(Er.Provider, {
2503
+ value: D,
2504
+ children: i
2505
+ })
2506
+ }),
2507
+ /* @__PURE__ */ w(Tr, {
2508
+ onSlotChange: O,
2509
+ unstyled: p,
2510
+ children: a
2511
+ })
2512
+ ]
2513
+ })]
2514
+ }), document.body)
2515
+ });
2516
+ }
2517
+ // src/components/bottom_sheet/use_is_sheet_mounted.ts
2518
+ function Si(e, t) {
2519
+ let [n, r] = b(!e), i = h(() => t?.());
2520
+ return e && n && r(!1), m(() => {
2521
+ if (e || n) return;
2522
+ let t = setTimeout(() => {
2523
+ r(!0), i();
2524
+ }, 200);
2525
+ return () => clearTimeout(t);
2526
+ }, [e, n]), e || !n;
2527
+ }
2528
+ // src/components/bottom_sheet/bottom_sheet.tsx
2529
+ function Ci({ isOpen: e, onClose: t, height: n = "auto", radius: r = "xl", dismissible: i = !0, expandable: a = !1, onExited: o, ...s }) {
2530
+ return Si(e, o) ? /* @__PURE__ */ w(xi, {
2531
+ ...s,
2532
+ isEnded: !e,
2533
+ onDismiss: t,
2534
+ height: n,
2535
+ radius: r,
2536
+ dismissible: i,
2537
+ expandable: a
2538
+ }) : null;
2183
2539
  }
2184
- function Gr({ isEnded: t, onDismiss: n, title: r, children: i, footer: a, size: o, side: s, radius: c, className: l, panelClassName: u, backdropClassName: d, unstyled: f = !1, dismissible: p, closeLabel: m, initialFocusRef: h }) {
2185
- Ur();
2186
- let _ = g(), { dismiss: y, registry: b } = er({
2540
+ // src/components/drawer/drawer_styles.ts
2541
+ var wi = {
2542
+ sm: "ms-drawer-width-sm",
2543
+ md: "ms-drawer-width-md",
2544
+ lg: "ms-drawer-width-lg"
2545
+ }, Ti = {
2546
+ right: "right-0",
2547
+ left: "left-0"
2548
+ }, Ei = {
2549
+ right: "pt-[env(safe-area-inset-top)] pb-[env(safe-area-inset-bottom)] pr-[env(safe-area-inset-right)]",
2550
+ left: "pt-[env(safe-area-inset-top)] pb-[env(safe-area-inset-bottom)] pl-[env(safe-area-inset-left)]"
2551
+ }, Di = {
2552
+ right: "ms-drawer-offscreen-right",
2553
+ left: "ms-drawer-offscreen-left"
2554
+ }, Oi = {
2555
+ right: {
2556
+ none: "rounded-l-none",
2557
+ sm: "rounded-l-sm",
2558
+ md: "rounded-l-md",
2559
+ lg: "rounded-l-lg",
2560
+ xl: "rounded-l-xl",
2561
+ full: "rounded-l-lg"
2562
+ },
2563
+ left: {
2564
+ none: "rounded-r-none",
2565
+ sm: "rounded-r-sm",
2566
+ md: "rounded-r-md",
2567
+ lg: "rounded-r-lg",
2568
+ xl: "rounded-r-xl",
2569
+ full: "rounded-r-lg"
2570
+ }
2571
+ };
2572
+ // src/components/drawer/drawer.tsx
2573
+ function ki({ isEnded: t, onDismiss: n, title: r, children: i, footer: a, size: o, side: s, radius: c, className: l, panelClassName: u, backdropClassName: d, unstyled: f = !1, dismissible: p, closeLabel: m, initialFocusRef: h }) {
2574
+ bi();
2575
+ let _ = g(), { dismiss: y, registry: b } = kr({
2187
2576
  onDismiss: n,
2188
2577
  isEnded: t
2189
- }), { dialogRef: x, contentRef: C, footerSlot: E, setFooterSlot: D, isVisible: O, handleBackdropClick: k, handleBackdropMouseDown: A } = zr({
2578
+ }), { dialogRef: x, contentRef: C, footerSlot: E, setFooterSlot: D, isVisible: O, handleBackdropClick: k, handleBackdropMouseDown: A } = hi({
2190
2579
  isEnded: t,
2191
2580
  onDismiss: y,
2192
2581
  dismissible: p,
2193
2582
  initialFocusRef: h,
2194
2583
  initialFocusFallbackScope: "content",
2195
- getFocusFallback: Wr
2196
- }), { ref: j, scrollableProps: M, focusClassName: N } = vr({ labelledBy: _ }), P = v(() => K(C, j), [C, j]);
2197
- return /* @__PURE__ */ w(Yn.Provider, {
2584
+ getFocusFallback: gi
2585
+ }), { ref: j, scrollableProps: M, focusClassName: N } = qr({ labelledBy: _ }), P = v(() => K(C, j), [C, j]);
2586
+ return /* @__PURE__ */ w(wr.Provider, {
2198
2587
  value: b,
2199
2588
  children: S(/* @__PURE__ */ T("div", {
2200
2589
  className: e("fixed inset-0 z-50", !f && "transition-opacity duration-200 ease-out", O ? "opacity-100" : "opacity-0"),
@@ -2211,17 +2600,17 @@ function Gr({ isEnded: t, onDismiss: n, title: r, children: i, footer: a, size:
2211
2600
  tabIndex: -1,
2212
2601
  "data-state": O ? "open" : "closed",
2213
2602
  inert: t,
2214
- className: e("fixed inset-y-0 h-full flex flex-col overflow-hidden", Gn[s], Kn[s], Wn[o], "focus:outline-none", !f && [
2603
+ className: e("fixed inset-y-0 h-full flex flex-col overflow-hidden", Ti[s], Ei[s], wi[o], "focus:outline-none", !f && [
2215
2604
  "bg-white dark:bg-gray-900",
2216
2605
  "[&,&_*]:[scrollbar-width:thin] [scrollbar-color:theme(colors.gray.300)_transparent] hover:[scrollbar-color:theme(colors.gray.400)_transparent] dark:[scrollbar-color:theme(colors.gray.600)_transparent] dark:hover:[scrollbar-color:theme(colors.gray.500)_transparent]",
2217
2606
  "shadow-2xl",
2218
- Jn[s][c],
2607
+ Oi[s][c],
2219
2608
  "ms-drawer-transition"
2220
- ], !O && qn[s], u),
2609
+ ], !O && Di[s], u),
2221
2610
  onClick: (e) => e.stopPropagation(),
2222
2611
  children: [
2223
- /* @__PURE__ */ w(Br, {}),
2224
- /* @__PURE__ */ w(Qn, {
2612
+ /* @__PURE__ */ w(_i, {}),
2613
+ /* @__PURE__ */ w(Dr, {
2225
2614
  titleId: _,
2226
2615
  title: r,
2227
2616
  onDismiss: y,
@@ -2233,12 +2622,12 @@ function Gr({ isEnded: t, onDismiss: n, title: r, children: i, footer: a, size:
2233
2622
  ref: P,
2234
2623
  ...M,
2235
2624
  className: e("flex-1 overflow-y-auto min-h-0", !f && "px-6 pb-6 text-sm leading-relaxed text-gray-600 dark:text-gray-400", N, l),
2236
- children: /* @__PURE__ */ w(Zn.Provider, {
2625
+ children: /* @__PURE__ */ w(Er.Provider, {
2237
2626
  value: E,
2238
2627
  children: i
2239
2628
  })
2240
2629
  }),
2241
- /* @__PURE__ */ w(Xn, {
2630
+ /* @__PURE__ */ w(Tr, {
2242
2631
  onSlotChange: D,
2243
2632
  unstyled: f,
2244
2633
  children: a
@@ -2248,7 +2637,7 @@ function Gr({ isEnded: t, onDismiss: n, title: r, children: i, footer: a, size:
2248
2637
  }), document.body)
2249
2638
  });
2250
2639
  }
2251
- function Kr(e, t) {
2640
+ function Ai(e, t) {
2252
2641
  let [n, r] = b(!e), i = h(() => t?.());
2253
2642
  return e && n && r(!1), m(() => {
2254
2643
  if (e || n) return;
@@ -2258,8 +2647,8 @@ function Kr(e, t) {
2258
2647
  return () => clearTimeout(t);
2259
2648
  }, [e, n]), e || !n;
2260
2649
  }
2261
- function qr({ isOpen: e, onClose: t, size: n = "md", side: r = "right", radius: i = "none", dismissible: a = !0, onExited: o, ...s }) {
2262
- return Kr(e, o) ? /* @__PURE__ */ w(Gr, {
2650
+ function ji({ isOpen: e, onClose: t, size: n = "md", side: r = "right", radius: i = "none", dismissible: a = !0, onExited: o, ...s }) {
2651
+ return Ai(e, o) ? /* @__PURE__ */ w(ki, {
2263
2652
  ...s,
2264
2653
  isEnded: !e,
2265
2654
  onDismiss: t,
@@ -2270,21 +2659,21 @@ function qr({ isOpen: e, onClose: t, size: n = "md", side: r = "right", radius:
2270
2659
  }) : null;
2271
2660
  }
2272
2661
  // src/components/shared/use_controlled_length.ts
2273
- function Jr(e) {
2662
+ function Mi(e) {
2274
2663
  return typeof e == "string" ? e.length : 0;
2275
2664
  }
2276
- function Yr(e, t) {
2277
- let [n, r] = b(Jr(t)), i = e !== void 0;
2665
+ function Ni(e, t) {
2666
+ let [n, r] = b(Mi(t)), i = e !== void 0;
2278
2667
  return {
2279
- length: i ? Jr(e) : n,
2668
+ length: i ? Mi(e) : n,
2280
2669
  trackLength: (e) => {
2281
2670
  i || r(e.length);
2282
2671
  }
2283
2672
  };
2284
2673
  }
2285
2674
  // src/components/input/input.tsx
2286
- function Xr({ label: t, description: n, error: r, showCharCount: i = !1, minLength: a, maxLength: o, radius: s = "md", unstyled: c = !1, className: l, wrapperClassName: u, value: d, defaultValue: f, onChange: p, id: m, "aria-describedby": h, "aria-label": g, ..._ }) {
2287
- let { fieldId: v, errorId: y, descriptionId: b, labelId: x, characterCountId: S } = ot(m), { length: C, trackLength: E } = Yr(d, f), D = i && (a !== void 0 || o !== void 0), O = (e) => {
2675
+ function Pi({ label: t, description: n, error: r, showCharCount: i = !1, minLength: a, maxLength: o, radius: s = "md", unstyled: c = !1, className: l, wrapperClassName: u, value: d, defaultValue: f, onChange: p, id: m, "aria-describedby": h, "aria-label": g, ..._ }) {
2676
+ let { fieldId: v, errorId: y, descriptionId: b, labelId: x, characterCountId: S } = ot(m), { length: C, trackLength: E } = Ni(d, f), D = i && (a !== void 0 || o !== void 0), O = (e) => {
2288
2677
  E(e.target.value), p?.(e);
2289
2678
  };
2290
2679
  return /* @__PURE__ */ T(Ct, {
@@ -2299,9 +2688,10 @@ function Xr({ label: t, description: n, error: r, showCharCount: i = !1, minLeng
2299
2688
  children: [/* @__PURE__ */ w("input", {
2300
2689
  id: v,
2301
2690
  className: e("w-full disabled:opacity-50 disabled:cursor-not-allowed", !c && [
2302
- Ke,
2691
+ je,
2303
2692
  z[s],
2304
- "px-3 py-2 text-sm"
2693
+ "px-3 py-2 text-sm",
2694
+ "min-h-[var(--ms-control-min-height,0px)]"
2305
2695
  ], !c && r && e("border-red-500 dark:border-red-400", "focus:ring-red-500"), l),
2306
2696
  ...d === void 0 ? { defaultValue: f } : { value: d },
2307
2697
  minLength: a,
@@ -2312,7 +2702,7 @@ function Xr({ label: t, description: n, error: r, showCharCount: i = !1, minLeng
2312
2702
  "aria-labelledby": nn(t, x, g),
2313
2703
  "aria-describedby": W(h, !!n && b, r && y, D && S),
2314
2704
  ..._
2315
- }), D && /* @__PURE__ */ w(Ue, {
2705
+ }), D && /* @__PURE__ */ w(Xe, {
2316
2706
  id: S,
2317
2707
  current: C,
2318
2708
  min: a,
@@ -2323,13 +2713,13 @@ function Xr({ label: t, description: n, error: r, showCharCount: i = !1, minLeng
2323
2713
  });
2324
2714
  }
2325
2715
  // src/components/kbd/kbd.tsx
2326
- var Zr = {
2716
+ var Fi = {
2327
2717
  xs: "px-1.5 py-0.5 text-xs",
2328
2718
  sm: "px-2 py-0.5 text-xs",
2329
2719
  md: "px-2.5 py-1 text-sm",
2330
2720
  lg: "px-3 py-1 text-base"
2331
- }, Qr = ({ children: t, size: n = "sm", radius: r = "sm", unstyled: i = !1, className: a }) => /* @__PURE__ */ w("kbd", {
2332
- className: e("inline-flex items-center", Zr[n], !i && [
2721
+ }, Ii = ({ children: t, size: n = "sm", radius: r = "sm", unstyled: i = !1, className: a }) => /* @__PURE__ */ w("kbd", {
2722
+ className: e("inline-flex items-center", Fi[n], !i && [
2333
2723
  "border font-semibold uppercase",
2334
2724
  "text-gray-600 dark:text-gray-300",
2335
2725
  "bg-gray-100 dark:bg-gray-700",
@@ -2337,18 +2727,18 @@ var Zr = {
2337
2727
  z[r]
2338
2728
  ], a),
2339
2729
  children: t
2340
- }), $r = 4;
2341
- function ei(e, t) {
2730
+ }), Li = 4;
2731
+ function Ri(e, t) {
2342
2732
  return t === "center" ? e : `${e}-${t}`;
2343
2733
  }
2344
- function ti({ trigger: t, children: o, side: l = "bottom", align: d = "start", radius: p = "md", unstyled: h = !1, panelClassName: _, className: v, disabled: x = !1, ref: S }) {
2734
+ function zi({ trigger: t, children: o, side: l = "bottom", align: d = "start", radius: p = "md", unstyled: h = !1, panelClassName: _, className: v, disabled: x = !1, ref: S }) {
2345
2735
  let C = y(null), [E, D] = b(null), [O, k] = b("first"), { isMounted: A, isVisible: j, setIsVisible: M, open: N, close: P } = te(), { refs: F, floatingStyles: I, isPositioned: L } = s({
2346
- placement: ei(l, d),
2736
+ placement: Ri(l, d),
2347
2737
  strategy: "fixed",
2348
2738
  open: A,
2349
2739
  whileElementsMounted: n,
2350
2740
  middleware: [
2351
- i($r),
2741
+ i(Li),
2352
2742
  r(),
2353
2743
  a({ padding: 8 }),
2354
2744
  jn()
@@ -2398,7 +2788,7 @@ function ti({ trigger: t, children: o, side: l = "bottom", align: d = "start", r
2398
2788
  });
2399
2789
  }
2400
2790
  // src/components/menu_group/menu_group.tsx
2401
- function ni({ label: t, children: n, unstyled: r = !1, className: i, wrapperClassName: a }) {
2791
+ function Bi({ label: t, children: n, unstyled: r = !1, className: i, wrapperClassName: a }) {
2402
2792
  let o = g();
2403
2793
  return /* @__PURE__ */ T("div", {
2404
2794
  role: "group",
@@ -2413,12 +2803,12 @@ function ni({ label: t, children: n, unstyled: r = !1, className: i, wrapperClas
2413
2803
  });
2414
2804
  }
2415
2805
  // src/components/menu_item/menu_item_content.tsx
2416
- var ri = ({ icon: t, danger: n = !1, unstyled: r = !1, children: i }) => /* @__PURE__ */ T(C, { children: [t && /* @__PURE__ */ w("span", {
2806
+ var Vi = ({ icon: t, danger: n = !1, unstyled: r = !1, children: i }) => /* @__PURE__ */ T(C, { children: [t && /* @__PURE__ */ w("span", {
2417
2807
  className: e(t, "h-4 w-4 flex-shrink-0", !n && !r && "text-gray-500 dark:text-gray-400"),
2418
2808
  "aria-hidden": "true"
2419
2809
  }), i] });
2420
2810
  // src/components/menu_item/menu_item_end.tsx
2421
- function ii({ trailing: t, selected: n, unstyled: r = !1 }) {
2811
+ function Hi({ trailing: t, selected: n, unstyled: r = !1 }) {
2422
2812
  let i = n !== void 0;
2423
2813
  return !t && !i ? null : /* @__PURE__ */ T("span", {
2424
2814
  className: "ml-auto flex flex-shrink-0 items-center gap-2 pl-2",
@@ -2432,26 +2822,26 @@ function ii({ trailing: t, selected: n, unstyled: r = !1 }) {
2432
2822
  });
2433
2823
  }
2434
2824
  // src/components/menu_item/menu_item_styles.ts
2435
- var ai = "flex w-full cursor-pointer items-center whitespace-nowrap text-left", oi = "gap-2 px-3 py-2 text-sm transition-colors", si = {
2825
+ var Ui = "flex w-full cursor-pointer items-center whitespace-nowrap text-left", Wi = "gap-2 px-3 py-2 text-sm transition-colors", Gi = {
2436
2826
  default: "text-gray-900 dark:text-gray-100 focus-visible:bg-blue-50 dark:focus-visible:bg-blue-900/40",
2437
2827
  danger: "text-red-700 dark:text-red-400 focus-visible:bg-red-50 dark:focus-visible:bg-red-950/40"
2438
2828
  };
2439
- function ci({ hoverClasses: t, stateClasses: n, danger: r, unstyled: i, radius: a, className: o }) {
2829
+ function Ki({ hoverClasses: t, stateClasses: n, danger: r, unstyled: i, radius: a, className: o }) {
2440
2830
  let s = r ? "danger" : "default";
2441
- return e(ai, !i && [
2831
+ return e(Ui, !i && [
2442
2832
  "outline-hidden focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-blue-500 dark:focus-visible:outline-blue-400",
2443
- oi,
2444
- si[s],
2833
+ Wi,
2834
+ Gi[s],
2445
2835
  t[s],
2446
2836
  a && z[a]
2447
2837
  ], n, o);
2448
2838
  }
2449
2839
  // src/components/menu_item/menu_item_button.tsx
2450
- var li = {
2840
+ var qi = {
2451
2841
  default: "hover:enabled:bg-gray-50 dark:hover:enabled:bg-gray-800/60",
2452
2842
  danger: "hover:enabled:bg-red-50 dark:hover:enabled:bg-red-950/40"
2453
- }, ui = ["disabled:cursor-not-allowed disabled:opacity-50"];
2454
- function di({ icon: e, trailing: t, onClick: n, selected: r, danger: i = !1, disabled: a = !1, children: o, radius: s, unstyled: c = !1, className: l, ref: u }) {
2843
+ }, Ji = ["disabled:cursor-not-allowed disabled:opacity-50"];
2844
+ function Yi({ icon: e, trailing: t, onClick: n, selected: r, danger: i = !1, disabled: a = !1, children: o, radius: s, unstyled: c = !1, className: l, ref: u }) {
2455
2845
  let d = yn();
2456
2846
  return /* @__PURE__ */ T("button", {
2457
2847
  ref: u,
@@ -2463,20 +2853,20 @@ function di({ icon: e, trailing: t, onClick: n, selected: r, danger: i = !1, dis
2463
2853
  e.stopPropagation(), n(e), d?.();
2464
2854
  },
2465
2855
  disabled: a,
2466
- className: ci({
2467
- hoverClasses: li,
2468
- stateClasses: ui,
2856
+ className: Ki({
2857
+ hoverClasses: qi,
2858
+ stateClasses: Ji,
2469
2859
  danger: i,
2470
2860
  unstyled: c,
2471
2861
  radius: s,
2472
2862
  className: l
2473
2863
  }),
2474
- children: [/* @__PURE__ */ w(ri, {
2864
+ children: [/* @__PURE__ */ w(Vi, {
2475
2865
  icon: e,
2476
2866
  danger: i,
2477
2867
  unstyled: c,
2478
2868
  children: o
2479
- }), /* @__PURE__ */ w(ii, {
2869
+ }), /* @__PURE__ */ w(Hi, {
2480
2870
  trailing: t,
2481
2871
  selected: r,
2482
2872
  unstyled: c
@@ -2484,11 +2874,11 @@ function di({ icon: e, trailing: t, onClick: n, selected: r, danger: i = !1, dis
2484
2874
  });
2485
2875
  }
2486
2876
  // src/components/menu_item/menu_item_link.tsx
2487
- var fi = "_blank", pi = "noopener noreferrer", mi = {
2877
+ var Xi = "_blank", Zi = "noopener noreferrer", Qi = {
2488
2878
  default: "hover:bg-gray-50 dark:hover:bg-gray-800/60",
2489
2879
  danger: "hover:bg-red-50 dark:hover:bg-red-950/40"
2490
- }, hi = ["no-underline", "aria-disabled:pointer-events-none aria-disabled:cursor-not-allowed aria-disabled:opacity-50"];
2491
- function gi({ icon: e, trailing: t, href: n, target: r, rel: i, danger: a = !1, disabled: o = !1, children: s, radius: c, unstyled: l = !1, className: u, ref: d }) {
2880
+ }, $i = ["no-underline", "aria-disabled:pointer-events-none aria-disabled:cursor-not-allowed aria-disabled:opacity-50"];
2881
+ function ea({ icon: e, trailing: t, href: n, target: r, rel: i, danger: a = !1, disabled: o = !1, children: s, radius: c, unstyled: l = !1, className: u, ref: d }) {
2492
2882
  let f = yn();
2493
2883
  return /* @__PURE__ */ T("a", {
2494
2884
  ref: d,
@@ -2496,91 +2886,91 @@ function gi({ icon: e, trailing: t, href: n, target: r, rel: i, danger: a = !1,
2496
2886
  tabIndex: -1,
2497
2887
  href: o ? void 0 : n,
2498
2888
  target: r,
2499
- rel: i ?? (r === fi ? pi : void 0),
2889
+ rel: i ?? (r === Xi ? Zi : void 0),
2500
2890
  "aria-disabled": o || void 0,
2501
2891
  onClick: (e) => {
2502
2892
  e.stopPropagation(), f?.();
2503
2893
  },
2504
- className: ci({
2505
- hoverClasses: mi,
2506
- stateClasses: hi,
2894
+ className: Ki({
2895
+ hoverClasses: Qi,
2896
+ stateClasses: $i,
2507
2897
  danger: a,
2508
2898
  unstyled: l,
2509
2899
  radius: c,
2510
2900
  className: u
2511
2901
  }),
2512
- children: [/* @__PURE__ */ w(ri, {
2902
+ children: [/* @__PURE__ */ w(Vi, {
2513
2903
  icon: e,
2514
2904
  danger: a,
2515
2905
  unstyled: l,
2516
2906
  children: s
2517
- }), /* @__PURE__ */ w(ii, {
2907
+ }), /* @__PURE__ */ w(Hi, {
2518
2908
  trailing: t,
2519
2909
  unstyled: l
2520
2910
  })]
2521
2911
  });
2522
2912
  }
2523
2913
  // src/components/menu_item/menu_item.tsx
2524
- function _i(e) {
2525
- return e.href === void 0 ? /* @__PURE__ */ w(di, { ...e }) : /* @__PURE__ */ w(gi, { ...e });
2914
+ function ta(e) {
2915
+ return e.href === void 0 ? /* @__PURE__ */ w(Yi, { ...e }) : /* @__PURE__ */ w(ea, { ...e });
2526
2916
  }
2527
2917
  // src/components/menu_separator/menu_separator.tsx
2528
- var vi = ({ unstyled: t = !1, className: n }) => /* @__PURE__ */ w("hr", {
2918
+ var na = ({ unstyled: t = !1, className: n }) => /* @__PURE__ */ w("hr", {
2529
2919
  "aria-orientation": "horizontal",
2530
2920
  className: e("w-full", !t && ["my-1 border-0 border-t", "border-gray-100 dark:border-gray-800"], n)
2531
- }), yi = {
2921
+ }), ra = {
2532
2922
  danger: "i-mdi-alert-circle",
2533
2923
  primary: "i-mdi-help-circle",
2534
2924
  success: "i-mdi-check-circle"
2535
- }, bi = {
2925
+ }, ia = {
2536
2926
  danger: "bg-red-50 text-red-600 dark:bg-red-500/10 dark:text-red-400",
2537
2927
  primary: "bg-blue-50 text-blue-600 dark:bg-blue-500/10 dark:text-blue-400",
2538
2928
  success: "bg-green-50 text-green-600 dark:bg-green-500/10 dark:text-green-400"
2539
2929
  };
2540
- function xi({ title: t, color: n }) {
2930
+ function aa({ title: t, color: n }) {
2541
2931
  return /* @__PURE__ */ T("div", {
2542
2932
  className: "flex items-center gap-3",
2543
2933
  children: [/* @__PURE__ */ w("span", {
2544
- className: e("flex h-9 w-9 shrink-0 items-center justify-center rounded-full", bi[n]),
2934
+ className: e("flex h-9 w-9 shrink-0 items-center justify-center rounded-full", ia[n]),
2545
2935
  "aria-hidden": "true",
2546
- children: /* @__PURE__ */ w("span", { className: e(yi[n], "h-5 w-5") })
2936
+ children: /* @__PURE__ */ w("span", { className: e(ra[n], "h-5 w-5") })
2547
2937
  }), t]
2548
2938
  });
2549
2939
  }
2550
2940
  // src/components/modal/modal_sheet_classes.ts
2551
- var Si = {
2941
+ var oa = {
2552
2942
  sm: "ms-modal-sheet-size-sm",
2553
2943
  md: "ms-modal-sheet-size-md",
2554
2944
  lg: "ms-modal-sheet-size-lg",
2555
2945
  xl: "ms-modal-sheet-size-xl"
2556
- }, Ci = {
2946
+ }, sa = {
2557
2947
  none: "ms-modal-sheet-radius-none",
2558
2948
  sm: "ms-modal-sheet-radius-sm",
2559
2949
  md: "ms-modal-sheet-radius-md",
2560
2950
  lg: "ms-modal-sheet-radius-lg",
2561
2951
  xl: "ms-modal-sheet-radius-xl",
2562
2952
  full: "ms-modal-sheet-radius-full"
2563
- }, wi = "a dialog needs an accessible name. Provide a non-empty `title` or `aria-label` prop.", Ti = {
2953
+ }, ca = "a dialog needs an accessible name. Provide a non-empty `title` or `aria-label` prop.", la = {
2564
2954
  sm: "max-w-md",
2565
2955
  md: "max-w-lg",
2566
2956
  lg: "max-w-2xl",
2567
2957
  xl: "max-w-4xl"
2568
- }, Ei = {
2958
+ }, ua = {
2569
2959
  auto: "",
2570
2960
  fixed: "ms-modal-height-fixed"
2571
- }, Di = {
2961
+ }, da = {
2572
2962
  auto: "overflow-y-auto",
2573
2963
  fixed: "overflow-hidden flex flex-col"
2574
2964
  };
2575
- function Oi({ isEnded: t, onDismiss: n, title: r, children: i, footer: a, size: o = "md", height: s = "auto", phoneLayout: c = "center", radius: l = "xl", className: u, panelClassName: d, backdropClassName: f, unstyled: p = !1, dismissible: m = !0, closeLabel: h, role: _ = "dialog", initialFocusRef: y, "aria-label": b }) {
2576
- let x = g(), C = g(), { dialogRef: E, contentRef: D, footerSlot: O, setFooterSlot: k, isVisible: A, handleBackdropClick: j, handleBackdropMouseDown: M } = zr({
2965
+ function fa({ isEnded: t, onDismiss: n, title: r, children: i, footer: a, size: o = "md", height: s = "auto", phoneLayout: c = "center", radius: l = "xl", className: u, panelClassName: d, backdropClassName: f, unstyled: p = !1, dismissible: m = !0, closeLabel: h, role: _ = "dialog", initialFocusRef: y, "aria-label": b }) {
2966
+ let x = g(), C = g(), { dialogRef: E, contentRef: D, footerSlot: O, setFooterSlot: k, isVisible: A, handleBackdropClick: j, handleBackdropMouseDown: M } = hi({
2577
2967
  isEnded: t,
2578
2968
  onDismiss: n,
2579
2969
  dismissible: m,
2580
2970
  initialFocusRef: y
2581
2971
  });
2582
- ut("Modal", !!r || !!b?.trim(), wi);
2583
- let { ref: N, scrollableProps: P, focusClassName: F } = vr({
2972
+ ut("Modal", !!r || !!b?.trim(), ca);
2973
+ let { ref: N, scrollableProps: P, focusClassName: F } = qr({
2584
2974
  labelledBy: r ? x : void 0,
2585
2975
  label: b
2586
2976
  }), I = v(() => K(D, N), [D, N]), L = s === "auto", R = c === "sheet", B = _ === "alertdialog" && !!i;
@@ -2605,18 +2995,18 @@ function Oi({ isEnded: t, onDismiss: n, title: r, children: i, footer: a, size:
2605
2995
  tabIndex: -1,
2606
2996
  "data-state": A ? "open" : "closed",
2607
2997
  "data-phone-layout": R ? "sheet" : void 0,
2608
- className: e("relative w-full", R ? Si[o] : Ti[o], Ei[s], R && "ms-modal-sheet-panel", R && s === "fixed" && "ms-modal-sheet-height-fixed", "ms-modal-max-height overflow-hidden flex flex-col", "focus:outline-none", !p && [
2998
+ className: e("relative w-full", R ? oa[o] : la[o], ua[s], R && "ms-modal-sheet-panel", R && s === "fixed" && "ms-modal-sheet-height-fixed", "ms-modal-max-height overflow-hidden flex flex-col", "focus:outline-none", !p && [
2609
2999
  "bg-white dark:bg-gray-900",
2610
3000
  "[&,&_*]:[scrollbar-width:thin] [scrollbar-color:theme(colors.gray.300)_transparent] hover:[scrollbar-color:theme(colors.gray.400)_transparent] dark:[scrollbar-color:theme(colors.gray.600)_transparent] dark:hover:[scrollbar-color:theme(colors.gray.500)_transparent]",
2611
3001
  "shadow-2xl",
2612
- R ? Ci[l] : z[l],
3002
+ R ? sa[l] : z[l],
2613
3003
  "transition-all duration-200 ease-out",
2614
3004
  A ? "opacity-100" : R ? "ms-modal-sheet-closed" : "ms-modal-panel-closed"
2615
3005
  ], d),
2616
3006
  onClick: (e) => e.stopPropagation(),
2617
3007
  children: [
2618
- /* @__PURE__ */ w(Br, {}),
2619
- r && /* @__PURE__ */ w(Qn, {
3008
+ /* @__PURE__ */ w(_i, {}),
3009
+ r && /* @__PURE__ */ w(Dr, {
2620
3010
  titleId: x,
2621
3011
  title: r,
2622
3012
  onDismiss: n,
@@ -2628,13 +3018,13 @@ function Oi({ isEnded: t, onDismiss: n, title: r, children: i, footer: a, size:
2628
3018
  ref: I,
2629
3019
  id: B ? C : void 0,
2630
3020
  ...L ? P : void 0,
2631
- className: e("flex-1 min-h-0", !p && "px-6 pb-6 text-sm leading-relaxed text-gray-600 dark:text-gray-400", Di[s], !p && !r && "pt-6", L && F, u),
2632
- children: /* @__PURE__ */ w(Zn.Provider, {
3021
+ className: e("flex-1 min-h-0", !p && "px-6 pb-6 text-sm leading-relaxed text-gray-600 dark:text-gray-400", da[s], !p && !r && "pt-6", L && F, u),
3022
+ children: /* @__PURE__ */ w(Er.Provider, {
2633
3023
  value: O,
2634
3024
  children: i
2635
3025
  })
2636
3026
  }),
2637
- /* @__PURE__ */ w(Xn, {
3027
+ /* @__PURE__ */ w(Tr, {
2638
3028
  onSlotChange: k,
2639
3029
  unstyled: p,
2640
3030
  children: a
@@ -2644,8 +3034,8 @@ function Oi({ isEnded: t, onDismiss: n, title: r, children: i, footer: a, size:
2644
3034
  }), document.body);
2645
3035
  }
2646
3036
  // src/components/modal/confirm_modal.tsx
2647
- var ki = D(({ call: e, title: t, children: n, confirmLabel: r, cancelLabel: i, confirmColor: a, radius: o, closeLabel: s, onConfirm: c, onError: l }) => {
2648
- Ur();
3037
+ var pa = D(({ call: e, title: t, children: n, confirmLabel: r, cancelLabel: i, confirmColor: a, radius: o, closeLabel: s, onConfirm: c, onError: l }) => {
3038
+ bi();
2649
3039
  let [u, d] = b(!1), f = y(null), p = () => e.end(!1), m = async () => {
2650
3040
  if (!c) e.end(!0);
2651
3041
  else {
@@ -2657,10 +3047,10 @@ var ki = D(({ call: e, title: t, children: n, confirmLabel: r, cancelLabel: i, c
2657
3047
  }
2658
3048
  }
2659
3049
  }, h = Q(), g = r ?? h.confirm, _ = i ?? h.cancel, v = a ?? "primary";
2660
- return /* @__PURE__ */ w(Oi, {
3050
+ return /* @__PURE__ */ w(fa, {
2661
3051
  isEnded: e.ended,
2662
3052
  onDismiss: p,
2663
- title: /* @__PURE__ */ w(xi, {
3053
+ title: /* @__PURE__ */ w(aa, {
2664
3054
  title: t,
2665
3055
  color: v
2666
3056
  }),
@@ -2669,7 +3059,7 @@ var ki = D(({ call: e, title: t, children: n, confirmLabel: r, cancelLabel: i, c
2669
3059
  closeLabel: s,
2670
3060
  role: "alertdialog",
2671
3061
  initialFocusRef: f,
2672
- footer: /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(Me, {
3062
+ footer: /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(ze, {
2673
3063
  ref: f,
2674
3064
  variant: "outline",
2675
3065
  color: "neutral",
@@ -2677,7 +3067,7 @@ var ki = D(({ call: e, title: t, children: n, confirmLabel: r, cancelLabel: i, c
2677
3067
  disabled: u,
2678
3068
  size: "sm",
2679
3069
  children: _
2680
- }), /* @__PURE__ */ w(Me, {
3070
+ }), /* @__PURE__ */ w(ze, {
2681
3071
  color: v,
2682
3072
  onClick: () => {
2683
3073
  m();
@@ -2690,18 +3080,18 @@ var ki = D(({ call: e, title: t, children: n, confirmLabel: r, cancelLabel: i, c
2690
3080
  });
2691
3081
  }, 200);
2692
3082
  // src/components/modal/modal.tsx
2693
- function Ai(e, t) {
3083
+ function ma(e, t) {
2694
3084
  return typeof e == "function" ? e(t) : e;
2695
3085
  }
2696
- var ji = D(({ call: e, title: t, children: n, size: r, height: i, phoneLayout: a, radius: o, className: s, panelClassName: c, backdropClassName: l, unstyled: u, dismissible: d, closeLabel: f, role: p, initialFocusRef: m, "aria-label": h }) => {
2697
- Ur();
2698
- let { dismiss: g, registry: _ } = er({
3086
+ var ha = D(({ call: e, title: t, children: n, size: r, height: i, phoneLayout: a, radius: o, className: s, panelClassName: c, backdropClassName: l, unstyled: u, dismissible: d, closeLabel: f, role: p, initialFocusRef: m, "aria-label": h }) => {
3087
+ bi();
3088
+ let { dismiss: g, registry: _ } = kr({
2699
3089
  onDismiss: () => e.end(),
2700
3090
  isEnded: e.ended
2701
3091
  });
2702
- return /* @__PURE__ */ w(Yn.Provider, {
3092
+ return /* @__PURE__ */ w(wr.Provider, {
2703
3093
  value: _,
2704
- children: /* @__PURE__ */ w(Oi, {
3094
+ children: /* @__PURE__ */ w(fa, {
2705
3095
  isEnded: e.ended,
2706
3096
  onDismiss: g,
2707
3097
  title: t,
@@ -2718,18 +3108,18 @@ var ji = D(({ call: e, title: t, children: n, size: r, height: i, phoneLayout: a
2718
3108
  role: p,
2719
3109
  initialFocusRef: m,
2720
3110
  "aria-label": h,
2721
- children: Ai(n, g)
3111
+ children: ma(n, g)
2722
3112
  })
2723
3113
  });
2724
3114
  }, 200);
2725
3115
  // src/components/modal/modal_footer.tsx
2726
- function Mi({ children: e }) {
2727
- let t = p(Zn);
3116
+ function ga({ children: e }) {
3117
+ let t = p(Er);
2728
3118
  return t ? S(e, t) : null;
2729
3119
  }
2730
3120
  // src/components/modal/use_dismiss_guard.ts
2731
- function Ni(e, t = !0) {
2732
- let n = p(Yn), r = y(e);
3121
+ function _a(e, t = !0) {
3122
+ let n = p(wr), r = y(e);
2733
3123
  if (_(() => {
2734
3124
  r.current = e;
2735
3125
  }), m(() => {
@@ -2737,11 +3127,11 @@ function Ni(e, t = !0) {
2737
3127
  }, [n, t]), !n) throw Error("useDismissGuard must be used inside a Modal or a Drawer");
2738
3128
  }
2739
3129
  // src/components/modal_provider/modal_provider.tsx
2740
- function Pi() {
2741
- return /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(ji, {}), /* @__PURE__ */ w(ki, {})] });
3130
+ function va() {
3131
+ return /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(ha, {}), /* @__PURE__ */ w(pa, {})] });
2742
3132
  }
2743
3133
  // src/components/multi_combobox/multi_combobox_checkbox.tsx
2744
- function Fi({ isSelected: t, unstyled: n, radius: r }) {
3134
+ function ya({ isSelected: t, unstyled: n, radius: r }) {
2745
3135
  return /* @__PURE__ */ w("span", {
2746
3136
  "aria-hidden": !0,
2747
3137
  className: e("flex h-4 w-4 shrink-0 items-center justify-center", !n && [
@@ -2762,14 +3152,14 @@ function Fi({ isSelected: t, unstyled: n, radius: r }) {
2762
3152
  });
2763
3153
  }
2764
3154
  // src/components/multi_combobox/multi_combobox.tsx
2765
- var Ii = 2, Li = "flex items-center gap-2";
2766
- function Ri(e, t, n, r, i) {
3155
+ var ba = 2, xa = "flex items-center gap-2";
3156
+ function Sa(e, t, n, r, i) {
2767
3157
  return i?.(e, t) ? !0 : r === void 0 || n.has(e) ? !1 : t.length >= r;
2768
3158
  }
2769
- function zi(e, t, n) {
3159
+ function Ca(e, t, n) {
2770
3160
  return t.has(n) ? e.filter((e) => e !== n) : [...e, n];
2771
3161
  }
2772
- function Bi(e, t) {
3162
+ function wa(e, t) {
2773
3163
  if (e.length <= t) return {
2774
3164
  visibleOptions: e,
2775
3165
  hiddenCount: 0
@@ -2780,11 +3170,11 @@ function Bi(e, t) {
2780
3170
  hiddenCount: e.length - n
2781
3171
  };
2782
3172
  }
2783
- function Vi(e, t, n) {
3173
+ function Ta(e, t, n) {
2784
3174
  return typeof e == "string" ? `${e}, ${n}` : t ? `${t}, ${n}` : n;
2785
3175
  }
2786
- var Hi = "inline-flex items-center rounded-full bg-gray-200 dark:bg-gray-700 px-2 py-0.5 text-xs text-gray-900 dark:text-gray-100";
2787
- function Ui({ options: t, filterOption: n, label: r, description: i, "aria-label": a, error: o, placeholder: s, searchPlaceholder: c, noResultsText: l, clearLabel: u, clearText: d, maxSelectedValues: p, isOptionDisabled: h, maxDisplayedValues: g = Ii, formatOverflowCount: _, formatSelectedCount: x, formatMaxSelectedHint: S, radius: E = "sm", unstyled: D = !1, disabled: O = !1, required: k = !1, className: A, wrapperClassName: j, dropdownClassName: M, optionLabelOverflow: N = "wrap", values: P, defaultValues: I = [], onChange: L, onDropdownClose: R, id: V }) {
3176
+ var Ea = "inline-flex items-center rounded-full bg-gray-200 dark:bg-gray-700 px-2 py-0.5 text-xs text-gray-900 dark:text-gray-100";
3177
+ function Da({ options: t, filterOption: n, label: r, description: i, "aria-label": a, error: o, placeholder: s, searchPlaceholder: c, noResultsText: l, clearLabel: u, clearText: d, maxSelectedValues: p, isOptionDisabled: h, maxDisplayedValues: g = ba, formatOverflowCount: _, formatSelectedCount: x, formatMaxSelectedHint: S, radius: E = "sm", unstyled: D = !1, disabled: O = !1, required: k = !1, className: A, wrapperClassName: j, dropdownClassName: M, optionLabelOverflow: N = "wrap", values: P, defaultValues: I = [], onChange: L, onDropdownClose: R, id: V }) {
2788
3178
  let H = Q(), { fieldId: U, errorId: G, descriptionId: ee, labelId: te } = ot(V), ne = `${U}-listbox`, K = `${U}-max-hint`, re = `${U}-selection`, ie = r !== void 0 || !!a, ae = y(null), q = y(null), oe = y(null), J = y(null), [Y, se] = at(P, I), [ce, X] = b(""), [Z, le] = b(!1), ue = pn(Z), de = v(() => new Set(Y), [Y]), fe = v(() => n ? [] : t.map((e) => e.label.toLowerCase()), [t, n]), pe = v(() => {
2789
3179
  let e = ce.trim().toLowerCase();
2790
3180
  return e ? n ? t.filter((e) => n(e, ce)) : t.filter((t, n) => fe[n].includes(e)) : t;
@@ -2797,7 +3187,7 @@ function Ui({ options: t, filterOption: n, label: r, description: i, "aria-label
2797
3187
  optionCount: pe.length,
2798
3188
  getOptionId: (e) => Tt(ne, e),
2799
3189
  isOpen: Z
2800
- }), xe = v(() => t.filter((e) => de.has(e.value)), [t, de]), Se = ie && xe.length > 0, { visibleOptions: Ce, hiddenCount: we } = Bi(xe, g), Te = () => {
3190
+ }), xe = v(() => t.filter((e) => de.has(e.value)), [t, de]), Se = ie && xe.length > 0, { visibleOptions: Ce, hiddenCount: we } = wa(xe, g), Te = () => {
2801
3191
  O || le(!0);
2802
3192
  }, $ = f(() => {
2803
3193
  le(!1), X(""), be(), R?.(Y);
@@ -2808,8 +3198,8 @@ function Ui({ options: t, filterOption: n, label: r, description: i, "aria-label
2808
3198
  ]), Ee = () => {
2809
3199
  Z ? $() : Te();
2810
3200
  }, De = (e) => {
2811
- if (Ri(e, Y, de, p, h)) return;
2812
- let t = zi(Y, de, e);
3201
+ if (Sa(e, Y, de, p, h)) return;
3202
+ let t = Ca(Y, de, e);
2813
3203
  se(t), L?.(t);
2814
3204
  }, Oe = () => {
2815
3205
  se([]), L?.([]);
@@ -2817,43 +3207,43 @@ function Ui({ options: t, filterOption: n, label: r, description: i, "aria-label
2817
3207
  e.stopPropagation(), Oe(), Z || R?.([]), ae.current?.focus();
2818
3208
  }, Ae = () => {
2819
3209
  Oe(), oe.current?.focus();
2820
- }, je = () => {
3210
+ }, Me = () => {
2821
3211
  O || Ee();
2822
- }, Me = (e) => {
2823
- X(e.target.value), be();
2824
3212
  }, Ne = (e) => {
2825
- e.preventDefault(), Z ? ge(1) : (Te(), ve());
3213
+ X(e.target.value), be();
2826
3214
  }, Pe = (e) => {
2827
- e.preventDefault(), Z ? ge(-1) : (Te(), ye());
3215
+ e.preventDefault(), Z ? ge(1) : (Te(), ve());
2828
3216
  }, Fe = (e) => {
3217
+ e.preventDefault(), Z ? ge(-1) : (Te(), ye());
3218
+ }, Ie = (e) => {
2829
3219
  if (!Z) return;
2830
3220
  e.preventDefault();
2831
3221
  let t = pe[me];
2832
3222
  t && De(t.value);
2833
- }, Ie = (e) => {
3223
+ }, Le = (e) => {
2834
3224
  Z && (e.preventDefault(), $(), ae.current?.focus());
2835
- }, Le = (e, t) => {
3225
+ }, Re = (e, t) => {
2836
3226
  Z && !wt(e) && (e.preventDefault(), _e(t * Bt(J.current, me)));
2837
- }, Re = Vt((e) => {
3227
+ }, ze = Vt((e) => {
2838
3228
  De(e.value);
2839
- }), ze = (e) => ({
3229
+ }), Be = (e) => ({
2840
3230
  isSelected: de.has(e.value),
2841
- isDisabled: Ri(e.value, Y, de, p, h),
2842
- className: Li
2843
- }), Be = f((e, t, n) => /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(Fi, {
3231
+ isDisabled: Sa(e.value, Y, de, p, h),
3232
+ className: xa
3233
+ }), Ve = f((e, t, n) => /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(ya, {
2844
3234
  isSelected: t,
2845
3235
  unstyled: D,
2846
3236
  radius: E
2847
3237
  }), n ? /* @__PURE__ */ w("span", {
2848
3238
  className: "min-w-0 truncate",
2849
3239
  children: e.label
2850
- }) : e.label] }), [D, E]), Ve = (e) => {
2851
- if (e.key === "PageDown") return Le(e, 1);
2852
- if (e.key === "PageUp") return Le(e, -1);
2853
- if (e.key === "ArrowDown") return Ne(e);
2854
- if (e.key === "ArrowUp") return Pe(e);
2855
- if (e.key === "Enter") return Fe(e);
2856
- if (e.key === "Escape") return Ie(e);
3240
+ }) : e.label] }), [D, E]), He = (e) => {
3241
+ if (e.key === "PageDown") return Re(e, 1);
3242
+ if (e.key === "PageUp") return Re(e, -1);
3243
+ if (e.key === "ArrowDown") return Pe(e);
3244
+ if (e.key === "ArrowUp") return Fe(e);
3245
+ if (e.key === "Enter") return Ie(e);
3246
+ if (e.key === "Escape") return Le(e);
2857
3247
  };
2858
3248
  return m(() => {
2859
3249
  if (!Z) return;
@@ -2898,21 +3288,22 @@ function Ui({ options: t, filterOption: n, label: r, description: i, "aria-label
2898
3288
  "aria-describedby": W(Se && re, !!i && ee, o && G),
2899
3289
  "aria-labelledby": r && !a ? te : void 0,
2900
3290
  "aria-label": a,
2901
- onClick: je,
2902
- onKeyDown: Ve,
3291
+ onClick: Me,
3292
+ onKeyDown: He,
2903
3293
  className: e("w-full flex flex-wrap items-center gap-1 text-left disabled:opacity-50 disabled:cursor-not-allowed", !D && [
2904
- Ke,
3294
+ je,
2905
3295
  z[E],
2906
- "pl-3 pr-8 py-2 text-sm min-h-10"
3296
+ "pl-3 pr-8 py-2 text-sm",
3297
+ "min-h-[max(2.5rem,var(--ms-control-min-height,0px))]"
2907
3298
  ], !D && o && e("border-red-500 dark:border-red-400", "focus:ring-red-500"), A),
2908
3299
  children: xe.length === 0 ? /* @__PURE__ */ w("span", {
2909
3300
  className: e(!D && "text-gray-500 dark:text-gray-400"),
2910
3301
  children: s
2911
3302
  }) : /* @__PURE__ */ T(C, { children: [Ce.map((t) => /* @__PURE__ */ w("span", {
2912
- className: e(!D && Hi),
3303
+ className: e(!D && Ea),
2913
3304
  children: t.label
2914
3305
  }, t.value)), we > 0 && /* @__PURE__ */ w("span", {
2915
- className: e(!D && Hi),
3306
+ className: e(!D && Ea),
2916
3307
  children: (_ ?? H.overflowCount)(we)
2917
3308
  })] })
2918
3309
  }),
@@ -2949,10 +3340,10 @@ function Ui({ options: t, filterOption: n, label: r, description: i, "aria-label
2949
3340
  "aria-haspopup": "listbox",
2950
3341
  autoComplete: "off",
2951
3342
  value: ce,
2952
- onChange: Me,
2953
- onKeyDown: Ve,
3343
+ onChange: Ne,
3344
+ onKeyDown: He,
2954
3345
  placeholder: c ?? H.search,
2955
- "aria-label": Vi(r, a, c ?? H.search),
3346
+ "aria-label": Ta(r, a, c ?? H.search),
2956
3347
  "aria-controls": ne,
2957
3348
  "aria-activedescendant": he,
2958
3349
  "aria-describedby": p === void 0 ? void 0 : K,
@@ -2979,9 +3370,9 @@ function Ui({ options: t, filterOption: n, label: r, description: i, "aria-label
2979
3370
  "aria-labelledby": r && !a ? te : void 0,
2980
3371
  "aria-label": a,
2981
3372
  "aria-multiselectable": !0,
2982
- getOptionState: ze,
2983
- renderOptionContent: Be,
2984
- onOptionClick: Re
3373
+ getOptionState: Be,
3374
+ renderOptionContent: Ve,
3375
+ onOptionClick: ze
2985
3376
  }),
2986
3377
  p !== void 0 && /* @__PURE__ */ T("div", {
2987
3378
  className: e("flex items-center justify-between px-3 py-2", !D && ["border-t", "border-gray-100 dark:border-gray-800"]),
@@ -3003,11 +3394,11 @@ function Ui({ options: t, filterOption: n, label: r, description: i, "aria-label
3003
3394
  });
3004
3395
  }
3005
3396
  // src/components/popover/popover_surface.tsx
3006
- function Wi({ panelRef: t, setFloating: n, floatingStyles: r, isVisible: i, isPositioned: a, radius: o, unstyled: s, panelClassName: c, id: l, ariaLabel: u, ariaLabelledBy: d, initialFocusRef: f, onTabOut: p, portalTarget: h, children: g }) {
3397
+ function Oa({ panelRef: t, setFloating: n, floatingStyles: r, isVisible: i, isPositioned: a, radius: o, unstyled: s, panelClassName: c, id: l, ariaLabel: u, ariaLabelledBy: d, initialFocusRef: f, onTabOut: p, portalTarget: h, children: g }) {
3007
3398
  return m(() => {
3008
3399
  if (!i || !a) return;
3009
3400
  let e = t.current;
3010
- e && (f?.current ?? fr(e)[0] ?? e).focus();
3401
+ e && (f?.current ?? Vr(e)[0] ?? e).focus();
3011
3402
  }, [
3012
3403
  i,
3013
3404
  a,
@@ -3028,7 +3419,7 @@ function Wi({ panelRef: t, setFloating: n, floatingStyles: r, isVisible: i, isPo
3028
3419
  onKeyDown: (e) => {
3029
3420
  let n = t.current;
3030
3421
  if (e.key !== "Tab" || !n) return;
3031
- let r = fr(n), i = e.shiftKey ? r[0] : r.at(-1);
3422
+ let r = Vr(n), i = e.shiftKey ? r[0] : r.at(-1);
3032
3423
  document.activeElement === (i ?? n) && (e.preventDefault(), p());
3033
3424
  },
3034
3425
  className: e("w-max ms-floating-panel-scroll", !s && [
@@ -3044,7 +3435,7 @@ function Wi({ panelRef: t, setFloating: n, floatingStyles: r, isVisible: i, isPo
3044
3435
  }), h);
3045
3436
  }
3046
3437
  // src/components/popover/use_outside_pointer_down.ts
3047
- function Gi(e, t, n) {
3438
+ function ka(e, t, n) {
3048
3439
  let r = Vt(n);
3049
3440
  m(() => {
3050
3441
  if (!e) return;
@@ -3060,7 +3451,7 @@ function Gi(e, t, n) {
3060
3451
  ]);
3061
3452
  }
3062
3453
  // src/components/popover/use_popover_state.ts
3063
- function Ki({ isOpen: e, defaultOpen: t, onOpenChange: n }) {
3454
+ function Aa({ isOpen: e, defaultOpen: t, onOpenChange: n }) {
3064
3455
  let [r, i] = at(e, t), a = y(r), o = y(void 0), s = Vt((e, t) => n?.(e, t));
3065
3456
  return _(() => {
3066
3457
  a.current = r;
@@ -3074,23 +3465,23 @@ function Ki({ isOpen: e, defaultOpen: t, onOpenChange: n }) {
3074
3465
  };
3075
3466
  }
3076
3467
  // src/components/popover/popover.tsx
3077
- var qi = 4;
3078
- function Ji(e, t) {
3468
+ var ja = 4;
3469
+ function Ma(e, t) {
3079
3470
  return t === "center" ? e : `${e}-${t}`;
3080
3471
  }
3081
- function Yi({ trigger: t, children: o, "aria-label": l, "aria-labelledby": d, isOpen: p, defaultOpen: h = !1, onOpenChange: _, side: x = "bottom", align: S = "start", initialFocusRef: C, radius: E = "md", unstyled: D = !1, className: O, panelClassName: k, disabled: A = !1, ref: j }) {
3472
+ function Na({ trigger: t, children: o, "aria-label": l, "aria-labelledby": d, isOpen: p, defaultOpen: h = !1, onOpenChange: _, side: x = "bottom", align: S = "start", initialFocusRef: C, radius: E = "md", unstyled: D = !1, className: O, panelClassName: k, disabled: A = !1, ref: j }) {
3082
3473
  ut("Popover", !!(l ?? d));
3083
- let M = y(null), N = y(null), [P, F] = b(null), { isOpen: I, setOpen: L } = Ki({
3474
+ let M = y(null), N = y(null), [P, F] = b(null), { isOpen: I, setOpen: L } = Aa({
3084
3475
  isOpen: p,
3085
3476
  defaultOpen: h,
3086
3477
  onOpenChange: _
3087
3478
  }), { isMounted: R, isVisible: z, setIsVisible: B, open: V, close: H } = te(), { refs: U, floatingStyles: W, isPositioned: G } = s({
3088
- placement: Ji(x, S),
3479
+ placement: Ma(x, S),
3089
3480
  strategy: "fixed",
3090
3481
  open: R,
3091
3482
  whileElementsMounted: n,
3092
3483
  middleware: [
3093
- i(qi),
3484
+ i(ja),
3094
3485
  r(),
3095
3486
  a({ padding: 8 }),
3096
3487
  jn()
@@ -3113,7 +3504,7 @@ function Yi({ trigger: t, children: o, "aria-label": l, "aria-labelledby": d, is
3113
3504
  }, [q]), J = f((e) => {
3114
3505
  L(!1, { reason: e }), q();
3115
3506
  }, [L, q]), Y = f(() => J("focus-out"), [J]);
3116
- Gi(I, ie, () => {
3507
+ ka(I, ie, () => {
3117
3508
  L(!1, { reason: "outside-pointer" }), window.setTimeout(oe, 0);
3118
3509
  }), m(() => {
3119
3510
  A && I && L(!1, { reason: "disabled" });
@@ -3140,7 +3531,7 @@ function Yi({ trigger: t, children: o, "aria-label": l, "aria-labelledby": d, is
3140
3531
  className: e("inline-flex", O),
3141
3532
  onKeyDown: se,
3142
3533
  onBlur: ce,
3143
- children: [Z, R && /* @__PURE__ */ w(Wi, {
3534
+ children: [Z, R && /* @__PURE__ */ w(Oa, {
3144
3535
  panelRef: N,
3145
3536
  setFloating: U.setFloating,
3146
3537
  floatingStyles: W,
@@ -3160,7 +3551,7 @@ function Yi({ trigger: t, children: o, "aria-label": l, "aria-labelledby": d, is
3160
3551
  });
3161
3552
  }
3162
3553
  // src/components/radio_options/radio_option_row.tsx
3163
- function Xi({ option: t, optionId: n, descriptionId: r, name: i, orientation: a, isSelected: o, isDisabled: s, isFirstOption: c, required: l, error: u, radius: d, unstyled: f, className: p, onSelect: m }) {
3554
+ function Pa({ option: t, optionId: n, descriptionId: r, name: i, orientation: a, isSelected: o, isDisabled: s, isFirstOption: c, required: l, error: u, radius: d, unstyled: f, className: p, onSelect: m }) {
3164
3555
  let h = !!u;
3165
3556
  return /* @__PURE__ */ w(_t, {
3166
3557
  item: t,
@@ -3196,7 +3587,7 @@ function Xi({ option: t, optionId: n, descriptionId: r, name: i, orientation: a,
3196
3587
  });
3197
3588
  }
3198
3589
  // src/components/radio_options/radio_options.tsx
3199
- function Zi({ options: t, orientation: n = "vertical", value: r, defaultValue: i, onChange: a, name: o, label: s, error: c, required: l, disabled: u, radius: d = "lg", unstyled: f = !1, className: p, wrapperClassName: m, id: h, "aria-describedby": g, ..._ }) {
3590
+ function Fa({ options: t, orientation: n = "vertical", value: r, defaultValue: i, onChange: a, name: o, label: s, error: c, required: l, disabled: u, radius: d = "lg", unstyled: f = !1, className: p, wrapperClassName: m, id: h, "aria-describedby": g, ..._ }) {
3200
3591
  let { fieldId: v, errorId: y } = ot(h), b = o ?? v, [x, S] = at(r, i ?? ""), C = t.map((e) => typeof e == "string" ? {
3201
3592
  value: e,
3202
3593
  label: e
@@ -3217,7 +3608,7 @@ function Zi({ options: t, orientation: n = "vertical", value: r, defaultValue: i
3217
3608
  }),
3218
3609
  /* @__PURE__ */ w("div", {
3219
3610
  className: e(n === "horizontal" ? "flex flex-row gap-2" : "flex flex-col gap-2"),
3220
- children: C.map((e, t) => /* @__PURE__ */ w(Xi, {
3611
+ children: C.map((e, t) => /* @__PURE__ */ w(Pa, {
3221
3612
  option: e,
3222
3613
  optionId: `${v}-${t}`,
3223
3614
  descriptionId: `${v}-${t}-desc`,
@@ -3243,7 +3634,7 @@ function Zi({ options: t, orientation: n = "vertical", value: r, defaultValue: i
3243
3634
  });
3244
3635
  }
3245
3636
  // src/components/select/select.tsx
3246
- function Qi({ options: t, label: n, description: r, error: i, placeholder: a, radius: o = "md", unstyled: s = !1, className: c, wrapperClassName: l, value: u, defaultValue: d, onChange: f, id: p, "aria-describedby": m, "aria-label": h, ...g }) {
3637
+ function Ia({ options: t, label: n, description: r, error: i, placeholder: a, radius: o = "md", unstyled: s = !1, className: c, wrapperClassName: l, value: u, defaultValue: d, onChange: f, id: p, "aria-describedby": m, "aria-label": h, ...g }) {
3247
3638
  let { fieldId: _, errorId: v, descriptionId: y, labelId: b } = ot(p);
3248
3639
  return /* @__PURE__ */ w(Ct, {
3249
3640
  fieldId: _,
@@ -3257,8 +3648,9 @@ function Qi({ options: t, label: n, description: r, error: i, placeholder: a, ra
3257
3648
  children: /* @__PURE__ */ T("select", {
3258
3649
  id: _,
3259
3650
  className: e("w-full disabled:opacity-50 disabled:cursor-not-allowed", !s && [
3260
- Ke,
3651
+ je,
3261
3652
  z[o],
3653
+ "min-h-[var(--ms-control-min-height,0px)]",
3262
3654
  "pl-3 pr-8 py-2 text-sm appearance-none bg-[length:1rem_1rem] bg-[position:right_0.5rem_center] bg-no-repeat",
3263
3655
  "bg-[url(\"data:image/svg+xml,%3csvg xmlns=%27http://www.w3.org/2000/svg%27 fill=%27none%27 viewBox=%270 0 20 20%27%3e%3cpath stroke=%27%236b7280%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27 stroke-width=%271.5%27 d=%27M6 8l4 4 4-4%27/%3e%3c/svg%3e\")]"
3264
3656
  ], !s && i && e("border-red-500 dark:border-red-400", "focus:ring-red-500"), c),
@@ -3279,19 +3671,234 @@ function Qi({ options: t, label: n, description: r, error: i, placeholder: a, ra
3279
3671
  })
3280
3672
  });
3281
3673
  }
3282
- var $i = "!rounded-l-none border-l", ea = {
3674
+ // src/components/side_panel/side_panel_header.tsx
3675
+ var La = {
3676
+ right: "i-mdi-chevron-right",
3677
+ left: "i-mdi-chevron-left"
3678
+ };
3679
+ function Ra({ titleId: t, headingRef: n, title: r, actions: i, side: a, onCollapse: o, collapseLabel: s, unstyled: c }) {
3680
+ let l = Q(), u = s ?? l.collapsePanel ?? "Collapse panel";
3681
+ return /* @__PURE__ */ T("div", {
3682
+ className: e("flex items-center justify-between flex-shrink-0", !c && "gap-3 px-6 pt-5 pb-4"),
3683
+ children: [
3684
+ /* @__PURE__ */ w("h2", {
3685
+ ref: n,
3686
+ id: t,
3687
+ tabIndex: -1,
3688
+ className: e("min-w-0 flex-1", !c && "outline-hidden focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-blue-500 dark:focus-visible:outline-blue-400", !c && "text-base font-medium tracking-tight text-gray-900 dark:text-gray-100"),
3689
+ children: r
3690
+ }),
3691
+ i,
3692
+ c ? /* @__PURE__ */ w(X, {
3693
+ icon: La[a],
3694
+ onClick: o,
3695
+ "aria-label": u,
3696
+ className: "min-h-6 min-w-6",
3697
+ unstyled: !0
3698
+ }) : /* @__PURE__ */ w(X, {
3699
+ icon: La[a],
3700
+ onClick: o,
3701
+ "aria-label": u,
3702
+ variant: "subtle",
3703
+ size: "sm",
3704
+ radius: "full",
3705
+ className: "-mr-1"
3706
+ })
3707
+ ]
3708
+ });
3709
+ }
3710
+ // src/components/side_panel/side_panel_styles.ts
3711
+ var za = {
3712
+ sm: "w-[22.5rem] max-w-full",
3713
+ md: "w-[26.25rem] max-w-full",
3714
+ lg: "w-[32.5rem] max-w-full"
3715
+ }, Ba = {
3716
+ lg: "ms-side-panel-layout-lg",
3717
+ xl: "ms-side-panel-layout-xl",
3718
+ never: "sticky top-0 h-dvh flex-none"
3719
+ }, Va = {
3720
+ lg: {
3721
+ right: "ms-side-panel-edge-right-lg",
3722
+ left: "ms-side-panel-edge-left-lg"
3723
+ },
3724
+ xl: {
3725
+ right: "ms-side-panel-edge-right-xl",
3726
+ left: "ms-side-panel-edge-left-xl"
3727
+ },
3728
+ never: {
3729
+ right: "",
3730
+ left: ""
3731
+ }
3732
+ }, Ha = {
3733
+ lg: {
3734
+ right: "ms-side-panel-offscreen-right-lg",
3735
+ left: "ms-side-panel-offscreen-left-lg"
3736
+ },
3737
+ xl: {
3738
+ right: "ms-side-panel-offscreen-right-xl",
3739
+ left: "ms-side-panel-offscreen-left-xl"
3740
+ },
3741
+ never: {
3742
+ right: "",
3743
+ left: ""
3744
+ }
3745
+ }, Ua = {
3746
+ lg: "ms-side-panel-closed-lg",
3747
+ xl: "ms-side-panel-closed-xl",
3748
+ never: "data-[state=closed]:hidden"
3749
+ }, Wa = {
3750
+ right: "border-l",
3751
+ left: "border-r"
3752
+ };
3753
+ // src/components/side_panel/use_side_panel_entered.ts
3754
+ function Ga() {
3755
+ let [e, t] = b(!1);
3756
+ return m(() => {
3757
+ let e = requestAnimationFrame(() => {
3758
+ requestAnimationFrame(() => t(!0));
3759
+ });
3760
+ return () => cancelAnimationFrame(e);
3761
+ }, []), e;
3762
+ }
3763
+ // src/components/side_panel/use_side_panel_escape.ts
3764
+ function Ka(e, t) {
3765
+ return e.key === "Escape" && e.target instanceof Node && t.contains(e.target);
3766
+ }
3767
+ function qa(e) {
3768
+ return !e.defaultPrevented && !e.isComposing && !oi();
3769
+ }
3770
+ function Ja(e, t, n) {
3771
+ let r = h(n);
3772
+ m(() => {
3773
+ if (!t) return;
3774
+ let n = (t) => {
3775
+ let n = e.current;
3776
+ n && Ka(t, n) && qa(t) && r();
3777
+ };
3778
+ return document.addEventListener("keydown", n), () => document.removeEventListener("keydown", n);
3779
+ }, [e, t]);
3780
+ }
3781
+ // src/components/side_panel/use_side_panel_focus.ts
3782
+ function Ya() {
3783
+ return typeof document > "u" ? null : document.activeElement instanceof HTMLElement ? document.activeElement : null;
3784
+ }
3785
+ function Xa(e, t, n) {
3786
+ n.current = e.contains(document.activeElement);
3787
+ let r = () => {
3788
+ n.current = !0;
3789
+ }, i = (r) => {
3790
+ t.current && (r.relatedTarget instanceof Node && e.contains(r.relatedTarget) || (n.current = !1));
3791
+ }, a = (r) => {
3792
+ !(r.target instanceof Node && e.contains(r.target)) && t.current && (n.current = !1);
3793
+ };
3794
+ return e.addEventListener("focusin", r), e.addEventListener("pointerdown", r), e.addEventListener("focusout", i), document.addEventListener("focusin", a), document.addEventListener("pointerdown", a), () => {
3795
+ document.removeEventListener("focusin", a), document.removeEventListener("pointerdown", a), e.removeEventListener("focusin", r), e.removeEventListener("pointerdown", r), e.removeEventListener("focusout", i);
3796
+ };
3797
+ }
3798
+ function Za(...e) {
3799
+ return e.find((e) => e?.isConnected) ?? null;
3800
+ }
3801
+ function Qa({ isOpen: e, focusOnOpen: t, panelRef: n, headingRef: r, initialFocusRef: i, returnFocusRef: a }) {
3802
+ let [o] = b(Ya), s = y(o), c = y(!1), l = y(e), u = h(() => {
3803
+ t && (i?.current ?? r.current)?.focus({ preventScroll: !0 });
3804
+ }), d = h(() => {
3805
+ c.current && (c.current = !1, Za(a?.current, s.current, gi())?.focus({ preventScroll: !0 }));
3806
+ });
3807
+ m(() => {
3808
+ if (!e) return;
3809
+ let t = Ya();
3810
+ t && !n.current?.contains(t) && (s.current = t), u();
3811
+ }, [e, n]), _(() => {
3812
+ l.current = e;
3813
+ }, [e]), m(() => {
3814
+ let e = n.current;
3815
+ if (e) return Xa(e, l, c);
3816
+ }, [n]), m(() => {
3817
+ e || d();
3818
+ }, [e]);
3819
+ }
3820
+ // src/components/side_panel/side_panel_aside.tsx
3821
+ function $a({ isOpen: t, onClose: n, title: r, children: i, footer: a, actions: o, side: s, size: c, overlayBelow: l, focusOnOpen: u = !1, initialFocusRef: d, returnFocusRef: f, collapseLabel: p, radius: m, className: h, panelClassName: _, unstyled: v = !1 }) {
3822
+ let b = g(), x = y(null), S = y(null), C = Ga(), { ref: E, scrollableProps: D, focusClassName: O } = qr({ labelledBy: b });
3823
+ Qa({
3824
+ isOpen: t,
3825
+ focusOnOpen: u,
3826
+ panelRef: x,
3827
+ headingRef: S,
3828
+ initialFocusRef: d,
3829
+ returnFocusRef: f
3830
+ }), Ja(x, t, n);
3831
+ let k = !t || !C;
3832
+ return /* @__PURE__ */ T("aside", {
3833
+ ref: x,
3834
+ "aria-labelledby": b,
3835
+ "data-state": t ? "open" : "closed",
3836
+ inert: !t,
3837
+ className: e("flex flex-col overflow-hidden", Ba[l], Va[l][s], za[c], Ei[s], Ua[l], k && Ha[l][s], !v && [
3838
+ "bg-white dark:bg-gray-900",
3839
+ "border-gray-200 dark:border-gray-700",
3840
+ Wa[s],
3841
+ "[&,&_*]:[scrollbar-width:thin] [scrollbar-color:theme(colors.gray.300)_transparent] hover:[scrollbar-color:theme(colors.gray.400)_transparent] dark:[scrollbar-color:theme(colors.gray.600)_transparent] dark:hover:[scrollbar-color:theme(colors.gray.500)_transparent]",
3842
+ Oi[s][m],
3843
+ "ms-side-panel-transition"
3844
+ ], _),
3845
+ children: [
3846
+ /* @__PURE__ */ w(Ra, {
3847
+ titleId: b,
3848
+ headingRef: S,
3849
+ title: r,
3850
+ actions: o,
3851
+ side: s,
3852
+ onCollapse: n,
3853
+ collapseLabel: p,
3854
+ unstyled: v
3855
+ }),
3856
+ /* @__PURE__ */ w("div", {
3857
+ ref: E,
3858
+ ...D,
3859
+ className: e("flex-1 overflow-y-auto min-h-0", !v && "px-6 pb-6 text-sm leading-relaxed text-gray-600 dark:text-gray-400", O, h),
3860
+ children: i
3861
+ }),
3862
+ a && /* @__PURE__ */ w("div", {
3863
+ className: e("flex-shrink-0", !v && ["px-6 py-4 border-t", "border-gray-100 dark:border-gray-800"]),
3864
+ children: a
3865
+ })
3866
+ ]
3867
+ });
3868
+ }
3869
+ // src/components/side_panel/use_side_panel_mounted.ts
3870
+ function eo(e) {
3871
+ let [t, n] = b(!e);
3872
+ return e && t && n(!1), m(() => {
3873
+ if (e || t) return;
3874
+ let r = setTimeout(() => n(!0), 200);
3875
+ return () => clearTimeout(r);
3876
+ }, [e, t]), e || !t;
3877
+ }
3878
+ // src/components/side_panel/side_panel.tsx
3879
+ function to({ isOpen: e, side: t = "right", size: n = "md", overlayBelow: r = "xl", radius: i = "none", ...a }) {
3880
+ return eo(e) ? /* @__PURE__ */ w($a, {
3881
+ ...a,
3882
+ isOpen: e,
3883
+ side: t,
3884
+ size: n,
3885
+ overlayBelow: r,
3886
+ radius: i
3887
+ }) : null;
3888
+ }
3889
+ var no = "!rounded-l-none border-l", ro = {
3283
3890
  solid: "!border-l-white/40",
3284
3891
  outline: "!border-l-0",
3285
3892
  ghost: "!border-l-current/25",
3286
3893
  subtle: "!border-l-current/25"
3287
- }, ta = "!border-l-gray-400";
3288
- function na(e, t) {
3289
- return [$i, e === "solid" && t === "neutral" ? ta : ea[e]];
3894
+ }, io = "!border-l-gray-400";
3895
+ function ao(e, t) {
3896
+ return [no, e === "solid" && t === "neutral" ? io : ro[e]];
3290
3897
  }
3291
3898
  // src/components/split_button/split_button.tsx
3292
- var ra = "i-mdi-chevron-down";
3293
- function ia(t) {
3294
- let { children: n, onClick: r, menu: i, menuLabel: a, menuIcon: o = ra, menuAlign: s = "end", startIcon: c, size: l = "md", loading: u = !1, disabled: d = !1, "aria-label": f, "aria-labelledby": p, className: m, ref: h, unstyled: g = !1, variant: _ = "solid", color: v = "primary", radius: y = "md" } = t, b = g ? { unstyled: !0 } : {
3899
+ var oo = "i-mdi-chevron-down";
3900
+ function so(t) {
3901
+ let { children: n, onClick: r, menu: i, menuLabel: a, menuIcon: o = oo, menuAlign: s = "end", startIcon: c, size: l = "md", loading: u = !1, disabled: d = !1, "aria-label": f, "aria-labelledby": p, className: m, ref: h, unstyled: g = !1, variant: _ = "solid", color: v = "primary", radius: y = "md" } = t, b = g ? { unstyled: !0 } : {
3295
3902
  variant: _,
3296
3903
  color: v,
3297
3904
  radius: y
@@ -3302,7 +3909,7 @@ function ia(t) {
3302
3909
  size: l,
3303
3910
  disabled: d,
3304
3911
  "aria-disabled": u && !d || void 0,
3305
- className: e(!g && ["relative focus-visible:z-10", na(_, v)]),
3912
+ className: e(!g && ["relative focus-visible:z-10", ao(_, v)]),
3306
3913
  ...b
3307
3914
  });
3308
3915
  return /* @__PURE__ */ T("div", {
@@ -3310,7 +3917,7 @@ function ia(t) {
3310
3917
  "aria-label": f,
3311
3918
  "aria-labelledby": p,
3312
3919
  className: e("inline-flex", m),
3313
- children: [/* @__PURE__ */ w(Me, {
3920
+ children: [/* @__PURE__ */ w(ze, {
3314
3921
  ref: h,
3315
3922
  size: l,
3316
3923
  startIcon: c,
@@ -3320,7 +3927,7 @@ function ia(t) {
3320
3927
  className: e(!g && ["relative focus-visible:z-10", "!rounded-r-none"]),
3321
3928
  ...b,
3322
3929
  children: n
3323
- }), /* @__PURE__ */ w(ti, {
3930
+ }), /* @__PURE__ */ w(zi, {
3324
3931
  trigger: x,
3325
3932
  align: s,
3326
3933
  radius: y,
@@ -3330,28 +3937,28 @@ function ia(t) {
3330
3937
  });
3331
3938
  }
3332
3939
  // src/components/spinner/spinner.tsx
3333
- var aa = 0, oa = "inline-flex items-center gap-2", sa = {
3940
+ var co = 0, lo = "inline-flex items-center gap-2", uo = {
3334
3941
  xs: "text-xs",
3335
3942
  sm: "text-sm",
3336
3943
  md: "text-sm",
3337
3944
  lg: "text-base"
3338
- }, ca = {
3945
+ }, fo = {
3339
3946
  xs: "w-3.5 h-3.5",
3340
3947
  sm: "w-4 h-4",
3341
3948
  md: "w-5 h-5",
3342
3949
  lg: "w-6 h-6"
3343
3950
  };
3344
- function la(t) {
3951
+ function po(t) {
3345
3952
  let { size: n = "md", label: r, unstyled: i = !1, className: a, iconClassName: o, labelClassName: s, ...c } = t, l = Q(), [u, d] = b(!1);
3346
3953
  m(() => {
3347
- let e = setTimeout(() => d(!0), aa);
3954
+ let e = setTimeout(() => d(!0), co);
3348
3955
  return () => clearTimeout(e);
3349
3956
  }, []);
3350
- let f = r ?? l.loading, p = e(!i && ca[n], o);
3957
+ let f = r ?? l.loading, p = e(!i && fo[n], o);
3351
3958
  return /* @__PURE__ */ T("span", {
3352
3959
  role: "status",
3353
3960
  ...c,
3354
- className: e(!i && [oa, sa[n]], a),
3961
+ className: e(!i && [lo, uo[n]], a),
3355
3962
  children: [
3356
3963
  /* @__PURE__ */ w("span", {
3357
3964
  className: e("i-svg-spinners-3-dots-fade ms-spinner-animated", p),
@@ -3369,11 +3976,11 @@ function la(t) {
3369
3976
  });
3370
3977
  }
3371
3978
  // src/components/switch/switch.tsx
3372
- var ua = "absolute -inset-0.5 m-0 h-6 w-11 appearance-none opacity-0";
3373
- function da(t, n) {
3374
- return t ? "sr-only" : e(ua, n ? "cursor-not-allowed" : "cursor-pointer");
3979
+ var mo = "absolute -inset-0.5 m-0 h-6 w-11 appearance-none opacity-0";
3980
+ function ho(t, n) {
3981
+ return t ? "sr-only" : e(mo, n ? "cursor-not-allowed" : "cursor-pointer");
3375
3982
  }
3376
- function fa({ htmlFor: e, className: t, children: n }) {
3983
+ function go({ htmlFor: e, className: t, children: n }) {
3377
3984
  return e === void 0 ? /* @__PURE__ */ w("div", {
3378
3985
  className: t,
3379
3986
  children: n
@@ -3383,14 +3990,14 @@ function fa({ htmlFor: e, className: t, children: n }) {
3383
3990
  children: n
3384
3991
  });
3385
3992
  }
3386
- function pa({ label: t, description: n, error: r, unstyled: i = !1, fullWidth: a = !1, className: o, wrapperClassName: s, checked: c, defaultChecked: l = !1, onChange: u, id: d, "aria-describedby": f, "aria-label": p, "aria-labelledby": m, ref: h, ...g }) {
3993
+ function _o({ label: t, description: n, error: r, unstyled: i = !1, fullWidth: a = !1, className: o, wrapperClassName: s, checked: c, defaultChecked: l = !1, onChange: u, id: d, "aria-describedby": f, "aria-label": p, "aria-labelledby": m, ref: h, ...g }) {
3387
3994
  let { fieldId: _, errorId: b, descriptionId: x } = ot(d), [S, E] = at(c, l), D = y(null), O = !!t, k = W(f, !!n && x, r && b);
3388
3995
  dt("Switch", D, !!t || !!p?.trim() || !!m?.trim());
3389
3996
  let M = v(() => K(D, h), [h]);
3390
3997
  return /* @__PURE__ */ T("div", {
3391
3998
  className: e(a ? "w-full" : "w-fit", s),
3392
3999
  children: [
3393
- /* @__PURE__ */ T(fa, {
4000
+ /* @__PURE__ */ T(go, {
3394
4001
  htmlFor: O ? _ : void 0,
3395
4002
  className: e("flex items-center gap-3 cursor-pointer", g.disabled && "cursor-not-allowed opacity-50"),
3396
4003
  children: [/* @__PURE__ */ T("span", {
@@ -3404,7 +4011,7 @@ function pa({ label: t, description: n, error: r, unstyled: i = !1, fullWidth: a
3404
4011
  role: "switch",
3405
4012
  ref: M,
3406
4013
  id: _,
3407
- className: da(O, g.disabled === !0),
4014
+ className: ho(O, g.disabled === !0),
3408
4015
  checked: S,
3409
4016
  onChange: (e) => {
3410
4017
  E(e.target.checked), u?.(e);
@@ -3423,7 +4030,7 @@ function pa({ label: t, description: n, error: r, unstyled: i = !1, fullWidth: a
3423
4030
  children: [t, g.required && /* @__PURE__ */ w(it, {})]
3424
4031
  }) : /* @__PURE__ */ T(C, { children: [t, g.required && /* @__PURE__ */ w(it, {})] }) })]
3425
4032
  }),
3426
- /* @__PURE__ */ w(Qe, {
4033
+ /* @__PURE__ */ w(Le, {
3427
4034
  id: x,
3428
4035
  description: n,
3429
4036
  className: "mt-1 ml-14"
@@ -3436,12 +4043,48 @@ function pa({ label: t, description: n, error: r, unstyled: i = !1, fullWidth: a
3436
4043
  ]
3437
4044
  });
3438
4045
  }
4046
+ // src/components/tab_bar/tab_bar.tsx
4047
+ var vo = e("border-t pt-1.5 pb-[env(safe-area-inset-bottom)]", "pl-[max(0.5rem,env(safe-area-inset-left))] pr-[max(0.5rem,env(safe-area-inset-right))]", ye, ve);
4048
+ function yo(t) {
4049
+ let { children: n, unstyled: r = !1, className: i, ...a } = t;
4050
+ return /* @__PURE__ */ w("nav", {
4051
+ ...a,
4052
+ className: e(!r && vo, i),
4053
+ children: /* @__PURE__ */ w("ul", {
4054
+ role: "list",
4055
+ className: "grid grid-flow-col auto-cols-fr",
4056
+ children: n
4057
+ })
4058
+ });
4059
+ }
4060
+ // src/components/tab_bar/tab_bar_link.tsx
4061
+ var bo = "group flex min-w-0 flex-1 flex-col items-center justify-center gap-1 text-center", xo = e("min-h-14 text-xs text-gray-600 dark:text-gray-400", "[&:not([aria-current=page]):hover]:text-gray-900 dark:[&:not([aria-current=page]):hover]:text-gray-100", "aria-[current=page]:font-semibold aria-[current=page]:text-blue-700 dark:aria-[current=page]:text-blue-300", N), So = "flex max-w-full items-center justify-center", Co = e("h-7 w-14 transition-colors duration-200", "group-[:not([aria-current=page]):hover]:bg-gray-100 dark:group-[:not([aria-current=page]):hover]:bg-gray-800", "group-aria-[current=page]:bg-blue-100 dark:group-aria-[current=page]:bg-blue-500/20");
4062
+ function wo(t) {
4063
+ let { icon: n, children: r, radius: i = "full", unstyled: a = !1, className: o, ...s } = t;
4064
+ return /* @__PURE__ */ w("li", {
4065
+ className: "flex min-w-0",
4066
+ children: /* @__PURE__ */ T("a", {
4067
+ ...s,
4068
+ className: e(bo, !a && xo, o),
4069
+ children: [/* @__PURE__ */ w("span", {
4070
+ className: e(So, !a && [Co, z[i]]),
4071
+ children: /* @__PURE__ */ w("span", {
4072
+ className: e(n, "h-6 w-6"),
4073
+ "aria-hidden": "true"
4074
+ })
4075
+ }), /* @__PURE__ */ w("span", {
4076
+ className: "min-w-0 [overflow-wrap:anywhere]",
4077
+ children: r
4078
+ })]
4079
+ })
4080
+ });
4081
+ }
3439
4082
  // src/components/tabs/tabs_styles.ts
3440
- var ma = {
4083
+ var To = {
3441
4084
  list: "gap-1 p-1 bg-gray-100 dark:bg-gray-800/50",
3442
4085
  tab: "",
3443
4086
  indicator: `absolute inset-0 ${_e} border border-gray-200 dark:border-gray-700`
3444
- }, ha = {
4087
+ }, Eo = {
3445
4088
  line: {
3446
4089
  activeTab: "border-transparent text-gray-900 dark:text-gray-100",
3447
4090
  idleTab: "border-transparent text-gray-500 dark:text-gray-400",
@@ -3464,52 +4107,53 @@ var ma = {
3464
4107
  idleTab: "text-gray-600 dark:text-gray-400",
3465
4108
  idleHover: "hover:text-gray-900 dark:hover:text-gray-100",
3466
4109
  byOrientation: {
3467
- horizontal: ma,
3468
- vertical: ma
4110
+ horizontal: To,
4111
+ vertical: To
3469
4112
  }
3470
4113
  }
3471
- }, ga = {
4114
+ }, Do = {
3472
4115
  xs: "px-2 py-1 text-xs",
3473
4116
  sm: "px-3 py-1.5 text-sm",
3474
4117
  md: "px-4 py-2.5 text-sm",
3475
4118
  lg: "px-5 py-3 text-base"
3476
- }, _a = {
4119
+ }, Oo = {
3477
4120
  xs: "w-3.5 h-3.5",
3478
4121
  sm: "w-4 h-4",
3479
4122
  md: "w-4 h-4",
3480
4123
  lg: "w-5 h-5"
3481
- }, va = {
4124
+ }, ko = {
3482
4125
  horizontal: e(O, F.primary.focusOutline),
3483
4126
  vertical: e("outline-hidden focus-visible:outline-2", "focus-visible:-outline-offset-2", F.primary.focusOutline)
3484
- }, ya = "items-center", ba = e("flex-col items-stretch min-h-0 overflow-y-auto overflow-x-hidden", xe), xa = "w-48 shrink-0", Sa = "justify-start text-left whitespace-normal", Ca = "whitespace-nowrap", wa = "flex min-h-0", Ta = e("flex-1 min-w-0 min-h-0 overflow-y-auto", xe), Ea = "ml-6", Da = "mt-4";
3485
- function Oa(t, n) {
3486
- return e("w-full", t === "vertical" && wa, n);
4127
+ }, Ao = "items-center", jo = e("flex-col items-stretch min-h-0 overflow-y-auto overflow-x-hidden", xe), Mo = "w-48 shrink-0", No = "justify-start text-left whitespace-normal", Po = "whitespace-nowrap", Fo = "flex min-h-0", Io = e("flex-1 min-w-0 min-h-0 overflow-y-auto", xe), Lo = "ml-6", Ro = "mt-4";
4128
+ function zo(t, n) {
4129
+ return e("w-full", t === "vertical" && Fo, n);
3487
4130
  }
3488
- function ka(t) {
4131
+ function Bo(t) {
3489
4132
  let { orientation: n, unstyled: r, className: i } = t, a = n === "vertical";
3490
- return e(a && Ta, !r && [a ? Ea : Da, va[n]], i);
4133
+ return e(a && Io, !r && [a ? Lo : Ro, ko[n]], i);
3491
4134
  }
3492
- function Aa(t) {
4135
+ function Vo(t) {
3493
4136
  let { variant: n, orientation: r, radius: i, unstyled: a, isFullWidth: o, className: s } = t, c = r === "vertical";
3494
- return e("flex", c ? ba : ya, !c && o && "w-full", !a && c && xa, !a && ha[n].byOrientation[r].list, !a && n === "segmented" && z[i], s);
4137
+ return e("flex", c ? jo : Ao, !c && o && "w-full", !a && c && Mo, !a && Eo[n].byOrientation[r].list, !a && n === "segmented" && z[i], s);
3495
4138
  }
3496
- function ja(t) {
3497
- let { variant: n, orientation: r, size: i, radius: a, unstyled: o, isActive: s, isDisabled: c, isFullWidth: l, className: u } = t, d = r === "vertical", f = ha[n];
3498
- return e("relative flex items-center gap-2", d ? Sa : Ca, !d && l && "flex-1 justify-center", c ? "opacity-50 cursor-not-allowed" : "cursor-pointer", !o && [
4139
+ function Ho(t) {
4140
+ let { variant: n, orientation: r, size: i, radius: a, unstyled: o, isActive: s, isDisabled: c, isFullWidth: l, className: u } = t, d = r === "vertical", f = Eo[n];
4141
+ return e("relative flex items-center gap-2", d ? No : Po, !d && l && "flex-1 justify-center", c ? "opacity-50 cursor-not-allowed" : "cursor-pointer", !o && [
3499
4142
  "font-medium transition-colors duration-200",
3500
- ga[i],
4143
+ Do[i],
4144
+ "min-h-[var(--ms-control-min-height,0px)]",
3501
4145
  f.byOrientation[r].tab,
3502
4146
  s ? f.activeTab : [f.idleTab, !c && f.idleHover],
3503
4147
  n === "segmented" && z[a],
3504
- va[r]
4148
+ ko[r]
3505
4149
  ], u);
3506
4150
  }
3507
- function Ma(t) {
4151
+ function Uo(t) {
3508
4152
  let { variant: n, orientation: r, radius: i } = t;
3509
- return e("tabs-indicator pointer-events-none", ha[n].byOrientation[r].indicator, n === "segmented" && z[i]);
4153
+ return e("tabs-indicator pointer-events-none", Eo[n].byOrientation[r].indicator, n === "segmented" && z[i]);
3510
4154
  }
3511
4155
  // src/components/tabs/tab_button.tsx
3512
- function Na({ item: t, isActive: n, hasMountedPanel: r, isTabStop: i, isFullWidth: a, variant: o, orientation: s, size: c, radius: l, unstyled: u, tabId: d, panelId: f, onSelect: p, onKeyDown: m, ref: h, indicatorRef: g }) {
4156
+ function Wo({ item: t, isActive: n, hasMountedPanel: r, isTabStop: i, isFullWidth: a, variant: o, orientation: s, size: c, radius: l, unstyled: u, tabId: d, panelId: f, onSelect: p, onKeyDown: m, ref: h, indicatorRef: g }) {
3513
4157
  let _ = !!t.disabled;
3514
4158
  return /* @__PURE__ */ T("button", {
3515
4159
  ref: h,
@@ -3523,7 +4167,7 @@ function Na({ item: t, isActive: n, hasMountedPanel: r, isTabStop: i, isFullWidt
3523
4167
  disabled: t.disabled,
3524
4168
  onClick: p,
3525
4169
  onKeyDown: m,
3526
- className: ja({
4170
+ className: Ho({
3527
4171
  variant: o,
3528
4172
  orientation: s,
3529
4173
  size: c,
@@ -3537,7 +4181,7 @@ function Na({ item: t, isActive: n, hasMountedPanel: r, isTabStop: i, isFullWidt
3537
4181
  n && !u && /* @__PURE__ */ w("span", {
3538
4182
  ref: g,
3539
4183
  "aria-hidden": "true",
3540
- className: Ma({
4184
+ className: Uo({
3541
4185
  variant: o,
3542
4186
  orientation: s,
3543
4187
  radius: l
@@ -3545,7 +4189,7 @@ function Na({ item: t, isActive: n, hasMountedPanel: r, isTabStop: i, isFullWidt
3545
4189
  }),
3546
4190
  t.icon && /* @__PURE__ */ w("span", {
3547
4191
  "aria-hidden": "true",
3548
- className: e("relative shrink-0", _a[c], t.icon)
4192
+ className: e("relative shrink-0", Oo[c], t.icon)
3549
4193
  }),
3550
4194
  /* @__PURE__ */ w("span", {
3551
4195
  className: "relative",
@@ -3556,7 +4200,7 @@ function Na({ item: t, isActive: n, hasMountedPanel: r, isTabStop: i, isFullWidt
3556
4200
  });
3557
4201
  }
3558
4202
  // src/components/tabs/tab_panel.tsx
3559
- function Pa({ panelId: t, tabId: n, isHidden: r, isAnimated: i, className: a, contentKey: o, children: s }) {
4203
+ function Go({ panelId: t, tabId: n, isHidden: r, isAnimated: i, className: a, contentKey: o, children: s }) {
3560
4204
  return /* @__PURE__ */ w("div", {
3561
4205
  role: "tabpanel",
3562
4206
  id: t,
@@ -3571,11 +4215,11 @@ function Pa({ panelId: t, tabId: n, isHidden: r, isAnimated: i, className: a, co
3571
4215
  });
3572
4216
  }
3573
4217
  // src/components/tabs/use_tab_indicator_transition.ts
3574
- var Fa = 200, Ia = "ease-out", La = "(prefers-reduced-motion: reduce)";
3575
- function Ra() {
3576
- return typeof window > "u" || typeof window.matchMedia != "function" ? !1 : window.matchMedia(La).matches;
4218
+ var Ko = 200, qo = "ease-out", Jo = "(prefers-reduced-motion: reduce)";
4219
+ function Yo() {
4220
+ return typeof window > "u" || typeof window.matchMedia != "function" ? !1 : window.matchMedia(Jo).matches;
3577
4221
  }
3578
- function za(e, t, n) {
4222
+ function Xo(e, t, n) {
3579
4223
  return e === "vertical" ? [{
3580
4224
  transform: `translateY(${t.top - n.top}px)`,
3581
4225
  height: `${t.height}px`
@@ -3590,16 +4234,16 @@ function za(e, t, n) {
3590
4234
  width: `${n.width}px`
3591
4235
  }];
3592
4236
  }
3593
- function Ba(e, t, n, r) {
3594
- e.animate(za(t, n, r), {
3595
- duration: Fa,
3596
- easing: Ia
4237
+ function Zo(e, t, n, r) {
4238
+ e.animate(Xo(t, n, r), {
4239
+ duration: Ko,
4240
+ easing: qo
3597
4241
  });
3598
4242
  }
3599
- function Va(e, t, n) {
3600
- return !e || !t || !n ? !1 : !Ra();
4243
+ function Qo(e, t, n) {
4244
+ return !e || !t || !n ? !1 : !Yo();
3601
4245
  }
3602
- function Ha(e) {
4246
+ function $o(e) {
3603
4247
  let { activeIndex: t, indicatorRef: n, isAnimated: r, orientation: i } = e, a = y(null);
3604
4248
  _(() => {
3605
4249
  let e = n.current;
@@ -3608,7 +4252,7 @@ function Ha(e) {
3608
4252
  return;
3609
4253
  }
3610
4254
  let t = e.getBoundingClientRect(), o = typeof e.animate == "function";
3611
- Va(a.current, r, o) && Ba(e, i, a.current, t), a.current = t;
4255
+ Qo(a.current, r, o) && Zo(e, i, a.current, t), a.current = t;
3612
4256
  }, [
3613
4257
  t,
3614
4258
  n,
@@ -3617,34 +4261,34 @@ function Ha(e) {
3617
4261
  ]);
3618
4262
  }
3619
4263
  // src/components/tabs/use_tabs_keyboard_navigation.ts
3620
- var Ua = {
4264
+ var es = {
3621
4265
  Home: () => 0,
3622
4266
  End: (e, t) => t - 1
3623
- }, Wa = (e, t) => (e + 1) % t, Ga = (e, t) => (e - 1 + t) % t, Ka = {
4267
+ }, ts = (e, t) => (e + 1) % t, ns = (e, t) => (e - 1 + t) % t, rs = {
3624
4268
  horizontal: {
3625
- ...Ua,
3626
- ArrowRight: Wa,
3627
- ArrowLeft: Ga
4269
+ ...es,
4270
+ ArrowRight: ts,
4271
+ ArrowLeft: ns
3628
4272
  },
3629
4273
  vertical: {
3630
- ...Ua,
3631
- ArrowDown: Wa,
3632
- ArrowUp: Ga
4274
+ ...es,
4275
+ ArrowDown: ts,
4276
+ ArrowUp: ns
3633
4277
  }
3634
4278
  };
3635
- function qa(e) {
4279
+ function is(e) {
3636
4280
  return e.flatMap((e, t) => e.disabled ? [] : [t]);
3637
4281
  }
3638
- function Ja(e, t) {
4282
+ function as(e, t) {
3639
4283
  let n = e[t];
3640
- return n && !n.disabled ? t : qa(e)[0] ?? -1;
4284
+ return n && !n.disabled ? t : is(e)[0] ?? -1;
3641
4285
  }
3642
- function Ya(e) {
4286
+ function os(e) {
3643
4287
  let { items: t, activeIndex: n, orientation: r, onNavigate: i } = e;
3644
4288
  return (e) => {
3645
- let a = Ka[r][e.key];
4289
+ let a = rs[r][e.key];
3646
4290
  if (!a) return;
3647
- let o = qa(t);
4291
+ let o = is(t);
3648
4292
  if (o.length === 0) return;
3649
4293
  e.preventDefault();
3650
4294
  let s = a(o.indexOf(n), o.length);
@@ -3652,34 +4296,34 @@ function Ya(e) {
3652
4296
  };
3653
4297
  }
3654
4298
  // src/components/tabs/tabs.tsx
3655
- function Xa({ items: e, value: t, defaultIndex: n = 0, variant: r = "line", orientation: i = "horizontal", size: a = "md", radius: o = "md", fullWidth: s = !1, unstyled: c = !1, animated: l = !0, keepMounted: u = !1, "aria-label": d, "aria-labelledby": f, className: p, tabListClassName: m, panelClassName: h, onChange: _ }) {
4299
+ function ss({ items: e, value: t, defaultIndex: n = 0, variant: r = "line", orientation: i = "horizontal", size: a = "md", radius: o = "md", fullWidth: s = !1, unstyled: c = !1, animated: l = !0, keepMounted: u = !1, "aria-label": d, "aria-labelledby": f, className: p, tabListClassName: m, panelClassName: h, onChange: _ }) {
3656
4300
  let [v, b] = at(t, n), x = g(), S = y([]), C = y(null), E = (t) => {
3657
4301
  e[t]?.disabled || (b(t), _?.(t));
3658
4302
  }, D = (e) => {
3659
4303
  S.current[e]?.focus(), E(e);
3660
- }, O = Ja(e, v), k = Ya({
4304
+ }, O = as(e, v), k = os({
3661
4305
  items: e,
3662
4306
  activeIndex: O,
3663
4307
  orientation: i,
3664
4308
  onNavigate: D
3665
- }), A = ka({
4309
+ }), A = Bo({
3666
4310
  orientation: i,
3667
4311
  unstyled: c,
3668
4312
  className: h
3669
4313
  }), j = l && !c;
3670
- return Ha({
4314
+ return $o({
3671
4315
  activeIndex: v,
3672
4316
  indicatorRef: C,
3673
4317
  isAnimated: l,
3674
4318
  orientation: i
3675
4319
  }), /* @__PURE__ */ T("div", {
3676
- className: Oa(i, p),
4320
+ className: zo(i, p),
3677
4321
  children: [/* @__PURE__ */ w("div", {
3678
4322
  role: "tablist",
3679
4323
  "aria-label": d,
3680
4324
  "aria-labelledby": f,
3681
4325
  "aria-orientation": i,
3682
- className: Aa({
4326
+ className: Vo({
3683
4327
  variant: r,
3684
4328
  orientation: i,
3685
4329
  radius: o,
@@ -3687,7 +4331,7 @@ function Xa({ items: e, value: t, defaultIndex: n = 0, variant: r = "line", orie
3687
4331
  isFullWidth: s,
3688
4332
  className: m
3689
4333
  }),
3690
- children: e.map((e, t) => /* @__PURE__ */ w(Na, {
4334
+ children: e.map((e, t) => /* @__PURE__ */ w(Wo, {
3691
4335
  ref: (e) => {
3692
4336
  S.current[t] = e;
3693
4337
  },
@@ -3707,14 +4351,14 @@ function Xa({ items: e, value: t, defaultIndex: n = 0, variant: r = "line", orie
3707
4351
  onSelect: () => E(t),
3708
4352
  onKeyDown: k
3709
4353
  }, e.title))
3710
- }), u ? e.map((e, t) => /* @__PURE__ */ w(Pa, {
4354
+ }), u ? e.map((e, t) => /* @__PURE__ */ w(Go, {
3711
4355
  panelId: `${x}-panel-${t}`,
3712
4356
  tabId: `${x}-tab-${t}`,
3713
4357
  isHidden: t !== v,
3714
4358
  isAnimated: j,
3715
4359
  className: A,
3716
4360
  children: e.content
3717
- }, e.title)) : /* @__PURE__ */ w(Pa, {
4361
+ }, e.title)) : /* @__PURE__ */ w(Go, {
3718
4362
  panelId: `${x}-panel-${v}`,
3719
4363
  tabId: `${x}-tab-${v}`,
3720
4364
  isHidden: !1,
@@ -3726,8 +4370,8 @@ function Xa({ items: e, value: t, defaultIndex: n = 0, variant: r = "line", orie
3726
4370
  });
3727
4371
  }
3728
4372
  // src/components/textarea/textarea.tsx
3729
- function Za({ label: t, description: n, error: r, showCharCount: i = !1, minLength: a, maxLength: o, radius: s = "md", unstyled: c = !1, className: l, wrapperClassName: u, value: d, defaultValue: f, onChange: p, id: m, "aria-describedby": h, "aria-label": g, ..._ }) {
3730
- let { fieldId: v, errorId: y, descriptionId: b, labelId: x, characterCountId: S } = ot(m), { length: C, trackLength: E } = Yr(d, f), D = i && (a !== void 0 || o !== void 0), O = (e) => {
4373
+ function cs({ label: t, description: n, error: r, showCharCount: i = !1, minLength: a, maxLength: o, radius: s = "md", unstyled: c = !1, className: l, wrapperClassName: u, value: d, defaultValue: f, onChange: p, id: m, "aria-describedby": h, "aria-label": g, ..._ }) {
4374
+ let { fieldId: v, errorId: y, descriptionId: b, labelId: x, characterCountId: S } = ot(m), { length: C, trackLength: E } = Ni(d, f), D = i && (a !== void 0 || o !== void 0), O = (e) => {
3731
4375
  E(e.target.value), p?.(e);
3732
4376
  };
3733
4377
  return /* @__PURE__ */ T(Ct, {
@@ -3742,7 +4386,7 @@ function Za({ label: t, description: n, error: r, showCharCount: i = !1, minLeng
3742
4386
  children: [/* @__PURE__ */ w("textarea", {
3743
4387
  id: v,
3744
4388
  className: e("w-full min-h-[80px] resize-y disabled:opacity-50 disabled:cursor-not-allowed", !c && [
3745
- Ke,
4389
+ je,
3746
4390
  z[s],
3747
4391
  "px-3 py-2 text-sm"
3748
4392
  ], !c && r && e("border-red-500 dark:border-red-400", "focus:ring-red-500"), l),
@@ -3755,7 +4399,7 @@ function Za({ label: t, description: n, error: r, showCharCount: i = !1, minLeng
3755
4399
  "aria-labelledby": nn(t, x, g),
3756
4400
  "aria-describedby": W(h, !!n && b, r && y, D && S),
3757
4401
  ..._
3758
- }), D && /* @__PURE__ */ w(Ue, {
4402
+ }), D && /* @__PURE__ */ w(Xe, {
3759
4403
  id: S,
3760
4404
  current: C,
3761
4405
  min: a,
@@ -3766,7 +4410,7 @@ function Za({ label: t, description: n, error: r, showCharCount: i = !1, minLeng
3766
4410
  });
3767
4411
  }
3768
4412
  // src/lib/is_webkit_gtk.ts
3769
- var Qa = "AppleWebKit", $a = ["Linux", "X11"], eo = [
4413
+ var ls = "AppleWebKit", us = ["Linux", "X11"], ds = [
3770
4414
  "Chrome",
3771
4415
  "Chromium",
3772
4416
  "Edg",
@@ -3774,12 +4418,12 @@ var Qa = "AppleWebKit", $a = ["Linux", "X11"], eo = [
3774
4418
  "CriOS",
3775
4419
  "FxiOS"
3776
4420
  ];
3777
- function to(e) {
3778
- return !e.includes(Qa) || !$a.some((t) => e.includes(t)) ? !1 : !eo.some((t) => e.includes(t));
4421
+ function fs(e) {
4422
+ return !e.includes(ls) || !us.some((t) => e.includes(t)) ? !1 : !ds.some((t) => e.includes(t));
3779
4423
  }
3780
4424
  // src/lib/theme_transition.ts
3781
- var no = 750, ro = "ease-in-out";
3782
- async function io({ theme: e, element: t, transitionDuration: n = no, transitionEasing: r = ro, applyThemeCallback: i }) {
4425
+ var ps = 750, ms = "ease-in-out";
4426
+ async function hs({ theme: e, element: t, transitionDuration: n = ps, transitionEasing: r = ms, applyThemeCallback: i }) {
3783
4427
  if (!document.startViewTransition || globalThis.matchMedia("(prefers-reduced-motion: reduce)").matches) {
3784
4428
  i(e);
3785
4429
  return;
@@ -3793,81 +4437,81 @@ async function io({ theme: e, element: t, transitionDuration: n = no, transition
3793
4437
  pseudoElement: "::view-transition-new(root)"
3794
4438
  });
3795
4439
  }
3796
- function ao(e) {
4440
+ function gs(e) {
3797
4441
  return e === "light" ? "dark" : e === "dark" ? "system" : "light";
3798
4442
  }
3799
4443
  // src/stores/theme_store/theme_storage_key.ts
3800
- var oo = "theme";
4444
+ var _s = "theme";
3801
4445
  // src/stores/theme_store/theme_store.ts
3802
- function so(e) {
4446
+ function vs(e) {
3803
4447
  return e === "light" || e === "dark" || e === "system";
3804
4448
  }
3805
- function co() {
4449
+ function ys() {
3806
4450
  return globalThis.window !== void 0 && globalThis.document !== void 0;
3807
4451
  }
3808
- var lo = "meta[name=\"theme-color\"][data-light][data-dark]";
3809
- function uo(e) {
4452
+ var bs = "meta[name=\"theme-color\"][data-light][data-dark]";
4453
+ function xs(e) {
3810
4454
  let t = e ? "data-dark" : "data-light";
3811
- for (let e of document.querySelectorAll(lo)) e.setAttribute("content", e.getAttribute(t) ?? "");
4455
+ for (let e of document.querySelectorAll(bs)) e.setAttribute("content", e.getAttribute(t) ?? "");
3812
4456
  }
3813
- function fo(e) {
4457
+ function Ss(e) {
3814
4458
  let t = window.matchMedia("(prefers-color-scheme: dark)").matches, n = e === "dark" || e === "system" && t;
3815
- document.documentElement.classList.toggle("dark", n), uo(n);
4459
+ document.documentElement.classList.toggle("dark", n), xs(n);
3816
4460
  }
3817
- function po() {
3818
- if (!co()) return "system";
4461
+ function Cs() {
4462
+ if (!ys()) return "system";
3819
4463
  try {
3820
- let e = globalThis.localStorage.getItem(oo);
3821
- return so(e) ? e : "system";
4464
+ let e = globalThis.localStorage.getItem(_s);
4465
+ return vs(e) ? e : "system";
3822
4466
  } catch {
3823
4467
  return "system";
3824
4468
  }
3825
4469
  }
3826
- function mo(e) {
3827
- if (co()) try {
3828
- globalThis.localStorage.setItem(oo, e);
4470
+ function ws(e) {
4471
+ if (ys()) try {
4472
+ globalThis.localStorage.setItem(_s, e);
3829
4473
  } catch {
3830
4474
  return;
3831
4475
  }
3832
4476
  }
3833
- var ho = po();
3834
- co() && fo(ho);
3835
- var go = E((e) => ({
3836
- theme: ho,
4477
+ var Ts = Cs();
4478
+ ys() && Ss(Ts);
4479
+ var Es = E((e) => ({
4480
+ theme: Ts,
3837
4481
  setTheme: (t) => {
3838
- fo(t), mo(t), e({ theme: t });
4482
+ Ss(t), ws(t), e({ theme: t });
3839
4483
  }
3840
4484
  }));
3841
- co() && (globalThis.addEventListener("storage", (e) => {
4485
+ ys() && (globalThis.addEventListener("storage", (e) => {
3842
4486
  if (e.key !== "theme") return;
3843
- let t = so(e.newValue) ? e.newValue : "system";
3844
- fo(t), go.setState({ theme: t });
4487
+ let t = vs(e.newValue) ? e.newValue : "system";
4488
+ Ss(t), Es.setState({ theme: t });
3845
4489
  }), globalThis.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", () => {
3846
- go.getState().theme === "system" && fo("system");
4490
+ Es.getState().theme === "system" && Ss("system");
3847
4491
  }));
3848
4492
  // src/components/theme_toggle/theme_toggle.tsx
3849
- var _o = {
4493
+ var Ds = {
3850
4494
  light: "i-tabler-sun text-yellow-500",
3851
4495
  dark: "i-tabler-moon-stars text-gray-700 dark:text-yellow-500",
3852
4496
  system: "i-tabler-device-desktop text-blue-500"
3853
- }, vo = {
4497
+ }, Os = {
3854
4498
  light: "i-tabler-sun",
3855
4499
  dark: "i-tabler-moon-stars",
3856
4500
  system: "i-tabler-device-desktop"
3857
- }, yo = "i-tabler-device-desktop text-gray-400", bo = "i-tabler-device-desktop";
3858
- function xo(e, t, n) {
4501
+ }, ks = "i-tabler-device-desktop text-gray-400", As = "i-tabler-device-desktop";
4502
+ function js(e, t, n) {
3859
4503
  return e ? { unstyled: !0 } : {
3860
4504
  radius: t,
3861
4505
  variant: n
3862
4506
  };
3863
4507
  }
3864
- function So(e, t, n) {
3865
- return n ? t ? vo[e] : bo : t ? _o[e] : yo;
4508
+ function Ms(e, t, n) {
4509
+ return n ? t ? Os[e] : As : t ? Ds[e] : ks;
3866
4510
  }
3867
- function Co({ isTransitionEnabled: e, transitionDuration: t, transitionEasing: n, size: r = "md", unstyled: i = !1, radius: a, variant: o, getAriaLabel: s, tooltip: c }) {
3868
- let l = go((e) => e.theme), u = go((e) => e.setTheme), d = Q(), p = xt(), m = y(null), h = f(async () => {
3869
- let r = ao(l), i = m.current, a = e ?? !to(navigator.userAgent);
3870
- i && a ? await io({
4511
+ function Ns({ isTransitionEnabled: e, transitionDuration: t, transitionEasing: n, size: r = "md", unstyled: i = !1, radius: a, variant: o, getAriaLabel: s, tooltip: c }) {
4512
+ let l = Es((e) => e.theme), u = Es((e) => e.setTheme), d = Q(), p = xt(), m = y(null), h = f(async () => {
4513
+ let r = gs(l), i = m.current, a = e ?? !fs(navigator.userAgent);
4514
+ i && a ? await hs({
3871
4515
  theme: r,
3872
4516
  element: i,
3873
4517
  transitionDuration: t,
@@ -3880,7 +4524,7 @@ function Co({ isTransitionEnabled: e, transitionDuration: t, transitionEasing: n
3880
4524
  t,
3881
4525
  n,
3882
4526
  u
3883
- ]), g = So(l, p, i), _ = xo(i, a, o);
4527
+ ]), g = Ms(l, p, i), _ = js(i, a, o);
3884
4528
  return /* @__PURE__ */ w(X, {
3885
4529
  ref: m,
3886
4530
  icon: g,
@@ -3894,7 +4538,7 @@ function Co({ isTransitionEnabled: e, transitionDuration: t, transitionEasing: n
3894
4538
  });
3895
4539
  }
3896
4540
  // src/components/toast/toast_focus.ts
3897
- function wo(e) {
4541
+ function Ps(e) {
3898
4542
  for (let t = e.nextElementSibling; t; t = t.nextElementSibling) {
3899
4543
  if (t.hasAttribute("inert")) continue;
3900
4544
  let e = t.querySelector("button");
@@ -3902,23 +4546,23 @@ function wo(e) {
3902
4546
  }
3903
4547
  return null;
3904
4548
  }
3905
- function To({ toastElement: e, previousFocus: t }) {
4549
+ function Fs({ toastElement: e, previousFocus: t }) {
3906
4550
  if (!e.contains(document.activeElement)) return;
3907
- let n = wo(e);
4551
+ let n = Ps(e);
3908
4552
  if (n) return n.focus();
3909
4553
  if (t?.isConnected && !e.contains(t)) return t.focus();
3910
4554
  e.closest("[data-ms-toaster-region]")?.focus();
3911
4555
  }
3912
4556
  // src/components/toast/toast_styles.ts
3913
- var Eo = 2 ** 31 - 1, Do = 4e3, Oo = 6e3;
3914
- function ko(e) {
3915
- return e === "error" ? Oo : Do;
4557
+ var Is = 2 ** 31 - 1, Ls = 4e3, Rs = 6e3;
4558
+ function zs(e) {
4559
+ return e === "error" ? Rs : Ls;
3916
4560
  }
3917
- function Ao(e) {
3918
- return e <= 0 || !Number.isFinite(e) || e >= Eo;
4561
+ function Bs(e) {
4562
+ return e <= 0 || !Number.isFinite(e) || e >= Is;
3919
4563
  }
3920
4564
  // src/components/toast/toast_timer_bar.tsx
3921
- function jo({ duration: t, isRunning: n, isStyled: r }) {
4565
+ function Vs({ duration: t, isRunning: n, isStyled: r }) {
3922
4566
  let i = {
3923
4567
  animationDuration: `${t}ms`,
3924
4568
  animationFillMode: "forwards",
@@ -3933,7 +4577,7 @@ function jo({ duration: t, isRunning: n, isStyled: r }) {
3933
4577
  });
3934
4578
  }
3935
4579
  // src/components/toast/toaster_item_content.tsx
3936
- function Mo({ tone: t, message: n, description: r, action: i, radius: a, unstyled: o, closeLabel: s, timerDuration: c, isTimerRunning: l, timerKey: u, onAction: d, onDismiss: f }) {
4580
+ function Hs({ tone: t, message: n, description: r, action: i, radius: a, unstyled: o, closeLabel: s, timerDuration: c, isTimerRunning: l, timerKey: u, onAction: d, onDismiss: f }) {
3937
4581
  return /* @__PURE__ */ T("div", {
3938
4582
  className: e("flex items-start gap-3", !o && [
3939
4583
  "relative overflow-hidden px-4 py-3 border text-sm",
@@ -3955,11 +4599,11 @@ function Mo({ tone: t, message: n, description: r, action: i, radius: a, unstyle
3955
4599
  }), r && /* @__PURE__ */ w("div", { children: r })]
3956
4600
  }), i && /* @__PURE__ */ w("div", {
3957
4601
  className: "mt-2",
3958
- children: o ? /* @__PURE__ */ w(Me, {
4602
+ children: o ? /* @__PURE__ */ w(ze, {
3959
4603
  unstyled: !0,
3960
4604
  onClick: d,
3961
4605
  children: i.label
3962
- }) : /* @__PURE__ */ w(Me, {
4606
+ }) : /* @__PURE__ */ w(ze, {
3963
4607
  size: "sm",
3964
4608
  variant: "solid",
3965
4609
  color: fe[t],
@@ -3976,7 +4620,7 @@ function Mo({ tone: t, message: n, description: r, action: i, radius: a, unstyle
3976
4620
  unstyled: o,
3977
4621
  onClick: f
3978
4622
  }),
3979
- c !== null && /* @__PURE__ */ w(jo, {
4623
+ c !== null && /* @__PURE__ */ w(Vs, {
3980
4624
  duration: c,
3981
4625
  isRunning: l,
3982
4626
  isStyled: !o
@@ -3985,14 +4629,14 @@ function Mo({ tone: t, message: n, description: r, action: i, radius: a, unstyle
3985
4629
  });
3986
4630
  }
3987
4631
  // src/components/toast/toaster_styles.ts
3988
- var No = {
4632
+ var Us = {
3989
4633
  "top-left": "ms-toaster-top ms-toaster-left",
3990
4634
  "top-center": "ms-toaster-top ms-toaster-center",
3991
4635
  "top-right": "ms-toaster-top ms-toaster-right",
3992
4636
  "bottom-left": "ms-toaster-bottom ms-toaster-left",
3993
4637
  "bottom-center": "ms-toaster-bottom ms-toaster-center",
3994
4638
  "bottom-right": "ms-toaster-bottom ms-toaster-right"
3995
- }, Po = {
4639
+ }, Ws = {
3996
4640
  "top-left": "ms-toaster-item-top-left",
3997
4641
  "top-center": "ms-toaster-item-top-center",
3998
4642
  "top-right": "ms-toaster-item-top-right",
@@ -4001,25 +4645,25 @@ var No = {
4001
4645
  "bottom-right": "ms-toaster-item-bottom-right"
4002
4646
  };
4003
4647
  // src/components/toast/use_toast_timer.ts
4004
- function Fo() {
4648
+ function Gs() {
4005
4649
  return document.visibilityState === "hidden";
4006
4650
  }
4007
- var Io = /* @__PURE__ */ new Set();
4008
- function Lo() {
4009
- for (let e of Io) e();
4651
+ var Ks = /* @__PURE__ */ new Set();
4652
+ function qs() {
4653
+ for (let e of Ks) e();
4010
4654
  }
4011
- function Ro(e) {
4012
- return Io.size === 0 && document.addEventListener("visibilitychange", Lo), Io.add(e), () => {
4013
- Io.delete(e), !(Io.size > 0) && document.removeEventListener("visibilitychange", Lo);
4655
+ function Js(e) {
4656
+ return Ks.size === 0 && document.addEventListener("visibilitychange", qs), Ks.add(e), () => {
4657
+ Ks.delete(e), !(Ks.size > 0) && document.removeEventListener("visibilitychange", qs);
4014
4658
  };
4015
4659
  }
4016
- function zo() {
4660
+ function Ys() {
4017
4661
  return !1;
4018
4662
  }
4019
- function Bo({ duration: e, isPaused: t, onElapsed: n, revision: r = 0 }) {
4020
- let i = y(e), a = y(r), [o, s] = b(null), c = x(Ro, Fo, zo), l = o === r, u = h(n);
4663
+ function Xs({ duration: e, isPaused: t, onElapsed: n, revision: r = 0 }) {
4664
+ let i = y(e), a = y(r), [o, s] = b(null), c = x(Js, Gs, Ys), l = o === r, u = h(n);
4021
4665
  return m(() => {
4022
- if (a.current !== r && (a.current = r, i.current = e), l || t || c || Ao(e)) return;
4666
+ if (a.current !== r && (a.current = r, i.current = e), l || t || c || Bs(e)) return;
4023
4667
  let n = Date.now(), o = setTimeout(() => {
4024
4668
  s(r), u();
4025
4669
  }, i.current);
@@ -4032,26 +4676,26 @@ function Bo({ duration: e, isPaused: t, onElapsed: n, revision: r = 0 }) {
4032
4676
  c,
4033
4677
  r,
4034
4678
  l
4035
- ]), { isRunning: !l && !t && !c && !Ao(e) };
4679
+ ]), { isRunning: !l && !t && !c && !Bs(e) };
4036
4680
  }
4037
- var Vo = 5;
4038
- function Ho(e) {
4681
+ var Zs = 5;
4682
+ function Qs(e) {
4039
4683
  return e.filter((e) => !e.isClosing).length;
4040
4684
  }
4041
- function Uo(e) {
4685
+ function $s(e) {
4042
4686
  let t = e.filter((e) => !e.isClosing && !e.isPinned);
4043
- return t.find((e) => !Ao(e.duration)) ?? t[0];
4687
+ return t.find((e) => !Bs(e.duration)) ?? t[0];
4044
4688
  }
4045
- function Wo(e) {
4689
+ function ec(e) {
4046
4690
  let t = e;
4047
- for (; Ho(t) > 5;) {
4048
- let e = Uo(t);
4691
+ for (; Qs(t) > 5;) {
4692
+ let e = $s(t);
4049
4693
  if (!e) return t;
4050
- t = Ko(t, e.id);
4694
+ t = nc(t, e.id);
4051
4695
  }
4052
4696
  return t;
4053
4697
  }
4054
- function Go(e, t) {
4698
+ function tc(e, t) {
4055
4699
  let n = e.find((e) => e.id === t.id);
4056
4700
  if (!n) {
4057
4701
  let n = {
@@ -4070,48 +4714,48 @@ function Go(e, t) {
4070
4714
  };
4071
4715
  return e.map((e) => e.id === t.id ? r : e);
4072
4716
  }
4073
- function Ko(e, t) {
4717
+ function nc(e, t) {
4074
4718
  let n = (e) => (t === void 0 || e.id === t) && !e.isClosing;
4075
4719
  return e.some(n) ? e.map((e) => n(e) ? {
4076
4720
  ...e,
4077
4721
  isClosing: !0
4078
4722
  } : e) : e;
4079
4723
  }
4080
- function qo(e, t) {
4724
+ function rc(e, t) {
4081
4725
  return e.some((e) => e.id === t) ? e.filter((e) => e.id !== t) : e;
4082
4726
  }
4083
- function Jo(e, t, n) {
4727
+ function ic(e, t, n) {
4084
4728
  let r = e.find((e) => e.id === t);
4085
4729
  return !r || r.isPinned === n ? e : e.map((e) => e.id === t ? {
4086
4730
  ...e,
4087
4731
  isPinned: n
4088
4732
  } : e);
4089
4733
  }
4090
- function Yo(e) {
4091
- let t = e.filter((e) => e.isClosing).length - Vo;
4734
+ function ac(e) {
4735
+ let t = e.filter((e) => e.isClosing).length - Zs;
4092
4736
  return t <= 0 ? e : e.filter((e) => !e.isClosing || t <= 0 || (--t, !1));
4093
4737
  }
4094
4738
  // src/stores/toast_store/toast_store.ts
4095
- function Xo(e, t) {
4739
+ function oc(e, t) {
4096
4740
  return t === e.entries ? e : {
4097
4741
  ...e,
4098
4742
  entries: t
4099
4743
  };
4100
4744
  }
4101
- var Zo = E((e) => ({
4745
+ var sc = E((e) => ({
4102
4746
  entries: [],
4103
- showToast: (t) => e((e) => ({ entries: Yo(Wo(Go(e.entries, t))) })),
4104
- dismissToast: (t) => e((e) => Xo(e, Ko(e.entries, t))),
4105
- removeToast: (t) => e((e) => Xo(e, qo(e.entries, t))),
4106
- setToastPinned: (t, n) => e((e) => Xo(e, Jo(e.entries, t, n))),
4747
+ showToast: (t) => e((e) => ({ entries: ac(ec(tc(e.entries, t))) })),
4748
+ dismissToast: (t) => e((e) => oc(e, nc(e.entries, t))),
4749
+ removeToast: (t) => e((e) => oc(e, rc(e.entries, t))),
4750
+ setToastPinned: (t, n) => e((e) => oc(e, ic(e.entries, t, n))),
4107
4751
  resetToasts: () => e((e) => e.entries.length === 0 ? e : {
4108
4752
  ...e,
4109
4753
  entries: []
4110
4754
  })
4111
4755
  }));
4112
4756
  // src/components/toast/toaster_item.tsx
4113
- function Qo({ entry: t, position: n, toasterRadius: r, toasterUnstyled: i, closeLabel: a, previousFocusRef: o }) {
4114
- let { id: s, message: c, description: l, tone: u, duration: d, action: f, revision: p, isClosing: h } = t, g = t.radius ?? r ?? "lg", v = t.unstyled ?? i ?? !1, x = Zo((e) => e.dismissToast), S = Zo((e) => e.removeToast), C = Zo((e) => e.setToastPinned), T = y(null), [E, D] = b(!1), [O, k] = b(!1), [A, j] = b(!1), { isRunning: M } = Bo({
4757
+ function cc({ entry: t, position: n, toasterRadius: r, toasterUnstyled: i, closeLabel: a, previousFocusRef: o }) {
4758
+ let { id: s, message: c, description: l, tone: u, duration: d, action: f, revision: p, isClosing: h } = t, g = t.radius ?? r ?? "lg", v = t.unstyled ?? i ?? !1, x = sc((e) => e.dismissToast), S = sc((e) => e.removeToast), C = sc((e) => e.setToastPinned), T = y(null), [E, D] = b(!1), [O, k] = b(!1), [A, j] = b(!1), { isRunning: M } = Xs({
4115
4759
  duration: d,
4116
4760
  isPaused: O || A || h,
4117
4761
  onElapsed: () => x(s),
@@ -4128,7 +4772,7 @@ function Qo({ entry: t, position: n, toasterRadius: r, toasterUnstyled: i, close
4128
4772
  A,
4129
4773
  C
4130
4774
  ]), _(() => {
4131
- h && T.current && To({
4775
+ h && T.current && Fs({
4132
4776
  toastElement: T.current,
4133
4777
  previousFocus: o.current
4134
4778
  });
@@ -4151,7 +4795,7 @@ function Qo({ entry: t, position: n, toasterRadius: r, toasterUnstyled: i, close
4151
4795
  e.key !== "Escape" || h || e.ctrlKey || e.altKey || e.metaKey || e.shiftKey || (e.preventDefault(), e.stopPropagation(), x(s));
4152
4796
  }, R = () => x(s), z = () => {
4153
4797
  f?.onClick(), x(s);
4154
- }, V = E && !h, H = Ao(d) ? null : d;
4798
+ }, V = E && !h, H = Bs(d) ? null : d;
4155
4799
  return /* @__PURE__ */ w("li", {
4156
4800
  ref: T,
4157
4801
  "data-ms-toast-id": s,
@@ -4163,14 +4807,14 @@ function Qo({ entry: t, position: n, toasterRadius: r, toasterUnstyled: i, close
4163
4807
  "bg-white dark:bg-gray-900",
4164
4808
  B[g],
4165
4809
  "ms-toaster-item-transition",
4166
- Po[n]
4810
+ Ws[n]
4167
4811
  ]),
4168
4812
  onPointerEnter: P,
4169
4813
  onPointerLeave: F,
4170
4814
  onFocus: I,
4171
4815
  onKeyDown: L,
4172
4816
  onBlur: N,
4173
- children: /* @__PURE__ */ w(Mo, {
4817
+ children: /* @__PURE__ */ w(Hs, {
4174
4818
  tone: u,
4175
4819
  message: c,
4176
4820
  description: l,
@@ -4186,83 +4830,83 @@ function Qo({ entry: t, position: n, toasterRadius: r, toasterUnstyled: i, close
4186
4830
  })
4187
4831
  });
4188
4832
  }
4189
- var $o = d(Qo), es = [], ts = /* @__PURE__ */ new Set(), ns = 0;
4190
- function rs() {
4191
- for (let e of ts) e();
4833
+ var lc = d(cc), uc = [], dc = /* @__PURE__ */ new Set(), fc = 0;
4834
+ function pc() {
4835
+ for (let e of dc) e();
4192
4836
  }
4193
- function is() {
4194
- let e = ns;
4837
+ function mc() {
4838
+ let e = fc;
4195
4839
  queueMicrotask(() => {
4196
- e === ns && Zo.getState().resetToasts();
4840
+ e === fc && sc.getState().resetToasts();
4197
4841
  });
4198
4842
  }
4199
- function as(e) {
4200
- return ts.add(e), () => {
4201
- ts.delete(e);
4843
+ function hc(e) {
4844
+ return dc.add(e), () => {
4845
+ dc.delete(e);
4202
4846
  };
4203
4847
  }
4204
- function os(e) {
4205
- return es[0] === e;
4848
+ function gc(e) {
4849
+ return uc[0] === e;
4206
4850
  }
4207
- function ss(e) {
4208
- return ns += 1, es.push(e), rs(), () => {
4209
- let t = es.indexOf(e);
4210
- t !== -1 && (es.splice(t, 1), rs(), es.length === 0 && is());
4851
+ function _c(e) {
4852
+ return fc += 1, uc.push(e), pc(), () => {
4853
+ let t = uc.indexOf(e);
4854
+ t !== -1 && (uc.splice(t, 1), pc(), uc.length === 0 && mc());
4211
4855
  };
4212
4856
  }
4213
4857
  // src/components/toast/use_is_active_toaster.ts
4214
- var cs = "Toaster: another <Toaster /> is already mounted, so this one renders nothing. Mount a single Toaster at the app root.";
4215
- function ls() {
4858
+ var vc = "Toaster: another <Toaster /> is already mounted, so this one renders nothing. Mount a single Toaster at the app root.";
4859
+ function yc() {
4216
4860
  return !1;
4217
4861
  }
4218
- function us() {
4862
+ function bc() {
4219
4863
  let e = g();
4220
4864
  return m(() => {
4221
- let t = ss(e);
4222
- return !os(e) && process.env.NODE_ENV !== "production" && console.warn(cs), t;
4223
- }, [e]), x(as, () => os(e), ls);
4865
+ let t = _c(e);
4866
+ return !gc(e) && process.env.NODE_ENV !== "production" && console.warn(vc), t;
4867
+ }, [e]), x(hc, () => gc(e), yc);
4224
4868
  }
4225
4869
  // src/components/toast/toast_announcement.ts
4226
- var ds = ["danger"];
4227
- function fs(e) {
4228
- return ds.some((t) => t === e) ? "assertive" : "polite";
4870
+ var xc = ["danger"];
4871
+ function Sc(e) {
4872
+ return xc.some((t) => t === e) ? "assertive" : "polite";
4229
4873
  }
4230
- function ps(e) {
4874
+ function Cc(e) {
4231
4875
  return Array.from(document.querySelectorAll(`[data-ms-toast-announcer="${e}"]`));
4232
4876
  }
4233
- function ms(e) {
4877
+ function wc(e) {
4234
4878
  return e.closest("[aria-modal=\"true\"]")?.getAttribute("data-state") === "open";
4235
4879
  }
4236
- function hs(e) {
4880
+ function Tc(e) {
4237
4881
  let t = e.querySelector("[data-ms-toast-text]");
4238
4882
  return t ? Array.from(t.children).map((e) => e.textContent ?? "").join(" ").trim() : "";
4239
4883
  }
4240
- function gs(e, t) {
4884
+ function Ec(e, t) {
4241
4885
  let n = t[e];
4242
4886
  n && (n.textContent = "");
4243
- for (let t of ps(e)) t.textContent = "";
4887
+ for (let t of Cc(e)) t.textContent = "";
4244
4888
  }
4245
- function _s(e, t, n) {
4246
- let r = ps(e).filter(ms).at(-1) ?? n[e];
4889
+ function Dc(e, t, n) {
4890
+ let r = Cc(e).filter(wc).at(-1) ?? n[e];
4247
4891
  r && (r.textContent = t);
4248
4892
  }
4249
- function vs(e, t) {
4893
+ function Oc(e, t) {
4250
4894
  if (e) return Array.from(e.querySelectorAll("[data-ms-toast-id]")).find((e) => e.dataset.msToastId === t);
4251
4895
  }
4252
- function ys(e, t) {
4896
+ function kc(e, t) {
4253
4897
  let n = {
4254
4898
  polite: [],
4255
4899
  assertive: []
4256
4900
  };
4257
4901
  for (let r of t) {
4258
- let t = vs(e, r);
4902
+ let t = Oc(e, r);
4259
4903
  if (!t) continue;
4260
- let i = hs(t);
4261
- i && n[fs(t.dataset.tone ?? "")].push(i);
4904
+ let i = Tc(t);
4905
+ i && n[Sc(t.dataset.tone ?? "")].push(i);
4262
4906
  }
4263
4907
  return n;
4264
4908
  }
4265
- function bs({ entries: e, listRef: t, politeRef: n, assertiveRef: r }) {
4909
+ function Ac({ entries: e, listRef: t, politeRef: n, assertiveRef: r }) {
4266
4910
  let i = y(/* @__PURE__ */ new Map()), a = y([]), o = y(null);
4267
4911
  m(() => {
4268
4912
  let s = i.current, c = a.current, l = {
@@ -4272,11 +4916,11 @@ function bs({ entries: e, listRef: t, politeRef: n, assertiveRef: r }) {
4272
4916
  s.clear();
4273
4917
  for (let t of e) s.set(t.id, t.revision);
4274
4918
  if (u.length !== 0) {
4275
- for (let e of u) gs(fs(e.tone), l), c.push(e.id);
4919
+ for (let e of u) Ec(Sc(e.tone), l), c.push(e.id);
4276
4920
  o.current === null && (o.current = setTimeout(() => {
4277
4921
  o.current = null;
4278
- let e = ys(t.current, c.splice(0));
4279
- e.polite.length > 0 && _s("polite", e.polite.join(" "), l), e.assertive.length > 0 && _s("assertive", e.assertive.join(" "), l);
4922
+ let e = kc(t.current, c.splice(0));
4923
+ e.polite.length > 0 && Dc("polite", e.polite.join(" "), l), e.assertive.length > 0 && Dc("assertive", e.assertive.join(" "), l);
4280
4924
  }, 50));
4281
4925
  }
4282
4926
  }, [
@@ -4291,28 +4935,28 @@ function bs({ entries: e, listRef: t, politeRef: n, assertiveRef: r }) {
4291
4935
  };
4292
4936
  }, []);
4293
4937
  }
4294
- function xs(e) {
4938
+ function jc(e) {
4295
4939
  return e.ctrlKey || e.altKey || e.metaKey || e.shiftKey;
4296
4940
  }
4297
- function Ss() {
4298
- return Zo.getState().entries.some((e) => !e.isClosing);
4941
+ function Mc() {
4942
+ return sc.getState().entries.some((e) => !e.isClosing);
4299
4943
  }
4300
- function Cs() {
4944
+ function Nc() {
4301
4945
  let { activeElement: e } = document;
4302
4946
  return e instanceof HTMLElement ? e === document.body ? null : e : null;
4303
4947
  }
4304
- function ws({ regionRef: e, previousFocusRef: t }) {
4948
+ function Pc({ regionRef: e, previousFocusRef: t }) {
4305
4949
  m(() => {
4306
4950
  let n = (n) => {
4307
- if (n.key !== "F8" || xs(n) || n.defaultPrevented || !Vr.getState().globalHotkeysEnabled) return;
4951
+ if (n.key !== "F8" || jc(n) || n.defaultPrevented || !vi.getState().globalHotkeysEnabled) return;
4308
4952
  let r = e.current;
4309
- if (r && Ss()) {
4953
+ if (r && Mc()) {
4310
4954
  if (r.contains(document.activeElement)) {
4311
4955
  let e = t.current;
4312
4956
  if (!e?.isConnected) return;
4313
4957
  e.focus();
4314
4958
  } else {
4315
- let e = Cs();
4959
+ let e = Nc();
4316
4960
  r.focus(), t.current = e;
4317
4961
  }
4318
4962
  n.preventDefault();
@@ -4322,12 +4966,12 @@ function ws({ regionRef: e, previousFocusRef: t }) {
4322
4966
  }, [e, t]);
4323
4967
  }
4324
4968
  // src/components/toast/toaster.tsx
4325
- function Ts({ position: t = "bottom-right", radius: n, unstyled: r }) {
4326
- let i = Q(), a = Zo((e) => e.entries), o = y(null), s = y(null), c = y(null), l = y(null), u = y(null);
4327
- ws({
4969
+ function Fc({ position: t = "bottom-right", radius: n, unstyled: r }) {
4970
+ let i = Q(), a = sc((e) => e.entries), o = y(null), s = y(null), c = y(null), l = y(null), u = y(null);
4971
+ Pc({
4328
4972
  regionRef: l,
4329
4973
  previousFocusRef: u
4330
- }), bs({
4974
+ }), Ac({
4331
4975
  entries: a,
4332
4976
  listRef: o,
4333
4977
  politeRef: s,
@@ -4335,7 +4979,7 @@ function Ts({ position: t = "bottom-right", radius: n, unstyled: r }) {
4335
4979
  });
4336
4980
  let d = t.startsWith("top"), f = v(() => d ? [...a].reverse() : a, [a, d]);
4337
4981
  return S(/* @__PURE__ */ T("div", {
4338
- className: e("ms-toaster", No[t]),
4982
+ className: e("ms-toaster", Us[t]),
4339
4983
  children: [
4340
4984
  /* @__PURE__ */ w("section", {
4341
4985
  ref: l,
@@ -4351,7 +4995,7 @@ function Ts({ position: t = "bottom-right", radius: n, unstyled: r }) {
4351
4995
  children: /* @__PURE__ */ w("ol", {
4352
4996
  ref: o,
4353
4997
  className: "m-0 flex list-none flex-col gap-2 p-0",
4354
- children: f.map((e) => /* @__PURE__ */ w($o, {
4998
+ children: f.map((e) => /* @__PURE__ */ w(lc, {
4355
4999
  entry: e,
4356
5000
  position: t,
4357
5001
  toasterRadius: n,
@@ -4374,70 +5018,70 @@ function Ts({ position: t = "bottom-right", radius: n, unstyled: r }) {
4374
5018
  ]
4375
5019
  }), document.body);
4376
5020
  }
4377
- function Es(e) {
4378
- return us() ? /* @__PURE__ */ w(Ts, { ...e }) : null;
5021
+ function Ic(e) {
5022
+ return bc() ? /* @__PURE__ */ w(Fc, { ...e }) : null;
4379
5023
  }
4380
5024
  // src/components/toast/toast_provider.tsx
4381
- var Ds = ({ children: e }) => /* @__PURE__ */ T(C, { children: [e, /* @__PURE__ */ w(Es, {})] }), Os = 0;
4382
- function ks() {
4383
- return Os += 1, `ms-toast-${Os}`;
5025
+ var Lc = ({ children: e }) => /* @__PURE__ */ T(C, { children: [e, /* @__PURE__ */ w(Ic, {})] }), Rc = 0;
5026
+ function zc() {
5027
+ return Rc += 1, `ms-toast-${Rc}`;
4384
5028
  }
4385
5029
  // src/components/toast/toast.ts
4386
- var As = 5e3, js = ["warning", "danger"];
4387
- function Ms(e, t) {
4388
- return t.duration === void 0 ? js.includes(e) || t.action ? Infinity : As : t.duration;
5030
+ var Bc = 5e3, Vc = ["warning", "danger"];
5031
+ function Hc(e, t) {
5032
+ return t.duration === void 0 ? Vc.includes(e) || t.action ? Infinity : Bc : t.duration;
4389
5033
  }
4390
- function Ns(e, t, n = {}) {
4391
- let r = n.id ?? ks();
4392
- return typeof window > "u" || Zo.getState().showToast({
5034
+ function Uc(e, t, n = {}) {
5035
+ let r = n.id ?? zc();
5036
+ return typeof window > "u" || sc.getState().showToast({
4393
5037
  id: r,
4394
5038
  message: t,
4395
5039
  description: n.description,
4396
5040
  tone: e,
4397
- duration: Ms(e, n),
5041
+ duration: Hc(e, n),
4398
5042
  action: n.action
4399
5043
  }), r;
4400
5044
  }
4401
- function Ps(e) {
4402
- typeof window < "u" && Zo.getState().dismissToast(e);
4403
- }
4404
- var Fs = Object.assign((e, t) => Ns("info", e, t), {
4405
- info: (e, t) => Ns("info", e, t),
4406
- success: (e, t) => Ns("success", e, t),
4407
- warning: (e, t) => Ns("warning", e, t),
4408
- error: (e, t) => Ns("danger", e, t),
4409
- dismiss: Ps
5045
+ function Wc(e) {
5046
+ typeof window < "u" && sc.getState().dismissToast(e);
5047
+ }
5048
+ var Gc = Object.assign((e, t) => Uc("info", e, t), {
5049
+ info: (e, t) => Uc("info", e, t),
5050
+ success: (e, t) => Uc("success", e, t),
5051
+ warning: (e, t) => Uc("warning", e, t),
5052
+ error: (e, t) => Uc("danger", e, t),
5053
+ dismiss: Wc
4410
5054
  });
4411
5055
  // src/components/toast/use_toast.ts
4412
- function Is(e) {
4413
- return e.duration === void 0 ? e.action ? Infinity : ko(e.tone ?? "info") : e.duration;
5056
+ function Kc(e) {
5057
+ return e.duration === void 0 ? e.action ? Infinity : zs(e.tone ?? "info") : e.duration;
4414
5058
  }
4415
- function Ls(e) {
4416
- let t = ks();
5059
+ function qc(e) {
5060
+ let t = zc();
4417
5061
  if (typeof window > "u") return t;
4418
5062
  let n = e.tone ?? "info";
4419
- return Zo.getState().showToast({
5063
+ return sc.getState().showToast({
4420
5064
  id: t,
4421
5065
  message: e.message,
4422
5066
  tone: n === "error" ? "danger" : n,
4423
- duration: Is(e),
5067
+ duration: Kc(e),
4424
5068
  action: e.action,
4425
5069
  radius: e.radius,
4426
5070
  unstyled: e.unstyled
4427
5071
  }), t;
4428
5072
  }
4429
- function Rs(e) {
4430
- typeof window < "u" && Zo.getState().dismissToast(e);
5073
+ function Jc(e) {
5074
+ typeof window < "u" && sc.getState().dismissToast(e);
4431
5075
  }
4432
- var zs = {
4433
- show: Ls,
4434
- dismiss: Rs
5076
+ var Yc = {
5077
+ show: qc,
5078
+ dismiss: Jc
4435
5079
  };
4436
- function Bs() {
4437
- return zs;
5080
+ function Xc() {
5081
+ return Yc;
4438
5082
  }
4439
5083
  // src/components/toolbar/toolbar_items.ts
4440
- var Vs = "a[href], button, input:not([type=\"hidden\"]), select, textarea, summary, [contenteditable]:not([contenteditable=\"false\"]), [tabindex]", Hs = [
5084
+ var Zc = "a[href], button, input:not([type=\"hidden\"]), select, textarea, summary, [contenteditable]:not([contenteditable=\"false\"]), [tabindex]", Qc = [
4441
5085
  "textarea",
4442
5086
  "[contenteditable]:not([contenteditable=\"false\"])",
4443
5087
  `input:not(${[
@@ -4451,46 +5095,46 @@ var Vs = "a[href], button, input:not([type=\"hidden\"]), select, textarea, summa
4451
5095
  "reset",
4452
5096
  "submit"
4453
5097
  ].map((e) => `[type="${e}"]`).join(", ")})`
4454
- ].join(", "), Us = "select, input[type=\"range\"], input[type=\"radio\"]";
4455
- function Ws(e) {
5098
+ ].join(", "), $c = "select, input[type=\"range\"], input[type=\"radio\"]";
5099
+ function el(e) {
4456
5100
  return e.matches(":disabled, [aria-disabled=\"true\"]");
4457
5101
  }
4458
- function Gs(e) {
4459
- return Array.from(e.querySelectorAll(Vs));
5102
+ function tl(e) {
5103
+ return Array.from(e.querySelectorAll(Zc));
4460
5104
  }
4461
- function Ks(e) {
4462
- return Gs(e).filter((e) => !Ws(e));
5105
+ function nl(e) {
5106
+ return tl(e).filter((e) => !el(e));
4463
5107
  }
4464
- function qs(e) {
4465
- return e instanceof HTMLElement && e.matches(`${Hs}, ${Us}`);
5108
+ function rl(e) {
5109
+ return e instanceof HTMLElement && e.matches(`${Qc}, ${$c}`);
4466
5110
  }
4467
5111
  // src/components/toolbar/toolbar_navigation.ts
4468
- var Js = (e, t) => (e + 1) % t, Ys = (e, t) => (e - 1 + t) % t, Xs = () => 0, Zs = (e, t) => t - 1, Qs = {
5112
+ var il = (e, t) => (e + 1) % t, al = (e, t) => (e - 1 + t) % t, ol = () => 0, sl = (e, t) => t - 1, cl = {
4469
5113
  horizontal: {
4470
- ArrowRight: Js,
4471
- ArrowLeft: Ys,
4472
- Home: Xs,
4473
- End: Zs
5114
+ ArrowRight: il,
5115
+ ArrowLeft: al,
5116
+ Home: ol,
5117
+ End: sl
4474
5118
  },
4475
5119
  vertical: {
4476
- ArrowDown: Js,
4477
- ArrowUp: Ys,
4478
- Home: Xs,
4479
- End: Zs
5120
+ ArrowDown: il,
5121
+ ArrowUp: al,
5122
+ Home: ol,
5123
+ End: sl
4480
5124
  }
4481
5125
  };
4482
- function $s(e) {
4483
- let { key: t, orientation: n, currentPosition: r, itemCount: i } = e, a = Qs[n][t];
5126
+ function ll(e) {
5127
+ let { key: t, orientation: n, currentPosition: r, itemCount: i } = e, a = cl[n][t];
4484
5128
  if (a && i !== 0) return a(r, i);
4485
5129
  }
4486
5130
  // src/components/toolbar/use_toolbar_roving_focus.ts
4487
- var ec = ["disabled", "aria-disabled"];
4488
- function tc(e, t) {
5131
+ var ul = ["disabled", "aria-disabled"];
5132
+ function dl(e, t) {
4489
5133
  let n = y(null), r = f(() => {
4490
5134
  let t = e.current;
4491
5135
  if (!t) return;
4492
- let r = Ks(t), i = n.current, a = i && r.includes(i) ? i : r[0];
4493
- for (let e of Gs(t)) e.tabIndex = e === a ? 0 : -1;
5136
+ let r = nl(t), i = n.current, a = i && r.includes(i) ? i : r[0];
5137
+ for (let e of tl(t)) e.tabIndex = e === a ? 0 : -1;
4494
5138
  }, [e]);
4495
5139
  return m(() => {
4496
5140
  let t = e.current;
@@ -4501,19 +5145,19 @@ function tc(e, t) {
4501
5145
  subtree: !0,
4502
5146
  childList: !0,
4503
5147
  attributes: !0,
4504
- attributeFilter: ec
5148
+ attributeFilter: ul
4505
5149
  }), () => n.disconnect();
4506
5150
  }, [e, r]), {
4507
5151
  handleFocus: (t) => {
4508
5152
  let i = e.current;
4509
5153
  if (!i) return;
4510
- let a = Ks(i).find((e) => e === t.target);
5154
+ let a = nl(i).find((e) => e === t.target);
4511
5155
  a && (n.current = a, r());
4512
5156
  },
4513
5157
  handleKeyDown: (n) => {
4514
5158
  let r = e.current;
4515
- if (!r || !r.contains(n.target) || qs(n.target)) return;
4516
- let i = Ks(r), a = $s({
5159
+ if (!r || !r.contains(n.target) || rl(n.target)) return;
5160
+ let i = nl(r), a = ll({
4517
5161
  key: n.key,
4518
5162
  orientation: t,
4519
5163
  currentPosition: i.findIndex((e) => e === n.target),
@@ -4524,18 +5168,18 @@ function tc(e, t) {
4524
5168
  };
4525
5169
  }
4526
5170
  // src/components/toolbar/toolbar.tsx
4527
- var nc = {
5171
+ var fl = {
4528
5172
  horizontal: "flex items-center gap-1",
4529
5173
  vertical: "flex flex-col items-stretch gap-1"
4530
5174
  };
4531
- function rc(t) {
4532
- let { orientation: n = "horizontal", unstyled: r = !1, className: i, ref: a, onFocus: o, onKeyDown: s, ...c } = t, l = y(null), { handleFocus: u, handleKeyDown: d } = tc(l, n);
5175
+ function pl(t) {
5176
+ let { orientation: n = "horizontal", unstyled: r = !1, className: i, ref: a, onFocus: o, onKeyDown: s, ...c } = t, l = y(null), { handleFocus: u, handleKeyDown: d } = dl(l, n);
4533
5177
  return /* @__PURE__ */ w("div", {
4534
5178
  ...c,
4535
5179
  ref: K(l, a),
4536
5180
  role: "toolbar",
4537
5181
  "aria-orientation": n,
4538
- className: e(!r && nc[n], i),
5182
+ className: e(!r && fl[n], i),
4539
5183
  onFocus: (e) => {
4540
5184
  u(e), o?.(e);
4541
5185
  },
@@ -4545,14 +5189,17 @@ function rc(t) {
4545
5189
  });
4546
5190
  }
4547
5191
  // src/components/ui_provider/french_ui_labels.ts
4548
- var ic = {
5192
+ var ml = {
4549
5193
  light: "clair",
4550
5194
  dark: "sombre",
4551
5195
  system: "système"
4552
- }, ac = {
5196
+ }, hl = {
4553
5197
  close: "Fermer",
5198
+ enterFullScreen: "Plein écran",
5199
+ exitFullScreen: "Quitter le plein écran",
4554
5200
  confirm: "Confirmer",
4555
5201
  cancel: "Annuler",
5202
+ collapsePanel: "Replier le panneau",
4556
5203
  noResults: "Aucun résultat",
4557
5204
  clearSelection: "Effacer la sélection",
4558
5205
  search: "Rechercher",
@@ -4564,19 +5211,19 @@ var ic = {
4564
5211
  notifications: "Notifications",
4565
5212
  closeNotification: "Fermer la notification",
4566
5213
  charactersRemaining: (e) => `${e} ${e > 1 ? "caractères restants" : "caractère restant"}`,
4567
- currentTheme: (e) => `Thème actuel : ${ic[e]}`,
5214
+ currentTheme: (e) => `Thème actuel : ${ml[e]}`,
4568
5215
  overflowCount: (e) => `+${e} ${e > 1 ? "autres" : "autre"}`,
4569
5216
  selectedCount: (e) => `${e} ${e > 1 ? "sélectionnés" : "sélectionné"}`,
4570
5217
  maxSelectedHint: (e) => `Vous pouvez sélectionner jusqu'à ${e} ${e > 1 ? "éléments" : "élément"}`
4571
5218
  };
4572
5219
  // src/components/ui_provider/ui_provider.tsx
4573
- function oc(e = {}) {
5220
+ function gl(e = {}) {
4574
5221
  return Object.fromEntries(Object.entries(e).filter(([, e]) => e !== void 0));
4575
5222
  }
4576
- function sc({ labels: e, announceFieldErrors: t, children: n }) {
5223
+ function _l({ labels: e, announceFieldErrors: t, children: n }) {
4577
5224
  let r = p(pe), i = et(), a = v(() => ({
4578
5225
  ...r,
4579
- ...oc(e)
5226
+ ...gl(e)
4580
5227
  }), [r, e]);
4581
5228
  return /* @__PURE__ */ w(pe.Provider, {
4582
5229
  value: a,
@@ -4587,15 +5234,15 @@ function sc({ labels: e, announceFieldErrors: t, children: n }) {
4587
5234
  });
4588
5235
  }
4589
5236
  // src/hooks/use_is_client/with_client_only.tsx
4590
- var cc = (e) => {
5237
+ var vl = (e) => {
4591
5238
  function t(t) {
4592
5239
  return xt() ? /* @__PURE__ */ w(e, { ...t }) : null;
4593
5240
  }
4594
5241
  return t;
4595
- }, lc = "a scroll region needs an accessible name. Provide a non-empty `label` or `labelledBy`.";
4596
- function uc(e) {
4597
- let { ref: t, scrollableProps: n, focusClassName: r } = vr(e);
4598
- return ut("useKeyboardScrollable", !!e.label?.trim() || !!e.labelledBy?.trim(), lc), {
5242
+ }, yl = "a scroll region needs an accessible name. Provide a non-empty `label` or `labelledBy`.";
5243
+ function bl(e) {
5244
+ let { ref: t, scrollableProps: n, focusClassName: r } = qr(e);
5245
+ return ut("useKeyboardScrollable", !!e.label?.trim() || !!e.labelledBy?.trim(), yl), {
4599
5246
  scrollableProps: {
4600
5247
  ref: t,
4601
5248
  ...n
@@ -4604,5 +5251,5 @@ function uc(e) {
4604
5251
  };
4605
5252
  }
4606
5253
  // src/stores/theme_store/theme_init_script.ts
4607
- var dc = `(function(){var t=null;try{t=localStorage.getItem(${JSON.stringify(oo)})}catch(e){}var d=t==="dark"||(t!=="light"&&matchMedia("(prefers-color-scheme: dark)").matches);document.documentElement.classList.toggle("dark",d);var m=document.querySelectorAll('meta[name="theme-color"][data-light][data-dark]');for(var i=0;i<m.length;i++){m[i].setAttribute("content",m[i].getAttribute(d?"data-dark":"data-light"))}})()`;
4608
- export { he as Alert, Ce as AppBar, Ee as Avatar, Ke as BASE_INPUT_STYLES, Oe as Badge, Me as Button, Re as Card, Ue as CharacterCount, gt as Checkbox, bt as CheckboxOptions, St as ClientOnly, hn as Combobox, ki as ConfirmModal, Fn as ContextMenu, zn as CopyButton, qr as Drawer, ac as FRENCH_UI_LABELS, Un as Highlight, X as IconButton, Xr as Input, Qr as Kbd, ti as Menu, ni as MenuGroup, _i as MenuItem, vi as MenuSeparator, ji as Modal, Mi as ModalFooter, Pi as ModalProvider, Ui as MultiCombobox, Yi as Popover, Zi as RadioOptions, Qi as Select, la as Spinner, ia as SplitButton, pa as Switch, dc as THEME_INIT_SCRIPT, Xa as Tabs, Za as Textarea, Co as ThemeToggle, Ds as ToastProvider, Es as Toaster, rc as Toolbar, J as Tooltip, sc as UIProvider, Ae as buttonClassName, jr as dismissTopmostModal, Bn as splitIntoHighlightSegments, Fs as toast, Ur as useDisableHotkeysWhileMounted, Ni as useDismissGuard, Vr as useGlobalHotkeysStore, xt as useIsClient, uc as useKeyboardScrollable, go as useThemeStore, Bs as useToast, cc as withClientOnly };
5254
+ var xl = `(function(){var t=null;try{t=localStorage.getItem(${JSON.stringify(_s)})}catch(e){}var d=t==="dark"||(t!=="light"&&matchMedia("(prefers-color-scheme: dark)").matches);document.documentElement.classList.toggle("dark",d);var m=document.querySelectorAll('meta[name="theme-color"][data-light][data-dark]');for(var i=0;i<m.length;i++){m[i].setAttribute("content",m[i].getAttribute(d?"data-dark":"data-light"))}})()`;
5255
+ export { he as Alert, Ce as AppBar, Ee as Avatar, je as BASE_INPUT_STYLES, Oe as Badge, Ci as BottomSheet, ze as Button, Ge as Card, Xe as CharacterCount, gt as Checkbox, bt as CheckboxOptions, St as ClientOnly, hn as Combobox, pa as ConfirmModal, Fn as ContextMenu, zn as CopyButton, ji as Drawer, hl as FRENCH_UI_LABELS, Un as Highlight, X as IconButton, Pi as Input, Ii as Kbd, zi as Menu, Bi as MenuGroup, ta as MenuItem, na as MenuSeparator, ha as Modal, ga as ModalFooter, va as ModalProvider, Da as MultiCombobox, Na as Popover, Fa as RadioOptions, Ia as Select, to as SidePanel, po as Spinner, so as SplitButton, _o as Switch, xl as THEME_INIT_SCRIPT, yo as TabBar, wo as TabBarLink, ss as Tabs, cs as Textarea, Ns as ThemeToggle, Lc as ToastProvider, Ic as Toaster, pl as Toolbar, J as Tooltip, _l as UIProvider, Ae as buttonClassName, si as dismissTopmostModal, Bn as splitIntoHighlightSegments, Gc as toast, bi as useDisableHotkeysWhileMounted, _a as useDismissGuard, vi as useGlobalHotkeysStore, xt as useIsClient, bl as useKeyboardScrollable, Es as useThemeStore, Xc as useToast, vl as withClientOnly };