@dialpad/dialtone-vue 3.109.2 → 3.110.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 (38) hide show
  1. package/CHANGELOG.json +1 -1
  2. package/CHANGELOG.md +15 -0
  3. package/dist/component-documentation.json +1 -1
  4. package/dist/dialtone-vue.cjs +2 -2
  5. package/dist/dialtone-vue.js +446 -445
  6. package/dist/directives.cjs +1 -1
  7. package/dist/directives.js +29 -49
  8. package/dist/{emoji-ppApZXjY.js → emoji-Sc_SzVCR.js} +3864 -3794
  9. package/dist/emoji-czIMeeWW.cjs +1 -0
  10. package/dist/emoji.cjs +1 -1
  11. package/dist/emoji.js +4 -4
  12. package/dist/{emoji_picker-XHD9NN0X.js → emoji_picker-CZ0cEXh2.js} +2 -2
  13. package/dist/{emoji_picker-mKaAu1dm.cjs → emoji_picker-grujwrLW.cjs} +1 -1
  14. package/dist/{emoji_text_wrapper-rnrD1UpL.js → emoji_text_wrapper-PsH5vDPn.js} +1 -1
  15. package/dist/{emoji_text_wrapper-U7jKFbg1.cjs → emoji_text_wrapper-f58KMEzk.cjs} +1 -1
  16. package/dist/message_input.cjs +1 -1
  17. package/dist/message_input.js +32 -16
  18. package/dist/{rich_text_editor-G1GLwWlk.js → rich_text_editor-ILEwVbEw.js} +579 -568
  19. package/dist/{rich_text_editor-CkZ82uQY.cjs → rich_text_editor-g3YVFGwk.cjs} +2 -2
  20. package/dist/style.css +1 -1
  21. package/dist/{tooltip-Ooi51wOv.js → tooltip-Od71Luh6.js} +10 -10
  22. package/dist/types/components/item_layout/item_layout.vue.d.ts +21 -1
  23. package/dist/types/components/item_layout/item_layout.vue.d.ts.map +1 -1
  24. package/dist/types/components/list_item/list_item.vue.d.ts +12 -1
  25. package/dist/types/components/list_item/list_item.vue.d.ts.map +1 -1
  26. package/dist/types/directives/tooltip/tooltip.d.ts.map +1 -1
  27. package/dist/types/index.d.ts +1 -1
  28. package/dist/types/recipes/conversation_view/message_input/message_input.vue.d.ts +31 -0
  29. package/dist/types/recipes/conversation_view/message_input/message_input.vue.d.ts.map +1 -1
  30. package/dist/types/recipes/{list_items → item_layout}/contact_info/contact_info.vue.d.ts +1 -16
  31. package/dist/types/recipes/item_layout/contact_info/contact_info.vue.d.ts.map +1 -0
  32. package/dist/types/recipes/item_layout/contact_info/index.d.ts.map +1 -0
  33. package/dist/types/recipes/leftbar/callbox/callbox.vue.d.ts +1 -1
  34. package/package.json +4 -4
  35. package/dist/emoji-HI8urLsM.cjs +0 -1
  36. package/dist/types/recipes/list_items/contact_info/contact_info.vue.d.ts.map +0 -1
  37. package/dist/types/recipes/list_items/contact_info/index.d.ts.map +0 -1
  38. /package/dist/types/recipes/{list_items → item_layout}/contact_info/index.d.ts +0 -0
@@ -1,6 +1,6 @@
1
- import { _ as de, g as gi, d as Ga, u as Ya, e as Xa, B as Qa, h as Zo, i as Za, j as ec, k as tc, l as nc, m as Es, t as Er, n as rc, o as ic } from "./tooltip-Ooi51wOv.js";
2
- import { B as sc, w as Cr, I as oc, L as lc, C as ac, t as el, D as tl, E as cc, m as dc, o as nl } from "./emoji-ppApZXjY.js";
3
- import { openBlock as O, createElementBlock as j, toDisplayString as ut, createCommentVNode as J, createElementVNode as ht, normalizeClass as ee, resolveComponent as $, createBlock as z, resolveDynamicComponent as kt, withCtx as q, mergeProps as Tr, renderSlot as se, withKeys as Ot, withModifiers as Xt, createVNode as nt, toHandlers as rl, createSlots as uc, renderList as il, Teleport as sl, defineComponent as $t, ref as Mr, onMounted as ol, onBeforeUnmount as qi, h as ft, getCurrentInstance as hc, watchEffect as fc, nextTick as pc, unref as mc, markRaw as wr, reactive as ll, provide as Cs, customRef as gc, withDirectives as yc, Fragment as bc, vShow as kc, createTextVNode as Ki } from "vue";
1
+ import { _ as de, g as gi, d as Ga, h as qi, u as Ya, T as Xa, B as Qa, e as Za, i as ec, j as tc, k as nc, l as Es, t as Cr, m as rc, n as ic } from "./tooltip-Od71Luh6.js";
2
+ import { B as sc, w as Er, I as oc, L as lc, C as ac, t as el, D as tl, E as cc, m as dc, o as nl } from "./emoji-Sc_SzVCR.js";
3
+ import { openBlock as O, createElementBlock as j, toDisplayString as ut, createCommentVNode as J, createElementVNode as ht, normalizeClass as X, resolveComponent as $, createBlock as z, resolveDynamicComponent as kt, withCtx as q, mergeProps as Tr, renderSlot as se, withKeys as Ot, withModifiers as Xt, createVNode as nt, toHandlers as rl, createSlots as uc, renderList as il, Teleport as sl, defineComponent as $t, ref as Mr, onMounted as ol, onBeforeUnmount as Ki, h as ft, getCurrentInstance as hc, watchEffect as fc, nextTick as pc, unref as mc, markRaw as wr, reactive as ll, provide as Ts, customRef as gc, withDirectives as yc, Fragment as bc, vShow as kc, createTextVNode as Wi } from "vue";
4
4
  const Ut = {
5
5
  BUSY: "busy",
6
6
  AWAY: "away",
@@ -34,7 +34,7 @@ const Ut = {
34
34
  default: null
35
35
  }
36
36
  }
37
- }, Ec = ["aria-live"], Cc = {
37
+ }, Cc = ["aria-live"], Ec = {
38
38
  key: 0,
39
39
  "data-qa": "dt-presence-sr-text",
40
40
  class: "sr-only"
@@ -46,16 +46,16 @@ function Tc(n, e, t, r, i, s) {
46
46
  role: "status",
47
47
  "aria-live": n.$attrs.ariaLive || "off"
48
48
  }, [
49
- t.srText ? (O(), j("span", Cc, ut(t.srText), 1)) : J("", !0),
49
+ t.srText ? (O(), j("span", Ec, ut(t.srText), 1)) : J("", !0),
50
50
  ht("div", {
51
- class: ee(["d-presence__inner", {
51
+ class: X(["d-presence__inner", {
52
52
  "d-presence__inner--active": t.presence === "active",
53
53
  "d-presence__inner--away": t.presence === "away",
54
54
  "d-presence__inner--busy": t.presence === "busy",
55
55
  "d-presence__inner--offline": t.presence === "offline"
56
56
  }])
57
57
  }, null, 2)
58
- ], 8, Ec);
58
+ ], 8, Cc);
59
59
  }
60
60
  const Mc = /* @__PURE__ */ de(xc, [["render", Tc]]), jr = {
61
61
  xs: "d-avatar--xs",
@@ -70,7 +70,7 @@ const Mc = /* @__PURE__ */ de(xc, [["render", Tc]]), jr = {
70
70
  }, Oc = {
71
71
  md: "d-avatar__presence--md",
72
72
  lg: "d-avatar__presence--lg"
73
- }, Ts = {
73
+ }, Ms = {
74
74
  NONE: "",
75
75
  BUSY: "busy",
76
76
  AWAY: "away",
@@ -101,7 +101,7 @@ const Mc = /* @__PURE__ */ de(xc, [["render", Tc]]), jr = {
101
101
  "1600",
102
102
  "1700",
103
103
  "1800"
104
- ], Ms = (n) => n > 1;
104
+ ], ws = (n) => n > 1;
105
105
  function Nc() {
106
106
  return [void 0, ...sc];
107
107
  }
@@ -112,7 +112,7 @@ const Dc = (n) => {
112
112
  return e.length === 1 ? e.join("").substring(0, 2) : e.filter((t, r) => r === 0 || r === e.length - 1).map((t) => t.slice(0, 1).toUpperCase()).join("");
113
113
  }, Ic = Nc(), Rc = {
114
114
  name: "DtAvatar",
115
- components: { DtPresence: Mc, DtIcon: Cr },
115
+ components: { DtPresence: Mc, DtIcon: Er },
116
116
  inheritAttrs: !1,
117
117
  props: {
118
118
  /**
@@ -178,8 +178,8 @@ const Dc = (n) => {
178
178
  */
179
179
  presence: {
180
180
  type: String,
181
- default: Ts.NONE,
182
- validator: (n) => Object.values(Ts).includes(n)
181
+ default: Ms.NONE,
182
+ validator: (n) => Object.values(Ms).includes(n)
183
183
  },
184
184
  /**
185
185
  * A set of props to be passed into the presence component.
@@ -196,7 +196,7 @@ const Dc = (n) => {
196
196
  group: {
197
197
  type: Number,
198
198
  default: void 0,
199
- validator: (n) => Ms(n)
199
+ validator: (n) => ws(n)
200
200
  },
201
201
  /**
202
202
  * The icon that overlays the avatar
@@ -310,7 +310,7 @@ const Dc = (n) => {
310
310
  ];
311
311
  },
312
312
  showGroup() {
313
- return Ms(this.group);
313
+ return ws(this.group);
314
314
  },
315
315
  formattedGroup() {
316
316
  return this.group > 99 ? "99+" : this.group;
@@ -379,7 +379,7 @@ function _c(n, e, t, r, i, s) {
379
379
  const o = $("dt-icon"), l = $("dt-presence");
380
380
  return O(), z(kt(t.clickable ? "button" : "div"), {
381
381
  id: t.id,
382
- class: ee(s.avatarClasses),
382
+ class: X(s.avatarClasses),
383
383
  "data-qa": "dt-avatar",
384
384
  "aria-label": s.buttonAriaLabel,
385
385
  onClick: s.handleClick
@@ -387,7 +387,7 @@ function _c(n, e, t, r, i, s) {
387
387
  default: q(() => [
388
388
  ht("div", {
389
389
  ref: "canvas",
390
- class: ee([
390
+ class: X([
391
391
  t.canvasClass,
392
392
  "d-avatar__canvas",
393
393
  { "d-avatar--image-loaded": i.imageLoadedSuccessfully }
@@ -404,16 +404,16 @@ function _c(n, e, t, r, i, s) {
404
404
  key: 1,
405
405
  name: t.iconName,
406
406
  size: t.iconSize || i.AVATAR_ICON_SIZES[t.size],
407
- class: ee([t.iconClass, i.AVATAR_KIND_MODIFIERS.icon]),
407
+ class: X([t.iconClass, i.AVATAR_KIND_MODIFIERS.icon]),
408
408
  "data-qa": "dt-avatar-icon"
409
409
  }, null, 8, ["name", "size", "class"])) : (O(), j("span", {
410
410
  key: 2,
411
- class: ee([i.AVATAR_KIND_MODIFIERS.initials])
411
+ class: X([i.AVATAR_KIND_MODIFIERS.initials])
412
412
  }, ut(i.formattedInitials), 3))
413
413
  ], 2),
414
414
  t.overlayIcon || t.overlayText ? (O(), j("div", {
415
415
  key: 0,
416
- class: ee(s.overlayClasses)
416
+ class: X(s.overlayClasses)
417
417
  }, [
418
418
  t.overlayIcon ? (O(), z(o, {
419
419
  key: 0,
@@ -457,7 +457,7 @@ const Fc = /* @__PURE__ */ de(Rc, [["render", _c]]), zc = {
457
457
  }, Hc = ["href"];
458
458
  function Vc(n, e, t, r, i, s) {
459
459
  return O(), j("a", {
460
- class: ee([
460
+ class: X([
461
461
  "d-link",
462
462
  i.LINK_KIND_MODIFIERS[t.kind]
463
463
  ]),
@@ -509,7 +509,7 @@ const $c = /* @__PURE__ */ de(zc, [["render", Vc]]), jc = {
509
509
  }, qc = {
510
510
  name: "SrOnlyCloseButton",
511
511
  components: {
512
- DtIcon: Cr,
512
+ DtIcon: Er,
513
513
  DtButton: el
514
514
  },
515
515
  props: {
@@ -628,8 +628,17 @@ const Wc = /* @__PURE__ */ de(qc, [["render", Kc]]), al = ':not(:disabled):not([
628
628
  as: {
629
629
  type: String,
630
630
  default: "div"
631
+ },
632
+ /**
633
+ * Set this prop to remove the default styling.
634
+ * @values true, false
635
+ */
636
+ unstyled: {
637
+ type: Boolean,
638
+ default: !1
631
639
  }
632
- }
640
+ },
641
+ methods: { hasSlotContent: qi }
633
642
  }, Xc = {
634
643
  key: 0,
635
644
  "data-qa": "dt-item-layout-left-wrapper",
@@ -655,41 +664,43 @@ const Wc = /* @__PURE__ */ de(qc, [["render", Kc]]), al = ':not(:disabled):not([
655
664
  class: "dt-item-layout--selected"
656
665
  };
657
666
  function rd(n, e, t, r, i, s) {
658
- return O(), z(kt(t.as), { class: "dt-item-layout" }, {
667
+ return O(), z(kt(t.as), {
668
+ class: X(t.unstyled ? "dt-item-layout--custom" : "dt-item-layout")
669
+ }, {
659
670
  default: q(() => [
660
- n.$slots.left ? (O(), j("section", Xc, [
661
- se(n.$slots, "left", {}, void 0, !0)
671
+ s.hasSlotContent(n.$slots.left) ? (O(), j("section", Xc, [
672
+ se(n.$slots, "left")
662
673
  ])) : J("", !0),
663
674
  ht("section", Qc, [
664
- n.$slots.default ? (O(), j("div", Zc, [
665
- se(n.$slots, "default", {}, void 0, !0)
675
+ s.hasSlotContent(n.$slots.default) ? (O(), j("div", Zc, [
676
+ se(n.$slots, "default")
666
677
  ])) : J("", !0),
667
- n.$slots.subtitle ? (O(), j("div", {
678
+ s.hasSlotContent(n.$slots.subtitle) ? (O(), j("div", {
668
679
  key: 1,
669
680
  "data-qa": "dt-item-layout-subtitle-wrapper",
670
- class: ee(["dt-item-layout--subtitle", { "dt-item-layout--subtitle--with-title": n.$slots.default }])
681
+ class: X(["dt-item-layout--subtitle", { "dt-item-layout--subtitle--with-title": s.hasSlotContent(n.$slots.default) }])
671
682
  }, [
672
- se(n.$slots, "subtitle", {}, void 0, !0)
683
+ se(n.$slots, "subtitle")
673
684
  ], 2)) : J("", !0),
674
- n.$slots.bottom ? (O(), j("div", ed, [
675
- se(n.$slots, "bottom", {}, void 0, !0)
685
+ s.hasSlotContent(n.$slots.bottom) ? (O(), j("div", ed, [
686
+ se(n.$slots, "bottom")
676
687
  ])) : J("", !0)
677
688
  ]),
678
- n.$slots.right ? (O(), j("section", td, [
679
- se(n.$slots, "right", {}, void 0, !0)
689
+ s.hasSlotContent(n.$slots.right) ? (O(), j("section", td, [
690
+ se(n.$slots, "right")
680
691
  ])) : J("", !0),
681
- n.$slots.selected ? (O(), j("section", nd, [
682
- se(n.$slots, "selected", {}, void 0, !0)
692
+ s.hasSlotContent(n.$slots.selected) ? (O(), j("section", nd, [
693
+ se(n.$slots, "selected")
683
694
  ])) : J("", !0)
684
695
  ]),
685
696
  _: 3
686
- });
697
+ }, 8, ["class"]);
687
698
  }
688
- const ws = /* @__PURE__ */ de(Yc, [["render", rd], ["__scopeId", "data-v-411cb81e"]]), id = {
699
+ const Os = /* @__PURE__ */ de(Yc, [["render", rd]]), id = {
689
700
  name: "DtListItem",
690
701
  components: {
691
- DtItemLayout: ws,
692
- DtIcon: Cr
702
+ DtItemLayout: Os,
703
+ DtIcon: Er
693
704
  },
694
705
  /**
695
706
  * Value provided from keyboard_list_navigation.js using id prop.
@@ -789,7 +800,7 @@ const ws = /* @__PURE__ */ de(Yc, [["render", rd], ["__scopeId", "data-v-411cb81
789
800
  listItemType() {
790
801
  switch (this.type) {
791
802
  case qr.DEFAULT:
792
- return ws;
803
+ return Os;
793
804
  default:
794
805
  return null;
795
806
  }
@@ -879,7 +890,7 @@ const od = /* @__PURE__ */ de(id, [["render", sd]]), St = {
879
890
  row: "row",
880
891
  "row-reverse": "row-reverse",
881
892
  "column-reverse": "column-reverse"
882
- }, cl = ["sm", "md", "lg", "xl"], Wi = ["0", "100", "200", "300", "400", "450", "500", "600"], Os = {
893
+ }, cl = ["sm", "md", "lg", "xl"], Ui = ["0", "100", "200", "300", "400", "450", "500", "600"], vs = {
883
894
  none: void 0,
884
895
  small: "d-p4",
885
896
  medium: "d-p8",
@@ -897,7 +908,7 @@ const od = /* @__PURE__ */ de(id, [["render", sd]]), St = {
897
908
  name: "PopoverHeaderFooter",
898
909
  components: {
899
910
  DtButton: el,
900
- DtIcon: Cr
911
+ DtIcon: Er
901
912
  },
902
913
  props: {
903
914
  // eslint-disable-next-line vue/require-default-prop
@@ -943,7 +954,7 @@ const od = /* @__PURE__ */ de(id, [["render", sd]]), St = {
943
954
  ],
944
955
  data() {
945
956
  return {
946
- hasSlotContent: Zo
957
+ hasSlotContent: qi
947
958
  };
948
959
  },
949
960
  methods: {
@@ -958,7 +969,7 @@ function pd(n, e, t, r, i, s) {
958
969
  const o = $("dt-icon"), l = $("dt-button");
959
970
  return O(), j("div", {
960
971
  "data-qa": "dt-popover-header-footer",
961
- class: ee({
972
+ class: X({
962
973
  "d-popover__header": t.type === "header",
963
974
  "d-popover__footer": t.type === "footer"
964
975
  })
@@ -966,7 +977,7 @@ function pd(n, e, t, r, i, s) {
966
977
  i.hasSlotContent(n.$slots.content) ? (O(), j("div", {
967
978
  key: 0,
968
979
  "data-qa": "dt-popover-header-footer-content",
969
- class: ee([{
980
+ class: X([{
970
981
  "d-popover__header__content": t.type === "header",
971
982
  "d-popover__footer__content": t.type === "footer"
972
983
  }, t.contentClass])
@@ -1086,7 +1097,7 @@ const md = /* @__PURE__ */ de(fd, [["render", pd]]), gd = {
1086
1097
  padding: {
1087
1098
  type: String,
1088
1099
  default: "large",
1089
- validator: (n) => Object.keys(Os).some((e) => e === n)
1100
+ validator: (n) => Object.keys(vs).some((e) => e === n)
1090
1101
  },
1091
1102
  /**
1092
1103
  * Additional class name for the content wrapper element.
@@ -1359,7 +1370,7 @@ const md = /* @__PURE__ */ de(fd, [["render", pd]]), gd = {
1359
1370
  ],
1360
1371
  data() {
1361
1372
  return {
1362
- POPOVER_PADDING_CLASSES: Os,
1373
+ POPOVER_PADDING_CLASSES: vs,
1363
1374
  POPOVER_HEADER_FOOTER_PADDING_CLASSES: ld,
1364
1375
  intersectionObserver: null,
1365
1376
  isOutsideViewport: !1,
@@ -1367,7 +1378,7 @@ const md = /* @__PURE__ */ de(fd, [["render", pd]]), gd = {
1367
1378
  toAppear: !1,
1368
1379
  anchorEl: null,
1369
1380
  popoverContentEl: null,
1370
- hasSlotContent: Zo,
1381
+ hasSlotContent: qi,
1371
1382
  inTimer: null,
1372
1383
  outTimer: null
1373
1384
  };
@@ -1660,7 +1671,7 @@ function Sd(n, e, t, r, i, s) {
1660
1671
  ])) : J("", !0),
1661
1672
  (O(), z(kt(t.elementType), {
1662
1673
  ref: "popover",
1663
- class: ee(["d-popover", { "d-popover__anchor--opened": i.isOpen }]),
1674
+ class: X(["d-popover", { "d-popover__anchor--opened": i.isOpen }]),
1664
1675
  "data-qa": "dt-popover-container"
1665
1676
  }, {
1666
1677
  default: q(() => [
@@ -1716,7 +1727,7 @@ function Sd(n, e, t, r, i, s) {
1716
1727
  i.hasSlotContent(n.$slots.headerContent) || t.showCloseButton ? (O(), z(o, {
1717
1728
  key: 0,
1718
1729
  ref: "popover__header",
1719
- class: ee(i.POPOVER_HEADER_FOOTER_PADDING_CLASSES[t.padding]),
1730
+ class: X(i.POPOVER_HEADER_FOOTER_PADDING_CLASSES[t.padding]),
1720
1731
  "content-class": t.headerClass,
1721
1732
  type: "header",
1722
1733
  "show-close-button": t.showCloseButton,
@@ -1731,7 +1742,7 @@ function Sd(n, e, t, r, i, s) {
1731
1742
  ht("div", {
1732
1743
  ref: "popover__content",
1733
1744
  "data-qa": n.$attrs["data-qa"] ? `${n.$attrs["data-qa"]}-content` : "dt-popover-content",
1734
- class: ee([
1745
+ class: X([
1735
1746
  "d-popover__content",
1736
1747
  i.POPOVER_PADDING_CLASSES[t.padding],
1737
1748
  t.contentClass
@@ -1743,7 +1754,7 @@ function Sd(n, e, t, r, i, s) {
1743
1754
  key: 1,
1744
1755
  ref: "popover__footer",
1745
1756
  type: "footer",
1746
- class: ee(i.POPOVER_HEADER_FOOTER_PADDING_CLASSES[t.padding]),
1757
+ class: X(i.POPOVER_HEADER_FOOTER_PADDING_CLASSES[t.padding]),
1747
1758
  "content-class": t.footerClass
1748
1759
  }, {
1749
1760
  content: q(() => [
@@ -1765,15 +1776,15 @@ function Sd(n, e, t, r, i, s) {
1765
1776
  ]);
1766
1777
  }
1767
1778
  const gy = /* @__PURE__ */ de(gd, [["render", Sd]]);
1768
- function vs(n) {
1779
+ function As(n) {
1769
1780
  return n === St.default;
1770
1781
  }
1771
- function As(n) {
1782
+ function Ns(n) {
1772
1783
  if (ln(n) === "string")
1773
- return vs(n) ? null : St[n];
1784
+ return As(n) ? null : St[n];
1774
1785
  if (ln(n) === "object") {
1775
1786
  const { default: e } = n;
1776
- return vs(e) ? null : St[e];
1787
+ return As(e) ? null : St[e];
1777
1788
  } else
1778
1789
  return null;
1779
1790
  }
@@ -1781,15 +1792,15 @@ function ln(n) {
1781
1792
  return typeof n;
1782
1793
  }
1783
1794
  function xd(n) {
1784
- return As(n) ? `d-stack--${St[As(n)]}` : null;
1795
+ return Ns(n) ? `d-stack--${St[Ns(n)]}` : null;
1785
1796
  }
1786
- function Ed(n) {
1797
+ function Cd(n) {
1787
1798
  return ln(n) === "object" ? [
1788
1799
  ...cl.map((e) => n[e] ? `d-stack--${e}--${n[e]}` : null)
1789
1800
  ] : null;
1790
1801
  }
1791
- function Cd(n) {
1792
- return Wi.includes(n) ? `d-stack--gap-${n}` : null;
1802
+ function Ed(n) {
1803
+ return Ui.includes(n) ? `d-stack--gap-${n}` : null;
1793
1804
  }
1794
1805
  function Td(n) {
1795
1806
  if (ln(n) === "string")
@@ -1801,7 +1812,7 @@ function Td(n) {
1801
1812
  return null;
1802
1813
  }
1803
1814
  function Md(n) {
1804
- return Wi.includes(n);
1815
+ return Ui.includes(n);
1805
1816
  }
1806
1817
  const wd = {
1807
1818
  name: "DtStack",
@@ -1839,25 +1850,25 @@ const wd = {
1839
1850
  data() {
1840
1851
  return {
1841
1852
  DT_STACK_DIRECTION: St,
1842
- DT_STACK_GAP: Wi,
1853
+ DT_STACK_GAP: Ui,
1843
1854
  DT_STACK_RESPONSIVE_BREAKPOINTS: cl
1844
1855
  };
1845
1856
  },
1846
1857
  computed: {
1847
1858
  stackGap() {
1848
- return Cd(this.gap);
1859
+ return Ed(this.gap);
1849
1860
  },
1850
1861
  defaultDirection() {
1851
1862
  return xd(this.direction);
1852
1863
  },
1853
1864
  stackResponsive() {
1854
- return Ed(this.direction);
1865
+ return Cd(this.direction);
1855
1866
  }
1856
1867
  }
1857
1868
  };
1858
1869
  function Od(n, e, t, r, i, s) {
1859
1870
  return O(), z(kt(t.as), {
1860
- class: ee([
1871
+ class: X([
1861
1872
  "d-stack",
1862
1873
  s.defaultDirection,
1863
1874
  s.stackResponsive,
@@ -2204,15 +2215,15 @@ class b {
2204
2215
  */
2205
2216
  findIndex(e, t = -1) {
2206
2217
  if (e == 0)
2207
- return En(0, e);
2218
+ return Cn(0, e);
2208
2219
  if (e == this.size)
2209
- return En(this.content.length, e);
2220
+ return Cn(this.content.length, e);
2210
2221
  if (e > this.size || e < 0)
2211
2222
  throw new RangeError(`Position ${e} outside of fragment (${this})`);
2212
2223
  for (let r = 0, i = 0; ; r++) {
2213
2224
  let s = this.child(r), o = i + s.nodeSize;
2214
2225
  if (o >= e)
2215
- return o == e || t > 0 ? En(r + 1, o) : En(r, i);
2226
+ return o == e || t > 0 ? Cn(r + 1, o) : Cn(r, i);
2216
2227
  i = o;
2217
2228
  }
2218
2229
  }
@@ -2278,7 +2289,7 @@ class b {
2278
2289
  }
2279
2290
  b.empty = new b([], 0);
2280
2291
  const Kr = { index: 0, offset: 0 };
2281
- function En(n, e) {
2292
+ function Cn(n, e) {
2282
2293
  return Kr.index = n, Kr.offset = e, Kr;
2283
2294
  }
2284
2295
  function Rn(n, e) {
@@ -3473,14 +3484,14 @@ function Pd(n) {
3473
3484
  break;
3474
3485
  return e;
3475
3486
  }
3476
- function Ns(n) {
3487
+ function Ds(n) {
3477
3488
  /\D/.test(n.next) && n.err("Expected number, got '" + n.next + "'");
3478
3489
  let e = Number(n.next);
3479
3490
  return n.pos++, e;
3480
3491
  }
3481
3492
  function Ld(n, e) {
3482
- let t = Ns(n), r = t;
3483
- return n.eat(",") && (n.next != "}" ? r = Ns(n) : r = -1), n.eat("}") || n.err("Unclosed braced range"), { type: "range", min: t, max: r, expr: e };
3493
+ let t = Ds(n), r = t;
3494
+ return n.eat(",") && (n.next != "}" ? r = Ds(n) : r = -1), n.eat("}") || n.err("Unclosed braced range"), { type: "range", min: t, max: r, expr: e };
3484
3495
  }
3485
3496
  function Bd(n, e) {
3486
3497
  let t = n.nodeTypes, r = t[e];
@@ -3561,7 +3572,7 @@ function Fd(n) {
3561
3572
  function Sl(n, e) {
3562
3573
  return e - n;
3563
3574
  }
3564
- function Ds(n, e) {
3575
+ function Is(n, e) {
3565
3576
  let t = [];
3566
3577
  return r(e), t.sort(Sl);
3567
3578
  function r(i) {
@@ -3577,7 +3588,7 @@ function Ds(n, e) {
3577
3588
  }
3578
3589
  function zd(n) {
3579
3590
  let e = /* @__PURE__ */ Object.create(null);
3580
- return t(Ds(n, 0));
3591
+ return t(Is(n, 0));
3581
3592
  function t(r) {
3582
3593
  let i = [];
3583
3594
  r.forEach((o) => {
@@ -3587,7 +3598,7 @@ function zd(n) {
3587
3598
  let c;
3588
3599
  for (let d = 0; d < i.length; d++)
3589
3600
  i[d][0] == l && (c = i[d][1]);
3590
- Ds(n, a).forEach((d) => {
3601
+ Is(n, a).forEach((d) => {
3591
3602
  c || i.push([l, c = []]), c.indexOf(d) == -1 && c.push(d);
3592
3603
  });
3593
3604
  });
@@ -3620,7 +3631,7 @@ function xl(n) {
3620
3631
  }
3621
3632
  return e;
3622
3633
  }
3623
- function El(n, e) {
3634
+ function Cl(n, e) {
3624
3635
  let t = /* @__PURE__ */ Object.create(null);
3625
3636
  for (let r in n) {
3626
3637
  let i = e && e[r];
@@ -3635,19 +3646,19 @@ function El(n, e) {
3635
3646
  }
3636
3647
  return t;
3637
3648
  }
3638
- function Cl(n) {
3649
+ function El(n) {
3639
3650
  let e = /* @__PURE__ */ Object.create(null);
3640
3651
  if (n)
3641
3652
  for (let t in n)
3642
3653
  e[t] = new Vd(n[t]);
3643
3654
  return e;
3644
3655
  }
3645
- let Is = class Tl {
3656
+ let Rs = class Tl {
3646
3657
  /**
3647
3658
  @internal
3648
3659
  */
3649
3660
  constructor(e, t, r) {
3650
- this.name = e, this.schema = t, this.spec = r, this.markSet = null, this.groups = r.group ? r.group.split(" ") : [], this.attrs = Cl(r.attrs), this.defaultAttrs = xl(this.attrs), this.contentMatch = null, this.inlineContent = null, this.isBlock = !(r.inline || e == "text"), this.isText = e == "text";
3661
+ this.name = e, this.schema = t, this.spec = r, this.markSet = null, this.groups = r.group ? r.group.split(" ") : [], this.attrs = El(r.attrs), this.defaultAttrs = xl(this.attrs), this.contentMatch = null, this.inlineContent = null, this.isBlock = !(r.inline || e == "text"), this.isText = e == "text";
3651
3662
  }
3652
3663
  /**
3653
3664
  True if this is an inline type.
@@ -3701,7 +3712,7 @@ let Is = class Tl {
3701
3712
  @internal
3702
3713
  */
3703
3714
  computeAttrs(e) {
3704
- return !e && this.defaultAttrs ? this.defaultAttrs : El(this.attrs, e);
3715
+ return !e && this.defaultAttrs ? this.defaultAttrs : Cl(this.attrs, e);
3705
3716
  }
3706
3717
  /**
3707
3718
  Create a `Node` of this type. The given attributes are
@@ -3821,7 +3832,7 @@ class Or {
3821
3832
  @internal
3822
3833
  */
3823
3834
  constructor(e, t, r, i) {
3824
- this.name = e, this.rank = t, this.schema = r, this.spec = i, this.attrs = Cl(i.attrs), this.excluded = null;
3835
+ this.name = e, this.rank = t, this.schema = r, this.spec = i, this.attrs = El(i.attrs), this.excluded = null;
3825
3836
  let s = xl(this.attrs);
3826
3837
  this.instance = s ? new B(this, s) : null;
3827
3838
  }
@@ -3831,7 +3842,7 @@ class Or {
3831
3842
  they have defaults, will be added.
3832
3843
  */
3833
3844
  create(e = null) {
3834
- return !e && this.instance ? this.instance : new B(this, El(this.attrs, e));
3845
+ return !e && this.instance ? this.instance : new B(this, Cl(this.attrs, e));
3835
3846
  }
3836
3847
  /**
3837
3848
  @internal
@@ -3874,17 +3885,17 @@ class $d {
3874
3885
  let t = this.spec = {};
3875
3886
  for (let i in e)
3876
3887
  t[i] = e[i];
3877
- t.nodes = U.from(e.nodes), t.marks = U.from(e.marks || {}), this.nodes = Is.compile(this.spec.nodes, this), this.marks = Or.compile(this.spec.marks, this);
3888
+ t.nodes = U.from(e.nodes), t.marks = U.from(e.marks || {}), this.nodes = Rs.compile(this.spec.nodes, this), this.marks = Or.compile(this.spec.marks, this);
3878
3889
  let r = /* @__PURE__ */ Object.create(null);
3879
3890
  for (let i in this.nodes) {
3880
3891
  if (i in this.marks)
3881
3892
  throw new RangeError(i + " can not be both a node and a mark");
3882
3893
  let s = this.nodes[i], o = s.spec.content || "", l = s.spec.marks;
3883
- s.contentMatch = r[o] || (r[o] = xt.parse(o, this.nodes)), s.inlineContent = s.contentMatch.inlineContent, s.markSet = l == "_" ? null : l ? Rs(this, l.split(" ")) : l == "" || !s.inlineContent ? [] : null;
3894
+ s.contentMatch = r[o] || (r[o] = xt.parse(o, this.nodes)), s.inlineContent = s.contentMatch.inlineContent, s.markSet = l == "_" ? null : l ? Ps(this, l.split(" ")) : l == "" || !s.inlineContent ? [] : null;
3884
3895
  }
3885
3896
  for (let i in this.marks) {
3886
3897
  let s = this.marks[i], o = s.spec.excludes;
3887
- s.excluded = o == null ? [s] : o == "" ? [] : Rs(this, o.split(" "));
3898
+ s.excluded = o == null ? [s] : o == "" ? [] : Ps(this, o.split(" "));
3888
3899
  }
3889
3900
  this.nodeFromJSON = this.nodeFromJSON.bind(this), this.markFromJSON = this.markFromJSON.bind(this), this.topNodeType = this.nodes[this.spec.topNode || "doc"], this.cached.wrappings = /* @__PURE__ */ Object.create(null);
3890
3901
  }
@@ -3897,7 +3908,7 @@ class $d {
3897
3908
  node(e, t = null, r, i) {
3898
3909
  if (typeof e == "string")
3899
3910
  e = this.nodeType(e);
3900
- else if (e instanceof Is) {
3911
+ else if (e instanceof Rs) {
3901
3912
  if (e.schema != this)
3902
3913
  throw new RangeError("Node type from different schema used (" + e.name + ")");
3903
3914
  } else
@@ -3942,7 +3953,7 @@ class $d {
3942
3953
  return t;
3943
3954
  }
3944
3955
  }
3945
- function Rs(n, e) {
3956
+ function Ps(n, e) {
3946
3957
  let t = [];
3947
3958
  for (let r = 0; r < e.length; r++) {
3948
3959
  let i = e[r], s = n.marks[i], o = s;
@@ -3958,7 +3969,7 @@ function Rs(n, e) {
3958
3969
  }
3959
3970
  return t;
3960
3971
  }
3961
- let Ui = class Si {
3972
+ let Ji = class Si {
3962
3973
  /**
3963
3974
  Create a parser that targets the given schema, using the given
3964
3975
  parsing rules.
@@ -3977,7 +3988,7 @@ let Ui = class Si {
3977
3988
  Parse a document from the content of a DOM node.
3978
3989
  */
3979
3990
  parse(e, t = {}) {
3980
- let r = new Ls(this, t, !1);
3991
+ let r = new Bs(this, t, !1);
3981
3992
  return r.addAll(e, t.from, t.to), r.finish();
3982
3993
  }
3983
3994
  /**
@@ -3989,7 +4000,7 @@ let Ui = class Si {
3989
4000
  the left of the input and the end of nodes at the end.
3990
4001
  */
3991
4002
  parseSlice(e, t = {}) {
3992
- let r = new Ls(this, t, !0);
4003
+ let r = new Bs(this, t, !0);
3993
4004
  return r.addAll(e, t.from, t.to), S.maxOpen(r.finish());
3994
4005
  }
3995
4006
  /**
@@ -4046,13 +4057,13 @@ let Ui = class Si {
4046
4057
  for (let i in e.marks) {
4047
4058
  let s = e.marks[i].spec.parseDOM;
4048
4059
  s && s.forEach((o) => {
4049
- r(o = Bs(o)), o.mark || o.ignore || o.clearMark || (o.mark = i);
4060
+ r(o = _s(o)), o.mark || o.ignore || o.clearMark || (o.mark = i);
4050
4061
  });
4051
4062
  }
4052
4063
  for (let i in e.nodes) {
4053
4064
  let s = e.nodes[i].spec.parseDOM;
4054
4065
  s && s.forEach((o) => {
4055
- r(o = Bs(o)), o.node || o.ignore || o.mark || (o.node = i);
4066
+ r(o = _s(o)), o.node || o.ignore || o.mark || (o.node = i);
4056
4067
  });
4057
4068
  }
4058
4069
  return t;
@@ -4107,10 +4118,10 @@ const Ml = {
4107
4118
  style: !0,
4108
4119
  title: !0
4109
4120
  }, wl = { ol: !0, ul: !0 }, Fn = 1, zn = 2, Zt = 4;
4110
- function Ps(n, e, t) {
4121
+ function Ls(n, e, t) {
4111
4122
  return e != null ? (e ? Fn : 0) | (e === "full" ? zn : 0) : n && n.whitespace == "pre" ? Fn | zn : t & ~Zt;
4112
4123
  }
4113
- class Cn {
4124
+ class En {
4114
4125
  constructor(e, t, r, i, s, o, l) {
4115
4126
  this.type = e, this.attrs = t, this.marks = r, this.pendingMarks = i, this.solid = s, this.options = l, this.content = [], this.activeMarks = B.none, this.stashMarks = [], this.match = o || (l & Zt ? null : e.contentMatch);
4116
4127
  }
@@ -4154,11 +4165,11 @@ class Cn {
4154
4165
  return this.type ? this.type.inlineContent : this.content.length ? this.content[0].isInline : e.parentNode && !Ml.hasOwnProperty(e.parentNode.nodeName.toLowerCase());
4155
4166
  }
4156
4167
  }
4157
- class Ls {
4168
+ class Bs {
4158
4169
  constructor(e, t, r) {
4159
4170
  this.parser = e, this.options = t, this.isOpen = r, this.open = 0;
4160
- let i = t.topNode, s, o = Ps(null, t.preserveWhitespace, 0) | (r ? Zt : 0);
4161
- i ? s = new Cn(i.type, i.attrs, B.none, B.none, !0, t.topMatch || i.type.contentMatch, o) : r ? s = new Cn(null, null, B.none, B.none, !0, null, o) : s = new Cn(e.schema.topNodeType, null, B.none, B.none, !0, null, o), this.nodes = [s], this.find = t.findPositions, this.needsBlock = !1;
4171
+ let i = t.topNode, s, o = Ls(null, t.preserveWhitespace, 0) | (r ? Zt : 0);
4172
+ i ? s = new En(i.type, i.attrs, B.none, B.none, !0, t.topMatch || i.type.contentMatch, o) : r ? s = new En(null, null, B.none, B.none, !0, null, o) : s = new En(e.schema.topNodeType, null, B.none, B.none, !0, null, o), this.nodes = [s], this.find = t.findPositions, this.needsBlock = !1;
4162
4173
  }
4163
4174
  get top() {
4164
4175
  return this.nodes[this.open];
@@ -4327,8 +4338,8 @@ class Ls {
4327
4338
  this.closeExtra();
4328
4339
  let s = this.top;
4329
4340
  s.applyPending(e), s.match = s.match && s.match.matchType(e);
4330
- let o = Ps(e, i, s.options);
4331
- s.options & Zt && s.content.length == 0 && (o |= Zt), this.nodes.push(new Cn(e, t, s.activeMarks, s.pendingMarks, r, null, o)), this.open++;
4341
+ let o = Ls(e, i, s.options);
4342
+ s.options & Zt && s.content.length == 0 && (o |= Zt), this.nodes.push(new En(e, t, s.activeMarks, s.pendingMarks, r, null, o)), this.open++;
4332
4343
  }
4333
4344
  // Make sure all nodes above this.open are finished and added to
4334
4345
  // their parents
@@ -4453,7 +4464,7 @@ function Wd(n) {
4453
4464
  r.push(t[1], t[2].trim());
4454
4465
  return r;
4455
4466
  }
4456
- function Bs(n) {
4467
+ function _s(n) {
4457
4468
  let e = {};
4458
4469
  for (let t in n)
4459
4470
  e[t] = n[t];
@@ -4613,17 +4624,17 @@ class Ne {
4613
4624
  This can be useful as a base to build a custom serializer from.
4614
4625
  */
4615
4626
  static nodesFromSchema(e) {
4616
- let t = _s(e.nodes);
4627
+ let t = Fs(e.nodes);
4617
4628
  return t.text || (t.text = (r) => r.text), t;
4618
4629
  }
4619
4630
  /**
4620
4631
  Gather the serializers in a schema's mark specs into an object.
4621
4632
  */
4622
4633
  static marksFromSchema(e) {
4623
- return _s(e.marks);
4634
+ return Fs(e.marks);
4624
4635
  }
4625
4636
  }
4626
- function _s(n) {
4637
+ function Fs(n) {
4627
4638
  let e = {};
4628
4639
  for (let t in n) {
4629
4640
  let r = n[t].spec.toDOM;
@@ -4638,7 +4649,7 @@ const Ol = 65535, vl = Math.pow(2, 16);
4638
4649
  function Gd(n, e) {
4639
4650
  return n + e * vl;
4640
4651
  }
4641
- function Fs(n) {
4652
+ function zs(n) {
4642
4653
  return n & Ol;
4643
4654
  }
4644
4655
  function Yd(n) {
@@ -4695,7 +4706,7 @@ class pe {
4695
4706
  @internal
4696
4707
  */
4697
4708
  recover(e) {
4698
- let t = 0, r = Fs(e);
4709
+ let t = 0, r = zs(e);
4699
4710
  if (!this.inverted)
4700
4711
  for (let i = 0; i < r; i++)
4701
4712
  t += this.ranges[i * 3 + 2] - this.ranges[i * 3 + 1];
@@ -4732,7 +4743,7 @@ class pe {
4732
4743
  @internal
4733
4744
  */
4734
4745
  touches(e, t) {
4735
- let r = 0, i = Fs(t), s = this.inverted ? 2 : 1, o = this.inverted ? 1 : 2;
4746
+ let r = 0, i = zs(t), s = this.inverted ? 2 : 1, o = this.inverted ? 1 : 2;
4736
4747
  for (let l = 0; l < this.ranges.length; l += 3) {
4737
4748
  let a = this.ranges[l] - (this.inverted ? r : 0);
4738
4749
  if (a > e)
@@ -4961,11 +4972,11 @@ class V {
4961
4972
  }
4962
4973
  }
4963
4974
  }
4964
- function Ji(n, e, t) {
4975
+ function Gi(n, e, t) {
4965
4976
  let r = [];
4966
4977
  for (let i = 0; i < n.childCount; i++) {
4967
4978
  let s = n.child(i);
4968
- s.content.size && (s = s.copy(Ji(s.content, e, s))), s.isInline && (s = e(s, t, i)), r.push(s);
4979
+ s.content.size && (s = s.copy(Gi(s.content, e, s))), s.isInline && (s = e(s, t, i)), r.push(s);
4969
4980
  }
4970
4981
  return b.fromArray(r);
4971
4982
  }
@@ -4977,7 +4988,7 @@ class Ge extends re {
4977
4988
  super(), this.from = e, this.to = t, this.mark = r;
4978
4989
  }
4979
4990
  apply(e) {
4980
- let t = e.slice(this.from, this.to), r = e.resolve(this.from), i = r.node(r.sharedDepth(this.to)), s = new S(Ji(t.content, (o, l) => !o.isAtom || !l.type.allowsMarkType(this.mark.type) ? o : o.mark(this.mark.addToSet(o.marks)), i), t.openStart, t.openEnd);
4991
+ let t = e.slice(this.from, this.to), r = e.resolve(this.from), i = r.node(r.sharedDepth(this.to)), s = new S(Gi(t.content, (o, l) => !o.isAtom || !l.type.allowsMarkType(this.mark.type) ? o : o.mark(this.mark.addToSet(o.marks)), i), t.openStart, t.openEnd);
4981
4992
  return V.fromReplace(e, this.from, this.to, s);
4982
4993
  }
4983
4994
  invert() {
@@ -5016,7 +5027,7 @@ class De extends re {
5016
5027
  super(), this.from = e, this.to = t, this.mark = r;
5017
5028
  }
5018
5029
  apply(e) {
5019
- let t = e.slice(this.from, this.to), r = new S(Ji(t.content, (i) => i.mark(this.mark.removeFromSet(i.marks)), e), t.openStart, t.openEnd);
5030
+ let t = e.slice(this.from, this.to), r = new S(Gi(t.content, (i) => i.mark(this.mark.removeFromSet(i.marks)), e), t.openStart, t.openEnd);
5020
5031
  return V.fromReplace(e, this.from, this.to, r);
5021
5032
  }
5022
5033
  invert() {
@@ -5140,7 +5151,7 @@ class G extends re {
5140
5151
  super(), this.from = e, this.to = t, this.slice = r, this.structure = i;
5141
5152
  }
5142
5153
  apply(e) {
5143
- return this.structure && Ei(e, this.from, this.to) ? V.fail("Structure replace would overwrite content") : V.fromReplace(e, this.from, this.to, this.slice);
5154
+ return this.structure && Ci(e, this.from, this.to) ? V.fail("Structure replace would overwrite content") : V.fromReplace(e, this.from, this.to, this.slice);
5144
5155
  }
5145
5156
  getMap() {
5146
5157
  return new pe([this.from, this.to - this.from, this.slice.size]);
@@ -5189,7 +5200,7 @@ class K extends re {
5189
5200
  super(), this.from = e, this.to = t, this.gapFrom = r, this.gapTo = i, this.slice = s, this.insert = o, this.structure = l;
5190
5201
  }
5191
5202
  apply(e) {
5192
- if (this.structure && (Ei(e, this.from, this.gapFrom) || Ei(e, this.gapTo, this.to)))
5203
+ if (this.structure && (Ci(e, this.from, this.gapFrom) || Ci(e, this.gapTo, this.to)))
5193
5204
  return V.fail("Structure gap-replace would overwrite content");
5194
5205
  let t = e.slice(this.gapFrom, this.gapTo);
5195
5206
  if (t.openStart || t.openEnd)
@@ -5236,7 +5247,7 @@ class K extends re {
5236
5247
  }
5237
5248
  }
5238
5249
  re.jsonID("replaceAround", K);
5239
- function Ei(n, e, t) {
5250
+ function Ci(n, e, t) {
5240
5251
  let r = n.resolve(e), i = t - e, s = r.depth;
5241
5252
  for (; i > 0 && s > 0 && r.indexAfter(s) == r.node(s).childCount; )
5242
5253
  s--, i--;
@@ -5338,11 +5349,11 @@ function tu(n, e, t) {
5338
5349
  m || i.after(p + 1) < i.end(p) ? (m = !0, h = b.from(i.node(p).copy(h)), f++) : c++;
5339
5350
  n.step(new K(a, c, o, l, new S(d.append(h), u, f), d.size - u, !0));
5340
5351
  }
5341
- function Gi(n, e, t = null, r = n) {
5352
+ function Yi(n, e, t = null, r = n) {
5342
5353
  let i = nu(n, e), s = i && ru(r, e);
5343
- return s ? i.map(zs).concat({ type: e, attrs: t }).concat(s.map(zs)) : null;
5354
+ return s ? i.map(Hs).concat({ type: e, attrs: t }).concat(s.map(Hs)) : null;
5344
5355
  }
5345
- function zs(n) {
5356
+ function Hs(n) {
5346
5357
  return { type: n, attrs: null };
5347
5358
  }
5348
5359
  function nu(n, e) {
@@ -5493,7 +5504,7 @@ function uu(n, e, t) {
5493
5504
  }
5494
5505
  return null;
5495
5506
  }
5496
- function Yi(n, e, t = e, r = S.empty) {
5507
+ function Xi(n, e, t = e, r = S.empty) {
5497
5508
  if (e == t && !r.size)
5498
5509
  return null;
5499
5510
  let i = n.resolve(e), s = n.resolve(t);
@@ -5902,7 +5913,7 @@ class Fl {
5902
5913
  given `slice`.
5903
5914
  */
5904
5915
  replace(e, t = e, r = S.empty) {
5905
- let i = Yi(this.doc, e, t, r);
5916
+ let i = Xi(this.doc, e, t, r);
5906
5917
  return i && this.step(i), this;
5907
5918
  }
5908
5919
  /**
@@ -6146,7 +6157,7 @@ class N {
6146
6157
  let s = e.steps.length, o = this.ranges;
6147
6158
  for (let l = 0; l < o.length; l++) {
6148
6159
  let { $from: a, $to: c } = o[l], d = e.mapping.slice(s);
6149
- e.replaceRange(d.map(a.pos), d.map(c.pos), l ? S.empty : t), l == 0 && $s(e, s, (r ? r.isInline : i && i.isTextblock) ? -1 : 1);
6160
+ e.replaceRange(d.map(a.pos), d.map(c.pos), l ? S.empty : t), l == 0 && js(e, s, (r ? r.isInline : i && i.isTextblock) ? -1 : 1);
6150
6161
  }
6151
6162
  }
6152
6163
  /**
@@ -6157,7 +6168,7 @@ class N {
6157
6168
  let r = e.steps.length, i = this.ranges;
6158
6169
  for (let s = 0; s < i.length; s++) {
6159
6170
  let { $from: o, $to: l } = i[s], a = e.mapping.slice(r), c = a.map(o.pos), d = a.map(l.pos);
6160
- s ? e.deleteRange(c, d) : (e.replaceRangeWith(c, d, t), $s(e, r, t.isInline ? -1 : 1));
6171
+ s ? e.deleteRange(c, d) : (e.replaceRangeWith(c, d, t), js(e, r, t.isInline ? -1 : 1));
6161
6172
  }
6162
6173
  }
6163
6174
  /**
@@ -6247,16 +6258,16 @@ class bu {
6247
6258
  this.$from = e, this.$to = t;
6248
6259
  }
6249
6260
  }
6250
- let Hs = !1;
6251
- function Vs(n) {
6252
- !Hs && !n.parent.inlineContent && (Hs = !0, console.warn("TextSelection endpoint not pointing into a node with inline content (" + n.parent.type.name + ")"));
6261
+ let Vs = !1;
6262
+ function $s(n) {
6263
+ !Vs && !n.parent.inlineContent && (Vs = !0, console.warn("TextSelection endpoint not pointing into a node with inline content (" + n.parent.type.name + ")"));
6253
6264
  }
6254
6265
  class D extends N {
6255
6266
  /**
6256
6267
  Construct a text selection between the given points.
6257
6268
  */
6258
6269
  constructor(e, t = e) {
6259
- Vs(e), Vs(t), super(e, t);
6270
+ $s(e), $s(t), super(e, t);
6260
6271
  }
6261
6272
  /**
6262
6273
  Returns a resolved position if this is a cursor selection (an
@@ -6357,7 +6368,7 @@ class w extends N {
6357
6368
  return { type: "node", anchor: this.anchor };
6358
6369
  }
6359
6370
  getBookmark() {
6360
- return new Xi(this.anchor);
6371
+ return new Qi(this.anchor);
6361
6372
  }
6362
6373
  /**
6363
6374
  @internal
@@ -6383,13 +6394,13 @@ class w extends N {
6383
6394
  }
6384
6395
  w.prototype.visible = !1;
6385
6396
  N.jsonID("node", w);
6386
- class Xi {
6397
+ class Qi {
6387
6398
  constructor(e) {
6388
6399
  this.anchor = e;
6389
6400
  }
6390
6401
  map(e) {
6391
6402
  let { deleted: t, pos: r } = e.mapResult(this.anchor);
6392
- return t ? new vr(r, r) : new Xi(r);
6403
+ return t ? new vr(r, r) : new Qi(r);
6393
6404
  }
6394
6405
  resolve(e) {
6395
6406
  let t = e.resolve(this.anchor), r = t.nodeAfter;
@@ -6456,7 +6467,7 @@ function vt(n, e, t, r, i, s = !1) {
6456
6467
  }
6457
6468
  return null;
6458
6469
  }
6459
- function $s(n, e, t) {
6470
+ function js(n, e, t) {
6460
6471
  let r = n.steps.length - 1;
6461
6472
  if (r < e)
6462
6473
  return;
@@ -6468,7 +6479,7 @@ function $s(n, e, t) {
6468
6479
  o == null && (o = d);
6469
6480
  }), n.setSelection(N.near(n.doc.resolve(o), t));
6470
6481
  }
6471
- const js = 1, Tn = 2, qs = 4;
6482
+ const qs = 1, Tn = 2, Ks = 4;
6472
6483
  class Su extends Fl {
6473
6484
  /**
6474
6485
  @internal
@@ -6492,13 +6503,13 @@ class Su extends Fl {
6492
6503
  setSelection(e) {
6493
6504
  if (e.$from.doc != this.doc)
6494
6505
  throw new RangeError("Selection passed to setSelection must point at the current document");
6495
- return this.curSelection = e, this.curSelectionFor = this.steps.length, this.updated = (this.updated | js) & ~Tn, this.storedMarks = null, this;
6506
+ return this.curSelection = e, this.curSelectionFor = this.steps.length, this.updated = (this.updated | qs) & ~Tn, this.storedMarks = null, this;
6496
6507
  }
6497
6508
  /**
6498
6509
  Whether the selection was explicitly updated by this transaction.
6499
6510
  */
6500
6511
  get selectionSet() {
6501
- return (this.updated & js) > 0;
6512
+ return (this.updated & qs) > 0;
6502
6513
  }
6503
6514
  /**
6504
6515
  Set the current stored marks.
@@ -6611,21 +6622,21 @@ class Su extends Fl {
6611
6622
  when updated to the state produced by this transaction.
6612
6623
  */
6613
6624
  scrollIntoView() {
6614
- return this.updated |= qs, this;
6625
+ return this.updated |= Ks, this;
6615
6626
  }
6616
6627
  /**
6617
6628
  True when this transaction has had `scrollIntoView` called on it.
6618
6629
  */
6619
6630
  get scrolledIntoView() {
6620
- return (this.updated & qs) > 0;
6631
+ return (this.updated & Ks) > 0;
6621
6632
  }
6622
6633
  }
6623
- function Ks(n, e) {
6634
+ function Ws(n, e) {
6624
6635
  return !e || !n ? n : n.bind(e);
6625
6636
  }
6626
6637
  class Yt {
6627
6638
  constructor(e, t, r) {
6628
- this.name = e, this.init = Ks(t.init, r), this.apply = Ks(t.apply, r);
6639
+ this.name = e, this.init = Ws(t.init, r), this.apply = Ws(t.apply, r);
6629
6640
  }
6630
6641
  }
6631
6642
  const xu = [
@@ -6843,7 +6854,7 @@ function zl(n, e, t) {
6843
6854
  }
6844
6855
  return t;
6845
6856
  }
6846
- class X {
6857
+ class Q {
6847
6858
  /**
6848
6859
  Create a plugin.
6849
6860
  */
@@ -6890,20 +6901,20 @@ const oe = function(n) {
6890
6901
  let e = n.assignedSlot || n.parentNode;
6891
6902
  return e && e.nodeType == 11 ? e.host : e;
6892
6903
  };
6893
- let Ws = null;
6904
+ let Us = null;
6894
6905
  const Be = function(n, e, t) {
6895
- let r = Ws || (Ws = document.createRange());
6906
+ let r = Us || (Us = document.createRange());
6896
6907
  return r.setEnd(n, t ?? n.nodeValue.length), r.setStart(n, e || 0), r;
6897
- }, Et = function(n, e, t, r) {
6898
- return t && (Us(n, e, t, r, -1) || Us(n, e, t, r, 1));
6899
- }, Eu = /^(img|br|input|textarea|hr)$/i;
6900
- function Us(n, e, t, r, i) {
6908
+ }, Ct = function(n, e, t, r) {
6909
+ return t && (Js(n, e, t, r, -1) || Js(n, e, t, r, 1));
6910
+ }, Cu = /^(img|br|input|textarea|hr)$/i;
6911
+ function Js(n, e, t, r, i) {
6901
6912
  for (; ; ) {
6902
6913
  if (n == t && e == r)
6903
6914
  return !0;
6904
6915
  if (e == (i < 0 ? 0 : Ae(n))) {
6905
6916
  let s = n.parentNode;
6906
- if (!s || s.nodeType != 1 || Qi(n) || Eu.test(n.nodeName) || n.contentEditable == "false")
6917
+ if (!s || s.nodeType != 1 || Zi(n) || Cu.test(n.nodeName) || n.contentEditable == "false")
6907
6918
  return !1;
6908
6919
  e = oe(n) + (i < 0 ? 0 : 1), n = s;
6909
6920
  } else if (n.nodeType == 1) {
@@ -6917,7 +6928,7 @@ function Us(n, e, t, r, i) {
6917
6928
  function Ae(n) {
6918
6929
  return n.nodeType == 3 ? n.nodeValue.length : n.childNodes.length;
6919
6930
  }
6920
- function Cu(n, e, t) {
6931
+ function Eu(n, e, t) {
6921
6932
  for (let r = e == 0, i = e == Ae(n); r || i; ) {
6922
6933
  if (n == t)
6923
6934
  return !0;
@@ -6927,14 +6938,14 @@ function Cu(n, e, t) {
6927
6938
  r = r && s == 0, i = i && s == Ae(n);
6928
6939
  }
6929
6940
  }
6930
- function Qi(n) {
6941
+ function Zi(n) {
6931
6942
  let e;
6932
6943
  for (let t = n; t && !(e = t.pmViewDesc); t = t.parentNode)
6933
6944
  ;
6934
6945
  return e && e.node && e.node.isBlock && (e.dom == n || e.contentDOM == n);
6935
6946
  }
6936
6947
  const Ar = function(n) {
6937
- return n.focusNode && Et(n.focusNode, n.focusOffset, n.anchorNode, n.anchorOffset);
6948
+ return n.focusNode && Ct(n.focusNode, n.focusOffset, n.anchorNode, n.anchorOffset);
6938
6949
  };
6939
6950
  function lt(n, e) {
6940
6951
  let t = document.createEvent("Event");
@@ -6960,9 +6971,9 @@ function Mu(n, e, t) {
6960
6971
  return { node: r.startContainer, offset: r.startOffset };
6961
6972
  }
6962
6973
  }
6963
- const Ie = typeof navigator < "u" ? navigator : null, Js = typeof document < "u" ? document : null, it = Ie && Ie.userAgent || "", Ci = /Edge\/(\d+)/.exec(it), Vl = /MSIE \d/.exec(it), Ti = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(it), he = !!(Vl || Ti || Ci), Qe = Vl ? document.documentMode : Ti ? +Ti[1] : Ci ? +Ci[1] : 0, Me = !he && /gecko\/(\d+)/i.test(it);
6974
+ const Ie = typeof navigator < "u" ? navigator : null, Gs = typeof document < "u" ? document : null, it = Ie && Ie.userAgent || "", Ei = /Edge\/(\d+)/.exec(it), Vl = /MSIE \d/.exec(it), Ti = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(it), he = !!(Vl || Ti || Ei), Qe = Vl ? document.documentMode : Ti ? +Ti[1] : Ei ? +Ei[1] : 0, Me = !he && /gecko\/(\d+)/i.test(it);
6964
6975
  Me && +(/Firefox\/(\d+)/.exec(it) || [0, 0])[1];
6965
- const Mi = !he && /Chrome\/(\d+)/.exec(it), te = !!Mi, wu = Mi ? +Mi[1] : 0, le = !he && !!Ie && /Apple Computer/.test(Ie.vendor), Ft = le && (/Mobile\/\w+/.test(it) || !!Ie && Ie.maxTouchPoints > 2), ke = Ft || (Ie ? /Mac/.test(Ie.platform) : !1), Ou = Ie ? /Win/.test(Ie.platform) : !1, Ce = /Android \d/.test(it), kn = !!Js && "webkitFontSmoothing" in Js.documentElement.style, vu = kn ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
6976
+ const Mi = !he && /Chrome\/(\d+)/.exec(it), te = !!Mi, wu = Mi ? +Mi[1] : 0, le = !he && !!Ie && /Apple Computer/.test(Ie.vendor), Ft = le && (/Mobile\/\w+/.test(it) || !!Ie && Ie.maxTouchPoints > 2), ke = Ft || (Ie ? /Mac/.test(Ie.platform) : !1), Ou = Ie ? /Win/.test(Ie.platform) : !1, Ee = /Android \d/.test(it), kn = !!Gs && "webkitFontSmoothing" in Gs.documentElement.style, vu = kn ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
6966
6977
  function Au(n) {
6967
6978
  return {
6968
6979
  left: 0,
@@ -6983,7 +6994,7 @@ function Nu(n) {
6983
6994
  bottom: e.top + n.clientHeight * r
6984
6995
  };
6985
6996
  }
6986
- function Gs(n, e, t) {
6997
+ function Ys(n, e, t) {
6987
6998
  let r = n.someProp("scrollThreshold") || 0, i = n.someProp("scrollMargin") || 5, s = n.dom.ownerDocument;
6988
6999
  for (let o = t || n.dom; o; o = dn(o)) {
6989
7000
  if (o.nodeType != 1)
@@ -7079,12 +7090,12 @@ function Pu(n, e) {
7079
7090
  for (let i = 0; i < t; i++) {
7080
7091
  r.setEnd(n, i + 1), r.setStart(n, i);
7081
7092
  let s = qe(r, 1);
7082
- if (s.top != s.bottom && Zi(e, s))
7093
+ if (s.top != s.bottom && es(e, s))
7083
7094
  return { node: n, offset: i + (e.left >= (s.left + s.right) / 2 ? 1 : 0) };
7084
7095
  }
7085
7096
  return { node: n, offset: 0 };
7086
7097
  }
7087
- function Zi(n, e) {
7098
+ function es(n, e) {
7088
7099
  return n.left >= e.left - 1 && n.left <= e.right + 1 && n.top >= e.top - 1 && n.top <= e.bottom + 1;
7089
7100
  }
7090
7101
  function Lu(n, e) {
@@ -7123,7 +7134,7 @@ function Kl(n, e, t) {
7123
7134
  let l = o.getClientRects();
7124
7135
  for (let a = 0; a < l.length; a++) {
7125
7136
  let c = l[a];
7126
- if (Zi(e, c))
7137
+ if (es(e, c))
7127
7138
  return Kl(o, e, c);
7128
7139
  }
7129
7140
  }
@@ -7138,7 +7149,7 @@ function Fu(n, e) {
7138
7149
  let o = (n.root.elementFromPoint ? n.root : t).elementFromPoint(e.left, e.top), l;
7139
7150
  if (!o || !n.dom.contains(o.nodeType != 1 ? o.parentNode : o)) {
7140
7151
  let c = n.dom.getBoundingClientRect();
7141
- if (!Zi(e, c) || (o = Kl(n.dom, e, c), !o))
7152
+ if (!es(e, c) || (o = Kl(n.dom, e, c), !o))
7142
7153
  return null;
7143
7154
  }
7144
7155
  if (le)
@@ -7156,17 +7167,17 @@ function Fu(n, e) {
7156
7167
  let a = n.docView.nearestDesc(o, !0);
7157
7168
  return { pos: l, inside: a ? a.posAtStart - a.border : -1 };
7158
7169
  }
7159
- function Ys(n) {
7170
+ function Xs(n) {
7160
7171
  return n.top < n.bottom || n.left < n.right;
7161
7172
  }
7162
7173
  function qe(n, e) {
7163
7174
  let t = n.getClientRects();
7164
7175
  if (t.length) {
7165
7176
  let r = t[e < 0 ? 0 : t.length - 1];
7166
- if (Ys(r))
7177
+ if (Xs(r))
7167
7178
  return r;
7168
7179
  }
7169
- return Array.prototype.find.call(t, Ys) || n.getBoundingClientRect();
7180
+ return Array.prototype.find.call(t, Xs) || n.getBoundingClientRect();
7170
7181
  }
7171
7182
  const zu = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;
7172
7183
  function Wl(n, e, t) {
@@ -7285,11 +7296,11 @@ function $u(n, e, t) {
7285
7296
  return h != null && (l.caretBidiLevel = h), g;
7286
7297
  });
7287
7298
  }
7288
- let Xs = null, Qs = null, Zs = !1;
7299
+ let Qs = null, Zs = null, eo = !1;
7289
7300
  function ju(n, e, t) {
7290
- return Xs == e && Qs == t ? Zs : (Xs = e, Qs = t, Zs = t == "up" || t == "down" ? Hu(n, e, t) : $u(n, e, t));
7301
+ return Qs == e && Zs == t ? eo : (Qs = e, Zs = t, eo = t == "up" || t == "down" ? Hu(n, e, t) : $u(n, e, t));
7291
7302
  }
7292
- const Se = 0, eo = 1, at = 2, Re = 3;
7303
+ const Se = 0, to = 1, at = 2, Re = 3;
7293
7304
  class Sn {
7294
7305
  constructor(e, t, r, i) {
7295
7306
  this.parent = e, this.children = t, this.dom = r, this.contentDOM = i, this.dirty = Se, r.pmViewDesc = this;
@@ -7566,7 +7577,7 @@ class Sn {
7566
7577
  let h = c.focusNode.childNodes[c.focusOffset];
7567
7578
  h && h.contentEditable == "false" && (i = !0);
7568
7579
  }
7569
- if (!(i || d && le) && Et(l.node, l.offset, c.anchorNode, c.anchorOffset) && Et(a.node, a.offset, c.focusNode, c.focusOffset))
7580
+ if (!(i || d && le) && Ct(l.node, l.offset, c.anchorNode, c.anchorOffset) && Ct(a.node, a.offset, c.focusNode, c.focusOffset))
7570
7581
  return;
7571
7582
  let u = !1;
7572
7583
  if ((c.extend || e == t) && !d) {
@@ -7599,7 +7610,7 @@ class Sn {
7599
7610
  if (r == o ? e <= o && t >= r : e < o && t > r) {
7600
7611
  let l = r + s.border, a = o - s.border;
7601
7612
  if (e >= l && t <= a) {
7602
- this.dirty = e == r || t == o ? at : eo, e == l && t == a && (s.contentLost || s.dom.parentNode != this.contentDOM) ? s.dirty = Re : s.markDirty(e - l, t - l);
7613
+ this.dirty = e == r || t == o ? at : to, e == l && t == a && (s.contentLost || s.dom.parentNode != this.contentDOM) ? s.dirty = Re : s.markDirty(e - l, t - l);
7603
7614
  return;
7604
7615
  } else
7605
7616
  s.dirty = s.dom == s.contentDOM && s.dom.parentNode == this.contentDOM && !s.children.length ? at : Re;
@@ -7611,7 +7622,7 @@ class Sn {
7611
7622
  markParentsDirty() {
7612
7623
  let e = 1;
7613
7624
  for (let t = this.parent; t; t = t.parent, e++) {
7614
- let r = e == 1 ? at : eo;
7625
+ let r = e == 1 ? at : to;
7615
7626
  t.dirty < r && (t.dirty = r);
7616
7627
  }
7617
7628
  }
@@ -7679,13 +7690,13 @@ class qu extends Sn {
7679
7690
  return e.type === "characterData" && e.target.nodeValue == e.oldValue;
7680
7691
  }
7681
7692
  }
7682
- class Ct extends Sn {
7693
+ class Et extends Sn {
7683
7694
  constructor(e, t, r, i) {
7684
7695
  super(e, [], r, i), this.mark = t;
7685
7696
  }
7686
7697
  static create(e, t, r, i) {
7687
7698
  let s = i.nodeViews[t.type.name], o = s && s(t, i, r);
7688
- return (!o || !o.dom) && (o = Ne.renderSpec(document, t.type.spec.toDOM(t, r))), new Ct(e, t, o.dom, o.contentDOM || o.dom);
7699
+ return (!o || !o.dom) && (o = Ne.renderSpec(document, t.type.spec.toDOM(t, r))), new Et(e, t, o.dom, o.contentDOM || o.dom);
7689
7700
  }
7690
7701
  parseRule() {
7691
7702
  return this.dirty & Re || this.mark.type.spec.reparseInView ? null : { mark: this.mark.type.name, attrs: this.mark.attrs, contentElement: this.contentDOM };
@@ -7702,7 +7713,7 @@ class Ct extends Sn {
7702
7713
  }
7703
7714
  }
7704
7715
  slice(e, t, r) {
7705
- let i = Ct.create(this.parent, this.mark, !0, r), s = this.children, o = this.size;
7716
+ let i = Et.create(this.parent, this.mark, !0, r), s = this.children, o = this.size;
7706
7717
  t < o && (s = vi(s, t, o, r)), e > 0 && (s = vi(s, 0, e, r));
7707
7718
  for (let l = 0; l < s.length; l++)
7708
7719
  s[l].parent = i;
@@ -7836,7 +7847,7 @@ class Ze extends Sn {
7836
7847
  return this.node.isAtom;
7837
7848
  }
7838
7849
  }
7839
- function to(n, e, t, r, i) {
7850
+ function no(n, e, t, r, i) {
7840
7851
  Ql(r, e, n);
7841
7852
  let s = new Ze(void 0, n, e, t, r, r, r, i, 0);
7842
7853
  return s.contentDOM && s.updateChildren(i, 0), s;
@@ -7936,17 +7947,17 @@ function Yl(n, e, t) {
7936
7947
  let o = e[s], l = o.dom;
7937
7948
  if (l.parentNode == n) {
7938
7949
  for (; l != r; )
7939
- r = no(r), i = !0;
7950
+ r = ro(r), i = !0;
7940
7951
  r = r.nextSibling;
7941
7952
  } else
7942
7953
  i = !0, n.insertBefore(l, r);
7943
- if (o instanceof Ct) {
7954
+ if (o instanceof Et) {
7944
7955
  let a = r ? r.previousSibling : n.lastChild;
7945
7956
  Yl(o.contentDOM, o.children, t), r = a ? a.nextSibling : n.firstChild;
7946
7957
  }
7947
7958
  }
7948
7959
  for (; r; )
7949
- r = no(r), i = !0;
7960
+ r = ro(r), i = !0;
7950
7961
  i && t.trackWrites == n && (t.trackWrites = null);
7951
7962
  }
7952
7963
  const tn = function(n) {
@@ -8017,7 +8028,7 @@ function Oi(n, e) {
8017
8028
  return !1;
8018
8029
  return !0;
8019
8030
  }
8020
- function no(n) {
8031
+ function ro(n) {
8021
8032
  let e = n.nextSibling;
8022
8033
  return n.parentNode.removeChild(n), e;
8023
8034
  }
@@ -8059,7 +8070,7 @@ class Uu {
8059
8070
  if (l > -1)
8060
8071
  l > this.index && (this.changed = !0, this.destroyBetween(this.index, l)), this.top = this.top.children[this.index];
8061
8072
  else {
8062
- let a = Ct.create(this.top, e[s], t, r);
8073
+ let a = Et.create(this.top, e[s], t, r);
8063
8074
  this.top.children.splice(this.index, 0, a), this.top = a, this.changed = !0;
8064
8075
  }
8065
8076
  this.index = 0, s++;
@@ -8152,7 +8163,7 @@ class Uu {
8152
8163
  // contentEditable.
8153
8164
  addTextblockHacks() {
8154
8165
  let e = this.top.children[this.index - 1], t = this.top;
8155
- for (; e instanceof Ct; )
8166
+ for (; e instanceof Et; )
8156
8167
  t = e, e = t.children[t.children.length - 1];
8157
8168
  (!e || // Empty textblock
8158
8169
  !(e instanceof Nr) || /\n$/.test(e.node.text) || this.view.requiresGeckoHackNode && /\s$/.test(e.node.text)) && ((le || te) && e && e.dom.contentEditable == "false" && this.addHackNode("IMG", t), this.addHackNode("BR", this.top));
@@ -8179,7 +8190,7 @@ function Ju(n, e) {
8179
8190
  for (; ; )
8180
8191
  if (r) {
8181
8192
  let c = t.children[r - 1];
8182
- if (c instanceof Ct)
8193
+ if (c instanceof Et)
8183
8194
  t = c, r = c.children.length;
8184
8195
  else {
8185
8196
  l = c, r--;
@@ -8300,7 +8311,7 @@ function vi(n, e, t, r, i) {
8300
8311
  }
8301
8312
  return s;
8302
8313
  }
8303
- function es(n, e = null) {
8314
+ function ts(n, e = null) {
8304
8315
  let t = n.domSelectionRange(), r = n.state.doc;
8305
8316
  if (!t.focusNode)
8306
8317
  return null;
@@ -8312,7 +8323,7 @@ function es(n, e = null) {
8312
8323
  for (a = l; i && !i.node; )
8313
8324
  i = i.parent;
8314
8325
  let d = i.node;
8315
- if (i && d.isAtom && w.isSelectable(d) && i.parent && !(d.isInline && Cu(t.focusNode, t.focusOffset, i.dom))) {
8326
+ if (i && d.isAtom && w.isSelectable(d) && i.parent && !(d.isInline && Eu(t.focusNode, t.focusOffset, i.dom))) {
8316
8327
  let u = i.posBefore;
8317
8328
  c = new w(o == u ? l : r.resolve(u));
8318
8329
  }
@@ -8324,7 +8335,7 @@ function es(n, e = null) {
8324
8335
  }
8325
8336
  if (!c) {
8326
8337
  let d = e == "pointer" || n.state.selection.head < l.pos && !s ? 1 : -1;
8327
- c = ts(n, a, l, d);
8338
+ c = ns(n, a, l, d);
8328
8339
  }
8329
8340
  return c;
8330
8341
  }
@@ -8336,7 +8347,7 @@ function Fe(n, e = !1) {
8336
8347
  if (ea(n, t), !!Zl(n)) {
8337
8348
  if (!e && n.input.mouseDown && n.input.mouseDown.allowDefault && te) {
8338
8349
  let r = n.domSelectionRange(), i = n.domObserver.currentSelection;
8339
- if (r.anchorNode && i.anchorNode && Et(r.anchorNode, r.anchorOffset, i.anchorNode, i.anchorOffset)) {
8350
+ if (r.anchorNode && i.anchorNode && Ct(r.anchorNode, r.anchorOffset, i.anchorNode, i.anchorOffset)) {
8340
8351
  n.input.mouseDown.delayedSelectionSync = !0, n.domObserver.setCurSelection();
8341
8352
  return;
8342
8353
  }
@@ -8345,13 +8356,13 @@ function Fe(n, e = !1) {
8345
8356
  th(n);
8346
8357
  else {
8347
8358
  let { anchor: r, head: i } = t, s, o;
8348
- ro && !(t instanceof D) && (t.$from.parent.inlineContent || (s = io(n, t.from)), !t.empty && !t.$from.parent.inlineContent && (o = io(n, t.to))), n.docView.setSelection(r, i, n.root, e), ro && (s && so(s), o && so(o)), t.visible ? n.dom.classList.remove("ProseMirror-hideselection") : (n.dom.classList.add("ProseMirror-hideselection"), "onselectionchange" in document && eh(n));
8359
+ io && !(t instanceof D) && (t.$from.parent.inlineContent || (s = so(n, t.from)), !t.empty && !t.$from.parent.inlineContent && (o = so(n, t.to))), n.docView.setSelection(r, i, n.root, e), io && (s && oo(s), o && oo(o)), t.visible ? n.dom.classList.remove("ProseMirror-hideselection") : (n.dom.classList.add("ProseMirror-hideselection"), "onselectionchange" in document && eh(n));
8349
8360
  }
8350
8361
  n.domObserver.setCurSelection(), n.domObserver.connectSelection();
8351
8362
  }
8352
8363
  }
8353
- const ro = le || te && wu < 63;
8354
- function io(n, e) {
8364
+ const io = le || te && wu < 63;
8365
+ function so(n, e) {
8355
8366
  let { node: t, offset: r } = n.docView.domFromPos(e, 0), i = r < t.childNodes.length ? t.childNodes[r] : null, s = r ? t.childNodes[r - 1] : null;
8356
8367
  if (le && i && i.contentEditable == "false")
8357
8368
  return ni(i);
@@ -8365,7 +8376,7 @@ function io(n, e) {
8365
8376
  function ni(n) {
8366
8377
  return n.contentEditable = "true", le && n.draggable && (n.draggable = !1, n.wasDraggable = !0), n;
8367
8378
  }
8368
- function so(n) {
8379
+ function oo(n) {
8369
8380
  n.contentEditable = "false", n.wasDraggable && (n.draggable = !0, n.wasDraggable = null);
8370
8381
  }
8371
8382
  function eh(n) {
@@ -8385,17 +8396,17 @@ function th(n) {
8385
8396
  function ea(n, e) {
8386
8397
  if (e instanceof w) {
8387
8398
  let t = n.docView.descAt(e.from);
8388
- t != n.lastSelectedViewDesc && (oo(n), t && t.selectNode(), n.lastSelectedViewDesc = t);
8399
+ t != n.lastSelectedViewDesc && (lo(n), t && t.selectNode(), n.lastSelectedViewDesc = t);
8389
8400
  } else
8390
- oo(n);
8401
+ lo(n);
8391
8402
  }
8392
- function oo(n) {
8403
+ function lo(n) {
8393
8404
  n.lastSelectedViewDesc && (n.lastSelectedViewDesc.parent && n.lastSelectedViewDesc.deselectNode(), n.lastSelectedViewDesc = void 0);
8394
8405
  }
8395
- function ts(n, e, t, r) {
8406
+ function ns(n, e, t, r) {
8396
8407
  return n.someProp("createSelectionBetween", (i) => i(n, e, t)) || D.between(e, t, r);
8397
8408
  }
8398
- function lo(n) {
8409
+ function ao(n) {
8399
8410
  return n.editable && !n.hasFocus() ? !1 : ta(n);
8400
8411
  }
8401
8412
  function ta(n) {
@@ -8410,7 +8421,7 @@ function ta(n) {
8410
8421
  }
8411
8422
  function nh(n) {
8412
8423
  let e = n.docView.domFromPos(n.state.selection.anchor, 0), t = n.domSelectionRange();
8413
- return Et(e.node, e.offset, t.anchorNode, t.anchorOffset);
8424
+ return Ct(e.node, e.offset, t.anchorNode, t.anchorOffset);
8414
8425
  }
8415
8426
  function Ai(n, e) {
8416
8427
  let { $anchor: t, $head: r } = n.selection, i = e > 0 ? t.max(r) : t.min(r), s = i.parent.inlineContent ? i.depth ? n.doc.resolve(e > 0 ? i.after() : i.before()) : null : i;
@@ -8419,7 +8430,7 @@ function Ai(n, e) {
8419
8430
  function Ke(n, e) {
8420
8431
  return n.dispatch(n.state.tr.setSelection(e).scrollIntoView()), !0;
8421
8432
  }
8422
- function ao(n, e, t) {
8433
+ function co(n, e, t) {
8423
8434
  let r = n.state.selection;
8424
8435
  if (r instanceof D)
8425
8436
  if (t.indexOf("s") > -1) {
@@ -8533,7 +8544,7 @@ function na(n) {
8533
8544
  return e && e.node && e.node.isBlock;
8534
8545
  }
8535
8546
  function sh(n, e) {
8536
- for (; n && e == n.childNodes.length && !Qi(n); )
8547
+ for (; n && e == n.childNodes.length && !Zi(n); )
8537
8548
  e = oe(n) + 1, n = n.parentNode;
8538
8549
  for (; n && e < n.childNodes.length; ) {
8539
8550
  let t = n.childNodes[e];
@@ -8545,7 +8556,7 @@ function sh(n, e) {
8545
8556
  }
8546
8557
  }
8547
8558
  function oh(n, e) {
8548
- for (; n && !e && !Qi(n); )
8559
+ for (; n && !e && !Zi(n); )
8549
8560
  e = oe(n), n = n.parentNode;
8550
8561
  for (; n && e; ) {
8551
8562
  let t = n.childNodes[e - 1];
@@ -8573,7 +8584,7 @@ function Ni(n, e, t) {
8573
8584
  n.state == i && Fe(n);
8574
8585
  }, 50);
8575
8586
  }
8576
- function co(n, e) {
8587
+ function uo(n, e) {
8577
8588
  let t = n.state.doc.resolve(e);
8578
8589
  if (!(te || Ou) && t.parent.inlineContent) {
8579
8590
  let i = n.coordsAtPos(e);
@@ -8590,7 +8601,7 @@ function co(n, e) {
8590
8601
  }
8591
8602
  return getComputedStyle(n.dom).direction == "rtl" ? "rtl" : "ltr";
8592
8603
  }
8593
- function uo(n, e, t) {
8604
+ function ho(n, e, t) {
8594
8605
  let r = n.state.selection;
8595
8606
  if (r instanceof D && !r.empty || t.indexOf("s") > -1 || ke && t.indexOf("m") > -1)
8596
8607
  return !1;
@@ -8606,7 +8617,7 @@ function uo(n, e, t) {
8606
8617
  }
8607
8618
  return !1;
8608
8619
  }
8609
- function ho(n, e) {
8620
+ function fo(n, e) {
8610
8621
  if (!(n.state.selection instanceof D))
8611
8622
  return !0;
8612
8623
  let { $head: t, $anchor: r, empty: i } = n.state.selection;
@@ -8623,7 +8634,7 @@ function ho(n, e) {
8623
8634
  }
8624
8635
  return !1;
8625
8636
  }
8626
- function fo(n, e, t) {
8637
+ function po(n, e, t) {
8627
8638
  n.domObserver.stop(), e.contentEditable = t, n.domObserver.start();
8628
8639
  }
8629
8640
  function lh(n) {
@@ -8632,7 +8643,7 @@ function lh(n) {
8632
8643
  let { focusNode: e, focusOffset: t } = n.domSelectionRange();
8633
8644
  if (e && e.nodeType == 1 && t == 0 && e.firstChild && e.firstChild.contentEditable == "false") {
8634
8645
  let r = e.firstChild;
8635
- fo(n, r, "true"), setTimeout(() => fo(n, r, "false"), 20);
8646
+ po(n, r, "true"), setTimeout(() => po(n, r, "false"), 20);
8636
8647
  }
8637
8648
  return !1;
8638
8649
  }
@@ -8643,22 +8654,22 @@ function ah(n) {
8643
8654
  function ch(n, e) {
8644
8655
  let t = e.keyCode, r = ah(e);
8645
8656
  if (t == 8 || ke && t == 72 && r == "c")
8646
- return ho(n, -1) || Mt(n, -1);
8657
+ return fo(n, -1) || Mt(n, -1);
8647
8658
  if (t == 46 && !e.shiftKey || ke && t == 68 && r == "c")
8648
- return ho(n, 1) || Mt(n, 1);
8659
+ return fo(n, 1) || Mt(n, 1);
8649
8660
  if (t == 13 || t == 27)
8650
8661
  return !0;
8651
8662
  if (t == 37 || ke && t == 66 && r == "c") {
8652
- let i = t == 37 ? co(n, n.state.selection.from) == "ltr" ? -1 : 1 : -1;
8653
- return ao(n, i, r) || Mt(n, i);
8663
+ let i = t == 37 ? uo(n, n.state.selection.from) == "ltr" ? -1 : 1 : -1;
8664
+ return co(n, i, r) || Mt(n, i);
8654
8665
  } else if (t == 39 || ke && t == 70 && r == "c") {
8655
- let i = t == 39 ? co(n, n.state.selection.from) == "ltr" ? 1 : -1 : 1;
8656
- return ao(n, i, r) || Mt(n, i);
8666
+ let i = t == 39 ? uo(n, n.state.selection.from) == "ltr" ? 1 : -1 : 1;
8667
+ return co(n, i, r) || Mt(n, i);
8657
8668
  } else {
8658
8669
  if (t == 38 || ke && t == 80 && r == "c")
8659
- return uo(n, -1, r) || Mt(n, -1);
8670
+ return ho(n, -1, r) || Mt(n, -1);
8660
8671
  if (t == 40 || ke && t == 78 && r == "c")
8661
- return lh(n) || uo(n, 1, r) || Mt(n, 1);
8672
+ return lh(n) || ho(n, 1, r) || Mt(n, 1);
8662
8673
  if (r == (ke ? "m" : "c") && (t == 66 || t == 73 || t == 89 || t == 90))
8663
8674
  return !0;
8664
8675
  }
@@ -8727,21 +8738,21 @@ function ia(n, e, t, r, i) {
8727
8738
  break;
8728
8739
  o = h;
8729
8740
  }
8730
- if (l || (l = (n.someProp("clipboardParser") || n.someProp("domParser") || Ui.fromSchema(n.state.schema)).parseSlice(o, {
8741
+ if (l || (l = (n.someProp("clipboardParser") || n.someProp("domParser") || Ji.fromSchema(n.state.schema)).parseSlice(o, {
8731
8742
  preserveWhitespace: !!(a || d),
8732
8743
  context: i,
8733
8744
  ruleFromNode(h) {
8734
8745
  return h.nodeName == "BR" && !h.nextSibling && h.parentNode && !dh.test(h.parentNode.nodeName) ? { ignore: !0 } : null;
8735
8746
  }
8736
8747
  })), d)
8737
- l = ph(po(l, +d[1], +d[2]), d[4]);
8748
+ l = ph(mo(l, +d[1], +d[2]), d[4]);
8738
8749
  else if (l = S.maxOpen(uh(l.content, i), !0), l.openStart || l.openEnd) {
8739
8750
  let u = 0, h = 0;
8740
8751
  for (let f = l.content.firstChild; u < l.openStart && !f.type.spec.isolating; u++, f = f.firstChild)
8741
8752
  ;
8742
8753
  for (let f = l.content.lastChild; h < l.openEnd && !f.type.spec.isolating; h++, f = f.lastChild)
8743
8754
  ;
8744
- l = po(l, u, h);
8755
+ l = mo(l, u, h);
8745
8756
  }
8746
8757
  return n.someProp("transformPasted", (u) => {
8747
8758
  l = u(l, n);
@@ -8795,7 +8806,7 @@ function Di(n, e, t, r, i, s) {
8795
8806
  let o = e < 0 ? n.firstChild : n.lastChild, l = o.content;
8796
8807
  return n.childCount > 1 && (s = 0), i < r - 1 && (l = Di(l, e, t, r, i + 1, s)), i >= t && (l = e < 0 ? o.contentMatchAt(0).fillBefore(l, s <= i).append(l) : l.append(o.contentMatchAt(o.childCount).fillBefore(b.empty, !0))), n.replaceChild(e < 0 ? 0 : n.childCount - 1, o.copy(l));
8797
8808
  }
8798
- function po(n, e, t) {
8809
+ function mo(n, e, t) {
8799
8810
  return e < n.openStart && (n = new S(Di(n.content, -1, e, n.openStart, 0, n.openEnd), e, n.openEnd)), t < n.openEnd && (n = new S(Di(n.content, 1, t, n.openEnd, 0, 0), n.openStart, t)), n;
8800
8811
  }
8801
8812
  const aa = {
@@ -8809,9 +8820,9 @@ const aa = {
8809
8820
  td: ["table", "tbody", "tr"],
8810
8821
  th: ["table", "tbody", "tr"]
8811
8822
  };
8812
- let mo = null;
8823
+ let go = null;
8813
8824
  function ca() {
8814
- return mo || (mo = document.implementation.createHTMLDocument("title"));
8825
+ return go || (go = document.implementation.createHTMLDocument("title"));
8815
8826
  }
8816
8827
  function hh(n) {
8817
8828
  let e = /^(\s*<meta [^>]*>)*/.exec(n);
@@ -8857,7 +8868,7 @@ function yh(n) {
8857
8868
  for (let e in ae) {
8858
8869
  let t = ae[e];
8859
8870
  n.dom.addEventListener(e, n.input.eventHandlers[e] = (r) => {
8860
- kh(n, r) && !ns(n, r) && (n.editable || !(r.type in ce)) && t(n, r);
8871
+ kh(n, r) && !rs(n, r) && (n.editable || !(r.type in ce)) && t(n, r);
8861
8872
  }, mh[e] ? { passive: !0 } : void 0);
8862
8873
  }
8863
8874
  le && n.dom.addEventListener("input", () => null), Ii(n);
@@ -8874,10 +8885,10 @@ function bh(n) {
8874
8885
  function Ii(n) {
8875
8886
  n.someProp("handleDOMEvents", (e) => {
8876
8887
  for (let t in e)
8877
- n.input.eventHandlers[t] || n.dom.addEventListener(t, n.input.eventHandlers[t] = (r) => ns(n, r));
8888
+ n.input.eventHandlers[t] || n.dom.addEventListener(t, n.input.eventHandlers[t] = (r) => rs(n, r));
8878
8889
  });
8879
8890
  }
8880
- function ns(n, e) {
8891
+ function rs(n, e) {
8881
8892
  return n.someProp("handleDOMEvents", (t) => {
8882
8893
  let r = t[e.type];
8883
8894
  return r ? r(n, e) || e.defaultPrevented : !1;
@@ -8894,11 +8905,11 @@ function kh(n, e) {
8894
8905
  return !0;
8895
8906
  }
8896
8907
  function Sh(n, e) {
8897
- !ns(n, e) && ae[e.type] && (n.editable || !(e.type in ce)) && ae[e.type](n, e);
8908
+ !rs(n, e) && ae[e.type] && (n.editable || !(e.type in ce)) && ae[e.type](n, e);
8898
8909
  }
8899
8910
  ce.keydown = (n, e) => {
8900
8911
  let t = e;
8901
- if (n.input.shiftKey = t.keyCode == 16 || t.shiftKey, !ua(n, t) && (n.input.lastKeyCode = t.keyCode, n.input.lastKeyCodeTime = Date.now(), !(Ce && te && t.keyCode == 13)))
8912
+ if (n.input.shiftKey = t.keyCode == 16 || t.shiftKey, !ua(n, t) && (n.input.lastKeyCode = t.keyCode, n.input.lastKeyCodeTime = Date.now(), !(Ee && te && t.keyCode == 13)))
8902
8913
  if (t.keyCode != 229 && n.domObserver.forceFlush(), Ft && t.keyCode == 13 && !t.ctrlKey && !t.altKey && !t.metaKey) {
8903
8914
  let r = Date.now();
8904
8915
  n.input.lastIOSEnter = r, n.input.lastIOSEnterFallbackTimeout = setTimeout(() => {
@@ -8931,7 +8942,7 @@ function xh(n, e) {
8931
8942
  let t = e.x - n.clientX, r = e.y - n.clientY;
8932
8943
  return t * t + r * r < 100;
8933
8944
  }
8934
- function rs(n, e, t, r, i) {
8945
+ function is(n, e, t, r, i) {
8935
8946
  if (r == -1)
8936
8947
  return !1;
8937
8948
  let s = n.state.doc.resolve(r);
@@ -8945,13 +8956,13 @@ function Lt(n, e, t) {
8945
8956
  let r = n.state.tr.setSelection(e);
8946
8957
  t == "pointer" && r.setMeta("pointer", !0), n.dispatch(r);
8947
8958
  }
8948
- function Eh(n, e) {
8959
+ function Ch(n, e) {
8949
8960
  if (e == -1)
8950
8961
  return !1;
8951
8962
  let t = n.state.doc.resolve(e), r = t.nodeAfter;
8952
8963
  return r && r.isAtom && w.isSelectable(r) ? (Lt(n, new w(t), "pointer"), !0) : !1;
8953
8964
  }
8954
- function Ch(n, e) {
8965
+ function Eh(n, e) {
8955
8966
  if (e == -1)
8956
8967
  return !1;
8957
8968
  let t = n.state.selection, r, i;
@@ -8967,13 +8978,13 @@ function Ch(n, e) {
8967
8978
  return i != null ? (Lt(n, w.create(n.state.doc, i), "pointer"), !0) : !1;
8968
8979
  }
8969
8980
  function Th(n, e, t, r, i) {
8970
- return rs(n, "handleClickOn", e, t, r) || n.someProp("handleClick", (s) => s(n, e, r)) || (i ? Ch(n, t) : Eh(n, t));
8981
+ return is(n, "handleClickOn", e, t, r) || n.someProp("handleClick", (s) => s(n, e, r)) || (i ? Eh(n, t) : Ch(n, t));
8971
8982
  }
8972
8983
  function Mh(n, e, t, r) {
8973
- return rs(n, "handleDoubleClickOn", e, t, r) || n.someProp("handleDoubleClick", (i) => i(n, e, r));
8984
+ return is(n, "handleDoubleClickOn", e, t, r) || n.someProp("handleDoubleClick", (i) => i(n, e, r));
8974
8985
  }
8975
8986
  function wh(n, e, t, r) {
8976
- return rs(n, "handleTripleClickOn", e, t, r) || n.someProp("handleTripleClick", (i) => i(n, e, r)) || Oh(n, t, r);
8987
+ return is(n, "handleTripleClickOn", e, t, r) || n.someProp("handleTripleClick", (i) => i(n, e, r)) || Oh(n, t, r);
8977
8988
  }
8978
8989
  function Oh(n, e, t) {
8979
8990
  if (t.button != 0)
@@ -8993,14 +9004,14 @@ function Oh(n, e, t) {
8993
9004
  return !0;
8994
9005
  }
8995
9006
  }
8996
- function is(n) {
9007
+ function ss(n) {
8997
9008
  return Vn(n);
8998
9009
  }
8999
9010
  const da = ke ? "metaKey" : "ctrlKey";
9000
9011
  ae.mousedown = (n, e) => {
9001
9012
  let t = e;
9002
9013
  n.input.shiftKey = t.shiftKey;
9003
- let r = is(n), i = Date.now(), s = "singleClick";
9014
+ let r = ss(n), i = Date.now(), s = "singleClick";
9004
9015
  i - n.input.lastClick.time < 500 && xh(t, n.input.lastClick) && !t[da] && (n.input.lastClick.type == "singleClick" ? s = "doubleClick" : n.input.lastClick.type == "doubleClick" && (s = "tripleClick")), n.input.lastClick = { time: i, x: t.clientX, y: t.clientY, type: s };
9005
9016
  let o = n.posAtCoords(Dr(t));
9006
9017
  o && (s == "singleClick" ? (n.input.mouseDown && n.input.mouseDown.done(), n.input.mouseDown = new vh(n, o, t, !!r)) : (s == "doubleClick" ? Mh : wh)(n, o.pos, o.inside, t) ? t.preventDefault() : Xe(n, "pointer"));
@@ -9052,16 +9063,16 @@ class vh {
9052
9063
  }
9053
9064
  }
9054
9065
  ae.touchstart = (n) => {
9055
- n.input.lastTouch = Date.now(), is(n), Xe(n, "pointer");
9066
+ n.input.lastTouch = Date.now(), ss(n), Xe(n, "pointer");
9056
9067
  };
9057
9068
  ae.touchmove = (n) => {
9058
9069
  n.input.lastTouch = Date.now(), Xe(n, "pointer");
9059
9070
  };
9060
- ae.contextmenu = (n) => is(n);
9071
+ ae.contextmenu = (n) => ss(n);
9061
9072
  function ua(n, e) {
9062
9073
  return n.composing ? !0 : le && Math.abs(e.timeStamp - n.input.compositionEndedAt) < 500 ? (n.input.compositionEndedAt = -2e8, !0) : !1;
9063
9074
  }
9064
- const Ah = Ce ? 5e3 : -1;
9075
+ const Ah = Ee ? 5e3 : -1;
9065
9076
  ce.compositionstart = ce.compositionupdate = (n) => {
9066
9077
  if (!n.composing) {
9067
9078
  n.domObserver.flush();
@@ -9100,9 +9111,9 @@ function Nh() {
9100
9111
  return n.initEvent("event", !0, !0), n.timeStamp;
9101
9112
  }
9102
9113
  function Vn(n, e = !1) {
9103
- if (!(Ce && n.domObserver.flushingSoon >= 0)) {
9114
+ if (!(Ee && n.domObserver.flushingSoon >= 0)) {
9104
9115
  if (n.domObserver.forceFlush(), fa(n), e || n.docView && n.docView.dirty) {
9105
- let t = es(n);
9116
+ let t = ts(n);
9106
9117
  return t && !t.eq(n.state.selection) ? n.dispatch(n.state.tr.setSelection(t)) : n.updateState(n.state), !0;
9107
9118
  }
9108
9119
  return !1;
@@ -9157,7 +9168,7 @@ function pa(n) {
9157
9168
  }
9158
9169
  ce.paste = (n, e) => {
9159
9170
  let t = e;
9160
- if (n.composing && !Ce)
9171
+ if (n.composing && !Ee)
9161
9172
  return;
9162
9173
  let r = un ? null : t.clipboardData, i = n.input.shiftKey && n.input.lastKeyCode != 45;
9163
9174
  r && hn(n, pa(r), r.getData("text/html"), i, t) ? t.preventDefault() : Rh(n, t);
@@ -9222,7 +9233,7 @@ ce.drop = (n, e) => {
9222
9233
  c.setSelection(new w(f));
9223
9234
  else {
9224
9235
  let p = c.mapping.map(a);
9225
- c.mapping.maps[c.mapping.maps.length - 1].forEach((m, g, y, x) => p = x), c.setSelection(ts(n, f, c.doc.resolve(p)));
9236
+ c.mapping.maps[c.mapping.maps.length - 1].forEach((m, g, y, x) => p = x), c.setSelection(ns(n, f, c.doc.resolve(p)));
9226
9237
  }
9227
9238
  n.focus(), n.dispatch(c.setMeta("uiEvent", "drop"));
9228
9239
  };
@@ -9236,7 +9247,7 @@ ae.blur = (n, e) => {
9236
9247
  n.focused && (n.domObserver.stop(), n.dom.classList.remove("ProseMirror-focused"), n.domObserver.start(), t.relatedTarget && n.dom.contains(t.relatedTarget) && n.domObserver.currentSelection.clear(), n.focused = !1);
9237
9248
  };
9238
9249
  ae.beforeinput = (n, e) => {
9239
- if (te && Ce && e.inputType == "deleteContentBackward") {
9250
+ if (te && Ee && e.inputType == "deleteContentBackward") {
9240
9251
  n.domObserver.flushSoon();
9241
9252
  let { domChangeCount: r } = n.input;
9242
9253
  setTimeout(() => {
@@ -9298,7 +9309,7 @@ class et {
9298
9309
  destroy() {
9299
9310
  }
9300
9311
  }
9301
- class ss {
9312
+ class ls {
9302
9313
  constructor(e, t) {
9303
9314
  this.attrs = e, this.spec = t || yt;
9304
9315
  }
@@ -9314,7 +9325,7 @@ class ss {
9314
9325
  return i == t.from && !(s = e.child(r)).isText && i + s.nodeSize == t.to;
9315
9326
  }
9316
9327
  eq(e) {
9317
- return this == e || e instanceof ss && fn(this.attrs, e.attrs) && fn(this.spec, e.spec);
9328
+ return this == e || e instanceof ls && fn(this.attrs, e.attrs) && fn(this.spec, e.spec);
9318
9329
  }
9319
9330
  destroy() {
9320
9331
  }
@@ -9368,7 +9379,7 @@ class me {
9368
9379
  node, will receive the given attributes.
9369
9380
  */
9370
9381
  static node(e, t, r, i) {
9371
- return new me(e, t, new ss(r, i));
9382
+ return new me(e, t, new ls(r, i));
9372
9383
  }
9373
9384
  /**
9374
9385
  The spec provided when creating this decoration. Can be useful
@@ -9404,7 +9415,7 @@ class H {
9404
9415
  you must make a copy if you want need to preserve that.
9405
9416
  */
9406
9417
  static create(e, t) {
9407
- return t.length ? jn(t, e, 0, yt) : Z;
9418
+ return t.length ? jn(t, e, 0, yt) : ee;
9408
9419
  }
9409
9420
  /**
9410
9421
  Find all decorations in this set which touch the given range
@@ -9434,7 +9445,7 @@ class H {
9434
9445
  document.
9435
9446
  */
9436
9447
  map(e, t, r) {
9437
- return this == Z || e.maps.length == 0 ? this : this.mapInner(e, t, 0, 0, r || yt);
9448
+ return this == ee || e.maps.length == 0 ? this : this.mapInner(e, t, 0, 0, r || yt);
9438
9449
  }
9439
9450
  /**
9440
9451
  @internal
@@ -9445,7 +9456,7 @@ class H {
9445
9456
  let a = this.local[l].map(e, r, i);
9446
9457
  a && a.type.valid(t, a) ? (o || (o = [])).push(a) : s.onRemove && s.onRemove(this.local[l].spec);
9447
9458
  }
9448
- return this.children.length ? Lh(this.children, o || [], e, t, r, i, s) : o ? new H(o.sort(bt), At) : Z;
9459
+ return this.children.length ? Lh(this.children, o || [], e, t, r, i, s) : o ? new H(o.sort(bt), At) : ee;
9449
9460
  }
9450
9461
  /**
9451
9462
  Add the given array of decorations to the ones in the set,
@@ -9454,7 +9465,7 @@ class H {
9454
9465
  structure.
9455
9466
  */
9456
9467
  add(e, t) {
9457
- return t.length ? this == Z ? H.create(e, t) : this.addInner(e, t, 0) : this;
9468
+ return t.length ? this == ee ? H.create(e, t) : this.addInner(e, t, 0) : this;
9458
9469
  }
9459
9470
  addInner(e, t, r) {
9460
9471
  let i, s = 0;
@@ -9476,7 +9487,7 @@ class H {
9476
9487
  the ones in the given array.
9477
9488
  */
9478
9489
  remove(e) {
9479
- return e.length == 0 || this == Z ? this : this.removeInner(e, 0);
9490
+ return e.length == 0 || this == ee ? this : this.removeInner(e, 0);
9480
9491
  }
9481
9492
  removeInner(e, t) {
9482
9493
  let r = this.children, i = this.local;
@@ -9488,7 +9499,7 @@ class H {
9488
9499
  continue;
9489
9500
  r == this.children && (r = this.children.slice());
9490
9501
  let c = r[s + 2].removeInner(o, l + 1);
9491
- c != Z ? r[s + 2] = c : (r.splice(s, 3), s -= 3);
9502
+ c != ee ? r[s + 2] = c : (r.splice(s, 3), s -= 3);
9492
9503
  }
9493
9504
  if (i.length) {
9494
9505
  for (let s = 0, o; s < e.length; s++)
@@ -9496,13 +9507,13 @@ class H {
9496
9507
  for (let l = 0; l < i.length; l++)
9497
9508
  i[l].eq(o, t) && (i == this.local && (i = this.local.slice()), i.splice(l--, 1));
9498
9509
  }
9499
- return r == this.children && i == this.local ? this : i.length || r.length ? new H(i, r) : Z;
9510
+ return r == this.children && i == this.local ? this : i.length || r.length ? new H(i, r) : ee;
9500
9511
  }
9501
9512
  /**
9502
9513
  @internal
9503
9514
  */
9504
9515
  forChild(e, t) {
9505
- if (this == Z)
9516
+ if (this == ee)
9506
9517
  return this;
9507
9518
  if (t.isLeaf)
9508
9519
  return H.empty;
@@ -9524,7 +9535,7 @@ class H {
9524
9535
  let l = new H(i.sort(bt), At);
9525
9536
  return r ? new Ue([l, r]) : l;
9526
9537
  }
9527
- return r || Z;
9538
+ return r || ee;
9528
9539
  }
9529
9540
  /**
9530
9541
  @internal
@@ -9546,13 +9557,13 @@ class H {
9546
9557
  @internal
9547
9558
  */
9548
9559
  locals(e) {
9549
- return ls(this.localsInner(e));
9560
+ return as(this.localsInner(e));
9550
9561
  }
9551
9562
  /**
9552
9563
  @internal
9553
9564
  */
9554
9565
  localsInner(e) {
9555
- if (this == Z)
9566
+ if (this == ee)
9556
9567
  return At;
9557
9568
  if (e.inlineContent || !this.local.some(et.is))
9558
9569
  return this.local;
@@ -9563,8 +9574,8 @@ class H {
9563
9574
  }
9564
9575
  }
9565
9576
  H.empty = new H([], []);
9566
- H.removeOverlap = ls;
9567
- const Z = H.empty;
9577
+ H.removeOverlap = as;
9578
+ const ee = H.empty;
9568
9579
  class Ue {
9569
9580
  constructor(e) {
9570
9581
  this.members = e;
@@ -9579,7 +9590,7 @@ class Ue {
9579
9590
  let r = [];
9580
9591
  for (let i = 0; i < this.members.length; i++) {
9581
9592
  let s = this.members[i].forChild(e, t);
9582
- s != Z && (s instanceof Ue ? r = r.concat(s.members) : r.push(s));
9593
+ s != ee && (s instanceof Ue ? r = r.concat(s.members) : r.push(s));
9583
9594
  }
9584
9595
  return Ue.from(r);
9585
9596
  }
@@ -9604,14 +9615,14 @@ class Ue {
9604
9615
  t.push(s[o]);
9605
9616
  }
9606
9617
  }
9607
- return t ? ls(r ? t : t.sort(bt)) : At;
9618
+ return t ? as(r ? t : t.sort(bt)) : At;
9608
9619
  }
9609
9620
  // Create a group for the given array of decoration sets, or return
9610
9621
  // a single set when possible.
9611
9622
  static from(e) {
9612
9623
  switch (e.length) {
9613
9624
  case 0:
9614
- return Z;
9625
+ return ee;
9615
9626
  case 1:
9616
9627
  return e[0];
9617
9628
  default:
@@ -9650,7 +9661,7 @@ function Lh(n, e, t, r, i, s, o) {
9650
9661
  let h = t.map(n[c + 1] + s, -1), f = h - i, { index: p, offset: m } = r.content.findIndex(u), g = r.maybeChild(p);
9651
9662
  if (g && m == u && m + g.nodeSize == f) {
9652
9663
  let y = l[c + 2].mapInner(t, g, d + 1, n[c] + s + 1, o);
9653
- y != Z ? (l[c] = u, l[c + 1] = f, l[c + 2] = y) : (l[c + 1] = -2, a = !0);
9664
+ y != ee ? (l[c] = u, l[c + 1] = f, l[c + 2] = y) : (l[c + 1] = -2, a = !0);
9654
9665
  } else
9655
9666
  a = !0;
9656
9667
  }
@@ -9712,18 +9723,18 @@ function jn(n, e, t, r) {
9712
9723
  if (c) {
9713
9724
  s = !0;
9714
9725
  let d = jn(c, l, t + a + 1, r);
9715
- d != Z && i.push(a, a + l.nodeSize, d);
9726
+ d != ee && i.push(a, a + l.nodeSize, d);
9716
9727
  }
9717
9728
  });
9718
9729
  let o = ga(s ? ba(n) : n, -t).sort(bt);
9719
9730
  for (let l = 0; l < o.length; l++)
9720
9731
  o[l].type.valid(e, o[l]) || (r.onRemove && r.onRemove(o[l].spec), o.splice(l--, 1));
9721
- return o.length || i.length ? new H(o, i) : Z;
9732
+ return o.length || i.length ? new H(o, i) : ee;
9722
9733
  }
9723
9734
  function bt(n, e) {
9724
9735
  return n.from - e.from || n.to - e.to;
9725
9736
  }
9726
- function ls(n) {
9737
+ function as(n) {
9727
9738
  let e = n;
9728
9739
  for (let t = 0; t < e.length - 1; t++) {
9729
9740
  let r = e[t];
@@ -9731,17 +9742,17 @@ function ls(n) {
9731
9742
  for (let i = t + 1; i < e.length; i++) {
9732
9743
  let s = e[i];
9733
9744
  if (s.from == r.from) {
9734
- s.to != r.to && (e == n && (e = n.slice()), e[i] = s.copy(s.from, r.to), go(e, i + 1, s.copy(r.to, s.to)));
9745
+ s.to != r.to && (e == n && (e = n.slice()), e[i] = s.copy(s.from, r.to), yo(e, i + 1, s.copy(r.to, s.to)));
9735
9746
  continue;
9736
9747
  } else {
9737
- s.from < r.to && (e == n && (e = n.slice()), e[t] = r.copy(r.from, s.from), go(e, i, r.copy(s.from, r.to)));
9748
+ s.from < r.to && (e == n && (e = n.slice()), e[t] = r.copy(r.from, s.from), yo(e, i, r.copy(s.from, r.to)));
9738
9749
  break;
9739
9750
  }
9740
9751
  }
9741
9752
  }
9742
9753
  return e;
9743
9754
  }
9744
- function go(n, e, t) {
9755
+ function yo(n, e, t) {
9745
9756
  for (; e < n.length && bt(t, n[e]) > 0; )
9746
9757
  e++;
9747
9758
  n.splice(e, 0, t);
@@ -9750,7 +9761,7 @@ function ri(n) {
9750
9761
  let e = [];
9751
9762
  return n.someProp("decorations", (t) => {
9752
9763
  let r = t(n.state);
9753
- r && r != Z && e.push(r);
9764
+ r && r != ee && e.push(r);
9754
9765
  }), n.cursorWrapper && e.push(H.create(n.state.doc, [n.cursorWrapper.deco])), Ue.from(e);
9755
9766
  }
9756
9767
  const _h = {
@@ -9818,12 +9829,12 @@ class Hh {
9818
9829
  this.suppressingSelectionUpdates = !0, setTimeout(() => this.suppressingSelectionUpdates = !1, 50);
9819
9830
  }
9820
9831
  onSelectionChange() {
9821
- if (lo(this.view)) {
9832
+ if (ao(this.view)) {
9822
9833
  if (this.suppressingSelectionUpdates)
9823
9834
  return Fe(this.view);
9824
9835
  if (he && Qe <= 11 && !this.view.state.selection.empty) {
9825
9836
  let e = this.view.domSelectionRange();
9826
- if (e.focusNode && Et(e.focusNode, e.focusOffset, e.anchorNode, e.anchorOffset))
9837
+ if (e.focusNode && Ct(e.focusNode, e.focusOffset, e.anchorNode, e.anchorOffset))
9827
9838
  return this.flushSoon();
9828
9839
  }
9829
9840
  this.flush();
@@ -9862,7 +9873,7 @@ class Hh {
9862
9873
  return;
9863
9874
  let t = this.pendingRecords();
9864
9875
  t.length && (this.queue = []);
9865
- let r = e.domSelectionRange(), i = !this.suppressingSelectionUpdates && !this.currentSelection.eq(r) && lo(e) && !this.ignoreSelectionChange(r), s = -1, o = -1, l = !1, a = [];
9876
+ let r = e.domSelectionRange(), i = !this.suppressingSelectionUpdates && !this.currentSelection.eq(r) && ao(e) && !this.ignoreSelectionChange(r), s = -1, o = -1, l = !1, a = [];
9866
9877
  if (e.editable)
9867
9878
  for (let d = 0; d < t.length; d++) {
9868
9879
  let u = this.registerMutation(t[d], a);
@@ -9876,7 +9887,7 @@ class Hh {
9876
9887
  }
9877
9888
  }
9878
9889
  let c = null;
9879
- s < 0 && i && e.input.lastFocus > Date.now() - 200 && Math.max(e.input.lastTouch, e.input.lastClick.time) < Date.now() - 300 && Ar(r) && (c = es(e)) && c.eq(N.near(e.state.doc.resolve(0), 1)) ? (e.input.lastFocus = 0, Fe(e), this.currentSelection.set(r), e.scrollToSelection()) : (s > -1 || i) && (s > -1 && (e.docView.markDirty(s, o), Vh(e)), this.handleDOMChange(s, o, l, a), e.docView && e.docView.dirty ? e.updateState(e.state) : this.currentSelection.eq(r) || Fe(e), this.currentSelection.set(r));
9890
+ s < 0 && i && e.input.lastFocus > Date.now() - 200 && Math.max(e.input.lastTouch, e.input.lastClick.time) < Date.now() - 300 && Ar(r) && (c = ts(e)) && c.eq(N.near(e.state.doc.resolve(0), 1)) ? (e.input.lastFocus = 0, Fe(e), this.currentSelection.set(r), e.scrollToSelection()) : (s > -1 || i) && (s > -1 && (e.docView.markDirty(s, o), Vh(e)), this.handleDOMChange(s, o, l, a), e.docView && e.docView.dirty ? e.updateState(e.state) : this.currentSelection.eq(r) || Fe(e), this.currentSelection.set(r));
9880
9891
  }
9881
9892
  registerMutation(e, t) {
9882
9893
  if (t.indexOf(e.target) > -1)
@@ -9910,12 +9921,12 @@ class Hh {
9910
9921
  };
9911
9922
  }
9912
9923
  }
9913
- let yo = /* @__PURE__ */ new WeakMap(), bo = !1;
9924
+ let bo = /* @__PURE__ */ new WeakMap(), ko = !1;
9914
9925
  function Vh(n) {
9915
- if (!yo.has(n) && (yo.set(n, null), ["normal", "nowrap", "pre-line"].indexOf(getComputedStyle(n.dom).whiteSpace) !== -1)) {
9916
- if (n.requiresGeckoHackNode = Me, bo)
9926
+ if (!bo.has(n) && (bo.set(n, null), ["normal", "nowrap", "pre-line"].indexOf(getComputedStyle(n.dom).whiteSpace) !== -1)) {
9927
+ if (n.requiresGeckoHackNode = Me, ko)
9917
9928
  return;
9918
- console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."), bo = !0;
9929
+ console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."), ko = !0;
9919
9930
  }
9920
9931
  }
9921
9932
  function $h(n) {
@@ -9925,7 +9936,7 @@ function $h(n) {
9925
9936
  }
9926
9937
  n.dom.addEventListener("beforeinput", t, !0), document.execCommand("indent"), n.dom.removeEventListener("beforeinput", t, !0);
9927
9938
  let r = e.startContainer, i = e.startOffset, s = e.endContainer, o = e.endOffset, l = n.domAtPos(n.state.selection.anchor);
9928
- return Et(l.node, l.offset, s, o) && ([r, i, s, o] = [s, o, r, i]), { anchorNode: r, anchorOffset: i, focusNode: s, focusOffset: o };
9939
+ return Ct(l.node, l.offset, s, o) && ([r, i, s, o] = [s, o, r, i]), { anchorNode: r, anchorOffset: i, focusNode: s, focusOffset: o };
9929
9940
  }
9930
9941
  function jh(n, e, t) {
9931
9942
  let { node: r, fromOffset: i, toOffset: s, from: o, to: l } = n.docView.parseRange(e, t), a = n.domSelectionRange(), c, d = a.anchorNode;
@@ -9939,7 +9950,7 @@ function jh(n, e, t) {
9939
9950
  if (!x || x.size)
9940
9951
  break;
9941
9952
  }
9942
- let u = n.state.doc, h = n.someProp("domParser") || Ui.fromSchema(n.state.schema), f = u.resolve(o), p = null, m = h.parse(r, {
9953
+ let u = n.state.doc, h = n.someProp("domParser") || Ji.fromSchema(n.state.schema), f = u.resolve(o), p = null, m = h.parse(r, {
9943
9954
  topNode: f.parent,
9944
9955
  topMatch: f.parent.contentMatchAt(f.index()),
9945
9956
  topOpen: !0,
@@ -9974,12 +9985,12 @@ const Kh = /^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|df
9974
9985
  function Wh(n, e, t, r, i) {
9975
9986
  let s = n.input.compositionPendingChanges || (n.composing ? n.input.compositionID : 0);
9976
9987
  if (n.input.compositionPendingChanges = 0, e < 0) {
9977
- let M = n.input.lastSelectionTime > Date.now() - 50 ? n.input.lastSelectionOrigin : null, Q = es(n, M);
9978
- if (Q && !n.state.selection.eq(Q)) {
9979
- if (te && Ce && n.input.lastKeyCode === 13 && Date.now() - 100 < n.input.lastKeyCodeTime && n.someProp("handleKeyDown", (ot) => ot(n, lt(13, "Enter"))))
9988
+ let M = n.input.lastSelectionTime > Date.now() - 50 ? n.input.lastSelectionOrigin : null, Z = ts(n, M);
9989
+ if (Z && !n.state.selection.eq(Z)) {
9990
+ if (te && Ee && n.input.lastKeyCode === 13 && Date.now() - 100 < n.input.lastKeyCodeTime && n.someProp("handleKeyDown", (ot) => ot(n, lt(13, "Enter"))))
9980
9991
  return;
9981
- let Ee = n.state.tr.setSelection(Q);
9982
- M == "pointer" ? Ee.setMeta("pointer", !0) : M == "key" && Ee.scrollIntoView(), s && Ee.setMeta("composition", s), n.dispatch(Ee);
9992
+ let Ce = n.state.tr.setSelection(Z);
9993
+ M == "pointer" ? Ce.setMeta("pointer", !0) : M == "key" && Ce.scrollIntoView(), s && Ce.setMeta("composition", s), n.dispatch(Ce);
9983
9994
  }
9984
9995
  return;
9985
9996
  }
@@ -9988,7 +9999,7 @@ function Wh(n, e, t, r, i) {
9988
9999
  let a = n.state.selection, c = jh(n, e, t), d = n.state.doc, u = d.slice(c.from, c.to), h, f;
9989
10000
  n.input.lastKeyCode === 8 && Date.now() - 100 < n.input.lastKeyCodeTime ? (h = n.state.selection.to, f = "end") : (h = n.state.selection.from, f = "start"), n.input.lastKeyCode = null;
9990
10001
  let p = Gh(u.content, c.doc.content, c.from, h, f);
9991
- if ((Ft && n.input.lastIOSEnter > Date.now() - 225 || Ce) && i.some((M) => M.nodeType == 1 && !Kh.test(M.nodeName)) && (!p || p.endA >= p.endB) && n.someProp("handleKeyDown", (M) => M(n, lt(13, "Enter")))) {
10002
+ if ((Ft && n.input.lastIOSEnter > Date.now() - 225 || Ee) && i.some((M) => M.nodeType == 1 && !Kh.test(M.nodeName)) && (!p || p.endA >= p.endB) && n.someProp("handleKeyDown", (M) => M(n, lt(13, "Enter")))) {
9992
10003
  n.input.lastIOSEnter = 0;
9993
10004
  return;
9994
10005
  }
@@ -9997,10 +10008,10 @@ function Wh(n, e, t, r, i) {
9997
10008
  p = { start: a.from, endA: a.to, endB: a.to };
9998
10009
  else {
9999
10010
  if (c.sel) {
10000
- let M = ko(n, n.state.doc, c.sel);
10011
+ let M = So(n, n.state.doc, c.sel);
10001
10012
  if (M && !M.eq(n.state.selection)) {
10002
- let Q = n.state.tr.setSelection(M);
10003
- s && Q.setMeta("composition", s), n.dispatch(Q);
10013
+ let Z = n.state.tr.setSelection(M);
10014
+ s && Z.setMeta("composition", s), n.dispatch(Z);
10004
10015
  }
10005
10016
  }
10006
10017
  return;
@@ -10016,38 +10027,38 @@ function Wh(n, e, t, r, i) {
10016
10027
  return;
10017
10028
  }
10018
10029
  if (n.state.selection.anchor > p.start && Jh(d, p.start, p.endA, m, g) && n.someProp("handleKeyDown", (M) => M(n, lt(8, "Backspace")))) {
10019
- Ce && te && n.domObserver.suppressSelectionUpdates();
10030
+ Ee && te && n.domObserver.suppressSelectionUpdates();
10020
10031
  return;
10021
10032
  }
10022
- te && Ce && p.endB == p.start && (n.input.lastAndroidDelete = Date.now()), Ce && !x && m.start() != g.start() && g.parentOffset == 0 && m.depth == g.depth && c.sel && c.sel.anchor == c.sel.head && c.sel.head == p.endA && (p.endB -= 2, g = c.doc.resolveNoCache(p.endB - c.from), setTimeout(() => {
10033
+ te && Ee && p.endB == p.start && (n.input.lastAndroidDelete = Date.now()), Ee && !x && m.start() != g.start() && g.parentOffset == 0 && m.depth == g.depth && c.sel && c.sel.anchor == c.sel.head && c.sel.head == p.endA && (p.endB -= 2, g = c.doc.resolveNoCache(p.endB - c.from), setTimeout(() => {
10023
10034
  n.someProp("handleKeyDown", function(M) {
10024
10035
  return M(n, lt(13, "Enter"));
10025
10036
  });
10026
10037
  }, 20));
10027
- let R = p.start, P = p.endA, C, L, I;
10038
+ let R = p.start, P = p.endA, E, L, I;
10028
10039
  if (x) {
10029
10040
  if (m.pos == g.pos)
10030
- he && Qe <= 11 && m.parentOffset == 0 && (n.domObserver.suppressSelectionUpdates(), setTimeout(() => Fe(n), 20)), C = n.state.tr.delete(R, P), L = d.resolve(p.start).marksAcross(d.resolve(p.endA));
10041
+ he && Qe <= 11 && m.parentOffset == 0 && (n.domObserver.suppressSelectionUpdates(), setTimeout(() => Fe(n), 20)), E = n.state.tr.delete(R, P), L = d.resolve(p.start).marksAcross(d.resolve(p.endA));
10031
10042
  else if (
10032
10043
  // Adding or removing a mark
10033
10044
  p.endA == p.endB && (I = Uh(m.parent.content.cut(m.parentOffset, g.parentOffset), y.parent.content.cut(y.parentOffset, p.endA - y.start())))
10034
10045
  )
10035
- C = n.state.tr, I.type == "add" ? C.addMark(R, P, I.mark) : C.removeMark(R, P, I.mark);
10046
+ E = n.state.tr, I.type == "add" ? E.addMark(R, P, I.mark) : E.removeMark(R, P, I.mark);
10036
10047
  else if (m.parent.child(m.index()).isText && m.index() == g.index() - (g.textOffset ? 0 : 1)) {
10037
10048
  let M = m.parent.textBetween(m.parentOffset, g.parentOffset);
10038
- if (n.someProp("handleTextInput", (Q) => Q(n, R, P, M)))
10049
+ if (n.someProp("handleTextInput", (Z) => Z(n, R, P, M)))
10039
10050
  return;
10040
- C = n.state.tr.insertText(M, R, P);
10051
+ E = n.state.tr.insertText(M, R, P);
10041
10052
  }
10042
10053
  }
10043
- if (C || (C = n.state.tr.replace(R, P, c.doc.slice(p.start - c.from, p.endB - c.from))), c.sel) {
10044
- let M = ko(n, C.doc, c.sel);
10045
- M && !(te && Ce && n.composing && M.empty && (p.start != p.endB || n.input.lastAndroidDelete < Date.now() - 100) && (M.head == R || M.head == C.mapping.map(P) - 1) || he && M.empty && M.head == R) && C.setSelection(M);
10054
+ if (E || (E = n.state.tr.replace(R, P, c.doc.slice(p.start - c.from, p.endB - c.from))), c.sel) {
10055
+ let M = So(n, E.doc, c.sel);
10056
+ M && !(te && Ee && n.composing && M.empty && (p.start != p.endB || n.input.lastAndroidDelete < Date.now() - 100) && (M.head == R || M.head == E.mapping.map(P) - 1) || he && M.empty && M.head == R) && E.setSelection(M);
10046
10057
  }
10047
- L && C.ensureMarks(L), s && C.setMeta("composition", s), n.dispatch(C.scrollIntoView());
10058
+ L && E.ensureMarks(L), s && E.setMeta("composition", s), n.dispatch(E.scrollIntoView());
10048
10059
  }
10049
- function ko(n, e, t) {
10050
- return Math.max(t.anchor, t.head) > e.content.size ? null : ts(n, e.resolve(t.anchor), e.resolve(t.head));
10060
+ function So(n, e, t) {
10061
+ return Math.max(t.anchor, t.head) > e.content.size ? null : ns(n, e.resolve(t.anchor), e.resolve(t.head));
10051
10062
  }
10052
10063
  function Uh(n, e) {
10053
10064
  let t = n.firstChild.marks, r = e.firstChild.marks, i = t, s = r, o, l, a;
@@ -10116,7 +10127,7 @@ class Yh {
10116
10127
  added to the document.
10117
10128
  */
10118
10129
  constructor(e, t) {
10119
- this._root = null, this.focused = !1, this.trackWrites = null, this.mounted = !1, this.markCursor = null, this.cursorWrapper = null, this.lastSelectedViewDesc = void 0, this.input = new gh(), this.prevDirectPlugins = [], this.pluginViews = [], this.requiresGeckoHackNode = !1, this.dragging = null, this._props = t, this.state = t.state, this.directPlugins = t.plugins || [], this.directPlugins.forEach(To), this.dispatch = this.dispatch.bind(this), this.dom = e && e.mount || document.createElement("div"), e && (e.appendChild ? e.appendChild(this.dom) : typeof e == "function" ? e(this.dom) : e.mount && (this.mounted = !0)), this.editable = Eo(this), xo(this), this.nodeViews = Co(this), this.docView = to(this.state.doc, So(this), ri(this), this.dom, this), this.domObserver = new Hh(this, (r, i, s, o) => Wh(this, r, i, s, o)), this.domObserver.start(), yh(this), this.updatePluginViews();
10130
+ this._root = null, this.focused = !1, this.trackWrites = null, this.mounted = !1, this.markCursor = null, this.cursorWrapper = null, this.lastSelectedViewDesc = void 0, this.input = new gh(), this.prevDirectPlugins = [], this.pluginViews = [], this.requiresGeckoHackNode = !1, this.dragging = null, this._props = t, this.state = t.state, this.directPlugins = t.plugins || [], this.directPlugins.forEach(Mo), this.dispatch = this.dispatch.bind(this), this.dom = e && e.mount || document.createElement("div"), e && (e.appendChild ? e.appendChild(this.dom) : typeof e == "function" ? e(this.dom) : e.mount && (this.mounted = !0)), this.editable = Eo(this), Co(this), this.nodeViews = To(this), this.docView = no(this.state.doc, xo(this), ri(this), this.dom, this), this.domObserver = new Hh(this, (r, i, s, o) => Wh(this, r, i, s, o)), this.domObserver.start(), yh(this), this.updatePluginViews();
10120
10131
  }
10121
10132
  /**
10122
10133
  Holds `true` when a
@@ -10146,7 +10157,7 @@ class Yh {
10146
10157
  update(e) {
10147
10158
  e.handleDOMEvents != this._props.handleDOMEvents && Ii(this);
10148
10159
  let t = this._props;
10149
- this._props = e, e.plugins && (e.plugins.forEach(To), this.directPlugins = e.plugins), this.updateStateInner(e.state, t);
10160
+ this._props = e, e.plugins && (e.plugins.forEach(Mo), this.directPlugins = e.plugins), this.updateStateInner(e.state, t);
10150
10161
  }
10151
10162
  /**
10152
10163
  Update the view by updating existing props object with the object
@@ -10174,11 +10185,11 @@ class Yh {
10174
10185
  e.storedMarks && this.composing && (fa(this), s = !0), this.state = e;
10175
10186
  let o = r.plugins != e.plugins || this._props.plugins != t.plugins;
10176
10187
  if (o || this._props.plugins != t.plugins || this._props.nodeViews != t.nodeViews) {
10177
- let h = Co(this);
10188
+ let h = To(this);
10178
10189
  Qh(h, this.nodeViews) && (this.nodeViews = h, i = !0);
10179
10190
  }
10180
- (o || t.handleDOMEvents != this._props.handleDOMEvents) && Ii(this), this.editable = Eo(this), xo(this);
10181
- let l = ri(this), a = So(this), c = r.plugins != e.plugins && !r.doc.eq(e.doc) ? "reset" : e.scrollToSelection > r.scrollToSelection ? "to selection" : "preserve", d = i || !this.docView.matchesNode(e.doc, a, l);
10191
+ (o || t.handleDOMEvents != this._props.handleDOMEvents) && Ii(this), this.editable = Eo(this), Co(this);
10192
+ let l = ri(this), a = xo(this), c = r.plugins != e.plugins && !r.doc.eq(e.doc) ? "reset" : e.scrollToSelection > r.scrollToSelection ? "to selection" : "preserve", d = i || !this.docView.matchesNode(e.doc, a, l);
10182
10193
  (d || !e.selection.eq(r.selection)) && (s = !0);
10183
10194
  let u = c == "preserve" && s && this.dom.style.overflowAnchor == null && Du(this);
10184
10195
  if (s) {
@@ -10186,7 +10197,7 @@ class Yh {
10186
10197
  let h = d && (he || te) && !this.composing && !r.selection.empty && !e.selection.empty && Xh(r.selection, e.selection);
10187
10198
  if (d) {
10188
10199
  let f = te ? this.trackWrites = this.domSelectionRange().focusNode : null;
10189
- (i || !this.docView.update(e.doc, a, l, this)) && (this.docView.updateOuterDeco([]), this.docView.destroy(), this.docView = to(e.doc, a, l, this.dom, this)), f && !this.trackWrites && (h = !0);
10200
+ (i || !this.docView.update(e.doc, a, l, this)) && (this.docView.updateOuterDeco([]), this.docView.destroy(), this.docView = no(e.doc, a, l, this.dom, this)), f && !this.trackWrites && (h = !0);
10190
10201
  }
10191
10202
  h || !(this.input.mouseDown && this.domObserver.currentSelection.eq(this.domSelectionRange()) && nh(this)) ? Fe(this, h) : (ea(this, e.selection), this.domObserver.setCurSelection()), this.domObserver.start();
10192
10203
  }
@@ -10200,9 +10211,9 @@ class Yh {
10200
10211
  if (!this.someProp("handleScrollToSelection", (t) => t(this)))
10201
10212
  if (this.state.selection instanceof w) {
10202
10213
  let t = this.docView.domAfterPos(this.state.selection.from);
10203
- t.nodeType == 1 && Gs(this, t.getBoundingClientRect(), e);
10214
+ t.nodeType == 1 && Ys(this, t.getBoundingClientRect(), e);
10204
10215
  } else
10205
- Gs(this, this.coordsAtPos(this.state.selection.head, 1), e);
10216
+ Ys(this, this.coordsAtPos(this.state.selection.head, 1), e);
10206
10217
  }
10207
10218
  destroyPluginViews() {
10208
10219
  let e;
@@ -10428,7 +10439,7 @@ class Yh {
10428
10439
  return this.root.getSelection();
10429
10440
  }
10430
10441
  }
10431
- function So(n) {
10442
+ function xo(n) {
10432
10443
  let e = /* @__PURE__ */ Object.create(null);
10433
10444
  return e.class = "ProseMirror", e.contenteditable = String(n.editable), n.someProp("attributes", (t) => {
10434
10445
  if (typeof t == "function" && (t = t(n.state)), t)
@@ -10436,7 +10447,7 @@ function So(n) {
10436
10447
  r == "class" ? e.class += " " + t[r] : r == "style" ? e.style = (e.style ? e.style + ";" : "") + t[r] : !e[r] && r != "contenteditable" && r != "nodeName" && (e[r] = String(t[r]));
10437
10448
  }), e.translate || (e.translate = "no"), [me.node(0, n.state.doc.content.size, e)];
10438
10449
  }
10439
- function xo(n) {
10450
+ function Co(n) {
10440
10451
  if (n.markCursor) {
10441
10452
  let e = document.createElement("img");
10442
10453
  e.className = "ProseMirror-separator", e.setAttribute("mark-placeholder", "true"), e.setAttribute("alt", ""), n.cursorWrapper = { dom: e, deco: me.widget(n.state.selection.head, e, { raw: !0, marks: n.markCursor }) };
@@ -10450,7 +10461,7 @@ function Xh(n, e) {
10450
10461
  let t = Math.min(n.$anchor.sharedDepth(n.head), e.$anchor.sharedDepth(e.head));
10451
10462
  return n.$anchor.start(t) != e.$anchor.start(t);
10452
10463
  }
10453
- function Co(n) {
10464
+ function To(n) {
10454
10465
  let e = /* @__PURE__ */ Object.create(null);
10455
10466
  function t(r) {
10456
10467
  for (let i in r)
@@ -10469,7 +10480,7 @@ function Qh(n, e) {
10469
10480
  r++;
10470
10481
  return t != r;
10471
10482
  }
10472
- function To(n) {
10483
+ function Mo(n) {
10473
10484
  if (n.spec.state || n.spec.filterTransaction || n.spec.appendTransaction)
10474
10485
  throw new RangeError("Plugins passed directly to the view must not have a state component");
10475
10486
  }
@@ -10596,7 +10607,7 @@ function oi(n, e, t = !0) {
10596
10607
  return e.altKey && (n = "Alt-" + n), e.ctrlKey && (n = "Ctrl-" + n), e.metaKey && (n = "Meta-" + n), t && e.shiftKey && (n = "Shift-" + n), n;
10597
10608
  }
10598
10609
  function of(n) {
10599
- return new X({ props: { handleKeyDown: lf(n) } });
10610
+ return new Q({ props: { handleKeyDown: lf(n) } });
10600
10611
  }
10601
10612
  function lf(n) {
10602
10613
  let e = sf(n);
@@ -10634,10 +10645,10 @@ const df = (n, e, t) => {
10634
10645
  return l == null ? !1 : (e && e(n.tr.lift(o, l).scrollIntoView()), !0);
10635
10646
  }
10636
10647
  let s = i.nodeBefore;
10637
- if (!s.type.spec.isolating && Ea(n, i, e))
10648
+ if (!s.type.spec.isolating && Ca(n, i, e))
10638
10649
  return !0;
10639
10650
  if (r.parent.content.size == 0 && (zt(s, "end") || w.isSelectable(s))) {
10640
- let o = Yi(n.doc, r.before(), r.after(), S.empty);
10651
+ let o = Xi(n.doc, r.before(), r.after(), S.empty);
10641
10652
  if (o && o.slice.size < o.to - o.from) {
10642
10653
  if (e) {
10643
10654
  let l = n.tr.step(o);
@@ -10691,10 +10702,10 @@ const ff = (n, e, t) => {
10691
10702
  if (!i)
10692
10703
  return !1;
10693
10704
  let s = i.nodeAfter;
10694
- if (Ea(n, i, e))
10705
+ if (Ca(n, i, e))
10695
10706
  return !0;
10696
10707
  if (r.parent.content.size == 0 && (zt(s, "start") || w.isSelectable(s))) {
10697
- let o = Yi(n.doc, r.before(), r.after(), S.empty);
10708
+ let o = Xi(n.doc, r.before(), r.after(), S.empty);
10698
10709
  if (o && o.slice.size < o.to - o.from) {
10699
10710
  if (e) {
10700
10711
  let l = n.tr.step(o);
@@ -10800,19 +10811,19 @@ const kf = (n, e) => {
10800
10811
  }
10801
10812
  let r = t.blockRange(), i = r && jt(r);
10802
10813
  return i == null ? !1 : (e && e(n.tr.lift(r, i).scrollIntoView()), !0);
10803
- }, Ef = (n, e) => {
10814
+ }, Cf = (n, e) => {
10804
10815
  let { $from: t, to: r } = n.selection, i, s = t.sharedDepth(r);
10805
10816
  return s == 0 ? !1 : (i = t.before(s), e && e(n.tr.setSelection(w.create(n.doc, i))), !0);
10806
10817
  };
10807
- function Cf(n, e, t) {
10818
+ function Ef(n, e, t) {
10808
10819
  let r = e.nodeBefore, i = e.nodeAfter, s = e.index();
10809
10820
  return !r || !i || !r.type.compatibleContent(i.type) ? !1 : !r.content.size && e.parent.canReplace(s - 1, s) ? (t && t(n.tr.delete(e.pos - r.nodeSize, e.pos).scrollIntoView()), !0) : !e.parent.canReplace(s, s + 1) || !(i.isTextblock || rt(n.doc, e.pos)) ? !1 : (t && t(n.tr.clearIncompatible(e.pos, r.type, r.contentMatchAt(r.childCount)).join(e.pos).scrollIntoView()), !0);
10810
10821
  }
10811
- function Ea(n, e, t) {
10822
+ function Ca(n, e, t) {
10812
10823
  let r = e.nodeBefore, i = e.nodeAfter, s, o;
10813
10824
  if (r.type.spec.isolating || i.type.spec.isolating)
10814
10825
  return !1;
10815
- if (Cf(n, e, t))
10826
+ if (Ef(n, e, t))
10816
10827
  return !0;
10817
10828
  let l = e.parent.canReplace(e.index(), e.index() + 1);
10818
10829
  if (l && (s = (o = r.contentMatchAt(r.childCount)).findWrapping(i.type)) && o.matchType(s[0] || i.type).validEnd) {
@@ -10849,7 +10860,7 @@ function Ea(n, e, t) {
10849
10860
  }
10850
10861
  return !1;
10851
10862
  }
10852
- function Ca(n) {
10863
+ function Ea(n) {
10853
10864
  return function(e, t) {
10854
10865
  let r = e.selection, i = n < 0 ? r.$from : r.$to, s = i.depth;
10855
10866
  for (; i.node(s).isInline; ) {
@@ -10860,14 +10871,14 @@ function Ca(n) {
10860
10871
  return i.node(s).isTextblock ? (t && t(e.tr.setSelection(D.create(e.doc, n < 0 ? i.start(s) : i.end(s)))), !0) : !1;
10861
10872
  };
10862
10873
  }
10863
- const Tf = Ca(-1), Mf = Ca(1);
10874
+ const Tf = Ea(-1), Mf = Ea(1);
10864
10875
  function wf(n, e = null) {
10865
10876
  return function(t, r) {
10866
- let { $from: i, $to: s } = t.selection, o = i.blockRange(s), l = o && Gi(o, n, e);
10877
+ let { $from: i, $to: s } = t.selection, o = i.blockRange(s), l = o && Yi(o, n, e);
10867
10878
  return l ? (r && r(t.tr.wrap(o, l).scrollIntoView()), !0) : !1;
10868
10879
  };
10869
10880
  }
10870
- function Mo(n, e = null) {
10881
+ function wo(n, e = null) {
10871
10882
  return function(t, r) {
10872
10883
  let i = !1;
10873
10884
  for (let s = 0; s < t.selection.ranges.length && !i; s++) {
@@ -10909,7 +10920,7 @@ function Of(n, e = null) {
10909
10920
  let d = t.doc.resolve(o.start - 2);
10910
10921
  a = new Bn(d, d, o.depth), o.endIndex < o.parent.childCount && (o = new Bn(i, t.doc.resolve(s.end(o.depth)), o.depth)), l = !0;
10911
10922
  }
10912
- let c = Gi(a, n, e, o);
10923
+ let c = Yi(a, n, e, o);
10913
10924
  return c ? (r && r(vf(t.tr, o, c, l, n).scrollIntoView()), !0) : !1;
10914
10925
  };
10915
10926
  }
@@ -11080,10 +11091,10 @@ class Rf {
11080
11091
  this.callbacks = {};
11081
11092
  }
11082
11093
  }
11083
- function E(n, e, t) {
11084
- return n.config[e] === void 0 && n.parent ? E(n.parent, e, t) : typeof n.config[e] == "function" ? n.config[e].bind({
11094
+ function C(n, e, t) {
11095
+ return n.config[e] === void 0 && n.parent ? C(n.parent, e, t) : typeof n.config[e] == "function" ? n.config[e].bind({
11085
11096
  ...t,
11086
- parent: n.parent ? E(n.parent, e, t) : null
11097
+ parent: n.parent ? C(n.parent, e, t) : null
11087
11098
  }) : n.config[e];
11088
11099
  }
11089
11100
  function Pr(n) {
@@ -11108,7 +11119,7 @@ function Ta(n) {
11108
11119
  name: o.name,
11109
11120
  options: o.options,
11110
11121
  storage: o.storage
11111
- }, a = E(o, "addGlobalAttributes", l);
11122
+ }, a = C(o, "addGlobalAttributes", l);
11112
11123
  if (!a)
11113
11124
  return;
11114
11125
  a().forEach((d) => {
@@ -11130,7 +11141,7 @@ function Ta(n) {
11130
11141
  name: o.name,
11131
11142
  options: o.options,
11132
11143
  storage: o.storage
11133
- }, a = E(o, "addAttributes", l);
11144
+ }, a = C(o, "addAttributes", l);
11134
11145
  if (!a)
11135
11146
  return;
11136
11147
  const c = a();
@@ -11184,7 +11195,7 @@ function Pf(n = {}) {
11184
11195
  function Lf(n) {
11185
11196
  return typeof n != "string" ? n : n.match(/^[+-]?(?:\d*\.)?\d+$/) ? Number(n) : n === "true" ? !0 : n === "false" ? !1 : n;
11186
11197
  }
11187
- function wo(n, e) {
11198
+ function Oo(n, e) {
11188
11199
  return n.style ? n : {
11189
11200
  ...n,
11190
11201
  getAttrs: (t) => {
@@ -11202,7 +11213,7 @@ function wo(n, e) {
11202
11213
  }
11203
11214
  };
11204
11215
  }
11205
- function Oo(n) {
11216
+ function vo(n) {
11206
11217
  return Object.fromEntries(
11207
11218
  // @ts-ignore
11208
11219
  Object.entries(n).filter(([e, t]) => e === "attrs" && Pf(t) ? !1 : t != null)
@@ -11210,42 +11221,42 @@ function Oo(n) {
11210
11221
  }
11211
11222
  function Bf(n, e) {
11212
11223
  var t;
11213
- const r = Ta(n), { nodeExtensions: i, markExtensions: s } = Pr(n), o = (t = i.find((c) => E(c, "topNode"))) === null || t === void 0 ? void 0 : t.name, l = Object.fromEntries(i.map((c) => {
11224
+ const r = Ta(n), { nodeExtensions: i, markExtensions: s } = Pr(n), o = (t = i.find((c) => C(c, "topNode"))) === null || t === void 0 ? void 0 : t.name, l = Object.fromEntries(i.map((c) => {
11214
11225
  const d = r.filter((y) => y.type === c.name), u = {
11215
11226
  name: c.name,
11216
11227
  options: c.options,
11217
11228
  storage: c.storage,
11218
11229
  editor: e
11219
11230
  }, h = n.reduce((y, x) => {
11220
- const T = E(x, "extendNodeSchema", u);
11231
+ const T = C(x, "extendNodeSchema", u);
11221
11232
  return {
11222
11233
  ...y,
11223
11234
  ...T ? T(c) : {}
11224
11235
  };
11225
- }, {}), f = Oo({
11236
+ }, {}), f = vo({
11226
11237
  ...h,
11227
- content: A(E(c, "content", u)),
11228
- marks: A(E(c, "marks", u)),
11229
- group: A(E(c, "group", u)),
11230
- inline: A(E(c, "inline", u)),
11231
- atom: A(E(c, "atom", u)),
11232
- selectable: A(E(c, "selectable", u)),
11233
- draggable: A(E(c, "draggable", u)),
11234
- code: A(E(c, "code", u)),
11235
- defining: A(E(c, "defining", u)),
11236
- isolating: A(E(c, "isolating", u)),
11238
+ content: A(C(c, "content", u)),
11239
+ marks: A(C(c, "marks", u)),
11240
+ group: A(C(c, "group", u)),
11241
+ inline: A(C(c, "inline", u)),
11242
+ atom: A(C(c, "atom", u)),
11243
+ selectable: A(C(c, "selectable", u)),
11244
+ draggable: A(C(c, "draggable", u)),
11245
+ code: A(C(c, "code", u)),
11246
+ defining: A(C(c, "defining", u)),
11247
+ isolating: A(C(c, "isolating", u)),
11237
11248
  attrs: Object.fromEntries(d.map((y) => {
11238
11249
  var x;
11239
11250
  return [y.name, { default: (x = y == null ? void 0 : y.attribute) === null || x === void 0 ? void 0 : x.default }];
11240
11251
  }))
11241
- }), p = A(E(c, "parseHTML", u));
11242
- p && (f.parseDOM = p.map((y) => wo(y, d)));
11243
- const m = E(c, "renderHTML", u);
11252
+ }), p = A(C(c, "parseHTML", u));
11253
+ p && (f.parseDOM = p.map((y) => Oo(y, d)));
11254
+ const m = C(c, "renderHTML", u);
11244
11255
  m && (f.toDOM = (y) => m({
11245
11256
  node: y,
11246
11257
  HTMLAttributes: Ri(y, d)
11247
11258
  }));
11248
- const g = E(c, "renderText", u);
11259
+ const g = C(c, "renderText", u);
11249
11260
  return g && (f.toText = g), [c.name, f];
11250
11261
  })), a = Object.fromEntries(s.map((c) => {
11251
11262
  const d = r.filter((g) => g.type === c.name), u = {
@@ -11254,25 +11265,25 @@ function Bf(n, e) {
11254
11265
  storage: c.storage,
11255
11266
  editor: e
11256
11267
  }, h = n.reduce((g, y) => {
11257
- const x = E(y, "extendMarkSchema", u);
11268
+ const x = C(y, "extendMarkSchema", u);
11258
11269
  return {
11259
11270
  ...g,
11260
11271
  ...x ? x(c) : {}
11261
11272
  };
11262
- }, {}), f = Oo({
11273
+ }, {}), f = vo({
11263
11274
  ...h,
11264
- inclusive: A(E(c, "inclusive", u)),
11265
- excludes: A(E(c, "excludes", u)),
11266
- group: A(E(c, "group", u)),
11267
- spanning: A(E(c, "spanning", u)),
11268
- code: A(E(c, "code", u)),
11275
+ inclusive: A(C(c, "inclusive", u)),
11276
+ excludes: A(C(c, "excludes", u)),
11277
+ group: A(C(c, "group", u)),
11278
+ spanning: A(C(c, "spanning", u)),
11279
+ code: A(C(c, "code", u)),
11269
11280
  attrs: Object.fromEntries(d.map((g) => {
11270
11281
  var y;
11271
11282
  return [g.name, { default: (y = g == null ? void 0 : g.attribute) === null || y === void 0 ? void 0 : y.default }];
11272
11283
  }))
11273
- }), p = A(E(c, "parseHTML", u));
11274
- p && (f.parseDOM = p.map((g) => wo(g, d)));
11275
- const m = E(c, "renderHTML", u);
11284
+ }), p = A(C(c, "parseHTML", u));
11285
+ p && (f.parseDOM = p.map((g) => Oo(g, d)));
11286
+ const m = C(c, "renderHTML", u);
11276
11287
  return m && (f.toDOM = (g) => m({
11277
11288
  mark: g,
11278
11289
  HTMLAttributes: Ri(g, d)
@@ -11287,7 +11298,7 @@ function Bf(n, e) {
11287
11298
  function li(n, e) {
11288
11299
  return e.nodes[n] || e.marks[n] || null;
11289
11300
  }
11290
- function vo(n, e) {
11301
+ function Ao(n, e) {
11291
11302
  return Array.isArray(e) ? e.some((t) => (typeof t == "string" ? t : t.name) === n.name) : e;
11292
11303
  }
11293
11304
  const _f = (n, e = 500) => {
@@ -11304,7 +11315,7 @@ const _f = (n, e = 500) => {
11304
11315
  t += d.slice(0, Math.max(0, r - s));
11305
11316
  }), t;
11306
11317
  };
11307
- function as(n) {
11318
+ function cs(n) {
11308
11319
  return Object.prototype.toString.call(n) === "[object RegExp]";
11309
11320
  }
11310
11321
  class Lr {
@@ -11313,7 +11324,7 @@ class Lr {
11313
11324
  }
11314
11325
  }
11315
11326
  const Ff = (n, e) => {
11316
- if (as(e))
11327
+ if (cs(e))
11317
11328
  return e.exec(n);
11318
11329
  const t = e(n);
11319
11330
  if (!t)
@@ -11366,7 +11377,7 @@ function ai(n) {
11366
11377
  }), d;
11367
11378
  }
11368
11379
  function zf(n) {
11369
- const { editor: e, rules: t } = n, r = new X({
11380
+ const { editor: e, rules: t } = n, r = new Q({
11370
11381
  state: {
11371
11382
  init() {
11372
11383
  return null;
@@ -11431,7 +11442,7 @@ class wa {
11431
11442
  }
11432
11443
  }
11433
11444
  const Vf = (n, e) => {
11434
- if (as(e))
11445
+ if (cs(e))
11435
11446
  return [...n.matchAll(e)];
11436
11447
  const t = e(n);
11437
11448
  return t ? t.map((r) => {
@@ -11469,7 +11480,7 @@ function $f(n) {
11469
11480
  function jf(n) {
11470
11481
  const { editor: e, rules: t } = n;
11471
11482
  let r = null, i = !1, s = !1;
11472
- return t.map((l) => new X({
11483
+ return t.map((l) => new Q({
11473
11484
  // we register a global drag handler to track the current drag source element
11474
11485
  view(a) {
11475
11486
  const c = (d) => {
@@ -11530,22 +11541,22 @@ class It {
11530
11541
  editor: this.editor,
11531
11542
  type: li(r.name, this.schema)
11532
11543
  };
11533
- r.type === "mark" && (!((i = A(E(r, "keepOnSplit", s))) !== null && i !== void 0) || i) && this.splittableMarks.push(r.name);
11534
- const o = E(r, "onBeforeCreate", s);
11544
+ r.type === "mark" && (!((i = A(C(r, "keepOnSplit", s))) !== null && i !== void 0) || i) && this.splittableMarks.push(r.name);
11545
+ const o = C(r, "onBeforeCreate", s);
11535
11546
  o && this.editor.on("beforeCreate", o);
11536
- const l = E(r, "onCreate", s);
11547
+ const l = C(r, "onCreate", s);
11537
11548
  l && this.editor.on("create", l);
11538
- const a = E(r, "onUpdate", s);
11549
+ const a = C(r, "onUpdate", s);
11539
11550
  a && this.editor.on("update", a);
11540
- const c = E(r, "onSelectionUpdate", s);
11551
+ const c = C(r, "onSelectionUpdate", s);
11541
11552
  c && this.editor.on("selectionUpdate", c);
11542
- const d = E(r, "onTransaction", s);
11553
+ const d = C(r, "onTransaction", s);
11543
11554
  d && this.editor.on("transaction", d);
11544
- const u = E(r, "onFocus", s);
11555
+ const u = C(r, "onFocus", s);
11545
11556
  u && this.editor.on("focus", u);
11546
- const h = E(r, "onBlur", s);
11557
+ const h = C(r, "onBlur", s);
11547
11558
  h && this.editor.on("blur", h);
11548
- const f = E(r, "onDestroy", s);
11559
+ const f = C(r, "onDestroy", s);
11549
11560
  f && this.editor.on("destroy", f);
11550
11561
  });
11551
11562
  }
@@ -11559,13 +11570,13 @@ class It {
11559
11570
  name: t.name,
11560
11571
  options: t.options,
11561
11572
  storage: t.storage
11562
- }, i = E(t, "addExtensions", r);
11573
+ }, i = C(t, "addExtensions", r);
11563
11574
  return i ? [t, ...this.flatten(i())] : t;
11564
11575
  }).flat(10);
11565
11576
  }
11566
11577
  static sort(e) {
11567
11578
  return e.sort((r, i) => {
11568
- const s = E(r, "priority") || 100, o = E(i, "priority") || 100;
11579
+ const s = C(r, "priority") || 100, o = C(i, "priority") || 100;
11569
11580
  return s > o ? -1 : s < o ? 1 : 0;
11570
11581
  });
11571
11582
  }
@@ -11577,7 +11588,7 @@ class It {
11577
11588
  storage: t.storage,
11578
11589
  editor: this.editor,
11579
11590
  type: li(t.name, this.schema)
11580
- }, i = E(t, "addCommands", r);
11591
+ }, i = C(t, "addCommands", r);
11581
11592
  return i ? {
11582
11593
  ...e,
11583
11594
  ...i()
@@ -11592,7 +11603,7 @@ class It {
11592
11603
  storage: o.storage,
11593
11604
  editor: e,
11594
11605
  type: li(o.name, this.schema)
11595
- }, a = [], c = E(o, "addKeyboardShortcuts", l);
11606
+ }, a = [], c = C(o, "addKeyboardShortcuts", l);
11596
11607
  let d = {};
11597
11608
  if (o.type === "mark" && o.config.exitable && (d.ArrowRight = () => xe.handleExit({ editor: e, mark: o })), c) {
11598
11609
  const m = Object.fromEntries(Object.entries(c()).map(([g, y]) => [g, () => y({ editor: e })]));
@@ -11600,11 +11611,11 @@ class It {
11600
11611
  }
11601
11612
  const u = of(d);
11602
11613
  a.push(u);
11603
- const h = E(o, "addInputRules", l);
11604
- vo(o, e.options.enableInputRules) && h && r.push(...h());
11605
- const f = E(o, "addPasteRules", l);
11606
- vo(o, e.options.enablePasteRules) && f && i.push(...f());
11607
- const p = E(o, "addProseMirrorPlugins", l);
11614
+ const h = C(o, "addInputRules", l);
11615
+ Ao(o, e.options.enableInputRules) && h && r.push(...h());
11616
+ const f = C(o, "addPasteRules", l);
11617
+ Ao(o, e.options.enablePasteRules) && f && i.push(...f());
11618
+ const p = C(o, "addProseMirrorPlugins", l);
11608
11619
  if (p) {
11609
11620
  const m = p();
11610
11621
  a.push(...m);
@@ -11628,14 +11639,14 @@ class It {
11628
11639
  }
11629
11640
  get nodeViews() {
11630
11641
  const { editor: e } = this, { nodeExtensions: t } = Pr(this.extensions);
11631
- return Object.fromEntries(t.filter((r) => !!E(r, "addNodeView")).map((r) => {
11642
+ return Object.fromEntries(t.filter((r) => !!C(r, "addNodeView")).map((r) => {
11632
11643
  const i = this.attributes.filter((a) => a.type === r.name), s = {
11633
11644
  name: r.name,
11634
11645
  options: r.options,
11635
11646
  storage: r.storage,
11636
11647
  editor: e,
11637
11648
  type: W(r.name, this.schema)
11638
- }, o = E(r, "addNodeView", s);
11649
+ }, o = C(r, "addNodeView", s);
11639
11650
  if (!o)
11640
11651
  return [];
11641
11652
  const l = (a, c, d, u) => {
@@ -11673,9 +11684,9 @@ class ge {
11673
11684
  }, this.config = {
11674
11685
  ...this.config,
11675
11686
  ...e
11676
- }, this.name = this.config.name, e.defaultOptions && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`), this.options = this.config.defaultOptions, this.config.addOptions && (this.options = A(E(this, "addOptions", {
11687
+ }, this.name = this.config.name, e.defaultOptions && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`), this.options = this.config.defaultOptions, this.config.addOptions && (this.options = A(C(this, "addOptions", {
11677
11688
  name: this.name
11678
- }))), this.storage = A(E(this, "addStorage", {
11689
+ }))), this.storage = A(C(this, "addStorage", {
11679
11690
  name: this.name,
11680
11691
  options: this.options
11681
11692
  })) || {};
@@ -11685,16 +11696,16 @@ class ge {
11685
11696
  }
11686
11697
  configure(e = {}) {
11687
11698
  const t = this.extend();
11688
- return t.options = Br(this.options, e), t.storage = A(E(t, "addStorage", {
11699
+ return t.options = Br(this.options, e), t.storage = A(C(t, "addStorage", {
11689
11700
  name: t.name,
11690
11701
  options: t.options
11691
11702
  })), t;
11692
11703
  }
11693
11704
  extend(e = {}) {
11694
11705
  const t = new ge(e);
11695
- return t.parent = this, this.child = t, t.name = e.name ? e.name : t.parent.name, e.defaultOptions && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`), t.options = A(E(t, "addOptions", {
11706
+ return t.parent = this, this.child = t, t.name = e.name ? e.name : t.parent.name, e.defaultOptions && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`), t.options = A(C(t, "addOptions", {
11696
11707
  name: t.name
11697
- })), t.storage = A(E(t, "addStorage", {
11708
+ })), t.storage = A(C(t, "addStorage", {
11698
11709
  name: t.name,
11699
11710
  options: t.options
11700
11711
  })), t;
@@ -11724,7 +11735,7 @@ const Wf = ge.create({
11724
11735
  name: "clipboardTextSerializer",
11725
11736
  addProseMirrorPlugins() {
11726
11737
  return [
11727
- new X({
11738
+ new Q({
11728
11739
  key: new ie("clipboardTextSerializer"),
11729
11740
  props: {
11730
11741
  clipboardTextSerializer: () => {
@@ -11788,7 +11799,7 @@ const Wf = ge.create({
11788
11799
  }, tp = () => ({ state: n, dispatch: e }) => af(n, e), np = () => ({ commands: n }) => n.keyboardShortcut("Enter"), rp = () => ({ state: n, dispatch: e }) => kf(n, e);
11789
11800
  function Kn(n, e, t = { strict: !0 }) {
11790
11801
  const r = Object.keys(e);
11791
- return r.length ? r.every((i) => t.strict ? e[i] === n[i] : as(e[i]) ? e[i].test(n[i]) : e[i] === n[i]) : !0;
11802
+ return r.length ? r.every((i) => t.strict ? e[i] === n[i] : cs(e[i]) ? e[i].test(n[i]) : e[i] === n[i]) : !0;
11792
11803
  }
11793
11804
  function Pi(n, e, t = {}) {
11794
11805
  return n.find((r) => r.type === e && Kn(r.attrs, t));
@@ -11796,7 +11807,7 @@ function Pi(n, e, t = {}) {
11796
11807
  function ip(n, e, t = {}) {
11797
11808
  return !!Pi(n, e, t);
11798
11809
  }
11799
- function cs(n, e, t = {}) {
11810
+ function ds(n, e, t = {}) {
11800
11811
  if (!n || !e)
11801
11812
  return;
11802
11813
  let r = n.parent.childAfter(n.parentOffset);
@@ -11826,7 +11837,7 @@ function st(n, e) {
11826
11837
  const sp = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
11827
11838
  const s = st(n, r.schema), { doc: o, selection: l } = t, { $from: a, from: c, to: d } = l;
11828
11839
  if (i) {
11829
- const u = cs(a, s, e);
11840
+ const u = ds(a, s, e);
11830
11841
  if (u && u.from <= c && u.to >= d) {
11831
11842
  const h = D.create(o, u.from, u.to);
11832
11843
  t.setSelection(h);
@@ -11840,7 +11851,7 @@ const sp = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
11840
11851
  return !0;
11841
11852
  return !1;
11842
11853
  };
11843
- function ds(n) {
11854
+ function us(n) {
11844
11855
  return n instanceof D;
11845
11856
  }
11846
11857
  function _e(n = 0, e = 0, t = 0) {
@@ -11879,12 +11890,12 @@ const lp = (n = null, e = {}) => ({ editor: t, view: r, tr: i, dispatch: s }) =>
11879
11890
  };
11880
11891
  if (r.hasFocus() && n === null || n === !1)
11881
11892
  return !0;
11882
- if (s && n === null && !ds(t.state.selection))
11893
+ if (s && n === null && !us(t.state.selection))
11883
11894
  return o(), !0;
11884
11895
  const l = Aa(i.doc, n) || t.state.selection, a = t.state.selection.eq(l);
11885
11896
  return s && (a || i.setSelection(l), a && i.storedMarks && i.setStoredMarks(i.storedMarks), o()), !0;
11886
11897
  }, ap = (n, e) => (t) => n.every((r, i) => e(r, { ...t, index: i })), cp = (n, e) => ({ tr: t, commands: r }) => r.insertContentAt({ from: t.selection.from, to: t.selection.to }, n, e);
11887
- function Ao(n) {
11898
+ function No(n) {
11888
11899
  const e = `<body>${n}</body>`;
11889
11900
  return new window.DOMParser().parseFromString(e, "text/html").body;
11890
11901
  }
@@ -11900,8 +11911,8 @@ function Wn(n, e, t) {
11900
11911
  return console.warn("[tiptap warn]: Invalid content.", "Passed value:", n, "Error:", r), Wn("", e, t);
11901
11912
  }
11902
11913
  if (typeof n == "string") {
11903
- const r = Ui.fromSchema(e);
11904
- return t.slice ? r.parseSlice(Ao(n), t.parseOptions).content : r.parse(Ao(n), t.parseOptions);
11914
+ const r = Ji.fromSchema(e);
11915
+ return t.slice ? r.parseSlice(No(n), t.parseOptions).content : r.parse(No(n), t.parseOptions);
11905
11916
  }
11906
11917
  return Wn("", e, t);
11907
11918
  }
@@ -11944,7 +11955,7 @@ const up = (n) => n.toString().startsWith("<"), hp = (n, e, t) => ({ tr: r, disp
11944
11955
  }
11945
11956
  return !0;
11946
11957
  }, fp = () => ({ state: n, dispatch: e }) => mf(n, e), pp = () => ({ state: n, dispatch: e }) => gf(n, e), mp = () => ({ state: n, dispatch: e }) => df(n, e), gp = () => ({ state: n, dispatch: e }) => ff(n, e);
11947
- function us() {
11958
+ function hs() {
11948
11959
  return typeof navigator < "u" ? /Mac/.test(navigator.platform) : !1;
11949
11960
  }
11950
11961
  function yp(n) {
@@ -11963,7 +11974,7 @@ function yp(n) {
11963
11974
  else if (/^s(hift)?$/i.test(a))
11964
11975
  s = !0;
11965
11976
  else if (/^mod$/i.test(a))
11966
- _r() || us() ? o = !0 : i = !0;
11977
+ _r() || hs() ? o = !0 : i = !0;
11967
11978
  else
11968
11979
  throw new Error(`Unrecognized modifier name: ${a}`);
11969
11980
  }
@@ -12007,28 +12018,28 @@ const kp = (n, e = {}) => ({ state: t, dispatch: r }) => {
12007
12018
  }, Sp = () => ({ state: n, dispatch: e }) => xf(n, e), xp = (n) => ({ state: e, dispatch: t }) => {
12008
12019
  const r = W(n, e.schema);
12009
12020
  return Af(r)(e, t);
12010
- }, Ep = () => ({ state: n, dispatch: e }) => bf(n, e);
12021
+ }, Cp = () => ({ state: n, dispatch: e }) => bf(n, e);
12011
12022
  function Fr(n, e) {
12012
12023
  return e.nodes[n] ? "node" : e.marks[n] ? "mark" : null;
12013
12024
  }
12014
- function No(n, e) {
12025
+ function Do(n, e) {
12015
12026
  const t = typeof e == "string" ? [e] : e;
12016
12027
  return Object.keys(n).reduce((r, i) => (t.includes(i) || (r[i] = n[i]), r), {});
12017
12028
  }
12018
- const Cp = (n, e) => ({ tr: t, state: r, dispatch: i }) => {
12029
+ const Ep = (n, e) => ({ tr: t, state: r, dispatch: i }) => {
12019
12030
  let s = null, o = null;
12020
12031
  const l = Fr(typeof n == "string" ? n : n.name, r.schema);
12021
12032
  return l ? (l === "node" && (s = W(n, r.schema)), l === "mark" && (o = st(n, r.schema)), i && t.selection.ranges.forEach((a) => {
12022
12033
  r.doc.nodesBetween(a.$from.pos, a.$to.pos, (c, d) => {
12023
- s && s === c.type && t.setNodeMarkup(d, void 0, No(c.attrs, e)), o && c.marks.length && c.marks.forEach((u) => {
12024
- o === u.type && t.addMark(d, d + c.nodeSize, o.create(No(u.attrs, e)));
12034
+ s && s === c.type && t.setNodeMarkup(d, void 0, Do(c.attrs, e)), o && c.marks.length && c.marks.forEach((u) => {
12035
+ o === u.type && t.addMark(d, d + c.nodeSize, o.create(Do(u.attrs, e)));
12025
12036
  });
12026
12037
  });
12027
12038
  }), !0) : !1;
12028
12039
  }, Tp = () => ({ tr: n, dispatch: e }) => (e && n.scrollIntoView(), !0), Mp = () => ({ tr: n, commands: e }) => e.setTextSelection({
12029
12040
  from: 0,
12030
12041
  to: n.doc.content.size
12031
- }), wp = () => ({ state: n, dispatch: e }) => uf(n, e), Op = () => ({ state: n, dispatch: e }) => pf(n, e), vp = () => ({ state: n, dispatch: e }) => Ef(n, e), Ap = () => ({ state: n, dispatch: e }) => Mf(n, e), Np = () => ({ state: n, dispatch: e }) => Tf(n, e);
12042
+ }), wp = () => ({ state: n, dispatch: e }) => uf(n, e), Op = () => ({ state: n, dispatch: e }) => pf(n, e), vp = () => ({ state: n, dispatch: e }) => Cf(n, e), Ap = () => ({ state: n, dispatch: e }) => Mf(n, e), Np = () => ({ state: n, dispatch: e }) => Tf(n, e);
12032
12043
  function Na(n, e, t = {}) {
12033
12044
  return Wn(n, e, { slice: !1, parseOptions: t });
12034
12045
  }
@@ -12073,7 +12084,7 @@ function Rp(n, e) {
12073
12084
  };
12074
12085
  }
12075
12086
  }
12076
- function hs(n) {
12087
+ function fs(n) {
12077
12088
  return (e) => Rp(e.$from, n);
12078
12089
  }
12079
12090
  function Pp(n, e) {
@@ -12150,7 +12161,7 @@ function Pa(n) {
12150
12161
  function Hr(n, e, t) {
12151
12162
  const r = [];
12152
12163
  return n === e ? t.resolve(n).marks().forEach((i) => {
12153
- const s = t.resolve(n - 1), o = cs(s, i.type);
12164
+ const s = t.resolve(n - 1), o = ds(s, i.type);
12154
12165
  o && r.push({
12155
12166
  mark: i,
12156
12167
  ...o
@@ -12198,7 +12209,7 @@ function zp(n, e, t = {}) {
12198
12209
  const r = Fr(e, n.schema);
12199
12210
  return r === "node" ? pn(n, e, t) : r === "mark" ? Li(n, e, t) : !1;
12200
12211
  }
12201
- function Do(n, e) {
12212
+ function Io(n, e) {
12202
12213
  const { nodeExtensions: t } = Pr(e), r = t.find((o) => o.name === n);
12203
12214
  if (!r)
12204
12215
  return !1;
@@ -12206,7 +12217,7 @@ function Do(n, e) {
12206
12217
  name: r.name,
12207
12218
  options: r.options,
12208
12219
  storage: r.storage
12209
- }, s = A(E(r, "group", i));
12220
+ }, s = A(C(r, "group", i));
12210
12221
  return typeof s != "string" ? !1 : s.split(" ").includes("list");
12211
12222
  }
12212
12223
  function Hp(n) {
@@ -12237,7 +12248,7 @@ function $p(n, e, t) {
12237
12248
  var r;
12238
12249
  const { selection: i } = e;
12239
12250
  let s = null;
12240
- if (ds(i) && (s = i.$cursor), s) {
12251
+ if (us(i) && (s = i.$cursor), s) {
12241
12252
  const l = (r = n.storedMarks) !== null && r !== void 0 ? r : s.marks();
12242
12253
  return !!t.isInSet(l) || !l.some((a) => a.type.excludes(t));
12243
12254
  }
@@ -12280,7 +12291,7 @@ const jp = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
12280
12291
  return $p(r, t, a);
12281
12292
  }, qp = (n, e) => ({ tr: t }) => (t.setMeta(n, e), !0), Kp = (n, e = {}) => ({ state: t, dispatch: r, chain: i }) => {
12282
12293
  const s = W(n, t.schema);
12283
- return s.isTextblock ? i().command(({ commands: o }) => Mo(s, e)(t) ? !0 : o.clearNodes()).command(({ state: o }) => Mo(s, e)(o, r)).run() : (console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'), !1);
12294
+ return s.isTextblock ? i().command(({ commands: o }) => wo(s, e)(t) ? !0 : o.clearNodes()).command(({ state: o }) => wo(s, e)(o, r)).run() : (console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'), !1);
12284
12295
  }, Wp = (n) => ({ tr: e, dispatch: t }) => {
12285
12296
  if (t) {
12286
12297
  const { doc: r } = e, i = _e(n, 0, r.content.size), s = w.create(r, i);
@@ -12297,7 +12308,7 @@ const jp = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
12297
12308
  const r = W(n, e.schema);
12298
12309
  return If(r)(e, t);
12299
12310
  };
12300
- function Io(n, e) {
12311
+ function Ro(n, e) {
12301
12312
  const t = n.storedMarks || n.selection.$to.parentOffset && n.selection.$from.marks();
12302
12313
  if (t) {
12303
12314
  const r = t.filter((i) => e == null ? void 0 : e.includes(i.type.name));
@@ -12307,7 +12318,7 @@ function Io(n, e) {
12307
12318
  const Gp = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, editor: i }) => {
12308
12319
  const { selection: s, doc: o } = e, { $from: l, $to: a } = s, c = i.extensionManager.attributes, d = Nn(c, l.node().type.name, l.node().attrs);
12309
12320
  if (s instanceof w && s.node.isBlock)
12310
- return !l.parentOffset || !Rt(o, l.pos) ? !1 : (r && (n && Io(t, i.extensionManager.splittableMarks), e.split(l.pos).scrollIntoView()), !0);
12321
+ return !l.parentOffset || !Rt(o, l.pos) ? !1 : (r && (n && Ro(t, i.extensionManager.splittableMarks), e.split(l.pos).scrollIntoView()), !0);
12311
12322
  if (!l.parent.isBlock)
12312
12323
  return !1;
12313
12324
  if (r) {
@@ -12329,7 +12340,7 @@ const Gp = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
12329
12340
  const m = e.mapping.map(l.before()), g = e.doc.resolve(m);
12330
12341
  l.node(-1).canReplaceWith(g.index(), g.index() + 1, h) && e.setNodeMarkup(e.mapping.map(l.before()), h);
12331
12342
  }
12332
- n && Io(t, i.extensionManager.splittableMarks), e.scrollIntoView();
12343
+ n && Ro(t, i.extensionManager.splittableMarks), e.scrollIntoView();
12333
12344
  }
12334
12345
  return !0;
12335
12346
  }, Yp = (n) => ({ tr: e, state: t, dispatch: r, editor: i }) => {
@@ -12353,12 +12364,12 @@ const Gp = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
12353
12364
  g = g.append(b.from(o.createAndFill(null, R) || void 0));
12354
12365
  const P = l.before(l.depth - (y - 1));
12355
12366
  e.replace(P, l.after(-x), new S(g, 4 - y, 0));
12356
- let C = -1;
12367
+ let E = -1;
12357
12368
  e.doc.nodesBetween(P, e.doc.content.size, (L, I) => {
12358
- if (C > -1)
12369
+ if (E > -1)
12359
12370
  return !1;
12360
- L.isTextblock && L.content.size === 0 && (C = I + 1);
12361
- }), C > -1 && e.setSelection(D.near(e.doc.resolve(C))), e.scrollIntoView();
12371
+ L.isTextblock && L.content.size === 0 && (E = I + 1);
12372
+ }), E > -1 && e.setSelection(D.near(e.doc.resolve(E))), e.scrollIntoView();
12362
12373
  }
12363
12374
  return !0;
12364
12375
  }
@@ -12379,7 +12390,7 @@ const Gp = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
12379
12390
  }
12380
12391
  return !0;
12381
12392
  }, di = (n, e) => {
12382
- const t = hs((o) => o.type === e)(n.selection);
12393
+ const t = fs((o) => o.type === e)(n.selection);
12383
12394
  if (!t)
12384
12395
  return !0;
12385
12396
  const r = n.doc.resolve(Math.max(0, t.pos - 1)).before(t.depth);
@@ -12388,7 +12399,7 @@ const Gp = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
12388
12399
  const i = n.doc.nodeAt(r);
12389
12400
  return t.node.type === (i == null ? void 0 : i.type) && rt(n.doc, t.pos) && n.join(t.pos), !0;
12390
12401
  }, ui = (n, e) => {
12391
- const t = hs((o) => o.type === e)(n.selection);
12402
+ const t = fs((o) => o.type === e)(n.selection);
12392
12403
  if (!t)
12393
12404
  return !0;
12394
12405
  const r = n.doc.resolve(t.start).after(t.depth);
@@ -12400,16 +12411,16 @@ const Gp = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
12400
12411
  const { extensions: u, splittableMarks: h } = i.extensionManager, f = W(n, o.schema), p = W(e, o.schema), { selection: m, storedMarks: g } = o, { $from: y, $to: x } = m, T = y.blockRange(x), R = g || m.$to.parentOffset && m.$from.marks();
12401
12412
  if (!T)
12402
12413
  return !1;
12403
- const P = hs((C) => Do(C.type.name, u))(m);
12414
+ const P = fs((E) => Io(E.type.name, u))(m);
12404
12415
  if (T.depth >= 1 && P && T.depth - P.depth <= 1) {
12405
12416
  if (P.node.type === f)
12406
12417
  return c.liftListItem(p);
12407
- if (Do(P.node.type.name, u) && f.validContent(P.node.content) && l)
12418
+ if (Io(P.node.type.name, u) && f.validContent(P.node.content) && l)
12408
12419
  return a().command(() => (s.setNodeMarkup(P.pos, f), !0)).command(() => di(s, f)).command(() => ui(s, f)).run();
12409
12420
  }
12410
12421
  return !t || !R || !l ? a().command(() => d().wrapInList(f, r) ? !0 : c.clearNodes()).wrapInList(f, r).command(() => di(s, f)).command(() => ui(s, f)).run() : a().command(() => {
12411
- const C = d().wrapInList(f, r), L = R.filter((I) => h.includes(I.type.name));
12412
- return s.ensureMarks(L), C ? !0 : c.clearNodes();
12422
+ const E = d().wrapInList(f, r), L = R.filter((I) => h.includes(I.type.name));
12423
+ return s.ensureMarks(L), E ? !0 : c.clearNodes();
12413
12424
  }).wrapInList(f, r).command(() => di(s, f)).command(() => ui(s, f)).run();
12414
12425
  }, Qp = (n, e = {}, t = {}) => ({ state: r, commands: i }) => {
12415
12426
  const { extendEmptyMarkRange: s = !1 } = t, o = st(n, r.schema);
@@ -12452,7 +12463,7 @@ const Gp = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
12452
12463
  return !0;
12453
12464
  if (d && o) {
12454
12465
  let { from: h, to: f } = l;
12455
- const p = (s = c.marks().find((g) => g.type === a)) === null || s === void 0 ? void 0 : s.attrs, m = cs(c, a, p);
12466
+ const p = (s = c.marks().find((g) => g.type === a)) === null || s === void 0 ? void 0 : s.attrs, m = ds(c, a, p);
12456
12467
  m && (h = m.from, f = m.to), t.removeMark(h, f, a);
12457
12468
  } else
12458
12469
  u.forEach((h) => {
@@ -12513,8 +12524,8 @@ var lm = /* @__PURE__ */ Object.freeze({
12513
12524
  lift: kp,
12514
12525
  liftEmptyBlock: Sp,
12515
12526
  liftListItem: xp,
12516
- newlineInCode: Ep,
12517
- resetAttributes: Cp,
12527
+ newlineInCode: Cp,
12528
+ resetAttributes: Ep,
12518
12529
  scrollIntoView: Tp,
12519
12530
  selectAll: Mp,
12520
12531
  selectNodeBackward: wp,
@@ -12553,7 +12564,7 @@ const am = ge.create({
12553
12564
  name: "editable",
12554
12565
  addProseMirrorPlugins() {
12555
12566
  return [
12556
- new X({
12567
+ new Q({
12557
12568
  key: new ie("editable"),
12558
12569
  props: {
12559
12570
  editable: () => this.editor.options.editable
@@ -12566,7 +12577,7 @@ const am = ge.create({
12566
12577
  addProseMirrorPlugins() {
12567
12578
  const { editor: n } = this;
12568
12579
  return [
12569
- new X({
12580
+ new Q({
12570
12581
  key: new ie("focusEvents"),
12571
12582
  props: {
12572
12583
  handleDOMEvents: {
@@ -12630,7 +12641,7 @@ const am = ge.create({
12630
12641
  "Ctrl-a": () => this.editor.commands.selectTextblockStart(),
12631
12642
  "Ctrl-e": () => this.editor.commands.selectTextblockEnd()
12632
12643
  };
12633
- return _r() || us() ? s : i;
12644
+ return _r() || hs() ? s : i;
12634
12645
  },
12635
12646
  addProseMirrorPlugins() {
12636
12647
  return [
@@ -12639,7 +12650,7 @@ const am = ge.create({
12639
12650
  // to a paragraph if necessary.
12640
12651
  // This is an alternative to ProseMirror's `AllSelection`, which doesn’t work well
12641
12652
  // with many other commands.
12642
- new X({
12653
+ new Q({
12643
12654
  key: new ie("clearDocument"),
12644
12655
  appendTransaction: (n, e, t) => {
12645
12656
  if (!(n.some((p) => p.docChanged) && !e.doc.eq(t.doc)))
@@ -12664,7 +12675,7 @@ const am = ge.create({
12664
12675
  name: "tabindex",
12665
12676
  addProseMirrorPlugins() {
12666
12677
  return [
12667
- new X({
12678
+ new Q({
12668
12679
  key: new ie("tabindex"),
12669
12680
  props: {
12670
12681
  attributes: this.editor.isEditable ? { tabindex: "0" } : {}
@@ -13052,7 +13063,7 @@ function mn(n) {
13052
13063
  }
13053
13064
  });
13054
13065
  }
13055
- function Ro(n) {
13066
+ function Po(n) {
13056
13067
  return new Lr({
13057
13068
  find: n.find,
13058
13069
  handler: ({ state: e, range: t, match: r }) => {
@@ -13069,7 +13080,7 @@ function Ro(n) {
13069
13080
  }
13070
13081
  });
13071
13082
  }
13072
- function Po(n) {
13083
+ function Lo(n) {
13073
13084
  return new Lr({
13074
13085
  find: n.find,
13075
13086
  handler: ({ state: e, range: t, match: r }) => {
@@ -13084,7 +13095,7 @@ function gn(n) {
13084
13095
  return new Lr({
13085
13096
  find: n.find,
13086
13097
  handler: ({ state: e, range: t, match: r, chain: i }) => {
13087
- const s = A(n.getAttributes, void 0, r) || {}, o = e.tr.delete(t.from, t.to), a = o.doc.resolve(t.from).blockRange(), c = a && Gi(a, n.type, s);
13098
+ const s = A(n.getAttributes, void 0, r) || {}, o = e.tr.delete(t.from, t.to), a = o.doc.resolve(t.from).blockRange(), c = a && Yi(a, n.type, s);
13088
13099
  if (!c)
13089
13100
  return null;
13090
13101
  if (o.wrap(a, c), n.keepMarks && n.editor) {
@@ -13111,9 +13122,9 @@ class xe {
13111
13122
  }, this.config = {
13112
13123
  ...this.config,
13113
13124
  ...e
13114
- }, this.name = this.config.name, e.defaultOptions && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`), this.options = this.config.defaultOptions, this.config.addOptions && (this.options = A(E(this, "addOptions", {
13125
+ }, this.name = this.config.name, e.defaultOptions && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`), this.options = this.config.defaultOptions, this.config.addOptions && (this.options = A(C(this, "addOptions", {
13115
13126
  name: this.name
13116
- }))), this.storage = A(E(this, "addStorage", {
13127
+ }))), this.storage = A(C(this, "addStorage", {
13117
13128
  name: this.name,
13118
13129
  options: this.options
13119
13130
  })) || {};
@@ -13123,16 +13134,16 @@ class xe {
13123
13134
  }
13124
13135
  configure(e = {}) {
13125
13136
  const t = this.extend();
13126
- return t.options = Br(this.options, e), t.storage = A(E(t, "addStorage", {
13137
+ return t.options = Br(this.options, e), t.storage = A(C(t, "addStorage", {
13127
13138
  name: t.name,
13128
13139
  options: t.options
13129
13140
  })), t;
13130
13141
  }
13131
13142
  extend(e = {}) {
13132
13143
  const t = new xe(e);
13133
- return t.parent = this, this.child = t, t.name = e.name ? e.name : t.parent.name, e.defaultOptions && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`), t.options = A(E(t, "addOptions", {
13144
+ return t.parent = this, this.child = t, t.name = e.name ? e.name : t.parent.name, e.defaultOptions && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`), t.options = A(C(t, "addOptions", {
13134
13145
  name: t.name
13135
- })), t.storage = A(E(t, "addStorage", {
13146
+ })), t.storage = A(C(t, "addStorage", {
13136
13147
  name: t.name,
13137
13148
  options: t.options
13138
13149
  })), t;
@@ -13157,9 +13168,9 @@ class ne {
13157
13168
  }, this.config = {
13158
13169
  ...this.config,
13159
13170
  ...e
13160
- }, this.name = this.config.name, e.defaultOptions && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`), this.options = this.config.defaultOptions, this.config.addOptions && (this.options = A(E(this, "addOptions", {
13171
+ }, this.name = this.config.name, e.defaultOptions && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`), this.options = this.config.defaultOptions, this.config.addOptions && (this.options = A(C(this, "addOptions", {
13161
13172
  name: this.name
13162
- }))), this.storage = A(E(this, "addStorage", {
13173
+ }))), this.storage = A(C(this, "addStorage", {
13163
13174
  name: this.name,
13164
13175
  options: this.options
13165
13176
  })) || {};
@@ -13169,16 +13180,16 @@ class ne {
13169
13180
  }
13170
13181
  configure(e = {}) {
13171
13182
  const t = this.extend();
13172
- return t.options = Br(this.options, e), t.storage = A(E(t, "addStorage", {
13183
+ return t.options = Br(this.options, e), t.storage = A(C(t, "addStorage", {
13173
13184
  name: t.name,
13174
13185
  options: t.options
13175
13186
  })), t;
13176
13187
  }
13177
13188
  extend(e = {}) {
13178
13189
  const t = new ne(e);
13179
- return t.parent = this, this.child = t, t.name = e.name ? e.name : t.parent.name, e.defaultOptions && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`), t.options = A(E(t, "addOptions", {
13190
+ return t.parent = this, this.child = t, t.name = e.name ? e.name : t.parent.name, e.defaultOptions && console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`), t.options = A(C(t, "addOptions", {
13180
13191
  name: t.name
13181
- })), t.storage = A(E(t, "addStorage", {
13192
+ })), t.storage = A(C(t, "addStorage", {
13182
13193
  name: t.name,
13183
13194
  options: t.options
13184
13195
  })), t;
@@ -13282,7 +13293,7 @@ function Ht(n) {
13282
13293
  function bm(n) {
13283
13294
  return n.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&");
13284
13295
  }
13285
- function Lo(n) {
13296
+ function Bo(n) {
13286
13297
  return new wa({
13287
13298
  find: n.find,
13288
13299
  handler({ match: e, chain: t, range: r }) {
@@ -13299,7 +13310,7 @@ function Lo(n) {
13299
13310
  class km {
13300
13311
  constructor({ editor: e, element: t, view: r, tippyOptions: i = {}, updateDelay: s = 250, shouldShow: o }) {
13301
13312
  this.preventHide = !1, this.shouldShow = ({ view: l, state: a, from: c, to: d }) => {
13302
- const { doc: u, selection: h } = a, { empty: f } = h, p = !u.textBetween(c, d).length && ds(a.selection), m = this.element.contains(document.activeElement);
13313
+ const { doc: u, selection: h } = a, { empty: f } = h, p = !u.textBetween(c, d).length && us(a.selection), m = this.element.contains(document.activeElement);
13303
13314
  return !(!(l.hasFocus() || m) || f || p || !this.editor.isEditable);
13304
13315
  }, this.mousedownHandler = () => {
13305
13316
  this.preventHide = !0;
@@ -13327,7 +13338,7 @@ class km {
13327
13338
  if (m || !a && !c)
13328
13339
  return;
13329
13340
  this.createTooltip();
13330
- const { ranges: x } = g, T = Math.min(...x.map((C) => C.$from.pos)), R = Math.max(...x.map((C) => C.$to.pos));
13341
+ const { ranges: x } = g, T = Math.min(...x.map((E) => E.$from.pos)), R = Math.max(...x.map((E) => E.$to.pos));
13331
13342
  if (!((u = this.shouldShow) === null || u === void 0 ? void 0 : u.call(this, {
13332
13343
  editor: this.editor,
13333
13344
  view: l,
@@ -13342,10 +13353,10 @@ class km {
13342
13353
  (h = this.tippy) === null || h === void 0 || h.setProps({
13343
13354
  getReferenceClientRect: ((f = this.tippyOptions) === null || f === void 0 ? void 0 : f.getReferenceClientRect) || (() => {
13344
13355
  if (Vp(p.selection)) {
13345
- let C = l.nodeDOM(T);
13346
- const L = C.dataset.nodeViewWrapper ? C : C.querySelector("[data-node-view-wrapper]");
13347
- if (L && (C = L.firstChild), C)
13348
- return C.getBoundingClientRect();
13356
+ let E = l.nodeDOM(T);
13357
+ const L = E.dataset.nodeViewWrapper ? E : E.querySelector("[data-node-view-wrapper]");
13358
+ if (L && (E = L.firstChild), E)
13359
+ return E.getBoundingClientRect();
13349
13360
  }
13350
13361
  return La(l, T, R);
13351
13362
  })
@@ -13354,7 +13365,7 @@ class km {
13354
13365
  }
13355
13366
  createTooltip() {
13356
13367
  const { element: e } = this.editor.options, t = !!e.parentElement;
13357
- this.tippy || !t || (this.tippy = Er(e, {
13368
+ this.tippy || !t || (this.tippy = Cr(e, {
13358
13369
  duration: 0,
13359
13370
  getReferenceClientRect: null,
13360
13371
  content: this.element,
@@ -13387,7 +13398,7 @@ class km {
13387
13398
  !((e = this.tippy) === null || e === void 0) && e.popper.firstChild && this.tippy.popper.firstChild.removeEventListener("blur", this.tippyBlurHandler), (t = this.tippy) === null || t === void 0 || t.destroy(), this.element.removeEventListener("mousedown", this.mousedownHandler, { capture: !0 }), this.view.dom.removeEventListener("dragstart", this.dragstartHandler), this.editor.off("focus", this.focusHandler), this.editor.off("blur", this.blurHandler);
13388
13399
  }
13389
13400
  }
13390
- const Ba = (n) => new X({
13401
+ const Ba = (n) => new Q({
13391
13402
  key: typeof n.pluginKey == "string" ? new ie(n.pluginKey) : n.pluginKey,
13392
13403
  view: (e) => new km({ view: e, ...n })
13393
13404
  });
@@ -13437,7 +13448,7 @@ class Sm {
13437
13448
  }
13438
13449
  createTooltip() {
13439
13450
  const { element: e } = this.editor.options, t = !!e.parentElement;
13440
- this.tippy || !t || (this.tippy = Er(e, {
13451
+ this.tippy || !t || (this.tippy = Cr(e, {
13441
13452
  duration: 0,
13442
13453
  getReferenceClientRect: null,
13443
13454
  content: this.element,
@@ -13479,7 +13490,7 @@ class Sm {
13479
13490
  !((e = this.tippy) === null || e === void 0) && e.popper.firstChild && this.tippy.popper.firstChild.removeEventListener("blur", this.tippyBlurHandler), (t = this.tippy) === null || t === void 0 || t.destroy(), this.element.removeEventListener("mousedown", this.mousedownHandler, { capture: !0 }), this.editor.off("focus", this.focusHandler), this.editor.off("blur", this.blurHandler);
13480
13491
  }
13481
13492
  }
13482
- const _a = (n) => new X({
13493
+ const _a = (n) => new Q({
13483
13494
  key: typeof n.pluginKey == "string" ? new ie(n.pluginKey) : n.pluginKey,
13484
13495
  view: (e) => new Sm({ view: e, ...n })
13485
13496
  });
@@ -13541,7 +13552,7 @@ $t({
13541
13552
  shouldShow: o,
13542
13553
  tippyOptions: l
13543
13554
  }));
13544
- }), qi(() => {
13555
+ }), Ki(() => {
13545
13556
  const { pluginKey: r, editor: i } = n;
13546
13557
  i.unregisterPlugin(r);
13547
13558
  }), () => {
@@ -13550,7 +13561,7 @@ $t({
13550
13561
  };
13551
13562
  }
13552
13563
  });
13553
- function Bo(n) {
13564
+ function _o(n) {
13554
13565
  return gc((e, t) => ({
13555
13566
  get() {
13556
13567
  return e(), n;
@@ -13566,7 +13577,7 @@ function Bo(n) {
13566
13577
  }
13567
13578
  class xm extends gm {
13568
13579
  constructor(e = {}) {
13569
- return super(e), this.vueRenderers = ll(/* @__PURE__ */ new Map()), this.contentComponent = null, this.reactiveState = Bo(this.view.state), this.reactiveExtensionStorage = Bo(this.extensionStorage), this.on("transaction", () => {
13580
+ return super(e), this.vueRenderers = ll(/* @__PURE__ */ new Map()), this.contentComponent = null, this.reactiveState = _o(this.view.state), this.reactiveExtensionStorage = _o(this.extensionStorage), this.on("transaction", () => {
13570
13581
  this.reactiveState.value = this.view.state, this.reactiveExtensionStorage.value = this.extensionStorage;
13571
13582
  }), wr(this);
13572
13583
  }
@@ -13589,7 +13600,7 @@ class xm extends gm {
13589
13600
  super.unregisterPlugin(e), this.reactiveState.value = this.view.state;
13590
13601
  }
13591
13602
  }
13592
- const Em = $t({
13603
+ const Cm = $t({
13593
13604
  name: "EditorContent",
13594
13605
  props: {
13595
13606
  editor: {
@@ -13609,7 +13620,7 @@ const Em = $t({
13609
13620
  element: i
13610
13621
  }), r.createNodeViews();
13611
13622
  });
13612
- }), qi(() => {
13623
+ }), Ki(() => {
13613
13624
  const r = n.editor;
13614
13625
  if (!r || (r.isDestroyed || r.view.setProps({
13615
13626
  nodeViews: {}
@@ -13672,7 +13683,7 @@ $t({
13672
13683
  tippyOptions: s,
13673
13684
  shouldShow: o
13674
13685
  }));
13675
- }), qi(() => {
13686
+ }), Ki(() => {
13676
13687
  const { pluginKey: r, editor: i } = n;
13677
13688
  i.unregisterPlugin(r);
13678
13689
  }), () => {
@@ -13721,7 +13732,7 @@ const Fa = $t({
13721
13732
  }, (e = (n = this.$slots).default) === null || e === void 0 ? void 0 : e.call(n));
13722
13733
  }
13723
13734
  });
13724
- class fs {
13735
+ class ps {
13725
13736
  constructor(e, { props: t = {}, editor: r }) {
13726
13737
  if (this.id = Math.floor(Math.random() * 4294967295).toString(), this.editor = r, this.component = wr(e), this.teleportElement = document.createElement("div"), this.element = this.teleportElement, this.props = ll(t), this.editor.vueRenderers.set(this.id, this), this.editor.contentComponent) {
13727
13738
  if (this.editor.contentComponent.update(), this.teleportElement.children.length !== 1)
@@ -13776,7 +13787,7 @@ const za = {
13776
13787
  required: !0
13777
13788
  }
13778
13789
  };
13779
- class Cm extends ym {
13790
+ class Em extends ym {
13780
13791
  mount() {
13781
13792
  const e = {
13782
13793
  editor: this.editor,
@@ -13795,7 +13806,7 @@ class Cm extends ym {
13795
13806
  template: this.component.template,
13796
13807
  setup: (i) => {
13797
13808
  var s, o;
13798
- return Cs("onDragStart", t), Cs("decorationClasses", this.decorationClasses), (o = (s = this.component).setup) === null || o === void 0 ? void 0 : o.call(s, i, {
13809
+ return Ts("onDragStart", t), Ts("decorationClasses", this.decorationClasses), (o = (s = this.component).setup) === null || o === void 0 ? void 0 : o.call(s, i, {
13799
13810
  expose: () => {
13800
13811
  }
13801
13812
  });
@@ -13816,7 +13827,7 @@ class Cm extends ym {
13816
13827
  // eslint-disable-next-line
13817
13828
  __file: this.component.__file
13818
13829
  });
13819
- this.renderer = new fs(r, {
13830
+ this.renderer = new ps(r, {
13820
13831
  editor: this.editor,
13821
13832
  props: e
13822
13833
  });
@@ -13863,7 +13874,7 @@ class Cm extends ym {
13863
13874
  }
13864
13875
  }
13865
13876
  function Ha(n, e) {
13866
- return (t) => t.editor.contentComponent ? new Cm(n, t, e) : {};
13877
+ return (t) => t.editor.contentComponent ? new Em(n, t, e) : {};
13867
13878
  }
13868
13879
  const Tm = /^\s*>\s$/, Mm = ne.create({
13869
13880
  name: "blockquote",
@@ -13992,14 +14003,14 @@ const Tm = /^\s*>\s$/, Mm = ne.create({
13992
14003
  },
13993
14004
  addInputRules() {
13994
14005
  return [
13995
- Po({
14006
+ Lo({
13996
14007
  find: wm,
13997
14008
  type: this.type,
13998
14009
  getAttributes: (n) => ({
13999
14010
  language: n[1]
14000
14011
  })
14001
14012
  }),
14002
- Po({
14013
+ Lo({
14003
14014
  find: Om,
14004
14015
  type: this.type,
14005
14016
  getAttributes: (n) => ({
@@ -14012,7 +14023,7 @@ const Tm = /^\s*>\s$/, Mm = ne.create({
14012
14023
  return [
14013
14024
  // this plugin creates a code block for pasted content from VS Code
14014
14025
  // we can also detect the copied code language
14015
- new X({
14026
+ new Q({
14016
14027
  key: new ie("codeBlockVSCodeHandler"),
14017
14028
  props: {
14018
14029
  handlePaste: (n, e) => {
@@ -14124,7 +14135,7 @@ const Tm = /^\s*>\s$/, Mm = ne.create({
14124
14135
  },
14125
14136
  addProseMirrorPlugins() {
14126
14137
  return [
14127
- new X({
14138
+ new Q({
14128
14139
  key: new ie("placeholder"),
14129
14140
  props: {
14130
14141
  decorations: ({ doc: n, selection: e }) => {
@@ -14245,7 +14256,7 @@ const Tm = /^\s*>\s$/, Mm = ne.create({
14245
14256
  "Shift-Tab": () => this.editor.commands.liftListItem(this.name)
14246
14257
  };
14247
14258
  }
14248
- }), _o = xe.create({
14259
+ }), Fo = xe.create({
14249
14260
  name: "textStyle",
14250
14261
  addOptions() {
14251
14262
  return {
@@ -14271,7 +14282,7 @@ const Tm = /^\s*>\s$/, Mm = ne.create({
14271
14282
  }
14272
14283
  };
14273
14284
  }
14274
- }), Fo = /^\s*([-+*])\s$/, zm = ne.create({
14285
+ }), zo = /^\s*([-+*])\s$/, zm = ne.create({
14275
14286
  name: "bulletList",
14276
14287
  addOptions() {
14277
14288
  return {
@@ -14295,7 +14306,7 @@ const Tm = /^\s*>\s$/, Mm = ne.create({
14295
14306
  },
14296
14307
  addCommands() {
14297
14308
  return {
14298
- toggleBulletList: () => ({ commands: n, chain: e }) => this.options.keepAttributes ? e().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(Fm.name, this.editor.getAttributes(_o.name)).run() : n.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)
14309
+ toggleBulletList: () => ({ commands: n, chain: e }) => this.options.keepAttributes ? e().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(Fm.name, this.editor.getAttributes(Fo.name)).run() : n.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)
14299
14310
  };
14300
14311
  },
14301
14312
  addKeyboardShortcuts() {
@@ -14305,15 +14316,15 @@ const Tm = /^\s*>\s$/, Mm = ne.create({
14305
14316
  },
14306
14317
  addInputRules() {
14307
14318
  let n = gn({
14308
- find: Fo,
14319
+ find: zo,
14309
14320
  type: this.type
14310
14321
  });
14311
14322
  return (this.options.keepMarks || this.options.keepAttributes) && (n = gn({
14312
- find: Fo,
14323
+ find: zo,
14313
14324
  type: this.type,
14314
14325
  keepMarks: this.options.keepMarks,
14315
14326
  keepAttributes: this.options.keepAttributes,
14316
- getAttributes: () => this.editor.getAttributes(_o.name),
14327
+ getAttributes: () => this.editor.getAttributes(Fo.name),
14317
14328
  editor: this.editor
14318
14329
  })), [
14319
14330
  n
@@ -14384,7 +14395,7 @@ const Tm = /^\s*>\s$/, Mm = ne.create({
14384
14395
  for (const t in e)
14385
14396
  n[t] = e[t];
14386
14397
  return n;
14387
- }, Bi = "numeric", _i = "ascii", Fi = "alpha", Dn = "asciinumeric", Mn = "alphanumeric", zi = "domain", Va = "emoji", Um = "scheme", Jm = "slashscheme", zo = "whitespace";
14398
+ }, Bi = "numeric", _i = "ascii", Fi = "alpha", Dn = "asciinumeric", Mn = "alphanumeric", zi = "domain", Va = "emoji", Um = "scheme", Jm = "slashscheme", Ho = "whitespace";
14388
14399
  function Gm(n, e) {
14389
14400
  return n in e || (e[n] = []), e[n];
14390
14401
  }
@@ -14526,7 +14537,7 @@ ue.prototype = {
14526
14537
  return i.j[n] = o, o;
14527
14538
  }
14528
14539
  };
14529
- const v = (n, e, t, r, i) => n.ta(e, t, r, i), ye = (n, e, t, r, i) => n.tr(e, t, r, i), Ho = (n, e, t, r, i) => n.ts(e, t, r, i), k = (n, e, t, r, i) => n.tt(e, t, r, i), Le = "WORD", Hi = "UWORD", yn = "LOCALHOST", Vi = "TLD", $i = "UTLD", In = "SCHEME", Nt = "SLASH_SCHEME", ps = "NUM", $a = "WS", ms = "NL", rn = "OPENBRACE", sn = "CLOSEBRACE", Un = "OPENBRACKET", Jn = "CLOSEBRACKET", Gn = "OPENPAREN", Yn = "CLOSEPAREN", Xn = "OPENANGLEBRACKET", Qn = "CLOSEANGLEBRACKET", Zn = "FULLWIDTHLEFTPAREN", er = "FULLWIDTHRIGHTPAREN", tr = "LEFTCORNERBRACKET", nr = "RIGHTCORNERBRACKET", rr = "LEFTWHITECORNERBRACKET", ir = "RIGHTWHITECORNERBRACKET", sr = "FULLWIDTHLESSTHAN", or = "FULLWIDTHGREATERTHAN", lr = "AMPERSAND", ar = "APOSTROPHE", cr = "ASTERISK", We = "AT", dr = "BACKSLASH", ur = "BACKTICK", hr = "CARET", Je = "COLON", gs = "COMMA", fr = "DOLLAR", we = "DOT", pr = "EQUALS", ys = "EXCLAMATION", Oe = "HYPHEN", mr = "PERCENT", gr = "PIPE", yr = "PLUS", br = "POUND", kr = "QUERY", bs = "QUOTE", ks = "SEMI", ve = "SLASH", on = "TILDE", Sr = "UNDERSCORE", ja = "EMOJI", xr = "SYM";
14540
+ const v = (n, e, t, r, i) => n.ta(e, t, r, i), ye = (n, e, t, r, i) => n.tr(e, t, r, i), Vo = (n, e, t, r, i) => n.ts(e, t, r, i), k = (n, e, t, r, i) => n.tt(e, t, r, i), Le = "WORD", Hi = "UWORD", yn = "LOCALHOST", Vi = "TLD", $i = "UTLD", In = "SCHEME", Nt = "SLASH_SCHEME", ms = "NUM", $a = "WS", gs = "NL", rn = "OPENBRACE", sn = "CLOSEBRACE", Un = "OPENBRACKET", Jn = "CLOSEBRACKET", Gn = "OPENPAREN", Yn = "CLOSEPAREN", Xn = "OPENANGLEBRACKET", Qn = "CLOSEANGLEBRACKET", Zn = "FULLWIDTHLEFTPAREN", er = "FULLWIDTHRIGHTPAREN", tr = "LEFTCORNERBRACKET", nr = "RIGHTCORNERBRACKET", rr = "LEFTWHITECORNERBRACKET", ir = "RIGHTWHITECORNERBRACKET", sr = "FULLWIDTHLESSTHAN", or = "FULLWIDTHGREATERTHAN", lr = "AMPERSAND", ar = "APOSTROPHE", cr = "ASTERISK", We = "AT", dr = "BACKSLASH", ur = "BACKTICK", hr = "CARET", Je = "COLON", ys = "COMMA", fr = "DOLLAR", we = "DOT", pr = "EQUALS", bs = "EXCLAMATION", Oe = "HYPHEN", mr = "PERCENT", gr = "PIPE", yr = "PLUS", br = "POUND", kr = "QUERY", ks = "QUOTE", Ss = "SEMI", ve = "SLASH", on = "TILDE", Sr = "UNDERSCORE", ja = "EMOJI", xr = "SYM";
14530
14541
  var qa = /* @__PURE__ */ Object.freeze({
14531
14542
  __proto__: null,
14532
14543
  WORD: Le,
@@ -14536,9 +14547,9 @@ var qa = /* @__PURE__ */ Object.freeze({
14536
14547
  UTLD: $i,
14537
14548
  SCHEME: In,
14538
14549
  SLASH_SCHEME: Nt,
14539
- NUM: ps,
14550
+ NUM: ms,
14540
14551
  WS: $a,
14541
- NL: ms,
14552
+ NL: gs,
14542
14553
  OPENBRACE: rn,
14543
14554
  CLOSEBRACE: sn,
14544
14555
  OPENBRACKET: Un,
@@ -14563,26 +14574,26 @@ var qa = /* @__PURE__ */ Object.freeze({
14563
14574
  BACKTICK: ur,
14564
14575
  CARET: hr,
14565
14576
  COLON: Je,
14566
- COMMA: gs,
14577
+ COMMA: ys,
14567
14578
  DOLLAR: fr,
14568
14579
  DOT: we,
14569
14580
  EQUALS: pr,
14570
- EXCLAMATION: ys,
14581
+ EXCLAMATION: bs,
14571
14582
  HYPHEN: Oe,
14572
14583
  PERCENT: mr,
14573
14584
  PIPE: gr,
14574
14585
  PLUS: yr,
14575
14586
  POUND: br,
14576
14587
  QUERY: kr,
14577
- QUOTE: bs,
14578
- SEMI: ks,
14588
+ QUOTE: ks,
14589
+ SEMI: Ss,
14579
14590
  SLASH: ve,
14580
14591
  TILDE: on,
14581
14592
  UNDERSCORE: Sr,
14582
14593
  EMOJI: ja,
14583
14594
  SYM: xr
14584
14595
  });
14585
- const wt = /[a-z]/, hi = new RegExp("\\p{L}", "u"), fi = new RegExp("\\p{Emoji}", "u"), pi = /\d/, Vo = /\s/, $o = `
14596
+ const wt = /[a-z]/, hi = new RegExp("\\p{L}", "u"), fi = new RegExp("\\p{Emoji}", "u"), pi = /\d/, $o = /\s/, jo = `
14586
14597
  `, Xm = "️", Qm = "‍";
14587
14598
  let wn = null, On = null;
14588
14599
  function Zm(n) {
@@ -14590,8 +14601,8 @@ function Zm(n) {
14590
14601
  const e = {};
14591
14602
  ue.groups = e;
14592
14603
  const t = new ue();
14593
- wn == null && (wn = jo(Km)), On == null && (On = jo(Wm)), k(t, "'", ar), k(t, "{", rn), k(t, "}", sn), k(t, "[", Un), k(t, "]", Jn), k(t, "(", Gn), k(t, ")", Yn), k(t, "<", Xn), k(t, ">", Qn), k(t, "(", Zn), k(t, ")", er), k(t, "「", tr), k(t, "」", nr), k(t, "『", rr), k(t, "』", ir), k(t, "<", sr), k(t, ">", or), k(t, "&", lr), k(t, "*", cr), k(t, "@", We), k(t, "`", ur), k(t, "^", hr), k(t, ":", Je), k(t, ",", gs), k(t, "$", fr), k(t, ".", we), k(t, "=", pr), k(t, "!", ys), k(t, "-", Oe), k(t, "%", mr), k(t, "|", gr), k(t, "+", yr), k(t, "#", br), k(t, "?", kr), k(t, '"', bs), k(t, "/", ve), k(t, ";", ks), k(t, "~", on), k(t, "_", Sr), k(t, "\\", dr);
14594
- const r = ye(t, pi, ps, {
14604
+ wn == null && (wn = qo(Km)), On == null && (On = qo(Wm)), k(t, "'", ar), k(t, "{", rn), k(t, "}", sn), k(t, "[", Un), k(t, "]", Jn), k(t, "(", Gn), k(t, ")", Yn), k(t, "<", Xn), k(t, ">", Qn), k(t, "(", Zn), k(t, ")", er), k(t, "「", tr), k(t, "」", nr), k(t, "『", rr), k(t, "』", ir), k(t, "<", sr), k(t, ">", or), k(t, "&", lr), k(t, "*", cr), k(t, "@", We), k(t, "`", ur), k(t, "^", hr), k(t, ":", Je), k(t, ",", ys), k(t, "$", fr), k(t, ".", we), k(t, "=", pr), k(t, "!", bs), k(t, "-", Oe), k(t, "%", mr), k(t, "|", gr), k(t, "+", yr), k(t, "#", br), k(t, "?", kr), k(t, '"', ks), k(t, "/", ve), k(t, ";", Ss), k(t, "~", on), k(t, "_", Sr), k(t, "\\", dr);
14605
+ const r = ye(t, pi, ms, {
14595
14606
  [Bi]: !0
14596
14607
  });
14597
14608
  ye(r, pi, r);
@@ -14603,12 +14614,12 @@ function Zm(n) {
14603
14614
  [Fi]: !0
14604
14615
  });
14605
14616
  ye(s, wt), ye(s, hi, s);
14606
- const o = ye(t, Vo, $a, {
14607
- [zo]: !0
14617
+ const o = ye(t, $o, $a, {
14618
+ [Ho]: !0
14608
14619
  });
14609
- k(t, $o, ms, {
14610
- [zo]: !0
14611
- }), k(o, $o), ye(o, Vo, o);
14620
+ k(t, jo, gs, {
14621
+ [Ho]: !0
14622
+ }), k(o, jo), ye(o, $o, o);
14612
14623
  const l = ye(t, fi, ja, {
14613
14624
  [Va]: !0
14614
14625
  });
@@ -14639,9 +14650,9 @@ function Zm(n) {
14639
14650
  } : {
14640
14651
  [Jm]: !0
14641
14652
  };
14642
- h.indexOf("-") >= 0 ? p[zi] = !0 : wt.test(h) ? pi.test(h) ? p[Dn] = !0 : p[_i] = !0 : p[Bi] = !0, Ho(t, h, h, p);
14653
+ h.indexOf("-") >= 0 ? p[zi] = !0 : wt.test(h) ? pi.test(h) ? p[Dn] = !0 : p[_i] = !0 : p[Bi] = !0, Vo(t, h, h, p);
14643
14654
  }
14644
- return Ho(t, "localhost", yn, {
14655
+ return Vo(t, "localhost", yn, {
14645
14656
  ascii: !0
14646
14657
  }), t.jd = new ue(xr), {
14647
14658
  start: t,
@@ -14688,7 +14699,7 @@ function je(n, e, t, r, i) {
14688
14699
  }
14689
14700
  return s = new ue(t), s.jr = i.slice(), n.j[e[o - 1]] = s, s;
14690
14701
  }
14691
- function jo(n) {
14702
+ function qo(n) {
14692
14703
  const e = [], t = [];
14693
14704
  let r = 0, i = "0123456789";
14694
14705
  for (; r < n.length; ) {
@@ -14708,8 +14719,8 @@ function jo(n) {
14708
14719
  const bn = {
14709
14720
  defaultProtocol: "http",
14710
14721
  events: null,
14711
- format: qo,
14712
- formatHref: qo,
14722
+ format: Ko,
14723
+ formatHref: Ko,
14713
14724
  nl2br: !1,
14714
14725
  tagName: "a",
14715
14726
  target: null,
@@ -14721,16 +14732,16 @@ const bn = {
14721
14732
  ignoreTags: [],
14722
14733
  render: null
14723
14734
  };
14724
- function Ss(n, e) {
14735
+ function xs(n, e) {
14725
14736
  e === void 0 && (e = null);
14726
14737
  let t = Vt({}, bn);
14727
- n && (t = Vt(t, n instanceof Ss ? n.o : n));
14738
+ n && (t = Vt(t, n instanceof xs ? n.o : n));
14728
14739
  const r = t.ignoreTags, i = [];
14729
14740
  for (let s = 0; s < r.length; s++)
14730
14741
  i.push(r[s].toUpperCase());
14731
14742
  this.o = t, e && (this.defaultRender = e), this.ignoreTags = i;
14732
14743
  }
14733
- Ss.prototype = {
14744
+ xs.prototype = {
14734
14745
  o: bn,
14735
14746
  /**
14736
14747
  * @type string[]
@@ -14792,7 +14803,7 @@ Ss.prototype = {
14792
14803
  return (this.get("render", null, n) || this.defaultRender)(e, n.t, n);
14793
14804
  }
14794
14805
  };
14795
- function qo(n) {
14806
+ function Ko(n) {
14796
14807
  return n;
14797
14808
  }
14798
14809
  function Ka(n, e) {
@@ -14912,12 +14923,12 @@ function Vr(n, e) {
14912
14923
  t.prototype[r] = e[r];
14913
14924
  return t.t = n, t;
14914
14925
  }
14915
- const Ko = Vr("email", {
14926
+ const Wo = Vr("email", {
14916
14927
  isLink: !0,
14917
14928
  toHref() {
14918
14929
  return "mailto:" + this.toString();
14919
14930
  }
14920
- }), Wo = Vr("text"), ng = Vr("nl"), vn = Vr("url", {
14931
+ }), Uo = Vr("text"), ng = Vr("nl"), vn = Vr("url", {
14921
14932
  isLink: !0,
14922
14933
  /**
14923
14934
  Lowercases relevant parts of the domain and adds the protocol if
@@ -14942,7 +14953,7 @@ function rg(n) {
14942
14953
  let {
14943
14954
  groups: e
14944
14955
  } = n;
14945
- const t = e.domain.concat([lr, cr, We, dr, ur, hr, fr, pr, Oe, ps, mr, gr, yr, br, ve, xr, on, Sr]), r = [ar, Je, gs, we, ys, kr, bs, ks, Xn, Qn, rn, sn, Jn, Un, Gn, Yn, Zn, er, tr, nr, rr, ir, sr, or], i = [lr, ar, cr, dr, ur, hr, fr, pr, Oe, rn, sn, mr, gr, yr, br, kr, ve, xr, on, Sr], s = be(), o = k(s, on);
14956
+ const t = e.domain.concat([lr, cr, We, dr, ur, hr, fr, pr, Oe, ms, mr, gr, yr, br, ve, xr, on, Sr]), r = [ar, Je, ys, we, bs, kr, ks, Ss, Xn, Qn, rn, sn, Jn, Un, Gn, Yn, Zn, er, tr, nr, rr, ir, sr, or], i = [lr, ar, cr, dr, ur, hr, fr, pr, Oe, rn, sn, mr, gr, yr, br, kr, ve, xr, on, Sr], s = be(), o = k(s, on);
14946
14957
  v(o, i, o), v(o, e.domain, o);
14947
14958
  const l = be(), a = be(), c = be();
14948
14959
  v(s, e.domain, l), v(s, e.scheme, a), v(s, e.slashscheme, c), v(l, i, o), v(l, e.domain, l);
@@ -14954,22 +14965,22 @@ function rg(n) {
14954
14965
  v(d, e.domain, h), v(h, e.domain, h);
14955
14966
  const f = k(h, we);
14956
14967
  v(f, e.domain, h);
14957
- const p = be(Ko);
14968
+ const p = be(Wo);
14958
14969
  v(f, e.tld, p), v(f, e.utld, p), k(d, yn, p);
14959
14970
  const m = k(h, Oe);
14960
14971
  v(m, e.domain, h), v(p, e.domain, h), k(p, we, f), k(p, Oe, m);
14961
14972
  const g = k(p, Je);
14962
- v(g, e.numeric, Ko);
14973
+ v(g, e.numeric, Wo);
14963
14974
  const y = k(l, Oe), x = k(l, we);
14964
14975
  v(y, e.domain, l), v(x, i, o), v(x, e.domain, l);
14965
14976
  const T = be(vn);
14966
14977
  v(x, e.tld, T), v(x, e.utld, T), v(T, e.domain, l), v(T, i, o), k(T, we, x), k(T, Oe, y), k(T, We, d);
14967
14978
  const R = k(T, Je), P = be(vn);
14968
14979
  v(R, e.numeric, P);
14969
- const C = be(vn), L = be();
14970
- v(C, t, C), v(C, r, L), v(L, t, C), v(L, r, L), k(T, ve, C), k(P, ve, C);
14971
- const I = k(a, Je), M = k(c, Je), Q = k(M, ve), Ee = k(Q, ve);
14972
- v(a, e.domain, l), k(a, we, x), k(a, Oe, y), v(c, e.domain, l), k(c, we, x), k(c, Oe, y), v(I, e.domain, C), k(I, ve, C), v(Ee, e.domain, C), v(Ee, t, C), k(Ee, ve, C);
14980
+ const E = be(vn), L = be();
14981
+ v(E, t, E), v(E, r, L), v(L, t, E), v(L, r, L), k(T, ve, E), k(P, ve, E);
14982
+ const I = k(a, Je), M = k(c, Je), Z = k(M, ve), Ce = k(Z, ve);
14983
+ v(a, e.domain, l), k(a, we, x), k(a, Oe, y), v(c, e.domain, l), k(c, we, x), k(c, Oe, y), v(I, e.domain, E), k(I, ve, E), v(Ce, e.domain, E), v(Ce, t, E), k(Ce, ve, E);
14973
14984
  const ot = [
14974
14985
  [rn, sn],
14975
14986
  // {}
@@ -14989,14 +15000,14 @@ function rg(n) {
14989
15000
  // <>
14990
15001
  ];
14991
15002
  for (let qt = 0; qt < ot.length; qt++) {
14992
- const [ze, He] = ot[qt], Ve = k(C, ze);
14993
- k(L, ze, Ve), k(Ve, He, C);
15003
+ const [ze, He] = ot[qt], Ve = k(E, ze);
15004
+ k(L, ze, Ve), k(Ve, He, E);
14994
15005
  const fe = be(vn);
14995
15006
  v(Ve, t, fe);
14996
15007
  const $e = be();
14997
- v(Ve, r), v(fe, t, fe), v(fe, r, $e), v($e, t, fe), v($e, r, $e), k(fe, He, C), k($e, He, C);
15008
+ v(Ve, r), v(fe, t, fe), v(fe, r, $e), v($e, t, fe), v($e, r, $e), k(fe, He, E), k($e, He, E);
14998
15009
  }
14999
- return k(s, yn, T), k(s, ms, ng), {
15010
+ return k(s, yn, T), k(s, gs, ng), {
15000
15011
  start: s,
15001
15012
  tokens: qa
15002
15013
  };
@@ -15012,12 +15023,12 @@ function ig(n, e, t) {
15012
15023
  if (h < 0)
15013
15024
  i -= d, i < r && (o.push(t[i]), i++);
15014
15025
  else {
15015
- o.length > 0 && (s.push(mi(Wo, e, o)), o = []), i -= h, d -= h;
15026
+ o.length > 0 && (s.push(mi(Uo, e, o)), o = []), i -= h, d -= h;
15016
15027
  const f = u.t, p = t.slice(i - d, i);
15017
15028
  s.push(mi(f, e, p));
15018
15029
  }
15019
15030
  }
15020
- return o.length > 0 && s.push(mi(Wo, e, o)), s;
15031
+ return o.length > 0 && s.push(mi(Uo, e, o)), s;
15021
15032
  }
15022
15033
  function mi(n, e, t) {
15023
15034
  const r = t[0].s, i = t[t.length - 1].e, s = e.slice(r, i);
@@ -15035,7 +15046,7 @@ const sg = typeof console < "u" && console && console.warn || (() => {
15035
15046
  function lg() {
15036
15047
  ue.groups = {}, _.scanner = null, _.parser = null, _.tokenQueue = [], _.pluginQueue = [], _.customSchemes = [], _.initialized = !1;
15037
15048
  }
15038
- function Uo(n, e) {
15049
+ function Jo(n, e) {
15039
15050
  if (e === void 0 && (e = !1), _.initialized && sg(`linkifyjs: already initialized - will not register custom scheme "${n}" ${og}`), !/^[0-9a-z]+(-[0-9a-z]+)*$/.test(n))
15040
15051
  throw new Error(`linkifyjs: incorrect scheme format.
15041
15052
  1. Must only contain digits, lowercase ASCII letters or "-"
@@ -15060,13 +15071,13 @@ function ag() {
15060
15071
  function cg(n) {
15061
15072
  return _.initialized || ag(), ig(_.parser.start, n, eg(_.scanner.start, n));
15062
15073
  }
15063
- function xs(n, e, t) {
15074
+ function Cs(n, e, t) {
15064
15075
  if (e === void 0 && (e = null), t === void 0 && (t = null), e && typeof e == "object") {
15065
15076
  if (t)
15066
15077
  throw Error(`linkifyjs: Invalid link type ${e}; must be a string`);
15067
15078
  t = e, e = null;
15068
15079
  }
15069
- const r = new Ss(t), i = cg(n), s = [];
15080
+ const r = new xs(t), i = cg(n), s = [];
15070
15081
  for (let o = 0; o < i.length; o++) {
15071
15082
  const l = i[o];
15072
15083
  l.isLink && (!e || l.t === e) && r.check(l) && s.push(l.toFormattedObject(r));
@@ -15074,7 +15085,7 @@ function xs(n, e, t) {
15074
15085
  return s;
15075
15086
  }
15076
15087
  function dg(n) {
15077
- return new X({
15088
+ return new Q({
15078
15089
  key: new ie("autolink"),
15079
15090
  appendTransaction: (e, t, r) => {
15080
15091
  const i = e.some((c) => c.docChanged) && !t.doc.eq(r.doc), s = e.some((c) => c.getMeta("preventAutolink"));
@@ -15091,7 +15102,7 @@ function dg(n) {
15091
15102
  const p = f[f.length - 1], m = u.pos + h.lastIndexOf(p);
15092
15103
  if (!p)
15093
15104
  return !1;
15094
- xs(p).filter((g) => g.isLink).map((g) => ({
15105
+ Cs(p).filter((g) => g.isLink).map((g) => ({
15095
15106
  ...g,
15096
15107
  from: m + g.start + 1,
15097
15108
  to: m + g.end + 1
@@ -15107,7 +15118,7 @@ function dg(n) {
15107
15118
  });
15108
15119
  }
15109
15120
  function ug(n) {
15110
- return new X({
15121
+ return new Q({
15111
15122
  key: new ie("handleClickLink"),
15112
15123
  props: {
15113
15124
  handleClick: (e, t, r) => {
@@ -15121,7 +15132,7 @@ function ug(n) {
15121
15132
  });
15122
15133
  }
15123
15134
  function hg(n) {
15124
- return new X({
15135
+ return new Q({
15125
15136
  key: new ie("handlePasteLink"),
15126
15137
  props: {
15127
15138
  handlePaste: (e, t, r) => {
@@ -15132,7 +15143,7 @@ function hg(n) {
15132
15143
  r.content.forEach((c) => {
15133
15144
  l += c.textContent;
15134
15145
  });
15135
- const a = xs(l).find((c) => c.isLink && c.value === l);
15146
+ const a = Cs(l).find((c) => c.isLink && c.value === l);
15136
15147
  return !l || !a ? !1 : (n.editor.commands.setMark(n.type, {
15137
15148
  href: a.href
15138
15149
  }), !0);
@@ -15147,10 +15158,10 @@ const fg = xe.create({
15147
15158
  onCreate() {
15148
15159
  this.options.protocols.forEach((n) => {
15149
15160
  if (typeof n == "string") {
15150
- Uo(n);
15161
+ Jo(n);
15151
15162
  return;
15152
15163
  }
15153
- Uo(n.scheme, n.optionalSlashes);
15164
+ Jo(n.scheme, n.optionalSlashes);
15154
15165
  });
15155
15166
  },
15156
15167
  onDestroy() {
@@ -15222,7 +15233,7 @@ const fg = xe.create({
15222
15233
  }));
15223
15234
  }
15224
15235
  if (n) {
15225
- const s = xs(n).filter((o) => o.isLink);
15236
+ const s = Cs(n).filter((o) => o.isLink);
15226
15237
  s.length && s.forEach((o) => i.push({
15227
15238
  text: o.value,
15228
15239
  data: {
@@ -15311,7 +15322,7 @@ const fg = xe.create({
15311
15322
  "Shift-Tab": () => this.editor.commands.liftListItem(this.name)
15312
15323
  };
15313
15324
  }
15314
- }), Jo = xe.create({
15325
+ }), Go = xe.create({
15315
15326
  name: "textStyle",
15316
15327
  addOptions() {
15317
15328
  return {
@@ -15337,7 +15348,7 @@ const fg = xe.create({
15337
15348
  }
15338
15349
  };
15339
15350
  }
15340
- }), Go = /^(\d+)\.\s$/, gg = ne.create({
15351
+ }), Yo = /^(\d+)\.\s$/, gg = ne.create({
15341
15352
  name: "orderedList",
15342
15353
  addOptions() {
15343
15354
  return {
@@ -15372,7 +15383,7 @@ const fg = xe.create({
15372
15383
  },
15373
15384
  addCommands() {
15374
15385
  return {
15375
- toggleOrderedList: () => ({ commands: n, chain: e }) => this.options.keepAttributes ? e().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(mg.name, this.editor.getAttributes(Jo.name)).run() : n.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)
15386
+ toggleOrderedList: () => ({ commands: n, chain: e }) => this.options.keepAttributes ? e().toggleList(this.name, this.options.itemTypeName, this.options.keepMarks).updateAttributes(mg.name, this.editor.getAttributes(Go.name)).run() : n.toggleList(this.name, this.options.itemTypeName, this.options.keepMarks)
15376
15387
  };
15377
15388
  },
15378
15389
  addKeyboardShortcuts() {
@@ -15382,17 +15393,17 @@ const fg = xe.create({
15382
15393
  },
15383
15394
  addInputRules() {
15384
15395
  let n = gn({
15385
- find: Go,
15396
+ find: Yo,
15386
15397
  type: this.type,
15387
15398
  getAttributes: (e) => ({ start: +e[1] }),
15388
15399
  joinPredicate: (e, t) => t.childCount + t.attrs.start === +e[1]
15389
15400
  });
15390
15401
  return (this.options.keepMarks || this.options.keepAttributes) && (n = gn({
15391
- find: Go,
15402
+ find: Yo,
15392
15403
  type: this.type,
15393
15404
  keepMarks: this.options.keepMarks,
15394
15405
  keepAttributes: this.options.keepAttributes,
15395
- getAttributes: (e) => ({ start: +e[1], ...this.editor.getAttributes(Jo.name) }),
15406
+ getAttributes: (e) => ({ start: +e[1], ...this.editor.getAttributes(Go.name) }),
15396
15407
  joinPredicate: (e, t) => t.childCount + t.attrs.start === +e[1],
15397
15408
  editor: this.editor
15398
15409
  })), [
@@ -15436,7 +15447,7 @@ const fg = xe.create({
15436
15447
  },
15437
15448
  addKeyboardShortcuts() {
15438
15449
  const n = {};
15439
- return us() ? n["Mod-Shift-s"] = () => this.editor.commands.toggleStrike() : n["Ctrl-Shift-s"] = () => this.editor.commands.toggleStrike(), n;
15450
+ return hs() ? n["Mod-Shift-s"] = () => this.editor.commands.toggleStrike() : n["Ctrl-Shift-s"] = () => this.editor.commands.toggleStrike(), n;
15440
15451
  },
15441
15452
  addInputRules() {
15442
15453
  return [
@@ -15492,7 +15503,7 @@ const fg = xe.create({
15492
15503
  }), xg = ne.create({
15493
15504
  name: "text",
15494
15505
  group: "inline"
15495
- }), Eg = ge.create({
15506
+ }), Cg = ge.create({
15496
15507
  name: "textAlign",
15497
15508
  addOptions() {
15498
15509
  return {
@@ -15529,7 +15540,7 @@ const fg = xe.create({
15529
15540
  "Mod-Shift-j": () => this.editor.commands.setTextAlign("justify")
15530
15541
  };
15531
15542
  }
15532
- }), Cg = {
15543
+ }), Eg = {
15533
15544
  name: "EmojiComponent",
15534
15545
  components: {
15535
15546
  NodeViewWrapper: Fa,
@@ -15549,7 +15560,7 @@ function Tg(n, e, t, r, i, s) {
15549
15560
  _: 1
15550
15561
  });
15551
15562
  }
15552
- const Mg = /* @__PURE__ */ de(Cg, [["render", Tg]]);
15563
+ const Mg = /* @__PURE__ */ de(Eg, [["render", Tg]]);
15553
15564
  function wg(n) {
15554
15565
  var e;
15555
15566
  const { char: t, allowSpaces: r, allowedPrefixes: i, startOfLine: s, $position: o } = n, l = bm(t), a = new RegExp(`\\s${l}$`), c = s ? "^" : "", d = r ? new RegExp(`${c}${l}.*?(?=\\s${l}|$)`, "gm") : new RegExp(`${c}(?:^)?${l}[^\\s${l}]*`, "gm"), u = ((e = o.nodeBefore) === null || e === void 0 ? void 0 : e.isText) && o.nodeBefore.text;
@@ -15575,13 +15586,13 @@ function wg(n) {
15575
15586
  const Og = new ie("suggestion");
15576
15587
  function Wa({ pluginKey: n = Og, editor: e, char: t = "@", allowSpaces: r = !1, allowedPrefixes: i = [" "], startOfLine: s = !1, decorationTag: o = "span", decorationClass: l = "suggestion", command: a = () => null, items: c = () => [], render: d = () => ({}), allow: u = () => !0 }) {
15577
15588
  let h;
15578
- const f = d == null ? void 0 : d(), p = new X({
15589
+ const f = d == null ? void 0 : d(), p = new Q({
15579
15590
  key: n,
15580
15591
  view() {
15581
15592
  return {
15582
15593
  update: async (m, g) => {
15583
- var y, x, T, R, P, C, L;
15584
- const I = (y = this.key) === null || y === void 0 ? void 0 : y.getState(g), M = (x = this.key) === null || x === void 0 ? void 0 : x.getState(m.state), Q = I.active && M.active && I.range.from !== M.range.from, Ee = !I.active && M.active, ot = I.active && !M.active, qt = !Ee && !ot && I.query !== M.query, ze = Ee || Q, He = qt && !Q, Ve = ot || Q;
15594
+ var y, x, T, R, P, E, L;
15595
+ const I = (y = this.key) === null || y === void 0 ? void 0 : y.getState(g), M = (x = this.key) === null || x === void 0 ? void 0 : x.getState(m.state), Z = I.active && M.active && I.range.from !== M.range.from, Ce = !I.active && M.active, ot = I.active && !M.active, qt = !Ce && !ot && I.query !== M.query, ze = Ce || Z, He = qt && !Z, Ve = ot || Z;
15585
15596
  if (!ze && !He && !Ve)
15586
15597
  return;
15587
15598
  const fe = Ve && !ze ? I : M, $e = m.dom.querySelector(`[data-decoration-id="${fe.decorationId}"]`);
@@ -15609,7 +15620,7 @@ function Wa({ pluginKey: n = Og, editor: e, char: t = "@", allowSpaces: r = !1,
15609
15620
  }, ze && ((T = f == null ? void 0 : f.onBeforeStart) === null || T === void 0 || T.call(f, h)), He && ((R = f == null ? void 0 : f.onBeforeUpdate) === null || R === void 0 || R.call(f, h)), (He || ze) && (h.items = await c({
15610
15621
  editor: e,
15611
15622
  query: fe.query
15612
- })), Ve && ((P = f == null ? void 0 : f.onExit) === null || P === void 0 || P.call(f, h)), He && ((C = f == null ? void 0 : f.onUpdate) === null || C === void 0 || C.call(f, h)), ze && ((L = f == null ? void 0 : f.onStart) === null || L === void 0 || L.call(f, h));
15623
+ })), Ve && ((P = f == null ? void 0 : f.onExit) === null || P === void 0 || P.call(f, h)), He && ((E = f == null ? void 0 : f.onUpdate) === null || E === void 0 || E.call(f, h)), ze && ((L = f == null ? void 0 : f.onStart) === null || L === void 0 || L.call(f, h));
15613
15624
  },
15614
15625
  destroy: () => {
15615
15626
  var m;
@@ -15633,8 +15644,8 @@ function Wa({ pluginKey: n = Og, editor: e, char: t = "@", allowSpaces: r = !1,
15633
15644
  },
15634
15645
  // Apply changes to the plugin state from a view transaction.
15635
15646
  apply(m, g, y, x) {
15636
- const { isEditable: T } = e, { composing: R } = e.view, { selection: P } = m, { empty: C, from: L } = P, I = { ...g };
15637
- if (I.composing = R, T && (C || e.view.composing)) {
15647
+ const { isEditable: T } = e, { composing: R } = e.view, { selection: P } = m, { empty: E, from: L } = P, I = { ...g };
15648
+ if (I.composing = R, T && (E || e.view.composing)) {
15638
15649
  (L < g.range.from || L > g.range.to) && !R && !g.composing && (I.active = !1);
15639
15650
  const M = wg({
15640
15651
  char: t,
@@ -15642,8 +15653,8 @@ function Wa({ pluginKey: n = Og, editor: e, char: t = "@", allowSpaces: r = !1,
15642
15653
  allowedPrefixes: i,
15643
15654
  startOfLine: s,
15644
15655
  $position: P.$from
15645
- }), Q = `id_${Math.floor(Math.random() * 4294967295)}`;
15646
- M && u({ editor: e, state: x, range: M.range }) ? (I.active = !0, I.decorationId = g.decorationId ? g.decorationId : Q, I.range = M.range, I.query = M.query, I.text = M.text) : I.active = !1;
15656
+ }), Z = `id_${Math.floor(Math.random() * 4294967295)}`;
15657
+ M && u({ editor: e, state: x, range: M.range }) ? (I.active = !0, I.decorationId = g.decorationId ? g.decorationId : Z, I.range = M.range, I.query = M.query, I.text = M.text) : I.active = !1;
15647
15658
  } else
15648
15659
  I.active = !1;
15649
15660
  return I.active || (I.decorationId = null, I.range = { from: 0, to: 0 }, I.query = null, I.text = null), I;
@@ -15746,7 +15757,7 @@ function Dg(n, e, t, r, i, s) {
15746
15757
  yc(ht("ul", Ng, [
15747
15758
  (O(!0), j(bc, null, il(t.items, (l, a) => (O(), z(o, {
15748
15759
  key: l.id,
15749
- class: ee([
15760
+ class: X([
15750
15761
  "dt-suggestion-list--item",
15751
15762
  { "dt-list-item--highlighted": a === i.selectedIndex }
15752
15763
  ]),
@@ -15788,7 +15799,7 @@ function Rg(n, e, t, r, i, s) {
15788
15799
  size: "200",
15789
15800
  code: t.item.code
15790
15801
  }, null, 8, ["code"]),
15791
- Ki(" " + ut(t.item.code), 1)
15802
+ Wi(" " + ut(t.item.code), 1)
15792
15803
  ]),
15793
15804
  _: 1
15794
15805
  });
@@ -15815,14 +15826,14 @@ const Pg = /* @__PURE__ */ de(Ig, [["render", Rg]]), Lg = {
15815
15826
  let n, e;
15816
15827
  return {
15817
15828
  onStart: (t) => {
15818
- n = new fs(Ua, {
15829
+ n = new ps(Ua, {
15819
15830
  props: {
15820
15831
  itemComponent: wr(Pg),
15821
15832
  itemType: "emoji",
15822
15833
  ...t
15823
15834
  },
15824
15835
  editor: t.editor
15825
- }), t.clientRect && (e = Er("body", {
15836
+ }), t.clientRect && (e = Cr("body", {
15826
15837
  getReferenceClientRect: t.clientRect,
15827
15838
  appendTo: () => document.body,
15828
15839
  content: n.element,
@@ -15848,7 +15859,7 @@ const Pg = /* @__PURE__ */ de(Ig, [["render", Rg]]), Lg = {
15848
15859
  }
15849
15860
  };
15850
15861
  }
15851
- }, Bg = new ie("emoji"), _g = /:\w+:$/, Fg = /:\w+:/g, zg = /(\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff])$/, Hg = /(\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff])/g, Yo = (n) => {
15862
+ }, Bg = new ie("emoji"), _g = /:\w+:$/, Fg = /:\w+:/g, zg = /(\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff])$/, Hg = /(\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff])/g, Xo = (n) => {
15852
15863
  if (n && nl(n[0]))
15853
15864
  return {
15854
15865
  index: n.index,
@@ -15902,10 +15913,10 @@ const Pg = /* @__PURE__ */ de(Ig, [["render", Rg]]), Lg = {
15902
15913
  addInputRules() {
15903
15914
  return [
15904
15915
  // shortcode input
15905
- Ro({
15916
+ Po({
15906
15917
  find: (n) => {
15907
15918
  const e = n.match(_g);
15908
- return Yo(e);
15919
+ return Xo(e);
15909
15920
  },
15910
15921
  type: this.type,
15911
15922
  getAttributes(n) {
@@ -15914,10 +15925,10 @@ const Pg = /* @__PURE__ */ de(Ig, [["render", Rg]]), Lg = {
15914
15925
  };
15915
15926
  }
15916
15927
  }),
15917
- Ro({
15928
+ Po({
15918
15929
  find: (n) => {
15919
15930
  const e = n.match(zg);
15920
- return Yo(e);
15931
+ return Xo(e);
15921
15932
  },
15922
15933
  type: this.type,
15923
15934
  getAttributes(n) {
@@ -15932,7 +15943,7 @@ const Pg = /* @__PURE__ */ de(Ig, [["render", Rg]]), Lg = {
15932
15943
  },
15933
15944
  addPasteRules() {
15934
15945
  return [
15935
- Lo({
15946
+ Bo({
15936
15947
  find: Vg,
15937
15948
  type: this.type,
15938
15949
  getAttributes(n) {
@@ -15941,7 +15952,7 @@ const Pg = /* @__PURE__ */ de(Ig, [["render", Rg]]), Lg = {
15941
15952
  };
15942
15953
  }
15943
15954
  }),
15944
- Lo({
15955
+ Bo({
15945
15956
  find: Hg,
15946
15957
  type: this.type,
15947
15958
  getAttributes(n) {
@@ -16011,8 +16022,8 @@ function Ug(n, e, t, r) {
16011
16022
  for (const l of o)
16012
16023
  l.mark.type === r && t.removeMark(l.from, l.to, r);
16013
16024
  }
16014
- const Xo = rc(1, 15);
16015
- function Qo(n, e, t, r, i, s) {
16025
+ const Qo = rc(1, 15);
16026
+ function Zo(n, e, t, r, i, s) {
16016
16027
  if (!n)
16017
16028
  return;
16018
16029
  let o = t - e - 1;
@@ -16021,12 +16032,12 @@ function Qo(n, e, t, r, i, s) {
16021
16032
  n,
16022
16033
  o,
16023
16034
  "left",
16024
- Xo
16035
+ Qo
16025
16036
  ), c = ji(
16026
16037
  n,
16027
16038
  l,
16028
16039
  "right",
16029
- Xo
16040
+ Qo
16030
16041
  ), d = n.slice(a.from, c.to);
16031
16042
  jg(d, ic, qg).forEach((h) => {
16032
16043
  const f = Kg(h[0]), p = e + a.from + h.index + 1, m = p + f.length;
@@ -16035,14 +16046,14 @@ function Qo(n, e, t, r, i, s) {
16035
16046
  }
16036
16047
  function Jg(n) {
16037
16048
  let e = !1;
16038
- return new X({
16049
+ return new Q({
16039
16050
  key: new ie("autolink"),
16040
16051
  appendTransaction: (t, r, i) => {
16041
16052
  const s = t.some((d) => d.docChanged) && !r.doc.eq(i.doc);
16042
16053
  if (e && !s)
16043
16054
  return;
16044
16055
  const { tr: o } = i, { textContent: l } = i.doc;
16045
- e || Qo(l, 0, 0, l.length, o, n.type), e = !0;
16056
+ e || Zo(l, 0, 0, l.length, o, n.type), e = !0;
16046
16057
  const a = Da(
16047
16058
  r.doc,
16048
16059
  [...t]
@@ -16053,7 +16064,7 @@ function Jg(n) {
16053
16064
  u,
16054
16065
  (f) => f.isTextblock
16055
16066
  ).forEach(({ node: f, pos: p }) => {
16056
- Qo(
16067
+ Zo(
16057
16068
  f.textContent,
16058
16069
  p,
16059
16070
  d.from,
@@ -16211,7 +16222,7 @@ function ey(n, e, t, r, i, s) {
16211
16222
  href: null
16212
16223
  }, {
16213
16224
  default: q(() => [
16214
- Ki(ut(s.text), 1)
16225
+ Wi(ut(s.text), 1)
16215
16226
  ]),
16216
16227
  _: 1
16217
16228
  })
@@ -16297,7 +16308,7 @@ function ly(n, e, t, r, i, s) {
16297
16308
  "image-src": s.avatarSrc,
16298
16309
  size: "xs"
16299
16310
  }, null, 8, ["full-name", "image-src"]),
16300
- Ki(" " + ut(s.name), 1)
16311
+ Wi(" " + ut(s.name), 1)
16301
16312
  ]),
16302
16313
  _: 1
16303
16314
  });
@@ -16310,14 +16321,14 @@ const ay = /* @__PURE__ */ de(oy, [["render", ly]]), cy = {
16310
16321
  let n, e;
16311
16322
  return {
16312
16323
  onStart: (t) => {
16313
- n = new fs(Ua, {
16324
+ n = new ps(Ua, {
16314
16325
  props: {
16315
16326
  itemComponent: wr(ay),
16316
16327
  itemType: "mention",
16317
16328
  ...t
16318
16329
  },
16319
16330
  editor: t.editor
16320
- }), t.clientRect && (e = Er("body", {
16331
+ }), t.clientRect && (e = Cr("body", {
16321
16332
  getReferenceClientRect: t.clientRect,
16322
16333
  appendTo: () => document.body,
16323
16334
  content: n.element,
@@ -16344,7 +16355,7 @@ const ay = /* @__PURE__ */ de(oy, [["render", ly]]), cy = {
16344
16355
  }, dy = {
16345
16356
  name: "DtRichTextEditor",
16346
16357
  components: {
16347
- EditorContent: Em
16358
+ EditorContent: Cm
16348
16359
  },
16349
16360
  props: {
16350
16361
  /**
@@ -16515,7 +16526,7 @@ const ay = /* @__PURE__ */ de(oy, [["render", ly]]), cy = {
16515
16526
  const e = { ...this.mentionSuggestion, ...cy };
16516
16527
  n.push(ny.configure({ suggestion: e }));
16517
16528
  }
16518
- return n.push($g), n.push(Eg.configure({
16529
+ return n.push($g), n.push(Cg.configure({
16519
16530
  types: ["paragraph"],
16520
16531
  defaultAlignment: "left"
16521
16532
  })), n.push(vm.configure({
@@ -16642,18 +16653,18 @@ export {
16642
16653
  jc as c,
16643
16654
  $c as d,
16644
16655
  od as e,
16645
- Wi as f,
16646
- Os as g,
16656
+ Ui as f,
16657
+ vs as g,
16647
16658
  dl as h,
16648
16659
  cd as i,
16649
16660
  Fc as j,
16650
- ws as k,
16661
+ Os as k,
16651
16662
  wc as l,
16652
16663
  Oc as m,
16653
- Ts as n,
16664
+ Ms as n,
16654
16665
  vc as o,
16655
16666
  Ac as p,
16656
- Ms as q,
16667
+ ws as q,
16657
16668
  qr as r,
16658
16669
  ld as s,
16659
16670
  ad as t,