@owodesign/owoui 0.1.7-beta2 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.min.js CHANGED
@@ -345,50 +345,50 @@ var N = {
345
345
  pulse: A,
346
346
  orbit: j,
347
347
  flow: M
348
- }, ee = new Set([
348
+ }, P = new Set([
349
349
  "ring",
350
350
  "arc",
351
351
  "dots"
352
352
  ]);
353
- function P({ variant: e = "ring", size: t = "md", className: n, label: r }) {
353
+ function F({ variant: e = "ring", size: t = "md", className: n, label: r }) {
354
354
  let i = typeof t == "number" ? t : w[t], a = N[e];
355
355
  return /* @__PURE__ */ p("span", {
356
356
  "aria-hidden": !r,
357
357
  "aria-label": r,
358
358
  role: r ? "img" : void 0,
359
- "data-animate": ee.has(e) ? "spin" : void 0,
359
+ "data-animate": P.has(e) ? "spin" : void 0,
360
360
  className: _("owo-spinner", C.root, n),
361
361
  children: /* @__PURE__ */ p(a, { px: i })
362
362
  });
363
363
  }
364
- var F = {
364
+ var I = {
365
365
  root: "_root_yhdgl_1",
366
366
  icon: "_icon_yhdgl_83",
367
367
  label: "_label_yhdgl_95"
368
368
  };
369
369
  //#endregion
370
370
  //#region src/components/Button.tsx
371
- function I({ className: e }) {
372
- return _("owo-button", F.root, e);
371
+ function L({ className: e }) {
372
+ return _("owo-button", I.root, e);
373
373
  }
374
- function L(e) {
374
+ function R(e) {
375
375
  let { variant: t = "secondary", size: n = "md", loading: r = !1, leadingIcon: i, trailingIcon: a, className: o, children: s, ...c } = e, l = /* @__PURE__ */ m(f, { children: [
376
376
  r ? /* @__PURE__ */ p("span", {
377
- className: F.icon,
378
- children: /* @__PURE__ */ p(P, { size: n === "xs" ? "xs" : n === "sm" ? "sm" : n === "xl" ? "lg" : "md" })
377
+ className: I.icon,
378
+ children: /* @__PURE__ */ p(F, { size: n === "xs" ? "xs" : n === "sm" ? "sm" : n === "xl" ? "lg" : "md" })
379
379
  }) : i ? /* @__PURE__ */ p("span", {
380
- className: F.icon,
380
+ className: I.icon,
381
381
  children: i
382
382
  }) : null,
383
383
  /* @__PURE__ */ p("span", {
384
- className: F.label,
384
+ className: I.label,
385
385
  children: s
386
386
  }),
387
387
  !r && a ? /* @__PURE__ */ p("span", {
388
- className: F.icon,
388
+ className: I.icon,
389
389
  children: a
390
390
  }) : null
391
- ] }), u = I({
391
+ ] }), u = L({
392
392
  variant: t,
393
393
  size: n,
394
394
  loading: r,
@@ -421,7 +421,109 @@ function L(e) {
421
421
  children: l
422
422
  });
423
423
  }
424
- var R = {
424
+ //#endregion
425
+ //#region src/contexts/FieldContext.ts
426
+ var ee = n(void 0);
427
+ function z() {
428
+ return a(ee);
429
+ }
430
+ //#endregion
431
+ //#region src/hooks/useFieldProps.ts
432
+ function B(e) {
433
+ let t = z();
434
+ return {
435
+ id: e.id ?? t?.controlId,
436
+ disabled: e.disabled ?? t?.disabled ?? !1,
437
+ required: e.required ?? t?.required ?? !1,
438
+ invalid: e.invalid ?? t?.invalid ?? !1,
439
+ "aria-describedby": e["aria-describedby"] ?? t?.describedBy
440
+ };
441
+ }
442
+ //#endregion
443
+ //#region src/hooks/useControllableState.ts
444
+ function V({ value: e, defaultValue: t, onChange: n, fallback: r }) {
445
+ let [i, a] = d(t ?? r), o = e !== void 0, s = o ? e : i;
446
+ function c(e) {
447
+ o || a(e), n?.(e);
448
+ }
449
+ return [s, c];
450
+ }
451
+ var H = {
452
+ root: "_root_16v37_1",
453
+ input: "_input_16v37_15",
454
+ control: "_control_16v37_28",
455
+ icon: "_icon_16v37_91",
456
+ label: "_label_16v37_101"
457
+ };
458
+ //#endregion
459
+ //#region src/components/Checkbox.tsx
460
+ function U({ checked: e, defaultChecked: t, onCheckedChange: n, indeterminate: r = !1, disabled: i, required: a, invalid: s, name: c, value: l = "on", id: d, size: f = "md", className: h, ariaLabel: g, children: v, "aria-describedby": y }) {
461
+ let [b, x] = V({
462
+ value: e,
463
+ defaultValue: t,
464
+ onChange: n,
465
+ fallback: !1
466
+ }), S = B({
467
+ id: d,
468
+ disabled: i,
469
+ required: a,
470
+ invalid: s,
471
+ "aria-describedby": y
472
+ }), C = u(null);
473
+ o(() => {
474
+ C.current && (C.current.indeterminate = r);
475
+ }, [r]);
476
+ let w = r ? "indeterminate" : b ? "checked" : "unchecked";
477
+ return /* @__PURE__ */ m("label", {
478
+ "data-scope": "checkbox",
479
+ "data-disabled": S.disabled || void 0,
480
+ "data-invalid": S.invalid || void 0,
481
+ className: _("owo-checkbox", H.root, h),
482
+ children: [
483
+ /* @__PURE__ */ p("input", {
484
+ ref: C,
485
+ id: S.id,
486
+ type: "checkbox",
487
+ name: c,
488
+ value: l,
489
+ checked: b,
490
+ disabled: S.disabled,
491
+ required: S.required,
492
+ "aria-label": g,
493
+ "aria-describedby": S["aria-describedby"],
494
+ "aria-invalid": S.invalid || void 0,
495
+ "aria-checked": r ? "mixed" : b,
496
+ className: H.input,
497
+ onChange: (e) => {
498
+ S.disabled || x(e.target.checked);
499
+ }
500
+ }),
501
+ /* @__PURE__ */ p("span", {
502
+ "data-part": "control",
503
+ "data-state": w,
504
+ "data-size": f,
505
+ className: H.control,
506
+ children: w === "indeterminate" ? /* @__PURE__ */ p("svg", {
507
+ "aria-hidden": "true",
508
+ viewBox: "0 0 16 16",
509
+ className: H.icon,
510
+ children: /* @__PURE__ */ p("path", { d: "M4 8h8" })
511
+ }) : w === "checked" ? /* @__PURE__ */ p("svg", {
512
+ "aria-hidden": "true",
513
+ viewBox: "0 0 16 16",
514
+ className: H.icon,
515
+ children: /* @__PURE__ */ p("path", { d: "M3.5 8.5l3 3 6-7" })
516
+ }) : null
517
+ }),
518
+ v != null && /* @__PURE__ */ p("span", {
519
+ "data-part": "label",
520
+ className: H.label,
521
+ children: v
522
+ })
523
+ ]
524
+ });
525
+ }
526
+ var W = {
425
527
  root: "_root_bx150_1",
426
528
  triggerInner: "_triggerInner_bx150_27",
427
529
  triggerIcon: "_triggerIcon_bx150_34",
@@ -429,20 +531,20 @@ var R = {
429
531
  triggerLabel: "_triggerLabel_bx150_44",
430
532
  contentInner: "_contentInner_bx150_50"
431
533
  }, te = n(null);
432
- function ne(e) {
534
+ function G(e) {
433
535
  let t = a(te);
434
536
  if (!t) throw Error(`${e} must be used within Collapsible.Root`);
435
537
  return t;
436
538
  }
437
- function z({ open: e, defaultOpen: t, onOpenChange: n }) {
539
+ function ne({ open: e, defaultOpen: t, onOpenChange: n }) {
438
540
  let [r, i] = d(t ?? !1), a = e !== void 0, o = a ? e : r;
439
541
  function s(e) {
440
542
  a || i(e), n?.(e);
441
543
  }
442
544
  return [o, s];
443
545
  }
444
- function B({ children: e, open: t, defaultOpen: n, onOpenChange: r, classNames: i, className: a, ...o }) {
445
- let [c, u] = z({
546
+ function re({ children: e, open: t, defaultOpen: n, onOpenChange: r, classNames: i, className: a, ...o }) {
547
+ let [c, u] = ne({
446
548
  open: t,
447
549
  defaultOpen: n,
448
550
  onOpenChange: r
@@ -462,38 +564,38 @@ function B({ children: e, open: t, defaultOpen: n, onOpenChange: r, classNames:
462
564
  children: /* @__PURE__ */ p("div", {
463
565
  "data-state": c ? "open" : "closed",
464
566
  "data-scope": "collapsible",
465
- className: _("owo-collapsible", R.root, a),
567
+ className: _("owo-collapsible", W.root, a),
466
568
  ...o,
467
569
  children: e
468
570
  })
469
571
  });
470
572
  }
471
- function re({ children: e, icon: t, indicator: n, iconPosition: r = "start", className: i, onClick: a, ...o }) {
472
- let { open: s, setOpen: c, contentId: l, classNames: u } = ne("Collapsible.Trigger"), d = t !== void 0 || n !== void 0 ? /* @__PURE__ */ m("span", {
573
+ function K({ children: e, icon: t, indicator: n, iconPosition: r = "start", className: i, onClick: a, ...o }) {
574
+ let { open: s, setOpen: c, contentId: l, classNames: u } = G("Collapsible.Trigger"), d = t !== void 0 || n !== void 0 ? /* @__PURE__ */ m("span", {
473
575
  "data-part": "triggerInner",
474
- className: _(R.triggerInner, u?.triggerInner),
576
+ className: _(W.triggerInner, u?.triggerInner),
475
577
  children: [
476
578
  t && r === "start" ? /* @__PURE__ */ p("span", {
477
579
  "data-part": "triggerIcon",
478
580
  "aria-hidden": "true",
479
- className: _(R.triggerIcon, u?.triggerIcon),
581
+ className: _(W.triggerIcon, u?.triggerIcon),
480
582
  children: t
481
583
  }) : null,
482
584
  /* @__PURE__ */ p("span", {
483
585
  "data-part": "triggerLabel",
484
- className: _(R.triggerLabel, u?.triggerLabel),
586
+ className: _(W.triggerLabel, u?.triggerLabel),
485
587
  children: e
486
588
  }),
487
589
  t && r === "end" ? /* @__PURE__ */ p("span", {
488
590
  "data-part": "triggerIcon",
489
591
  "aria-hidden": "true",
490
- className: _(R.triggerIcon, u?.triggerIcon),
592
+ className: _(W.triggerIcon, u?.triggerIcon),
491
593
  children: t
492
594
  }) : null,
493
595
  n ? /* @__PURE__ */ p("span", {
494
596
  "data-part": "triggerIndicator",
495
597
  "aria-hidden": "true",
496
- className: _(R.triggerIndicator, u?.triggerIndicator),
598
+ className: _(W.triggerIndicator, u?.triggerIndicator),
497
599
  children: n
498
600
  }) : null
499
601
  ]
@@ -513,8 +615,8 @@ function re({ children: e, icon: t, indicator: n, iconPosition: r = "start", cla
513
615
  children: d
514
616
  });
515
617
  }
516
- function V({ children: e, className: t, ...n }) {
517
- let { open: r, contentId: i, classNames: a } = ne("Collapsible.Content"), [s, c] = d(r), l = u(null), f = u(null);
618
+ function ie({ children: e, className: t, ...n }) {
619
+ let { open: r, contentId: i, classNames: a } = G("Collapsible.Content"), [s, c] = d(r), l = u(null), f = u(null);
518
620
  return o(() => {
519
621
  let e = l.current, t = f.current;
520
622
  if (!e || !t) return;
@@ -551,24 +653,24 @@ function V({ children: e, className: t, ...n }) {
551
653
  children: /* @__PURE__ */ p("div", {
552
654
  ref: f,
553
655
  "data-part": "contentInner",
554
- className: _(R.contentInner, a?.contentInner),
656
+ className: _(W.contentInner, a?.contentInner),
555
657
  children: e
556
658
  })
557
659
  });
558
660
  }
559
- var ie = Object.assign(B, {
560
- Root: B,
561
- Trigger: re,
562
- Content: V
563
- }), H = "_overlay_1p0ee_1", ae = "_panel_1p0ee_19", oe = "_confirmDescription_1p0ee_64", U = {
564
- overlay: H,
661
+ var ae = Object.assign(re, {
662
+ Root: re,
663
+ Trigger: K,
664
+ Content: ie
665
+ }), oe = "_overlay_1p0ee_1", se = "_panel_1p0ee_19", ce = "_confirmDescription_1p0ee_64", le = {
666
+ overlay: oe,
565
667
  "dialog-backdrop-in": "_dialog-backdrop-in_1p0ee_1",
566
- panel: ae,
668
+ panel: se,
567
669
  "dialog-in": "_dialog-in_1p0ee_1",
568
- confirmDescription: oe
569
- }, se = n(void 0);
570
- function ce({ className: e, children: t, ...n }) {
571
- let r = a(se);
670
+ confirmDescription: ce
671
+ }, ue = n(void 0);
672
+ function de({ className: e, children: t, ...n }) {
673
+ let r = a(ue);
572
674
  return /* @__PURE__ */ p("div", {
573
675
  "data-scope": "dialog",
574
676
  "data-part": "header",
@@ -577,8 +679,8 @@ function ce({ className: e, children: t, ...n }) {
577
679
  children: t
578
680
  });
579
681
  }
580
- function le({ className: e, children: t, ...n }) {
581
- let r = a(se);
682
+ function fe({ className: e, children: t, ...n }) {
683
+ let r = a(ue);
582
684
  return /* @__PURE__ */ p("div", {
583
685
  "data-scope": "dialog",
584
686
  "data-part": "body",
@@ -587,8 +689,8 @@ function le({ className: e, children: t, ...n }) {
587
689
  children: t
588
690
  });
589
691
  }
590
- function ue({ className: e, children: t, ...n }) {
591
- let r = a(se);
692
+ function pe({ className: e, children: t, ...n }) {
693
+ let r = a(ue);
592
694
  return /* @__PURE__ */ p("div", {
593
695
  "data-scope": "dialog",
594
696
  "data-part": "footer",
@@ -597,7 +699,7 @@ function ue({ className: e, children: t, ...n }) {
597
699
  children: t
598
700
  });
599
701
  }
600
- function W({ open: e, onClose: t, size: n = "sm", children: r, className: a, overlayClassName: s, panelClassName: c, classNames: l, ...d }) {
702
+ function me({ open: e, onClose: t, size: n = "sm", children: r, className: a, overlayClassName: s, panelClassName: c, classNames: l, ...d }) {
601
703
  let f = u(null), h = u(null), g = i((e) => {
602
704
  e.key === "Escape" && (e.stopPropagation(), t());
603
705
  }, [t]);
@@ -608,13 +710,13 @@ function W({ open: e, onClose: t, size: n = "sm", children: r, className: a, ove
608
710
  t ? t.focus() : e.focus();
609
711
  }), document.addEventListener("keydown", g)) : (document.body.style.overflow = "", h.current?.focus()), () => {
610
712
  document.removeEventListener("keydown", g), document.body.style.overflow = "";
611
- }), [e, g]), e ? /* @__PURE__ */ p(se.Provider, {
713
+ }), [e, g]), e ? /* @__PURE__ */ p(ue.Provider, {
612
714
  value: l,
613
715
  children: /* @__PURE__ */ m("div", {
614
716
  "data-state": "open",
615
717
  "data-scope": "dialog",
616
718
  "data-part": "overlay",
617
- className: _("owo-dialog-overlay", U.overlay, l?.overlay),
719
+ className: _("owo-dialog-overlay", le.overlay, l?.overlay),
618
720
  children: [/* @__PURE__ */ p("button", {
619
721
  type: "button",
620
722
  "aria-label": "Close dialog",
@@ -630,23 +732,23 @@ function W({ open: e, onClose: t, size: n = "sm", children: r, className: a, ove
630
732
  tabIndex: -1,
631
733
  "data-state": "open",
632
734
  "data-size": n,
633
- className: _("owo-dialog", U.panel, c, a),
735
+ className: _("owo-dialog", le.panel, c, a),
634
736
  ...d,
635
737
  children: r
636
738
  })]
637
739
  })
638
740
  }) : null;
639
741
  }
640
- W.Header = ce, W.Body = le, W.Footer = ue;
742
+ me.Header = de, me.Body = fe, me.Footer = pe;
641
743
  //#endregion
642
744
  //#region src/components/ConfirmDialog.tsx
643
- var de = n(null);
644
- function fe() {
645
- let e = a(de);
745
+ var he = n(null);
746
+ function ge() {
747
+ let e = a(he);
646
748
  if (!e) throw Error("useConfirm must be used within <ConfirmProvider>");
647
749
  return e;
648
750
  }
649
- function pe({ children: e }) {
751
+ function _e({ children: e }) {
650
752
  let [t, n] = d(null), r = u(null), a = i((e) => (r.current && r.current.resolve(!1), new Promise((t) => {
651
753
  let i = {
652
754
  options: e,
@@ -656,23 +758,23 @@ function pe({ children: e }) {
656
758
  })), []), o = i((e) => {
657
759
  r.current &&= (r.current.resolve(e), null), n(null);
658
760
  }, []);
659
- return /* @__PURE__ */ m(de.Provider, {
761
+ return /* @__PURE__ */ m(he.Provider, {
660
762
  value: a,
661
- children: [e, /* @__PURE__ */ p(W, {
763
+ children: [e, /* @__PURE__ */ p(me, {
662
764
  open: t !== null,
663
765
  onClose: () => o(!1),
664
766
  children: t && /* @__PURE__ */ m(f, { children: [
665
- /* @__PURE__ */ p(W.Header, { children: t.options.title }),
666
- /* @__PURE__ */ p(W.Body, { children: typeof t.options.description == "string" ? /* @__PURE__ */ p("p", {
667
- className: U.confirmDescription,
767
+ /* @__PURE__ */ p(me.Header, { children: t.options.title }),
768
+ /* @__PURE__ */ p(me.Body, { children: typeof t.options.description == "string" ? /* @__PURE__ */ p("p", {
769
+ className: le.confirmDescription,
668
770
  children: t.options.description
669
771
  }) : t.options.description }),
670
- /* @__PURE__ */ m(W.Footer, { children: [/* @__PURE__ */ p(L, {
772
+ /* @__PURE__ */ m(me.Footer, { children: [/* @__PURE__ */ p(R, {
671
773
  variant: "ghost",
672
774
  size: "sm",
673
775
  onClick: () => o(!1),
674
776
  children: t.options.cancelLabel ?? "取消"
675
- }), /* @__PURE__ */ p(L, {
777
+ }), /* @__PURE__ */ p(R, {
676
778
  variant: t.options.variant ?? "primary",
677
779
  size: "sm",
678
780
  onClick: () => o(!0),
@@ -684,75 +786,75 @@ function pe({ children: e }) {
684
786
  }
685
787
  //#endregion
686
788
  //#region node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
687
- var me = Math.min, he = Math.max, ge = Math.round, _e = Math.floor, G = (e) => ({
789
+ var ve = Math.min, ye = Math.max, be = Math.round, xe = Math.floor, q = (e) => ({
688
790
  x: e,
689
791
  y: e
690
- }), ve = {
792
+ }), Se = {
691
793
  left: "right",
692
794
  right: "left",
693
795
  bottom: "top",
694
796
  top: "bottom"
695
797
  };
696
- function ye(e, t, n) {
697
- return he(e, me(t, n));
798
+ function Ce(e, t, n) {
799
+ return ye(e, ve(t, n));
698
800
  }
699
- function be(e, t) {
801
+ function we(e, t) {
700
802
  return typeof e == "function" ? e(t) : e;
701
803
  }
702
- function xe(e) {
804
+ function Te(e) {
703
805
  return e.split("-")[0];
704
806
  }
705
- function Se(e) {
807
+ function Ee(e) {
706
808
  return e.split("-")[1];
707
809
  }
708
- function Ce(e) {
810
+ function De(e) {
709
811
  return e === "x" ? "y" : "x";
710
812
  }
711
- function we(e) {
813
+ function Oe(e) {
712
814
  return e === "y" ? "height" : "width";
713
815
  }
714
- function K(e) {
816
+ function ke(e) {
715
817
  let t = e[0];
716
818
  return t === "t" || t === "b" ? "y" : "x";
717
819
  }
718
- function Te(e) {
719
- return Ce(K(e));
820
+ function Ae(e) {
821
+ return De(ke(e));
720
822
  }
721
- function Ee(e, t, n) {
823
+ function je(e, t, n) {
722
824
  n === void 0 && (n = !1);
723
- let r = Se(e), i = Te(e), a = we(i), o = i === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
724
- return t.reference[a] > t.floating[a] && (o = Fe(o)), [o, Fe(o)];
825
+ let r = Ee(e), i = Ae(e), a = Oe(i), o = i === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
826
+ return t.reference[a] > t.floating[a] && (o = Be(o)), [o, Be(o)];
725
827
  }
726
- function De(e) {
727
- let t = Fe(e);
828
+ function Me(e) {
829
+ let t = Be(e);
728
830
  return [
729
- Oe(e),
831
+ Ne(e),
730
832
  t,
731
- Oe(t)
833
+ Ne(t)
732
834
  ];
733
835
  }
734
- function Oe(e) {
836
+ function Ne(e) {
735
837
  return e.includes("start") ? e.replace("start", "end") : e.replace("end", "start");
736
838
  }
737
- var ke = ["left", "right"], Ae = ["right", "left"], je = ["top", "bottom"], Me = ["bottom", "top"];
738
- function Ne(e, t, n) {
839
+ var Pe = ["left", "right"], Fe = ["right", "left"], Ie = ["top", "bottom"], Le = ["bottom", "top"];
840
+ function Re(e, t, n) {
739
841
  switch (e) {
740
842
  case "top":
741
- case "bottom": return n ? t ? Ae : ke : t ? ke : Ae;
843
+ case "bottom": return n ? t ? Fe : Pe : t ? Pe : Fe;
742
844
  case "left":
743
- case "right": return t ? je : Me;
845
+ case "right": return t ? Ie : Le;
744
846
  default: return [];
745
847
  }
746
848
  }
747
- function Pe(e, t, n, r) {
748
- let i = Se(e), a = Ne(xe(e), n === "start", r);
749
- return i && (a = a.map((e) => e + "-" + i), t && (a = a.concat(a.map(Oe)))), a;
849
+ function ze(e, t, n, r) {
850
+ let i = Ee(e), a = Re(Te(e), n === "start", r);
851
+ return i && (a = a.map((e) => e + "-" + i), t && (a = a.concat(a.map(Ne)))), a;
750
852
  }
751
- function Fe(e) {
752
- let t = xe(e);
753
- return ve[t] + e.slice(t.length);
853
+ function Be(e) {
854
+ let t = Te(e);
855
+ return Se[t] + e.slice(t.length);
754
856
  }
755
- function Ie(e) {
857
+ function Ve(e) {
756
858
  return {
757
859
  top: 0,
758
860
  right: 0,
@@ -761,15 +863,15 @@ function Ie(e) {
761
863
  ...e
762
864
  };
763
865
  }
764
- function Le(e) {
866
+ function He(e) {
765
867
  return typeof e == "number" ? {
766
868
  top: e,
767
869
  right: e,
768
870
  bottom: e,
769
871
  left: e
770
- } : Ie(e);
872
+ } : Ve(e);
771
873
  }
772
- function Re(e) {
874
+ function Ue(e) {
773
875
  let { x: t, y: n, width: r, height: i } = e;
774
876
  return {
775
877
  width: r,
@@ -784,8 +886,8 @@ function Re(e) {
784
886
  }
785
887
  //#endregion
786
888
  //#region node_modules/@floating-ui/core/dist/floating-ui.core.mjs
787
- function ze(e, t, n) {
788
- let { reference: r, floating: i } = e, a = K(t), o = Te(t), s = we(o), c = xe(t), l = a === "y", u = r.x + r.width / 2 - i.width / 2, d = r.y + r.height / 2 - i.height / 2, f = r[s] / 2 - i[s] / 2, p;
889
+ function We(e, t, n) {
890
+ let { reference: r, floating: i } = e, a = ke(t), o = Ae(t), s = Oe(o), c = Te(t), l = a === "y", u = r.x + r.width / 2 - i.width / 2, d = r.y + r.height / 2 - i.height / 2, f = r[s] / 2 - i[s] / 2, p;
789
891
  switch (c) {
790
892
  case "top":
791
893
  p = {
@@ -816,7 +918,7 @@ function ze(e, t, n) {
816
918
  y: r.y
817
919
  };
818
920
  }
819
- switch (Se(t)) {
921
+ switch (Ee(t)) {
820
922
  case "start":
821
923
  p[o] -= f * (n && l ? -1 : 1);
822
924
  break;
@@ -826,9 +928,9 @@ function ze(e, t, n) {
826
928
  }
827
929
  return p;
828
930
  }
829
- async function Be(e, t) {
931
+ async function Ge(e, t) {
830
932
  t === void 0 && (t = {});
831
- let { x: n, y: r, platform: i, rects: a, elements: o, strategy: s } = e, { boundary: c = "clippingAncestors", rootBoundary: l = "viewport", elementContext: u = "floating", altBoundary: d = !1, padding: f = 0 } = be(t, e), p = Le(f), m = o[d ? u === "floating" ? "reference" : "floating" : u], h = Re(await i.getClippingRect({
933
+ let { x: n, y: r, platform: i, rects: a, elements: o, strategy: s } = e, { boundary: c = "clippingAncestors", rootBoundary: l = "viewport", elementContext: u = "floating", altBoundary: d = !1, padding: f = 0 } = we(t, e), p = He(f), m = o[d ? u === "floating" ? "reference" : "floating" : u], h = Ue(await i.getClippingRect({
832
934
  element: await (i.isElement == null ? void 0 : i.isElement(m)) ?? !0 ? m : m.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(o.floating)),
833
935
  boundary: c,
834
936
  rootBoundary: l,
@@ -841,7 +943,7 @@ async function Be(e, t) {
841
943
  } : a.reference, _ = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(o.floating)), v = await (i.isElement == null ? void 0 : i.isElement(_)) && await (i.getScale == null ? void 0 : i.getScale(_)) || {
842
944
  x: 1,
843
945
  y: 1
844
- }, y = Re(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
946
+ }, y = Ue(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
845
947
  elements: o,
846
948
  rect: g,
847
949
  offsetParent: _,
@@ -854,15 +956,15 @@ async function Be(e, t) {
854
956
  right: (y.right - h.right + p.right) / v.x
855
957
  };
856
958
  }
857
- var Ve = 50, He = async (e, t, n) => {
959
+ var Ke = 50, qe = async (e, t, n) => {
858
960
  let { placement: r = "bottom", strategy: i = "absolute", middleware: a = [], platform: o } = n, s = o.detectOverflow ? o : {
859
961
  ...o,
860
- detectOverflow: Be
962
+ detectOverflow: Ge
861
963
  }, c = await (o.isRTL == null ? void 0 : o.isRTL(t)), l = await o.getElementRects({
862
964
  reference: e,
863
965
  floating: t,
864
966
  strategy: i
865
- }), { x: u, y: d } = ze(l, r, c), f = r, p = 0, m = {};
967
+ }), { x: u, y: d } = We(l, r, c), f = r, p = 0, m = {};
866
968
  for (let n = 0; n < a.length; n++) {
867
969
  let h = a[n];
868
970
  if (!h) continue;
@@ -883,11 +985,11 @@ var Ve = 50, He = async (e, t, n) => {
883
985
  u = v ?? u, d = y ?? d, m[g] = {
884
986
  ...m[g],
885
987
  ...b
886
- }, x && p < Ve && (p++, typeof x == "object" && (x.placement && (f = x.placement), x.rects && (l = x.rects === !0 ? await o.getElementRects({
988
+ }, x && p < Ke && (p++, typeof x == "object" && (x.placement && (f = x.placement), x.rects && (l = x.rects === !0 ? await o.getElementRects({
887
989
  reference: e,
888
990
  floating: t,
889
991
  strategy: i
890
- }) : x.rects), {x: u, y: d} = ze(l, f, c)), n = -1);
992
+ }) : x.rects), {x: u, y: d} = We(l, f, c)), n = -1);
891
993
  }
892
994
  return {
893
995
  x: u,
@@ -896,18 +998,18 @@ var Ve = 50, He = async (e, t, n) => {
896
998
  strategy: i,
897
999
  middlewareData: m
898
1000
  };
899
- }, Ue = (e) => ({
1001
+ }, Je = (e) => ({
900
1002
  name: "arrow",
901
1003
  options: e,
902
1004
  async fn(t) {
903
- let { x: n, y: r, placement: i, rects: a, platform: o, elements: s, middlewareData: c } = t, { element: l, padding: u = 0 } = be(e, t) || {};
1005
+ let { x: n, y: r, placement: i, rects: a, platform: o, elements: s, middlewareData: c } = t, { element: l, padding: u = 0 } = we(e, t) || {};
904
1006
  if (l == null) return {};
905
- let d = Le(u), f = {
1007
+ let d = He(u), f = {
906
1008
  x: n,
907
1009
  y: r
908
- }, p = Te(i), m = we(p), h = await o.getDimensions(l), g = p === "y", _ = g ? "top" : "left", v = g ? "bottom" : "right", y = g ? "clientHeight" : "clientWidth", b = a.reference[m] + a.reference[p] - f[p] - a.floating[m], x = f[p] - a.reference[p], S = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(l)), C = S ? S[y] : 0;
1010
+ }, p = Ae(i), m = Oe(p), h = await o.getDimensions(l), g = p === "y", _ = g ? "top" : "left", v = g ? "bottom" : "right", y = g ? "clientHeight" : "clientWidth", b = a.reference[m] + a.reference[p] - f[p] - a.floating[m], x = f[p] - a.reference[p], S = await (o.getOffsetParent == null ? void 0 : o.getOffsetParent(l)), C = S ? S[y] : 0;
909
1011
  (!C || !await (o.isElement == null ? void 0 : o.isElement(S))) && (C = s.floating[y] || a.floating[m]);
910
- let w = b / 2 - x / 2, T = C / 2 - h[m] / 2 - 1, E = me(d[_], T), D = me(d[v], T), O = E, k = C - h[m] - D, A = C / 2 - h[m] / 2 + w, j = ye(O, A, k), M = !c.arrow && Se(i) != null && A !== j && a.reference[m] / 2 - (A < O ? E : D) - h[m] / 2 < 0, N = M ? A < O ? A - O : A - k : 0;
1012
+ let w = b / 2 - x / 2, T = C / 2 - h[m] / 2 - 1, E = ve(d[_], T), D = ve(d[v], T), O = E, k = C - h[m] - D, A = C / 2 - h[m] / 2 + w, j = Ce(O, A, k), M = !c.arrow && Ee(i) != null && A !== j && a.reference[m] / 2 - (A < O ? E : D) - h[m] / 2 < 0, N = M ? A < O ? A - O : A - k : 0;
911
1013
  return {
912
1014
  [p]: f[p] + N,
913
1015
  data: {
@@ -918,19 +1020,19 @@ var Ve = 50, He = async (e, t, n) => {
918
1020
  reset: M
919
1021
  };
920
1022
  }
921
- }), We = function(e) {
1023
+ }), Ye = function(e) {
922
1024
  return e === void 0 && (e = {}), {
923
1025
  name: "flip",
924
1026
  options: e,
925
1027
  async fn(t) {
926
1028
  var n;
927
- let { placement: r, middlewareData: i, rects: a, initialPlacement: o, platform: s, elements: c } = t, { mainAxis: l = !0, crossAxis: u = !0, fallbackPlacements: d, fallbackStrategy: f = "bestFit", fallbackAxisSideDirection: p = "none", flipAlignment: m = !0, ...h } = be(e, t);
1029
+ let { placement: r, middlewareData: i, rects: a, initialPlacement: o, platform: s, elements: c } = t, { mainAxis: l = !0, crossAxis: u = !0, fallbackPlacements: d, fallbackStrategy: f = "bestFit", fallbackAxisSideDirection: p = "none", flipAlignment: m = !0, ...h } = we(e, t);
928
1030
  if ((n = i.arrow) != null && n.alignmentOffset) return {};
929
- let g = xe(r), _ = K(o), v = xe(o) === o, y = await (s.isRTL == null ? void 0 : s.isRTL(c.floating)), b = d || (v || !m ? [Fe(o)] : De(o)), x = p !== "none";
930
- !d && x && b.push(...Pe(o, m, p, y));
1031
+ let g = Te(r), _ = ke(o), v = Te(o) === o, y = await (s.isRTL == null ? void 0 : s.isRTL(c.floating)), b = d || (v || !m ? [Be(o)] : Me(o)), x = p !== "none";
1032
+ !d && x && b.push(...ze(o, m, p, y));
931
1033
  let S = [o, ...b], C = await s.detectOverflow(t, h), w = [], T = i.flip?.overflows || [];
932
1034
  if (l && w.push(C[g]), u) {
933
- let e = Ee(r, a, y);
1035
+ let e = je(r, a, y);
934
1036
  w.push(C[e[0]], C[e[1]]);
935
1037
  }
936
1038
  if (T = [...T, {
@@ -938,7 +1040,7 @@ var Ve = 50, He = async (e, t, n) => {
938
1040
  overflows: w
939
1041
  }], !w.every((e) => e <= 0)) {
940
1042
  let e = (i.flip?.index || 0) + 1, t = S[e];
941
- if (t && (!(u === "alignment" && _ !== K(t)) || T.every((e) => K(e.placement) === _ ? e.overflows[0] > 0 : !0))) return {
1043
+ if (t && (!(u === "alignment" && _ !== ke(t)) || T.every((e) => ke(e.placement) === _ ? e.overflows[0] > 0 : !0))) return {
942
1044
  data: {
943
1045
  index: e,
944
1046
  overflows: T
@@ -950,7 +1052,7 @@ var Ve = 50, He = async (e, t, n) => {
950
1052
  case "bestFit": {
951
1053
  let e = T.filter((e) => {
952
1054
  if (x) {
953
- let t = K(e.placement);
1055
+ let t = ke(e.placement);
954
1056
  return t === _ || t === "y";
955
1057
  }
956
1058
  return !0;
@@ -967,9 +1069,9 @@ var Ve = 50, He = async (e, t, n) => {
967
1069
  return {};
968
1070
  }
969
1071
  };
970
- }, Ge = /* @__PURE__ */ new Set(["left", "top"]);
971
- async function Ke(e, t) {
972
- let { placement: n, platform: r, elements: i } = e, a = await (r.isRTL == null ? void 0 : r.isRTL(i.floating)), o = xe(n), s = Se(n), c = K(n) === "y", l = Ge.has(o) ? -1 : 1, u = a && c ? -1 : 1, d = be(t, e), { mainAxis: f, crossAxis: p, alignmentAxis: m } = typeof d == "number" ? {
1072
+ }, Xe = /* @__PURE__ */ new Set(["left", "top"]);
1073
+ async function Ze(e, t) {
1074
+ let { placement: n, platform: r, elements: i } = e, a = await (r.isRTL == null ? void 0 : r.isRTL(i.floating)), o = Te(n), s = Ee(n), c = ke(n) === "y", l = Xe.has(o) ? -1 : 1, u = a && c ? -1 : 1, d = we(t, e), { mainAxis: f, crossAxis: p, alignmentAxis: m } = typeof d == "number" ? {
973
1075
  mainAxis: d,
974
1076
  crossAxis: 0,
975
1077
  alignmentAxis: null
@@ -986,13 +1088,13 @@ async function Ke(e, t) {
986
1088
  y: p * u
987
1089
  };
988
1090
  }
989
- var qe = function(e) {
1091
+ var Qe = function(e) {
990
1092
  return e === void 0 && (e = 0), {
991
1093
  name: "offset",
992
1094
  options: e,
993
1095
  async fn(t) {
994
1096
  var n;
995
- let { x: r, y: i, placement: a, middlewareData: o } = t, s = await Ke(t, e);
1097
+ let { x: r, y: i, placement: a, middlewareData: o } = t, s = await Ze(t, e);
996
1098
  return a === o.offset?.placement && (n = o.arrow) != null && n.alignmentOffset ? {} : {
997
1099
  x: r + s.x,
998
1100
  y: i + s.y,
@@ -1003,7 +1105,7 @@ var qe = function(e) {
1003
1105
  };
1004
1106
  }
1005
1107
  };
1006
- }, Je = function(e) {
1108
+ }, $e = function(e) {
1007
1109
  return e === void 0 && (e = {}), {
1008
1110
  name: "shift",
1009
1111
  options: e,
@@ -1014,17 +1116,17 @@ var qe = function(e) {
1014
1116
  x: t,
1015
1117
  y: n
1016
1118
  };
1017
- } }, ...l } = be(e, t), u = {
1119
+ } }, ...l } = we(e, t), u = {
1018
1120
  x: n,
1019
1121
  y: r
1020
- }, d = await a.detectOverflow(t, l), f = K(xe(i)), p = Ce(f), m = u[p], h = u[f];
1122
+ }, d = await a.detectOverflow(t, l), f = ke(Te(i)), p = De(f), m = u[p], h = u[f];
1021
1123
  if (o) {
1022
1124
  let e = p === "y" ? "top" : "left", t = p === "y" ? "bottom" : "right", n = m + d[e], r = m - d[t];
1023
- m = ye(n, m, r);
1125
+ m = Ce(n, m, r);
1024
1126
  }
1025
1127
  if (s) {
1026
1128
  let e = f === "y" ? "top" : "left", t = f === "y" ? "bottom" : "right", n = h + d[e], r = h - d[t];
1027
- h = ye(n, h, r);
1129
+ h = Ce(n, h, r);
1028
1130
  }
1029
1131
  let g = c.fn({
1030
1132
  ...t,
@@ -1047,39 +1149,39 @@ var qe = function(e) {
1047
1149
  };
1048
1150
  //#endregion
1049
1151
  //#region node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs
1050
- function Ye() {
1152
+ function et() {
1051
1153
  return typeof window < "u";
1052
1154
  }
1053
- function Xe(e) {
1054
- return Ze(e) ? (e.nodeName || "").toLowerCase() : "#document";
1155
+ function tt(e) {
1156
+ return nt(e) ? (e.nodeName || "").toLowerCase() : "#document";
1055
1157
  }
1056
- function q(e) {
1158
+ function J(e) {
1057
1159
  var t;
1058
1160
  return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
1059
1161
  }
1060
- function J(e) {
1061
- return ((Ze(e) ? e.ownerDocument : e.document) || window.document)?.documentElement;
1062
- }
1063
- function Ze(e) {
1064
- return Ye() ? e instanceof Node || e instanceof q(e).Node : !1;
1065
- }
1066
1162
  function Y(e) {
1067
- return Ye() ? e instanceof Element || e instanceof q(e).Element : !1;
1163
+ return ((nt(e) ? e.ownerDocument : e.document) || window.document)?.documentElement;
1164
+ }
1165
+ function nt(e) {
1166
+ return et() ? e instanceof Node || e instanceof J(e).Node : !1;
1068
1167
  }
1069
1168
  function X(e) {
1070
- return Ye() ? e instanceof HTMLElement || e instanceof q(e).HTMLElement : !1;
1169
+ return et() ? e instanceof Element || e instanceof J(e).Element : !1;
1170
+ }
1171
+ function rt(e) {
1172
+ return et() ? e instanceof HTMLElement || e instanceof J(e).HTMLElement : !1;
1071
1173
  }
1072
- function Qe(e) {
1073
- return !Ye() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof q(e).ShadowRoot;
1174
+ function it(e) {
1175
+ return !et() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof J(e).ShadowRoot;
1074
1176
  }
1075
- function $e(e) {
1177
+ function at(e) {
1076
1178
  let { overflow: t, overflowX: n, overflowY: r, display: i } = Z(e);
1077
1179
  return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && i !== "inline" && i !== "contents";
1078
1180
  }
1079
- function et(e) {
1080
- return /^(table|td|th)$/.test(Xe(e));
1181
+ function ot(e) {
1182
+ return /^(table|td|th)$/.test(tt(e));
1081
1183
  }
1082
- function tt(e) {
1184
+ function st(e) {
1083
1185
  try {
1084
1186
  if (e.matches(":popover-open")) return !0;
1085
1187
  } catch {}
@@ -1089,31 +1191,31 @@ function tt(e) {
1089
1191
  return !1;
1090
1192
  }
1091
1193
  }
1092
- var nt = /transform|translate|scale|rotate|perspective|filter/, rt = /paint|layout|strict|content/, it = (e) => !!e && e !== "none", at;
1093
- function ot(e) {
1094
- let t = Y(e) ? Z(e) : e;
1095
- return it(t.transform) || it(t.translate) || it(t.scale) || it(t.rotate) || it(t.perspective) || !ct() && (it(t.backdropFilter) || it(t.filter)) || nt.test(t.willChange || "") || rt.test(t.contain || "");
1096
- }
1097
- function st(e) {
1098
- let t = dt(e);
1099
- for (; X(t) && !lt(t);) {
1100
- if (ot(t)) return t;
1101
- if (tt(t)) return null;
1102
- t = dt(t);
1194
+ var ct = /transform|translate|scale|rotate|perspective|filter/, lt = /paint|layout|strict|content/, ut = (e) => !!e && e !== "none", dt;
1195
+ function ft(e) {
1196
+ let t = X(e) ? Z(e) : e;
1197
+ return ut(t.transform) || ut(t.translate) || ut(t.scale) || ut(t.rotate) || ut(t.perspective) || !mt() && (ut(t.backdropFilter) || ut(t.filter)) || ct.test(t.willChange || "") || lt.test(t.contain || "");
1198
+ }
1199
+ function pt(e) {
1200
+ let t = _t(e);
1201
+ for (; rt(t) && !ht(t);) {
1202
+ if (ft(t)) return t;
1203
+ if (st(t)) return null;
1204
+ t = _t(t);
1103
1205
  }
1104
1206
  return null;
1105
1207
  }
1106
- function ct() {
1107
- return at ??= typeof CSS < "u" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none"), at;
1208
+ function mt() {
1209
+ return dt ??= typeof CSS < "u" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none"), dt;
1108
1210
  }
1109
- function lt(e) {
1110
- return /^(html|body|#document)$/.test(Xe(e));
1211
+ function ht(e) {
1212
+ return /^(html|body|#document)$/.test(tt(e));
1111
1213
  }
1112
1214
  function Z(e) {
1113
- return q(e).getComputedStyle(e);
1215
+ return J(e).getComputedStyle(e);
1114
1216
  }
1115
- function ut(e) {
1116
- return Y(e) ? {
1217
+ function gt(e) {
1218
+ return X(e) ? {
1117
1219
  scrollLeft: e.scrollLeft,
1118
1220
  scrollTop: e.scrollTop
1119
1221
  } : {
@@ -1121,101 +1223,101 @@ function ut(e) {
1121
1223
  scrollTop: e.scrollY
1122
1224
  };
1123
1225
  }
1124
- function dt(e) {
1125
- if (Xe(e) === "html") return e;
1126
- let t = e.assignedSlot || e.parentNode || Qe(e) && e.host || J(e);
1127
- return Qe(t) ? t.host : t;
1226
+ function _t(e) {
1227
+ if (tt(e) === "html") return e;
1228
+ let t = e.assignedSlot || e.parentNode || it(e) && e.host || Y(e);
1229
+ return it(t) ? t.host : t;
1128
1230
  }
1129
- function ft(e) {
1130
- let t = dt(e);
1131
- return lt(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : X(t) && $e(t) ? t : ft(t);
1231
+ function vt(e) {
1232
+ let t = _t(e);
1233
+ return ht(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : rt(t) && at(t) ? t : vt(t);
1132
1234
  }
1133
- function pt(e, t, n) {
1235
+ function yt(e, t, n) {
1134
1236
  t === void 0 && (t = []), n === void 0 && (n = !0);
1135
- let r = ft(e), i = r === e.ownerDocument?.body, a = q(r);
1237
+ let r = vt(e), i = r === e.ownerDocument?.body, a = J(r);
1136
1238
  if (i) {
1137
- let e = mt(a);
1138
- return t.concat(a, a.visualViewport || [], $e(r) ? r : [], e && n ? pt(e) : []);
1139
- } else return t.concat(r, pt(r, [], n));
1239
+ let e = bt(a);
1240
+ return t.concat(a, a.visualViewport || [], at(r) ? r : [], e && n ? yt(e) : []);
1241
+ } else return t.concat(r, yt(r, [], n));
1140
1242
  }
1141
- function mt(e) {
1243
+ function bt(e) {
1142
1244
  return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
1143
1245
  }
1144
1246
  //#endregion
1145
1247
  //#region node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
1146
- function ht(e) {
1147
- let t = Z(e), n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0, i = X(e), a = i ? e.offsetWidth : n, o = i ? e.offsetHeight : r, s = ge(n) !== a || ge(r) !== o;
1248
+ function xt(e) {
1249
+ let t = Z(e), n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0, i = rt(e), a = i ? e.offsetWidth : n, o = i ? e.offsetHeight : r, s = be(n) !== a || be(r) !== o;
1148
1250
  return s && (n = a, r = o), {
1149
1251
  width: n,
1150
1252
  height: r,
1151
1253
  $: s
1152
1254
  };
1153
1255
  }
1154
- function gt(e) {
1155
- return Y(e) ? e : e.contextElement;
1256
+ function St(e) {
1257
+ return X(e) ? e : e.contextElement;
1156
1258
  }
1157
- function _t(e) {
1158
- let t = gt(e);
1159
- if (!X(t)) return G(1);
1160
- let n = t.getBoundingClientRect(), { width: r, height: i, $: a } = ht(t), o = (a ? ge(n.width) : n.width) / r, s = (a ? ge(n.height) : n.height) / i;
1259
+ function Ct(e) {
1260
+ let t = St(e);
1261
+ if (!rt(t)) return q(1);
1262
+ let n = t.getBoundingClientRect(), { width: r, height: i, $: a } = xt(t), o = (a ? be(n.width) : n.width) / r, s = (a ? be(n.height) : n.height) / i;
1161
1263
  return (!o || !Number.isFinite(o)) && (o = 1), (!s || !Number.isFinite(s)) && (s = 1), {
1162
1264
  x: o,
1163
1265
  y: s
1164
1266
  };
1165
1267
  }
1166
- var vt = /* @__PURE__ */ G(0);
1167
- function yt(e) {
1168
- let t = q(e);
1169
- return !ct() || !t.visualViewport ? vt : {
1268
+ var wt = /* @__PURE__ */ q(0);
1269
+ function Tt(e) {
1270
+ let t = J(e);
1271
+ return !mt() || !t.visualViewport ? wt : {
1170
1272
  x: t.visualViewport.offsetLeft,
1171
1273
  y: t.visualViewport.offsetTop
1172
1274
  };
1173
1275
  }
1174
- function bt(e, t, n) {
1175
- return t === void 0 && (t = !1), !n || t && n !== q(e) ? !1 : t;
1276
+ function Et(e, t, n) {
1277
+ return t === void 0 && (t = !1), !n || t && n !== J(e) ? !1 : t;
1176
1278
  }
1177
- function xt(e, t, n, r) {
1279
+ function Dt(e, t, n, r) {
1178
1280
  t === void 0 && (t = !1), n === void 0 && (n = !1);
1179
- let i = e.getBoundingClientRect(), a = gt(e), o = G(1);
1180
- t && (r ? Y(r) && (o = _t(r)) : o = _t(e));
1181
- let s = bt(a, n, r) ? yt(a) : G(0), c = (i.left + s.x) / o.x, l = (i.top + s.y) / o.y, u = i.width / o.x, d = i.height / o.y;
1281
+ let i = e.getBoundingClientRect(), a = St(e), o = q(1);
1282
+ t && (r ? X(r) && (o = Ct(r)) : o = Ct(e));
1283
+ let s = Et(a, n, r) ? Tt(a) : q(0), c = (i.left + s.x) / o.x, l = (i.top + s.y) / o.y, u = i.width / o.x, d = i.height / o.y;
1182
1284
  if (a) {
1183
- let e = q(a), t = r && Y(r) ? q(r) : r, n = e, i = mt(n);
1285
+ let e = J(a), t = r && X(r) ? J(r) : r, n = e, i = bt(n);
1184
1286
  for (; i && r && t !== n;) {
1185
- let e = _t(i), t = i.getBoundingClientRect(), r = Z(i), a = t.left + (i.clientLeft + parseFloat(r.paddingLeft)) * e.x, o = t.top + (i.clientTop + parseFloat(r.paddingTop)) * e.y;
1186
- c *= e.x, l *= e.y, u *= e.x, d *= e.y, c += a, l += o, n = q(i), i = mt(n);
1287
+ let e = Ct(i), t = i.getBoundingClientRect(), r = Z(i), a = t.left + (i.clientLeft + parseFloat(r.paddingLeft)) * e.x, o = t.top + (i.clientTop + parseFloat(r.paddingTop)) * e.y;
1288
+ c *= e.x, l *= e.y, u *= e.x, d *= e.y, c += a, l += o, n = J(i), i = bt(n);
1187
1289
  }
1188
1290
  }
1189
- return Re({
1291
+ return Ue({
1190
1292
  width: u,
1191
1293
  height: d,
1192
1294
  x: c,
1193
1295
  y: l
1194
1296
  });
1195
1297
  }
1196
- function St(e, t) {
1197
- let n = ut(e).scrollLeft;
1198
- return t ? t.left + n : xt(J(e)).left + n;
1298
+ function Ot(e, t) {
1299
+ let n = gt(e).scrollLeft;
1300
+ return t ? t.left + n : Dt(Y(e)).left + n;
1199
1301
  }
1200
- function Ct(e, t) {
1302
+ function kt(e, t) {
1201
1303
  let n = e.getBoundingClientRect();
1202
1304
  return {
1203
- x: n.left + t.scrollLeft - St(e, n),
1305
+ x: n.left + t.scrollLeft - Ot(e, n),
1204
1306
  y: n.top + t.scrollTop
1205
1307
  };
1206
1308
  }
1207
- function wt(e) {
1208
- let { elements: t, rect: n, offsetParent: r, strategy: i } = e, a = i === "fixed", o = J(r), s = t ? tt(t.floating) : !1;
1309
+ function At(e) {
1310
+ let { elements: t, rect: n, offsetParent: r, strategy: i } = e, a = i === "fixed", o = Y(r), s = t ? st(t.floating) : !1;
1209
1311
  if (r === o || s && a) return n;
1210
1312
  let c = {
1211
1313
  scrollLeft: 0,
1212
1314
  scrollTop: 0
1213
- }, l = G(1), u = G(0), d = X(r);
1214
- if ((d || !d && !a) && ((Xe(r) !== "body" || $e(o)) && (c = ut(r)), d)) {
1215
- let e = xt(r);
1216
- l = _t(r), u.x = e.x + r.clientLeft, u.y = e.y + r.clientTop;
1315
+ }, l = q(1), u = q(0), d = rt(r);
1316
+ if ((d || !d && !a) && ((tt(r) !== "body" || at(o)) && (c = gt(r)), d)) {
1317
+ let e = Dt(r);
1318
+ l = Ct(r), u.x = e.x + r.clientLeft, u.y = e.y + r.clientTop;
1217
1319
  }
1218
- let f = o && !d && !a ? Ct(o, c) : G(0);
1320
+ let f = o && !d && !a ? kt(o, c) : q(0);
1219
1321
  return {
1220
1322
  width: n.width * l.x,
1221
1323
  height: n.height * l.y,
@@ -1223,31 +1325,31 @@ function wt(e) {
1223
1325
  y: n.y * l.y - c.scrollTop * l.y + u.y + f.y
1224
1326
  };
1225
1327
  }
1226
- function Tt(e) {
1328
+ function jt(e) {
1227
1329
  return Array.from(e.getClientRects());
1228
1330
  }
1229
- function Et(e) {
1230
- let t = J(e), n = ut(e), r = e.ownerDocument.body, i = he(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), a = he(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight), o = -n.scrollLeft + St(e), s = -n.scrollTop;
1231
- return Z(r).direction === "rtl" && (o += he(t.clientWidth, r.clientWidth) - i), {
1331
+ function Mt(e) {
1332
+ let t = Y(e), n = gt(e), r = e.ownerDocument.body, i = ye(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), a = ye(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight), o = -n.scrollLeft + Ot(e), s = -n.scrollTop;
1333
+ return Z(r).direction === "rtl" && (o += ye(t.clientWidth, r.clientWidth) - i), {
1232
1334
  width: i,
1233
1335
  height: a,
1234
1336
  x: o,
1235
1337
  y: s
1236
1338
  };
1237
1339
  }
1238
- var Dt = 25;
1239
- function Ot(e, t) {
1240
- let n = q(e), r = J(e), i = n.visualViewport, a = r.clientWidth, o = r.clientHeight, s = 0, c = 0;
1340
+ var Nt = 25;
1341
+ function Pt(e, t) {
1342
+ let n = J(e), r = Y(e), i = n.visualViewport, a = r.clientWidth, o = r.clientHeight, s = 0, c = 0;
1241
1343
  if (i) {
1242
1344
  a = i.width, o = i.height;
1243
- let e = ct();
1345
+ let e = mt();
1244
1346
  (!e || e && t === "fixed") && (s = i.offsetLeft, c = i.offsetTop);
1245
1347
  }
1246
- let l = St(r);
1348
+ let l = Ot(r);
1247
1349
  if (l <= 0) {
1248
1350
  let e = r.ownerDocument, t = e.body, n = getComputedStyle(t), i = e.compatMode === "CSS1Compat" && parseFloat(n.marginLeft) + parseFloat(n.marginRight) || 0, o = Math.abs(r.clientWidth - t.clientWidth - i);
1249
- o <= Dt && (a -= o);
1250
- } else l <= Dt && (a += l);
1351
+ o <= Nt && (a -= o);
1352
+ } else l <= Nt && (a += l);
1251
1353
  return {
1252
1354
  width: a,
1253
1355
  height: o,
@@ -1255,8 +1357,8 @@ function Ot(e, t) {
1255
1357
  y: c
1256
1358
  };
1257
1359
  }
1258
- function kt(e, t) {
1259
- let n = xt(e, !0, t === "fixed"), r = n.top + e.clientTop, i = n.left + e.clientLeft, a = X(e) ? _t(e) : G(1);
1360
+ function Ft(e, t) {
1361
+ let n = Dt(e, !0, t === "fixed"), r = n.top + e.clientTop, i = n.left + e.clientLeft, a = rt(e) ? Ct(e) : q(1);
1260
1362
  return {
1261
1363
  width: e.clientWidth * a.x,
1262
1364
  height: e.clientHeight * a.y,
@@ -1264,13 +1366,13 @@ function kt(e, t) {
1264
1366
  y: r * a.y
1265
1367
  };
1266
1368
  }
1267
- function At(e, t, n) {
1369
+ function It(e, t, n) {
1268
1370
  let r;
1269
- if (t === "viewport") r = Ot(e, n);
1270
- else if (t === "document") r = Et(J(e));
1271
- else if (Y(t)) r = kt(t, n);
1371
+ if (t === "viewport") r = Pt(e, n);
1372
+ else if (t === "document") r = Mt(Y(e));
1373
+ else if (X(t)) r = Ft(t, n);
1272
1374
  else {
1273
- let n = yt(e);
1375
+ let n = Tt(e);
1274
1376
  r = {
1275
1377
  x: t.x - n.x,
1276
1378
  y: t.y - n.y,
@@ -1278,27 +1380,27 @@ function At(e, t, n) {
1278
1380
  height: t.height
1279
1381
  };
1280
1382
  }
1281
- return Re(r);
1383
+ return Ue(r);
1282
1384
  }
1283
- function jt(e, t) {
1284
- let n = dt(e);
1285
- return n === t || !Y(n) || lt(n) ? !1 : Z(n).position === "fixed" || jt(n, t);
1385
+ function Lt(e, t) {
1386
+ let n = _t(e);
1387
+ return n === t || !X(n) || ht(n) ? !1 : Z(n).position === "fixed" || Lt(n, t);
1286
1388
  }
1287
- function Mt(e, t) {
1389
+ function Rt(e, t) {
1288
1390
  let n = t.get(e);
1289
1391
  if (n) return n;
1290
- let r = pt(e, [], !1).filter((e) => Y(e) && Xe(e) !== "body"), i = null, a = Z(e).position === "fixed", o = a ? dt(e) : e;
1291
- for (; Y(o) && !lt(o);) {
1292
- let t = Z(o), n = ot(o);
1293
- !n && t.position === "fixed" && (i = null), (a ? !n && !i : !n && t.position === "static" && i && (i.position === "absolute" || i.position === "fixed") || $e(o) && !n && jt(e, o)) ? r = r.filter((e) => e !== o) : i = t, o = dt(o);
1392
+ let r = yt(e, [], !1).filter((e) => X(e) && tt(e) !== "body"), i = null, a = Z(e).position === "fixed", o = a ? _t(e) : e;
1393
+ for (; X(o) && !ht(o);) {
1394
+ let t = Z(o), n = ft(o);
1395
+ !n && t.position === "fixed" && (i = null), (a ? !n && !i : !n && t.position === "static" && i && (i.position === "absolute" || i.position === "fixed") || at(o) && !n && Lt(e, o)) ? r = r.filter((e) => e !== o) : i = t, o = _t(o);
1294
1396
  }
1295
1397
  return t.set(e, r), r;
1296
1398
  }
1297
- function Nt(e) {
1298
- let { element: t, boundary: n, rootBoundary: r, strategy: i } = e, a = [...n === "clippingAncestors" ? tt(t) ? [] : Mt(t, this._c) : [].concat(n), r], o = At(t, a[0], i), s = o.top, c = o.right, l = o.bottom, u = o.left;
1399
+ function zt(e) {
1400
+ let { element: t, boundary: n, rootBoundary: r, strategy: i } = e, a = [...n === "clippingAncestors" ? st(t) ? [] : Rt(t, this._c) : [].concat(n), r], o = It(t, a[0], i), s = o.top, c = o.right, l = o.bottom, u = o.left;
1299
1401
  for (let e = 1; e < a.length; e++) {
1300
- let n = At(t, a[e], i);
1301
- s = he(n.top, s), c = me(n.right, c), l = me(n.bottom, l), u = he(n.left, u);
1402
+ let n = It(t, a[e], i);
1403
+ s = ye(n.top, s), c = ve(n.right, c), l = ve(n.bottom, l), u = ye(n.left, u);
1302
1404
  }
1303
1405
  return {
1304
1406
  width: c - u,
@@ -1307,27 +1409,27 @@ function Nt(e) {
1307
1409
  y: s
1308
1410
  };
1309
1411
  }
1310
- function Pt(e) {
1311
- let { width: t, height: n } = ht(e);
1412
+ function Bt(e) {
1413
+ let { width: t, height: n } = xt(e);
1312
1414
  return {
1313
1415
  width: t,
1314
1416
  height: n
1315
1417
  };
1316
1418
  }
1317
- function Ft(e, t, n) {
1318
- let r = X(t), i = J(t), a = n === "fixed", o = xt(e, !0, a, t), s = {
1419
+ function Vt(e, t, n) {
1420
+ let r = rt(t), i = Y(t), a = n === "fixed", o = Dt(e, !0, a, t), s = {
1319
1421
  scrollLeft: 0,
1320
1422
  scrollTop: 0
1321
- }, c = G(0);
1423
+ }, c = q(0);
1322
1424
  function l() {
1323
- c.x = St(i);
1425
+ c.x = Ot(i);
1324
1426
  }
1325
- if (r || !r && !a) if ((Xe(t) !== "body" || $e(i)) && (s = ut(t)), r) {
1326
- let e = xt(t, !0, a, t);
1427
+ if (r || !r && !a) if ((tt(t) !== "body" || at(i)) && (s = gt(t)), r) {
1428
+ let e = Dt(t, !0, a, t);
1327
1429
  c.x = e.x + t.clientLeft, c.y = e.y + t.clientTop;
1328
1430
  } else i && l();
1329
1431
  a && !r && i && l();
1330
- let u = i && !r && !a ? Ct(i, s) : G(0);
1432
+ let u = i && !r && !a ? kt(i, s) : q(0);
1331
1433
  return {
1332
1434
  x: o.left + s.scrollLeft - c.x - u.x,
1333
1435
  y: o.top + s.scrollTop - c.y - u.y,
@@ -1335,34 +1437,34 @@ function Ft(e, t, n) {
1335
1437
  height: o.height
1336
1438
  };
1337
1439
  }
1338
- function It(e) {
1440
+ function Ht(e) {
1339
1441
  return Z(e).position === "static";
1340
1442
  }
1341
- function Lt(e, t) {
1342
- if (!X(e) || Z(e).position === "fixed") return null;
1443
+ function Ut(e, t) {
1444
+ if (!rt(e) || Z(e).position === "fixed") return null;
1343
1445
  if (t) return t(e);
1344
1446
  let n = e.offsetParent;
1345
- return J(e) === n && (n = n.ownerDocument.body), n;
1346
- }
1347
- function Rt(e, t) {
1348
- let n = q(e);
1349
- if (tt(e)) return n;
1350
- if (!X(e)) {
1351
- let t = dt(e);
1352
- for (; t && !lt(t);) {
1353
- if (Y(t) && !It(t)) return t;
1354
- t = dt(t);
1447
+ return Y(e) === n && (n = n.ownerDocument.body), n;
1448
+ }
1449
+ function Wt(e, t) {
1450
+ let n = J(e);
1451
+ if (st(e)) return n;
1452
+ if (!rt(e)) {
1453
+ let t = _t(e);
1454
+ for (; t && !ht(t);) {
1455
+ if (X(t) && !Ht(t)) return t;
1456
+ t = _t(t);
1355
1457
  }
1356
1458
  return n;
1357
1459
  }
1358
- let r = Lt(e, t);
1359
- for (; r && et(r) && It(r);) r = Lt(r, t);
1360
- return r && lt(r) && It(r) && !ot(r) ? n : r || st(e) || n;
1460
+ let r = Ut(e, t);
1461
+ for (; r && ot(r) && Ht(r);) r = Ut(r, t);
1462
+ return r && ht(r) && Ht(r) && !ft(r) ? n : r || pt(e) || n;
1361
1463
  }
1362
- var zt = async function(e) {
1363
- let t = this.getOffsetParent || Rt, n = this.getDimensions, r = await n(e.floating);
1464
+ var Gt = async function(e) {
1465
+ let t = this.getOffsetParent || Wt, n = this.getDimensions, r = await n(e.floating);
1364
1466
  return {
1365
- reference: Ft(e.reference, await t(e.floating), e.strategy),
1467
+ reference: Vt(e.reference, await t(e.floating), e.strategy),
1366
1468
  floating: {
1367
1469
  x: 0,
1368
1470
  y: 0,
@@ -1371,26 +1473,26 @@ var zt = async function(e) {
1371
1473
  }
1372
1474
  };
1373
1475
  };
1374
- function Bt(e) {
1476
+ function Kt(e) {
1375
1477
  return Z(e).direction === "rtl";
1376
1478
  }
1377
- var Vt = {
1378
- convertOffsetParentRelativeRectToViewportRelativeRect: wt,
1379
- getDocumentElement: J,
1380
- getClippingRect: Nt,
1381
- getOffsetParent: Rt,
1382
- getElementRects: zt,
1383
- getClientRects: Tt,
1384
- getDimensions: Pt,
1385
- getScale: _t,
1386
- isElement: Y,
1387
- isRTL: Bt
1479
+ var qt = {
1480
+ convertOffsetParentRelativeRectToViewportRelativeRect: At,
1481
+ getDocumentElement: Y,
1482
+ getClippingRect: zt,
1483
+ getOffsetParent: Wt,
1484
+ getElementRects: Gt,
1485
+ getClientRects: jt,
1486
+ getDimensions: Bt,
1487
+ getScale: Ct,
1488
+ isElement: X,
1489
+ isRTL: Kt
1388
1490
  };
1389
- function Ht(e, t) {
1491
+ function Jt(e, t) {
1390
1492
  return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
1391
1493
  }
1392
- function Ut(e, t) {
1393
- let n = null, r, i = J(e);
1494
+ function Yt(e, t) {
1495
+ let n = null, r, i = Y(e);
1394
1496
  function a() {
1395
1497
  var e;
1396
1498
  clearTimeout(r), (e = n) == null || e.disconnect(), n = null;
@@ -1399,9 +1501,9 @@ function Ut(e, t) {
1399
1501
  s === void 0 && (s = !1), c === void 0 && (c = 1), a();
1400
1502
  let l = e.getBoundingClientRect(), { left: u, top: d, width: f, height: p } = l;
1401
1503
  if (s || t(), !f || !p) return;
1402
- let m = _e(d), h = _e(i.clientWidth - (u + f)), g = _e(i.clientHeight - (d + p)), _ = _e(u), v = {
1504
+ let m = xe(d), h = xe(i.clientWidth - (u + f)), g = xe(i.clientHeight - (d + p)), _ = xe(u), v = {
1403
1505
  rootMargin: -m + "px " + -h + "px " + -g + "px " + -_ + "px",
1404
- threshold: he(0, me(1, c)) || 1
1506
+ threshold: ye(0, ve(1, c)) || 1
1405
1507
  }, y = !0;
1406
1508
  function b(t) {
1407
1509
  let n = t[0].intersectionRatio;
@@ -1411,7 +1513,7 @@ function Ut(e, t) {
1411
1513
  o(!1, 1e-7);
1412
1514
  }, 1e3);
1413
1515
  }
1414
- n === 1 && !Ht(l, e.getBoundingClientRect()) && o(), y = !1;
1516
+ n === 1 && !Jt(l, e.getBoundingClientRect()) && o(), y = !1;
1415
1517
  }
1416
1518
  try {
1417
1519
  n = new IntersectionObserver(b, {
@@ -1425,13 +1527,13 @@ function Ut(e, t) {
1425
1527
  }
1426
1528
  return o(!0), a;
1427
1529
  }
1428
- function Wt(e, t, n, r) {
1530
+ function Xt(e, t, n, r) {
1429
1531
  r === void 0 && (r = {});
1430
- let { ancestorScroll: i = !0, ancestorResize: a = !0, elementResize: o = typeof ResizeObserver == "function", layoutShift: s = typeof IntersectionObserver == "function", animationFrame: c = !1 } = r, l = gt(e), u = i || a ? [...l ? pt(l) : [], ...t ? pt(t) : []] : [];
1532
+ let { ancestorScroll: i = !0, ancestorResize: a = !0, elementResize: o = typeof ResizeObserver == "function", layoutShift: s = typeof IntersectionObserver == "function", animationFrame: c = !1 } = r, l = St(e), u = i || a ? [...l ? yt(l) : [], ...t ? yt(t) : []] : [];
1431
1533
  u.forEach((e) => {
1432
1534
  i && e.addEventListener("scroll", n, { passive: !0 }), a && e.addEventListener("resize", n);
1433
1535
  });
1434
- let d = l && s ? Ut(l, n) : null, f = -1, p = null;
1536
+ let d = l && s ? Yt(l, n) : null, f = -1, p = null;
1435
1537
  o && (p = new ResizeObserver((e) => {
1436
1538
  let [r] = e;
1437
1539
  r && r.target === l && p && t && (p.unobserve(t), cancelAnimationFrame(f), f = requestAnimationFrame(() => {
@@ -1439,11 +1541,11 @@ function Wt(e, t, n, r) {
1439
1541
  (e = p) == null || e.observe(t);
1440
1542
  })), n();
1441
1543
  }), l && !c && p.observe(l), t && p.observe(t));
1442
- let m, h = c ? xt(e) : null;
1544
+ let m, h = c ? Dt(e) : null;
1443
1545
  c && g();
1444
1546
  function g() {
1445
- let t = xt(e);
1446
- h && !Ht(h, t) && n(), h = t, m = requestAnimationFrame(g);
1547
+ let t = Dt(e);
1548
+ h && !Jt(h, t) && n(), h = t, m = requestAnimationFrame(g);
1447
1549
  }
1448
1550
  return n(), () => {
1449
1551
  var e;
@@ -1452,53 +1554,53 @@ function Wt(e, t, n, r) {
1452
1554
  }), d?.(), (e = p) == null || e.disconnect(), p = null, c && cancelAnimationFrame(m);
1453
1555
  };
1454
1556
  }
1455
- var Gt = qe, Kt = Je, qt = We, Jt = Ue, Yt = (e, t, n) => {
1557
+ var Zt = Qe, Qt = $e, $t = Ye, en = Je, tn = (e, t, n) => {
1456
1558
  let r = /* @__PURE__ */ new Map(), i = {
1457
- platform: Vt,
1559
+ platform: qt,
1458
1560
  ...n
1459
1561
  }, a = {
1460
1562
  ...i.platform,
1461
1563
  _c: r
1462
1564
  };
1463
- return He(e, t, {
1565
+ return qe(e, t, {
1464
1566
  ...i,
1465
1567
  platform: a
1466
1568
  });
1467
- }, Xt = "_trigger_e00wn_1", Zt = "_content_e00wn_10", Qt = "_subTrigger_e00wn_61", $t = "_itemMain_e00wn_90", en = "_itemInset_e00wn_106", tn = "_shortcut_e00wn_118", nn = "_indicator_e00wn_119", rn = "_submenuIndicator_e00wn_120", Q = {
1468
- trigger: Xt,
1469
- content: Zt,
1569
+ }, nn = "_trigger_e00wn_1", rn = "_content_e00wn_10", an = "_subTrigger_e00wn_61", on = "_itemMain_e00wn_90", sn = "_itemInset_e00wn_106", cn = "_shortcut_e00wn_118", ln = "_indicator_e00wn_119", un = "_submenuIndicator_e00wn_120", Q = {
1570
+ trigger: nn,
1571
+ content: rn,
1470
1572
  "owo-dropdown-menu-in": "_owo-dropdown-menu-in_e00wn_1",
1471
- subTrigger: Qt,
1472
- itemMain: $t,
1473
- itemInset: en,
1474
- shortcut: tn,
1475
- indicator: nn,
1476
- submenuIndicator: rn
1477
- }, an = n(null), on = n(null);
1478
- function sn(e) {
1479
- let t = a(an);
1573
+ subTrigger: an,
1574
+ itemMain: on,
1575
+ itemInset: sn,
1576
+ shortcut: cn,
1577
+ indicator: ln,
1578
+ submenuIndicator: un
1579
+ }, dn = n(null), fn = n(null);
1580
+ function pn(e) {
1581
+ let t = a(dn);
1480
1582
  if (!t) throw Error(`${e} must be used within DropdownMenu.`);
1481
1583
  return t;
1482
1584
  }
1483
- function cn(e) {
1484
- let t = a(on);
1585
+ function mn(e) {
1586
+ let t = a(fn);
1485
1587
  if (!t) throw Error(`${e} must be used within DropdownMenu.Content.`);
1486
1588
  return t;
1487
1589
  }
1488
- function ln(e, t) {
1590
+ function hn(e, t) {
1489
1591
  return (n) => {
1490
1592
  e?.(n), t(n);
1491
1593
  };
1492
1594
  }
1493
- function un(...e) {
1595
+ function gn(...e) {
1494
1596
  return (t) => {
1495
1597
  for (let n of e) n && (typeof n == "function" ? n(t) : n.current = t);
1496
1598
  };
1497
1599
  }
1498
- function dn(e) {
1499
- return typeof e == "string" || typeof e == "number" ? String(e) : Array.isArray(e) ? e.map(dn).join(" ") : !e || typeof e == "boolean" ? "" : r(e) ? dn(e.props.children) : "";
1600
+ function _n(e) {
1601
+ return typeof e == "string" || typeof e == "number" ? String(e) : Array.isArray(e) ? e.map(_n).join(" ") : !e || typeof e == "boolean" ? "" : r(e) ? _n(e.props.children) : "";
1500
1602
  }
1501
- function fn(e) {
1603
+ function vn(e) {
1502
1604
  return [...e].sort((e, t) => {
1503
1605
  let n = e.ref.current, r = t.ref.current;
1504
1606
  if (!n || !r) return 0;
@@ -1506,18 +1608,18 @@ function fn(e) {
1506
1608
  return i & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : i & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
1507
1609
  });
1508
1610
  }
1509
- function pn(e, t) {
1611
+ function yn(e, t) {
1510
1612
  return t === "center" ? e : `${e}-${t}`;
1511
1613
  }
1512
- function mn(e) {
1614
+ function bn(e) {
1513
1615
  let t = e.split("-");
1514
1616
  return {
1515
1617
  side: t[0],
1516
1618
  align: t[1] ?? "center"
1517
1619
  };
1518
1620
  }
1519
- function hn({ open: e, defaultOpen: t = !1, onOpenChange: n, side: r = "bottom", align: o = "start", sideOffset: c = 8, alignOffset: f = 0, collisionPadding: m = 8, portal: h = !0, contentRole: g = "menu", classNames: _, children: v }) {
1520
- let y = a(on), [b, x] = d(t), S = e !== void 0, C = S ? e : b, w = u(null), T = u(null), E = u("selected"), D = s(), O = s(), k = i((e) => {
1621
+ function xn({ open: e, defaultOpen: t = !1, onOpenChange: n, side: r = "bottom", align: o = "start", sideOffset: c = 8, alignOffset: f = 0, collisionPadding: m = 8, portal: h = !0, contentRole: g = "menu", classNames: _, children: v }) {
1622
+ let y = a(fn), [b, x] = d(t), S = e !== void 0, C = S ? e : b, w = u(null), T = u(null), E = u("selected"), D = s(), O = s(), k = i((e) => {
1521
1623
  S || x(e), n?.(e);
1522
1624
  }, [S, n]), A = i(() => {
1523
1625
  k(!1);
@@ -1527,7 +1629,7 @@ function hn({ open: e, defaultOpen: t = !1, onOpenChange: n, side: r = "bottom",
1527
1629
  k(!C);
1528
1630
  }, [C, k]), N = i(() => {
1529
1631
  w.current?.focus();
1530
- }, []), ee = l(() => ({
1632
+ }, []), P = l(() => ({
1531
1633
  open: C,
1532
1634
  setOpen: k,
1533
1635
  toggleOpen: M,
@@ -1568,32 +1670,32 @@ function hn({ open: e, defaultOpen: t = !1, onOpenChange: n, side: r = "bottom",
1568
1670
  O,
1569
1671
  N
1570
1672
  ]);
1571
- return /* @__PURE__ */ p(an.Provider, {
1572
- value: ee,
1673
+ return /* @__PURE__ */ p(dn.Provider, {
1674
+ value: P,
1573
1675
  children: v
1574
1676
  });
1575
1677
  }
1576
- function gn({ asChild: n = !1, disabled: r = !1, className: i, children: a }) {
1577
- let { open: o, setOpen: s, toggleOpen: c, triggerRef: l, contentRole: u, triggerId: d, contentId: f, focusIntentRef: m, isSubmenu: h, classNames: g } = sn("DropdownMenu.Trigger"), v = e.only(a), y = v.props ?? {}, b = typeof y.className == "string" ? y.className : void 0, x = {
1678
+ function Sn({ asChild: n = !1, disabled: r = !1, className: i, children: a }) {
1679
+ let { open: o, setOpen: s, toggleOpen: c, triggerRef: l, contentRole: u, triggerId: d, contentId: f, focusIntentRef: m, isSubmenu: h, classNames: g } = pn("DropdownMenu.Trigger"), v = e.only(a), y = v.props ?? {}, b = typeof y.className == "string" ? y.className : void 0, x = {
1578
1680
  id: d,
1579
1681
  "data-state": o ? "open" : "closed",
1580
1682
  "aria-expanded": o,
1581
1683
  "aria-haspopup": u,
1582
1684
  "aria-controls": o ? f : void 0,
1583
- onClick: ln(y.onClick, (e) => {
1685
+ onClick: hn(y.onClick, (e) => {
1584
1686
  if (r) {
1585
1687
  e.preventDefault();
1586
1688
  return;
1587
1689
  }
1588
1690
  m.current = "selected", c();
1589
1691
  }),
1590
- onKeyDown: ln(y.onKeyDown, (e) => {
1692
+ onKeyDown: hn(y.onKeyDown, (e) => {
1591
1693
  r || (e.key === "ArrowDown" ? (e.preventDefault(), m.current = "first", s(!0)) : e.key === "ArrowUp" ? (e.preventDefault(), m.current = "last", s(!0)) : !h && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), m.current = "selected", c()));
1592
1694
  })
1593
1695
  };
1594
1696
  return n ? t(v, {
1595
1697
  ...x,
1596
- ref: un(l, y.ref),
1698
+ ref: gn(l, y.ref),
1597
1699
  className: _(Q.trigger, g?.trigger, i, b),
1598
1700
  type: v.type === "button" ? y.type ?? "button" : y.type
1599
1701
  }) : /* @__PURE__ */ p("button", {
@@ -1607,56 +1709,56 @@ function gn({ asChild: n = !1, disabled: r = !1, className: i, children: a }) {
1607
1709
  children: v
1608
1710
  });
1609
1711
  }
1610
- function _n({ className: e, children: t, style: n, matchTriggerWidth: r = !1, maxHeight: a = 320, ...s }) {
1611
- let { open: f, setOpen: m, triggerRef: g, contentRef: v, side: y, align: b, sideOffset: x, alignOffset: S, collisionPadding: C, portal: w, contentRole: T, triggerId: E, contentId: D, focusIntentRef: O, parentList: k, isSubmenu: A, closeSelf: j, closeTree: M, focusTrigger: N, classNames: ee } = sn("DropdownMenu.Content"), P = u([]), [F, I] = d(null), [L, R] = d(null), [te, ne] = d(null), [z, B] = d(!1), re = u(""), V = u(null), ie = i((e) => (P.current = [...P.current.filter((t) => t.id !== e.id), e], () => {
1612
- P.current = P.current.filter((t) => t.id !== e.id);
1613
- }), []), H = i(() => fn(P.current), []), ae = i((e) => {
1712
+ function Cn({ className: e, children: t, style: n, matchTriggerWidth: r = !1, maxHeight: a = 320, ...s }) {
1713
+ let { open: f, setOpen: m, triggerRef: g, contentRef: v, side: y, align: b, sideOffset: x, alignOffset: S, collisionPadding: C, portal: w, contentRole: T, triggerId: E, contentId: D, focusIntentRef: O, parentList: k, isSubmenu: A, closeSelf: j, closeTree: M, focusTrigger: N, classNames: P } = pn("DropdownMenu.Content"), F = u([]), [I, L] = d(null), [R, ee] = d(null), [z, B] = d(null), [V, H] = d(!1), U = u(""), W = u(null), te = i((e) => (F.current = [...F.current.filter((t) => t.id !== e.id), e], () => {
1714
+ F.current = F.current.filter((t) => t.id !== e.id);
1715
+ }), []), G = i(() => vn(F.current), []), ne = i((e) => {
1614
1716
  O.current = e;
1615
1717
  }, [O]);
1616
1718
  o(() => {
1617
- B(!0);
1719
+ H(!0);
1618
1720
  }, []);
1619
- let oe = l(() => ({
1721
+ let re = l(() => ({
1620
1722
  role: T,
1621
- highlightedId: F,
1622
- setHighlightedId: I,
1623
- registerItem: ie,
1624
- getItems: H,
1625
- requestFocusIntent: ae,
1723
+ highlightedId: I,
1724
+ setHighlightedId: L,
1725
+ registerItem: te,
1726
+ getItems: G,
1727
+ requestFocusIntent: ne,
1626
1728
  closeTree: M,
1627
1729
  closeSelf: j,
1628
1730
  focusTrigger: N,
1629
- activeSubmenuId: L,
1630
- setActiveSubmenuId: R,
1731
+ activeSubmenuId: R,
1732
+ setActiveSubmenuId: ee,
1631
1733
  contentRef: v
1632
1734
  }), [
1633
- L,
1735
+ R,
1634
1736
  j,
1635
1737
  M,
1636
1738
  v,
1637
1739
  T,
1638
1740
  N,
1639
- H,
1640
- F,
1641
- ie,
1642
- ae
1741
+ G,
1742
+ I,
1743
+ te,
1744
+ ne
1643
1745
  ]);
1644
1746
  c(() => {
1645
- if (!(!f || !z || !g.current || !v.current)) return Wt(g.current, v.current, () => {
1646
- !g.current || !v.current || Yt(g.current, v.current, {
1647
- placement: pn(y, b),
1747
+ if (!(!f || !V || !g.current || !v.current)) return Xt(g.current, v.current, () => {
1748
+ !g.current || !v.current || tn(g.current, v.current, {
1749
+ placement: yn(y, b),
1648
1750
  strategy: "fixed",
1649
1751
  middleware: [
1650
- Gt({
1752
+ Zt({
1651
1753
  mainAxis: x,
1652
1754
  crossAxis: S
1653
1755
  }),
1654
- qt({ padding: C }),
1655
- Kt({ padding: C })
1756
+ $t({ padding: C }),
1757
+ Qt({ padding: C })
1656
1758
  ]
1657
1759
  }).then(({ x: e, y: t, placement: n }) => {
1658
- let r = mn(n);
1659
- ne({
1760
+ let r = bn(n);
1761
+ B({
1660
1762
  top: t,
1661
1763
  left: e,
1662
1764
  side: r.side,
@@ -1669,26 +1771,26 @@ function _n({ className: e, children: t, style: n, matchTriggerWidth: r = !1, ma
1669
1771
  S,
1670
1772
  C,
1671
1773
  v,
1672
- z,
1774
+ V,
1673
1775
  f,
1674
1776
  y,
1675
1777
  x,
1676
1778
  g
1677
1779
  ]), o(() => {
1678
1780
  if (!f) {
1679
- I(null), R(null);
1781
+ L(null), ee(null);
1680
1782
  return;
1681
1783
  }
1682
- let e = H().filter((e) => !e.disabled);
1784
+ let e = G().filter((e) => !e.disabled);
1683
1785
  if (e.length === 0) return;
1684
1786
  let t = e[0];
1685
- O.current === "last" ? t = e[e.length - 1] : O.current === "selected" && (t = e.find((e) => e.selected) ?? e[0]), I(t.id), requestAnimationFrame(() => {
1787
+ O.current === "last" ? t = e[e.length - 1] : O.current === "selected" && (t = e.find((e) => e.selected) ?? e[0]), L(t.id), requestAnimationFrame(() => {
1686
1788
  v.current?.focus(), t.ref.current?.scrollIntoView({ block: "nearest" });
1687
1789
  });
1688
1790
  }, [
1689
1791
  v,
1690
1792
  O,
1691
- H,
1793
+ G,
1692
1794
  f
1693
1795
  ]), o(() => {
1694
1796
  if (!f) return;
@@ -1714,64 +1816,64 @@ function _n({ className: e, children: t, style: n, matchTriggerWidth: r = !1, ma
1714
1816
  g
1715
1817
  ]), o(() => {
1716
1818
  if (f) return () => {
1717
- V.current && clearTimeout(V.current);
1819
+ W.current && clearTimeout(W.current);
1718
1820
  };
1719
1821
  }, [f]);
1720
- let U = i((e) => {
1721
- if (I(e), !e) {
1722
- R(null);
1822
+ let K = i((e) => {
1823
+ if (L(e), !e) {
1824
+ ee(null);
1723
1825
  return;
1724
1826
  }
1725
- H().find((t) => t.id === e)?.submenu || R(null);
1726
- }, [H]), se = i((e, t = "first") => {
1727
- let n = H().filter((e) => !e.disabled);
1827
+ G().find((t) => t.id === e)?.submenu || ee(null);
1828
+ }, [G]), ie = i((e, t = "first") => {
1829
+ let n = G().filter((e) => !e.disabled);
1728
1830
  if (n.length === 0) return;
1729
- let r = n.findIndex((e) => e.id === F);
1831
+ let r = n.findIndex((e) => e.id === I);
1730
1832
  if (r === -1) {
1731
- U(t === "last" ? n[n.length - 1].id : n[0].id);
1833
+ K(t === "last" ? n[n.length - 1].id : n[0].id);
1732
1834
  return;
1733
1835
  }
1734
1836
  let i = n[(r + e + n.length) % n.length];
1735
- U(i.id), i.ref.current?.scrollIntoView({ block: "nearest" });
1837
+ K(i.id), i.ref.current?.scrollIntoView({ block: "nearest" });
1736
1838
  }, [
1737
- H,
1738
- F,
1739
- U
1740
- ]), ce = i((e) => {
1839
+ G,
1840
+ I,
1841
+ K
1842
+ ]), ae = i((e) => {
1741
1843
  let t = e.length === 1 ? e.toLowerCase() : "";
1742
1844
  if (!t) return;
1743
- V.current && clearTimeout(V.current), re.current += t, V.current = setTimeout(() => {
1744
- re.current = "", V.current = null;
1845
+ W.current && clearTimeout(W.current), U.current += t, W.current = setTimeout(() => {
1846
+ U.current = "", W.current = null;
1745
1847
  }, 350);
1746
- let n = H().filter((e) => !e.disabled);
1848
+ let n = G().filter((e) => !e.disabled);
1747
1849
  if (n.length === 0) return;
1748
- let r = n.findIndex((e) => e.id === F), i = (r >= 0 ? [...n.slice(r + 1), ...n.slice(0, r + 1)] : n).find((e) => e.textValue.toLowerCase().startsWith(re.current));
1749
- i && (U(i.id), i.ref.current?.scrollIntoView({ block: "nearest" }));
1850
+ let r = n.findIndex((e) => e.id === I), i = (r >= 0 ? [...n.slice(r + 1), ...n.slice(0, r + 1)] : n).find((e) => e.textValue.toLowerCase().startsWith(U.current));
1851
+ i && (K(i.id), i.ref.current?.scrollIntoView({ block: "nearest" }));
1750
1852
  }, [
1751
- H,
1752
- F,
1753
- U
1754
- ]), le = i((e) => {
1755
- let t = H(), n = t.find((e) => e.id === F) ?? null;
1853
+ G,
1854
+ I,
1855
+ K
1856
+ ]), oe = i((e) => {
1857
+ let t = G(), n = t.find((e) => e.id === I) ?? null;
1756
1858
  switch (e.key) {
1757
1859
  case "ArrowDown":
1758
- e.preventDefault(), se(1);
1860
+ e.preventDefault(), ie(1);
1759
1861
  break;
1760
1862
  case "ArrowUp":
1761
- e.preventDefault(), se(-1, "last");
1863
+ e.preventDefault(), ie(-1, "last");
1762
1864
  break;
1763
1865
  case "Home":
1764
1866
  e.preventDefault();
1765
1867
  {
1766
1868
  let e = t.find((e) => !e.disabled);
1767
- e && U(e.id);
1869
+ e && K(e.id);
1768
1870
  }
1769
1871
  break;
1770
1872
  case "End":
1771
1873
  e.preventDefault();
1772
1874
  {
1773
1875
  let e = t.filter((e) => !e.disabled), n = e[e.length - 1];
1774
- n && U(n.id);
1876
+ n && K(n.id);
1775
1877
  }
1776
1878
  break;
1777
1879
  case "Enter":
@@ -1790,23 +1892,23 @@ function _n({ className: e, children: t, style: n, matchTriggerWidth: r = !1, ma
1790
1892
  case "Escape":
1791
1893
  e.preventDefault(), j(), N(), A && k?.setActiveSubmenuId(null);
1792
1894
  break;
1793
- default: ce(e.key);
1895
+ default: ae(e.key);
1794
1896
  }
1795
1897
  }, [
1796
1898
  j,
1797
1899
  M,
1798
1900
  N,
1799
- H,
1800
- ce,
1801
- F,
1802
- U,
1901
+ G,
1902
+ ae,
1903
+ I,
1904
+ K,
1803
1905
  A,
1804
- se,
1906
+ ie,
1805
1907
  k
1806
1908
  ]);
1807
- if (!f || !z) return null;
1808
- let ue = /* @__PURE__ */ p(on.Provider, {
1809
- value: oe,
1909
+ if (!f || !V) return null;
1910
+ let se = /* @__PURE__ */ p(fn.Provider, {
1911
+ value: re,
1810
1912
  children: /* @__PURE__ */ p("div", {
1811
1913
  ref: v,
1812
1914
  id: D,
@@ -1814,28 +1916,28 @@ function _n({ className: e, children: t, style: n, matchTriggerWidth: r = !1, ma
1814
1916
  tabIndex: -1,
1815
1917
  "aria-labelledby": T === "menu" ? E : void 0,
1816
1918
  "data-state": "open",
1817
- "data-side": te?.side ?? y,
1818
- "data-align": te?.align ?? b,
1919
+ "data-side": z?.side ?? y,
1920
+ "data-align": z?.align ?? b,
1819
1921
  "data-scope": "dropdown-menu",
1820
1922
  "data-part": "content",
1821
- className: _(Q.content, ee?.content, e),
1923
+ className: _(Q.content, P?.content, e),
1822
1924
  style: {
1823
1925
  ...n,
1824
1926
  position: "fixed",
1825
- top: te?.top ?? 0,
1826
- left: te?.left ?? 0,
1927
+ top: z?.top ?? 0,
1928
+ left: z?.left ?? 0,
1827
1929
  maxHeight: a,
1828
1930
  minWidth: r ? g.current?.getBoundingClientRect().width : void 0
1829
1931
  },
1830
- onKeyDown: le,
1932
+ onKeyDown: oe,
1831
1933
  ...s,
1832
1934
  children: t
1833
1935
  })
1834
1936
  });
1835
- return w ? h(ue, document.body) : ue;
1937
+ return w ? h(se, document.body) : se;
1836
1938
  }
1837
- function vn({ className: e, children: t, ...n }) {
1838
- let { classNames: r } = sn("DropdownMenu.Group");
1939
+ function wn({ className: e, children: t, ...n }) {
1940
+ let { classNames: r } = pn("DropdownMenu.Group");
1839
1941
  return /* @__PURE__ */ p("div", {
1840
1942
  "data-scope": "dropdown-menu",
1841
1943
  "data-part": "group",
@@ -1844,8 +1946,8 @@ function vn({ className: e, children: t, ...n }) {
1844
1946
  children: t
1845
1947
  });
1846
1948
  }
1847
- function yn({ className: e, children: t, ...n }) {
1848
- let { classNames: r } = sn("DropdownMenu.Label");
1949
+ function Tn({ className: e, children: t, ...n }) {
1950
+ let { classNames: r } = pn("DropdownMenu.Label");
1849
1951
  return /* @__PURE__ */ p("div", {
1850
1952
  "data-scope": "dropdown-menu",
1851
1953
  "data-part": "label",
@@ -1854,8 +1956,8 @@ function yn({ className: e, children: t, ...n }) {
1854
1956
  children: t
1855
1957
  });
1856
1958
  }
1857
- function bn({ className: e, ...t }) {
1858
- let { classNames: n } = sn("DropdownMenu.Separator");
1959
+ function En({ className: e, ...t }) {
1960
+ let { classNames: n } = pn("DropdownMenu.Separator");
1859
1961
  return /* @__PURE__ */ p("div", {
1860
1962
  role: "separator",
1861
1963
  "data-scope": "dropdown-menu",
@@ -1864,8 +1966,8 @@ function bn({ className: e, ...t }) {
1864
1966
  ...t
1865
1967
  });
1866
1968
  }
1867
- function xn({ className: e, children: t, inset: n = !1, disabled: r = !1, selected: a = !1, destructive: c = !1, closeOnSelect: d = !0, shortcut: f, indicator: h, onSelect: g, onMouseEnter: v, onClick: y, ...b }) {
1868
- let x = s(), S = u(null), { role: C, highlightedId: w, setHighlightedId: T, registerItem: E, closeTree: D, setActiveSubmenuId: O } = cn("DropdownMenu.Item"), { classNames: k } = sn("DropdownMenu.Item"), A = l(() => dn(t), [t]), j = w === x, M = i(() => {
1969
+ function Dn({ className: e, children: t, inset: n = !1, disabled: r = !1, selected: a = !1, destructive: c = !1, closeOnSelect: d = !0, shortcut: f, indicator: h, onSelect: g, onMouseEnter: v, onClick: y, ...b }) {
1970
+ let x = s(), S = u(null), { role: C, highlightedId: w, setHighlightedId: T, registerItem: E, closeTree: D, setActiveSubmenuId: O } = mn("DropdownMenu.Item"), { classNames: k } = pn("DropdownMenu.Item"), A = l(() => _n(t), [t]), j = w === x, M = i(() => {
1869
1971
  r || (g?.(), d && D());
1870
1972
  }, [
1871
1973
  d,
@@ -1905,10 +2007,10 @@ function xn({ className: e, children: t, inset: n = !1, disabled: r = !1, select
1905
2007
  "data-scope": "dropdown-menu",
1906
2008
  "data-part": "item",
1907
2009
  className: _(n && Q.itemInset, k?.item, e),
1908
- onMouseEnter: ln(v, () => {
2010
+ onMouseEnter: hn(v, () => {
1909
2011
  r || (T(x), O(null));
1910
2012
  }),
1911
- onClick: ln(y, (e) => {
2013
+ onClick: hn(y, (e) => {
1912
2014
  e.preventDefault(), M();
1913
2015
  }),
1914
2016
  ...b,
@@ -1928,8 +2030,8 @@ function xn({ className: e, children: t, inset: n = !1, disabled: r = !1, select
1928
2030
  ]
1929
2031
  });
1930
2032
  }
1931
- function Sn(e) {
1932
- return /* @__PURE__ */ p(hn, {
2033
+ function On(e) {
2034
+ return /* @__PURE__ */ p(xn, {
1933
2035
  side: "right",
1934
2036
  align: "start",
1935
2037
  sideOffset: 6,
@@ -1937,8 +2039,8 @@ function Sn(e) {
1937
2039
  contentRole: "menu"
1938
2040
  });
1939
2041
  }
1940
- function Cn({ className: e, children: t, inset: n = !1, disabled: r = !1, destructive: a = !1, shortcut: c, onSelect: d, onMouseEnter: f, onClick: h, ...g }) {
1941
- let v = s(), y = u(null), b = sn("DropdownMenu.SubTrigger"), { highlightedId: x, setHighlightedId: S, registerItem: C, setActiveSubmenuId: w, activeSubmenuId: T } = cn("DropdownMenu.SubTrigger"), E = l(() => dn(t), [t]), D = x === v, O = b.open && T === v, k = i(() => {
2042
+ function kn({ className: e, children: t, inset: n = !1, disabled: r = !1, destructive: a = !1, shortcut: c, onSelect: d, onMouseEnter: f, onClick: h, ...g }) {
2043
+ let v = s(), y = u(null), b = pn("DropdownMenu.SubTrigger"), { highlightedId: x, setHighlightedId: S, registerItem: C, setActiveSubmenuId: w, activeSubmenuId: T } = mn("DropdownMenu.SubTrigger"), E = l(() => _n(t), [t]), D = x === v, O = b.open && T === v, k = i(() => {
1942
2044
  r || (b.focusIntentRef.current = "first", S(v), w(v), b.setOpen(!0));
1943
2045
  }, [
1944
2046
  r,
@@ -1970,7 +2072,7 @@ function Cn({ className: e, children: t, inset: n = !1, disabled: r = !1, destru
1970
2072
  v,
1971
2073
  b
1972
2074
  ]), /* @__PURE__ */ m("button", {
1973
- ref: un(y, b.triggerRef),
2075
+ ref: gn(y, b.triggerRef),
1974
2076
  id: b.triggerId,
1975
2077
  type: "button",
1976
2078
  role: "menuitem",
@@ -1983,10 +2085,10 @@ function Cn({ className: e, children: t, inset: n = !1, disabled: r = !1, destru
1983
2085
  "data-disabled": r || void 0,
1984
2086
  "data-destructive": a || void 0,
1985
2087
  className: _(Q.subTrigger, n && Q.itemInset, e),
1986
- onMouseEnter: ln(f, () => {
2088
+ onMouseEnter: hn(f, () => {
1987
2089
  k();
1988
2090
  }),
1989
- onClick: ln(h, (e) => {
2091
+ onClick: hn(h, (e) => {
1990
2092
  e.preventDefault(), k(), d?.();
1991
2093
  }),
1992
2094
  ...g,
@@ -2007,22 +2109,22 @@ function Cn({ className: e, children: t, inset: n = !1, disabled: r = !1, destru
2007
2109
  ]
2008
2110
  });
2009
2111
  }
2010
- var wn = Object.assign(hn, {
2011
- Trigger: gn,
2012
- Content: _n,
2013
- Group: vn,
2014
- Label: yn,
2015
- Item: xn,
2016
- Separator: bn,
2017
- Submenu: Sn,
2018
- SubTrigger: Cn
2019
- }), Tn = {
2112
+ var An = Object.assign(xn, {
2113
+ Trigger: Sn,
2114
+ Content: Cn,
2115
+ Group: wn,
2116
+ Label: Tn,
2117
+ Item: Dn,
2118
+ Separator: En,
2119
+ Submenu: On,
2120
+ SubTrigger: kn
2121
+ }), jn = {
2020
2122
  panel: "_panel_7f715_1",
2021
2123
  backdrop: "_backdrop_7f715_55"
2022
2124
  };
2023
2125
  //#endregion
2024
2126
  //#region src/components/Drawer.tsx
2025
- function En({ as: e = "aside", open: t, children: n, side: r = "right", position: i = "fixed", showBackdrop: a = !0, onClose: o, closeLabel: s = "关闭抽屉", backdropClassName: c, className: l, classNames: u, ...d }) {
2127
+ function Mn({ as: e = "aside", open: t, children: n, side: r = "right", position: i = "fixed", showBackdrop: a = !0, onClose: o, closeLabel: s = "关闭抽屉", backdropClassName: c, className: l, classNames: u, ...d }) {
2026
2128
  return /* @__PURE__ */ m(f, { children: [a && t && o && /* @__PURE__ */ p("button", {
2027
2129
  type: "button",
2028
2130
  "aria-label": s,
@@ -2030,7 +2132,7 @@ function En({ as: e = "aside", open: t, children: n, side: r = "right", position
2030
2132
  "data-scope": "drawer",
2031
2133
  "data-part": "backdrop",
2032
2134
  "data-position": i,
2033
- className: _("owo-drawer-backdrop", Tn.backdrop, c, u?.backdrop),
2135
+ className: _("owo-drawer-backdrop", jn.backdrop, c, u?.backdrop),
2034
2136
  onClick: o
2035
2137
  }), /* @__PURE__ */ p(e, {
2036
2138
  "aria-hidden": !t,
@@ -2039,43 +2141,91 @@ function En({ as: e = "aside", open: t, children: n, side: r = "right", position
2039
2141
  "data-position": i,
2040
2142
  "data-scope": "drawer",
2041
2143
  "data-part": "panel",
2042
- className: _("owo-drawer", Tn.panel, l, u?.panel),
2144
+ className: _("owo-drawer", jn.panel, l, u?.panel),
2043
2145
  ...d,
2044
2146
  children: n
2045
2147
  })] });
2046
2148
  }
2047
- var Dn = {
2048
- root: "_root_1fz2l_1",
2049
- label: "_label_1fz2l_7",
2050
- help: "_help_1fz2l_15"
2149
+ var Nn = {
2150
+ root: "_root_38gc5_1",
2151
+ label: "_label_38gc5_10",
2152
+ required: "_required_38gc5_18",
2153
+ description: "_description_38gc5_23",
2154
+ error: "_error_38gc5_31",
2155
+ help: "_help_38gc5_39"
2051
2156
  };
2052
2157
  //#endregion
2053
2158
  //#region src/components/Field.tsx
2054
- function On({ label: e, help: t, htmlFor: n, children: r, className: i, classNames: a, ...o }) {
2159
+ function Pn({ label: e, description: t, error: n, help: r, required: i = !1, disabled: a = !1, invalid: o = !1, htmlFor: c, children: u, className: d, classNames: f, ...h }) {
2160
+ let g = s(), v = c ?? g, y = `${v}-label`, b = t ? `${v}-description` : void 0, x = n ? `${v}-error` : void 0, S = r ? `${v}-help` : void 0, C = [
2161
+ b,
2162
+ x,
2163
+ S
2164
+ ].filter(Boolean).join(" ") || void 0, w = l(() => ({
2165
+ controlId: v,
2166
+ labelId: y,
2167
+ describedBy: C,
2168
+ disabled: a,
2169
+ invalid: o,
2170
+ required: i
2171
+ }), [
2172
+ v,
2173
+ y,
2174
+ C,
2175
+ a,
2176
+ o,
2177
+ i
2178
+ ]);
2055
2179
  return /* @__PURE__ */ m("div", {
2056
- className: _("owo-field", Dn.root, i),
2057
- ...o,
2180
+ className: _("owo-field", Nn.root, d),
2181
+ "data-disabled": a || void 0,
2182
+ "data-invalid": o || void 0,
2183
+ "data-required": i || void 0,
2184
+ ...h,
2058
2185
  children: [
2059
- /* @__PURE__ */ p("label", {
2060
- htmlFor: n,
2186
+ /* @__PURE__ */ m("label", {
2187
+ id: y,
2188
+ htmlFor: v,
2061
2189
  "data-part": "label",
2062
- className: _(Dn.label, a?.label),
2063
- children: e
2190
+ className: _(Nn.label, f?.label),
2191
+ children: [e, i && /* @__PURE__ */ p("span", {
2192
+ "data-part": "required",
2193
+ "aria-hidden": "true",
2194
+ className: _(Nn.required, f?.required),
2195
+ children: "*"
2196
+ })]
2064
2197
  }),
2065
- r,
2066
- t ? /* @__PURE__ */ p("span", {
2067
- "data-part": "help",
2068
- className: _(Dn.help, a?.help),
2198
+ t != null && /* @__PURE__ */ p("span", {
2199
+ id: b,
2200
+ "data-part": "description",
2201
+ className: _(Nn.description, f?.description),
2069
2202
  children: t
2070
- }) : null
2203
+ }),
2204
+ /* @__PURE__ */ p(ee.Provider, {
2205
+ value: w,
2206
+ children: u
2207
+ }),
2208
+ n != null && /* @__PURE__ */ p("span", {
2209
+ id: x,
2210
+ "data-part": "error",
2211
+ role: "alert",
2212
+ className: _(Nn.error, f?.error),
2213
+ children: n
2214
+ }),
2215
+ r != null && /* @__PURE__ */ p("span", {
2216
+ id: S,
2217
+ "data-part": "help",
2218
+ className: _(Nn.help, f?.help),
2219
+ children: r
2220
+ })
2071
2221
  ]
2072
2222
  });
2073
2223
  }
2074
- var kn = { root: "_root_1hqa8_1" };
2224
+ var Fn = { root: "_root_1hqa8_1" };
2075
2225
  //#endregion
2076
2226
  //#region src/components/IconButton.tsx
2077
- function An({ variant: e = "ghost", size: t = "md", label: n, icon: r, className: i, ...a }) {
2078
- let o = _("owo-icon-button", kn.root, i);
2227
+ function In({ variant: e = "ghost", size: t = "md", label: n, icon: r, className: i, ...a }) {
2228
+ let o = _("owo-icon-button", Fn.root, i);
2079
2229
  if ("href" in a && a.href) {
2080
2230
  let { href: i, ...s } = a;
2081
2231
  return /* @__PURE__ */ p("a", {
@@ -2101,37 +2251,44 @@ function An({ variant: e = "ghost", size: t = "md", label: n, icon: r, className
2101
2251
  children: r
2102
2252
  });
2103
2253
  }
2104
- var jn = { root: "_root_8zge1_1" };
2254
+ var Ln = { root: "_root_8zge1_1" };
2105
2255
  //#endregion
2106
2256
  //#region src/components/Input.tsx
2107
- function Mn(e) {
2108
- let { className: t, tone: n = "default", size: r = "md", ...i } = e;
2109
- return e.as === "textarea" ? /* @__PURE__ */ p("textarea", {
2110
- "data-tone": n,
2111
- "data-size": r,
2112
- className: _("owo-input", jn.root, t),
2113
- ...i
2114
- }) : /* @__PURE__ */ p("input", {
2115
- "data-tone": n,
2116
- "data-size": r,
2117
- className: _("owo-input", jn.root, t),
2118
- ...i
2257
+ function Rn({ className: e, tone: t = "default", size: n = "md", invalid: r, ...i }) {
2258
+ let a = B({
2259
+ id: i.id,
2260
+ disabled: i.disabled,
2261
+ required: i.required,
2262
+ invalid: r,
2263
+ "aria-describedby": i["aria-describedby"]
2264
+ });
2265
+ return /* @__PURE__ */ p("input", {
2266
+ ...i,
2267
+ id: a.id,
2268
+ disabled: a.disabled,
2269
+ required: a.required,
2270
+ "aria-describedby": a["aria-describedby"],
2271
+ "aria-invalid": a.invalid || void 0,
2272
+ "data-tone": t,
2273
+ "data-size": n,
2274
+ "data-invalid": a.invalid || void 0,
2275
+ className: _("owo-input", Ln.root, e)
2119
2276
  });
2120
2277
  }
2121
- var Nn = { root: "_root_1226l_1" };
2278
+ var zn = { root: "_root_1226l_1" };
2122
2279
  //#endregion
2123
2280
  //#region src/components/Panel.tsx
2124
- function Pn({ as: e = "section", variant: t = "default", padding: n = "none", className: r, children: i, ...a }) {
2281
+ function Bn({ as: e = "section", variant: t = "default", padding: n = "none", className: r, children: i, ...a }) {
2125
2282
  return /* @__PURE__ */ p(e, {
2126
2283
  "data-variant": t,
2127
2284
  "data-padding": n === "none" ? void 0 : n,
2128
2285
  "data-scope": "panel",
2129
- className: _("owo-panel", Nn.root, r),
2286
+ className: _("owo-panel", zn.root, r),
2130
2287
  ...a,
2131
2288
  children: i
2132
2289
  });
2133
2290
  }
2134
- function Fn({ className: e, children: t, ...n }) {
2291
+ function Vn({ className: e, children: t, ...n }) {
2135
2292
  return /* @__PURE__ */ p("div", {
2136
2293
  "data-scope": "panel",
2137
2294
  "data-part": "header",
@@ -2140,7 +2297,7 @@ function Fn({ className: e, children: t, ...n }) {
2140
2297
  children: t
2141
2298
  });
2142
2299
  }
2143
- function In({ className: e, children: t, ...n }) {
2300
+ function Hn({ className: e, children: t, ...n }) {
2144
2301
  return /* @__PURE__ */ p("div", {
2145
2302
  "data-scope": "panel",
2146
2303
  "data-part": "body",
@@ -2149,7 +2306,7 @@ function In({ className: e, children: t, ...n }) {
2149
2306
  children: t
2150
2307
  });
2151
2308
  }
2152
- function Ln({ className: e, children: t, ...n }) {
2309
+ function Un({ className: e, children: t, ...n }) {
2153
2310
  return /* @__PURE__ */ p("div", {
2154
2311
  "data-scope": "panel",
2155
2312
  "data-part": "footer",
@@ -2158,193 +2315,277 @@ function Ln({ className: e, children: t, ...n }) {
2158
2315
  children: t
2159
2316
  });
2160
2317
  }
2161
- var Rn = {
2162
- root: "_root_biv8a_1",
2163
- item: "_item_biv8a_41"
2318
+ var Wn = {
2319
+ root: "_root_c2l0v_1",
2320
+ item: "_item_c2l0v_41"
2164
2321
  };
2165
2322
  //#endregion
2166
2323
  //#region src/components/SegmentedControl.tsx
2167
- function zn({ value: e, onChange: t, options: n, size: r = "md", className: i, ariaLabel: a }) {
2168
- return /* @__PURE__ */ p("div", {
2169
- role: "tablist",
2170
- "aria-label": a,
2171
- "data-size": r,
2172
- className: _("owo-segmented-control", Rn.root, i),
2173
- children: n.map((n) => {
2174
- let r = n.value === e;
2324
+ function Gn({ value: e, defaultValue: t, onValueChange: n, options: r, size: i = "md", disabled: a, required: o, invalid: s, id: c, name: l, className: d, ariaLabel: f, "aria-describedby": h }) {
2325
+ let g = z(), [v, y] = V({
2326
+ value: e,
2327
+ defaultValue: t,
2328
+ onChange: n,
2329
+ fallback: r.find((e) => !e.disabled)?.value ?? r[0]?.value ?? ""
2330
+ }), b = B({
2331
+ id: c,
2332
+ disabled: a,
2333
+ required: o,
2334
+ invalid: s,
2335
+ "aria-describedby": h
2336
+ }), x = u([]), S = r.reduce((e, t, n) => (!t.disabled && !b.disabled && e.push(n), e), []), C = r.findIndex((e) => e.value === v), w = C >= 0 ? C : S[0] ?? -1;
2337
+ function T(e, t) {
2338
+ if (S.length === 0) return;
2339
+ let n = S.indexOf(e), i;
2340
+ t === "first" && (i = S[0]), t === "last" && (i = S[S.length - 1]), t === "next" && (i = n >= 0 ? S[(n + 1) % S.length] : S[0]), t === "prev" && (i = n >= 0 ? S[(n - 1 + S.length) % S.length] : S[S.length - 1]), i !== void 0 && (y(r[i].value), x.current[i]?.focus());
2341
+ }
2342
+ return /* @__PURE__ */ m("div", {
2343
+ role: "radiogroup",
2344
+ id: b.id,
2345
+ "aria-label": f,
2346
+ "aria-labelledby": f ? void 0 : g?.labelId,
2347
+ "aria-describedby": b["aria-describedby"],
2348
+ "aria-invalid": b.invalid || void 0,
2349
+ "aria-required": b.required || void 0,
2350
+ "data-size": i,
2351
+ "data-disabled": b.disabled || void 0,
2352
+ "data-invalid": b.invalid || void 0,
2353
+ className: _("owo-segmented-control", Wn.root, d),
2354
+ children: [r.map((e, t) => {
2355
+ let n = e.value === v, r = e.disabled || b.disabled;
2175
2356
  return /* @__PURE__ */ p("button", {
2357
+ ref: (e) => {
2358
+ x.current[t] = e;
2359
+ },
2176
2360
  type: "button",
2177
- role: "tab",
2178
- "aria-selected": r,
2179
- disabled: n.disabled,
2180
- "data-active": r ? "true" : void 0,
2181
- className: Rn.item,
2182
- onClick: () => t(n.value),
2183
- children: n.label
2184
- }, n.value);
2185
- })
2361
+ role: "radio",
2362
+ "aria-checked": n,
2363
+ disabled: r,
2364
+ tabIndex: r ? -1 : t === w ? 0 : -1,
2365
+ "data-disabled": r || void 0,
2366
+ "data-active": n ? "true" : void 0,
2367
+ className: Wn.item,
2368
+ onClick: () => y(e.value),
2369
+ onKeyDown: (e) => {
2370
+ if (!r) switch (e.key) {
2371
+ case "ArrowRight":
2372
+ case "ArrowDown":
2373
+ e.preventDefault(), T(t, "next");
2374
+ break;
2375
+ case "ArrowLeft":
2376
+ case "ArrowUp":
2377
+ e.preventDefault(), T(t, "prev");
2378
+ break;
2379
+ case "Home":
2380
+ e.preventDefault(), T(t, "first");
2381
+ break;
2382
+ case "End":
2383
+ e.preventDefault(), T(t, "last");
2384
+ break;
2385
+ }
2386
+ },
2387
+ children: e.label
2388
+ }, e.value);
2389
+ }), l != null && /* @__PURE__ */ p("input", {
2390
+ type: "hidden",
2391
+ name: l,
2392
+ value: v,
2393
+ disabled: b.disabled,
2394
+ "aria-hidden": "true"
2395
+ })]
2186
2396
  });
2187
2397
  }
2188
- var Bn = {
2189
- root: "_root_pixr0_1",
2190
- valueText: "_valueText_pixr0_91",
2191
- placeholder: "_placeholder_pixr0_97"
2398
+ var Kn = {
2399
+ root: "_root_1kzdq_1",
2400
+ valueText: "_valueText_1kzdq_96",
2401
+ placeholder: "_placeholder_1kzdq_102"
2192
2402
  };
2193
2403
  //#endregion
2194
2404
  //#region src/components/Select.tsx
2195
- function Vn({ value: e, onChange: t, options: n, placeholder: r = "Select…", size: a = "md", tone: c = "default", disabled: f = !1, className: h, ariaLabel: g, renderValue: v, renderOption: y, classNames: b }) {
2196
- let [x, S] = d(!1), [C, w] = d(-1), T = u(null), E = u(null), D = s(), O = n.find((t) => t.value === e), k = l(() => n.reduce((e, t, n) => (t.disabled || e.push(n), e), []), [n]), A = i(() => {
2197
- if (f || n.length === 0) return;
2198
- S(!0);
2199
- let t = n.findIndex((t) => t.value === e);
2200
- w(t >= 0 ? t : k[0] ?? -1);
2405
+ function qn(e) {
2406
+ return e.textValue ? e.textValue : typeof e.label == "string" ? e.label : "";
2407
+ }
2408
+ function Jn({ value: e, defaultValue: t, onValueChange: n, options: r, placeholder: a = "Select…", size: c = "md", tone: f = "default", disabled: h, required: g, invalid: v, id: y, name: b, className: x, ariaLabel: S, "aria-describedby": C, renderValue: w, renderOption: T, classNames: E }) {
2409
+ let [D, O] = V({
2410
+ value: e,
2411
+ defaultValue: t,
2412
+ onChange: (e) => {
2413
+ e !== "" && n?.(e);
2414
+ },
2415
+ fallback: ""
2416
+ }), k = B({
2417
+ id: y,
2418
+ disabled: h,
2419
+ required: g,
2420
+ invalid: v,
2421
+ "aria-describedby": C
2422
+ }), A = k.disabled, [j, M] = d(!1), [N, P] = d(-1), F = u(null), I = u(null), L = s(), R = r.find((e) => e.value === D), ee = R ? qn(R) : "", z = l(() => r.reduce((e, t, n) => (t.disabled || e.push(n), e), []), [r]), H = i(() => {
2423
+ if (A || r.length === 0) return;
2424
+ M(!0);
2425
+ let e = r.findIndex((e) => e.value === D);
2426
+ P(e >= 0 ? e : z[0] ?? -1);
2201
2427
  }, [
2202
- f,
2203
- n,
2204
- e,
2205
- k
2206
- ]), j = i(() => {
2207
- S(!1), w(-1);
2208
- }, []), M = i((e) => {
2209
- e.disabled || (t(e.value), j());
2210
- }, [t, j]);
2428
+ A,
2429
+ r,
2430
+ D,
2431
+ z
2432
+ ]), U = i(() => {
2433
+ M(!1), P(-1);
2434
+ }, []), W = i((e) => {
2435
+ e.disabled || (O(e.value), U());
2436
+ }, [O, U]);
2211
2437
  o(() => {
2212
- if (!x) return;
2438
+ if (!j) return;
2213
2439
  function e(e) {
2214
- T.current && !T.current.contains(e.target) && j();
2440
+ F.current && !F.current.contains(e.target) && U();
2215
2441
  }
2216
2442
  return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
2217
- }, [x, j]), o(() => {
2218
- !x || C < 0 || (E.current?.children[C])?.scrollIntoView({ block: "nearest" });
2219
- }, [x, C]);
2220
- function N(e) {
2221
- if (!f) switch (e.key) {
2443
+ }, [j, U]), o(() => {
2444
+ !j || N < 0 || (I.current?.children[N])?.scrollIntoView?.({ block: "nearest" });
2445
+ }, [j, N]);
2446
+ function te(e) {
2447
+ if (!A) switch (e.key) {
2222
2448
  case "Enter":
2223
2449
  case " ":
2224
- e.preventDefault(), x ? C >= 0 && n[C] && !n[C].disabled && M(n[C]) : A();
2450
+ e.preventDefault(), j ? N >= 0 && r[N] && !r[N].disabled && W(r[N]) : H();
2225
2451
  break;
2226
2452
  case "ArrowDown":
2227
- if (e.preventDefault(), !x) A();
2453
+ if (e.preventDefault(), !j) H();
2228
2454
  else {
2229
- let e = k[k.indexOf(C) + 1];
2230
- e !== void 0 && w(e);
2455
+ let e = z[z.indexOf(N) + 1];
2456
+ e !== void 0 && P(e);
2231
2457
  }
2232
2458
  break;
2233
2459
  case "ArrowUp":
2234
- if (e.preventDefault(), !x) A();
2460
+ if (e.preventDefault(), !j) H();
2235
2461
  else {
2236
- let e = k[k.indexOf(C) - 1];
2237
- e !== void 0 && w(e);
2462
+ let e = z[z.indexOf(N) - 1];
2463
+ e !== void 0 && P(e);
2238
2464
  }
2239
2465
  break;
2240
2466
  case "Escape":
2241
- x && (e.preventDefault(), j());
2467
+ j && (e.preventDefault(), U());
2242
2468
  break;
2243
2469
  case "Tab":
2244
- x && j();
2470
+ j && U();
2245
2471
  break;
2246
2472
  }
2247
2473
  }
2248
- let ee = e !== "" && O, P = v ? v({
2249
- open: x,
2250
- placeholder: r,
2251
- selectedOption: O
2474
+ let G = D !== "" && R, ne = G ? R.label : null, re = w ? w({
2475
+ open: j,
2476
+ placeholder: a,
2477
+ selectedOption: R
2252
2478
  }) : /* @__PURE__ */ p("span", {
2253
- className: _(Bn.valueText, !ee && Bn.placeholder),
2254
- children: ee ? O.label : r
2479
+ className: _(Kn.valueText, !G && Kn.placeholder),
2480
+ children: G ? ne : a
2255
2481
  });
2256
2482
  return /* @__PURE__ */ m("div", {
2257
- ref: T,
2258
- "data-state": x ? "open" : "closed",
2259
- "data-disabled": f || void 0,
2260
- "data-size": a,
2261
- "data-tone": c,
2483
+ ref: F,
2484
+ "data-state": j ? "open" : "closed",
2485
+ "data-disabled": A || void 0,
2486
+ "data-invalid": k.invalid || void 0,
2487
+ "data-size": c,
2488
+ "data-tone": f,
2262
2489
  "data-scope": "select",
2263
- className: _("owo-select", Bn.root, h),
2264
- children: [/* @__PURE__ */ m("button", {
2265
- type: "button",
2266
- role: "combobox",
2267
- "aria-expanded": x,
2268
- "aria-haspopup": "listbox",
2269
- "aria-controls": D,
2270
- "aria-label": g,
2271
- "aria-activedescendant": x && C >= 0 ? `${D}-opt-${C}` : void 0,
2272
- "data-state": x ? "open" : "closed",
2273
- "data-disabled": f || void 0,
2274
- "data-tone": c,
2275
- "data-size": a,
2276
- "data-has-value": ee || void 0,
2277
- "data-scope": "select",
2278
- "data-part": "trigger",
2279
- disabled: f,
2280
- className: _(b?.trigger),
2281
- onClick: () => x ? j() : A(),
2282
- onKeyDown: N,
2283
- children: [P, /* @__PURE__ */ p("svg", {
2284
- "aria-hidden": "true",
2285
- "data-state": x ? "open" : "closed",
2490
+ className: _("owo-select", Kn.root, x),
2491
+ children: [
2492
+ /* @__PURE__ */ m("button", {
2493
+ type: "button",
2494
+ role: "combobox",
2495
+ id: k.id,
2496
+ "aria-expanded": j,
2497
+ "aria-haspopup": "listbox",
2498
+ "aria-controls": L,
2499
+ "aria-label": S,
2500
+ "aria-describedby": k["aria-describedby"],
2501
+ "aria-invalid": k.invalid || void 0,
2502
+ "aria-required": k.required || void 0,
2503
+ "aria-activedescendant": j && N >= 0 ? `${L}-opt-${N}` : void 0,
2504
+ "data-state": j ? "open" : "closed",
2505
+ "data-disabled": A || void 0,
2506
+ "data-tone": f,
2507
+ "data-size": c,
2508
+ "data-has-value": G || void 0,
2286
2509
  "data-scope": "select",
2287
- "data-part": "chevron",
2288
- className: _(b?.chevron),
2289
- viewBox: "0 0 16 16",
2290
- fill: "none",
2291
- stroke: "currentColor",
2292
- strokeWidth: "2",
2293
- strokeLinecap: "round",
2294
- strokeLinejoin: "round",
2295
- children: /* @__PURE__ */ p("path", { d: "M4 6l4 4 4-4" })
2296
- })]
2297
- }), x && /* @__PURE__ */ p("ul", {
2298
- ref: E,
2299
- id: D,
2300
- role: "listbox",
2301
- "aria-label": g,
2302
- "data-state": "open",
2303
- "data-size": a,
2304
- "data-scope": "select",
2305
- "data-part": "dropdown",
2306
- className: _(b?.dropdown),
2307
- children: n.map((t, n) => /* @__PURE__ */ p("li", {
2308
- id: `${D}-opt-${n}`,
2309
- role: "option",
2310
- "aria-selected": t.value === e,
2311
- "aria-disabled": t.disabled || void 0,
2312
- "data-state": t.value === e ? "selected" : n === C ? "highlighted" : "idle",
2313
- "data-focused": n === C || void 0,
2314
- "data-selected": t.value === e || void 0,
2315
- "data-disabled": t.disabled || void 0,
2316
- "data-highlighted": n === C || void 0,
2510
+ "data-part": "trigger",
2511
+ disabled: A,
2512
+ className: _(E?.trigger),
2513
+ onClick: () => j ? U() : H(),
2514
+ onKeyDown: te,
2515
+ children: [re, /* @__PURE__ */ p("svg", {
2516
+ "aria-hidden": "true",
2517
+ "data-state": j ? "open" : "closed",
2518
+ "data-scope": "select",
2519
+ "data-part": "chevron",
2520
+ className: _(E?.chevron),
2521
+ viewBox: "0 0 16 16",
2522
+ fill: "none",
2523
+ stroke: "currentColor",
2524
+ strokeWidth: "2",
2525
+ strokeLinecap: "round",
2526
+ strokeLinejoin: "round",
2527
+ children: /* @__PURE__ */ p("path", { d: "M4 6l4 4 4-4" })
2528
+ })]
2529
+ }),
2530
+ j && /* @__PURE__ */ p("ul", {
2531
+ ref: I,
2532
+ id: L,
2533
+ role: "listbox",
2534
+ "aria-label": S ?? (ee || a),
2535
+ "data-state": "open",
2536
+ "data-size": c,
2317
2537
  "data-scope": "select",
2318
- "data-part": "option",
2319
- className: _(b?.option),
2320
- onClick: () => M(t),
2321
- onMouseEnter: () => !t.disabled && w(n),
2322
- children: y ? y({
2323
- option: t,
2324
- index: n,
2325
- selected: t.value === e,
2326
- highlighted: n === C
2327
- }) : t.label
2328
- }, t.value))
2329
- })]
2538
+ "data-part": "dropdown",
2539
+ className: _(E?.dropdown),
2540
+ children: r.map((e, t) => /* @__PURE__ */ p("li", {
2541
+ id: `${L}-opt-${t}`,
2542
+ role: "option",
2543
+ "aria-selected": e.value === D,
2544
+ "aria-disabled": e.disabled || void 0,
2545
+ "data-state": e.value === D ? "selected" : t === N ? "highlighted" : "idle",
2546
+ "data-focused": t === N || void 0,
2547
+ "data-selected": e.value === D || void 0,
2548
+ "data-disabled": e.disabled || void 0,
2549
+ "data-highlighted": t === N || void 0,
2550
+ "data-scope": "select",
2551
+ "data-part": "option",
2552
+ className: _(E?.option),
2553
+ onClick: () => W(e),
2554
+ onMouseEnter: () => !e.disabled && P(t),
2555
+ children: T ? T({
2556
+ option: e,
2557
+ index: t,
2558
+ selected: e.value === D,
2559
+ highlighted: t === N
2560
+ }) : e.label
2561
+ }, e.value))
2562
+ }),
2563
+ b != null && /* @__PURE__ */ p("input", {
2564
+ type: "hidden",
2565
+ name: b,
2566
+ value: D,
2567
+ disabled: A,
2568
+ "aria-hidden": "true"
2569
+ })
2570
+ ]
2330
2571
  });
2331
2572
  }
2332
- var Hn = {
2573
+ var Yn = {
2333
2574
  root: "_root_1sshx_1",
2334
2575
  "owo-skeleton-breathe": "_owo-skeleton-breathe_1sshx_1",
2335
2576
  "owo-skeleton-scan": "_owo-skeleton-scan_1sshx_1"
2336
- }, Un = {
2577
+ }, Xn = {
2337
2578
  slow: "4s",
2338
2579
  medium: "3s",
2339
2580
  fast: "2s"
2340
2581
  };
2341
- function Wn({ className: e, animation: t = "scan", tone: n = "default", speed: r = "medium", style: i, ...a }) {
2582
+ function Zn({ className: e, animation: t = "scan", tone: n = "default", speed: r = "medium", style: i, ...a }) {
2342
2583
  let o = n === "warm" ? "emphasis" : n, s = {
2343
2584
  ...i,
2344
- "--_owo-skeleton-scan-duration": Un[r]
2585
+ "--_owo-skeleton-scan-duration": Xn[r]
2345
2586
  };
2346
2587
  return /* @__PURE__ */ p("div", {
2347
- className: _("owo-skeleton", Hn.root, e),
2588
+ className: _("owo-skeleton", Yn.root, e),
2348
2589
  "data-animation": t,
2349
2590
  "data-tone": o,
2350
2591
  "aria-hidden": "true",
@@ -2363,7 +2604,7 @@ var $ = {
2363
2604
  };
2364
2605
  //#endregion
2365
2606
  //#region src/components/StatusNotice.tsx
2366
- function Gn({ tone: e = "neutral", layout: t = "horizontal", icon: n, title: r, description: i, action: a, className: o, children: s, classNames: c, ...l }) {
2607
+ function Qn({ tone: e = "neutral", layout: t = "horizontal", icon: n, title: r, description: i, action: a, className: o, children: s, classNames: c, ...l }) {
2367
2608
  if (t === "vertical") {
2368
2609
  let t = n || r || i || a;
2369
2610
  return /* @__PURE__ */ p("div", {
@@ -2427,49 +2668,69 @@ function Gn({ tone: e = "neutral", layout: t = "horizontal", icon: n, title: r,
2427
2668
  }) : null]
2428
2669
  });
2429
2670
  }
2430
- var Kn = {
2431
- root: "_root_1qzgu_1",
2432
- thumb: "_thumb_1qzgu_81"
2671
+ var $n = {
2672
+ root: "_root_91dlh_1",
2673
+ thumb: "_thumb_91dlh_81"
2433
2674
  };
2434
2675
  //#endregion
2435
2676
  //#region src/components/Switch.tsx
2436
- function qn({ checked: e, onChange: t, size: n = "md", disabled: r = !1, className: i, ariaLabel: a }) {
2437
- return /* @__PURE__ */ p("button", {
2677
+ function er({ checked: e, defaultChecked: t, onCheckedChange: n, size: r = "md", disabled: i, required: a, invalid: o, id: s, name: c, className: l, ariaLabel: u, "aria-describedby": d }) {
2678
+ let [f, h] = V({
2679
+ value: e,
2680
+ defaultValue: t,
2681
+ onChange: n,
2682
+ fallback: !1
2683
+ }), g = B({
2684
+ id: s,
2685
+ disabled: i,
2686
+ required: a,
2687
+ invalid: o,
2688
+ "aria-describedby": d
2689
+ });
2690
+ return /* @__PURE__ */ m("button", {
2438
2691
  type: "button",
2439
2692
  role: "switch",
2440
- "aria-checked": e,
2441
- "aria-label": a,
2442
- disabled: r,
2443
- "data-size": n,
2444
- className: _("owo-switch", Kn.root, i),
2445
- onClick: () => t(!e),
2446
- children: /* @__PURE__ */ p("span", {
2693
+ id: g.id,
2694
+ "aria-checked": f,
2695
+ "aria-label": u,
2696
+ "aria-describedby": g["aria-describedby"],
2697
+ "aria-invalid": g.invalid || void 0,
2698
+ "aria-required": g.required || void 0,
2699
+ disabled: g.disabled,
2700
+ "data-size": r,
2701
+ "data-invalid": g.invalid || void 0,
2702
+ className: _("owo-switch", $n.root, l),
2703
+ onClick: () => h(!f),
2704
+ children: [/* @__PURE__ */ p("span", {
2447
2705
  "aria-hidden": "true",
2448
- className: Kn.thumb
2449
- })
2706
+ className: $n.thumb
2707
+ }), c != null && /* @__PURE__ */ p("input", {
2708
+ type: "checkbox",
2709
+ name: c,
2710
+ checked: f,
2711
+ disabled: g.disabled,
2712
+ hidden: !0,
2713
+ readOnly: !0,
2714
+ tabIndex: -1,
2715
+ "aria-hidden": "true"
2716
+ })]
2450
2717
  });
2451
2718
  }
2452
- var Jn = { root: "_root_1dxq8_1" }, Yn = n(null);
2453
- function Xn(e) {
2454
- let t = a(Yn);
2719
+ var tr = { root: "_root_1dxq8_1" }, nr = n(null);
2720
+ function rr(e) {
2721
+ let t = a(nr);
2455
2722
  if (!t) throw Error(`${e} must be used within Tabs.Root`);
2456
2723
  return t;
2457
2724
  }
2458
- function Zn(e) {
2725
+ function ir(e) {
2459
2726
  return e.replace(/[^a-zA-Z0-9_-]+/g, "-");
2460
2727
  }
2461
- function Qn({ value: e, defaultValue: t, onValueChange: n }) {
2462
- let [r, i] = d(t ?? ""), a = e !== void 0, o = a ? e : r;
2463
- function s(e) {
2464
- a || i(e), n?.(e);
2465
- }
2466
- return [o, s];
2467
- }
2468
- function $n({ children: e, value: t, defaultValue: n, onValueChange: r, className: i, ...a }) {
2469
- let [o, c] = Qn({
2728
+ function ar({ children: e, value: t, defaultValue: n, onValueChange: r, className: i, ...a }) {
2729
+ let [o, c] = V({
2470
2730
  value: t,
2471
2731
  defaultValue: n,
2472
- onValueChange: r
2732
+ onChange: r,
2733
+ fallback: ""
2473
2734
  }), u = s(), d = l(() => ({
2474
2735
  value: o,
2475
2736
  setValue: c,
@@ -2479,17 +2740,17 @@ function $n({ children: e, value: t, defaultValue: n, onValueChange: r, classNam
2479
2740
  o,
2480
2741
  c
2481
2742
  ]);
2482
- return /* @__PURE__ */ p(Yn.Provider, {
2743
+ return /* @__PURE__ */ p(nr.Provider, {
2483
2744
  value: d,
2484
2745
  children: /* @__PURE__ */ p("div", {
2485
2746
  "data-scope": "tabs",
2486
- className: _("owo-tabs", Jn.root, i),
2747
+ className: _("owo-tabs", tr.root, i),
2487
2748
  ...a,
2488
2749
  children: e
2489
2750
  })
2490
2751
  });
2491
2752
  }
2492
- function er({ children: e, className: t, ariaLabel: n, ...r }) {
2753
+ function or({ children: e, className: t, ariaLabel: n, ...r }) {
2493
2754
  return /* @__PURE__ */ p("div", {
2494
2755
  role: "tablist",
2495
2756
  "aria-label": n,
@@ -2500,8 +2761,8 @@ function er({ children: e, className: t, ariaLabel: n, ...r }) {
2500
2761
  children: e
2501
2762
  });
2502
2763
  }
2503
- function tr({ children: e, className: t, value: n, disabled: r, onClick: i, onKeyDown: a, ...o }) {
2504
- let { value: s, setValue: c, baseId: l } = Xn("Tabs.Trigger"), u = s === n, d = `${l}-trigger-${Zn(n)}`, f = `${l}-panel-${Zn(n)}`;
2764
+ function sr({ children: e, className: t, value: n, disabled: r, onClick: i, onKeyDown: a, ...o }) {
2765
+ let { value: s, setValue: c, baseId: l } = rr("Tabs.Trigger"), u = s === n, d = `${l}-trigger-${ir(n)}`, f = `${l}-panel-${ir(n)}`;
2505
2766
  function m(e, t) {
2506
2767
  let n = e.closest("[role=\"tablist\"]");
2507
2768
  if (!n) return;
@@ -2547,8 +2808,8 @@ function tr({ children: e, className: t, value: n, disabled: r, onClick: i, onKe
2547
2808
  children: e
2548
2809
  });
2549
2810
  }
2550
- function nr({ children: e, className: t, value: n, ...r }) {
2551
- let { value: i, baseId: a } = Xn("Tabs.Content"), o = i === n, s = `${a}-trigger-${Zn(n)}`, c = `${a}-panel-${Zn(n)}`;
2811
+ function cr({ children: e, className: t, value: n, ...r }) {
2812
+ let { value: i, baseId: a } = rr("Tabs.Content"), o = i === n, s = `${a}-trigger-${ir(n)}`, c = `${a}-panel-${ir(n)}`;
2552
2813
  return o ? /* @__PURE__ */ p("div", {
2553
2814
  id: c,
2554
2815
  role: "tabpanel",
@@ -2561,61 +2822,73 @@ function nr({ children: e, className: t, value: n, ...r }) {
2561
2822
  children: e
2562
2823
  }) : null;
2563
2824
  }
2564
- var rr = Object.assign($n, {
2565
- Root: $n,
2566
- List: er,
2567
- Trigger: tr,
2568
- Content: nr
2569
- }), ir = { root: "_root_17j1y_1" };
2825
+ var lr = Object.assign(ar, {
2826
+ Root: ar,
2827
+ List: or,
2828
+ Trigger: sr,
2829
+ Content: cr
2830
+ }), ur = { root: "_root_17j1y_1" };
2570
2831
  //#endregion
2571
2832
  //#region src/components/Textarea.tsx
2572
- function ar({ className: e, tone: t = "default", size: n = "md", resize: r = "vertical", autoResize: a = !1, style: s, onInput: c, rows: l = 3, ...d }) {
2573
- let f = u(null), m = c, h = i(() => {
2574
- if (!a || !f.current) return;
2575
- let e = f.current;
2833
+ function dr({ className: e, tone: t = "default", size: n = "md", resize: r = "vertical", autoResize: a = !1, invalid: s, style: c, onInput: l, rows: d = 3, ...f }) {
2834
+ let m = B({
2835
+ id: f.id,
2836
+ disabled: f.disabled,
2837
+ required: f.required,
2838
+ invalid: s,
2839
+ "aria-describedby": f["aria-describedby"]
2840
+ }), h = u(null), g = l, v = i(() => {
2841
+ if (!a || !h.current) return;
2842
+ let e = h.current;
2576
2843
  e.style.height = "auto", e.style.height = `${e.scrollHeight}px`;
2577
2844
  }, [a]);
2578
2845
  o(() => {
2579
- h();
2846
+ v();
2580
2847
  }, [
2581
- h,
2582
- d.value,
2583
- d.defaultValue,
2584
- l
2848
+ v,
2849
+ f.value,
2850
+ f.defaultValue,
2851
+ d
2585
2852
  ]);
2586
- function g(e) {
2587
- h(), m?.(e);
2853
+ function y(e) {
2854
+ v(), g?.(e);
2588
2855
  }
2589
- let v = {
2590
- ...s,
2856
+ let b = {
2857
+ ...c,
2591
2858
  resize: a ? "none" : r
2592
2859
  };
2593
2860
  return /* @__PURE__ */ p("textarea", {
2594
- ...d,
2595
- ref: f,
2596
- rows: l,
2861
+ ...f,
2862
+ ref: h,
2863
+ id: m.id,
2864
+ disabled: m.disabled,
2865
+ required: m.required,
2866
+ "aria-describedby": m["aria-describedby"],
2867
+ "aria-invalid": m.invalid || void 0,
2868
+ rows: d,
2597
2869
  "data-tone": t,
2598
2870
  "data-size": n,
2871
+ "data-invalid": m.invalid || void 0,
2599
2872
  "data-auto-resize": a || void 0,
2600
- className: _("owo-input", jn.root, "owo-textarea", ir.root, e),
2601
- style: v,
2602
- onInput: g
2873
+ className: _("owo-input", Ln.root, "owo-textarea", ur.root, e),
2874
+ style: b,
2875
+ onInput: y
2603
2876
  });
2604
2877
  }
2605
2878
  //#endregion
2606
2879
  //#region src/styles/ui/toast.module.css
2607
- var or = "_container_73rls_1", sr = "_toast_73rls_12", cr = "_toastDefault_73rls_32", lr = {
2608
- container: or,
2609
- toast: sr,
2880
+ var fr = "_container_73rls_1", pr = "_toast_73rls_12", mr = "_toastDefault_73rls_32", hr = {
2881
+ container: fr,
2882
+ toast: pr,
2610
2883
  "toast-in": "_toast-in_73rls_1",
2611
- toastDefault: cr
2612
- }, ur = n(null), dr = 5, fr = 4e3;
2613
- function pr() {
2614
- let e = a(ur);
2884
+ toastDefault: mr
2885
+ }, gr = n(null), _r = 5, vr = 4e3;
2886
+ function yr() {
2887
+ let e = a(gr);
2615
2888
  if (!e) throw Error("useToast must be used within <ToastProvider>");
2616
2889
  return e;
2617
2890
  }
2618
- function mr({ tone: e }) {
2891
+ function br({ tone: e }) {
2619
2892
  let t = {
2620
2893
  width: 16,
2621
2894
  height: 16,
@@ -2657,18 +2930,18 @@ function mr({ tone: e }) {
2657
2930
  });
2658
2931
  }
2659
2932
  }
2660
- function hr(e, t) {
2933
+ function xr(e, t) {
2661
2934
  return typeof e == "string" ? {
2662
2935
  message: e,
2663
- duration: t ?? fr
2936
+ duration: t ?? vr
2664
2937
  } : {
2665
2938
  title: e.title,
2666
2939
  message: e.message,
2667
- duration: e.duration ?? t ?? fr
2940
+ duration: e.duration ?? t ?? vr
2668
2941
  };
2669
2942
  }
2670
- function gr({ item: e, onDismiss: t, renderToast: n, classNames: r }) {
2671
- let i = () => t(e.id), a = /* @__PURE__ */ p(mr, { tone: e.tone });
2943
+ function Sr({ item: e, onDismiss: t, renderToast: n, classNames: r }) {
2944
+ let i = () => t(e.id), a = /* @__PURE__ */ p(br, { tone: e.tone });
2672
2945
  return n ? /* @__PURE__ */ p("div", {
2673
2946
  role: "status",
2674
2947
  "aria-live": "polite",
@@ -2676,7 +2949,7 @@ function gr({ item: e, onDismiss: t, renderToast: n, classNames: r }) {
2676
2949
  "data-tone": e.tone,
2677
2950
  "data-scope": "toast",
2678
2951
  "data-part": "toast",
2679
- className: _("owo-toast", lr.toast, r?.toast),
2952
+ className: _("owo-toast", hr.toast, r?.toast),
2680
2953
  children: n({
2681
2954
  item: e,
2682
2955
  dismiss: i,
@@ -2689,7 +2962,7 @@ function gr({ item: e, onDismiss: t, renderToast: n, classNames: r }) {
2689
2962
  "data-tone": e.tone,
2690
2963
  "data-scope": "toast",
2691
2964
  "data-part": "toast",
2692
- className: _("owo-toast", lr.toast, lr.toastDefault, r?.toast),
2965
+ className: _("owo-toast", hr.toast, hr.toastDefault, r?.toast),
2693
2966
  children: [
2694
2967
  /* @__PURE__ */ p("span", {
2695
2968
  "data-scope": "toast",
@@ -2735,7 +3008,7 @@ function gr({ item: e, onDismiss: t, renderToast: n, classNames: r }) {
2735
3008
  ]
2736
3009
  });
2737
3010
  }
2738
- function _r({ children: e, renderToast: t, classNames: n }) {
3011
+ function Cr({ children: e, renderToast: t, classNames: n }) {
2739
3012
  let [r, a] = d([]), o = u(0), s = u(/* @__PURE__ */ new Map()), c = i((e) => {
2740
3013
  let t = s.current.get(e);
2741
3014
  t && clearTimeout(t), s.current.delete(e), a((t) => t.filter((t) => t.id !== e));
@@ -2743,17 +3016,17 @@ function _r({ children: e, renderToast: t, classNames: n }) {
2743
3016
  let r = o.current++, i = {
2744
3017
  id: r,
2745
3018
  tone: e,
2746
- ...hr(t, n)
3019
+ ...xr(t, n)
2747
3020
  };
2748
3021
  a((e) => {
2749
3022
  let t = [...e, i];
2750
- if (t.length > dr) {
2751
- let e = t.slice(0, t.length - dr);
3023
+ if (t.length > _r) {
3024
+ let e = t.slice(0, t.length - _r);
2752
3025
  for (let t of e) {
2753
3026
  let e = s.current.get(t.id);
2754
3027
  e && clearTimeout(e), s.current.delete(t.id);
2755
3028
  }
2756
- return t.slice(-dr);
3029
+ return t.slice(-_r);
2757
3030
  }
2758
3031
  return t;
2759
3032
  }), i.duration > 0 && s.current.set(r, setTimeout(() => c(r), i.duration));
@@ -2763,15 +3036,15 @@ function _r({ children: e, renderToast: t, classNames: n }) {
2763
3036
  danger: (e, t) => f("danger", e, t),
2764
3037
  info: (e, t) => f("info", e, t)
2765
3038
  }), [f]);
2766
- return /* @__PURE__ */ m(ur.Provider, {
3039
+ return /* @__PURE__ */ m(gr.Provider, {
2767
3040
  value: h,
2768
3041
  children: [e, /* @__PURE__ */ p("div", {
2769
3042
  "aria-label": "Notifications",
2770
3043
  "data-state": r.length > 0 ? "open" : "closed",
2771
3044
  "data-scope": "toast",
2772
3045
  "data-part": "container",
2773
- className: _("owo-toast-container", lr.container, n?.container),
2774
- children: r.map((e) => /* @__PURE__ */ p(gr, {
3046
+ className: _("owo-toast-container", hr.container, n?.container),
3047
+ children: r.map((e) => /* @__PURE__ */ p(Sr, {
2775
3048
  item: e,
2776
3049
  onDismiss: c,
2777
3050
  renderToast: t,
@@ -2780,49 +3053,49 @@ function _r({ children: e, renderToast: t, classNames: n }) {
2780
3053
  })]
2781
3054
  });
2782
3055
  }
2783
- var vr = {
3056
+ var wr = {
2784
3057
  trigger: "_trigger_xunrw_1",
2785
3058
  content: "_content_xunrw_5",
2786
3059
  "tooltip-in": "_tooltip-in_xunrw_1"
2787
- }, yr = 6, br = 8, xr = 4;
2788
- function Sr(e) {
3060
+ }, Tr = 6, Er = 8, Dr = 4;
3061
+ function Or(e) {
2789
3062
  return e.split("-")[0];
2790
3063
  }
2791
- var Cr = {
3064
+ var kr = {
2792
3065
  top: "",
2793
3066
  bottom: "rotate(180deg)",
2794
3067
  left: "rotate(-90deg)",
2795
3068
  right: "rotate(90deg)"
2796
3069
  };
2797
- function wr({ content: e, placement: t = "top", density: n = "default", showDelay: r = 300, hideDelay: a = 150, arrow: l = !0, renderArrow: g, className: v, children: y, classNames: b }) {
2798
- let [x, S] = d(!1), [C, w] = d(null), [T, E] = d(t), [D, O] = d({}), k = u(null), A = u(null), j = u(null), M = u(void 0), N = u(void 0), ee = s(), P = i(() => {
3070
+ function Ar({ content: e, placement: t = "top", density: n = "default", showDelay: r = 300, hideDelay: a = 150, arrow: l = !0, renderArrow: g, className: v, children: y, classNames: b }) {
3071
+ let [x, S] = d(!1), [C, w] = d(null), [T, E] = d(t), [D, O] = d({}), k = u(null), A = u(null), j = u(null), M = u(void 0), N = u(void 0), P = s(), F = i(() => {
2799
3072
  clearTimeout(M.current), clearTimeout(N.current);
2800
- }, []), F = i(() => {
2801
- P(), M.current = setTimeout(() => S(!0), r);
2802
- }, [P, r]), I = i(() => {
2803
- P(), S(!0);
2804
- }, [P]), L = i(() => {
2805
- P(), N.current = setTimeout(() => S(!1), a);
2806
- }, [P, a]), R = i((e) => {
3073
+ }, []), I = i(() => {
3074
+ F(), M.current = setTimeout(() => S(!0), r);
3075
+ }, [F, r]), L = i(() => {
3076
+ F(), S(!0);
3077
+ }, [F]), R = i(() => {
3078
+ F(), N.current = setTimeout(() => S(!1), a);
3079
+ }, [F, a]), ee = i((e) => {
2807
3080
  if (e.target === k.current) {
2808
- F();
3081
+ I();
2809
3082
  return;
2810
3083
  }
2811
- I();
2812
- }, [F, I]), te = i((e) => {
2813
- e.pointerType !== "mouse" && I();
2814
- }, [I]), ne = i((e) => {
3084
+ L();
3085
+ }, [I, L]), z = i((e) => {
3086
+ e.pointerType !== "mouse" && L();
3087
+ }, [L]), B = i((e) => {
2815
3088
  e.key === "Escape" && x && S(!1);
2816
3089
  }, [x]);
2817
3090
  c(() => {
2818
3091
  if (!x || !k.current || !A.current) return;
2819
3092
  let e = [
2820
- Gt(l ? br + yr : br),
2821
- qt({ padding: xr }),
2822
- Kt({ padding: xr })
3093
+ Zt(l ? Er + Tr : Er),
3094
+ $t({ padding: Dr }),
3095
+ Qt({ padding: Dr })
2823
3096
  ];
2824
- return l && j.current && e.push(Jt({ element: j.current })), Wt(k.current, A.current, () => {
2825
- !k.current || !A.current || Yt(k.current, A.current, {
3097
+ return l && j.current && e.push(en({ element: j.current })), Xt(k.current, A.current, () => {
3098
+ !k.current || !A.current || tn(k.current, A.current, {
2826
3099
  placement: t,
2827
3100
  strategy: "fixed",
2828
3101
  middleware: e
@@ -2830,7 +3103,7 @@ function wr({ content: e, placement: t = "top", density: n = "default", showDela
2830
3103
  w({
2831
3104
  top: t,
2832
3105
  left: e
2833
- }), E(Sr(n)), r.arrow && O({
3106
+ }), E(Or(n)), r.arrow && O({
2834
3107
  x: r.arrow.x,
2835
3108
  y: r.arrow.y
2836
3109
  });
@@ -2841,47 +3114,47 @@ function wr({ content: e, placement: t = "top", density: n = "default", showDela
2841
3114
  t,
2842
3115
  l
2843
3116
  ]), o(() => {
2844
- if (x) return document.addEventListener("keydown", ne), () => document.removeEventListener("keydown", ne);
2845
- }, [x, ne]), o(() => P, [P]);
2846
- let z = { position: "absolute" }, B = T;
2847
- return B === "top" || B === "bottom" ? (z.left = D.x ?? 0, z[B === "top" ? "bottom" : "top"] = -yr, z.transform = Cr[B] || void 0) : (z.top = D.y ?? 0, z[B === "left" ? "right" : "left"] = -yr, z.transform = Cr[B]), /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("span", {
3117
+ if (x) return document.addEventListener("keydown", B), () => document.removeEventListener("keydown", B);
3118
+ }, [x, B]), o(() => F, [F]);
3119
+ let V = { position: "absolute" }, H = T;
3120
+ return H === "top" || H === "bottom" ? (V.left = D.x ?? 0, V[H === "top" ? "bottom" : "top"] = -Tr, V.transform = kr[H] || void 0) : (V.top = D.y ?? 0, V[H === "left" ? "right" : "left"] = -Tr, V.transform = kr[H]), /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("span", {
2848
3121
  ref: k,
2849
3122
  "data-state": x ? "open" : "closed",
2850
3123
  "data-scope": "tooltip",
2851
3124
  "data-part": "trigger",
2852
- className: _("owo-tooltip-trigger", vr.trigger, b?.trigger),
2853
- onMouseEnter: F,
2854
- onMouseLeave: L,
2855
- onFocus: R,
2856
- onBlur: L,
2857
- onPointerDown: te,
2858
- "aria-describedby": x ? ee : void 0,
3125
+ className: _("owo-tooltip-trigger", wr.trigger, b?.trigger),
3126
+ onMouseEnter: I,
3127
+ onMouseLeave: R,
3128
+ onFocus: ee,
3129
+ onBlur: R,
3130
+ onPointerDown: z,
3131
+ "aria-describedby": x ? P : void 0,
2859
3132
  children: y
2860
3133
  }), x && h(/* @__PURE__ */ m("div", {
2861
3134
  ref: A,
2862
- id: ee,
3135
+ id: P,
2863
3136
  role: "tooltip",
2864
3137
  "data-state": x ? "open" : "closed",
2865
3138
  "data-placement": T,
2866
3139
  "data-density": n,
2867
3140
  "data-scope": "tooltip",
2868
3141
  "data-part": "content",
2869
- className: _("owo-tooltip", vr.content, b?.content, v),
3142
+ className: _("owo-tooltip", wr.content, b?.content, v),
2870
3143
  style: C ? {
2871
3144
  top: C.top,
2872
3145
  left: C.left
2873
3146
  } : { visibility: "hidden" },
2874
- onMouseEnter: F,
2875
- onMouseLeave: L,
3147
+ onMouseEnter: I,
3148
+ onMouseLeave: R,
2876
3149
  children: [e, l && /* @__PURE__ */ p("span", {
2877
3150
  ref: j,
2878
3151
  "data-scope": "tooltip",
2879
3152
  "data-part": "arrow",
2880
3153
  className: _(b?.arrow),
2881
- style: z,
3154
+ style: V,
2882
3155
  children: g ? g({ placement: T }) : /* @__PURE__ */ p("svg", {
2883
- width: yr * 2,
2884
- height: yr,
3156
+ width: Tr * 2,
3157
+ height: Tr,
2885
3158
  viewBox: "0 0 12 6",
2886
3159
  children: /* @__PURE__ */ p("path", {
2887
3160
  d: "M0 0l6 6 6-6z",
@@ -2892,4 +3165,4 @@ function wr({ content: e, placement: t = "top", density: n = "default", showDela
2892
3165
  }), document.body)] });
2893
3166
  }
2894
3167
  //#endregion
2895
- export { b as Avatar, S as Badge, L as Button, ie as Collapsible, V as CollapsibleContent, B as CollapsibleRoot, re as CollapsibleTrigger, pe as ConfirmProvider, W as Dialog, En as Drawer, wn as DropdownMenu, On as Field, An as IconButton, Mn as Input, Pn as Panel, In as PanelBody, Ln as PanelFooter, Fn as PanelHeader, zn as SegmentedControl, Vn as Select, Wn as Skeleton, P as Spinner, Gn as StatusNotice, qn as Switch, rr as Tabs, nr as TabsContent, er as TabsList, $n as TabsRoot, tr as TabsTrigger, ar as Textarea, _r as ToastProvider, wr as Tooltip, I as buttonClassName, fe as useConfirm, pr as useToast };
3168
+ export { b as Avatar, S as Badge, R as Button, U as Checkbox, ae as Collapsible, ie as CollapsibleContent, re as CollapsibleRoot, K as CollapsibleTrigger, _e as ConfirmProvider, me as Dialog, Mn as Drawer, An as DropdownMenu, Pn as Field, In as IconButton, Rn as Input, Bn as Panel, Hn as PanelBody, Un as PanelFooter, Vn as PanelHeader, Gn as SegmentedControl, Jn as Select, Zn as Skeleton, F as Spinner, Qn as StatusNotice, er as Switch, lr as Tabs, cr as TabsContent, or as TabsList, ar as TabsRoot, sr as TabsTrigger, dr as Textarea, Cr as ToastProvider, Ar as Tooltip, L as buttonClassName, ge as useConfirm, yr as useToast };