tiptop-editor 2.3.5 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/dist/App.d.ts +1 -1
  2. package/dist/components/comment/CommentButton.d.ts +1 -1
  3. package/dist/components/comment/CommentSelectionMenu.d.ts +1 -1
  4. package/dist/components/comment/CommentsContext.d.ts +1 -1
  5. package/dist/components/editor/DragHandleColorList.d.ts +2 -1
  6. package/dist/components/editor/TableSelectionMenu.d.ts +1 -1
  7. package/dist/components/editor/TiptopDragHandle.d.ts +1 -1
  8. package/dist/components/editor/TransformIntoIcon.d.ts +1 -1
  9. package/dist/components/menus/ColorButton.d.ts +1 -1
  10. package/dist/components/menus/ColorButtonMenu.d.ts +1 -1
  11. package/dist/components/menus/LinkButtonMenu.d.ts +1 -1
  12. package/dist/components/menus/LinkPreviewMenu.d.ts +1 -1
  13. package/dist/components/menus/MoreOptionsButtonMenu.d.ts +1 -1
  14. package/dist/components/menus/TableButtonMenu.d.ts +1 -1
  15. package/dist/components/menus/TextSelectionMenu.d.ts +1 -1
  16. package/dist/components/menus/TransformIntoButtonMenu.d.ts +1 -1
  17. package/dist/components/ui/CloseIcon.d.ts +1 -1
  18. package/dist/components/ui/ColorIcon.d.ts +1 -1
  19. package/dist/components/ui/EditorButton.d.ts +1 -1
  20. package/dist/components/ui/Icon.d.ts +1 -1
  21. package/dist/extensions/image/ImageUploaderView.d.ts +2 -1
  22. package/dist/tiptop-editor.css +1 -1
  23. package/dist/tiptop-editor.es.js +379 -238
  24. package/dist/tiptop-editor.umd.js +12 -10
  25. package/dist/webview/bundle.css +1 -0
  26. package/dist/webview/bundle.js +166 -0
  27. package/dist/webview/editor.d.ts +1 -0
  28. package/dist/webview/editor.js +3 -0
  29. package/dist/webview/index.html +13 -0
  30. package/package.json +9 -3
@@ -2,7 +2,7 @@ import $, { useContext as j, createContext as ee, useState as Z, useRef as R, us
2
2
  import { useCurrentEditor as fl, ReactRenderer as pl, NodeViewWrapper as vd, ReactNodeViewRenderer as xd, posToDOMRect as $d, useEditor as wd, EditorContent as Ed } from "@tiptap/react";
3
3
  import { BubbleMenuPlugin as Sd } from "@tiptap/extension-bubble-menu";
4
4
  import hl, { flushSync as br, createPortal as Do } from "react-dom";
5
- import { TextSelection as Ne, Plugin as _e, PluginKey as De, Selection as It, AllSelection as Io, NodeSelection as he } from "prosemirror-state";
5
+ import { TextSelection as Ne, Plugin as _e, PluginKey as De, Selection as Lt, AllSelection as Io, NodeSelection as he } from "prosemirror-state";
6
6
  import { RemoveMarkStep as Cd, Transform as kd, liftTarget as Td, joinPoint as ml, canSplit as Gn, ReplaceStep as Pd, ReplaceAroundStep as Md, canJoin as gl } from "prosemirror-transform";
7
7
  import { createParagraphNear as Ad, exitCode as Nd, joinUp as Dd, joinDown as Id, joinBackward as Ld, joinForward as Rd, joinTextblockBackward as Kd, joinTextblockForward as Od, lift as Fd, liftEmptyBlock as jd, newlineInCode as _d, selectNodeBackward as Bd, selectNodeForward as Hd, selectParentNode as zd, selectTextblockEnd as Vd, selectTextblockStart as Ud, setBlockType as Ss, wrapIn as Wd } from "prosemirror-commands";
8
8
  import { Fragment as dt, Slice as Gd, Node as qd, Schema as Yd, DOMParser as Rr } from "prosemirror-model";
@@ -450,7 +450,7 @@ function rp(t) {
450
450
  return t || `${r}-${n}`;
451
451
  }
452
452
  function op(t) {
453
- let e = $.useId(), [n] = Z(St()), r = n || process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${Qn.prefix}`;
453
+ let e = $.useId(), [n] = Z(Ct()), r = n || process.env.NODE_ENV === "test" ? "react-aria" : `react-aria${Qn.prefix}`;
454
454
  return t || `${r}-${e}`;
455
455
  }
456
456
  const sp = typeof $.useId == "function" ? op : rp;
@@ -464,7 +464,7 @@ function ap(t) {
464
464
  return () => {
465
465
  };
466
466
  }
467
- function St() {
467
+ function Ct() {
468
468
  return typeof $.useSyncExternalStore == "function" ? $.useSyncExternalStore(ap, ip, lp) : j(ep);
469
469
  }
470
470
  function cp(t) {
@@ -490,22 +490,22 @@ function cp(t) {
490
490
  i
491
491
  ];
492
492
  }
493
- let up = !!(typeof window < "u" && window.document && window.document.createElement), Lt = /* @__PURE__ */ new Map(), rn;
493
+ let up = !!(typeof window < "u" && window.document && window.document.createElement), Rt = /* @__PURE__ */ new Map(), rn;
494
494
  typeof FinalizationRegistry < "u" && (rn = new FinalizationRegistry((t) => {
495
- Lt.delete(t);
495
+ Rt.delete(t);
496
496
  }));
497
497
  function ye(t) {
498
498
  let [e, n] = Z(t), r = R(null), o = sp(e), s = R(null);
499
499
  if (rn && rn.register(s, o), up) {
500
- const i = Lt.get(o);
501
- i && !i.includes(r) ? i.push(r) : Lt.set(o, [
500
+ const i = Rt.get(o);
501
+ i && !i.includes(r) ? i.push(r) : Rt.set(o, [
502
502
  r
503
503
  ]);
504
504
  }
505
505
  return oe(() => {
506
506
  let i = o;
507
507
  return () => {
508
- rn && rn.unregister(s), Lt.delete(i);
508
+ rn && rn.unregister(s), Rt.delete(i);
509
509
  };
510
510
  }, [
511
511
  o
@@ -518,13 +518,13 @@ function ye(t) {
518
518
  }
519
519
  function dp(t, e) {
520
520
  if (t === e) return t;
521
- let n = Lt.get(t);
521
+ let n = Rt.get(t);
522
522
  if (n)
523
523
  return n.forEach((o) => o.current = e), e;
524
- let r = Lt.get(e);
524
+ let r = Rt.get(e);
525
525
  return r ? (r.forEach((o) => o.current = t), t) : e;
526
526
  }
527
- function Rt(t = []) {
527
+ function Kt(t = []) {
528
528
  let e = ye(), [n, r] = cp(e), o = F(() => {
529
529
  r(function* () {
530
530
  yield e, yield document.getElementById(e) ? e : void 0;
@@ -539,7 +539,7 @@ function Rt(t = []) {
539
539
  ...t
540
540
  ]), n;
541
541
  }
542
- function Vt(...t) {
542
+ function Ut(...t) {
543
543
  return (...e) => {
544
544
  for (let n of t) typeof n == "function" && n(...e);
545
545
  };
@@ -578,7 +578,7 @@ function _(t) {
578
578
  }
579
579
  return t.target;
580
580
  }
581
- function Ft(t) {
581
+ function jt(t) {
582
582
  if (!t) return !1;
583
583
  let e = t.getRootNode(), n = ve(t);
584
584
  if (!(e instanceof n.Document || e instanceof n.ShadowRoot)) return !1;
@@ -706,7 +706,7 @@ class mp {
706
706
  function kl(t, e, n, r) {
707
707
  return qe() ? new mp(t, e, n, r) : t.createTreeWalker(e, n, r);
708
708
  }
709
- function Ut(...t) {
709
+ function Wt(...t) {
710
710
  return t.length === 1 && t[0] ? t[0] : (e) => {
711
711
  let n = !1;
712
712
  const r = t.map((o) => {
@@ -748,7 +748,7 @@ function ne(...t) {
748
748
  typeof s == "function" && typeof i == "function" && // This is a lot faster than a regex.
749
749
  o[0] === "o" && o[1] === "n" && o.charCodeAt(2) >= /* 'A' */
750
750
  65 && o.charCodeAt(2) <= /* 'Z' */
751
- 90 ? e[o] = Vt(s, i) : (o === "className" || o === "UNSAFE_className") && typeof s == "string" && typeof i == "string" ? e[o] = gp(s, i) : o === "id" && s && i ? e.id = dp(s, i) : o === "ref" && s && i ? e.ref = Ut(s, i) : e[o] = i !== void 0 ? i : s;
751
+ 90 ? e[o] = Ut(s, i) : (o === "className" || o === "UNSAFE_className") && typeof s == "string" && typeof i == "string" ? e[o] = gp(s, i) : o === "id" && s && i ? e.id = dp(s, i) : o === "ref" && s && i ? e.ref = Wt(s, i) : e[o] = i !== void 0 ? i : s;
752
752
  }
753
753
  }
754
754
  return e;
@@ -971,24 +971,24 @@ function Fo(t, e) {
971
971
  };
972
972
  });
973
973
  }
974
- function jt(t, e) {
974
+ function _t(t, e) {
975
975
  if (!t) return !1;
976
976
  let n = window.getComputedStyle(t), r = document.scrollingElement || document.documentElement, o = /(auto|scroll)/.test(n.overflow + n.overflowX + n.overflowY);
977
977
  return t === r && n.overflow !== "hidden" && (o = !0), o && e && (o = t.scrollHeight !== t.clientHeight || t.scrollWidth !== t.clientWidth), o;
978
978
  }
979
979
  function jo(t, e) {
980
980
  let n = t;
981
- for (jt(n, e) && (n = n.parentElement); n && !jt(n, e); ) n = n.parentElement;
981
+ for (_t(n, e) && (n = n.parentElement); n && !_t(n, e); ) n = n.parentElement;
982
982
  return n || document.scrollingElement || document.documentElement;
983
983
  }
984
984
  function Ks(t, e) {
985
985
  let n = [], r = document.scrollingElement || document.documentElement;
986
986
  do
987
- jt(t, e) && n.push(t), t = t.parentElement;
987
+ _t(t, e) && n.push(t), t = t.parentElement;
988
988
  while (t && t !== r);
989
989
  return n;
990
990
  }
991
- function Nt(t) {
991
+ function Dt(t) {
992
992
  return wt() ? t.metaKey : t.ctrlKey;
993
993
  }
994
994
  const Cp = /* @__PURE__ */ new Set([
@@ -1256,7 +1256,7 @@ function Kp(t, e, n) {
1256
1256
  const {
1257
1257
  render: r,
1258
1258
  ...o
1259
- } = e, s = R(null), i = J(() => Ut(n, s), [n, s]);
1259
+ } = e, s = R(null), i = J(() => Wt(n, s), [n, s]);
1260
1260
  oe(() => {
1261
1261
  typeof process < "u" && process.env?.NODE_ENV !== "production" && r && (s.current || console.warn("Ref was not connected to DOM element returned by custom `render` function. Did you forget to pass through or merge the `ref`?"));
1262
1262
  }, [t, r]);
@@ -1824,15 +1824,15 @@ const Vp = (t, e) => {
1824
1824
  }, uh = [], pe = (t) => {
1825
1825
  const e = (n) => n[t] || uh;
1826
1826
  return e.isThemeGetter = !0, e;
1827
- }, Hl = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, zl = /^\((?:(\w[\w-]*):)?(.+)\)$/i, dh = /^\d+\/\d+$/, fh = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, ph = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, hh = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, mh = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, gh = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, Mt = (t) => dh.test(t), te = (t) => !!t && !Number.isNaN(Number(t)), st = (t) => !!t && Number.isInteger(Number(t)), _r = (t) => t.endsWith("%") && te(t.slice(0, -1)), We = (t) => fh.test(t), bh = () => !0, yh = (t) => (
1827
+ }, Hl = /^\[(?:(\w[\w-]*):)?(.+)\]$/i, zl = /^\((?:(\w[\w-]*):)?(.+)\)$/i, dh = /^\d+\/\d+$/, fh = /^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/, ph = /\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/, hh = /^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/, mh = /^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/, gh = /^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/, At = (t) => dh.test(t), te = (t) => !!t && !Number.isNaN(Number(t)), st = (t) => !!t && Number.isInteger(Number(t)), _r = (t) => t.endsWith("%") && te(t.slice(0, -1)), We = (t) => fh.test(t), bh = () => !0, yh = (t) => (
1828
1828
  // `colorFunctionRegex` check is necessary because color functions can have percentages in them which which would be incorrectly classified as lengths.
1829
1829
  // For example, `hsl(0 0% 0%)` would be classified as a length without this check.
1830
1830
  // I could also use lookbehind assertion in `lengthUnitRegex` but that isn't supported widely enough.
1831
1831
  ph.test(t) && !hh.test(t)
1832
- ), Vl = () => !1, vh = (t) => mh.test(t), xh = (t) => gh.test(t), $h = (t) => !z(t) && !V(t), wh = (t) => Wt(t, Gl, Vl), z = (t) => Hl.test(t), mt = (t) => Wt(t, ql, yh), Br = (t) => Wt(t, Th, te), Vs = (t) => Wt(t, Ul, Vl), Eh = (t) => Wt(t, Wl, xh), Nn = (t) => Wt(t, Yl, vh), V = (t) => zl.test(t), en = (t) => Gt(t, ql), Sh = (t) => Gt(t, Ph), Us = (t) => Gt(t, Ul), Ch = (t) => Gt(t, Gl), kh = (t) => Gt(t, Wl), Dn = (t) => Gt(t, Yl, !0), Wt = (t, e, n) => {
1832
+ ), Vl = () => !1, vh = (t) => mh.test(t), xh = (t) => gh.test(t), $h = (t) => !z(t) && !V(t), wh = (t) => Gt(t, Gl, Vl), z = (t) => Hl.test(t), mt = (t) => Gt(t, ql, yh), Br = (t) => Gt(t, Th, te), Vs = (t) => Gt(t, Ul, Vl), Eh = (t) => Gt(t, Wl, xh), Nn = (t) => Gt(t, Yl, vh), V = (t) => zl.test(t), en = (t) => qt(t, ql), Sh = (t) => qt(t, Ph), Us = (t) => qt(t, Ul), Ch = (t) => qt(t, Gl), kh = (t) => qt(t, Wl), Dn = (t) => qt(t, Yl, !0), Gt = (t, e, n) => {
1833
1833
  const r = Hl.exec(t);
1834
1834
  return r ? r[1] ? e(r[1]) : n(r[2]) : !1;
1835
- }, Gt = (t, e, n = !1) => {
1835
+ }, qt = (t, e, n = !1) => {
1836
1836
  const r = zl.exec(t);
1837
1837
  return r ? r[1] ? e(r[1]) : n : !1;
1838
1838
  }, Ul = (t) => t === "position" || t === "percentage", Wl = (t) => t === "image" || t === "url", Gl = (t) => t === "length" || t === "size" || t === "bg-size", ql = (t) => t === "length", Th = (t) => t === "number", Ph = (t) => t === "family-name", Yl = (t) => t === "shadow", uo = () => {
@@ -1854,9 +1854,9 @@ const Vp = (t, e) => {
1854
1854
  "bottom-left",
1855
1855
  // Deprecated since Tailwind CSS v4.1.0, see https://github.com/tailwindlabs/tailwindcss/pull/17378
1856
1856
  "left-bottom"
1857
- ], k = () => [...C(), V, z], K = () => ["auto", "hidden", "clip", "visible", "scroll"], M = () => ["auto", "contain", "none"], P = () => [V, z, a], L = () => [Mt, "full", "auto", ...P()], O = () => [st, "none", "subgrid", V, z], W = () => ["auto", {
1857
+ ], k = () => [...C(), V, z], K = () => ["auto", "hidden", "clip", "visible", "scroll"], M = () => ["auto", "contain", "none"], P = () => [V, z, a], L = () => [At, "full", "auto", ...P()], O = () => [st, "none", "subgrid", V, z], W = () => ["auto", {
1858
1858
  span: ["full", st, V, z]
1859
- }, st, V, z], G = () => [st, "auto", V, z], H = () => ["auto", "min", "max", "fr", V, z], g = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], T = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], N = () => ["auto", ...P()], D = () => [Mt, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...P()], I = () => [t, V, z], w = () => [...C(), Us, Vs, {
1859
+ }, st, V, z], G = () => [st, "auto", V, z], H = () => ["auto", "min", "max", "fr", V, z], g = () => ["start", "end", "center", "between", "around", "evenly", "stretch", "baseline", "center-safe", "end-safe"], T = () => ["start", "end", "center", "stretch", "center-safe", "end-safe"], N = () => ["auto", ...P()], D = () => [At, "auto", "full", "dvw", "dvh", "lvw", "lvh", "svw", "svh", "min", "max", "fit", ...P()], I = () => [t, V, z], w = () => [...C(), Us, Vs, {
1860
1860
  position: [V, z]
1861
1861
  }], A = () => ["no-repeat", {
1862
1862
  repeat: ["", "x", "y", "space", "round"]
@@ -1877,7 +1877,7 @@ const Vp = (t, e) => {
1877
1877
  h,
1878
1878
  V,
1879
1879
  z
1880
- ], He = () => ["none", te, V, z], ot = () => ["none", te, V, z], Jt = () => [te, V, z], Pt = () => [Mt, "full", ...P()];
1880
+ ], He = () => ["none", te, V, z], ot = () => ["none", te, V, z], Jt = () => [te, V, z], Mt = () => [At, "full", ...P()];
1881
1881
  return {
1882
1882
  cacheSize: 500,
1883
1883
  theme: {
@@ -1910,7 +1910,7 @@ const Vp = (t, e) => {
1910
1910
  * @see https://tailwindcss.com/docs/aspect-ratio
1911
1911
  */
1912
1912
  aspect: [{
1913
- aspect: ["auto", "square", Mt, z, V, y]
1913
+ aspect: ["auto", "square", At, z, V, y]
1914
1914
  }],
1915
1915
  /**
1916
1916
  * Container
@@ -2133,7 +2133,7 @@ const Vp = (t, e) => {
2133
2133
  * @see https://tailwindcss.com/docs/flex-basis
2134
2134
  */
2135
2135
  basis: [{
2136
- basis: [Mt, "full", "auto", l, ...P()]
2136
+ basis: [At, "full", "auto", l, ...P()]
2137
2137
  }],
2138
2138
  /**
2139
2139
  * Flex Direction
@@ -2154,7 +2154,7 @@ const Vp = (t, e) => {
2154
2154
  * @see https://tailwindcss.com/docs/flex
2155
2155
  */
2156
2156
  flex: [{
2157
- flex: [te, Mt, "auto", "initial", "none", z]
2157
+ flex: [te, At, "auto", "initial", "none", z]
2158
2158
  }],
2159
2159
  /**
2160
2160
  * Flex Grow
@@ -3927,28 +3927,28 @@ const Vp = (t, e) => {
3927
3927
  * @see https://tailwindcss.com/docs/translate
3928
3928
  */
3929
3929
  translate: [{
3930
- translate: Pt()
3930
+ translate: Mt()
3931
3931
  }],
3932
3932
  /**
3933
3933
  * Translate X
3934
3934
  * @see https://tailwindcss.com/docs/translate
3935
3935
  */
3936
3936
  "translate-x": [{
3937
- "translate-x": Pt()
3937
+ "translate-x": Mt()
3938
3938
  }],
3939
3939
  /**
3940
3940
  * Translate Y
3941
3941
  * @see https://tailwindcss.com/docs/translate
3942
3942
  */
3943
3943
  "translate-y": [{
3944
- "translate-y": Pt()
3944
+ "translate-y": Mt()
3945
3945
  }],
3946
3946
  /**
3947
3947
  * Translate Z
3948
3948
  * @see https://tailwindcss.com/docs/translate
3949
3949
  */
3950
3950
  "translate-z": [{
3951
- "translate-z": Pt()
3951
+ "translate-z": Mt()
3952
3952
  }],
3953
3953
  /**
3954
3954
  * Translate None
@@ -4578,7 +4578,7 @@ function wr(t, e) {
4578
4578
  return n;
4579
4579
  }
4580
4580
  function Me(t, e, n) {
4581
- let r = wr(n, t.slot) || {}, { ref: o, ...s } = r, i = nt(J(() => Ut(e, o), [
4581
+ let r = wr(n, t.slot) || {}, { ref: o, ...s } = r, i = nt(J(() => Wt(e, o), [
4582
4582
  e,
4583
4583
  o
4584
4584
  ])), l = ne(s, t);
@@ -4614,7 +4614,7 @@ function Zl(t = !0) {
4614
4614
  ];
4615
4615
  }
4616
4616
  function Yh(t, e, n) {
4617
- let { render: r, ...o } = e, s = R(null), i = J(() => Ut(n, s), [
4617
+ let { render: r, ...o } = e, s = R(null), i = J(() => Wt(n, s), [
4618
4618
  n,
4619
4619
  s
4620
4620
  ]);
@@ -4767,7 +4767,7 @@ function Gs() {
4767
4767
  for (let t of ln) t(fo);
4768
4768
  }
4769
4769
  function om() {
4770
- let t = St(), [e, n] = Z(fo);
4770
+ let t = Ct(), [e, n] = Z(fo);
4771
4771
  return U(() => (ln.size === 0 && window.addEventListener("languagechange", Gs), ln.add(n), () => {
4772
4772
  ln.delete(n), ln.size === 0 && window.removeEventListener("languagechange", Gs);
4773
4773
  }), []), t ? {
@@ -4776,15 +4776,15 @@ function om() {
4776
4776
  } : e;
4777
4777
  }
4778
4778
  const sm = /* @__PURE__ */ $.createContext(null);
4779
- function Ct() {
4779
+ function kt() {
4780
4780
  let t = om();
4781
4781
  return j(sm) || t;
4782
4782
  }
4783
4783
  const im = /* @__PURE__ */ ee(null), na = 7e3;
4784
- let At = null;
4784
+ let Nt = null;
4785
4785
  function qs(t, e = "assertive", n = na) {
4786
- At ? At.announce(t, e, n) : (At = new lm(), (typeof IS_REACT_ACT_ENVIRONMENT == "boolean" ? IS_REACT_ACT_ENVIRONMENT : typeof jest < "u") ? At.announce(t, e, n) : setTimeout(() => {
4787
- At?.isAttached() && At?.announce(t, e, n);
4786
+ Nt ? Nt.announce(t, e, n) : (Nt = new lm(), (typeof IS_REACT_ACT_ENVIRONMENT == "boolean" ? IS_REACT_ACT_ENVIRONMENT : typeof jest < "u") ? Nt.announce(t, e, n) : setTimeout(() => {
4787
+ Nt?.isAttached() && Nt?.announce(t, e, n);
4788
4788
  }, 100));
4789
4789
  }
4790
4790
  class lm {
@@ -4962,7 +4962,7 @@ typeof document < "u" && um();
4962
4962
  function ft() {
4963
4963
  return et !== "pointer";
4964
4964
  }
4965
- function _t() {
4965
+ function Bt() {
4966
4966
  return et;
4967
4967
  }
4968
4968
  function Xs(t) {
@@ -4978,7 +4978,7 @@ function dm() {
4978
4978
  return hn.add(n), () => {
4979
4979
  hn.delete(n);
4980
4980
  };
4981
- }, []), St() ? null : t;
4981
+ }, []), Ct() ? null : t;
4982
4982
  }
4983
4983
  const fm = /* @__PURE__ */ new Set([
4984
4984
  "checkbox",
@@ -5011,7 +5011,7 @@ function hm(t, e, n) {
5011
5011
  function pt(t) {
5012
5012
  if (!t.isConnected) return;
5013
5013
  const e = re(t);
5014
- if (_t() === "virtual") {
5014
+ if (Bt() === "virtual") {
5015
5015
  let n = le(e);
5016
5016
  Pl(() => {
5017
5017
  const r = le(e);
@@ -5137,17 +5137,17 @@ const bm = /* @__PURE__ */ ge(({ children: t, ...e }, n) => {
5137
5137
  return /* @__PURE__ */ $.cloneElement(o, {
5138
5138
  ...ne(r, o.props),
5139
5139
  // @ts-ignore
5140
- ref: Ut(s, n)
5140
+ ref: Wt(s, n)
5141
5141
  });
5142
5142
  });
5143
- let Dt = "default", ho = "", qn = /* @__PURE__ */ new WeakMap();
5143
+ let It = "default", ho = "", qn = /* @__PURE__ */ new WeakMap();
5144
5144
  function Zs(t) {
5145
5145
  if (xn()) {
5146
- if (Dt === "default") {
5146
+ if (It === "default") {
5147
5147
  const e = re(t);
5148
5148
  ho = e.documentElement.style.webkitUserSelect, e.documentElement.style.webkitUserSelect = "none";
5149
5149
  }
5150
- Dt = "disabled";
5150
+ It = "disabled";
5151
5151
  } else if (t instanceof HTMLElement || t instanceof SVGElement) {
5152
5152
  let e = "userSelect" in t.style ? "userSelect" : "webkitUserSelect";
5153
5153
  qn.set(t, t.style[e]), t.style[e] = "none";
@@ -5155,12 +5155,12 @@ function Zs(t) {
5155
5155
  }
5156
5156
  function Hr(t) {
5157
5157
  if (xn()) {
5158
- if (Dt !== "disabled") return;
5159
- Dt = "restoring", setTimeout(() => {
5158
+ if (It !== "disabled") return;
5159
+ It = "restoring", setTimeout(() => {
5160
5160
  Pl(() => {
5161
- if (Dt === "restoring") {
5161
+ if (It === "restoring") {
5162
5162
  const e = re(t);
5163
- e.documentElement.style.webkitUserSelect === "none" && (e.documentElement.style.webkitUserSelect = ho || ""), ho = "", Dt = "default";
5163
+ e.documentElement.style.webkitUserSelect === "none" && (e.documentElement.style.webkitUserSelect = ho || ""), ho = "", It = "default";
5164
5164
  }
5165
5165
  });
5166
5166
  }, 300);
@@ -5292,7 +5292,7 @@ function En(t) {
5292
5292
  let w = D.currentTarget, A = (S) => {
5293
5293
  zr(S, w) && !S.repeat && Q(w, _(S)) && g.target && M(gt(g.target, S), "keyboard");
5294
5294
  };
5295
- v(re(D.currentTarget), "keyup", Vt(A, N), !0), I && D.stopPropagation(), D.metaKey && wt() && g.metaKeyEvents?.set(D.key, D.nativeEvent);
5295
+ v(re(D.currentTarget), "keyup", Ut(A, N), !0), I && D.stopPropagation(), D.metaKey && wt() && g.metaKeyEvents?.set(D.key, D.nativeEvent);
5296
5296
  } else D.key === "Meta" && (g.metaKeyEvents = /* @__PURE__ */ new Map());
5297
5297
  },
5298
5298
  onClick(D) {
@@ -5707,7 +5707,7 @@ function Cm() {
5707
5707
  Kn--, !(Kn > 0) && (typeof PointerEvent < "u" ? t.removeEventListener("pointerup", si) : process.env.NODE_ENV === "test" && t.removeEventListener("touchend", mo));
5708
5708
  };
5709
5709
  }
5710
- function kt(t) {
5710
+ function Tt(t) {
5711
5711
  let { onHoverStart: e, onHoverChange: n, onHoverEnd: r, isDisabled: o } = t, [s, i] = Z(!1), l = R({
5712
5712
  isHovered: !1,
5713
5713
  ignoreEmulatedMouseEvents: !1,
@@ -5775,7 +5775,7 @@ const da = /* @__PURE__ */ ee({}), fa = /* @__PURE__ */ Ql(function(e, n) {
5775
5775
  [e, n] = Me(e, n, da);
5776
5776
  let r = e, { isPending: o } = r, { buttonProps: s, isPressed: i } = Sm(e, n);
5777
5777
  s = Tm(s, o);
5778
- let { focusProps: l, isFocused: a, isFocusVisible: c } = ua(e), { hoverProps: u, isHovered: d } = kt({
5778
+ let { focusProps: l, isFocused: a, isFocusVisible: c } = ua(e), { hoverProps: u, isHovered: d } = Tt({
5779
5779
  ...e,
5780
5780
  isDisabled: e.isDisabled || o
5781
5781
  }), p = {
@@ -6249,7 +6249,7 @@ function Hm(t) {
6249
6249
  }
6250
6250
  let bt = typeof document < "u" ? window.visualViewport : null;
6251
6251
  function ba(t) {
6252
- let { direction: e } = Ct(), { arrowSize: n, targetRef: r, overlayRef: o, arrowRef: s, scrollRef: i = o, placement: l = "bottom", containerPadding: a = 12, shouldFlip: c = !0, boundaryElement: u = typeof document < "u" ? document.body : null, offset: d = 0, crossOffset: p = 0, shouldUpdatePosition: f = !0, isOpen: h = !0, onClose: b, maxHeight: y, arrowBoundaryOffset: v = 0 } = t, [x, E] = Z(null), C = [
6252
+ let { direction: e } = kt(), { arrowSize: n, targetRef: r, overlayRef: o, arrowRef: s, scrollRef: i = o, placement: l = "bottom", containerPadding: a = 12, shouldFlip: c = !0, boundaryElement: u = typeof document < "u" ? document.body : null, offset: d = 0, crossOffset: p = 0, shouldUpdatePosition: f = !0, isOpen: h = !0, onClose: b, maxHeight: y, arrowBoundaryOffset: v = 0 } = t, [x, E] = Z(null), C = [
6253
6253
  f,
6254
6254
  l,
6255
6255
  o.current,
@@ -6275,7 +6275,7 @@ function ba(t) {
6275
6275
  let K = F(() => {
6276
6276
  if (f === !1 || !h || !o.current || !r.current || !u || bt?.scale !== k.current) return;
6277
6277
  let L = null;
6278
- if (i.current && Ft(i.current)) {
6278
+ if (i.current && jt(i.current)) {
6279
6279
  let H = le()?.getBoundingClientRect(), g = i.current.getBoundingClientRect();
6280
6280
  L = {
6281
6281
  type: "top",
@@ -6528,7 +6528,7 @@ function qm(t, e) {
6528
6528
  (!ae || ar(ae, t)) && je(_(c), t.current) ? (ae = t, n.current = _(c)) : an(t) && !ut(_(c), t) ? n.current ? n.current.focus() : ae && ae.current && yo(ae.current) : an(t) && (n.current = _(c));
6529
6529
  }, a = (c) => {
6530
6530
  r.current && cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
6531
- let u = _t(), d = (u === "virtual" || u === null) && Oo() && El(), p = le(s);
6531
+ let u = Bt(), d = (u === "virtual" || u === null) && Oo() && El(), p = le(s);
6532
6532
  if (!d && p && an(t) && !ut(p, t)) {
6533
6533
  ae = t;
6534
6534
  let f = _(c);
@@ -6884,13 +6884,13 @@ function tg(t = {}) {
6884
6884
  }
6885
6885
  function ng() {
6886
6886
  let t = window.innerWidth - document.documentElement.clientWidth;
6887
- return Vt(t > 0 && // Use scrollbar-gutter when supported because it also works for fixed positioned elements.
6887
+ return Ut(t > 0 && // Use scrollbar-gutter when supported because it also works for fixed positioned elements.
6888
6888
  ("scrollbarGutter" in document.documentElement.style ? Yn(document.documentElement, "scrollbarGutter", "stable") : Yn(document.documentElement, "paddingRight", `${t}px`)), Yn(document.documentElement, "overflow", "hidden"));
6889
6889
  }
6890
6890
  function rg() {
6891
6891
  let t = Yn(document.documentElement, "overflow", "hidden"), e, n = !1, r = (u) => {
6892
6892
  let d = _(u);
6893
- e = jt(d) ? d : jo(d, !0), n = !1;
6893
+ e = _t(d) ? d : jo(d, !0), n = !1;
6894
6894
  let p = d.ownerDocument.defaultView.getSelection();
6895
6895
  p && !p.isCollapsed && p.containsNode(d, !0) && (n = !0), u.composedPath().some((f) => f instanceof HTMLInputElement && f.type === "range") && (n = !0), "selectionStart" in d && "selectionEnd" in d && d.selectionStart < d.selectionEnd && d.ownerDocument.activeElement === d && (n = !0);
6896
6896
  }, o = document.createElement("style"), s = Rl();
@@ -6923,7 +6923,7 @@ function rg() {
6923
6923
  preventScroll: !0
6924
6924
  }), (!u || !u.preventScroll) && gi(this, p);
6925
6925
  };
6926
- let c = Vt(Wr(document, "touchstart", r, {
6926
+ let c = Ut(Wr(document, "touchstart", r, {
6927
6927
  passive: !1,
6928
6928
  capture: !0
6929
6929
  }), Wr(document, "touchmove", i, {
@@ -7262,7 +7262,7 @@ function dg(t, e) {
7262
7262
  return e && kr.getGlobalDictionaryForPackage(e) || ug(t);
7263
7263
  }
7264
7264
  function tc(t, e) {
7265
- let { locale: n } = Ct(), r = dg(t, e);
7265
+ let { locale: n } = kt(), r = dg(t, e);
7266
7266
  return J(() => new cg(n, r), [
7267
7267
  n,
7268
7268
  r
@@ -7346,7 +7346,7 @@ function rc() {
7346
7346
  }
7347
7347
  const oc = /* @__PURE__ */ $.createContext(null);
7348
7348
  function Ei(t) {
7349
- let e = St(), { portalContainer: n = e ? null : document.body, isExiting: r } = t, [o, s] = Z(!1), i = J(() => ({
7349
+ let e = Ct(), { portalContainer: n = e ? null : document.body, isExiting: r } = t, [o, s] = Z(!1), i = J(() => ({
7350
7350
  contain: o,
7351
7351
  setContain: s
7352
7352
  }), [
@@ -7396,7 +7396,7 @@ function Zo(t) {
7396
7396
  }
7397
7397
  const Tr = /* @__PURE__ */ ee(null), Si = /* @__PURE__ */ ee(null), sc = /* @__PURE__ */ ge(function(e, n) {
7398
7398
  [e, n] = Me(e, n, Tr);
7399
- let r = j(kn), o = Zo(e), s = e.isOpen != null || e.defaultOpen != null || !r ? o : r, i = Nl(n, s.isOpen) || e.isExiting || !1, l = Jh(), { direction: a } = Ct();
7399
+ let r = j(kn), o = Zo(e), s = e.isOpen != null || e.defaultOpen != null || !r ? o : r, i = Nl(n, s.isOpen) || e.isExiting || !1, l = Jh(), { direction: a } = kt();
7400
7400
  if (l) {
7401
7401
  let c = e.children;
7402
7402
  return typeof c == "function" && (c = c({
@@ -7440,7 +7440,7 @@ function yg({ state: t, isExiting: e, UNSTABLE_portalContainer: n, clearContexts
7440
7440
  h,
7441
7441
  v
7442
7442
  ]), U(() => {
7443
- x && (o.trigger !== "SubmenuTrigger" || _t() !== "pointer") && h.current && !Ft(h.current) && pt(h.current);
7443
+ x && (o.trigger !== "SubmenuTrigger" || Bt() !== "pointer") && h.current && !jt(h.current) && pt(h.current);
7444
7444
  }, [
7445
7445
  x,
7446
7446
  h,
@@ -7513,7 +7513,7 @@ function yg({ state: t, isExiting: e, UNSTABLE_portalContainer: n, clearContexts
7513
7513
  value: i
7514
7514
  }, K)));
7515
7515
  }
7516
- class qt {
7516
+ class Yt {
7517
7517
  constructor(e) {
7518
7518
  this.value = null, this.level = 0, this.hasChildNodes = !1, this.rendered = null, this.textValue = "", this["aria-label"] = void 0, this.index = 0, this.parentKey = null, this.prevKey = null, this.nextKey = null, this.firstChildKey = null, this.lastChildKey = null, this.props = {}, this.colSpan = null, this.colIndex = null, this.type = this.constructor.type, this.key = e;
7519
7519
  }
@@ -7530,17 +7530,17 @@ class qt {
7530
7530
  return n.addDescendants(o, e), o;
7531
7531
  }
7532
7532
  }
7533
- class ic extends qt {
7533
+ class ic extends Yt {
7534
7534
  filter(e, n, r) {
7535
7535
  let [o, s] = lc(e, n, this.firstChildKey, r), i = this.clone();
7536
7536
  return i.firstChildKey = o, i.lastChildKey = s, i;
7537
7537
  }
7538
7538
  }
7539
- const bs = class bs extends qt {
7539
+ const bs = class bs extends Yt {
7540
7540
  };
7541
7541
  bs.type = "header";
7542
7542
  let xo = bs;
7543
- const ys = class ys extends qt {
7543
+ const ys = class ys extends Yt {
7544
7544
  };
7545
7545
  ys.type = "loader";
7546
7546
  let $o = ys;
@@ -7759,7 +7759,7 @@ class ac {
7759
7759
  return e;
7760
7760
  }
7761
7761
  }
7762
- class Kt extends ac {
7762
+ class Ot extends ac {
7763
7763
  constructor(e, n) {
7764
7764
  super(n), this.nodeType = 8, this.isMutated = !0, this._index = 0, this.isHidden = !1, this.node = null;
7765
7765
  }
@@ -7770,7 +7770,7 @@ class Kt extends ac {
7770
7770
  this._index = e, this.ownerDocument.markDirty(this);
7771
7771
  }
7772
7772
  get level() {
7773
- return this.parentNode instanceof Kt ? this.parentNode.level + (this.parentNode.node?.type === "item" ? 1 : 0) : 0;
7773
+ return this.parentNode instanceof Ot ? this.parentNode.level + (this.parentNode.node?.type === "item" ? 1 : 0) : 0;
7774
7774
  }
7775
7775
  /**
7776
7776
  * Lazily gets a mutable instance of a Node. If the node has already
@@ -7781,7 +7781,7 @@ class Kt extends ac {
7781
7781
  }
7782
7782
  updateNode() {
7783
7783
  let e = this.nextVisibleSibling, n = this.getMutableNode();
7784
- if (n != null && (n.index = this.index, n.level = this.level, n.parentKey = this.parentNode instanceof Kt ? this.parentNode.node?.key ?? null : null, n.prevKey = this.previousVisibleSibling?.node?.key ?? null, n.nextKey = e?.node?.key ?? null, n.hasChildNodes = !!this.firstChild, n.firstChildKey = this.firstVisibleChild?.node?.key ?? null, n.lastChildKey = this.lastVisibleChild?.node?.key ?? null, (n.colSpan != null || n.colIndex != null) && e)) {
7784
+ if (n != null && (n.index = this.index, n.level = this.level, n.parentKey = this.parentNode instanceof Ot ? this.parentNode.node?.key ?? null : null, n.prevKey = this.previousVisibleSibling?.node?.key ?? null, n.nextKey = e?.node?.key ?? null, n.hasChildNodes = !!this.firstChild, n.firstChildKey = this.firstVisibleChild?.node?.key ?? null, n.lastChildKey = this.lastVisibleChild?.node?.key ?? null, (n.colSpan != null || n.colIndex != null) && e)) {
7785
7785
  let r = (n.colIndex ?? n.index) + (n.colSpan ?? 1);
7786
7786
  if (e.node != null && r !== e.node.colIndex) {
7787
7787
  let o = e.getMutableNode();
@@ -7827,7 +7827,7 @@ class xg extends ac {
7827
7827
  return !0;
7828
7828
  }
7829
7829
  createElement(e) {
7830
- return new Kt(e, this);
7830
+ return new Ot(e, this);
7831
7831
  }
7832
7832
  getMutableCollection() {
7833
7833
  return this.nextCollection || (this.nextCollection = this.collection.clone()), this.nextCollection;
@@ -7850,8 +7850,8 @@ class xg extends ac {
7850
7850
  return this.inSubscription ? this.collection : (this.queuedRender = !1, this.updateCollection(), this.collection);
7851
7851
  }
7852
7852
  updateCollection() {
7853
- for (let e of this.dirtyNodes) e instanceof Kt && (!e.isConnected || e.isHidden) ? this.removeNode(e) : e.updateChildIndices();
7854
- for (let e of this.dirtyNodes) e instanceof Kt ? (e.isConnected && !e.isHidden && (e.updateNode(), this.addNode(e)), e.node && this.dirtyNodes.delete(e), e.isMutated = !1) : this.dirtyNodes.delete(e);
7853
+ for (let e of this.dirtyNodes) e instanceof Ot && (!e.isConnected || e.isHidden) ? this.removeNode(e) : e.updateChildIndices();
7854
+ for (let e of this.dirtyNodes) e instanceof Ot ? (e.isConnected && !e.isHidden && (e.updateNode(), this.addNode(e)), e.node && this.dirtyNodes.delete(e), e.isMutated = !1) : this.dirtyNodes.delete(e);
7855
7855
  this.nextCollection && (this.nextCollection.commit(this.firstVisibleChild?.node?.key ?? null, this.lastVisibleChild?.node?.key ?? null, this.isSSR), this.isSSR || (this.collection = this.nextCollection, this.nextCollection = null));
7856
7856
  }
7857
7857
  queueUpdate() {
@@ -8016,7 +8016,7 @@ function Cg({ collection: t, render: e }) {
8016
8016
  return e(t);
8017
8017
  }
8018
8018
  function kg(t, e, n) {
8019
- let r = St(), o = R(r);
8019
+ let r = Ct(), o = R(r);
8020
8020
  o.current = r;
8021
8021
  let s = F(() => o.current ? n() : e(), [
8022
8022
  e,
@@ -8044,7 +8044,7 @@ function Pg(t) {
8044
8044
  const wo = /* @__PURE__ */ ee(null);
8045
8045
  function Mg(t) {
8046
8046
  var n;
8047
- return n = class extends qt {
8047
+ return n = class extends Yt {
8048
8048
  }, n.type = t, n;
8049
8049
  }
8050
8050
  function fc(t, e, n, r, o, s) {
@@ -8123,7 +8123,7 @@ function Ag({ children: t }) {
8123
8123
  }, t)), [
8124
8124
  t
8125
8125
  ]);
8126
- return St() ? /* @__PURE__ */ $.createElement(wo.Provider, {
8126
+ return Ct() ? /* @__PURE__ */ $.createElement(wo.Provider, {
8127
8127
  value: e
8128
8128
  }, n) : /* @__PURE__ */ Do(n, e);
8129
8129
  }
@@ -8174,7 +8174,7 @@ function Dg(t, e, n) {
8174
8174
  }
8175
8175
  return l;
8176
8176
  }
8177
- const Tt = /* @__PURE__ */ ee(Ng);
8177
+ const Pt = /* @__PURE__ */ ee(Ng);
8178
8178
  function Ig(t) {
8179
8179
  return J(() => t != null ? /* @__PURE__ */ new Set([
8180
8180
  t
@@ -8236,7 +8236,7 @@ function _g(t) {
8236
8236
  separatorProps: e
8237
8237
  };
8238
8238
  }
8239
- const Pr = /* @__PURE__ */ ee({}), $s = class $s extends qt {
8239
+ const Pr = /* @__PURE__ */ ee({}), $s = class $s extends Yt {
8240
8240
  filter(e, n) {
8241
8241
  let r = n.getItem(this.prevKey);
8242
8242
  if (r && r.type !== "separator") {
@@ -8605,7 +8605,7 @@ function Yg(t) {
8605
8605
  return t.length === 1 || !/^[A-Z]/i.test(t) ? t : "";
8606
8606
  }
8607
8607
  function Xg(t) {
8608
- let { selectionManager: e, keyboardDelegate: n, ref: r, autoFocus: o = !1, shouldFocusWrap: s = !1, disallowEmptySelection: i = !1, disallowSelectAll: l = !1, escapeKeyBehavior: a = "clearSelection", selectOnFocus: c = e.selectionBehavior === "replace", disallowTypeAhead: u = !1, shouldUseVirtualFocus: d, allowsTabNavigation: p = !1, scrollRef: f = r, linkBehavior: h = "action" } = t, { direction: b } = Ct(), y = vr(), v = (g) => {
8608
+ let { selectionManager: e, keyboardDelegate: n, ref: r, autoFocus: o = !1, shouldFocusWrap: s = !1, disallowEmptySelection: i = !1, disallowSelectAll: l = !1, escapeKeyBehavior: a = "clearSelection", selectOnFocus: c = e.selectionBehavior === "replace", disallowTypeAhead: u = !1, shouldUseVirtualFocus: d, allowsTabNavigation: p = !1, scrollRef: f = r, linkBehavior: h = "action" } = t, { direction: b } = kt(), y = vr(), v = (g) => {
8609
8609
  if (g.altKey && g.key === "Tab" && g.preventDefault(), !r.current || !Q(r.current, _(g))) return;
8610
8610
  const T = (N, D) => {
8611
8611
  if (N != null) {
@@ -8650,16 +8650,16 @@ function Xg(t) {
8650
8650
  if (n.getFirstKey) {
8651
8651
  if (e.focusedKey === null && g.shiftKey) return;
8652
8652
  g.preventDefault();
8653
- let N = n.getFirstKey(e.focusedKey, Nt(g));
8654
- e.setFocusedKey(N), N != null && (Nt(g) && g.shiftKey && e.selectionMode === "multiple" ? e.extendSelection(N) : c && e.replaceSelection(N));
8653
+ let N = n.getFirstKey(e.focusedKey, Dt(g));
8654
+ e.setFocusedKey(N), N != null && (Dt(g) && g.shiftKey && e.selectionMode === "multiple" ? e.extendSelection(N) : c && e.replaceSelection(N));
8655
8655
  }
8656
8656
  break;
8657
8657
  case "End":
8658
8658
  if (n.getLastKey) {
8659
8659
  if (e.focusedKey === null && g.shiftKey) return;
8660
8660
  g.preventDefault();
8661
- let N = n.getLastKey(e.focusedKey, Nt(g));
8662
- e.setFocusedKey(N), N != null && (Nt(g) && g.shiftKey && e.selectionMode === "multiple" ? e.extendSelection(N) : c && e.replaceSelection(N));
8661
+ let N = n.getLastKey(e.focusedKey, Dt(g));
8662
+ e.setFocusedKey(N), N != null && (Dt(g) && g.shiftKey && e.selectionMode === "multiple" ? e.extendSelection(N) : c && e.replaceSelection(N));
8663
8663
  }
8664
8664
  break;
8665
8665
  case "PageDown":
@@ -8675,7 +8675,7 @@ function Xg(t) {
8675
8675
  }
8676
8676
  break;
8677
8677
  case "a":
8678
- Nt(g) && e.selectionMode === "multiple" && l !== !0 && (g.preventDefault(), e.selectAll());
8678
+ Dt(g) && e.selectionMode === "multiple" && l !== !0 && (g.preventDefault(), e.selectAll());
8679
8679
  break;
8680
8680
  case "Escape":
8681
8681
  a === "clearSelection" && !i && e.selectedKeys.size !== 0 && (g.stopPropagation(), g.preventDefault(), e.clearSelection());
@@ -8691,7 +8691,7 @@ function Xg(t) {
8691
8691
  I = N.lastChild(), I && (D = I);
8692
8692
  while (I);
8693
8693
  let w = le();
8694
- D && (!Ft(D) || w && !Il(w)) && $e(D);
8694
+ D && (!jt(D) || w && !Il(w)) && $e(D);
8695
8695
  }
8696
8696
  break;
8697
8697
  }
@@ -8720,7 +8720,7 @@ function Xg(t) {
8720
8720
  } else f.current && (f.current.scrollTop = x.current.top, f.current.scrollLeft = x.current.left);
8721
8721
  if (e.focusedKey != null && f.current) {
8722
8722
  let T = Xn(r, e.focusedKey);
8723
- T instanceof HTMLElement && (!Ft(T) && !d && $e(T), _t() === "keyboard" && Os(T, {
8723
+ T instanceof HTMLElement && (!jt(T) && !d && $e(T), Bt() === "keyboard" && Os(T, {
8724
8724
  containingElement: r.current
8725
8725
  }));
8726
8726
  }
@@ -8767,7 +8767,7 @@ function Xg(t) {
8767
8767
  let P = R(e.focusedKey), L = R(null);
8768
8768
  U(() => {
8769
8769
  if (e.isFocused && e.focusedKey != null && (e.focusedKey !== P.current || M.current) && f.current && r.current) {
8770
- let g = _t(), T = Xn(r, e.focusedKey);
8770
+ let g = Bt(), T = Xn(r, e.focusedKey);
8771
8771
  if (!(T instanceof HTMLElement))
8772
8772
  return;
8773
8773
  (g === "keyboard" || M.current) && (L.current && cancelAnimationFrame(L.current), L.current = requestAnimationFrame(() => {
@@ -8911,7 +8911,7 @@ class iu {
8911
8911
  getKeyPageAbove(e) {
8912
8912
  let n = this.ref.current, r = this.layoutDelegate.getItemRect(e);
8913
8913
  if (!r) return null;
8914
- if (n && !jt(n)) return this.getFirstKey();
8914
+ if (n && !_t(n)) return this.getFirstKey();
8915
8915
  let o = e;
8916
8916
  if (this.orientation === "horizontal") {
8917
8917
  let s = Math.max(0, r.x + r.width - this.layoutDelegate.getVisibleRect().width);
@@ -8927,7 +8927,7 @@ class iu {
8927
8927
  getKeyPageBelow(e) {
8928
8928
  let n = this.ref.current, r = this.layoutDelegate.getItemRect(e);
8929
8929
  if (!r) return null;
8930
- if (n && !jt(n)) return this.getLastKey();
8930
+ if (n && !_t(n)) return this.getLastKey();
8931
8931
  let o = e;
8932
8932
  if (this.orientation === "horizontal") {
8933
8933
  let s = Math.min(this.layoutDelegate.getContentSize().width, r.x - r.width + this.layoutDelegate.getVisibleRect().width);
@@ -8955,7 +8955,7 @@ class iu {
8955
8955
  }
8956
8956
  let Yr = /* @__PURE__ */ new Map();
8957
8957
  function lu(t) {
8958
- let { locale: e } = Ct(), n = e + (t ? Object.entries(t).sort((o, s) => o[0] < s[0] ? -1 : 1).join() : "");
8958
+ let { locale: e } = kt(), n = e + (t ? Object.entries(t).sort((o, s) => o[0] < s[0] ? -1 : 1).join() : "");
8959
8959
  if (Yr.has(n)) return Yr.get(n);
8960
8960
  let r = new Intl.Collator(e, t);
8961
8961
  return Yr.set(n, r), r;
@@ -9036,7 +9036,7 @@ function cu(t) {
9036
9036
  return;
9037
9037
  } else if (d === "override" || d === "none") return;
9038
9038
  }
9039
- n.selectionMode === "single" ? n.isSelected(r) && !n.disallowEmptySelection ? n.toggleSelection(r) : n.replaceSelection(r) : A && A.shiftKey ? n.extendSelection(r) : n.selectionBehavior === "toggle" || A && (Nt(A) || A.pointerType === "touch" || A.pointerType === "virtual") ? n.toggleSelection(r) : n.replaceSelection(r);
9039
+ n.selectionMode === "single" ? n.isSelected(r) && !n.disallowEmptySelection ? n.toggleSelection(r) : n.replaceSelection(r) : A && A.shiftKey ? n.extendSelection(r) : n.selectionBehavior === "toggle" || A && (Dt(A) || A.pointerType === "touch" || A.pointerType === "virtual") ? n.toggleSelection(r) : n.replaceSelection(r);
9040
9040
  }
9041
9041
  };
9042
9042
  U(() => {
@@ -9101,7 +9101,7 @@ function cu(t) {
9101
9101
  "onPress",
9102
9102
  "onPressUp",
9103
9103
  "onClick"
9104
- ]) W[A] && (H[A] = Vt(H[A], W[A]));
9104
+ ]) W[A] && (H[A] = Ut(H[A], W[A]));
9105
9105
  let { pressProps: g, isPressed: T } = En(H), N = k ? (A) => {
9106
9106
  M.current === "mouse" && (A.stopPropagation(), A.preventDefault(), G(A));
9107
9107
  } : void 0, { longPressProps: D } = nu({
@@ -9189,7 +9189,7 @@ function eb(t, e, n) {
9189
9189
  }
9190
9190
  }, D = "menuitem";
9191
9191
  P || (M.selectionMode === "single" ? D = "menuitemradio" : M.selectionMode === "multiple" && (D = "menuitemcheckbox"));
9192
- let I = Rt(), w = Rt(), A = Rt(), S = {
9192
+ let I = Kt(), w = Kt(), A = Kt(), S = {
9193
9193
  id: r,
9194
9194
  "aria-disabled": O || void 0,
9195
9195
  role: D,
@@ -9238,14 +9238,14 @@ function eb(t, e, n) {
9238
9238
  onPressChange: q,
9239
9239
  onPressEnd: f,
9240
9240
  isDisabled: O
9241
- }), { hoverProps: Jt } = kt({
9241
+ }), { hoverProps: Jt } = Tt({
9242
9242
  isDisabled: O,
9243
9243
  onHoverStart(ie) {
9244
9244
  !ft() && !(L && a) && (M.setFocused(!0), M.setFocusedKey(o)), b?.(ie);
9245
9245
  },
9246
9246
  onHoverChange: y,
9247
9247
  onHoverEnd: v
9248
- }), { keyboardProps: Pt } = Uo({
9248
+ }), { keyboardProps: Mt } = Uo({
9249
9249
  onKeyDown: (ie) => {
9250
9250
  if (ie.repeat) {
9251
9251
  ie.continuePropagation();
@@ -9290,7 +9290,7 @@ function eb(t, e, n) {
9290
9290
  } : X,
9291
9291
  He,
9292
9292
  Jt,
9293
- Pt,
9293
+ Mt,
9294
9294
  fd,
9295
9295
  // Prevent DOM focus from moving on mouse down when using virtual focus or this is a submenu/subdialog trigger.
9296
9296
  G.shouldUseVirtualFocus || P ? {
@@ -9410,7 +9410,7 @@ function ob(t) {
9410
9410
  ]);
9411
9411
  }
9412
9412
  function sb(t, e, n) {
9413
- let { parentMenuRef: r, submenuRef: o, type: s = "menu", isDisabled: i, delay: l = 200, shouldUseVirtualFocus: a } = t, c = ye(), u = ye(), { direction: d } = Ct(), p = R(void 0), f = F(() => {
9413
+ let { parentMenuRef: r, submenuRef: o, type: s = "menu", isDisabled: i, delay: l = 200, shouldUseVirtualFocus: a } = t, c = ye(), u = ye(), { direction: d } = kt(), p = R(void 0), f = F(() => {
9414
9414
  p.current && (clearTimeout(p.current), p.current = void 0);
9415
9415
  }, [
9416
9416
  p
@@ -9431,7 +9431,7 @@ function sb(t, e, n) {
9431
9431
  f
9432
9432
  ]);
9433
9433
  let y = (M) => {
9434
- if (Ft(M.currentTarget))
9434
+ if (jt(M.currentTarget))
9435
9435
  switch (M.key) {
9436
9436
  case "ArrowLeft":
9437
9437
  d === "ltr" && Q(M.currentTarget, _(M)) && (M.preventDefault(), M.stopPropagation(), b(), !a && n.current && $e(n.current));
@@ -10198,7 +10198,7 @@ function pb(t) {
10198
10198
  isPressed: e.isOpen
10199
10199
  }, t.children));
10200
10200
  }
10201
- const pu = /* @__PURE__ */ ee(null), ws = class ws extends qt {
10201
+ const pu = /* @__PURE__ */ ee(null), ws = class ws extends Yt {
10202
10202
  filter(e, n, r) {
10203
10203
  let o = e.getItem(this.firstChildKey);
10204
10204
  if (o && r(o.textValue, this)) {
@@ -10211,7 +10211,7 @@ const pu = /* @__PURE__ */ ee(null), ws = class ws extends qt {
10211
10211
  ws.type = "submenutrigger";
10212
10212
  let ko = ws;
10213
10213
  const hb = /* @__PURE__ */ Qo(ko, (t, e, n) => {
10214
- let { CollectionBranch: r } = j(Tt), o = j(Mr), s = j(yn), i = ib({
10214
+ let { CollectionBranch: r } = j(Pt), o = j(Mr), s = j(yn), i = ib({
10215
10215
  triggerKey: n.key
10216
10216
  }, s), l = R(null), a = nt(e), { parentMenuRef: c, shouldUseVirtualFocus: u } = j(pu), { submenuTriggerProps: d, submenuProps: p, popoverProps: f } = sb({
10217
10217
  parentMenuRef: c,
@@ -10222,7 +10222,7 @@ const hb = /* @__PURE__ */ Qo(ko, (t, e, n) => {
10222
10222
  return /* @__PURE__ */ $.createElement(Ue, {
10223
10223
  values: [
10224
10224
  [
10225
- Bt,
10225
+ Ht,
10226
10226
  {
10227
10227
  ...d,
10228
10228
  onAction: void 0,
@@ -10273,7 +10273,7 @@ function gb({ props: t, collection: e, menuRef: n }) {
10273
10273
  ...t,
10274
10274
  collection: s,
10275
10275
  children: void 0
10276
- }), l = j(yn), { isVirtualized: a, CollectionRoot: c } = j(Tt), { menuProps: u } = Jg({
10276
+ }), l = j(yn), { isVirtualized: a, CollectionRoot: c } = j(Pt), { menuProps: u } = Jg({
10277
10277
  ...t,
10278
10278
  isVirtualized: a,
10279
10279
  onClose: t.onClose || l?.close
@@ -10327,7 +10327,7 @@ function gb({ props: t, collection: e, menuRef: n }) {
10327
10327
  }
10328
10328
  ],
10329
10329
  [
10330
- Bt,
10330
+ Ht,
10331
10331
  {
10332
10332
  shouldCloseOnSelect: t.shouldCloseOnSelect
10333
10333
  }
@@ -10379,7 +10379,7 @@ class bb extends Cn {
10379
10379
  }
10380
10380
  }
10381
10381
  function hu(t, e, n, r = "react-aria-MenuSection") {
10382
- let o = j(Mr), { CollectionBranch: s } = j(Tt), [i, l] = Zl(), { headingProps: a, groupProps: c } = tb({
10382
+ let o = j(Mr), { CollectionBranch: s } = j(Pt), [i, l] = Zl(), { headingProps: a, groupProps: c } = tb({
10383
10383
  heading: l,
10384
10384
  "aria-label": n.props["aria-label"] ?? void 0
10385
10385
  }), u = Ie({
@@ -10390,7 +10390,7 @@ function hu(t, e, n, r = "react-aria-MenuSection") {
10390
10390
  className: n.props?.className,
10391
10391
  style: n.props?.style,
10392
10392
  values: void 0
10393
- }), d = j(dr), p = ns(t), f = t.selectionMode != null ? new bb(d, p) : d, h = wr(Bt)?.shouldCloseOnSelect, b = ue(t, {
10393
+ }), d = j(dr), p = ns(t), f = t.selectionMode != null ? new bb(d, p) : d, h = wr(Ht)?.shouldCloseOnSelect, b = ue(t, {
10394
10394
  global: !0
10395
10395
  });
10396
10396
  return delete b.id, /* @__PURE__ */ $.createElement(me.section, {
@@ -10410,7 +10410,7 @@ function hu(t, e, n, r = "react-aria-MenuSection") {
10410
10410
  f
10411
10411
  ],
10412
10412
  [
10413
- Bt,
10413
+ Ht,
10414
10414
  {
10415
10415
  shouldCloseOnSelect: t.shouldCloseOnSelect ?? h
10416
10416
  }
@@ -10421,15 +10421,15 @@ function hu(t, e, n, r = "react-aria-MenuSection") {
10421
10421
  parent: n
10422
10422
  })));
10423
10423
  }
10424
- const yb = /* @__PURE__ */ Qo(ur, hu), Bt = /* @__PURE__ */ ee(null), vb = /* @__PURE__ */ Sn(cr, function(e, n, r) {
10425
- [e, n] = Me(e, n, Bt);
10426
- let o = wr(Bt)?.id, s = j(Mr), i = nt(n), l = j(dr), { isVirtualized: a } = j(Tt), { menuItemProps: c, labelProps: u, descriptionProps: d, keyboardShortcutProps: p, ...f } = eb({
10424
+ const yb = /* @__PURE__ */ Qo(ur, hu), Ht = /* @__PURE__ */ ee(null), vb = /* @__PURE__ */ Sn(cr, function(e, n, r) {
10425
+ [e, n] = Me(e, n, Ht);
10426
+ let o = wr(Ht)?.id, s = j(Mr), i = nt(n), l = j(dr), { isVirtualized: a } = j(Pt), { menuItemProps: c, labelProps: u, descriptionProps: d, keyboardShortcutProps: p, ...f } = eb({
10427
10427
  ...e,
10428
10428
  id: o,
10429
10429
  key: r.key,
10430
10430
  selectionManager: l,
10431
10431
  isVirtualized: a
10432
- }, s, i), { hoverProps: h, isHovered: b } = kt({
10432
+ }, s, i), { hoverProps: h, isHovered: b } = Tt({
10433
10433
  isDisabled: f.isDisabled
10434
10434
  }), y = Ie({
10435
10435
  ...e,
@@ -10486,11 +10486,11 @@ const yb = /* @__PURE__ */ Qo(ur, hu), Bt = /* @__PURE__ */ ee(null), vb = /* @_
10486
10486
  }, y.children));
10487
10487
  });
10488
10488
  function xb(t, e) {
10489
- let { role: n = "dialog" } = t, r = Rt();
10489
+ let { role: n = "dialog" } = t, r = Kt();
10490
10490
  r = t["aria-label"] ? void 0 : r;
10491
10491
  let o = R(!1);
10492
10492
  U(() => {
10493
- if (e.current && !Ft(e.current)) {
10493
+ if (e.current && !jt(e.current)) {
10494
10494
  pt(e.current);
10495
10495
  let i = setTimeout(() => {
10496
10496
  (le() === e.current || le() === document.body) && (o.current = !0, e.current && (e.current.blur(), pt(e.current)), o.current = !1);
@@ -10658,7 +10658,7 @@ const wb = /* @__PURE__ */ ge(function(e, n) {
10658
10658
  return /* @__PURE__ */ $.cloneElement(s, {
10659
10659
  ...ne(r, o, s.props),
10660
10660
  // @ts-ignore
10661
- ref: Ut(i, n)
10661
+ ref: Wt(i, n)
10662
10662
  });
10663
10663
  }), Ar = /* @__PURE__ */ ee({}), gu = /* @__PURE__ */ ee(null), Sb = /* @__PURE__ */ ge(function(e, n) {
10664
10664
  let { render: r } = j(gu);
@@ -10759,7 +10759,7 @@ function Pb(t, e, n) {
10759
10759
  };
10760
10760
  }
10761
10761
  function Mb(t, e, n) {
10762
- let { key: r } = t, o = os.get(e), s = t.isDisabled ?? e.selectionManager.isDisabled(r), i = t.isSelected ?? e.selectionManager.isSelected(r), l = t.shouldSelectOnPressUp ?? o?.shouldSelectOnPressUp, a = t.shouldFocusOnHover ?? o?.shouldFocusOnHover, c = t.shouldUseVirtualFocus ?? o?.shouldUseVirtualFocus, u = t.isVirtualized ?? o?.isVirtualized, d = Rt(), p = Rt(), f = {
10762
+ let { key: r } = t, o = os.get(e), s = t.isDisabled ?? e.selectionManager.isDisabled(r), i = t.isSelected ?? e.selectionManager.isSelected(r), l = t.shouldSelectOnPressUp ?? o?.shouldSelectOnPressUp, a = t.shouldFocusOnHover ?? o?.shouldFocusOnHover, c = t.shouldUseVirtualFocus ?? o?.shouldUseVirtualFocus, u = t.isVirtualized ?? o?.isVirtualized, d = Kt(), p = Kt(), f = {
10763
10763
  role: "option",
10764
10764
  "aria-disabled": s || void 0,
10765
10765
  "aria-selected": e.selectionManager.selectionMode !== "none" ? i : void 0,
@@ -10780,12 +10780,12 @@ function Mb(t, e, n) {
10780
10780
  isVirtualized: u,
10781
10781
  shouldUseVirtualFocus: c,
10782
10782
  isDisabled: s,
10783
- onAction: b || h?.props?.onAction ? Vt(h?.props?.onAction, b) : void 0,
10783
+ onAction: b || h?.props?.onAction ? Ut(h?.props?.onAction, b) : void 0,
10784
10784
  linkBehavior: o?.linkBehavior,
10785
10785
  // @ts-ignore
10786
10786
  UNSTABLE_itemBehavior: o?.UNSTABLE_itemBehavior,
10787
10787
  id: y
10788
- }), { hoverProps: K } = kt({
10788
+ }), { hoverProps: K } = Tt({
10789
10789
  isDisabled: s || !a,
10790
10790
  onHoverStart() {
10791
10791
  ft() || (e.selectionManager.setFocused(!0), e.selectionManager.setFocusedKey(r));
@@ -10970,7 +10970,7 @@ function Lb({ props: t, listBoxRef: e, collection: n }) {
10970
10970
  children: null,
10971
10971
  items: null
10972
10972
  };
10973
- let { layoutDelegate: r } = j(Tt), o = Nb({
10973
+ let { layoutDelegate: r } = j(Pt), o = Nb({
10974
10974
  ...t,
10975
10975
  layoutDelegate: r
10976
10976
  });
@@ -10982,10 +10982,10 @@ function Lb({ props: t, listBoxRef: e, collection: n }) {
10982
10982
  }
10983
10983
  function xu({ state: t, props: e, listBoxRef: n }) {
10984
10984
  [e, n] = Me(e, n, Eo);
10985
- let { dragAndDropHooks: r, layout: o = "stack", orientation: s = "vertical", filter: i } = e, l = Db(t, i), { collection: a, selectionManager: c } = l, u = !!r?.useDraggableCollectionState, d = !!r?.useDroppableCollectionState, { direction: p } = Ct(), { disabledBehavior: f, disabledKeys: h } = c, b = lu({
10985
+ let { dragAndDropHooks: r, layout: o = "stack", orientation: s = "vertical", filter: i } = e, l = Db(t, i), { collection: a, selectionManager: c } = l, u = !!r?.useDraggableCollectionState, d = !!r?.useDroppableCollectionState, { direction: p } = kt(), { disabledBehavior: f, disabledKeys: h } = c, b = lu({
10986
10986
  usage: "search",
10987
10987
  sensitivity: "base"
10988
- }), { isVirtualized: y, layoutDelegate: v, dropTargetDelegate: x, CollectionRoot: E } = j(Tt), C = J(() => e.keyboardDelegate || new iu({
10988
+ }), { isVirtualized: y, layoutDelegate: v, dropTargetDelegate: x, CollectionRoot: E } = j(Pt), C = J(() => e.keyboardDelegate || new iu({
10989
10989
  collection: a,
10990
10990
  collator: b,
10991
10991
  ref: n,
@@ -11128,7 +11128,7 @@ function xu({ state: t, props: e, listBoxRef: n }) {
11128
11128
  }))), A, G));
11129
11129
  }
11130
11130
  function $u(t, e, n, r = "react-aria-ListBoxSection") {
11131
- let o = j(Tn), { dragAndDropHooks: s, dropState: i } = j(Ar), { CollectionBranch: l } = j(Tt), [a, c] = Zl(), { headingProps: u, groupProps: d } = Ab({
11131
+ let o = j(Tn), { dragAndDropHooks: s, dropState: i } = j(Ar), { CollectionBranch: l } = j(Pt), [a, c] = Zl(), { headingProps: u, groupProps: d } = Ab({
11132
11132
  heading: c,
11133
11133
  "aria-label": t["aria-label"] ?? void 0
11134
11134
  }), p = Ie({
@@ -11158,7 +11158,7 @@ const Rb = /* @__PURE__ */ Qo(ur, $u), Kb = /* @__PURE__ */ Sn(cr, function(e, n
11158
11158
  let o = nt(n), s = j(Tn), { dragAndDropHooks: i, dragState: l, dropState: a } = j(Ar), { optionProps: c, labelProps: u, descriptionProps: d, ...p } = Mb({
11159
11159
  key: r.key,
11160
11160
  "aria-label": e?.["aria-label"]
11161
- }, s, o), { hoverProps: f, isHovered: h } = kt({
11161
+ }, s, o), { hoverProps: f, isHovered: h } = Tt({
11162
11162
  isDisabled: !p.allowsSelection && !p.hasAction,
11163
11163
  onHoverStart: r.props.onHoverStart,
11164
11164
  onHoverChange: r.props.onHoverChange,
@@ -11337,7 +11337,7 @@ const _b = /* @__PURE__ */ ee({}), Bb = "__button_group_child", ji = ({
11337
11337
  });
11338
11338
  }, Oe = Object.assign(ji, {
11339
11339
  Root: ji
11340
- }), Yt = /* @__PURE__ */ ee({}), _i = ({
11340
+ }), Xt = /* @__PURE__ */ ee({}), _i = ({
11341
11341
  children: t,
11342
11342
  className: e,
11343
11343
  variant: n = "default",
@@ -11353,7 +11353,7 @@ const _b = /* @__PURE__ */ ee({}), Bb = "__button_group_child", ji = ({
11353
11353
  ...r,
11354
11354
  children: t
11355
11355
  });
11356
- return /* @__PURE__ */ m.jsx(Yt, {
11356
+ return /* @__PURE__ */ m.jsx(Xt, {
11357
11357
  value: {
11358
11358
  slots: o
11359
11359
  },
@@ -11373,7 +11373,7 @@ const _b = /* @__PURE__ */ ee({}), Bb = "__button_group_child", ji = ({
11373
11373
  }) => {
11374
11374
  const {
11375
11375
  slots: n
11376
- } = j(Yt);
11376
+ } = j(Xt);
11377
11377
  return /* @__PURE__ */ m.jsx(Te.div, {
11378
11378
  className: Ae(n?.header, t),
11379
11379
  "data-slot": "card-header",
@@ -11386,7 +11386,7 @@ const _b = /* @__PURE__ */ ee({}), Bb = "__button_group_child", ji = ({
11386
11386
  }) => {
11387
11387
  const {
11388
11388
  slots: r
11389
- } = j(Yt);
11389
+ } = j(Xt);
11390
11390
  return /* @__PURE__ */ m.jsx(Te.h3, {
11391
11391
  className: Ae(r?.title, e),
11392
11392
  "data-slot": "card-title",
@@ -11400,7 +11400,7 @@ const _b = /* @__PURE__ */ ee({}), Bb = "__button_group_child", ji = ({
11400
11400
  }) => {
11401
11401
  const {
11402
11402
  slots: r
11403
- } = j(Yt);
11403
+ } = j(Xt);
11404
11404
  return /* @__PURE__ */ m.jsx(Te.p, {
11405
11405
  className: Ae(r?.description, e),
11406
11406
  "data-slot": "card-description",
@@ -11413,7 +11413,7 @@ const _b = /* @__PURE__ */ ee({}), Bb = "__button_group_child", ji = ({
11413
11413
  }) => {
11414
11414
  const {
11415
11415
  slots: n
11416
- } = j(Yt);
11416
+ } = j(Xt);
11417
11417
  return /* @__PURE__ */ m.jsx(Te.div, {
11418
11418
  className: Ae(n?.content, t),
11419
11419
  "data-slot": "card-content",
@@ -11425,7 +11425,7 @@ const _b = /* @__PURE__ */ ee({}), Bb = "__button_group_child", ji = ({
11425
11425
  }) => {
11426
11426
  const {
11427
11427
  slots: n
11428
- } = j(Yt);
11428
+ } = j(Xt);
11429
11429
  return /* @__PURE__ */ m.jsx(Te.div, {
11430
11430
  className: Ae(n?.footer, t),
11431
11431
  "data-slot": "card-footer",
@@ -11536,12 +11536,12 @@ const _b = /* @__PURE__ */ ee({}), Bb = "__button_group_child", ji = ({
11536
11536
  Root: Bi,
11537
11537
  Abbr: Xb,
11538
11538
  Content: Jb
11539
- }), Ht = /* @__PURE__ */ ee({}), Hi = ({
11539
+ }), zt = /* @__PURE__ */ ee({}), Hi = ({
11540
11540
  children: t,
11541
11541
  ...e
11542
11542
  }) => {
11543
11543
  const n = $.useMemo(() => Uh(), []);
11544
- return /* @__PURE__ */ m.jsx(Ht, {
11544
+ return /* @__PURE__ */ m.jsx(zt, {
11545
11545
  value: {
11546
11546
  slots: n
11547
11547
  },
@@ -11558,8 +11558,8 @@ const _b = /* @__PURE__ */ ee({}), Bb = "__button_group_child", ji = ({
11558
11558
  }) => {
11559
11559
  const {
11560
11560
  slots: r
11561
- } = j(Ht);
11562
- return /* @__PURE__ */ m.jsx(Ht, {
11561
+ } = j(zt);
11562
+ return /* @__PURE__ */ m.jsx(zt, {
11563
11563
  value: {
11564
11564
  slots: r
11565
11565
  },
@@ -11605,7 +11605,7 @@ const _b = /* @__PURE__ */ ee({}), Bb = "__button_group_child", ji = ({
11605
11605
  }) => {
11606
11606
  const {
11607
11607
  slots: r
11608
- } = j(Ht);
11608
+ } = j(zt);
11609
11609
  return /* @__PURE__ */ m.jsx(wb, {
11610
11610
  "data-slot": "popover-dialog",
11611
11611
  ...n,
@@ -11619,7 +11619,7 @@ const _b = /* @__PURE__ */ ee({}), Bb = "__button_group_child", ji = ({
11619
11619
  }) => {
11620
11620
  const {
11621
11621
  slots: r
11622
- } = j(Ht);
11622
+ } = j(zt);
11623
11623
  return /* @__PURE__ */ m.jsx(Eb, {
11624
11624
  children: /* @__PURE__ */ m.jsx(Te.div, {
11625
11625
  className: Ae(r?.trigger, e),
@@ -11636,7 +11636,7 @@ const _b = /* @__PURE__ */ ee({}), Bb = "__button_group_child", ji = ({
11636
11636
  }) => {
11637
11637
  const {
11638
11638
  slots: r
11639
- } = j(Ht);
11639
+ } = j(zt);
11640
11640
  return /* @__PURE__ */ m.jsx(Mm, {
11641
11641
  slot: "title",
11642
11642
  ...n,
@@ -11862,7 +11862,7 @@ function dy(t) {
11862
11862
  return /* @__PURE__ */ $.createElement(ay, null, /* @__PURE__ */ $.createElement(uy, t));
11863
11863
  }
11864
11864
  function fy(t) {
11865
- let e = St(), { portalContainer: n = e ? null : document.body, ...r } = t, { getContainer: o } = rc();
11865
+ let e = Ct(), { portalContainer: n = e ? null : document.body, ...r } = t, { getContainer: o } = rc();
11866
11866
  if (!t.portalContainer && o && (n = o()), $.useEffect(() => {
11867
11867
  if (n?.closest("[data-overlay-container]")) throw new Error("An OverlayContainer must not be inside another container. Please change the portalContainer prop.");
11868
11868
  }, [
@@ -11910,7 +11910,7 @@ function Su(t = {}) {
11910
11910
  function my(t, e) {
11911
11911
  let n = ue(t, {
11912
11912
  labelable: !0
11913
- }), { hoverProps: r } = kt({
11913
+ }), { hoverProps: r } = Tt({
11914
11914
  onHoverStart: () => e?.open(!0),
11915
11915
  onHoverEnd: () => e?.close()
11916
11916
  });
@@ -11939,7 +11939,7 @@ function gy(t, e, n) {
11939
11939
  e
11940
11940
  ]);
11941
11941
  let d = () => {
11942
- o !== "focus" && (_t() === "pointer" ? l.current = !0 : l.current = !1, c());
11942
+ o !== "focus" && (Bt() === "pointer" ? l.current = !0 : l.current = !1, c());
11943
11943
  }, p = () => {
11944
11944
  o !== "focus" && (a.current = !1, l.current = !1, u());
11945
11945
  }, f = () => {
@@ -11948,7 +11948,7 @@ function gy(t, e, n) {
11948
11948
  ft() && (a.current = !0, c());
11949
11949
  }, b = () => {
11950
11950
  a.current = !1, l.current = !1, u(!0);
11951
- }, { hoverProps: y } = kt({
11951
+ }, { hoverProps: y } = Tt({
11952
11952
  isDisabled: r,
11953
11953
  onHoverStart: d,
11954
11954
  onHoverEnd: p
@@ -12392,6 +12392,7 @@ const Zr = Object.assign(qi, {
12392
12392
  children: /* @__PURE__ */ m.jsx(sc, {
12393
12393
  ...r,
12394
12394
  className: rt(e, o?.popover()),
12395
+ "data-slot": "dropdown-popover",
12395
12396
  placement: n,
12396
12397
  children: t
12397
12398
  })
@@ -12639,7 +12640,9 @@ var Hy = () => ({ editor: t, view: e }) => (requestAnimationFrame(() => {
12639
12640
  function Ee(t, e) {
12640
12641
  if (typeof t == "string") {
12641
12642
  if (!e.nodes[t])
12642
- throw Error(`There is no node type named '${t}'. Maybe you forgot to add the extension?`);
12643
+ throw Error(
12644
+ `There is no node type named '${t}'. Maybe you forgot to add the extension?`
12645
+ );
12643
12646
  return e.nodes[t];
12644
12647
  }
12645
12648
  return t;
@@ -12715,7 +12718,9 @@ function Nu(t, e, n) {
12715
12718
  function ht(t, e) {
12716
12719
  if (typeof t == "string") {
12717
12720
  if (!e.marks[t])
12718
- throw Error(`There is no mark type named '${t}'. Maybe you forgot to add the extension?`);
12721
+ throw Error(
12722
+ `There is no mark type named '${t}'. Maybe you forgot to add the extension?`
12723
+ );
12719
12724
  return e.marks[t];
12720
12725
  }
12721
12726
  return t;
@@ -12746,19 +12751,29 @@ function Je(t = 0, e = 0, n = 0) {
12746
12751
  function sv(t, e = null) {
12747
12752
  if (!e)
12748
12753
  return null;
12749
- const n = It.atStart(t), r = It.atEnd(t);
12754
+ const n = Lt.atStart(t), r = Lt.atEnd(t);
12750
12755
  if (e === "start" || e === !0)
12751
12756
  return n;
12752
12757
  if (e === "end")
12753
12758
  return r;
12754
12759
  const o = n.from, s = r.to;
12755
- return e === "all" ? Ne.create(t, Je(0, o, s), Je(t.content.size, o, s)) : Ne.create(t, Je(e, o, s), Je(e, o, s));
12760
+ return e === "all" ? Ne.create(
12761
+ t,
12762
+ Je(0, o, s),
12763
+ Je(t.content.size, o, s)
12764
+ ) : Ne.create(
12765
+ t,
12766
+ Je(e, o, s),
12767
+ Je(e, o, s)
12768
+ );
12756
12769
  }
12757
12770
  function Zi() {
12758
12771
  return navigator.platform === "Android" || /android/i.test(navigator.userAgent);
12759
12772
  }
12760
12773
  function pr() {
12761
- return ["iPad Simulator", "iPhone Simulator", "iPod Simulator", "iPad", "iPhone", "iPod"].includes(navigator.platform) || // iPad on iOS 13 detection
12774
+ return ["iPad Simulator", "iPhone Simulator", "iPod Simulator", "iPad", "iPhone", "iPod"].includes(
12775
+ navigator.platform
12776
+ ) || // iPad on iOS 13 detection
12762
12777
  navigator.userAgent.includes("Mac") && "ontouchend" in document;
12763
12778
  }
12764
12779
  function iv() {
@@ -12784,7 +12799,11 @@ var lv = (t = null, e = {}) => ({ editor: n, view: r, tr: o, dispatch: s }) => {
12784
12799
  return i(), !0;
12785
12800
  const l = sv(o.doc, t) || n.state.selection, a = n.state.selection.eq(l);
12786
12801
  return s && (a || o.setSelection(l), a && o.storedMarks && o.setStoredMarks(o.storedMarks), i()), !0;
12787
- }, av = (t, e) => (n) => t.every((r, o) => e(r, { ...n, index: o })), cv = (t, e) => ({ tr: n, commands: r }) => r.insertContentAt({ from: n.selection.from, to: n.selection.to }, t, e), Du = (t) => {
12802
+ }, av = (t, e) => (n) => t.every((r, o) => e(r, { ...n, index: o })), cv = (t, e) => ({ tr: n, commands: r }) => r.insertContentAt(
12803
+ { from: n.selection.from, to: n.selection.to },
12804
+ t,
12805
+ e
12806
+ ), Du = (t) => {
12788
12807
  const e = t.childNodes;
12789
12808
  for (let n = e.length - 1; n >= 0; n -= 1) {
12790
12809
  const r = e[n];
@@ -12794,7 +12813,9 @@ var lv = (t = null, e = {}) => ({ editor: n, view: r, tr: o, dispatch: s }) => {
12794
12813
  };
12795
12814
  function Vn(t) {
12796
12815
  if (typeof window > "u")
12797
- throw new Error("[tiptap error]: there is no window object available, so this function cannot be used");
12816
+ throw new Error(
12817
+ "[tiptap error]: there is no window object available, so this function cannot be used"
12818
+ );
12798
12819
  const e = `<body>${t}</body>`, n = new window.DOMParser().parseFromString(e, "text/html").body;
12799
12820
  return Du(n);
12800
12821
  }
@@ -12839,7 +12860,13 @@ function vn(t, e, n) {
12839
12860
  }
12840
12861
  })
12841
12862
  });
12842
- if (n.slice ? Rr.fromSchema(a).parseSlice(Vn(t), n.parseOptions) : Rr.fromSchema(a).parse(Vn(t), n.parseOptions), n.errorOnInvalidContent && i)
12863
+ if (n.slice ? Rr.fromSchema(a).parseSlice(
12864
+ Vn(t),
12865
+ n.parseOptions
12866
+ ) : Rr.fromSchema(a).parse(
12867
+ Vn(t),
12868
+ n.parseOptions
12869
+ ), n.errorOnInvalidContent && i)
12843
12870
  throw new Error("[tiptap error]: Invalid HTML content", {
12844
12871
  cause: new Error(`Invalid element found: ${l}`)
12845
12872
  });
@@ -12860,7 +12887,7 @@ function uv(t, e, n) {
12860
12887
  let i = 0;
12861
12888
  s.forEach((l, a, c, u) => {
12862
12889
  i === 0 && (i = u);
12863
- }), t.setSelection(It.near(t.doc.resolve(i), n));
12890
+ }), t.setSelection(Lt.near(t.doc.resolve(i), n));
12864
12891
  }
12865
12892
  var dv = (t) => !("type" in t), fv = (t, e, n) => ({ tr: r, dispatch: o, editor: s }) => {
12866
12893
  var i;
@@ -13027,7 +13054,11 @@ var Tv = (t, e) => ({ tr: n, state: r, dispatch: o }) => {
13027
13054
  return n.selection.ranges.forEach((c) => {
13028
13055
  r.doc.nodesBetween(c.$from.pos, c.$to.pos, (u, d) => {
13029
13056
  s && s === u.type && (a = !0, o && n.setNodeMarkup(d, void 0, Qi(u.attrs, e))), i && u.marks.length && u.marks.forEach((p) => {
13030
- i === p.type && (a = !0, o && n.addMark(d, d + u.nodeSize, i.create(Qi(p.attrs, e))));
13057
+ i === p.type && (a = !0, o && n.addMark(
13058
+ d,
13059
+ d + u.nodeSize,
13060
+ i.create(Qi(p.attrs, e))
13061
+ ));
13031
13062
  });
13032
13063
  });
13033
13064
  }), a;
@@ -13097,10 +13128,10 @@ function Ru(t, e) {
13097
13128
  function fs(t) {
13098
13129
  return (e) => Ru(e.$from, t);
13099
13130
  }
13100
- function zt(t, e, n) {
13101
- return t.config[e] === void 0 && t.parent ? zt(t.parent, e, n) : typeof t.config[e] == "function" ? t.config[e].bind({
13131
+ function Vt(t, e, n) {
13132
+ return t.config[e] === void 0 && t.parent ? Vt(t.parent, e, n) : typeof t.config[e] == "function" ? t.config[e].bind({
13102
13133
  ...n,
13103
- parent: t.parent ? zt(t.parent, e, n) : null
13134
+ parent: t.parent ? Vt(t.parent, e, n) : null
13104
13135
  }) : t.config[e];
13105
13136
  }
13106
13137
  function _v(t) {
@@ -13110,7 +13141,9 @@ function hr(t, e = void 0, ...n) {
13110
13141
  return _v(t) ? e ? t.bind(e)(...n) : t(...n) : t;
13111
13142
  }
13112
13143
  function Ku(t) {
13113
- const e = t.filter((o) => o.type === "extension"), n = t.filter((o) => o.type === "node"), r = t.filter((o) => o.type === "mark");
13144
+ const e = t.filter(
13145
+ (o) => o.type === "extension"
13146
+ ), n = t.filter((o) => o.type === "node"), r = t.filter((o) => o.type === "mark");
13114
13147
  return {
13115
13148
  baseExtensions: e,
13116
13149
  nodeExtensions: n,
@@ -13160,7 +13193,7 @@ function el(t) {
13160
13193
  }
13161
13194
  return e;
13162
13195
  }
13163
- function Xt(...t) {
13196
+ function St(...t) {
13164
13197
  return t.filter((e) => !!e).reduce((e, n) => {
13165
13198
  const r = { ...e };
13166
13199
  return Object.entries(n).forEach(([o, s]) => {
@@ -13169,10 +13202,15 @@ function Xt(...t) {
13169
13202
  return;
13170
13203
  }
13171
13204
  if (o === "class") {
13172
- const l = s ? String(s).split(" ") : [], a = r[o] ? r[o].split(" ") : [], c = l.filter((u) => !a.includes(u));
13205
+ const l = s ? String(s).split(" ") : [], a = r[o] ? r[o].split(" ") : [], c = l.filter(
13206
+ (u) => !a.includes(u)
13207
+ );
13173
13208
  r[o] = [...a, ...c].join(" ");
13174
13209
  } else if (o === "style") {
13175
- const l = new Map([...el(r[o]), ...el(s)]);
13210
+ const l = new Map([
13211
+ ...el(r[o]),
13212
+ ...el(s)
13213
+ ]);
13176
13214
  r[o] = Array.from(l.entries()).map(([a, c]) => `${a}: ${c}`).join("; ");
13177
13215
  } else
13178
13216
  r[o] = s;
@@ -13294,7 +13332,7 @@ function Qr(t, e) {
13294
13332
  name: r.name,
13295
13333
  options: r.options,
13296
13334
  storage: r.storage
13297
- }, s = hr(zt(r, "group", o));
13335
+ }, s = hr(Vt(r, "group", o));
13298
13336
  return typeof s != "string" ? !1 : s.split(" ").includes("list");
13299
13337
  }
13300
13338
  function ju(t, {
@@ -13426,7 +13464,11 @@ function tl(t, e) {
13426
13464
  }
13427
13465
  }
13428
13466
  var tx = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: n, dispatch: r, editor: o }) => {
13429
- const { selection: s, doc: i } = e, { $from: l, $to: a } = s, c = o.extensionManager.attributes, u = Jn(c, l.node().type.name, l.node().attrs);
13467
+ const { selection: s, doc: i } = e, { $from: l, $to: a } = s, c = o.extensionManager.attributes, u = Jn(
13468
+ c,
13469
+ l.node().type.name,
13470
+ l.node().attrs
13471
+ );
13430
13472
  if (s instanceof he && s.node.isBlock)
13431
13473
  return !l.parentOffset || !Gn(i, l.pos) ? !1 : (r && (t && tl(n, o.extensionManager.splittableMarks), e.split(l.pos).scrollIntoView()), !0);
13432
13474
  if (!l.parent.isBlock)
@@ -13469,7 +13511,7 @@ var tx = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: n, dispatch: r, editor
13469
13511
  for (let P = a.depth - x; P >= a.depth - 3; P -= 1)
13470
13512
  v = dt.from(a.node(P).copy(v));
13471
13513
  const E = (
13472
- // eslint-disable-next-line no-nested-ternary
13514
+ // oxlint-disable-next-line no-nested-ternary
13473
13515
  a.indexAfter(-1) < a.node(-2).childCount ? 1 : a.indexAfter(-2) < a.node(-3).childCount ? 2 : 3
13474
13516
  ), C = {
13475
13517
  ...Jn(p, a.node().type.name, a.node().attrs),
@@ -13586,11 +13628,21 @@ var ox = (t, e, n, r = {}) => ({ editor: o, tr: s, state: i, dispatch: l, chain:
13586
13628
  }
13587
13629
  }
13588
13630
  return !1;
13589
- }, cx = () => ({ tr: t, dispatch: e }) => {
13590
- const { selection: n } = t, { empty: r, ranges: o } = n;
13591
- return r || e && o.forEach((s) => {
13592
- t.removeMark(s.$from.pos, s.$to.pos);
13593
- }), !0;
13631
+ }, cx = (t = {}) => ({ tr: e, dispatch: n, editor: r }) => {
13632
+ const { ignoreClearable: o = !1 } = t, { selection: s } = e, { empty: i, ranges: l } = s;
13633
+ if (i)
13634
+ return !0;
13635
+ const { nonClearableMarks: a } = r.extensionManager;
13636
+ if (n) {
13637
+ const c = Object.values(r.schema.marks).filter(
13638
+ (u) => o || !a.includes(u.name)
13639
+ );
13640
+ l.forEach((u) => {
13641
+ for (const d of c)
13642
+ e.removeMark(u.$from.pos, u.$to.pos, d);
13643
+ });
13644
+ }
13645
+ return !0;
13594
13646
  }, ux = (t, e = {}) => ({ tr: n, state: r, dispatch: o }) => {
13595
13647
  var s;
13596
13648
  const { extendEmptyMarkRange: i = !1 } = e, { selection: l } = n, a = ht(t, r.schema), { $from: c, empty: u, ranges: d } = l;
@@ -13691,20 +13743,20 @@ var ps = class {
13691
13743
  get options() {
13692
13744
  return {
13693
13745
  ...hr(
13694
- zt(this, "addOptions", {
13746
+ Vt(this, "addOptions", {
13695
13747
  name: this.name
13696
13748
  })
13697
- ) || {}
13749
+ )
13698
13750
  };
13699
13751
  }
13700
13752
  get storage() {
13701
13753
  return {
13702
13754
  ...hr(
13703
- zt(this, "addStorage", {
13755
+ Vt(this, "addStorage", {
13704
13756
  name: this.name,
13705
13757
  options: this.options
13706
13758
  })
13707
- ) || {}
13759
+ )
13708
13760
  };
13709
13761
  }
13710
13762
  configure(t = {}) {
@@ -13794,11 +13846,15 @@ var xe = class zu extends ps {
13794
13846
  key: new De("clipboardTextSerializer"),
13795
13847
  props: {
13796
13848
  clipboardTextSerializer: () => {
13797
- const { editor: t } = this, { state: e, schema: n } = t, { doc: r, selection: o } = e, { ranges: s } = o, i = Math.min(...s.map((u) => u.$from.pos)), l = Math.max(...s.map((u) => u.$to.pos)), a = Fu(n);
13798
- return Ou(r, { from: i, to: l }, {
13799
- ...this.options.blockSeparator !== void 0 ? { blockSeparator: this.options.blockSeparator } : {},
13800
- textSerializers: a
13801
- });
13849
+ const { editor: t } = this, { state: e, schema: n } = t, { doc: r, selection: o } = e, s = Fu(n), { blockSeparator: i } = this.options, l = {
13850
+ ...i !== void 0 ? { blockSeparator: i } : {},
13851
+ textSerializers: s
13852
+ };
13853
+ return [...o.ranges].sort((c, u) => c.$from.pos - u.$from.pos).map(
13854
+ ({ $from: c, $to: u }) => Ou(r, { from: c.pos, to: u.pos }, l)
13855
+ ).join(i ?? `
13856
+
13857
+ `);
13802
13858
  }
13803
13859
  }
13804
13860
  })
@@ -13819,25 +13875,32 @@ var xe = class zu extends ps {
13819
13875
  var i, l, a, c;
13820
13876
  if ((c = (a = (l = (i = this.editor.options.coreExtensionOptions) == null ? void 0 : i.delete) == null ? void 0 : l.filterTransaction) == null ? void 0 : a.call(l, t)) != null ? c : t.getMeta("y-sync$"))
13821
13877
  return;
13822
- const u = Fv(t.before, [t, ...e]);
13878
+ const u = Fv(t.before, [
13879
+ t,
13880
+ ...e
13881
+ ]);
13823
13882
  Uv(u).forEach((f) => {
13824
- u.mapping.mapResult(f.oldRange.from).deletedAfter && u.mapping.mapResult(f.oldRange.to).deletedBefore && u.before.nodesBetween(f.oldRange.from, f.oldRange.to, (h, b) => {
13825
- const y = b + h.nodeSize - 2, v = f.oldRange.from <= b && y <= f.oldRange.to;
13826
- this.editor.emit("delete", {
13827
- type: "node",
13828
- node: h,
13829
- from: b,
13830
- to: y,
13831
- newFrom: u.mapping.map(b),
13832
- newTo: u.mapping.map(y),
13833
- deletedRange: f.oldRange,
13834
- newRange: f.newRange,
13835
- partial: !v,
13836
- editor: this.editor,
13837
- transaction: t,
13838
- combinedTransform: u
13839
- });
13840
- });
13883
+ u.mapping.mapResult(f.oldRange.from).deletedAfter && u.mapping.mapResult(f.oldRange.to).deletedBefore && u.before.nodesBetween(
13884
+ f.oldRange.from,
13885
+ f.oldRange.to,
13886
+ (h, b) => {
13887
+ const y = b + h.nodeSize - 2, v = f.oldRange.from <= b && y <= f.oldRange.to;
13888
+ this.editor.emit("delete", {
13889
+ type: "node",
13890
+ node: h,
13891
+ from: b,
13892
+ to: y,
13893
+ newFrom: u.mapping.map(b),
13894
+ newTo: u.mapping.map(y),
13895
+ deletedRange: f.oldRange,
13896
+ newRange: f.newRange,
13897
+ partial: !v,
13898
+ editor: this.editor,
13899
+ transaction: t,
13900
+ combinedTransform: u
13901
+ });
13902
+ }
13903
+ );
13841
13904
  });
13842
13905
  const p = u.mapping;
13843
13906
  u.steps.forEach((f, h) => {
@@ -13929,7 +13992,7 @@ var xe = class zu extends ps {
13929
13992
  () => i.undoInputRule(),
13930
13993
  // maybe convert first text block node to default node
13931
13994
  () => i.command(({ tr: l }) => {
13932
- const { selection: a, doc: c } = l, { empty: u, $anchor: d } = a, { pos: p, parent: f } = d, h = d.parent.isTextblock && p > 0 ? l.doc.resolve(p - 1) : d, b = h.parent.type.spec.isolating, y = d.pos - d.parentOffset, v = b && h.parent.childCount === 1 ? y === d.pos : It.atStart(c).from === p;
13995
+ const { selection: a, doc: c } = l, { empty: u, $anchor: d } = a, { pos: p, parent: f } = d, h = d.parent.isTextblock && p > 0 ? l.doc.resolve(p - 1) : d, b = h.parent.type.spec.isolating, y = d.pos - d.parentOffset, v = b && h.parent.childCount === 1 ? y === d.pos : Lt.atStart(c).from === p;
13933
13996
  return !u || !f.type.isTextblock || f.textContent.length || !v || v && d.parent.type.name === "paragraph" ? !1 : i.clearNodes();
13934
13997
  }),
13935
13998
  () => i.deleteSelection(),
@@ -13981,10 +14044,12 @@ var xe = class zu extends ps {
13981
14044
  appendTransaction: (t, e, n) => {
13982
14045
  if (t.some((b) => b.getMeta("composition")))
13983
14046
  return;
13984
- const r = t.some((b) => b.docChanged) && !e.doc.eq(n.doc), o = t.some((b) => b.getMeta("preventClearDocument"));
14047
+ const r = t.some((b) => b.docChanged) && !e.doc.eq(n.doc), o = t.some(
14048
+ (b) => b.getMeta("preventClearDocument")
14049
+ );
13985
14050
  if (!r || o)
13986
14051
  return;
13987
- const { empty: s, from: i, to: l } = e.selection, a = It.atStart(e.doc).from, c = It.atEnd(e.doc).to;
14052
+ const { empty: s, from: i, to: l } = e.selection, a = Lt.atStart(e.doc).from, c = Lt.atEnd(e.doc).to;
13988
14053
  if (s || !(i === a && l === c) || !ju(n.doc))
13989
14054
  return;
13990
14055
  const p = n.tr, f = Pu({
@@ -14320,7 +14385,9 @@ function Ix(t) {
14320
14385
  return b !== void 0 ? b : -1;
14321
14386
  },
14322
14387
  tokenize(p, f, h) {
14323
- const b = l ? new RegExp(`^\\[${d}\\s*([^\\]]*)\\]`) : new RegExp(`^\\[${d}\\s*([^\\]]*)\\]([\\s\\S]*?)\\[\\/${d}\\]`), y = p.match(b);
14388
+ const b = l ? new RegExp(`^\\[${d}\\s*([^\\]]*)\\]`) : new RegExp(
14389
+ `^\\[${d}\\s*([^\\]]*)\\]([\\s\\S]*?)\\[\\/${d}\\]`
14390
+ ), y = p.match(b);
14324
14391
  if (!y)
14325
14392
  return;
14326
14393
  let v = "", x = "";
@@ -14508,16 +14575,34 @@ var Pn = class Uu extends ps {
14508
14575
  }
14509
14576
  get middlewares() {
14510
14577
  const t = [];
14511
- return this.floatingUIOptions.flip && t.push(bl(typeof this.floatingUIOptions.flip != "boolean" ? this.floatingUIOptions.flip : void 0)), this.floatingUIOptions.shift && t.push(
14512
- yl(typeof this.floatingUIOptions.shift != "boolean" ? this.floatingUIOptions.shift : void 0)
14578
+ return this.floatingUIOptions.flip && t.push(
14579
+ bl(
14580
+ typeof this.floatingUIOptions.flip != "boolean" ? this.floatingUIOptions.flip : void 0
14581
+ )
14582
+ ), this.floatingUIOptions.shift && t.push(
14583
+ yl(
14584
+ typeof this.floatingUIOptions.shift != "boolean" ? this.floatingUIOptions.shift : void 0
14585
+ )
14513
14586
  ), this.floatingUIOptions.offset && t.push(
14514
- tf(typeof this.floatingUIOptions.offset != "boolean" ? this.floatingUIOptions.offset : void 0)
14515
- ), this.floatingUIOptions.arrow && t.push(nf(this.floatingUIOptions.arrow)), this.floatingUIOptions.size && t.push(vl(typeof this.floatingUIOptions.size != "boolean" ? this.floatingUIOptions.size : void 0)), this.floatingUIOptions.autoPlacement && t.push(
14587
+ tf(
14588
+ typeof this.floatingUIOptions.offset != "boolean" ? this.floatingUIOptions.offset : void 0
14589
+ )
14590
+ ), this.floatingUIOptions.arrow && t.push(nf(this.floatingUIOptions.arrow)), this.floatingUIOptions.size && t.push(
14591
+ vl(
14592
+ typeof this.floatingUIOptions.size != "boolean" ? this.floatingUIOptions.size : void 0
14593
+ )
14594
+ ), this.floatingUIOptions.autoPlacement && t.push(
14516
14595
  rf(
14517
14596
  typeof this.floatingUIOptions.autoPlacement != "boolean" ? this.floatingUIOptions.autoPlacement : void 0
14518
14597
  )
14519
- ), this.floatingUIOptions.hide && t.push(of(typeof this.floatingUIOptions.hide != "boolean" ? this.floatingUIOptions.hide : void 0)), this.floatingUIOptions.inline && t.push(
14520
- sf(typeof this.floatingUIOptions.inline != "boolean" ? this.floatingUIOptions.inline : void 0)
14598
+ ), this.floatingUIOptions.hide && t.push(
14599
+ of(
14600
+ typeof this.floatingUIOptions.hide != "boolean" ? this.floatingUIOptions.hide : void 0
14601
+ )
14602
+ ), this.floatingUIOptions.inline && t.push(
14603
+ sf(
14604
+ typeof this.floatingUIOptions.inline != "boolean" ? this.floatingUIOptions.inline : void 0
14605
+ )
14521
14606
  ), t;
14522
14607
  }
14523
14608
  getShouldShow(t) {
@@ -14621,7 +14706,14 @@ xe.create({
14621
14706
  function Gu(t, e) {
14622
14707
  return t ?? new De(e);
14623
14708
  }
14624
- var Ox = typeof window < "u" ? dl : U, qu = /* @__PURE__ */ new Set(["left", "opacity", "position", "top", "visibility", "width"]), Fx = /* @__PURE__ */ new Set([
14709
+ var Ox = typeof window < "u" ? dl : U, qu = /* @__PURE__ */ new Set([
14710
+ "left",
14711
+ "opacity",
14712
+ "position",
14713
+ "top",
14714
+ "visibility",
14715
+ "width"
14716
+ ]), Fx = /* @__PURE__ */ new Set([
14625
14717
  "animationIterationCount",
14626
14718
  "aspectRatio",
14627
14719
  "borderImageOutset",
@@ -14843,7 +14935,9 @@ var Dr = $.forwardRef(
14843
14935
  children: a,
14844
14936
  ...c
14845
14937
  }, u) => {
14846
- const d = R(document.createElement("div")), p = R(Gu(t, "bubbleMenu")).current;
14938
+ const d = R(document.createElement("div")), p = R(
14939
+ Gu(t, "bubbleMenu")
14940
+ ).current;
14847
14941
  Xu(d.current, c), typeof u == "function" ? u(d.current) : u && (u.current = d.current);
14848
14942
  const { editor: f } = fl(), h = e || f, b = {
14849
14943
  updateDelay: n,
@@ -14860,7 +14954,9 @@ var Dr = $.forwardRef(
14860
14954
  if (h?.isDestroyed)
14861
14955
  return;
14862
14956
  if (!h) {
14863
- console.warn("BubbleMenu component is not rendered inside of an editor component or does not have editor prop.");
14957
+ console.warn(
14958
+ "BubbleMenu component is not rendered inside of an editor component or does not have editor prop."
14959
+ );
14864
14960
  return;
14865
14961
  }
14866
14962
  const C = d.current;
@@ -14904,8 +15000,20 @@ var Dr = $.forwardRef(
14904
15000
  }
14905
15001
  );
14906
15002
  $.forwardRef(
14907
- ({ pluginKey: t, editor: e, updateDelay: n, resizeDelay: r, appendTo: o, shouldShow: s = null, options: i, children: l, ...a }, c) => {
14908
- const u = R(document.createElement("div")), d = R(Gu(t, "floatingMenu")).current;
15003
+ ({
15004
+ pluginKey: t,
15005
+ editor: e,
15006
+ updateDelay: n,
15007
+ resizeDelay: r,
15008
+ appendTo: o,
15009
+ shouldShow: s = null,
15010
+ options: i,
15011
+ children: l,
15012
+ ...a
15013
+ }, c) => {
15014
+ const u = R(document.createElement("div")), d = R(
15015
+ Gu(t, "floatingMenu")
15016
+ ).current;
14909
15017
  Xu(u.current, a), typeof c == "function" ? c(u.current) : c && (c.current = u.current);
14910
15018
  const { editor: p } = fl(), f = e || p, h = {
14911
15019
  updateDelay: n,
@@ -14953,7 +15061,16 @@ $.forwardRef(
14953
15061
  })
14954
15062
  );
14955
15063
  }
14956
- }, [y, f, n, r, s, i, o, d]), Do(l, u.current);
15064
+ }, [
15065
+ y,
15066
+ f,
15067
+ n,
15068
+ r,
15069
+ s,
15070
+ i,
15071
+ o,
15072
+ d
15073
+ ]), Do(l, u.current);
14957
15074
  }
14958
15075
  );
14959
15076
  const be = bd(({ name: t, className: e, strokeWidth: n }) => {
@@ -15000,11 +15117,11 @@ const t0 = ({
15000
15117
  h,
15001
15118
  /* @__PURE__ */ m.jsx(we.Content, { children: /* @__PURE__ */ m.jsx("p", { children: n }) })
15002
15119
  ] });
15003
- }, Ot = $.memo(t0), n0 = Sf(Cf), Ju = Ef.configure({
15120
+ }, Ft = $.memo(t0), n0 = Sf(Cf), Ju = Ef.configure({
15004
15121
  lowlight: n0
15005
15122
  }), Zu = kf.extend({
15006
15123
  renderHTML() {
15007
- return ["div", Xt(this.options.HTMLAttributes, { "data-type": this.name }), ["hr"]];
15124
+ return ["div", St(this.options.HTMLAttributes, { "data-type": this.name }), ["hr"]];
15008
15125
  }
15009
15126
  }), Ir = (t) => {
15010
15127
  const { state: e } = t, { selection: n, doc: r } = e, { empty: o, from: s, to: i } = n, l = !r.textBetween(s, i).length && (us(n) || n instanceof Io), a = n instanceof he;
@@ -15366,7 +15483,7 @@ const od = (t, e) => {
15366
15483
  }
15367
15484
  ) }),
15368
15485
  /* @__PURE__ */ m.jsx(
15369
- Ot,
15486
+ Ft,
15370
15487
  {
15371
15488
  isIconOnly: !0,
15372
15489
  isDisabled: !r,
@@ -15381,7 +15498,7 @@ const od = (t, e) => {
15381
15498
  /* @__PURE__ */ m.jsx(ke, { orientation: "vertical", className: "h-6" }),
15382
15499
  /* @__PURE__ */ m.jsxs("div", { className: "flex items-center gap-1.5", children: [
15383
15500
  /* @__PURE__ */ m.jsx(
15384
- Ot,
15501
+ Ft,
15385
15502
  {
15386
15503
  isIconOnly: !0,
15387
15504
  isDisabled: !r,
@@ -15394,7 +15511,7 @@ const od = (t, e) => {
15394
15511
  }
15395
15512
  ),
15396
15513
  /* @__PURE__ */ m.jsx(
15397
- Ot,
15514
+ Ft,
15398
15515
  {
15399
15516
  isIconOnly: !0,
15400
15517
  isDisabled: !r,
@@ -15778,7 +15895,7 @@ const od = (t, e) => {
15778
15895
  ),
15779
15896
  /* @__PURE__ */ m.jsx(Fe.Content, { placement: "bottom", children: /* @__PURE__ */ m.jsx(Fe.Dialog, { className: "p-1.5", children: /* @__PURE__ */ m.jsxs("div", { className: "flex h-8 items-center gap-1.5", children: [
15780
15897
  o.map((i) => /* @__PURE__ */ m.jsx(
15781
- Ot,
15898
+ Ft,
15782
15899
  {
15783
15900
  editor: t,
15784
15901
  isIconOnly: !0,
@@ -15792,7 +15909,7 @@ const od = (t, e) => {
15792
15909
  )),
15793
15910
  /* @__PURE__ */ m.jsx(ke, { orientation: "vertical", className: "h-6" }),
15794
15911
  s.map((i) => /* @__PURE__ */ m.jsx(
15795
- Ot,
15912
+ Ft,
15796
15913
  {
15797
15914
  editor: t,
15798
15915
  isIconOnly: !0,
@@ -15969,7 +16086,7 @@ const od = (t, e) => {
15969
16086
  /* @__PURE__ */ m.jsx(ke, { orientation: "vertical", className: "h-6" })
15970
16087
  ] }),
15971
16088
  s.map((l) => /* @__PURE__ */ m.jsx("div", { className: "flex items-center gap-0.5", children: /* @__PURE__ */ m.jsx(
15972
- Ot,
16089
+ Ft,
15973
16090
  {
15974
16091
  isIconOnly: !0,
15975
16092
  withActive: !0,
@@ -16366,7 +16483,7 @@ var _0 = Pn.create({
16366
16483
  return [{ tag: "td" }];
16367
16484
  },
16368
16485
  renderHTML({ HTMLAttributes: t }) {
16369
- return ["td", Xt(this.options.HTMLAttributes, t), 0];
16486
+ return ["td", St(this.options.HTMLAttributes, t), 0];
16370
16487
  }
16371
16488
  }), B0 = Pn.create({
16372
16489
  name: "tableHeader",
@@ -16400,7 +16517,7 @@ var _0 = Pn.create({
16400
16517
  return [{ tag: "th" }];
16401
16518
  },
16402
16519
  renderHTML({ HTMLAttributes: t }) {
16403
- return ["th", Xt(this.options.HTMLAttributes, t), 0];
16520
+ return ["th", St(this.options.HTMLAttributes, t), 0];
16404
16521
  }
16405
16522
  }), H0 = Pn.create({
16406
16523
  name: "tableRow",
@@ -16415,7 +16532,7 @@ var _0 = Pn.create({
16415
16532
  return [{ tag: "tr" }];
16416
16533
  },
16417
16534
  renderHTML({ HTMLAttributes: t }) {
16418
- return ["tr", Xt(this.options.HTMLAttributes, t), 0];
16535
+ return ["tr", St(this.options.HTMLAttributes, t), 0];
16419
16536
  }
16420
16537
  });
16421
16538
  function Ao(t, e) {
@@ -16450,8 +16567,11 @@ function ol(t, e, n, r, o, s) {
16450
16567
  a && !d ? (n.style.width = `${l}px`, n.style.minWidth = "") : (n.style.width = "", n.style.minWidth = `${l}px`);
16451
16568
  }
16452
16569
  var z0 = class {
16453
- constructor(t, e) {
16454
- this.node = t, this.cellMinWidth = e, this.dom = document.createElement("div"), this.dom.className = "tableWrapper", this.table = this.dom.appendChild(document.createElement("table")), t.attrs.style && (this.table.style.cssText = t.attrs.style), this.colgroup = this.table.appendChild(document.createElement("colgroup")), ol(t, this.colgroup, this.table, e), this.contentDOM = this.table.appendChild(document.createElement("tbody"));
16570
+ constructor(t, e, n, r = {}) {
16571
+ this.node = t, this.cellMinWidth = e, this.dom = document.createElement("div"), this.dom.className = "tableWrapper", this.table = this.dom.appendChild(document.createElement("table"));
16572
+ for (const [o, s] of Object.entries(r))
16573
+ s != null && (o === "style" ? this.table.style.cssText = String(s) : this.table.setAttribute(o, String(s)));
16574
+ t.attrs.style && (this.table.style.cssText = t.attrs.style), this.colgroup = this.table.appendChild(document.createElement("colgroup")), ol(t, this.colgroup, this.table, e), this.contentDOM = this.table.appendChild(document.createElement("tbody"));
16455
16575
  }
16456
16576
  update(t) {
16457
16577
  return t.type !== this.node.type ? !1 : (this.node = t, ol(t, this.colgroup, this.table, this.cellMinWidth), !0);
@@ -16532,7 +16652,9 @@ function X0(t, e, n = {}) {
16532
16652
  const y = [];
16533
16653
  b.content && b.content.forEach((v) => {
16534
16654
  let x = "";
16535
- v.content && Array.isArray(v.content) && v.content.length > 1 ? x = v.content.map((M) => e.renderChildren(M)).join(o) : x = v.content ? e.renderChildren(v.content) : "";
16655
+ v.content && Array.isArray(v.content) && v.content.length > 1 ? x = v.content.map(
16656
+ (M) => e.renderChildren(M)
16657
+ ).join(o) : x = v.content ? e.renderChildren(v.content) : "";
16536
16658
  const E = Y0(x), C = v.type === "tableHeader", k = j0(v.attrs);
16537
16659
  y.push({ text: E, isHeader: C, align: k });
16538
16660
  }), s.push(y);
@@ -16540,7 +16662,7 @@ function X0(t, e, n = {}) {
16540
16662
  const i = s.reduce((b, y) => Math.max(b, y.length), 0);
16541
16663
  if (i === 0)
16542
16664
  return "";
16543
- const l = new Array(i).fill(0);
16665
+ const l = Array.from({ length: i }).fill(0);
16544
16666
  s.forEach((b) => {
16545
16667
  var y;
16546
16668
  for (let v = 0; v < i; v += 1) {
@@ -16548,7 +16670,9 @@ function X0(t, e, n = {}) {
16548
16670
  E > l[v] && (l[v] = E), l[v] < 3 && (l[v] = 3);
16549
16671
  }
16550
16672
  });
16551
- const a = (b, y) => b + " ".repeat(Math.max(0, y - b.length)), c = s[0], u = c.some((b) => b.isHeader), d = new Array(i).fill(null);
16673
+ const a = (b, y) => b + " ".repeat(Math.max(0, y - b.length)), c = s[0], u = c.some((b) => b.isHeader), d = Array.from({
16674
+ length: i
16675
+ }).fill(null);
16552
16676
  s.forEach((b) => {
16553
16677
  var y;
16554
16678
  for (let v = 0; v < i; v += 1)
@@ -16556,14 +16680,16 @@ function X0(t, e, n = {}) {
16556
16680
  });
16557
16681
  let p = `
16558
16682
  `;
16559
- const f = new Array(i).fill(0).map((b, y) => u && c[y] && c[y].text || "");
16683
+ const f = Array.from({ length: i }).map(
16684
+ (b, y) => u && c[y] && c[y].text || ""
16685
+ );
16560
16686
  return p += `| ${f.map((b, y) => a(b, l[y])).join(" | ")} |
16561
16687
  `, p += `| ${l.map((b, y) => {
16562
16688
  const v = Math.max(3, b), x = d[y];
16563
16689
  return x === "left" ? `:${"-".repeat(v)}` : x === "right" ? `${"-".repeat(v)}:` : x === "center" ? `:${"-".repeat(v)}:` : "-".repeat(v);
16564
16690
  }).join(" | ")} |
16565
16691
  `, (u ? s.slice(1) : s).forEach((b) => {
16566
- p += `| ${new Array(i).fill(0).map((y, v) => a(b[v] && b[v].text || "", l[v])).join(" | ")} |
16692
+ p += `| ${Array.from({ length: i }).fill(0).map((y, v) => a(b[v] && b[v].text || "", l[v])).join(" | ")} |
16567
16693
  `;
16568
16694
  }), p;
16569
16695
  }
@@ -16597,7 +16723,7 @@ var J0 = X0, Z0 = Pn.create({
16597
16723
  }
16598
16724
  const l = [
16599
16725
  "table",
16600
- Xt(this.options.HTMLAttributes, e, {
16726
+ St(this.options.HTMLAttributes, e, {
16601
16727
  style: i()
16602
16728
  }),
16603
16729
  n,
@@ -16613,7 +16739,9 @@ var J0 = X0, Z0 = Pn.create({
16613
16739
  var l;
16614
16740
  const a = gr((l = r[i]) != null ? l : s.align), c = a ? { align: a } : {};
16615
16741
  o.push(
16616
- e.createNode("tableHeader", c, [{ type: "paragraph", content: e.parseInline(s.tokens) }])
16742
+ e.createNode("tableHeader", c, [
16743
+ { type: "paragraph", content: e.parseInline(s.tokens) }
16744
+ ])
16617
16745
  );
16618
16746
  }), n.push(e.createNode("tableRow", {}, o));
16619
16747
  }
@@ -16622,7 +16750,11 @@ var J0 = X0, Z0 = Pn.create({
16622
16750
  o.forEach((i, l) => {
16623
16751
  var a;
16624
16752
  const c = gr((a = r[l]) != null ? a : i.align), u = c ? { align: c } : {};
16625
- s.push(e.createNode("tableCell", u, [{ type: "paragraph", content: e.parseInline(i.tokens) }]));
16753
+ s.push(
16754
+ e.createNode("tableCell", u, [
16755
+ { type: "paragraph", content: e.parseInline(i.tokens) }
16756
+ ])
16757
+ );
16626
16758
  }), n.push(e.createNode("tableRow", {}, s));
16627
16759
  }), e.createNode("table", void 0, n);
16628
16760
  },
@@ -16691,7 +16823,10 @@ var J0 = X0, Z0 = Pn.create({
16691
16823
  },
16692
16824
  addNodeView() {
16693
16825
  const t = this.options.resizable && this.editor.isEditable, e = this.options.View;
16694
- return t || !e ? null : ({ node: n, view: r }) => new e(n, this.options.cellMinWidth, r);
16826
+ return t || !e ? null : ({ node: n, view: r, HTMLAttributes: o }) => {
16827
+ const s = St(this.options.HTMLAttributes, o);
16828
+ return new e(n, this.options.cellMinWidth, r, s);
16829
+ };
16695
16830
  },
16696
16831
  extendNodeSchema(t) {
16697
16832
  const e = {
@@ -16700,7 +16835,7 @@ var J0 = X0, Z0 = Pn.create({
16700
16835
  storage: t.storage
16701
16836
  };
16702
16837
  return {
16703
- tableRole: hr(zt(t, "tableRole", e))
16838
+ tableRole: hr(Vt(t, "tableRole", e))
16704
16839
  };
16705
16840
  }
16706
16841
  }), Q0 = xe.create({
@@ -17016,7 +17151,7 @@ const n$ = ge(({ items: t, command: e }, n) => {
17016
17151
  renderHTML({ HTMLAttributes: t }) {
17017
17152
  return [
17018
17153
  "div",
17019
- Xt(t, {
17154
+ St(t, {
17020
17155
  "data-type": "image-uploader",
17021
17156
  "data-uploading": String(t.uploading)
17022
17157
  })
@@ -17045,19 +17180,25 @@ const n$ = ge(({ items: t, command: e }, n) => {
17045
17180
  };
17046
17181
  }
17047
17182
  });
17048
- var l$ = ({ key: t, editor: e, onPaste: n, onDrop: r, allowedMimeTypes: o }) => new _e({
17183
+ var l$ = ({
17184
+ key: t,
17185
+ editor: e,
17186
+ onPaste: n,
17187
+ onDrop: r,
17188
+ allowedMimeTypes: o
17189
+ }) => new _e({
17049
17190
  key: t || new De("fileHandler"),
17050
17191
  props: {
17051
17192
  handleDrop(s, i) {
17052
- var l;
17053
- if (!r || !((l = i.dataTransfer) != null && l.files.length))
17193
+ var l, a;
17194
+ if (!r || (l = i.dataTransfer) != null && l.types.includes("application/x-prosemirror-slice") || !((a = i.dataTransfer) != null && a.files.length))
17054
17195
  return !1;
17055
- const a = s.posAtCoords({
17196
+ const c = s.posAtCoords({
17056
17197
  left: i.clientX,
17057
17198
  top: i.clientY
17058
17199
  });
17059
- let c = Array.from(i.dataTransfer.files);
17060
- return o && (c = c.filter((u) => o.includes(u.type))), c.length === 0 ? !1 : (i.preventDefault(), i.stopPropagation(), r(e, c, a?.pos || 0), !0);
17200
+ let u = Array.from(i.dataTransfer.files);
17201
+ return o && (u = u.filter((d) => o.includes(d.type))), u.length === 0 ? !1 : (i.preventDefault(), i.stopPropagation(), r(e, u, c?.pos || 0), !0);
17061
17202
  },
17062
17203
  handlePaste(s, i) {
17063
17204
  var l;