@dialpad/dialtone-vue 2.122.0 → 2.122.1

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.
@@ -1,6 +1,6 @@
1
1
  import { n as ee, g as Ti, d as Ya, u as Xa, e as Qa, P as Za, h as As, i as ec, j as tc, k as nc, l as rc, m as ic, o as sc, p as oc, q as lc, T as Ns, t as sl, r as ac, s as cc } from "./tooltip-88U5vFMA.js";
2
2
  import De from "vue";
3
- import { B as dc, w as hr, I as uc, L as fc, C as hc, t as ol, D as ll, E as pc, m as mc, o as al } from "./index-izsZ8Z_Y.js";
3
+ import { B as uc, w as hr, I as dc, L as fc, C as hc, t as ol, D as ll, E as pc, m as mc, o as al } from "./index-5kIwGgwp.js";
4
4
  const Lt = {
5
5
  BUSY: "busy",
6
6
  AWAY: "away",
@@ -99,7 +99,7 @@ const xc = Sc.exports, Xr = {
99
99
  "1800"
100
100
  ], Ds = (n) => n > 1;
101
101
  function Tc() {
102
- return [void 0, ...dc];
102
+ return [void 0, ...uc];
103
103
  }
104
104
  const Mc = (n) => {
105
105
  if (typeof n != "string" || !n.trim())
@@ -246,7 +246,7 @@ const Mc = (n) => {
246
246
  iconSize: {
247
247
  type: String,
248
248
  default: "",
249
- validator: (n) => !n || Object.keys(uc).includes(n)
249
+ validator: (n) => !n || Object.keys(dc).includes(n)
250
250
  },
251
251
  /**
252
252
  * Full name used to extract initials.
@@ -405,7 +405,7 @@ const Ic = Dc.exports, Rc = {
405
405
  props: {
406
406
  /**
407
407
  * Applies the link variant styles
408
- * @values null, danger, warning, success, muted, inverted
408
+ * @values null, danger, warning, success, muted, inverted, mention
409
409
  */
410
410
  kind: {
411
411
  type: String,
@@ -617,7 +617,7 @@ const qc = Vc.exports, cl = ':not(:disabled):not([aria-disabled="true"]):not([ro
617
617
  }, Qr = {
618
618
  DEFAULT: "default",
619
619
  CUSTOM: "custom"
620
- }, dn = {
620
+ }, un = {
621
621
  ARROW_KEYS: "arrow-keys",
622
622
  TAB: "tab",
623
623
  NONE: "none"
@@ -709,8 +709,8 @@ const Is = Xc.exports, Qc = ["listitem", "menuitem", "option"], Zc = {
709
709
  */
710
710
  navigationType: {
711
711
  type: String,
712
- default: dn.NONE,
713
- validator: (n) => Object.values(dn).includes(n)
712
+ default: un.NONE,
713
+ validator: (n) => Object.values(un).includes(n)
714
714
  },
715
715
  /**
716
716
  * Applies selected styles to the list item
@@ -787,13 +787,13 @@ const Is = Xc.exports, Qc = ["listitem", "menuitem", "option"], Zc = {
787
787
  return this.isHoverable ? this.highlightId && this.highlightId() ? this.id === this.highlightId() : this.mouseHighlighted : !1;
788
788
  },
789
789
  isFocusable() {
790
- return this.navigationType === dn.TAB;
790
+ return this.navigationType === un.TAB;
791
791
  },
792
792
  /**
793
793
  * Whether to apply hover styles.
794
794
  */
795
795
  isHoverable() {
796
- return this.navigationType !== dn.NONE;
796
+ return this.navigationType !== un.NONE;
797
797
  }
798
798
  },
799
799
  methods: {
@@ -808,7 +808,7 @@ const Is = Xc.exports, Qc = ["listitem", "menuitem", "option"], Zc = {
808
808
  }
809
809
  }
810
810
  };
811
- var ed = function() {
811
+ var eu = function() {
812
812
  var e = this, t = e._self._c;
813
813
  return t(e.elementType, e._g({ tag: "component", class: ["dt-list-item", {
814
814
  "dt-list-item--focusable": e.isFocusable,
@@ -821,27 +821,27 @@ var ed = function() {
821
821
  }), e.selected ? { key: "selected", fn: function() {
822
822
  return [t("dt-icon", { staticClass: "dt-list-item--selected-icon", attrs: { name: "check", size: "400" } })];
823
823
  }, proxy: !0 } : null], null, !0) }) : e._t("default")], 2);
824
- }, td = [], nd = /* @__PURE__ */ ee(
824
+ }, tu = [], nu = /* @__PURE__ */ ee(
825
825
  Zc,
826
- ed,
827
- td,
826
+ eu,
827
+ tu,
828
828
  !1,
829
829
  null,
830
830
  null,
831
831
  null,
832
832
  null
833
833
  );
834
- const rd = nd.exports, dt = {
834
+ const ru = nu.exports, ut = {
835
835
  default: "column",
836
836
  column: "column",
837
837
  row: "row",
838
838
  "row-reverse": "row-reverse",
839
839
  "column-reverse": "column-reverse"
840
- }, dl = ["sm", "md", "lg", "xl"], es = ["0", "100", "200", "300", "400", "450", "500", "600"];
841
- let id = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", sd = (n = 21) => {
840
+ }, ul = ["sm", "md", "lg", "xl"], es = ["0", "100", "200", "300", "400", "450", "500", "600"];
841
+ let iu = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", su = (n = 21) => {
842
842
  let e = "", t = n;
843
843
  for (; t--; )
844
- e += id[Math.random() * 64 | 0];
844
+ e += iu[Math.random() * 64 | 0];
845
845
  return e;
846
846
  };
847
847
  function kn(n) {
@@ -852,11 +852,11 @@ function kn(n) {
852
852
  return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
853
853
  }, kn(n);
854
854
  }
855
- var ul = {
856
- selector: "vue-portal-target-".concat(sd())
857
- }, od = function(e) {
858
- return ul.selector = e;
859
- }, Zr = typeof window < "u" && (typeof document > "u" ? "undefined" : kn(document)) !== void 0, ld = De.extend({
855
+ var dl = {
856
+ selector: "vue-portal-target-".concat(su())
857
+ }, ou = function(e) {
858
+ return dl.selector = e;
859
+ }, Zr = typeof window < "u" && (typeof document > "u" ? "undefined" : kn(document)) !== void 0, lu = De.extend({
860
860
  // as an abstract component, it doesn't appear in
861
861
  // the $parent chain of components.
862
862
  // which means the next parent of any component rendered inside of this oen
@@ -890,7 +890,7 @@ var ul = {
890
890
  selector: {
891
891
  type: String,
892
892
  default: function() {
893
- return "#".concat(ul.selector);
893
+ return "#".concat(dl.selector);
894
894
  }
895
895
  },
896
896
  tag: {
@@ -940,7 +940,7 @@ var ul = {
940
940
  mount: function() {
941
941
  if (Zr) {
942
942
  var e = this.getTargetEl(), t = document.createElement("DIV");
943
- this.prepend && e.firstChild ? e.insertBefore(t, e.firstChild) : e.appendChild(t), this.container = new ld({
943
+ this.prepend && e.firstChild ? e.insertBefore(t, e.firstChild) : e.appendChild(t), this.container = new lu({
944
944
  el: t,
945
945
  parent: this,
946
946
  propsData: {
@@ -955,12 +955,12 @@ var ul = {
955
955
  }
956
956
  }
957
957
  });
958
- function ad(n) {
958
+ function au(n) {
959
959
  var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
960
- n.component(e.name || "portal", fl), e.defaultSelector && od(e.defaultSelector);
960
+ n.component(e.name || "portal", fl), e.defaultSelector && ou(e.defaultSelector);
961
961
  }
962
- typeof window < "u" && window.Vue && window.Vue === De && De.use(ad);
963
- const cd = {
962
+ typeof window < "u" && window.Vue && window.Vue === De && De.use(au);
963
+ const cu = {
964
964
  name: "PopoverHeaderFooter",
965
965
  components: {
966
966
  DtButton: ol,
@@ -1016,7 +1016,7 @@ const cd = {
1016
1016
  }
1017
1017
  }
1018
1018
  };
1019
- var dd = function() {
1019
+ var uu = function() {
1020
1020
  var e = this, t = e._self._c;
1021
1021
  return t("div", { class: {
1022
1022
  "d-popover__header": e.type === "header",
@@ -1032,17 +1032,17 @@ var dd = function() {
1032
1032
  } }, scopedSlots: e._u([{ key: "icon", fn: function() {
1033
1033
  return [t("dt-icon", { attrs: { name: "close", size: "300" } })];
1034
1034
  }, proxy: !0 }], null, !1, 2538694920) }, "dt-button", e.closeButtonProps, !1)) : e._e()], 1);
1035
- }, ud = [], fd = /* @__PURE__ */ ee(
1036
- cd,
1037
- dd,
1038
- ud,
1035
+ }, du = [], fu = /* @__PURE__ */ ee(
1036
+ cu,
1037
+ uu,
1038
+ du,
1039
1039
  !1,
1040
1040
  null,
1041
1041
  null,
1042
1042
  null,
1043
1043
  null
1044
1044
  );
1045
- const hd = fd.exports, pd = {
1045
+ const hu = fu.exports, pu = {
1046
1046
  name: "DtPopover",
1047
1047
  /********************
1048
1048
  * CHILD COMPONENTS *
@@ -1050,7 +1050,7 @@ const hd = fd.exports, pd = {
1050
1050
  components: {
1051
1051
  SrOnlyCloseButton: qc,
1052
1052
  DtLazyShow: Qa,
1053
- PopoverHeaderFooter: hd,
1053
+ PopoverHeaderFooter: hu,
1054
1054
  Portal: fl
1055
1055
  },
1056
1056
  mixins: [Uc, Fc],
@@ -1670,7 +1670,7 @@ const hd = fd.exports, pd = {
1670
1670
  // ----------------------------------------------------------------------------
1671
1671
  }
1672
1672
  };
1673
- var md = function() {
1673
+ var mu = function() {
1674
1674
  var e = this, t = e._self._c;
1675
1675
  return t("div", [e.modal && e.isOpen ? t("portal", [t("div", { staticClass: "d-modal--transparent", attrs: { "aria-hidden": e.modal && e.isOpen ? "false" : "true" }, on: { click: function(r) {
1676
1676
  r.preventDefault(), r.stopPropagation();
@@ -1698,56 +1698,56 @@ var md = function() {
1698
1698
  ], attrs: { "data-qa": e.$attrs["data-qa"] ? `${e.$attrs["data-qa"]}-content` : "dt-popover-content" } }, [e._t("content", null, { close: e.closePopover })], 2), e.$slots.footerContent ? t("popover-header-footer", { ref: "popover__footer", class: e.POPOVER_HEADER_FOOTER_PADDING_CLASSES[e.padding], attrs: { type: "footer", "content-class": e.footerClass }, scopedSlots: e._u([{ key: "content", fn: function() {
1699
1699
  return [e._t("footerContent", null, { close: e.closePopover })];
1700
1700
  }, proxy: !0 }], null, !0) }) : e._e(), e.showVisuallyHiddenClose ? t("sr-only-close-button", { attrs: { "visually-hidden-close-label": e.visuallyHiddenCloseLabel }, on: { close: e.closePopover } }) : e._e()], 1)], 1)], 1);
1701
- }, gd = [], yd = /* @__PURE__ */ ee(
1702
- pd,
1703
- md,
1704
- gd,
1701
+ }, gu = [], yu = /* @__PURE__ */ ee(
1702
+ pu,
1703
+ mu,
1704
+ gu,
1705
1705
  !1,
1706
1706
  null,
1707
1707
  null,
1708
1708
  null,
1709
1709
  null
1710
1710
  );
1711
- const a0 = yd.exports;
1711
+ const a0 = yu.exports;
1712
1712
  function Rs(n) {
1713
- return n === dt.default;
1713
+ return n === ut.default;
1714
1714
  }
1715
1715
  function _s(n) {
1716
1716
  if (Jt(n) === "string")
1717
- return Rs(n) ? null : dt[n];
1717
+ return Rs(n) ? null : ut[n];
1718
1718
  if (Jt(n) === "object") {
1719
1719
  const { default: e } = n;
1720
- return Rs(e) ? null : dt[e];
1720
+ return Rs(e) ? null : ut[e];
1721
1721
  } else
1722
1722
  return null;
1723
1723
  }
1724
1724
  function Jt(n) {
1725
1725
  return typeof n;
1726
1726
  }
1727
- function bd(n) {
1728
- return _s(n) ? `d-stack--${dt[_s(n)]}` : null;
1727
+ function bu(n) {
1728
+ return _s(n) ? `d-stack--${ut[_s(n)]}` : null;
1729
1729
  }
1730
- function kd(n) {
1730
+ function ku(n) {
1731
1731
  return Jt(n) === "object" ? [
1732
- ...dl.map((e) => n[e] ? `d-stack--${e}--${n[e]}` : null)
1732
+ ...ul.map((e) => n[e] ? `d-stack--${e}--${n[e]}` : null)
1733
1733
  ] : null;
1734
1734
  }
1735
- function Sd(n) {
1735
+ function Su(n) {
1736
1736
  return es.includes(n) ? `d-stack--gap-${n}` : null;
1737
1737
  }
1738
- function xd(n) {
1738
+ function xu(n) {
1739
1739
  if (Jt(n) === "string")
1740
- return Object.keys(dt).includes(n);
1740
+ return Object.keys(ut).includes(n);
1741
1741
  if (Jt(n) === "object") {
1742
1742
  const { default: e } = n;
1743
- return Object.keys(dt).includes(e);
1743
+ return Object.keys(ut).includes(e);
1744
1744
  } else
1745
1745
  return null;
1746
1746
  }
1747
- function Od(n) {
1747
+ function Ou(n) {
1748
1748
  return es.includes(n);
1749
1749
  }
1750
- const vd = {
1750
+ const vu = {
1751
1751
  name: "DtStack",
1752
1752
  props: {
1753
1753
  /**
@@ -1761,7 +1761,7 @@ const vd = {
1761
1761
  direction: {
1762
1762
  type: [String, Object],
1763
1763
  default: "column",
1764
- validator: (n) => xd(n)
1764
+ validator: (n) => xu(n)
1765
1765
  },
1766
1766
  /**
1767
1767
  * Set this prop to render stack as a specific HTML element.
@@ -1777,29 +1777,29 @@ const vd = {
1777
1777
  gap: {
1778
1778
  type: String,
1779
1779
  default: "0",
1780
- validator: (n) => Od(n)
1780
+ validator: (n) => Ou(n)
1781
1781
  }
1782
1782
  },
1783
1783
  data() {
1784
1784
  return {
1785
- DT_STACK_DIRECTION: dt,
1785
+ DT_STACK_DIRECTION: ut,
1786
1786
  DT_STACK_GAP: es,
1787
- DT_STACK_RESPONSIVE_BREAKPOINTS: dl
1787
+ DT_STACK_RESPONSIVE_BREAKPOINTS: ul
1788
1788
  };
1789
1789
  },
1790
1790
  computed: {
1791
1791
  stackGap() {
1792
- return Sd(this.gap);
1792
+ return Su(this.gap);
1793
1793
  },
1794
1794
  defaultDirection() {
1795
- return bd(this.direction);
1795
+ return bu(this.direction);
1796
1796
  },
1797
1797
  stackResponsive() {
1798
- return kd(this.direction);
1798
+ return ku(this.direction);
1799
1799
  }
1800
1800
  }
1801
1801
  };
1802
- var Cd = function() {
1802
+ var Cu = function() {
1803
1803
  var e = this, t = e._self._c;
1804
1804
  return t(e.as, { tag: "component", class: [
1805
1805
  "d-stack",
@@ -1807,17 +1807,17 @@ var Cd = function() {
1807
1807
  e.stackResponsive,
1808
1808
  e.stackGap
1809
1809
  ] }, [e._t("default")], 2);
1810
- }, Ed = [], Td = /* @__PURE__ */ ee(
1811
- vd,
1812
- Cd,
1813
- Ed,
1810
+ }, Eu = [], Tu = /* @__PURE__ */ ee(
1811
+ vu,
1812
+ Cu,
1813
+ Eu,
1814
1814
  !1,
1815
1815
  null,
1816
1816
  null,
1817
1817
  null,
1818
1818
  null
1819
1819
  );
1820
- const hl = Td.exports;
1820
+ const hl = Tu.exports;
1821
1821
  function j(n) {
1822
1822
  this.content = n;
1823
1823
  }
@@ -1959,8 +1959,8 @@ function ml(n, e, t, r) {
1959
1959
  if (!o.sameMarkup(l))
1960
1960
  return { a: t, b: r };
1961
1961
  if (o.isText && o.text != l.text) {
1962
- let c = 0, d = Math.min(o.text.length, l.text.length);
1963
- for (; c < d && o.text[o.text.length - c - 1] == l.text[l.text.length - c - 1]; )
1962
+ let c = 0, u = Math.min(o.text.length, l.text.length);
1963
+ for (; c < u && o.text[o.text.length - c - 1] == l.text[l.text.length - c - 1]; )
1964
1964
  c++, t--, r--;
1965
1965
  return { a: t, b: r };
1966
1966
  }
@@ -1990,8 +1990,8 @@ class b {
1990
1990
  for (let o = 0, l = 0; l < t; o++) {
1991
1991
  let a = this.content[o], c = l + a.nodeSize;
1992
1992
  if (c > e && r(a, i + l, s || null, o) !== !1 && a.content.size) {
1993
- let d = l + 1;
1994
- a.nodesBetween(Math.max(0, e - d), Math.min(a.content.size, t - d), r, i + d);
1993
+ let u = l + 1;
1994
+ a.nodesBetween(Math.max(0, e - u), Math.min(a.content.size, t - u), r, i + u);
1995
1995
  }
1996
1996
  l = c;
1997
1997
  }
@@ -2151,15 +2151,15 @@ class b {
2151
2151
  */
2152
2152
  findIndex(e, t = -1) {
2153
2153
  if (e == 0)
2154
- return un(0, e);
2154
+ return dn(0, e);
2155
2155
  if (e == this.size)
2156
- return un(this.content.length, e);
2156
+ return dn(this.content.length, e);
2157
2157
  if (e > this.size || e < 0)
2158
2158
  throw new RangeError(`Position ${e} outside of fragment (${this})`);
2159
2159
  for (let r = 0, i = 0; ; r++) {
2160
2160
  let s = this.child(r), o = i + s.nodeSize;
2161
2161
  if (o >= e)
2162
- return o == e || t > 0 ? un(r + 1, o) : un(r, i);
2162
+ return o == e || t > 0 ? dn(r + 1, o) : dn(r, i);
2163
2163
  i = o;
2164
2164
  }
2165
2165
  }
@@ -2225,7 +2225,7 @@ class b {
2225
2225
  }
2226
2226
  b.empty = new b([], 0);
2227
2227
  const ei = { index: 0, offset: 0 };
2228
- function un(n, e) {
2228
+ function dn(n, e) {
2229
2229
  return ei.index = n, ei.offset = e, ei;
2230
2230
  }
2231
2231
  function Cn(n, e) {
@@ -2458,7 +2458,7 @@ function yl(n, e, t, r) {
2458
2458
  let l = yl(o.content, e - s - 1, t);
2459
2459
  return l && n.replaceChild(i, o.copy(l));
2460
2460
  }
2461
- function Md(n, e, t) {
2461
+ function Mu(n, e, t) {
2462
2462
  if (t.openStart > n.depth)
2463
2463
  throw new En("Inserted content deeper than insertion position");
2464
2464
  if (n.depth - t.openStart != e.depth - t.openEnd)
@@ -2475,7 +2475,7 @@ function bl(n, e, t, r) {
2475
2475
  let o = n.parent, l = o.content;
2476
2476
  return ot(o, l.cut(0, n.parentOffset).append(t.content).append(l.cut(e.parentOffset)));
2477
2477
  } else {
2478
- let { start: o, end: l } = wd(t, n);
2478
+ let { start: o, end: l } = wu(t, n);
2479
2479
  return ot(s, Sl(n, o, l, e, r));
2480
2480
  }
2481
2481
  else
@@ -2515,7 +2515,7 @@ function Tn(n, e, t) {
2515
2515
  }
2516
2516
  return zt(e, null, t, r), new b(r);
2517
2517
  }
2518
- function wd(n, e) {
2518
+ function wu(n, e) {
2519
2519
  let t = e.depth - n.openStart, i = e.node(t).copy(n.content);
2520
2520
  for (let s = t - 1; s >= 0; s--)
2521
2521
  i = e.node(s).copy(b.from(i));
@@ -2764,10 +2764,10 @@ class Gt {
2764
2764
  return s;
2765
2765
  }
2766
2766
  let r = ti[ni] = Gt.resolve(e, t);
2767
- return ni = (ni + 1) % Ad, r;
2767
+ return ni = (ni + 1) % Au, r;
2768
2768
  }
2769
2769
  }
2770
- let ti = [], ni = 0, Ad = 12;
2770
+ let ti = [], ni = 0, Au = 12;
2771
2771
  class Mn {
2772
2772
  /**
2773
2773
  Construct a node range. `$from` and `$to` should point into the
@@ -2808,7 +2808,7 @@ class Mn {
2808
2808
  return this.$to.indexAfter(this.depth);
2809
2809
  }
2810
2810
  }
2811
- const Nd = /* @__PURE__ */ Object.create(null);
2811
+ const Nu = /* @__PURE__ */ Object.create(null);
2812
2812
  let lt = class Ai {
2813
2813
  /**
2814
2814
  @internal
@@ -2921,7 +2921,7 @@ let lt = class Ai {
2921
2921
  attributes, and marks.
2922
2922
  */
2923
2923
  hasMarkup(e, t, r) {
2924
- return this.type == e && Cn(this.attrs, t || e.defaultAttrs || Nd) && R.sameSet(this.marks, r || R.none);
2924
+ return this.type == e && Cn(this.attrs, t || e.defaultAttrs || Nu) && R.sameSet(this.marks, r || R.none);
2925
2925
  }
2926
2926
  /**
2927
2927
  Create a new node with the same markup as this node, containing
@@ -2964,7 +2964,7 @@ let lt = class Ai {
2964
2964
  [`ReplaceError`](https://prosemirror.net/docs/ref/#model.ReplaceError) is thrown.
2965
2965
  */
2966
2966
  replace(e, t, r) {
2967
- return Md(this.resolve(e), this.resolve(t), r);
2967
+ return Mu(this.resolve(e), this.resolve(t), r);
2968
2968
  }
2969
2969
  /**
2970
2970
  Find the node directly after the given position.
@@ -3214,7 +3214,7 @@ function xl(n, e) {
3214
3214
  e = n[t].type.name + "(" + e + ")";
3215
3215
  return e;
3216
3216
  }
3217
- class ut {
3217
+ class dt {
3218
3218
  /**
3219
3219
  @internal
3220
3220
  */
@@ -3225,13 +3225,13 @@ class ut {
3225
3225
  @internal
3226
3226
  */
3227
3227
  static parse(e, t) {
3228
- let r = new Pd(e, t);
3228
+ let r = new Pu(e, t);
3229
3229
  if (r.next == null)
3230
- return ut.empty;
3230
+ return dt.empty;
3231
3231
  let i = Ol(r);
3232
3232
  r.next && r.err("Unexpected trailing text");
3233
- let s = $d(Bd(i));
3234
- return Fd(s, r), s;
3233
+ let s = $u(Bu(i));
3234
+ return Fu(s, r), s;
3235
3235
  }
3236
3236
  /**
3237
3237
  Match a node type, returning a match after that node if
@@ -3296,10 +3296,10 @@ class ut {
3296
3296
  if (a && (!t || a.validEnd))
3297
3297
  return b.from(l.map((c) => c.createAndFill()));
3298
3298
  for (let c = 0; c < o.next.length; c++) {
3299
- let { type: d, next: u } = o.next[c];
3300
- if (!(d.isText || d.hasRequiredAttrs()) && i.indexOf(u) == -1) {
3301
- i.push(u);
3302
- let f = s(u, l.concat(d));
3299
+ let { type: u, next: d } = o.next[c];
3300
+ if (!(u.isText || u.hasRequiredAttrs()) && i.indexOf(d) == -1) {
3301
+ i.push(d);
3302
+ let f = s(d, l.concat(u));
3303
3303
  if (f)
3304
3304
  return f;
3305
3305
  }
@@ -3376,8 +3376,8 @@ class ut {
3376
3376
  `);
3377
3377
  }
3378
3378
  }
3379
- ut.empty = new ut(!0);
3380
- class Pd {
3379
+ dt.empty = new dt(!0);
3380
+ class Pu {
3381
3381
  constructor(e, t) {
3382
3382
  this.string = e, this.nodeTypes = t, this.inline = null, this.pos = 0, this.tokens = e.split(/\s*(?=\b|\W|$)/), this.tokens[this.tokens.length - 1] == "" && this.tokens.pop(), this.tokens[0] == "" && this.tokens.shift();
3383
3383
  }
@@ -3394,19 +3394,19 @@ class Pd {
3394
3394
  function Ol(n) {
3395
3395
  let e = [];
3396
3396
  do
3397
- e.push(Dd(n));
3397
+ e.push(Du(n));
3398
3398
  while (n.eat("|"));
3399
3399
  return e.length == 1 ? e[0] : { type: "choice", exprs: e };
3400
3400
  }
3401
- function Dd(n) {
3401
+ function Du(n) {
3402
3402
  let e = [];
3403
3403
  do
3404
- e.push(Id(n));
3404
+ e.push(Iu(n));
3405
3405
  while (n.next && n.next != ")" && n.next != "|");
3406
3406
  return e.length == 1 ? e[0] : { type: "seq", exprs: e };
3407
3407
  }
3408
- function Id(n) {
3409
- let e = Ld(n);
3408
+ function Iu(n) {
3409
+ let e = Lu(n);
3410
3410
  for (; ; )
3411
3411
  if (n.eat("+"))
3412
3412
  e = { type: "plus", expr: e };
@@ -3415,7 +3415,7 @@ function Id(n) {
3415
3415
  else if (n.eat("?"))
3416
3416
  e = { type: "opt", expr: e };
3417
3417
  else if (n.eat("{"))
3418
- e = Rd(n, e);
3418
+ e = Ru(n, e);
3419
3419
  else
3420
3420
  break;
3421
3421
  return e;
@@ -3425,11 +3425,11 @@ function Ls(n) {
3425
3425
  let e = Number(n.next);
3426
3426
  return n.pos++, e;
3427
3427
  }
3428
- function Rd(n, e) {
3428
+ function Ru(n, e) {
3429
3429
  let t = Ls(n), r = t;
3430
3430
  return n.eat(",") && (n.next != "}" ? r = Ls(n) : r = -1), n.eat("}") || n.err("Unclosed braced range"), { type: "range", min: t, max: r, expr: e };
3431
3431
  }
3432
- function _d(n, e) {
3432
+ function _u(n, e) {
3433
3433
  let t = n.nodeTypes, r = t[e];
3434
3434
  if (r)
3435
3435
  return [r];
@@ -3440,18 +3440,18 @@ function _d(n, e) {
3440
3440
  }
3441
3441
  return i.length == 0 && n.err("No node type or group '" + e + "' found"), i;
3442
3442
  }
3443
- function Ld(n) {
3443
+ function Lu(n) {
3444
3444
  if (n.eat("(")) {
3445
3445
  let e = Ol(n);
3446
3446
  return n.eat(")") || n.err("Missing closing paren"), e;
3447
3447
  } else if (/\W/.test(n.next))
3448
3448
  n.err("Unexpected token '" + n.next + "'");
3449
3449
  else {
3450
- let e = _d(n, n.next).map((t) => (n.inline == null ? n.inline = t.isInline : n.inline != t.isInline && n.err("Mixing inline and block content"), { type: "name", value: t }));
3450
+ let e = _u(n, n.next).map((t) => (n.inline == null ? n.inline = t.isInline : n.inline != t.isInline && n.err("Mixing inline and block content"), { type: "name", value: t }));
3451
3451
  return n.pos++, e.length == 1 ? e[0] : { type: "choice", exprs: e };
3452
3452
  }
3453
3453
  }
3454
- function Bd(n) {
3454
+ function Bu(n) {
3455
3455
  let e = [[]];
3456
3456
  return i(s(n, 0), t()), e;
3457
3457
  function t() {
@@ -3486,15 +3486,15 @@ function Bd(n) {
3486
3486
  if (o.type == "range") {
3487
3487
  let a = l;
3488
3488
  for (let c = 0; c < o.min; c++) {
3489
- let d = t();
3490
- i(s(o.expr, a), d), a = d;
3489
+ let u = t();
3490
+ i(s(o.expr, a), u), a = u;
3491
3491
  }
3492
3492
  if (o.max == -1)
3493
3493
  i(s(o.expr, a), a);
3494
3494
  else
3495
3495
  for (let c = o.min; c < o.max; c++) {
3496
- let d = t();
3497
- r(a, d), i(s(o.expr, a), d), a = d;
3496
+ let u = t();
3497
+ r(a, u), i(s(o.expr, a), u), a = u;
3498
3498
  }
3499
3499
  return [r(a)];
3500
3500
  } else {
@@ -3522,7 +3522,7 @@ function Bs(n, e) {
3522
3522
  }
3523
3523
  }
3524
3524
  }
3525
- function $d(n) {
3525
+ function $u(n) {
3526
3526
  let e = /* @__PURE__ */ Object.create(null);
3527
3527
  return t(Bs(n, 0));
3528
3528
  function t(r) {
@@ -3532,14 +3532,14 @@ function $d(n) {
3532
3532
  if (!l)
3533
3533
  return;
3534
3534
  let c;
3535
- for (let d = 0; d < i.length; d++)
3536
- i[d][0] == l && (c = i[d][1]);
3537
- Bs(n, a).forEach((d) => {
3538
- c || i.push([l, c = []]), c.indexOf(d) == -1 && c.push(d);
3535
+ for (let u = 0; u < i.length; u++)
3536
+ i[u][0] == l && (c = i[u][1]);
3537
+ Bs(n, a).forEach((u) => {
3538
+ c || i.push([l, c = []]), c.indexOf(u) == -1 && c.push(u);
3539
3539
  });
3540
3540
  });
3541
3541
  });
3542
- let s = e[r.join(",")] = new ut(r.indexOf(n.length - 1) > -1);
3542
+ let s = e[r.join(",")] = new dt(r.indexOf(n.length - 1) > -1);
3543
3543
  for (let o = 0; o < i.length; o++) {
3544
3544
  let l = i[o][1].sort(vl);
3545
3545
  s.next.push({ type: i[o][0], next: e[l.join(",")] || t(l) });
@@ -3547,7 +3547,7 @@ function $d(n) {
3547
3547
  return s;
3548
3548
  }
3549
3549
  }
3550
- function Fd(n, e) {
3550
+ function Fu(n, e) {
3551
3551
  for (let t = 0, r = [n]; t < r.length; t++) {
3552
3552
  let i = r[t], s = !i.validEnd, o = [];
3553
3553
  for (let l = 0; l < i.next.length; l++) {
@@ -3586,7 +3586,7 @@ function Tl(n) {
3586
3586
  let e = /* @__PURE__ */ Object.create(null);
3587
3587
  if (n)
3588
3588
  for (let t in n)
3589
- e[t] = new zd(n[t]);
3589
+ e[t] = new zu(n[t]);
3590
3590
  return e;
3591
3591
  }
3592
3592
  let $s = class Ml {
@@ -3613,7 +3613,7 @@ let $s = class Ml {
3613
3613
  True for node types that allow no content.
3614
3614
  */
3615
3615
  get isLeaf() {
3616
- return this.contentMatch == ut.empty;
3616
+ return this.contentMatch == dt.empty;
3617
3617
  }
3618
3618
  /**
3619
3619
  True when this node is an atom, i.e. when it does not have
@@ -3755,7 +3755,7 @@ let $s = class Ml {
3755
3755
  return r;
3756
3756
  }
3757
3757
  };
3758
- class zd {
3758
+ class zu {
3759
3759
  constructor(e) {
3760
3760
  this.hasDefault = Object.prototype.hasOwnProperty.call(e, "default"), this.default = e.default;
3761
3761
  }
@@ -3812,7 +3812,7 @@ class pr {
3812
3812
  return this.excluded.indexOf(e) > -1;
3813
3813
  }
3814
3814
  }
3815
- class Hd {
3815
+ class Hu {
3816
3816
  /**
3817
3817
  Construct a schema from a schema [specification](https://prosemirror.net/docs/ref/#model.SchemaSpec).
3818
3818
  */
@@ -3827,7 +3827,7 @@ class Hd {
3827
3827
  if (i in this.marks)
3828
3828
  throw new RangeError(i + " can not be both a node and a mark");
3829
3829
  let s = this.nodes[i], o = s.spec.content || "", l = s.spec.marks;
3830
- s.contentMatch = r[o] || (r[o] = ut.parse(o, this.nodes)), s.inlineContent = s.contentMatch.inlineContent, s.markSet = l == "_" ? null : l ? Fs(this, l.split(" ")) : l == "" || !s.inlineContent ? [] : null;
3830
+ s.contentMatch = r[o] || (r[o] = dt.parse(o, this.nodes)), s.inlineContent = s.contentMatch.inlineContent, s.markSet = l == "_" ? null : l ? Fs(this, l.split(" ")) : l == "" || !s.inlineContent ? [] : null;
3831
3831
  }
3832
3832
  for (let i in this.marks) {
3833
3833
  let s = this.marks[i], o = s.spec.excludes;
@@ -3945,7 +3945,7 @@ let ts = class Ni {
3945
3945
  matchTag(e, t, r) {
3946
3946
  for (let i = r ? this.tags.indexOf(r) + 1 : 0; i < this.tags.length; i++) {
3947
3947
  let s = this.tags[i];
3948
- if (qd(e, s.tag) && (s.namespace === void 0 || e.namespaceURI == s.namespace) && (!s.context || t.matchesContext(s.context))) {
3948
+ if (qu(e, s.tag) && (s.namespace === void 0 || e.namespaceURI == s.namespace) && (!s.context || t.matchesContext(s.context))) {
3949
3949
  if (s.getAttrs) {
3950
3950
  let o = s.getAttrs(e);
3951
3951
  if (o === !1)
@@ -4046,7 +4046,7 @@ const wl = {
4046
4046
  table: !0,
4047
4047
  tfoot: !0,
4048
4048
  ul: !0
4049
- }, jd = {
4049
+ }, ju = {
4050
4050
  head: !0,
4051
4051
  noscript: !0,
4052
4052
  object: !0,
@@ -4094,7 +4094,7 @@ class fn {
4094
4094
  applyPending(e) {
4095
4095
  for (let t = 0, r = this.pendingMarks; t < r.length; t++) {
4096
4096
  let i = r[t];
4097
- (this.type ? this.type.allowsMarkType(i.type) : Kd(i.type, e)) && !i.isInSet(this.activeMarks) && (this.activeMarks = i.addToSet(this.activeMarks), this.pendingMarks = i.removeFromSet(this.pendingMarks));
4097
+ (this.type ? this.type.allowsMarkType(i.type) : Ku(i.type, e)) && !i.isInSet(this.activeMarks) && (this.activeMarks = i.addToSet(this.activeMarks), this.pendingMarks = i.removeFromSet(this.pendingMarks));
4098
4098
  }
4099
4099
  }
4100
4100
  inlineContext(e) {
@@ -4120,7 +4120,7 @@ class Hs {
4120
4120
  let r = e.getAttribute("style");
4121
4121
  if (!r)
4122
4122
  return t();
4123
- let i = this.readStyles(Wd(r));
4123
+ let i = this.readStyles(Wu(r));
4124
4124
  if (!i)
4125
4125
  return;
4126
4126
  let [s, o] = i, l = this.top;
@@ -4152,9 +4152,9 @@ class Hs {
4152
4152
  // none is found, the element's content nodes are added directly.
4153
4153
  addElement(e, t) {
4154
4154
  let r = e.nodeName.toLowerCase(), i;
4155
- Al.hasOwnProperty(r) && this.parser.normalizeLists && Vd(e);
4155
+ Al.hasOwnProperty(r) && this.parser.normalizeLists && Vu(e);
4156
4156
  let s = this.options.ruleFromNode && this.options.ruleFromNode(e) || (i = this.parser.matchTag(e, this, t));
4157
- if (s ? s.ignore : jd.hasOwnProperty(r))
4157
+ if (s ? s.ignore : ju.hasOwnProperty(r))
4158
4158
  this.findInside(e), this.ignoreFallback(e);
4159
4159
  else if (!s || s.skip || s.closeParent) {
4160
4160
  s && s.closeParent ? this.open = Math.max(0, this.open - 1) : s && s.skip.nodeType && (e = s.skip);
@@ -4342,8 +4342,8 @@ class Hs {
4342
4342
  return !0;
4343
4343
  return !1;
4344
4344
  } else {
4345
- let d = a > 0 || a == 0 && i ? this.nodes[a].type : r && a >= s ? r.node(a - s).type : null;
4346
- if (!d || d.name != c && d.groups.indexOf(c) == -1)
4345
+ let u = a > 0 || a == 0 && i ? this.nodes[a].type : r && a >= s ? r.node(a - s).type : null;
4346
+ if (!u || u.name != c && u.groups.indexOf(c) == -1)
4347
4347
  return !1;
4348
4348
  a--;
4349
4349
  }
@@ -4367,7 +4367,7 @@ class Hs {
4367
4367
  }
4368
4368
  }
4369
4369
  addPendingMark(e) {
4370
- let t = Ud(e, this.top.pendingMarks);
4370
+ let t = Uu(e, this.top.pendingMarks);
4371
4371
  t && this.top.stashMarks.push(t), this.top.pendingMarks = e.addToSet(this.top.pendingMarks);
4372
4372
  }
4373
4373
  removePendingMark(e, t) {
@@ -4385,16 +4385,16 @@ class Hs {
4385
4385
  }
4386
4386
  }
4387
4387
  }
4388
- function Vd(n) {
4388
+ function Vu(n) {
4389
4389
  for (let e = n.firstChild, t = null; e; e = e.nextSibling) {
4390
4390
  let r = e.nodeType == 1 ? e.nodeName.toLowerCase() : null;
4391
4391
  r && Al.hasOwnProperty(r) && t ? (t.appendChild(e), e = t) : r == "li" ? t = e : r && (t = null);
4392
4392
  }
4393
4393
  }
4394
- function qd(n, e) {
4394
+ function qu(n, e) {
4395
4395
  return (n.matches || n.msMatchesSelector || n.webkitMatchesSelector || n.mozMatchesSelector).call(n, e);
4396
4396
  }
4397
- function Wd(n) {
4397
+ function Wu(n) {
4398
4398
  let e = /\s*([\w-]+)\s*:\s*([^;]+)/g, t, r = [];
4399
4399
  for (; t = e.exec(n); )
4400
4400
  r.push(t[1], t[2].trim());
@@ -4406,7 +4406,7 @@ function js(n) {
4406
4406
  e[t] = n[t];
4407
4407
  return e;
4408
4408
  }
4409
- function Kd(n, e) {
4409
+ function Ku(n, e) {
4410
4410
  let t = e.schema.nodes;
4411
4411
  for (let r in t) {
4412
4412
  let i = t[r];
@@ -4415,8 +4415,8 @@ function Kd(n, e) {
4415
4415
  let s = [], o = (l) => {
4416
4416
  s.push(l);
4417
4417
  for (let a = 0; a < l.edgeCount; a++) {
4418
- let { type: c, next: d } = l.edge(a);
4419
- if (c == e || s.indexOf(d) < 0 && o(d))
4418
+ let { type: c, next: u } = l.edge(a);
4419
+ if (c == e || s.indexOf(u) < 0 && o(u))
4420
4420
  return !0;
4421
4421
  }
4422
4422
  };
@@ -4424,7 +4424,7 @@ function Kd(n, e) {
4424
4424
  return !0;
4425
4425
  }
4426
4426
  }
4427
- function Ud(n, e) {
4427
+ function Uu(n, e) {
4428
4428
  for (let t = 0; t < e.length; t++)
4429
4429
  if (n.eq(e[t]))
4430
4430
  return e[t];
@@ -4467,8 +4467,8 @@ class ve {
4467
4467
  for (; l < s.length; )
4468
4468
  i = s.pop()[1];
4469
4469
  for (; a < o.marks.length; ) {
4470
- let c = o.marks[a++], d = this.serializeMark(c, o.isInline, t);
4471
- d && (s.push([c, i]), i.appendChild(d.dom), i = d.contentDOM || d.dom);
4470
+ let c = o.marks[a++], u = this.serializeMark(c, o.isInline, t);
4471
+ u && (s.push([c, i]), i.appendChild(u.dom), i = u.contentDOM || u.dom);
4472
4472
  }
4473
4473
  }
4474
4474
  i.appendChild(this.serializeNodeInner(o, t));
@@ -4525,20 +4525,20 @@ class ve {
4525
4525
  let o, l = r ? e.createElementNS(r, i) : e.createElement(i), a = t[1], c = 1;
4526
4526
  if (a && typeof a == "object" && a.nodeType == null && !Array.isArray(a)) {
4527
4527
  c = 2;
4528
- for (let d in a)
4529
- if (a[d] != null) {
4530
- let u = d.indexOf(" ");
4531
- u > 0 ? l.setAttributeNS(d.slice(0, u), d.slice(u + 1), a[d]) : l.setAttribute(d, a[d]);
4528
+ for (let u in a)
4529
+ if (a[u] != null) {
4530
+ let d = u.indexOf(" ");
4531
+ d > 0 ? l.setAttributeNS(u.slice(0, d), u.slice(d + 1), a[u]) : l.setAttribute(u, a[u]);
4532
4532
  }
4533
4533
  }
4534
- for (let d = c; d < t.length; d++) {
4535
- let u = t[d];
4536
- if (u === 0) {
4537
- if (d < t.length - 1 || d > c)
4534
+ for (let u = c; u < t.length; u++) {
4535
+ let d = t[u];
4536
+ if (d === 0) {
4537
+ if (u < t.length - 1 || u > c)
4538
4538
  throw new RangeError("Content hole must be the only child of its parent node");
4539
4539
  return { dom: l, contentDOM: l };
4540
4540
  } else {
4541
- let { dom: f, contentDOM: h } = ve.renderSpec(e, u, r);
4541
+ let { dom: f, contentDOM: h } = ve.renderSpec(e, d, r);
4542
4542
  if (l.appendChild(f), h) {
4543
4543
  if (o)
4544
4544
  throw new RangeError("Multiple content holes");
@@ -4582,13 +4582,13 @@ function ri(n) {
4582
4582
  return n.document || window.document;
4583
4583
  }
4584
4584
  const Nl = 65535, Pl = Math.pow(2, 16);
4585
- function Jd(n, e) {
4585
+ function Ju(n, e) {
4586
4586
  return n + e * Pl;
4587
4587
  }
4588
4588
  function qs(n) {
4589
4589
  return n & Nl;
4590
4590
  }
4591
- function Gd(n) {
4591
+ function Gu(n) {
4592
4592
  return (n - (n & Nl)) / Pl;
4593
4593
  }
4594
4594
  const Dl = 1, Il = 2, Sn = 4, Rl = 8;
@@ -4646,7 +4646,7 @@ class le {
4646
4646
  if (!this.inverted)
4647
4647
  for (let i = 0; i < r; i++)
4648
4648
  t += this.ranges[i * 3 + 2] - this.ranges[i * 3 + 1];
4649
- return this.ranges[r * 3] + t + Gd(e);
4649
+ return this.ranges[r * 3] + t + Gu(e);
4650
4650
  }
4651
4651
  mapResult(e, t = 1) {
4652
4652
  return this._map(e, t, !1);
@@ -4663,15 +4663,15 @@ class le {
4663
4663
  let a = this.ranges[l] - (this.inverted ? i : 0);
4664
4664
  if (a > e)
4665
4665
  break;
4666
- let c = this.ranges[l + s], d = this.ranges[l + o], u = a + c;
4667
- if (e <= u) {
4668
- let f = c ? e == a ? -1 : e == u ? 1 : t : t, h = a + i + (f < 0 ? 0 : d);
4666
+ let c = this.ranges[l + s], u = this.ranges[l + o], d = a + c;
4667
+ if (e <= d) {
4668
+ let f = c ? e == a ? -1 : e == d ? 1 : t : t, h = a + i + (f < 0 ? 0 : u);
4669
4669
  if (r)
4670
4670
  return h;
4671
- let p = e == (t < 0 ? a : u) ? null : Jd(l / 3, e - a), m = e == a ? Il : e == u ? Dl : Sn;
4672
- return (t < 0 ? e != a : e != u) && (m |= Rl), new Pi(h, m, p);
4671
+ let p = e == (t < 0 ? a : d) ? null : Ju(l / 3, e - a), m = e == a ? Il : e == d ? Dl : Sn;
4672
+ return (t < 0 ? e != a : e != d) && (m |= Rl), new Pi(h, m, p);
4673
4673
  }
4674
- i += d - c;
4674
+ i += u - c;
4675
4675
  }
4676
4676
  return r ? e + i : new Pi(e + i, 0, null);
4677
4677
  }
@@ -4684,8 +4684,8 @@ class le {
4684
4684
  let a = this.ranges[l] - (this.inverted ? r : 0);
4685
4685
  if (a > e)
4686
4686
  break;
4687
- let c = this.ranges[l + s], d = a + c;
4688
- if (e <= d && l == i * 3)
4687
+ let c = this.ranges[l + s], u = a + c;
4688
+ if (e <= u && l == i * 3)
4689
4689
  return !0;
4690
4690
  r += this.ranges[l + o] - c;
4691
4691
  }
@@ -4698,8 +4698,8 @@ class le {
4698
4698
  forEach(e) {
4699
4699
  let t = this.inverted ? 2 : 1, r = this.inverted ? 1 : 2;
4700
4700
  for (let i = 0, s = 0; i < this.ranges.length; i += 3) {
4701
- let o = this.ranges[i], l = o - (this.inverted ? s : 0), a = o + (this.inverted ? 0 : s), c = this.ranges[i + t], d = this.ranges[i + r];
4702
- e(l, l + c, a, a + d), s += d - c;
4701
+ let o = this.ranges[i], l = o - (this.inverted ? s : 0), a = o + (this.inverted ? 0 : s), c = this.ranges[i + t], u = this.ranges[i + r];
4702
+ e(l, l + c, a, a + u), s += u - c;
4703
4703
  }
4704
4704
  }
4705
4705
  /**
@@ -5197,21 +5197,21 @@ function Di(n, e, t) {
5197
5197
  }
5198
5198
  return !1;
5199
5199
  }
5200
- function Yd(n, e, t, r) {
5200
+ function Yu(n, e, t, r) {
5201
5201
  let i = [], s = [], o, l;
5202
- n.doc.nodesBetween(e, t, (a, c, d) => {
5202
+ n.doc.nodesBetween(e, t, (a, c, u) => {
5203
5203
  if (!a.isInline)
5204
5204
  return;
5205
- let u = a.marks;
5206
- if (!r.isInSet(u) && d.type.allowsMarkType(r.type)) {
5207
- let f = Math.max(c, e), h = Math.min(c + a.nodeSize, t), p = r.addToSet(u);
5208
- for (let m = 0; m < u.length; m++)
5209
- u[m].isInSet(p) || (o && o.to == f && o.mark.eq(u[m]) ? o.to = h : i.push(o = new Ce(f, h, u[m])));
5205
+ let d = a.marks;
5206
+ if (!r.isInSet(d) && u.type.allowsMarkType(r.type)) {
5207
+ let f = Math.max(c, e), h = Math.min(c + a.nodeSize, t), p = r.addToSet(d);
5208
+ for (let m = 0; m < d.length; m++)
5209
+ d[m].isInSet(p) || (o && o.to == f && o.mark.eq(d[m]) ? o.to = h : i.push(o = new Ce(f, h, d[m])));
5210
5210
  l && l.to == f ? l.to = h : s.push(l = new Ve(f, h, r));
5211
5211
  }
5212
5212
  }), i.forEach((a) => n.step(a)), s.forEach((a) => n.step(a));
5213
5213
  }
5214
- function Xd(n, e, t, r) {
5214
+ function Xu(n, e, t, r) {
5215
5215
  let i = [], s = 0;
5216
5216
  n.doc.nodesBetween(e, t, (o, l) => {
5217
5217
  if (!o.isInline)
@@ -5219,38 +5219,38 @@ function Xd(n, e, t, r) {
5219
5219
  s++;
5220
5220
  let a = null;
5221
5221
  if (r instanceof pr) {
5222
- let c = o.marks, d;
5223
- for (; d = r.isInSet(c); )
5224
- (a || (a = [])).push(d), c = d.removeFromSet(c);
5222
+ let c = o.marks, u;
5223
+ for (; u = r.isInSet(c); )
5224
+ (a || (a = [])).push(u), c = u.removeFromSet(c);
5225
5225
  } else
5226
5226
  r ? r.isInSet(o.marks) && (a = [r]) : a = o.marks;
5227
5227
  if (a && a.length) {
5228
5228
  let c = Math.min(l + o.nodeSize, t);
5229
- for (let d = 0; d < a.length; d++) {
5230
- let u = a[d], f;
5229
+ for (let u = 0; u < a.length; u++) {
5230
+ let d = a[u], f;
5231
5231
  for (let h = 0; h < i.length; h++) {
5232
5232
  let p = i[h];
5233
- p.step == s - 1 && u.eq(i[h].style) && (f = p);
5233
+ p.step == s - 1 && d.eq(i[h].style) && (f = p);
5234
5234
  }
5235
- f ? (f.to = c, f.step = s) : i.push({ style: u, from: Math.max(l, e), to: c, step: s });
5235
+ f ? (f.to = c, f.step = s) : i.push({ style: d, from: Math.max(l, e), to: c, step: s });
5236
5236
  }
5237
5237
  }
5238
5238
  }), i.forEach((o) => n.step(new Ce(o.from, o.to, o.style)));
5239
5239
  }
5240
- function Qd(n, e, t, r = t.contentMatch) {
5240
+ function Qu(n, e, t, r = t.contentMatch) {
5241
5241
  let i = n.doc.nodeAt(e), s = [], o = e + 1;
5242
5242
  for (let l = 0; l < i.childCount; l++) {
5243
- let a = i.child(l), c = o + a.nodeSize, d = r.matchType(a.type);
5244
- if (!d)
5243
+ let a = i.child(l), c = o + a.nodeSize, u = r.matchType(a.type);
5244
+ if (!u)
5245
5245
  s.push(new V(o, c, S.empty));
5246
5246
  else {
5247
- r = d;
5248
- for (let u = 0; u < a.marks.length; u++)
5249
- t.allowsMarkType(a.marks[u].type) || n.step(new Ce(o, c, a.marks[u]));
5247
+ r = u;
5248
+ for (let d = 0; d < a.marks.length; d++)
5249
+ t.allowsMarkType(a.marks[d].type) || n.step(new Ce(o, c, a.marks[d]));
5250
5250
  if (a.isText && !t.spec.code) {
5251
- let u, f = /\r?\n|\r/g, h;
5252
- for (; u = f.exec(a.text); )
5253
- h || (h = new S(b.from(t.schema.text(" ", t.allowedMarks(a.marks))), 0, 0)), s.push(new V(o + u.index, o + u.index + u[0].length, h));
5251
+ let d, f = /\r?\n|\r/g, h;
5252
+ for (; d = f.exec(a.text); )
5253
+ h || (h = new S(b.from(t.schema.text(" ", t.allowedMarks(a.marks))), 0, 0)), s.push(new V(o + d.index, o + d.index + d[0].length, h));
5254
5254
  }
5255
5255
  }
5256
5256
  o = c;
@@ -5262,7 +5262,7 @@ function Qd(n, e, t, r = t.contentMatch) {
5262
5262
  for (let l = s.length - 1; l >= 0; l--)
5263
5263
  n.step(s[l]);
5264
5264
  }
5265
- function Zd(n, e, t) {
5265
+ function Zu(n, e, t) {
5266
5266
  return (e == 0 || n.canReplace(e, n.childCount)) && (t == n.childCount || n.canReplace(0, t));
5267
5267
  }
5268
5268
  function Dt(n) {
@@ -5271,35 +5271,35 @@ function Dt(n) {
5271
5271
  let i = n.$from.node(r), s = n.$from.index(r), o = n.$to.indexAfter(r);
5272
5272
  if (r < n.depth && i.canReplace(s, o, t))
5273
5273
  return r;
5274
- if (r == 0 || i.type.spec.isolating || !Zd(i, s, o))
5274
+ if (r == 0 || i.type.spec.isolating || !Zu(i, s, o))
5275
5275
  break;
5276
5276
  }
5277
5277
  return null;
5278
5278
  }
5279
- function eu(n, e, t) {
5280
- let { $from: r, $to: i, depth: s } = e, o = r.before(s + 1), l = i.after(s + 1), a = o, c = l, d = b.empty, u = 0;
5279
+ function ed(n, e, t) {
5280
+ let { $from: r, $to: i, depth: s } = e, o = r.before(s + 1), l = i.after(s + 1), a = o, c = l, u = b.empty, d = 0;
5281
5281
  for (let p = s, m = !1; p > t; p--)
5282
- m || r.index(p) > 0 ? (m = !0, d = b.from(r.node(p).copy(d)), u++) : a--;
5282
+ m || r.index(p) > 0 ? (m = !0, u = b.from(r.node(p).copy(u)), d++) : a--;
5283
5283
  let f = b.empty, h = 0;
5284
5284
  for (let p = s, m = !1; p > t; p--)
5285
5285
  m || i.after(p + 1) < i.end(p) ? (m = !0, f = b.from(i.node(p).copy(f)), h++) : c++;
5286
- n.step(new z(a, c, o, l, new S(d.append(f), u, h), d.size - u, !0));
5286
+ n.step(new z(a, c, o, l, new S(u.append(f), d, h), u.size - d, !0));
5287
5287
  }
5288
5288
  function rs(n, e, t = null, r = n) {
5289
- let i = tu(n, e), s = i && nu(r, e);
5289
+ let i = td(n, e), s = i && nd(r, e);
5290
5290
  return s ? i.map(Ws).concat({ type: e, attrs: t }).concat(s.map(Ws)) : null;
5291
5291
  }
5292
5292
  function Ws(n) {
5293
5293
  return { type: n, attrs: null };
5294
5294
  }
5295
- function tu(n, e) {
5295
+ function td(n, e) {
5296
5296
  let { parent: t, startIndex: r, endIndex: i } = n, s = t.contentMatchAt(r).findWrapping(e);
5297
5297
  if (!s)
5298
5298
  return null;
5299
5299
  let o = s.length ? s[0] : e;
5300
5300
  return t.canReplaceWith(r, i, o) ? s : null;
5301
5301
  }
5302
- function nu(n, e) {
5302
+ function nd(n, e) {
5303
5303
  let { parent: t, startIndex: r, endIndex: i } = n, s = t.child(r), o = e.contentMatch.findWrapping(s.type);
5304
5304
  if (!o)
5305
5305
  return null;
@@ -5308,7 +5308,7 @@ function nu(n, e) {
5308
5308
  a = a.matchType(t.child(c).type);
5309
5309
  return !a || !a.validEnd ? null : o;
5310
5310
  }
5311
- function ru(n, e, t) {
5311
+ function rd(n, e, t) {
5312
5312
  let r = b.empty;
5313
5313
  for (let o = t.length - 1; o >= 0; o--) {
5314
5314
  if (r.size) {
@@ -5321,23 +5321,23 @@ function ru(n, e, t) {
5321
5321
  let i = e.start, s = e.end;
5322
5322
  n.step(new z(i, s, i, s, new S(r, 0, 0), t.length, !0));
5323
5323
  }
5324
- function iu(n, e, t, r, i) {
5324
+ function id(n, e, t, r, i) {
5325
5325
  if (!r.isTextblock)
5326
5326
  throw new RangeError("Type given to setBlockType should be a textblock");
5327
5327
  let s = n.steps.length;
5328
5328
  n.doc.nodesBetween(e, t, (o, l) => {
5329
- if (o.isTextblock && !o.hasMarkup(r, i) && su(n.doc, n.mapping.slice(s).map(l), r)) {
5329
+ if (o.isTextblock && !o.hasMarkup(r, i) && sd(n.doc, n.mapping.slice(s).map(l), r)) {
5330
5330
  n.clearIncompatible(n.mapping.slice(s).map(l, 1), r);
5331
- let a = n.mapping.slice(s), c = a.map(l, 1), d = a.map(l + o.nodeSize, 1);
5332
- return n.step(new z(c, d, c + 1, d - 1, new S(b.from(r.create(i, null, o.marks)), 0, 0), 1, !0)), !1;
5331
+ let a = n.mapping.slice(s), c = a.map(l, 1), u = a.map(l + o.nodeSize, 1);
5332
+ return n.step(new z(c, u, c + 1, u - 1, new S(b.from(r.create(i, null, o.marks)), 0, 0), 1, !0)), !1;
5333
5333
  }
5334
5334
  });
5335
5335
  }
5336
- function su(n, e, t) {
5336
+ function sd(n, e, t) {
5337
5337
  let r = n.resolve(e), i = r.index();
5338
5338
  return r.parent.canReplaceWith(i, i + 1, t);
5339
5339
  }
5340
- function ou(n, e, t, r, i) {
5340
+ function od(n, e, t, r, i) {
5341
5341
  let s = n.doc.nodeAt(e);
5342
5342
  if (!s)
5343
5343
  throw new RangeError("No node at given position");
@@ -5353,25 +5353,25 @@ function vt(n, e, t = 1, r) {
5353
5353
  let i = n.resolve(e), s = i.depth - t, o = r && r[r.length - 1] || i.parent;
5354
5354
  if (s < 0 || i.parent.type.spec.isolating || !i.parent.canReplace(i.index(), i.parent.childCount) || !o.type.validContent(i.parent.content.cutByIndex(i.index(), i.parent.childCount)))
5355
5355
  return !1;
5356
- for (let c = i.depth - 1, d = t - 2; c > s; c--, d--) {
5357
- let u = i.node(c), f = i.index(c);
5358
- if (u.type.spec.isolating)
5356
+ for (let c = i.depth - 1, u = t - 2; c > s; c--, u--) {
5357
+ let d = i.node(c), f = i.index(c);
5358
+ if (d.type.spec.isolating)
5359
5359
  return !1;
5360
- let h = u.content.cutByIndex(f, u.childCount), p = r && r[d + 1];
5360
+ let h = d.content.cutByIndex(f, d.childCount), p = r && r[u + 1];
5361
5361
  p && (h = h.replaceChild(0, p.type.create(p.attrs)));
5362
- let m = r && r[d] || u;
5363
- if (!u.canReplace(f + 1, u.childCount) || !m.type.validContent(h))
5362
+ let m = r && r[u] || d;
5363
+ if (!d.canReplace(f + 1, d.childCount) || !m.type.validContent(h))
5364
5364
  return !1;
5365
5365
  }
5366
5366
  let l = i.indexAfter(s), a = r && r[0];
5367
5367
  return i.node(s).canReplaceWith(l, l, a ? a.type : i.node(s + 1).type);
5368
5368
  }
5369
- function lu(n, e, t = 1, r) {
5369
+ function ld(n, e, t = 1, r) {
5370
5370
  let i = n.doc.resolve(e), s = b.empty, o = b.empty;
5371
5371
  for (let l = i.depth, a = i.depth - t, c = t - 1; l > a; l--, c--) {
5372
5372
  s = b.from(i.node(l).copy(s));
5373
- let d = r && r[c];
5374
- o = b.from(d ? d.type.create(d.attrs, o) : i.node(l).copy(o));
5373
+ let u = r && r[c];
5374
+ o = b.from(u ? u.type.create(u.attrs, o) : i.node(l).copy(o));
5375
5375
  }
5376
5376
  n.step(new V(e, e, new S(s.append(o), t, t), !0));
5377
5377
  }
@@ -5393,11 +5393,11 @@ function Ll(n, e, t = -1) {
5393
5393
  e = t < 0 ? r.before(i) : r.after(i);
5394
5394
  }
5395
5395
  }
5396
- function au(n, e, t) {
5396
+ function ad(n, e, t) {
5397
5397
  let r = new V(e - t, e + t, S.empty, !0);
5398
5398
  n.step(r);
5399
5399
  }
5400
- function cu(n, e, t) {
5400
+ function cd(n, e, t) {
5401
5401
  let r = n.resolve(e);
5402
5402
  if (r.parent.canReplaceWith(r.index(), r.index(), t))
5403
5403
  return e;
@@ -5419,7 +5419,7 @@ function cu(n, e, t) {
5419
5419
  }
5420
5420
  return null;
5421
5421
  }
5422
- function du(n, e, t) {
5422
+ function ud(n, e, t) {
5423
5423
  let r = n.resolve(e);
5424
5424
  if (!t.content.size)
5425
5425
  return e;
@@ -5428,14 +5428,14 @@ function du(n, e, t) {
5428
5428
  i = i.firstChild.content;
5429
5429
  for (let s = 1; s <= (t.openStart == 0 && t.size ? 2 : 1); s++)
5430
5430
  for (let o = r.depth; o >= 0; o--) {
5431
- let l = o == r.depth ? 0 : r.pos <= (r.start(o + 1) + r.end(o + 1)) / 2 ? -1 : 1, a = r.index(o) + (l > 0 ? 1 : 0), c = r.node(o), d = !1;
5431
+ let l = o == r.depth ? 0 : r.pos <= (r.start(o + 1) + r.end(o + 1)) / 2 ? -1 : 1, a = r.index(o) + (l > 0 ? 1 : 0), c = r.node(o), u = !1;
5432
5432
  if (s == 1)
5433
- d = c.canReplace(a, a, i);
5433
+ u = c.canReplace(a, a, i);
5434
5434
  else {
5435
- let u = c.contentMatchAt(a).findWrapping(i.firstChild.type);
5436
- d = u && c.canReplaceWith(a, a, u[0]);
5435
+ let d = c.contentMatchAt(a).findWrapping(i.firstChild.type);
5436
+ u = d && c.canReplaceWith(a, a, d[0]);
5437
5437
  }
5438
- if (d)
5438
+ if (u)
5439
5439
  return l == 0 ? r.pos : l < 0 ? r.before(o + 1) : r.after(o + 1);
5440
5440
  }
5441
5441
  return null;
@@ -5444,12 +5444,12 @@ function is(n, e, t = e, r = S.empty) {
5444
5444
  if (e == t && !r.size)
5445
5445
  return null;
5446
5446
  let i = n.resolve(e), s = n.resolve(t);
5447
- return Bl(i, s, r) ? new V(e, t, r) : new uu(i, s, r).fit();
5447
+ return Bl(i, s, r) ? new V(e, t, r) : new dd(i, s, r).fit();
5448
5448
  }
5449
5449
  function Bl(n, e, t) {
5450
5450
  return !t.openStart && !t.openEnd && n.start() == e.start() && n.parent.canReplace(n.index(), e.index(), t.content);
5451
5451
  }
5452
- class uu {
5452
+ class dd {
5453
5453
  constructor(e, t, r) {
5454
5454
  this.$from = e, this.$to = t, this.unplaced = r, this.frontier = [], this.placed = b.empty;
5455
5455
  for (let i = 0; i <= e.depth; i++) {
@@ -5498,11 +5498,11 @@ class uu {
5498
5498
  r ? (s = si(this.unplaced.content, r - 1).firstChild, i = s.content) : i = this.unplaced.content;
5499
5499
  let o = i.firstChild;
5500
5500
  for (let l = this.depth; l >= 0; l--) {
5501
- let { type: a, match: c } = this.frontier[l], d, u = null;
5502
- if (t == 1 && (o ? c.matchType(o.type) || (u = c.fillBefore(b.from(o), !1)) : s && a.compatibleContent(s.type)))
5503
- return { sliceDepth: r, frontierDepth: l, parent: s, inject: u };
5504
- if (t == 2 && o && (d = c.findWrapping(o.type)))
5505
- return { sliceDepth: r, frontierDepth: l, parent: s, wrap: d };
5501
+ let { type: a, match: c } = this.frontier[l], u, d = null;
5502
+ if (t == 1 && (o ? c.matchType(o.type) || (d = c.fillBefore(b.from(o), !1)) : s && a.compatibleContent(s.type)))
5503
+ return { sliceDepth: r, frontierDepth: l, parent: s, inject: d };
5504
+ if (t == 2 && o && (u = c.findWrapping(o.type)))
5505
+ return { sliceDepth: r, frontierDepth: l, parent: s, wrap: u };
5506
5506
  if (s && c.matchType(s.type))
5507
5507
  break;
5508
5508
  }
@@ -5529,21 +5529,21 @@ class uu {
5529
5529
  if (s)
5530
5530
  for (let m = 0; m < s.length; m++)
5531
5531
  this.openFrontierNode(s[m]);
5532
- let o = this.unplaced, l = r ? r.content : o.content, a = o.openStart - e, c = 0, d = [], { match: u, type: f } = this.frontier[t];
5532
+ let o = this.unplaced, l = r ? r.content : o.content, a = o.openStart - e, c = 0, u = [], { match: d, type: f } = this.frontier[t];
5533
5533
  if (i) {
5534
5534
  for (let m = 0; m < i.childCount; m++)
5535
- d.push(i.child(m));
5536
- u = u.matchFragment(i);
5535
+ u.push(i.child(m));
5536
+ d = d.matchFragment(i);
5537
5537
  }
5538
5538
  let h = l.size + e - (o.content.size - o.openEnd);
5539
5539
  for (; c < l.childCount; ) {
5540
- let m = l.child(c), g = u.matchType(m.type);
5540
+ let m = l.child(c), g = d.matchType(m.type);
5541
5541
  if (!g)
5542
5542
  break;
5543
- c++, (c > 1 || a == 0 || m.content.size) && (u = g, d.push($l(m.mark(f.allowedMarks(m.marks)), c == 1 ? a : 0, c == l.childCount ? h : -1)));
5543
+ c++, (c > 1 || a == 0 || m.content.size) && (d = g, u.push($l(m.mark(f.allowedMarks(m.marks)), c == 1 ? a : 0, c == l.childCount ? h : -1)));
5544
5544
  }
5545
5545
  let p = c == l.childCount;
5546
- p || (h = -1), this.placed = $t(this.placed, t, b.from(d)), this.frontier[t].match = u, p && h < 0 && r && r.type == this.frontier[this.depth].type && this.frontier.length > 1 && this.closeFrontierNode();
5546
+ p || (h = -1), this.placed = $t(this.placed, t, b.from(u)), this.frontier[t].match = d, p && h < 0 && r && r.type == this.frontier[this.depth].type && this.frontier.length > 1 && this.closeFrontierNode();
5547
5547
  for (let m = 0, g = l; m < h; m++) {
5548
5548
  let y = g.lastChild;
5549
5549
  this.frontier.push({ type: y.type, match: y.contentMatchAt(y.childCount) }), g = y.content;
@@ -5567,8 +5567,8 @@ class uu {
5567
5567
  let { match: r, type: i } = this.frontier[t], s = t < e.depth && e.end(t + 1) == e.pos + (e.depth - (t + 1)), o = oi(e, t, i, r, s);
5568
5568
  if (o) {
5569
5569
  for (let l = t - 1; l >= 0; l--) {
5570
- let { match: a, type: c } = this.frontier[l], d = oi(e, l, c, a, !0);
5571
- if (!d || d.childCount)
5570
+ let { match: a, type: c } = this.frontier[l], u = oi(e, l, c, a, !0);
5571
+ if (!u || u.childCount)
5572
5572
  continue e;
5573
5573
  }
5574
5574
  return { depth: t, fit: o, move: s ? e.doc.resolve(e.after(t + 1)) : e };
@@ -5619,18 +5619,18 @@ function oi(n, e, t, r, i) {
5619
5619
  if (o == s.childCount && !t.compatibleContent(s.type))
5620
5620
  return null;
5621
5621
  let l = r.fillBefore(s.content, !0, o);
5622
- return l && !fu(t, s.content, o) ? l : null;
5622
+ return l && !fd(t, s.content, o) ? l : null;
5623
5623
  }
5624
- function fu(n, e, t) {
5624
+ function fd(n, e, t) {
5625
5625
  for (let r = t; r < e.childCount; r++)
5626
5626
  if (!n.allowsMarks(e.child(r).marks))
5627
5627
  return !0;
5628
5628
  return !1;
5629
5629
  }
5630
- function hu(n) {
5630
+ function hd(n) {
5631
5631
  return n.spec.defining || n.spec.definingForContent;
5632
5632
  }
5633
- function pu(n, e, t, r) {
5633
+ function pd(n, e, t, r) {
5634
5634
  if (!r.size)
5635
5635
  return n.deleteRange(e, t);
5636
5636
  let i = n.doc.resolve(e), s = n.doc.resolve(t);
@@ -5646,22 +5646,22 @@ function pu(n, e, t, r) {
5646
5646
  break;
5647
5647
  o.indexOf(f) > -1 ? l = f : i.before(f) == h && o.splice(1, 0, -f);
5648
5648
  }
5649
- let a = o.indexOf(l), c = [], d = r.openStart;
5649
+ let a = o.indexOf(l), c = [], u = r.openStart;
5650
5650
  for (let f = r.content, h = 0; ; h++) {
5651
5651
  let p = f.firstChild;
5652
5652
  if (c.push(p), h == r.openStart)
5653
5653
  break;
5654
5654
  f = p.content;
5655
5655
  }
5656
- for (let f = d - 1; f >= 0; f--) {
5657
- let h = c[f], p = hu(h.type);
5656
+ for (let f = u - 1; f >= 0; f--) {
5657
+ let h = c[f], p = hd(h.type);
5658
5658
  if (p && !h.sameMarkup(i.node(Math.abs(l) - 1)))
5659
- d = f;
5659
+ u = f;
5660
5660
  else if (p || !h.type.isTextblock)
5661
5661
  break;
5662
5662
  }
5663
5663
  for (let f = r.openStart; f >= 0; f--) {
5664
- let h = (f + d + 1) % (r.openStart + 1), p = c[h];
5664
+ let h = (f + u + 1) % (r.openStart + 1), p = c[h];
5665
5665
  if (p)
5666
5666
  for (let m = 0; m < o.length; m++) {
5667
5667
  let g = o[(m + a) % o.length], y = !0;
@@ -5671,8 +5671,8 @@ function pu(n, e, t, r) {
5671
5671
  return n.replace(i.before(g), y ? s.after(g) : t, new S(Fl(r.content, 0, r.openStart, h), h, r.openEnd));
5672
5672
  }
5673
5673
  }
5674
- let u = n.steps.length;
5675
- for (let f = o.length - 1; f >= 0 && (n.replace(e, t, r), !(n.steps.length > u)); f--) {
5674
+ let d = n.steps.length;
5675
+ for (let f = o.length - 1; f >= 0 && (n.replace(e, t, r), !(n.steps.length > d)); f--) {
5676
5676
  let h = o[f];
5677
5677
  h < 0 || (e = i.before(h), t = s.after(h));
5678
5678
  }
@@ -5688,14 +5688,14 @@ function Fl(n, e, t, r, i) {
5688
5688
  }
5689
5689
  return n;
5690
5690
  }
5691
- function mu(n, e, t, r) {
5691
+ function md(n, e, t, r) {
5692
5692
  if (!r.isInline && e == t && n.doc.resolve(e).parent.content.size) {
5693
- let i = cu(n.doc, e, r.type);
5693
+ let i = cd(n.doc, e, r.type);
5694
5694
  i != null && (e = t = i);
5695
5695
  }
5696
5696
  n.replaceRange(e, t, new S(b.from(r), 0, 0));
5697
5697
  }
5698
- function gu(n, e, t) {
5698
+ function gd(n, e, t) {
5699
5699
  let r = n.doc.resolve(e), i = n.doc.resolve(t), s = zl(r, i);
5700
5700
  for (let o = 0; o < s.length; o++) {
5701
5701
  let l = s[o], a = o == s.length - 1;
@@ -5891,7 +5891,7 @@ class Hl {
5891
5891
  control over what happens.
5892
5892
  */
5893
5893
  replaceRange(e, t, r) {
5894
- return pu(this, e, t, r), this;
5894
+ return pd(this, e, t, r), this;
5895
5895
  }
5896
5896
  /**
5897
5897
  Replace the given range with a node, but use `from` and `to` as
@@ -5903,14 +5903,14 @@ class Hl {
5903
5903
  that parent node.
5904
5904
  */
5905
5905
  replaceRangeWith(e, t, r) {
5906
- return mu(this, e, t, r), this;
5906
+ return md(this, e, t, r), this;
5907
5907
  }
5908
5908
  /**
5909
5909
  Delete the given range, expanding it to cover fully covered
5910
5910
  parent nodes until a valid replace is found.
5911
5911
  */
5912
5912
  deleteRange(e, t) {
5913
- return gu(this, e, t), this;
5913
+ return gd(this, e, t), this;
5914
5914
  }
5915
5915
  /**
5916
5916
  Split the content in the given range off from its parent, if there
@@ -5920,14 +5920,14 @@ class Hl {
5920
5920
  sure the lift is valid.
5921
5921
  */
5922
5922
  lift(e, t) {
5923
- return eu(this, e, t), this;
5923
+ return ed(this, e, t), this;
5924
5924
  }
5925
5925
  /**
5926
5926
  Join the blocks around the given position. If depth is 2, their
5927
5927
  last and first siblings are also joined, and so on.
5928
5928
  */
5929
5929
  join(e, t = 1) {
5930
- return au(this, e, t), this;
5930
+ return ad(this, e, t), this;
5931
5931
  }
5932
5932
  /**
5933
5933
  Wrap the given [range](https://prosemirror.net/docs/ref/#model.NodeRange) in the given set of wrappers.
@@ -5935,21 +5935,21 @@ class Hl {
5935
5935
  probably be computed with [`findWrapping`](https://prosemirror.net/docs/ref/#transform.findWrapping).
5936
5936
  */
5937
5937
  wrap(e, t) {
5938
- return ru(this, e, t), this;
5938
+ return rd(this, e, t), this;
5939
5939
  }
5940
5940
  /**
5941
5941
  Set the type of all textblocks (partly) between `from` and `to` to
5942
5942
  the given node type with the given attributes.
5943
5943
  */
5944
5944
  setBlockType(e, t = e, r, i = null) {
5945
- return iu(this, e, t, r, i), this;
5945
+ return id(this, e, t, r, i), this;
5946
5946
  }
5947
5947
  /**
5948
5948
  Change the type, attributes, and/or marks of the node at `pos`.
5949
5949
  When `type` isn't given, the existing node type is preserved,
5950
5950
  */
5951
5951
  setNodeMarkup(e, t, r = null, i) {
5952
- return ou(this, e, t, r, i), this;
5952
+ return od(this, e, t, r, i), this;
5953
5953
  }
5954
5954
  /**
5955
5955
  Set a single attribute on a given node to a new value.
@@ -5993,13 +5993,13 @@ class Hl {
5993
5993
  use after the split.
5994
5994
  */
5995
5995
  split(e, t = 1, r) {
5996
- return lu(this, e, t, r), this;
5996
+ return ld(this, e, t, r), this;
5997
5997
  }
5998
5998
  /**
5999
5999
  Add the given mark to the inline content between `from` and `to`.
6000
6000
  */
6001
6001
  addMark(e, t, r) {
6002
- return Yd(this, e, t, r), this;
6002
+ return Yu(this, e, t, r), this;
6003
6003
  }
6004
6004
  /**
6005
6005
  Remove marks from inline nodes between `from` and `to`. When
@@ -6008,7 +6008,7 @@ class Hl {
6008
6008
  remove all marks of any type.
6009
6009
  */
6010
6010
  removeMark(e, t, r) {
6011
- return Xd(this, e, t, r), this;
6011
+ return Xu(this, e, t, r), this;
6012
6012
  }
6013
6013
  /**
6014
6014
  Removes all marks and nodes from the content of the node at
@@ -6017,7 +6017,7 @@ class Hl {
6017
6017
  third argument.
6018
6018
  */
6019
6019
  clearIncompatible(e, t, r) {
6020
- return Qd(this, e, t, r), this;
6020
+ return Qu(this, e, t, r), this;
6021
6021
  }
6022
6022
  }
6023
6023
  const li = /* @__PURE__ */ Object.create(null);
@@ -6028,7 +6028,7 @@ class A {
6028
6028
  `$head`.
6029
6029
  */
6030
6030
  constructor(e, t, r) {
6031
- this.$anchor = e, this.$head = t, this.ranges = r || [new yu(e.min(t), e.max(t))];
6031
+ this.$anchor = e, this.$head = t, this.ranges = r || [new yd(e.min(t), e.max(t))];
6032
6032
  }
6033
6033
  /**
6034
6034
  The selection's anchor, as an unresolved position.
@@ -6092,8 +6092,8 @@ class A {
6092
6092
  i = r, r = r.lastChild;
6093
6093
  let s = e.steps.length, o = this.ranges;
6094
6094
  for (let l = 0; l < o.length; l++) {
6095
- let { $from: a, $to: c } = o[l], d = e.mapping.slice(s);
6096
- 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);
6095
+ let { $from: a, $to: c } = o[l], u = e.mapping.slice(s);
6096
+ e.replaceRange(u.map(a.pos), u.map(c.pos), l ? S.empty : t), l == 0 && Js(e, s, (r ? r.isInline : i && i.isTextblock) ? -1 : 1);
6097
6097
  }
6098
6098
  }
6099
6099
  /**
@@ -6103,8 +6103,8 @@ class A {
6103
6103
  replaceWith(e, t) {
6104
6104
  let r = e.steps.length, i = this.ranges;
6105
6105
  for (let s = 0; s < i.length; s++) {
6106
- let { $from: o, $to: l } = i[s], a = e.mapping.slice(r), c = a.map(o.pos), d = a.map(l.pos);
6107
- s ? e.deleteRange(c, d) : (e.replaceRangeWith(c, d, t), Js(e, r, t.isInline ? -1 : 1));
6106
+ let { $from: o, $to: l } = i[s], a = e.mapping.slice(r), c = a.map(o.pos), u = a.map(l.pos);
6107
+ s ? e.deleteRange(c, u) : (e.replaceRangeWith(c, u, t), Js(e, r, t.isInline ? -1 : 1));
6108
6108
  }
6109
6109
  }
6110
6110
  /**
@@ -6186,7 +6186,7 @@ class A {
6186
6186
  }
6187
6187
  }
6188
6188
  A.prototype.visible = !0;
6189
- class yu {
6189
+ class yd {
6190
6190
  /**
6191
6191
  Create a range.
6192
6192
  */
@@ -6374,11 +6374,11 @@ class ge extends A {
6374
6374
  return e instanceof ge;
6375
6375
  }
6376
6376
  getBookmark() {
6377
- return bu;
6377
+ return bd;
6378
6378
  }
6379
6379
  }
6380
6380
  A.jsonID("all", ge);
6381
- const bu = {
6381
+ const bd = {
6382
6382
  map() {
6383
6383
  return this;
6384
6384
  },
@@ -6411,12 +6411,12 @@ function Js(n, e, t) {
6411
6411
  if (!(i instanceof V || i instanceof z))
6412
6412
  return;
6413
6413
  let s = n.mapping.maps[r], o;
6414
- s.forEach((l, a, c, d) => {
6415
- o == null && (o = d);
6414
+ s.forEach((l, a, c, u) => {
6415
+ o == null && (o = u);
6416
6416
  }), n.setSelection(A.near(n.doc.resolve(o), t));
6417
6417
  }
6418
6418
  const Gs = 1, hn = 2, Ys = 4;
6419
- class ku extends Hl {
6419
+ class kd extends Hl {
6420
6420
  /**
6421
6421
  @internal
6422
6422
  */
@@ -6575,7 +6575,7 @@ class Ft {
6575
6575
  this.name = e, this.init = Xs(t.init, r), this.apply = Xs(t.apply, r);
6576
6576
  }
6577
6577
  }
6578
- const Su = [
6578
+ const Sd = [
6579
6579
  new Ft("doc", {
6580
6580
  init(n) {
6581
6581
  return n.doc || n.schema.topNodeType.createAndFill();
@@ -6611,7 +6611,7 @@ const Su = [
6611
6611
  ];
6612
6612
  class ai {
6613
6613
  constructor(e, t) {
6614
- this.schema = e, this.plugins = [], this.pluginsByKey = /* @__PURE__ */ Object.create(null), this.fields = Su.slice(), t && t.forEach((r) => {
6614
+ this.schema = e, this.plugins = [], this.pluginsByKey = /* @__PURE__ */ Object.create(null), this.fields = Sd.slice(), t && t.forEach((r) => {
6615
6615
  if (this.pluginsByKey[r.key])
6616
6616
  throw new RangeError("Adding different instances of a keyed plugin (" + r.key + ")");
6617
6617
  this.plugins.push(r), this.pluginsByKey[r.key] = r, r.spec.state && this.fields.push(new Ft(r.key, r.spec.state, r));
@@ -6671,14 +6671,14 @@ class xt {
6671
6671
  for (let o = 0; o < this.config.plugins.length; o++) {
6672
6672
  let l = this.config.plugins[o];
6673
6673
  if (l.spec.appendTransaction) {
6674
- let a = i ? i[o].n : 0, c = i ? i[o].state : this, d = a < t.length && l.spec.appendTransaction.call(l, a ? t.slice(a) : t, c, r);
6675
- if (d && r.filterTransaction(d, o)) {
6676
- if (d.setMeta("appendedTransaction", e), !i) {
6674
+ let a = i ? i[o].n : 0, c = i ? i[o].state : this, u = a < t.length && l.spec.appendTransaction.call(l, a ? t.slice(a) : t, c, r);
6675
+ if (u && r.filterTransaction(u, o)) {
6676
+ if (u.setMeta("appendedTransaction", e), !i) {
6677
6677
  i = [];
6678
- for (let u = 0; u < this.config.plugins.length; u++)
6679
- i.push(u < o ? { state: r, n: t.length } : { state: this, n: 0 });
6678
+ for (let d = 0; d < this.config.plugins.length; d++)
6679
+ i.push(d < o ? { state: r, n: t.length } : { state: this, n: 0 });
6680
6680
  }
6681
- t.push(d), r = r.applyInner(d), s = !0;
6681
+ t.push(u), r = r.applyInner(u), s = !0;
6682
6682
  }
6683
6683
  i && (i[o] = { state: r, n: t.length });
6684
6684
  }
@@ -6704,7 +6704,7 @@ class xt {
6704
6704
  Start a [transaction](https://prosemirror.net/docs/ref/#state.Transaction) from this state.
6705
6705
  */
6706
6706
  get tr() {
6707
- return new ku(this);
6707
+ return new kd(this);
6708
6708
  }
6709
6709
  /**
6710
6710
  Create a new state.
@@ -6843,14 +6843,14 @@ const Ne = function(n, e, t) {
6843
6843
  return r.setEnd(n, t ?? n.nodeValue.length), r.setStart(n, e || 0), r;
6844
6844
  }, ft = function(n, e, t, r) {
6845
6845
  return t && (Zs(n, e, t, r, -1) || Zs(n, e, t, r, 1));
6846
- }, xu = /^(img|br|input|textarea|hr)$/i;
6846
+ }, xd = /^(img|br|input|textarea|hr)$/i;
6847
6847
  function Zs(n, e, t, r, i) {
6848
6848
  for (; ; ) {
6849
6849
  if (n == t && e == r)
6850
6850
  return !0;
6851
6851
  if (e == (i < 0 ? 0 : Oe(n))) {
6852
6852
  let s = n.parentNode;
6853
- if (!s || s.nodeType != 1 || ls(n) || xu.test(n.nodeName) || n.contentEditable == "false")
6853
+ if (!s || s.nodeType != 1 || ls(n) || xd.test(n.nodeName) || n.contentEditable == "false")
6854
6854
  return !1;
6855
6855
  e = Y(n) + (i < 0 ? 0 : 1), n = s;
6856
6856
  } else if (n.nodeType == 1) {
@@ -6864,7 +6864,7 @@ function Zs(n, e, t, r, i) {
6864
6864
  function Oe(n) {
6865
6865
  return n.nodeType == 3 ? n.nodeValue.length : n.childNodes.length;
6866
6866
  }
6867
- function Ou(n, e, t) {
6867
+ function Od(n, e, t) {
6868
6868
  for (let r = e == 0, i = e == Oe(n); r || i; ) {
6869
6869
  if (n == t)
6870
6870
  return !0;
@@ -6887,13 +6887,13 @@ function et(n, e) {
6887
6887
  let t = document.createEvent("Event");
6888
6888
  return t.initEvent("keydown", !0, !0), t.keyCode = n, t.key = t.code = e, t;
6889
6889
  }
6890
- function vu(n) {
6890
+ function vd(n) {
6891
6891
  let e = n.activeElement;
6892
6892
  for (; e && e.shadowRoot; )
6893
6893
  e = e.shadowRoot.activeElement;
6894
6894
  return e;
6895
6895
  }
6896
- function Cu(n, e, t) {
6896
+ function Cd(n, e, t) {
6897
6897
  if (n.caretPositionFromPoint)
6898
6898
  try {
6899
6899
  let r = n.caretPositionFromPoint(e, t);
@@ -6909,8 +6909,8 @@ function Cu(n, e, t) {
6909
6909
  }
6910
6910
  const Ee = typeof navigator < "u" ? navigator : null, eo = typeof document < "u" ? document : null, Xe = Ee && Ee.userAgent || "", Ii = /Edge\/(\d+)/.exec(Xe), ql = /MSIE \d/.exec(Xe), Ri = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Xe), ie = !!(ql || Ri || Ii), Ke = ql ? document.documentMode : Ri ? +Ri[1] : Ii ? +Ii[1] : 0, ye = !ie && /gecko\/(\d+)/i.test(Xe);
6911
6911
  ye && +(/Firefox\/(\d+)/.exec(Xe) || [0, 0])[1];
6912
- const _i = !ie && /Chrome\/(\d+)/.exec(Xe), U = !!_i, Eu = _i ? +_i[1] : 0, X = !ie && !!Ee && /Apple Computer/.test(Ee.vendor), wt = X && (/Mobile\/\w+/.test(Xe) || !!Ee && Ee.maxTouchPoints > 2), ue = wt || (Ee ? /Mac/.test(Ee.platform) : !1), Tu = Ee ? /Win/.test(Ee.platform) : !1, me = /Android \d/.test(Xe), ln = !!eo && "webkitFontSmoothing" in eo.documentElement.style, Mu = ln ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
6913
- function wu(n) {
6912
+ const _i = !ie && /Chrome\/(\d+)/.exec(Xe), U = !!_i, Ed = _i ? +_i[1] : 0, X = !ie && !!Ee && /Apple Computer/.test(Ee.vendor), wt = X && (/Mobile\/\w+/.test(Xe) || !!Ee && Ee.maxTouchPoints > 2), de = wt || (Ee ? /Mac/.test(Ee.platform) : !1), Td = Ee ? /Win/.test(Ee.platform) : !1, me = /Android \d/.test(Xe), ln = !!eo && "webkitFontSmoothing" in eo.documentElement.style, Md = ln ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
6913
+ function wd(n) {
6914
6914
  return {
6915
6915
  left: 0,
6916
6916
  right: n.documentElement.clientWidth,
@@ -6921,7 +6921,7 @@ function wu(n) {
6921
6921
  function Me(n, e) {
6922
6922
  return typeof n == "number" ? n : n[e];
6923
6923
  }
6924
- function Au(n) {
6924
+ function Ad(n) {
6925
6925
  let e = n.getBoundingClientRect(), t = e.width / n.offsetWidth || 1, r = e.height / n.offsetHeight || 1;
6926
6926
  return {
6927
6927
  left: e.left,
@@ -6935,13 +6935,13 @@ function to(n, e, t) {
6935
6935
  for (let o = t || n.dom; o; o = Xt(o)) {
6936
6936
  if (o.nodeType != 1)
6937
6937
  continue;
6938
- let l = o, a = l == s.body, c = a ? wu(s) : Au(l), d = 0, u = 0;
6939
- if (e.top < c.top + Me(r, "top") ? u = -(c.top - e.top + Me(i, "top")) : e.bottom > c.bottom - Me(r, "bottom") && (u = e.bottom - e.top > c.bottom - c.top ? e.top + Me(i, "top") - c.top : e.bottom - c.bottom + Me(i, "bottom")), e.left < c.left + Me(r, "left") ? d = -(c.left - e.left + Me(i, "left")) : e.right > c.right - Me(r, "right") && (d = e.right - c.right + Me(i, "right")), d || u)
6938
+ let l = o, a = l == s.body, c = a ? wd(s) : Ad(l), u = 0, d = 0;
6939
+ if (e.top < c.top + Me(r, "top") ? d = -(c.top - e.top + Me(i, "top")) : e.bottom > c.bottom - Me(r, "bottom") && (d = e.bottom - e.top > c.bottom - c.top ? e.top + Me(i, "top") - c.top : e.bottom - c.bottom + Me(i, "bottom")), e.left < c.left + Me(r, "left") ? u = -(c.left - e.left + Me(i, "left")) : e.right > c.right - Me(r, "right") && (u = e.right - c.right + Me(i, "right")), u || d)
6940
6940
  if (a)
6941
- s.defaultView.scrollBy(d, u);
6941
+ s.defaultView.scrollBy(u, d);
6942
6942
  else {
6943
6943
  let f = l.scrollLeft, h = l.scrollTop;
6944
- u && (l.scrollTop += u), d && (l.scrollLeft += d);
6944
+ d && (l.scrollTop += d), u && (l.scrollLeft += u);
6945
6945
  let p = l.scrollLeft - f, m = l.scrollTop - h;
6946
6946
  e = { left: e.left - p, top: e.top - m, right: e.right - p, bottom: e.bottom - m };
6947
6947
  }
@@ -6949,7 +6949,7 @@ function to(n, e, t) {
6949
6949
  break;
6950
6950
  }
6951
6951
  }
6952
- function Nu(n) {
6952
+ function Nd(n) {
6953
6953
  let e = n.dom.getBoundingClientRect(), t = Math.max(0, e.top), r, i;
6954
6954
  for (let s = (e.left + e.right) / 2, o = t + 1; o < Math.min(innerHeight, e.bottom); o += 5) {
6955
6955
  let l = n.root.elementFromPoint(s, o);
@@ -6969,7 +6969,7 @@ function Wl(n) {
6969
6969
  ;
6970
6970
  return e;
6971
6971
  }
6972
- function Pu({ refDOM: n, refTop: e, stack: t }) {
6972
+ function Pd({ refDOM: n, refTop: e, stack: t }) {
6973
6973
  let r = n ? n.getBoundingClientRect().top : 0;
6974
6974
  Kl(t, r == 0 ? 0 : r - e);
6975
6975
  }
@@ -6980,7 +6980,7 @@ function Kl(n, e) {
6980
6980
  }
6981
6981
  }
6982
6982
  let mt = null;
6983
- function Du(n) {
6983
+ function Dd(n) {
6984
6984
  if (n.setActive)
6985
6985
  return n.setActive();
6986
6986
  if (mt)
@@ -6994,12 +6994,12 @@ function Du(n) {
6994
6994
  }
6995
6995
  function Ul(n, e) {
6996
6996
  let t, r = 2e8, i, s = 0, o = e.top, l = e.top, a, c;
6997
- for (let d = n.firstChild, u = 0; d; d = d.nextSibling, u++) {
6997
+ for (let u = n.firstChild, d = 0; u; u = u.nextSibling, d++) {
6998
6998
  let f;
6999
- if (d.nodeType == 1)
7000
- f = d.getClientRects();
7001
- else if (d.nodeType == 3)
7002
- f = Ne(d).getClientRects();
6999
+ if (u.nodeType == 1)
7000
+ f = u.getClientRects();
7001
+ else if (u.nodeType == 3)
7002
+ f = Ne(u).getClientRects();
7003
7003
  else
7004
7004
  continue;
7005
7005
  for (let h = 0; h < f.length; h++) {
@@ -7008,20 +7008,20 @@ function Ul(n, e) {
7008
7008
  o = Math.max(p.bottom, o), l = Math.min(p.top, l);
7009
7009
  let m = p.left > e.left ? p.left - e.left : p.right < e.left ? e.left - p.right : 0;
7010
7010
  if (m < r) {
7011
- t = d, r = m, i = m && t.nodeType == 3 ? {
7011
+ t = u, r = m, i = m && t.nodeType == 3 ? {
7012
7012
  left: p.right < e.left ? p.right : p.left,
7013
7013
  top: e.top
7014
- } : e, d.nodeType == 1 && m && (s = u + (e.left >= (p.left + p.right) / 2 ? 1 : 0));
7014
+ } : e, u.nodeType == 1 && m && (s = d + (e.left >= (p.left + p.right) / 2 ? 1 : 0));
7015
7015
  continue;
7016
7016
  }
7017
7017
  } else
7018
- p.top > e.top && !a && p.left <= e.left && p.right >= e.left && (a = d, c = { left: Math.max(p.left, Math.min(p.right, e.left)), top: p.top });
7019
- !t && (e.left >= p.right && e.top >= p.top || e.left >= p.left && e.top >= p.bottom) && (s = u + 1);
7018
+ p.top > e.top && !a && p.left <= e.left && p.right >= e.left && (a = u, c = { left: Math.max(p.left, Math.min(p.right, e.left)), top: p.top });
7019
+ !t && (e.left >= p.right && e.top >= p.top || e.left >= p.left && e.top >= p.bottom) && (s = d + 1);
7020
7020
  }
7021
7021
  }
7022
- return !t && a && (t = a, i = c, r = 0), t && t.nodeType == 3 ? Iu(t, i) : !t || r && t.nodeType == 1 ? { node: n, offset: s } : Ul(t, i);
7022
+ return !t && a && (t = a, i = c, r = 0), t && t.nodeType == 3 ? Id(t, i) : !t || r && t.nodeType == 1 ? { node: n, offset: s } : Ul(t, i);
7023
7023
  }
7024
- function Iu(n, e) {
7024
+ function Id(n, e) {
7025
7025
  let t = n.nodeValue.length, r = document.createRange();
7026
7026
  for (let i = 0; i < t; i++) {
7027
7027
  r.setEnd(n, i + 1), r.setStart(n, i);
@@ -7034,11 +7034,11 @@ function Iu(n, e) {
7034
7034
  function as(n, e) {
7035
7035
  return n.left >= e.left - 1 && n.left <= e.right + 1 && n.top >= e.top - 1 && n.top <= e.bottom + 1;
7036
7036
  }
7037
- function Ru(n, e) {
7037
+ function Rd(n, e) {
7038
7038
  let t = n.parentNode;
7039
7039
  return t && /^li$/i.test(t.nodeName) && e.left < n.getBoundingClientRect().left ? t : n;
7040
7040
  }
7041
- function _u(n, e, t) {
7041
+ function _d(n, e, t) {
7042
7042
  let { node: r, offset: i } = Ul(e, t), s = -1;
7043
7043
  if (r.nodeType == 1 && !r.firstChild) {
7044
7044
  let o = r.getBoundingClientRect();
@@ -7046,7 +7046,7 @@ function _u(n, e, t) {
7046
7046
  }
7047
7047
  return n.docView.posFromDOM(r, i, s);
7048
7048
  }
7049
- function Lu(n, e, t, r) {
7049
+ function Ld(n, e, t, r) {
7050
7050
  let i = -1;
7051
7051
  for (let s = e, o = !1; s != n.dom; ) {
7052
7052
  let l = n.docView.nearestDesc(s, !0);
@@ -7079,8 +7079,8 @@ function Jl(n, e, t) {
7079
7079
  }
7080
7080
  return n;
7081
7081
  }
7082
- function Bu(n, e) {
7083
- let t = n.dom.ownerDocument, r, i = 0, s = Cu(t, e.left, e.top);
7082
+ function Bd(n, e) {
7083
+ let t = n.dom.ownerDocument, r, i = 0, s = Cd(t, e.left, e.top);
7084
7084
  s && ({ node: r, offset: i } = s);
7085
7085
  let o = (n.root.elementFromPoint ? n.root : t).elementFromPoint(e.left, e.top), l;
7086
7086
  if (!o || !n.dom.contains(o.nodeType != 1 ? o.parentNode : o)) {
@@ -7091,15 +7091,15 @@ function Bu(n, e) {
7091
7091
  if (X)
7092
7092
  for (let c = o; r && c; c = Xt(c))
7093
7093
  c.draggable && (r = void 0);
7094
- if (o = Ru(o, e), r) {
7094
+ if (o = Rd(o, e), r) {
7095
7095
  if (ye && r.nodeType == 1 && (i = Math.min(i, r.childNodes.length), i < r.childNodes.length)) {
7096
- let d = r.childNodes[i], u;
7097
- d.nodeName == "IMG" && (u = d.getBoundingClientRect()).right <= e.left && u.bottom > e.top && i++;
7096
+ let u = r.childNodes[i], d;
7097
+ u.nodeName == "IMG" && (d = u.getBoundingClientRect()).right <= e.left && d.bottom > e.top && i++;
7098
7098
  }
7099
7099
  let c;
7100
- ln && i && r.nodeType == 1 && (c = r.childNodes[i - 1]).nodeType == 1 && c.contentEditable == "false" && c.getBoundingClientRect().top >= e.top && i--, r == n.dom && i == r.childNodes.length - 1 && r.lastChild.nodeType == 1 && e.top > r.lastChild.getBoundingClientRect().bottom ? l = n.state.doc.content.size : (i == 0 || r.nodeType != 1 || r.childNodes[i - 1].nodeName != "BR") && (l = Lu(n, r, i, e));
7100
+ ln && i && r.nodeType == 1 && (c = r.childNodes[i - 1]).nodeType == 1 && c.contentEditable == "false" && c.getBoundingClientRect().top >= e.top && i--, r == n.dom && i == r.childNodes.length - 1 && r.lastChild.nodeType == 1 && e.top > r.lastChild.getBoundingClientRect().bottom ? l = n.state.doc.content.size : (i == 0 || r.nodeType != 1 || r.childNodes[i - 1].nodeName != "BR") && (l = Ld(n, r, i, e));
7101
7101
  }
7102
- l == null && (l = _u(n, o, e));
7102
+ l == null && (l = _d(n, o, e));
7103
7103
  let a = n.docView.nearestDesc(o, !0);
7104
7104
  return { pos: l, inside: a ? a.posAtStart - a.border : -1 };
7105
7105
  }
@@ -7115,37 +7115,37 @@ function $e(n, e) {
7115
7115
  }
7116
7116
  return Array.prototype.find.call(t, no) || n.getBoundingClientRect();
7117
7117
  }
7118
- const $u = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;
7118
+ const $d = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;
7119
7119
  function Gl(n, e, t) {
7120
7120
  let { node: r, offset: i, atom: s } = n.docView.domFromPos(e, t < 0 ? -1 : 1), o = ln || ye;
7121
7121
  if (r.nodeType == 3)
7122
- if (o && ($u.test(r.nodeValue) || (t < 0 ? !i : i == r.nodeValue.length))) {
7122
+ if (o && ($d.test(r.nodeValue) || (t < 0 ? !i : i == r.nodeValue.length))) {
7123
7123
  let a = $e(Ne(r, i, i), t);
7124
7124
  if (ye && i && /\s/.test(r.nodeValue[i - 1]) && i < r.nodeValue.length) {
7125
7125
  let c = $e(Ne(r, i - 1, i - 1), -1);
7126
7126
  if (c.top == a.top) {
7127
- let d = $e(Ne(r, i, i + 1), -1);
7128
- if (d.top != a.top)
7129
- return _t(d, d.left < c.left);
7127
+ let u = $e(Ne(r, i, i + 1), -1);
7128
+ if (u.top != a.top)
7129
+ return _t(u, u.left < c.left);
7130
7130
  }
7131
7131
  }
7132
7132
  return a;
7133
7133
  } else {
7134
- let a = i, c = i, d = t < 0 ? 1 : -1;
7135
- return t < 0 && !i ? (c++, d = -1) : t >= 0 && i == r.nodeValue.length ? (a--, d = 1) : t < 0 ? a-- : c++, _t($e(Ne(r, a, c), d), d < 0);
7134
+ let a = i, c = i, u = t < 0 ? 1 : -1;
7135
+ return t < 0 && !i ? (c++, u = -1) : t >= 0 && i == r.nodeValue.length ? (a--, u = 1) : t < 0 ? a-- : c++, _t($e(Ne(r, a, c), u), u < 0);
7136
7136
  }
7137
7137
  if (!n.state.doc.resolve(e - (s || 0)).parent.inlineContent) {
7138
7138
  if (s == null && i && (t < 0 || i == Oe(r))) {
7139
7139
  let a = r.childNodes[i - 1];
7140
7140
  if (a.nodeType == 1)
7141
- return di(a.getBoundingClientRect(), !1);
7141
+ return ui(a.getBoundingClientRect(), !1);
7142
7142
  }
7143
7143
  if (s == null && i < Oe(r)) {
7144
7144
  let a = r.childNodes[i];
7145
7145
  if (a.nodeType == 1)
7146
- return di(a.getBoundingClientRect(), !0);
7146
+ return ui(a.getBoundingClientRect(), !0);
7147
7147
  }
7148
- return di(r.getBoundingClientRect(), t >= 0);
7148
+ return ui(r.getBoundingClientRect(), t >= 0);
7149
7149
  }
7150
7150
  if (s == null && i && (t < 0 || i == Oe(r))) {
7151
7151
  let a = r.childNodes[i - 1], c = a.nodeType == 3 ? Ne(a, Oe(a) - (o ? 0 : 1)) : a.nodeType == 1 && (a.nodeName != "BR" || !a.nextSibling) ? a : null;
@@ -7168,7 +7168,7 @@ function _t(n, e) {
7168
7168
  let t = e ? n.left : n.right;
7169
7169
  return { top: n.top, bottom: n.bottom, left: t, right: t };
7170
7170
  }
7171
- function di(n, e) {
7171
+ function ui(n, e) {
7172
7172
  if (n.height == 0)
7173
7173
  return n;
7174
7174
  let t = e ? n.top : n.bottom;
@@ -7183,7 +7183,7 @@ function Yl(n, e, t) {
7183
7183
  r != e && n.updateState(r), i != n.dom && i && i.focus();
7184
7184
  }
7185
7185
  }
7186
- function Fu(n, e, t) {
7186
+ function Fd(n, e, t) {
7187
7187
  let r = e.selection, i = t == "up" ? r.$from : r.$to;
7188
7188
  return Yl(n, e, () => {
7189
7189
  let { node: s } = n.docView.domFromPos(i.pos, t == "up" ? -1 : 1);
@@ -7207,34 +7207,34 @@ function Fu(n, e, t) {
7207
7207
  else
7208
7208
  continue;
7209
7209
  for (let c = 0; c < a.length; c++) {
7210
- let d = a[c];
7211
- if (d.bottom > d.top + 1 && (t == "up" ? o.top - d.top > (d.bottom - o.top) * 2 : d.bottom - o.bottom > (o.bottom - d.top) * 2))
7210
+ let u = a[c];
7211
+ if (u.bottom > u.top + 1 && (t == "up" ? o.top - u.top > (u.bottom - o.top) * 2 : u.bottom - o.bottom > (o.bottom - u.top) * 2))
7212
7212
  return !1;
7213
7213
  }
7214
7214
  }
7215
7215
  return !0;
7216
7216
  });
7217
7217
  }
7218
- const zu = /[\u0590-\u08ac]/;
7219
- function Hu(n, e, t) {
7218
+ const zd = /[\u0590-\u08ac]/;
7219
+ function Hd(n, e, t) {
7220
7220
  let { $head: r } = e.selection;
7221
7221
  if (!r.parent.isTextblock)
7222
7222
  return !1;
7223
7223
  let i = r.parentOffset, s = !i, o = i == r.parent.content.size, l = n.domSelection();
7224
- return !zu.test(r.parent.textContent) || !l.modify ? t == "left" || t == "backward" ? s : o : Yl(n, e, () => {
7225
- let { focusNode: a, focusOffset: c, anchorNode: d, anchorOffset: u } = n.domSelectionRange(), f = l.caretBidiLevel;
7224
+ return !zd.test(r.parent.textContent) || !l.modify ? t == "left" || t == "backward" ? s : o : Yl(n, e, () => {
7225
+ let { focusNode: a, focusOffset: c, anchorNode: u, anchorOffset: d } = n.domSelectionRange(), f = l.caretBidiLevel;
7226
7226
  l.modify("move", t, "character");
7227
7227
  let h = r.depth ? n.docView.domAfterPos(r.before()) : n.dom, { focusNode: p, focusOffset: m } = n.domSelectionRange(), g = p && !h.contains(p.nodeType == 1 ? p : p.parentNode) || a == p && c == m;
7228
7228
  try {
7229
- l.collapse(d, u), a && (a != d || c != u) && l.extend && l.extend(a, c);
7229
+ l.collapse(u, d), a && (a != u || c != d) && l.extend && l.extend(a, c);
7230
7230
  } catch {
7231
7231
  }
7232
7232
  return f != null && (l.caretBidiLevel = f), g;
7233
7233
  });
7234
7234
  }
7235
7235
  let ro = null, io = null, so = !1;
7236
- function ju(n, e, t) {
7237
- return ro == e && io == t ? so : (ro = e, io = t, so = t == "up" || t == "down" ? Fu(n, e, t) : Hu(n, e, t));
7236
+ function jd(n, e, t) {
7237
+ return ro == e && io == t ? so : (ro = e, io = t, so = t == "up" || t == "down" ? Fd(n, e, t) : Hd(n, e, t));
7238
7238
  }
7239
7239
  const fe = 0, oo = 1, tt = 2, Te = 3;
7240
7240
  class an {
@@ -7433,12 +7433,12 @@ class an {
7433
7433
  for (let o = r, l = 0; ; l++) {
7434
7434
  let a = this.children[l], c = o + a.size;
7435
7435
  if (i == -1 && e <= c) {
7436
- let d = o + a.border;
7437
- if (e >= d && t <= c - a.border && a.node && a.contentDOM && this.contentDOM.contains(a.contentDOM))
7438
- return a.parseRange(e, t, d);
7436
+ let u = o + a.border;
7437
+ if (e >= u && t <= c - a.border && a.node && a.contentDOM && this.contentDOM.contains(a.contentDOM))
7438
+ return a.parseRange(e, t, u);
7439
7439
  e = o;
7440
- for (let u = l; u > 0; u--) {
7441
- let f = this.children[u - 1];
7440
+ for (let d = l; d > 0; d--) {
7441
+ let f = this.children[d - 1];
7442
7442
  if (f.size && f.dom.parentNode == this.contentDOM && !f.emptyChildAt(1)) {
7443
7443
  i = Y(f.dom) + 1;
7444
7444
  break;
@@ -7449,13 +7449,13 @@ class an {
7449
7449
  }
7450
7450
  if (i > -1 && (c > t || l == this.children.length - 1)) {
7451
7451
  t = c;
7452
- for (let d = l + 1; d < this.children.length; d++) {
7453
- let u = this.children[d];
7454
- if (u.size && u.dom.parentNode == this.contentDOM && !u.emptyChildAt(-1)) {
7455
- s = Y(u.dom);
7452
+ for (let u = l + 1; u < this.children.length; u++) {
7453
+ let d = this.children[u];
7454
+ if (d.size && d.dom.parentNode == this.contentDOM && !d.emptyChildAt(-1)) {
7455
+ s = Y(d.dom);
7456
7456
  break;
7457
7457
  }
7458
- t += u.size;
7458
+ t += d.size;
7459
7459
  }
7460
7460
  s == -1 && (s = this.contentDOM.childNodes.length);
7461
7461
  break;
@@ -7489,12 +7489,12 @@ class an {
7489
7489
  return p.setSelection(e - h - p.border, t - h - p.border, r, i);
7490
7490
  h = m;
7491
7491
  }
7492
- let l = this.domFromPos(e, e ? -1 : 1), a = t == e ? l : this.domFromPos(t, t ? -1 : 1), c = r.getSelection(), d = !1;
7492
+ let l = this.domFromPos(e, e ? -1 : 1), a = t == e ? l : this.domFromPos(t, t ? -1 : 1), c = r.getSelection(), u = !1;
7493
7493
  if ((ye || X) && e == t) {
7494
7494
  let { node: f, offset: h } = l;
7495
7495
  if (f.nodeType == 3) {
7496
- if (d = !!(h && f.nodeValue[h - 1] == `
7497
- `), d && h == f.nodeValue.length)
7496
+ if (u = !!(h && f.nodeValue[h - 1] == `
7497
+ `), u && h == f.nodeValue.length)
7498
7498
  for (let p = f, m; p; p = p.parentNode) {
7499
7499
  if (m = p.nextSibling) {
7500
7500
  m.nodeName == "BR" && (l = a = { node: m.parentNode, offset: Y(m) + 1 });
@@ -7506,24 +7506,24 @@ class an {
7506
7506
  }
7507
7507
  } else {
7508
7508
  let p = f.childNodes[h - 1];
7509
- d = p && (p.nodeName == "BR" || p.contentEditable == "false");
7509
+ u = p && (p.nodeName == "BR" || p.contentEditable == "false");
7510
7510
  }
7511
7511
  }
7512
7512
  if (ye && c.focusNode && c.focusNode != a.node && c.focusNode.nodeType == 1) {
7513
7513
  let f = c.focusNode.childNodes[c.focusOffset];
7514
7514
  f && f.contentEditable == "false" && (i = !0);
7515
7515
  }
7516
- if (!(i || d && X) && ft(l.node, l.offset, c.anchorNode, c.anchorOffset) && ft(a.node, a.offset, c.focusNode, c.focusOffset))
7516
+ if (!(i || u && X) && ft(l.node, l.offset, c.anchorNode, c.anchorOffset) && ft(a.node, a.offset, c.focusNode, c.focusOffset))
7517
7517
  return;
7518
- let u = !1;
7519
- if ((c.extend || e == t) && !d) {
7518
+ let d = !1;
7519
+ if ((c.extend || e == t) && !u) {
7520
7520
  c.collapse(l.node, l.offset);
7521
7521
  try {
7522
- e != t && c.extend(a.node, a.offset), u = !0;
7522
+ e != t && c.extend(a.node, a.offset), d = !0;
7523
7523
  } catch {
7524
7524
  }
7525
7525
  }
7526
- if (!u) {
7526
+ if (!d) {
7527
7527
  if (e > t) {
7528
7528
  let h = l;
7529
7529
  l = a, a = h;
@@ -7609,7 +7609,7 @@ class Xl extends an {
7609
7609
  return this.widget.type.side;
7610
7610
  }
7611
7611
  }
7612
- class Vu extends an {
7612
+ class Vd extends an {
7613
7613
  constructor(e, t, r, i) {
7614
7614
  super(e, [], t, null), this.textDOM = r, this.text = i;
7615
7615
  }
@@ -7675,17 +7675,17 @@ class Ue extends an {
7675
7675
  return o;
7676
7676
  if (a.parent)
7677
7677
  return a.parent.posBeforeChild(a);
7678
- }, r, i), d = c && c.dom, u = c && c.contentDOM;
7678
+ }, r, i), u = c && c.dom, d = c && c.contentDOM;
7679
7679
  if (t.isText) {
7680
- if (!d)
7681
- d = document.createTextNode(t.text);
7682
- else if (d.nodeType != 3)
7680
+ if (!u)
7681
+ u = document.createTextNode(t.text);
7682
+ else if (u.nodeType != 3)
7683
7683
  throw new RangeError("Text must be rendered as a DOM text node");
7684
7684
  } else
7685
- d || ({ dom: d, contentDOM: u } = ve.renderSpec(document, t.type.spec.toDOM(t)));
7686
- !u && !t.isText && d.nodeName != "BR" && (d.hasAttribute("contenteditable") || (d.contentEditable = "false"), t.type.spec.draggable && (d.draggable = !0));
7687
- let f = d;
7688
- return d = ta(d, r, t), c ? a = new qu(e, t, r, i, d, u || null, f, c, s, o + 1) : t.isText ? new yr(e, t, r, i, d, f, s) : new Ue(e, t, r, i, d, u || null, f, s, o + 1);
7685
+ u || ({ dom: u, contentDOM: d } = ve.renderSpec(document, t.type.spec.toDOM(t)));
7686
+ !d && !t.isText && u.nodeName != "BR" && (u.hasAttribute("contenteditable") || (u.contentEditable = "false"), t.type.spec.draggable && (u.draggable = !0));
7687
+ let f = u;
7688
+ return u = ta(u, r, t), c ? a = new qd(e, t, r, i, u, d || null, f, c, s, o + 1) : t.isText ? new yr(e, t, r, i, u, f, s) : new Ue(e, t, r, i, u, d || null, f, s, o + 1);
7689
7689
  }
7690
7690
  parseRule() {
7691
7691
  if (this.node.type.spec.reparseInView)
@@ -7721,24 +7721,24 @@ class Ue extends an {
7721
7721
  // separate step, syncs the DOM inside `this.contentDOM` to
7722
7722
  // `this.children`.
7723
7723
  updateChildren(e, t) {
7724
- let r = this.node.inlineContent, i = t, s = e.composing ? this.localCompositionInfo(e, t) : null, o = s && s.pos > -1 ? s : null, l = s && s.pos < 0, a = new Ku(this, o && o.node, e);
7725
- Gu(this.node, this.innerDeco, (c, d, u) => {
7726
- c.spec.marks ? a.syncToMarks(c.spec.marks, r, e) : c.type.side >= 0 && !u && a.syncToMarks(d == this.node.childCount ? R.none : this.node.child(d).marks, r, e), a.placeWidget(c, e, i);
7727
- }, (c, d, u, f) => {
7724
+ let r = this.node.inlineContent, i = t, s = e.composing ? this.localCompositionInfo(e, t) : null, o = s && s.pos > -1 ? s : null, l = s && s.pos < 0, a = new Kd(this, o && o.node, e);
7725
+ Gd(this.node, this.innerDeco, (c, u, d) => {
7726
+ c.spec.marks ? a.syncToMarks(c.spec.marks, r, e) : c.type.side >= 0 && !d && a.syncToMarks(u == this.node.childCount ? R.none : this.node.child(u).marks, r, e), a.placeWidget(c, e, i);
7727
+ }, (c, u, d, f) => {
7728
7728
  a.syncToMarks(c.marks, r, e);
7729
7729
  let h;
7730
- a.findNodeMatch(c, d, u, f) || l && e.state.selection.from > i && e.state.selection.to < i + c.nodeSize && (h = a.findIndexWithChild(s.node)) > -1 && a.updateNodeAt(c, d, u, h, e) || a.updateNextNode(c, d, u, e, f, i) || a.addNode(c, d, u, e, i), i += c.nodeSize;
7731
- }), a.syncToMarks([], r, e), this.node.isTextblock && a.addTextblockHacks(), a.destroyRest(), (a.changed || this.dirty == tt) && (o && this.protectLocalComposition(e, o), Zl(this.contentDOM, this.children, e), wt && Yu(this.dom));
7730
+ a.findNodeMatch(c, u, d, f) || l && e.state.selection.from > i && e.state.selection.to < i + c.nodeSize && (h = a.findIndexWithChild(s.node)) > -1 && a.updateNodeAt(c, u, d, h, e) || a.updateNextNode(c, u, d, e, f, i) || a.addNode(c, u, d, e, i), i += c.nodeSize;
7731
+ }), a.syncToMarks([], r, e), this.node.isTextblock && a.addTextblockHacks(), a.destroyRest(), (a.changed || this.dirty == tt) && (o && this.protectLocalComposition(e, o), Zl(this.contentDOM, this.children, e), wt && Yd(this.dom));
7732
7732
  }
7733
7733
  localCompositionInfo(e, t) {
7734
7734
  let { from: r, to: i } = e.state.selection;
7735
7735
  if (!(e.state.selection instanceof N) || r < t || i > t + this.node.content.size)
7736
7736
  return null;
7737
- let s = e.domSelectionRange(), o = Xu(s.focusNode, s.focusOffset);
7737
+ let s = e.domSelectionRange(), o = Xd(s.focusNode, s.focusOffset);
7738
7738
  if (!o || !this.dom.contains(o.parentNode))
7739
7739
  return null;
7740
7740
  if (this.node.inlineContent) {
7741
- let l = o.nodeValue, a = Qu(this.node.content, l, r - t, i - t);
7741
+ let l = o.nodeValue, a = Qd(this.node.content, l, r - t, i - t);
7742
7742
  return a < 0 ? null : { node: o, pos: a, text: l };
7743
7743
  } else
7744
7744
  return { node: o, pos: -1, text: "" };
@@ -7754,7 +7754,7 @@ class Ue extends an {
7754
7754
  s.parentNode.removeChild(s.nextSibling);
7755
7755
  s.pmViewDesc && (s.pmViewDesc = void 0);
7756
7756
  }
7757
- let o = new Vu(this, s, t, i);
7757
+ let o = new Vd(this, s, t, i);
7758
7758
  e.input.compositionNodes.push(o), this.children = $i(this.children, r, r + i.length, e, o);
7759
7759
  }
7760
7760
  // If this desc must be updated to match the given node decoration,
@@ -7842,9 +7842,9 @@ class Ql extends an {
7842
7842
  return this.dom.nodeName == "IMG";
7843
7843
  }
7844
7844
  }
7845
- class qu extends Ue {
7846
- constructor(e, t, r, i, s, o, l, a, c, d) {
7847
- super(e, t, r, i, s, o, l, c, d), this.spec = a;
7845
+ class qd extends Ue {
7846
+ constructor(e, t, r, i, s, o, l, a, c, u) {
7847
+ super(e, t, r, i, s, o, l, c, u), this.spec = a;
7848
7848
  }
7849
7849
  // A custom `update` method gets to decide whether the update goes
7850
7850
  // through. If it does, and there's a `contentDOM` node, our logic
@@ -7927,11 +7927,11 @@ function ea(n, e, t, r) {
7927
7927
  let a;
7928
7928
  l && l.nodeName == o.nodeName && i != n && (a = i.parentNode) && a.nodeName.toLowerCase() == o.nodeName || (a = document.createElement(o.nodeName), a.pmIsDeco = !0, a.appendChild(i), l = nt[0]), i = a;
7929
7929
  }
7930
- Wu(i, l || nt[0], o);
7930
+ Wd(i, l || nt[0], o);
7931
7931
  }
7932
7932
  return i;
7933
7933
  }
7934
- function Wu(n, e, t) {
7934
+ function Wd(n, e, t) {
7935
7935
  for (let r in e)
7936
7936
  r != "class" && r != "style" && r != "nodeName" && !(r in t) && n.removeAttribute(r);
7937
7937
  for (let r in t)
@@ -7968,9 +7968,9 @@ function ao(n) {
7968
7968
  let e = n.nextSibling;
7969
7969
  return n.parentNode.removeChild(n), e;
7970
7970
  }
7971
- class Ku {
7971
+ class Kd {
7972
7972
  constructor(e, t, r) {
7973
- this.lock = t, this.view = r, this.index = 0, this.stack = [], this.changed = !1, this.top = e, this.preMatch = Uu(e.node.content, e);
7973
+ this.lock = t, this.view = r, this.index = 0, this.stack = [], this.changed = !1, this.top = e, this.preMatch = Ud(e.node.content, e);
7974
7974
  }
7975
7975
  // Destroy and remove the children between the given indices in
7976
7976
  // `this.top`.
@@ -8058,11 +8058,11 @@ class Ku {
8058
8058
  let c = this.preMatch.matched.get(a);
8059
8059
  if (c != null && c != s)
8060
8060
  return !1;
8061
- let d = a.dom, u, f = this.isLocked(d) && !(e.isText && a.node && a.node.isText && a.nodeDOM.nodeValue == e.text && a.dirty != Te && Bi(t, a.outerDeco));
8061
+ let u = a.dom, d, f = this.isLocked(u) && !(e.isText && a.node && a.node.isText && a.nodeDOM.nodeValue == e.text && a.dirty != Te && Bi(t, a.outerDeco));
8062
8062
  if (!f && a.update(e, t, r, i))
8063
- return this.destroyBetween(this.index, l), a.dom != d && (this.changed = !0), this.index++, !0;
8064
- if (!f && (u = this.recreateWrapper(a, e, t, r, i, o)))
8065
- return this.top.children[this.index] = u, u.contentDOM && (u.dirty = tt, u.updateChildren(i, o + 1), u.dirty = fe), this.changed = !0, this.index++, !0;
8063
+ return this.destroyBetween(this.index, l), a.dom != u && (this.changed = !0), this.index++, !0;
8064
+ if (!f && (d = this.recreateWrapper(a, e, t, r, i, o)))
8065
+ return this.top.children[this.index] = d, d.contentDOM && (d.dirty = tt, d.updateChildren(i, o + 1), d.dirty = fe), this.changed = !0, this.index++, !0;
8066
8066
  break;
8067
8067
  }
8068
8068
  }
@@ -8118,7 +8118,7 @@ class Ku {
8118
8118
  return this.lock && (e == this.lock || e.nodeType == 1 && e.contains(this.lock.parentNode));
8119
8119
  }
8120
8120
  }
8121
- function Uu(n, e) {
8121
+ function Ud(n, e) {
8122
8122
  let t = e, r = t.children.length, i = n.childCount, s = /* @__PURE__ */ new Map(), o = [];
8123
8123
  e:
8124
8124
  for (; i > 0; ) {
@@ -8146,32 +8146,32 @@ function Uu(n, e) {
8146
8146
  }
8147
8147
  return { index: i, matched: s, matches: o.reverse() };
8148
8148
  }
8149
- function Ju(n, e) {
8149
+ function Jd(n, e) {
8150
8150
  return n.type.side - e.type.side;
8151
8151
  }
8152
- function Gu(n, e, t, r) {
8152
+ function Gd(n, e, t, r) {
8153
8153
  let i = e.locals(n), s = 0;
8154
8154
  if (i.length == 0) {
8155
8155
  for (let c = 0; c < n.childCount; c++) {
8156
- let d = n.child(c);
8157
- r(d, i, e.forChild(s, d), c), s += d.nodeSize;
8156
+ let u = n.child(c);
8157
+ r(u, i, e.forChild(s, u), c), s += u.nodeSize;
8158
8158
  }
8159
8159
  return;
8160
8160
  }
8161
8161
  let o = 0, l = [], a = null;
8162
8162
  for (let c = 0; ; ) {
8163
- let d, u;
8163
+ let u, d;
8164
8164
  for (; o < i.length && i[o].to == s; ) {
8165
8165
  let g = i[o++];
8166
- g.widget && (d ? (u || (u = [d])).push(g) : d = g);
8166
+ g.widget && (u ? (d || (d = [u])).push(g) : u = g);
8167
8167
  }
8168
- if (d)
8169
- if (u) {
8170
- u.sort(Ju);
8171
- for (let g = 0; g < u.length; g++)
8172
- t(u[g], c, !!a);
8168
+ if (u)
8169
+ if (d) {
8170
+ d.sort(Jd);
8171
+ for (let g = 0; g < d.length; g++)
8172
+ t(d[g], c, !!a);
8173
8173
  } else
8174
- t(d, c, !!a);
8174
+ t(u, c, !!a);
8175
8175
  let f, h;
8176
8176
  if (a)
8177
8177
  h = -1, f = a, a = null;
@@ -8195,13 +8195,13 @@ function Gu(n, e, t, r) {
8195
8195
  r(f, m, e.forChild(s, f), h), s = p;
8196
8196
  }
8197
8197
  }
8198
- function Yu(n) {
8198
+ function Yd(n) {
8199
8199
  if (n.nodeName == "UL" || n.nodeName == "OL") {
8200
8200
  let e = n.style.cssText;
8201
8201
  n.style.cssText = e + "; list-style: square !important", window.getComputedStyle(n).listStyle, n.style.cssText = e;
8202
8202
  }
8203
8203
  }
8204
- function Xu(n, e) {
8204
+ function Xd(n, e) {
8205
8205
  for (; ; ) {
8206
8206
  if (n.nodeType == 3)
8207
8207
  return n;
@@ -8215,7 +8215,7 @@ function Xu(n, e) {
8215
8215
  return null;
8216
8216
  }
8217
8217
  }
8218
- function Qu(n, e, t, r) {
8218
+ function Qd(n, e, t, r) {
8219
8219
  for (let i = 0, s = 0; i < n.childCount && s <= r; ) {
8220
8220
  let o = n.child(i++), l = s;
8221
8221
  if (s += o.nodeSize, !o.isText)
@@ -8242,8 +8242,8 @@ function Qu(n, e, t, r) {
8242
8242
  function $i(n, e, t, r, i) {
8243
8243
  let s = [];
8244
8244
  for (let o = 0, l = 0; o < n.length; o++) {
8245
- let a = n[o], c = l, d = l += a.size;
8246
- c >= t || d <= e ? s.push(a) : (c < e && s.push(a.slice(0, e - c, r)), i && (s.push(i), i = void 0), d > t && s.push(a.slice(t - c, a.size, r)));
8245
+ let a = n[o], c = l, u = l += a.size;
8246
+ c >= t || u <= e ? s.push(a) : (c < e && s.push(a.slice(0, e - c, r)), i && (s.push(i), i = void 0), u > t && s.push(a.slice(t - c, a.size, r)));
8247
8247
  }
8248
8248
  return s;
8249
8249
  }
@@ -8258,20 +8258,20 @@ function cs(n, e = null) {
8258
8258
  if (gr(t)) {
8259
8259
  for (a = l; i && !i.node; )
8260
8260
  i = i.parent;
8261
- let d = i.node;
8262
- if (i && d.isAtom && C.isSelectable(d) && i.parent && !(d.isInline && Ou(t.focusNode, t.focusOffset, i.dom))) {
8263
- let u = i.posBefore;
8264
- c = new C(o == u ? l : r.resolve(u));
8261
+ let u = i.node;
8262
+ if (i && u.isAtom && C.isSelectable(u) && i.parent && !(u.isInline && Od(t.focusNode, t.focusOffset, i.dom))) {
8263
+ let d = i.posBefore;
8264
+ c = new C(o == d ? l : r.resolve(d));
8265
8265
  }
8266
8266
  } else {
8267
- let d = n.docView.posFromDOM(t.anchorNode, t.anchorOffset, 1);
8268
- if (d < 0)
8267
+ let u = n.docView.posFromDOM(t.anchorNode, t.anchorOffset, 1);
8268
+ if (u < 0)
8269
8269
  return null;
8270
- a = r.resolve(d);
8270
+ a = r.resolve(u);
8271
8271
  }
8272
8272
  if (!c) {
8273
- let d = e == "pointer" || n.state.selection.head < l.pos && !s ? 1 : -1;
8274
- c = ds(n, a, l, d);
8273
+ let u = e == "pointer" || n.state.selection.head < l.pos && !s ? 1 : -1;
8274
+ c = us(n, a, l, u);
8275
8275
  }
8276
8276
  return c;
8277
8277
  }
@@ -8292,30 +8292,30 @@ function Pe(n, e = !1) {
8292
8292
  ef(n);
8293
8293
  else {
8294
8294
  let { anchor: r, head: i } = t, s, o;
8295
- co && !(t instanceof N) && (t.$from.parent.inlineContent || (s = uo(n, t.from)), !t.empty && !t.$from.parent.inlineContent && (o = uo(n, t.to))), n.docView.setSelection(r, i, n.root, e), co && (s && fo(s), o && fo(o)), t.visible ? n.dom.classList.remove("ProseMirror-hideselection") : (n.dom.classList.add("ProseMirror-hideselection"), "onselectionchange" in document && Zu(n));
8295
+ co && !(t instanceof N) && (t.$from.parent.inlineContent || (s = uo(n, t.from)), !t.empty && !t.$from.parent.inlineContent && (o = uo(n, t.to))), n.docView.setSelection(r, i, n.root, e), co && (s && fo(s), o && fo(o)), t.visible ? n.dom.classList.remove("ProseMirror-hideselection") : (n.dom.classList.add("ProseMirror-hideselection"), "onselectionchange" in document && Zd(n));
8296
8296
  }
8297
8297
  n.domObserver.setCurSelection(), n.domObserver.connectSelection();
8298
8298
  }
8299
8299
  }
8300
- const co = X || U && Eu < 63;
8300
+ const co = X || U && Ed < 63;
8301
8301
  function uo(n, e) {
8302
8302
  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;
8303
8303
  if (X && i && i.contentEditable == "false")
8304
- return ui(i);
8304
+ return di(i);
8305
8305
  if ((!i || i.contentEditable == "false") && (!s || s.contentEditable == "false")) {
8306
8306
  if (i)
8307
- return ui(i);
8307
+ return di(i);
8308
8308
  if (s)
8309
- return ui(s);
8309
+ return di(s);
8310
8310
  }
8311
8311
  }
8312
- function ui(n) {
8312
+ function di(n) {
8313
8313
  return n.contentEditable = "true", X && n.draggable && (n.draggable = !1, n.wasDraggable = !0), n;
8314
8314
  }
8315
8315
  function fo(n) {
8316
8316
  n.contentEditable = "false", n.wasDraggable && (n.draggable = !0, n.wasDraggable = null);
8317
8317
  }
8318
- function Zu(n) {
8318
+ function Zd(n) {
8319
8319
  let e = n.dom.ownerDocument;
8320
8320
  e.removeEventListener("selectionchange", n.input.hideSelectionGuard);
8321
8321
  let t = n.domSelectionRange(), r = t.anchorNode, i = t.anchorOffset;
@@ -8339,7 +8339,7 @@ function ra(n, e) {
8339
8339
  function ho(n) {
8340
8340
  n.lastSelectedViewDesc && (n.lastSelectedViewDesc.parent && n.lastSelectedViewDesc.deselectNode(), n.lastSelectedViewDesc = void 0);
8341
8341
  }
8342
- function ds(n, e, t, r) {
8342
+ function us(n, e, t, r) {
8343
8343
  return n.someProp("createSelectionBetween", (i) => i(n, e, t)) || N.between(e, t, r);
8344
8344
  }
8345
8345
  function po(n) {
@@ -8379,7 +8379,7 @@ function mo(n, e, t) {
8379
8379
  if (n.endOfTextblock(e > 0 ? "forward" : "backward")) {
8380
8380
  let i = Fi(n.state, e);
8381
8381
  return i && i instanceof C ? Fe(n, i) : !1;
8382
- } else if (!(ue && t.indexOf("m") > -1)) {
8382
+ } else if (!(de && t.indexOf("m") > -1)) {
8383
8383
  let i = r.$head, s = i.textOffset ? null : e < 0 ? i.nodeBefore : i.nodeAfter, o;
8384
8384
  if (!s || s.isText)
8385
8385
  return !1;
@@ -8522,7 +8522,7 @@ function zi(n, e, t) {
8522
8522
  }
8523
8523
  function go(n, e) {
8524
8524
  let t = n.state.doc.resolve(e);
8525
- if (!(U || Tu) && t.parent.inlineContent) {
8525
+ if (!(U || Td) && t.parent.inlineContent) {
8526
8526
  let i = n.coordsAtPos(e);
8527
8527
  if (e > t.start()) {
8528
8528
  let s = n.coordsAtPos(e - 1), o = (s.top + s.bottom) / 2;
@@ -8539,7 +8539,7 @@ function go(n, e) {
8539
8539
  }
8540
8540
  function yo(n, e, t) {
8541
8541
  let r = n.state.selection;
8542
- if (r instanceof N && !r.empty || t.indexOf("s") > -1 || ue && t.indexOf("m") > -1)
8542
+ if (r instanceof N && !r.empty || t.indexOf("s") > -1 || de && t.indexOf("m") > -1)
8543
8543
  return !1;
8544
8544
  let { $from: i, $to: s } = r;
8545
8545
  if (!i.parent.inlineContent || n.endOfTextblock(e < 0 ? "up" : "down")) {
@@ -8589,24 +8589,24 @@ function af(n) {
8589
8589
  }
8590
8590
  function cf(n, e) {
8591
8591
  let t = e.keyCode, r = af(e);
8592
- if (t == 8 || ue && t == 72 && r == "c")
8592
+ if (t == 8 || de && t == 72 && r == "c")
8593
8593
  return bo(n, -1) || gt(n, -1);
8594
- if (t == 46 && !e.shiftKey || ue && t == 68 && r == "c")
8594
+ if (t == 46 && !e.shiftKey || de && t == 68 && r == "c")
8595
8595
  return bo(n, 1) || gt(n, 1);
8596
8596
  if (t == 13 || t == 27)
8597
8597
  return !0;
8598
- if (t == 37 || ue && t == 66 && r == "c") {
8598
+ if (t == 37 || de && t == 66 && r == "c") {
8599
8599
  let i = t == 37 ? go(n, n.state.selection.from) == "ltr" ? -1 : 1 : -1;
8600
8600
  return mo(n, i, r) || gt(n, i);
8601
- } else if (t == 39 || ue && t == 70 && r == "c") {
8601
+ } else if (t == 39 || de && t == 70 && r == "c") {
8602
8602
  let i = t == 39 ? go(n, n.state.selection.from) == "ltr" ? 1 : -1 : 1;
8603
8603
  return mo(n, i, r) || gt(n, i);
8604
8604
  } else {
8605
- if (t == 38 || ue && t == 80 && r == "c")
8605
+ if (t == 38 || de && t == 80 && r == "c")
8606
8606
  return yo(n, -1, r) || gt(n, -1);
8607
- if (t == 40 || ue && t == 78 && r == "c")
8607
+ if (t == 40 || de && t == 78 && r == "c")
8608
8608
  return lf(n) || yo(n, 1, r) || gt(n, 1);
8609
- if (r == (ue ? "m" : "c") && (t == 66 || t == 73 || t == 89 || t == 90))
8609
+ if (r == (de ? "m" : "c") && (t == 66 || t == 73 || t == 89 || t == 90))
8610
8610
  return !0;
8611
8611
  }
8612
8612
  return !1;
@@ -8623,17 +8623,17 @@ function oa(n, e) {
8623
8623
  }
8624
8624
  let o = n.someProp("clipboardSerializer") || ve.fromSchema(n.state.schema), l = fa(), a = l.createElement("div");
8625
8625
  a.appendChild(o.serializeFragment(r, { document: l }));
8626
- let c = a.firstChild, d, u = 0;
8627
- for (; c && c.nodeType == 1 && (d = ua[c.nodeName.toLowerCase()]); ) {
8628
- for (let h = d.length - 1; h >= 0; h--) {
8629
- let p = l.createElement(d[h]);
8626
+ let c = a.firstChild, u, d = 0;
8627
+ for (; c && c.nodeType == 1 && (u = da[c.nodeName.toLowerCase()]); ) {
8628
+ for (let h = u.length - 1; h >= 0; h--) {
8629
+ let p = l.createElement(u[h]);
8630
8630
  for (; a.firstChild; )
8631
8631
  p.appendChild(a.firstChild);
8632
- a.appendChild(p), u++;
8632
+ a.appendChild(p), d++;
8633
8633
  }
8634
8634
  c = a.firstChild;
8635
8635
  }
8636
- c && c.nodeType == 1 && c.setAttribute("data-pm-slice", `${i} ${s}${u ? ` -${u}` : ""} ${JSON.stringify(t)}`);
8636
+ c && c.nodeType == 1 && c.setAttribute("data-pm-slice", `${i} ${s}${d ? ` -${d}` : ""} ${JSON.stringify(t)}`);
8637
8637
  let f = n.someProp("clipboardTextSerializer", (h) => h(e, n)) || e.content.textBetween(0, e.content.size, `
8638
8638
 
8639
8639
  `);
@@ -8650,9 +8650,9 @@ function la(n, e, t, r, i) {
8650
8650
  }), s)
8651
8651
  return e ? new S(b.from(n.state.schema.text(e.replace(/\r\n?/g, `
8652
8652
  `))), 0, 0) : S.empty;
8653
- let u = n.someProp("clipboardTextParser", (f) => f(e, i, r, n));
8654
- if (u)
8655
- l = u;
8653
+ let d = n.someProp("clipboardTextParser", (f) => f(e, i, r, n));
8654
+ if (d)
8655
+ l = d;
8656
8656
  else {
8657
8657
  let f = i.marks(), { schema: h } = n.state, p = ve.fromSchema(h);
8658
8658
  o = document.createElement("div"), e.split(/(?:\r\n?|\n)+/).forEach((m) => {
@@ -8661,12 +8661,12 @@ function la(n, e, t, r, i) {
8661
8661
  });
8662
8662
  }
8663
8663
  } else
8664
- n.someProp("transformPastedHTML", (u) => {
8665
- t = u(t, n);
8664
+ n.someProp("transformPastedHTML", (d) => {
8665
+ t = d(t, n);
8666
8666
  }), o = ff(t), ln && hf(o);
8667
- let c = o && o.querySelector("[data-pm-slice]"), d = c && /^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice") || "");
8668
- if (d && d[3])
8669
- for (let u = +d[3]; u > 0; u--) {
8667
+ let c = o && o.querySelector("[data-pm-slice]"), u = c && /^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice") || "");
8668
+ if (u && u[3])
8669
+ for (let d = +u[3]; d > 0; d--) {
8670
8670
  let f = o.firstChild;
8671
8671
  for (; f && f.nodeType != 1; )
8672
8672
  f = f.nextSibling;
@@ -8675,27 +8675,27 @@ function la(n, e, t, r, i) {
8675
8675
  o = f;
8676
8676
  }
8677
8677
  if (l || (l = (n.someProp("clipboardParser") || n.someProp("domParser") || ts.fromSchema(n.state.schema)).parseSlice(o, {
8678
- preserveWhitespace: !!(a || d),
8678
+ preserveWhitespace: !!(a || u),
8679
8679
  context: i,
8680
8680
  ruleFromNode(f) {
8681
- return f.nodeName == "BR" && !f.nextSibling && f.parentNode && !df.test(f.parentNode.nodeName) ? { ignore: !0 } : null;
8681
+ return f.nodeName == "BR" && !f.nextSibling && f.parentNode && !uf.test(f.parentNode.nodeName) ? { ignore: !0 } : null;
8682
8682
  }
8683
- })), d)
8684
- l = pf(So(l, +d[1], +d[2]), d[4]);
8685
- else if (l = S.maxOpen(uf(l.content, i), !0), l.openStart || l.openEnd) {
8686
- let u = 0, f = 0;
8687
- for (let h = l.content.firstChild; u < l.openStart && !h.type.spec.isolating; u++, h = h.firstChild)
8683
+ })), u)
8684
+ l = pf(So(l, +u[1], +u[2]), u[4]);
8685
+ else if (l = S.maxOpen(df(l.content, i), !0), l.openStart || l.openEnd) {
8686
+ let d = 0, f = 0;
8687
+ for (let h = l.content.firstChild; d < l.openStart && !h.type.spec.isolating; d++, h = h.firstChild)
8688
8688
  ;
8689
8689
  for (let h = l.content.lastChild; f < l.openEnd && !h.type.spec.isolating; f++, h = h.lastChild)
8690
8690
  ;
8691
- l = So(l, u, f);
8691
+ l = So(l, d, f);
8692
8692
  }
8693
- return n.someProp("transformPasted", (u) => {
8694
- l = u(l, n);
8693
+ return n.someProp("transformPasted", (d) => {
8694
+ l = d(l, n);
8695
8695
  }), l;
8696
8696
  }
8697
- const df = /^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;
8698
- function uf(n, e) {
8697
+ const uf = /^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;
8698
+ function df(n, e) {
8699
8699
  if (n.childCount < 2)
8700
8700
  return n;
8701
8701
  for (let t = e.depth; t >= 0; t--) {
@@ -8709,9 +8709,9 @@ function uf(n, e) {
8709
8709
  if (c = o.length && s.length && ca(a, s, l, o[o.length - 1], 0))
8710
8710
  o[o.length - 1] = c;
8711
8711
  else {
8712
- o.length && (o[o.length - 1] = da(o[o.length - 1], s.length));
8713
- let d = aa(l, a);
8714
- o.push(d), i = i.matchType(d.type), s = a;
8712
+ o.length && (o[o.length - 1] = ua(o[o.length - 1], s.length));
8713
+ let u = aa(l, a);
8714
+ o.push(u), i = i.matchType(u.type), s = a;
8715
8715
  }
8716
8716
  }), o)
8717
8717
  return b.from(o);
@@ -8732,10 +8732,10 @@ function ca(n, e, t, r, i) {
8732
8732
  return r.copy(r.content.append(b.from(aa(t, n, i + 1))));
8733
8733
  }
8734
8734
  }
8735
- function da(n, e) {
8735
+ function ua(n, e) {
8736
8736
  if (e == 0)
8737
8737
  return n;
8738
- let t = n.content.replaceChild(n.childCount - 1, da(n.lastChild, e - 1)), r = n.contentMatchAt(n.childCount).fillBefore(b.empty, !0);
8738
+ let t = n.content.replaceChild(n.childCount - 1, ua(n.lastChild, e - 1)), r = n.contentMatchAt(n.childCount).fillBefore(b.empty, !0);
8739
8739
  return n.copy(t.append(r));
8740
8740
  }
8741
8741
  function Hi(n, e, t, r, i, s) {
@@ -8745,7 +8745,7 @@ function Hi(n, e, t, r, i, s) {
8745
8745
  function So(n, e, t) {
8746
8746
  return e < n.openStart && (n = new S(Hi(n.content, -1, e, n.openStart, 0, n.openEnd), e, n.openEnd)), t < n.openEnd && (n = new S(Hi(n.content, 1, t, n.openEnd, 0, 0), n.openStart, t)), n;
8747
8747
  }
8748
- const ua = {
8748
+ const da = {
8749
8749
  thead: ["table"],
8750
8750
  tbody: ["table"],
8751
8751
  tfoot: ["table"],
@@ -8764,7 +8764,7 @@ function ff(n) {
8764
8764
  let e = /^(\s*<meta [^>]*>)*/.exec(n);
8765
8765
  e && (n = n.slice(e[0].length));
8766
8766
  let t = fa().createElement("div"), r = /<([a-z][^>\s]+)/i.exec(n), i;
8767
- if ((i = r && ua[r[1].toLowerCase()]) && (n = i.map((s) => "<" + s + ">").join("") + n + i.map((s) => "</" + s + ">").reverse().join("")), t.innerHTML = n, i)
8767
+ if ((i = r && da[r[1].toLowerCase()]) && (n = i.map((s) => "<" + s + ">").join("") + n + i.map((s) => "</" + s + ">").reverse().join("")), t.innerHTML = n, i)
8768
8768
  for (let s = 0; s < i.length; s++)
8769
8769
  t = t.querySelector(i[s]) || t;
8770
8770
  return t;
@@ -8804,7 +8804,7 @@ function yf(n) {
8804
8804
  for (let e in Q) {
8805
8805
  let t = Q[e];
8806
8806
  n.dom.addEventListener(e, n.input.eventHandlers[e] = (r) => {
8807
- kf(n, r) && !us(n, r) && (n.editable || !(r.type in Z)) && t(n, r);
8807
+ kf(n, r) && !ds(n, r) && (n.editable || !(r.type in Z)) && t(n, r);
8808
8808
  }, mf[e] ? { passive: !0 } : void 0);
8809
8809
  }
8810
8810
  X && n.dom.addEventListener("input", () => null), ji(n);
@@ -8821,10 +8821,10 @@ function bf(n) {
8821
8821
  function ji(n) {
8822
8822
  n.someProp("handleDOMEvents", (e) => {
8823
8823
  for (let t in e)
8824
- n.input.eventHandlers[t] || n.dom.addEventListener(t, n.input.eventHandlers[t] = (r) => us(n, r));
8824
+ n.input.eventHandlers[t] || n.dom.addEventListener(t, n.input.eventHandlers[t] = (r) => ds(n, r));
8825
8825
  });
8826
8826
  }
8827
- function us(n, e) {
8827
+ function ds(n, e) {
8828
8828
  return n.someProp("handleDOMEvents", (t) => {
8829
8829
  let r = t[e.type];
8830
8830
  return r ? r(n, e) || e.defaultPrevented : !1;
@@ -8841,7 +8841,7 @@ function kf(n, e) {
8841
8841
  return !0;
8842
8842
  }
8843
8843
  function Sf(n, e) {
8844
- !us(n, e) && Q[e.type] && (n.editable || !(e.type in Z)) && Q[e.type](n, e);
8844
+ !ds(n, e) && Q[e.type] && (n.editable || !(e.type in Z)) && Q[e.type](n, e);
8845
8845
  }
8846
8846
  Z.keydown = (n, e) => {
8847
8847
  let t = e;
@@ -8859,7 +8859,7 @@ Z.keyup = (n, e) => {
8859
8859
  };
8860
8860
  Z.keypress = (n, e) => {
8861
8861
  let t = e;
8862
- if (pa(n, t) || !t.charCode || t.ctrlKey && !t.altKey || ue && t.metaKey)
8862
+ if (pa(n, t) || !t.charCode || t.ctrlKey && !t.altKey || de && t.metaKey)
8863
8863
  return;
8864
8864
  if (n.someProp("handleKeyPress", (i) => i(n, t))) {
8865
8865
  t.preventDefault();
@@ -8943,7 +8943,7 @@ function Mf(n, e, t) {
8943
8943
  function hs(n) {
8944
8944
  return Dn(n);
8945
8945
  }
8946
- const ha = ue ? "metaKey" : "ctrlKey";
8946
+ const ha = de ? "metaKey" : "ctrlKey";
8947
8947
  Q.mousedown = (n, e) => {
8948
8948
  let t = e;
8949
8949
  n.input.shiftKey = t.shiftKey;
@@ -8959,8 +8959,8 @@ class wf {
8959
8959
  if (t.inside > -1)
8960
8960
  s = e.state.doc.nodeAt(t.inside), o = t.inside;
8961
8961
  else {
8962
- let d = e.state.doc.resolve(t.pos);
8963
- s = d.parent, o = d.depth ? d.before() : 0;
8962
+ let u = e.state.doc.resolve(t.pos);
8963
+ s = u.parent, o = u.depth ? u.before() : 0;
8964
8964
  }
8965
8965
  const l = i ? null : r.target, a = l ? e.docView.nearestDesc(l, !0) : null;
8966
8966
  this.target = a ? a.dom : null;
@@ -9065,7 +9065,7 @@ function Pf(n, e) {
9065
9065
  t.parentNode && t.parentNode.removeChild(t), n.focus();
9066
9066
  }, 50);
9067
9067
  }
9068
- const Qt = ie && Ke < 15 || wt && Mu < 604;
9068
+ const Qt = ie && Ke < 15 || wt && Md < 604;
9069
9069
  Q.copy = Z.cut = (n, e) => {
9070
9070
  let t = e, r = n.state.selection, i = t.type == "cut";
9071
9071
  if (r.empty)
@@ -9114,7 +9114,7 @@ class Rf {
9114
9114
  this.slice = e, this.move = t;
9115
9115
  }
9116
9116
  }
9117
- const ba = ue ? "altKey" : "ctrlKey";
9117
+ const ba = de ? "altKey" : "ctrlKey";
9118
9118
  Q.dragstart = (n, e) => {
9119
9119
  let t = e, r = n.input.mouseDown;
9120
9120
  if (r && r.done(), !t.dataTransfer)
@@ -9157,19 +9157,19 @@ Z.drop = (n, e) => {
9157
9157
  if (!o)
9158
9158
  return;
9159
9159
  t.preventDefault();
9160
- let a = o ? du(n.state.doc, s.pos, o) : s.pos;
9160
+ let a = o ? ud(n.state.doc, s.pos, o) : s.pos;
9161
9161
  a == null && (a = s.pos);
9162
9162
  let c = n.state.tr;
9163
9163
  l && c.deleteSelection();
9164
- let d = c.mapping.map(a), u = o.openStart == 0 && o.openEnd == 0 && o.content.childCount == 1, f = c.doc;
9165
- if (u ? c.replaceRangeWith(d, d, o.content.firstChild) : c.replaceRange(d, d, o), c.doc.eq(f))
9164
+ let u = c.mapping.map(a), d = o.openStart == 0 && o.openEnd == 0 && o.content.childCount == 1, f = c.doc;
9165
+ if (d ? c.replaceRangeWith(u, u, o.content.firstChild) : c.replaceRange(u, u, o), c.doc.eq(f))
9166
9166
  return;
9167
- let h = c.doc.resolve(d);
9168
- if (u && C.isSelectable(o.content.firstChild) && h.nodeAfter && h.nodeAfter.sameMarkup(o.content.firstChild))
9167
+ let h = c.doc.resolve(u);
9168
+ if (d && C.isSelectable(o.content.firstChild) && h.nodeAfter && h.nodeAfter.sameMarkup(o.content.firstChild))
9169
9169
  c.setSelection(new C(h));
9170
9170
  else {
9171
9171
  let p = c.mapping.map(a);
9172
- c.mapping.maps[c.mapping.maps.length - 1].forEach((m, g, y, O) => p = O), c.setSelection(ds(n, h, c.doc.resolve(p)));
9172
+ c.mapping.maps[c.mapping.maps.length - 1].forEach((m, g, y, O) => p = O), c.setSelection(us(n, h, c.doc.resolve(p)));
9173
9173
  }
9174
9174
  n.focus(), n.dispatch(c.setMeta("uiEvent", "drop"));
9175
9175
  };
@@ -9406,11 +9406,11 @@ class $ {
9406
9406
  addInner(e, t, r) {
9407
9407
  let i, s = 0;
9408
9408
  e.forEach((l, a) => {
9409
- let c = a + r, d;
9410
- if (d = Sa(t, l, c)) {
9409
+ let c = a + r, u;
9410
+ if (u = Sa(t, l, c)) {
9411
9411
  for (i || (i = this.children.slice()); s < i.length && i[s] < a; )
9412
9412
  s += 3;
9413
- i[s] == a ? i[s + 2] = i[s + 2].addInner(l, d, c + 1) : i.splice(s, 0, a, a + l.nodeSize, Rn(d, l, c + 1, at)), s += 3;
9413
+ i[s] == a ? i[s + 2] = i[s + 2].addInner(l, u, c + 1) : i.splice(s, 0, a, a + l.nodeSize, Rn(u, l, c + 1, at)), s += 3;
9414
9414
  }
9415
9415
  });
9416
9416
  let o = ka(s ? xa(t) : t, -r);
@@ -9429,8 +9429,8 @@ class $ {
9429
9429
  let r = this.children, i = this.local;
9430
9430
  for (let s = 0; s < r.length; s += 3) {
9431
9431
  let o, l = r[s] + t, a = r[s + 1] + t;
9432
- for (let d = 0, u; d < e.length; d++)
9433
- (u = e[d]) && u.from > l && u.to < a && (e[d] = null, (o || (o = [])).push(u));
9432
+ for (let u = 0, d; u < e.length; u++)
9433
+ (d = e[u]) && d.from > l && d.to < a && (e[u] = null, (o || (o = [])).push(d));
9434
9434
  if (!o)
9435
9435
  continue;
9436
9436
  r == this.children && (r = this.children.slice());
@@ -9463,8 +9463,8 @@ class $ {
9463
9463
  for (let l = 0; l < this.local.length; l++) {
9464
9464
  let a = this.local[l];
9465
9465
  if (a.from < o && a.to > s && a.type instanceof Je) {
9466
- let c = Math.max(s, a.from) - s, d = Math.min(o, a.to) - s;
9467
- c < d && (i || (i = [])).push(a.copy(c, d));
9466
+ let c = Math.max(s, a.from) - s, u = Math.min(o, a.to) - s;
9467
+ c < u && (i || (i = [])).push(a.copy(c, u));
9468
9468
  }
9469
9469
  }
9470
9470
  if (i) {
@@ -9568,19 +9568,19 @@ class He {
9568
9568
  }
9569
9569
  function _f(n, e, t, r, i, s, o) {
9570
9570
  let l = n.slice();
9571
- for (let c = 0, d = s; c < t.maps.length; c++) {
9572
- let u = 0;
9571
+ for (let c = 0, u = s; c < t.maps.length; c++) {
9572
+ let d = 0;
9573
9573
  t.maps[c].forEach((f, h, p, m) => {
9574
9574
  let g = m - p - (h - f);
9575
9575
  for (let y = 0; y < l.length; y += 3) {
9576
9576
  let O = l[y + 1];
9577
- if (O < 0 || f > O + d - u)
9577
+ if (O < 0 || f > O + u - d)
9578
9578
  continue;
9579
- let E = l[y] + d - u;
9579
+ let E = l[y] + u - d;
9580
9580
  h >= E ? l[y + 1] = f <= E ? -2 : -1 : p >= i && g && (l[y] += g, l[y + 1] += g);
9581
9581
  }
9582
- u += g;
9583
- }), d = t.maps[c].map(d, -1);
9582
+ d += g;
9583
+ }), u = t.maps[c].map(u, -1);
9584
9584
  }
9585
9585
  let a = !1;
9586
9586
  for (let c = 0; c < l.length; c += 3)
@@ -9589,28 +9589,28 @@ function _f(n, e, t, r, i, s, o) {
9589
9589
  a = !0, l[c + 1] = -1;
9590
9590
  continue;
9591
9591
  }
9592
- let d = t.map(n[c] + s), u = d - i;
9593
- if (u < 0 || u >= r.content.size) {
9592
+ let u = t.map(n[c] + s), d = u - i;
9593
+ if (d < 0 || d >= r.content.size) {
9594
9594
  a = !0;
9595
9595
  continue;
9596
9596
  }
9597
- let f = t.map(n[c + 1] + s, -1), h = f - i, { index: p, offset: m } = r.content.findIndex(u), g = r.maybeChild(p);
9598
- if (g && m == u && m + g.nodeSize == h) {
9599
- let y = l[c + 2].mapInner(t, g, d + 1, n[c] + s + 1, o);
9600
- y != K ? (l[c] = u, l[c + 1] = h, l[c + 2] = y) : (l[c + 1] = -2, a = !0);
9597
+ let f = t.map(n[c + 1] + s, -1), h = f - i, { index: p, offset: m } = r.content.findIndex(d), g = r.maybeChild(p);
9598
+ if (g && m == d && m + g.nodeSize == h) {
9599
+ let y = l[c + 2].mapInner(t, g, u + 1, n[c] + s + 1, o);
9600
+ y != K ? (l[c] = d, l[c + 1] = h, l[c + 2] = y) : (l[c + 1] = -2, a = !0);
9601
9601
  } else
9602
9602
  a = !0;
9603
9603
  }
9604
9604
  if (a) {
9605
- let c = Lf(l, n, e, t, i, s, o), d = Rn(c, r, 0, o);
9606
- e = d.local;
9607
- for (let u = 0; u < l.length; u += 3)
9608
- l[u + 1] < 0 && (l.splice(u, 3), u -= 3);
9609
- for (let u = 0, f = 0; u < d.children.length; u += 3) {
9610
- let h = d.children[u];
9605
+ let c = Lf(l, n, e, t, i, s, o), u = Rn(c, r, 0, o);
9606
+ e = u.local;
9607
+ for (let d = 0; d < l.length; d += 3)
9608
+ l[d + 1] < 0 && (l.splice(d, 3), d -= 3);
9609
+ for (let d = 0, f = 0; d < u.children.length; d += 3) {
9610
+ let h = u.children[d];
9611
9611
  for (; f < l.length && l[f] < h; )
9612
9612
  f += 3;
9613
- l.splice(f, 0, d.children[u], d.children[u + 1], d.children[u + 2]);
9613
+ l.splice(f, 0, u.children[d], u.children[d + 1], u.children[d + 2]);
9614
9614
  }
9615
9615
  }
9616
9616
  return new $(e.sort(ct), l);
@@ -9627,12 +9627,12 @@ function ka(n, e) {
9627
9627
  }
9628
9628
  function Lf(n, e, t, r, i, s, o) {
9629
9629
  function l(a, c) {
9630
- for (let d = 0; d < a.local.length; d++) {
9631
- let u = a.local[d].map(r, i, c);
9632
- u ? t.push(u) : o.onRemove && o.onRemove(a.local[d].spec);
9630
+ for (let u = 0; u < a.local.length; u++) {
9631
+ let d = a.local[u].map(r, i, c);
9632
+ d ? t.push(d) : o.onRemove && o.onRemove(a.local[u].spec);
9633
9633
  }
9634
- for (let d = 0; d < a.children.length; d += 3)
9635
- l(a.children[d + 2], a.children[d] + c + 1);
9634
+ for (let u = 0; u < a.children.length; u += 3)
9635
+ l(a.children[u + 2], a.children[u] + c + 1);
9636
9636
  }
9637
9637
  for (let a = 0; a < n.length; a += 3)
9638
9638
  n[a + 1] == -1 && l(n[a + 2], e[a] + s + 1);
@@ -9658,8 +9658,8 @@ function Rn(n, e, t, r) {
9658
9658
  let c = Sa(n, l, a + t);
9659
9659
  if (c) {
9660
9660
  s = !0;
9661
- let d = Rn(c, l, t + a + 1, r);
9662
- d != K && i.push(a, a + l.nodeSize, d);
9661
+ let u = Rn(c, l, t + a + 1, r);
9662
+ u != K && i.push(a, a + l.nodeSize, u);
9663
9663
  }
9664
9664
  });
9665
9665
  let o = ka(s ? xa(n) : n, -t).sort(ct);
@@ -9811,15 +9811,15 @@ class zf {
9811
9811
  t.length && (this.queue = []);
9812
9812
  let r = e.domSelectionRange(), i = !this.suppressingSelectionUpdates && !this.currentSelection.eq(r) && po(e) && !this.ignoreSelectionChange(r), s = -1, o = -1, l = !1, a = [];
9813
9813
  if (e.editable)
9814
- for (let d = 0; d < t.length; d++) {
9815
- let u = this.registerMutation(t[d], a);
9816
- u && (s = s < 0 ? u.from : Math.min(u.from, s), o = o < 0 ? u.to : Math.max(u.to, o), u.typeOver && (l = !0));
9814
+ for (let u = 0; u < t.length; u++) {
9815
+ let d = this.registerMutation(t[u], a);
9816
+ d && (s = s < 0 ? d.from : Math.min(d.from, s), o = o < 0 ? d.to : Math.max(d.to, o), d.typeOver && (l = !0));
9817
9817
  }
9818
9818
  if (ye && a.length > 1) {
9819
- let d = a.filter((u) => u.nodeName == "BR");
9820
- if (d.length == 2) {
9821
- let u = d[0], f = d[1];
9822
- u.parentNode && u.parentNode.parentNode == f.parentNode ? f.remove() : u.remove();
9819
+ let u = a.filter((d) => d.nodeName == "BR");
9820
+ if (u.length == 2) {
9821
+ let d = u[0], f = u[1];
9822
+ d.parentNode && d.parentNode.parentNode == f.parentNode ? f.remove() : d.remove();
9823
9823
  }
9824
9824
  }
9825
9825
  let c = null;
@@ -9833,15 +9833,15 @@ class zf {
9833
9833
  e.attributeName == "style" && !e.oldValue && !e.target.getAttribute("style")) || !r || r.ignoreMutation(e))
9834
9834
  return null;
9835
9835
  if (e.type == "childList") {
9836
- for (let d = 0; d < e.addedNodes.length; d++)
9837
- t.push(e.addedNodes[d]);
9836
+ for (let u = 0; u < e.addedNodes.length; u++)
9837
+ t.push(e.addedNodes[u]);
9838
9838
  if (r.contentDOM && r.contentDOM != r.dom && !r.contentDOM.contains(e.target))
9839
9839
  return { from: r.posBefore, to: r.posAfter };
9840
9840
  let i = e.previousSibling, s = e.nextSibling;
9841
9841
  if (ie && Ke <= 11 && e.addedNodes.length)
9842
- for (let d = 0; d < e.addedNodes.length; d++) {
9843
- let { previousSibling: u, nextSibling: f } = e.addedNodes[d];
9844
- (!u || Array.prototype.indexOf.call(e.addedNodes, u) < 0) && (i = u), (!f || Array.prototype.indexOf.call(e.addedNodes, f) < 0) && (s = f);
9842
+ for (let u = 0; u < e.addedNodes.length; u++) {
9843
+ let { previousSibling: d, nextSibling: f } = e.addedNodes[u];
9844
+ (!d || Array.prototype.indexOf.call(e.addedNodes, d) < 0) && (i = d), (!f || Array.prototype.indexOf.call(e.addedNodes, f) < 0) && (s = f);
9845
9845
  }
9846
9846
  let o = i && i.parentNode == e.target ? Y(i) + 1 : 0, l = r.localPosFromDOM(e.target, o, -1), a = s && s.parentNode == e.target ? Y(s) : e.target.childNodes.length, c = r.localPosFromDOM(e.target, a, 1);
9847
9847
  return { from: l, to: c };
@@ -9875,8 +9875,8 @@ function jf(n) {
9875
9875
  return ft(l.node, l.offset, s, o) && ([r, i, s, o] = [s, o, r, i]), { anchorNode: r, anchorOffset: i, focusNode: s, focusOffset: o };
9876
9876
  }
9877
9877
  function Vf(n, e, t) {
9878
- let { node: r, fromOffset: i, toOffset: s, from: o, to: l } = n.docView.parseRange(e, t), a = n.domSelectionRange(), c, d = a.anchorNode;
9879
- if (d && n.dom.contains(d.nodeType == 1 ? d : d.parentNode) && (c = [{ node: d, offset: a.anchorOffset }], gr(a) || c.push({ node: a.focusNode, offset: a.focusOffset })), U && n.input.lastKeyCode === 8)
9878
+ let { node: r, fromOffset: i, toOffset: s, from: o, to: l } = n.docView.parseRange(e, t), a = n.domSelectionRange(), c, u = a.anchorNode;
9879
+ if (u && n.dom.contains(u.nodeType == 1 ? u : u.parentNode) && (c = [{ node: u, offset: a.anchorOffset }], gr(a) || c.push({ node: a.focusNode, offset: a.focusOffset })), U && n.input.lastKeyCode === 8)
9880
9880
  for (let g = s; g > i; g--) {
9881
9881
  let y = r.childNodes[g - 1], O = y.pmViewDesc;
9882
9882
  if (y.nodeName == "BR" && !O) {
@@ -9886,7 +9886,7 @@ function Vf(n, e, t) {
9886
9886
  if (!O || O.size)
9887
9887
  break;
9888
9888
  }
9889
- let u = n.state.doc, f = n.someProp("domParser") || ts.fromSchema(n.state.schema), h = u.resolve(o), p = null, m = f.parse(r, {
9889
+ let d = n.state.doc, f = n.someProp("domParser") || ts.fromSchema(n.state.schema), h = d.resolve(o), p = null, m = f.parse(r, {
9890
9890
  topNode: h.parent,
9891
9891
  topMatch: h.parent.contentMatchAt(h.index()),
9892
9892
  topOpen: !0,
@@ -9932,9 +9932,9 @@ function Kf(n, e, t, r, i) {
9932
9932
  }
9933
9933
  let o = n.state.doc.resolve(e), l = o.sharedDepth(t);
9934
9934
  e = o.before(l + 1), t = n.state.doc.resolve(t).after(l + 1);
9935
- let a = n.state.selection, c = Vf(n, e, t), d = n.state.doc, u = d.slice(c.from, c.to), f, h;
9935
+ let a = n.state.selection, c = Vf(n, e, t), u = n.state.doc, d = u.slice(c.from, c.to), f, h;
9936
9936
  n.input.lastKeyCode === 8 && Date.now() - 100 < n.input.lastKeyCodeTime ? (f = n.state.selection.to, h = "end") : (f = n.state.selection.from, h = "start"), n.input.lastKeyCode = null;
9937
- let p = Gf(u.content, c.doc.content, c.from, f, h);
9937
+ let p = Gf(d.content, c.doc.content, c.from, f, h);
9938
9938
  if ((wt && n.input.lastIOSEnter > Date.now() - 225 || me) && i.some((v) => v.nodeType == 1 && !Wf.test(v.nodeName)) && (!p || p.endA >= p.endB) && n.someProp("handleKeyDown", (v) => v(n, et(13, "Enter")))) {
9939
9939
  n.input.lastIOSEnter = 0;
9940
9940
  return;
@@ -9957,12 +9957,12 @@ function Kf(n, e, t, r, i) {
9957
9957
  c.sel = { anchor: c.sel.anchor + v, head: c.sel.anchor + v };
9958
9958
  }
9959
9959
  n.input.domChangeCount++, n.state.selection.from < n.state.selection.to && p.start == p.endB && n.state.selection instanceof N && (p.start > n.state.selection.from && p.start <= n.state.selection.from + 2 && n.state.selection.from >= c.from ? p.start = n.state.selection.from : p.endA < n.state.selection.to && p.endA >= n.state.selection.to - 2 && n.state.selection.to <= c.to && (p.endB += n.state.selection.to - p.endA, p.endA = n.state.selection.to)), ie && Ke <= 11 && p.endB == p.start + 1 && p.endA == p.start && p.start > c.from && c.doc.textBetween(p.start - c.from - 1, p.start - c.from + 1) == "  " && (p.start--, p.endA--, p.endB--);
9960
- let m = c.doc.resolveNoCache(p.start - c.from), g = c.doc.resolveNoCache(p.endB - c.from), y = d.resolve(p.start), O = m.sameParent(g) && m.parent.inlineContent && y.end() >= p.endA, E;
9960
+ let m = c.doc.resolveNoCache(p.start - c.from), g = c.doc.resolveNoCache(p.endB - c.from), y = u.resolve(p.start), O = m.sameParent(g) && m.parent.inlineContent && y.end() >= p.endA, E;
9961
9961
  if ((wt && n.input.lastIOSEnter > Date.now() - 225 && (!O || i.some((v) => v.nodeName == "DIV" || v.nodeName == "P")) || !O && m.pos < c.doc.content.size && !m.sameParent(g) && (E = A.findFrom(c.doc.resolve(m.pos + 1), 1, !0)) && E.head == g.pos) && n.someProp("handleKeyDown", (v) => v(n, et(13, "Enter")))) {
9962
9962
  n.input.lastIOSEnter = 0;
9963
9963
  return;
9964
9964
  }
9965
- if (n.state.selection.anchor > p.start && Jf(d, p.start, p.endA, m, g) && n.someProp("handleKeyDown", (v) => v(n, et(8, "Backspace")))) {
9965
+ if (n.state.selection.anchor > p.start && Jf(u, p.start, p.endA, m, g) && n.someProp("handleKeyDown", (v) => v(n, et(8, "Backspace")))) {
9966
9966
  me && U && n.domObserver.suppressSelectionUpdates();
9967
9967
  return;
9968
9968
  }
@@ -9974,7 +9974,7 @@ function Kf(n, e, t, r, i) {
9974
9974
  let I = p.start, D = p.endA, T, _, P;
9975
9975
  if (O) {
9976
9976
  if (m.pos == g.pos)
9977
- ie && Ke <= 11 && m.parentOffset == 0 && (n.domObserver.suppressSelectionUpdates(), setTimeout(() => Pe(n), 20)), T = n.state.tr.delete(I, D), _ = d.resolve(p.start).marksAcross(d.resolve(p.endA));
9977
+ ie && Ke <= 11 && m.parentOffset == 0 && (n.domObserver.suppressSelectionUpdates(), setTimeout(() => Pe(n), 20)), T = n.state.tr.delete(I, D), _ = u.resolve(p.start).marksAcross(u.resolve(p.endA));
9978
9978
  else if (
9979
9979
  // Adding or removing a mark
9980
9980
  p.endA == p.endB && (P = Uf(m.parent.content.cut(m.parentOffset, g.parentOffset), y.parent.content.cut(y.parentOffset, p.endA - y.start())))
@@ -9994,23 +9994,23 @@ function Kf(n, e, t, r, i) {
9994
9994
  _ && T.ensureMarks(_), s && T.setMeta("composition", s), n.dispatch(T.scrollIntoView());
9995
9995
  }
9996
9996
  function Eo(n, e, t) {
9997
- return Math.max(t.anchor, t.head) > e.content.size ? null : ds(n, e.resolve(t.anchor), e.resolve(t.head));
9997
+ return Math.max(t.anchor, t.head) > e.content.size ? null : us(n, e.resolve(t.anchor), e.resolve(t.head));
9998
9998
  }
9999
9999
  function Uf(n, e) {
10000
10000
  let t = n.firstChild.marks, r = e.firstChild.marks, i = t, s = r, o, l, a;
10001
- for (let d = 0; d < r.length; d++)
10002
- i = r[d].removeFromSet(i);
10003
- for (let d = 0; d < t.length; d++)
10004
- s = t[d].removeFromSet(s);
10001
+ for (let u = 0; u < r.length; u++)
10002
+ i = r[u].removeFromSet(i);
10003
+ for (let u = 0; u < t.length; u++)
10004
+ s = t[u].removeFromSet(s);
10005
10005
  if (i.length == 1 && s.length == 0)
10006
- l = i[0], o = "add", a = (d) => d.mark(l.addToSet(d.marks));
10006
+ l = i[0], o = "add", a = (u) => u.mark(l.addToSet(u.marks));
10007
10007
  else if (i.length == 0 && s.length == 1)
10008
- l = s[0], o = "remove", a = (d) => d.mark(l.removeFromSet(d.marks));
10008
+ l = s[0], o = "remove", a = (u) => u.mark(l.removeFromSet(u.marks));
10009
10009
  else
10010
10010
  return null;
10011
10011
  let c = [];
10012
- for (let d = 0; d < e.childCount; d++)
10013
- c.push(a(e.child(d)));
10012
+ for (let u = 0; u < e.childCount; u++)
10013
+ c.push(a(e.child(u)));
10014
10014
  if (b.from(c).eq(n))
10015
10015
  return { mark: l, type: o };
10016
10016
  }
@@ -10125,19 +10125,19 @@ class Yf {
10125
10125
  Qf(f, this.nodeViews) && (this.nodeViews = f, i = !0);
10126
10126
  }
10127
10127
  (o || t.handleDOMEvents != this._props.handleDOMEvents) && ji(this), this.editable = wo(this), Mo(this);
10128
- let l = fi(this), a = To(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);
10129
- (d || !e.selection.eq(r.selection)) && (s = !0);
10130
- let u = c == "preserve" && s && this.dom.style.overflowAnchor == null && Nu(this);
10128
+ let l = fi(this), a = To(this), c = r.plugins != e.plugins && !r.doc.eq(e.doc) ? "reset" : e.scrollToSelection > r.scrollToSelection ? "to selection" : "preserve", u = i || !this.docView.matchesNode(e.doc, a, l);
10129
+ (u || !e.selection.eq(r.selection)) && (s = !0);
10130
+ let d = c == "preserve" && s && this.dom.style.overflowAnchor == null && Nd(this);
10131
10131
  if (s) {
10132
10132
  this.domObserver.stop();
10133
- let f = d && (ie || U) && !this.composing && !r.selection.empty && !e.selection.empty && Xf(r.selection, e.selection);
10134
- if (d) {
10133
+ let f = u && (ie || U) && !this.composing && !r.selection.empty && !e.selection.empty && Xf(r.selection, e.selection);
10134
+ if (u) {
10135
10135
  let h = U ? this.trackWrites = this.domSelectionRange().focusNode : null;
10136
10136
  (i || !this.docView.update(e.doc, a, l, this)) && (this.docView.updateOuterDeco([]), this.docView.destroy(), this.docView = lo(e.doc, a, l, this.dom, this)), h && !this.trackWrites && (f = !0);
10137
10137
  }
10138
10138
  f || !(this.input.mouseDown && this.domObserver.currentSelection.eq(this.domSelectionRange()) && tf(this)) ? Pe(this, f) : (ra(this, e.selection), this.domObserver.setCurSelection()), this.domObserver.start();
10139
10139
  }
10140
- this.updatePluginViews(r), c == "reset" ? this.dom.scrollTop = 0 : c == "to selection" ? this.scrollToSelection() : u && Pu(u);
10140
+ this.updatePluginViews(r), c == "reset" ? this.dom.scrollTop = 0 : c == "to selection" ? this.scrollToSelection() : d && Pd(d);
10141
10141
  }
10142
10142
  /**
10143
10143
  @internal
@@ -10213,7 +10213,7 @@ class Yf {
10213
10213
  Focus the editor.
10214
10214
  */
10215
10215
  focus() {
10216
- this.domObserver.stop(), this.editable && Du(this.dom), Pe(this), this.domObserver.start();
10216
+ this.domObserver.stop(), this.editable && Dd(this.dom), Pe(this), this.domObserver.start();
10217
10217
  }
10218
10218
  /**
10219
10219
  Get the document root in which the editor exists. This will
@@ -10247,7 +10247,7 @@ class Yf {
10247
10247
  the top level, not in any node.
10248
10248
  */
10249
10249
  posAtCoords(e) {
10250
- return Bu(this, e);
10250
+ return Bd(this, e);
10251
10251
  }
10252
10252
  /**
10253
10253
  Returns the viewport rectangle at a given document position.
@@ -10312,7 +10312,7 @@ class Yf {
10312
10312
  pass a different state.
10313
10313
  */
10314
10314
  endOfTextblock(e, t) {
10315
- return ju(this, t || this.state, e);
10315
+ return jd(this, t || this.state, e);
10316
10316
  }
10317
10317
  /**
10318
10318
  Run the editor's paste logic with the given HTML string. The
@@ -10366,7 +10366,7 @@ class Yf {
10366
10366
  @internal
10367
10367
  */
10368
10368
  domSelectionRange() {
10369
- return X && this.root.nodeType === 11 && vu(this.dom.ownerDocument) == this.dom ? jf(this) : this.domSelection();
10369
+ return X && this.root.nodeType === 11 && vd(this.dom.ownerDocument) == this.dom ? jf(this) : this.domSelection();
10370
10370
  }
10371
10371
  /**
10372
10372
  @internal
@@ -10604,7 +10604,7 @@ function At(n, e, t = !1) {
10604
10604
  }
10605
10605
  return !1;
10606
10606
  }
10607
- const dh = (n, e, t) => {
10607
+ const uh = (n, e, t) => {
10608
10608
  let { $head: r, empty: i } = n.selection, s = r;
10609
10609
  if (!i)
10610
10610
  return !1;
@@ -10626,12 +10626,12 @@ function Oa(n) {
10626
10626
  }
10627
10627
  return null;
10628
10628
  }
10629
- function uh(n, e) {
10629
+ function dh(n, e) {
10630
10630
  let { $cursor: t } = n.selection;
10631
10631
  return !t || (e ? !e.endOfTextblock("forward", n) : t.parentOffset < t.parent.content.size) ? null : t;
10632
10632
  }
10633
10633
  const fh = (n, e, t) => {
10634
- let r = uh(n, t);
10634
+ let r = dh(n, t);
10635
10635
  if (!r)
10636
10636
  return !1;
10637
10637
  let i = va(r);
@@ -10764,26 +10764,26 @@ function Ea(n, e, t) {
10764
10764
  let l = e.parent.canReplace(e.index(), e.index() + 1);
10765
10765
  if (l && (s = (o = r.contentMatchAt(r.childCount)).findWrapping(i.type)) && o.matchType(s[0] || i.type).validEnd) {
10766
10766
  if (t) {
10767
- let u = e.pos + i.nodeSize, f = b.empty;
10767
+ let d = e.pos + i.nodeSize, f = b.empty;
10768
10768
  for (let m = s.length - 1; m >= 0; m--)
10769
10769
  f = b.from(s[m].create(null, f));
10770
10770
  f = b.from(r.copy(f));
10771
- let h = n.tr.step(new z(e.pos - 1, u, e.pos, u, new S(f, 1, 0), s.length, !0)), p = u + 2 * s.length;
10771
+ let h = n.tr.step(new z(e.pos - 1, d, e.pos, d, new S(f, 1, 0), s.length, !0)), p = d + 2 * s.length;
10772
10772
  Ye(h.doc, p) && h.join(p), t(h.scrollIntoView());
10773
10773
  }
10774
10774
  return !0;
10775
10775
  }
10776
- let a = A.findFrom(e, 1), c = a && a.$from.blockRange(a.$to), d = c && Dt(c);
10777
- if (d != null && d >= e.depth)
10778
- return t && t(n.tr.lift(c, d).scrollIntoView()), !0;
10776
+ let a = A.findFrom(e, 1), c = a && a.$from.blockRange(a.$to), u = c && Dt(c);
10777
+ if (u != null && u >= e.depth)
10778
+ return t && t(n.tr.lift(c, u).scrollIntoView()), !0;
10779
10779
  if (l && At(i, "start", !0) && At(r, "end")) {
10780
- let u = r, f = [];
10781
- for (; f.push(u), !u.isTextblock; )
10782
- u = u.lastChild;
10780
+ let d = r, f = [];
10781
+ for (; f.push(d), !d.isTextblock; )
10782
+ d = d.lastChild;
10783
10783
  let h = i, p = 1;
10784
10784
  for (; !h.isTextblock; h = h.firstChild)
10785
10785
  p++;
10786
- if (u.canReplace(u.childCount, u.childCount, h.content)) {
10786
+ if (d.canReplace(d.childCount, d.childCount, h.content)) {
10787
10787
  if (t) {
10788
10788
  let m = b.empty;
10789
10789
  for (let y = f.length - 1; y >= 0; y--)
@@ -10826,8 +10826,8 @@ function Po(n, e = null) {
10826
10826
  if (a.type == n)
10827
10827
  i = !0;
10828
10828
  else {
10829
- let d = t.doc.resolve(c), u = d.index();
10830
- i = d.parent.canReplaceWith(u, u + 1, n);
10829
+ let u = t.doc.resolve(c), d = u.index();
10830
+ i = u.parent.canReplaceWith(d, d + 1, n);
10831
10831
  }
10832
10832
  });
10833
10833
  }
@@ -10853,8 +10853,8 @@ function Th(n, e = null) {
10853
10853
  if (o.depth >= 2 && i.node(o.depth - 1).type.compatibleContent(n) && o.startIndex == 0) {
10854
10854
  if (i.index(o.depth - 1) == 0)
10855
10855
  return !1;
10856
- let d = t.doc.resolve(o.start - 2);
10857
- a = new Mn(d, d, o.depth), o.endIndex < o.parent.childCount && (o = new Mn(i, t.doc.resolve(s.end(o.depth)), o.depth)), l = !0;
10856
+ let u = t.doc.resolve(o.start - 2);
10857
+ a = new Mn(u, u, o.depth), o.endIndex < o.parent.childCount && (o = new Mn(i, t.doc.resolve(s.end(o.depth)), o.depth)), l = !0;
10858
10858
  }
10859
10859
  let c = rs(a, n, e, o);
10860
10860
  return c ? (r && r(Mh(t.tr, o, c, l, n).scrollIntoView()), !0) : !1;
@@ -10862,15 +10862,15 @@ function Th(n, e = null) {
10862
10862
  }
10863
10863
  function Mh(n, e, t, r, i) {
10864
10864
  let s = b.empty;
10865
- for (let d = t.length - 1; d >= 0; d--)
10866
- s = b.from(t[d].type.create(t[d].attrs, s));
10865
+ for (let u = t.length - 1; u >= 0; u--)
10866
+ s = b.from(t[u].type.create(t[u].attrs, s));
10867
10867
  n.step(new z(e.start - (r ? 2 : 0), e.end, e.start, e.end, new S(s, 0, 0), t.length, !0));
10868
10868
  let o = 0;
10869
- for (let d = 0; d < t.length; d++)
10870
- t[d].type == i && (o = d + 1);
10869
+ for (let u = 0; u < t.length; u++)
10870
+ t[u].type == i && (o = u + 1);
10871
10871
  let l = t.length - o, a = e.start + t.length - (r ? 2 : 0), c = e.parent;
10872
- for (let d = e.startIndex, u = e.endIndex, f = !0; d < u; d++, f = !1)
10873
- !f && vt(n.doc, a, l) && (n.split(a, l), a += 2 * l), a += c.child(d).nodeSize;
10872
+ for (let u = e.startIndex, d = e.endIndex, f = !0; u < d; u++, f = !1)
10873
+ !f && vt(n.doc, a, l) && (n.split(a, l), a += 2 * l), a += c.child(u).nodeSize;
10874
10874
  return n;
10875
10875
  }
10876
10876
  function wh(n) {
@@ -10896,11 +10896,11 @@ function Nh(n, e, t) {
10896
10896
  let s = r.doc.resolve(t.start), o = s.nodeAfter;
10897
10897
  if (r.mapping.map(t.end) != t.start + s.nodeAfter.nodeSize)
10898
10898
  return !1;
10899
- let l = t.startIndex == 0, a = t.endIndex == i.childCount, c = s.node(-1), d = s.index(-1);
10900
- if (!c.canReplace(d + (l ? 0 : 1), d + 1, o.content.append(a ? b.empty : b.from(i))))
10899
+ let l = t.startIndex == 0, a = t.endIndex == i.childCount, c = s.node(-1), u = s.index(-1);
10900
+ if (!c.canReplace(u + (l ? 0 : 1), u + 1, o.content.append(a ? b.empty : b.from(i))))
10901
10901
  return !1;
10902
- let u = s.pos, f = u + o.nodeSize;
10903
- return r.step(new z(u - (l ? 1 : 0), f + (a ? 1 : 0), u + 1, f - 1, new S((l ? b.empty : b.from(i.copy(b.empty))).append(a ? b.empty : b.from(i.copy(b.empty))), l ? 0 : 1, a ? 0 : 1), l ? 0 : 1)), e(r.scrollIntoView()), !0;
10902
+ let d = s.pos, f = d + o.nodeSize;
10903
+ return r.step(new z(d - (l ? 1 : 0), f + (a ? 1 : 0), d + 1, f - 1, new S((l ? b.empty : b.from(i.copy(b.empty))).append(a ? b.empty : b.from(i.copy(b.empty))), l ? 0 : 1, a ? 0 : 1), l ? 0 : 1)), e(r.scrollIntoView()), !0;
10904
10904
  }
10905
10905
  function Ph(n) {
10906
10906
  return function(e, t) {
@@ -10914,8 +10914,8 @@ function Ph(n) {
10914
10914
  if (a.type != n)
10915
10915
  return !1;
10916
10916
  if (t) {
10917
- let c = a.lastChild && a.lastChild.type == l.type, d = b.from(c ? n.create() : null), u = new S(b.from(n.create(null, b.from(l.type.create(null, d)))), c ? 3 : 1, 0), f = s.start, h = s.end;
10918
- t(e.tr.step(new z(f - (c ? 3 : 1), h, f, h, u, 1, !0)).scrollIntoView());
10917
+ let c = a.lastChild && a.lastChild.type == l.type, u = b.from(c ? n.create() : null), d = new S(b.from(n.create(null, b.from(l.type.create(null, u)))), c ? 3 : 1, 0), f = s.start, h = s.end;
10918
+ t(e.tr.step(new z(f - (c ? 3 : 1), h, f, h, d, 1, !0)).scrollIntoView());
10919
10919
  }
10920
10920
  return !0;
10921
10921
  };
@@ -10958,9 +10958,9 @@ class Sr {
10958
10958
  }
10959
10959
  get commands() {
10960
10960
  const { rawCommands: e, editor: t, state: r } = this, { view: i } = t, { tr: s } = r, o = this.buildProps(s);
10961
- return Object.fromEntries(Object.entries(e).map(([l, a]) => [l, (...d) => {
10962
- const u = a(...d)(o);
10963
- return !s.getMeta("preventDispatch") && !this.hasCustomState && i.dispatch(s), u;
10961
+ return Object.fromEntries(Object.entries(e).map(([l, a]) => [l, (...u) => {
10962
+ const d = a(...u)(o);
10963
+ return !s.getMeta("preventDispatch") && !this.hasCustomState && i.dispatch(s), d;
10964
10964
  }]));
10965
10965
  }
10966
10966
  get chain() {
@@ -10970,19 +10970,19 @@ class Sr {
10970
10970
  return () => this.createCan();
10971
10971
  }
10972
10972
  createChain(e, t = !0) {
10973
- const { rawCommands: r, editor: i, state: s } = this, { view: o } = i, l = [], a = !!e, c = e || s.tr, d = () => (!a && t && !c.getMeta("preventDispatch") && !this.hasCustomState && o.dispatch(c), l.every((f) => f === !0)), u = {
10973
+ const { rawCommands: r, editor: i, state: s } = this, { view: o } = i, l = [], a = !!e, c = e || s.tr, u = () => (!a && t && !c.getMeta("preventDispatch") && !this.hasCustomState && o.dispatch(c), l.every((f) => f === !0)), d = {
10974
10974
  ...Object.fromEntries(Object.entries(r).map(([f, h]) => [f, (...m) => {
10975
10975
  const g = this.buildProps(c, t), y = h(...m)(g);
10976
- return l.push(y), u;
10976
+ return l.push(y), d;
10977
10977
  }])),
10978
- run: d
10978
+ run: u
10979
10979
  };
10980
- return u;
10980
+ return d;
10981
10981
  }
10982
10982
  createCan(e) {
10983
10983
  const { rawCommands: t, state: r } = this, i = !1, s = e || r.tr, o = this.buildProps(s, i);
10984
10984
  return {
10985
- ...Object.fromEntries(Object.entries(t).map(([a, c]) => [a, (...d) => c(...d)({ ...o, dispatch: void 0 })])),
10985
+ ...Object.fromEntries(Object.entries(t).map(([a, c]) => [a, (...u) => c(...u)({ ...o, dispatch: void 0 })])),
10986
10986
  chain: () => this.createChain(s, i)
10987
10987
  };
10988
10988
  }
@@ -11002,7 +11002,7 @@ class Sr {
11002
11002
  chain: () => this.createChain(e),
11003
11003
  can: () => this.createCan(e),
11004
11004
  get commands() {
11005
- return Object.fromEntries(Object.entries(r).map(([a, c]) => [a, (...d) => c(...d)(l)]));
11005
+ return Object.fromEntries(Object.entries(r).map(([a, c]) => [a, (...u) => c(...u)(l)]));
11006
11006
  }
11007
11007
  };
11008
11008
  return l;
@@ -11058,11 +11058,11 @@ function Ma(n) {
11058
11058
  }, a = x(o, "addGlobalAttributes", l);
11059
11059
  if (!a)
11060
11060
  return;
11061
- a().forEach((d) => {
11062
- d.types.forEach((u) => {
11063
- Object.entries(d.attributes).forEach(([f, h]) => {
11061
+ a().forEach((u) => {
11062
+ u.types.forEach((d) => {
11063
+ Object.entries(u.attributes).forEach(([f, h]) => {
11064
11064
  e.push({
11065
- type: u,
11065
+ type: d,
11066
11066
  name: f,
11067
11067
  attribute: {
11068
11068
  ...s,
@@ -11081,14 +11081,14 @@ function Ma(n) {
11081
11081
  if (!a)
11082
11082
  return;
11083
11083
  const c = a();
11084
- Object.entries(c).forEach(([d, u]) => {
11084
+ Object.entries(c).forEach(([u, d]) => {
11085
11085
  const f = {
11086
11086
  ...s,
11087
- ...u
11087
+ ...d
11088
11088
  };
11089
11089
  typeof (f == null ? void 0 : f.default) == "function" && (f.default = f.default()), f != null && f.isRequired && (f == null ? void 0 : f.default) === void 0 && delete f.default, e.push({
11090
11090
  type: o.name,
11091
- name: d,
11091
+ name: u,
11092
11092
  attribute: f
11093
11093
  });
11094
11094
  });
@@ -11158,74 +11158,74 @@ function Io(n) {
11158
11158
  function _h(n, e) {
11159
11159
  var t;
11160
11160
  const r = Ma(n), { nodeExtensions: i, markExtensions: s } = xr(n), o = (t = i.find((c) => x(c, "topNode"))) === null || t === void 0 ? void 0 : t.name, l = Object.fromEntries(i.map((c) => {
11161
- const d = r.filter((y) => y.type === c.name), u = {
11161
+ const u = r.filter((y) => y.type === c.name), d = {
11162
11162
  name: c.name,
11163
11163
  options: c.options,
11164
11164
  storage: c.storage,
11165
11165
  editor: e
11166
11166
  }, f = n.reduce((y, O) => {
11167
- const E = x(O, "extendNodeSchema", u);
11167
+ const E = x(O, "extendNodeSchema", d);
11168
11168
  return {
11169
11169
  ...y,
11170
11170
  ...E ? E(c) : {}
11171
11171
  };
11172
11172
  }, {}), h = Io({
11173
11173
  ...f,
11174
- content: w(x(c, "content", u)),
11175
- marks: w(x(c, "marks", u)),
11176
- group: w(x(c, "group", u)),
11177
- inline: w(x(c, "inline", u)),
11178
- atom: w(x(c, "atom", u)),
11179
- selectable: w(x(c, "selectable", u)),
11180
- draggable: w(x(c, "draggable", u)),
11181
- code: w(x(c, "code", u)),
11182
- defining: w(x(c, "defining", u)),
11183
- isolating: w(x(c, "isolating", u)),
11184
- attrs: Object.fromEntries(d.map((y) => {
11174
+ content: w(x(c, "content", d)),
11175
+ marks: w(x(c, "marks", d)),
11176
+ group: w(x(c, "group", d)),
11177
+ inline: w(x(c, "inline", d)),
11178
+ atom: w(x(c, "atom", d)),
11179
+ selectable: w(x(c, "selectable", d)),
11180
+ draggable: w(x(c, "draggable", d)),
11181
+ code: w(x(c, "code", d)),
11182
+ defining: w(x(c, "defining", d)),
11183
+ isolating: w(x(c, "isolating", d)),
11184
+ attrs: Object.fromEntries(u.map((y) => {
11185
11185
  var O;
11186
11186
  return [y.name, { default: (O = y == null ? void 0 : y.attribute) === null || O === void 0 ? void 0 : O.default }];
11187
11187
  }))
11188
- }), p = w(x(c, "parseHTML", u));
11189
- p && (h.parseDOM = p.map((y) => Do(y, d)));
11190
- const m = x(c, "renderHTML", u);
11188
+ }), p = w(x(c, "parseHTML", d));
11189
+ p && (h.parseDOM = p.map((y) => Do(y, u)));
11190
+ const m = x(c, "renderHTML", d);
11191
11191
  m && (h.toDOM = (y) => m({
11192
11192
  node: y,
11193
- HTMLAttributes: Vi(y, d)
11193
+ HTMLAttributes: Vi(y, u)
11194
11194
  }));
11195
- const g = x(c, "renderText", u);
11195
+ const g = x(c, "renderText", d);
11196
11196
  return g && (h.toText = g), [c.name, h];
11197
11197
  })), a = Object.fromEntries(s.map((c) => {
11198
- const d = r.filter((g) => g.type === c.name), u = {
11198
+ const u = r.filter((g) => g.type === c.name), d = {
11199
11199
  name: c.name,
11200
11200
  options: c.options,
11201
11201
  storage: c.storage,
11202
11202
  editor: e
11203
11203
  }, f = n.reduce((g, y) => {
11204
- const O = x(y, "extendMarkSchema", u);
11204
+ const O = x(y, "extendMarkSchema", d);
11205
11205
  return {
11206
11206
  ...g,
11207
11207
  ...O ? O(c) : {}
11208
11208
  };
11209
11209
  }, {}), h = Io({
11210
11210
  ...f,
11211
- inclusive: w(x(c, "inclusive", u)),
11212
- excludes: w(x(c, "excludes", u)),
11213
- group: w(x(c, "group", u)),
11214
- spanning: w(x(c, "spanning", u)),
11215
- code: w(x(c, "code", u)),
11216
- attrs: Object.fromEntries(d.map((g) => {
11211
+ inclusive: w(x(c, "inclusive", d)),
11212
+ excludes: w(x(c, "excludes", d)),
11213
+ group: w(x(c, "group", d)),
11214
+ spanning: w(x(c, "spanning", d)),
11215
+ code: w(x(c, "code", d)),
11216
+ attrs: Object.fromEntries(u.map((g) => {
11217
11217
  var y;
11218
11218
  return [g.name, { default: (y = g == null ? void 0 : g.attribute) === null || y === void 0 ? void 0 : y.default }];
11219
11219
  }))
11220
- }), p = w(x(c, "parseHTML", u));
11221
- p && (h.parseDOM = p.map((g) => Do(g, d)));
11222
- const m = x(c, "renderHTML", u);
11220
+ }), p = w(x(c, "parseHTML", d));
11221
+ p && (h.parseDOM = p.map((g) => Do(g, u)));
11222
+ const m = x(c, "renderHTML", d);
11223
11223
  return m && (h.toDOM = (g) => m({
11224
11224
  mark: g,
11225
- HTMLAttributes: Vi(g, d)
11225
+ HTMLAttributes: Vi(g, u)
11226
11226
  })), [c.name, h];
11227
11227
  }));
11228
- return new Hd({
11228
+ return new Hu({
11229
11229
  topNode: o,
11230
11230
  nodes: l,
11231
11231
  marks: a
@@ -11242,13 +11242,13 @@ const Lh = (n, e = 500) => {
11242
11242
  const r = n.parentOffset;
11243
11243
  return n.parent.nodesBetween(Math.max(0, r - e), r, (i, s, o, l) => {
11244
11244
  var a, c;
11245
- const d = ((c = (a = i.type.spec).toText) === null || c === void 0 ? void 0 : c.call(a, {
11245
+ const u = ((c = (a = i.type.spec).toText) === null || c === void 0 ? void 0 : c.call(a, {
11246
11246
  node: i,
11247
11247
  pos: s,
11248
11248
  parent: o,
11249
11249
  index: l
11250
11250
  })) || i.textContent || "%leaf%";
11251
- t += d.slice(0, Math.max(0, r - s));
11251
+ t += u.slice(0, Math.max(0, r - s));
11252
11252
  }), t;
11253
11253
  };
11254
11254
  function gs(n) {
@@ -11279,12 +11279,12 @@ function yi(n) {
11279
11279
  c.parent.type.spec.code || !((e = c.nodeBefore || c.nodeAfter) === null || e === void 0) && e.marks.find((f) => f.type.spec.code)
11280
11280
  )
11281
11281
  return !1;
11282
- let d = !1;
11283
- const u = Lh(c) + s;
11282
+ let u = !1;
11283
+ const d = Lh(c) + s;
11284
11284
  return o.forEach((f) => {
11285
- if (d)
11285
+ if (u)
11286
11286
  return;
11287
- const h = Bh(u, f.find);
11287
+ const h = Bh(d, f.find);
11288
11288
  if (!h)
11289
11289
  return;
11290
11290
  const p = a.state.tr, m = kr({
@@ -11309,8 +11309,8 @@ function yi(n) {
11309
11309
  from: r,
11310
11310
  to: i,
11311
11311
  text: s
11312
- }), a.dispatch(p), d = !0);
11313
- }), d;
11312
+ }), a.dispatch(p), u = !0);
11313
+ }), u;
11314
11314
  }
11315
11315
  function $h(n) {
11316
11316
  const { editor: e, rules: t } = n, r = new te({
@@ -11391,10 +11391,10 @@ function Hh(n) {
11391
11391
  editor: e,
11392
11392
  state: t
11393
11393
  }), c = [];
11394
- return t.doc.nodesBetween(r, i, (u, f) => {
11395
- if (!u.isTextblock || u.type.spec.code)
11394
+ return t.doc.nodesBetween(r, i, (d, f) => {
11395
+ if (!d.isTextblock || d.type.spec.code)
11396
11396
  return;
11397
- const h = Math.max(r, f), p = Math.min(i, f + u.content.size), m = u.textBetween(h - f, p - f, void 0, "");
11397
+ const h = Math.max(r, f), p = Math.min(i, f + d.content.size), m = d.textBetween(h - f, p - f, void 0, "");
11398
11398
  zh(m, s.find).forEach((y) => {
11399
11399
  if (y.index === void 0)
11400
11400
  return;
@@ -11411,7 +11411,7 @@ function Hh(n) {
11411
11411
  });
11412
11412
  c.push(D);
11413
11413
  });
11414
- }), c.every((u) => u !== null);
11414
+ }), c.every((d) => d !== null);
11415
11415
  }
11416
11416
  function jh(n) {
11417
11417
  const { editor: e, rules: t } = n;
@@ -11419,9 +11419,9 @@ function jh(n) {
11419
11419
  return t.map((l) => new te({
11420
11420
  // we register a global drag handler to track the current drag source element
11421
11421
  view(a) {
11422
- const c = (d) => {
11423
- var u;
11424
- r = !((u = a.dom.parentElement) === null || u === void 0) && u.contains(d.target) ? a.dom.parentElement : null;
11422
+ const c = (u) => {
11423
+ var d;
11424
+ r = !((d = a.dom.parentElement) === null || d === void 0) && d.contains(u.target) ? a.dom.parentElement : null;
11425
11425
  };
11426
11426
  return window.addEventListener("dragstart", c), {
11427
11427
  destroy() {
@@ -11433,21 +11433,21 @@ function jh(n) {
11433
11433
  handleDOMEvents: {
11434
11434
  drop: (a) => (s = r === a.dom.parentElement, !1),
11435
11435
  paste: (a, c) => {
11436
- var d;
11437
- const u = (d = c.clipboardData) === null || d === void 0 ? void 0 : d.getData("text/html");
11438
- return i = !!(u != null && u.includes("data-pm-slice")), !1;
11436
+ var u;
11437
+ const d = (u = c.clipboardData) === null || u === void 0 ? void 0 : u.getData("text/html");
11438
+ return i = !!(d != null && d.includes("data-pm-slice")), !1;
11439
11439
  }
11440
11440
  }
11441
11441
  },
11442
- appendTransaction: (a, c, d) => {
11443
- const u = a[0], f = u.getMeta("uiEvent") === "paste" && !i, h = u.getMeta("uiEvent") === "drop" && !s;
11442
+ appendTransaction: (a, c, u) => {
11443
+ const d = a[0], f = d.getMeta("uiEvent") === "paste" && !i, h = d.getMeta("uiEvent") === "drop" && !s;
11444
11444
  if (!f && !h)
11445
11445
  return;
11446
- const p = c.doc.content.findDiffStart(d.doc.content), m = c.doc.content.findDiffEnd(d.doc.content);
11446
+ const p = c.doc.content.findDiffStart(u.doc.content), m = c.doc.content.findDiffEnd(u.doc.content);
11447
11447
  if (!Fh(p) || !m || p === m.b)
11448
11448
  return;
11449
- const g = d.tr, y = kr({
11450
- state: d,
11449
+ const g = u.tr, y = kr({
11450
+ state: u,
11451
11451
  transaction: g
11452
11452
  });
11453
11453
  if (!(!Hh({
@@ -11486,10 +11486,10 @@ class Ot {
11486
11486
  a && this.editor.on("update", a);
11487
11487
  const c = x(r, "onSelectionUpdate", s);
11488
11488
  c && this.editor.on("selectionUpdate", c);
11489
- const d = x(r, "onTransaction", s);
11490
- d && this.editor.on("transaction", d);
11491
- const u = x(r, "onFocus", s);
11492
- u && this.editor.on("focus", u);
11489
+ const u = x(r, "onTransaction", s);
11490
+ u && this.editor.on("transaction", u);
11491
+ const d = x(r, "onFocus", s);
11492
+ d && this.editor.on("focus", d);
11493
11493
  const f = x(r, "onBlur", s);
11494
11494
  f && this.editor.on("blur", f);
11495
11495
  const h = x(r, "onDestroy", s);
@@ -11540,13 +11540,13 @@ class Ot {
11540
11540
  editor: e,
11541
11541
  type: gi(o.name, this.schema)
11542
11542
  }, a = [], c = x(o, "addKeyboardShortcuts", l);
11543
- let d = {};
11544
- if (o.type === "mark" && o.config.exitable && (d.ArrowRight = () => he.handleExit({ editor: e, mark: o })), c) {
11543
+ let u = {};
11544
+ if (o.type === "mark" && o.config.exitable && (u.ArrowRight = () => he.handleExit({ editor: e, mark: o })), c) {
11545
11545
  const m = Object.fromEntries(Object.entries(c()).map(([g, y]) => [g, () => y({ editor: e })]));
11546
- d = { ...d, ...m };
11546
+ u = { ...u, ...m };
11547
11547
  }
11548
- const u = sh(d);
11549
- a.push(u);
11548
+ const d = sh(u);
11549
+ a.push(d);
11550
11550
  const f = x(o, "addInputRules", l);
11551
11551
  Ro(o, e.options.enableInputRules) && f && r.push(...f());
11552
11552
  const h = x(o, "addPasteRules", l);
@@ -11585,13 +11585,13 @@ class Ot {
11585
11585
  }, o = x(r, "addNodeView", s);
11586
11586
  if (!o)
11587
11587
  return [];
11588
- const l = (a, c, d, u) => {
11588
+ const l = (a, c, u, d) => {
11589
11589
  const f = Vi(a, i);
11590
11590
  return o()({
11591
11591
  editor: e,
11592
11592
  node: a,
11593
- getPos: d,
11594
- decorations: u,
11593
+ getPos: u,
11594
+ decorations: d,
11595
11595
  HTMLAttributes: f,
11596
11596
  extension: r
11597
11597
  });
@@ -11652,16 +11652,16 @@ function Na(n, e, t) {
11652
11652
 
11653
11653
  `, textSerializers: o = {} } = t || {};
11654
11654
  let l = "", a = !0;
11655
- return n.nodesBetween(r, i, (c, d, u, f) => {
11655
+ return n.nodesBetween(r, i, (c, u, d, f) => {
11656
11656
  var h;
11657
11657
  const p = o == null ? void 0 : o[c.type.name];
11658
- p ? (c.isBlock && !a && (l += s, a = !0), u && (l += p({
11658
+ p ? (c.isBlock && !a && (l += s, a = !0), d && (l += p({
11659
11659
  node: c,
11660
- pos: d,
11661
- parent: u,
11660
+ pos: u,
11661
+ parent: d,
11662
11662
  index: f,
11663
11663
  range: e
11664
- }))) : c.isText ? (l += (h = c == null ? void 0 : c.text) === null || h === void 0 ? void 0 : h.slice(Math.max(r, d) - d, i - d), a = !1) : c.isBlock && !a && (l += s, a = !0);
11664
+ }))) : c.isText ? (l += (h = c == null ? void 0 : c.text) === null || h === void 0 ? void 0 : h.slice(Math.max(r, u) - u, i - u), a = !1) : c.isBlock && !a && (l += s, a = !0);
11665
11665
  }), l;
11666
11666
  }
11667
11667
  function Pa(n) {
@@ -11675,7 +11675,7 @@ const Wh = be.create({
11675
11675
  key: new se("clipboardTextSerializer"),
11676
11676
  props: {
11677
11677
  clipboardTextSerializer: () => {
11678
- const { editor: n } = this, { state: e, schema: t } = n, { doc: r, selection: i } = e, { ranges: s } = i, o = Math.min(...s.map((d) => d.$from.pos)), l = Math.max(...s.map((d) => d.$to.pos)), a = Pa(t);
11678
+ const { editor: n } = this, { state: e, schema: t } = n, { doc: r, selection: i } = e, { ranges: s } = i, o = Math.min(...s.map((u) => u.$from.pos)), l = Math.max(...s.map((u) => u.$to.pos)), a = Pa(t);
11679
11679
  return Na(r, { from: o, to: l }, {
11680
11680
  textSerializers: a
11681
11681
  });
@@ -11693,12 +11693,12 @@ const Wh = be.create({
11693
11693
  n.doc.nodesBetween(s.pos, o.pos, (l, a) => {
11694
11694
  if (l.type.isText)
11695
11695
  return;
11696
- const { doc: c, mapping: d } = e, u = c.resolve(d.map(a)), f = c.resolve(d.map(a + l.nodeSize)), h = u.blockRange(f);
11696
+ const { doc: c, mapping: u } = e, d = c.resolve(u.map(a)), f = c.resolve(u.map(a + l.nodeSize)), h = d.blockRange(f);
11697
11697
  if (!h)
11698
11698
  return;
11699
11699
  const p = Dt(h);
11700
11700
  if (l.type.isTextblock) {
11701
- const { defaultType: m } = u.parent.contentMatchAt(u.index());
11701
+ const { defaultType: m } = d.parent.contentMatchAt(d.index());
11702
11702
  e.setNodeMarkup(h.start, m);
11703
11703
  }
11704
11704
  (p || p === 0) && e.lift(h, p);
@@ -11771,11 +11771,11 @@ function Qe(n, e) {
11771
11771
  return n;
11772
11772
  }
11773
11773
  const ip = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
11774
- const s = Qe(n, r.schema), { doc: o, selection: l } = t, { $from: a, from: c, to: d } = l;
11774
+ const s = Qe(n, r.schema), { doc: o, selection: l } = t, { $from: a, from: c, to: u } = l;
11775
11775
  if (i) {
11776
- const u = ys(a, s, e);
11777
- if (u && u.from <= c && u.to >= d) {
11778
- const f = N.create(o, u.from, u.to);
11776
+ const d = ys(a, s, e);
11777
+ if (d && d.from <= c && d.to >= u) {
11778
+ const f = N.create(o, d.from, d.to);
11779
11779
  t.setSelection(f);
11780
11780
  }
11781
11781
  }
@@ -11861,11 +11861,11 @@ function cp(n, e, t) {
11861
11861
  return;
11862
11862
  const s = n.mapping.maps[r];
11863
11863
  let o = 0;
11864
- s.forEach((l, a, c, d) => {
11865
- o === 0 && (o = d);
11864
+ s.forEach((l, a, c, u) => {
11865
+ o === 0 && (o = u);
11866
11866
  }), n.setSelection(A.near(n.doc.resolve(o), t));
11867
11867
  }
11868
- const dp = (n) => n.toString().startsWith("<"), up = (n, e, t) => ({ tr: r, dispatch: i, editor: s }) => {
11868
+ const up = (n) => n.toString().startsWith("<"), dp = (n, e, t) => ({ tr: r, dispatch: i, editor: s }) => {
11869
11869
  if (i) {
11870
11870
  t = {
11871
11871
  parseOptions: {},
@@ -11880,10 +11880,10 @@ const dp = (n) => n.toString().startsWith("<"), up = (n, e, t) => ({ tr: r, disp
11880
11880
  });
11881
11881
  if (o.toString() === "<>")
11882
11882
  return !0;
11883
- let { from: l, to: a } = typeof n == "number" ? { from: n, to: n } : n, c = !0, d = !0;
11884
- if ((dp(o) ? o : [o]).forEach((f) => {
11885
- f.check(), c = c ? f.isText && f.marks.length === 0 : !1, d = d ? f.isBlock : !1;
11886
- }), l === a && d) {
11883
+ let { from: l, to: a } = typeof n == "number" ? { from: n, to: n } : n, c = !0, u = !0;
11884
+ if ((up(o) ? o : [o]).forEach((f) => {
11885
+ f.check(), c = c ? f.isText && f.marks.length === 0 : !1, u = u ? f.isBlock : !1;
11886
+ }), l === a && u) {
11887
11887
  const { parent: f } = r.doc.resolve(l);
11888
11888
  f.isTextblock && !f.type.spec.code && !f.childCount && (l -= 1, a += 1);
11889
11889
  }
@@ -11929,24 +11929,24 @@ const yp = (n) => ({ editor: e, view: t, tr: r, dispatch: i }) => {
11929
11929
  t.someProp("handleKeyDown", (c) => c(t, l));
11930
11930
  });
11931
11931
  return a == null || a.steps.forEach((c) => {
11932
- const d = c.map(r.mapping);
11933
- d && i && r.maybeStep(d);
11932
+ const u = c.map(r.mapping);
11933
+ u && i && r.maybeStep(u);
11934
11934
  }), !0;
11935
11935
  };
11936
11936
  function tn(n, e, t = {}) {
11937
11937
  const { from: r, to: i, empty: s } = n.selection, o = e ? H(e, n.schema) : null, l = [];
11938
- n.doc.nodesBetween(r, i, (u, f) => {
11939
- if (u.isText)
11938
+ n.doc.nodesBetween(r, i, (d, f) => {
11939
+ if (d.isText)
11940
11940
  return;
11941
- const h = Math.max(r, f), p = Math.min(i, f + u.nodeSize);
11941
+ const h = Math.max(r, f), p = Math.min(i, f + d.nodeSize);
11942
11942
  l.push({
11943
- node: u,
11943
+ node: d,
11944
11944
  from: h,
11945
11945
  to: p
11946
11946
  });
11947
11947
  });
11948
- const a = i - r, c = l.filter((u) => o ? o.name === u.node.type.name : !0).filter((u) => Ln(u.node.attrs, t, { strict: !1 }));
11949
- return s ? !!c.length : c.reduce((u, f) => u + f.to - f.from, 0) >= a;
11948
+ const a = i - r, c = l.filter((d) => o ? o.name === d.node.type.name : !0).filter((d) => Ln(d.node.attrs, t, { strict: !1 }));
11949
+ return s ? !!c.length : c.reduce((d, f) => d + f.to - f.from, 0) >= a;
11950
11950
  }
11951
11951
  const bp = (n, e = {}) => ({ state: t, dispatch: r }) => {
11952
11952
  const i = H(n, t.schema);
@@ -11966,16 +11966,16 @@ const Op = (n, e) => ({ tr: t, state: r, dispatch: i }) => {
11966
11966
  let s = null, o = null;
11967
11967
  const l = Er(typeof n == "string" ? n : n.name, r.schema);
11968
11968
  return l ? (l === "node" && (s = H(n, r.schema)), l === "mark" && (o = Qe(n, r.schema)), i && t.selection.ranges.forEach((a) => {
11969
- r.doc.nodesBetween(a.$from.pos, a.$to.pos, (c, d) => {
11970
- s && s === c.type && t.setNodeMarkup(d, void 0, Lo(c.attrs, e)), o && c.marks.length && c.marks.forEach((u) => {
11971
- o === u.type && t.addMark(d, d + c.nodeSize, o.create(Lo(u.attrs, e)));
11969
+ r.doc.nodesBetween(a.$from.pos, a.$to.pos, (c, u) => {
11970
+ s && s === c.type && t.setNodeMarkup(u, void 0, Lo(c.attrs, e)), o && c.marks.length && c.marks.forEach((d) => {
11971
+ o === d.type && t.addMark(u, u + c.nodeSize, o.create(Lo(d.attrs, e)));
11972
11972
  });
11973
11973
  });
11974
11974
  }), !0) : !1;
11975
11975
  }, vp = () => ({ tr: n, dispatch: e }) => (e && n.scrollIntoView(), !0), Cp = () => ({ tr: n, commands: e }) => e.setTextSelection({
11976
11976
  from: 0,
11977
11977
  to: n.doc.content.size
11978
- }), Ep = () => ({ state: n, dispatch: e }) => dh(n, e), Tp = () => ({ state: n, dispatch: e }) => hh(n, e), Mp = () => ({ state: n, dispatch: e }) => xh(n, e), wp = () => ({ state: n, dispatch: e }) => Ch(n, e), Ap = () => ({ state: n, dispatch: e }) => vh(n, e);
11978
+ }), Ep = () => ({ state: n, dispatch: e }) => uh(n, e), Tp = () => ({ state: n, dispatch: e }) => hh(n, e), Mp = () => ({ state: n, dispatch: e }) => xh(n, e), wp = () => ({ state: n, dispatch: e }) => Ch(n, e), Ap = () => ({ state: n, dispatch: e }) => vh(n, e);
11979
11979
  function Ra(n, e, t = {}) {
11980
11980
  return Bn(n, e, { slice: !1, parseOptions: t });
11981
11981
  }
@@ -12080,15 +12080,15 @@ function $a(n) {
12080
12080
  o.push({ from: l, to: a });
12081
12081
  }
12082
12082
  o.forEach(({ from: l, to: a }) => {
12083
- const c = e.slice(s).map(l, -1), d = e.slice(s).map(a), u = e.invert().map(c, -1), f = e.invert().map(d);
12083
+ const c = e.slice(s).map(l, -1), u = e.slice(s).map(a), d = e.invert().map(c, -1), f = e.invert().map(u);
12084
12084
  r.push({
12085
12085
  oldRange: {
12086
- from: u,
12086
+ from: d,
12087
12087
  to: f
12088
12088
  },
12089
12089
  newRange: {
12090
12090
  from: c,
12091
- to: d
12091
+ to: u
12092
12092
  }
12093
12093
  });
12094
12094
  });
@@ -12119,11 +12119,11 @@ function xn(n, e, t) {
12119
12119
  function Wi(n, e, t = {}) {
12120
12120
  const { empty: r, ranges: i } = n.selection, s = e ? Qe(e, n.schema) : null;
12121
12121
  if (r)
12122
- return !!(n.storedMarks || n.selection.$from.marks()).filter((u) => s ? s.name === u.type.name : !0).find((u) => Ln(u.attrs, t, { strict: !1 }));
12122
+ return !!(n.storedMarks || n.selection.$from.marks()).filter((d) => s ? s.name === d.type.name : !0).find((d) => Ln(d.attrs, t, { strict: !1 }));
12123
12123
  let o = 0;
12124
12124
  const l = [];
12125
- if (i.forEach(({ $from: u, $to: f }) => {
12126
- const h = u.pos, p = f.pos;
12125
+ if (i.forEach(({ $from: d, $to: f }) => {
12126
+ const h = d.pos, p = f.pos;
12127
12127
  n.doc.nodesBetween(h, p, (m, g) => {
12128
12128
  if (!m.isText && !m.marks.length)
12129
12129
  return;
@@ -12136,7 +12136,7 @@ function Wi(n, e, t = {}) {
12136
12136
  });
12137
12137
  }), o === 0)
12138
12138
  return !1;
12139
- const a = l.filter((u) => s ? s.name === u.mark.type.name : !0).filter((u) => Ln(u.mark.attrs, t, { strict: !1 })).reduce((u, f) => u + f.to - f.from, 0), c = l.filter((u) => s ? u.mark.type !== s && u.mark.type.excludes(s) : !0).reduce((u, f) => u + f.to - f.from, 0);
12139
+ const a = l.filter((d) => s ? s.name === d.mark.type.name : !0).filter((d) => Ln(d.mark.attrs, t, { strict: !1 })).reduce((d, f) => d + f.to - f.from, 0), c = l.filter((d) => s ? d.mark.type !== s && d.mark.type.excludes(s) : !0).reduce((d, f) => d + f.to - f.from, 0);
12140
12140
  return (a > 0 ? a + c : a) >= o;
12141
12141
  }
12142
12142
  function $p(n, e, t = {}) {
@@ -12172,11 +12172,11 @@ function zp(n, e, t) {
12172
12172
  const { ranges: o } = i;
12173
12173
  return o.some(({ $from: l, $to: a }) => {
12174
12174
  let c = l.depth === 0 ? n.doc.inlineContent && n.doc.type.allowsMarkType(t) : !1;
12175
- return n.doc.nodesBetween(l.pos, a.pos, (d, u, f) => {
12175
+ return n.doc.nodesBetween(l.pos, a.pos, (u, d, f) => {
12176
12176
  if (c)
12177
12177
  return !1;
12178
- if (d.isInline) {
12179
- const h = !f || f.type.allowsMarkType(t), p = !!t.isInSet(d.marks) || !d.marks.some((m) => m.type.excludes(t));
12178
+ if (u.isInline) {
12179
+ const h = !f || f.type.allowsMarkType(t), p = !!t.isInSet(u.marks) || !u.marks.some((m) => m.type.excludes(t));
12180
12180
  c = h && p;
12181
12181
  }
12182
12182
  return !c;
@@ -12194,9 +12194,9 @@ const Hp = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
12194
12194
  }));
12195
12195
  } else
12196
12196
  l.forEach((c) => {
12197
- const d = c.$from.pos, u = c.$to.pos;
12198
- r.doc.nodesBetween(d, u, (f, h) => {
12199
- const p = Math.max(h, d), m = Math.min(h + f.nodeSize, u);
12197
+ const u = c.$from.pos, d = c.$to.pos;
12198
+ r.doc.nodesBetween(u, d, (f, h) => {
12199
+ const p = Math.max(h, u), m = Math.min(h + f.nodeSize, d);
12200
12200
  f.marks.find((y) => y.type === a) ? f.marks.forEach((y) => {
12201
12201
  a === y.type && t.addMark(p, m, a.create({
12202
12202
  ...y.attrs,
@@ -12217,8 +12217,8 @@ const Hp = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
12217
12217
  return !0;
12218
12218
  }, Wp = (n) => ({ tr: e, dispatch: t }) => {
12219
12219
  if (t) {
12220
- const { doc: r } = e, { from: i, to: s } = typeof n == "number" ? { from: n, to: n } : n, o = N.atStart(r).from, l = N.atEnd(r).to, a = rt(i, o, l), c = rt(s, o, l), d = N.create(r, a, c);
12221
- e.setSelection(d);
12220
+ const { doc: r } = e, { from: i, to: s } = typeof n == "number" ? { from: n, to: n } : n, o = N.atStart(r).from, l = N.atEnd(r).to, a = rt(i, o, l), c = rt(s, o, l), u = N.create(r, a, c);
12221
+ e.setSelection(u);
12222
12222
  }
12223
12223
  return !0;
12224
12224
  }, Kp = (n) => ({ state: e, dispatch: t }) => {
@@ -12233,27 +12233,27 @@ function $o(n, e) {
12233
12233
  }
12234
12234
  }
12235
12235
  const Up = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, editor: i }) => {
12236
- const { selection: s, doc: o } = e, { $from: l, $to: a } = s, c = i.extensionManager.attributes, d = xn(c, l.node().type.name, l.node().attrs);
12236
+ const { selection: s, doc: o } = e, { $from: l, $to: a } = s, c = i.extensionManager.attributes, u = xn(c, l.node().type.name, l.node().attrs);
12237
12237
  if (s instanceof C && s.node.isBlock)
12238
12238
  return !l.parentOffset || !vt(o, l.pos) ? !1 : (r && (n && $o(t, i.extensionManager.splittableMarks), e.split(l.pos).scrollIntoView()), !0);
12239
12239
  if (!l.parent.isBlock)
12240
12240
  return !1;
12241
12241
  if (r) {
12242
- const u = a.parentOffset === a.parent.content.size;
12242
+ const d = a.parentOffset === a.parent.content.size;
12243
12243
  s instanceof N && e.deleteSelection();
12244
12244
  const f = l.depth === 0 ? void 0 : Pp(l.node(-1).contentMatchAt(l.indexAfter(-1)));
12245
- let h = u && f ? [
12245
+ let h = d && f ? [
12246
12246
  {
12247
12247
  type: f,
12248
- attrs: d
12248
+ attrs: u
12249
12249
  }
12250
12250
  ] : void 0, p = vt(e.doc, e.mapping.map(l.pos), 1, h);
12251
12251
  if (!h && !p && vt(e.doc, e.mapping.map(l.pos), 1, f ? [{ type: f }] : void 0) && (p = !0, h = f ? [
12252
12252
  {
12253
12253
  type: f,
12254
- attrs: d
12254
+ attrs: u
12255
12255
  }
12256
- ] : void 0), p && (e.split(e.mapping.map(l.pos), 1, h), f && !u && !l.parentOffset && l.parent.type !== f)) {
12256
+ ] : void 0), p && (e.split(e.mapping.map(l.pos), 1, h), f && !d && !l.parentOffset && l.parent.type !== f)) {
12257
12257
  const m = e.mapping.map(l.before()), g = e.doc.resolve(m);
12258
12258
  l.node(-1).canReplaceWith(g.index(), g.index() + 1, f) && e.setNodeMarkup(e.mapping.map(l.before()), f);
12259
12259
  }
@@ -12265,10 +12265,10 @@ const Up = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
12265
12265
  const o = H(n, t.schema), { $from: l, $to: a } = t.selection, c = t.selection.node;
12266
12266
  if (c && c.isBlock || l.depth < 2 || !l.sameParent(a))
12267
12267
  return !1;
12268
- const d = l.node(-1);
12269
- if (d.type !== o)
12268
+ const u = l.node(-1);
12269
+ if (u.type !== o)
12270
12270
  return !1;
12271
- const u = i.extensionManager.attributes;
12271
+ const d = i.extensionManager.attributes;
12272
12272
  if (l.parent.content.size === 0 && l.node(-1).childCount === l.indexAfter(-1)) {
12273
12273
  if (l.depth === 2 || l.node(-3).type !== o || l.index(-2) !== l.node(-2).childCount - 1)
12274
12274
  return !1;
@@ -12277,7 +12277,7 @@ const Up = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
12277
12277
  const y = l.index(-1) ? 1 : l.index(-2) ? 2 : 3;
12278
12278
  for (let _ = l.depth - y; _ >= l.depth - 3; _ -= 1)
12279
12279
  g = b.from(l.node(_).copy(g));
12280
- const O = l.indexAfter(-1) < l.node(-2).childCount ? 1 : l.indexAfter(-2) < l.node(-3).childCount ? 2 : 3, E = xn(u, l.node().type.name, l.node().attrs), I = ((s = o.contentMatch.defaultType) === null || s === void 0 ? void 0 : s.createAndFill(E)) || void 0;
12280
+ const O = l.indexAfter(-1) < l.node(-2).childCount ? 1 : l.indexAfter(-2) < l.node(-3).childCount ? 2 : 3, E = xn(d, l.node().type.name, l.node().attrs), I = ((s = o.contentMatch.defaultType) === null || s === void 0 ? void 0 : s.createAndFill(E)) || void 0;
12281
12281
  g = g.append(b.from(o.createAndFill(null, I) || void 0));
12282
12282
  const D = l.before(l.depth - (y - 1));
12283
12283
  e.replace(D, l.after(-O), new S(g, 4 - y, 0));
@@ -12290,7 +12290,7 @@ const Up = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
12290
12290
  }
12291
12291
  return !0;
12292
12292
  }
12293
- const f = a.pos === l.end() ? d.contentMatchAt(0).defaultType : null, h = xn(u, d.type.name, d.attrs), p = xn(u, l.node().type.name, l.node().attrs);
12293
+ const f = a.pos === l.end() ? u.contentMatchAt(0).defaultType : null, h = xn(d, u.type.name, u.attrs), p = xn(d, l.node().type.name, l.node().attrs);
12294
12294
  e.delete(l.pos, a.pos);
12295
12295
  const m = f ? [
12296
12296
  { type: o, attrs: h },
@@ -12324,19 +12324,19 @@ const Up = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
12324
12324
  return !0;
12325
12325
  const i = n.doc.nodeAt(r);
12326
12326
  return t.node.type === (i == null ? void 0 : i.type) && Ye(n.doc, r) && n.join(r), !0;
12327
- }, Gp = (n, e, t, r = {}) => ({ editor: i, tr: s, state: o, dispatch: l, chain: a, commands: c, can: d }) => {
12328
- const { extensions: u, splittableMarks: f } = i.extensionManager, h = H(n, o.schema), p = H(e, o.schema), { selection: m, storedMarks: g } = o, { $from: y, $to: O } = m, E = y.blockRange(O), I = g || m.$to.parentOffset && m.$from.marks();
12327
+ }, Gp = (n, e, t, r = {}) => ({ editor: i, tr: s, state: o, dispatch: l, chain: a, commands: c, can: u }) => {
12328
+ const { extensions: d, splittableMarks: f } = i.extensionManager, h = H(n, o.schema), p = H(e, o.schema), { selection: m, storedMarks: g } = o, { $from: y, $to: O } = m, E = y.blockRange(O), I = g || m.$to.parentOffset && m.$from.marks();
12329
12329
  if (!E)
12330
12330
  return !1;
12331
- const D = ks((T) => Bo(T.type.name, u))(m);
12331
+ const D = ks((T) => Bo(T.type.name, d))(m);
12332
12332
  if (E.depth >= 1 && D && E.depth - D.depth <= 1) {
12333
12333
  if (D.node.type === h)
12334
12334
  return c.liftListItem(p);
12335
- if (Bo(D.node.type.name, u) && h.validContent(D.node.content) && l)
12335
+ if (Bo(D.node.type.name, d) && h.validContent(D.node.content) && l)
12336
12336
  return a().command(() => (s.setNodeMarkup(D.pos, h), !0)).command(() => ki(s, h)).command(() => Si(s, h)).run();
12337
12337
  }
12338
- return !t || !I || !l ? a().command(() => d().wrapInList(h, r) ? !0 : c.clearNodes()).wrapInList(h, r).command(() => ki(s, h)).command(() => Si(s, h)).run() : a().command(() => {
12339
- const T = d().wrapInList(h, r), _ = I.filter((P) => f.includes(P.type.name));
12338
+ return !t || !I || !l ? a().command(() => u().wrapInList(h, r) ? !0 : c.clearNodes()).wrapInList(h, r).command(() => ki(s, h)).command(() => Si(s, h)).run() : a().command(() => {
12339
+ const T = u().wrapInList(h, r), _ = I.filter((P) => f.includes(P.type.name));
12340
12340
  return s.ensureMarks(_), T ? !0 : c.clearNodes();
12341
12341
  }).wrapInList(h, r).command(() => ki(s, h)).command(() => Si(s, h)).run();
12342
12342
  }, Yp = (n, e = {}, t = {}) => ({ state: r, commands: i }) => {
@@ -12375,15 +12375,15 @@ const Up = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
12375
12375
  }), !0;
12376
12376
  }, tm = (n, e = {}) => ({ tr: t, state: r, dispatch: i }) => {
12377
12377
  var s;
12378
- const { extendEmptyMarkRange: o = !1 } = e, { selection: l } = t, a = Qe(n, r.schema), { $from: c, empty: d, ranges: u } = l;
12378
+ const { extendEmptyMarkRange: o = !1 } = e, { selection: l } = t, a = Qe(n, r.schema), { $from: c, empty: u, ranges: d } = l;
12379
12379
  if (!i)
12380
12380
  return !0;
12381
- if (d && o) {
12381
+ if (u && o) {
12382
12382
  let { from: f, to: h } = l;
12383
12383
  const p = (s = c.marks().find((g) => g.type === a)) === null || s === void 0 ? void 0 : s.attrs, m = ys(c, a, p);
12384
12384
  m && (f = m.from, h = m.to), t.removeMark(f, h, a);
12385
12385
  } else
12386
- u.forEach((f) => {
12386
+ d.forEach((f) => {
12387
12387
  t.removeMark(f.$from.pos, f.$to.pos, a);
12388
12388
  });
12389
12389
  return t.removeStoredMark(a), !0;
@@ -12391,14 +12391,14 @@ const Up = ({ keepMarks: n = !0 } = {}) => ({ tr: e, state: t, dispatch: r, edit
12391
12391
  let s = null, o = null;
12392
12392
  const l = Er(typeof n == "string" ? n : n.name, r.schema);
12393
12393
  return l ? (l === "node" && (s = H(n, r.schema)), l === "mark" && (o = Qe(n, r.schema)), i && t.selection.ranges.forEach((a) => {
12394
- const c = a.$from.pos, d = a.$to.pos;
12395
- r.doc.nodesBetween(c, d, (u, f) => {
12396
- s && s === u.type && t.setNodeMarkup(f, void 0, {
12397
- ...u.attrs,
12394
+ const c = a.$from.pos, u = a.$to.pos;
12395
+ r.doc.nodesBetween(c, u, (d, f) => {
12396
+ s && s === d.type && t.setNodeMarkup(f, void 0, {
12397
+ ...d.attrs,
12398
12398
  ...e
12399
- }), o && u.marks.length && u.marks.forEach((h) => {
12399
+ }), o && d.marks.length && d.marks.forEach((h) => {
12400
12400
  if (o === h.type) {
12401
- const p = Math.max(f, c), m = Math.min(f + u.nodeSize, d);
12401
+ const p = Math.max(f, c), m = Math.min(f + d.nodeSize, u);
12402
12402
  t.addMark(p, m, o.create({
12403
12403
  ...h.attrs,
12404
12404
  ...e
@@ -12432,7 +12432,7 @@ var sm = /* @__PURE__ */ Object.freeze({
12432
12432
  focus: op,
12433
12433
  forEach: lp,
12434
12434
  insertContent: ap,
12435
- insertContentAt: up,
12435
+ insertContentAt: dp,
12436
12436
  joinUp: fp,
12437
12437
  joinDown: hp,
12438
12438
  joinBackward: pp,
@@ -12520,8 +12520,8 @@ const om = be.create({
12520
12520
  () => o.undoInputRule(),
12521
12521
  // maybe convert first text block node to default node
12522
12522
  () => o.command(({ tr: l }) => {
12523
- const { selection: a, doc: c } = l, { empty: d, $anchor: u } = a, { pos: f, parent: h } = u, p = A.atStart(c).from === f;
12524
- return !d || !p || !h.type.isTextblock || h.textContent.length ? !1 : o.clearNodes();
12523
+ const { selection: a, doc: c } = l, { empty: u, $anchor: d } = a, { pos: f, parent: h } = d, p = A.atStart(c).from === f;
12524
+ return !u || !p || !h.type.isTextblock || h.textContent.length ? !1 : o.clearNodes();
12525
12525
  }),
12526
12526
  () => o.deleteSelection(),
12527
12527
  () => o.joinBackward(),
@@ -12575,20 +12575,20 @@ const om = be.create({
12575
12575
  const { empty: i, from: s, to: o } = e.selection, l = A.atStart(e.doc).from, a = A.atEnd(e.doc).to;
12576
12576
  if (i || !(s === l && o === a) || !(t.doc.textBetween(0, t.doc.content.size, " ", " ").length === 0))
12577
12577
  return;
12578
- const u = t.tr, f = kr({
12578
+ const d = t.tr, f = kr({
12579
12579
  state: t,
12580
- transaction: u
12580
+ transaction: d
12581
12581
  }), { commands: h } = new Sr({
12582
12582
  editor: this.editor,
12583
12583
  state: f
12584
12584
  });
12585
- if (h.clearNodes(), !!u.steps.length)
12586
- return u;
12585
+ if (h.clearNodes(), !!d.steps.length)
12586
+ return d;
12587
12587
  }
12588
12588
  })
12589
12589
  ];
12590
12590
  }
12591
- }), dm = be.create({
12591
+ }), um = be.create({
12592
12592
  name: "tabindex",
12593
12593
  addProseMirrorPlugins() {
12594
12594
  return [
@@ -12601,14 +12601,14 @@ const om = be.create({
12601
12601
  ];
12602
12602
  }
12603
12603
  });
12604
- var um = /* @__PURE__ */ Object.freeze({
12604
+ var dm = /* @__PURE__ */ Object.freeze({
12605
12605
  __proto__: null,
12606
12606
  ClipboardTextSerializer: Wh,
12607
12607
  Commands: om,
12608
12608
  Editable: lm,
12609
12609
  FocusEvents: am,
12610
12610
  Keymap: cm,
12611
- Tabindex: dm
12611
+ Tabindex: um
12612
12612
  });
12613
12613
  const fm = `.ProseMirror {
12614
12614
  position: relative;
@@ -12806,7 +12806,7 @@ let pm = class extends Dh {
12806
12806
  * Creates an extension manager.
12807
12807
  */
12808
12808
  createExtensionManager() {
12809
- const t = [...this.options.enableCoreExtensions ? Object.values(um) : [], ...this.options.extensions].filter((r) => ["extension", "node", "mark"].includes(r == null ? void 0 : r.type));
12809
+ const t = [...this.options.enableCoreExtensions ? Object.values(dm) : [], ...this.options.extensions].filter((r) => ["extension", "node", "mark"].includes(r == null ? void 0 : r.type));
12810
12810
  this.extensionManager = new Ot(t, this);
12811
12811
  }
12812
12812
  /**
@@ -12972,10 +12972,10 @@ function nn(n) {
12972
12972
  const { tr: s } = e, o = r[r.length - 1], l = r[0];
12973
12973
  let a = t.to;
12974
12974
  if (o) {
12975
- const c = l.search(/\S/), d = t.from + l.indexOf(o), u = d + o.length;
12976
- if (Mr(t.from, t.to, e.doc).filter((h) => h.mark.type.excluded.find((m) => m === n.type && m !== h.mark.type)).filter((h) => h.to > d).length)
12975
+ const c = l.search(/\S/), u = t.from + l.indexOf(o), d = u + o.length;
12976
+ if (Mr(t.from, t.to, e.doc).filter((h) => h.mark.type.excluded.find((m) => m === n.type && m !== h.mark.type)).filter((h) => h.to > u).length)
12977
12977
  return null;
12978
- u < t.to && s.delete(u, t.to), d > t.from && s.delete(t.from + c, d), a = t.from + c + o.length, s.addMark(t.from + c, a, n.type.create(i || {})), s.removeStoredMark(n.type);
12978
+ d < t.to && s.delete(d, t.to), u > t.from && s.delete(t.from + c, u), a = t.from + c + o.length, s.addMark(t.from + c, a, n.type.create(i || {})), s.removeStoredMark(n.type);
12979
12979
  }
12980
12980
  }
12981
12981
  });
@@ -12990,8 +12990,8 @@ function Fo(n) {
12990
12990
  const a = r[0].lastIndexOf(r[1]);
12991
12991
  let c = o + a;
12992
12992
  c > l ? c = l : l = c + r[1].length;
12993
- const d = r[0][r[0].length - 1];
12994
- s.insertText(d, o + r[0].length - 1), s.replaceWith(c, l, n.type.create(i));
12993
+ const u = r[0][r[0].length - 1];
12994
+ s.insertText(u, o + r[0].length - 1), s.replaceWith(c, l, n.type.create(i));
12995
12995
  } else
12996
12996
  r[0] && s.replaceWith(o, l, n.type.create(i));
12997
12997
  }
@@ -13016,18 +13016,18 @@ function rn(n) {
13016
13016
  if (!c)
13017
13017
  return null;
13018
13018
  if (o.wrap(a, c), n.keepMarks && n.editor) {
13019
- const { selection: u, storedMarks: f } = e, { splittableMarks: h } = n.editor.extensionManager, p = f || u.$to.parentOffset && u.$from.marks();
13019
+ const { selection: d, storedMarks: f } = e, { splittableMarks: h } = n.editor.extensionManager, p = f || d.$to.parentOffset && d.$from.marks();
13020
13020
  if (p) {
13021
13021
  const m = p.filter((g) => h.includes(g.type.name));
13022
13022
  o.ensureMarks(m);
13023
13023
  }
13024
13024
  }
13025
13025
  if (n.keepAttributes) {
13026
- const u = n.type.name === "bulletList" || n.type.name === "orderedList" ? "listItem" : "taskList";
13027
- i().updateAttributes(u, s).run();
13026
+ const d = n.type.name === "bulletList" || n.type.name === "orderedList" ? "listItem" : "taskList";
13027
+ i().updateAttributes(d, s).run();
13028
13028
  }
13029
- const d = o.doc.resolve(t.from - 1).nodeBefore;
13030
- d && d.type === n.type && Ye(o.doc, t.from - 1) && (!n.joinPredicate || n.joinPredicate(r, d)) && o.join(t.from - 1);
13029
+ const u = o.doc.resolve(t.from - 1).nodeBefore;
13030
+ u && u.type === n.type && Ye(o.doc, t.from - 1) && (!n.joinPredicate || n.joinPredicate(r, u)) && o.join(t.from - 1);
13031
13031
  }
13032
13032
  });
13033
13033
  }
@@ -13130,12 +13130,12 @@ class mm {
13130
13130
  }
13131
13131
  onDragStart(e) {
13132
13132
  var t, r, i, s, o, l, a;
13133
- const { view: c } = this.editor, d = e.target, u = d.nodeType === 3 ? (t = d.parentElement) === null || t === void 0 ? void 0 : t.closest("[data-drag-handle]") : d.closest("[data-drag-handle]");
13134
- if (!this.dom || !((r = this.contentDOM) === null || r === void 0) && r.contains(d) || !u)
13133
+ const { view: c } = this.editor, u = e.target, d = u.nodeType === 3 ? (t = u.parentElement) === null || t === void 0 ? void 0 : t.closest("[data-drag-handle]") : u.closest("[data-drag-handle]");
13134
+ if (!this.dom || !((r = this.contentDOM) === null || r === void 0) && r.contains(u) || !d)
13135
13135
  return;
13136
13136
  let f = 0, h = 0;
13137
- if (this.dom !== u) {
13138
- const g = this.dom.getBoundingClientRect(), y = u.getBoundingClientRect(), O = (i = e.offsetX) !== null && i !== void 0 ? i : (s = e.nativeEvent) === null || s === void 0 ? void 0 : s.offsetX, E = (o = e.offsetY) !== null && o !== void 0 ? o : (l = e.nativeEvent) === null || l === void 0 ? void 0 : l.offsetY;
13137
+ if (this.dom !== d) {
13138
+ const g = this.dom.getBoundingClientRect(), y = d.getBoundingClientRect(), O = (i = e.offsetX) !== null && i !== void 0 ? i : (s = e.nativeEvent) === null || s === void 0 ? void 0 : s.offsetX, E = (o = e.offsetY) !== null && o !== void 0 ? o : (l = e.nativeEvent) === null || l === void 0 ? void 0 : l.offsetY;
13139
13139
  f = y.x - g.x + O, h = y.y - g.y + E;
13140
13140
  }
13141
13141
  (a = e.dataTransfer) === null || a === void 0 || a.setDragImage(this.dom, f, h);
@@ -13154,10 +13154,10 @@ class mm {
13154
13154
  const s = e.type.startsWith("drag"), o = e.type === "drop";
13155
13155
  if ((["INPUT", "BUTTON", "SELECT", "TEXTAREA"].includes(r.tagName) || r.isContentEditable) && !o && !s)
13156
13156
  return !0;
13157
- const { isEditable: a } = this.editor, { isDragging: c } = this, d = !!this.node.type.spec.draggable, u = C.isSelectable(this.node), f = e.type === "copy", h = e.type === "paste", p = e.type === "cut", m = e.type === "mousedown";
13158
- if (!d && u && s && e.preventDefault(), d && s && !c)
13157
+ const { isEditable: a } = this.editor, { isDragging: c } = this, u = !!this.node.type.spec.draggable, d = C.isSelectable(this.node), f = e.type === "copy", h = e.type === "paste", p = e.type === "cut", m = e.type === "mousedown";
13158
+ if (!u && d && s && e.preventDefault(), u && s && !c)
13159
13159
  return e.preventDefault(), !1;
13160
- if (d && a && !c && m) {
13160
+ if (u && a && !c && m) {
13161
13161
  const g = r.closest("[data-drag-handle]");
13162
13162
  g && (this.dom === g || this.dom.contains(g)) && (this.isDragging = !0, document.addEventListener("dragend", () => {
13163
13163
  this.isDragging = !1;
@@ -13167,7 +13167,7 @@ class mm {
13167
13167
  this.isDragging = !1;
13168
13168
  }, { once: !0 }));
13169
13169
  }
13170
- return !(c || o || f || h || p || m && u);
13170
+ return !(c || o || f || h || p || m && d);
13171
13171
  }
13172
13172
  ignoreMutation(e) {
13173
13173
  return !this.dom || !this.contentDOM ? !0 : typeof this.options.ignoreMutation == "function" ? this.options.ignoreMutation({ mutation: e }) : this.node.isLeaf || this.node.isAtom ? !0 : e.type === "selection" || this.dom.contains(e.target) && e.type === "childList" && Cr() && this.editor.isFocused && [
@@ -13199,10 +13199,10 @@ function Nt(n) {
13199
13199
  const { tr: s } = e, o = r[r.length - 1], l = r[0];
13200
13200
  let a = t.to;
13201
13201
  if (o) {
13202
- const c = l.search(/\S/), d = t.from + l.indexOf(o), u = d + o.length;
13203
- if (Mr(t.from, t.to, e.doc).filter((h) => h.mark.type.excluded.find((m) => m === n.type && m !== h.mark.type)).filter((h) => h.to > d).length)
13202
+ const c = l.search(/\S/), u = t.from + l.indexOf(o), d = u + o.length;
13203
+ if (Mr(t.from, t.to, e.doc).filter((h) => h.mark.type.excluded.find((m) => m === n.type && m !== h.mark.type)).filter((h) => h.to > u).length)
13204
13204
  return null;
13205
- u < t.to && s.delete(u, t.to), d > t.from && s.delete(t.from + c, d), a = t.from + c + o.length, s.addMark(t.from + c, a, n.type.create(i || {})), s.removeStoredMark(n.type);
13205
+ d < t.to && s.delete(d, t.to), u > t.from && s.delete(t.from + c, u), a = t.from + c + o.length, s.addMark(t.from + c, a, n.type.create(i || {})), s.removeStoredMark(n.type);
13206
13206
  }
13207
13207
  }
13208
13208
  });
@@ -13263,13 +13263,13 @@ Dr.isSymbol = Sm;
13263
13263
  Object.defineProperty(n, "__esModule", { value: !0 }), n.isSymbol = n.isOneOf = n.isInteger = n.isInstanceOf = n.vuePropValidator = void 0;
13264
13264
  const t = e(De);
13265
13265
  function r(a, ...c) {
13266
- const d = a ? [...c, a] : c;
13267
- if (d.length !== 0)
13268
- return (u) => {
13269
- for (const f of d) {
13270
- const h = f(u);
13266
+ const u = a ? [...c, a] : c;
13267
+ if (u.length !== 0)
13268
+ return (d) => {
13269
+ for (const f of u) {
13270
+ const h = f(d);
13271
13271
  if (h)
13272
- return typeof t.default == "object" && "util" in t.default ? t.default.util.warn(`${h} (received: '${String(u)}')`) : console.warn(`${h} (received: '${String(u)}')`), !1;
13272
+ return typeof t.default == "object" && "util" in t.default ? t.default.util.warn(`${h} (received: '${String(d)}')`) : console.warn(`${h} (received: '${String(d)}')`), !1;
13273
13273
  }
13274
13274
  return !0;
13275
13275
  };
@@ -13489,13 +13489,13 @@ Jr.isNonPositive = rg;
13489
13489
  Object.defineProperty(n, "objectProp", { enumerable: !0, get: function() {
13490
13490
  return c.objectProp;
13491
13491
  } });
13492
- var d = Hr;
13492
+ var u = Hr;
13493
13493
  Object.defineProperty(n, "functionProp", { enumerable: !0, get: function() {
13494
- return d.functionProp;
13494
+ return u.functionProp;
13495
13495
  } });
13496
- var u = cn;
13496
+ var d = cn;
13497
13497
  Object.defineProperty(n, "oneOfProp", { enumerable: !0, get: function() {
13498
- return u.oneOfProp;
13498
+ return d.oneOfProp;
13499
13499
  } });
13500
13500
  var f = jr;
13501
13501
  Object.defineProperty(n, "oneOfObjectKeysProp", { enumerable: !0, get: function() {
@@ -13730,7 +13730,7 @@ const lg = /^\s*>\s$/, ag = J.create({
13730
13730
  })
13731
13731
  ];
13732
13732
  }
13733
- }), cg = /^```([a-z]+)?[\s\n]$/, dg = /^~~~([a-z]+)?[\s\n]$/, ug = J.create({
13733
+ }), cg = /^```([a-z]+)?[\s\n]$/, ug = /^~~~([a-z]+)?[\s\n]$/, dg = J.create({
13734
13734
  name: "codeBlock",
13735
13735
  addOptions() {
13736
13736
  return {
@@ -13827,7 +13827,7 @@ const lg = /^\s*>\s$/, ag = J.create({
13827
13827
  })
13828
13828
  }),
13829
13829
  zo({
13830
- find: dg,
13830
+ find: ug,
13831
13831
  type: this.type,
13832
13832
  getAttributes: (n) => ({
13833
13833
  language: n[1]
@@ -13892,10 +13892,10 @@ const lg = /^\s*>\s$/, ag = J.create({
13892
13892
  if (i.$from.parent.type.spec.isolating)
13893
13893
  return !1;
13894
13894
  const { keepMarks: o } = this.options, { splittableMarks: l } = r.extensionManager, a = s || i.$to.parentOffset && i.$from.marks();
13895
- return e().insertContent({ type: this.name }).command(({ tr: c, dispatch: d }) => {
13896
- if (d && a && o) {
13897
- const u = a.filter((f) => l.includes(f.type.name));
13898
- c.ensureMarks(u);
13895
+ return e().insertContent({ type: this.name }).command(({ tr: c, dispatch: u }) => {
13896
+ if (u && a && o) {
13897
+ const d = a.filter((f) => l.includes(f.type.name));
13898
+ c.ensureMarks(d);
13899
13899
  }
13900
13900
  return !0;
13901
13901
  }).run();
@@ -13960,12 +13960,12 @@ const lg = /^\s*>\s$/, ag = J.create({
13960
13960
  return null;
13961
13961
  const s = n.type.createAndFill(), o = (s == null ? void 0 : s.sameMarkup(n)) && s.content.findDiffStart(n.content) === null;
13962
13962
  return n.descendants((l, a) => {
13963
- const c = r >= a && r <= a + l.nodeSize, d = !l.isLeaf && !l.childCount;
13964
- if ((c || !this.options.showOnlyCurrent) && d) {
13965
- const u = [this.options.emptyNodeClass];
13966
- o && u.push(this.options.emptyEditorClass);
13963
+ const c = r >= a && r <= a + l.nodeSize, u = !l.isLeaf && !l.childCount;
13964
+ if ((c || !this.options.showOnlyCurrent) && u) {
13965
+ const d = [this.options.emptyNodeClass];
13966
+ o && d.push(this.options.emptyEditorClass);
13967
13967
  const f = ae.node(a, a + l.nodeSize, {
13968
- class: u.join(" "),
13968
+ class: d.join(" "),
13969
13969
  "data-placeholder": typeof this.options.placeholder == "function" ? this.options.placeholder({
13970
13970
  editor: this.editor,
13971
13971
  node: l,
@@ -14353,7 +14353,7 @@ re.prototype = {
14353
14353
  return i.j[n] = o, o;
14354
14354
  }
14355
14355
  };
14356
- const M = (n, e, t, r, i) => n.ta(e, t, r, i), ce = (n, e, t, r, i) => n.tr(e, t, r, i), Ko = (n, e, t, r, i) => n.ts(e, t, r, i), k = (n, e, t, r, i) => n.tt(e, t, r, i), Ae = "WORD", Yi = "UWORD", sn = "LOCALHOST", Xi = "TLD", Qi = "UTLD", vn = "SCHEME", St = "SLASH_SCHEME", xs = "NUM", Va = "WS", Os = "NL", Wt = "OPENBRACE", Kt = "CLOSEBRACE", $n = "OPENBRACKET", Fn = "CLOSEBRACKET", zn = "OPENPAREN", Hn = "CLOSEPAREN", jn = "OPENANGLEBRACKET", Vn = "CLOSEANGLEBRACKET", qn = "FULLWIDTHLEFTPAREN", Wn = "FULLWIDTHRIGHTPAREN", Kn = "LEFTCORNERBRACKET", Un = "RIGHTCORNERBRACKET", Jn = "LEFTWHITECORNERBRACKET", Gn = "RIGHTWHITECORNERBRACKET", Yn = "FULLWIDTHLESSTHAN", Xn = "FULLWIDTHGREATERTHAN", Qn = "AMPERSAND", Zn = "APOSTROPHE", er = "ASTERISK", ze = "AT", tr = "BACKSLASH", nr = "BACKTICK", rr = "CARET", je = "COLON", vs = "COMMA", ir = "DOLLAR", ke = "DOT", sr = "EQUALS", Cs = "EXCLAMATION", Se = "HYPHEN", or = "PERCENT", lr = "PIPE", ar = "PLUS", cr = "POUND", dr = "QUERY", Es = "QUOTE", Ts = "SEMI", xe = "SLASH", Ut = "TILDE", ur = "UNDERSCORE", qa = "EMOJI", fr = "SYM";
14356
+ const M = (n, e, t, r, i) => n.ta(e, t, r, i), ce = (n, e, t, r, i) => n.tr(e, t, r, i), Ko = (n, e, t, r, i) => n.ts(e, t, r, i), k = (n, e, t, r, i) => n.tt(e, t, r, i), Ae = "WORD", Yi = "UWORD", sn = "LOCALHOST", Xi = "TLD", Qi = "UTLD", vn = "SCHEME", St = "SLASH_SCHEME", xs = "NUM", Va = "WS", Os = "NL", Wt = "OPENBRACE", Kt = "CLOSEBRACE", $n = "OPENBRACKET", Fn = "CLOSEBRACKET", zn = "OPENPAREN", Hn = "CLOSEPAREN", jn = "OPENANGLEBRACKET", Vn = "CLOSEANGLEBRACKET", qn = "FULLWIDTHLEFTPAREN", Wn = "FULLWIDTHRIGHTPAREN", Kn = "LEFTCORNERBRACKET", Un = "RIGHTCORNERBRACKET", Jn = "LEFTWHITECORNERBRACKET", Gn = "RIGHTWHITECORNERBRACKET", Yn = "FULLWIDTHLESSTHAN", Xn = "FULLWIDTHGREATERTHAN", Qn = "AMPERSAND", Zn = "APOSTROPHE", er = "ASTERISK", ze = "AT", tr = "BACKSLASH", nr = "BACKTICK", rr = "CARET", je = "COLON", vs = "COMMA", ir = "DOLLAR", ke = "DOT", sr = "EQUALS", Cs = "EXCLAMATION", Se = "HYPHEN", or = "PERCENT", lr = "PIPE", ar = "PLUS", cr = "POUND", ur = "QUERY", Es = "QUOTE", Ts = "SEMI", xe = "SLASH", Ut = "TILDE", dr = "UNDERSCORE", qa = "EMOJI", fr = "SYM";
14357
14357
  var Wa = /* @__PURE__ */ Object.freeze({
14358
14358
  __proto__: null,
14359
14359
  WORD: Ae,
@@ -14400,12 +14400,12 @@ var Wa = /* @__PURE__ */ Object.freeze({
14400
14400
  PIPE: lr,
14401
14401
  PLUS: ar,
14402
14402
  POUND: cr,
14403
- QUERY: dr,
14403
+ QUERY: ur,
14404
14404
  QUOTE: Es,
14405
14405
  SEMI: Ts,
14406
14406
  SLASH: xe,
14407
14407
  TILDE: Ut,
14408
- UNDERSCORE: ur,
14408
+ UNDERSCORE: dr,
14409
14409
  EMOJI: qa,
14410
14410
  SYM: fr
14411
14411
  });
@@ -14417,7 +14417,7 @@ function Lg(n) {
14417
14417
  const e = {};
14418
14418
  re.groups = e;
14419
14419
  const t = new re();
14420
- gn == null && (gn = Go(wg)), yn == null && (yn = Go(Ag)), k(t, "'", Zn), k(t, "{", Wt), k(t, "}", Kt), k(t, "[", $n), k(t, "]", Fn), k(t, "(", zn), k(t, ")", Hn), k(t, "<", jn), k(t, ">", Vn), k(t, "(", qn), k(t, ")", Wn), k(t, "「", Kn), k(t, "」", Un), k(t, "『", Jn), k(t, "』", Gn), k(t, "<", Yn), k(t, ">", Xn), k(t, "&", Qn), k(t, "*", er), k(t, "@", ze), k(t, "`", nr), k(t, "^", rr), k(t, ":", je), k(t, ",", vs), k(t, "$", ir), k(t, ".", ke), k(t, "=", sr), k(t, "!", Cs), k(t, "-", Se), k(t, "%", or), k(t, "|", lr), k(t, "+", ar), k(t, "#", cr), k(t, "?", dr), k(t, '"', Es), k(t, "/", xe), k(t, ";", Ts), k(t, "~", Ut), k(t, "_", ur), k(t, "\\", tr);
14420
+ gn == null && (gn = Go(wg)), yn == null && (yn = Go(Ag)), k(t, "'", Zn), k(t, "{", Wt), k(t, "}", Kt), k(t, "[", $n), k(t, "]", Fn), k(t, "(", zn), k(t, ")", Hn), k(t, "<", jn), k(t, ">", Vn), k(t, "(", qn), k(t, ")", Wn), k(t, "「", Kn), k(t, "」", Un), k(t, "『", Jn), k(t, "』", Gn), k(t, "<", Yn), k(t, ">", Xn), k(t, "&", Qn), k(t, "*", er), k(t, "@", ze), k(t, "`", nr), k(t, "^", rr), k(t, ":", je), k(t, ",", vs), k(t, "$", ir), k(t, ".", ke), k(t, "=", sr), k(t, "!", Cs), k(t, "-", Se), k(t, "%", or), k(t, "|", lr), k(t, "+", ar), k(t, "#", cr), k(t, "?", ur), k(t, '"', Es), k(t, "/", xe), k(t, ";", Ts), k(t, "~", Ut), k(t, "_", dr), k(t, "\\", tr);
14421
14421
  const r = ce(t, Ci, xs, {
14422
14422
  [Ki]: !0
14423
14423
  });
@@ -14442,11 +14442,11 @@ function Lg(n) {
14442
14442
  ce(l, vi, l), k(l, Rg, l);
14443
14443
  const a = k(l, _g);
14444
14444
  ce(a, vi, l);
14445
- const c = [[yt, i]], d = [[yt, null], [Oi, s]];
14446
- for (let u = 0; u < gn.length; u++)
14447
- Be(t, gn[u], Xi, Ae, c);
14448
- for (let u = 0; u < yn.length; u++)
14449
- Be(t, yn[u], Qi, Yi, d);
14445
+ const c = [[yt, i]], u = [[yt, null], [Oi, s]];
14446
+ for (let d = 0; d < gn.length; d++)
14447
+ Be(t, gn[d], Xi, Ae, c);
14448
+ for (let d = 0; d < yn.length; d++)
14449
+ Be(t, yn[d], Qi, Yi, u);
14450
14450
  it(Xi, {
14451
14451
  tld: !0,
14452
14452
  ascii: !0
@@ -14459,9 +14459,9 @@ function Lg(n) {
14459
14459
  }, e), it(St, {
14460
14460
  slashscheme: !0,
14461
14461
  ascii: !0
14462
- }, e), n = n.sort((u, f) => u[0] > f[0] ? 1 : -1);
14463
- for (let u = 0; u < n.length; u++) {
14464
- const f = n[u][0], p = n[u][1] ? {
14462
+ }, e), n = n.sort((d, f) => d[0] > f[0] ? 1 : -1);
14463
+ for (let d = 0; d < n.length; d++) {
14464
+ const f = n[d][0], p = n[d][1] ? {
14465
14465
  [Ng]: !0
14466
14466
  } : {
14467
14467
  [Pg]: !0
@@ -14481,11 +14481,11 @@ function Bg(n, e) {
14481
14481
  const t = $g(e.replace(/[A-Z]/g, (l) => l.toLowerCase())), r = t.length, i = [];
14482
14482
  let s = 0, o = 0;
14483
14483
  for (; o < r; ) {
14484
- let l = n, a = null, c = 0, d = null, u = -1, f = -1;
14484
+ let l = n, a = null, c = 0, u = null, d = -1, f = -1;
14485
14485
  for (; o < r && (a = l.go(t[o])); )
14486
- l = a, l.accepts() ? (u = 0, f = 0, d = l) : u >= 0 && (u += t[o].length, f++), c += t[o].length, s += t[o].length, o++;
14487
- s -= u, o -= f, c -= u, i.push({
14488
- t: d.t,
14486
+ l = a, l.accepts() ? (d = 0, f = 0, u = l) : d >= 0 && (d += t[o].length, f++), c += t[o].length, s += t[o].length, o++;
14487
+ s -= d, o -= f, c -= d, i.push({
14488
+ t: u.t,
14489
14489
  // token type/name
14490
14490
  v: e.slice(s - c, s),
14491
14491
  // string value
@@ -14720,12 +14720,12 @@ Ka.prototype = {
14720
14720
  * @param {Options} options Formattinng options
14721
14721
  */
14722
14722
  render(n) {
14723
- const e = this, t = this.toHref(n.get("defaultProtocol")), r = n.get("formatHref", t, this), i = n.get("tagName", t, e), s = this.toFormattedString(n), o = {}, l = n.get("className", t, e), a = n.get("target", t, e), c = n.get("rel", t, e), d = n.getObj("attributes", t, e), u = n.getObj("events", t, e);
14724
- return o.href = r, l && (o.class = l), a && (o.target = a), c && (o.rel = c), d && Pt(o, d), {
14723
+ const e = this, t = this.toHref(n.get("defaultProtocol")), r = n.get("formatHref", t, this), i = n.get("tagName", t, e), s = this.toFormattedString(n), o = {}, l = n.get("className", t, e), a = n.get("target", t, e), c = n.get("rel", t, e), u = n.getObj("attributes", t, e), d = n.getObj("events", t, e);
14724
+ return o.href = r, l && (o.class = l), a && (o.target = a), c && (o.rel = c), u && Pt(o, u), {
14725
14725
  tagName: i,
14726
14726
  attributes: o,
14727
14727
  content: s,
14728
- eventListeners: u
14728
+ eventListeners: d
14729
14729
  };
14730
14730
  }
14731
14731
  };
@@ -14764,36 +14764,36 @@ const Xo = Gr("email", {
14764
14764
  const n = this.tk;
14765
14765
  return n.length >= 2 && n[0].t !== sn && n[1].t === je;
14766
14766
  }
14767
- }), de = (n) => new re(n);
14767
+ }), ue = (n) => new re(n);
14768
14768
  function zg(n) {
14769
14769
  let {
14770
14770
  groups: e
14771
14771
  } = n;
14772
- const t = e.domain.concat([Qn, er, ze, tr, nr, rr, ir, sr, Se, xs, or, lr, ar, cr, xe, fr, Ut, ur]), r = [Zn, je, vs, ke, Cs, dr, Es, Ts, jn, Vn, Wt, Kt, Fn, $n, zn, Hn, qn, Wn, Kn, Un, Jn, Gn, Yn, Xn], i = [Qn, Zn, er, tr, nr, rr, ir, sr, Se, Wt, Kt, or, lr, ar, cr, dr, xe, fr, Ut, ur], s = de(), o = k(s, Ut);
14772
+ const t = e.domain.concat([Qn, er, ze, tr, nr, rr, ir, sr, Se, xs, or, lr, ar, cr, xe, fr, Ut, dr]), r = [Zn, je, vs, ke, Cs, ur, Es, Ts, jn, Vn, Wt, Kt, Fn, $n, zn, Hn, qn, Wn, Kn, Un, Jn, Gn, Yn, Xn], i = [Qn, Zn, er, tr, nr, rr, ir, sr, Se, Wt, Kt, or, lr, ar, cr, ur, xe, fr, Ut, dr], s = ue(), o = k(s, Ut);
14773
14773
  M(o, i, o), M(o, e.domain, o);
14774
- const l = de(), a = de(), c = de();
14774
+ const l = ue(), a = ue(), c = ue();
14775
14775
  M(s, e.domain, l), M(s, e.scheme, a), M(s, e.slashscheme, c), M(l, i, o), M(l, e.domain, l);
14776
- const d = k(l, ze);
14777
- k(o, ze, d), k(a, ze, d), k(c, ze, d);
14778
- const u = k(o, ke);
14779
- M(u, i, o), M(u, e.domain, o);
14780
- const f = de();
14781
- M(d, e.domain, f), M(f, e.domain, f);
14776
+ const u = k(l, ze);
14777
+ k(o, ze, u), k(a, ze, u), k(c, ze, u);
14778
+ const d = k(o, ke);
14779
+ M(d, i, o), M(d, e.domain, o);
14780
+ const f = ue();
14781
+ M(u, e.domain, f), M(f, e.domain, f);
14782
14782
  const h = k(f, ke);
14783
14783
  M(h, e.domain, f);
14784
- const p = de(Xo);
14785
- M(h, e.tld, p), M(h, e.utld, p), k(d, sn, p);
14784
+ const p = ue(Xo);
14785
+ M(h, e.tld, p), M(h, e.utld, p), k(u, sn, p);
14786
14786
  const m = k(f, Se);
14787
14787
  M(m, e.domain, f), M(p, e.domain, f), k(p, ke, h), k(p, Se, m);
14788
14788
  const g = k(p, je);
14789
14789
  M(g, e.numeric, Xo);
14790
14790
  const y = k(l, Se), O = k(l, ke);
14791
14791
  M(y, e.domain, l), M(O, i, o), M(O, e.domain, l);
14792
- const E = de(bn);
14793
- M(O, e.tld, E), M(O, e.utld, E), M(E, e.domain, l), M(E, i, o), k(E, ke, O), k(E, Se, y), k(E, ze, d);
14794
- const I = k(E, je), D = de(bn);
14792
+ const E = ue(bn);
14793
+ M(O, e.tld, E), M(O, e.utld, E), M(E, e.domain, l), M(E, i, o), k(E, ke, O), k(E, Se, y), k(E, ze, u);
14794
+ const I = k(E, je), D = ue(bn);
14795
14795
  M(I, e.numeric, D);
14796
- const T = de(bn), _ = de();
14796
+ const T = ue(bn), _ = ue();
14797
14797
  M(T, t, T), M(T, r, _), M(_, t, T), M(_, r, _), k(E, xe, T), k(D, xe, T);
14798
14798
  const P = k(a, je), v = k(c, je), W = k(v, xe), pe = k(W, xe);
14799
14799
  M(a, e.domain, l), k(a, ke, O), k(a, Se, y), M(c, e.domain, l), k(c, ke, O), k(c, Se, y), M(P, e.domain, T), k(P, xe, T), M(pe, e.domain, T), M(pe, t, T), k(pe, xe, T);
@@ -14818,9 +14818,9 @@ function zg(n) {
14818
14818
  for (let It = 0; It < Ze.length; It++) {
14819
14819
  const [Ie, Re] = Ze[It], _e = k(T, Ie);
14820
14820
  k(_, Ie, _e), k(_e, Re, T);
14821
- const oe = de(bn);
14821
+ const oe = ue(bn);
14822
14822
  M(_e, t, oe);
14823
- const Le = de();
14823
+ const Le = ue();
14824
14824
  M(_e, r), M(oe, t, oe), M(oe, r, Le), M(Le, t, oe), M(Le, r, Le), k(oe, Re, T), k(Le, Re, T);
14825
14825
  }
14826
14826
  return k(s, sn, E), k(s, Os, Fg), {
@@ -14831,16 +14831,16 @@ function zg(n) {
14831
14831
  function Hg(n, e, t) {
14832
14832
  let r = t.length, i = 0, s = [], o = [];
14833
14833
  for (; i < r; ) {
14834
- let l = n, a = null, c = null, d = 0, u = null, f = -1;
14834
+ let l = n, a = null, c = null, u = 0, d = null, f = -1;
14835
14835
  for (; i < r && !(a = l.go(t[i].t)); )
14836
14836
  o.push(t[i++]);
14837
14837
  for (; i < r && (c = a || l.go(t[i].t)); )
14838
- a = null, l = c, l.accepts() ? (f = 0, u = l) : f >= 0 && f++, i++, d++;
14838
+ a = null, l = c, l.accepts() ? (f = 0, d = l) : f >= 0 && f++, i++, u++;
14839
14839
  if (f < 0)
14840
- i -= d, i < r && (o.push(t[i]), i++);
14840
+ i -= u, i < r && (o.push(t[i]), i++);
14841
14841
  else {
14842
- o.length > 0 && (s.push(Ei(Qo, e, o)), o = []), i -= f, d -= f;
14843
- const h = u.t, p = t.slice(i - d, i);
14842
+ o.length > 0 && (s.push(Ei(Qo, e, o)), o = []), i -= f, u -= f;
14843
+ const h = d.t, p = t.slice(i - u, i);
14844
14844
  s.push(Ei(h, e, p));
14845
14845
  }
14846
14846
  }
@@ -14909,13 +14909,13 @@ function Ug(n) {
14909
14909
  return;
14910
14910
  const { tr: o } = r, l = _a(t.doc, [...e]);
14911
14911
  if ($a(l).forEach(({ newRange: c }) => {
14912
- const d = La(r.doc, c, (h) => h.isTextblock);
14913
- let u, f;
14914
- if (d.length > 1 ? (u = d[0], f = r.doc.textBetween(u.pos, u.pos + u.node.nodeSize, void 0, " ")) : d.length && r.doc.textBetween(c.from, c.to, " ", " ").endsWith(" ") && (u = d[0], f = r.doc.textBetween(u.pos, c.to, void 0, " ")), u && f) {
14912
+ const u = La(r.doc, c, (h) => h.isTextblock);
14913
+ let d, f;
14914
+ if (u.length > 1 ? (d = u[0], f = r.doc.textBetween(d.pos, d.pos + d.node.nodeSize, void 0, " ")) : u.length && r.doc.textBetween(c.from, c.to, " ", " ").endsWith(" ") && (d = u[0], f = r.doc.textBetween(d.pos, c.to, void 0, " ")), d && f) {
14915
14915
  const h = f.split(" ").filter((g) => g !== "");
14916
14916
  if (h.length <= 0)
14917
14917
  return !1;
14918
- const p = h[h.length - 1], m = u.pos + f.lastIndexOf(p);
14918
+ const p = h[h.length - 1], m = d.pos + f.lastIndexOf(p);
14919
14919
  if (!p)
14920
14920
  return !1;
14921
14921
  ws(p).filter((g) => g.isLink).map((g) => ({
@@ -14941,8 +14941,8 @@ function Jg(n) {
14941
14941
  var i, s;
14942
14942
  if (r.button !== 0 || r.target.nodeName !== "A")
14943
14943
  return !1;
14944
- const l = Ba(e.state, n.type.name), a = r.target, c = (i = a == null ? void 0 : a.href) !== null && i !== void 0 ? i : l.href, d = (s = a == null ? void 0 : a.target) !== null && s !== void 0 ? s : l.target;
14945
- return a && c ? (e.editable && window.open(c, d), !0) : !1;
14944
+ const l = Ba(e.state, n.type.name), a = r.target, c = (i = a == null ? void 0 : a.href) !== null && i !== void 0 ? i : l.href, u = (s = a == null ? void 0 : a.target) !== null && s !== void 0 ? s : l.target;
14945
+ return a && c ? (e.editable && window.open(c, u), !0) : !1;
14946
14946
  }
14947
14947
  }
14948
14948
  });
@@ -15377,13 +15377,13 @@ var ly = function() {
15377
15377
  null,
15378
15378
  null
15379
15379
  );
15380
- const dy = cy.exports;
15381
- function uy(n) {
15380
+ const uy = cy.exports;
15381
+ function dy(n) {
15382
15382
  var e;
15383
- const { char: t, allowSpaces: r, allowedPrefixes: i, startOfLine: s, $position: o } = n, l = gm(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;
15384
- if (!u)
15383
+ const { char: t, allowSpaces: r, allowedPrefixes: i, startOfLine: s, $position: o } = n, l = gm(t), a = new RegExp(`\\s${l}$`), c = s ? "^" : "", u = r ? new RegExp(`${c}${l}.*?(?=\\s${l}|$)`, "gm") : new RegExp(`${c}(?:^)?${l}[^\\s${l}]*`, "gm"), d = ((e = o.nodeBefore) === null || e === void 0 ? void 0 : e.isText) && o.nodeBefore.text;
15384
+ if (!d)
15385
15385
  return null;
15386
- const f = o.pos - u.length, h = Array.from(u.matchAll(d)).pop();
15386
+ const f = o.pos - d.length, h = Array.from(d.matchAll(u)).pop();
15387
15387
  if (!h || h.input === void 0 || h.index === void 0)
15388
15388
  return null;
15389
15389
  const p = h.input.slice(Math.max(0, h.index - 1), h.index), m = new RegExp(`^[${i == null ? void 0 : i.join("")}\0]?$`).test(p);
@@ -15391,7 +15391,7 @@ function uy(n) {
15391
15391
  return null;
15392
15392
  const g = f + h.index;
15393
15393
  let y = g + h[0].length;
15394
- return r && a.test(u.slice(y - 1, y + 1)) && (h[0] += " ", y += 1), g < o.pos && y >= o.pos ? {
15394
+ return r && a.test(d.slice(y - 1, y + 1)) && (h[0] += " ", y += 1), g < o.pos && y >= o.pos ? {
15395
15395
  range: {
15396
15396
  from: g,
15397
15397
  to: y
@@ -15401,9 +15401,9 @@ function uy(n) {
15401
15401
  } : null;
15402
15402
  }
15403
15403
  const fy = new se("suggestion");
15404
- function Ua({ pluginKey: n = fy, 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 }) {
15404
+ function Ua({ pluginKey: n = fy, editor: e, char: t = "@", allowSpaces: r = !1, allowedPrefixes: i = [" "], startOfLine: s = !1, decorationTag: o = "span", decorationClass: l = "suggestion", command: a = () => null, items: c = () => [], render: u = () => ({}), allow: d = () => !0 }) {
15405
15405
  let f;
15406
- const h = d == null ? void 0 : d(), p = new te({
15406
+ const h = u == null ? void 0 : u(), p = new te({
15407
15407
  key: n,
15408
15408
  view() {
15409
15409
  return {
@@ -15464,14 +15464,14 @@ function Ua({ pluginKey: n = fy, editor: e, char: t = "@", allowSpaces: r = !1,
15464
15464
  const { isEditable: E } = e, { composing: I } = e.view, { selection: D } = m, { empty: T, from: _ } = D, P = { ...g };
15465
15465
  if (P.composing = I, E && (T || e.view.composing)) {
15466
15466
  (_ < g.range.from || _ > g.range.to) && !I && !g.composing && (P.active = !1);
15467
- const v = uy({
15467
+ const v = dy({
15468
15468
  char: t,
15469
15469
  allowSpaces: r,
15470
15470
  allowedPrefixes: i,
15471
15471
  startOfLine: s,
15472
15472
  $position: D.$from
15473
15473
  }), W = `id_${Math.floor(Math.random() * 4294967295)}`;
15474
- v && u({ editor: e, state: O, range: v.range }) ? (P.active = !0, P.decorationId = g.decorationId ? g.decorationId : W, P.range = v.range, P.query = v.query, P.text = v.text) : P.active = !1;
15474
+ v && d({ editor: e, state: O, range: v.range }) ? (P.active = !0, P.decorationId = g.decorationId ? g.decorationId : W, P.range = v.range, P.query = v.query, P.text = v.text) : P.active = !1;
15475
15475
  } else
15476
15476
  P.active = !1;
15477
15477
  return P.active || (P.decorationId = null, P.range = { from: 0, to: 0 }, P.query = null, P.text = null), P;
@@ -15502,7 +15502,7 @@ function Ua({ pluginKey: n = fy, editor: e, char: t = "@", allowSpaces: r = !1,
15502
15502
  const hy = {
15503
15503
  name: "SuggestionList",
15504
15504
  components: {
15505
- DtListItem: rd
15505
+ DtListItem: ru
15506
15506
  },
15507
15507
  props: {
15508
15508
  items: {
@@ -15695,7 +15695,7 @@ const xy = Sy.exports, Oy = {
15695
15695
  inline: !0,
15696
15696
  selectable: !0,
15697
15697
  addNodeView() {
15698
- return Ha(dy);
15698
+ return Ha(uy);
15699
15699
  },
15700
15700
  addAttributes() {
15701
15701
  return {
@@ -15848,8 +15848,8 @@ function il(n, e, t, r, i, s) {
15848
15848
  l,
15849
15849
  "right",
15850
15850
  rl
15851
- ), d = n.slice(a.from, c.to);
15852
- Ny(d, cc, Py).forEach((f) => {
15851
+ ), u = n.slice(a.from, c.to);
15852
+ Ny(u, cc, Py).forEach((f) => {
15853
15853
  const h = Dy(f[0]), p = e + a.from + f.index + 1, m = p + h.length;
15854
15854
  i.addMark(p, m, s.create());
15855
15855
  });
@@ -15859,7 +15859,7 @@ function _y(n) {
15859
15859
  return new te({
15860
15860
  key: new se("autolink"),
15861
15861
  appendTransaction: (t, r, i) => {
15862
- const s = t.some((d) => d.docChanged) && !r.doc.eq(i.doc);
15862
+ const s = t.some((u) => u.docChanged) && !r.doc.eq(i.doc);
15863
15863
  if (e && !s)
15864
15864
  return;
15865
15865
  const { tr: o } = i, { textContent: l } = i.doc;
@@ -15868,17 +15868,17 @@ function _y(n) {
15868
15868
  r.doc,
15869
15869
  [...t]
15870
15870
  );
15871
- return $a(a).forEach(({ oldRange: d, newRange: u }) => {
15872
- Ry(u, i.doc, o, n.type), La(
15871
+ return $a(a).forEach(({ oldRange: u, newRange: d }) => {
15872
+ Ry(d, i.doc, o, n.type), La(
15873
15873
  i.doc,
15874
- u,
15874
+ d,
15875
15875
  (h) => h.isTextblock
15876
15876
  ).forEach(({ node: h, pos: p }) => {
15877
15877
  il(
15878
15878
  h.textContent,
15879
15879
  p,
15880
- d.from,
15881
- u.to,
15880
+ u.from,
15881
+ d.to,
15882
15882
  o,
15883
15883
  n.type
15884
15884
  );
@@ -16024,7 +16024,7 @@ const Ly = {
16024
16024
  };
16025
16025
  var Hy = function() {
16026
16026
  var e = this, t = e._self._c;
16027
- return t("node-view-wrapper", { staticClass: "d-d-inline-block" }, [t("dt-link", { staticClass: "dt-link--mention", attrs: { kind: "inverted", href: null } }, [e._v(" " + e._s(e.text) + " ")])], 1);
16027
+ return t("node-view-wrapper", { staticClass: "d-d-inline-block" }, [t("dt-link", { attrs: { kind: "mention" } }, [e._v(" " + e._s(e.text) + " ")])], 1);
16028
16028
  }, jy = [], Vy = /* @__PURE__ */ ee(
16029
16029
  zy,
16030
16030
  Hy,
@@ -16331,7 +16331,7 @@ const Zy = Qy.exports, e0 = {
16331
16331
  return n.push(Ay), n.push(sy.configure({
16332
16332
  types: ["paragraph"],
16333
16333
  defaultAlignment: "left"
16334
- })), n.push(ug.configure({
16334
+ })), n.push(dg.configure({
16335
16335
  HTMLAttributes: {
16336
16336
  class: "dt-rich-text-editor--code-block"
16337
16337
  }
@@ -16445,20 +16445,20 @@ var n0 = function() {
16445
16445
  null,
16446
16446
  null
16447
16447
  );
16448
- const d0 = i0.exports;
16448
+ const u0 = i0.exports;
16449
16449
  export {
16450
16450
  Xr as A,
16451
16451
  a0 as D,
16452
- dn as L,
16452
+ un as L,
16453
16453
  Uc as M,
16454
16454
  fl as P,
16455
16455
  Uy as R,
16456
16456
  qc as S,
16457
- d0 as a,
16457
+ u0 as a,
16458
16458
  Ky as b,
16459
16459
  Fc as c,
16460
16460
  $c as d,
16461
- rd as e,
16461
+ ru as e,
16462
16462
  es as f,
16463
16463
  hl as g,
16464
16464
  Ic as h,
@@ -16473,6 +16473,6 @@ export {
16473
16473
  xc as q,
16474
16474
  Lt as r,
16475
16475
  gc as s,
16476
- dt as t,
16477
- dl as u
16476
+ ut as t,
16477
+ ul as u
16478
16478
  };