@veevarts/design-system 1.0.0-dev.7 → 1.0.0-dev.8

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.js CHANGED
@@ -1,30 +1,30 @@
1
1
  import { jsx as f, jsxs as T, Fragment as Ke } from "react/jsx-runtime";
2
- import { HeroUIProvider as ol, Button as ll, cn as L, Select as di, SelectItem as fi, Alert as En, Divider as xs, Tooltip as At, Dropdown as ks, DropdownTrigger as vs, DropdownMenu as Cs, DropdownItem as Ss, Input as al, Popover as cl, PopoverTrigger as ul, PopoverContent as dl, ButtonGroup as fl, useInput as hl, NumberInput as ws, Card as Re, CardBody as Pe, CardHeader as As, Image as pl, CardFooter as ml, Chip as hi, Skeleton as ue, Autocomplete as gl, AutocompleteItem as yl, Checkbox as bl } from "@heroui/react";
2
+ import { HeroUIProvider as ll, Button as al, cn as L, Select as di, SelectItem as fi, Alert as En, Divider as ks, Tooltip as At, Dropdown as vs, DropdownTrigger as Cs, DropdownMenu as Ss, DropdownItem as ws, Input as cl, Popover as ul, PopoverTrigger as dl, PopoverContent as fl, ButtonGroup as hl, useInput as pl, NumberInput as As, Card as Re, CardBody as Pe, CardHeader as Ns, Image as ml, CardFooter as gl, Chip as hi, Skeleton as ue, Autocomplete as yl, AutocompleteItem as bl, Checkbox as xl } from "@heroui/react";
3
3
  export * from "@heroui/react";
4
- import R, { useState as he, useRef as Ut, useEffect as et, useReducer as xl, useCallback as le, useMemo as lr, forwardRef as Tn, createElement as ar } from "react";
5
- import { Globe as pi, User as mi, Heading as Ns, Check as Es, ListTodo as Ts, ListOrdered as Ms, List as Dr, AlignJustify as kl, AlignRight as vl, AlignCenter as Cl, AlignLeft as Os, CornerDownLeft as Sl, Redo2 as wl, Undo2 as Al, Eraser as gi, Minus as Nl, Quote as El, CodeSquare as Tl, FileText as Ml, Link2 as Ol, Highlighter as Is, Palette as Ds, Code as Il, Underline as Dl, Strikethrough as Ll, Italic as Fl, Bold as Rl, X as Pl, ZoomOut as Vl, ZoomIn as $l, Clock as yi, CheckCircle as _l, AlertCircle as Bl } from "lucide-react";
6
- import { LazyMotion as zl, domAnimation as Hl, m as cr, motion as ur, AnimatePresence as dr } from "framer-motion";
7
- import { EditorProvider as Ul, useCurrentEditor as Ls } from "@tiptap/react";
8
- import { Mark as Xt, markPasteRule as Tt, markInputRule as Mt, mergeAttributes as ke, Node as Ve, textblockTypeInputRule as fr, wrappingInputRule as qt, nodeInputRule as ql, canInsertNode as Kl, isNodeSelection as Jl, Extension as Lr, callOrReturn as Wl, getExtensionField as jl } from "@tiptap/core";
9
- import { Underline as Gl } from "@tiptap/extension-underline";
10
- import { Color as Zl } from "@tiptap/extension-color";
11
- import { Highlight as Ql } from "@tiptap/extension-highlight";
12
- import { Link as Xl } from "@tiptap/extension-link";
13
- import { TaskList as Yl } from "@tiptap/extension-task-list";
14
- import { TaskItem as ea } from "@tiptap/extension-task-item";
15
- import { TextAlign as ta } from "@tiptap/extension-text-align";
4
+ import R, { useState as he, useRef as Ut, useEffect as et, useReducer as kl, useCallback as le, useMemo as lr, forwardRef as Tn, createElement as ar } from "react";
5
+ import { Globe as pi, User as mi, Heading as Es, Check as Ts, ListTodo as Ms, ListOrdered as Os, List as Dr, AlignJustify as vl, AlignRight as Cl, AlignCenter as Sl, AlignLeft as Is, CornerDownLeft as wl, Redo2 as Al, Undo2 as Nl, Eraser as gi, Minus as El, Quote as Tl, CodeSquare as Ml, FileText as Ol, Link2 as Il, Highlighter as Ds, Palette as Ls, Code as Dl, Underline as Ll, Strikethrough as Fl, Italic as Rl, Bold as Pl, X as Vl, ZoomOut as $l, ZoomIn as _l, Clock as yi, CheckCircle as Bl, AlertCircle as zl } from "lucide-react";
6
+ import { LazyMotion as Hl, domAnimation as Ul, m as cr, motion as ur, AnimatePresence as dr } from "framer-motion";
7
+ import { EditorProvider as ql, useCurrentEditor as Fs } from "@tiptap/react";
8
+ import { Mark as Xt, markPasteRule as Tt, markInputRule as Mt, mergeAttributes as ke, Node as Ve, textblockTypeInputRule as fr, wrappingInputRule as qt, nodeInputRule as Kl, canInsertNode as Jl, isNodeSelection as Wl, Extension as Lr, callOrReturn as jl, getExtensionField as Gl } from "@tiptap/core";
9
+ import { Underline as Zl } from "@tiptap/extension-underline";
10
+ import { Color as Ql } from "@tiptap/extension-color";
11
+ import { Highlight as Xl } from "@tiptap/extension-highlight";
12
+ import { Link as Yl } from "@tiptap/extension-link";
13
+ import { TaskList as ea } from "@tiptap/extension-task-list";
14
+ import { TaskItem as ta } from "@tiptap/extension-task-item";
15
+ import { TextAlign as na } from "@tiptap/extension-text-align";
16
16
  function Jf({ children: t }) {
17
- return /* @__PURE__ */ f(ol, { children: t });
17
+ return /* @__PURE__ */ f(ll, { children: t });
18
18
  }
19
19
  function ve({ color: t = "primary", radius: e = "full", testId: n = "veevart-button", ...r }) {
20
- return /* @__PURE__ */ f(ll, { color: t, radius: e, "data-testid": n, ...r });
20
+ return /* @__PURE__ */ f(al, { color: t, radius: e, "data-testid": n, ...r });
21
21
  }
22
- const na = {
22
+ const ra = {
23
23
  login: "Login",
24
24
  logout: "Logout",
25
25
  selectLanguage: "Select your language"
26
26
  };
27
- function ra({
27
+ function ia({
28
28
  languages: t,
29
29
  selectedLanguage: e,
30
30
  onLanguageChange: n,
@@ -84,7 +84,7 @@ function ra({
84
84
  )
85
85
  ] }) });
86
86
  }
87
- function ia({
87
+ function sa({
88
88
  isLoggedIn: t,
89
89
  onLogin: e,
90
90
  onLogout: n,
@@ -127,7 +127,7 @@ function Wf({
127
127
  labels: c = {},
128
128
  className: u
129
129
  }) {
130
- const d = { ...na, ...c };
130
+ const d = { ...ra, ...c };
131
131
  return /* @__PURE__ */ T(
132
132
  "nav",
133
133
  {
@@ -140,7 +140,7 @@ function Wf({
140
140
  /* @__PURE__ */ f("div", { className: "flex items-center min-w-10", children: t && /* @__PURE__ */ f("a", { href: "/", className: "block", children: /* @__PURE__ */ f("img", { "data-testid": "navbar-logo", src: t, alt: "Logo", className: "h-8 max-w-28 md:max-w-40" }) }) }),
141
141
  /* @__PURE__ */ T("div", { className: "flex items-center gap-2 md:gap-4", children: [
142
142
  (l || e.length > 0) && /* @__PURE__ */ f(
143
- ra,
143
+ ia,
144
144
  {
145
145
  languages: e,
146
146
  selectedLanguage: n,
@@ -148,7 +148,7 @@ function Wf({
148
148
  label: d.selectLanguage
149
149
  }
150
150
  ),
151
- a && /* @__PURE__ */ f(ia, { isLoggedIn: i, onLogin: s, onLogout: o, labels: d })
151
+ a && /* @__PURE__ */ f(sa, { isLoggedIn: i, onLogin: s, onLogout: o, labels: d })
152
152
  ] })
153
153
  ]
154
154
  }
@@ -166,7 +166,7 @@ function jf(t) {
166
166
  ) }) });
167
167
  }
168
168
  var Hn;
169
- const sa = typeof document < "u" ? (Hn = R.useInsertionEffect) !== null && Hn !== void 0 ? Hn : R.useLayoutEffect : () => {
169
+ const oa = typeof document < "u" ? (Hn = R.useInsertionEffect) !== null && Hn !== void 0 ? Hn : R.useLayoutEffect : () => {
170
170
  };
171
171
  function Fr(t, e, n) {
172
172
  let [r, i] = he(t || e), s = Ut(r), o = Ut(t !== void 0), l = t !== void 0;
@@ -177,10 +177,10 @@ function Fr(t, e, n) {
177
177
  l
178
178
  ]);
179
179
  let a = l ? t : r;
180
- sa(() => {
180
+ oa(() => {
181
181
  s.current = a;
182
182
  });
183
- let [, c] = xl(() => ({}), {}), u = le((d, ...p) => {
183
+ let [, c] = kl(() => ({}), {}), u = le((d, ...p) => {
184
184
  let m = typeof d == "function" ? d(s.current) : d;
185
185
  Object.is(s.current, m) || (s.current = m, i(m), c(), n?.(m, ...p));
186
186
  }, [
@@ -191,7 +191,7 @@ function Fr(t, e, n) {
191
191
  u
192
192
  ];
193
193
  }
194
- function oa(t) {
194
+ function la(t) {
195
195
  return /* @__PURE__ */ f("svg", { ...t, fill: "none", stroke: "currentColor", strokeWidth: 2, viewBox: "0 0 24 24", children: /* @__PURE__ */ f(
196
196
  cr.path,
197
197
  {
@@ -209,7 +209,7 @@ function oa(t) {
209
209
  }
210
210
  ) });
211
211
  }
212
- const la = R.forwardRef(
212
+ const aa = R.forwardRef(
213
213
  ({
214
214
  color: t = "primary",
215
215
  stepsCount: e = 3,
@@ -293,7 +293,7 @@ const la = R.forwardRef(
293
293
  onClick: () => p(y),
294
294
  "data-testid": `stepper-step-btn-${y}`,
295
295
  children: [
296
- /* @__PURE__ */ f("div", { className: "h-full relative flex items-center", children: /* @__PURE__ */ f(zl, { features: Hl, children: /* @__PURE__ */ f(cr.div, { animate: k, className: "relative", children: /* @__PURE__ */ f(
296
+ /* @__PURE__ */ f("div", { className: "h-full relative flex items-center", children: /* @__PURE__ */ f(Hl, { features: Ul, children: /* @__PURE__ */ f(cr.div, { animate: k, className: "relative", children: /* @__PURE__ */ f(
297
297
  cr.div,
298
298
  {
299
299
  animate: k,
@@ -323,7 +323,7 @@ const la = R.forwardRef(
323
323
  }
324
324
  },
325
325
  children: /* @__PURE__ */ f("div", { className: "flex items-center justify-center", children: k === "complete" ? /* @__PURE__ */ f(
326
- oa,
326
+ la,
327
327
  {
328
328
  className: "h-5 w-5 text-(--active-fg-color)",
329
329
  "data-testid": `stepper-step-check-${y}`
@@ -368,7 +368,7 @@ const la = R.forwardRef(
368
368
  );
369
369
  }
370
370
  );
371
- la.displayName = "Stepper";
371
+ aa.displayName = "Stepper";
372
372
  function Gf(t) {
373
373
  return /* @__PURE__ */ f("div", { className: "min-h-screen flex flex-col", children: /* @__PURE__ */ f("div", { className: "flex-1 flex items-center justify-center p-12", children: /* @__PURE__ */ f(
374
374
  En,
@@ -397,7 +397,7 @@ function Kt(t) {
397
397
  return typeof t == "string" ? t : t.type;
398
398
  }
399
399
  function lt({ className: t }) {
400
- return /* @__PURE__ */ f("div", { className: `flex items-center h-6 ${t || ""}`, children: /* @__PURE__ */ f(xs, { orientation: "vertical" }) });
400
+ return /* @__PURE__ */ f("div", { className: `flex items-center h-6 ${t || ""}`, children: /* @__PURE__ */ f(ks, { orientation: "vertical" }) });
401
401
  }
402
402
  function Ze({
403
403
  icon: t,
@@ -410,31 +410,21 @@ function Ze({
410
410
  className: l
411
411
  }) {
412
412
  const a = s ? `${e} (${s})` : e;
413
- return /* @__PURE__ */ f(
414
- At,
413
+ return /* @__PURE__ */ f(At, { content: a, children: /* @__PURE__ */ f(
414
+ ve,
415
415
  {
416
- content: a,
417
- placement: "top",
418
- delay: 300,
419
- closeDelay: 0,
420
- showArrow: !0,
421
- children: /* @__PURE__ */ f(
422
- ve,
423
- {
424
- size: "sm",
425
- radius: "sm",
426
- color: n ? "primary" : "default",
427
- variant: n ? "solid" : "bordered",
428
- isIconOnly: !0,
429
- isDisabled: r,
430
- onPress: i,
431
- "aria-label": e,
432
- className: l,
433
- children: /* @__PURE__ */ f(t, { size: o })
434
- }
435
- )
416
+ size: "sm",
417
+ radius: "sm",
418
+ color: n ? "primary" : "default",
419
+ variant: n ? "solid" : "bordered",
420
+ isIconOnly: !0,
421
+ isDisabled: r,
422
+ onPress: i,
423
+ "aria-label": e,
424
+ className: l,
425
+ children: /* @__PURE__ */ f(t, { size: o })
436
426
  }
437
- );
427
+ ) });
438
428
  }
439
429
  const We = {
440
430
  // ============================================================
@@ -614,7 +604,7 @@ const We = {
614
604
  shortcut: "Mod-Shift-z",
615
605
  label: "Redo"
616
606
  }
617
- }, aa = {
607
+ }, ca = {
618
608
  1: "Heading 1",
619
609
  2: "Heading 2",
620
610
  3: "Heading 3",
@@ -622,7 +612,7 @@ const We = {
622
612
  5: "Heading 5",
623
613
  6: "Heading 6"
624
614
  };
625
- function ca({ editor: t, levels: e = [1, 2, 3, 4, 5, 6], isDisabled: n = !1 }) {
615
+ function ua({ editor: t, levels: e = [1, 2, 3, 4, 5, 6], isDisabled: n = !1 }) {
626
616
  const [, r] = R.useState(0);
627
617
  R.useEffect(() => {
628
618
  const o = () => r((l) => l + 1);
@@ -637,8 +627,8 @@ function ca({ editor: t, levels: e = [1, 2, 3, 4, 5, 6], isDisabled: n = !1 }) {
637
627
  config: { type: "heading", level: l }
638
628
  });
639
629
  };
640
- return /* @__PURE__ */ T(ks, { children: [
641
- /* @__PURE__ */ f(vs, { children: /* @__PURE__ */ f(
630
+ return /* @__PURE__ */ T(vs, { children: [
631
+ /* @__PURE__ */ f(Cs, { children: /* @__PURE__ */ f(
642
632
  ve,
643
633
  {
644
634
  size: "sm",
@@ -646,23 +636,23 @@ function ca({ editor: t, levels: e = [1, 2, 3, 4, 5, 6], isDisabled: n = !1 }) {
646
636
  variant: i ? "solid" : "bordered",
647
637
  color: i ? "primary" : "default",
648
638
  isDisabled: n,
649
- startContent: /* @__PURE__ */ f(Ns, { size: 16 }),
639
+ startContent: /* @__PURE__ */ f(Es, { size: 16 }),
650
640
  "aria-label": "Select heading level",
651
641
  children: i ? `H${i}` : "H"
652
642
  }
653
643
  ) }),
654
644
  /* @__PURE__ */ f(
655
- Cs,
645
+ Ss,
656
646
  {
657
647
  "aria-label": "Heading levels",
658
648
  selectionMode: "single",
659
649
  selectedKeys: i ? /* @__PURE__ */ new Set([String(i)]) : /* @__PURE__ */ new Set(),
660
650
  onAction: s,
661
651
  children: e.map((o) => /* @__PURE__ */ f(
662
- Ss,
652
+ ws,
663
653
  {
664
- startContent: t.isActive("heading", { level: o }) ? /* @__PURE__ */ f(Es, { size: 16 }) : /* @__PURE__ */ f("div", { className: "w-4" }),
665
- children: aa[o]
654
+ startContent: t.isActive("heading", { level: o }) ? /* @__PURE__ */ f(Ts, { size: 16 }) : /* @__PURE__ */ f("div", { className: "w-4" }),
655
+ children: ca[o]
666
656
  },
667
657
  o
668
658
  ))
@@ -677,14 +667,14 @@ const Un = {
677
667
  },
678
668
  orderedList: {
679
669
  label: "Numbered List",
680
- icon: Ms
670
+ icon: Os
681
671
  },
682
672
  taskList: {
683
673
  label: "Task List",
684
- icon: Ts
674
+ icon: Ms
685
675
  }
686
676
  };
687
- function ua({
677
+ function da({
688
678
  editor: t,
689
679
  types: e = ["bulletList", "orderedList", "taskList"],
690
680
  isDisabled: n = !1
@@ -697,8 +687,8 @@ function ua({
697
687
  };
698
688
  }, [t]);
699
689
  const i = e.find((l) => t.isActive(l)), s = i ? Un[i].icon : Dr;
700
- return /* @__PURE__ */ T(ks, { children: [
701
- /* @__PURE__ */ f(vs, { children: /* @__PURE__ */ f(
690
+ return /* @__PURE__ */ T(vs, { children: [
691
+ /* @__PURE__ */ f(Cs, { children: /* @__PURE__ */ f(
702
692
  ve,
703
693
  {
704
694
  size: "sm",
@@ -712,7 +702,7 @@ function ua({
712
702
  }
713
703
  ) }),
714
704
  /* @__PURE__ */ f(
715
- Cs,
705
+ Ss,
716
706
  {
717
707
  "aria-label": "List types",
718
708
  selectionMode: "single",
@@ -724,7 +714,7 @@ function ua({
724
714
  children: e.map((l) => {
725
715
  const a = Un[l].icon;
726
716
  return /* @__PURE__ */ f(
727
- Ss,
717
+ ws,
728
718
  {
729
719
  startContent: /* @__PURE__ */ f(a, { size: 16 }),
730
720
  children: Un[l].label
@@ -736,7 +726,7 @@ function ua({
736
726
  )
737
727
  ] });
738
728
  }
739
- function da({ colors: t, selectedColor: e, onColorSelect: n, columns: r = 4 }) {
729
+ function fa({ colors: t, selectedColor: e, onColorSelect: n, columns: r = 4 }) {
740
730
  return /* @__PURE__ */ f(
741
731
  "div",
742
732
  {
@@ -765,7 +755,7 @@ function da({ colors: t, selectedColor: e, onColorSelect: n, columns: r = 4 }) {
765
755
  }
766
756
  );
767
757
  }
768
- const fa = [
758
+ const ha = [
769
759
  "#000000",
770
760
  // Black
771
761
  "#374151",
@@ -790,7 +780,7 @@ const fa = [
790
780
  // Orange 500
791
781
  "#A855F7"
792
782
  // Violet 500
793
- ], ha = [
783
+ ], pa = [
794
784
  "#FEF3C7",
795
785
  // Yellow light
796
786
  "#DBEAFE",
@@ -824,40 +814,43 @@ const fe = {
824
814
  max: 200,
825
815
  step: 10,
826
816
  default: 100
827
- }, pa = {
828
- lineHeight: 24
817
+ }, bi = {
818
+ lineHeight: 24,
819
+ // px per row
820
+ toolbarHeight: 60
821
+ // approximate toolbar height
829
822
  }, ma = {
830
823
  // Inline marks
831
- bold: Rl,
832
- italic: Fl,
833
- strike: Ll,
834
- underline: Dl,
835
- code: Il,
836
- textColor: Ds,
837
- highlight: Is,
838
- link: Ol,
824
+ bold: Pl,
825
+ italic: Rl,
826
+ strike: Fl,
827
+ underline: Ll,
828
+ code: Dl,
829
+ textColor: Ls,
830
+ highlight: Ds,
831
+ link: Il,
839
832
  // Block nodes
840
- paragraph: Ml,
841
- heading: Ns,
833
+ paragraph: Ol,
834
+ heading: Es,
842
835
  bulletList: Dr,
843
- orderedList: Ms,
844
- taskList: Ts,
845
- codeBlock: Tl,
846
- blockquote: El,
847
- horizontalRule: Nl,
836
+ orderedList: Os,
837
+ taskList: Ms,
838
+ codeBlock: Ml,
839
+ blockquote: Tl,
840
+ horizontalRule: El,
848
841
  // Utilities
849
842
  clearMarks: gi,
850
843
  clearNodes: gi,
851
- undo: Al,
852
- redo: wl,
853
- hardBreak: Sl,
854
- textAlign: Os
844
+ undo: Nl,
845
+ redo: Al,
846
+ hardBreak: wl,
847
+ textAlign: Is
855
848
  // Default, will be overridden in component
856
849
  }, ga = {
857
- left: Os,
858
- center: Cl,
859
- right: vl,
860
- justify: kl
850
+ left: Is,
851
+ center: Sl,
852
+ right: Cl,
853
+ justify: vl
861
854
  };
862
855
  function at(t) {
863
856
  return ma[t];
@@ -880,7 +873,7 @@ function ya({ value: t, onChange: e, onApply: n, placeholder: r = "#000000" }) {
880
873
  return /* @__PURE__ */ T("div", { className: "space-y-2", children: [
881
874
  /* @__PURE__ */ T("div", { className: "flex gap-2", children: [
882
875
  /* @__PURE__ */ f(
883
- al,
876
+ cl,
884
877
  {
885
878
  type: "text",
886
879
  value: t,
@@ -913,15 +906,15 @@ function ya({ value: t, onChange: e, onApply: n, placeholder: r = "#000000" }) {
913
906
  onPress: l,
914
907
  "aria-label": "Apply custom color",
915
908
  isDisabled: !t || !qn(t),
916
- children: /* @__PURE__ */ f(Es, { size: 16 })
909
+ children: /* @__PURE__ */ f(Ts, { size: 16 })
917
910
  }
918
911
  )
919
912
  ] }),
920
913
  /* @__PURE__ */ f("p", { className: "text-xs text-default-500", children: "Enter a hex color code (e.g., #FF0000)" })
921
914
  ] });
922
915
  }
923
- function bi({ editor: t, type: e, allowCustomColor: n = !0, label: r, isDisabled: i = !1 }) {
924
- const [s, o] = he(!1), [l, a] = he(""), c = e === "textColor" ? fa : ha, u = (y) => {
916
+ function xi({ editor: t, type: e, allowCustomColor: n = !0, label: r, isDisabled: i = !1 }) {
917
+ const [s, o] = he(!1), [l, a] = he(""), c = e === "textColor" ? ha : pa, u = (y) => {
925
918
  const k = We[e];
926
919
  k && k.execute({
927
920
  editor: t,
@@ -936,8 +929,8 @@ function bi({ editor: t, type: e, allowCustomColor: n = !0, label: r, isDisabled
936
929
  config: { type: e, color: "" }
937
930
  }), o(!1);
938
931
  }, m = e === "textColor" ? t.isActive("textStyle") : t.isActive("highlight");
939
- return /* @__PURE__ */ T(cl, { isOpen: s, onOpenChange: o, placement: "bottom", showArrow: !0, children: [
940
- /* @__PURE__ */ f(ul, { children: /* @__PURE__ */ f(
932
+ return /* @__PURE__ */ T(ul, { isOpen: s, onOpenChange: o, placement: "bottom", showArrow: !0, children: [
933
+ /* @__PURE__ */ f(dl, { children: /* @__PURE__ */ f(
941
934
  ve,
942
935
  {
943
936
  size: "sm",
@@ -947,10 +940,10 @@ function bi({ editor: t, type: e, allowCustomColor: n = !0, label: r, isDisabled
947
940
  isIconOnly: !0,
948
941
  isDisabled: i,
949
942
  "aria-label": r,
950
- children: /* @__PURE__ */ f(e === "textColor" ? Ds : Is, { size: 16 })
943
+ children: /* @__PURE__ */ f(e === "textColor" ? Ls : Ds, { size: 16 })
951
944
  }
952
945
  ) }),
953
- /* @__PURE__ */ f(dl, { className: "w-64", children: /* @__PURE__ */ T("div", { className: "px-2 py-3 space-y-3", children: [
946
+ /* @__PURE__ */ f(fl, { className: "w-64", children: /* @__PURE__ */ T("div", { className: "px-2 py-3 space-y-3", children: [
954
947
  /* @__PURE__ */ T("div", { className: "flex items-center justify-between", children: [
955
948
  /* @__PURE__ */ f("span", { className: "text-sm font-semibold", children: r }),
956
949
  /* @__PURE__ */ f(
@@ -961,13 +954,13 @@ function bi({ editor: t, type: e, allowCustomColor: n = !0, label: r, isDisabled
961
954
  isIconOnly: !0,
962
955
  onPress: p,
963
956
  "aria-label": "Clear color",
964
- children: /* @__PURE__ */ f(Pl, { size: 16 })
957
+ children: /* @__PURE__ */ f(Vl, { size: 16 })
965
958
  }
966
959
  )
967
960
  ] }),
968
- /* @__PURE__ */ f(da, { colors: c, onColorSelect: u }),
961
+ /* @__PURE__ */ f(fa, { colors: c, onColorSelect: u }),
969
962
  n && /* @__PURE__ */ T(Ke, { children: [
970
- /* @__PURE__ */ f(xs, {}),
963
+ /* @__PURE__ */ f(ks, {}),
971
964
  /* @__PURE__ */ T("div", { children: [
972
965
  /* @__PURE__ */ f("p", { className: "text-xs font-semibold mb-2 text-default-700", children: "Custom Color" }),
973
966
  /* @__PURE__ */ f(
@@ -1011,7 +1004,7 @@ function ba({
1011
1004
  isDisabled: a,
1012
1005
  onPress: s,
1013
1006
  "aria-label": "Zoom out",
1014
- children: /* @__PURE__ */ f(Vl, { size: 16 })
1007
+ children: /* @__PURE__ */ f($l, { size: 16 })
1015
1008
  }
1016
1009
  ) }),
1017
1010
  /* @__PURE__ */ f(At, { content: u ? "Zoom percentage" : "Click to reset zoom", children: /* @__PURE__ */ T(
@@ -1042,15 +1035,15 @@ function ba({
1042
1035
  isDisabled: c,
1043
1036
  onPress: o,
1044
1037
  "aria-label": "Zoom in",
1045
- children: /* @__PURE__ */ f($l, { size: 16 })
1038
+ children: /* @__PURE__ */ f(_l, { size: 16 })
1046
1039
  }
1047
1040
  ) })
1048
1041
  ] });
1049
1042
  }
1050
1043
  function xa({ children: t, id: e, label: n, className: r, useButtonGroup: i = !0 }) {
1051
- return i ? /* @__PURE__ */ f(fl, { size: "sm", id: e, "aria-label": n, className: r, children: t }) : /* @__PURE__ */ f("div", { id: e, role: "group", "aria-label": n, className: `flex items-center gap-2 ${r || ""}`, children: t });
1044
+ return i ? /* @__PURE__ */ f(hl, { size: "sm", id: e, "aria-label": n, className: r, children: t }) : /* @__PURE__ */ f("div", { id: e, role: "group", "aria-label": n, className: `flex items-center gap-2 ${r || ""}`, children: t });
1052
1045
  }
1053
- function Fs(t, e) {
1046
+ function Rs(t, e) {
1054
1047
  const n = lr(() => {
1055
1048
  if (!t)
1056
1049
  return {};
@@ -1103,7 +1096,7 @@ function Fs(t, e) {
1103
1096
  };
1104
1097
  }, [t, e, n]), r;
1105
1098
  }
1106
- function Rs(t, e) {
1099
+ function Ps(t, e) {
1107
1100
  const n = le(
1108
1101
  (o, l) => {
1109
1102
  if (!t) return;
@@ -1175,7 +1168,7 @@ function ka(t = fe.default) {
1175
1168
  }
1176
1169
  const va = ["bold", "italic", "strike", "underline", "code"];
1177
1170
  function Ca({ editor: t, modifiers: e, onToolbarAction: n }) {
1178
- const r = Fs(t, e), { toggleModifier: i } = Rs(t, n);
1171
+ const r = Rs(t, e), { toggleModifier: i } = Ps(t, n);
1179
1172
  if (!t) return null;
1180
1173
  const s = e.map((o) => Kt(o)).filter(
1181
1174
  (o) => (
@@ -1207,7 +1200,7 @@ function Sa({
1207
1200
  className: s,
1208
1201
  onToolbarAction: o
1209
1202
  }) {
1210
- const l = Fs(t, e), { toggleModifier: a, executeCommand: c } = Rs(t, o);
1203
+ const l = Rs(t, e), { toggleModifier: a, executeCommand: c } = Ps(t, o);
1211
1204
  if (!t) return null;
1212
1205
  const u = e.map((O) => Kt(O)), d = u.some((O) => ["bold", "italic", "strike", "underline", "code"].includes(O)), p = u.some((O) => ["textColor", "highlight"].includes(O)), m = u.includes("heading"), x = u.includes("textAlign"), y = u.some((O) => ["bulletList", "orderedList", "taskList"].includes(O)), k = u.includes("blockquote"), v = u.includes("codeBlock"), S = u.includes("link"), I = u.includes("horizontalRule"), A = u.some((O) => ["undo", "redo"].includes(O)), M = n !== void 0 && r !== void 0;
1213
1206
  return /* @__PURE__ */ f("div", { className: `w-full p-2 bg-background border-b border-divider ${i ? "sticky top-0 z-10" : ""} ${s || ""}`, children: /* @__PURE__ */ T("div", { className: "flex flex-row flex-wrap gap-2 w-full items-center", children: [
@@ -1225,7 +1218,7 @@ function Sa({
1225
1218
  p && /* @__PURE__ */ T(Ke, { children: [
1226
1219
  /* @__PURE__ */ T("div", { className: "flex items-center gap-1", children: [
1227
1220
  u.includes("textColor") && /* @__PURE__ */ f(
1228
- bi,
1221
+ xi,
1229
1222
  {
1230
1223
  editor: t,
1231
1224
  type: "textColor",
@@ -1234,7 +1227,7 @@ function Sa({
1234
1227
  }
1235
1228
  ),
1236
1229
  u.includes("highlight") && /* @__PURE__ */ f(
1237
- bi,
1230
+ xi,
1238
1231
  {
1239
1232
  editor: t,
1240
1233
  type: "highlight",
@@ -1246,7 +1239,7 @@ function Sa({
1246
1239
  (m || x || y || k || v || S || I || A || M) && /* @__PURE__ */ f(lt, {})
1247
1240
  ] }),
1248
1241
  m && /* @__PURE__ */ T(Ke, { children: [
1249
- /* @__PURE__ */ f(ca, { editor: t }),
1242
+ /* @__PURE__ */ f(ua, { editor: t }),
1250
1243
  (x || y || k || v || S || I || A || M) && /* @__PURE__ */ f(lt, {})
1251
1244
  ] }),
1252
1245
  x && /* @__PURE__ */ T(Ke, { children: [
@@ -1271,7 +1264,7 @@ function Sa({
1271
1264
  ] }),
1272
1265
  y && /* @__PURE__ */ T(Ke, { children: [
1273
1266
  /* @__PURE__ */ f(
1274
- ua,
1267
+ da,
1275
1268
  {
1276
1269
  editor: t,
1277
1270
  types: u.filter(
@@ -1712,7 +1705,7 @@ const wa = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, Aa = /(?:^|\s
1712
1705
  "Mod-Alt-0": () => this.editor.commands.setParagraph()
1713
1706
  };
1714
1707
  }
1715
- }), qa = "listItem", xi = "textStyle", ki = /^\s*([-+*])\s$/, Ka = Ve.create({
1708
+ }), qa = "listItem", ki = "textStyle", vi = /^\s*([-+*])\s$/, Ka = Ve.create({
1716
1709
  name: "bulletList",
1717
1710
  addOptions() {
1718
1711
  return {
@@ -1736,7 +1729,7 @@ const wa = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, Aa = /(?:^|\s
1736
1729
  },
1737
1730
  addCommands() {
1738
1731
  return {
1739
- toggleBulletList: () => ({ commands: t, chain: e }) => this.options.keepAttributes ? e().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(qa, this.editor.getAttributes(xi)).run() : t.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)
1732
+ toggleBulletList: () => ({ commands: t, chain: e }) => this.options.keepAttributes ? e().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(qa, this.editor.getAttributes(ki)).run() : t.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)
1740
1733
  };
1741
1734
  },
1742
1735
  addKeyboardShortcuts() {
@@ -1746,21 +1739,21 @@ const wa = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, Aa = /(?:^|\s
1746
1739
  },
1747
1740
  addInputRules() {
1748
1741
  let t = qt({
1749
- find: ki,
1742
+ find: vi,
1750
1743
  type: this.type
1751
1744
  });
1752
1745
  return (this.options.keepMarks || this.options.keepAttributes) && (t = qt({
1753
- find: ki,
1746
+ find: vi,
1754
1747
  type: this.type,
1755
1748
  keepMarks: this.options.keepMarks,
1756
1749
  keepAttributes: this.options.keepAttributes,
1757
- getAttributes: () => this.editor.getAttributes(xi),
1750
+ getAttributes: () => this.editor.getAttributes(ki),
1758
1751
  editor: this.editor
1759
1752
  })), [
1760
1753
  t
1761
1754
  ];
1762
1755
  }
1763
- }), Ja = "listItem", vi = "textStyle", Ci = /^(\d+)\.\s$/, Wa = Ve.create({
1756
+ }), Ja = "listItem", Ci = "textStyle", Si = /^(\d+)\.\s$/, Wa = Ve.create({
1764
1757
  name: "orderedList",
1765
1758
  addOptions() {
1766
1759
  return {
@@ -1799,7 +1792,7 @@ const wa = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, Aa = /(?:^|\s
1799
1792
  },
1800
1793
  addCommands() {
1801
1794
  return {
1802
- toggleOrderedList: () => ({ commands: t, chain: e }) => this.options.keepAttributes ? e().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(Ja, this.editor.getAttributes(vi)).run() : t.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)
1795
+ toggleOrderedList: () => ({ commands: t, chain: e }) => this.options.keepAttributes ? e().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(Ja, this.editor.getAttributes(Ci)).run() : t.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)
1803
1796
  };
1804
1797
  },
1805
1798
  addKeyboardShortcuts() {
@@ -1809,17 +1802,17 @@ const wa = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, Aa = /(?:^|\s
1809
1802
  },
1810
1803
  addInputRules() {
1811
1804
  let t = qt({
1812
- find: Ci,
1805
+ find: Si,
1813
1806
  type: this.type,
1814
1807
  getAttributes: (e) => ({ start: +e[1] }),
1815
1808
  joinPredicate: (e, n) => n.childCount + n.attrs.start === +e[1]
1816
1809
  });
1817
1810
  return (this.options.keepMarks || this.options.keepAttributes) && (t = qt({
1818
- find: Ci,
1811
+ find: Si,
1819
1812
  type: this.type,
1820
1813
  keepMarks: this.options.keepMarks,
1821
1814
  keepAttributes: this.options.keepAttributes,
1822
- getAttributes: (e) => ({ start: +e[1], ...this.editor.getAttributes(vi) }),
1815
+ getAttributes: (e) => ({ start: +e[1], ...this.editor.getAttributes(Ci) }),
1823
1816
  joinPredicate: (e, n) => n.childCount + n.attrs.start === +e[1],
1824
1817
  editor: this.editor
1825
1818
  })), [
@@ -1855,7 +1848,7 @@ const wa = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, Aa = /(?:^|\s
1855
1848
  };
1856
1849
  }
1857
1850
  });
1858
- function Ps(t, e, n) {
1851
+ function Vs(t, e, n) {
1859
1852
  for (let r = 0; ; r++) {
1860
1853
  if (r == t.childCount || r == e.childCount)
1861
1854
  return t.childCount == e.childCount ? null : n;
@@ -1872,14 +1865,14 @@ function Ps(t, e, n) {
1872
1865
  return n;
1873
1866
  }
1874
1867
  if (i.content.size || s.content.size) {
1875
- let o = Ps(i.content, s.content, n + 1);
1868
+ let o = Vs(i.content, s.content, n + 1);
1876
1869
  if (o != null)
1877
1870
  return o;
1878
1871
  }
1879
1872
  n += i.nodeSize;
1880
1873
  }
1881
1874
  }
1882
- function Vs(t, e, n, r) {
1875
+ function $s(t, e, n, r) {
1883
1876
  for (let i = t.childCount, s = e.childCount; ; ) {
1884
1877
  if (i == 0 || s == 0)
1885
1878
  return i == s ? null : { a: n, b: r };
@@ -1897,7 +1890,7 @@ function Vs(t, e, n, r) {
1897
1890
  return { a: n, b: r };
1898
1891
  }
1899
1892
  if (o.content.size || l.content.size) {
1900
- let c = Vs(o.content, l.content, n - 1, r - 1);
1893
+ let c = $s(o.content, l.content, n - 1, r - 1);
1901
1894
  if (c)
1902
1895
  return c;
1903
1896
  }
@@ -2066,7 +2059,7 @@ class z {
2066
2059
  fragment differ, or `null` if they are the same.
2067
2060
  */
2068
2061
  findDiffStart(e, n = 0) {
2069
- return Ps(this, e, n);
2062
+ return Vs(this, e, n);
2070
2063
  }
2071
2064
  /**
2072
2065
  Find the first position, searching from the end, at which this
@@ -2075,7 +2068,7 @@ class z {
2075
2068
  nodes, an object with two separate positions is returned.
2076
2069
  */
2077
2070
  findDiffEnd(e, n = this.size, r = e.size) {
2078
- return Vs(this, e, n, r);
2071
+ return $s(this, e, n, r);
2079
2072
  }
2080
2073
  /**
2081
2074
  Find the index and inner offset corresponding to a given relative
@@ -2319,14 +2312,14 @@ class H {
2319
2312
  @internal
2320
2313
  */
2321
2314
  insertAt(e, n) {
2322
- let r = _s(this.content, e + this.openStart, n);
2315
+ let r = Bs(this.content, e + this.openStart, n);
2323
2316
  return r && new H(r, this.openStart, this.openEnd);
2324
2317
  }
2325
2318
  /**
2326
2319
  @internal
2327
2320
  */
2328
2321
  removeBetween(e, n) {
2329
- return new H($s(this.content, e + this.openStart, n + this.openStart), this.openStart, this.openEnd);
2322
+ return new H(_s(this.content, e + this.openStart, n + this.openStart), this.openStart, this.openEnd);
2330
2323
  }
2331
2324
  /**
2332
2325
  Tests whether this slice is equal to another slice.
@@ -2374,7 +2367,7 @@ class H {
2374
2367
  }
2375
2368
  }
2376
2369
  H.empty = new H(z.empty, 0, 0);
2377
- function $s(t, e, n) {
2370
+ function _s(t, e, n) {
2378
2371
  let { index: r, offset: i } = t.findIndex(e), s = t.maybeChild(r), { index: o, offset: l } = t.findIndex(n);
2379
2372
  if (i == e || s.isText) {
2380
2373
  if (l != n && !t.child(o).isText)
@@ -2383,13 +2376,13 @@ function $s(t, e, n) {
2383
2376
  }
2384
2377
  if (r != o)
2385
2378
  throw new RangeError("Removing non-flat range");
2386
- return t.replaceChild(r, s.copy($s(s.content, e - i - 1, n - i - 1)));
2379
+ return t.replaceChild(r, s.copy(_s(s.content, e - i - 1, n - i - 1)));
2387
2380
  }
2388
- function _s(t, e, n, r) {
2381
+ function Bs(t, e, n, r) {
2389
2382
  let { index: i, offset: s } = t.findIndex(e), o = t.maybeChild(i);
2390
2383
  if (s == e || o.isText)
2391
2384
  return r && !r.canReplace(i, i, n) ? null : t.cut(0, e).append(n).append(t.cut(e));
2392
- let l = _s(o.content, e - s - 1, n, o);
2385
+ let l = Bs(o.content, e - s - 1, n, o);
2393
2386
  return l && t.replaceChild(i, o.copy(l));
2394
2387
  }
2395
2388
  function Za(t) {
@@ -2424,7 +2417,7 @@ class hn {
2424
2417
  Parse a document from the content of a DOM node.
2425
2418
  */
2426
2419
  parse(e, n = {}) {
2427
- let r = new wi(this, n, !1);
2420
+ let r = new Ai(this, n, !1);
2428
2421
  return r.addAll(e, Oe.none, n.from, n.to), r.finish();
2429
2422
  }
2430
2423
  /**
@@ -2436,7 +2429,7 @@ class hn {
2436
2429
  the left of the input and the end of nodes at the end.
2437
2430
  */
2438
2431
  parseSlice(e, n = {}) {
2439
- let r = new wi(this, n, !0);
2432
+ let r = new Ai(this, n, !0);
2440
2433
  return r.addAll(e, Oe.none, n.from, n.to), H.maxOpen(r.finish());
2441
2434
  }
2442
2435
  /**
@@ -2493,13 +2486,13 @@ class hn {
2493
2486
  for (let i in e.marks) {
2494
2487
  let s = e.marks[i].spec.parseDOM;
2495
2488
  s && s.forEach((o) => {
2496
- r(o = Ai(o)), o.mark || o.ignore || o.clearMark || (o.mark = i);
2489
+ r(o = Ni(o)), o.mark || o.ignore || o.clearMark || (o.mark = i);
2497
2490
  });
2498
2491
  }
2499
2492
  for (let i in e.nodes) {
2500
2493
  let s = e.nodes[i].spec.parseDOM;
2501
2494
  s && s.forEach((o) => {
2502
- r(o = Ai(o)), o.node || o.ignore || o.mark || (o.node = i);
2495
+ r(o = Ni(o)), o.node || o.ignore || o.mark || (o.node = i);
2503
2496
  });
2504
2497
  }
2505
2498
  return n;
@@ -2513,7 +2506,7 @@ class hn {
2513
2506
  return e.cached.domParser || (e.cached.domParser = new hn(e, hn.schemaRules(e)));
2514
2507
  }
2515
2508
  }
2516
- const Bs = {
2509
+ const zs = {
2517
2510
  address: !0,
2518
2511
  article: !0,
2519
2512
  aside: !0,
@@ -2553,8 +2546,8 @@ const Bs = {
2553
2546
  script: !0,
2554
2547
  style: !0,
2555
2548
  title: !0
2556
- }, zs = { ol: !0, ul: !0 }, Jt = 1, pr = 2, Vt = 4;
2557
- function Si(t, e, n) {
2549
+ }, Hs = { ol: !0, ul: !0 }, Jt = 1, pr = 2, Vt = 4;
2550
+ function wi(t, e, n) {
2558
2551
  return e != null ? (e ? Jt : 0) | (e === "full" ? pr : 0) : t && t.whitespace == "pre" ? Jt | pr : n & ~Vt;
2559
2552
  }
2560
2553
  class rn {
@@ -2587,13 +2580,13 @@ class rn {
2587
2580
  return !e && this.match && (n = n.append(this.match.fillBefore(z.empty, !0))), this.type ? this.type.create(this.attrs, n, this.marks) : n;
2588
2581
  }
2589
2582
  inlineContext(e) {
2590
- return this.type ? this.type.inlineContent : this.content.length ? this.content[0].isInline : e.parentNode && !Bs.hasOwnProperty(e.parentNode.nodeName.toLowerCase());
2583
+ return this.type ? this.type.inlineContent : this.content.length ? this.content[0].isInline : e.parentNode && !zs.hasOwnProperty(e.parentNode.nodeName.toLowerCase());
2591
2584
  }
2592
2585
  }
2593
- class wi {
2586
+ class Ai {
2594
2587
  constructor(e, n, r) {
2595
2588
  this.parser = e, this.options = n, this.isOpen = r, this.open = 0, this.localPreserveWS = !1;
2596
- let i = n.topNode, s, o = Si(null, n.preserveWhitespace, 0) | (r ? Vt : 0);
2589
+ let i = n.topNode, s, o = wi(null, n.preserveWhitespace, 0) | (r ? Vt : 0);
2597
2590
  i ? s = new rn(i.type, i.attrs, Oe.none, !0, n.topMatch || i.type.contentMatch, o) : r ? s = new rn(null, null, Oe.none, !0, null, o) : s = new rn(e.schema.topNodeType, null, Oe.none, !0, null, o), this.nodes = [s], this.find = n.findPositions, this.needsBlock = !1;
2598
2591
  }
2599
2592
  get top() {
@@ -2633,14 +2626,14 @@ class wi {
2633
2626
  let i = this.localPreserveWS, s = this.top;
2634
2627
  (e.tagName == "PRE" || /pre/.test(e.style && e.style.whiteSpace)) && (this.localPreserveWS = !0);
2635
2628
  let o = e.nodeName.toLowerCase(), l;
2636
- zs.hasOwnProperty(o) && this.parser.normalizeLists && Ya(e);
2629
+ Hs.hasOwnProperty(o) && this.parser.normalizeLists && Ya(e);
2637
2630
  let a = this.options.ruleFromNode && this.options.ruleFromNode(e) || (l = this.parser.matchTag(e, this, r));
2638
2631
  e: if (a ? a.ignore : Xa.hasOwnProperty(o))
2639
2632
  this.findInside(e), this.ignoreFallback(e, n);
2640
2633
  else if (!a || a.skip || a.closeParent) {
2641
2634
  a && a.closeParent ? this.open = Math.max(0, this.open - 1) : a && a.skip.nodeType && (e = a.skip);
2642
2635
  let c, u = this.needsBlock;
2643
- if (Bs.hasOwnProperty(o))
2636
+ if (zs.hasOwnProperty(o))
2644
2637
  s.content.length && s.content[0].isInline && this.open && (this.open--, s = this.top), c = !0, s.type || (this.needsBlock = !0);
2645
2638
  else if (!e.firstChild) {
2646
2639
  this.leafFallback(e, n);
@@ -2759,7 +2752,7 @@ class wi {
2759
2752
  s.match && (s.match = s.match.matchType(e.type));
2760
2753
  let o = Oe.none;
2761
2754
  for (let l of i.concat(e.marks))
2762
- (s.type ? s.type.allowsMarkType(l.type) : Ni(l.type, e.type)) && (o = l.addToSet(o));
2755
+ (s.type ? s.type.allowsMarkType(l.type) : Ei(l.type, e.type)) && (o = l.addToSet(o));
2763
2756
  return s.content.push(e.mark(o)), !0;
2764
2757
  }
2765
2758
  return !1;
@@ -2775,10 +2768,10 @@ class wi {
2775
2768
  this.closeExtra();
2776
2769
  let o = this.top;
2777
2770
  o.match = o.match && o.match.matchType(e);
2778
- let l = Si(e, s, o.options);
2771
+ let l = wi(e, s, o.options);
2779
2772
  o.options & Vt && o.content.length == 0 && (l |= Vt);
2780
2773
  let a = Oe.none;
2781
- return r = r.filter((c) => (o.type ? o.type.allowsMarkType(c.type) : Ni(c.type, e)) ? (a = c.addToSet(a), !1) : !0), this.nodes.push(new rn(e, n, a, i, null, l)), this.open++, r;
2774
+ return r = r.filter((c) => (o.type ? o.type.allowsMarkType(c.type) : Ei(c.type, e)) ? (a = c.addToSet(a), !1) : !0), this.nodes.push(new rn(e, n, a, i, null, l)), this.open++, r;
2782
2775
  }
2783
2776
  // Make sure all nodes above this.open are finished and added to
2784
2777
  // their parents
@@ -2875,19 +2868,19 @@ class wi {
2875
2868
  function Ya(t) {
2876
2869
  for (let e = t.firstChild, n = null; e; e = e.nextSibling) {
2877
2870
  let r = e.nodeType == 1 ? e.nodeName.toLowerCase() : null;
2878
- r && zs.hasOwnProperty(r) && n ? (n.appendChild(e), e = n) : r == "li" ? n = e : r && (n = null);
2871
+ r && Hs.hasOwnProperty(r) && n ? (n.appendChild(e), e = n) : r == "li" ? n = e : r && (n = null);
2879
2872
  }
2880
2873
  }
2881
2874
  function ec(t, e) {
2882
2875
  return (t.matches || t.msMatchesSelector || t.webkitMatchesSelector || t.mozMatchesSelector).call(t, e);
2883
2876
  }
2884
- function Ai(t) {
2877
+ function Ni(t) {
2885
2878
  let e = {};
2886
2879
  for (let n in t)
2887
2880
  e[n] = t[n];
2888
2881
  return e;
2889
2882
  }
2890
- function Ni(t, e) {
2883
+ function Ei(t, e) {
2891
2884
  let n = e.schema.nodes;
2892
2885
  for (let r in n) {
2893
2886
  let i = n[r];
@@ -2999,17 +2992,17 @@ class Mn {
2999
2992
  This can be useful as a base to build a custom serializer from.
3000
2993
  */
3001
2994
  static nodesFromSchema(e) {
3002
- let n = Ei(e.nodes);
2995
+ let n = Ti(e.nodes);
3003
2996
  return n.text || (n.text = (r) => r.text), n;
3004
2997
  }
3005
2998
  /**
3006
2999
  Gather the serializers in a schema's mark specs into an object.
3007
3000
  */
3008
3001
  static marksFromSchema(e) {
3009
- return Ei(e.marks);
3002
+ return Ti(e.marks);
3010
3003
  }
3011
3004
  }
3012
- function Ei(t) {
3005
+ function Ti(t) {
3013
3006
  let e = {};
3014
3007
  for (let n in t) {
3015
3008
  let r = t[n].spec.toDOM;
@@ -3020,10 +3013,10 @@ function Ei(t) {
3020
3013
  function Jn(t) {
3021
3014
  return t.document || window.document;
3022
3015
  }
3023
- const Ti = /* @__PURE__ */ new WeakMap();
3016
+ const Mi = /* @__PURE__ */ new WeakMap();
3024
3017
  function tc(t) {
3025
- let e = Ti.get(t);
3026
- return e === void 0 && Ti.set(t, e = nc(t)), e;
3018
+ let e = Mi.get(t);
3019
+ return e === void 0 && Mi.set(t, e = nc(t)), e;
3027
3020
  }
3028
3021
  function nc(t) {
3029
3022
  let e = null;
@@ -3081,17 +3074,17 @@ function an(t, e, n, r) {
3081
3074
  }
3082
3075
  return { dom: a, contentDOM: l };
3083
3076
  }
3084
- const Hs = 65535, Us = Math.pow(2, 16);
3077
+ const Us = 65535, qs = Math.pow(2, 16);
3085
3078
  function rc(t, e) {
3086
- return t + e * Us;
3079
+ return t + e * qs;
3087
3080
  }
3088
- function Mi(t) {
3089
- return t & Hs;
3081
+ function Oi(t) {
3082
+ return t & Us;
3090
3083
  }
3091
3084
  function ic(t) {
3092
- return (t - (t & Hs)) / Us;
3085
+ return (t - (t & Us)) / qs;
3093
3086
  }
3094
- const qs = 1, Ks = 2, cn = 4, Js = 8;
3087
+ const Ks = 1, Js = 2, cn = 4, Ws = 8;
3095
3088
  class mr {
3096
3089
  /**
3097
3090
  @internal
@@ -3105,19 +3098,19 @@ class mr {
3105
3098
  argument from the document.
3106
3099
  */
3107
3100
  get deleted() {
3108
- return (this.delInfo & Js) > 0;
3101
+ return (this.delInfo & Ws) > 0;
3109
3102
  }
3110
3103
  /**
3111
3104
  Tells you whether the token before the mapped position was deleted.
3112
3105
  */
3113
3106
  get deletedBefore() {
3114
- return (this.delInfo & (qs | cn)) > 0;
3107
+ return (this.delInfo & (Ks | cn)) > 0;
3115
3108
  }
3116
3109
  /**
3117
3110
  True when the token after the mapped position was deleted.
3118
3111
  */
3119
3112
  get deletedAfter() {
3120
- return (this.delInfo & (Ks | cn)) > 0;
3113
+ return (this.delInfo & (Js | cn)) > 0;
3121
3114
  }
3122
3115
  /**
3123
3116
  Tells whether any of the steps mapped through deletes across the
@@ -3142,7 +3135,7 @@ class Ae {
3142
3135
  @internal
3143
3136
  */
3144
3137
  recover(e) {
3145
- let n = 0, r = Mi(e);
3138
+ let n = 0, r = Oi(e);
3146
3139
  if (!this.inverted)
3147
3140
  for (let i = 0; i < r; i++)
3148
3141
  n += this.ranges[i * 3 + 2] - this.ranges[i * 3 + 1];
@@ -3168,8 +3161,8 @@ class Ae {
3168
3161
  let p = c ? e == a ? -1 : e == d ? 1 : n : n, m = a + i + (p < 0 ? 0 : u);
3169
3162
  if (r)
3170
3163
  return m;
3171
- let x = e == (n < 0 ? a : d) ? null : rc(l / 3, e - a), y = e == a ? Ks : e == d ? qs : cn;
3172
- return (n < 0 ? e != a : e != d) && (y |= Js), new mr(m, y, x);
3164
+ let x = e == (n < 0 ? a : d) ? null : rc(l / 3, e - a), y = e == a ? Js : e == d ? Ks : cn;
3165
+ return (n < 0 ? e != a : e != d) && (y |= Ws), new mr(m, y, x);
3173
3166
  }
3174
3167
  i += u - c;
3175
3168
  }
@@ -3179,7 +3172,7 @@ class Ae {
3179
3172
  @internal
3180
3173
  */
3181
3174
  touches(e, n) {
3182
- let r = 0, i = Mi(n), s = this.inverted ? 2 : 1, o = this.inverted ? 1 : 2;
3175
+ let r = 0, i = Oi(n), s = this.inverted ? 2 : 1, o = this.inverted ? 1 : 2;
3183
3176
  for (let l = 0; l < this.ranges.length; l += 3) {
3184
3177
  let a = this.ranges[l] - (this.inverted ? r : 0);
3185
3178
  if (a > e)
@@ -3697,7 +3690,7 @@ function gr(t, e, n) {
3697
3690
  }
3698
3691
  return !1;
3699
3692
  }
3700
- function Ws(t, e, n) {
3693
+ function js(t, e, n) {
3701
3694
  let r = t.resolve(e);
3702
3695
  if (!n.content.size)
3703
3696
  return e;
@@ -3872,7 +3865,7 @@ class Z {
3872
3865
  let s = e.steps.length, o = this.ranges;
3873
3866
  for (let l = 0; l < o.length; l++) {
3874
3867
  let { $from: a, $to: c } = o[l], u = e.mapping.slice(s);
3875
- e.replaceRange(u.map(a.pos), u.map(c.pos), l ? H.empty : n), l == 0 && Di(e, s, (r ? r.isInline : i && i.isTextblock) ? -1 : 1);
3868
+ e.replaceRange(u.map(a.pos), u.map(c.pos), l ? H.empty : n), l == 0 && Li(e, s, (r ? r.isInline : i && i.isTextblock) ? -1 : 1);
3876
3869
  }
3877
3870
  }
3878
3871
  /**
@@ -3883,7 +3876,7 @@ class Z {
3883
3876
  let r = e.steps.length, i = this.ranges;
3884
3877
  for (let s = 0; s < i.length; s++) {
3885
3878
  let { $from: o, $to: l } = i[s], a = e.mapping.slice(r), c = a.map(o.pos), u = a.map(l.pos);
3886
- s ? e.deleteRange(c, u) : (e.replaceRangeWith(c, u, n), Di(e, r, n.isInline ? -1 : 1));
3879
+ s ? e.deleteRange(c, u) : (e.replaceRangeWith(c, u, n), Li(e, r, n.isInline ? -1 : 1));
3887
3880
  }
3888
3881
  }
3889
3882
  /**
@@ -3973,16 +3966,16 @@ class sc {
3973
3966
  this.$from = e, this.$to = n;
3974
3967
  }
3975
3968
  }
3976
- let Oi = !1;
3977
- function Ii(t) {
3978
- !Oi && !t.parent.inlineContent && (Oi = !0, console.warn("TextSelection endpoint not pointing into a node with inline content (" + t.parent.type.name + ")"));
3969
+ let Ii = !1;
3970
+ function Di(t) {
3971
+ !Ii && !t.parent.inlineContent && (Ii = !0, console.warn("TextSelection endpoint not pointing into a node with inline content (" + t.parent.type.name + ")"));
3979
3972
  }
3980
3973
  class G extends Z {
3981
3974
  /**
3982
3975
  Construct a text selection between the given points.
3983
3976
  */
3984
3977
  constructor(e, n = e) {
3985
- Ii(e), Ii(n), super(e, n);
3978
+ Di(e), Di(n), super(e, n);
3986
3979
  }
3987
3980
  /**
3988
3981
  Returns a resolved position if this is a cursor selection (an
@@ -4182,7 +4175,7 @@ function Ct(t, e, n, r, i, s = !1) {
4182
4175
  }
4183
4176
  return null;
4184
4177
  }
4185
- function Di(t, e, n) {
4178
+ function Li(t, e, n) {
4186
4179
  let r = t.steps.length - 1;
4187
4180
  if (r < e)
4188
4181
  return;
@@ -4194,12 +4187,12 @@ function Di(t, e, n) {
4194
4187
  o == null && (o = u);
4195
4188
  }), t.setSelection(Z.near(t.doc.resolve(o), n));
4196
4189
  }
4197
- function Li(t, e) {
4190
+ function Fi(t, e) {
4198
4191
  return !e || !t ? t : t.bind(e);
4199
4192
  }
4200
4193
  class sn {
4201
4194
  constructor(e, n, r) {
4202
- this.name = e, this.init = Li(n.init, r), this.apply = Li(n.apply, r);
4195
+ this.name = e, this.init = Fi(n.init, r), this.apply = Fi(n.apply, r);
4203
4196
  }
4204
4197
  }
4205
4198
  new sn("doc", {
@@ -4231,10 +4224,10 @@ new sn("doc", {
4231
4224
  return t.scrolledIntoView ? e + 1 : e;
4232
4225
  }
4233
4226
  });
4234
- function js(t, e, n) {
4227
+ function Gs(t, e, n) {
4235
4228
  for (let r in t) {
4236
4229
  let i = t[r];
4237
- i instanceof Function ? i = i.bind(e) : r == "handleDOMEvents" && (i = js(i, e, {})), n[r] = i;
4230
+ i instanceof Function ? i = i.bind(e) : r == "handleDOMEvents" && (i = Gs(i, e, {})), n[r] = i;
4238
4231
  }
4239
4232
  return n;
4240
4233
  }
@@ -4243,7 +4236,7 @@ class In {
4243
4236
  Create a plugin.
4244
4237
  */
4245
4238
  constructor(e) {
4246
- this.spec = e, this.props = {}, e.props && js(e.props, this, this.props), this.key = e.key ? e.key.key : Gs("plugin");
4239
+ this.spec = e, this.props = {}, e.props && Gs(e.props, this, this.props), this.key = e.key ? e.key.key : Zs("plugin");
4247
4240
  }
4248
4241
  /**
4249
4242
  Extract the plugin's state field from an editor state.
@@ -4253,7 +4246,7 @@ class In {
4253
4246
  }
4254
4247
  }
4255
4248
  const Gn = /* @__PURE__ */ Object.create(null);
4256
- function Gs(t) {
4249
+ function Zs(t) {
4257
4250
  return t in Gn ? t + "$" + ++Gn[t] : (Gn[t] = 0, t + "$");
4258
4251
  }
4259
4252
  class Vr {
@@ -4261,7 +4254,7 @@ class Vr {
4261
4254
  Create a plugin key.
4262
4255
  */
4263
4256
  constructor(e = "key") {
4264
- this.key = Gs(e);
4257
+ this.key = Zs(e);
4265
4258
  }
4266
4259
  /**
4267
4260
  Get the active plugin with this key, if any, from an editor
@@ -4459,7 +4452,7 @@ const lc = /^```([a-z]+)?[\s\n]$/, ac = /^~~~([a-z]+)?[\s\n]$/, cc = Ve.create({
4459
4452
  addCommands() {
4460
4453
  return {
4461
4454
  setHorizontalRule: () => ({ chain: t, state: e }) => {
4462
- if (!Kl(e, e.schema.nodes[this.name]))
4455
+ if (!Jl(e, e.schema.nodes[this.name]))
4463
4456
  return !1;
4464
4457
  const { selection: n } = e, { $from: r, $to: i } = n, s = t();
4465
4458
  return r.parentOffset === 0 ? s.insertContentAt({
@@ -4467,7 +4460,7 @@ const lc = /^```([a-z]+)?[\s\n]$/, ac = /^~~~([a-z]+)?[\s\n]$/, cc = Ve.create({
4467
4460
  to: i.pos
4468
4461
  }, {
4469
4462
  type: this.name
4470
- }) : Jl(n) ? s.insertContentAt(i.pos, {
4463
+ }) : Wl(n) ? s.insertContentAt(i.pos, {
4471
4464
  type: this.name
4472
4465
  }) : s.insertContent({ type: this.name }), s.command(({ tr: o, dispatch: l }) => {
4473
4466
  var a;
@@ -4488,7 +4481,7 @@ const lc = /^```([a-z]+)?[\s\n]$/, ac = /^~~~([a-z]+)?[\s\n]$/, cc = Ve.create({
4488
4481
  },
4489
4482
  addInputRules() {
4490
4483
  return [
4491
- ql({
4484
+ Kl({
4492
4485
  find: /^(?:---|—-|___\s|\*\*\*\s)$/,
4493
4486
  type: this.type
4494
4487
  })
@@ -4574,9 +4567,9 @@ ce.prototype.map = function(e, n, r) {
4574
4567
  }, n, r), i;
4575
4568
  };
4576
4569
  ce.from = function(e) {
4577
- return e instanceof ce ? e : e && e.length ? new Zs(e) : ce.empty;
4570
+ return e instanceof ce ? e : e && e.length ? new Qs(e) : ce.empty;
4578
4571
  };
4579
- var Zs = /* @__PURE__ */ (function(t) {
4572
+ var Qs = /* @__PURE__ */ (function(t) {
4580
4573
  function e(r) {
4581
4574
  t.call(this), this.values = r;
4582
4575
  }
@@ -4608,7 +4601,7 @@ var Zs = /* @__PURE__ */ (function(t) {
4608
4601
  return 0;
4609
4602
  }, Object.defineProperties(e.prototype, n), e;
4610
4603
  })(ce);
4611
- ce.empty = new Zs([]);
4604
+ ce.empty = new Qs([]);
4612
4605
  var pc = /* @__PURE__ */ (function(t) {
4613
4606
  function e(n, r) {
4614
4607
  t.call(this), this.left = n, this.right = r, this.length = n.length + r.length, this.depth = Math.max(n.depth, r.depth) + 1;
@@ -4790,9 +4783,9 @@ function bc(t, e, n, r) {
4790
4783
  if (n.steps.length == 0)
4791
4784
  return t;
4792
4785
  if (o && o.getMeta(pt))
4793
- return o.getMeta(pt).redo ? new Qe(t.done.addTransform(n, void 0, r, un(e)), t.undone, Fi(n.mapping.maps), t.prevTime, t.prevComposition) : new Qe(t.done, t.undone.addTransform(n, void 0, r, un(e)), null, t.prevTime, t.prevComposition);
4786
+ return o.getMeta(pt).redo ? new Qe(t.done.addTransform(n, void 0, r, un(e)), t.undone, Ri(n.mapping.maps), t.prevTime, t.prevComposition) : new Qe(t.done, t.undone.addTransform(n, void 0, r, un(e)), null, t.prevTime, t.prevComposition);
4794
4787
  if (n.getMeta("addToHistory") !== !1 && !(o && o.getMeta("addToHistory") === !1)) {
4795
- let l = n.getMeta("composition"), a = t.prevTime == 0 || !o && t.prevComposition != l && (t.prevTime < (n.time || 0) - r.newGroupDelay || !xc(n, t.prevRanges)), c = o ? Zn(t.prevRanges, n.mapping) : Fi(n.mapping.maps);
4788
+ let l = n.getMeta("composition"), a = t.prevTime == 0 || !o && t.prevComposition != l && (t.prevTime < (n.time || 0) - r.newGroupDelay || !xc(n, t.prevRanges)), c = o ? Zn(t.prevRanges, n.mapping) : Ri(n.mapping.maps);
4796
4789
  return new Qe(t.done.addTransform(n, a ? e.selection.getBookmark() : void 0, r, un(e)), De.empty, c, n.time, l ?? t.prevComposition);
4797
4790
  } else return (s = n.getMeta("rebased")) ? new Qe(t.done.rebased(n, s), t.undone.rebased(n, s), Zn(t.prevRanges, n.mapping), t.prevTime, t.prevComposition) : new Qe(t.done.addMaps(n.mapping.maps), t.undone.addMaps(n.mapping.maps), Zn(t.prevRanges, n.mapping), t.prevTime, t.prevComposition);
4798
4791
  }
@@ -4807,7 +4800,7 @@ function xc(t, e) {
4807
4800
  r <= e[s + 1] && i >= e[s] && (n = !0);
4808
4801
  }), n;
4809
4802
  }
4810
- function Fi(t) {
4803
+ function Ri(t) {
4811
4804
  let e = [];
4812
4805
  for (let n = t.length - 1; n >= 0 && e.length == 0; n--)
4813
4806
  t[n].forEach((r, i, s, o) => e.push(s, o));
@@ -4830,11 +4823,11 @@ function kc(t, e, n) {
4830
4823
  let o = s.selection.resolve(s.transform.doc), l = (n ? t.done : t.undone).addTransform(s.transform, e.selection.getBookmark(), i, r), a = new Qe(n ? l : s.remaining, n ? s.remaining : l, null, 0, -1);
4831
4824
  return s.transform.setSelection(o).setMeta(pt, { redo: n, historyState: a });
4832
4825
  }
4833
- let Qn = !1, Ri = null;
4826
+ let Qn = !1, Pi = null;
4834
4827
  function un(t) {
4835
4828
  let e = t.plugins;
4836
- if (Ri != e) {
4837
- Qn = !1, Ri = e;
4829
+ if (Pi != e) {
4830
+ Qn = !1, Pi = e;
4838
4831
  for (let n = 0; n < e.length; n++)
4839
4832
  if (e[n].spec.historyPreserveItems) {
4840
4833
  Qn = !0;
@@ -4862,14 +4855,14 @@ function Cc(t = {}) {
4862
4855
  props: {
4863
4856
  handleDOMEvents: {
4864
4857
  beforeinput(e, n) {
4865
- let r = n.inputType, i = r == "historyUndo" ? Xs : r == "historyRedo" ? Ys : null;
4858
+ let r = n.inputType, i = r == "historyUndo" ? Ys : r == "historyRedo" ? eo : null;
4866
4859
  return !i || !e.editable ? !1 : (n.preventDefault(), i(e.state, e.dispatch));
4867
4860
  }
4868
4861
  }
4869
4862
  }
4870
4863
  });
4871
4864
  }
4872
- function Qs(t, e) {
4865
+ function Xs(t, e) {
4873
4866
  return (n, r) => {
4874
4867
  let i = pt.getState(n);
4875
4868
  if (!i || (t ? i.undone : i.done).eventCount == 0)
@@ -4881,7 +4874,7 @@ function Qs(t, e) {
4881
4874
  return !0;
4882
4875
  };
4883
4876
  }
4884
- const Xs = Qs(!1, !0), Ys = Qs(!0, !0), Pt = Lr.create({
4877
+ const Ys = Xs(!1, !0), eo = Xs(!0, !0), Pt = Lr.create({
4885
4878
  name: "history",
4886
4879
  addOptions() {
4887
4880
  return {
@@ -4891,8 +4884,8 @@ const Xs = Qs(!1, !0), Ys = Qs(!0, !0), Pt = Lr.create({
4891
4884
  },
4892
4885
  addCommands() {
4893
4886
  return {
4894
- undo: () => ({ state: t, dispatch: e }) => Xs(t, e),
4895
- redo: () => ({ state: t, dispatch: e }) => Ys(t, e)
4887
+ undo: () => ({ state: t, dispatch: e }) => Ys(t, e),
4888
+ redo: () => ({ state: t, dispatch: e }) => eo(t, e)
4896
4889
  };
4897
4890
  },
4898
4891
  addProseMirrorPlugins() {
@@ -4983,7 +4976,7 @@ class Nc {
4983
4976
  if (n && !s) {
4984
4977
  let o = n.pos;
4985
4978
  if (this.editorView.dragging && this.editorView.dragging.slice) {
4986
- let l = Ws(this.editorView.state.doc, o, this.editorView.dragging.slice);
4979
+ let l = js(this.editorView.state.doc, o, this.editorView.dragging.slice);
4987
4980
  l != null && (o = l);
4988
4981
  }
4989
4982
  this.setCursor(o), this.scheduleRemoval(5e3);
@@ -5159,10 +5152,10 @@ const yt = function(t) {
5159
5152
  for (var e = 0; ; e++)
5160
5153
  if (t = t.previousSibling, !t)
5161
5154
  return e;
5162
- }, eo = function(t, e, n, r) {
5163
- return n && (Pi(t, e, n, r, -1) || Pi(t, e, n, r, 1));
5155
+ }, to = function(t, e, n, r) {
5156
+ return n && (Vi(t, e, n, r, -1) || Vi(t, e, n, r, 1));
5164
5157
  }, Pc = /^(img|br|input|textarea|hr)$/i;
5165
- function Pi(t, e, n, r, i) {
5158
+ function Vi(t, e, n, r, i) {
5166
5159
  for (var s; ; ) {
5167
5160
  if (t == n && e == r)
5168
5161
  return !0;
@@ -5203,16 +5196,16 @@ function $r(t) {
5203
5196
  ;
5204
5197
  return e && e.node && e.node.isBlock && (e.dom == t || e.contentDOM == t);
5205
5198
  }
5206
- const to = function(t) {
5207
- return t.focusNode && eo(t.focusNode, t.focusOffset, t.anchorNode, t.anchorOffset);
5199
+ const no = function(t) {
5200
+ return t.focusNode && to(t.focusNode, t.focusOffset, t.anchorNode, t.anchorOffset);
5208
5201
  };
5209
- function no(t, e) {
5202
+ function ro(t, e) {
5210
5203
  let n = document.createEvent("Event");
5211
5204
  return n.initEvent("keydown", !0, !0), n.keyCode = t, n.key = n.code = e, n;
5212
5205
  }
5213
- const He = typeof navigator < "u" ? navigator : null, Vi = typeof document < "u" ? document : null, rt = He && He.userAgent || "", yr = /Edge\/(\d+)/.exec(rt), ro = /MSIE \d/.exec(rt), br = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(rt), Yt = !!(ro || br || yr), io = ro ? document.documentMode : br ? +br[1] : yr ? +yr[1] : 0, Dn = !Yt && /gecko\/(\d+)/i.test(rt);
5206
+ const He = typeof navigator < "u" ? navigator : null, $i = typeof document < "u" ? document : null, rt = He && He.userAgent || "", yr = /Edge\/(\d+)/.exec(rt), io = /MSIE \d/.exec(rt), br = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(rt), Yt = !!(io || br || yr), so = io ? document.documentMode : br ? +br[1] : yr ? +yr[1] : 0, Dn = !Yt && /gecko\/(\d+)/i.test(rt);
5214
5207
  Dn && +(/Firefox\/(\d+)/.exec(rt) || [0, 0])[1];
5215
- const xr = !Yt && /Chrome\/(\d+)/.exec(rt), je = !!xr, so = xr ? +xr[1] : 0, bt = !Yt && !!He && /Apple Computer/.test(He.vendor), _r = bt && (/Mobile\/\w+/.test(rt) || !!He && He.maxTouchPoints > 2), Me = _r || (He ? /Mac/.test(He.platform) : !1), oo = He ? /Win/.test(He.platform) : !1, en = /Android \d/.test(rt), Br = !!Vi && "webkitFontSmoothing" in Vi.documentElement.style, $c = Br ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
5208
+ const xr = !Yt && /Chrome\/(\d+)/.exec(rt), je = !!xr, oo = xr ? +xr[1] : 0, bt = !Yt && !!He && /Apple Computer/.test(He.vendor), _r = bt && (/Mobile\/\w+/.test(rt) || !!He && He.maxTouchPoints > 2), Me = _r || (He ? /Mac/.test(He.platform) : !1), lo = He ? /Win/.test(He.platform) : !1, en = /Android \d/.test(rt), Br = !!$i && "webkitFontSmoothing" in $i.documentElement.style, $c = Br ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
5216
5209
  function _c(t, e = null) {
5217
5210
  let n = t.domSelectionRange(), r = t.state.doc;
5218
5211
  if (!n.focusNode)
@@ -5221,7 +5214,7 @@ function _c(t, e = null) {
5221
5214
  if (o < 0)
5222
5215
  return null;
5223
5216
  let l = r.resolve(o), a, c;
5224
- if (to(n)) {
5217
+ if (no(n)) {
5225
5218
  for (a = o; i && !i.node; )
5226
5219
  i = i.parent;
5227
5220
  let d = i.node;
@@ -5247,19 +5240,19 @@ function _c(t, e = null) {
5247
5240
  let u = r.resolve(a);
5248
5241
  if (!c) {
5249
5242
  let d = e == "pointer" || t.state.selection.head < l.pos && !s ? 1 : -1;
5250
- c = ao(t, u, l, d);
5243
+ c = co(t, u, l, d);
5251
5244
  }
5252
5245
  return c;
5253
5246
  }
5254
- function lo(t) {
5247
+ function ao(t) {
5255
5248
  return t.editable ? t.hasFocus() : Uc(t) && document.activeElement && document.activeElement.contains(t.dom);
5256
5249
  }
5257
5250
  function zr(t, e = !1) {
5258
5251
  let n = t.state.selection;
5259
- if (Hc(t, n), !!lo(t)) {
5252
+ if (Hc(t, n), !!ao(t)) {
5260
5253
  if (!e && t.input.mouseDown && t.input.mouseDown.allowDefault && je) {
5261
5254
  let r = t.domSelectionRange(), i = t.domObserver.currentSelection;
5262
- if (r.anchorNode && i.anchorNode && eo(r.anchorNode, r.anchorOffset, i.anchorNode, i.anchorOffset)) {
5255
+ if (r.anchorNode && i.anchorNode && to(r.anchorNode, r.anchorOffset, i.anchorNode, i.anchorOffset)) {
5263
5256
  t.input.mouseDown.delayedSelectionSync = !0, t.domObserver.setCurSelection();
5264
5257
  return;
5265
5258
  }
@@ -5268,13 +5261,13 @@ function zr(t, e = !1) {
5268
5261
  zc(t);
5269
5262
  else {
5270
5263
  let { anchor: r, head: i } = n, s, o;
5271
- $i && !(n instanceof G) && (n.$from.parent.inlineContent || (s = _i(t, n.from)), !n.empty && !n.$from.parent.inlineContent && (o = _i(t, n.to))), t.docView.setSelection(r, i, t, e), $i && (s && Bi(s), o && Bi(o)), n.visible ? t.dom.classList.remove("ProseMirror-hideselection") : (t.dom.classList.add("ProseMirror-hideselection"), "onselectionchange" in document && Bc(t));
5264
+ _i && !(n instanceof G) && (n.$from.parent.inlineContent || (s = Bi(t, n.from)), !n.empty && !n.$from.parent.inlineContent && (o = Bi(t, n.to))), t.docView.setSelection(r, i, t, e), _i && (s && zi(s), o && zi(o)), n.visible ? t.dom.classList.remove("ProseMirror-hideselection") : (t.dom.classList.add("ProseMirror-hideselection"), "onselectionchange" in document && Bc(t));
5272
5265
  }
5273
5266
  t.domObserver.setCurSelection(), t.domObserver.connectSelection();
5274
5267
  }
5275
5268
  }
5276
- const $i = bt || je && so < 63;
5277
- function _i(t, e) {
5269
+ const _i = bt || je && oo < 63;
5270
+ function Bi(t, e) {
5278
5271
  let { node: n, offset: r } = t.docView.domFromPos(e, 0), i = r < n.childNodes.length ? n.childNodes[r] : null, s = r ? n.childNodes[r - 1] : null;
5279
5272
  if (bt && i && i.contentEditable == "false")
5280
5273
  return er(i);
@@ -5288,7 +5281,7 @@ function _i(t, e) {
5288
5281
  function er(t) {
5289
5282
  return t.contentEditable = "true", bt && t.draggable && (t.draggable = !1, t.wasDraggable = !0), t;
5290
5283
  }
5291
- function Bi(t) {
5284
+ function zi(t) {
5292
5285
  t.contentEditable = "false", t.wasDraggable && (t.draggable = !0, t.wasDraggable = null);
5293
5286
  }
5294
5287
  function Bc(t) {
@@ -5297,7 +5290,7 @@ function Bc(t) {
5297
5290
  let n = t.domSelectionRange(), r = n.anchorNode, i = n.anchorOffset;
5298
5291
  e.addEventListener("selectionchange", t.input.hideSelectionGuard = () => {
5299
5292
  (n.anchorNode != r || n.anchorOffset != i) && (e.removeEventListener("selectionchange", t.input.hideSelectionGuard), setTimeout(() => {
5300
- (!lo(t) || t.state.selection.visible) && t.dom.classList.remove("ProseMirror-hideselection");
5293
+ (!ao(t) || t.state.selection.visible) && t.dom.classList.remove("ProseMirror-hideselection");
5301
5294
  }, 20));
5302
5295
  });
5303
5296
  }
@@ -5306,19 +5299,19 @@ function zc(t) {
5306
5299
  if (!e)
5307
5300
  return;
5308
5301
  let n = t.cursorWrapper.dom, r = n.nodeName == "IMG";
5309
- r ? e.collapse(n.parentNode, yt(n) + 1) : e.collapse(n, 0), !r && !t.state.selection.visible && Yt && io <= 11 && (n.disabled = !0, n.disabled = !1);
5302
+ r ? e.collapse(n.parentNode, yt(n) + 1) : e.collapse(n, 0), !r && !t.state.selection.visible && Yt && so <= 11 && (n.disabled = !0, n.disabled = !1);
5310
5303
  }
5311
5304
  function Hc(t, e) {
5312
5305
  if (e instanceof U) {
5313
5306
  let n = t.docView.descAt(e.from);
5314
- n != t.lastSelectedViewDesc && (zi(t), n && n.selectNode(), t.lastSelectedViewDesc = n);
5307
+ n != t.lastSelectedViewDesc && (Hi(t), n && n.selectNode(), t.lastSelectedViewDesc = n);
5315
5308
  } else
5316
- zi(t);
5309
+ Hi(t);
5317
5310
  }
5318
- function zi(t) {
5311
+ function Hi(t) {
5319
5312
  t.lastSelectedViewDesc && (t.lastSelectedViewDesc.parent && t.lastSelectedViewDesc.deselectNode(), t.lastSelectedViewDesc = void 0);
5320
5313
  }
5321
- function ao(t, e, n, r) {
5314
+ function co(t, e, n, r) {
5322
5315
  return t.someProp("createSelectionBetween", (i) => i(t, e, n)) || G.between(e, n, r);
5323
5316
  }
5324
5317
  function Uc(t) {
@@ -5338,7 +5331,7 @@ function kr(t, e) {
5338
5331
  function Xe(t, e) {
5339
5332
  return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()), !0;
5340
5333
  }
5341
- function Hi(t, e, n) {
5334
+ function Ui(t, e, n) {
5342
5335
  let r = t.state.selection;
5343
5336
  if (r instanceof G)
5344
5337
  if (n.indexOf("s") > -1) {
@@ -5397,7 +5390,7 @@ function qc(t) {
5397
5390
  break;
5398
5391
  }
5399
5392
  } else {
5400
- if (co(n))
5393
+ if (uo(n))
5401
5394
  break;
5402
5395
  {
5403
5396
  let l = n.previousSibling;
@@ -5429,7 +5422,7 @@ function Kc(t) {
5429
5422
  else
5430
5423
  break;
5431
5424
  } else {
5432
- if (co(n))
5425
+ if (uo(n))
5433
5426
  break;
5434
5427
  {
5435
5428
  let l = n.nextSibling;
@@ -5446,7 +5439,7 @@ function Kc(t) {
5446
5439
  }
5447
5440
  s && vr(t, s, o);
5448
5441
  }
5449
- function co(t) {
5442
+ function uo(t) {
5450
5443
  let e = t.pmViewDesc;
5451
5444
  return e && e.node && e.node.isBlock;
5452
5445
  }
@@ -5482,7 +5475,7 @@ function vr(t, e, n) {
5482
5475
  let r = t.domSelection();
5483
5476
  if (!r)
5484
5477
  return;
5485
- if (to(r)) {
5478
+ if (no(r)) {
5486
5479
  let s = document.createRange();
5487
5480
  s.setEnd(e, n), s.setStart(e, n), r.removeAllRanges(), r.addRange(s);
5488
5481
  } else r.extend && r.extend(e, n);
@@ -5492,9 +5485,9 @@ function vr(t, e, n) {
5492
5485
  t.state == i && zr(t);
5493
5486
  }, 50);
5494
5487
  }
5495
- function Ui(t, e) {
5488
+ function qi(t, e) {
5496
5489
  let n = t.state.doc.resolve(e);
5497
- if (!(je || oo) && n.parent.inlineContent) {
5490
+ if (!(je || lo) && n.parent.inlineContent) {
5498
5491
  let i = t.coordsAtPos(e);
5499
5492
  if (e > n.start()) {
5500
5493
  let s = t.coordsAtPos(e - 1), o = (s.top + s.bottom) / 2;
@@ -5509,7 +5502,7 @@ function Ui(t, e) {
5509
5502
  }
5510
5503
  return getComputedStyle(t.dom).direction == "rtl" ? "rtl" : "ltr";
5511
5504
  }
5512
- function qi(t, e, n) {
5505
+ function Ki(t, e, n) {
5513
5506
  let r = t.state.selection;
5514
5507
  if (r instanceof G && !r.empty || n.indexOf("s") > -1 || Me && n.indexOf("m") > -1)
5515
5508
  return !1;
@@ -5525,7 +5518,7 @@ function qi(t, e, n) {
5525
5518
  }
5526
5519
  return !1;
5527
5520
  }
5528
- function Ki(t, e) {
5521
+ function Ji(t, e) {
5529
5522
  if (!(t.state.selection instanceof G))
5530
5523
  return !0;
5531
5524
  let { $head: n, $anchor: r, empty: i } = t.state.selection;
@@ -5542,7 +5535,7 @@ function Ki(t, e) {
5542
5535
  }
5543
5536
  return !1;
5544
5537
  }
5545
- function Ji(t, e, n) {
5538
+ function Wi(t, e, n) {
5546
5539
  t.domObserver.stop(), e.contentEditable = n, t.domObserver.start();
5547
5540
  }
5548
5541
  function jc(t) {
@@ -5551,7 +5544,7 @@ function jc(t) {
5551
5544
  let { focusNode: e, focusOffset: n } = t.domSelectionRange();
5552
5545
  if (e && e.nodeType == 1 && n == 0 && e.firstChild && e.firstChild.contentEditable == "false") {
5553
5546
  let r = e.firstChild;
5554
- Ji(t, r, "true"), setTimeout(() => Ji(t, r, "false"), 20);
5547
+ Wi(t, r, "true"), setTimeout(() => Wi(t, r, "false"), 20);
5555
5548
  }
5556
5549
  return !1;
5557
5550
  }
@@ -5562,28 +5555,28 @@ function Gc(t) {
5562
5555
  function Zc(t, e) {
5563
5556
  let n = e.keyCode, r = Gc(e);
5564
5557
  if (n == 8 || Me && n == 72 && r == "c")
5565
- return Ki(t, -1) || kt(t, -1);
5558
+ return Ji(t, -1) || kt(t, -1);
5566
5559
  if (n == 46 && !e.shiftKey || Me && n == 68 && r == "c")
5567
- return Ki(t, 1) || kt(t, 1);
5560
+ return Ji(t, 1) || kt(t, 1);
5568
5561
  if (n == 13 || n == 27)
5569
5562
  return !0;
5570
5563
  if (n == 37 || Me && n == 66 && r == "c") {
5571
- let i = n == 37 ? Ui(t, t.state.selection.from) == "ltr" ? -1 : 1 : -1;
5572
- return Hi(t, i, r) || kt(t, i);
5564
+ let i = n == 37 ? qi(t, t.state.selection.from) == "ltr" ? -1 : 1 : -1;
5565
+ return Ui(t, i, r) || kt(t, i);
5573
5566
  } else if (n == 39 || Me && n == 70 && r == "c") {
5574
- let i = n == 39 ? Ui(t, t.state.selection.from) == "ltr" ? 1 : -1 : 1;
5575
- return Hi(t, i, r) || kt(t, i);
5567
+ let i = n == 39 ? qi(t, t.state.selection.from) == "ltr" ? 1 : -1 : 1;
5568
+ return Ui(t, i, r) || kt(t, i);
5576
5569
  } else {
5577
5570
  if (n == 38 || Me && n == 80 && r == "c")
5578
- return qi(t, -1, r) || kt(t, -1);
5571
+ return Ki(t, -1, r) || kt(t, -1);
5579
5572
  if (n == 40 || Me && n == 78 && r == "c")
5580
- return jc(t) || qi(t, 1, r) || kt(t, 1);
5573
+ return jc(t) || Ki(t, 1, r) || kt(t, 1);
5581
5574
  if (r == (Me ? "m" : "c") && (n == 66 || n == 73 || n == 89 || n == 90))
5582
5575
  return !0;
5583
5576
  }
5584
5577
  return !1;
5585
5578
  }
5586
- function uo(t, e) {
5579
+ function fo(t, e) {
5587
5580
  t.someProp("transformCopied", (m) => {
5588
5581
  e = m(e, t);
5589
5582
  });
@@ -5593,10 +5586,10 @@ function uo(t, e) {
5593
5586
  let m = r.firstChild;
5594
5587
  n.push(m.type.name, m.attrs != m.type.defaultAttrs ? m.attrs : null), r = m.content;
5595
5588
  }
5596
- let o = t.someProp("clipboardSerializer") || Mn.fromSchema(t.state.schema), l = yo(), a = l.createElement("div");
5589
+ let o = t.someProp("clipboardSerializer") || Mn.fromSchema(t.state.schema), l = bo(), a = l.createElement("div");
5597
5590
  a.appendChild(o.serializeFragment(r, { document: l }));
5598
5591
  let c = a.firstChild, u, d = 0;
5599
- for (; c && c.nodeType == 1 && (u = go[c.nodeName.toLowerCase()]); ) {
5592
+ for (; c && c.nodeType == 1 && (u = yo[c.nodeName.toLowerCase()]); ) {
5600
5593
  for (let m = u.length - 1; m >= 0; m--) {
5601
5594
  let x = l.createElement(u[m]);
5602
5595
  for (; a.firstChild; )
@@ -5611,7 +5604,7 @@ function uo(t, e) {
5611
5604
  `);
5612
5605
  return { dom: a, text: p, slice: e };
5613
5606
  }
5614
- function fo(t, e, n, r, i) {
5607
+ function ho(t, e, n, r, i) {
5615
5608
  let s = i.parent.type.spec.code, o, l;
5616
5609
  if (!n && !e)
5617
5610
  return null;
@@ -5655,14 +5648,14 @@ function fo(t, e, n, r, i) {
5655
5648
  return p.nodeName == "BR" && !p.nextSibling && p.parentNode && !Qc.test(p.parentNode.nodeName) ? { ignore: !0 } : null;
5656
5649
  }
5657
5650
  })), u)
5658
- l = nu(Wi(l, +u[1], +u[2]), u[4]);
5651
+ l = nu(ji(l, +u[1], +u[2]), u[4]);
5659
5652
  else if (l = H.maxOpen(Xc(l.content, i), !0), l.openStart || l.openEnd) {
5660
5653
  let d = 0, p = 0;
5661
5654
  for (let m = l.content.firstChild; d < l.openStart && !m.type.spec.isolating; d++, m = m.firstChild)
5662
5655
  ;
5663
5656
  for (let m = l.content.lastChild; p < l.openEnd && !m.type.spec.isolating; p++, m = m.lastChild)
5664
5657
  ;
5665
- l = Wi(l, d, p);
5658
+ l = ji(l, d, p);
5666
5659
  }
5667
5660
  return t.someProp("transformPasted", (d) => {
5668
5661
  l = d(l, t, a);
@@ -5680,11 +5673,11 @@ function Xc(t, e) {
5680
5673
  let a = i.findWrapping(l.type), c;
5681
5674
  if (!a)
5682
5675
  return o = null;
5683
- if (c = o.length && s.length && po(a, s, l, o[o.length - 1], 0))
5676
+ if (c = o.length && s.length && mo(a, s, l, o[o.length - 1], 0))
5684
5677
  o[o.length - 1] = c;
5685
5678
  else {
5686
- o.length && (o[o.length - 1] = mo(o[o.length - 1], s.length));
5687
- let u = ho(l, a);
5679
+ o.length && (o[o.length - 1] = go(o[o.length - 1], s.length));
5680
+ let u = po(l, a);
5688
5681
  o.push(u), i = i.matchType(u.type), s = a;
5689
5682
  }
5690
5683
  }), o)
@@ -5692,34 +5685,34 @@ function Xc(t, e) {
5692
5685
  }
5693
5686
  return t;
5694
5687
  }
5695
- function ho(t, e, n = 0) {
5688
+ function po(t, e, n = 0) {
5696
5689
  for (let r = e.length - 1; r >= n; r--)
5697
5690
  t = e[r].create(null, z.from(t));
5698
5691
  return t;
5699
5692
  }
5700
- function po(t, e, n, r, i) {
5693
+ function mo(t, e, n, r, i) {
5701
5694
  if (i < t.length && i < e.length && t[i] == e[i]) {
5702
- let s = po(t, e, n, r.lastChild, i + 1);
5695
+ let s = mo(t, e, n, r.lastChild, i + 1);
5703
5696
  if (s)
5704
5697
  return r.copy(r.content.replaceChild(r.childCount - 1, s));
5705
5698
  if (r.contentMatchAt(r.childCount).matchType(i == t.length - 1 ? n.type : t[i + 1]))
5706
- return r.copy(r.content.append(z.from(ho(n, t, i + 1))));
5699
+ return r.copy(r.content.append(z.from(po(n, t, i + 1))));
5707
5700
  }
5708
5701
  }
5709
- function mo(t, e) {
5702
+ function go(t, e) {
5710
5703
  if (e == 0)
5711
5704
  return t;
5712
- let n = t.content.replaceChild(t.childCount - 1, mo(t.lastChild, e - 1)), r = t.contentMatchAt(t.childCount).fillBefore(z.empty, !0);
5705
+ let n = t.content.replaceChild(t.childCount - 1, go(t.lastChild, e - 1)), r = t.contentMatchAt(t.childCount).fillBefore(z.empty, !0);
5713
5706
  return t.copy(n.append(r));
5714
5707
  }
5715
5708
  function Cr(t, e, n, r, i, s) {
5716
5709
  let o = e < 0 ? t.firstChild : t.lastChild, l = o.content;
5717
5710
  return t.childCount > 1 && (s = 0), i < r - 1 && (l = Cr(l, e, n, r, i + 1, s)), i >= n && (l = e < 0 ? o.contentMatchAt(0).fillBefore(l, s <= i).append(l) : l.append(o.contentMatchAt(o.childCount).fillBefore(z.empty, !0))), t.replaceChild(e < 0 ? 0 : t.childCount - 1, o.copy(l));
5718
5711
  }
5719
- function Wi(t, e, n) {
5712
+ function ji(t, e, n) {
5720
5713
  return e < t.openStart && (t = new H(Cr(t.content, -1, e, t.openStart, 0, t.openEnd), e, t.openEnd)), n < t.openEnd && (t = new H(Cr(t.content, 1, n, t.openEnd, 0, 0), t.openStart, n)), t;
5721
5714
  }
5722
- const go = {
5715
+ const yo = {
5723
5716
  thead: ["table"],
5724
5717
  tbody: ["table"],
5725
5718
  tfoot: ["table"],
@@ -5730,9 +5723,9 @@ const go = {
5730
5723
  td: ["table", "tbody", "tr"],
5731
5724
  th: ["table", "tbody", "tr"]
5732
5725
  };
5733
- let ji = null;
5734
- function yo() {
5735
- return ji || (ji = document.implementation.createHTMLDocument("title"));
5726
+ let Gi = null;
5727
+ function bo() {
5728
+ return Gi || (Gi = document.implementation.createHTMLDocument("title"));
5736
5729
  }
5737
5730
  let tr = null;
5738
5731
  function Yc(t) {
@@ -5742,8 +5735,8 @@ function Yc(t) {
5742
5735
  function eu(t) {
5743
5736
  let e = /^(\s*<meta [^>]*>)*/.exec(t);
5744
5737
  e && (t = t.slice(e[0].length));
5745
- let n = yo().createElement("div"), r = /<([a-z][^>\s]+)/i.exec(t), i;
5746
- if ((i = r && go[r[1].toLowerCase()]) && (t = i.map((s) => "<" + s + ">").join("") + t + i.map((s) => "</" + s + ">").reverse().join("")), n.innerHTML = Yc(t), i)
5738
+ let n = bo().createElement("div"), r = /<([a-z][^>\s]+)/i.exec(t), i;
5739
+ if ((i = r && yo[r[1].toLowerCase()]) && (t = i.map((s) => "<" + s + ">").join("") + t + i.map((s) => "</" + s + ">").reverse().join("")), n.innerHTML = Yc(t), i)
5747
5740
  for (let s = 0; s < i.length; s++)
5748
5741
  n = n.querySelector(i[s]) || n;
5749
5742
  return n;
@@ -5779,11 +5772,11 @@ function Ye(t, e) {
5779
5772
  }
5780
5773
  Ee.keydown = (t, e) => {
5781
5774
  let n = e;
5782
- if (t.input.shiftKey = n.keyCode == 16 || n.shiftKey, !xo(t, n) && (t.input.lastKeyCode = n.keyCode, t.input.lastKeyCodeTime = Date.now(), !(en && je && n.keyCode == 13)))
5775
+ if (t.input.shiftKey = n.keyCode == 16 || n.shiftKey, !ko(t, n) && (t.input.lastKeyCode = n.keyCode, t.input.lastKeyCodeTime = Date.now(), !(en && je && n.keyCode == 13)))
5783
5776
  if (n.keyCode != 229 && t.domObserver.forceFlush(), _r && n.keyCode == 13 && !n.ctrlKey && !n.altKey && !n.metaKey) {
5784
5777
  let r = Date.now();
5785
5778
  t.input.lastIOSEnter = r, t.input.lastIOSEnterFallbackTimeout = setTimeout(() => {
5786
- t.input.lastIOSEnter == r && (t.someProp("handleKeyDown", (i) => i(t, no(13, "Enter"))), t.input.lastIOSEnter = 0);
5779
+ t.input.lastIOSEnter == r && (t.someProp("handleKeyDown", (i) => i(t, ro(13, "Enter"))), t.input.lastIOSEnter = 0);
5787
5780
  }, 200);
5788
5781
  } else t.someProp("handleKeyDown", (r) => r(t, n)) || Zc(t, n) ? n.preventDefault() : Ye(t, "key");
5789
5782
  };
@@ -5792,7 +5785,7 @@ Ee.keyup = (t, e) => {
5792
5785
  };
5793
5786
  Ee.keypress = (t, e) => {
5794
5787
  let n = e;
5795
- if (xo(t, n) || !n.charCode || n.ctrlKey && !n.altKey || Me && n.metaKey)
5788
+ if (ko(t, n) || !n.charCode || n.ctrlKey && !n.altKey || Me && n.metaKey)
5796
5789
  return;
5797
5790
  if (t.someProp("handleKeyPress", (i) => i(t, n))) {
5798
5791
  n.preventDefault();
@@ -5877,18 +5870,18 @@ function cu(t, e, n) {
5877
5870
  function Ur(t) {
5878
5871
  return kn(t);
5879
5872
  }
5880
- const bo = Me ? "metaKey" : "ctrlKey";
5873
+ const xo = Me ? "metaKey" : "ctrlKey";
5881
5874
  $e.mousedown = (t, e) => {
5882
5875
  let n = e;
5883
5876
  t.input.shiftKey = n.shiftKey;
5884
5877
  let r = Ur(t), i = Date.now(), s = "singleClick";
5885
- i - t.input.lastClick.time < 500 && ru(n, t.input.lastClick) && !n[bo] && t.input.lastClick.button == n.button && (t.input.lastClick.type == "singleClick" ? s = "doubleClick" : t.input.lastClick.type == "doubleClick" && (s = "tripleClick")), t.input.lastClick = { time: i, x: n.clientX, y: n.clientY, type: s, button: n.button };
5878
+ i - t.input.lastClick.time < 500 && ru(n, t.input.lastClick) && !n[xo] && t.input.lastClick.button == n.button && (t.input.lastClick.type == "singleClick" ? s = "doubleClick" : t.input.lastClick.type == "doubleClick" && (s = "tripleClick")), t.input.lastClick = { time: i, x: n.clientX, y: n.clientY, type: s, button: n.button };
5886
5879
  let o = t.posAtCoords(Ln(n));
5887
5880
  o && (s == "singleClick" ? (t.input.mouseDown && t.input.mouseDown.done(), t.input.mouseDown = new uu(t, o, n, !!r)) : (s == "doubleClick" ? lu : au)(t, o.pos, o.inside, n) ? n.preventDefault() : Ye(t, "pointer"));
5888
5881
  };
5889
5882
  class uu {
5890
5883
  constructor(e, n, r, i) {
5891
- this.view = e, this.pos = n, this.event = r, this.flushed = i, this.delayedSelectionSync = !1, this.mightDrag = null, this.startDoc = e.state.doc, this.selectNode = !!r[bo], this.allowDefault = r.shiftKey;
5884
+ this.view = e, this.pos = n, this.event = r, this.flushed = i, this.delayedSelectionSync = !1, this.mightDrag = null, this.startDoc = e.state.doc, this.selectNode = !!r[xo], this.allowDefault = r.shiftKey;
5892
5885
  let s, o;
5893
5886
  if (n.inside > -1)
5894
5887
  s = e.state.doc.nodeAt(n.inside), o = n.inside;
@@ -5939,7 +5932,7 @@ $e.touchmove = (t) => {
5939
5932
  t.input.lastTouch = Date.now(), Ye(t, "pointer");
5940
5933
  };
5941
5934
  $e.contextmenu = (t) => Ur(t);
5942
- function xo(t, e) {
5935
+ function ko(t, e) {
5943
5936
  return t.composing ? !0 : bt && Math.abs(e.timeStamp - t.input.compositionEndedAt) < 500 ? (t.input.compositionEndedAt = -2e8, !0) : !1;
5944
5937
  }
5945
5938
  const du = en ? 5e3 : -1;
@@ -5947,7 +5940,7 @@ Ee.compositionstart = Ee.compositionupdate = (t) => {
5947
5940
  if (!t.composing) {
5948
5941
  t.domObserver.flush();
5949
5942
  let { state: e } = t, n = e.selection.$to;
5950
- if (e.selection instanceof G && (e.storedMarks || !n.textOffset && n.parentOffset && n.nodeBefore.marks.some((r) => r.type.spec.inclusive === !1) || je && oo && fu(t)))
5943
+ if (e.selection instanceof G && (e.storedMarks || !n.textOffset && n.parentOffset && n.nodeBefore.marks.some((r) => r.type.spec.inclusive === !1) || je && lo && fu(t)))
5951
5944
  t.markCursor = t.state.storedMarks || n.marks(), kn(t, !0), t.markCursor = null;
5952
5945
  else if (kn(t, !e.selection.empty), Dn && e.selection.empty && n.parentOffset && !n.textOffset && n.nodeBefore.marks.length) {
5953
5946
  let r = t.domSelectionRange();
@@ -5965,7 +5958,7 @@ Ee.compositionstart = Ee.compositionupdate = (t) => {
5965
5958
  }
5966
5959
  t.input.composing = !0;
5967
5960
  }
5968
- ko(t, du);
5961
+ vo(t, du);
5969
5962
  };
5970
5963
  function fu(t) {
5971
5964
  let { focusNode: e, focusOffset: n } = t.domSelectionRange();
@@ -5975,9 +5968,9 @@ function fu(t) {
5975
5968
  return r.nodeType == 1 && r.contentEditable == "false";
5976
5969
  }
5977
5970
  Ee.compositionend = (t, e) => {
5978
- t.composing && (t.input.composing = !1, t.input.compositionEndedAt = e.timeStamp, t.input.compositionPendingChanges = t.domObserver.pendingRecords().length ? t.input.compositionID : 0, t.input.compositionNode = null, t.input.badSafariComposition ? t.domObserver.forceFlush() : t.input.compositionPendingChanges && Promise.resolve().then(() => t.domObserver.flush()), t.input.compositionID++, ko(t, 20));
5971
+ t.composing && (t.input.composing = !1, t.input.compositionEndedAt = e.timeStamp, t.input.compositionPendingChanges = t.domObserver.pendingRecords().length ? t.input.compositionID : 0, t.input.compositionNode = null, t.input.badSafariComposition ? t.domObserver.forceFlush() : t.input.compositionPendingChanges && Promise.resolve().then(() => t.domObserver.flush()), t.input.compositionID++, vo(t, 20));
5979
5972
  };
5980
- function ko(t, e) {
5973
+ function vo(t, e) {
5981
5974
  clearTimeout(t.input.composingTimeout), e > -1 && (t.input.composingTimeout = setTimeout(() => kn(t), e));
5982
5975
  }
5983
5976
  function hu(t) {
@@ -6007,12 +6000,12 @@ function mu(t, e) {
6007
6000
  n.parentNode && n.parentNode.removeChild(n), t.focus();
6008
6001
  }, 50);
6009
6002
  }
6010
- const Gt = Yt && io < 15 || _r && $c < 604;
6003
+ const Gt = Yt && so < 15 || _r && $c < 604;
6011
6004
  $e.copy = Ee.cut = (t, e) => {
6012
6005
  let n = e, r = t.state.selection, i = n.type == "cut";
6013
6006
  if (r.empty)
6014
6007
  return;
6015
- let s = Gt ? null : n.clipboardData, o = r.content(), { dom: l, text: a } = uo(t, o);
6008
+ let s = Gt ? null : n.clipboardData, o = r.content(), { dom: l, text: a } = fo(t, o);
6016
6009
  s ? (n.preventDefault(), s.clearData(), s.setData("text/html", l.innerHTML), s.setData("text/plain", a)) : mu(t, l), i && t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent", "cut"));
6017
6010
  };
6018
6011
  function gu(t) {
@@ -6029,7 +6022,7 @@ function yu(t, e) {
6029
6022
  }, 50);
6030
6023
  }
6031
6024
  function Sr(t, e, n, r, i) {
6032
- let s = fo(t, e, n, r, t.state.selection.$from);
6025
+ let s = ho(t, e, n, r, t.state.selection.$from);
6033
6026
  if (t.someProp("handlePaste", (a) => a(t, i, s || H.empty)))
6034
6027
  return !0;
6035
6028
  if (!s)
@@ -6037,7 +6030,7 @@ function Sr(t, e, n, r, i) {
6037
6030
  let o = gu(s), l = o ? t.state.tr.replaceSelectionWith(o, r) : t.state.tr.replaceSelection(s);
6038
6031
  return t.dispatch(l.scrollIntoView().setMeta("paste", !0).setMeta("uiEvent", "paste")), !0;
6039
6032
  }
6040
- function vo(t) {
6033
+ function Co(t) {
6041
6034
  let e = t.getData("text/plain") || t.getData("Text");
6042
6035
  if (e)
6043
6036
  return e;
@@ -6049,7 +6042,7 @@ Ee.paste = (t, e) => {
6049
6042
  if (t.composing && !en)
6050
6043
  return;
6051
6044
  let r = Gt ? null : n.clipboardData, i = t.input.shiftKey && t.input.lastKeyCode != 45;
6052
- r && Sr(t, vo(r), r.getData("text/html"), i, n) ? n.preventDefault() : yu(t, n);
6045
+ r && Sr(t, Co(r), r.getData("text/html"), i, n) ? n.preventDefault() : yu(t, n);
6053
6046
  };
6054
6047
  class bu {
6055
6048
  constructor(e, n, r) {
@@ -6057,7 +6050,7 @@ class bu {
6057
6050
  }
6058
6051
  }
6059
6052
  const xu = Me ? "altKey" : "ctrlKey";
6060
- function Co(t, e) {
6053
+ function So(t, e) {
6061
6054
  let n = t.someProp("dragCopies", (r) => !r(e));
6062
6055
  return n ?? !e[xu];
6063
6056
  }
@@ -6074,8 +6067,8 @@ $e.dragstart = (t, e) => {
6074
6067
  d && d.node.type.spec.draggable && d != t.docView && (o = U.create(t.state.doc, d.posBefore));
6075
6068
  }
6076
6069
  }
6077
- let l = (o || t.state.selection).content(), { dom: a, text: c, slice: u } = uo(t, l);
6078
- (!n.dataTransfer.files.length || !je || so > 120) && n.dataTransfer.clearData(), n.dataTransfer.setData(Gt ? "Text" : "text/html", a.innerHTML), n.dataTransfer.effectAllowed = "copyMove", Gt || n.dataTransfer.setData("text/plain", c), t.dragging = new bu(u, Co(t, n), o);
6070
+ let l = (o || t.state.selection).content(), { dom: a, text: c, slice: u } = fo(t, l);
6071
+ (!n.dataTransfer.files.length || !je || oo > 120) && n.dataTransfer.clearData(), n.dataTransfer.setData(Gt ? "Text" : "text/html", a.innerHTML), n.dataTransfer.effectAllowed = "copyMove", Gt || n.dataTransfer.setData("text/plain", c), t.dragging = new bu(u, So(t, n), o);
6079
6072
  };
6080
6073
  $e.dragend = (t) => {
6081
6074
  let e = t.dragging;
@@ -6100,8 +6093,8 @@ function ku(t, e, n) {
6100
6093
  let i = t.state.doc.resolve(r.pos), s = n && n.slice;
6101
6094
  s ? t.someProp("transformPasted", (m) => {
6102
6095
  s = m(s, t, !1);
6103
- }) : s = fo(t, vo(e.dataTransfer), Gt ? null : e.dataTransfer.getData("text/html"), !1, i);
6104
- let o = !!(n && Co(t, e));
6096
+ }) : s = ho(t, Co(e.dataTransfer), Gt ? null : e.dataTransfer.getData("text/html"), !1, i);
6097
+ let o = !!(n && So(t, e));
6105
6098
  if (t.someProp("handleDrop", (m) => m(t, e, s || H.empty, o))) {
6106
6099
  e.preventDefault();
6107
6100
  return;
@@ -6109,7 +6102,7 @@ function ku(t, e, n) {
6109
6102
  if (!s)
6110
6103
  return;
6111
6104
  e.preventDefault();
6112
- let l = s ? Ws(t.state.doc, i.pos, s) : i.pos;
6105
+ let l = s ? js(t.state.doc, i.pos, s) : i.pos;
6113
6106
  l == null && (l = i.pos);
6114
6107
  let a = t.state.tr;
6115
6108
  if (o) {
@@ -6124,7 +6117,7 @@ function ku(t, e, n) {
6124
6117
  a.setSelection(new U(p));
6125
6118
  else {
6126
6119
  let m = a.mapping.map(l);
6127
- a.mapping.maps[a.mapping.maps.length - 1].forEach((x, y, k, v) => m = v), a.setSelection(ao(t, p, a.doc.resolve(m)));
6120
+ a.mapping.maps[a.mapping.maps.length - 1].forEach((x, y, k, v) => m = v), a.setSelection(co(t, p, a.doc.resolve(m)));
6128
6121
  }
6129
6122
  t.focus(), t.dispatch(a.setMeta("uiEvent", "drop"));
6130
6123
  }
@@ -6142,7 +6135,7 @@ $e.beforeinput = (t, e) => {
6142
6135
  t.domObserver.flushSoon();
6143
6136
  let { domChangeCount: r } = t.input;
6144
6137
  setTimeout(() => {
6145
- if (t.input.domChangeCount != r || (t.dom.blur(), t.focus(), t.someProp("handleKeyDown", (s) => s(t, no(8, "Backspace")))))
6138
+ if (t.input.domChangeCount != r || (t.dom.blur(), t.focus(), t.someProp("handleKeyDown", (s) => s(t, ro(8, "Backspace")))))
6146
6139
  return;
6147
6140
  let { $cursor: i } = t.state.selection;
6148
6141
  i && i.pos > 0 && t.dispatch(t.state.tr.delete(i.pos - 1, i.pos).scrollIntoView());
@@ -6362,13 +6355,13 @@ class ae {
6362
6355
  let i, s = 0;
6363
6356
  e.forEach((l, a) => {
6364
6357
  let c = a + r, u;
6365
- if (u = wo(n, l, c)) {
6358
+ if (u = Ao(n, l, c)) {
6366
6359
  for (i || (i = this.children.slice()); s < i.length && i[s] < a; )
6367
6360
  s += 3;
6368
6361
  i[s] == a ? i[s + 2] = i[s + 2].addInner(l, u, c + 1) : i.splice(s, 0, a, a + l.nodeSize, Cn(u, l, c + 1, mt)), s += 3;
6369
6362
  }
6370
6363
  });
6371
- let o = So(s ? Ao(n) : n, -r);
6364
+ let o = wo(s ? No(n) : n, -r);
6372
6365
  for (let l = 0; l < o.length; l++)
6373
6366
  o[l].type.valid(e, o[l]) || o.splice(l--, 1);
6374
6367
  return new ae(o.length ? this.local.concat(o).sort(gt) : this.local, i || this.children);
@@ -6574,7 +6567,7 @@ function vu(t, e, n, r, i, s, o) {
6574
6567
  }
6575
6568
  return new ae(e.sort(gt), l);
6576
6569
  }
6577
- function So(t, e) {
6570
+ function wo(t, e) {
6578
6571
  if (!e || !t.length)
6579
6572
  return t;
6580
6573
  let n = [];
@@ -6597,7 +6590,7 @@ function Cu(t, e, n, r, i, s, o) {
6597
6590
  t[a + 1] == -1 && l(t[a + 2], e[a] + s + 1);
6598
6591
  return n;
6599
6592
  }
6600
- function wo(t, e, n) {
6593
+ function Ao(t, e, n) {
6601
6594
  if (e.isLeaf)
6602
6595
  return null;
6603
6596
  let r = n + e.nodeSize, i = null;
@@ -6605,7 +6598,7 @@ function wo(t, e, n) {
6605
6598
  (o = t[s]) && o.from > n && o.to < r && ((i || (i = [])).push(o), t[s] = null);
6606
6599
  return i;
6607
6600
  }
6608
- function Ao(t) {
6601
+ function No(t) {
6609
6602
  let e = [];
6610
6603
  for (let n = 0; n < t.length; n++)
6611
6604
  t[n] != null && e.push(t[n]);
@@ -6614,14 +6607,14 @@ function Ao(t) {
6614
6607
  function Cn(t, e, n, r) {
6615
6608
  let i = [], s = !1;
6616
6609
  e.forEach((l, a) => {
6617
- let c = wo(t, l, a + n);
6610
+ let c = Ao(t, l, a + n);
6618
6611
  if (c) {
6619
6612
  s = !0;
6620
6613
  let u = Cn(c, l, n + a + 1, r);
6621
6614
  u != be && i.push(a, a + l.nodeSize, u);
6622
6615
  }
6623
6616
  });
6624
- let o = So(s ? Ao(t) : t, -n).sort(gt);
6617
+ let o = wo(s ? No(t) : t, -n).sort(gt);
6625
6618
  for (let l = 0; l < o.length; l++)
6626
6619
  o[l].type.valid(e, o[l]) || (r.onRemove && r.onRemove(o[l].spec), o.splice(l--, 1));
6627
6620
  return o.length || i.length ? new ae(o, i) : be;
@@ -6637,17 +6630,17 @@ function Kr(t) {
6637
6630
  for (let i = n + 1; i < e.length; i++) {
6638
6631
  let s = e[i];
6639
6632
  if (s.from == r.from) {
6640
- s.to != r.to && (e == t && (e = t.slice()), e[i] = s.copy(s.from, r.to), Gi(e, i + 1, s.copy(r.to, s.to)));
6633
+ s.to != r.to && (e == t && (e = t.slice()), e[i] = s.copy(s.from, r.to), Zi(e, i + 1, s.copy(r.to, s.to)));
6641
6634
  continue;
6642
6635
  } else {
6643
- s.from < r.to && (e == t && (e = t.slice()), e[n] = r.copy(r.from, s.from), Gi(e, i, r.copy(s.from, r.to)));
6636
+ s.from < r.to && (e == t && (e = t.slice()), e[n] = r.copy(r.from, s.from), Zi(e, i, r.copy(s.from, r.to)));
6644
6637
  break;
6645
6638
  }
6646
6639
  }
6647
6640
  }
6648
6641
  return e;
6649
6642
  }
6650
- function Gi(t, e, n) {
6643
+ function Zi(t, e, n) {
6651
6644
  for (; e < t.length && gt(n, t[e]) > 0; )
6652
6645
  e++;
6653
6646
  t.splice(e, 0, n);
@@ -6752,7 +6745,7 @@ class Jr {
6752
6745
  return ee.valid(n) ? new ee(n) : Z.near(n);
6753
6746
  }
6754
6747
  }
6755
- function No(t) {
6748
+ function Eo(t) {
6756
6749
  return t.isAtom || t.spec.isolating || t.spec.createGapCursor;
6757
6750
  }
6758
6751
  function Su(t) {
@@ -6764,7 +6757,7 @@ function Su(t) {
6764
6757
  continue;
6765
6758
  }
6766
6759
  for (let i = r.child(n - 1); ; i = i.lastChild) {
6767
- if (i.childCount == 0 && !i.inlineContent || No(i.type))
6760
+ if (i.childCount == 0 && !i.inlineContent || Eo(i.type))
6768
6761
  return !0;
6769
6762
  if (i.inlineContent)
6770
6763
  return !1;
@@ -6781,7 +6774,7 @@ function wu(t) {
6781
6774
  continue;
6782
6775
  }
6783
6776
  for (let i = r.child(n); ; i = i.firstChild) {
6784
- if (i.childCount == 0 && !i.inlineContent || No(i.type))
6777
+ if (i.childCount == 0 && !i.inlineContent || Eo(i.type))
6785
6778
  return !0;
6786
6779
  if (i.inlineContent)
6787
6780
  return !1;
@@ -6863,7 +6856,7 @@ const Ou = Lr.create({
6863
6856
  storage: t.storage
6864
6857
  };
6865
6858
  return {
6866
- allowGapCursor: (e = Wl(jl(t, "allowGapCursor", n))) !== null && e !== void 0 ? e : null
6859
+ allowGapCursor: (e = jl(Gl(t, "allowGapCursor", n))) !== null && e !== void 0 ? e : null
6867
6860
  };
6868
6861
  }
6869
6862
  }), Dt = {
@@ -6887,7 +6880,7 @@ const Ou = Lr.create({
6887
6880
  },
6888
6881
  underline: {
6889
6882
  category: "mark",
6890
- extension: Gl,
6883
+ extension: Zl,
6891
6884
  priority: 100
6892
6885
  },
6893
6886
  code: {
@@ -6897,7 +6890,7 @@ const Ou = Lr.create({
6897
6890
  },
6898
6891
  textColor: {
6899
6892
  category: "mark",
6900
- extension: Zl,
6893
+ extension: Ql,
6901
6894
  // Note: TextStyle is already in helperExtensions
6902
6895
  defaultOptions: {
6903
6896
  types: ["textStyle"]
@@ -6906,7 +6899,7 @@ const Ou = Lr.create({
6906
6899
  },
6907
6900
  highlight: {
6908
6901
  category: "mark",
6909
- extension: Ql,
6902
+ extension: Xl,
6910
6903
  defaultOptions: {
6911
6904
  multicolor: !0
6912
6905
  },
@@ -6914,7 +6907,7 @@ const Ou = Lr.create({
6914
6907
  },
6915
6908
  link: {
6916
6909
  category: "mark",
6917
- extension: Xl,
6910
+ extension: Yl,
6918
6911
  defaultOptions: {
6919
6912
  openOnClick: !1,
6920
6913
  HTMLAttributes: {
@@ -6958,7 +6951,7 @@ const Ou = Lr.create({
6958
6951
  },
6959
6952
  taskList: {
6960
6953
  category: "node",
6961
- extension: Yl,
6954
+ extension: ea,
6962
6955
  // Note: TaskItem is already in helperExtensions
6963
6956
  defaultOptions: {
6964
6957
  HTMLAttributes: {
@@ -7003,7 +6996,7 @@ const Ou = Lr.create({
7003
6996
  },
7004
6997
  textAlign: {
7005
6998
  category: "extension",
7006
- extension: ta,
6999
+ extension: na,
7007
7000
  defaultOptions: {
7008
7001
  types: ["heading", "paragraph", "listItem"],
7009
7002
  alignments: ["left", "center", "right", "justify"],
@@ -7030,7 +7023,7 @@ const Ou = Lr.create({
7030
7023
  // Required: default block node
7031
7024
  za,
7032
7025
  ja,
7033
- ea,
7026
+ ta,
7034
7027
  // Required for task lists
7035
7028
  Pt,
7036
7029
  // Required: undo/redo functionality
@@ -7173,7 +7166,7 @@ const Lu = {
7173
7166
  onZoomChange: n,
7174
7167
  onToolbarAction: r
7175
7168
  }) => {
7176
- const { editor: i } = Ls();
7169
+ const { editor: i } = Fs();
7177
7170
  return /* @__PURE__ */ f(
7178
7171
  Sa,
7179
7172
  {
@@ -7188,7 +7181,7 @@ const Lu = {
7188
7181
  showCharacterCount: t,
7189
7182
  showWordCount: e
7190
7183
  }) => {
7191
- const { editor: n } = Ls();
7184
+ const { editor: n } = Fs();
7192
7185
  if (!n || !t && !e)
7193
7186
  return null;
7194
7187
  const r = n.getText(), i = r.length, s = r.split(/\s+/).filter((o) => o.length > 0).length;
@@ -7220,7 +7213,7 @@ const Lu = {
7220
7213
  isReadOnly: y = !1,
7221
7214
  isDisabled: k = !1,
7222
7215
  ...v
7223
- } = t, { zoom: S, setZoom: I } = ka(), A = pa.lineHeight, M = n * A, D = i ? void 0 : r * A, O = R.useMemo(() => Du(a), [a]), { Component: V, label: $, shouldLabelBeOutside: q, getBaseProps: Te, getLabelProps: P, getInputWrapperProps: _ } = hl({
7216
+ } = t, { zoom: S, setZoom: I } = ka(), A = bi.lineHeight, M = n * A, D = i ? void 0 : r * A, O = R.useMemo(() => Du(a), [a]), { Component: V, label: $, shouldLabelBeOutside: q, getBaseProps: Te, getLabelProps: P, getInputWrapperProps: _ } = pl({
7224
7217
  ...v,
7225
7218
  variant: c,
7226
7219
  // Explicitly pass variant to ensure bordered styling
@@ -7252,8 +7245,12 @@ const Lu = {
7252
7245
  {
7253
7246
  ..._(),
7254
7247
  className: L(_().className, "flex flex-col w-full p-0 gap-0 rich-text-editor"),
7248
+ style: {
7249
+ maxHeight: D ? `${D + bi.toolbarHeight}px` : void 0,
7250
+ overflow: D ? "auto" : void 0
7251
+ },
7255
7252
  children: /* @__PURE__ */ f(
7256
- Ul,
7253
+ ql,
7257
7254
  {
7258
7255
  editable: !y && !k,
7259
7256
  slotBefore: l ? /* @__PURE__ */ f(
@@ -7270,8 +7267,6 @@ const Lu = {
7270
7267
  className: "w-full flex-1 outline-none",
7271
7268
  style: {
7272
7269
  minHeight: `${M}px`,
7273
- maxHeight: D ? `${D}px` : void 0,
7274
- overflow: D ? "auto" : void 0,
7275
7270
  fontSize: `${S}%`,
7276
7271
  display: "flex",
7277
7272
  flexDirection: "column"
@@ -7309,7 +7304,7 @@ function Vu(t, e = "en-US", n = "USD") {
7309
7304
  return console.warn(`Invalid currency formatting: ${r}`), `${n} ${t.toFixed(2)}`;
7310
7305
  }
7311
7306
  }
7312
- const Zi = [
7307
+ const Qi = [
7313
7308
  { id: "100", amount: 100 },
7314
7309
  { id: "250", amount: 250 },
7315
7310
  { id: "500", amount: 500 },
@@ -7320,7 +7315,7 @@ const Zi = [
7320
7315
  customAmountPlaceholder: "Custom donation amount",
7321
7316
  customAmountAriaLabel: "Custom donation amount"
7322
7317
  }, _u = ({
7323
- presetAmounts: t = Zi,
7318
+ presetAmounts: t = Qi,
7324
7319
  selectedDonation: e,
7325
7320
  defaultSelectedDonation: n = null,
7326
7321
  onChange: r,
@@ -7339,7 +7334,7 @@ const Zi = [
7339
7334
  className: k = "",
7340
7335
  showCard: v = !0
7341
7336
  }) => {
7342
- const S = { ...$u, ...c }, I = Array.isArray(t) ? t : Zi, A = {
7337
+ const S = { ...$u, ...c }, I = Array.isArray(t) ? t : Qi, A = {
7343
7338
  2: "grid-cols-2",
7344
7339
  3: "grid-cols-3"
7345
7340
  }, M = {
@@ -7403,7 +7398,7 @@ const Zi = [
7403
7398
  );
7404
7399
  }) }),
7405
7400
  o && /* @__PURE__ */ f(
7406
- ws,
7401
+ As,
7407
7402
  {
7408
7403
  placeholder: S.customAmountPlaceholder,
7409
7404
  "aria-label": S.customAmountAriaLabel,
@@ -7432,9 +7427,9 @@ const Bu = (t) => {
7432
7427
  case "warning":
7433
7428
  return yi;
7434
7429
  case "error":
7435
- return Bl;
7430
+ return zl;
7436
7431
  case "success":
7437
- return _l;
7432
+ return Bl;
7438
7433
  default:
7439
7434
  return yi;
7440
7435
  }
@@ -7570,7 +7565,7 @@ function qu(t, e) {
7570
7565
  }
7571
7566
  return Object.keys(n).concat(Object.keys(r)).forEach(s), i;
7572
7567
  }
7573
- const Eo = Object.freeze({
7568
+ const To = Object.freeze({
7574
7569
  left: 0,
7575
7570
  top: 0,
7576
7571
  width: 16,
@@ -7580,7 +7575,7 @@ const Eo = Object.freeze({
7580
7575
  vFlip: !1,
7581
7576
  hFlip: !1
7582
7577
  }), Wr = Object.freeze({
7583
- ...Eo,
7578
+ ...To,
7584
7579
  ...Sn
7585
7580
  }), Ar = Object.freeze({
7586
7581
  ...Wr,
@@ -7593,7 +7588,7 @@ function Ku(t, e) {
7593
7588
  const r = ((t.rotate || 0) + (e.rotate || 0)) % 4;
7594
7589
  return r && (n.rotate = r), n;
7595
7590
  }
7596
- function Qi(t, e) {
7591
+ function Xi(t, e) {
7597
7592
  const n = Ku(t, e);
7598
7593
  for (const r in Ar) r in Sn ? r in t && !(r in n) && (n[r] = Sn[r]) : r in e ? n[r] = e[r] : r in t && (n[r] = t[r]);
7599
7594
  return n;
@@ -7602,11 +7597,11 @@ function Ju(t, e, n) {
7602
7597
  const r = t.icons, i = t.aliases || /* @__PURE__ */ Object.create(null);
7603
7598
  let s = {};
7604
7599
  function o(l) {
7605
- s = Qi(r[l] || i[l], s);
7600
+ s = Xi(r[l] || i[l], s);
7606
7601
  }
7607
- return o(e), n.forEach(o), Qi(t, s);
7602
+ return o(e), n.forEach(o), Xi(t, s);
7608
7603
  }
7609
- function To(t, e) {
7604
+ function Mo(t, e) {
7610
7605
  const n = [];
7611
7606
  if (typeof t != "object" || typeof t.icons != "object") return n;
7612
7607
  t.not_found instanceof Array && t.not_found.forEach((i) => {
@@ -7623,13 +7618,13 @@ const Wu = {
7623
7618
  provider: "",
7624
7619
  aliases: {},
7625
7620
  not_found: {},
7626
- ...Eo
7621
+ ...To
7627
7622
  };
7628
7623
  function nr(t, e) {
7629
7624
  for (const n in e) if (n in t && typeof t[n] != typeof e[n]) return !1;
7630
7625
  return !0;
7631
7626
  }
7632
- function Mo(t) {
7627
+ function Oo(t) {
7633
7628
  if (typeof t != "object" || t === null) return null;
7634
7629
  const e = t;
7635
7630
  if (typeof e.prefix != "string" || !t.icons || typeof t.icons != "object" || !nr(t, Wu)) return null;
@@ -7645,7 +7640,7 @@ function Mo(t) {
7645
7640
  }
7646
7641
  return e;
7647
7642
  }
7648
- const Xi = /* @__PURE__ */ Object.create(null);
7643
+ const Yi = /* @__PURE__ */ Object.create(null);
7649
7644
  function ju(t, e) {
7650
7645
  return {
7651
7646
  provider: t,
@@ -7655,11 +7650,11 @@ function ju(t, e) {
7655
7650
  };
7656
7651
  }
7657
7652
  function Ot(t, e) {
7658
- const n = Xi[t] || (Xi[t] = /* @__PURE__ */ Object.create(null));
7653
+ const n = Yi[t] || (Yi[t] = /* @__PURE__ */ Object.create(null));
7659
7654
  return n[e] || (n[e] = ju(t, e));
7660
7655
  }
7661
- function Oo(t, e) {
7662
- return Mo(e) ? To(e, (n, r) => {
7656
+ function Io(t, e) {
7657
+ return Oo(e) ? Mo(e, (n, r) => {
7663
7658
  r ? t.icons[n] = r : t.missing.add(n);
7664
7659
  }) : [];
7665
7660
  }
@@ -7671,7 +7666,7 @@ function Gu(t, e, n) {
7671
7666
  }
7672
7667
  return !1;
7673
7668
  }
7674
- const Io = /^[a-z0-9]+(-[a-z0-9]+)*$/, Fn = (t, e, n, r = "") => {
7669
+ const Do = /^[a-z0-9]+(-[a-z0-9]+)*$/, Fn = (t, e, n, r = "") => {
7675
7670
  const i = t.split(":");
7676
7671
  if (t.slice(0, 1) === "@") {
7677
7672
  if (i.length < 2 || i.length > 3) return null;
@@ -7706,10 +7701,10 @@ const Io = /^[a-z0-9]+(-[a-z0-9]+)*$/, Fn = (t, e, n, r = "") => {
7706
7701
  return null;
7707
7702
  }, dn = (t, e) => t ? !!((e && t.prefix === "" || t.prefix) && t.name) : !1;
7708
7703
  let Qt = !1;
7709
- function Do(t) {
7704
+ function Lo(t) {
7710
7705
  return typeof t == "boolean" && (Qt = t), Qt;
7711
7706
  }
7712
- function Yi(t) {
7707
+ function es(t) {
7713
7708
  const e = typeof t == "string" ? Fn(t, !0, Qt) : t;
7714
7709
  if (e) {
7715
7710
  const n = Ot(e.provider, e.prefix), r = e.name;
@@ -7726,7 +7721,7 @@ function Qu(t, e) {
7726
7721
  if (typeof t != "object") return !1;
7727
7722
  if (typeof e != "string" && (e = t.provider || ""), Qt && !e && !t.prefix) {
7728
7723
  let i = !1;
7729
- return Mo(t) && (t.prefix = "", To(t, (s, o) => {
7724
+ return Oo(t) && (t.prefix = "", Mo(t, (s, o) => {
7730
7725
  Zu(s, o) && (i = !0);
7731
7726
  })), i;
7732
7727
  }
@@ -7736,16 +7731,16 @@ function Qu(t, e) {
7736
7731
  name: "a"
7737
7732
  })) return !1;
7738
7733
  const r = Ot(e, n);
7739
- return !!Oo(r, t);
7734
+ return !!Io(r, t);
7740
7735
  }
7741
- const Lo = Object.freeze({
7736
+ const Fo = Object.freeze({
7742
7737
  width: null,
7743
7738
  height: null
7744
- }), Fo = Object.freeze({
7745
- ...Lo,
7739
+ }), Ro = Object.freeze({
7740
+ ...Fo,
7746
7741
  ...Sn
7747
7742
  }), Xu = /(-?[0-9.]*[0-9]+[0-9.]*)/g, Yu = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
7748
- function es(t, e, n) {
7743
+ function ts(t, e, n) {
7749
7744
  if (e === 1) return t;
7750
7745
  if (n = n || 100, typeof t == "number") return Math.ceil(t * e * n) / n;
7751
7746
  if (typeof t != "string") return t;
@@ -7790,7 +7785,7 @@ function id(t, e) {
7790
7785
  ...Wr,
7791
7786
  ...t
7792
7787
  }, r = {
7793
- ...Fo,
7788
+ ...Ro,
7794
7789
  ...e
7795
7790
  }, i = {
7796
7791
  left: n.left,
@@ -7819,7 +7814,7 @@ function id(t, e) {
7819
7814
  });
7820
7815
  const o = r.width, l = r.height, a = i.width, c = i.height;
7821
7816
  let u, d;
7822
- o === null ? (d = l === null ? "1em" : l === "auto" ? c : l, u = es(d, a / c)) : (u = o === "auto" ? a : o, d = l === null ? es(u, c / a) : l === "auto" ? c : l);
7817
+ o === null ? (d = l === null ? "1em" : l === "auto" ? c : l, u = ts(d, a / c)) : (u = o === "auto" ? a : o, d = l === null ? ts(u, c / a) : l === "auto" ? c : l);
7823
7818
  const p = {}, m = (y, k) => {
7824
7819
  rd(k) || (p[y] = k.toString());
7825
7820
  };
@@ -7888,7 +7883,7 @@ const dd = () => {
7888
7883
  } catch {
7889
7884
  }
7890
7885
  };
7891
- let ts = dd();
7886
+ let ns = dd();
7892
7887
  function fd(t, e) {
7893
7888
  const n = Zr(t);
7894
7889
  if (!n) return 0;
@@ -7932,7 +7927,7 @@ function md(t) {
7932
7927
  return "/";
7933
7928
  }
7934
7929
  const gd = (t, e, n) => {
7935
- if (!ts) {
7930
+ if (!ns) {
7936
7931
  n("abort", 424);
7937
7932
  return;
7938
7933
  }
@@ -7953,7 +7948,7 @@ const gd = (t, e, n) => {
7953
7948
  return;
7954
7949
  }
7955
7950
  let i = 503;
7956
- ts(t + r).then((s) => {
7951
+ ns(t + r).then((s) => {
7957
7952
  const o = s.status;
7958
7953
  if (o !== 200) {
7959
7954
  setTimeout(() => {
@@ -7979,7 +7974,7 @@ const gd = (t, e, n) => {
7979
7974
  prepare: pd,
7980
7975
  send: gd
7981
7976
  };
7982
- function Ro(t, e) {
7977
+ function Po(t, e) {
7983
7978
  t.forEach((n) => {
7984
7979
  const r = n.loaderCallbacks;
7985
7980
  r && (n.loaderCallbacks = r.filter((i) => i.id !== e));
@@ -8010,13 +8005,13 @@ function bd(t) {
8010
8005
  else
8011
8006
  return n = !0, !0;
8012
8007
  return !1;
8013
- }), o.pending.length !== l && (n || Ro([t], s.id), s.callback(o.loaded.slice(0), o.missing.slice(0), o.pending.slice(0), s.abort));
8008
+ }), o.pending.length !== l && (n || Po([t], s.id), s.callback(o.loaded.slice(0), o.missing.slice(0), o.pending.slice(0), s.abort));
8014
8009
  });
8015
8010
  }));
8016
8011
  }
8017
8012
  let xd = 0;
8018
8013
  function kd(t, e, n) {
8019
- const r = xd++, i = Ro.bind(null, n, r);
8014
+ const r = xd++, i = Po.bind(null, n, r);
8020
8015
  if (!e.pending.length) return i;
8021
8016
  const s = {
8022
8017
  id: r,
@@ -8167,7 +8162,7 @@ function wd(t, e, n, r) {
8167
8162
  }
8168
8163
  return setTimeout(M), v;
8169
8164
  }
8170
- function Po(t) {
8165
+ function Vo(t) {
8171
8166
  const e = {
8172
8167
  ...Sd,
8173
8168
  ...t
@@ -8195,14 +8190,14 @@ function Po(t) {
8195
8190
  cleanup: r
8196
8191
  };
8197
8192
  }
8198
- function ns() {
8193
+ function rs() {
8199
8194
  }
8200
8195
  const rr = /* @__PURE__ */ Object.create(null);
8201
8196
  function Ad(t) {
8202
8197
  if (!rr[t]) {
8203
8198
  const e = Zr(t);
8204
8199
  if (!e) return;
8205
- const n = Po(e), r = {
8200
+ const n = Vo(e), r = {
8206
8201
  config: e,
8207
8202
  redundancy: n
8208
8203
  };
@@ -8215,21 +8210,21 @@ function Nd(t, e, n) {
8215
8210
  if (typeof t == "string") {
8216
8211
  const s = Er(t);
8217
8212
  if (!s)
8218
- return n(void 0, 424), ns;
8213
+ return n(void 0, 424), rs;
8219
8214
  i = s.send;
8220
8215
  const o = Ad(t);
8221
8216
  o && (r = o.redundancy);
8222
8217
  } else {
8223
8218
  const s = jr(t);
8224
8219
  if (s) {
8225
- r = Po(s);
8220
+ r = Vo(s);
8226
8221
  const o = t.resources ? t.resources[0] : "", l = Er(o);
8227
8222
  l && (i = l.send);
8228
8223
  }
8229
8224
  }
8230
- return !r || !i ? (n(void 0, 424), ns) : r.query(e, i, n)().abort;
8225
+ return !r || !i ? (n(void 0, 424), rs) : r.query(e, i, n)().abort;
8231
8226
  }
8232
- function rs() {
8227
+ function is() {
8233
8228
  }
8234
8229
  function Ed(t) {
8235
8230
  t.iconsLoaderFlag || (t.iconsLoaderFlag = !0, setTimeout(() => {
@@ -8239,7 +8234,7 @@ function Ed(t) {
8239
8234
  function Td(t) {
8240
8235
  const e = [], n = [];
8241
8236
  return t.forEach((r) => {
8242
- (r.match(Io) ? e : n).push(r);
8237
+ (r.match(Do) ? e : n).push(r);
8243
8238
  }), {
8244
8239
  valid: e,
8245
8240
  invalid: n
@@ -8253,7 +8248,7 @@ function Ft(t, e, n) {
8253
8248
  });
8254
8249
  }
8255
8250
  if (n && typeof n == "object") try {
8256
- if (!Oo(t, n).length) {
8251
+ if (!Io(t, n).length) {
8257
8252
  r();
8258
8253
  return;
8259
8254
  }
@@ -8262,7 +8257,7 @@ function Ft(t, e, n) {
8262
8257
  }
8263
8258
  r(), Ed(t);
8264
8259
  }
8265
- function is(t, e) {
8260
+ function ss(t, e) {
8266
8261
  t instanceof Promise ? t.then((n) => {
8267
8262
  e(n);
8268
8263
  }).catch(() => {
@@ -8276,7 +8271,7 @@ function Md(t, e) {
8276
8271
  if (delete t.iconsToLoad, !i || !i.length) return;
8277
8272
  const s = t.loadIcon;
8278
8273
  if (t.loadIcons && (i.length > 1 || !s)) {
8279
- is(t.loadIcons(i, r, n), (u) => {
8274
+ ss(t.loadIcons(i, r, n), (u) => {
8280
8275
  Ft(t, i, u);
8281
8276
  });
8282
8277
  return;
@@ -8284,7 +8279,7 @@ function Md(t, e) {
8284
8279
  if (s) {
8285
8280
  i.forEach((u) => {
8286
8281
  const d = s(u, r, n);
8287
- is(d, (p) => {
8282
+ ss(d, (p) => {
8288
8283
  const m = p ? {
8289
8284
  prefix: r,
8290
8285
  icons: { [u]: p }
@@ -8296,7 +8291,7 @@ function Md(t, e) {
8296
8291
  }
8297
8292
  const { valid: o, invalid: l } = Td(i);
8298
8293
  if (l.length && Ft(t, l, null), !o.length) return;
8299
- const a = r.match(Io) ? Er(n) : null;
8294
+ const a = r.match(Do) ? Er(n) : null;
8300
8295
  if (!a) {
8301
8296
  Ft(t, o, null);
8302
8297
  return;
@@ -8309,11 +8304,11 @@ function Md(t, e) {
8309
8304
  }));
8310
8305
  }
8311
8306
  const Od = (t, e) => {
8312
- const n = Cd(t, !0, Do()), r = vd(n);
8307
+ const n = Cd(t, !0, Lo()), r = vd(n);
8313
8308
  if (!r.pending.length) {
8314
8309
  let a = !0;
8315
8310
  return e && setTimeout(() => {
8316
- a && e(r.loaded, r.missing, r.pending, rs);
8311
+ a && e(r.loaded, r.missing, r.pending, is);
8317
8312
  }), () => {
8318
8313
  a = !1;
8319
8314
  };
@@ -8332,13 +8327,13 @@ const Od = (t, e) => {
8332
8327
  }), s.forEach((a) => {
8333
8328
  const c = i[a.provider][a.prefix];
8334
8329
  c.length && Md(a, c);
8335
- }), e ? kd(e, r, s) : rs;
8330
+ }), e ? kd(e, r, s) : is;
8336
8331
  };
8337
8332
  function Id(t, e) {
8338
8333
  const n = { ...t };
8339
8334
  for (const r in e) {
8340
8335
  const i = e[r], s = typeof i;
8341
- r in Lo ? (i === null || i && (s === "string" || s === "number")) && (n[r] = i) : s === typeof n[r] && (n[r] = r === "rotate" ? i % 4 : i);
8336
+ r in Fo ? (i === null || i && (s === "string" || s === "number")) && (n[r] = i) : s === typeof n[r] && (n[r] = r === "rotate" ? i % 4 : i);
8342
8337
  }
8343
8338
  return n;
8344
8339
  }
@@ -8405,8 +8400,8 @@ function _d() {
8405
8400
  function Bd(t) {
8406
8401
  return Bt === void 0 && _d(), Bt ? Bt.createHTML(t) : t;
8407
8402
  }
8408
- const Vo = {
8409
- ...Fo,
8403
+ const $o = {
8404
+ ...Ro,
8410
8405
  inline: !1
8411
8406
  }, zd = {
8412
8407
  xmlns: "http://www.w3.org/2000/svg",
@@ -8417,31 +8412,31 @@ const Vo = {
8417
8412
  display: "inline-block"
8418
8413
  }, Tr = {
8419
8414
  backgroundColor: "currentColor"
8420
- }, $o = {
8415
+ }, _o = {
8421
8416
  backgroundColor: "transparent"
8422
- }, ss = {
8417
+ }, os = {
8423
8418
  Image: "var(--svg)",
8424
8419
  Repeat: "no-repeat",
8425
8420
  Size: "100% 100%"
8426
- }, os = {
8421
+ }, ls = {
8427
8422
  WebkitMask: Tr,
8428
8423
  mask: Tr,
8429
- background: $o
8424
+ background: _o
8430
8425
  };
8431
- for (const t in os) {
8432
- const e = os[t];
8433
- for (const n in ss)
8434
- e[t + n] = ss[n];
8426
+ for (const t in ls) {
8427
+ const e = ls[t];
8428
+ for (const n in os)
8429
+ e[t + n] = os[n];
8435
8430
  }
8436
8431
  const Ud = {
8437
- ...Vo,
8432
+ ...$o,
8438
8433
  inline: !0
8439
8434
  };
8440
- function ls(t) {
8435
+ function as(t) {
8441
8436
  return t + (t.match(/^[-0-9.]+$/) ? "px" : "");
8442
8437
  }
8443
8438
  const qd = (t, e, n) => {
8444
- const r = e.inline ? Ud : Vo, i = Id(r, e), s = e.mode || "svg", o = {}, l = e.style || {}, a = {
8439
+ const r = e.inline ? Ud : $o, i = Id(r, e), s = e.mode || "svg", o = {}, l = e.style || {}, a = {
8445
8440
  ...s === "svg" ? zd : {}
8446
8441
  };
8447
8442
  if (n) {
@@ -8524,14 +8519,14 @@ const qd = (t, e, n) => {
8524
8519
  return a.style = {
8525
8520
  ...o,
8526
8521
  "--svg": $d(y),
8527
- width: ls(u.width),
8528
- height: ls(u.height),
8522
+ width: as(u.width),
8523
+ height: as(u.height),
8529
8524
  ...Hd,
8530
- ...x ? Tr : $o,
8525
+ ...x ? Tr : _o,
8531
8526
  ...l
8532
8527
  }, ar("span", a);
8533
8528
  };
8534
- Do(!0);
8529
+ Lo(!0);
8535
8530
  cd("", yd);
8536
8531
  if (typeof document < "u" && typeof window < "u") {
8537
8532
  const t = window;
@@ -8564,7 +8559,7 @@ if (typeof document < "u" && typeof window < "u") {
8564
8559
  }
8565
8560
  }
8566
8561
  }
8567
- function _o(t) {
8562
+ function Bo(t) {
8568
8563
  const [e, n] = he(!!t.ssr), [r, i] = he({});
8569
8564
  function s(m) {
8570
8565
  if (m) {
@@ -8574,7 +8569,7 @@ function _o(t) {
8574
8569
  name: "",
8575
8570
  data: x
8576
8571
  };
8577
- const y = Yi(x);
8572
+ const y = es(x);
8578
8573
  if (y)
8579
8574
  return {
8580
8575
  name: x,
@@ -8604,7 +8599,7 @@ function _o(t) {
8604
8599
  });
8605
8600
  return;
8606
8601
  }
8607
- const y = Yi(x);
8602
+ const y = es(x);
8608
8603
  if (c({
8609
8604
  name: x,
8610
8605
  data: y
@@ -8625,11 +8620,11 @@ function _o(t) {
8625
8620
  ...p
8626
8621
  }, t, d) : t.children ? t.children : t.fallback ? t.fallback : ar("span", {});
8627
8622
  }
8628
- const Ie = Tn((t, e) => _o({
8623
+ const Ie = Tn((t, e) => Bo({
8629
8624
  ...t,
8630
8625
  _ref: e
8631
8626
  }));
8632
- Tn((t, e) => _o({
8627
+ Tn((t, e) => Bo({
8633
8628
  inline: !0,
8634
8629
  ...t,
8635
8630
  _ref: e
@@ -8663,14 +8658,14 @@ const ir = ({
8663
8658
  };
8664
8659
  return y(), window.addEventListener("resize", y), () => window.removeEventListener("resize", y);
8665
8660
  }, [o]), /* @__PURE__ */ T(Re, { className: L("border-0 shadow-none", t), "data-testid": "event-details-root", children: [
8666
- /* @__PURE__ */ T(As, { className: "pt-2 pb-0 flex-col items-start space-y-2", "data-testid": "event-details-header", children: [
8661
+ /* @__PURE__ */ T(Ns, { className: "pt-2 pb-0 flex-col items-start space-y-2", "data-testid": "event-details-header", children: [
8667
8662
  l && n && /* @__PURE__ */ f(
8668
8663
  "div",
8669
8664
  {
8670
8665
  className: "w-full aspect-[3/1] overflow-hidden rounded-xl",
8671
8666
  "data-testid": "event-details-image-wrapper",
8672
8667
  children: /* @__PURE__ */ f(
8673
- pl,
8668
+ ml,
8674
8669
  {
8675
8670
  alt: `Event image for ${e}`,
8676
8671
  className: "w-full h-full object-cover",
@@ -8748,7 +8743,7 @@ const Jd = {
8748
8743
  tickets: "Tickets:",
8749
8744
  soldOut: "Sold Out",
8750
8745
  maxReached: "Maximum number of tickets allowed reached"
8751
- }, ln = (t) => typeof t == "number" && !isNaN(t), Bo = ({
8746
+ }, ln = (t) => typeof t == "number" && !isNaN(t), zo = ({
8752
8747
  offer: t,
8753
8748
  quantity: e,
8754
8749
  defaultQuantity: n = 0,
@@ -8902,13 +8897,13 @@ const Jd = {
8902
8897
  );
8903
8898
  return d ? /* @__PURE__ */ T(Re, { className: L("w-full", y.base), "data-testid": k || `offer-card-${t.id}`, children: [
8904
8899
  /* @__PURE__ */ f(Pe, { className: L("pt-1 pb-0", y.body), children: K }),
8905
- /* @__PURE__ */ f(dr, { children: Ce && /* @__PURE__ */ f(ml, { className: L("w-full mt-0 pt-0", y.footer), children: Ce }) })
8900
+ /* @__PURE__ */ f(dr, { children: Ce && /* @__PURE__ */ f(gl, { className: L("w-full mt-0 pt-0", y.footer), children: Ce }) })
8906
8901
  ] }) : /* @__PURE__ */ T("div", { className: L("w-full", y.base), "data-testid": k || `offer-card-${t.id}`, children: [
8907
8902
  /* @__PURE__ */ f("div", { className: L("pt-1 pb-0", y.body), children: K }),
8908
8903
  /* @__PURE__ */ f(dr, { children: Ce && /* @__PURE__ */ f("div", { className: L("w-full mt-0 pt-0", y.footer), children: Ce }) })
8909
8904
  ] });
8910
8905
  };
8911
- Bo.displayName = "OfferCard";
8906
+ zo.displayName = "OfferCard";
8912
8907
  const Wd = ({
8913
8908
  message: t = "No offers available.",
8914
8909
  icon: e = "solar:ticket-sale-outline",
@@ -8985,7 +8980,7 @@ const Zd = {
8985
8980
  className: L("w-full", n.card),
8986
8981
  children: [
8987
8982
  /* @__PURE__ */ f(
8988
- As,
8983
+ Ns,
8989
8984
  {
8990
8985
  "data-testid": `offer-card-skeleton-header-${s}`,
8991
8986
  className: "flex justify-between items-start pb-0",
@@ -9129,7 +9124,7 @@ const Xd = {
9129
9124
  },
9130
9125
  [S, e, r, i]
9131
9126
  ), A = [...t].sort((V, $) => (V.position ?? 0) - ($.position ?? 0)), M = ef[x], D = L("grid mx-auto pt-2", M, y.base), O = (V) => /* @__PURE__ */ f(
9132
- Bo,
9127
+ zo,
9133
9128
  {
9134
9129
  offer: V,
9135
9130
  quantity: S[V.id] || 0,
@@ -9171,8 +9166,8 @@ const Xd = {
9171
9166
  };
9172
9167
  tf.displayName = "OfferCardList";
9173
9168
  var tn = (t) => t.type === "checkbox", ht = (t) => t instanceof Date, Se = (t) => t == null;
9174
- const zo = (t) => typeof t == "object";
9175
- var se = (t) => !Se(t) && !Array.isArray(t) && zo(t) && !ht(t), Ho = (t) => se(t) && t.target ? tn(t.target) ? t.target.checked : t.target.value : t, nf = (t) => t.substring(0, t.search(/\.\d+(\.|$)/)) || t, Uo = (t, e) => t.has(nf(e)), rf = (t) => {
9169
+ const Ho = (t) => typeof t == "object";
9170
+ var se = (t) => !Se(t) && !Array.isArray(t) && Ho(t) && !ht(t), Uo = (t) => se(t) && t.target ? tn(t.target) ? t.target.checked : t.target.value : t, nf = (t) => t.substring(0, t.search(/\.\d+(\.|$)/)) || t, qo = (t, e) => t.has(nf(e)), rf = (t) => {
9176
9171
  const e = t.constructor && t.constructor.prototype;
9177
9172
  return se(e) && e.hasOwnProperty("isPrototypeOf");
9178
9173
  }, Qr = typeof window < "u" && typeof window.HTMLElement < "u" && typeof document < "u";
@@ -9228,10 +9223,10 @@ const wn = {
9228
9223
  pattern: "pattern",
9229
9224
  required: "required",
9230
9225
  validate: "validate"
9231
- }, qo = R.createContext(null);
9232
- qo.displayName = "HookFormControlContext";
9233
- const ei = () => R.useContext(qo);
9234
- var Ko = (t, e, n, r = !0) => {
9226
+ }, Ko = R.createContext(null);
9227
+ Ko.displayName = "HookFormControlContext";
9228
+ const ei = () => R.useContext(Ko);
9229
+ var Jo = (t, e, n, r = !0) => {
9235
9230
  const i = {
9236
9231
  defaultValues: e._defaultValues
9237
9232
  };
@@ -9268,9 +9263,9 @@ function sf(t) {
9268
9263
  }
9269
9264
  }), [i, r, s]), R.useEffect(() => {
9270
9265
  a.current.isValid && n._setValid(!0);
9271
- }, [n]), R.useMemo(() => Ko(o, n, a.current, !1), [o, n]);
9266
+ }, [n]), R.useMemo(() => Jo(o, n, a.current, !1), [o, n]);
9272
9267
  }
9273
- var Ne = (t) => typeof t == "string", Mr = (t, e, n, r, i) => Ne(t) ? (r && e.watch.add(t), N(n, t, i)) : Array.isArray(t) ? t.map((s) => (r && e.watch.add(s), N(n, s))) : (r && (e.watchAll = !0), n), Or = (t) => Se(t) || !zo(t);
9268
+ var Ne = (t) => typeof t == "string", Mr = (t, e, n, r, i) => Ne(t) ? (r && e.watch.add(t), N(n, t, i)) : Array.isArray(t) ? t.map((s) => (r && e.watch.add(s), N(n, s))) : (r && (e.watchAll = !0), n), Or = (t) => Se(t) || !Ho(t);
9274
9269
  function Fe(t, e, n = /* @__PURE__ */ new WeakSet()) {
9275
9270
  if (Or(t) || Or(e))
9276
9271
  return Object.is(t, e);
@@ -9332,7 +9327,7 @@ function of(t) {
9332
9327
  return I !== null ? I : m;
9333
9328
  }
9334
9329
  function lf(t) {
9335
- const e = ei(), { name: n, disabled: r, control: i = e, shouldUnregister: s, defaultValue: o, exact: l = !0 } = t, a = Uo(i._names.array, n), c = R.useMemo(() => N(i._formValues, n, N(i._defaultValues, n, o)), [i, n, o]), u = of({
9330
+ const e = ei(), { name: n, disabled: r, control: i = e, shouldUnregister: s, defaultValue: o, exact: l = !0 } = t, a = qo(i._names.array, n), c = R.useMemo(() => N(i._formValues, n, N(i._defaultValues, n, o)), [i, n, o]), u = of({
9336
9331
  control: i,
9337
9332
  name: n,
9338
9333
  defaultValue: c,
@@ -9370,7 +9365,7 @@ function lf(t) {
9370
9365
  }
9371
9366
  }), [d, n]), k = R.useCallback((A) => x.current.onChange({
9372
9367
  target: {
9373
- value: Ho(A),
9368
+ value: Uo(A),
9374
9369
  name: n
9375
9370
  },
9376
9371
  type: wn.CHANGE
@@ -9432,7 +9427,7 @@ var cf = (t, e, n, r, i) => e ? {
9432
9427
  ...n[t] && n[t].types ? n[t].types : {},
9433
9428
  [r]: i || !0
9434
9429
  }
9435
- } : {}, zt = (t) => Array.isArray(t) ? t : [t], as = () => {
9430
+ } : {}, zt = (t) => Array.isArray(t) ? t : [t], cs = () => {
9436
9431
  let t = [];
9437
9432
  return {
9438
9433
  get observers() {
@@ -9452,13 +9447,13 @@ var cf = (t, e, n, r, i) => e ? {
9452
9447
  }
9453
9448
  };
9454
9449
  };
9455
- function Jo(t, e) {
9450
+ function Wo(t, e) {
9456
9451
  const n = {};
9457
9452
  for (const r in t)
9458
9453
  if (t.hasOwnProperty(r)) {
9459
9454
  const i = t[r], s = e[r];
9460
9455
  if (i && se(i) && s) {
9461
- const o = Jo(i, s);
9456
+ const o = Wo(i, s);
9462
9457
  se(o) && (n[r] = o);
9463
9458
  } else t[r] && (n[r] = s);
9464
9459
  }
@@ -9469,7 +9464,7 @@ var ye = (t) => se(t) && !Object.keys(t).length, ni = (t) => t.type === "file",
9469
9464
  return !1;
9470
9465
  const e = t ? t.ownerDocument : 0;
9471
9466
  return t instanceof (e && e.defaultView ? e.defaultView.HTMLElement : HTMLElement);
9472
- }, Wo = (t) => t.type === "select-multiple", ri = (t) => t.type === "radio", uf = (t) => ri(t) || tn(t), sr = (t) => An(t) && t.isConnected;
9467
+ }, jo = (t) => t.type === "select-multiple", ri = (t) => t.type === "radio", uf = (t) => ri(t) || tn(t), sr = (t) => An(t) && t.isConnected;
9473
9468
  function df(t, e) {
9474
9469
  const n = e.slice(0, -1).length;
9475
9470
  let r = 0;
@@ -9493,13 +9488,13 @@ var hf = (t) => {
9493
9488
  return !0;
9494
9489
  return !1;
9495
9490
  };
9496
- function jo(t) {
9491
+ function Go(t) {
9497
9492
  return Array.isArray(t) || se(t) && !hf(t);
9498
9493
  }
9499
9494
  function Ir(t, e = {}) {
9500
9495
  for (const n in t) {
9501
9496
  const r = t[n];
9502
- jo(r) ? (e[n] = Array.isArray(r) ? [] : {}, Ir(r, e[n])) : Y(r) || (e[n] = !0);
9497
+ Go(r) ? (e[n] = Array.isArray(r) ? [] : {}, Ir(r, e[n])) : Y(r) || (e[n] = !0);
9503
9498
  }
9504
9499
  return e;
9505
9500
  }
@@ -9507,7 +9502,7 @@ function wt(t, e, n) {
9507
9502
  n || (n = Ir(e));
9508
9503
  for (const r in t) {
9509
9504
  const i = t[r];
9510
- if (jo(i))
9505
+ if (Go(i))
9511
9506
  Y(e) || Or(n[r]) ? n[r] = Ir(i, Array.isArray(i) ? [] : {}) : wt(i, Se(e) ? {} : e[r], n[r]);
9512
9507
  else {
9513
9508
  const s = e[r];
@@ -9516,11 +9511,11 @@ function wt(t, e, n) {
9516
9511
  }
9517
9512
  return n;
9518
9513
  }
9519
- const cs = {
9514
+ const us = {
9520
9515
  value: !1,
9521
9516
  isValid: !1
9522
- }, us = { value: !0, isValid: !0 };
9523
- var Go = (t) => {
9517
+ }, ds = { value: !0, isValid: !0 };
9518
+ var Zo = (t) => {
9524
9519
  if (Array.isArray(t)) {
9525
9520
  if (t.length > 1) {
9526
9521
  const e = t.filter((n) => n && n.checked && !n.disabled).map((n) => n.value);
@@ -9528,22 +9523,22 @@ var Go = (t) => {
9528
9523
  }
9529
9524
  return t[0].checked && !t[0].disabled ? (
9530
9525
  // @ts-expect-error expected to work in the browser
9531
- t[0].attributes && !Y(t[0].attributes.value) ? Y(t[0].value) || t[0].value === "" ? us : { value: t[0].value, isValid: !0 } : us
9532
- ) : cs;
9526
+ t[0].attributes && !Y(t[0].attributes.value) ? Y(t[0].value) || t[0].value === "" ? ds : { value: t[0].value, isValid: !0 } : ds
9527
+ ) : us;
9533
9528
  }
9534
- return cs;
9535
- }, Zo = (t, { valueAsNumber: e, valueAsDate: n, setValueAs: r }) => Y(t) ? t : e ? t === "" ? NaN : t && +t : n && Ne(t) ? new Date(t) : r ? r(t) : t;
9536
- const ds = {
9529
+ return us;
9530
+ }, Qo = (t, { valueAsNumber: e, valueAsDate: n, setValueAs: r }) => Y(t) ? t : e ? t === "" ? NaN : t && +t : n && Ne(t) ? new Date(t) : r ? r(t) : t;
9531
+ const fs = {
9537
9532
  isValid: !1,
9538
9533
  value: null
9539
9534
  };
9540
- var Qo = (t) => Array.isArray(t) ? t.reduce((e, n) => n && n.checked && !n.disabled ? {
9535
+ var Xo = (t) => Array.isArray(t) ? t.reduce((e, n) => n && n.checked && !n.disabled ? {
9541
9536
  isValid: !0,
9542
9537
  value: n.value
9543
- } : e, ds) : ds;
9544
- function fs(t) {
9538
+ } : e, fs) : fs;
9539
+ function hs(t) {
9545
9540
  const e = t.ref;
9546
- return ni(e) ? e.files : ri(e) ? Qo(t.refs).value : Wo(e) ? [...e.selectedOptions].map(({ value: n }) => n) : tn(e) ? Go(t.refs).value : Zo(Y(e.value) ? t.ref.value : e.value, t);
9541
+ return ni(e) ? e.files : ri(e) ? Xo(t.refs).value : jo(e) ? [...e.selectedOptions].map(({ value: n }) => n) : tn(e) ? Zo(t.refs).value : Qo(Y(e.value) ? t.ref.value : e.value, t);
9547
9542
  }
9548
9543
  var pf = (t, e, n, r) => {
9549
9544
  const i = {};
@@ -9557,15 +9552,15 @@ var pf = (t, e, n, r) => {
9557
9552
  fields: i,
9558
9553
  shouldUseNativeValidation: r
9559
9554
  };
9560
- }, Nn = (t) => t instanceof RegExp, Rt = (t) => Y(t) ? t : Nn(t) ? t.source : se(t) ? Nn(t.value) ? t.value.source : t.value : t, hs = (t) => ({
9555
+ }, Nn = (t) => t instanceof RegExp, Rt = (t) => Y(t) ? t : Nn(t) ? t.source : se(t) ? Nn(t.value) ? t.value.source : t.value : t, ps = (t) => ({
9561
9556
  isOnSubmit: !t || t === Le.onSubmit,
9562
9557
  isOnBlur: t === Le.onBlur,
9563
9558
  isOnChange: t === Le.onChange,
9564
9559
  isOnAll: t === Le.all,
9565
9560
  isOnTouch: t === Le.onTouched
9566
9561
  });
9567
- const ps = "AsyncFunction";
9568
- var mf = (t) => !!t && !!t.validate && !!(xe(t.validate) && t.validate.constructor.name === ps || se(t.validate) && Object.values(t.validate).find((e) => e.constructor.name === ps)), gf = (t) => t.mount && (t.required || t.min || t.max || t.maxLength || t.minLength || t.pattern || t.validate), ms = (t, e, n) => !n && (e.watchAll || e.watch.has(t) || [...e.watch].some((r) => t.startsWith(r) && /^\.\w+/.test(t.slice(r.length))));
9562
+ const ms = "AsyncFunction";
9563
+ var mf = (t) => !!t && !!t.validate && !!(xe(t.validate) && t.validate.constructor.name === ms || se(t.validate) && Object.values(t.validate).find((e) => e.constructor.name === ms)), gf = (t) => t.mount && (t.required || t.min || t.max || t.maxLength || t.minLength || t.pattern || t.validate), gs = (t, e, n) => !n && (e.watchAll || e.watch.has(t) || [...e.watch].some((r) => t.startsWith(r) && /^\.\w+/.test(t.slice(r.length))));
9569
9564
  const Ht = (t, e, n, r) => {
9570
9565
  for (const i of n || Object.keys(t)) {
9571
9566
  const s = N(t, i);
@@ -9583,7 +9578,7 @@ const Ht = (t, e, n, r) => {
9583
9578
  }
9584
9579
  }
9585
9580
  };
9586
- function gs(t, e, n) {
9581
+ function ys(t, e, n) {
9587
9582
  const r = N(t, n);
9588
9583
  if (r || Rn(n))
9589
9584
  return {
@@ -9619,7 +9614,7 @@ var yf = (t, e, n, r) => {
9619
9614
  const r = zt(N(t, n));
9620
9615
  return X(r, "root", e[n]), X(t, n, r), t;
9621
9616
  };
9622
- function ys(t, e, n = "validate") {
9617
+ function bs(t, e, n = "validate") {
9623
9618
  if (Ne(t) || Array.isArray(t) && t.every(Ne) || we(t) && !t)
9624
9619
  return {
9625
9620
  type: n,
@@ -9630,7 +9625,7 @@ function ys(t, e, n = "validate") {
9630
9625
  var vt = (t) => se(t) && !Nn(t) ? t : {
9631
9626
  value: t,
9632
9627
  message: ""
9633
- }, bs = async (t, e, n, r, i, s) => {
9628
+ }, xs = async (t, e, n, r, i, s) => {
9634
9629
  const { ref: o, refs: l, required: a, maxLength: c, minLength: u, min: d, max: p, pattern: m, validate: x, name: y, valueAsNumber: k, mount: v } = t._f, S = N(n, y);
9635
9630
  if (!v || e.has(y))
9636
9631
  return {};
@@ -9645,7 +9640,7 @@ var vt = (t) => se(t) && !Nn(t) ? t : {
9645
9640
  ...q(P ? B : Q, K)
9646
9641
  };
9647
9642
  };
9648
- if (s ? !Array.isArray(S) || !S.length : a && (!V && ($ || Se(S)) || we(S) && !S || O && !Go(l).isValid || D && !Qo(l).isValid)) {
9643
+ if (s ? !Array.isArray(S) || !S.length : a && (!V && ($ || Se(S)) || we(S) && !S || O && !Zo(l).isValid || D && !Xo(l).isValid)) {
9649
9644
  const { value: P, message: _ } = Ne(a) ? { value: !!a, message: a } : vt(a);
9650
9645
  if (P && (M[y] = {
9651
9646
  type: qe.required,
@@ -9685,7 +9680,7 @@ var vt = (t) => se(t) && !Nn(t) ? t : {
9685
9680
  }
9686
9681
  if (x) {
9687
9682
  if (xe(x)) {
9688
- const P = await x(S, n), _ = ys(P, I);
9683
+ const P = await x(S, n), _ = bs(P, I);
9689
9684
  if (_ && (M[y] = {
9690
9685
  ..._,
9691
9686
  ...q(qe.validate, _.message)
@@ -9696,7 +9691,7 @@ var vt = (t) => se(t) && !Nn(t) ? t : {
9696
9691
  for (const _ in x) {
9697
9692
  if (!ye(P) && !r)
9698
9693
  break;
9699
- const J = ys(await x[_](S, n), I, _);
9694
+ const J = bs(await x[_](S, n), I, _);
9700
9695
  J && (P = {
9701
9696
  ...J,
9702
9697
  ...q(_, J.message)
@@ -9762,8 +9757,8 @@ function Sf(t = {}) {
9762
9757
  ...d
9763
9758
  };
9764
9759
  const m = {
9765
- array: as(),
9766
- state: as()
9760
+ array: cs(),
9761
+ state: cs()
9767
9762
  }, x = e.criteriaMode === Le.all, y = (h) => (g) => {
9768
9763
  clearTimeout(c), c = setTimeout(h, g);
9769
9764
  }, k = async (h) => {
@@ -9816,7 +9811,7 @@ function Sf(t = {}) {
9816
9811
  const w = N(r, h);
9817
9812
  if (w) {
9818
9813
  const C = N(s, h, Y(b) ? N(i, h) : b);
9819
- Y(C) || E && E.defaultChecked || g ? X(s, h, g ? C : fs(w._f)) : B(h, C), o.mount && !o.action && k();
9814
+ Y(C) || E && E.defaultChecked || g ? X(s, h, g ? C : hs(w._f)) : B(h, C), o.mount && !o.action && k();
9820
9815
  }
9821
9816
  }, D = (h, g, b, E, w) => {
9822
9817
  let C = !1, F = !1;
@@ -9870,7 +9865,7 @@ function Sf(t = {}) {
9870
9865
  if (C) {
9871
9866
  const W = l.array.has(C.name), j = w._f && mf(w._f);
9872
9867
  j && d.validatingFields && v([C.name], !0);
9873
- const ge = await bs(w, l.disabled, s, x, e.shouldUseNativeValidation && !g, W);
9868
+ const ge = await xs(w, l.disabled, s, x, e.shouldUseNativeValidation && !g, W);
9874
9869
  if (j && d.validatingFields && v([C.name]), ge[C.name] && (b.valid = !1, g || t.shouldUseNativeValidation))
9875
9870
  break;
9876
9871
  !g && (N(ge, C.name) ? W ? vf(n.errors, ge, C.name) : X(n.errors, C.name, ge[C.name]) : re(n.errors, C.name));
@@ -9892,7 +9887,7 @@ function Sf(t = {}) {
9892
9887
  let w = g;
9893
9888
  if (E) {
9894
9889
  const C = E._f;
9895
- C && (!C.disabled && X(s, h, Zo(g, C)), w = An(C.ref) && Se(g) ? "" : g, Wo(C.ref) ? [...C.ref.options].forEach((F) => F.selected = w.includes(F.value)) : C.refs ? tn(C.ref) ? C.refs.forEach((F) => {
9890
+ C && (!C.disabled && X(s, h, Qo(g, C)), w = An(C.ref) && Se(g) ? "" : g, jo(C.ref) ? [...C.ref.options].forEach((F) => F.selected = w.includes(F.value)) : C.refs ? tn(C.ref) ? C.refs.forEach((F) => {
9896
9891
  (!F.defaultChecked || !F.disabled) && (Array.isArray(w) ? F.checked = !!w.find((W) => W === F.value) : F.checked = w === F.value || !!w);
9897
9892
  }) : C.refs.forEach((F) => F.checked = F.value === w) : ni(C.ref) ? C.ref.value = "" : (C.ref.value = w, C.ref.type || m.state.next({
9898
9893
  name: h,
@@ -9916,7 +9911,7 @@ function Sf(t = {}) {
9916
9911
  name: h,
9917
9912
  dirtyFields: wt(i, s),
9918
9913
  isDirty: P(h, C)
9919
- })) : E && !E._f && !Se(C) ? Q(h, C, b) : B(h, C, b), ms(h, l) ? m.state.next({
9914
+ })) : E && !E._f && !Se(C) ? Q(h, C, b) : B(h, C, b), gs(h, l) ? m.state.next({
9920
9915
  ...n,
9921
9916
  name: h,
9922
9917
  values: ne(s)
@@ -9930,26 +9925,26 @@ function Sf(t = {}) {
9930
9925
  let b = g.name, E = !0;
9931
9926
  const w = N(r, b), C = (j) => {
9932
9927
  E = Number.isNaN(j) || ht(j) && isNaN(j.getTime()) || Fe(j, N(s, b, j));
9933
- }, F = hs(e.mode), W = hs(e.reValidateMode);
9928
+ }, F = ps(e.mode), W = ps(e.reValidateMode);
9934
9929
  if (w) {
9935
9930
  let j, ge;
9936
- const ot = g.type ? fs(w._f) : Ho(h), Ge = h.type === wn.BLUR || h.type === wn.FOCUS_OUT, rl = !gf(w._f) && !e.resolver && !N(n.errors, b) && !w._f.deps || xf(Ge, N(n.touchedFields, b), n.isSubmitted, W, F), Bn = ms(b, l, Ge);
9931
+ const ot = g.type ? hs(w._f) : Uo(h), Ge = h.type === wn.BLUR || h.type === wn.FOCUS_OUT, il = !gf(w._f) && !e.resolver && !N(n.errors, b) && !w._f.deps || xf(Ge, N(n.touchedFields, b), n.isSubmitted, W, F), Bn = gs(b, l, Ge);
9937
9932
  X(s, b, ot), Ge ? (!g || !g.readOnly) && (w._f.onBlur && w._f.onBlur(h), a && a(0)) : w._f.onChange && w._f.onChange(h);
9938
- const zn = D(b, ot, Ge), il = !ye(zn) || Bn;
9933
+ const zn = D(b, ot, Ge), sl = !ye(zn) || Bn;
9939
9934
  if (!Ge && m.state.next({
9940
9935
  name: b,
9941
9936
  type: h.type,
9942
9937
  values: ne(s)
9943
- }), rl)
9944
- return (d.isValid || p.isValid) && (e.mode === "onBlur" ? Ge && k() : Ge || k()), il && m.state.next({ name: b, ...Bn ? {} : zn });
9938
+ }), il)
9939
+ return (d.isValid || p.isValid) && (e.mode === "onBlur" ? Ge && k() : Ge || k()), sl && m.state.next({ name: b, ...Bn ? {} : zn });
9945
9940
  if (!Ge && Bn && m.state.next({ ...n }), e.resolver) {
9946
9941
  const { errors: ci } = await V([b]);
9947
9942
  if (v([b]), C(ot), E) {
9948
- const sl = gs(n.errors, r, b), ui = gs(ci, r, sl.name || b);
9943
+ const ol = ys(n.errors, r, b), ui = ys(ci, r, ol.name || b);
9949
9944
  j = ui.error, b = ui.name, ge = ye(ci);
9950
9945
  }
9951
9946
  } else
9952
- v([b], !0), j = (await bs(w, l.disabled, s, x, e.shouldUseNativeValidation))[b], v([b]), C(ot), E && (j ? ge = !1 : (d.isValid || p.isValid) && (ge = await q(r, !0)));
9947
+ v([b], !0), j = (await xs(w, l.disabled, s, x, e.shouldUseNativeValidation))[b], v([b]), C(ot), E && (j ? ge = !1 : (d.isValid || p.isValid) && (ge = await q(r, !0)));
9953
9948
  E && (w._f.deps && (!Array.isArray(w._f.deps) || w._f.deps.length > 0) && me(w._f.deps), O(b, ge, j, zn));
9954
9949
  }
9955
9950
  }, oe = (h, g) => {
@@ -9974,7 +9969,7 @@ function Sf(t = {}) {
9974
9969
  let b = {
9975
9970
  ...o.mount ? s : i
9976
9971
  };
9977
- return g && (b = Jo(g.dirtyFields ? n.dirtyFields : n.touchedFields, b)), Y(h) ? b : Ne(h) ? N(b, h) : h.map((E) => N(b, E));
9972
+ return g && (b = Wo(g.dirtyFields ? n.dirtyFields : n.touchedFields, b)), Y(h) ? b : Ne(h) ? N(b, h) : h.map((E) => N(b, E));
9978
9973
  }, it = (h, g) => ({
9979
9974
  invalid: !!N((g || n).errors, h),
9980
9975
  isDirty: !!N((g || n).dirtyFields, h),
@@ -10000,7 +9995,7 @@ function Sf(t = {}) {
10000
9995
  next: (b) => "values" in b && h(_(void 0, g), b)
10001
9996
  }) : _(h, g, !0), It = (h) => m.state.subscribe({
10002
9997
  next: (g) => {
10003
- bf(h.name, g.name, h.exact) && yf(g, h.formState || d, nl, h.reRenderRoot) && h.callback({
9998
+ bf(h.name, g.name, h.exact) && yf(g, h.formState || d, rl, h.reRenderRoot) && h.callback({
10004
9999
  values: { ...s },
10005
10000
  ...n,
10006
10001
  ...g,
@@ -10077,10 +10072,10 @@ function Sf(t = {}) {
10077
10072
  }
10078
10073
  }), M(h, !1, void 0, C);
10079
10074
  } else
10080
- b = N(r, h, {}), b._f && (b._f.mount = !1), (e.shouldUnregister || g.shouldUnregister) && !(Uo(l.array, h) && o.action) && l.unMount.add(h);
10075
+ b = N(r, h, {}), b._f && (b._f.mount = !1), (e.shouldUnregister || g.shouldUnregister) && !(qo(l.array, h) && o.action) && l.unMount.add(h);
10081
10076
  }
10082
10077
  };
10083
- }, _n = () => e.shouldFocusError && Ht(r, oe, l.mount), Yo = (h) => {
10078
+ }, _n = () => e.shouldFocusError && Ht(r, oe, l.mount), el = (h) => {
10084
10079
  we(h) && (m.state.next({ disabled: h }), Ht(r, (g, b) => {
10085
10080
  const E = N(r, b);
10086
10081
  E && (g.disabled = E._f.disabled || h, Array.isArray(E._f.refs) && E._f.refs.forEach((w) => {
@@ -10120,7 +10115,7 @@ function Sf(t = {}) {
10120
10115
  errors: n.errors
10121
10116
  }), E)
10122
10117
  throw E;
10123
- }, el = (h, g = {}) => {
10118
+ }, tl = (h, g = {}) => {
10124
10119
  N(r, h) && (Y(g.defaultValue) ? K(h, ne(N(i, h))) : (K(h, g.defaultValue), X(i, h, ne(g.defaultValue))), g.keepTouched || re(n.touchedFields, h), g.keepDirty || (re(n.dirtyFields, h), n.isDirty = g.defaultValue ? P(h, ne(N(i, h))) : P()), g.keepError || (re(n.errors, h), d.isValid && k()), m.state.next({ ...n }));
10125
10120
  }, oi = (h, g = {}) => {
10126
10121
  const b = h ? ne(h) : i, E = ne(b), w = ye(h), C = w ? i : E;
@@ -10180,7 +10175,7 @@ function Sf(t = {}) {
10180
10175
  isSubmitting: !1,
10181
10176
  defaultValues: i
10182
10177
  });
10183
- }, li = (h, g) => oi(xe(h) ? h(s) : h, { ...e.resetOptions, ...g }), tl = (h, g = {}) => {
10178
+ }, li = (h, g) => oi(xe(h) ? h(s) : h, { ...e.resetOptions, ...g }), nl = (h, g = {}) => {
10184
10179
  const b = N(r, h), E = b && b._f;
10185
10180
  if (E) {
10186
10181
  const w = E.refs ? E.refs[0] : E.ref;
@@ -10188,7 +10183,7 @@ function Sf(t = {}) {
10188
10183
  w.focus(), g.shouldSelect && xe(w.select) && w.select();
10189
10184
  });
10190
10185
  }
10191
- }, nl = (h) => {
10186
+ }, rl = (h) => {
10192
10187
  n = {
10193
10188
  ...n,
10194
10189
  ...h
@@ -10218,7 +10213,7 @@ function Sf(t = {}) {
10218
10213
  });
10219
10214
  }),
10220
10215
  _removeUnmounted: Te,
10221
- _disableForm: Yo,
10216
+ _disableForm: el,
10222
10217
  _subjects: m,
10223
10218
  _proxyFormState: d,
10224
10219
  get _fields() {
@@ -10263,11 +10258,11 @@ function Sf(t = {}) {
10263
10258
  setValue: K,
10264
10259
  getValues: xt,
10265
10260
  reset: li,
10266
- resetField: el,
10261
+ resetField: tl,
10267
10262
  clearErrors: st,
10268
10263
  unregister: Vn,
10269
10264
  setError: te,
10270
- setFocus: tl,
10265
+ setFocus: nl,
10271
10266
  getFieldState: it
10272
10267
  };
10273
10268
  return {
@@ -10340,7 +10335,7 @@ function wf(t = {}) {
10340
10335
  }), !((o = s._options.resetOptions) === null || o === void 0) && o.keepIsValid || s._setValid(), n.current = t.values, i((l) => ({ ...l }))) : s._resetDefaultValues();
10341
10336
  }, [s, t.values]), R.useEffect(() => {
10342
10337
  s._state.mount || (s._setValid(), s._state.mount = !0), s._state.watch && (s._state.watch = !1, s._subjects.state.next({ ...s._formState })), s._removeUnmounted();
10343
- }), e.current.formState = R.useMemo(() => Ko(r, s), [s, r]), e.current;
10338
+ }), e.current.formState = R.useMemo(() => Jo(r, s), [s, r]), e.current;
10344
10339
  }
10345
10340
  function Yf(t, e = 3) {
10346
10341
  return t % 1 === 0 ? t.toString() : t.toFixed(e).replace(/\.?0+$/, "");
@@ -10383,10 +10378,10 @@ function rh(t, e, n = 1e-3) {
10383
10378
  isOverAllocated: !i && r < 0
10384
10379
  };
10385
10380
  }
10386
- function Xo() {
10381
+ function Yo() {
10387
10382
  return `dist-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
10388
10383
  }
10389
- Xo();
10384
+ Yo();
10390
10385
  const Af = {
10391
10386
  amount: "Amount",
10392
10387
  glAccount: "GL Account",
@@ -10401,7 +10396,7 @@ const Af = {
10401
10396
  deleteButton: "Delete",
10402
10397
  currencySymbol: "$"
10403
10398
  }, or = () => ({
10404
- id: Xo(),
10399
+ id: Yo(),
10405
10400
  amount: 0,
10406
10401
  glAccount: null,
10407
10402
  isTaxDeductible: !1
@@ -10481,7 +10476,7 @@ const Af = {
10481
10476
  className: L(x.base),
10482
10477
  children: /* @__PURE__ */ T(Pe, { className: L("flex flex-row flex-nowrap items-start gap-4", x.body), children: [
10483
10478
  /* @__PURE__ */ f("div", { className: L("shrink-0", x.amountContainer), children: /* @__PURE__ */ f(
10484
- ws,
10479
+ As,
10485
10480
  {
10486
10481
  "data-testid": `${y || "revenue-distribution-card"}-amount-input`,
10487
10482
  label: /* @__PURE__ */ T("span", { className: "flex items-center gap-1", children: [
@@ -10512,7 +10507,7 @@ const Af = {
10512
10507
  }
10513
10508
  ) }),
10514
10509
  /* @__PURE__ */ f("div", { className: L("grow", x.glAccountContainer), children: /* @__PURE__ */ f(
10515
- gl,
10510
+ yl,
10516
10511
  {
10517
10512
  "data-testid": `${y || "revenue-distribution-card"}-gl-account-input`,
10518
10513
  label: /* @__PURE__ */ T("span", { className: "flex items-center gap-1", children: [
@@ -10545,14 +10540,14 @@ const Af = {
10545
10540
  onSelectionChange: me,
10546
10541
  onClear: xt,
10547
10542
  className: x.glAccountInput,
10548
- children: (te) => /* @__PURE__ */ f(yl, { textValue: te.name, children: /* @__PURE__ */ T("div", { className: "flex flex-col", children: [
10543
+ children: (te) => /* @__PURE__ */ f(bl, { textValue: te.name, children: /* @__PURE__ */ T("div", { className: "flex flex-col", children: [
10549
10544
  /* @__PURE__ */ f("span", { children: te.name }),
10550
10545
  te.code && /* @__PURE__ */ f("span", { className: "text-xs text-default-400", children: te.code })
10551
10546
  ] }) }, te.id)
10552
10547
  }
10553
10548
  ) }),
10554
10549
  /* @__PURE__ */ f("div", { className: L("shrink-0 pt-6 flex items-center", x.taxDeductibleContainer), children: /* @__PURE__ */ f(
10555
- bl,
10550
+ xl,
10556
10551
  {
10557
10552
  radius: "full",
10558
10553
  "data-testid": `${y || "revenue-distribution-card"}-tax-deductible`,
@@ -10679,7 +10674,7 @@ export {
10679
10674
  Zf as Footer,
10680
10675
  Jf as HeroUIProvider,
10681
10676
  Wf as Navbar,
10682
- Bo as OfferCard,
10677
+ zo as OfferCard,
10683
10678
  Wd as OfferCardEmpty,
10684
10679
  Gd as OfferCardError,
10685
10680
  tf as OfferCardList,
@@ -10690,12 +10685,12 @@ export {
10690
10685
  Mf as RevenueDistributionError,
10691
10686
  Of as RevenueDistributionSkeleton,
10692
10687
  Pu as RichTextArea,
10693
- la as Stepper,
10688
+ aa as Stepper,
10694
10689
  rh as calculateAllocationDifference,
10695
10690
  Kd as formatOfferCurrency,
10696
10691
  Yf as formatRevenueAmount,
10697
10692
  eh as formatRevenueCurrency,
10698
- Xo as generateDistributionId,
10693
+ Yo as generateDistributionId,
10699
10694
  th as getCurrencySymbol,
10700
10695
  Yd as offerCardVariants,
10701
10696
  Xd as offerListVariants,