@veevarts/design-system 1.0.0-dev.10 → 1.0.0-dev.11

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,11 +1,11 @@
1
1
  import { jsx as f, jsxs as T, Fragment as Ke } from "react/jsx-runtime";
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";
2
+ import { HeroUIProvider as ll, Button as al, cn as L, Select as ui, SelectItem as di, Alert as Nn, 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 fi, 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 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";
4
+ import R, { useState as he, useRef as Ht, useEffect as et, useReducer as kl, useCallback as le, useMemo as or, forwardRef as En, createElement as lr } from "react";
5
+ import { Globe as hi, User as pi, Heading as Es, Check as Ts, ListTodo as Ms, ListOrdered as Os, List as Ir, AlignJustify as vl, AlignRight as Cl, AlignCenter as Sl, AlignLeft as Is, CornerDownLeft as wl, Redo2 as Al, Undo2 as Nl, Eraser as mi, 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 gi, CheckCircle as Bl, AlertCircle as zl } from "lucide-react";
6
+ import { LazyMotion as Hl, domAnimation as Ul, m as ar, motion as cr, AnimatePresence as ur } from "framer-motion";
7
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";
8
+ import { Mark as Qt, markPasteRule as Tt, markInputRule as Mt, mergeAttributes as ke, Node as Ve, textblockTypeInputRule as dr, wrappingInputRule as Ut, nodeInputRule as Kl, canInsertNode as Jl, isNodeSelection as Wl, Extension as Dr, callOrReturn as jl, getExtensionField as Gl } from "@tiptap/core";
9
9
  import { Underline as Zl } from "@tiptap/extension-underline";
10
10
  import { Color as Ql } from "@tiptap/extension-color";
11
11
  import { Highlight as Xl } from "@tiptap/extension-highlight";
@@ -31,9 +31,9 @@ function ia({
31
31
  label: r
32
32
  }) {
33
33
  return /* @__PURE__ */ f("div", { className: "flex items-center", children: /* @__PURE__ */ T("div", { className: "relative flex items-center", children: [
34
- /* @__PURE__ */ f(pi, { className: "absolute left-3 w-5 h-5 pointer-events-none text-black" }),
34
+ /* @__PURE__ */ f(hi, { className: "absolute left-3 w-5 h-5 pointer-events-none text-black" }),
35
35
  /* @__PURE__ */ f(
36
- di,
36
+ ui,
37
37
  {
38
38
  "data-testid": "language-select-desktop",
39
39
  "aria-label": r,
@@ -45,9 +45,9 @@ function ia({
45
45
  className: "min-w-40 hidden md:inline-flex",
46
46
  isDisabled: t.length === 0,
47
47
  placeholder: r,
48
- startContent: /* @__PURE__ */ f(pi, { className: "w-5 h-5 text-black" }),
48
+ startContent: /* @__PURE__ */ f(hi, { className: "w-5 h-5 text-black" }),
49
49
  children: t.map((i) => /* @__PURE__ */ f(
50
- fi,
50
+ di,
51
51
  {
52
52
  textValue: i.label,
53
53
  "data-testid": `language-select-option-${i.code}`,
@@ -58,7 +58,7 @@ function ia({
58
58
  }
59
59
  ),
60
60
  /* @__PURE__ */ f(
61
- di,
61
+ ui,
62
62
  {
63
63
  "aria-label": r,
64
64
  "data-testid": "language-select-mobile",
@@ -71,7 +71,7 @@ function ia({
71
71
  isDisabled: t.length === 0,
72
72
  placeholder: e || "Language",
73
73
  children: t.map((i) => /* @__PURE__ */ f(
74
- fi,
74
+ di,
75
75
  {
76
76
  className: "min-w-4",
77
77
  textValue: i.code.toUpperCase(),
@@ -97,7 +97,7 @@ function sa({
97
97
  className: "px-2 py-1 w-1 min-w-12 md:min-w-24 rounded-full bg-black text-white text-sm flex items-center",
98
98
  onPress: n,
99
99
  children: [
100
- /* @__PURE__ */ f(mi, { className: "inline w-5 h-5" }),
100
+ /* @__PURE__ */ f(pi, { className: "inline w-5 h-5" }),
101
101
  /* @__PURE__ */ f("span", { className: "hidden md:inline", children: r.logout })
102
102
  ]
103
103
  }
@@ -108,7 +108,7 @@ function sa({
108
108
  className: "px-2 py-1 min-w-12 md:min-w-24 rounded-full bg-black text-white text-sm flex items-center",
109
109
  onPress: e,
110
110
  children: [
111
- /* @__PURE__ */ f(mi, { className: "inline w-5 h-5" }),
111
+ /* @__PURE__ */ f(pi, { className: "inline w-5 h-5" }),
112
112
  /* @__PURE__ */ f("span", { className: "hidden md:inline", children: r.login })
113
113
  ]
114
114
  }
@@ -156,7 +156,7 @@ function Wf({
156
156
  }
157
157
  function jf(t) {
158
158
  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(
159
- En,
159
+ Nn,
160
160
  {
161
161
  description: "This template combines Navbar, Footer, and a confirmation Card. Include title, message, confirmation number, details list, icon, and action buttons. Use Card for the confirmation content.",
162
162
  title: "TODO: Implement ConfirmationPageTemplate",
@@ -165,11 +165,11 @@ function jf(t) {
165
165
  }
166
166
  ) }) });
167
167
  }
168
- var Hn;
169
- const oa = typeof document < "u" ? (Hn = R.useInsertionEffect) !== null && Hn !== void 0 ? Hn : R.useLayoutEffect : () => {
168
+ var zn;
169
+ const oa = typeof document < "u" ? (zn = R.useInsertionEffect) !== null && zn !== void 0 ? zn : R.useLayoutEffect : () => {
170
170
  };
171
- function Fr(t, e, n) {
172
- let [r, i] = he(t || e), s = Ut(r), o = Ut(t !== void 0), l = t !== void 0;
171
+ function Lr(t, e, n) {
172
+ let [r, i] = he(t || e), s = Ht(r), o = Ht(t !== void 0), l = t !== void 0;
173
173
  et(() => {
174
174
  let d = o.current;
175
175
  d !== l && process.env.NODE_ENV !== "production" && console.warn(`WARN: A component changed from ${d ? "controlled" : "uncontrolled"} to ${l ? "controlled" : "uncontrolled"}.`), o.current = l;
@@ -193,7 +193,7 @@ function Fr(t, e, n) {
193
193
  }
194
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
- cr.path,
196
+ ar.path,
197
197
  {
198
198
  animate: { pathLength: 1 },
199
199
  d: "M5 13l4 4L19 7",
@@ -222,7 +222,7 @@ const aa = R.forwardRef(
222
222
  className: a,
223
223
  ...c
224
224
  }, u) => {
225
- const [d, p] = Fr(s, n, i), m = R.useMemo(() => {
225
+ const [d, p] = Lr(s, n, i), m = R.useMemo(() => {
226
226
  let x, y;
227
227
  const k = [
228
228
  "[--active-fg-color:hsl(var(--step-fg-color))]",
@@ -293,8 +293,8 @@ const aa = 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(Hl, { features: Ul, children: /* @__PURE__ */ f(cr.div, { animate: k, className: "relative", children: /* @__PURE__ */ f(
297
- cr.div,
296
+ /* @__PURE__ */ f("div", { className: "h-full relative flex items-center", children: /* @__PURE__ */ f(Hl, { features: Ul, children: /* @__PURE__ */ f(ar.div, { animate: k, className: "relative", children: /* @__PURE__ */ f(
297
+ ar.div,
298
298
  {
299
299
  animate: k,
300
300
  className: L(
@@ -371,7 +371,7 @@ const aa = R.forwardRef(
371
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
- En,
374
+ Nn,
375
375
  {
376
376
  description: "This template combines Navbar, Stepper, Footer, and an event details Card. Include event image, category/spots chips, tags, details grid, and action buttons. Use Card, CardHeader, CardBody for content structure.",
377
377
  title: "TODO: Implement EventDetailsTemplate",
@@ -393,7 +393,7 @@ function Zf() {
393
393
  }
394
394
  );
395
395
  }
396
- function Kt(t) {
396
+ function qt(t) {
397
397
  return typeof t == "string" ? t : t.type;
398
398
  }
399
399
  function lt({ className: t }) {
@@ -660,10 +660,10 @@ function ua({ editor: t, levels: e = [1, 2, 3, 4, 5, 6], isDisabled: n = !1 }) {
660
660
  )
661
661
  ] });
662
662
  }
663
- const Un = {
663
+ const Hn = {
664
664
  bulletList: {
665
665
  label: "Bullet List",
666
- icon: Dr
666
+ icon: Ir
667
667
  },
668
668
  orderedList: {
669
669
  label: "Numbered List",
@@ -686,7 +686,7 @@ function da({
686
686
  t.off("selectionUpdate", l), t.off("transaction", l);
687
687
  };
688
688
  }, [t]);
689
- const i = e.find((l) => t.isActive(l)), s = i ? Un[i].icon : Dr;
689
+ const i = e.find((l) => t.isActive(l)), s = i ? Hn[i].icon : Ir;
690
690
  return /* @__PURE__ */ T(vs, { placement: "top-start", offset: 10, children: [
691
691
  /* @__PURE__ */ f(Cs, { children: /* @__PURE__ */ f(
692
692
  ve,
@@ -712,12 +712,12 @@ function da({
712
712
  c && c.execute({ editor: t });
713
713
  },
714
714
  children: e.map((l) => {
715
- const a = Un[l].icon;
715
+ const a = Hn[l].icon;
716
716
  return /* @__PURE__ */ f(
717
717
  ws,
718
718
  {
719
719
  startContent: /* @__PURE__ */ f(a, { size: 16 }),
720
- children: Un[l].label
720
+ children: Hn[l].label
721
721
  },
722
722
  l
723
723
  );
@@ -806,7 +806,7 @@ const ha = [
806
806
  "#BFDBFE"
807
807
  // Sky light
808
808
  ];
809
- function qn(t) {
809
+ function Un(t) {
810
810
  return /^#([0-9A-F]{3}){1,2}$/i.test(t);
811
811
  }
812
812
  const fe = {
@@ -814,7 +814,7 @@ const fe = {
814
814
  max: 200,
815
815
  step: 10,
816
816
  default: 100
817
- }, bi = {
817
+ }, yi = {
818
818
  lineHeight: 24,
819
819
  // px per row
820
820
  toolbarHeight: 60
@@ -832,15 +832,15 @@ const fe = {
832
832
  // Block nodes
833
833
  paragraph: Ol,
834
834
  heading: Es,
835
- bulletList: Dr,
835
+ bulletList: Ir,
836
836
  orderedList: Os,
837
837
  taskList: Ms,
838
838
  codeBlock: Ml,
839
839
  blockquote: Tl,
840
840
  horizontalRule: El,
841
841
  // Utilities
842
- clearMarks: gi,
843
- clearNodes: gi,
842
+ clearMarks: mi,
843
+ clearNodes: mi,
844
844
  undo: Nl,
845
845
  redo: Al,
846
846
  hardBreak: wl,
@@ -864,7 +864,7 @@ function ya({ value: t, onChange: e, onApply: n, placeholder: r = "#000000" }) {
864
864
  s("Please enter a color");
865
865
  return;
866
866
  }
867
- if (!qn(t)) {
867
+ if (!Un(t)) {
868
868
  s("Invalid hex color (e.g., #FF0000)");
869
869
  return;
870
870
  }
@@ -891,7 +891,7 @@ function ya({ value: t, onChange: e, onApply: n, placeholder: r = "#000000" }) {
891
891
  "div",
892
892
  {
893
893
  className: "w-4 h-4 rounded border border-divider",
894
- style: { backgroundColor: qn(t) ? t : "transparent" }
894
+ style: { backgroundColor: Un(t) ? t : "transparent" }
895
895
  }
896
896
  )
897
897
  }
@@ -905,7 +905,7 @@ function ya({ value: t, onChange: e, onApply: n, placeholder: r = "#000000" }) {
905
905
  isIconOnly: !0,
906
906
  onPress: l,
907
907
  "aria-label": "Apply custom color",
908
- isDisabled: !t || !qn(t),
908
+ isDisabled: !t || !Un(t),
909
909
  children: /* @__PURE__ */ f(Ts, { size: 16 })
910
910
  }
911
911
  )
@@ -913,7 +913,7 @@ function ya({ value: t, onChange: e, onApply: n, placeholder: r = "#000000" }) {
913
913
  /* @__PURE__ */ f("p", { className: "text-xs text-default-500", children: "Enter a hex color code (e.g., #FF0000)" })
914
914
  ] });
915
915
  }
916
- function xi({ editor: t, type: e, allowCustomColor: n = !0, label: r, isDisabled: i = !1 }) {
916
+ function bi({ editor: t, type: e, allowCustomColor: n = !0, label: r, isDisabled: i = !1 }) {
917
917
  const [s, o] = he(!1), [l, a] = he(""), c = e === "textColor" ? ha : pa, u = (y) => {
918
918
  const k = We[e];
919
919
  k && k.execute({
@@ -1044,11 +1044,11 @@ function xa({ children: t, id: e, label: n, className: r, useButtonGroup: i = !0
1044
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 });
1045
1045
  }
1046
1046
  function Rs(t, e) {
1047
- const n = lr(() => {
1047
+ const n = or(() => {
1048
1048
  if (!t)
1049
1049
  return {};
1050
1050
  const s = {};
1051
- return Array.from(new Set(e.map((l) => Kt(l)))).forEach((l) => {
1051
+ return Array.from(new Set(e.map((l) => qt(l)))).forEach((l) => {
1052
1052
  const a = We[l];
1053
1053
  if (a)
1054
1054
  try {
@@ -1072,7 +1072,7 @@ function Rs(t, e) {
1072
1072
  return;
1073
1073
  const s = () => {
1074
1074
  const o = {};
1075
- Array.from(new Set(e.map((a) => Kt(a)))).forEach((a) => {
1075
+ Array.from(new Set(e.map((a) => qt(a)))).forEach((a) => {
1076
1076
  const c = We[a];
1077
1077
  if (c)
1078
1078
  try {
@@ -1170,7 +1170,7 @@ const va = ["bold", "italic", "strike", "underline", "code"];
1170
1170
  function Ca({ editor: t, modifiers: e, onToolbarAction: n }) {
1171
1171
  const r = Rs(t, e), { toggleModifier: i } = Ps(t, n);
1172
1172
  if (!t) return null;
1173
- const s = e.map((o) => Kt(o)).filter(
1173
+ const s = e.map((o) => qt(o)).filter(
1174
1174
  (o) => (
1175
1175
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
1176
1176
  va.includes(o)
@@ -1202,7 +1202,7 @@ function Sa({
1202
1202
  }) {
1203
1203
  const l = Rs(t, e), { toggleModifier: a, executeCommand: c } = Ps(t, o);
1204
1204
  if (!t) return null;
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;
1205
+ const u = e.map((O) => qt(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;
1206
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: [
1207
1207
  d && /* @__PURE__ */ T(Ke, { children: [
1208
1208
  /* @__PURE__ */ f(
@@ -1218,7 +1218,7 @@ function Sa({
1218
1218
  p && /* @__PURE__ */ T(Ke, { children: [
1219
1219
  /* @__PURE__ */ T("div", { className: "flex items-center gap-1", children: [
1220
1220
  u.includes("textColor") && /* @__PURE__ */ f(
1221
- xi,
1221
+ bi,
1222
1222
  {
1223
1223
  editor: t,
1224
1224
  type: "textColor",
@@ -1227,7 +1227,7 @@ function Sa({
1227
1227
  }
1228
1228
  ),
1229
1229
  u.includes("highlight") && /* @__PURE__ */ f(
1230
- xi,
1230
+ bi,
1231
1231
  {
1232
1232
  editor: t,
1233
1233
  type: "highlight",
@@ -1354,7 +1354,7 @@ function Sa({
1354
1354
  )
1355
1355
  ] }) });
1356
1356
  }
1357
- const wa = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, Aa = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g, Na = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/, Ea = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g, Ta = Xt.create({
1357
+ const wa = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, Aa = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g, Na = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/, Ea = /(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g, Ta = Qt.create({
1358
1358
  name: "bold",
1359
1359
  addOptions() {
1360
1360
  return {
@@ -1420,7 +1420,7 @@ const wa = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, Aa = /(?:^|\s
1420
1420
  })
1421
1421
  ];
1422
1422
  }
1423
- }), Ma = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/, Oa = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g, Ia = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/, Da = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g, La = Xt.create({
1423
+ }), Ma = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/, Oa = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g, Ia = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/, Da = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g, La = Qt.create({
1424
1424
  name: "italic",
1425
1425
  addOptions() {
1426
1426
  return {
@@ -1485,7 +1485,7 @@ const wa = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, Aa = /(?:^|\s
1485
1485
  })
1486
1486
  ];
1487
1487
  }
1488
- }), Fa = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/, Ra = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g, Pa = Xt.create({
1488
+ }), Fa = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/, Ra = /(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g, Pa = Qt.create({
1489
1489
  name: "strike",
1490
1490
  addOptions() {
1491
1491
  return {
@@ -1541,7 +1541,7 @@ const wa = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, Aa = /(?:^|\s
1541
1541
  })
1542
1542
  ];
1543
1543
  }
1544
- }), Va = /(^|[^`])`([^`]+)`(?!`)/, $a = /(^|[^`])`([^`]+)`(?!`)/g, _a = Xt.create({
1544
+ }), Va = /(^|[^`])`([^`]+)`(?!`)/, $a = /(^|[^`])`([^`]+)`(?!`)/g, _a = Qt.create({
1545
1545
  name: "code",
1546
1546
  addOptions() {
1547
1547
  return {
@@ -1596,7 +1596,7 @@ const wa = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, Aa = /(?:^|\s
1596
1596
  const s = n.getAttribute("style"), o = (i = (r = n.parentElement) === null || r === void 0 ? void 0 : r.closest("span")) === null || i === void 0 ? void 0 : i.getAttribute("style");
1597
1597
  n.setAttribute("style", `${o};${s}`);
1598
1598
  });
1599
- }, za = Xt.create({
1599
+ }, za = Qt.create({
1600
1600
  name: "textStyle",
1601
1601
  priority: 101,
1602
1602
  addOptions() {
@@ -1669,7 +1669,7 @@ const wa = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, Aa = /(?:^|\s
1669
1669
  }), {});
1670
1670
  },
1671
1671
  addInputRules() {
1672
- return this.options.levels.map((t) => fr({
1672
+ return this.options.levels.map((t) => dr({
1673
1673
  find: new RegExp(`^(#{${Math.min(...this.options.levels)},${t}})\\s$`),
1674
1674
  type: this.type,
1675
1675
  getAttributes: {
@@ -1705,7 +1705,7 @@ const wa = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, Aa = /(?:^|\s
1705
1705
  "Mod-Alt-0": () => this.editor.commands.setParagraph()
1706
1706
  };
1707
1707
  }
1708
- }), qa = "listItem", ki = "textStyle", vi = /^\s*([-+*])\s$/, Ka = Ve.create({
1708
+ }), qa = "listItem", xi = "textStyle", ki = /^\s*([-+*])\s$/, Ka = Ve.create({
1709
1709
  name: "bulletList",
1710
1710
  addOptions() {
1711
1711
  return {
@@ -1729,7 +1729,7 @@ const wa = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, Aa = /(?:^|\s
1729
1729
  },
1730
1730
  addCommands() {
1731
1731
  return {
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)
1732
+ 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)
1733
1733
  };
1734
1734
  },
1735
1735
  addKeyboardShortcuts() {
@@ -1738,22 +1738,22 @@ const wa = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, Aa = /(?:^|\s
1738
1738
  };
1739
1739
  },
1740
1740
  addInputRules() {
1741
- let t = qt({
1742
- find: vi,
1741
+ let t = Ut({
1742
+ find: ki,
1743
1743
  type: this.type
1744
1744
  });
1745
- return (this.options.keepMarks || this.options.keepAttributes) && (t = qt({
1746
- find: vi,
1745
+ return (this.options.keepMarks || this.options.keepAttributes) && (t = Ut({
1746
+ find: ki,
1747
1747
  type: this.type,
1748
1748
  keepMarks: this.options.keepMarks,
1749
1749
  keepAttributes: this.options.keepAttributes,
1750
- getAttributes: () => this.editor.getAttributes(ki),
1750
+ getAttributes: () => this.editor.getAttributes(xi),
1751
1751
  editor: this.editor
1752
1752
  })), [
1753
1753
  t
1754
1754
  ];
1755
1755
  }
1756
- }), Ja = "listItem", Ci = "textStyle", Si = /^(\d+)\.\s$/, Wa = Ve.create({
1756
+ }), Ja = "listItem", vi = "textStyle", Ci = /^(\d+)\.\s$/, Wa = Ve.create({
1757
1757
  name: "orderedList",
1758
1758
  addOptions() {
1759
1759
  return {
@@ -1792,7 +1792,7 @@ const wa = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, Aa = /(?:^|\s
1792
1792
  },
1793
1793
  addCommands() {
1794
1794
  return {
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)
1795
+ 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)
1796
1796
  };
1797
1797
  },
1798
1798
  addKeyboardShortcuts() {
@@ -1801,18 +1801,18 @@ const wa = /(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/, Aa = /(?:^|\s
1801
1801
  };
1802
1802
  },
1803
1803
  addInputRules() {
1804
- let t = qt({
1805
- find: Si,
1804
+ let t = Ut({
1805
+ find: Ci,
1806
1806
  type: this.type,
1807
1807
  getAttributes: (e) => ({ start: +e[1] }),
1808
1808
  joinPredicate: (e, n) => n.childCount + n.attrs.start === +e[1]
1809
1809
  });
1810
- return (this.options.keepMarks || this.options.keepAttributes) && (t = qt({
1811
- find: Si,
1810
+ return (this.options.keepMarks || this.options.keepAttributes) && (t = Ut({
1811
+ find: Ci,
1812
1812
  type: this.type,
1813
1813
  keepMarks: this.options.keepMarks,
1814
1814
  keepAttributes: this.options.keepAttributes,
1815
- getAttributes: (e) => ({ start: +e[1], ...this.editor.getAttributes(Ci) }),
1815
+ getAttributes: (e) => ({ start: +e[1], ...this.editor.getAttributes(vi) }),
1816
1816
  joinPredicate: (e, n) => n.childCount + n.attrs.start === +e[1],
1817
1817
  editor: this.editor
1818
1818
  })), [
@@ -2077,15 +2077,15 @@ class z {
2077
2077
  */
2078
2078
  findIndex(e) {
2079
2079
  if (e == 0)
2080
- return nn(0, e);
2080
+ return tn(0, e);
2081
2081
  if (e == this.size)
2082
- return nn(this.content.length, e);
2082
+ return tn(this.content.length, e);
2083
2083
  if (e > this.size || e < 0)
2084
2084
  throw new RangeError(`Position ${e} outside of fragment (${this})`);
2085
2085
  for (let n = 0, r = 0; ; n++) {
2086
2086
  let i = this.child(n), s = r + i.nodeSize;
2087
2087
  if (s >= e)
2088
- return s == e ? nn(n + 1, s) : nn(n, r);
2088
+ return s == e ? tn(n + 1, s) : tn(n, r);
2089
2089
  r = s;
2090
2090
  }
2091
2091
  }
@@ -2150,11 +2150,11 @@ class z {
2150
2150
  }
2151
2151
  }
2152
2152
  z.empty = new z([], 0);
2153
- const Kn = { index: 0, offset: 0 };
2154
- function nn(t, e) {
2155
- return Kn.index = t, Kn.offset = e, Kn;
2153
+ const qn = { index: 0, offset: 0 };
2154
+ function tn(t, e) {
2155
+ return qn.index = t, qn.offset = e, qn;
2156
2156
  }
2157
- function hr(t, e) {
2157
+ function fr(t, e) {
2158
2158
  if (t === e)
2159
2159
  return !0;
2160
2160
  if (!(t && typeof t == "object") || !(e && typeof e == "object"))
@@ -2166,11 +2166,11 @@ function hr(t, e) {
2166
2166
  if (t.length != e.length)
2167
2167
  return !1;
2168
2168
  for (let r = 0; r < t.length; r++)
2169
- if (!hr(t[r], e[r]))
2169
+ if (!fr(t[r], e[r]))
2170
2170
  return !1;
2171
2171
  } else {
2172
2172
  for (let r in t)
2173
- if (!(r in e) || !hr(t[r], e[r]))
2173
+ if (!(r in e) || !fr(t[r], e[r]))
2174
2174
  return !1;
2175
2175
  for (let r in e)
2176
2176
  if (!(r in t))
@@ -2232,7 +2232,7 @@ class Oe {
2232
2232
  another mark.
2233
2233
  */
2234
2234
  eq(e) {
2235
- return this == e || this.type == e.type && hr(this.attrs, e.attrs);
2235
+ return this == e || this.type == e.type && fr(this.attrs, e.attrs);
2236
2236
  }
2237
2237
  /**
2238
2238
  Convert this mark to a JSON-serializeable representation.
@@ -2391,7 +2391,7 @@ function Za(t) {
2391
2391
  function Qa(t) {
2392
2392
  return t.style != null;
2393
2393
  }
2394
- class hn {
2394
+ class fn {
2395
2395
  /**
2396
2396
  Create a parser that targets the given schema, using the given
2397
2397
  parsing rules.
@@ -2417,7 +2417,7 @@ class hn {
2417
2417
  Parse a document from the content of a DOM node.
2418
2418
  */
2419
2419
  parse(e, n = {}) {
2420
- let r = new Ai(this, n, !1);
2420
+ let r = new wi(this, n, !1);
2421
2421
  return r.addAll(e, Oe.none, n.from, n.to), r.finish();
2422
2422
  }
2423
2423
  /**
@@ -2429,7 +2429,7 @@ class hn {
2429
2429
  the left of the input and the end of nodes at the end.
2430
2430
  */
2431
2431
  parseSlice(e, n = {}) {
2432
- let r = new Ai(this, n, !0);
2432
+ let r = new wi(this, n, !0);
2433
2433
  return r.addAll(e, Oe.none, n.from, n.to), H.maxOpen(r.finish());
2434
2434
  }
2435
2435
  /**
@@ -2486,13 +2486,13 @@ class hn {
2486
2486
  for (let i in e.marks) {
2487
2487
  let s = e.marks[i].spec.parseDOM;
2488
2488
  s && s.forEach((o) => {
2489
- r(o = Ni(o)), o.mark || o.ignore || o.clearMark || (o.mark = i);
2489
+ r(o = Ai(o)), o.mark || o.ignore || o.clearMark || (o.mark = i);
2490
2490
  });
2491
2491
  }
2492
2492
  for (let i in e.nodes) {
2493
2493
  let s = e.nodes[i].spec.parseDOM;
2494
2494
  s && s.forEach((o) => {
2495
- r(o = Ni(o)), o.node || o.ignore || o.mark || (o.node = i);
2495
+ r(o = Ai(o)), o.node || o.ignore || o.mark || (o.node = i);
2496
2496
  });
2497
2497
  }
2498
2498
  return n;
@@ -2503,7 +2503,7 @@ class hn {
2503
2503
  [priority](https://prosemirror.net/docs/ref/#model.GenericParseRule.priority).
2504
2504
  */
2505
2505
  static fromSchema(e) {
2506
- return e.cached.domParser || (e.cached.domParser = new hn(e, hn.schemaRules(e)));
2506
+ return e.cached.domParser || (e.cached.domParser = new fn(e, fn.schemaRules(e)));
2507
2507
  }
2508
2508
  }
2509
2509
  const zs = {
@@ -2546,13 +2546,13 @@ const zs = {
2546
2546
  script: !0,
2547
2547
  style: !0,
2548
2548
  title: !0
2549
- }, Hs = { ol: !0, ul: !0 }, Jt = 1, pr = 2, Vt = 4;
2550
- function wi(t, e, n) {
2551
- return e != null ? (e ? Jt : 0) | (e === "full" ? pr : 0) : t && t.whitespace == "pre" ? Jt | pr : n & ~Vt;
2549
+ }, Hs = { ol: !0, ul: !0 }, Kt = 1, hr = 2, Pt = 4;
2550
+ function Si(t, e, n) {
2551
+ return e != null ? (e ? Kt : 0) | (e === "full" ? hr : 0) : t && t.whitespace == "pre" ? Kt | hr : n & ~Pt;
2552
2552
  }
2553
- class rn {
2553
+ class nn {
2554
2554
  constructor(e, n, r, i, s, o) {
2555
- this.type = e, this.attrs = n, this.marks = r, this.solid = i, this.options = o, this.content = [], this.activeMarks = Oe.none, this.match = s || (o & Vt ? null : e.contentMatch);
2555
+ this.type = e, this.attrs = n, this.marks = r, this.solid = i, this.options = o, this.content = [], this.activeMarks = Oe.none, this.match = s || (o & Pt ? null : e.contentMatch);
2556
2556
  }
2557
2557
  findWrapping(e) {
2558
2558
  if (!this.match) {
@@ -2569,7 +2569,7 @@ class rn {
2569
2569
  return this.match.findWrapping(e.type);
2570
2570
  }
2571
2571
  finish(e) {
2572
- if (!(this.options & Jt)) {
2572
+ if (!(this.options & Kt)) {
2573
2573
  let r = this.content[this.content.length - 1], i;
2574
2574
  if (r && r.isText && (i = /[ \t\r\n\u000c]+$/.exec(r.text))) {
2575
2575
  let s = r;
@@ -2583,11 +2583,11 @@ class rn {
2583
2583
  return this.type ? this.type.inlineContent : this.content.length ? this.content[0].isInline : e.parentNode && !zs.hasOwnProperty(e.parentNode.nodeName.toLowerCase());
2584
2584
  }
2585
2585
  }
2586
- class Ai {
2586
+ class wi {
2587
2587
  constructor(e, n, r) {
2588
2588
  this.parser = e, this.options = n, this.isOpen = r, this.open = 0, this.localPreserveWS = !1;
2589
- let i = n.topNode, s, o = wi(null, n.preserveWhitespace, 0) | (r ? Vt : 0);
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;
2589
+ let i = n.topNode, s, o = Si(null, n.preserveWhitespace, 0) | (r ? Pt : 0);
2590
+ i ? s = new nn(i.type, i.attrs, Oe.none, !0, n.topMatch || i.type.contentMatch, o) : r ? s = new nn(null, null, Oe.none, !0, null, o) : s = new nn(e.schema.topNodeType, null, Oe.none, !0, null, o), this.nodes = [s], this.find = n.findPositions, this.needsBlock = !1;
2591
2591
  }
2592
2592
  get top() {
2593
2593
  return this.nodes[this.open];
@@ -2599,7 +2599,7 @@ class Ai {
2599
2599
  e.nodeType == 3 ? this.addTextNode(e, n) : e.nodeType == 1 && this.addElement(e, n);
2600
2600
  }
2601
2601
  addTextNode(e, n) {
2602
- let r = e.nodeValue, i = this.top, s = i.options & pr ? "full" : this.localPreserveWS || (i.options & Jt) > 0, { schema: o } = this.parser;
2602
+ let r = e.nodeValue, i = this.top, s = i.options & hr ? "full" : this.localPreserveWS || (i.options & Kt) > 0, { schema: o } = this.parser;
2603
2603
  if (s === "full" || i.inlineContext(e) || /[^ \t\r\n\u000c]/.test(r)) {
2604
2604
  if (s)
2605
2605
  if (s === "full")
@@ -2752,7 +2752,7 @@ class Ai {
2752
2752
  s.match && (s.match = s.match.matchType(e.type));
2753
2753
  let o = Oe.none;
2754
2754
  for (let l of i.concat(e.marks))
2755
- (s.type ? s.type.allowsMarkType(l.type) : Ei(l.type, e.type)) && (o = l.addToSet(o));
2755
+ (s.type ? s.type.allowsMarkType(l.type) : Ni(l.type, e.type)) && (o = l.addToSet(o));
2756
2756
  return s.content.push(e.mark(o)), !0;
2757
2757
  }
2758
2758
  return !1;
@@ -2768,10 +2768,10 @@ class Ai {
2768
2768
  this.closeExtra();
2769
2769
  let o = this.top;
2770
2770
  o.match = o.match && o.match.matchType(e);
2771
- let l = wi(e, s, o.options);
2772
- o.options & Vt && o.content.length == 0 && (l |= Vt);
2771
+ let l = Si(e, s, o.options);
2772
+ o.options & Pt && o.content.length == 0 && (l |= Pt);
2773
2773
  let a = Oe.none;
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;
2774
+ 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 nn(e, n, a, i, null, l)), this.open++, r;
2775
2775
  }
2776
2776
  // Make sure all nodes above this.open are finished and added to
2777
2777
  // their parents
@@ -2790,7 +2790,7 @@ class Ai {
2790
2790
  for (let n = this.open; n >= 0; n--) {
2791
2791
  if (this.nodes[n] == e)
2792
2792
  return this.open = n, !0;
2793
- this.localPreserveWS && (this.nodes[n].options |= Jt);
2793
+ this.localPreserveWS && (this.nodes[n].options |= Kt);
2794
2794
  }
2795
2795
  return !1;
2796
2796
  }
@@ -2874,13 +2874,13 @@ function Ya(t) {
2874
2874
  function ec(t, e) {
2875
2875
  return (t.matches || t.msMatchesSelector || t.webkitMatchesSelector || t.mozMatchesSelector).call(t, e);
2876
2876
  }
2877
- function Ni(t) {
2877
+ function Ai(t) {
2878
2878
  let e = {};
2879
2879
  for (let n in t)
2880
2880
  e[n] = t[n];
2881
2881
  return e;
2882
2882
  }
2883
- function Ei(t, e) {
2883
+ function Ni(t, e) {
2884
2884
  let n = e.schema.nodes;
2885
2885
  for (let r in n) {
2886
2886
  let i = n[r];
@@ -2898,7 +2898,7 @@ function Ei(t, e) {
2898
2898
  return !0;
2899
2899
  }
2900
2900
  }
2901
- class Mn {
2901
+ class Tn {
2902
2902
  /**
2903
2903
  Create a serializer. `nodes` should map node names to functions
2904
2904
  that take a node and return a description of the corresponding
@@ -2918,7 +2918,7 @@ class Mn {
2918
2918
  nodes.
2919
2919
  */
2920
2920
  serializeFragment(e, n = {}, r) {
2921
- r || (r = Jn(n).createDocumentFragment());
2921
+ r || (r = Kn(n).createDocumentFragment());
2922
2922
  let i = r, s = [];
2923
2923
  return e.forEach((o) => {
2924
2924
  if (s.length || o.marks.length) {
@@ -2947,7 +2947,7 @@ class Mn {
2947
2947
  @internal
2948
2948
  */
2949
2949
  serializeNodeInner(e, n) {
2950
- let { dom: r, contentDOM: i } = an(Jn(n), this.nodes[e.type.name](e), null, e.attrs);
2950
+ let { dom: r, contentDOM: i } = ln(Kn(n), this.nodes[e.type.name](e), null, e.attrs);
2951
2951
  if (i) {
2952
2952
  if (e.isLeaf)
2953
2953
  throw new RangeError("Content hole not allowed in a leaf node spec");
@@ -2975,34 +2975,34 @@ class Mn {
2975
2975
  */
2976
2976
  serializeMark(e, n, r = {}) {
2977
2977
  let i = this.marks[e.type.name];
2978
- return i && an(Jn(r), i(e, n), null, e.attrs);
2978
+ return i && ln(Kn(r), i(e, n), null, e.attrs);
2979
2979
  }
2980
2980
  static renderSpec(e, n, r = null, i) {
2981
- return an(e, n, r, i);
2981
+ return ln(e, n, r, i);
2982
2982
  }
2983
2983
  /**
2984
2984
  Build a serializer using the [`toDOM`](https://prosemirror.net/docs/ref/#model.NodeSpec.toDOM)
2985
2985
  properties in a schema's node and mark specs.
2986
2986
  */
2987
2987
  static fromSchema(e) {
2988
- return e.cached.domSerializer || (e.cached.domSerializer = new Mn(this.nodesFromSchema(e), this.marksFromSchema(e)));
2988
+ return e.cached.domSerializer || (e.cached.domSerializer = new Tn(this.nodesFromSchema(e), this.marksFromSchema(e)));
2989
2989
  }
2990
2990
  /**
2991
2991
  Gather the serializers in a schema's node specs into an object.
2992
2992
  This can be useful as a base to build a custom serializer from.
2993
2993
  */
2994
2994
  static nodesFromSchema(e) {
2995
- let n = Ti(e.nodes);
2995
+ let n = Ei(e.nodes);
2996
2996
  return n.text || (n.text = (r) => r.text), n;
2997
2997
  }
2998
2998
  /**
2999
2999
  Gather the serializers in a schema's mark specs into an object.
3000
3000
  */
3001
3001
  static marksFromSchema(e) {
3002
- return Ti(e.marks);
3002
+ return Ei(e.marks);
3003
3003
  }
3004
3004
  }
3005
- function Ti(t) {
3005
+ function Ei(t) {
3006
3006
  let e = {};
3007
3007
  for (let n in t) {
3008
3008
  let r = t[n].spec.toDOM;
@@ -3010,13 +3010,13 @@ function Ti(t) {
3010
3010
  }
3011
3011
  return e;
3012
3012
  }
3013
- function Jn(t) {
3013
+ function Kn(t) {
3014
3014
  return t.document || window.document;
3015
3015
  }
3016
- const Mi = /* @__PURE__ */ new WeakMap();
3016
+ const Ti = /* @__PURE__ */ new WeakMap();
3017
3017
  function tc(t) {
3018
- let e = Mi.get(t);
3019
- return e === void 0 && Mi.set(t, e = nc(t)), e;
3018
+ let e = Ti.get(t);
3019
+ return e === void 0 && Ti.set(t, e = nc(t)), e;
3020
3020
  }
3021
3021
  function nc(t) {
3022
3022
  let e = null;
@@ -3034,7 +3034,7 @@ function nc(t) {
3034
3034
  }
3035
3035
  return n(t), e;
3036
3036
  }
3037
- function an(t, e, n, r) {
3037
+ function ln(t, e, n, r) {
3038
3038
  if (typeof e == "string")
3039
3039
  return { dom: t.createTextNode(e) };
3040
3040
  if (e.nodeType != null)
@@ -3064,7 +3064,7 @@ function an(t, e, n, r) {
3064
3064
  throw new RangeError("Content hole must be the only child of its parent node");
3065
3065
  return { dom: a, contentDOM: a };
3066
3066
  } else {
3067
- let { dom: m, contentDOM: x } = an(t, p, n, r);
3067
+ let { dom: m, contentDOM: x } = ln(t, p, n, r);
3068
3068
  if (a.appendChild(m), x) {
3069
3069
  if (l)
3070
3070
  throw new RangeError("Multiple content holes");
@@ -3078,14 +3078,14 @@ const Us = 65535, qs = Math.pow(2, 16);
3078
3078
  function rc(t, e) {
3079
3079
  return t + e * qs;
3080
3080
  }
3081
- function Oi(t) {
3081
+ function Mi(t) {
3082
3082
  return t & Us;
3083
3083
  }
3084
3084
  function ic(t) {
3085
3085
  return (t - (t & Us)) / qs;
3086
3086
  }
3087
- const Ks = 1, Js = 2, cn = 4, Ws = 8;
3088
- class mr {
3087
+ const Ks = 1, Js = 2, an = 4, Ws = 8;
3088
+ class pr {
3089
3089
  /**
3090
3090
  @internal
3091
3091
  */
@@ -3104,13 +3104,13 @@ class mr {
3104
3104
  Tells you whether the token before the mapped position was deleted.
3105
3105
  */
3106
3106
  get deletedBefore() {
3107
- return (this.delInfo & (Ks | cn)) > 0;
3107
+ return (this.delInfo & (Ks | an)) > 0;
3108
3108
  }
3109
3109
  /**
3110
3110
  True when the token after the mapped position was deleted.
3111
3111
  */
3112
3112
  get deletedAfter() {
3113
- return (this.delInfo & (Js | cn)) > 0;
3113
+ return (this.delInfo & (Js | an)) > 0;
3114
3114
  }
3115
3115
  /**
3116
3116
  Tells whether any of the steps mapped through deletes across the
@@ -3118,7 +3118,7 @@ class mr {
3118
3118
  position).
3119
3119
  */
3120
3120
  get deletedAcross() {
3121
- return (this.delInfo & cn) > 0;
3121
+ return (this.delInfo & an) > 0;
3122
3122
  }
3123
3123
  }
3124
3124
  class Ae {
@@ -3135,7 +3135,7 @@ class Ae {
3135
3135
  @internal
3136
3136
  */
3137
3137
  recover(e) {
3138
- let n = 0, r = Oi(e);
3138
+ let n = 0, r = Mi(e);
3139
3139
  if (!this.inverted)
3140
3140
  for (let i = 0; i < r; i++)
3141
3141
  n += this.ranges[i * 3 + 2] - this.ranges[i * 3 + 1];
@@ -3161,18 +3161,18 @@ class Ae {
3161
3161
  let p = c ? e == a ? -1 : e == d ? 1 : n : n, m = a + i + (p < 0 ? 0 : u);
3162
3162
  if (r)
3163
3163
  return m;
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);
3164
+ let x = e == (n < 0 ? a : d) ? null : rc(l / 3, e - a), y = e == a ? Js : e == d ? Ks : an;
3165
+ return (n < 0 ? e != a : e != d) && (y |= Ws), new pr(m, y, x);
3166
3166
  }
3167
3167
  i += u - c;
3168
3168
  }
3169
- return r ? e + i : new mr(e + i, 0, null);
3169
+ return r ? e + i : new pr(e + i, 0, null);
3170
3170
  }
3171
3171
  /**
3172
3172
  @internal
3173
3173
  */
3174
3174
  touches(e, n) {
3175
- let r = 0, i = Oi(n), s = this.inverted ? 2 : 1, o = this.inverted ? 1 : 2;
3175
+ let r = 0, i = Mi(n), s = this.inverted ? 2 : 1, o = this.inverted ? 1 : 2;
3176
3176
  for (let l = 0; l < this.ranges.length; l += 3) {
3177
3177
  let a = this.ranges[l] - (this.inverted ? r : 0);
3178
3178
  if (a > e)
@@ -3218,7 +3218,7 @@ class Ae {
3218
3218
  }
3219
3219
  }
3220
3220
  Ae.empty = new Ae([]);
3221
- class pn {
3221
+ class hn {
3222
3222
  /**
3223
3223
  Create a new mapping with the given position maps.
3224
3224
  */
@@ -3235,7 +3235,7 @@ class pn {
3235
3235
  Create a mapping that maps only through a part of this one.
3236
3236
  */
3237
3237
  slice(e = 0, n = this.maps.length) {
3238
- return new pn(this._maps, this.mirror, e, n);
3238
+ return new hn(this._maps, this.mirror, e, n);
3239
3239
  }
3240
3240
  /**
3241
3241
  Add a step map to the end of this mapping. If `mirrors` is
@@ -3286,7 +3286,7 @@ class pn {
3286
3286
  Create an inverted version of this mapping.
3287
3287
  */
3288
3288
  invert() {
3289
- let e = new pn();
3289
+ let e = new hn();
3290
3290
  return e.appendMappingInverted(this), e;
3291
3291
  }
3292
3292
  /**
@@ -3322,10 +3322,10 @@ class pn {
3322
3322
  }
3323
3323
  i |= l.delInfo, e = l.pos;
3324
3324
  }
3325
- return r ? e : new mr(e, i, null);
3325
+ return r ? e : new pr(e, i, null);
3326
3326
  }
3327
3327
  }
3328
- const Wn = /* @__PURE__ */ Object.create(null);
3328
+ const Jn = /* @__PURE__ */ Object.create(null);
3329
3329
  class pe {
3330
3330
  /**
3331
3331
  Get the step map that represents the changes made by this step,
@@ -3350,7 +3350,7 @@ class pe {
3350
3350
  static fromJSON(e, n) {
3351
3351
  if (!n || !n.stepType)
3352
3352
  throw new RangeError("Invalid input for Step.fromJSON");
3353
- let r = Wn[n.stepType];
3353
+ let r = Jn[n.stepType];
3354
3354
  if (!r)
3355
3355
  throw new RangeError(`No step type ${n.stepType} defined`);
3356
3356
  return r.fromJSON(e, n);
@@ -3362,9 +3362,9 @@ class pe {
3362
3362
  that's unlikely to clash with steps from other modules.
3363
3363
  */
3364
3364
  static jsonID(e, n) {
3365
- if (e in Wn)
3365
+ if (e in Jn)
3366
3366
  throw new RangeError("Duplicate use of step JSON ID " + e);
3367
- return Wn[e] = n, n.prototype.jsonID = e, n;
3367
+ return Jn[e] = n, n.prototype.jsonID = e, n;
3368
3368
  }
3369
3369
  }
3370
3370
  class ie {
@@ -3401,11 +3401,11 @@ class ie {
3401
3401
  }
3402
3402
  }
3403
3403
  }
3404
- function Rr(t, e, n) {
3404
+ function Fr(t, e, n) {
3405
3405
  let r = [];
3406
3406
  for (let i = 0; i < t.childCount; i++) {
3407
3407
  let s = t.child(i);
3408
- s.content.size && (s = s.copy(Rr(s.content, e, s))), s.isInline && (s = e(s, n, i)), r.push(s);
3408
+ s.content.size && (s = s.copy(Fr(s.content, e, s))), s.isInline && (s = e(s, n, i)), r.push(s);
3409
3409
  }
3410
3410
  return z.fromArray(r);
3411
3411
  }
@@ -3417,7 +3417,7 @@ class ut extends pe {
3417
3417
  super(), this.from = e, this.to = n, this.mark = r;
3418
3418
  }
3419
3419
  apply(e) {
3420
- let n = e.slice(this.from, this.to), r = e.resolve(this.from), i = r.node(r.sharedDepth(this.to)), s = new H(Rr(n.content, (o, l) => !o.isAtom || !l.type.allowsMarkType(this.mark.type) ? o : o.mark(this.mark.addToSet(o.marks)), i), n.openStart, n.openEnd);
3420
+ let n = e.slice(this.from, this.to), r = e.resolve(this.from), i = r.node(r.sharedDepth(this.to)), s = new H(Fr(n.content, (o, l) => !o.isAtom || !l.type.allowsMarkType(this.mark.type) ? o : o.mark(this.mark.addToSet(o.marks)), i), n.openStart, n.openEnd);
3421
3421
  return ie.fromReplace(e, this.from, this.to, s);
3422
3422
  }
3423
3423
  invert() {
@@ -3456,7 +3456,7 @@ class dt extends pe {
3456
3456
  super(), this.from = e, this.to = n, this.mark = r;
3457
3457
  }
3458
3458
  apply(e) {
3459
- let n = e.slice(this.from, this.to), r = new H(Rr(n.content, (i) => i.mark(this.mark.removeFromSet(i.marks)), e), n.openStart, n.openEnd);
3459
+ let n = e.slice(this.from, this.to), r = new H(Fr(n.content, (i) => i.mark(this.mark.removeFromSet(i.marks)), e), n.openStart, n.openEnd);
3460
3460
  return ie.fromReplace(e, this.from, this.to, r);
3461
3461
  }
3462
3462
  invert() {
@@ -3512,7 +3512,7 @@ class ft extends pe {
3512
3512
  return new ft(this.pos, this.mark);
3513
3513
  }
3514
3514
  }
3515
- return new Wt(this.pos, this.mark);
3515
+ return new Jt(this.pos, this.mark);
3516
3516
  }
3517
3517
  map(e) {
3518
3518
  let n = e.mapResult(this.pos, 1);
@@ -3531,7 +3531,7 @@ class ft extends pe {
3531
3531
  }
3532
3532
  }
3533
3533
  pe.jsonID("addNodeMark", ft);
3534
- class Wt extends pe {
3534
+ class Jt extends pe {
3535
3535
  /**
3536
3536
  Create a mark-removing step.
3537
3537
  */
@@ -3551,7 +3551,7 @@ class Wt extends pe {
3551
3551
  }
3552
3552
  map(e) {
3553
3553
  let n = e.mapResult(this.pos, 1);
3554
- return n.deletedAfter ? null : new Wt(n.pos, this.mark);
3554
+ return n.deletedAfter ? null : new Jt(n.pos, this.mark);
3555
3555
  }
3556
3556
  toJSON() {
3557
3557
  return { stepType: "removeNodeMark", pos: this.pos, mark: this.mark.toJSON() };
@@ -3562,10 +3562,10 @@ class Wt extends pe {
3562
3562
  static fromJSON(e, n) {
3563
3563
  if (typeof n.pos != "number")
3564
3564
  throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");
3565
- return new Wt(n.pos, e.markFromJSON(n.mark));
3565
+ return new Jt(n.pos, e.markFromJSON(n.mark));
3566
3566
  }
3567
3567
  }
3568
- pe.jsonID("removeNodeMark", Wt);
3568
+ pe.jsonID("removeNodeMark", Jt);
3569
3569
  class Je extends pe {
3570
3570
  /**
3571
3571
  The given `slice` should fit the 'gap' between `from` and
@@ -3580,7 +3580,7 @@ class Je extends pe {
3580
3580
  super(), this.from = e, this.to = n, this.slice = r, this.structure = i;
3581
3581
  }
3582
3582
  apply(e) {
3583
- return this.structure && gr(e, this.from, this.to) ? ie.fail("Structure replace would overwrite content") : ie.fromReplace(e, this.from, this.to, this.slice);
3583
+ return this.structure && mr(e, this.from, this.to) ? ie.fail("Structure replace would overwrite content") : ie.fromReplace(e, this.from, this.to, this.slice);
3584
3584
  }
3585
3585
  getMap() {
3586
3586
  return new Ae([this.from, this.to - this.from, this.slice.size]);
@@ -3629,7 +3629,7 @@ class Nt extends pe {
3629
3629
  super(), this.from = e, this.to = n, this.gapFrom = r, this.gapTo = i, this.slice = s, this.insert = o, this.structure = l;
3630
3630
  }
3631
3631
  apply(e) {
3632
- if (this.structure && (gr(e, this.from, this.gapFrom) || gr(e, this.gapTo, this.to)))
3632
+ if (this.structure && (mr(e, this.from, this.gapFrom) || mr(e, this.gapTo, this.to)))
3633
3633
  return ie.fail("Structure gap-replace would overwrite content");
3634
3634
  let n = e.slice(this.gapFrom, this.gapTo);
3635
3635
  if (n.openStart || n.openEnd)
@@ -3676,7 +3676,7 @@ class Nt extends pe {
3676
3676
  }
3677
3677
  }
3678
3678
  pe.jsonID("replaceAround", Nt);
3679
- function gr(t, e, n) {
3679
+ function mr(t, e, n) {
3680
3680
  let r = t.resolve(e), i = n - e, s = r.depth;
3681
3681
  for (; i > 0 && s > 0 && r.indexAfter(s) == r.node(s).childCount; )
3682
3682
  s--, i--;
@@ -3711,7 +3711,7 @@ function js(t, e, n) {
3711
3711
  }
3712
3712
  return null;
3713
3713
  }
3714
- class $t extends pe {
3714
+ class Vt extends pe {
3715
3715
  /**
3716
3716
  Construct an attribute step.
3717
3717
  */
@@ -3733,11 +3733,11 @@ class $t extends pe {
3733
3733
  return Ae.empty;
3734
3734
  }
3735
3735
  invert(e) {
3736
- return new $t(this.pos, this.attr, e.nodeAt(this.pos).attrs[this.attr]);
3736
+ return new Vt(this.pos, this.attr, e.nodeAt(this.pos).attrs[this.attr]);
3737
3737
  }
3738
3738
  map(e) {
3739
3739
  let n = e.mapResult(this.pos, 1);
3740
- return n.deletedAfter ? null : new $t(n.pos, this.attr, this.value);
3740
+ return n.deletedAfter ? null : new Vt(n.pos, this.attr, this.value);
3741
3741
  }
3742
3742
  toJSON() {
3743
3743
  return { stepType: "attr", pos: this.pos, attr: this.attr, value: this.value };
@@ -3745,11 +3745,11 @@ class $t extends pe {
3745
3745
  static fromJSON(e, n) {
3746
3746
  if (typeof n.pos != "number" || typeof n.attr != "string")
3747
3747
  throw new RangeError("Invalid input for AttrStep.fromJSON");
3748
- return new $t(n.pos, n.attr, n.value);
3748
+ return new Vt(n.pos, n.attr, n.value);
3749
3749
  }
3750
3750
  }
3751
- pe.jsonID("attr", $t);
3752
- class mn extends pe {
3751
+ pe.jsonID("attr", Vt);
3752
+ class pn extends pe {
3753
3753
  /**
3754
3754
  Construct an attribute step.
3755
3755
  */
@@ -3768,7 +3768,7 @@ class mn extends pe {
3768
3768
  return Ae.empty;
3769
3769
  }
3770
3770
  invert(e) {
3771
- return new mn(this.attr, e.attrs[this.attr]);
3771
+ return new pn(this.attr, e.attrs[this.attr]);
3772
3772
  }
3773
3773
  map(e) {
3774
3774
  return this;
@@ -3779,20 +3779,20 @@ class mn extends pe {
3779
3779
  static fromJSON(e, n) {
3780
3780
  if (typeof n.attr != "string")
3781
3781
  throw new RangeError("Invalid input for DocAttrStep.fromJSON");
3782
- return new mn(n.attr, n.value);
3782
+ return new pn(n.attr, n.value);
3783
3783
  }
3784
3784
  }
3785
- pe.jsonID("docAttr", mn);
3786
- let jt = class extends Error {
3785
+ pe.jsonID("docAttr", pn);
3786
+ let Wt = class extends Error {
3787
3787
  };
3788
- jt = function t(e) {
3788
+ Wt = function t(e) {
3789
3789
  let n = Error.call(this, e);
3790
3790
  return n.__proto__ = t.prototype, n;
3791
3791
  };
3792
- jt.prototype = Object.create(Error.prototype);
3793
- jt.prototype.constructor = jt;
3794
- jt.prototype.name = "TransformError";
3795
- const jn = /* @__PURE__ */ Object.create(null);
3792
+ Wt.prototype = Object.create(Error.prototype);
3793
+ Wt.prototype.constructor = Wt;
3794
+ Wt.prototype.name = "TransformError";
3795
+ const Wn = /* @__PURE__ */ Object.create(null);
3796
3796
  class Z {
3797
3797
  /**
3798
3798
  Initialize a selection with the head and anchor and ranges. If no
@@ -3865,7 +3865,7 @@ class Z {
3865
3865
  let s = e.steps.length, o = this.ranges;
3866
3866
  for (let l = 0; l < o.length; l++) {
3867
3867
  let { $from: a, $to: c } = o[l], u = e.mapping.slice(s);
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);
3868
+ 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);
3869
3869
  }
3870
3870
  }
3871
3871
  /**
@@ -3876,7 +3876,7 @@ class Z {
3876
3876
  let r = e.steps.length, i = this.ranges;
3877
3877
  for (let s = 0; s < i.length; s++) {
3878
3878
  let { $from: o, $to: l } = i[s], a = e.mapping.slice(r), c = a.map(o.pos), u = a.map(l.pos);
3879
- s ? e.deleteRange(c, u) : (e.replaceRangeWith(c, u, n), Li(e, r, n.isInline ? -1 : 1));
3879
+ s ? e.deleteRange(c, u) : (e.replaceRangeWith(c, u, n), Di(e, r, n.isInline ? -1 : 1));
3880
3880
  }
3881
3881
  }
3882
3882
  /**
@@ -3928,7 +3928,7 @@ class Z {
3928
3928
  static fromJSON(e, n) {
3929
3929
  if (!n || !n.type)
3930
3930
  throw new RangeError("Invalid input for Selection.fromJSON");
3931
- let r = jn[n.type];
3931
+ let r = Wn[n.type];
3932
3932
  if (!r)
3933
3933
  throw new RangeError(`No selection type ${n.type} defined`);
3934
3934
  return r.fromJSON(e, n);
@@ -3940,9 +3940,9 @@ class Z {
3940
3940
  clash with classes from other modules.
3941
3941
  */
3942
3942
  static jsonID(e, n) {
3943
- if (e in jn)
3943
+ if (e in Wn)
3944
3944
  throw new RangeError("Duplicate use of selection JSON ID " + e);
3945
- return jn[e] = n, n.prototype.jsonID = e, n;
3945
+ return Wn[e] = n, n.prototype.jsonID = e, n;
3946
3946
  }
3947
3947
  /**
3948
3948
  Get a [bookmark](https://prosemirror.net/docs/ref/#state.SelectionBookmark) for this selection,
@@ -3966,16 +3966,16 @@ class sc {
3966
3966
  this.$from = e, this.$to = n;
3967
3967
  }
3968
3968
  }
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 + ")"));
3969
+ let Oi = !1;
3970
+ function Ii(t) {
3971
+ !Oi && !t.parent.inlineContent && (Oi = !0, console.warn("TextSelection endpoint not pointing into a node with inline content (" + t.parent.type.name + ")"));
3972
3972
  }
3973
3973
  class G extends Z {
3974
3974
  /**
3975
3975
  Construct a text selection between the given points.
3976
3976
  */
3977
3977
  constructor(e, n = e) {
3978
- Di(e), Di(n), super(e, n);
3978
+ Ii(e), Ii(n), super(e, n);
3979
3979
  }
3980
3980
  /**
3981
3981
  Returns a resolved position if this is a cursor selection (an
@@ -4001,7 +4001,7 @@ class G extends Z {
4001
4001
  return e instanceof G && e.anchor == this.anchor && e.head == this.head;
4002
4002
  }
4003
4003
  getBookmark() {
4004
- return new On(this.anchor, this.head);
4004
+ return new Mn(this.anchor, this.head);
4005
4005
  }
4006
4006
  toJSON() {
4007
4007
  return { type: "text", anchor: this.anchor, head: this.head };
@@ -4042,12 +4042,12 @@ class G extends Z {
4042
4042
  }
4043
4043
  }
4044
4044
  Z.jsonID("text", G);
4045
- class On {
4045
+ class Mn {
4046
4046
  constructor(e, n) {
4047
4047
  this.anchor = e, this.head = n;
4048
4048
  }
4049
4049
  map(e) {
4050
- return new On(e.map(this.anchor), e.map(this.head));
4050
+ return new Mn(e.map(this.anchor), e.map(this.head));
4051
4051
  }
4052
4052
  resolve(e) {
4053
4053
  return G.between(e.resolve(this.anchor), e.resolve(this.head));
@@ -4076,7 +4076,7 @@ class U extends Z {
4076
4076
  return { type: "node", anchor: this.anchor };
4077
4077
  }
4078
4078
  getBookmark() {
4079
- return new Pr(this.anchor);
4079
+ return new Rr(this.anchor);
4080
4080
  }
4081
4081
  /**
4082
4082
  @internal
@@ -4102,13 +4102,13 @@ class U extends Z {
4102
4102
  }
4103
4103
  U.prototype.visible = !1;
4104
4104
  Z.jsonID("node", U);
4105
- class Pr {
4105
+ class Rr {
4106
4106
  constructor(e) {
4107
4107
  this.anchor = e;
4108
4108
  }
4109
4109
  map(e) {
4110
4110
  let { deleted: n, pos: r } = e.mapResult(this.anchor);
4111
- return n ? new On(r, r) : new Pr(r);
4111
+ return n ? new Mn(r, r) : new Rr(r);
4112
4112
  }
4113
4113
  resolve(e) {
4114
4114
  let n = e.resolve(this.anchor), r = n.nodeAfter;
@@ -4175,7 +4175,7 @@ function Ct(t, e, n, r, i, s = !1) {
4175
4175
  }
4176
4176
  return null;
4177
4177
  }
4178
- function Li(t, e, n) {
4178
+ function Di(t, e, n) {
4179
4179
  let r = t.steps.length - 1;
4180
4180
  if (r < e)
4181
4181
  return;
@@ -4187,36 +4187,36 @@ function Li(t, e, n) {
4187
4187
  o == null && (o = u);
4188
4188
  }), t.setSelection(Z.near(t.doc.resolve(o), n));
4189
4189
  }
4190
- function Fi(t, e) {
4190
+ function Li(t, e) {
4191
4191
  return !e || !t ? t : t.bind(e);
4192
4192
  }
4193
- class sn {
4193
+ class rn {
4194
4194
  constructor(e, n, r) {
4195
- this.name = e, this.init = Fi(n.init, r), this.apply = Fi(n.apply, r);
4195
+ this.name = e, this.init = Li(n.init, r), this.apply = Li(n.apply, r);
4196
4196
  }
4197
4197
  }
4198
- new sn("doc", {
4198
+ new rn("doc", {
4199
4199
  init(t) {
4200
4200
  return t.doc || t.schema.topNodeType.createAndFill();
4201
4201
  },
4202
4202
  apply(t) {
4203
4203
  return t.doc;
4204
4204
  }
4205
- }), new sn("selection", {
4205
+ }), new rn("selection", {
4206
4206
  init(t, e) {
4207
4207
  return t.selection || Z.atStart(e.doc);
4208
4208
  },
4209
4209
  apply(t) {
4210
4210
  return t.selection;
4211
4211
  }
4212
- }), new sn("storedMarks", {
4212
+ }), new rn("storedMarks", {
4213
4213
  init(t) {
4214
4214
  return t.storedMarks || null;
4215
4215
  },
4216
4216
  apply(t, e, n, r) {
4217
4217
  return r.selection.$cursor ? t.storedMarks : null;
4218
4218
  }
4219
- }), new sn("scrollToSelection", {
4219
+ }), new rn("scrollToSelection", {
4220
4220
  init() {
4221
4221
  return 0;
4222
4222
  },
@@ -4231,7 +4231,7 @@ function Gs(t, e, n) {
4231
4231
  }
4232
4232
  return n;
4233
4233
  }
4234
- class In {
4234
+ class On {
4235
4235
  /**
4236
4236
  Create a plugin.
4237
4237
  */
@@ -4245,11 +4245,11 @@ class In {
4245
4245
  return e[this.key];
4246
4246
  }
4247
4247
  }
4248
- const Gn = /* @__PURE__ */ Object.create(null);
4248
+ const jn = /* @__PURE__ */ Object.create(null);
4249
4249
  function Zs(t) {
4250
- return t in Gn ? t + "$" + ++Gn[t] : (Gn[t] = 0, t + "$");
4250
+ return t in jn ? t + "$" + ++jn[t] : (jn[t] = 0, t + "$");
4251
4251
  }
4252
- class Vr {
4252
+ class Pr {
4253
4253
  /**
4254
4254
  Create a plugin key.
4255
4255
  */
@@ -4360,14 +4360,14 @@ const lc = /^```([a-z]+)?[\s\n]$/, ac = /^~~~([a-z]+)?[\s\n]$/, cc = Ve.create({
4360
4360
  },
4361
4361
  addInputRules() {
4362
4362
  return [
4363
- fr({
4363
+ dr({
4364
4364
  find: lc,
4365
4365
  type: this.type,
4366
4366
  getAttributes: (t) => ({
4367
4367
  language: t[1]
4368
4368
  })
4369
4369
  }),
4370
- fr({
4370
+ dr({
4371
4371
  find: ac,
4372
4372
  type: this.type,
4373
4373
  getAttributes: (t) => ({
@@ -4380,8 +4380,8 @@ const lc = /^```([a-z]+)?[\s\n]$/, ac = /^~~~([a-z]+)?[\s\n]$/, cc = Ve.create({
4380
4380
  return [
4381
4381
  // this plugin creates a code block for pasted content from VS Code
4382
4382
  // we can also detect the copied code language
4383
- new In({
4384
- key: new Vr("codeBlockVSCodeHandler"),
4383
+ new On({
4384
+ key: new Pr("codeBlockVSCodeHandler"),
4385
4385
  props: {
4386
4386
  handlePaste: (t, e) => {
4387
4387
  if (!e.clipboardData || this.editor.isActive(this.type.name))
@@ -4429,7 +4429,7 @@ const lc = /^```([a-z]+)?[\s\n]$/, ac = /^~~~([a-z]+)?[\s\n]$/, cc = Ve.create({
4429
4429
  },
4430
4430
  addInputRules() {
4431
4431
  return [
4432
- qt({
4432
+ Ut({
4433
4433
  find: uc,
4434
4434
  type: this.type
4435
4435
  })
@@ -4538,10 +4538,10 @@ const lc = /^```([a-z]+)?[\s\n]$/, ac = /^~~~([a-z]+)?[\s\n]$/, cc = Ve.create({
4538
4538
  };
4539
4539
  }
4540
4540
  });
4541
- var gn = 200, ce = function() {
4541
+ var mn = 200, ce = function() {
4542
4542
  };
4543
4543
  ce.prototype.append = function(e) {
4544
- return e.length ? (e = ce.from(e), !this.length && e || e.length < gn && this.leafAppend(e) || this.length < gn && e.leafPrepend(this) || this.appendInner(e)) : this;
4544
+ return e.length ? (e = ce.from(e), !this.length && e || e.length < mn && this.leafAppend(e) || this.length < mn && e.leafPrepend(this) || this.appendInner(e)) : this;
4545
4545
  };
4546
4546
  ce.prototype.prepend = function(e) {
4547
4547
  return e.length ? ce.from(e).append(this) : this;
@@ -4590,10 +4590,10 @@ var Qs = /* @__PURE__ */ (function(t) {
4590
4590
  if (i(this.values[a], l + a) === !1)
4591
4591
  return !1;
4592
4592
  }, e.prototype.leafAppend = function(i) {
4593
- if (this.length + i.length <= gn)
4593
+ if (this.length + i.length <= mn)
4594
4594
  return new e(this.values.concat(i.flatten()));
4595
4595
  }, e.prototype.leafPrepend = function(i) {
4596
- if (this.length + i.length <= gn)
4596
+ if (this.length + i.length <= mn)
4597
4597
  return new e(i.flatten().concat(this.values));
4598
4598
  }, n.length.get = function() {
4599
4599
  return this.values.length;
@@ -4680,7 +4680,7 @@ class De {
4680
4680
  return c > yc && (l = gc(l, c), o -= c), new De(l.append(s), o);
4681
4681
  }
4682
4682
  remapping(e, n) {
4683
- let r = new pn();
4683
+ let r = new hn();
4684
4684
  return this.items.forEach((i, s) => {
4685
4685
  let o = i.mirrorOffset != null && s - i.mirrorOffset >= e ? r.maps.length - i.mirrorOffset : void 0;
4686
4686
  r.appendMap(i.map, o);
@@ -4783,11 +4783,11 @@ function bc(t, e, n, r) {
4783
4783
  if (n.steps.length == 0)
4784
4784
  return t;
4785
4785
  if (o && o.getMeta(pt))
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);
4786
+ return o.getMeta(pt).redo ? new Qe(t.done.addTransform(n, void 0, r, cn(e)), t.undone, Fi(n.mapping.maps), t.prevTime, t.prevComposition) : new Qe(t.done, t.undone.addTransform(n, void 0, r, cn(e)), null, t.prevTime, t.prevComposition);
4787
4787
  if (n.getMeta("addToHistory") !== !1 && !(o && o.getMeta("addToHistory") === !1)) {
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);
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);
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);
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 ? Gn(t.prevRanges, n.mapping) : Fi(n.mapping.maps);
4789
+ return new Qe(t.done.addTransform(n, a ? e.selection.getBookmark() : void 0, r, cn(e)), De.empty, c, n.time, l ?? t.prevComposition);
4790
+ } else return (s = n.getMeta("rebased")) ? new Qe(t.done.rebased(n, s), t.undone.rebased(n, s), Gn(t.prevRanges, n.mapping), t.prevTime, t.prevComposition) : new Qe(t.done.addMaps(n.mapping.maps), t.undone.addMaps(n.mapping.maps), Gn(t.prevRanges, n.mapping), t.prevTime, t.prevComposition);
4791
4791
  }
4792
4792
  function xc(t, e) {
4793
4793
  if (!e)
@@ -4800,13 +4800,13 @@ function xc(t, e) {
4800
4800
  r <= e[s + 1] && i >= e[s] && (n = !0);
4801
4801
  }), n;
4802
4802
  }
4803
- function Ri(t) {
4803
+ function Fi(t) {
4804
4804
  let e = [];
4805
4805
  for (let n = t.length - 1; n >= 0 && e.length == 0; n--)
4806
4806
  t[n].forEach((r, i, s, o) => e.push(s, o));
4807
4807
  return e;
4808
4808
  }
4809
- function Zn(t, e) {
4809
+ function Gn(t, e) {
4810
4810
  if (!t)
4811
4811
  return null;
4812
4812
  let n = [];
@@ -4817,31 +4817,31 @@ function Zn(t, e) {
4817
4817
  return n;
4818
4818
  }
4819
4819
  function kc(t, e, n) {
4820
- let r = un(e), i = pt.get(e).spec.config, s = (n ? t.undone : t.done).popEvent(e, r);
4820
+ let r = cn(e), i = pt.get(e).spec.config, s = (n ? t.undone : t.done).popEvent(e, r);
4821
4821
  if (!s)
4822
4822
  return null;
4823
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);
4824
4824
  return s.transform.setSelection(o).setMeta(pt, { redo: n, historyState: a });
4825
4825
  }
4826
- let Qn = !1, Pi = null;
4827
- function un(t) {
4826
+ let Zn = !1, Ri = null;
4827
+ function cn(t) {
4828
4828
  let e = t.plugins;
4829
- if (Pi != e) {
4830
- Qn = !1, Pi = e;
4829
+ if (Ri != e) {
4830
+ Zn = !1, Ri = e;
4831
4831
  for (let n = 0; n < e.length; n++)
4832
4832
  if (e[n].spec.historyPreserveItems) {
4833
- Qn = !0;
4833
+ Zn = !0;
4834
4834
  break;
4835
4835
  }
4836
4836
  }
4837
- return Qn;
4837
+ return Zn;
4838
4838
  }
4839
- const pt = new Vr("history"), vc = new Vr("closeHistory");
4839
+ const pt = new Pr("history"), vc = new Pr("closeHistory");
4840
4840
  function Cc(t = {}) {
4841
4841
  return t = {
4842
4842
  depth: t.depth || 100,
4843
4843
  newGroupDelay: t.newGroupDelay || 500
4844
- }, new In({
4844
+ }, new On({
4845
4845
  key: pt,
4846
4846
  state: {
4847
4847
  init() {
@@ -4874,7 +4874,7 @@ function Xs(t, e) {
4874
4874
  return !0;
4875
4875
  };
4876
4876
  }
4877
- const Ys = Xs(!1, !0), eo = Xs(!0, !0), Pt = Lr.create({
4877
+ const Ys = Xs(!1, !0), eo = Xs(!0, !0), Pi = Dr.create({
4878
4878
  name: "history",
4879
4879
  addOptions() {
4880
4880
  return {
@@ -4912,7 +4912,7 @@ const Ys = Xs(!1, !0), eo = Xs(!0, !0), Pt = Lr.create({
4912
4912
  group: "inline"
4913
4913
  });
4914
4914
  function Ac(t = {}) {
4915
- return new In({
4915
+ return new On({
4916
4916
  view(e) {
4917
4917
  return new Nc(e, t);
4918
4918
  }
@@ -4992,7 +4992,7 @@ class Nc {
4992
4992
  this.editorView.dom.contains(e.relatedTarget) || this.setCursor(null);
4993
4993
  }
4994
4994
  }
4995
- const Ec = Lr.create({
4995
+ const Ec = Dr.create({
4996
4996
  name: "dropCursor",
4997
4997
  addOptions() {
4998
4998
  return {
@@ -5060,7 +5060,7 @@ var nt = {
5060
5060
  220: "\\",
5061
5061
  221: "]",
5062
5062
  222: "'"
5063
- }, yn = {
5063
+ }, gn = {
5064
5064
  48: ")",
5065
5065
  49: "!",
5066
5066
  50: "@",
@@ -5089,10 +5089,10 @@ var nt = {
5089
5089
  for (var de = 0; de < 10; de++) nt[48 + de] = nt[96 + de] = String(de);
5090
5090
  for (var de = 1; de <= 24; de++) nt[de + 111] = "F" + de;
5091
5091
  for (var de = 65; de <= 90; de++)
5092
- nt[de] = String.fromCharCode(de + 32), yn[de] = String.fromCharCode(de);
5093
- for (var Xn in nt) yn.hasOwnProperty(Xn) || (yn[Xn] = nt[Xn]);
5092
+ nt[de] = String.fromCharCode(de + 32), gn[de] = String.fromCharCode(de);
5093
+ for (var Qn in nt) gn.hasOwnProperty(Qn) || (gn[Qn] = nt[Qn]);
5094
5094
  function Oc(t) {
5095
- var e = Tc && t.metaKey && t.shiftKey && !t.ctrlKey && !t.altKey || Mc && t.shiftKey && t.key && t.key.length == 1 || t.key == "Unidentified", n = !e && t.key || (t.shiftKey ? yn : nt)[t.keyCode] || t.key || "Unidentified";
5095
+ var e = Tc && t.metaKey && t.shiftKey && !t.ctrlKey && !t.altKey || Mc && t.shiftKey && t.key && t.key.length == 1 || t.key == "Unidentified", n = !e && t.key || (t.shiftKey ? gn : nt)[t.keyCode] || t.key || "Unidentified";
5096
5096
  return n == "Esc" && (n = "Escape"), n == "Del" && (n = "Delete"), n == "Left" && (n = "ArrowLeft"), n == "Up" && (n = "ArrowUp"), n == "Right" && (n = "ArrowRight"), n == "Down" && (n = "ArrowDown"), n;
5097
5097
  }
5098
5098
  const Ic = typeof navigator < "u" && /Mac|iP(hone|[oa]d)/.test(navigator.platform), Dc = typeof navigator < "u" && /Win/.test(navigator.platform);
@@ -5123,24 +5123,24 @@ function Fc(t) {
5123
5123
  e[Lc(n)] = t[n];
5124
5124
  return e;
5125
5125
  }
5126
- function Yn(t, e, n = !0) {
5126
+ function Xn(t, e, n = !0) {
5127
5127
  return e.altKey && (t = "Alt-" + t), e.ctrlKey && (t = "Ctrl-" + t), e.metaKey && (t = "Meta-" + t), n && e.shiftKey && (t = "Shift-" + t), t;
5128
5128
  }
5129
5129
  function Rc(t) {
5130
5130
  let e = Fc(t);
5131
5131
  return function(n, r) {
5132
- let i = Oc(r), s, o = e[Yn(i, r)];
5132
+ let i = Oc(r), s, o = e[Xn(i, r)];
5133
5133
  if (o && o(n.state, n.dispatch, n))
5134
5134
  return !0;
5135
5135
  if (i.length == 1 && i != " ") {
5136
5136
  if (r.shiftKey) {
5137
- let l = e[Yn(i, r, !1)];
5137
+ let l = e[Xn(i, r, !1)];
5138
5138
  if (l && l(n.state, n.dispatch, n))
5139
5139
  return !0;
5140
5140
  }
5141
5141
  if ((r.altKey || r.metaKey || r.ctrlKey) && // Ctrl-Alt may be used for AltGr on Windows
5142
5142
  !(Dc && r.ctrlKey && r.altKey) && (s = nt[r.keyCode]) && s != i) {
5143
- let l = e[Yn(s, r)];
5143
+ let l = e[Xn(s, r)];
5144
5144
  if (l && l(n.state, n.dispatch, n))
5145
5145
  return !0;
5146
5146
  }
@@ -5159,9 +5159,9 @@ function Vi(t, e, n, r, i) {
5159
5159
  for (var s; ; ) {
5160
5160
  if (t == n && e == r)
5161
5161
  return !0;
5162
- if (e == (i < 0 ? 0 : bn(t))) {
5162
+ if (e == (i < 0 ? 0 : yn(t))) {
5163
5163
  let o = t.parentNode;
5164
- if (!o || o.nodeType != 1 || $r(t) || Pc.test(t.nodeName) || t.contentEditable == "false")
5164
+ if (!o || o.nodeType != 1 || Vr(t) || Pc.test(t.nodeName) || t.contentEditable == "false")
5165
5165
  return !1;
5166
5166
  e = yt(t) + (i < 0 ? 0 : 1), t = o;
5167
5167
  } else if (t.nodeType == 1) {
@@ -5172,25 +5172,25 @@ function Vi(t, e, n, r, i) {
5172
5172
  else
5173
5173
  return !1;
5174
5174
  else
5175
- t = o, e = i < 0 ? bn(t) : 0;
5175
+ t = o, e = i < 0 ? yn(t) : 0;
5176
5176
  } else
5177
5177
  return !1;
5178
5178
  }
5179
5179
  }
5180
- function bn(t) {
5180
+ function yn(t) {
5181
5181
  return t.nodeType == 3 ? t.nodeValue.length : t.childNodes.length;
5182
5182
  }
5183
5183
  function Vc(t, e, n) {
5184
- for (let r = e == 0, i = e == bn(t); r || i; ) {
5184
+ for (let r = e == 0, i = e == yn(t); r || i; ) {
5185
5185
  if (t == n)
5186
5186
  return !0;
5187
5187
  let s = yt(t);
5188
5188
  if (t = t.parentNode, !t)
5189
5189
  return !1;
5190
- r = r && s == 0, i = i && s == bn(t);
5190
+ r = r && s == 0, i = i && s == yn(t);
5191
5191
  }
5192
5192
  }
5193
- function $r(t) {
5193
+ function Vr(t) {
5194
5194
  let e;
5195
5195
  for (let n = t; n && !(e = n.pmViewDesc); n = n.parentNode)
5196
5196
  ;
@@ -5203,9 +5203,9 @@ function ro(t, e) {
5203
5203
  let n = document.createEvent("Event");
5204
5204
  return n.initEvent("keydown", !0, !0), n.keyCode = t, n.key = n.code = e, n;
5205
5205
  }
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);
5207
- Dn && +(/Firefox\/(\d+)/.exec(rt) || [0, 0])[1];
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;
5206
+ const He = typeof navigator < "u" ? navigator : null, $i = typeof document < "u" ? document : null, rt = He && He.userAgent || "", gr = /Edge\/(\d+)/.exec(rt), io = /MSIE \d/.exec(rt), yr = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(rt), Xt = !!(io || yr || gr), so = io ? document.documentMode : yr ? +yr[1] : gr ? +gr[1] : 0, In = !Xt && /gecko\/(\d+)/i.test(rt);
5207
+ In && +(/Firefox\/(\d+)/.exec(rt) || [0, 0])[1];
5208
+ const br = !Xt && /Chrome\/(\d+)/.exec(rt), je = !!br, oo = br ? +br[1] : 0, bt = !Xt && !!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, Yt = /Android \d/.test(rt), _r = !!$i && "webkitFontSmoothing" in $i.documentElement.style, $c = _r ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
5209
5209
  function _c(t, e = null) {
5210
5210
  let n = t.domSelectionRange(), r = t.state.doc;
5211
5211
  if (!n.focusNode)
@@ -5247,7 +5247,7 @@ function _c(t, e = null) {
5247
5247
  function ao(t) {
5248
5248
  return t.editable ? t.hasFocus() : Uc(t) && document.activeElement && document.activeElement.contains(t.dom);
5249
5249
  }
5250
- function zr(t, e = !1) {
5250
+ function Br(t, e = !1) {
5251
5251
  let n = t.state.selection;
5252
5252
  if (Hc(t, n), !!ao(t)) {
5253
5253
  if (!e && t.input.mouseDown && t.input.mouseDown.allowDefault && je) {
@@ -5270,15 +5270,15 @@ const _i = bt || je && oo < 63;
5270
5270
  function Bi(t, e) {
5271
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;
5272
5272
  if (bt && i && i.contentEditable == "false")
5273
- return er(i);
5273
+ return Yn(i);
5274
5274
  if ((!i || i.contentEditable == "false") && (!s || s.contentEditable == "false")) {
5275
5275
  if (i)
5276
- return er(i);
5276
+ return Yn(i);
5277
5277
  if (s)
5278
- return er(s);
5278
+ return Yn(s);
5279
5279
  }
5280
5280
  }
5281
- function er(t) {
5281
+ function Yn(t) {
5282
5282
  return t.contentEditable = "true", bt && t.draggable && (t.draggable = !1, t.wasDraggable = !0), t;
5283
5283
  }
5284
5284
  function zi(t) {
@@ -5299,7 +5299,7 @@ function zc(t) {
5299
5299
  if (!e)
5300
5300
  return;
5301
5301
  let n = t.cursorWrapper.dom, r = n.nodeName == "IMG";
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);
5302
+ r ? e.collapse(n.parentNode, yt(n) + 1) : e.collapse(n, 0), !r && !t.state.selection.visible && Xt && so <= 11 && (n.disabled = !0, n.disabled = !1);
5303
5303
  }
5304
5304
  function Hc(t, e) {
5305
5305
  if (e instanceof U) {
@@ -5324,7 +5324,7 @@ function Uc(t) {
5324
5324
  return !1;
5325
5325
  }
5326
5326
  }
5327
- function kr(t, e) {
5327
+ function xr(t, e) {
5328
5328
  let { $anchor: n, $head: r } = t.selection, i = e > 0 ? n.max(r) : n.min(r), s = i.parent.inlineContent ? i.depth ? t.doc.resolve(e > 0 ? i.after() : i.before()) : null : i;
5329
5329
  return s && Z.findFrom(s, e);
5330
5330
  }
@@ -5342,29 +5342,29 @@ function Ui(t, e, n) {
5342
5342
  return Xe(t, new G(r.$anchor, o));
5343
5343
  } else if (r.empty) {
5344
5344
  if (t.endOfTextblock(e > 0 ? "forward" : "backward")) {
5345
- let i = kr(t.state, e);
5345
+ let i = xr(t.state, e);
5346
5346
  return i && i instanceof U ? Xe(t, i) : !1;
5347
5347
  } else if (!(Me && n.indexOf("m") > -1)) {
5348
5348
  let i = r.$head, s = i.textOffset ? null : e < 0 ? i.nodeBefore : i.nodeAfter, o;
5349
5349
  if (!s || s.isText)
5350
5350
  return !1;
5351
5351
  let l = e < 0 ? i.pos - s.nodeSize : i.pos;
5352
- return s.isAtom || (o = t.docView.descAt(l)) && !o.contentDOM ? U.isSelectable(s) ? Xe(t, new U(e < 0 ? t.state.doc.resolve(i.pos - s.nodeSize) : i)) : Br ? Xe(t, new G(t.state.doc.resolve(e < 0 ? l : l + s.nodeSize))) : !1 : !1;
5352
+ return s.isAtom || (o = t.docView.descAt(l)) && !o.contentDOM ? U.isSelectable(s) ? Xe(t, new U(e < 0 ? t.state.doc.resolve(i.pos - s.nodeSize) : i)) : _r ? Xe(t, new G(t.state.doc.resolve(e < 0 ? l : l + s.nodeSize))) : !1 : !1;
5353
5353
  }
5354
5354
  } else return !1;
5355
5355
  else {
5356
5356
  if (r instanceof U && r.node.isInline)
5357
5357
  return Xe(t, new G(e > 0 ? r.$to : r.$from));
5358
5358
  {
5359
- let i = kr(t.state, e);
5359
+ let i = xr(t.state, e);
5360
5360
  return i ? Xe(t, i) : !1;
5361
5361
  }
5362
5362
  }
5363
5363
  }
5364
- function xn(t) {
5364
+ function bn(t) {
5365
5365
  return t.nodeType == 3 ? t.nodeValue.length : t.childNodes.length;
5366
5366
  }
5367
- function _t(t, e) {
5367
+ function $t(t, e) {
5368
5368
  let n = t.pmViewDesc;
5369
5369
  return n && n.size == 0 && (e < 0 || t.nextSibling || t.nodeName != "BR");
5370
5370
  }
@@ -5376,13 +5376,13 @@ function qc(t) {
5376
5376
  if (!n)
5377
5377
  return;
5378
5378
  let i, s, o = !1;
5379
- for (Dn && n.nodeType == 1 && r < xn(n) && _t(n.childNodes[r], -1) && (o = !0); ; )
5379
+ for (In && n.nodeType == 1 && r < bn(n) && $t(n.childNodes[r], -1) && (o = !0); ; )
5380
5380
  if (r > 0) {
5381
5381
  if (n.nodeType != 1)
5382
5382
  break;
5383
5383
  {
5384
5384
  let l = n.childNodes[r - 1];
5385
- if (_t(l, -1))
5385
+ if ($t(l, -1))
5386
5386
  i = n, s = --r;
5387
5387
  else if (l.nodeType == 3)
5388
5388
  n = l, r = n.nodeValue.length;
@@ -5394,10 +5394,10 @@ function qc(t) {
5394
5394
  break;
5395
5395
  {
5396
5396
  let l = n.previousSibling;
5397
- for (; l && _t(l, -1); )
5397
+ for (; l && $t(l, -1); )
5398
5398
  i = n.parentNode, s = yt(l), l = l.previousSibling;
5399
5399
  if (l)
5400
- n = l, r = xn(n);
5400
+ n = l, r = bn(n);
5401
5401
  else {
5402
5402
  if (n = n.parentNode, n == t.dom)
5403
5403
  break;
@@ -5405,19 +5405,19 @@ function qc(t) {
5405
5405
  }
5406
5406
  }
5407
5407
  }
5408
- o ? vr(t, n, r) : i && vr(t, i, s);
5408
+ o ? kr(t, n, r) : i && kr(t, i, s);
5409
5409
  }
5410
5410
  function Kc(t) {
5411
5411
  let e = t.domSelectionRange(), n = e.focusNode, r = e.focusOffset;
5412
5412
  if (!n)
5413
5413
  return;
5414
- let i = xn(n), s, o;
5414
+ let i = bn(n), s, o;
5415
5415
  for (; ; )
5416
5416
  if (r < i) {
5417
5417
  if (n.nodeType != 1)
5418
5418
  break;
5419
5419
  let l = n.childNodes[r];
5420
- if (_t(l, 1))
5420
+ if ($t(l, 1))
5421
5421
  s = n, o = ++r;
5422
5422
  else
5423
5423
  break;
@@ -5426,10 +5426,10 @@ function Kc(t) {
5426
5426
  break;
5427
5427
  {
5428
5428
  let l = n.nextSibling;
5429
- for (; l && _t(l, 1); )
5429
+ for (; l && $t(l, 1); )
5430
5430
  s = l.parentNode, o = yt(l) + 1, l = l.nextSibling;
5431
5431
  if (l)
5432
- n = l, r = 0, i = xn(n);
5432
+ n = l, r = 0, i = bn(n);
5433
5433
  else {
5434
5434
  if (n = n.parentNode, n == t.dom)
5435
5435
  break;
@@ -5437,14 +5437,14 @@ function Kc(t) {
5437
5437
  }
5438
5438
  }
5439
5439
  }
5440
- s && vr(t, s, o);
5440
+ s && kr(t, s, o);
5441
5441
  }
5442
5442
  function uo(t) {
5443
5443
  let e = t.pmViewDesc;
5444
5444
  return e && e.node && e.node.isBlock;
5445
5445
  }
5446
5446
  function Jc(t, e) {
5447
- for (; t && e == t.childNodes.length && !$r(t); )
5447
+ for (; t && e == t.childNodes.length && !Vr(t); )
5448
5448
  e = yt(t) + 1, t = t.parentNode;
5449
5449
  for (; t && e < t.childNodes.length; ) {
5450
5450
  let n = t.childNodes[e];
@@ -5456,7 +5456,7 @@ function Jc(t, e) {
5456
5456
  }
5457
5457
  }
5458
5458
  function Wc(t, e) {
5459
- for (; t && !e && !$r(t); )
5459
+ for (; t && !e && !Vr(t); )
5460
5460
  e = yt(t), t = t.parentNode;
5461
5461
  for (; t && e; ) {
5462
5462
  let n = t.childNodes[e - 1];
@@ -5467,7 +5467,7 @@ function Wc(t, e) {
5467
5467
  t = n, e = t.childNodes.length;
5468
5468
  }
5469
5469
  }
5470
- function vr(t, e, n) {
5470
+ function kr(t, e, n) {
5471
5471
  if (e.nodeType != 3) {
5472
5472
  let s, o;
5473
5473
  (o = Jc(e, n)) ? (e = o, n = 0) : (s = Wc(e, n)) && (e = s, n = s.nodeValue.length);
@@ -5482,7 +5482,7 @@ function vr(t, e, n) {
5482
5482
  t.domObserver.setCurSelection();
5483
5483
  let { state: i } = t;
5484
5484
  setTimeout(() => {
5485
- t.state == i && zr(t);
5485
+ t.state == i && Br(t);
5486
5486
  }, 50);
5487
5487
  }
5488
5488
  function qi(t, e) {
@@ -5508,7 +5508,7 @@ function Ki(t, e, n) {
5508
5508
  return !1;
5509
5509
  let { $from: i, $to: s } = r;
5510
5510
  if (!i.parent.inlineContent || t.endOfTextblock(e < 0 ? "up" : "down")) {
5511
- let o = kr(t.state, e);
5511
+ let o = xr(t.state, e);
5512
5512
  if (o && o instanceof U)
5513
5513
  return Xe(t, o);
5514
5514
  }
@@ -5586,7 +5586,7 @@ function fo(t, e) {
5586
5586
  let m = r.firstChild;
5587
5587
  n.push(m.type.name, m.attrs != m.type.defaultAttrs ? m.attrs : null), r = m.content;
5588
5588
  }
5589
- let o = t.someProp("clipboardSerializer") || Mn.fromSchema(t.state.schema), l = bo(), a = l.createElement("div");
5589
+ let o = t.someProp("clipboardSerializer") || Tn.fromSchema(t.state.schema), l = bo(), a = l.createElement("div");
5590
5590
  a.appendChild(o.serializeFragment(r, { document: l }));
5591
5591
  let c = a.firstChild, u, d = 0;
5592
5592
  for (; c && c.nodeType == 1 && (u = yo[c.nodeName.toLowerCase()]); ) {
@@ -5621,7 +5621,7 @@ function ho(t, e, n, r, i) {
5621
5621
  if (d)
5622
5622
  l = d;
5623
5623
  else {
5624
- let p = i.marks(), { schema: m } = t.state, x = Mn.fromSchema(m);
5624
+ let p = i.marks(), { schema: m } = t.state, x = Tn.fromSchema(m);
5625
5625
  o = document.createElement("div"), e.split(/(?:\r\n?|\n)+/).forEach((y) => {
5626
5626
  let k = o.appendChild(document.createElement("p"));
5627
5627
  y && k.appendChild(x.serializeNode(m.text(y, p)));
@@ -5630,7 +5630,7 @@ function ho(t, e, n, r, i) {
5630
5630
  } else
5631
5631
  t.someProp("transformPastedHTML", (d) => {
5632
5632
  n = d(n, t);
5633
- }), o = eu(n), Br && tu(o);
5633
+ }), o = eu(n), _r && tu(o);
5634
5634
  let c = o && o.querySelector("[data-pm-slice]"), u = c && /^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice") || "");
5635
5635
  if (u && u[3])
5636
5636
  for (let d = +u[3]; d > 0; d--) {
@@ -5641,7 +5641,7 @@ function ho(t, e, n, r, i) {
5641
5641
  break;
5642
5642
  o = p;
5643
5643
  }
5644
- if (l || (l = (t.someProp("clipboardParser") || t.someProp("domParser") || hn.fromSchema(t.state.schema)).parseSlice(o, {
5644
+ if (l || (l = (t.someProp("clipboardParser") || t.someProp("domParser") || fn.fromSchema(t.state.schema)).parseSlice(o, {
5645
5645
  preserveWhitespace: !!(a || u),
5646
5646
  context: i,
5647
5647
  ruleFromNode(p) {
@@ -5705,12 +5705,12 @@ function go(t, e) {
5705
5705
  let n = t.content.replaceChild(t.childCount - 1, go(t.lastChild, e - 1)), r = t.contentMatchAt(t.childCount).fillBefore(z.empty, !0);
5706
5706
  return t.copy(n.append(r));
5707
5707
  }
5708
- function Cr(t, e, n, r, i, s) {
5708
+ function vr(t, e, n, r, i, s) {
5709
5709
  let o = e < 0 ? t.firstChild : t.lastChild, l = o.content;
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));
5710
+ return t.childCount > 1 && (s = 0), i < r - 1 && (l = vr(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));
5711
5711
  }
5712
5712
  function ji(t, e, n) {
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;
5713
+ return e < t.openStart && (t = new H(vr(t.content, -1, e, t.openStart, 0, t.openEnd), e, t.openEnd)), n < t.openEnd && (t = new H(vr(t.content, 1, n, t.openEnd, 0, 0), t.openStart, n)), t;
5714
5714
  }
5715
5715
  const yo = {
5716
5716
  thead: ["table"],
@@ -5727,10 +5727,10 @@ let Gi = null;
5727
5727
  function bo() {
5728
5728
  return Gi || (Gi = document.implementation.createHTMLDocument("title"));
5729
5729
  }
5730
- let tr = null;
5730
+ let er = null;
5731
5731
  function Yc(t) {
5732
5732
  let e = window.trustedTypes;
5733
- return e ? (tr || (tr = e.defaultPolicy || e.createPolicy("ProseMirrorClipboard", { createHTML: (n) => n })), tr.createHTML(t)) : t;
5733
+ return e ? (er || (er = e.defaultPolicy || e.createPolicy("ProseMirrorClipboard", { createHTML: (n) => n })), er.createHTML(t)) : t;
5734
5734
  }
5735
5735
  function eu(t) {
5736
5736
  let e = /^(\s*<meta [^>]*>)*/.exec(t);
@@ -5772,8 +5772,8 @@ function Ye(t, e) {
5772
5772
  }
5773
5773
  Ee.keydown = (t, e) => {
5774
5774
  let n = e;
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)))
5776
- if (n.keyCode != 229 && t.domObserver.forceFlush(), _r && n.keyCode == 13 && !n.ctrlKey && !n.altKey && !n.metaKey) {
5775
+ if (t.input.shiftKey = n.keyCode == 16 || n.shiftKey, !ko(t, n) && (t.input.lastKeyCode = n.keyCode, t.input.lastKeyCodeTime = Date.now(), !(Yt && je && n.keyCode == 13)))
5776
+ if (n.keyCode != 229 && t.domObserver.forceFlush(), $r && n.keyCode == 13 && !n.ctrlKey && !n.altKey && !n.metaKey) {
5777
5777
  let r = Date.now();
5778
5778
  t.input.lastIOSEnter = r, t.input.lastIOSEnterFallbackTimeout = setTimeout(() => {
5779
5779
  t.input.lastIOSEnter == r && (t.someProp("handleKeyDown", (i) => i(t, ro(13, "Enter"))), t.input.lastIOSEnter = 0);
@@ -5797,14 +5797,14 @@ Ee.keypress = (t, e) => {
5797
5797
  !/[\r\n]/.test(i) && !t.someProp("handleTextInput", (o) => o(t, r.$from.pos, r.$to.pos, i, s)) && t.dispatch(s()), n.preventDefault();
5798
5798
  }
5799
5799
  };
5800
- function Ln(t) {
5800
+ function Dn(t) {
5801
5801
  return { left: t.clientX, top: t.clientY };
5802
5802
  }
5803
5803
  function ru(t, e) {
5804
5804
  let n = e.x - t.clientX, r = e.y - t.clientY;
5805
5805
  return n * n + r * r < 100;
5806
5806
  }
5807
- function Hr(t, e, n, r, i) {
5807
+ function zr(t, e, n, r, i) {
5808
5808
  if (r == -1)
5809
5809
  return !1;
5810
5810
  let s = t.state.doc.resolve(r);
@@ -5841,13 +5841,13 @@ function su(t, e) {
5841
5841
  return i != null ? (Et(t, U.create(t.state.doc, i)), !0) : !1;
5842
5842
  }
5843
5843
  function ou(t, e, n, r, i) {
5844
- return Hr(t, "handleClickOn", e, n, r) || t.someProp("handleClick", (s) => s(t, e, r)) || (i ? su(t, n) : iu(t, n));
5844
+ return zr(t, "handleClickOn", e, n, r) || t.someProp("handleClick", (s) => s(t, e, r)) || (i ? su(t, n) : iu(t, n));
5845
5845
  }
5846
5846
  function lu(t, e, n, r) {
5847
- return Hr(t, "handleDoubleClickOn", e, n, r) || t.someProp("handleDoubleClick", (i) => i(t, e, r));
5847
+ return zr(t, "handleDoubleClickOn", e, n, r) || t.someProp("handleDoubleClick", (i) => i(t, e, r));
5848
5848
  }
5849
5849
  function au(t, e, n, r) {
5850
- return Hr(t, "handleTripleClickOn", e, n, r) || t.someProp("handleTripleClick", (i) => i(t, e, r)) || cu(t, n, r);
5850
+ return zr(t, "handleTripleClickOn", e, n, r) || t.someProp("handleTripleClick", (i) => i(t, e, r)) || cu(t, n, r);
5851
5851
  }
5852
5852
  function cu(t, e, n) {
5853
5853
  if (n.button != 0)
@@ -5867,16 +5867,16 @@ function cu(t, e, n) {
5867
5867
  return !0;
5868
5868
  }
5869
5869
  }
5870
- function Ur(t) {
5871
- return kn(t);
5870
+ function Hr(t) {
5871
+ return xn(t);
5872
5872
  }
5873
5873
  const xo = Me ? "metaKey" : "ctrlKey";
5874
5874
  $e.mousedown = (t, e) => {
5875
5875
  let n = e;
5876
5876
  t.input.shiftKey = n.shiftKey;
5877
- let r = Ur(t), i = Date.now(), s = "singleClick";
5877
+ let r = Hr(t), i = Date.now(), s = "singleClick";
5878
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 };
5879
- let o = t.posAtCoords(Ln(n));
5879
+ let o = t.posAtCoords(Dn(n));
5880
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"));
5881
5881
  };
5882
5882
  class uu {
@@ -5896,19 +5896,19 @@ class uu {
5896
5896
  node: s,
5897
5897
  pos: o,
5898
5898
  addAttr: !!(this.target && !this.target.draggable),
5899
- setUneditable: !!(this.target && Dn && !this.target.hasAttribute("contentEditable"))
5899
+ setUneditable: !!(this.target && In && !this.target.hasAttribute("contentEditable"))
5900
5900
  }), this.target && this.mightDrag && (this.mightDrag.addAttr || this.mightDrag.setUneditable) && (this.view.domObserver.stop(), this.mightDrag.addAttr && (this.target.draggable = !0), this.mightDrag.setUneditable && setTimeout(() => {
5901
5901
  this.view.input.mouseDown == this && this.target.setAttribute("contentEditable", "false");
5902
5902
  }, 20), this.view.domObserver.start()), e.root.addEventListener("mouseup", this.up = this.up.bind(this)), e.root.addEventListener("mousemove", this.move = this.move.bind(this)), Ye(e, "pointer");
5903
5903
  }
5904
5904
  done() {
5905
- this.view.root.removeEventListener("mouseup", this.up), this.view.root.removeEventListener("mousemove", this.move), this.mightDrag && this.target && (this.view.domObserver.stop(), this.mightDrag.addAttr && this.target.removeAttribute("draggable"), this.mightDrag.setUneditable && this.target.removeAttribute("contentEditable"), this.view.domObserver.start()), this.delayedSelectionSync && setTimeout(() => zr(this.view)), this.view.input.mouseDown = null;
5905
+ this.view.root.removeEventListener("mouseup", this.up), this.view.root.removeEventListener("mousemove", this.move), this.mightDrag && this.target && (this.view.domObserver.stop(), this.mightDrag.addAttr && this.target.removeAttribute("draggable"), this.mightDrag.setUneditable && this.target.removeAttribute("contentEditable"), this.view.domObserver.start()), this.delayedSelectionSync && setTimeout(() => Br(this.view)), this.view.input.mouseDown = null;
5906
5906
  }
5907
5907
  up(e) {
5908
5908
  if (this.done(), !this.view.dom.contains(e.target))
5909
5909
  return;
5910
5910
  let n = this.pos;
5911
- this.view.state.doc != this.startDoc && (n = this.view.posAtCoords(Ln(e))), this.updateAllowDefault(e), this.allowDefault || !n ? Ye(this.view, "pointer") : ou(this.view, n.pos, n.inside, e, this.selectNode) ? e.preventDefault() : e.button == 0 && (this.flushed || // Safari ignores clicks on draggable elements
5911
+ this.view.state.doc != this.startDoc && (n = this.view.posAtCoords(Dn(e))), this.updateAllowDefault(e), this.allowDefault || !n ? Ye(this.view, "pointer") : ou(this.view, n.pos, n.inside, e, this.selectNode) ? e.preventDefault() : e.button == 0 && (this.flushed || // Safari ignores clicks on draggable elements
5912
5912
  bt && this.mightDrag && !this.mightDrag.node.isAtom || // Chrome will sometimes treat a node selection as a
5913
5913
  // cursor, but still report that the node is selected
5914
5914
  // when asked through getSelection. You'll then get a
@@ -5926,23 +5926,23 @@ class uu {
5926
5926
  }
5927
5927
  }
5928
5928
  $e.touchstart = (t) => {
5929
- t.input.lastTouch = Date.now(), Ur(t), Ye(t, "pointer");
5929
+ t.input.lastTouch = Date.now(), Hr(t), Ye(t, "pointer");
5930
5930
  };
5931
5931
  $e.touchmove = (t) => {
5932
5932
  t.input.lastTouch = Date.now(), Ye(t, "pointer");
5933
5933
  };
5934
- $e.contextmenu = (t) => Ur(t);
5934
+ $e.contextmenu = (t) => Hr(t);
5935
5935
  function ko(t, e) {
5936
5936
  return t.composing ? !0 : bt && Math.abs(e.timeStamp - t.input.compositionEndedAt) < 500 ? (t.input.compositionEndedAt = -2e8, !0) : !1;
5937
5937
  }
5938
- const du = en ? 5e3 : -1;
5938
+ const du = Yt ? 5e3 : -1;
5939
5939
  Ee.compositionstart = Ee.compositionupdate = (t) => {
5940
5940
  if (!t.composing) {
5941
5941
  t.domObserver.flush();
5942
5942
  let { state: e } = t, n = e.selection.$to;
5943
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)))
5944
- t.markCursor = t.state.storedMarks || n.marks(), kn(t, !0), t.markCursor = null;
5945
- else if (kn(t, !e.selection.empty), Dn && e.selection.empty && n.parentOffset && !n.textOffset && n.nodeBefore.marks.length) {
5944
+ t.markCursor = t.state.storedMarks || n.marks(), xn(t, !0), t.markCursor = null;
5945
+ else if (xn(t, !e.selection.empty), In && e.selection.empty && n.parentOffset && !n.textOffset && n.nodeBefore.marks.length) {
5946
5946
  let r = t.domSelectionRange();
5947
5947
  for (let i = r.focusNode, s = r.focusOffset; i && i.nodeType == 1 && s != 0; ) {
5948
5948
  let o = s < 0 ? i.lastChild : i.childNodes[s - 1];
@@ -5971,7 +5971,7 @@ Ee.compositionend = (t, e) => {
5971
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));
5972
5972
  };
5973
5973
  function vo(t, e) {
5974
- clearTimeout(t.input.composingTimeout), e > -1 && (t.input.composingTimeout = setTimeout(() => kn(t), e));
5974
+ clearTimeout(t.input.composingTimeout), e > -1 && (t.input.composingTimeout = setTimeout(() => xn(t), e));
5975
5975
  }
5976
5976
  function hu(t) {
5977
5977
  for (t.composing && (t.input.composing = !1, t.input.compositionEndedAt = pu()); t.input.compositionNodes.length > 0; )
@@ -5981,8 +5981,8 @@ function pu() {
5981
5981
  let t = document.createEvent("Event");
5982
5982
  return t.initEvent("event", !0, !0), t.timeStamp;
5983
5983
  }
5984
- function kn(t, e = !1) {
5985
- if (!(en && t.domObserver.flushingSoon >= 0)) {
5984
+ function xn(t, e = !1) {
5985
+ if (!(Yt && t.domObserver.flushingSoon >= 0)) {
5986
5986
  if (t.domObserver.forceFlush(), hu(t), e || t.docView && t.docView.dirty) {
5987
5987
  let n = _c(t), r = t.state.selection;
5988
5988
  return n && !n.eq(r) ? t.dispatch(t.state.tr.setSelection(n)) : (t.markCursor || e) && !r.$from.node(r.$from.sharedDepth(r.to)).inlineContent ? t.dispatch(t.state.tr.deleteSelection()) : t.updateState(t.state), !0;
@@ -6000,12 +6000,12 @@ function mu(t, e) {
6000
6000
  n.parentNode && n.parentNode.removeChild(n), t.focus();
6001
6001
  }, 50);
6002
6002
  }
6003
- const Gt = Yt && so < 15 || _r && $c < 604;
6003
+ const jt = Xt && so < 15 || $r && $c < 604;
6004
6004
  $e.copy = Ee.cut = (t, e) => {
6005
6005
  let n = e, r = t.state.selection, i = n.type == "cut";
6006
6006
  if (r.empty)
6007
6007
  return;
6008
- let s = Gt ? null : n.clipboardData, o = r.content(), { dom: l, text: a } = fo(t, o);
6008
+ let s = jt ? null : n.clipboardData, o = r.content(), { dom: l, text: a } = fo(t, o);
6009
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"));
6010
6010
  };
6011
6011
  function gu(t) {
@@ -6018,10 +6018,10 @@ function yu(t, e) {
6018
6018
  n || (r.contentEditable = "true"), r.style.cssText = "position: fixed; left: -10000px; top: 10px", r.focus();
6019
6019
  let i = t.input.shiftKey && t.input.lastKeyCode != 45;
6020
6020
  setTimeout(() => {
6021
- t.focus(), r.parentNode && r.parentNode.removeChild(r), n ? Sr(t, r.value, null, i, e) : Sr(t, r.textContent, r.innerHTML, i, e);
6021
+ t.focus(), r.parentNode && r.parentNode.removeChild(r), n ? Cr(t, r.value, null, i, e) : Cr(t, r.textContent, r.innerHTML, i, e);
6022
6022
  }, 50);
6023
6023
  }
6024
- function Sr(t, e, n, r, i) {
6024
+ function Cr(t, e, n, r, i) {
6025
6025
  let s = ho(t, e, n, r, t.state.selection.$from);
6026
6026
  if (t.someProp("handlePaste", (a) => a(t, i, s || H.empty)))
6027
6027
  return !0;
@@ -6039,10 +6039,10 @@ function Co(t) {
6039
6039
  }
6040
6040
  Ee.paste = (t, e) => {
6041
6041
  let n = e;
6042
- if (t.composing && !en)
6042
+ if (t.composing && !Yt)
6043
6043
  return;
6044
- let r = Gt ? null : n.clipboardData, i = t.input.shiftKey && t.input.lastKeyCode != 45;
6045
- r && Sr(t, Co(r), r.getData("text/html"), i, n) ? n.preventDefault() : yu(t, n);
6044
+ let r = jt ? null : n.clipboardData, i = t.input.shiftKey && t.input.lastKeyCode != 45;
6045
+ r && Cr(t, Co(r), r.getData("text/html"), i, n) ? n.preventDefault() : yu(t, n);
6046
6046
  };
6047
6047
  class bu {
6048
6048
  constructor(e, n, r) {
@@ -6058,7 +6058,7 @@ $e.dragstart = (t, e) => {
6058
6058
  let n = e, r = t.input.mouseDown;
6059
6059
  if (r && r.done(), !n.dataTransfer)
6060
6060
  return;
6061
- let i = t.state.selection, s = i.empty ? null : t.posAtCoords(Ln(n)), o;
6061
+ let i = t.state.selection, s = i.empty ? null : t.posAtCoords(Dn(n)), o;
6062
6062
  if (!(s && s.pos >= i.from && s.pos <= (i instanceof U ? i.to - 1 : i.to))) {
6063
6063
  if (r && r.mightDrag)
6064
6064
  o = U.create(t.state.doc, r.mightDrag.pos);
@@ -6068,7 +6068,7 @@ $e.dragstart = (t, e) => {
6068
6068
  }
6069
6069
  }
6070
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);
6071
+ (!n.dataTransfer.files.length || !je || oo > 120) && n.dataTransfer.clearData(), n.dataTransfer.setData(jt ? "Text" : "text/html", a.innerHTML), n.dataTransfer.effectAllowed = "copyMove", jt || n.dataTransfer.setData("text/plain", c), t.dragging = new bu(u, So(t, n), o);
6072
6072
  };
6073
6073
  $e.dragend = (t) => {
6074
6074
  let e = t.dragging;
@@ -6087,13 +6087,13 @@ Ee.drop = (t, e) => {
6087
6087
  function ku(t, e, n) {
6088
6088
  if (!e.dataTransfer)
6089
6089
  return;
6090
- let r = t.posAtCoords(Ln(e));
6090
+ let r = t.posAtCoords(Dn(e));
6091
6091
  if (!r)
6092
6092
  return;
6093
6093
  let i = t.state.doc.resolve(r.pos), s = n && n.slice;
6094
6094
  s ? t.someProp("transformPasted", (m) => {
6095
6095
  s = m(s, t, !1);
6096
- }) : s = ho(t, Co(e.dataTransfer), Gt ? null : e.dataTransfer.getData("text/html"), !1, i);
6096
+ }) : s = ho(t, Co(e.dataTransfer), jt ? null : e.dataTransfer.getData("text/html"), !1, i);
6097
6097
  let o = !!(n && So(t, e));
6098
6098
  if (t.someProp("handleDrop", (m) => m(t, e, s || H.empty, o))) {
6099
6099
  e.preventDefault();
@@ -6123,7 +6123,7 @@ function ku(t, e, n) {
6123
6123
  }
6124
6124
  $e.focus = (t) => {
6125
6125
  t.input.lastFocus = Date.now(), t.focused || (t.domObserver.stop(), t.dom.classList.add("ProseMirror-focused"), t.domObserver.start(), t.focused = !0, setTimeout(() => {
6126
- t.docView && t.hasFocus() && !t.domObserver.currentSelection.eq(t.domSelectionRange()) && zr(t);
6126
+ t.docView && t.hasFocus() && !t.domObserver.currentSelection.eq(t.domSelectionRange()) && Br(t);
6127
6127
  }, 20));
6128
6128
  };
6129
6129
  $e.blur = (t, e) => {
@@ -6131,7 +6131,7 @@ $e.blur = (t, e) => {
6131
6131
  t.focused && (t.domObserver.stop(), t.dom.classList.remove("ProseMirror-focused"), t.domObserver.start(), n.relatedTarget && t.dom.contains(n.relatedTarget) && t.domObserver.currentSelection.clear(), t.focused = !1);
6132
6132
  };
6133
6133
  $e.beforeinput = (t, e) => {
6134
- if (je && en && e.inputType == "deleteContentBackward") {
6134
+ if (je && Yt && e.inputType == "deleteContentBackward") {
6135
6135
  t.domObserver.flushSoon();
6136
6136
  let { domChangeCount: r } = t.input;
6137
6137
  setTimeout(() => {
@@ -6144,7 +6144,7 @@ $e.beforeinput = (t, e) => {
6144
6144
  };
6145
6145
  for (let t in Ee)
6146
6146
  $e[t] = Ee[t];
6147
- function Zt(t, e) {
6147
+ function Gt(t, e) {
6148
6148
  if (t == e)
6149
6149
  return !0;
6150
6150
  for (let n in t)
@@ -6155,7 +6155,7 @@ function Zt(t, e) {
6155
6155
  return !1;
6156
6156
  return !0;
6157
6157
  }
6158
- class vn {
6158
+ class kn {
6159
6159
  constructor(e, n) {
6160
6160
  this.toDOM = e, this.spec = n || mt, this.side = this.spec.side || 0;
6161
6161
  }
@@ -6167,7 +6167,7 @@ class vn {
6167
6167
  return !0;
6168
6168
  }
6169
6169
  eq(e) {
6170
- return this == e || e instanceof vn && (this.spec.key && this.spec.key == e.spec.key || this.toDOM == e.toDOM && Zt(this.spec, e.spec));
6170
+ return this == e || e instanceof kn && (this.spec.key && this.spec.key == e.spec.key || this.toDOM == e.toDOM && Gt(this.spec, e.spec));
6171
6171
  }
6172
6172
  destroy(e) {
6173
6173
  this.spec.destroy && this.spec.destroy(e);
@@ -6185,7 +6185,7 @@ class tt {
6185
6185
  return n.from < n.to;
6186
6186
  }
6187
6187
  eq(e) {
6188
- return this == e || e instanceof tt && Zt(this.attrs, e.attrs) && Zt(this.spec, e.spec);
6188
+ return this == e || e instanceof tt && Gt(this.attrs, e.attrs) && Gt(this.spec, e.spec);
6189
6189
  }
6190
6190
  static is(e) {
6191
6191
  return e.type instanceof tt;
@@ -6193,7 +6193,7 @@ class tt {
6193
6193
  destroy() {
6194
6194
  }
6195
6195
  }
6196
- class qr {
6196
+ class Ur {
6197
6197
  constructor(e, n) {
6198
6198
  this.attrs = e, this.spec = n || mt;
6199
6199
  }
@@ -6209,7 +6209,7 @@ class qr {
6209
6209
  return i == n.from && !(s = e.child(r)).isText && i + s.nodeSize == n.to;
6210
6210
  }
6211
6211
  eq(e) {
6212
- return this == e || e instanceof qr && Zt(this.attrs, e.attrs) && Zt(this.spec, e.spec);
6212
+ return this == e || e instanceof Ur && Gt(this.attrs, e.attrs) && Gt(this.spec, e.spec);
6213
6213
  }
6214
6214
  destroy() {
6215
6215
  }
@@ -6248,7 +6248,7 @@ class Be {
6248
6248
  widget's current document position.
6249
6249
  */
6250
6250
  static widget(e, n, r) {
6251
- return new Be(e, e, new vn(n, r));
6251
+ return new Be(e, e, new kn(n, r));
6252
6252
  }
6253
6253
  /**
6254
6254
  Creates an inline decoration, which adds the given attributes to
@@ -6263,7 +6263,7 @@ class Be {
6263
6263
  node, will receive the given attributes.
6264
6264
  */
6265
6265
  static node(e, n, r, i) {
6266
- return new Be(e, n, new qr(r, i));
6266
+ return new Be(e, n, new Ur(r, i));
6267
6267
  }
6268
6268
  /**
6269
6269
  The spec provided when creating this decoration. Can be useful
@@ -6282,7 +6282,7 @@ class Be {
6282
6282
  @internal
6283
6283
  */
6284
6284
  get widget() {
6285
- return this.type instanceof vn;
6285
+ return this.type instanceof kn;
6286
6286
  }
6287
6287
  }
6288
6288
  const St = [], mt = {};
@@ -6299,7 +6299,7 @@ class ae {
6299
6299
  you must make a copy if you want need to preserve that.
6300
6300
  */
6301
6301
  static create(e, n) {
6302
- return n.length ? Cn(n, e, 0, mt) : be;
6302
+ return n.length ? vn(n, e, 0, mt) : be;
6303
6303
  }
6304
6304
  /**
6305
6305
  Find all decorations in this set which touch the given range
@@ -6358,7 +6358,7 @@ class ae {
6358
6358
  if (u = Ao(n, l, c)) {
6359
6359
  for (i || (i = this.children.slice()); s < i.length && i[s] < a; )
6360
6360
  s += 3;
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;
6361
+ i[s] == a ? i[s + 2] = i[s + 2].addInner(l, u, c + 1) : i.splice(s, 0, a, a + l.nodeSize, vn(u, l, c + 1, mt)), s += 3;
6362
6362
  }
6363
6363
  });
6364
6364
  let o = wo(s ? No(n) : n, -r);
@@ -6438,7 +6438,7 @@ class ae {
6438
6438
  @internal
6439
6439
  */
6440
6440
  locals(e) {
6441
- return Kr(this.localsInner(e));
6441
+ return qr(this.localsInner(e));
6442
6442
  }
6443
6443
  /**
6444
6444
  @internal
@@ -6458,7 +6458,7 @@ class ae {
6458
6458
  }
6459
6459
  }
6460
6460
  ae.empty = new ae([], []);
6461
- ae.removeOverlap = Kr;
6461
+ ae.removeOverlap = qr;
6462
6462
  const be = ae.empty;
6463
6463
  class ct {
6464
6464
  constructor(e) {
@@ -6499,7 +6499,7 @@ class ct {
6499
6499
  n.push(s[o]);
6500
6500
  }
6501
6501
  }
6502
- return n ? Kr(r ? n : n.sort(gt)) : St;
6502
+ return n ? qr(r ? n : n.sort(gt)) : St;
6503
6503
  }
6504
6504
  // Create a group for the given array of decoration sets, or return
6505
6505
  // a single set when possible.
@@ -6554,7 +6554,7 @@ function vu(t, e, n, r, i, s, o) {
6554
6554
  a = !0;
6555
6555
  }
6556
6556
  if (a) {
6557
- let c = Cu(l, t, e, n, i, s, o), u = Cn(c, r, 0, o);
6557
+ let c = Cu(l, t, e, n, i, s, o), u = vn(c, r, 0, o);
6558
6558
  e = u.local;
6559
6559
  for (let d = 0; d < l.length; d += 3)
6560
6560
  l[d + 1] < 0 && (l.splice(d, 3), d -= 3);
@@ -6604,13 +6604,13 @@ function No(t) {
6604
6604
  t[n] != null && e.push(t[n]);
6605
6605
  return e;
6606
6606
  }
6607
- function Cn(t, e, n, r) {
6607
+ function vn(t, e, n, r) {
6608
6608
  let i = [], s = !1;
6609
6609
  e.forEach((l, a) => {
6610
6610
  let c = Ao(t, l, a + n);
6611
6611
  if (c) {
6612
6612
  s = !0;
6613
- let u = Cn(c, l, n + a + 1, r);
6613
+ let u = vn(c, l, n + a + 1, r);
6614
6614
  u != be && i.push(a, a + l.nodeSize, u);
6615
6615
  }
6616
6616
  });
@@ -6622,7 +6622,7 @@ function Cn(t, e, n, r) {
6622
6622
  function gt(t, e) {
6623
6623
  return t.from - e.from || t.to - e.to;
6624
6624
  }
6625
- function Kr(t) {
6625
+ function qr(t) {
6626
6626
  let e = t;
6627
6627
  for (let n = 0; n < e.length - 1; n++) {
6628
6628
  let r = e[n];
@@ -6677,7 +6677,7 @@ class ee extends Z {
6677
6677
  @internal
6678
6678
  */
6679
6679
  getBookmark() {
6680
- return new Jr(this.anchor);
6680
+ return new Kr(this.anchor);
6681
6681
  }
6682
6682
  /**
6683
6683
  @internal
@@ -6733,12 +6733,12 @@ class ee extends Z {
6733
6733
  ee.prototype.visible = !1;
6734
6734
  ee.findFrom = ee.findGapCursorFrom;
6735
6735
  Z.jsonID("gapcursor", ee);
6736
- class Jr {
6736
+ class Kr {
6737
6737
  constructor(e) {
6738
6738
  this.pos = e;
6739
6739
  }
6740
6740
  map(e) {
6741
- return new Jr(e.map(this.pos));
6741
+ return new Kr(e.map(this.pos));
6742
6742
  }
6743
6743
  resolve(e) {
6744
6744
  let n = e.resolve(this.pos);
@@ -6783,7 +6783,7 @@ function wu(t) {
6783
6783
  return !0;
6784
6784
  }
6785
6785
  function Au() {
6786
- return new In({
6786
+ return new On({
6787
6787
  props: {
6788
6788
  decorations: Mu,
6789
6789
  createSelectionBetween(t, e, n) {
@@ -6796,12 +6796,12 @@ function Au() {
6796
6796
  });
6797
6797
  }
6798
6798
  const Nu = Rc({
6799
- ArrowLeft: on("horiz", -1),
6800
- ArrowRight: on("horiz", 1),
6801
- ArrowUp: on("vert", -1),
6802
- ArrowDown: on("vert", 1)
6799
+ ArrowLeft: sn("horiz", -1),
6800
+ ArrowRight: sn("horiz", 1),
6801
+ ArrowUp: sn("vert", -1),
6802
+ ArrowDown: sn("vert", 1)
6803
6803
  });
6804
- function on(t, e) {
6804
+ function sn(t, e) {
6805
6805
  const n = t == "vert" ? e > 0 ? "down" : "up" : e > 0 ? "right" : "left";
6806
6806
  return function(r, i, s) {
6807
6807
  let o = r.selection, l = e > 0 ? o.$to : o.$from, a = o.empty;
@@ -6841,7 +6841,7 @@ function Mu(t) {
6841
6841
  let e = document.createElement("div");
6842
6842
  return e.className = "ProseMirror-gapcursor", ae.create(t.doc, [Be.widget(t.selection.head, e, { key: "gapcursor" })]);
6843
6843
  }
6844
- const Ou = Lr.create({
6844
+ const Ou = Dr.create({
6845
6845
  name: "gapCursor",
6846
6846
  addProseMirrorPlugins() {
6847
6847
  return [
@@ -6985,13 +6985,13 @@ const Ou = Lr.create({
6985
6985
  },
6986
6986
  undo: {
6987
6987
  category: "extension",
6988
- extension: Pt,
6988
+ extension: Pi,
6989
6989
  priority: 50
6990
6990
  // Lower priority, loaded later
6991
6991
  },
6992
6992
  redo: {
6993
6993
  category: "extension",
6994
- extension: Pt,
6994
+ extension: Pi,
6995
6995
  priority: 50
6996
6996
  },
6997
6997
  textAlign: {
@@ -7006,14 +7006,14 @@ const Ou = Lr.create({
7006
7006
  },
7007
7007
  clearMarks: {
7008
7008
  category: "extension",
7009
- extension: Pt,
7010
- // Doesn't need its own extension, handled in commands
7009
+ extension: null,
7010
+ // No extension needed - built-in editor command
7011
7011
  priority: 50
7012
7012
  },
7013
7013
  clearNodes: {
7014
7014
  category: "extension",
7015
- extension: Pt,
7016
- // Doesn't need its own extension, handled in commands
7015
+ extension: null,
7016
+ // No extension needed - built-in editor command
7017
7017
  priority: 50
7018
7018
  }
7019
7019
  }, Iu = [
@@ -7025,42 +7025,50 @@ const Ou = Lr.create({
7025
7025
  ja,
7026
7026
  ta,
7027
7027
  // Required for task lists
7028
- Pt,
7029
- // Required: undo/redo functionality
7028
+ // Note: History is NOT here - it's managed via undo/redo modifiers to avoid duplication
7030
7029
  Ec,
7031
7030
  Ou
7032
7031
  ];
7033
7032
  function Du(t) {
7034
7033
  const e = [], n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
7035
- Iu.forEach((l) => {
7036
- l && (e.push(l), r.add(l.name), l.name === "history" && (n.add("undo"), n.add("redo")));
7034
+ Iu.forEach((a) => {
7035
+ a && (e.push(a), r.add(a.name));
7037
7036
  });
7038
- const i = t.map((l) => Kt(l)), s = /* @__PURE__ */ new Set();
7039
- return i.forEach((l) => {
7040
- const a = Dt[l];
7041
- a?.requiredExtensions && a.requiredExtensions.forEach((c) => {
7042
- s.add(c);
7037
+ const i = t.map((a) => qt(a)), s = /* @__PURE__ */ new Set();
7038
+ i.forEach((a) => {
7039
+ const c = Dt[a];
7040
+ c?.requiredExtensions && c.requiredExtensions.forEach((u) => {
7041
+ s.add(u);
7043
7042
  });
7044
- }), s.forEach((l) => {
7045
- if (n.has(l)) return;
7046
- const a = Dt[l];
7047
- if (!a || a.extension === null) return;
7048
- const c = a.defaultOptions ? a.extension.configure(a.defaultOptions) : a.extension;
7049
- e.push(c), n.add(l);
7050
- }), i.forEach((l) => {
7051
- if (n.has(l)) return;
7052
- const a = Dt[l];
7053
- if (!a || a.extension === null) {
7054
- console.warn(`Extension not found or not installed for modifier: ${l}`);
7043
+ }), s.forEach((a) => {
7044
+ if (n.has(a)) return;
7045
+ const c = Dt[a];
7046
+ if (!c || c.extension === null) return;
7047
+ const u = c.defaultOptions ? c.extension.configure(c.defaultOptions) : c.extension;
7048
+ e.push(u), n.add(a);
7049
+ });
7050
+ const o = /* @__PURE__ */ new Set();
7051
+ return i.forEach((a) => {
7052
+ if (n.has(a)) return;
7053
+ const c = Dt[a];
7054
+ if (!c) {
7055
+ console.warn(`Extension config not found for modifier: ${a}`);
7055
7056
  return;
7056
7057
  }
7057
- if (a.extension.name === "history" && n.has("undo"))
7058
+ if (c.extension === null) {
7059
+ n.add(a);
7058
7060
  return;
7059
- const c = a.defaultOptions ? a.extension.configure(a.defaultOptions) : a.extension;
7060
- e.push(c), n.add(l), (l === "undo" || l === "redo") && (n.add("undo"), n.add("redo"));
7061
- }), e.sort((l, a) => {
7062
- const c = Object.values(Dt).find((m) => m?.extension?.name === l.name), u = Object.values(Dt).find((m) => m?.extension?.name === a.name), d = c?.priority ?? 100;
7063
- return (u?.priority ?? 100) - d;
7061
+ }
7062
+ const u = c.extension.name;
7063
+ if (o.has(u)) {
7064
+ n.add(a);
7065
+ return;
7066
+ }
7067
+ const d = c.defaultOptions ? c.extension.configure(c.defaultOptions) : c.extension;
7068
+ e.push(d), n.add(a), o.add(u);
7069
+ }), e.sort((a, c) => {
7070
+ const u = Object.values(Dt).find((x) => x?.extension?.name === a.name), d = Object.values(Dt).find((x) => x?.extension?.name === c.name), p = u?.priority ?? 100;
7071
+ return (d?.priority ?? 100) - p;
7064
7072
  });
7065
7073
  }
7066
7074
  const Lu = {
@@ -7195,7 +7203,7 @@ const Lu = {
7195
7203
  " words"
7196
7204
  ] })
7197
7205
  ] });
7198
- }, wr = Tn((t, e) => {
7206
+ }, Sr = En((t, e) => {
7199
7207
  const {
7200
7208
  minRows: n = 10,
7201
7209
  maxRows: r = 30,
@@ -7213,7 +7221,7 @@ const Lu = {
7213
7221
  isReadOnly: y = !1,
7214
7222
  isDisabled: k = !1,
7215
7223
  ...v
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
+ } = t, { zoom: S, setZoom: I } = ka(), A = yi.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({
7217
7225
  ...v,
7218
7226
  variant: c,
7219
7227
  // Explicitly pass variant to ensure bordered styling
@@ -7246,7 +7254,7 @@ const Lu = {
7246
7254
  ..._(),
7247
7255
  className: L(_().className, "flex flex-col w-full p-0 gap-0 rich-text-editor"),
7248
7256
  style: {
7249
- maxHeight: D ? `${D + bi.toolbarHeight}px` : void 0,
7257
+ maxHeight: D ? `${D + yi.toolbarHeight}px` : void 0,
7250
7258
  overflow: D ? "auto" : void 0
7251
7259
  },
7252
7260
  children: /* @__PURE__ */ f(
@@ -7286,10 +7294,10 @@ const Lu = {
7286
7294
  )
7287
7295
  ] });
7288
7296
  });
7289
- wr.displayName = "TipTapEditor";
7290
- const Pu = Tn((t, e) => {
7297
+ Sr.displayName = "TipTapEditor";
7298
+ const Pu = En((t, e) => {
7291
7299
  const { adapter: n = "tiptap", variant: r = "bordered", ...i } = t;
7292
- return n === "tiptap" ? /* @__PURE__ */ f(wr, { ...i, variant: r, ref: e }) : (console.warn(`Adapter "${n}" is not supported. Using TipTap.`), /* @__PURE__ */ f(wr, { ...i, variant: r, ref: e }));
7300
+ return n === "tiptap" ? /* @__PURE__ */ f(Sr, { ...i, variant: r, ref: e }) : (console.warn(`Adapter "${n}" is not supported. Using TipTap.`), /* @__PURE__ */ f(Sr, { ...i, variant: r, ref: e }));
7293
7301
  });
7294
7302
  Pu.displayName = "RichTextArea";
7295
7303
  function Vu(t, e = "en-US", n = "USD") {
@@ -7342,7 +7350,7 @@ const Qi = [
7342
7350
  4: "sm:grid-cols-4",
7343
7351
  5: "sm:grid-cols-5",
7344
7352
  6: "sm:grid-cols-6"
7345
- }, D = `${A[u]} ${M[d]}`, [O, V] = Fr(
7353
+ }, D = `${A[u]} ${M[d]}`, [O, V] = Lr(
7346
7354
  e,
7347
7355
  n,
7348
7356
  r
@@ -7425,13 +7433,13 @@ const Bu = (t) => {
7425
7433
  }, zu = (t) => {
7426
7434
  switch (t) {
7427
7435
  case "warning":
7428
- return yi;
7436
+ return gi;
7429
7437
  case "error":
7430
7438
  return zl;
7431
7439
  case "success":
7432
7440
  return Bl;
7433
7441
  default:
7434
- return yi;
7442
+ return gi;
7435
7443
  }
7436
7444
  }, Hu = (t) => {
7437
7445
  switch (t) {
@@ -7468,11 +7476,11 @@ const Bu = (t) => {
7468
7476
  className: p,
7469
7477
  ...m
7470
7478
  }, x) => {
7471
- const [y, k] = Fr(
7479
+ const [y, k] = Lr(
7472
7480
  t !== void 0 ? Math.max(0, t) : void 0,
7473
7481
  Math.max(0, e),
7474
7482
  n
7475
- ), v = Ut(null), S = Ut(!1);
7483
+ ), v = Ht(null), S = Ht(!1);
7476
7484
  et(() => () => {
7477
7485
  v.current && clearInterval(v.current);
7478
7486
  }, []), et(() => {
@@ -7570,15 +7578,15 @@ const To = Object.freeze({
7570
7578
  top: 0,
7571
7579
  width: 16,
7572
7580
  height: 16
7573
- }), Sn = Object.freeze({
7581
+ }), Cn = Object.freeze({
7574
7582
  rotate: 0,
7575
7583
  vFlip: !1,
7576
7584
  hFlip: !1
7577
- }), Wr = Object.freeze({
7585
+ }), Jr = Object.freeze({
7578
7586
  ...To,
7579
- ...Sn
7580
- }), Ar = Object.freeze({
7581
- ...Wr,
7587
+ ...Cn
7588
+ }), wr = Object.freeze({
7589
+ ...Jr,
7582
7590
  body: "",
7583
7591
  hidden: !1
7584
7592
  });
@@ -7590,7 +7598,7 @@ function Ku(t, e) {
7590
7598
  }
7591
7599
  function Xi(t, e) {
7592
7600
  const n = Ku(t, e);
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]);
7601
+ for (const r in wr) r in Cn ? r in t && !(r in n) && (n[r] = Cn[r]) : r in e ? n[r] = e[r] : r in t && (n[r] = t[r]);
7594
7602
  return n;
7595
7603
  }
7596
7604
  function Ju(t, e, n) {
@@ -7620,23 +7628,23 @@ const Wu = {
7620
7628
  not_found: {},
7621
7629
  ...To
7622
7630
  };
7623
- function nr(t, e) {
7631
+ function tr(t, e) {
7624
7632
  for (const n in e) if (n in t && typeof t[n] != typeof e[n]) return !1;
7625
7633
  return !0;
7626
7634
  }
7627
7635
  function Oo(t) {
7628
7636
  if (typeof t != "object" || t === null) return null;
7629
7637
  const e = t;
7630
- if (typeof e.prefix != "string" || !t.icons || typeof t.icons != "object" || !nr(t, Wu)) return null;
7638
+ if (typeof e.prefix != "string" || !t.icons || typeof t.icons != "object" || !tr(t, Wu)) return null;
7631
7639
  const n = e.icons;
7632
7640
  for (const i in n) {
7633
7641
  const s = n[i];
7634
- if (!i || typeof s.body != "string" || !nr(s, Ar)) return null;
7642
+ if (!i || typeof s.body != "string" || !tr(s, wr)) return null;
7635
7643
  }
7636
7644
  const r = e.aliases || /* @__PURE__ */ Object.create(null);
7637
7645
  for (const i in r) {
7638
7646
  const s = r[i], o = s.parent;
7639
- if (!i || typeof o != "string" || !n[o] && !r[o] || !nr(s, Ar)) return null;
7647
+ if (!i || typeof o != "string" || !n[o] && !r[o] || !tr(s, wr)) return null;
7640
7648
  }
7641
7649
  return e;
7642
7650
  }
@@ -7666,7 +7674,7 @@ function Gu(t, e, n) {
7666
7674
  }
7667
7675
  return !1;
7668
7676
  }
7669
- const Do = /^[a-z0-9]+(-[a-z0-9]+)*$/, Fn = (t, e, n, r = "") => {
7677
+ const Do = /^[a-z0-9]+(-[a-z0-9]+)*$/, Ln = (t, e, n, r = "") => {
7670
7678
  const i = t.split(":");
7671
7679
  if (t.slice(0, 1) === "@") {
7672
7680
  if (i.length < 2 || i.length > 3) return null;
@@ -7679,7 +7687,7 @@ const Do = /^[a-z0-9]+(-[a-z0-9]+)*$/, Fn = (t, e, n, r = "") => {
7679
7687
  prefix: a,
7680
7688
  name: l
7681
7689
  };
7682
- return e && !dn(c) ? null : c;
7690
+ return e && !un(c) ? null : c;
7683
7691
  }
7684
7692
  const s = i[0], o = s.split("-");
7685
7693
  if (o.length > 1) {
@@ -7688,7 +7696,7 @@ const Do = /^[a-z0-9]+(-[a-z0-9]+)*$/, Fn = (t, e, n, r = "") => {
7688
7696
  prefix: o.shift(),
7689
7697
  name: o.join("-")
7690
7698
  };
7691
- return e && !dn(l) ? null : l;
7699
+ return e && !un(l) ? null : l;
7692
7700
  }
7693
7701
  if (n && r === "") {
7694
7702
  const l = {
@@ -7696,37 +7704,37 @@ const Do = /^[a-z0-9]+(-[a-z0-9]+)*$/, Fn = (t, e, n, r = "") => {
7696
7704
  prefix: "",
7697
7705
  name: s
7698
7706
  };
7699
- return e && !dn(l, n) ? null : l;
7707
+ return e && !un(l, n) ? null : l;
7700
7708
  }
7701
7709
  return null;
7702
- }, dn = (t, e) => t ? !!((e && t.prefix === "" || t.prefix) && t.name) : !1;
7703
- let Qt = !1;
7710
+ }, un = (t, e) => t ? !!((e && t.prefix === "" || t.prefix) && t.name) : !1;
7711
+ let Zt = !1;
7704
7712
  function Lo(t) {
7705
- return typeof t == "boolean" && (Qt = t), Qt;
7713
+ return typeof t == "boolean" && (Zt = t), Zt;
7706
7714
  }
7707
7715
  function es(t) {
7708
- const e = typeof t == "string" ? Fn(t, !0, Qt) : t;
7716
+ const e = typeof t == "string" ? Ln(t, !0, Zt) : t;
7709
7717
  if (e) {
7710
7718
  const n = Ot(e.provider, e.prefix), r = e.name;
7711
7719
  return n.icons[r] || (n.missing.has(r) ? null : void 0);
7712
7720
  }
7713
7721
  }
7714
7722
  function Zu(t, e) {
7715
- const n = Fn(t, !0, Qt);
7723
+ const n = Ln(t, !0, Zt);
7716
7724
  if (!n) return !1;
7717
7725
  const r = Ot(n.provider, n.prefix);
7718
7726
  return e ? Gu(r, n.name, e) : (r.missing.add(n.name), !0);
7719
7727
  }
7720
7728
  function Qu(t, e) {
7721
7729
  if (typeof t != "object") return !1;
7722
- if (typeof e != "string" && (e = t.provider || ""), Qt && !e && !t.prefix) {
7730
+ if (typeof e != "string" && (e = t.provider || ""), Zt && !e && !t.prefix) {
7723
7731
  let i = !1;
7724
7732
  return Oo(t) && (t.prefix = "", Mo(t, (s, o) => {
7725
7733
  Zu(s, o) && (i = !0);
7726
7734
  })), i;
7727
7735
  }
7728
7736
  const n = t.prefix;
7729
- if (!dn({
7737
+ if (!un({
7730
7738
  prefix: n,
7731
7739
  name: "a"
7732
7740
  })) return !1;
@@ -7738,7 +7746,7 @@ const Fo = Object.freeze({
7738
7746
  height: null
7739
7747
  }), Ro = Object.freeze({
7740
7748
  ...Fo,
7741
- ...Sn
7749
+ ...Cn
7742
7750
  }), Xu = /(-?[0-9.]*[0-9]+[0-9.]*)/g, Yu = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
7743
7751
  function ts(t, e, n) {
7744
7752
  if (e === 1) return t;
@@ -7782,7 +7790,7 @@ function nd(t, e, n) {
7782
7790
  const rd = (t) => t === "unset" || t === "undefined" || t === "none";
7783
7791
  function id(t, e) {
7784
7792
  const n = {
7785
- ...Wr,
7793
+ ...Jr,
7786
7794
  ...t
7787
7795
  }, r = {
7788
7796
  ...Ro,
@@ -7844,14 +7852,14 @@ function ad(t, e = od) {
7844
7852
  t = t.replace(new RegExp('([#;"])(' + l + ')([")]|\\.[a-z])', "g"), "$1" + o + i + "$3");
7845
7853
  }), t = t.replace(new RegExp(i, "g"), ""), t;
7846
7854
  }
7847
- const Nr = /* @__PURE__ */ Object.create(null);
7855
+ const Ar = /* @__PURE__ */ Object.create(null);
7848
7856
  function cd(t, e) {
7849
- Nr[t] = e;
7857
+ Ar[t] = e;
7850
7858
  }
7851
- function Er(t) {
7852
- return Nr[t] || Nr[""];
7859
+ function Nr(t) {
7860
+ return Ar[t] || Ar[""];
7853
7861
  }
7854
- function jr(t) {
7862
+ function Wr(t) {
7855
7863
  let e;
7856
7864
  if (typeof t.resources == "string") e = [t.resources];
7857
7865
  else if (e = t.resources, !(e instanceof Array) || !e.length) return null;
@@ -7866,15 +7874,15 @@ function jr(t) {
7866
7874
  dataAfterTimeout: t.dataAfterTimeout !== !1
7867
7875
  };
7868
7876
  }
7869
- const Gr = /* @__PURE__ */ Object.create(null), Lt = ["https://api.simplesvg.com", "https://api.unisvg.com"], fn = [];
7870
- for (; Lt.length > 0; ) Lt.length === 1 || Math.random() > 0.5 ? fn.push(Lt.shift()) : fn.push(Lt.pop());
7871
- Gr[""] = jr({ resources: ["https://api.iconify.design"].concat(fn) });
7877
+ const jr = /* @__PURE__ */ Object.create(null), Lt = ["https://api.simplesvg.com", "https://api.unisvg.com"], dn = [];
7878
+ for (; Lt.length > 0; ) Lt.length === 1 || Math.random() > 0.5 ? dn.push(Lt.shift()) : dn.push(Lt.pop());
7879
+ jr[""] = Wr({ resources: ["https://api.iconify.design"].concat(dn) });
7872
7880
  function ud(t, e) {
7873
- const n = jr(e);
7874
- return n === null ? !1 : (Gr[t] = n, !0);
7881
+ const n = Wr(e);
7882
+ return n === null ? !1 : (jr[t] = n, !0);
7875
7883
  }
7876
- function Zr(t) {
7877
- return Gr[t];
7884
+ function Gr(t) {
7885
+ return jr[t];
7878
7886
  }
7879
7887
  const dd = () => {
7880
7888
  let t;
@@ -7885,7 +7893,7 @@ const dd = () => {
7885
7893
  };
7886
7894
  let ns = dd();
7887
7895
  function fd(t, e) {
7888
- const n = Zr(t);
7896
+ const n = Gr(t);
7889
7897
  if (!n) return 0;
7890
7898
  let r;
7891
7899
  if (!n.maxURL) r = 0;
@@ -7921,7 +7929,7 @@ const pd = (t, e, n) => {
7921
7929
  };
7922
7930
  function md(t) {
7923
7931
  if (typeof t == "string") {
7924
- const e = Zr(t);
7932
+ const e = Gr(t);
7925
7933
  if (e) return e.path;
7926
7934
  }
7927
7935
  return "/";
@@ -8052,7 +8060,7 @@ function vd(t) {
8052
8060
  function Cd(t, e = !0, n = !1) {
8053
8061
  const r = [];
8054
8062
  return t.forEach((i) => {
8055
- const s = typeof i == "string" ? Fn(i, e, n) : i;
8063
+ const s = typeof i == "string" ? Ln(i, e, n) : i;
8056
8064
  s && r.push(s);
8057
8065
  }), r;
8058
8066
  }
@@ -8192,33 +8200,33 @@ function Vo(t) {
8192
8200
  }
8193
8201
  function rs() {
8194
8202
  }
8195
- const rr = /* @__PURE__ */ Object.create(null);
8203
+ const nr = /* @__PURE__ */ Object.create(null);
8196
8204
  function Ad(t) {
8197
- if (!rr[t]) {
8198
- const e = Zr(t);
8205
+ if (!nr[t]) {
8206
+ const e = Gr(t);
8199
8207
  if (!e) return;
8200
8208
  const n = Vo(e), r = {
8201
8209
  config: e,
8202
8210
  redundancy: n
8203
8211
  };
8204
- rr[t] = r;
8212
+ nr[t] = r;
8205
8213
  }
8206
- return rr[t];
8214
+ return nr[t];
8207
8215
  }
8208
8216
  function Nd(t, e, n) {
8209
8217
  let r, i;
8210
8218
  if (typeof t == "string") {
8211
- const s = Er(t);
8219
+ const s = Nr(t);
8212
8220
  if (!s)
8213
8221
  return n(void 0, 424), rs;
8214
8222
  i = s.send;
8215
8223
  const o = Ad(t);
8216
8224
  o && (r = o.redundancy);
8217
8225
  } else {
8218
- const s = jr(t);
8226
+ const s = Wr(t);
8219
8227
  if (s) {
8220
8228
  r = Vo(s);
8221
- const o = t.resources ? t.resources[0] : "", l = Er(o);
8229
+ const o = t.resources ? t.resources[0] : "", l = Nr(o);
8222
8230
  l && (i = l.send);
8223
8231
  }
8224
8232
  }
@@ -8291,7 +8299,7 @@ function Md(t, e) {
8291
8299
  }
8292
8300
  const { valid: o, invalid: l } = Td(i);
8293
8301
  if (l.length && Ft(t, l, null), !o.length) return;
8294
- const a = r.match(Do) ? Er(n) : null;
8302
+ const a = r.match(Do) ? Nr(n) : null;
8295
8303
  if (!a) {
8296
8304
  Ft(t, o, null);
8297
8305
  return;
@@ -8389,16 +8397,16 @@ function Vd(t) {
8389
8397
  function $d(t) {
8390
8398
  return 'url("' + Vd(t) + '")';
8391
8399
  }
8392
- let Bt;
8400
+ let _t;
8393
8401
  function _d() {
8394
8402
  try {
8395
- Bt = window.trustedTypes.createPolicy("iconify", { createHTML: (t) => t });
8403
+ _t = window.trustedTypes.createPolicy("iconify", { createHTML: (t) => t });
8396
8404
  } catch {
8397
- Bt = null;
8405
+ _t = null;
8398
8406
  }
8399
8407
  }
8400
8408
  function Bd(t) {
8401
- return Bt === void 0 && _d(), Bt ? Bt.createHTML(t) : t;
8409
+ return _t === void 0 && _d(), _t ? _t.createHTML(t) : t;
8402
8410
  }
8403
8411
  const $o = {
8404
8412
  ...Ro,
@@ -8410,7 +8418,7 @@ const $o = {
8410
8418
  role: "img"
8411
8419
  }, Hd = {
8412
8420
  display: "inline-block"
8413
- }, Tr = {
8421
+ }, Er = {
8414
8422
  backgroundColor: "currentColor"
8415
8423
  }, _o = {
8416
8424
  backgroundColor: "transparent"
@@ -8419,8 +8427,8 @@ const $o = {
8419
8427
  Repeat: "no-repeat",
8420
8428
  Size: "100% 100%"
8421
8429
  }, ls = {
8422
- WebkitMask: Tr,
8423
- mask: Tr,
8430
+ WebkitMask: Er,
8431
+ mask: Er,
8424
8432
  background: _o
8425
8433
  };
8426
8434
  for (const t in ls) {
@@ -8440,7 +8448,7 @@ const qd = (t, e, n) => {
8440
8448
  ...s === "svg" ? zd : {}
8441
8449
  };
8442
8450
  if (n) {
8443
- const k = Fn(n, !1, !0);
8451
+ const k = Ln(n, !1, !0);
8444
8452
  if (k) {
8445
8453
  const v = ["iconify"], S = [
8446
8454
  "provider",
@@ -8509,7 +8517,7 @@ const qd = (t, e, n) => {
8509
8517
  let k = 0, v = e.id;
8510
8518
  return typeof v == "string" && (v = v.replace(/-/g, "_")), a.dangerouslySetInnerHTML = {
8511
8519
  __html: Bd(ad(c.body, v ? () => v + "ID" + k++ : "iconifyReact"))
8512
- }, ar("svg", a);
8520
+ }, lr("svg", a);
8513
8521
  }
8514
8522
  const { body: d, width: p, height: m } = t, x = s === "mask" || (s === "bg" ? !1 : d.indexOf("currentColor") !== -1), y = Rd(d, {
8515
8523
  ...u,
@@ -8522,9 +8530,9 @@ const qd = (t, e, n) => {
8522
8530
  width: as(u.width),
8523
8531
  height: as(u.height),
8524
8532
  ...Hd,
8525
- ...x ? Tr : _o,
8533
+ ...x ? Er : _o,
8526
8534
  ...l
8527
- }, ar("span", a);
8535
+ }, lr("span", a);
8528
8536
  };
8529
8537
  Lo(!0);
8530
8538
  cd("", yd);
@@ -8616,20 +8624,20 @@ function Bo(t) {
8616
8624
  }, [t.icon, e]);
8617
8625
  const { name: d, data: p } = o;
8618
8626
  return p ? qd({
8619
- ...Wr,
8627
+ ...Jr,
8620
8628
  ...p
8621
- }, t, d) : t.children ? t.children : t.fallback ? t.fallback : ar("span", {});
8629
+ }, t, d) : t.children ? t.children : t.fallback ? t.fallback : lr("span", {});
8622
8630
  }
8623
- const Ie = Tn((t, e) => Bo({
8631
+ const Ie = En((t, e) => Bo({
8624
8632
  ...t,
8625
8633
  _ref: e
8626
8634
  }));
8627
- Tn((t, e) => Bo({
8635
+ En((t, e) => Bo({
8628
8636
  inline: !0,
8629
8637
  ...t,
8630
8638
  _ref: e
8631
8639
  }));
8632
- const ir = ({
8640
+ const rr = ({
8633
8641
  icon: t,
8634
8642
  children: e,
8635
8643
  testId: n
@@ -8648,7 +8656,7 @@ const ir = ({
8648
8656
  showMoreButtonClassName: a,
8649
8657
  labels: c
8650
8658
  }) => {
8651
- const [u, d] = he(!1), [p, m] = he(!1), x = Ut(null);
8659
+ const [u, d] = he(!1), [p, m] = he(!1), x = Ht(null);
8652
8660
  return et(() => {
8653
8661
  const y = () => {
8654
8662
  if (x.current) {
@@ -8680,9 +8688,9 @@ const ir = ({
8680
8688
  /* @__PURE__ */ T(Pe, { className: "py-3 space-y-3", "data-testid": "event-details-body", children: [
8681
8689
  /* @__PURE__ */ f("h3", { className: "font-semibold text-base text-gray-700", "data-testid": "event-details-info-label", children: c.eventInformation }),
8682
8690
  /* @__PURE__ */ T("div", { className: "flex flex-wrap gap-4", "data-testid": "event-details-info", children: [
8683
- r && /* @__PURE__ */ f(ir, { icon: "solar:calendar-minimalistic-linear", testId: "event-details-date", children: r }),
8684
- i && /* @__PURE__ */ f(ir, { icon: "solar:clock-circle-linear", testId: "event-details-time", children: i }),
8685
- s && /* @__PURE__ */ f(ir, { icon: "solar:point-on-map-outline", testId: "event-details-location", children: s })
8691
+ r && /* @__PURE__ */ f(rr, { icon: "solar:calendar-minimalistic-linear", testId: "event-details-date", children: r }),
8692
+ i && /* @__PURE__ */ f(rr, { icon: "solar:clock-circle-linear", testId: "event-details-time", children: i }),
8693
+ s && /* @__PURE__ */ f(rr, { icon: "solar:point-on-map-outline", testId: "event-details-location", children: s })
8686
8694
  ] }),
8687
8695
  o && /* @__PURE__ */ T("div", { className: "relative", "data-testid": "event-details-description-wrapper", children: [
8688
8696
  /* @__PURE__ */ f(
@@ -8743,7 +8751,7 @@ const Jd = {
8743
8751
  tickets: "Tickets:",
8744
8752
  soldOut: "Sold Out",
8745
8753
  maxReached: "Maximum number of tickets allowed reached"
8746
- }, ln = (t) => typeof t == "number" && !isNaN(t), zo = ({
8754
+ }, on = (t) => typeof t == "number" && !isNaN(t), zo = ({
8747
8755
  offer: t,
8748
8756
  quantity: e,
8749
8757
  defaultQuantity: n = 0,
@@ -8767,7 +8775,7 @@ const Jd = {
8767
8775
  if (a) return;
8768
8776
  const me = Math.max(0, M + oe);
8769
8777
  e === void 0 && A(me), r?.(t.id, me);
8770
- }, O = lr(() => !ln(t.totalTicketsSold) || !ln(t.ticketsAllowed) ? !1 : t.totalTicketsSold >= t.ticketsAllowed, [t.totalTicketsSold, t.ticketsAllowed]), V = lr(() => O || !ln(t.ticketsAllowed) ? !1 : M >= t.ticketsAllowed - (t.totalTicketsSold ?? 0), [O, t.ticketsAllowed, t.totalTicketsSold, M]), $ = Kd(t.price, s, i), q = () => l?.renderName ? l.renderName(t.name, t) : /* @__PURE__ */ f("h2", { "data-testid": "offer-card-name", className: L("text-base font-medium", y.name), children: t.name }), Te = () => x ? l?.renderPrice ? l.renderPrice(t.price, $, t) : /* @__PURE__ */ f("p", { "data-testid": "offer-card-price", className: L("text-primary text-base mt-1", y.price), children: $ }) : null, P = () => !p || !t.description ? null : l?.renderDescription ? l.renderDescription(t.description, t) : /* @__PURE__ */ f(
8778
+ }, O = or(() => !on(t.totalTicketsSold) || !on(t.ticketsAllowed) ? !1 : t.totalTicketsSold >= t.ticketsAllowed, [t.totalTicketsSold, t.ticketsAllowed]), V = or(() => O || !on(t.ticketsAllowed) ? !1 : M >= t.ticketsAllowed - (t.totalTicketsSold ?? 0), [O, t.ticketsAllowed, t.totalTicketsSold, M]), $ = Kd(t.price, s, i), q = () => l?.renderName ? l.renderName(t.name, t) : /* @__PURE__ */ f("h2", { "data-testid": "offer-card-name", className: L("text-base font-medium", y.name), children: t.name }), Te = () => x ? l?.renderPrice ? l.renderPrice(t.price, $, t) : /* @__PURE__ */ f("p", { "data-testid": "offer-card-price", className: L("text-primary text-base mt-1", y.price), children: $ }) : null, P = () => !p || !t.description ? null : l?.renderDescription ? l.renderDescription(t.description, t) : /* @__PURE__ */ f(
8771
8779
  "p",
8772
8780
  {
8773
8781
  "data-testid": "offer-card-description",
@@ -8775,7 +8783,7 @@ const Jd = {
8775
8783
  children: t.description
8776
8784
  }
8777
8785
  ), _ = () => {
8778
- if (!m || !ln(t.numberOfPeople) || t.numberOfPeople <= 0)
8786
+ if (!m || !on(t.numberOfPeople) || t.numberOfPeople <= 0)
8779
8787
  return null;
8780
8788
  const oe = t.numberOfPeople === 1 ? S.person : S.people;
8781
8789
  return l?.renderPeopleCount ? l.renderPeopleCount(t.numberOfPeople, oe, t) : /* @__PURE__ */ T(
@@ -8848,7 +8856,7 @@ const Jd = {
8848
8856
  )
8849
8857
  ] });
8850
8858
  }, B = () => l?.renderSoldOut ? l.renderSoldOut(S.soldOut) : /* @__PURE__ */ f(
8851
- hi,
8859
+ fi,
8852
8860
  {
8853
8861
  "data-testid": "offer-card-sold-out-chip",
8854
8862
  color: "danger",
@@ -8857,7 +8865,7 @@ const Jd = {
8857
8865
  children: /* @__PURE__ */ f("span", { className: "font-medium text-sm", children: S.soldOut })
8858
8866
  }
8859
8867
  ), Q = () => l?.renderMaxReachedAlert ? l.renderMaxReachedAlert(S.maxReached) : /* @__PURE__ */ f(
8860
- hi,
8868
+ fi,
8861
8869
  {
8862
8870
  "data-testid": "offer-card-max-reached-chip",
8863
8871
  color: "warning",
@@ -8885,7 +8893,7 @@ const Jd = {
8885
8893
  ] }),
8886
8894
  /* @__PURE__ */ f("div", { className: "space-x-2 p-2 h-full flex items-center justify-start md:justify-start lg:justify-end ", children: O ? B() : J() })
8887
8895
  ] }), Ce = V && !O && /* @__PURE__ */ f(
8888
- ur.div,
8896
+ cr.div,
8889
8897
  {
8890
8898
  className: "w-full sm:max-w-[60%] md:max-w-[60%] lg:max-w-[60%]",
8891
8899
  initial: { opacity: 0, y: 10 },
@@ -8897,10 +8905,10 @@ const Jd = {
8897
8905
  );
8898
8906
  return d ? /* @__PURE__ */ T(Re, { className: L("w-full", y.base), "data-testid": k || `offer-card-${t.id}`, children: [
8899
8907
  /* @__PURE__ */ f(Pe, { className: L("pt-1 pb-0", y.body), children: K }),
8900
- /* @__PURE__ */ f(dr, { children: Ce && /* @__PURE__ */ f(gl, { className: L("w-full mt-0 pt-0", y.footer), children: Ce }) })
8908
+ /* @__PURE__ */ f(ur, { children: Ce && /* @__PURE__ */ f(gl, { className: L("w-full mt-0 pt-0", y.footer), children: Ce }) })
8901
8909
  ] }) : /* @__PURE__ */ T("div", { className: L("w-full", y.base), "data-testid": k || `offer-card-${t.id}`, children: [
8902
8910
  /* @__PURE__ */ f("div", { className: L("pt-1 pb-0", y.body), children: K }),
8903
- /* @__PURE__ */ f(dr, { children: Ce && /* @__PURE__ */ f("div", { className: L("w-full mt-0 pt-0", y.footer), children: Ce }) })
8911
+ /* @__PURE__ */ f(ur, { children: Ce && /* @__PURE__ */ f("div", { className: L("w-full mt-0 pt-0", y.footer), children: Ce }) })
8904
8912
  ] });
8905
8913
  };
8906
8914
  zo.displayName = "OfferCard";
@@ -8952,7 +8960,7 @@ const jd = {
8952
8960
  classNames: i = {}
8953
8961
  }) => {
8954
8962
  const s = { ...jd, ...e }, o = /* @__PURE__ */ f(
8955
- En,
8963
+ Nn,
8956
8964
  {
8957
8965
  "data-testid": "offer-card-error-alert",
8958
8966
  color: r,
@@ -9142,15 +9150,15 @@ const Xd = {
9142
9150
  V.id
9143
9151
  );
9144
9152
  return m ? /* @__PURE__ */ f(
9145
- ur.div,
9153
+ cr.div,
9146
9154
  {
9147
9155
  "data-testid": "offer-card-list",
9148
9156
  className: D,
9149
9157
  variants: Xd,
9150
9158
  initial: "hidden",
9151
9159
  animate: "show",
9152
- children: /* @__PURE__ */ f(dr, { children: A.map((V) => /* @__PURE__ */ f(
9153
- ur.div,
9160
+ children: /* @__PURE__ */ f(ur, { children: A.map((V) => /* @__PURE__ */ f(
9161
+ cr.div,
9154
9162
  {
9155
9163
  "data-testid": `offer-card-list-item-${V.id}`,
9156
9164
  className: y.cardWrapper,
@@ -9165,17 +9173,17 @@ const Xd = {
9165
9173
  ) : /* @__PURE__ */ f("div", { "data-testid": "offer-card-list", className: D, children: A.map(O) });
9166
9174
  };
9167
9175
  tf.displayName = "OfferCardList";
9168
- var tn = (t) => t.type === "checkbox", ht = (t) => t instanceof Date, Se = (t) => t == null;
9176
+ var en = (t) => t.type === "checkbox", ht = (t) => t instanceof Date, Se = (t) => t == null;
9169
9177
  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) => {
9178
+ var se = (t) => !Se(t) && !Array.isArray(t) && Ho(t) && !ht(t), Uo = (t) => se(t) && t.target ? en(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) => {
9171
9179
  const e = t.constructor && t.constructor.prototype;
9172
9180
  return se(e) && e.hasOwnProperty("isPrototypeOf");
9173
- }, Qr = typeof window < "u" && typeof window.HTMLElement < "u" && typeof document < "u";
9181
+ }, Zr = typeof window < "u" && typeof window.HTMLElement < "u" && typeof document < "u";
9174
9182
  function ne(t) {
9175
9183
  if (t instanceof Date)
9176
9184
  return new Date(t);
9177
9185
  const e = typeof FileList < "u" && t instanceof FileList;
9178
- if (Qr && (t instanceof Blob || e))
9186
+ if (Zr && (t instanceof Blob || e))
9179
9187
  return t;
9180
9188
  const n = Array.isArray(t);
9181
9189
  if (!n && !(se(t) && rf(t)))
@@ -9185,14 +9193,14 @@ function ne(t) {
9185
9193
  Object.prototype.hasOwnProperty.call(t, i) && (r[i] = ne(t[i]));
9186
9194
  return r;
9187
9195
  }
9188
- var Rn = (t) => /^\w*$/.test(t), Y = (t) => t === void 0, Xr = (t) => Array.isArray(t) ? t.filter(Boolean) : [], Yr = (t) => Xr(t.replace(/["|']|\]/g, "").split(/\.|\[/)), N = (t, e, n) => {
9196
+ var Fn = (t) => /^\w*$/.test(t), Y = (t) => t === void 0, Qr = (t) => Array.isArray(t) ? t.filter(Boolean) : [], Xr = (t) => Qr(t.replace(/["|']|\]/g, "").split(/\.|\[/)), N = (t, e, n) => {
9189
9197
  if (!e || !se(t))
9190
9198
  return n;
9191
- const r = (Rn(e) ? [e] : Yr(e)).reduce((i, s) => Se(i) ? i : i[s], t);
9199
+ const r = (Fn(e) ? [e] : Xr(e)).reduce((i, s) => Se(i) ? i : i[s], t);
9192
9200
  return Y(r) || r === t ? Y(t[e]) ? n : t[e] : r;
9193
9201
  }, we = (t) => typeof t == "boolean", xe = (t) => typeof t == "function", X = (t, e, n) => {
9194
9202
  let r = -1;
9195
- const i = Rn(e) ? [e] : Yr(e), s = i.length, o = s - 1;
9203
+ const i = Fn(e) ? [e] : Xr(e), s = i.length, o = s - 1;
9196
9204
  for (; ++r < s; ) {
9197
9205
  const l = i[r];
9198
9206
  let a = n;
@@ -9205,7 +9213,7 @@ var Rn = (t) => /^\w*$/.test(t), Y = (t) => t === void 0, Xr = (t) => Array.isAr
9205
9213
  t[l] = a, t = t[l];
9206
9214
  }
9207
9215
  };
9208
- const wn = {
9216
+ const Sn = {
9209
9217
  BLUR: "blur",
9210
9218
  FOCUS_OUT: "focusout",
9211
9219
  CHANGE: "change"
@@ -9225,7 +9233,7 @@ const wn = {
9225
9233
  validate: "validate"
9226
9234
  }, Ko = R.createContext(null);
9227
9235
  Ko.displayName = "HookFormControlContext";
9228
- const ei = () => R.useContext(Ko);
9236
+ const Yr = () => R.useContext(Ko);
9229
9237
  var Jo = (t, e, n, r = !0) => {
9230
9238
  const i = {
9231
9239
  defaultValues: e._defaultValues
@@ -9239,9 +9247,9 @@ var Jo = (t, e, n, r = !0) => {
9239
9247
  });
9240
9248
  return i;
9241
9249
  };
9242
- const ti = typeof window < "u" ? R.useLayoutEffect : R.useEffect;
9250
+ const ei = typeof window < "u" ? R.useLayoutEffect : R.useEffect;
9243
9251
  function sf(t) {
9244
- const e = ei(), { control: n = e, disabled: r, name: i, exact: s } = t || {}, [o, l] = R.useState(n._formState), a = R.useRef({
9252
+ const e = Yr(), { control: n = e, disabled: r, name: i, exact: s } = t || {}, [o, l] = R.useState(n._formState), a = R.useRef({
9245
9253
  isDirty: !1,
9246
9254
  isLoading: !1,
9247
9255
  dirtyFields: !1,
@@ -9251,7 +9259,7 @@ function sf(t) {
9251
9259
  isValid: !1,
9252
9260
  errors: !1
9253
9261
  });
9254
- return ti(() => n._subscribe({
9262
+ return ei(() => n._subscribe({
9255
9263
  name: i,
9256
9264
  formState: a.current,
9257
9265
  exact: s,
@@ -9265,9 +9273,9 @@ function sf(t) {
9265
9273
  a.current.isValid && n._setValid(!0);
9266
9274
  }, [n]), R.useMemo(() => Jo(o, n, a.current, !1), [o, n]);
9267
9275
  }
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);
9276
+ var Ne = (t) => typeof t == "string", Tr = (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), Mr = (t) => Se(t) || !Ho(t);
9269
9277
  function Fe(t, e, n = /* @__PURE__ */ new WeakSet()) {
9270
- if (Or(t) || Or(e))
9278
+ if (Mr(t) || Mr(e))
9271
9279
  return Object.is(t, e);
9272
9280
  if (ht(t) && ht(e))
9273
9281
  return Object.is(t.getTime(), e.getTime());
@@ -9290,17 +9298,17 @@ function Fe(t, e, n = /* @__PURE__ */ new WeakSet()) {
9290
9298
  return !0;
9291
9299
  }
9292
9300
  function of(t) {
9293
- const e = ei(), { control: n = e, name: r, defaultValue: i, disabled: s, exact: o, compute: l } = t || {}, a = R.useRef(i), c = R.useRef(l), u = R.useRef(void 0), d = R.useRef(n), p = R.useRef(r);
9301
+ const e = Yr(), { control: n = e, name: r, defaultValue: i, disabled: s, exact: o, compute: l } = t || {}, a = R.useRef(i), c = R.useRef(l), u = R.useRef(void 0), d = R.useRef(n), p = R.useRef(r);
9294
9302
  c.current = l;
9295
9303
  const [m, x] = R.useState(() => {
9296
9304
  const A = n._getWatch(r, a.current);
9297
9305
  return c.current ? c.current(A) : A;
9298
9306
  }), y = R.useCallback((A) => {
9299
- const M = Mr(r, n._names, A || n._formValues, !1, a.current);
9307
+ const M = Tr(r, n._names, A || n._formValues, !1, a.current);
9300
9308
  return c.current ? c.current(M) : M;
9301
9309
  }, [n._formValues, n._names, r]), k = R.useCallback((A) => {
9302
9310
  if (!s) {
9303
- const M = Mr(r, n._names, A || n._formValues, !1, a.current);
9311
+ const M = Tr(r, n._names, A || n._formValues, !1, a.current);
9304
9312
  if (c.current) {
9305
9313
  const D = c.current(M);
9306
9314
  Fe(D, u.current) || (x(D), u.current = D);
@@ -9308,7 +9316,7 @@ function of(t) {
9308
9316
  x(M);
9309
9317
  }
9310
9318
  }, [n._formValues, n._names, s, r]);
9311
- ti(() => ((d.current !== n || !Fe(p.current, r)) && (d.current = n, p.current = r, k()), n._subscribe({
9319
+ ei(() => ((d.current !== n || !Fe(p.current, r)) && (d.current = n, p.current = r, k()), n._subscribe({
9312
9320
  name: r,
9313
9321
  formState: {
9314
9322
  values: !0
@@ -9327,7 +9335,7 @@ function of(t) {
9327
9335
  return I !== null ? I : m;
9328
9336
  }
9329
9337
  function lf(t) {
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({
9338
+ const e = Yr(), { 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({
9331
9339
  control: i,
9332
9340
  name: n,
9333
9341
  defaultValue: c,
@@ -9368,13 +9376,13 @@ function lf(t) {
9368
9376
  value: Uo(A),
9369
9377
  name: n
9370
9378
  },
9371
- type: wn.CHANGE
9379
+ type: Sn.CHANGE
9372
9380
  }), [n]), v = R.useCallback(() => x.current.onBlur({
9373
9381
  target: {
9374
9382
  value: N(i._formValues, n),
9375
9383
  name: n
9376
9384
  },
9377
- type: wn.BLUR
9385
+ type: Sn.BLUR
9378
9386
  }), [n, i._formValues]), S = R.useCallback((A) => {
9379
9387
  const M = N(i._fields, n);
9380
9388
  M && M._f && A && (M._f.ref = {
@@ -9427,7 +9435,7 @@ var cf = (t, e, n, r, i) => e ? {
9427
9435
  ...n[t] && n[t].types ? n[t].types : {},
9428
9436
  [r]: i || !0
9429
9437
  }
9430
- } : {}, zt = (t) => Array.isArray(t) ? t : [t], cs = () => {
9438
+ } : {}, Bt = (t) => Array.isArray(t) ? t : [t], cs = () => {
9431
9439
  let t = [];
9432
9440
  return {
9433
9441
  get observers() {
@@ -9459,12 +9467,12 @@ function Wo(t, e) {
9459
9467
  }
9460
9468
  return n;
9461
9469
  }
9462
- var ye = (t) => se(t) && !Object.keys(t).length, ni = (t) => t.type === "file", An = (t) => {
9463
- if (!Qr)
9470
+ var ye = (t) => se(t) && !Object.keys(t).length, ti = (t) => t.type === "file", wn = (t) => {
9471
+ if (!Zr)
9464
9472
  return !1;
9465
9473
  const e = t ? t.ownerDocument : 0;
9466
9474
  return t instanceof (e && e.defaultView ? e.defaultView.HTMLElement : HTMLElement);
9467
- }, jo = (t) => t.type === "select-multiple", ri = (t) => t.type === "radio", uf = (t) => ri(t) || tn(t), sr = (t) => An(t) && t.isConnected;
9475
+ }, jo = (t) => t.type === "select-multiple", ni = (t) => t.type === "radio", uf = (t) => ni(t) || en(t), ir = (t) => wn(t) && t.isConnected;
9468
9476
  function df(t, e) {
9469
9477
  const n = e.slice(0, -1).length;
9470
9478
  let r = 0;
@@ -9479,7 +9487,7 @@ function ff(t) {
9479
9487
  return !0;
9480
9488
  }
9481
9489
  function re(t, e) {
9482
- const n = Array.isArray(e) ? e : Rn(e) ? [e] : Yr(e), r = n.length === 1 ? t : df(t, n), i = n.length - 1, s = n[i];
9490
+ const n = Array.isArray(e) ? e : Fn(e) ? [e] : Xr(e), r = n.length === 1 ? t : df(t, n), i = n.length - 1, s = n[i];
9483
9491
  return r && delete r[s], i !== 0 && (se(r) && ye(r) || Array.isArray(r) && ff(r)) && re(t, n.slice(0, -1)), t;
9484
9492
  }
9485
9493
  var hf = (t) => {
@@ -9491,19 +9499,19 @@ var hf = (t) => {
9491
9499
  function Go(t) {
9492
9500
  return Array.isArray(t) || se(t) && !hf(t);
9493
9501
  }
9494
- function Ir(t, e = {}) {
9502
+ function Or(t, e = {}) {
9495
9503
  for (const n in t) {
9496
9504
  const r = t[n];
9497
- Go(r) ? (e[n] = Array.isArray(r) ? [] : {}, Ir(r, e[n])) : Y(r) || (e[n] = !0);
9505
+ Go(r) ? (e[n] = Array.isArray(r) ? [] : {}, Or(r, e[n])) : Y(r) || (e[n] = !0);
9498
9506
  }
9499
9507
  return e;
9500
9508
  }
9501
9509
  function wt(t, e, n) {
9502
- n || (n = Ir(e));
9510
+ n || (n = Or(e));
9503
9511
  for (const r in t) {
9504
9512
  const i = t[r];
9505
9513
  if (Go(i))
9506
- Y(e) || Or(n[r]) ? n[r] = Ir(i, Array.isArray(i) ? [] : {}) : wt(i, Se(e) ? {} : e[r], n[r]);
9514
+ Y(e) || Mr(n[r]) ? n[r] = Or(i, Array.isArray(i) ? [] : {}) : wt(i, Se(e) ? {} : e[r], n[r]);
9507
9515
  else {
9508
9516
  const s = e[r];
9509
9517
  n[r] = !Fe(i, s);
@@ -9538,7 +9546,7 @@ var Xo = (t) => Array.isArray(t) ? t.reduce((e, n) => n && n.checked && !n.disab
9538
9546
  } : e, fs) : fs;
9539
9547
  function hs(t) {
9540
9548
  const e = t.ref;
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);
9549
+ return ti(e) ? e.files : ni(e) ? Xo(t.refs).value : jo(e) ? [...e.selectedOptions].map(({ value: n }) => n) : en(e) ? Zo(t.refs).value : Qo(Y(e.value) ? t.ref.value : e.value, t);
9542
9550
  }
9543
9551
  var pf = (t, e, n, r) => {
9544
9552
  const i = {};
@@ -9552,7 +9560,7 @@ var pf = (t, e, n, r) => {
9552
9560
  fields: i,
9553
9561
  shouldUseNativeValidation: r
9554
9562
  };
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) => ({
9563
+ }, An = (t) => t instanceof RegExp, Rt = (t) => Y(t) ? t : An(t) ? t.source : se(t) ? An(t.value) ? t.value.source : t.value : t, ps = (t) => ({
9556
9564
  isOnSubmit: !t || t === Le.onSubmit,
9557
9565
  isOnBlur: t === Le.onBlur,
9558
9566
  isOnChange: t === Le.onChange,
@@ -9561,7 +9569,7 @@ var pf = (t, e, n, r) => {
9561
9569
  });
9562
9570
  const ms = "AsyncFunction";
9563
9571
  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))));
9564
- const Ht = (t, e, n, r) => {
9572
+ const zt = (t, e, n, r) => {
9565
9573
  for (const i of n || Object.keys(t)) {
9566
9574
  const s = N(t, i);
9567
9575
  if (s) {
@@ -9571,16 +9579,16 @@ const Ht = (t, e, n, r) => {
9571
9579
  return !0;
9572
9580
  if (o.ref && e(o.ref, o.name) && !r)
9573
9581
  return !0;
9574
- if (Ht(l, e))
9582
+ if (zt(l, e))
9575
9583
  break;
9576
- } else if (se(l) && Ht(l, e))
9584
+ } else if (se(l) && zt(l, e))
9577
9585
  break;
9578
9586
  }
9579
9587
  }
9580
9588
  };
9581
9589
  function ys(t, e, n) {
9582
9590
  const r = N(t, n);
9583
- if (r || Rn(n))
9591
+ if (r || Fn(n))
9584
9592
  return {
9585
9593
  error: r,
9586
9594
  name: n
@@ -9610,8 +9618,8 @@ var yf = (t, e, n, r) => {
9610
9618
  n(t);
9611
9619
  const { name: i, ...s } = t;
9612
9620
  return ye(s) || Object.keys(s).length >= Object.keys(e).length || Object.keys(s).find((o) => e[o] === (!r || Le.all));
9613
- }, bf = (t, e, n) => !t || !e || t === e || zt(t).some((r) => r && (n ? r === e : r.startsWith(e) || e.startsWith(r))), xf = (t, e, n, r, i) => i.isOnAll ? !1 : !n && i.isOnTouch ? !(e || t) : (n ? r.isOnBlur : i.isOnBlur) ? !t : (n ? r.isOnChange : i.isOnChange) ? t : !0, kf = (t, e) => !Xr(N(t, e)).length && re(t, e), vf = (t, e, n) => {
9614
- const r = zt(N(t, n));
9621
+ }, bf = (t, e, n) => !t || !e || t === e || Bt(t).some((r) => r && (n ? r === e : r.startsWith(e) || e.startsWith(r))), xf = (t, e, n, r, i) => i.isOnAll ? !1 : !n && i.isOnTouch ? !(e || t) : (n ? r.isOnBlur : i.isOnBlur) ? !t : (n ? r.isOnChange : i.isOnChange) ? t : !0, kf = (t, e) => !Qr(N(t, e)).length && re(t, e), vf = (t, e, n) => {
9622
+ const r = Bt(N(t, n));
9615
9623
  return X(r, "root", e[n]), X(t, n, r), t;
9616
9624
  };
9617
9625
  function bs(t, e, n = "validate") {
@@ -9622,7 +9630,7 @@ function bs(t, e, n = "validate") {
9622
9630
  ref: e
9623
9631
  };
9624
9632
  }
9625
- var vt = (t) => se(t) && !Nn(t) ? t : {
9633
+ var vt = (t) => se(t) && !An(t) ? t : {
9626
9634
  value: t,
9627
9635
  message: ""
9628
9636
  }, xs = async (t, e, n, r, i, s) => {
@@ -9631,7 +9639,7 @@ var vt = (t) => se(t) && !Nn(t) ? t : {
9631
9639
  return {};
9632
9640
  const I = l ? l[0] : o, A = (P) => {
9633
9641
  i && I.reportValidity && (I.setCustomValidity(we(P) ? "" : P || ""), I.reportValidity());
9634
- }, M = {}, D = ri(o), O = tn(o), V = D || O, $ = (k || ni(o)) && Y(o.value) && Y(S) || An(o) && o.value === "" || S === "" || Array.isArray(S) && !S.length, q = cf.bind(null, y, r, M), Te = (P, _, J, B = qe.maxLength, Q = qe.minLength) => {
9642
+ }, M = {}, D = ni(o), O = en(o), V = D || O, $ = (k || ti(o)) && Y(o.value) && Y(S) || wn(o) && o.value === "" || S === "" || Array.isArray(S) && !S.length, q = cf.bind(null, y, r, M), Te = (P, _, J, B = qe.maxLength, Q = qe.minLength) => {
9635
9643
  const K = P ? _ : J;
9636
9644
  M[y] = {
9637
9645
  type: P ? B : Q,
@@ -9670,7 +9678,7 @@ var vt = (t) => se(t) && !Nn(t) ? t : {
9670
9678
  }
9671
9679
  if (m && !$ && Ne(S)) {
9672
9680
  const { value: P, message: _ } = vt(m);
9673
- if (Nn(P) && !S.match(P) && (M[y] = {
9681
+ if (An(P) && !S.match(P) && (M[y] = {
9674
9682
  type: qe.pattern,
9675
9683
  message: _,
9676
9684
  ref: o,
@@ -9877,19 +9885,19 @@ function Sf(t = {}) {
9877
9885
  }, Te = () => {
9878
9886
  for (const h of l.unMount) {
9879
9887
  const g = N(r, h);
9880
- g && (g._f.refs ? g._f.refs.every((b) => !sr(b)) : !sr(g._f.ref)) && Vn(h);
9888
+ g && (g._f.refs ? g._f.refs.every((b) => !ir(b)) : !ir(g._f.ref)) && Pn(h);
9881
9889
  }
9882
9890
  l.unMount = /* @__PURE__ */ new Set();
9883
- }, P = (h, g) => !e.disabled && (h && g && X(s, h, g), !Fe(xt(), i)), _ = (h, g, b) => Mr(h, l, {
9891
+ }, P = (h, g) => !e.disabled && (h && g && X(s, h, g), !Fe(xt(), i)), _ = (h, g, b) => Tr(h, l, {
9884
9892
  ...o.mount ? s : Y(g) ? i : Ne(h) ? { [h]: g } : g
9885
- }, b, g), J = (h) => Xr(N(o.mount ? s : i, h, e.shouldUnregister ? N(i, h, []) : [])), B = (h, g, b = {}) => {
9893
+ }, b, g), J = (h) => Qr(N(o.mount ? s : i, h, e.shouldUnregister ? N(i, h, []) : [])), B = (h, g, b = {}) => {
9886
9894
  const E = N(r, h);
9887
9895
  let w = g;
9888
9896
  if (E) {
9889
9897
  const C = E._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) => {
9898
+ C && (!C.disabled && X(s, h, Qo(g, C)), w = wn(C.ref) && Se(g) ? "" : g, jo(C.ref) ? [...C.ref.options].forEach((F) => F.selected = w.includes(F.value)) : C.refs ? en(C.ref) ? C.refs.forEach((F) => {
9891
9899
  (!F.defaultChecked || !F.disabled) && (Array.isArray(w) ? F.checked = !!w.find((W) => W === F.value) : F.checked = w === F.value || !!w);
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({
9900
+ }) : C.refs.forEach((F) => F.checked = F.value === w) : ti(C.ref) ? C.ref.value = "" : (C.ref.value = w, C.ref.type || m.state.next({
9893
9901
  name: h,
9894
9902
  values: ne(s)
9895
9903
  })));
@@ -9928,31 +9936,31 @@ function Sf(t = {}) {
9928
9936
  }, F = ps(e.mode), W = ps(e.reValidateMode);
9929
9937
  if (w) {
9930
9938
  let j, 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);
9939
+ const ot = g.type ? hs(w._f) : Uo(h), Ge = h.type === Sn.BLUR || h.type === Sn.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), _n = gs(b, l, Ge);
9932
9940
  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);
9933
- const zn = D(b, ot, Ge), sl = !ye(zn) || Bn;
9941
+ const Bn = D(b, ot, Ge), sl = !ye(Bn) || _n;
9934
9942
  if (!Ge && m.state.next({
9935
9943
  name: b,
9936
9944
  type: h.type,
9937
9945
  values: ne(s)
9938
9946
  }), il)
9939
- return (d.isValid || p.isValid) && (e.mode === "onBlur" ? Ge && k() : Ge || k()), sl && m.state.next({ name: b, ...Bn ? {} : zn });
9940
- if (!Ge && Bn && m.state.next({ ...n }), e.resolver) {
9941
- const { errors: ci } = await V([b]);
9947
+ return (d.isValid || p.isValid) && (e.mode === "onBlur" ? Ge && k() : Ge || k()), sl && m.state.next({ name: b, ..._n ? {} : Bn });
9948
+ if (!Ge && _n && m.state.next({ ...n }), e.resolver) {
9949
+ const { errors: ai } = await V([b]);
9942
9950
  if (v([b]), C(ot), E) {
9943
- const ol = ys(n.errors, r, b), ui = ys(ci, r, ol.name || b);
9944
- j = ui.error, b = ui.name, ge = ye(ci);
9951
+ const ol = ys(n.errors, r, b), ci = ys(ai, r, ol.name || b);
9952
+ j = ci.error, b = ci.name, ge = ye(ai);
9945
9953
  }
9946
9954
  } else
9947
9955
  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)));
9948
- E && (w._f.deps && (!Array.isArray(w._f.deps) || w._f.deps.length > 0) && me(w._f.deps), O(b, ge, j, zn));
9956
+ E && (w._f.deps && (!Array.isArray(w._f.deps) || w._f.deps.length > 0) && me(w._f.deps), O(b, ge, j, Bn));
9949
9957
  }
9950
9958
  }, oe = (h, g) => {
9951
9959
  if (N(n.errors, g) && h.focus)
9952
9960
  return h.focus(), 1;
9953
9961
  }, me = async (h, g = {}) => {
9954
9962
  let b, E;
9955
- const w = zt(h);
9963
+ const w = Bt(h);
9956
9964
  if (e.resolver) {
9957
9965
  const C = await $(Y(h) ? h : w);
9958
9966
  b = ye(C), E = h ? !w.some((F) => N(C, F)) : b;
@@ -9964,7 +9972,7 @@ function Sf(t = {}) {
9964
9972
  ...!Ne(h) || (d.isValid || p.isValid) && b !== n.isValid ? {} : { name: h },
9965
9973
  ...e.resolver || !h ? { isValid: b } : {},
9966
9974
  errors: n.errors
9967
- }), g.shouldFocus && !E && Ht(r, oe, h ? w : l.mount), E;
9975
+ }), g.shouldFocus && !E && zt(r, oe, h ? w : l.mount), E;
9968
9976
  }, xt = (h, g) => {
9969
9977
  let b = {
9970
9978
  ...o.mount ? s : i
@@ -9977,7 +9985,7 @@ function Sf(t = {}) {
9977
9985
  isValidating: !!N(n.validatingFields, h),
9978
9986
  isTouched: !!N((g || n).touchedFields, h)
9979
9987
  }), st = (h) => {
9980
- h && zt(h).forEach((g) => re(n.errors, g)), m.state.next({
9988
+ h && Bt(h).forEach((g) => re(n.errors, g)), m.state.next({
9981
9989
  errors: h ? n.errors : {}
9982
9990
  });
9983
9991
  }, te = (h, g, b) => {
@@ -10002,7 +10010,7 @@ function Sf(t = {}) {
10002
10010
  defaultValues: i
10003
10011
  });
10004
10012
  }
10005
- }).unsubscribe, Pn = (h) => (o.mount = !0, p = {
10013
+ }).unsubscribe, Rn = (h) => (o.mount = !0, p = {
10006
10014
  ...p,
10007
10015
  ...h.formState
10008
10016
  }, It({
@@ -10011,8 +10019,8 @@ function Sf(t = {}) {
10011
10019
  ...u,
10012
10020
  ...h.formState
10013
10021
  }
10014
- })), Vn = (h, g = {}) => {
10015
- for (const b of h ? zt(h) : l.mount)
10022
+ })), Pn = (h, g = {}) => {
10023
+ for (const b of h ? Bt(h) : l.mount)
10016
10024
  l.mount.delete(b), l.array.delete(b), g.keepValue || (re(r, b), re(s, b)), !g.keepError && re(n.errors, b), !g.keepDirty && re(n.dirtyFields, b), !g.keepTouched && re(n.touchedFields, b), !g.keepIsValidating && re(n.validatingFields, b), !e.shouldUnregister && !g.keepDefaultValue && re(i, b);
10017
10025
  m.state.next({
10018
10026
  values: ne(s)
@@ -10020,12 +10028,12 @@ function Sf(t = {}) {
10020
10028
  ...n,
10021
10029
  ...g.keepDirty ? { isDirty: P() } : {}
10022
10030
  }), !g.keepIsValid && k();
10023
- }, ii = ({ disabled: h, name: g }) => {
10031
+ }, ri = ({ disabled: h, name: g }) => {
10024
10032
  if (we(h) && o.mount || h || l.disabled.has(g)) {
10025
10033
  const w = l.disabled.has(g) !== !!h;
10026
10034
  h ? l.disabled.add(g) : l.disabled.delete(g), w && o.mount && !o.action && k();
10027
10035
  }
10028
- }, $n = (h, g = {}) => {
10036
+ }, Vn = (h, g = {}) => {
10029
10037
  let b = N(r, h);
10030
10038
  const E = we(g.disabled) || we(e.disabled);
10031
10039
  return X(r, h, {
@@ -10036,7 +10044,7 @@ function Sf(t = {}) {
10036
10044
  mount: !0,
10037
10045
  ...g
10038
10046
  }
10039
- }), l.mount.add(h), b ? ii({
10047
+ }), l.mount.add(h), b ? ri({
10040
10048
  disabled: we(g.disabled) ? g.disabled : e.disabled,
10041
10049
  name: h
10042
10050
  }) : M(h, !0, g.value), {
@@ -10054,7 +10062,7 @@ function Sf(t = {}) {
10054
10062
  onBlur: Ce,
10055
10063
  ref: (w) => {
10056
10064
  if (w) {
10057
- $n(h, g), b = N(r, h);
10065
+ Vn(h, g), b = N(r, h);
10058
10066
  const C = Y(w.value) && w.querySelectorAll && w.querySelectorAll("input,select,textarea")[0] || w, F = uf(C), W = b._f.refs || [];
10059
10067
  if (F ? W.find((j) => j === C) : C === b._f.ref)
10060
10068
  return;
@@ -10063,7 +10071,7 @@ function Sf(t = {}) {
10063
10071
  ...b._f,
10064
10072
  ...F ? {
10065
10073
  refs: [
10066
- ...W.filter(sr),
10074
+ ...W.filter(ir),
10067
10075
  C,
10068
10076
  ...Array.isArray(N(i, h)) ? [{}] : []
10069
10077
  ],
@@ -10075,14 +10083,14 @@ function Sf(t = {}) {
10075
10083
  b = N(r, h, {}), b._f && (b._f.mount = !1), (e.shouldUnregister || g.shouldUnregister) && !(qo(l.array, h) && o.action) && l.unMount.add(h);
10076
10084
  }
10077
10085
  };
10078
- }, _n = () => e.shouldFocusError && Ht(r, oe, l.mount), el = (h) => {
10079
- we(h) && (m.state.next({ disabled: h }), Ht(r, (g, b) => {
10086
+ }, $n = () => e.shouldFocusError && zt(r, oe, l.mount), el = (h) => {
10087
+ we(h) && (m.state.next({ disabled: h }), zt(r, (g, b) => {
10080
10088
  const E = N(r, b);
10081
10089
  E && (g.disabled = E._f.disabled || h, Array.isArray(E._f.refs) && E._f.refs.forEach((w) => {
10082
10090
  w.disabled = E._f.disabled || h;
10083
10091
  }));
10084
10092
  }, 0, !1));
10085
- }, si = (h, g) => async (b) => {
10093
+ }, ii = (h, g) => async (b) => {
10086
10094
  let E;
10087
10095
  b && (b.preventDefault && b.preventDefault(), b.persist && b.persist());
10088
10096
  let w = ne(s);
@@ -10106,7 +10114,7 @@ function Sf(t = {}) {
10106
10114
  E = C;
10107
10115
  }
10108
10116
  } else
10109
- g && await g({ ...n.errors }, b), _n(), setTimeout(_n);
10117
+ g && await g({ ...n.errors }, b), $n(), setTimeout($n);
10110
10118
  if (m.state.next({
10111
10119
  isSubmitted: !0,
10112
10120
  isSubmitting: !1,
@@ -10117,7 +10125,7 @@ function Sf(t = {}) {
10117
10125
  throw E;
10118
10126
  }, tl = (h, g = {}) => {
10119
10127
  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 }));
10120
- }, oi = (h, g = {}) => {
10128
+ }, si = (h, g = {}) => {
10121
10129
  const b = h ? ne(h) : i, E = ne(b), w = ye(h), C = w ? i : E;
10122
10130
  if (g.keepDefaultValues || (i = b), !g.keepValues) {
10123
10131
  if (g.keepDirtyValues) {
@@ -10130,12 +10138,12 @@ function Sf(t = {}) {
10130
10138
  j && !Y(ge) ? X(C, W, ge) : !j && !Y(ot) && K(W, ot);
10131
10139
  }
10132
10140
  } else {
10133
- if (Qr && Y(h))
10141
+ if (Zr && Y(h))
10134
10142
  for (const F of l.mount) {
10135
10143
  const W = N(r, F);
10136
10144
  if (W && W._f) {
10137
10145
  const j = Array.isArray(W._f.refs) ? W._f.refs[0] : W._f.ref;
10138
- if (An(j)) {
10146
+ if (wn(j)) {
10139
10147
  const ge = j.closest("form");
10140
10148
  if (ge) {
10141
10149
  ge.reset();
@@ -10175,7 +10183,7 @@ function Sf(t = {}) {
10175
10183
  isSubmitting: !1,
10176
10184
  defaultValues: i
10177
10185
  });
10178
- }, li = (h, g) => oi(xe(h) ? h(s) : h, { ...e.resetOptions, ...g }), nl = (h, g = {}) => {
10186
+ }, oi = (h, g) => si(xe(h) ? h(s) : h, { ...e.resetOptions, ...g }), nl = (h, g = {}) => {
10179
10187
  const b = N(r, h), E = b && b._f;
10180
10188
  if (E) {
10181
10189
  const w = E.refs ? E.refs[0] : E.ref;
@@ -10188,27 +10196,27 @@ function Sf(t = {}) {
10188
10196
  ...n,
10189
10197
  ...h
10190
10198
  };
10191
- }, ai = {
10199
+ }, li = {
10192
10200
  control: {
10193
- register: $n,
10194
- unregister: Vn,
10201
+ register: Vn,
10202
+ unregister: Pn,
10195
10203
  getFieldState: it,
10196
- handleSubmit: si,
10204
+ handleSubmit: ii,
10197
10205
  setError: te,
10198
10206
  _subscribe: It,
10199
10207
  _runSchema: V,
10200
10208
  _updateIsValidating: v,
10201
- _focusError: _n,
10209
+ _focusError: $n,
10202
10210
  _getWatch: _,
10203
10211
  _getDirty: P,
10204
10212
  _setValid: k,
10205
10213
  _setFieldArray: S,
10206
- _setDisabledField: ii,
10214
+ _setDisabledField: ri,
10207
10215
  _setErrors: A,
10208
10216
  _getFieldArray: J,
10209
- _reset: oi,
10217
+ _reset: si,
10210
10218
  _resetDefaultValues: () => xe(e.defaultValues) && e.defaultValues().then((h) => {
10211
- li(h, e.resetOptions), m.state.next({
10219
+ oi(h, e.resetOptions), m.state.next({
10212
10220
  isLoading: !1
10213
10221
  });
10214
10222
  }),
@@ -10250,24 +10258,24 @@ function Sf(t = {}) {
10250
10258
  };
10251
10259
  }
10252
10260
  },
10253
- subscribe: Pn,
10261
+ subscribe: Rn,
10254
10262
  trigger: me,
10255
- register: $n,
10256
- handleSubmit: si,
10263
+ register: Vn,
10264
+ handleSubmit: ii,
10257
10265
  watch: Ue,
10258
10266
  setValue: K,
10259
10267
  getValues: xt,
10260
- reset: li,
10268
+ reset: oi,
10261
10269
  resetField: tl,
10262
10270
  clearErrors: st,
10263
- unregister: Vn,
10271
+ unregister: Pn,
10264
10272
  setError: te,
10265
10273
  setFocus: nl,
10266
10274
  getFieldState: it
10267
10275
  };
10268
10276
  return {
10269
- ...ai,
10270
- formControl: ai
10277
+ ...li,
10278
+ formControl: li
10271
10279
  };
10272
10280
  }
10273
10281
  function wf(t = {}) {
@@ -10302,7 +10310,7 @@ function wf(t = {}) {
10302
10310
  };
10303
10311
  }
10304
10312
  const s = e.current.control;
10305
- return s._options = t, ti(() => {
10313
+ return s._options = t, ei(() => {
10306
10314
  const o = s._subscribe({
10307
10315
  formState: s._proxyFormState,
10308
10316
  callback: () => i({ ...s._formState }),
@@ -10395,7 +10403,7 @@ const Af = {
10395
10403
  taxDeductibleTooltip: "Check if this distribution is tax deductible",
10396
10404
  deleteButton: "Delete",
10397
10405
  currencySymbol: "$"
10398
- }, or = () => ({
10406
+ }, sr = () => ({
10399
10407
  id: Yo(),
10400
10408
  amount: 0,
10401
10409
  glAccount: null,
@@ -10423,14 +10431,14 @@ const Af = {
10423
10431
  rules: S
10424
10432
  }) => {
10425
10433
  const I = { ...Af, ...m }, A = k !== void 0 && v !== void 0, M = wf({
10426
- defaultValues: { _internal: e || or() }
10434
+ defaultValues: { _internal: e || sr() }
10427
10435
  }), D = lf({
10428
10436
  control: A ? k : M.control,
10429
10437
  name: A ? v : "_internal",
10430
10438
  rules: A ? S : void 0
10431
10439
  }), [O, V] = he(
10432
- e || or()
10433
- ), $ = A ? D.field.value ?? or() : t ?? O, q = A && !!D.fieldState?.error, Te = A && (D.fieldState?.isTouched ?? !1), P = q || Te, _ = P && (!$.amount || $.amount <= 0), J = P && !$.glAccount, [B, Q] = he($.glAccount?.name || ""), K = le(
10440
+ e || sr()
10441
+ ), $ = A ? D.field.value ?? sr() : t ?? O, q = A && !!D.fieldState?.error, Te = A && (D.fieldState?.isTouched ?? !1), P = q || Te, _ = P && (!$.amount || $.amount <= 0), J = P && !$.glAccount, [B, Q] = he($.glAccount?.name || ""), K = le(
10434
10442
  (te) => {
10435
10443
  const Ue = { ...$, ...te };
10436
10444
  A && D.field.onChange(Ue), !A && t === void 0 && V(Ue), s?.(Ue);
@@ -10453,7 +10461,7 @@ const Af = {
10453
10461
  K({ glAccount: null }), l?.(null);
10454
10462
  return;
10455
10463
  }
10456
- const It = n.find((Pn) => String(Pn.id) === String(te)) || null;
10464
+ const It = n.find((Rn) => String(Rn.id) === String(te)) || null;
10457
10465
  K({ glAccount: It }), l?.(It);
10458
10466
  },
10459
10467
  [n, K, l]
@@ -10614,7 +10622,7 @@ const Tf = {
10614
10622
  classNames: i = {}
10615
10623
  }) => {
10616
10624
  const s = { ...Tf, ...e }, o = /* @__PURE__ */ f(
10617
- En,
10625
+ Nn,
10618
10626
  {
10619
10627
  "data-testid": "revenue-distribution-error-alert",
10620
10628
  color: r,