@harbour-enterprises/superdoc 0.9.33 → 0.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/dist/chunks/index-8ZIOYegI.es.js +1676 -0
  2. package/dist/chunks/index-C4-w9MLl.cjs +1 -0
  3. package/dist/chunks/{index--PIRPKWt.cjs → index-ChNh-3hE.cjs} +1 -1
  4. package/dist/chunks/{index-B5GDfEJg.es.js → index-DlBXCtmW.es.js} +1 -1
  5. package/dist/chunks/{super-editor.es-B8noCvT1.es.js → super-editor.es-BJjuGvyp.es.js} +453 -465
  6. package/dist/chunks/{super-editor.es-y2QD_ueu.cjs → super-editor.es-BR6yWvHn.cjs} +40 -40
  7. package/dist/chunks/{url-BDmRlERW.es.js → url-B0oWkmAx.es.js} +1 -1
  8. package/dist/chunks/{url-C5DCBLAS.cjs → url-CzUL97Mg.cjs} +1 -1
  9. package/dist/chunks/xml-js-DLnxZypp.es.js +1764 -0
  10. package/dist/chunks/xml-js-zfoNze4t.cjs +10 -0
  11. package/dist/super-editor/chunks/{converter-CdhiEvSA.js → converter-C35FY5VQ.js} +4 -6
  12. package/dist/super-editor/chunks/{docx-zipper-Cb4eXMOp.js → docx-zipper-UI40aP31.js} +1 -1
  13. package/dist/super-editor/chunks/{editor-Czx51mKu.js → editor-CO6h1K8S.js} +302 -312
  14. package/dist/super-editor/chunks/{toolbar-BE-PZVKR.js → toolbar-CM60amWZ.js} +2 -2
  15. package/dist/super-editor/converter.es.js +1 -1
  16. package/dist/super-editor/docx-zipper.es.js +2 -2
  17. package/dist/super-editor/editor.es.js +3 -3
  18. package/dist/super-editor/file-zipper.es.js +1 -1
  19. package/dist/super-editor/super-editor.es.js +6 -6
  20. package/dist/super-editor/tests/e2e/test-app/vite.config.d.ts +1 -1
  21. package/dist/super-editor/toolbar.es.js +2 -2
  22. package/dist/super-editor.cjs +1 -1
  23. package/dist/super-editor.es.js +1 -1
  24. package/dist/superdoc.cjs +3 -3
  25. package/dist/superdoc.es.js +6 -6
  26. package/dist/superdoc.umd.js +878 -890
  27. package/dist/superdoc.umd.js.map +1 -1
  28. package/package.json +1 -1
  29. package/dist/chunks/index-Bq_aNm9n.es.js +0 -473
  30. package/dist/chunks/index-DrgTIkvI.cjs +0 -1
  31. package/dist/chunks/xml-js-DMX8C2aY.es.js +0 -2965
  32. package/dist/chunks/xml-js-DN6JJ8Mw.cjs +0 -10
  33. package/dist/super-editor/tests/e2e/test-app/dist/assets/index-DX0vnkoa.d.ts +0 -3
  34. package/dist/super-editor/tests/e2e/test-app/dist/assets/index-DX0vnkoa.d.ts.map +0 -1
@@ -7,9 +7,9 @@ var P = (t, e, n) => ff(t, typeof e != "symbol" ? e + "" : e, n), Ho = (t, e, n)
7
7
  var Ge = (t, e, n) => (Ho(t, e, "read from private field"), n ? n.call(t) : e.get(t)), ft = (t, e, n) => e.has(t) ? Ys("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), jo = (t, e, n, r) => (Ho(t, e, "write to private field"), r ? r.call(t, n) : e.set(t, n), n), I = (t, e, n) => (Ho(t, e, "access private method"), n);
8
8
  import * as T from "yjs";
9
9
  import { UndoManager as pf, Item as hf, ContentType as mf, Text as gf, XmlElement as yf } from "yjs";
10
- import { P as G, a as Z, M as dr, N as F, S as Y, T as H, b as W, D as Vn, F as E, c as An, d as bf, e as Jl, A as Ar, p as ie, B as wf, f as Yl, i as vf, g as wt, l as Or, h as Ht, j as Gl, r as Zl, R as sn, o as ur, k as $t, m as bi, n as Ql, q as ue, s as $e, v as Do, t as kn, u as kf, w as Se, x as to, y as ec, z as Cn, C as Wo, E as Uo, G as qo, H as no, I as Cf, J as Gs, K as Zs, L as Sf, O as Mf, Q as xf } from "./converter-CdhiEvSA.js";
10
+ import { P as G, a as Z, M as cr, N as B, S as Y, T as H, b as W, D as $n, F as E, c as An, d as bf, e as Jl, A as Ar, p as ie, B as wf, f as Yl, i as vf, g as wt, l as Or, h as Ht, j as Gl, r as Zl, R as sn, o as dr, k as $t, m as bi, n as Ql, q as ue, s as $e, v as Do, t as kn, u as kf, w as Se, x as to, y as ec, z as Cn, C as Wo, E as Uo, G as qo, H as no, I as Cf, J as Gs, K as Zs, L as Sf, O as Mf, Q as xf } from "./converter-C35FY5VQ.js";
11
11
  import { ref as Qs, computed as Af, createElementBlock as Kt, openBlock as Xt, withModifiers as Ko, Fragment as Of, renderList as Tf, normalizeClass as Df, createCommentVNode as ea, toDisplayString as Xo, createElementVNode as Nf, createApp as Ef } from "vue";
12
- import { D as ta } from "./docx-zipper-Cb4eXMOp.js";
12
+ import { D as ta } from "./docx-zipper-UI40aP31.js";
13
13
  function No(t) {
14
14
  const { from: e, to: n, empty: r } = t.selection, o = [];
15
15
  return r ? (t.storedMarks && o.push(...t.storedMarks), o.push(...t.selection.$head.marks())) : t.doc.nodesBetween(e, n, (i) => {
@@ -212,7 +212,7 @@ class Xe {
212
212
  return c > Bf && (a = Ff(a, c), s -= c), new Xe(a.append(i), s);
213
213
  }
214
214
  remapping(e, n) {
215
- let r = new dr();
215
+ let r = new cr();
216
216
  return this.items.forEach((o, i) => {
217
217
  let s = o.mirrorOffset != null && i - o.mirrorOffset >= e ? r.maps.length - o.mirrorOffset : void 0;
218
218
  r.appendMap(o.map, s);
@@ -481,7 +481,7 @@ const jf = Q.create({
481
481
  for (var e = 0; ; e++)
482
482
  if (t = t.previousSibling, !t)
483
483
  return e;
484
- }, Dn = function(t) {
484
+ }, Tn = function(t) {
485
485
  let e = t.assignedSlot || t.parentNode;
486
486
  return e && e.nodeType == 11 ? e.host : e;
487
487
  };
@@ -587,7 +587,7 @@ function Yf(t, e, n) {
587
587
  }
588
588
  const ot = typeof navigator < "u" ? navigator : null, sa = typeof document < "u" ? document : null, jt = ot && ot.userAgent || "", vi = /Edge\/(\d+)/.exec(jt), ic = /MSIE \d/.exec(jt), ki = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(jt), Oe = !!(ic || ki || vi), Lt = ic ? document.documentMode : ki ? +ki[1] : vi ? +vi[1] : 0, Je = !Oe && /gecko\/(\d+)/i.test(jt);
589
589
  Je && +(/Firefox\/(\d+)/.exec(jt) || [0, 0])[1];
590
- const Ci = !Oe && /Chrome\/(\d+)/.exec(jt), be = !!Ci, sc = Ci ? +Ci[1] : 0, Me = !Oe && !!ot && /Apple Computer/.test(ot.vendor), Nn = Me && (/Mobile\/\w+/.test(jt) || !!ot && ot.maxTouchPoints > 2), _e = Nn || (ot ? /Mac/.test(ot.platform) : !1), Gf = ot ? /Win/.test(ot.platform) : !1, bt = /Android \d/.test(jt), Dr = !!sa && "webkitFontSmoothing" in sa.documentElement.style, Zf = Dr ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
590
+ const Ci = !Oe && /Chrome\/(\d+)/.exec(jt), be = !!Ci, sc = Ci ? +Ci[1] : 0, Me = !Oe && !!ot && /Apple Computer/.test(ot.vendor), Dn = Me && (/Mobile\/\w+/.test(jt) || !!ot && ot.maxTouchPoints > 2), _e = Dn || (ot ? /Mac/.test(ot.platform) : !1), Gf = ot ? /Win/.test(ot.platform) : !1, bt = /Android \d/.test(jt), Dr = !!sa && "webkitFontSmoothing" in sa.documentElement.style, Zf = Dr ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
591
591
  function Qf(t) {
592
592
  let e = t.defaultView && t.defaultView.visualViewport;
593
593
  return e ? {
@@ -618,7 +618,7 @@ function aa(t, e, n) {
618
618
  let r = t.someProp("scrollThreshold") || 0, o = t.someProp("scrollMargin") || 5, i = t.dom.ownerDocument;
619
619
  for (let s = n || t.dom; s; ) {
620
620
  if (s.nodeType != 1) {
621
- s = Dn(s);
621
+ s = Tn(s);
622
622
  continue;
623
623
  }
624
624
  let a = s, l = a == i.body, c = l ? Qf(i) : ep(a), d = 0, u = 0;
@@ -634,7 +634,7 @@ function aa(t, e, n) {
634
634
  let f = l ? "fixed" : getComputedStyle(s).position;
635
635
  if (/^(fixed|sticky)$/.test(f))
636
636
  break;
637
- s = f == "absolute" ? s.offsetParent : Dn(s);
637
+ s = f == "absolute" ? s.offsetParent : Tn(s);
638
638
  }
639
639
  }
640
640
  function tp(t) {
@@ -653,7 +653,7 @@ function tp(t) {
653
653
  }
654
654
  function ac(t) {
655
655
  let e = [], n = t.ownerDocument;
656
- for (let r = t; r && (e.push({ dom: r, top: r.scrollTop, left: r.scrollLeft }), t != n); r = Dn(r))
656
+ for (let r = t; r && (e.push({ dom: r, top: r.scrollTop, left: r.scrollLeft }), t != n); r = Tn(r))
657
657
  ;
658
658
  return e;
659
659
  }
@@ -774,7 +774,7 @@ function lp(t, e) {
774
774
  return null;
775
775
  }
776
776
  if (Me)
777
- for (let c = s; r && c; c = Dn(c))
777
+ for (let c = s; r && c; c = Tn(c))
778
778
  c.draggable && (r = void 0);
779
779
  if (s = ip(s, e), r) {
780
780
  if (Je && r.nodeType == 1 && (o = Math.min(o, r.childNodes.length), o < r.childNodes.length)) {
@@ -811,13 +811,13 @@ function uc(t, e, n) {
811
811
  if (c.top == l.top) {
812
812
  let d = Tt(mt(r, o, o + 1), -1);
813
813
  if (d.top != l.top)
814
- return Xn(d, d.left < c.left);
814
+ return Kn(d, d.left < c.left);
815
815
  }
816
816
  }
817
817
  return l;
818
818
  } else {
819
819
  let l = o, c = o, d = n < 0 ? 1 : -1;
820
- return n < 0 && !o ? (c++, d = -1) : n >= 0 && o == r.nodeValue.length ? (l--, d = 1) : n < 0 ? l-- : c++, Xn(Tt(mt(r, l, c), d), d < 0);
820
+ return n < 0 && !o ? (c++, d = -1) : n >= 0 && o == r.nodeValue.length ? (l--, d = 1) : n < 0 ? l-- : c++, Kn(Tt(mt(r, l, c), d), d < 0);
821
821
  }
822
822
  if (!t.state.doc.resolve(e - (i || 0)).parent.inlineContent) {
823
823
  if (i == null && o && (n < 0 || o == ze(r))) {
@@ -835,7 +835,7 @@ function uc(t, e, n) {
835
835
  if (i == null && o && (n < 0 || o == ze(r))) {
836
836
  let l = r.childNodes[o - 1], c = l.nodeType == 3 ? mt(l, ze(l) - (s ? 0 : 1)) : l.nodeType == 1 && (l.nodeName != "BR" || !l.nextSibling) ? l : null;
837
837
  if (c)
838
- return Xn(Tt(c, 1), !1);
838
+ return Kn(Tt(c, 1), !1);
839
839
  }
840
840
  if (i == null && o < ze(r)) {
841
841
  let l = r.childNodes[o];
@@ -843,11 +843,11 @@ function uc(t, e, n) {
843
843
  l = l.nextSibling;
844
844
  let c = l ? l.nodeType == 3 ? mt(l, 0, s ? 0 : 1) : l.nodeType == 1 ? l : null : null;
845
845
  if (c)
846
- return Xn(Tt(c, -1), !0);
846
+ return Kn(Tt(c, -1), !0);
847
847
  }
848
- return Xn(Tt(r.nodeType == 3 ? mt(r) : r, -n), n >= 0);
848
+ return Kn(Tt(r.nodeType == 3 ? mt(r) : r, -n), n >= 0);
849
849
  }
850
- function Xn(t, e) {
850
+ function Kn(t, e) {
851
851
  if (t.width == 0)
852
852
  return t;
853
853
  let n = e ? t.left : t.right;
@@ -1326,7 +1326,7 @@ class ln extends Nr {
1326
1326
  }
1327
1327
  static create(e, n, r, o) {
1328
1328
  let i = o.nodeViews[n.type.name], s = i && i(n, o, r);
1329
- return (!s || !s.dom) && (s = Vn.renderSpec(document, n.type.spec.toDOM(n, r), null, n.attrs)), new ln(e, n, s.dom, s.contentDOM || s.dom, s);
1329
+ return (!s || !s.dom) && (s = $n.renderSpec(document, n.type.spec.toDOM(n, r), null, n.attrs)), new ln(e, n, s.dom, s.contentDOM || s.dom, s);
1330
1330
  }
1331
1331
  parseRule() {
1332
1332
  return this.dirty & it || this.mark.type.spec.reparseInView ? null : { mark: this.mark.type.name, attrs: this.mark.attrs, contentElement: this.contentDOM };
@@ -1381,7 +1381,7 @@ class Ft extends Nr {
1381
1381
  d = document.createTextNode(n.text);
1382
1382
  else if (d.nodeType != 3)
1383
1383
  throw new RangeError("Text must be rendered as a DOM text node");
1384
- } else d || ({ dom: d, contentDOM: u } = Vn.renderSpec(document, n.type.spec.toDOM(n), null, n.attrs));
1384
+ } else d || ({ dom: d, contentDOM: u } = $n.renderSpec(document, n.type.spec.toDOM(n), null, n.attrs));
1385
1385
  !u && !n.isText && d.nodeName != "BR" && (d.hasAttribute("contenteditable") || (d.contentEditable = "false"), n.type.spec.draggable && (d.draggable = !0));
1386
1386
  let f = d;
1387
1387
  return d = yc(d, r, n), c ? l = new mp(e, n, r, o, d, u || null, f, c, i, s + 1) : n.isText ? new Po(e, n, r, o, d, f, i) : new Ft(e, n, r, o, d, u || null, f, i, s + 1);
@@ -1427,7 +1427,7 @@ class Ft extends Nr {
1427
1427
  l.syncToMarks(c.marks, r, e);
1428
1428
  let p;
1429
1429
  l.findNodeMatch(c, d, u, f) || a && e.state.selection.from > o && e.state.selection.to < o + c.nodeSize && (p = l.findIndexWithChild(i.node)) > -1 && l.updateNodeAt(c, d, u, p, e) || l.updateNextNode(c, d, u, e, f, o) || l.addNode(c, d, u, e, o), o += c.nodeSize;
1430
- }), l.syncToMarks([], r, e), this.node.isTextblock && l.addTextblockHacks(), l.destroyRest(), (l.changed || this.dirty == Zt) && (s && this.protectLocalComposition(e, s), mc(this.contentDOM, this.children, e), Nn && kp(this.dom));
1430
+ }), l.syncToMarks([], r, e), this.node.isTextblock && l.addTextblockHacks(), l.destroyRest(), (l.changed || this.dirty == Zt) && (s && this.protectLocalComposition(e, s), mc(this.contentDOM, this.children, e), Dn && kp(this.dom));
1431
1431
  }
1432
1432
  localCompositionInfo(e, n) {
1433
1433
  let { from: r, to: o } = e.state.selection;
@@ -1597,22 +1597,22 @@ function mc(t, e, n) {
1597
1597
  r = ha(r), o = !0;
1598
1598
  o && n.trackWrites == t && (n.trackWrites = null);
1599
1599
  }
1600
- const tr = function(t) {
1600
+ const er = function(t) {
1601
1601
  t && (this.nodeName = t);
1602
1602
  };
1603
- tr.prototype = /* @__PURE__ */ Object.create(null);
1604
- const Qt = [new tr()];
1603
+ er.prototype = /* @__PURE__ */ Object.create(null);
1604
+ const Qt = [new er()];
1605
1605
  function Si(t, e, n) {
1606
1606
  if (t.length == 0)
1607
1607
  return Qt;
1608
- let r = n ? Qt[0] : new tr(), o = [r];
1608
+ let r = n ? Qt[0] : new er(), o = [r];
1609
1609
  for (let i = 0; i < t.length; i++) {
1610
1610
  let s = t[i].type.attrs;
1611
1611
  if (s) {
1612
- s.nodeName && o.push(r = new tr(s.nodeName));
1612
+ s.nodeName && o.push(r = new er(s.nodeName));
1613
1613
  for (let a in s) {
1614
1614
  let l = s[a];
1615
- l != null && (n && o.length == 1 && o.push(r = new tr(e.isInline ? "span" : "div")), a == "class" ? r.class = (r.class ? r.class + " " : "") + l : a == "style" ? r.style = (r.style ? r.style + ";" : "") + l : a != "nodeName" && (r[a] = l));
1615
+ l != null && (n && o.length == 1 && o.push(r = new er(e.isInline ? "span" : "div")), a == "class" ? r.class = (r.class ? r.class + " " : "") + l : a == "style" ? r.style = (r.style ? r.style + ";" : "") + l : a != "nodeName" && (r[a] = l));
1616
1616
  }
1617
1617
  }
1618
1618
  }
@@ -1947,9 +1947,9 @@ function gs(t, e = null) {
1947
1947
  for (l = s; o && !o.node; )
1948
1948
  o = o.parent;
1949
1949
  let u = o.node;
1950
- if (o && u.isAtom && F.isSelectable(u) && o.parent && !(u.isInline && Xf(n.focusNode, n.focusOffset, o.dom))) {
1950
+ if (o && u.isAtom && B.isSelectable(u) && o.parent && !(u.isInline && Xf(n.focusNode, n.focusOffset, o.dom))) {
1951
1951
  let f = o.posBefore;
1952
- c = new F(s == f ? a : r.resolve(f));
1952
+ c = new B(s == f ? a : r.resolve(f));
1953
1953
  }
1954
1954
  } else {
1955
1955
  if (n instanceof t.dom.ownerDocument.defaultView.Selection && n.rangeCount > 1) {
@@ -2031,7 +2031,7 @@ function Mp(t) {
2031
2031
  o ? n.setStart(r.parentNode, me(r) + 1) : n.setStart(r, 0), n.collapse(!0), e.removeAllRanges(), e.addRange(n), !o && !t.state.selection.visible && Oe && Lt <= 11 && (r.disabled = !0, r.disabled = !1);
2032
2032
  }
2033
2033
  function wc(t, e) {
2034
- if (e instanceof F) {
2034
+ if (e instanceof B) {
2035
2035
  let n = t.docView.descAt(e.from);
2036
2036
  n != t.lastSelectedViewDesc && (ba(t), n && n.selectNode(), t.lastSelectedViewDesc = n);
2037
2037
  } else
@@ -2079,17 +2079,17 @@ function va(t, e, n) {
2079
2079
  } else if (r.empty) {
2080
2080
  if (t.endOfTextblock(e > 0 ? "forward" : "backward")) {
2081
2081
  let o = xi(t.state, e);
2082
- return o && o instanceof F ? Nt(t, o) : !1;
2082
+ return o && o instanceof B ? Nt(t, o) : !1;
2083
2083
  } else if (!(_e && n.indexOf("m") > -1)) {
2084
2084
  let o = r.$head, i = o.textOffset ? null : e < 0 ? o.nodeBefore : o.nodeAfter, s;
2085
2085
  if (!i || i.isText)
2086
2086
  return !1;
2087
2087
  let a = e < 0 ? o.pos - i.nodeSize : o.pos;
2088
- return i.isAtom || (s = t.docView.descAt(a)) && !s.contentDOM ? F.isSelectable(i) ? Nt(t, new F(e < 0 ? t.state.doc.resolve(o.pos - i.nodeSize) : o)) : Dr ? Nt(t, new H(t.state.doc.resolve(e < 0 ? a : a + i.nodeSize))) : !1 : !1;
2088
+ return i.isAtom || (s = t.docView.descAt(a)) && !s.contentDOM ? B.isSelectable(i) ? Nt(t, new B(e < 0 ? t.state.doc.resolve(o.pos - i.nodeSize) : o)) : Dr ? Nt(t, new H(t.state.doc.resolve(e < 0 ? a : a + i.nodeSize))) : !1 : !1;
2089
2089
  }
2090
2090
  } else return !1;
2091
2091
  else {
2092
- if (r instanceof F && r.node.isInline)
2092
+ if (r instanceof B && r.node.isInline)
2093
2093
  return Nt(t, new H(e > 0 ? r.$to : r.$from));
2094
2094
  {
2095
2095
  let o = xi(t.state, e);
@@ -2100,7 +2100,7 @@ function va(t, e, n) {
2100
2100
  function ho(t) {
2101
2101
  return t.nodeType == 3 ? t.nodeValue.length : t.childNodes.length;
2102
2102
  }
2103
- function nr(t, e) {
2103
+ function tr(t, e) {
2104
2104
  let n = t.pmViewDesc;
2105
2105
  return n && n.size == 0 && (e < 0 || t.nextSibling || t.nodeName != "BR");
2106
2106
  }
@@ -2112,13 +2112,13 @@ function Ap(t) {
2112
2112
  if (!n)
2113
2113
  return;
2114
2114
  let o, i, s = !1;
2115
- for (Je && n.nodeType == 1 && r < ho(n) && nr(n.childNodes[r], -1) && (s = !0); ; )
2115
+ for (Je && n.nodeType == 1 && r < ho(n) && tr(n.childNodes[r], -1) && (s = !0); ; )
2116
2116
  if (r > 0) {
2117
2117
  if (n.nodeType != 1)
2118
2118
  break;
2119
2119
  {
2120
2120
  let a = n.childNodes[r - 1];
2121
- if (nr(a, -1))
2121
+ if (tr(a, -1))
2122
2122
  o = n, i = --r;
2123
2123
  else if (a.nodeType == 3)
2124
2124
  n = a, r = n.nodeValue.length;
@@ -2130,7 +2130,7 @@ function Ap(t) {
2130
2130
  break;
2131
2131
  {
2132
2132
  let a = n.previousSibling;
2133
- for (; a && nr(a, -1); )
2133
+ for (; a && tr(a, -1); )
2134
2134
  o = n.parentNode, i = me(a), a = a.previousSibling;
2135
2135
  if (a)
2136
2136
  n = a, r = ho(n);
@@ -2153,7 +2153,7 @@ function Op(t) {
2153
2153
  if (n.nodeType != 1)
2154
2154
  break;
2155
2155
  let a = n.childNodes[r];
2156
- if (nr(a, 1))
2156
+ if (tr(a, 1))
2157
2157
  i = n, s = ++r;
2158
2158
  else
2159
2159
  break;
@@ -2162,7 +2162,7 @@ function Op(t) {
2162
2162
  break;
2163
2163
  {
2164
2164
  let a = n.nextSibling;
2165
- for (; a && nr(a, 1); )
2165
+ for (; a && tr(a, 1); )
2166
2166
  i = a.parentNode, s = me(a) + 1, a = a.nextSibling;
2167
2167
  if (a)
2168
2168
  n = a, r = 0, o = ho(n);
@@ -2245,7 +2245,7 @@ function Ca(t, e, n) {
2245
2245
  let { $from: o, $to: i } = r;
2246
2246
  if (!o.parent.inlineContent || t.endOfTextblock(e < 0 ? "up" : "down")) {
2247
2247
  let s = xi(t.state, e);
2248
- if (s && s instanceof F)
2248
+ if (s && s instanceof B)
2249
2249
  return Nt(t, s);
2250
2250
  }
2251
2251
  if (!o.parent.inlineContent) {
@@ -2322,7 +2322,7 @@ function bs(t, e) {
2322
2322
  let p = r.firstChild;
2323
2323
  n.push(p.type.name, p.attrs != p.type.defaultAttrs ? p.attrs : null), r = p.content;
2324
2324
  }
2325
- let s = t.someProp("clipboardSerializer") || Vn.fromSchema(t.state.schema), a = Oc(), l = a.createElement("div");
2325
+ let s = t.someProp("clipboardSerializer") || $n.fromSchema(t.state.schema), a = Oc(), l = a.createElement("div");
2326
2326
  l.appendChild(s.serializeFragment(r, { document: a }));
2327
2327
  let c = l.firstChild, d, u = 0;
2328
2328
  for (; c && c.nodeType == 1 && (d = Ac[c.nodeName.toLowerCase()]); ) {
@@ -2355,7 +2355,7 @@ function Cc(t, e, n, r, o) {
2355
2355
  if (u)
2356
2356
  a = u;
2357
2357
  else {
2358
- let f = o.marks(), { schema: p } = t.state, h = Vn.fromSchema(p);
2358
+ let f = o.marks(), { schema: p } = t.state, h = $n.fromSchema(p);
2359
2359
  s = document.createElement("div"), e.split(/(?:\r\n?|\n)+/).forEach((m) => {
2360
2360
  let g = s.appendChild(document.createElement("p"));
2361
2361
  m && g.appendChild(h.serializeNode(p.text(m, f)));
@@ -2552,7 +2552,7 @@ function Wp(t, e) {
2552
2552
  Ae.keydown = (t, e) => {
2553
2553
  let n = e;
2554
2554
  if (t.input.shiftKey = n.keyCode == 16 || n.shiftKey, !Dc(t, n) && (t.input.lastKeyCode = n.keyCode, t.input.lastKeyCodeTime = Date.now(), !(bt && be && n.keyCode == 13)))
2555
- if (n.keyCode != 229 && t.domObserver.forceFlush(), Nn && n.keyCode == 13 && !n.ctrlKey && !n.altKey && !n.metaKey) {
2555
+ if (n.keyCode != 229 && t.domObserver.forceFlush(), Dn && n.keyCode == 13 && !n.ctrlKey && !n.altKey && !n.metaKey) {
2556
2556
  let r = Date.now();
2557
2557
  t.input.lastIOSEnter = r, t.input.lastIOSEnterFallbackTimeout = setTimeout(() => {
2558
2558
  t.input.lastIOSEnter == r && (t.someProp("handleKeyDown", (o) => o(t, Gt(13, "Enter"))), t.input.lastIOSEnter = 0);
@@ -2602,22 +2602,22 @@ function qp(t, e) {
2602
2602
  if (e == -1)
2603
2603
  return !1;
2604
2604
  let n = t.state.doc.resolve(e), r = n.nodeAfter;
2605
- return r && r.isAtom && F.isSelectable(r) ? (On(t, new F(n)), !0) : !1;
2605
+ return r && r.isAtom && B.isSelectable(r) ? (On(t, new B(n)), !0) : !1;
2606
2606
  }
2607
2607
  function Kp(t, e) {
2608
2608
  if (e == -1)
2609
2609
  return !1;
2610
2610
  let n = t.state.selection, r, o;
2611
- n instanceof F && (r = n.node);
2611
+ n instanceof B && (r = n.node);
2612
2612
  let i = t.state.doc.resolve(e);
2613
2613
  for (let s = i.depth + 1; s > 0; s--) {
2614
2614
  let a = s > i.depth ? i.nodeAfter : i.node(s);
2615
- if (F.isSelectable(a)) {
2615
+ if (B.isSelectable(a)) {
2616
2616
  r && n.$from.depth > 0 && s >= n.$from.depth && i.before(n.$from.depth + 1) == n.$from.pos ? o = i.before(n.$from.depth) : o = i.before(s);
2617
2617
  break;
2618
2618
  }
2619
2619
  }
2620
- return o != null ? (On(t, F.create(t.state.doc, o)), !0) : !1;
2620
+ return o != null ? (On(t, B.create(t.state.doc, o)), !0) : !1;
2621
2621
  }
2622
2622
  function Xp(t, e, n, r, o) {
2623
2623
  return vs(t, "handleClickOn", e, n, r) || t.someProp("handleClick", (i) => i(t, e, r)) || (o ? Kp(t, n) : qp(t, n));
@@ -2639,8 +2639,8 @@ function Gp(t, e, n) {
2639
2639
  let s = i > o.depth ? o.nodeAfter : o.node(i), a = o.before(i);
2640
2640
  if (s.inlineContent)
2641
2641
  On(t, H.create(r, a + 1, a + 1 + s.content.size));
2642
- else if (F.isSelectable(s))
2643
- On(t, F.create(r, a));
2642
+ else if (B.isSelectable(s))
2643
+ On(t, B.create(r, a));
2644
2644
  else
2645
2645
  continue;
2646
2646
  return !0;
@@ -2671,7 +2671,7 @@ class Zp {
2671
2671
  const a = o ? null : r.target, l = a ? e.docView.nearestDesc(a, !0) : null;
2672
2672
  this.target = l && l.dom.nodeType == 1 ? l.dom : null;
2673
2673
  let { selection: c } = e.state;
2674
- (r.button == 0 && i.type.spec.draggable && i.type.spec.selectable !== !1 || c instanceof F && c.from <= s && c.to > s) && (this.mightDrag = {
2674
+ (r.button == 0 && i.type.spec.draggable && i.type.spec.selectable !== !1 || c instanceof B && c.from <= s && c.to > s) && (this.mightDrag = {
2675
2675
  node: i,
2676
2676
  pos: s,
2677
2677
  addAttr: !!(this.target && !this.target.draggable),
@@ -2791,12 +2791,12 @@ function nh(t, e) {
2791
2791
  n.parentNode && n.parentNode.removeChild(n), t.focus();
2792
2792
  }, 50);
2793
2793
  }
2794
- const fr = Oe && Lt < 15 || Nn && Zf < 604;
2794
+ const ur = Oe && Lt < 15 || Dn && Zf < 604;
2795
2795
  xe.copy = Ae.cut = (t, e) => {
2796
2796
  let n = e, r = t.state.selection, o = n.type == "cut";
2797
2797
  if (r.empty)
2798
2798
  return;
2799
- let i = fr ? null : n.clipboardData, s = r.content(), { dom: a, text: l } = bs(t, s);
2799
+ let i = ur ? null : n.clipboardData, s = r.content(), { dom: a, text: l } = bs(t, s);
2800
2800
  i ? (n.preventDefault(), i.clearData(), i.setData("text/html", a.innerHTML), i.setData("text/plain", l)) : nh(t, a), o && t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent", "cut"));
2801
2801
  };
2802
2802
  function rh(t) {
@@ -2809,10 +2809,10 @@ function oh(t, e) {
2809
2809
  n || (r.contentEditable = "true"), r.style.cssText = "position: fixed; left: -10000px; top: 10px", r.focus();
2810
2810
  let o = t.input.shiftKey && t.input.lastKeyCode != 45;
2811
2811
  setTimeout(() => {
2812
- t.focus(), r.parentNode && r.parentNode.removeChild(r), n ? pr(t, r.value, null, o, e) : pr(t, r.textContent, r.innerHTML, o, e);
2812
+ t.focus(), r.parentNode && r.parentNode.removeChild(r), n ? fr(t, r.value, null, o, e) : fr(t, r.textContent, r.innerHTML, o, e);
2813
2813
  }, 50);
2814
2814
  }
2815
- function pr(t, e, n, r, o) {
2815
+ function fr(t, e, n, r, o) {
2816
2816
  let i = Cc(t, e, n, r, t.state.selection.$from);
2817
2817
  if (t.someProp("handlePaste", (l) => l(t, o, i || W.empty)))
2818
2818
  return !0;
@@ -2832,8 +2832,8 @@ Ae.paste = (t, e) => {
2832
2832
  let n = e;
2833
2833
  if (t.composing && !bt)
2834
2834
  return;
2835
- let r = fr ? null : n.clipboardData, o = t.input.shiftKey && t.input.lastKeyCode != 45;
2836
- r && pr(t, Ic(r), r.getData("text/html"), o, n) ? n.preventDefault() : oh(t, n);
2835
+ let r = ur ? null : n.clipboardData, o = t.input.shiftKey && t.input.lastKeyCode != 45;
2836
+ r && fr(t, Ic(r), r.getData("text/html"), o, n) ? n.preventDefault() : oh(t, n);
2837
2837
  };
2838
2838
  class Pc {
2839
2839
  constructor(e, n, r) {
@@ -2850,16 +2850,16 @@ xe.dragstart = (t, e) => {
2850
2850
  if (r && r.done(), !n.dataTransfer)
2851
2851
  return;
2852
2852
  let o = t.state.selection, i = o.empty ? null : t.posAtCoords(Ro(n)), s;
2853
- if (!(i && i.pos >= o.from && i.pos <= (o instanceof F ? o.to - 1 : o.to))) {
2853
+ if (!(i && i.pos >= o.from && i.pos <= (o instanceof B ? o.to - 1 : o.to))) {
2854
2854
  if (r && r.mightDrag)
2855
- s = F.create(t.state.doc, r.mightDrag.pos);
2855
+ s = B.create(t.state.doc, r.mightDrag.pos);
2856
2856
  else if (n.target && n.target.nodeType == 1) {
2857
2857
  let u = t.docView.nearestDesc(n.target, !0);
2858
- u && u.node.type.spec.draggable && u != t.docView && (s = F.create(t.state.doc, u.posBefore));
2858
+ u && u.node.type.spec.draggable && u != t.docView && (s = B.create(t.state.doc, u.posBefore));
2859
2859
  }
2860
2860
  }
2861
2861
  let a = (s || t.state.selection).content(), { dom: l, text: c, slice: d } = bs(t, a);
2862
- (!n.dataTransfer.files.length || !be || sc > 120) && n.dataTransfer.clearData(), n.dataTransfer.setData(fr ? "Text" : "text/html", l.innerHTML), n.dataTransfer.effectAllowed = "copyMove", fr || n.dataTransfer.setData("text/plain", c), t.dragging = new Pc(d, Rc(t, n), s);
2862
+ (!n.dataTransfer.files.length || !be || sc > 120) && n.dataTransfer.clearData(), n.dataTransfer.setData(ur ? "Text" : "text/html", l.innerHTML), n.dataTransfer.effectAllowed = "copyMove", ur || n.dataTransfer.setData("text/plain", c), t.dragging = new Pc(d, Rc(t, n), s);
2863
2863
  };
2864
2864
  xe.dragend = (t) => {
2865
2865
  let e = t.dragging;
@@ -2878,7 +2878,7 @@ Ae.drop = (t, e) => {
2878
2878
  let i = t.state.doc.resolve(o.pos), s = r && r.slice;
2879
2879
  s ? t.someProp("transformPasted", (h) => {
2880
2880
  s = h(s, t);
2881
- }) : s = Cc(t, Ic(n.dataTransfer), fr ? null : n.dataTransfer.getData("text/html"), !1, i);
2881
+ }) : s = Cc(t, Ic(n.dataTransfer), ur ? null : n.dataTransfer.getData("text/html"), !1, i);
2882
2882
  let a = !!(r && Rc(t, n));
2883
2883
  if (t.someProp("handleDrop", (h) => h(t, n, s || W.empty, a))) {
2884
2884
  n.preventDefault();
@@ -2898,8 +2898,8 @@ Ae.drop = (t, e) => {
2898
2898
  if (u ? c.replaceRangeWith(d, d, s.content.firstChild) : c.replaceRange(d, d, s), c.doc.eq(f))
2899
2899
  return;
2900
2900
  let p = c.doc.resolve(d);
2901
- if (u && F.isSelectable(s.content.firstChild) && p.nodeAfter && p.nodeAfter.sameMarkup(s.content.firstChild))
2902
- c.setSelection(new F(p));
2901
+ if (u && B.isSelectable(s.content.firstChild) && p.nodeAfter && p.nodeAfter.sameMarkup(s.content.firstChild))
2902
+ c.setSelection(new B(p));
2903
2903
  else {
2904
2904
  let h = c.mapping.map(l);
2905
2905
  c.mapping.maps[c.mapping.maps.length - 1].forEach((m, g, b, w) => h = w), c.setSelection(ys(t, p, c.doc.resolve(h)));
@@ -2929,7 +2929,7 @@ xe.beforeinput = (t, e) => {
2929
2929
  };
2930
2930
  for (let t in Ae)
2931
2931
  xe[t] = Ae[t];
2932
- function hr(t, e) {
2932
+ function pr(t, e) {
2933
2933
  if (t == e)
2934
2934
  return !0;
2935
2935
  for (let n in t)
@@ -2952,7 +2952,7 @@ class go {
2952
2952
  return !0;
2953
2953
  }
2954
2954
  eq(e) {
2955
- return this == e || e instanceof go && (this.spec.key && this.spec.key == e.spec.key || this.toDOM == e.toDOM && hr(this.spec, e.spec));
2955
+ return this == e || e instanceof go && (this.spec.key && this.spec.key == e.spec.key || this.toDOM == e.toDOM && pr(this.spec, e.spec));
2956
2956
  }
2957
2957
  destroy(e) {
2958
2958
  this.spec.destroy && this.spec.destroy(e);
@@ -2970,7 +2970,7 @@ class Bt {
2970
2970
  return n.from < n.to;
2971
2971
  }
2972
2972
  eq(e) {
2973
- return this == e || e instanceof Bt && hr(this.attrs, e.attrs) && hr(this.spec, e.spec);
2973
+ return this == e || e instanceof Bt && pr(this.attrs, e.attrs) && pr(this.spec, e.spec);
2974
2974
  }
2975
2975
  static is(e) {
2976
2976
  return e.type instanceof Bt;
@@ -2994,7 +2994,7 @@ class Cs {
2994
2994
  return o == n.from && !(i = e.child(r)).isText && o + i.nodeSize == n.to;
2995
2995
  }
2996
2996
  eq(e) {
2997
- return this == e || e instanceof Cs && hr(this.attrs, e.attrs) && hr(this.spec, e.spec);
2997
+ return this == e || e instanceof Cs && pr(this.attrs, e.attrs) && pr(this.spec, e.spec);
2998
2998
  }
2999
2999
  destroy() {
3000
3000
  }
@@ -3071,7 +3071,7 @@ class $ {
3071
3071
  }
3072
3072
  }
3073
3073
  const Sn = [], tn = {};
3074
- class B {
3074
+ class F {
3075
3075
  /**
3076
3076
  @internal
3077
3077
  */
@@ -3125,7 +3125,7 @@ class B {
3125
3125
  let l = this.local[a].map(e, r, o);
3126
3126
  l && l.type.valid(n, l) ? (s || (s = [])).push(l) : i.onRemove && i.onRemove(this.local[a].spec);
3127
3127
  }
3128
- return this.children.length ? sh(this.children, s || [], e, n, r, o, i) : s ? new B(s.sort(nn), Sn) : ye;
3128
+ return this.children.length ? sh(this.children, s || [], e, n, r, o, i) : s ? new F(s.sort(nn), Sn) : ye;
3129
3129
  }
3130
3130
  /**
3131
3131
  Add the given array of decorations to the ones in the set,
@@ -3134,7 +3134,7 @@ class B {
3134
3134
  structure.
3135
3135
  */
3136
3136
  add(e, n) {
3137
- return n.length ? this == ye ? B.create(e, n) : this.addInner(e, n, 0) : this;
3137
+ return n.length ? this == ye ? F.create(e, n) : this.addInner(e, n, 0) : this;
3138
3138
  }
3139
3139
  addInner(e, n, r) {
3140
3140
  let o, i = 0;
@@ -3149,7 +3149,7 @@ class B {
3149
3149
  let s = Lc(i ? Bc(n) : n, -r);
3150
3150
  for (let a = 0; a < s.length; a++)
3151
3151
  s[a].type.valid(e, s[a]) || s.splice(a--, 1);
3152
- return new B(s.length ? this.local.concat(s).sort(nn) : this.local, o || this.children);
3152
+ return new F(s.length ? this.local.concat(s).sort(nn) : this.local, o || this.children);
3153
3153
  }
3154
3154
  /**
3155
3155
  Create a new set that contains the decorations in this set, minus
@@ -3176,13 +3176,13 @@ class B {
3176
3176
  for (let a = 0; a < o.length; a++)
3177
3177
  o[a].eq(s, n) && (o == this.local && (o = this.local.slice()), o.splice(a--, 1));
3178
3178
  }
3179
- return r == this.children && o == this.local ? this : o.length || r.length ? new B(o, r) : ye;
3179
+ return r == this.children && o == this.local ? this : o.length || r.length ? new F(o, r) : ye;
3180
3180
  }
3181
3181
  forChild(e, n) {
3182
3182
  if (this == ye)
3183
3183
  return this;
3184
3184
  if (n.isLeaf)
3185
- return B.empty;
3185
+ return F.empty;
3186
3186
  let r, o;
3187
3187
  for (let a = 0; a < this.children.length; a += 3)
3188
3188
  if (this.children[a] >= e) {
@@ -3198,7 +3198,7 @@ class B {
3198
3198
  }
3199
3199
  }
3200
3200
  if (o) {
3201
- let a = new B(o.sort(nn), Sn);
3201
+ let a = new F(o.sort(nn), Sn);
3202
3202
  return r ? new Et([a, r]) : a;
3203
3203
  }
3204
3204
  return r || ye;
@@ -3209,7 +3209,7 @@ class B {
3209
3209
  eq(e) {
3210
3210
  if (this == e)
3211
3211
  return !0;
3212
- if (!(e instanceof B) || this.local.length != e.local.length || this.children.length != e.children.length)
3212
+ if (!(e instanceof F) || this.local.length != e.local.length || this.children.length != e.children.length)
3213
3213
  return !1;
3214
3214
  for (let n = 0; n < this.local.length; n++)
3215
3215
  if (!this.local[n].eq(e.local[n]))
@@ -3242,9 +3242,9 @@ class B {
3242
3242
  e(this);
3243
3243
  }
3244
3244
  }
3245
- B.empty = new B([], []);
3246
- B.removeOverlap = Ss;
3247
- const ye = B.empty;
3245
+ F.empty = new F([], []);
3246
+ F.removeOverlap = Ss;
3247
+ const ye = F.empty;
3248
3248
  class Et {
3249
3249
  constructor(e) {
3250
3250
  this.members = e;
@@ -3255,7 +3255,7 @@ class Et {
3255
3255
  }
3256
3256
  forChild(e, n) {
3257
3257
  if (n.isLeaf)
3258
- return B.empty;
3258
+ return F.empty;
3259
3259
  let r = [];
3260
3260
  for (let o = 0; o < this.members.length; o++) {
3261
3261
  let i = this.members[o].forChild(e, n);
@@ -3295,7 +3295,7 @@ class Et {
3295
3295
  case 1:
3296
3296
  return e[0];
3297
3297
  default:
3298
- return new Et(e.every((n) => n instanceof B) ? e : e.reduce((n, r) => n.concat(r instanceof B ? r : r.members), []));
3298
+ return new Et(e.every((n) => n instanceof F) ? e : e.reduce((n, r) => n.concat(r instanceof F ? r : r.members), []));
3299
3299
  }
3300
3300
  }
3301
3301
  forEachSet(e) {
@@ -3350,7 +3350,7 @@ function sh(t, e, n, r, o, i, s) {
3350
3350
  a.splice(f, 0, d.children[u], d.children[u + 1], d.children[u + 2]);
3351
3351
  }
3352
3352
  }
3353
- return new B(e.sort(nn), a);
3353
+ return new F(e.sort(nn), a);
3354
3354
  }
3355
3355
  function Lc(t, e) {
3356
3356
  if (!e || !t.length)
@@ -3402,7 +3402,7 @@ function yo(t, e, n, r) {
3402
3402
  let s = Lc(i ? Bc(t) : t, -n).sort(nn);
3403
3403
  for (let a = 0; a < s.length; a++)
3404
3404
  s[a].type.valid(e, s[a]) || (r.onRemove && r.onRemove(s[a].spec), s.splice(a--, 1));
3405
- return s.length || o.length ? new B(s, o) : ye;
3405
+ return s.length || o.length ? new F(s, o) : ye;
3406
3406
  }
3407
3407
  function nn(t, e) {
3408
3408
  return t.from - e.from || t.to - e.to;
@@ -3435,7 +3435,7 @@ function ti(t) {
3435
3435
  return t.someProp("decorations", (n) => {
3436
3436
  let r = n(t.state);
3437
3437
  r && r != ye && e.push(r);
3438
- }), t.cursorWrapper && e.push(B.create(t.state.doc, [t.cursorWrapper.deco])), Et.from(e);
3438
+ }), t.cursorWrapper && e.push(F.create(t.state.doc, [t.cursorWrapper.deco])), Et.from(e);
3439
3439
  }
3440
3440
  const lh = {
3441
3441
  childList: !0,
@@ -3520,9 +3520,9 @@ class uh {
3520
3520
  if (!e.focusNode)
3521
3521
  return !0;
3522
3522
  let n = /* @__PURE__ */ new Set(), r;
3523
- for (let i = e.focusNode; i; i = Dn(i))
3523
+ for (let i = e.focusNode; i; i = Tn(i))
3524
3524
  n.add(i);
3525
- for (let i = e.anchorNode; i; i = Dn(i))
3525
+ for (let i = e.anchorNode; i; i = Tn(i))
3526
3526
  if (n.has(i)) {
3527
3527
  r = i;
3528
3528
  break;
@@ -3694,7 +3694,7 @@ function bh(t, e, n, r, o) {
3694
3694
  let l = t.state.selection, c = mh(t, e, n), d = t.state.doc, u = d.slice(c.from, c.to), f, p;
3695
3695
  t.input.lastKeyCode === 8 && Date.now() - 100 < t.input.lastKeyCodeTime ? (f = t.state.selection.to, p = "end") : (f = t.state.selection.from, p = "start"), t.input.lastKeyCode = null;
3696
3696
  let h = kh(u.content, c.doc.content, c.from, f, p);
3697
- if (h && t.input.domChangeCount++, (Nn && t.input.lastIOSEnter > Date.now() - 225 || bt) && o.some((M) => M.nodeType == 1 && !yh.test(M.nodeName)) && (!h || h.endA >= h.endB) && t.someProp("handleKeyDown", (M) => M(t, Gt(13, "Enter")))) {
3697
+ if (h && t.input.domChangeCount++, (Dn && t.input.lastIOSEnter > Date.now() - 225 || bt) && o.some((M) => M.nodeType == 1 && !yh.test(M.nodeName)) && (!h || h.endA >= h.endB) && t.someProp("handleKeyDown", (M) => M(t, Gt(13, "Enter")))) {
3698
3698
  t.input.lastIOSEnter = 0;
3699
3699
  return;
3700
3700
  }
@@ -3713,7 +3713,7 @@ function bh(t, e, n, r, o) {
3713
3713
  }
3714
3714
  t.state.selection.from < t.state.selection.to && h.start == h.endB && t.state.selection instanceof H && (h.start > t.state.selection.from && h.start <= t.state.selection.from + 2 && t.state.selection.from >= c.from ? h.start = t.state.selection.from : h.endA < t.state.selection.to && h.endA >= t.state.selection.to - 2 && t.state.selection.to <= c.to && (h.endB += t.state.selection.to - h.endA, h.endA = t.state.selection.to)), Oe && Lt <= 11 && h.endB == h.start + 1 && h.endA == h.start && h.start > c.from && c.doc.textBetween(h.start - c.from - 1, h.start - c.from + 1) == "  " && (h.start--, h.endA--, h.endB--);
3715
3715
  let m = c.doc.resolveNoCache(h.start - c.from), g = c.doc.resolveNoCache(h.endB - c.from), b = d.resolve(h.start), w = m.sameParent(g) && m.parent.inlineContent && b.end() >= h.endA, C;
3716
- if ((Nn && t.input.lastIOSEnter > Date.now() - 225 && (!w || o.some((M) => M.nodeName == "DIV" || M.nodeName == "P")) || !w && m.pos < c.doc.content.size && (!m.sameParent(g) || !m.parent.inlineContent) && (C = Y.findFrom(c.doc.resolve(m.pos + 1), 1, !0)) && C.head > m.pos) && t.someProp("handleKeyDown", (M) => M(t, Gt(13, "Enter")))) {
3716
+ if ((Dn && t.input.lastIOSEnter > Date.now() - 225 && (!w || o.some((M) => M.nodeName == "DIV" || M.nodeName == "P")) || !w && m.pos < c.doc.content.size && (!m.sameParent(g) || !m.parent.inlineContent) && (C = Y.findFrom(c.doc.resolve(m.pos + 1), 1, !0)) && C.head > m.pos) && t.someProp("handleKeyDown", (M) => M(t, Gt(13, "Enter")))) {
3717
3717
  t.input.lastIOSEnter = 0;
3718
3718
  return;
3719
3719
  }
@@ -3913,7 +3913,7 @@ class _c {
3913
3913
  scrollToSelection() {
3914
3914
  let e = this.domSelectionRange().focusNode;
3915
3915
  if (!(!e || !this.dom.contains(e.nodeType == 1 ? e : e.parentNode))) {
3916
- if (!this.someProp("handleScrollToSelection", (n) => n(this))) if (this.state.selection instanceof F) {
3916
+ if (!this.someProp("handleScrollToSelection", (n) => n(this))) if (this.state.selection instanceof B) {
3917
3917
  let n = this.docView.domAfterPos(this.state.selection.from);
3918
3918
  n.nodeType == 1 && aa(this, n.getBoundingClientRect(), e);
3919
3919
  } else
@@ -3950,7 +3950,7 @@ class _c {
3950
3950
  let i = r.from + (this.state.doc.content.size - n.doc.content.size);
3951
3951
  (i > 0 && this.state.doc.nodeAt(i)) == r.node && (o = i);
3952
3952
  }
3953
- this.dragging = new Pc(e.slice, e.move, o < 0 ? void 0 : F.create(this.state.doc, o));
3953
+ this.dragging = new Pc(e.slice, e.move, o < 0 ? void 0 : B.create(this.state.doc, o));
3954
3954
  }
3955
3955
  someProp(e, n) {
3956
3956
  let r = this._props && this._props[e], o;
@@ -4099,13 +4099,13 @@ class _c {
4099
4099
  [`handlePaste`](https://prosemirror.net/docs/ref/#view.EditorProps.handlePaste) hook.
4100
4100
  */
4101
4101
  pasteHTML(e, n) {
4102
- return pr(this, "", e, !1, n || new ClipboardEvent("paste"));
4102
+ return fr(this, "", e, !1, n || new ClipboardEvent("paste"));
4103
4103
  }
4104
4104
  /**
4105
4105
  Run the editor's paste logic with the given plain-text input.
4106
4106
  */
4107
4107
  pasteText(e, n) {
4108
- return pr(this, e, null, !0, n || new ClipboardEvent("paste"));
4108
+ return fr(this, e, null, !0, n || new ClipboardEvent("paste"));
4109
4109
  }
4110
4110
  /**
4111
4111
  Serialize the given slice as it would be if it was copied from
@@ -4211,16 +4211,16 @@ function Ba(t) {
4211
4211
  if (t.spec.state || t.spec.filterTransaction || t.spec.appendTransaction)
4212
4212
  throw new RangeError("Plugins passed directly to the view must not have a state component");
4213
4213
  }
4214
- const mr = Math.floor, Mh = Math.abs, _t = (t, e) => t < e ? t : e, En = (t, e) => t > e ? t : e, xh = (t) => t !== 0 ? t < 0 : 1 / t < 0, Ah = 64, gr = 128, Oh = 1 << 29, _a = 63, rr = 127, Th = 2147483647, Dh = Number.isInteger || ((t) => typeof t == "number" && isFinite(t) && mr(t) === t), Nh = () => /* @__PURE__ */ new Set(), Eh = Array.isArray, Ih = String.fromCharCode, Ph = (t) => t.toLowerCase(), Rh = /^\s*/g, Lh = (t) => t.replace(Rh, ""), Fh = /([A-Z])/g, za = (t, e) => Lh(t.replace(Fh, (n) => `${e}${Ph(n)}`)), Bh = (t) => {
4214
+ const hr = Math.floor, Mh = Math.abs, _t = (t, e) => t < e ? t : e, Nn = (t, e) => t > e ? t : e, xh = (t) => t !== 0 ? t < 0 : 1 / t < 0, Ah = 64, mr = 128, Oh = 1 << 29, _a = 63, nr = 127, Th = 2147483647, Dh = Number.isInteger || ((t) => typeof t == "number" && isFinite(t) && hr(t) === t), Nh = () => /* @__PURE__ */ new Set(), Eh = Array.isArray, Ih = String.fromCharCode, Ph = (t) => t.toLowerCase(), Rh = /^\s*/g, Lh = (t) => t.replace(Rh, ""), Fh = /([A-Z])/g, za = (t, e) => Lh(t.replace(Fh, (n) => `${e}${Ph(n)}`)), Bh = (t) => {
4215
4215
  const e = unescape(encodeURIComponent(t)), n = e.length, r = new Uint8Array(n);
4216
4216
  for (let o = 0; o < n; o++)
4217
4217
  r[o] = /** @type {number} */
4218
4218
  e.codePointAt(o);
4219
4219
  return r;
4220
- }, yr = (
4220
+ }, gr = (
4221
4221
  /** @type {TextEncoder} */
4222
4222
  typeof TextEncoder < "u" ? new TextEncoder() : null
4223
- ), _h = (t) => yr.encode(t), zh = yr ? _h : Bh;
4223
+ ), _h = (t) => gr.encode(t), zh = gr ? _h : Bh;
4224
4224
  let ri = typeof TextDecoder > "u" ? null : new TextDecoder("utf-8", { fatal: !0, ignoreBOM: !0 });
4225
4225
  ri && ri.decode(new Uint8Array()).length === 1 && (ri = null);
4226
4226
  class $h {
@@ -4246,41 +4246,41 @@ const Vh = () => new $h(), Hh = (t) => {
4246
4246
  return e.set(new Uint8Array(t.cbuf.buffer, 0, t.cpos), n), e;
4247
4247
  }, Uh = (t, e) => {
4248
4248
  const n = t.cbuf.length;
4249
- n - t.cpos < e && (t.bufs.push(new Uint8Array(t.cbuf.buffer, 0, t.cpos)), t.cbuf = new Uint8Array(En(n, e) * 2), t.cpos = 0);
4249
+ n - t.cpos < e && (t.bufs.push(new Uint8Array(t.cbuf.buffer, 0, t.cpos)), t.cbuf = new Uint8Array(Nn(n, e) * 2), t.cpos = 0);
4250
4250
  }, pe = (t, e) => {
4251
4251
  const n = t.cbuf.length;
4252
4252
  t.cpos === n && (t.bufs.push(t.cbuf), t.cbuf = new Uint8Array(n * 2), t.cpos = 0), t.cbuf[t.cpos++] = e;
4253
- }, br = (t, e) => {
4254
- for (; e > rr; )
4255
- pe(t, gr | rr & e), e = mr(e / 128);
4256
- pe(t, rr & e);
4253
+ }, yr = (t, e) => {
4254
+ for (; e > nr; )
4255
+ pe(t, mr | nr & e), e = hr(e / 128);
4256
+ pe(t, nr & e);
4257
4257
  }, qh = (t, e) => {
4258
4258
  const n = xh(e);
4259
- for (n && (e = -e), pe(t, (e > _a ? gr : 0) | (n ? Ah : 0) | _a & e), e = mr(e / 64); e > 0; )
4260
- pe(t, (e > rr ? gr : 0) | rr & e), e = mr(e / 128);
4259
+ for (n && (e = -e), pe(t, (e > _a ? mr : 0) | (n ? Ah : 0) | _a & e), e = hr(e / 64); e > 0; )
4260
+ pe(t, (e > nr ? mr : 0) | nr & e), e = hr(e / 128);
4261
4261
  }, Di = new Uint8Array(3e4), Kh = Di.length / 3, Xh = (t, e) => {
4262
4262
  if (e.length < Kh) {
4263
- const n = yr.encodeInto(e, Di).written || 0;
4264
- br(t, n);
4263
+ const n = gr.encodeInto(e, Di).written || 0;
4264
+ yr(t, n);
4265
4265
  for (let r = 0; r < n; r++)
4266
4266
  pe(t, Di[r]);
4267
4267
  } else
4268
4268
  zc(t, zh(e));
4269
4269
  }, Jh = (t, e) => {
4270
4270
  const n = unescape(encodeURIComponent(e)), r = n.length;
4271
- br(t, r);
4271
+ yr(t, r);
4272
4272
  for (let o = 0; o < r; o++)
4273
4273
  pe(
4274
4274
  t,
4275
4275
  /** @type {number} */
4276
4276
  n.codePointAt(o)
4277
4277
  );
4278
- }, $a = yr && /** @type {any} */
4279
- yr.encodeInto ? Xh : Jh, Yh = (t, e) => {
4278
+ }, $a = gr && /** @type {any} */
4279
+ gr.encodeInto ? Xh : Jh, Yh = (t, e) => {
4280
4280
  const n = t.cbuf.length, r = t.cpos, o = _t(n - r, e.length), i = e.length - o;
4281
- t.cbuf.set(e.subarray(0, o), r), t.cpos += o, i > 0 && (t.bufs.push(t.cbuf), t.cbuf = new Uint8Array(En(n * 2, i)), t.cbuf.set(e.subarray(o)), t.cpos = i);
4281
+ t.cbuf.set(e.subarray(0, o), r), t.cpos += o, i > 0 && (t.bufs.push(t.cbuf), t.cbuf = new Uint8Array(Nn(n * 2, i)), t.cbuf.set(e.subarray(o)), t.cpos = i);
4282
4282
  }, zc = (t, e) => {
4283
- br(t, e.byteLength), Yh(t, e);
4283
+ yr(t, e.byteLength), Yh(t, e);
4284
4284
  }, Ms = (t, e) => {
4285
4285
  Uh(t, e);
4286
4286
  const n = new DataView(t.cbuf.buffer, t.cpos, e);
@@ -4303,7 +4303,7 @@ yr.encodeInto ? Xh : Jh, Yh = (t, e) => {
4303
4303
  if (e === null)
4304
4304
  pe(t, 126);
4305
4305
  else if (Eh(e)) {
4306
- pe(t, 117), br(t, e.length);
4306
+ pe(t, 117), yr(t, e.length);
4307
4307
  for (let n = 0; n < e.length; n++)
4308
4308
  Ni(t, e[n]);
4309
4309
  } else if (e instanceof Uint8Array)
@@ -4311,7 +4311,7 @@ yr.encodeInto ? Xh : Jh, Yh = (t, e) => {
4311
4311
  else {
4312
4312
  pe(t, 118);
4313
4313
  const n = Object.keys(e);
4314
- br(t, n.length);
4314
+ yr(t, n.length);
4315
4315
  for (let r = 0; r < n.length; r++) {
4316
4316
  const o = n[r];
4317
4317
  $a(t, o), Ni(t, e[o]);
@@ -4359,7 +4359,7 @@ yr.encodeInto ? Xh : Jh, Yh = (t, e) => {
4359
4359
  remove: t.length - n - r,
4360
4360
  insert: e.slice(n, e.length - r)
4361
4361
  };
4362
- }, cm = lm, te = new G("y-sync"), zt = new G("y-undo"), qr = new G("yjs-cursor"), dm = Math.random, um = (t) => t[mr(dm() * t.length)], Ha = (t) => t === void 0 ? null : t;
4362
+ }, cm = lm, te = new G("y-sync"), zt = new G("y-undo"), qr = new G("yjs-cursor"), dm = Math.random, um = (t) => t[hr(dm() * t.length)], Ha = (t) => t === void 0 ? null : t;
4363
4363
  class fm {
4364
4364
  constructor() {
4365
4365
  this.map = /* @__PURE__ */ new Map();
@@ -4383,11 +4383,11 @@ try {
4383
4383
  typeof localStorage < "u" && localStorage && (jc = localStorage, pm = !1);
4384
4384
  } catch {
4385
4385
  }
4386
- const hm = jc, In = typeof ie < "u" && ie.release && /node|io\.js/.test(ie.release.name) && Object.prototype.toString.call(typeof ie < "u" ? ie : 0) === "[object process]", Wc = typeof window < "u" && typeof document < "u" && !In;
4386
+ const hm = jc, En = typeof ie < "u" && ie.release && /node|io\.js/.test(ie.release.name) && Object.prototype.toString.call(typeof ie < "u" ? ie : 0) === "[object process]", Wc = typeof window < "u" && typeof document < "u" && !En;
4387
4387
  let Ze;
4388
4388
  const mm = () => {
4389
4389
  if (Ze === void 0)
4390
- if (In) {
4390
+ if (En) {
4391
4391
  Ze = oo();
4392
4392
  const t = ie.argv;
4393
4393
  let e = null;
@@ -4403,11 +4403,11 @@ const mm = () => {
4403
4403
  }
4404
4404
  })) : Ze = oo();
4405
4405
  return Ze;
4406
- }, Ei = (t) => mm().has(t), Ii = (t) => Ha(In ? ie.env[t.toUpperCase().replaceAll("-", "_")] : hm.getItem(t)), Uc = (t) => Ei("--" + t) || Ii(t) !== null;
4406
+ }, Ei = (t) => mm().has(t), Ii = (t) => Ha(En ? ie.env[t.toUpperCase().replaceAll("-", "_")] : hm.getItem(t)), Uc = (t) => Ei("--" + t) || Ii(t) !== null;
4407
4407
  Uc("production");
4408
- const gm = In && om(ie.env.FORCE_COLOR, ["true", "1", "2"]);
4408
+ const gm = En && om(ie.env.FORCE_COLOR, ["true", "1", "2"]);
4409
4409
  gm || !Ei("--no-colors") && // @todo deprecate --no-colors
4410
- !Uc("no-color") && (!In || ie.stdout.isTTY) && (!In || Ei("--color") || Ii("COLORTERM") !== null || (Ii("TERM") || "").includes("color"));
4410
+ !Uc("no-color") && (!En || ie.stdout.isTTY) && (!En || Ei("--color") || Ii("COLORTERM") !== null || (Ii("TERM") || "").includes("color"));
4411
4411
  const ym = (
4412
4412
  /** @type {Document} */
4413
4413
  typeof document < "u" ? document : {}
@@ -4526,7 +4526,7 @@ class Am {
4526
4526
  if (n % 64 !== 0) {
4527
4527
  for (this._W.fill(0, s, 16); n < e.length; )
4528
4528
  this._W[s] |= e[n] << (3 - n % 4) * 8, n++;
4529
- this._W[s] |= gr << (3 - n % 4) * 8;
4529
+ this._W[s] |= mr << (3 - n % 4) * 8;
4530
4530
  }
4531
4531
  this._updateHash();
4532
4532
  }
@@ -4536,7 +4536,7 @@ class Am {
4536
4536
  for (; n < e.length; o++)
4537
4537
  for (let s = 3; s >= 0 && n < e.length; s--)
4538
4538
  this._W[o] |= e[n++] << s * 8;
4539
- r || (this._W[o - (n % 4 === 0 ? 0 : 1)] |= gr << (3 - n % 4) * 8), this._W[14] = e.byteLength / Oh, this._W[15] = e.byteLength * 8, this._updateHash();
4539
+ r || (this._W[o - (n % 4 === 0 ? 0 : 1)] |= mr << (3 - n % 4) * 8), this._W[14] = e.byteLength / Oh, this._W[15] = e.byteLength * 8, this._updateHash();
4540
4540
  const i = new Uint8Array(32);
4541
4541
  for (let s = 0; s < this._H.length; s++)
4542
4542
  for (let a = 0; a < 4; a++)
@@ -4657,27 +4657,19 @@ e.sv.get(t.id.client) > t.id.clock && !T.isDeleted(e.ds, t.id), Lm = [{ light: "
4657
4657
  if (e !== null && e.anchor !== null && e.head !== null)
4658
4658
  if (e.type === "all")
4659
4659
  t.setSelection(new Ar(t.doc));
4660
- else if (e.type === "node") {
4661
- const r = Tn(
4662
- n.doc,
4663
- n.type,
4664
- e.anchor,
4665
- n.mapping
4666
- );
4667
- t.setSelection(F.create(t.doc, r));
4668
- } else {
4669
- const r = Tn(
4660
+ else {
4661
+ const r = wr(
4670
4662
  n.doc,
4671
4663
  n.type,
4672
4664
  e.anchor,
4673
4665
  n.mapping
4674
- ), o = Tn(
4666
+ ), o = wr(
4675
4667
  n.doc,
4676
4668
  n.type,
4677
4669
  e.head,
4678
4670
  n.mapping
4679
4671
  );
4680
- r !== null && o !== null && t.setSelection(H.between(t.doc.resolve(r), t.doc.resolve(o)));
4672
+ r !== null && o !== null && (t = t.setSelection(H.create(t.doc, r, o)));
4681
4673
  }
4682
4674
  }, Pi = (t, e) => ({
4683
4675
  type: (
@@ -4743,7 +4735,7 @@ class zm {
4743
4735
  unrenderSnapshot() {
4744
4736
  this.mapping.clear(), this.mux(() => {
4745
4737
  const e = this.type.toArray().map(
4746
- (r) => or(
4738
+ (r) => rr(
4747
4739
  /** @type {Y.XmlElement} */
4748
4740
  r,
4749
4741
  this.prosemirrorView.state.schema,
@@ -4760,7 +4752,7 @@ class zm {
4760
4752
  _forceRerender() {
4761
4753
  this.mapping.clear(), this.mux(() => {
4762
4754
  const e = this.beforeTransactionSelection !== null ? null : this.prosemirrorView.state.selection, n = this.type.toArray().map(
4763
- (o) => or(
4755
+ (o) => rr(
4764
4756
  /** @type {Y.XmlElement} */
4765
4757
  o,
4766
4758
  this.prosemirrorView.state.schema,
@@ -4772,7 +4764,7 @@ class zm {
4772
4764
  new W(E.from(n), 0, 0)
4773
4765
  );
4774
4766
  if (e) {
4775
- const o = _t(En(e.anchor, 0), r.doc.content.size), i = _t(En(e.head, 0), r.doc.content.size);
4767
+ const o = _t(Nn(e.anchor, 0), r.doc.content.size), i = _t(Nn(e.head, 0), r.doc.content.size);
4776
4768
  r.setSelection(H.create(r.doc, o, i));
4777
4769
  }
4778
4770
  this.prosemirrorView.dispatch(
@@ -4824,7 +4816,7 @@ class zm {
4824
4816
  }, c = T.typeListToArraySnapshot(
4825
4817
  i,
4826
4818
  new T.Snapshot(n.ds, e.sv)
4827
- ).map((u) => !u._item.deleted || bo(u._item, e) || bo(u._item, n) ? or(
4819
+ ).map((u) => !u._item.deleted || bo(u._item, e) || bo(u._item, n) ? rr(
4828
4820
  u,
4829
4821
  this.prosemirrorView.state.schema,
4830
4822
  { mapping: /* @__PURE__ */ new Map(), isOMark: /* @__PURE__ */ new Map() },
@@ -4914,7 +4906,7 @@ const qc = (t, e, n, r, o, i) => {
4914
4906
  );
4915
4907
  if (s === void 0) {
4916
4908
  if (t instanceof T.XmlElement)
4917
- return or(
4909
+ return rr(
4918
4910
  t,
4919
4911
  e,
4920
4912
  n,
@@ -4925,7 +4917,7 @@ const qc = (t, e, n, r, o, i) => {
4925
4917
  throw tm();
4926
4918
  }
4927
4919
  return s;
4928
- }, or = (t, e, n, r, o, i) => {
4920
+ }, rr = (t, e, n, r, o, i) => {
4929
4921
  const s = [], a = (l) => {
4930
4922
  if (l instanceof T.XmlElement) {
4931
4923
  const c = qc(
@@ -5054,11 +5046,11 @@ const qc = (t, e, n, r, o, i) => {
5054
5046
  )?.attrs);
5055
5047
  })
5056
5048
  );
5057
- }, wr = (t, e) => {
5049
+ }, br = (t, e) => {
5058
5050
  if (t instanceof T.XmlElement && !(e instanceof Array) && Fi(t, e)) {
5059
5051
  const n = Lo(e);
5060
5052
  return t._length === n.length && As(t.getAttributes(), e.attrs) && t.toArray().every(
5061
- (r, o) => wr(r, n[o])
5053
+ (r, o) => br(r, n[o])
5062
5054
  );
5063
5055
  }
5064
5056
  return t instanceof T.XmlText && e instanceof Array && Kc(t, e);
@@ -5071,14 +5063,14 @@ const qc = (t, e, n, r, o, i) => {
5071
5063
  const u = r[l], f = o[l];
5072
5064
  if (wo(n.mapping.get(u), f))
5073
5065
  d = !0;
5074
- else if (!wr(u, f))
5066
+ else if (!br(u, f))
5075
5067
  break;
5076
5068
  }
5077
5069
  for (; l + c < a; c++) {
5078
5070
  const u = r[s - c - 1], f = o[i - c - 1];
5079
5071
  if (wo(n.mapping.get(u), f))
5080
5072
  d = !0;
5081
- else if (!wr(u, f))
5073
+ else if (!br(u, f))
5082
5074
  break;
5083
5075
  }
5084
5076
  return {
@@ -5137,7 +5129,7 @@ const qc = (t, e, n, r, o, i) => {
5137
5129
  for (; c < l; c++) {
5138
5130
  const u = s[c], f = o[c];
5139
5131
  if (!wo(r.mapping.get(u), f))
5140
- if (wr(u, f))
5132
+ if (br(u, f))
5141
5133
  r.mapping.set(u, f);
5142
5134
  else
5143
5135
  break;
@@ -5145,7 +5137,7 @@ const qc = (t, e, n, r, o, i) => {
5145
5137
  for (; d + c + 1 < l; d++) {
5146
5138
  const u = s[a - d - 1], f = o[i - d - 1];
5147
5139
  if (!wo(r.mapping.get(u), f))
5148
- if (wr(u, f))
5140
+ if (br(u, f))
5149
5141
  r.mapping.set(u, f);
5150
5142
  else
5151
5143
  break;
@@ -5201,20 +5193,20 @@ const qc = (t, e, n, r, o, i) => {
5201
5193
  }
5202
5194
  }, te);
5203
5195
  }, Fi = (t, e) => !(e instanceof Array) && t.nodeName === e.type.name;
5204
- let ir = null;
5196
+ let or = null;
5205
5197
  const Km = () => {
5206
5198
  const t = (
5207
5199
  /** @type {Map<EditorView, Map<any, any>>} */
5208
- ir
5200
+ or
5209
5201
  );
5210
- ir = null, t.forEach((e, n) => {
5202
+ or = null, t.forEach((e, n) => {
5211
5203
  const r = n.state.tr, o = te.getState(n.state);
5212
5204
  o && o.binding && !o.binding.isDestroyed && (e.forEach((i, s) => {
5213
5205
  r.setMeta(s, i);
5214
5206
  }), n.dispatch(r));
5215
5207
  });
5216
5208
  }, Xm = (t, e, n) => {
5217
- ir || (ir = /* @__PURE__ */ new Map(), xs(0, Km)), Hc(ir, t, oo).set(e, n);
5209
+ or || (or = /* @__PURE__ */ new Map(), xs(0, Km)), Hc(or, t, oo).set(e, n);
5218
5210
  }, vo = (t, e, n) => {
5219
5211
  if (t === 0)
5220
5212
  return T.createRelativePositionFromTypeIndex(e, 0, -1);
@@ -5277,7 +5269,7 @@ const Km = () => {
5277
5269
  }, Jm = (t, e) => {
5278
5270
  let n = null, r = null;
5279
5271
  return t._item === null ? r = T.findRootTypeKey(t) : n = T.createID(t._item.id.client, t._item.id.clock), new T.RelativePosition(n, r, e.id);
5280
- }, Tn = (t, e, n, r) => {
5272
+ }, wr = (t, e, n, r) => {
5281
5273
  const o = T.createAbsolutePositionFromRelativePosition(n, t);
5282
5274
  if (o === null || o.type !== e && !T.isParentOf(e, o.type._item))
5283
5275
  return null;
@@ -5325,7 +5317,7 @@ const Km = () => {
5325
5317
  return s - 1;
5326
5318
  }, Ym = (t, e) => {
5327
5319
  const n = t.toArray().map(
5328
- (r) => or(
5320
+ (r) => rr(
5329
5321
  /** @type {Y.XmlElement} */
5330
5322
  r,
5331
5323
  e,
@@ -5345,30 +5337,30 @@ const Km = () => {
5345
5337
  class: "ProseMirror-yjs-selection"
5346
5338
  }), tg = /^#[0-9a-fA-F]{6}$/, Ua = (t, e, n, r, o) => {
5347
5339
  const i = te.getState(t), s = i.doc, a = [];
5348
- return i.snapshot != null || i.prevSnapshot != null || i.binding.mapping.size === 0 ? B.create(t.doc, []) : (e.getStates().forEach((l, c) => {
5340
+ return i.snapshot != null || i.prevSnapshot != null || i.binding.mapping.size === 0 ? F.create(t.doc, []) : (e.getStates().forEach((l, c) => {
5349
5341
  if (n(s.clientID, c, l) && l.cursor != null) {
5350
5342
  const d = l.user || {};
5351
5343
  d.color == null ? d.color = "#ffa500" : tg.test(d.color) || console.warn("A user uses an unsupported color format", d), d.name == null && (d.name = `User: ${c}`);
5352
- let u = Tn(
5344
+ let u = wr(
5353
5345
  s,
5354
5346
  i.type,
5355
5347
  T.createRelativePositionFromJSON(l.cursor.anchor),
5356
5348
  i.binding.mapping
5357
- ), f = Tn(
5349
+ ), f = wr(
5358
5350
  s,
5359
5351
  i.type,
5360
5352
  T.createRelativePositionFromJSON(l.cursor.head),
5361
5353
  i.binding.mapping
5362
5354
  );
5363
5355
  if (u !== null && f !== null) {
5364
- const p = En(t.doc.content.size - 1, 0);
5356
+ const p = Nn(t.doc.content.size - 1, 0);
5365
5357
  u = _t(u, p), f = _t(f, p), a.push(
5366
5358
  $.widget(f, () => r(d, c), {
5367
5359
  key: c + "",
5368
5360
  side: 10
5369
5361
  })
5370
5362
  );
5371
- const h = _t(u, f), m = En(u, f);
5363
+ const h = _t(u, f), m = Nn(u, f);
5372
5364
  a.push(
5373
5365
  $.inline(h, m, o(d, c), {
5374
5366
  inclusiveEnd: !0,
@@ -5377,7 +5369,7 @@ const Km = () => {
5377
5369
  );
5378
5370
  }
5379
5371
  }
5380
- }), B.create(t.doc, a));
5372
+ }), F.create(t.doc, a));
5381
5373
  }, ng = (t, {
5382
5374
  awarenessStateFilter: e = Zm,
5383
5375
  cursorBuilder: n = Qm,
@@ -5434,7 +5426,7 @@ const Km = () => {
5434
5426
  anchor: f,
5435
5427
  head: p
5436
5428
  });
5437
- } else d.cursor != null && Tn(
5429
+ } else d.cursor != null && wr(
5438
5430
  c.doc,
5439
5431
  c.type,
5440
5432
  T.createRelativePositionFromJSON(d.cursor.anchor),
@@ -5711,7 +5703,7 @@ function Mt(t, e) {
5711
5703
  function Er(t, e) {
5712
5704
  return e.nodes[t] ? "node" : e.marks[t] ? "mark" : null;
5713
5705
  }
5714
- var _n, Yc, Gc;
5706
+ var Bn, Yc, Gc;
5715
5707
  class D {
5716
5708
  /**
5717
5709
  * Get a list of all attributes defined in the extensions.
@@ -5725,7 +5717,7 @@ class D {
5725
5717
  renderDOM: null,
5726
5718
  parseDOM: null,
5727
5719
  keepOnSplit: !0
5728
- }, o = I(this, _n, Yc).call(this, e, r), i = I(this, _n, Gc).call(this, e, r);
5720
+ }, o = I(this, Bn, Yc).call(this, e, r), i = I(this, Bn, Gc).call(this, e, r);
5729
5721
  return n.push(...o, ...i), n;
5730
5722
  }
5731
5723
  /**
@@ -5840,7 +5832,7 @@ class D {
5840
5832
  return r === "node" ? this.getNodeAttributes(e, n) : r === "mark" ? this.getMarkAttributes(e, n) : {};
5841
5833
  }
5842
5834
  }
5843
- _n = new WeakSet(), Yc = function(e, n) {
5835
+ Bn = new WeakSet(), Yc = function(e, n) {
5844
5836
  const r = [], o = (i) => {
5845
5837
  for (const s of i.types) {
5846
5838
  const a = Object.entries(i.attributes);
@@ -5890,7 +5882,7 @@ _n = new WeakSet(), Yc = function(e, n) {
5890
5882
  }
5891
5883
  }
5892
5884
  return r;
5893
- }, ft(D, _n);
5885
+ }, ft(D, Bn);
5894
5886
  function gg(t = {}) {
5895
5887
  return Object.keys(t).length === 0 && t.constructor === Object;
5896
5888
  }
@@ -5898,8 +5890,8 @@ function Bi(t) {
5898
5890
  const e = Object.entries(t).filter(([n, r]) => n === "attrs" && gg(r) ? !1 : r != null);
5899
5891
  return Object.fromEntries(e);
5900
5892
  }
5901
- var zn, Zc, Qc;
5902
- const cr = class cr {
5893
+ var _n, Zc, Qc;
5894
+ const lr = class lr {
5903
5895
  /**
5904
5896
  * Creates PM schema by resolved extensions.
5905
5897
  * @param extensions List of extensions.
@@ -5908,11 +5900,11 @@ const cr = class cr {
5908
5900
  */
5909
5901
  static createSchemaByExtensions(e, n) {
5910
5902
  var c, d;
5911
- const r = e.filter((u) => u.type === "node"), o = e.filter((u) => u.type === "mark"), i = r.find((u) => N(u, "topNode"))?.name, s = D.getAttributesFromExtensions(e), a = I(c = cr, zn, Zc).call(c, r, s, n), l = I(d = cr, zn, Qc).call(d, o, s, n);
5903
+ const r = e.filter((u) => u.type === "node"), o = e.filter((u) => u.type === "mark"), i = r.find((u) => N(u, "topNode"))?.name, s = D.getAttributesFromExtensions(e), a = I(c = lr, _n, Zc).call(c, r, s, n), l = I(d = lr, _n, Qc).call(d, o, s, n);
5912
5904
  return new Yl({ topNode: i, nodes: a, marks: l });
5913
5905
  }
5914
5906
  };
5915
- zn = new WeakSet(), Zc = function(e, n, r) {
5907
+ _n = new WeakSet(), Zc = function(e, n, r) {
5916
5908
  const o = e.map((i) => {
5917
5909
  const s = n.filter((h) => h.type === i.name), a = {
5918
5910
  name: i.name,
@@ -5976,9 +5968,9 @@ zn = new WeakSet(), Zc = function(e, n, r) {
5976
5968
  })), [i.name, c];
5977
5969
  });
5978
5970
  return Object.fromEntries(o);
5979
- }, ft(cr, zn);
5980
- let _i = cr;
5981
- function Gn(t, e) {
5971
+ }, ft(lr, _n);
5972
+ let _i = lr;
5973
+ function Yn(t, e) {
5982
5974
  return e.nodes[t] || e.marks[t] || null;
5983
5975
  }
5984
5976
  function yg(t, e) {
@@ -6103,7 +6095,7 @@ class Fo {
6103
6095
  }
6104
6096
  }
6105
6097
  function bg(t, e) {
6106
- const n = Vn.fromSchema(e).serializeFragment(t), o = document.implementation.createHTMLDocument().createElement("div");
6098
+ const n = $n.fromSchema(e).serializeFragment(t), o = document.implementation.createHTMLDocument().createElement("div");
6107
6099
  return o.appendChild(n), o.innerHTML;
6108
6100
  }
6109
6101
  const wg = (t, e = 500) => {
@@ -6242,16 +6234,16 @@ const kg = (t, e) => {
6242
6234
  });
6243
6235
  return n;
6244
6236
  };
6245
- var $n, ed, td;
6237
+ var zn, ed, td;
6246
6238
  const xn = class xn {
6247
6239
  constructor(e, n, r) {
6248
- ft(this, $n);
6240
+ ft(this, zn);
6249
6241
  P(this, "editor");
6250
6242
  P(this, "schema");
6251
6243
  P(this, "extensions");
6252
6244
  P(this, "externalExtensions", []);
6253
6245
  P(this, "splittableMarks", []);
6254
- this.editor = r, this.externalExtensions = n || [], this.extensions = xn.getResolvedExtensions([...e, ...this.externalExtensions]), this.schema = _i.createSchemaByExtensions(this.extensions, r), I(this, $n, ed).call(this);
6246
+ this.editor = r, this.externalExtensions = n || [], this.extensions = xn.getResolvedExtensions([...e, ...this.externalExtensions]), this.schema = _i.createSchemaByExtensions(this.extensions, r), I(this, zn, ed).call(this);
6255
6247
  }
6256
6248
  /**
6257
6249
  * Static method for creating ExtensionService.
@@ -6298,7 +6290,7 @@ const xn = class xn {
6298
6290
  options: n.options,
6299
6291
  storage: n.storage,
6300
6292
  editor: this.editor,
6301
- type: Gn(n.name, this.schema)
6293
+ type: Yn(n.name, this.schema)
6302
6294
  }, o = N(n, "addCommands", r);
6303
6295
  o && (e = {
6304
6296
  ...e,
@@ -6319,7 +6311,7 @@ const xn = class xn {
6319
6311
  options: i.options,
6320
6312
  storage: i.storage,
6321
6313
  editor: e,
6322
- type: Gn(i.name, this.schema)
6314
+ type: Yn(i.name, this.schema)
6323
6315
  }, a = [], l = N(i, "addShortcuts", s);
6324
6316
  let c = {};
6325
6317
  if (l) {
@@ -6374,7 +6366,7 @@ const xn = class xn {
6374
6366
  return Object.fromEntries(r);
6375
6367
  }
6376
6368
  };
6377
- $n = new WeakSet(), /**
6369
+ zn = new WeakSet(), /**
6378
6370
  * Install all extensions.
6379
6371
  * Create extension storage in the editor, attach editor events.
6380
6372
  */
@@ -6386,9 +6378,9 @@ ed = function() {
6386
6378
  options: e.options,
6387
6379
  storage: e.storage,
6388
6380
  editor: this.editor,
6389
- type: Gn(e.name, this.schema)
6381
+ type: Yn(e.name, this.schema)
6390
6382
  };
6391
- e.type === "mark" && (K(N(e, "keepOnSplit", n)) ?? !0) && this.splittableMarks.push(e.name), I(this, $n, td).call(this, e);
6383
+ e.type === "mark" && (K(N(e, "keepOnSplit", n)) ?? !0) && this.splittableMarks.push(e.name), I(this, zn, td).call(this, e);
6392
6384
  }
6393
6385
  }, /**
6394
6386
  * Attach editor events to extension
@@ -6401,7 +6393,7 @@ td = function(e) {
6401
6393
  options: e.options,
6402
6394
  storage: e.storage,
6403
6395
  editor: this.editor,
6404
- type: Gn(e.name, this.schema)
6396
+ type: Yn(e.name, this.schema)
6405
6397
  }, r = N(e, "onBeforeCreate", n), o = N(e, "onCreate", n), i = N(e, "onUpdate", n), s = N(e, "onSelectionUpdate", n), a = N(e, "onTransaction", n), l = N(e, "onFocus", n), c = N(e, "onBlur", n), d = N(e, "onDestroy", n);
6406
6398
  r && this.editor.on("beforeCreate", r), o && this.editor.on("create", o), i && this.editor.on("update", i), s && this.editor.on("selectionUpdate", s), a && this.editor.on("transaction", a), l && this.editor.on("focus", l), c && this.editor.on("blur", c), d && this.editor.on("destroy", d);
6407
6399
  };
@@ -6432,13 +6424,13 @@ const nd = (t, e, n) => {
6432
6424
  let i = o.nodeBefore;
6433
6425
  if (ud(t, o, e, -1))
6434
6426
  return !0;
6435
- if (r.parent.content.size == 0 && (Pn(i, "end") || F.isSelectable(i)))
6427
+ if (r.parent.content.size == 0 && (In(i, "end") || B.isSelectable(i)))
6436
6428
  for (let s = r.depth; ; s--) {
6437
6429
  let a = Zl(t.doc, r.before(s), r.after(s), W.empty);
6438
6430
  if (a && a.slice.size < a.to - a.from) {
6439
6431
  if (e) {
6440
6432
  let l = t.tr.step(a);
6441
- l.setSelection(Pn(i, "end") ? Y.findFrom(l.doc.resolve(l.mapping.map(o.pos, -1)), -1) : F.create(l.doc, o.pos - i.nodeSize)), e(l.scrollIntoView());
6433
+ l.setSelection(In(i, "end") ? Y.findFrom(l.doc.resolve(l.mapping.map(o.pos, -1)), -1) : B.create(l.doc, o.pos - i.nodeSize)), e(l.scrollIntoView());
6442
6434
  }
6443
6435
  return !0;
6444
6436
  }
@@ -6447,7 +6439,7 @@ const nd = (t, e, n) => {
6447
6439
  }
6448
6440
  return i.isAtom && o.depth == r.depth - 1 ? (e && e(t.tr.delete(o.pos - i.nodeSize, o.pos).scrollIntoView()), !0) : !1;
6449
6441
  };
6450
- function Pn(t, e, n = !1) {
6442
+ function In(t, e, n = !1) {
6451
6443
  for (let r = t; r; r = e == "start" ? r.firstChild : r.lastChild) {
6452
6444
  if (r.isTextblock)
6453
6445
  return !0;
@@ -6466,7 +6458,7 @@ const rd = (t, e, n) => {
6466
6458
  i = od(r);
6467
6459
  }
6468
6460
  let s = i && i.nodeBefore;
6469
- return !s || !F.isSelectable(s) ? !1 : (e && e(t.tr.setSelection(F.create(t.doc, i.pos - s.nodeSize)).scrollIntoView()), !0);
6461
+ return !s || !B.isSelectable(s) ? !1 : (e && e(t.tr.setSelection(B.create(t.doc, i.pos - s.nodeSize)).scrollIntoView()), !0);
6470
6462
  };
6471
6463
  function od(t) {
6472
6464
  if (!t.parent.type.spec.isolating)
@@ -6492,12 +6484,12 @@ const id = (t, e, n) => {
6492
6484
  let i = o.nodeAfter;
6493
6485
  if (ud(t, o, e, 1))
6494
6486
  return !0;
6495
- if (r.parent.content.size == 0 && (Pn(i, "start") || F.isSelectable(i))) {
6487
+ if (r.parent.content.size == 0 && (In(i, "start") || B.isSelectable(i))) {
6496
6488
  let s = Zl(t.doc, r.before(), r.after(), W.empty);
6497
6489
  if (s && s.slice.size < s.to - s.from) {
6498
6490
  if (e) {
6499
6491
  let a = t.tr.step(s);
6500
- a.setSelection(Pn(i, "start") ? Y.findFrom(a.doc.resolve(a.mapping.map(o.pos)), 1) : F.create(a.doc, a.mapping.map(o.pos))), e(a.scrollIntoView());
6492
+ a.setSelection(In(i, "start") ? Y.findFrom(a.doc.resolve(a.mapping.map(o.pos)), 1) : B.create(a.doc, a.mapping.map(o.pos))), e(a.scrollIntoView());
6501
6493
  }
6502
6494
  return !0;
6503
6495
  }
@@ -6513,7 +6505,7 @@ const id = (t, e, n) => {
6513
6505
  i = ad(r);
6514
6506
  }
6515
6507
  let s = i && i.nodeAfter;
6516
- return !s || !F.isSelectable(s) ? !1 : (e && e(t.tr.setSelection(F.create(t.doc, i.pos)).scrollIntoView()), !0);
6508
+ return !s || !B.isSelectable(s) ? !1 : (e && e(t.tr.setSelection(B.create(t.doc, i.pos)).scrollIntoView()), !0);
6517
6509
  };
6518
6510
  function ad(t) {
6519
6511
  if (!t.parent.type.spec.isolating)
@@ -6527,7 +6519,7 @@ function ad(t) {
6527
6519
  return null;
6528
6520
  }
6529
6521
  const Ng = (t, e) => {
6530
- let n = t.selection, r = n instanceof F, o;
6522
+ let n = t.selection, r = n instanceof B, o;
6531
6523
  if (r) {
6532
6524
  if (n.node.isTextblock || !Ht(t.doc, n.from))
6533
6525
  return !1;
@@ -6536,12 +6528,12 @@ const Ng = (t, e) => {
6536
6528
  return !1;
6537
6529
  if (e) {
6538
6530
  let i = t.tr.join(o);
6539
- r && i.setSelection(F.create(i.doc, o - t.doc.resolve(o).nodeBefore.nodeSize)), e(i.scrollIntoView());
6531
+ r && i.setSelection(B.create(i.doc, o - t.doc.resolve(o).nodeBefore.nodeSize)), e(i.scrollIntoView());
6540
6532
  }
6541
6533
  return !0;
6542
6534
  }, Eg = (t, e) => {
6543
6535
  let n = t.selection, r;
6544
- if (n instanceof F) {
6536
+ if (n instanceof B) {
6545
6537
  if (n.node.isTextblock || !Ht(t.doc, n.to))
6546
6538
  return !1;
6547
6539
  r = n.to;
@@ -6600,7 +6592,7 @@ const Ig = (t, e) => {
6600
6592
  function Pg(t) {
6601
6593
  return (e, n) => {
6602
6594
  let { $from: r, $to: o } = e.selection;
6603
- if (e.selection instanceof F && e.selection.node.isBlock)
6595
+ if (e.selection instanceof B && e.selection.node.isBlock)
6604
6596
  return !r.parentOffset || !wt(e.doc, r.pos) ? !1 : (n && n(e.tr.split(r.pos).scrollIntoView()), !0);
6605
6597
  if (!r.depth)
6606
6598
  return !1;
@@ -6617,9 +6609,7 @@ function Pg(t) {
6617
6609
  let d = e.tr;
6618
6610
  (e.selection instanceof H || e.selection instanceof Ar) && d.deleteSelection();
6619
6611
  let u = d.mapping.map(r.pos), f = wt(d.doc, u, i.length, i);
6620
- if (f || (i[0] = a ? { type: a } : null, f = wt(d.doc, u, i.length, i)), !f)
6621
- return !1;
6622
- if (d.split(u, i.length, i), !l && c && r.node(s).type != a) {
6612
+ if (f || (i[0] = a ? { type: a } : null, f = wt(d.doc, u, i.length, i)), d.split(u, i.length, i), !l && c && r.node(s).type != a) {
6623
6613
  let p = d.mapping.map(r.before(s)), h = d.doc.resolve(p);
6624
6614
  a && r.node(s - 1).canReplaceWith(h.index(), h.index() + 1, a) && d.setNodeMarkup(d.mapping.map(r.before(s)), a);
6625
6615
  }
@@ -6650,7 +6640,7 @@ function ud(t, e, n, r) {
6650
6640
  let d = i.type.spec.isolating || r > 0 && l ? null : Y.findFrom(e, 1), u = d && d.$from.blockRange(d.$to), f = u && Or(u);
6651
6641
  if (f != null && f >= e.depth)
6652
6642
  return n && n(t.tr.lift(u, f).scrollIntoView()), !0;
6653
- if (c && Pn(i, "start", !0) && Pn(o, "end")) {
6643
+ if (c && In(i, "start", !0) && In(o, "end")) {
6654
6644
  let p = o, h = [];
6655
6645
  for (; h.push(p), !p.isTextblock; )
6656
6646
  p = p.lastChild;
@@ -6739,7 +6729,7 @@ const Ka = (t, e) => {
6739
6729
  }
6740
6730
  }, zg = ({ keepMarks: t = !0 } = {}) => (e) => {
6741
6731
  const { tr: n, state: r, dispatch: o, editor: i } = e, { selection: s, doc: a } = n, { $from: l, $to: c } = s, d = i.extensionService.attributes, u = D.getSplittedAttributes(d, l.node().type.name, l.node().attrs);
6742
- if (s instanceof F && s.node.isBlock)
6732
+ if (s instanceof B && s.node.isBlock)
6743
6733
  return !l.parentOffset || !wt(a, l.pos) ? !1 : (o && (t && Ka(r, i.extensionService.splittableMarks), n.split(l.pos).scrollIntoView()), !0);
6744
6734
  if (!l.parent.isBlock) return !1;
6745
6735
  if (o) {
@@ -6806,7 +6796,7 @@ const Ug = (t, e = {}) => ({ tr: n, state: r, dispatch: o }) => {
6806
6796
  return Wg(r, n, l);
6807
6797
  };
6808
6798
  function $i(t, e, n = {}) {
6809
- return t.find((r) => r.type === e && ur(r.attrs, n));
6799
+ return t.find((r) => r.type === e && dr(r.attrs, n));
6810
6800
  }
6811
6801
  function qg(t, e, n = {}) {
6812
6802
  return !!$i(t, e, n);
@@ -6845,7 +6835,7 @@ const Kg = (t, e = {}) => ({ tr: n, state: r, dispatch: o }) => {
6845
6835
  function Co(t, e, n = {}) {
6846
6836
  const { empty: r, ranges: o } = t.selection, i = e ? Mt(e, t.schema) : null;
6847
6837
  if (r)
6848
- return !!(t.storedMarks || t.selection.$from.marks()).filter((u) => i ? i.name === u.type.name : !0).find((u) => ur(u.attrs, n, { strict: !1 }));
6838
+ return !!(t.storedMarks || t.selection.$from.marks()).filter((u) => i ? i.name === u.type.name : !0).find((u) => dr(u.attrs, n, { strict: !1 }));
6849
6839
  let s = 0;
6850
6840
  const a = [];
6851
6841
  if (o.forEach(({ $from: u, $to: f }) => {
@@ -6862,7 +6852,7 @@ function Co(t, e, n = {}) {
6862
6852
  );
6863
6853
  });
6864
6854
  }), s === 0) return !1;
6865
- const l = a.filter((u) => i ? i.name === u.mark.type.name : !0).filter((u) => ur(u.mark.attrs, n, { strict: !1 })).reduce((u, f) => u + f.to - f.from, 0), c = a.filter((u) => i ? u.mark.type !== i && u.mark.type.excludes(i) : !0).reduce((u, f) => u + f.to - f.from, 0);
6855
+ const l = a.filter((u) => i ? i.name === u.mark.type.name : !0).filter((u) => dr(u.mark.attrs, n, { strict: !1 })).reduce((u, f) => u + f.to - f.from, 0), c = a.filter((u) => i ? u.mark.type !== i && u.mark.type.excludes(i) : !0).reduce((u, f) => u + f.to - f.from, 0);
6866
6856
  return (l > 0 ? l + c : l) >= s;
6867
6857
  }
6868
6858
  const Jg = (t, e = {}, n = {}) => ({ state: r, commands: o }) => {
@@ -6898,7 +6888,7 @@ function So(t, e, n = {}) {
6898
6888
  to: h
6899
6889
  });
6900
6890
  });
6901
- const l = o - r, c = a.filter((u) => s ? s.name === u.node.type.name : !0).filter((u) => ur(u.node.attrs, n, { strict: !1 }));
6891
+ const l = o - r, c = a.filter((u) => s ? s.name === u.node.type.name : !0).filter((u) => dr(u.node.attrs, n, { strict: !1 }));
6902
6892
  return i ? !!c.length : c.reduce((u, f) => u + f.to - f.from, 0) >= l;
6903
6893
  }
6904
6894
  const Zg = (t, e, n = {}) => ({ state: r, commands: o }) => {
@@ -8488,7 +8478,7 @@ const Sy = (t, e = {}) => ({ state: n, dispatch: r }) => {
8488
8478
  () => e.liftEmptyBlock(),
8489
8479
  () => e.splitBlock()
8490
8480
  ]);
8491
- }, Jn = (t) => {
8481
+ }, Xn = (t) => {
8492
8482
  t.commands.first(({ commands: e, tr: n }) => [
8493
8483
  () => e.undoInputRule(),
8494
8484
  () => (n.setMeta("inputType", "deleteContentBackward"), !1),
@@ -8508,9 +8498,9 @@ const Sy = (t, e = {}) => ({ state: n, dispatch: r }) => {
8508
8498
  const t = {
8509
8499
  Enter: () => Fy(this.editor),
8510
8500
  "Mod-Enter": () => this.editor.commands.exitCode(),
8511
- Backspace: () => Jn(this.editor),
8512
- "Mod-Backspace": () => Jn(this.editor),
8513
- "Shift-Backspace": () => Jn(this.editor),
8501
+ Backspace: () => Xn(this.editor),
8502
+ "Mod-Backspace": () => Xn(this.editor),
8503
+ "Shift-Backspace": () => Xn(this.editor),
8514
8504
  Delete: () => yn(this.editor),
8515
8505
  "Mod-Delete": () => yn(this.editor),
8516
8506
  "Mod-a": () => this.editor.commands.selectAll(),
@@ -8519,8 +8509,8 @@ const Sy = (t, e = {}) => ({ state: n, dispatch: r }) => {
8519
8509
  ...t
8520
8510
  }, n = {
8521
8511
  ...t,
8522
- "Ctrl-h": () => Jn(this.editor),
8523
- "Alt-Backspace": () => Jn(this.editor),
8512
+ "Ctrl-h": () => Xn(this.editor),
8513
+ "Alt-Backspace": () => Xn(this.editor),
8524
8514
  "Ctrl-d": () => yn(this.editor),
8525
8515
  "Ctrl-Alt-Backspace": () => yn(this.editor),
8526
8516
  "Alt-Delete": () => yn(this.editor),
@@ -8637,7 +8627,7 @@ const Ps = ({
8637
8627
  author: r.name,
8638
8628
  authorEmail: r.email,
8639
8629
  date: o
8640
- }), l = new dr();
8630
+ }), l = new cr();
8641
8631
  let c = [];
8642
8632
  return t.doc.nodesBetween(e, n, (d, u) => {
8643
8633
  if (!d.type.name.includes("table"))
@@ -8777,7 +8767,7 @@ const Cd = (t) => {
8777
8767
  getMarksBetween: Vy,
8778
8768
  getMarksFromSelection: No,
8779
8769
  getNodeType: le,
8780
- getSchemaTypeByName: Gn,
8770
+ getSchemaTypeByName: Yn,
8781
8771
  getSchemaTypeNameByName: Er,
8782
8772
  isActive: bd,
8783
8773
  isInTable: Cd,
@@ -8889,7 +8879,7 @@ const Cd = (t) => {
8889
8879
  }
8890
8880
  }), bn = (t, e, n) => {
8891
8881
  if (!t.doc || !t.doc.nodeSize || n && e)
8892
- return B.empty;
8882
+ return F.empty;
8893
8883
  const r = [], o = Ls(t);
8894
8884
  return o.length ? (o.forEach(({ mark: i, from: s, to: a }) => {
8895
8885
  if (i.type.name === $e)
@@ -8953,7 +8943,7 @@ const Cd = (t) => {
8953
8943
  });
8954
8944
  r.push(l);
8955
8945
  }
8956
- }), B.create(t.doc, r)) : B.empty;
8946
+ }), F.create(t.doc, r)) : F.empty;
8957
8947
  }, Pe = "commentMark", Ja = ({ commentId: t, state: e, tr: n, dispatch: r }) => {
8958
8948
  Uy(t, e.doc).forEach(({ from: i, to: s }) => {
8959
8949
  n.removeMark(i, s, e.schema.marks[Pe]);
@@ -9186,7 +9176,7 @@ const Cd = (t) => {
9186
9176
  activeThreadId: null,
9187
9177
  externalColor: "#B1124B",
9188
9178
  internalColor: "#078383",
9189
- decorations: B.empty,
9179
+ decorations: F.empty,
9190
9180
  allCommentPositions: {},
9191
9181
  allCommentIds: [],
9192
9182
  changedActiveThread: !1,
@@ -9281,7 +9271,7 @@ const Cd = (t) => {
9281
9271
  });
9282
9272
  }
9283
9273
  });
9284
- const p = B.create(c, u);
9274
+ const p = F.create(c, u);
9285
9275
  if (!he.getState(l).decorations.eq(p)) {
9286
9276
  const b = l.tr.setMeta(he, {
9287
9277
  decorations: p,
@@ -9515,7 +9505,7 @@ const Td = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date:
9515
9505
  if (r.addMark(Math.max(n.from, d), Math.min(n.to, d + c.nodeSize), n.mark), ["bold", "italic", "strike", "underline", "textStyle"].includes(n.mark.type.name) && !c.marks.find((h) => h.type === n.mark.type)) {
9516
9506
  const h = c.marks.find((b) => b.type.name === Se);
9517
9507
  let m = [], g = [];
9518
- if (h ? h.attrs.before.find((w) => w.type === "textStyle" ? w.type === n.mark.type.name && ur(w.attrs, n.mark.attrs) : w.type === n.mark.type.name) ? (g = [...h.attrs.before.filter((w) => w.type !== n.mark.type.name)], m = [...h.attrs.after]) : (g = [...h.attrs.before], m = [
9508
+ if (h ? h.attrs.before.find((w) => w.type === "textStyle" ? w.type === n.mark.type.name && dr(w.attrs, n.mark.attrs) : w.type === n.mark.type.name) ? (g = [...h.attrs.before.filter((w) => w.type !== n.mark.type.name)], m = [...h.attrs.after]) : (g = [...h.attrs.before], m = [
9519
9509
  ...h.attrs.after,
9520
9510
  {
9521
9511
  type: n.mark.type.name,
@@ -9590,7 +9580,7 @@ const Td = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date:
9590
9580
  const r = ["inputType", "uiEvent", "paste", "pointer"], o = ["historyUndo", "historyRedo", "acceptReject"];
9591
9581
  if (!t.steps.length || t.meta && !Object.keys(t.meta).every((c) => r.includes(c)) || o.includes(t.getMeta("inputType")) || t.getMeta(he))
9592
9582
  return t;
9593
- const i = e.tr, s = new dr(), a = Math.floor(Date.now() / 6e5) * 6e5, l = new Date(a).toISOString();
9583
+ const i = e.tr, s = new cr(), a = Math.floor(Date.now() / 6e5) * 6e5, l = new Date(a).toISOString();
9594
9584
  if (t.steps.forEach((c, d) => {
9595
9585
  const u = c.map(s), { doc: f } = i;
9596
9586
  u && (u instanceof $t ? (Td({
@@ -9664,7 +9654,7 @@ const Td = ({ state: t, tr: e, step: n, newTr: r, map: o, doc: i, user: s, date:
9664
9654
  }, Qa = (t) => {
9665
9655
  if (t === "initial" || t === "0.4.14") return Object.values(sb);
9666
9656
  };
9667
- var en, hs, O, Id, Pd, Wi, Rd, Ui, qi, Ki, Xi, Ji, Yi, Gi, Zi, Qi, Ld, Zn, Qn, Fd, Bd, _d, zd;
9657
+ var en, hs, O, Id, Pd, Wi, Rd, Ui, qi, Ki, Xi, Ji, Yi, Gi, Zi, Qi, Ld, Gn, Zn, Fd, Bd, _d, zd;
9668
9658
  const Xs = class Xs extends lg {
9669
9659
  constructor(n) {
9670
9660
  super();
@@ -9950,7 +9940,7 @@ const Xs = class Xs extends lg {
9950
9940
  * Get HTML string of the document
9951
9941
  */
9952
9942
  getHTML() {
9953
- const n = document.createElement("div"), r = Vn.fromSchema(this.schema).serializeFragment(this.state.doc.content);
9943
+ const n = document.createElement("div"), r = $n.fromSchema(this.schema).serializeFragment(this.state.doc.content);
9954
9944
  return n.appendChild(r), n.innerHTML;
9955
9945
  }
9956
9946
  /**
@@ -10028,7 +10018,7 @@ const Xs = class Xs extends lg {
10028
10018
  * @returns {Y.Doc | undefined} Updated Y.Doc if any, otherwise undefined
10029
10019
  */
10030
10020
  processCollaborationMigrations() {
10031
- if (console.debug("[checkVersionMigrations] Current editor version", "0.9.33"), !this.options.ydoc) return;
10021
+ if (console.debug("[checkVersionMigrations] Current editor version", "0.10.2"), !this.options.ydoc) return;
10032
10022
  let r = this.options.ydoc.getMap("meta").get("version");
10033
10023
  r || (r = "initial"), console.debug("[checkVersionMigrations] Document version", r);
10034
10024
  const o = Qa(r) || [], s = this.state.plugins.find((c) => c.key.startsWith("y-sync"));
@@ -10050,11 +10040,11 @@ const Xs = class Xs extends lg {
10050
10040
  isNewFile: !0,
10051
10041
  shouldLoadComments: !0,
10052
10042
  replacedFile: !0
10053
- }), I(this, O, Ji).call(this), I(this, O, Yi).call(this), this.initDefaultStyles(), this.initializeCollaborationData(!0), this.options.ydoc || (I(this, O, Qn).call(this), I(this, O, Zn).call(this));
10043
+ }), I(this, O, Ji).call(this), I(this, O, Yi).call(this), this.initDefaultStyles(), this.initializeCollaborationData(!0), this.options.ydoc || (I(this, O, Zn).call(this), I(this, O, Gn).call(this));
10054
10044
  }
10055
10045
  };
10056
10046
  en = new WeakMap(), hs = new WeakMap(), O = new WeakSet(), Id = function(n) {
10057
- I(this, O, Ki).call(this), I(this, O, Xi).call(this), I(this, O, Gi).call(this), I(this, O, Ji).call(this), I(this, O, Yi).call(this), this.on("beforeCreate", this.options.onBeforeCreate), this.emit("beforeCreate", { editor: this }), this.on("contentError", this.options.onContentError), this.on("exception", this.options.onException), I(this, O, Qi).call(this), this.initDefaultStyles(), this.setDocumentMode(n.documentMode), !this.options.isHeadless && (this.on("create", this.options.onCreate), this.on("update", this.options.onUpdate), this.on("selectionUpdate", this.options.onSelectionUpdate), this.on("transaction", this.options.onTransaction), this.on("focus", I(this, O, Wi)), this.on("blur", this.options.onBlur), this.on("destroy", this.options.onDestroy), this.on("trackedChangesUpdate", this.options.onTrackedChangesUpdate), this.on("commentsLoaded", this.options.onCommentsLoaded), this.on("commentClick", this.options.onCommentClicked), this.on("commentsUpdate", this.options.onCommentsUpdate), this.on("locked", this.options.onDocumentLocked), this.on("collaborationReady", I(this, O, Ld)), this.on("paginationUpdate", this.options.onPaginationUpdate), this.on("comment-positions", this.options.onCommentLocationsUpdate), this.initializeCollaborationData(), this.options.ydoc || (I(this, O, Qn).call(this), I(this, O, Zn).call(this)), window.setTimeout(() => {
10047
+ I(this, O, Ki).call(this), I(this, O, Xi).call(this), I(this, O, Gi).call(this), I(this, O, Ji).call(this), I(this, O, Yi).call(this), this.on("beforeCreate", this.options.onBeforeCreate), this.emit("beforeCreate", { editor: this }), this.on("contentError", this.options.onContentError), this.on("exception", this.options.onException), I(this, O, Qi).call(this), this.initDefaultStyles(), this.setDocumentMode(n.documentMode), !this.options.isHeadless && (this.on("create", this.options.onCreate), this.on("update", this.options.onUpdate), this.on("selectionUpdate", this.options.onSelectionUpdate), this.on("transaction", this.options.onTransaction), this.on("focus", I(this, O, Wi)), this.on("blur", this.options.onBlur), this.on("destroy", this.options.onDestroy), this.on("trackedChangesUpdate", this.options.onTrackedChangesUpdate), this.on("commentsLoaded", this.options.onCommentsLoaded), this.on("commentClick", this.options.onCommentClicked), this.on("commentsUpdate", this.options.onCommentsUpdate), this.on("locked", this.options.onDocumentLocked), this.on("collaborationReady", I(this, O, Ld)), this.on("paginationUpdate", this.options.onPaginationUpdate), this.on("comment-positions", this.options.onCommentLocationsUpdate), this.initializeCollaborationData(), this.options.ydoc || (I(this, O, Zn).call(this), I(this, O, Gn).call(this)), window.setTimeout(() => {
10058
10048
  this.isDestroyed || this.emit("create", { editor: this });
10059
10049
  }, 0));
10060
10050
  }, Pd = function(n) {
@@ -10074,7 +10064,7 @@ Ui = function() {
10074
10064
  this.options.isNewFile = !1;
10075
10065
  const n = I(this, O, Zi).call(this), r = this.state.tr.replaceWith(0, this.state.doc.content.size, n);
10076
10066
  this.view.dispatch(r), setTimeout(() => {
10077
- I(this, O, Qn).call(this), I(this, O, Zn).call(this);
10067
+ I(this, O, Zn).call(this), I(this, O, Gn).call(this);
10078
10068
  }, 50);
10079
10069
  }, qi = function(n) {
10080
10070
  const r = this.extensionService?.plugins.find((i) => i.key.startsWith(n)), o = this.state.plugins.find((i) => i.key.startsWith(n));
@@ -10161,11 +10151,11 @@ Qi = function() {
10161
10151
  const i = this.view.dom;
10162
10152
  i.editor = this, this.options.telemetry?.sendReport();
10163
10153
  }, Ld = function({ editor: n, ydoc: r }) {
10164
- this.options.collaborationIsReady || (console.debug("🔗 [super-editor] Collaboration ready"), this.options.onCollaborationReady({ editor: n, ydoc: r }), this.options.collaborationIsReady = !0, this.options.isNewFile || (I(this, O, Qn).call(this), I(this, O, Zn).call(this)));
10154
+ this.options.collaborationIsReady || (console.debug("🔗 [super-editor] Collaboration ready"), this.options.onCollaborationReady({ editor: n, ydoc: r }), this.options.collaborationIsReady = !0, this.options.isNewFile || (I(this, O, Zn).call(this), I(this, O, Gn).call(this)));
10165
10155
  }, /**
10166
10156
  * Initialize comments plugin
10167
10157
  */
10168
- Zn = function() {
10158
+ Gn = function() {
10169
10159
  if (!this.options.isCommentsEnabled || this.options.isHeadless || !this.options.shouldLoadComments) return;
10170
10160
  const n = this.options.replacedFile;
10171
10161
  this.emit("commentsLoaded", { editor: this, replacedFile: n, comments: this.converter.comments || [] }), setTimeout(() => {
@@ -10173,7 +10163,7 @@ Zn = function() {
10173
10163
  const { state: r, dispatch: o } = this.view, i = r.tr.setMeta(he, { type: "force" });
10174
10164
  o(i);
10175
10165
  }, 50);
10176
- }, Qn = async function() {
10166
+ }, Zn = async function() {
10177
10167
  if (this.options.isHeadless || !this.extensionService) return;
10178
10168
  if (this.options.extensions.find((r) => r.name === "pagination") && this.options.pagination) {
10179
10169
  console.debug("🔗 [super-editor] Initializing pagination");
@@ -10768,7 +10758,7 @@ class re extends Y {
10768
10758
  for (; ; ) {
10769
10759
  let s = n > 0 ? i.firstChild : i.lastChild;
10770
10760
  if (!s) {
10771
- if (i.isAtom && !i.isText && !F.isSelectable(i)) {
10761
+ if (i.isAtom && !i.isText && !B.isSelectable(i)) {
10772
10762
  e = e.doc.resolve(o + i.nodeSize * n), r = !1;
10773
10763
  continue e;
10774
10764
  }
@@ -10871,7 +10861,7 @@ function mb(t, e, n) {
10871
10861
  if (!re.valid(r))
10872
10862
  return !1;
10873
10863
  let o = t.posAtCoords({ left: n.clientX, top: n.clientY });
10874
- return o && o.inside > -1 && F.isSelectable(t.state.doc.nodeAt(o.inside)) ? !1 : (t.dispatch(t.state.tr.setSelection(new re(r))), !0);
10864
+ return o && o.inside > -1 && B.isSelectable(t.state.doc.nodeAt(o.inside)) ? !1 : (t.dispatch(t.state.tr.setSelection(new re(r))), !0);
10875
10865
  }
10876
10866
  function gb(t, e) {
10877
10867
  if (e.inputType != "insertCompositionText" || !(t.state.selection instanceof re))
@@ -10889,7 +10879,7 @@ function yb(t) {
10889
10879
  if (!(t.selection instanceof re))
10890
10880
  return null;
10891
10881
  let e = document.createElement("div");
10892
- return e.className = "ProseMirror-gapcursor", B.create(t.doc, [$.widget(t.selection.head, e, { key: "gapcursor" })]);
10882
+ return e.className = "ProseMirror-gapcursor", F.create(t.doc, [$.widget(t.selection.head, e, { key: "gapcursor" })]);
10893
10883
  }
10894
10884
  const bb = Q.create({
10895
10885
  name: "gapCursor",
@@ -11500,7 +11490,7 @@ function jb(t = {}) {
11500
11490
  ...rl(n),
11501
11491
  ...ol(n)
11502
11492
  ];
11503
- return B.create(n.doc, r);
11493
+ return F.create(n.doc, r);
11504
11494
  },
11505
11495
  apply(e, n, r, o) {
11506
11496
  if (!e.docChanged || e.getMeta("orderedListMarker")) return n;
@@ -11508,7 +11498,7 @@ function jb(t = {}) {
11508
11498
  ...rl(o, s),
11509
11499
  ...ol(o)
11510
11500
  ];
11511
- return B.create(o.doc, a);
11501
+ return F.create(o.doc, a);
11512
11502
  }
11513
11503
  },
11514
11504
  props: {
@@ -11739,7 +11729,7 @@ const tu = J.create({
11739
11729
  },
11740
11730
  apply(e, n, r, o) {
11741
11731
  if (!t.converter || t.options.mode !== "docx") return { ...n };
11742
- let i = n.decorations || B.empty;
11732
+ let i = n.decorations || F.empty;
11743
11733
  if (e.docChanged) {
11744
11734
  const s = io.getState(t.state).styles;
11745
11735
  i = il(o.doc, s);
@@ -11764,7 +11754,7 @@ const tu = J.create({
11764
11754
  if (!l) return;
11765
11755
  const c = $.inline(i, i + o.nodeSize, { style: l });
11766
11756
  n.push(c);
11767
- }), B.create(t, n);
11757
+ }), F.create(t, n);
11768
11758
  }, Xb = (t, e, n = !0) => {
11769
11759
  if (!t?.definition?.styles) return "";
11770
11760
  const r = {};
@@ -12089,11 +12079,11 @@ const tu = J.create({
12089
12079
  state: {
12090
12080
  init(n, r) {
12091
12081
  let o = sl(r, t);
12092
- return B.create(r.doc, o);
12082
+ return F.create(r.doc, o);
12093
12083
  },
12094
12084
  apply(n, r, o, i) {
12095
12085
  const s = sl(i, t);
12096
- return B.create(i.doc, s);
12086
+ return F.create(i.doc, s);
12097
12087
  }
12098
12088
  },
12099
12089
  props: {
@@ -12477,7 +12467,7 @@ function we(t) {
12477
12467
  return e;
12478
12468
  }
12479
12469
  var It = new G("selectingCells");
12480
- function Hn(t) {
12470
+ function Vn(t) {
12481
12471
  for (let e = t.depth - 1; e > 0; e--)
12482
12472
  if (t.node(e).type.spec.tableRole == "row")
12483
12473
  return t.node(0).resolve(t.before(e + 1));
@@ -12502,7 +12492,7 @@ function _o(t) {
12502
12492
  return e.$anchorCell.pos > e.$headCell.pos ? e.$anchorCell : e.$headCell;
12503
12493
  if ("node" in e && e.node && e.node.type.spec.tableRole == "cell")
12504
12494
  return e.$anchor;
12505
- const n = Hn(e.$head) || p0(e.$head);
12495
+ const n = Vn(e.$head) || p0(e.$head);
12506
12496
  if (n)
12507
12497
  return n;
12508
12498
  throw new RangeError(`No cell found around position ${e.head}`);
@@ -12735,7 +12725,7 @@ function y0(t) {
12735
12725
  e.push(
12736
12726
  $.node(r, r + n.nodeSize, { class: "selectedCell" })
12737
12727
  );
12738
- }), B.create(t.doc, e);
12728
+ }), F.create(t.doc, e);
12739
12729
  }
12740
12730
  function b0({ $from: t, $to: e }) {
12741
12731
  if (t.pos == e.pos || t.pos < e.pos - 6) return !1;
@@ -12767,7 +12757,7 @@ function w0({ $from: t, $to: e }) {
12767
12757
  function v0(t, e, n) {
12768
12758
  const r = (e || t).selection, o = (e || t).doc;
12769
12759
  let i, s;
12770
- if (r instanceof F && (s = r.node.type.spec.tableRole)) {
12760
+ if (r instanceof B && (s = r.node.type.spec.tableRole)) {
12771
12761
  if (s == "cell" || s == "header_cell")
12772
12762
  i = X.create(o, r.from);
12773
12763
  else if (s == "row") {
@@ -13089,7 +13079,7 @@ function P0(t) {
13089
13079
  i = o.$anchorCell.nodeAfter, s = o.$anchorCell.pos;
13090
13080
  } else {
13091
13081
  if (i = f0(o.$from), !i) return !1;
13092
- s = (r = Hn(o.$from)) == null ? void 0 : r.pos;
13082
+ s = (r = Vn(o.$from)) == null ? void 0 : r.pos;
13093
13083
  }
13094
13084
  if (i == null || s == null || i.attrs.colspan == 1 && i.attrs.rowspan == 1)
13095
13085
  return !1;
@@ -13554,7 +13544,7 @@ function Gr(t, e) {
13554
13544
  };
13555
13545
  }
13556
13546
  function W0(t, e) {
13557
- const n = t.state.doc, r = Hn(n.resolve(e));
13547
+ const n = t.state.doc, r = Vn(n.resolve(e));
13558
13548
  return r ? (t.dispatch(t.state.tr.setSelection(new X(r))), !0) : !1;
13559
13549
  }
13560
13550
  function U0(t, e, n) {
@@ -13595,7 +13585,7 @@ function q0(t, e) {
13595
13585
  let o;
13596
13586
  if (e.shiftKey && t.state.selection instanceof X)
13597
13587
  i(t.state.selection.$anchorCell, e), e.preventDefault();
13598
- else if (e.shiftKey && r && (o = Hn(t.state.selection.$anchor)) != null && ((n = di(t, e)) == null ? void 0 : n.pos) != o.pos)
13588
+ else if (e.shiftKey && r && (o = Vn(t.state.selection.$anchor)) != null && ((n = di(t, e)) == null ? void 0 : n.pos) != o.pos)
13599
13589
  i(o, e), e.preventDefault();
13600
13590
  else if (!r)
13601
13591
  return;
@@ -13649,7 +13639,7 @@ function di(t, e) {
13649
13639
  left: e.clientX,
13650
13640
  top: e.clientY
13651
13641
  });
13652
- return n && n ? Hn(t.state.doc.resolve(n.pos)) : null;
13642
+ return n && n ? Vn(t.state.doc.resolve(n.pos)) : null;
13653
13643
  }
13654
13644
  var K0 = class {
13655
13645
  constructor(t, e) {
@@ -13848,7 +13838,7 @@ function vl(t, e, n, r) {
13848
13838
  top: e.clientY
13849
13839
  });
13850
13840
  if (!i) return -1;
13851
- const { pos: s } = i, a = Hn(t.state.doc.resolve(s));
13841
+ const { pos: s } = i, a = Vn(t.state.doc.resolve(s));
13852
13842
  if (!a) return -1;
13853
13843
  if (n == "right") return a.pos;
13854
13844
  const l = oe.get(a.node(-1)), c = a.start(-1), d = l.map.indexOf(a.pos - c);
@@ -13896,7 +13886,7 @@ function rw(t, e) {
13896
13886
  var n;
13897
13887
  const r = [], o = t.doc.resolve(e), i = o.node(-1);
13898
13888
  if (!i)
13899
- return B.empty;
13889
+ return F.empty;
13900
13890
  const s = oe.get(i), a = o.start(-1), l = s.colCount(o.pos - a) + o.nodeAfter.attrs.colspan - 1;
13901
13891
  for (let c = 0; c < s.height; c++) {
13902
13892
  const d = l + c * s.width;
@@ -13913,7 +13903,7 @@ function rw(t, e) {
13913
13903
  ), r.push($.widget(f, p));
13914
13904
  }
13915
13905
  }
13916
- return B.create(t.doc, r);
13906
+ return F.create(t.doc, r);
13917
13907
  }
13918
13908
  function ow({
13919
13909
  allowTableNodeSelection: t = !1
@@ -14366,7 +14356,7 @@ class sw {
14366
14356
  if (!this.editor.isEditable)
14367
14357
  return;
14368
14358
  let { selection: r } = e.state;
14369
- if (r instanceof F) {
14359
+ if (r instanceof B) {
14370
14360
  let o = r.node;
14371
14361
  this.node.eq(o) && this.editor.emit("fieldAnnotationSelected", {
14372
14362
  editor: this.editor,
@@ -14609,9 +14599,9 @@ class mw extends Error {
14609
14599
  super(`Failed to parse color: "${e}"`);
14610
14600
  }
14611
14601
  }
14612
- var er = mw;
14602
+ var Qn = mw;
14613
14603
  function gw(t) {
14614
- if (typeof t != "string") throw new er(t);
14604
+ if (typeof t != "string") throw new Qn(t);
14615
14605
  if (t.trim().toLowerCase() === "transparent") return [0, 0, 0, 0];
14616
14606
  let e = t.trim();
14617
14607
  e = Mw.test(t) ? ww(t) : t;
@@ -14633,11 +14623,11 @@ function gw(t) {
14633
14623
  const i = Sw.exec(e);
14634
14624
  if (i) {
14635
14625
  const [s, a, l, c] = Array.from(i).slice(1).map(parseFloat);
14636
- if (ss(0, 100, a) !== a) throw new er(t);
14637
- if (ss(0, 100, l) !== l) throw new er(t);
14626
+ if (ss(0, 100, a) !== a) throw new Qn(t);
14627
+ if (ss(0, 100, l) !== l) throw new Qn(t);
14638
14628
  return [...xw(s, a, l), Number.isNaN(c) ? 1 : c];
14639
14629
  }
14640
- throw new er(t);
14630
+ throw new Qn(t);
14641
14631
  }
14642
14632
  function yw(t) {
14643
14633
  let e = 5381, n = t.length;
@@ -14654,7 +14644,7 @@ const Sl = (t) => parseInt(t.replace(/_/g, ""), 36), bw = "1q29ehhb 1n09sgk7 1kl
14654
14644
  }, {});
14655
14645
  function ww(t) {
14656
14646
  const e = t.toLowerCase().trim(), n = bw[yw(e)];
14657
- if (!n) throw new er(t);
14647
+ if (!n) throw new Qn(t);
14658
14648
  return `#${n}`;
14659
14649
  }
14660
14650
  const kr = (t, e) => Array.from(Array(e)).map(() => t).join(""), vw = new RegExp(`^#${kr("([a-f0-9])", 3)}([a-f0-9])?$`, "i"), kw = new RegExp(`^#${kr("([a-f0-9]{2})", 3)}([a-f0-9]{2})?$`, "i"), Cw = new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${kr(",\\s*(\\d+)\\s*", 2)}(?:,\\s*([\\d.]+))?\\s*\\)$`, "i"), Sw = /^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i, Mw = /^[a-z]+$/i, Ml = (t) => Math.round(t * 255), xw = (t, e, n) => {
@@ -15116,7 +15106,7 @@ const as = "annotation", Su = "annotation-content", Mu = J.create({
15116
15106
  i.updateFieldAnnotationsAttributes([u], {
15117
15107
  [t]: !u.node.attrs[t]
15118
15108
  });
15119
- }), e && c?.type.name === this.name && r.setSelection(F.create(r.doc, a))), !0;
15109
+ }), e && c?.type.name === this.name && r.setSelection(B.create(r.doc, a))), !0;
15120
15110
  },
15121
15111
  setFieldAnnotationsFontFamily: (t, e = !1) => ({ dispatch: n, tr: r, state: o, commands: i }) => {
15122
15112
  let { from: s, to: a, node: l } = o.selection, c = co(s, a, o.doc);
@@ -15124,7 +15114,7 @@ const as = "annotation", Su = "annotation-content", Mu = J.create({
15124
15114
  i.updateFieldAnnotationsAttributes([d], {
15125
15115
  fontFamily: t
15126
15116
  });
15127
- }), e && l?.type.name === this.name && r.setSelection(F.create(r.doc, s))), !0;
15117
+ }), e && l?.type.name === this.name && r.setSelection(B.create(r.doc, s))), !0;
15128
15118
  },
15129
15119
  setFieldAnnotationsFontSize: (t, e = !1) => ({ dispatch: n, tr: r, state: o, commands: i }) => {
15130
15120
  let { from: s, to: a, node: l } = o.selection, c = co(s, a, o.doc);
@@ -15135,7 +15125,7 @@ const as = "annotation", Su = "annotation-content", Mu = J.create({
15135
15125
  i.updateFieldAnnotationsAttributes([m], {
15136
15126
  fontSize: `${d}${u}`
15137
15127
  });
15138
- }), e && l?.type.name === this.name && r.setSelection(F.create(r.doc, s))), !0);
15128
+ }), e && l?.type.name === this.name && r.setSelection(B.create(r.doc, s))), !0);
15139
15129
  }
15140
15130
  /// Formatting commands - end.
15141
15131
  };
@@ -15179,7 +15169,7 @@ const Ao = new G("ImagePlaceholder"), Tw = (t = {}) => new Z({
15179
15169
  key: Ao,
15180
15170
  state: {
15181
15171
  init() {
15182
- return B.empty;
15172
+ return F.empty;
15183
15173
  },
15184
15174
  apply(e, n, r, o) {
15185
15175
  n = n.map(e.mapping, e.doc);
@@ -15838,7 +15828,7 @@ const Pw = "track-insert", Ru = Le.create({
15838
15828
  acceptTrackedChangesBetween: (t, e) => ({ state: n, dispatch: r }) => {
15839
15829
  let { tr: o, doc: i } = n;
15840
15830
  o.setMeta("acceptReject", !0);
15841
- const s = new dr();
15831
+ const s = new cr();
15842
15832
  return i.nodesBetween(t, e, (a, l) => {
15843
15833
  if (a.marks && a.marks.find((c) => c.type.name === ue)) {
15844
15834
  const c = new $t(
@@ -15871,7 +15861,7 @@ const Pw = "track-insert", Ru = Le.create({
15871
15861
  rejectTrackedChangesBetween: (t, e) => ({ state: n, dispatch: r }) => {
15872
15862
  const { tr: o, doc: i } = n;
15873
15863
  o.setMeta("acceptReject", !0);
15874
- const s = new dr();
15864
+ const s = new cr();
15875
15865
  return i.nodesBetween(t, e, (a, l) => {
15876
15866
  if (a.marks && a.marks.find((c) => c.type.name === ue)) {
15877
15867
  const c = a.marks.find((d) => d.type.name === ue);
@@ -16010,12 +16000,12 @@ const Pw = "track-insert", Ru = Le.create({
16010
16000
  },
16011
16001
  addPmPlugins() {
16012
16002
  const t = (n) => {
16013
- if (n.doc.textBetween(0, n.doc.content.size, " ", " ") !== "") return B.empty;
16003
+ if (n.doc.textBetween(0, n.doc.content.size, " ", " ") !== "") return F.empty;
16014
16004
  const { $from: o } = n.selection, i = $.node(o.before(), o.after(), {
16015
16005
  "data-placeholder": this.options.placeholder,
16016
16006
  class: "super-editor-placeholder"
16017
16007
  });
16018
- return B.create(n.doc, [i]);
16008
+ return F.create(n.doc, [i]);
16019
16009
  };
16020
16010
  return [new Z({
16021
16011
  key: new G("placeholder"),
@@ -16031,10 +16021,10 @@ const Pw = "track-insert", Ru = Le.create({
16031
16021
  })];
16032
16022
  }
16033
16023
  });
16034
- var Te = "top", We = "bottom", Ue = "right", De = "left", $s = "auto", Ir = [Te, We, Ue, De], Rn = "start", Cr = "end", _w = "clippingParents", Bu = "viewport", Yn = "popper", zw = "reference", Ol = /* @__PURE__ */ Ir.reduce(function(t, e) {
16035
- return t.concat([e + "-" + Rn, e + "-" + Cr]);
16024
+ var Te = "top", We = "bottom", Ue = "right", De = "left", $s = "auto", Ir = [Te, We, Ue, De], Pn = "start", Cr = "end", _w = "clippingParents", Bu = "viewport", Jn = "popper", zw = "reference", Ol = /* @__PURE__ */ Ir.reduce(function(t, e) {
16025
+ return t.concat([e + "-" + Pn, e + "-" + Cr]);
16036
16026
  }, []), _u = /* @__PURE__ */ [].concat(Ir, [$s]).reduce(function(t, e) {
16037
- return t.concat([e, e + "-" + Rn, e + "-" + Cr]);
16027
+ return t.concat([e, e + "-" + Pn, e + "-" + Cr]);
16038
16028
  }, []), $w = "beforeRead", Vw = "read", Hw = "afterRead", jw = "beforeMain", Ww = "main", Uw = "afterMain", qw = "beforeWrite", Kw = "write", Xw = "afterWrite", Jw = [$w, Vw, Hw, jw, Ww, Uw, qw, Kw, Xw];
16039
16029
  function st(t) {
16040
16030
  return t ? (t.nodeName || "").toLowerCase() : null;
@@ -16107,7 +16097,7 @@ const zu = {
16107
16097
  function rt(t) {
16108
16098
  return t.split("-")[0];
16109
16099
  }
16110
- var on = Math.max, Oo = Math.min, Ln = Math.round;
16100
+ var on = Math.max, Oo = Math.min, Rn = Math.round;
16111
16101
  function cs() {
16112
16102
  var t = navigator.userAgentData;
16113
16103
  return t != null && t.brands && Array.isArray(t.brands) ? t.brands.map(function(e) {
@@ -16117,10 +16107,10 @@ function cs() {
16117
16107
  function $u() {
16118
16108
  return !/^((?!chrome|android).)*safari/i.test(cs());
16119
16109
  }
16120
- function Fn(t, e, n) {
16110
+ function Ln(t, e, n) {
16121
16111
  e === void 0 && (e = !1), n === void 0 && (n = !1);
16122
16112
  var r = t.getBoundingClientRect(), o = 1, i = 1;
16123
- e && je(t) && (o = t.offsetWidth > 0 && Ln(r.width) / t.offsetWidth || 1, i = t.offsetHeight > 0 && Ln(r.height) / t.offsetHeight || 1);
16113
+ e && je(t) && (o = t.offsetWidth > 0 && Rn(r.width) / t.offsetWidth || 1, i = t.offsetHeight > 0 && Rn(r.height) / t.offsetHeight || 1);
16124
16114
  var s = dn(t) ? Re(t) : window, a = s.visualViewport, l = !$u() && n, c = (r.left + (l && a ? a.offsetLeft : 0)) / o, d = (r.top + (l && a ? a.offsetTop : 0)) / i, u = r.width / o, f = r.height / i;
16125
16115
  return {
16126
16116
  width: u,
@@ -16134,7 +16124,7 @@ function Fn(t, e, n) {
16134
16124
  };
16135
16125
  }
16136
16126
  function Hs(t) {
16137
- var e = Fn(t), n = t.offsetWidth, r = t.offsetHeight;
16127
+ var e = Ln(t), n = t.offsetWidth, r = t.offsetHeight;
16138
16128
  return Math.abs(e.width - n) <= 1 && (n = e.width), Math.abs(e.height - r) <= 1 && (r = e.height), {
16139
16129
  x: t.offsetLeft,
16140
16130
  y: t.offsetTop,
@@ -16208,11 +16198,11 @@ function Pr(t) {
16208
16198
  function js(t) {
16209
16199
  return ["top", "bottom"].indexOf(t) >= 0 ? "x" : "y";
16210
16200
  }
16211
- function sr(t, e, n) {
16201
+ function ir(t, e, n) {
16212
16202
  return on(t, Oo(e, n));
16213
16203
  }
16214
16204
  function ev(t, e, n) {
16215
- var r = sr(t, e, n);
16205
+ var r = ir(t, e, n);
16216
16206
  return r > n ? n : r;
16217
16207
  }
16218
16208
  function Hu() {
@@ -16239,7 +16229,7 @@ var tv = function(e, n) {
16239
16229
  function nv(t) {
16240
16230
  var e, n = t.state, r = t.name, o = t.options, i = n.elements.arrow, s = n.modifiersData.popperOffsets, a = rt(n.placement), l = js(a), c = [De, Ue].indexOf(a) >= 0, d = c ? "height" : "width";
16241
16231
  if (!(!i || !s)) {
16242
- var u = tv(o.padding, n), f = Hs(i), p = l === "y" ? Te : De, h = l === "y" ? We : Ue, m = n.rects.reference[d] + n.rects.reference[l] - s[l] - n.rects.popper[d], g = s[l] - n.rects.reference[l], b = Pr(i), w = b ? l === "y" ? b.clientHeight || 0 : b.clientWidth || 0 : 0, C = m / 2 - g / 2, y = u[p], S = w - f[d] - u[h], k = w / 2 - f[d] / 2 + C, x = sr(y, k, S), L = l;
16232
+ var u = tv(o.padding, n), f = Hs(i), p = l === "y" ? Te : De, h = l === "y" ? We : Ue, m = n.rects.reference[d] + n.rects.reference[l] - s[l] - n.rects.popper[d], g = s[l] - n.rects.reference[l], b = Pr(i), w = b ? l === "y" ? b.clientHeight || 0 : b.clientWidth || 0 : 0, C = m / 2 - g / 2, y = u[p], S = w - f[d] - u[h], k = w / 2 - f[d] / 2 + C, x = ir(y, k, S), L = l;
16243
16233
  n.modifiersData[r] = (e = {}, e[L] = x, e.centerOffset = x - k, e);
16244
16234
  }
16245
16235
  }
@@ -16256,7 +16246,7 @@ const ov = {
16256
16246
  requires: ["popperOffsets"],
16257
16247
  requiresIfExists: ["preventOverflow"]
16258
16248
  };
16259
- function Bn(t) {
16249
+ function Fn(t) {
16260
16250
  return t.split("-")[1];
16261
16251
  }
16262
16252
  var iv = {
@@ -16268,8 +16258,8 @@ var iv = {
16268
16258
  function sv(t, e) {
16269
16259
  var n = t.x, r = t.y, o = e.devicePixelRatio || 1;
16270
16260
  return {
16271
- x: Ln(n * o) / o || 0,
16272
- y: Ln(r * o) / o || 0
16261
+ x: Rn(n * o) / o || 0,
16262
+ y: Rn(r * o) / o || 0
16273
16263
  };
16274
16264
  }
16275
16265
  function Dl(t) {
@@ -16319,7 +16309,7 @@ function Dl(t) {
16319
16309
  function av(t) {
16320
16310
  var e = t.state, n = t.options, r = n.gpuAcceleration, o = r === void 0 ? !0 : r, i = n.adaptive, s = i === void 0 ? !0 : i, a = n.roundOffsets, l = a === void 0 ? !0 : a, c = {
16321
16311
  placement: rt(e.placement),
16322
- variation: Bn(e.placement),
16312
+ variation: Fn(e.placement),
16323
16313
  popper: e.elements.popper,
16324
16314
  popperRect: e.rects.popper,
16325
16315
  gpuAcceleration: o,
@@ -16396,7 +16386,7 @@ function Ws(t) {
16396
16386
  };
16397
16387
  }
16398
16388
  function Us(t) {
16399
- return Fn(Wt(t)).left + Ws(t).scrollLeft;
16389
+ return Ln(Wt(t)).left + Ws(t).scrollLeft;
16400
16390
  }
16401
16391
  function pv(t, e) {
16402
16392
  var n = Re(t), r = Wt(t), o = n.visualViewport, i = r.clientWidth, s = r.clientHeight, a = 0, l = 0;
@@ -16428,13 +16418,13 @@ function qs(t) {
16428
16418
  function Uu(t) {
16429
16419
  return ["html", "body", "#document"].indexOf(st(t)) >= 0 ? t.ownerDocument.body : je(t) && qs(t) ? t : Uu(zo(t));
16430
16420
  }
16431
- function ar(t, e) {
16421
+ function sr(t, e) {
16432
16422
  var n;
16433
16423
  e === void 0 && (e = []);
16434
16424
  var r = Uu(t), o = r === ((n = t.ownerDocument) == null ? void 0 : n.body), i = Re(r), s = o ? [i].concat(i.visualViewport || [], qs(r) ? r : []) : r, a = e.concat(s);
16435
16425
  return o ? a : (
16436
16426
  // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
16437
- a.concat(ar(zo(s)))
16427
+ a.concat(sr(zo(s)))
16438
16428
  );
16439
16429
  }
16440
16430
  function ds(t) {
@@ -16446,14 +16436,14 @@ function ds(t) {
16446
16436
  });
16447
16437
  }
16448
16438
  function mv(t, e) {
16449
- var n = Fn(t, !1, e === "fixed");
16439
+ var n = Ln(t, !1, e === "fixed");
16450
16440
  return n.top = n.top + t.clientTop, n.left = n.left + t.clientLeft, n.bottom = n.top + t.clientHeight, n.right = n.left + t.clientWidth, n.width = t.clientWidth, n.height = t.clientHeight, n.x = n.left, n.y = n.top, n;
16451
16441
  }
16452
16442
  function El(t, e, n) {
16453
16443
  return e === Bu ? ds(pv(t, n)) : dn(e) ? mv(e, n) : ds(hv(Wt(t)));
16454
16444
  }
16455
16445
  function gv(t) {
16456
- var e = ar(zo(t)), n = ["absolute", "fixed"].indexOf(St(t).position) >= 0, r = n && je(t) ? Pr(t) : t;
16446
+ var e = sr(zo(t)), n = ["absolute", "fixed"].indexOf(St(t).position) >= 0, r = n && je(t) ? Pr(t) : t;
16457
16447
  return dn(r) ? e.filter(function(o) {
16458
16448
  return dn(o) && Vu(o, r) && st(o) !== "body";
16459
16449
  }) : [];
@@ -16466,7 +16456,7 @@ function yv(t, e, n, r) {
16466
16456
  return a.width = a.right - a.left, a.height = a.bottom - a.top, a.x = a.left, a.y = a.top, a;
16467
16457
  }
16468
16458
  function qu(t) {
16469
- var e = t.reference, n = t.element, r = t.placement, o = r ? rt(r) : null, i = r ? Bn(r) : null, s = e.x + e.width / 2 - n.width / 2, a = e.y + e.height / 2 - n.height / 2, l;
16459
+ var e = t.reference, n = t.element, r = t.placement, o = r ? rt(r) : null, i = r ? Fn(r) : null, s = e.x + e.width / 2 - n.width / 2, a = e.y + e.height / 2 - n.height / 2, l;
16470
16460
  switch (o) {
16471
16461
  case Te:
16472
16462
  l = {
@@ -16502,7 +16492,7 @@ function qu(t) {
16502
16492
  if (c != null) {
16503
16493
  var d = c === "y" ? "height" : "width";
16504
16494
  switch (i) {
16505
- case Rn:
16495
+ case Pn:
16506
16496
  l[c] = l[c] - (e[d] / 2 - n[d] / 2);
16507
16497
  break;
16508
16498
  case Cr:
@@ -16514,17 +16504,17 @@ function qu(t) {
16514
16504
  }
16515
16505
  function Sr(t, e) {
16516
16506
  e === void 0 && (e = {});
16517
- var n = e, r = n.placement, o = r === void 0 ? t.placement : r, i = n.strategy, s = i === void 0 ? t.strategy : i, a = n.boundary, l = a === void 0 ? _w : a, c = n.rootBoundary, d = c === void 0 ? Bu : c, u = n.elementContext, f = u === void 0 ? Yn : u, p = n.altBoundary, h = p === void 0 ? !1 : p, m = n.padding, g = m === void 0 ? 0 : m, b = ju(typeof g != "number" ? g : Wu(g, Ir)), w = f === Yn ? zw : Yn, C = t.rects.popper, y = t.elements[h ? w : f], S = yv(dn(y) ? y : y.contextElement || Wt(t.elements.popper), l, d, s), k = Fn(t.elements.reference), x = qu({
16507
+ var n = e, r = n.placement, o = r === void 0 ? t.placement : r, i = n.strategy, s = i === void 0 ? t.strategy : i, a = n.boundary, l = a === void 0 ? _w : a, c = n.rootBoundary, d = c === void 0 ? Bu : c, u = n.elementContext, f = u === void 0 ? Jn : u, p = n.altBoundary, h = p === void 0 ? !1 : p, m = n.padding, g = m === void 0 ? 0 : m, b = ju(typeof g != "number" ? g : Wu(g, Ir)), w = f === Jn ? zw : Jn, C = t.rects.popper, y = t.elements[h ? w : f], S = yv(dn(y) ? y : y.contextElement || Wt(t.elements.popper), l, d, s), k = Ln(t.elements.reference), x = qu({
16518
16508
  reference: k,
16519
16509
  element: C,
16520
16510
  placement: o
16521
- }), L = ds(Object.assign({}, C, x)), M = f === Yn ? L : k, z = {
16511
+ }), L = ds(Object.assign({}, C, x)), M = f === Jn ? L : k, z = {
16522
16512
  top: S.top - M.top + b.top,
16523
16513
  bottom: M.bottom - S.bottom + b.bottom,
16524
16514
  left: S.left - M.left + b.left,
16525
16515
  right: M.right - S.right + b.right
16526
16516
  }, _ = t.modifiersData.offset;
16527
- if (f === Yn && _) {
16517
+ if (f === Jn && _) {
16528
16518
  var V = _[o];
16529
16519
  Object.keys(z).forEach(function(j) {
16530
16520
  var se = [Ue, We].indexOf(j) >= 0 ? 1 : -1, ce = [Te, We].indexOf(j) >= 0 ? "y" : "x";
@@ -16535,8 +16525,8 @@ function Sr(t, e) {
16535
16525
  }
16536
16526
  function bv(t, e) {
16537
16527
  e === void 0 && (e = {});
16538
- var n = e, r = n.placement, o = n.boundary, i = n.rootBoundary, s = n.padding, a = n.flipVariations, l = n.allowedAutoPlacements, c = l === void 0 ? _u : l, d = Bn(r), u = d ? a ? Ol : Ol.filter(function(h) {
16539
- return Bn(h) === d;
16528
+ var n = e, r = n.placement, o = n.boundary, i = n.rootBoundary, s = n.padding, a = n.flipVariations, l = n.allowedAutoPlacements, c = l === void 0 ? _u : l, d = Fn(r), u = d ? a ? Ol : Ol.filter(function(h) {
16529
+ return Fn(h) === d;
16540
16530
  }) : Ir, f = u.filter(function(h) {
16541
16531
  return c.indexOf(h) >= 0;
16542
16532
  });
@@ -16572,7 +16562,7 @@ function vv(t) {
16572
16562
  allowedAutoPlacements: m
16573
16563
  }) : Ne);
16574
16564
  }, []), S = e.rects.reference, k = e.rects.popper, x = /* @__PURE__ */ new Map(), L = !0, M = y[0], z = 0; z < y.length; z++) {
16575
- var _ = y[z], V = rt(_), j = Bn(_) === Rn, se = [Te, We].indexOf(V) >= 0, ce = se ? "width" : "height", ae = Sr(e, {
16565
+ var _ = y[z], V = rt(_), j = Fn(_) === Pn, se = [Te, We].indexOf(V) >= 0, ce = se ? "width" : "height", ae = Sr(e, {
16576
16566
  placement: _,
16577
16567
  boundary: d,
16578
16568
  rootBoundary: u,
@@ -16705,7 +16695,7 @@ function Nv(t) {
16705
16695
  rootBoundary: c,
16706
16696
  padding: u,
16707
16697
  altBoundary: d
16708
- }), b = rt(e.placement), w = Bn(e.placement), C = !w, y = js(b), S = Dv(y), k = e.modifiersData.popperOffsets, x = e.rects.reference, L = e.rects.popper, M = typeof m == "function" ? m(Object.assign({}, e.rects, {
16698
+ }), b = rt(e.placement), w = Fn(e.placement), C = !w, y = js(b), S = Dv(y), k = e.modifiersData.popperOffsets, x = e.rects.reference, L = e.rects.popper, M = typeof m == "function" ? m(Object.assign({}, e.rects, {
16709
16699
  placement: e.placement
16710
16700
  })) : m, z = typeof M == "number" ? {
16711
16701
  mainAxis: M,
@@ -16719,14 +16709,14 @@ function Nv(t) {
16719
16709
  };
16720
16710
  if (k) {
16721
16711
  if (i) {
16722
- var j, se = y === "y" ? Te : De, ce = y === "y" ? We : Ue, ae = y === "y" ? "height" : "width", ee = k[y], ne = ee + g[se], ve = ee - g[ce], ke = p ? -L[ae] / 2 : 0, lt = w === Rn ? x[ae] : L[ae], Fe = w === Rn ? -L[ae] : -x[ae], ct = e.elements.arrow, qe = p && ct ? Hs(ct) : {
16712
+ var j, se = y === "y" ? Te : De, ce = y === "y" ? We : Ue, ae = y === "y" ? "height" : "width", ee = k[y], ne = ee + g[se], ve = ee - g[ce], ke = p ? -L[ae] / 2 : 0, lt = w === Pn ? x[ae] : L[ae], Fe = w === Pn ? -L[ae] : -x[ae], ct = e.elements.arrow, qe = p && ct ? Hs(ct) : {
16723
16713
  width: 0,
16724
16714
  height: 0
16725
- }, Ne = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : Hu(), Ke = Ne[se], xt = Ne[ce], dt = sr(0, x[ae], qe[ae]), un = C ? x[ae] / 2 - ke - dt - Ke - z.mainAxis : lt - dt - Ke - z.mainAxis, At = C ? -x[ae] / 2 + ke + dt + xt + z.mainAxis : Fe + dt + xt + z.mainAxis, fn = e.elements.arrow && Pr(e.elements.arrow), Lr = fn ? y === "y" ? fn.clientTop || 0 : fn.clientLeft || 0 : 0, jn = (j = _?.[y]) != null ? j : 0, Fr = ee + un - jn - Lr, Br = ee + At - jn, Wn = sr(p ? Oo(ne, Fr) : ne, ee, p ? on(ve, Br) : ve);
16726
- k[y] = Wn, V[y] = Wn - ee;
16715
+ }, Ne = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : Hu(), Ke = Ne[se], xt = Ne[ce], dt = ir(0, x[ae], qe[ae]), un = C ? x[ae] / 2 - ke - dt - Ke - z.mainAxis : lt - dt - Ke - z.mainAxis, At = C ? -x[ae] / 2 + ke + dt + xt + z.mainAxis : Fe + dt + xt + z.mainAxis, fn = e.elements.arrow && Pr(e.elements.arrow), Lr = fn ? y === "y" ? fn.clientTop || 0 : fn.clientLeft || 0 : 0, Hn = (j = _?.[y]) != null ? j : 0, Fr = ee + un - Hn - Lr, Br = ee + At - Hn, jn = ir(p ? Oo(ne, Fr) : ne, ee, p ? on(ve, Br) : ve);
16716
+ k[y] = jn, V[y] = jn - ee;
16727
16717
  }
16728
16718
  if (a) {
16729
- var Un, _r = y === "x" ? Te : De, zr = y === "x" ? We : Ue, ut = k[S], Ot = S === "y" ? "height" : "width", qn = ut + g[_r], Ut = ut - g[zr], Kn = [Te, De].indexOf(b) !== -1, $r = (Un = _?.[S]) != null ? Un : 0, Vr = Kn ? qn : ut - x[Ot] - L[Ot] - $r + z.altAxis, Hr = Kn ? ut + x[Ot] + L[Ot] - $r - z.altAxis : Ut, jr = p && Kn ? ev(Vr, ut, Hr) : sr(p ? Vr : qn, ut, p ? Hr : Ut);
16719
+ var Wn, _r = y === "x" ? Te : De, zr = y === "x" ? We : Ue, ut = k[S], Ot = S === "y" ? "height" : "width", Un = ut + g[_r], Ut = ut - g[zr], qn = [Te, De].indexOf(b) !== -1, $r = (Wn = _?.[S]) != null ? Wn : 0, Vr = qn ? Un : ut - x[Ot] - L[Ot] - $r + z.altAxis, Hr = qn ? ut + x[Ot] + L[Ot] - $r - z.altAxis : Ut, jr = p && qn ? ev(Vr, ut, Hr) : ir(p ? Vr : Un, ut, p ? Hr : Ut);
16730
16720
  k[S] = jr, V[S] = jr - ut;
16731
16721
  }
16732
16722
  e.modifiersData[r] = V;
@@ -16749,12 +16739,12 @@ function Pv(t) {
16749
16739
  return t === Re(t) || !je(t) ? Ws(t) : Iv(t);
16750
16740
  }
16751
16741
  function Rv(t) {
16752
- var e = t.getBoundingClientRect(), n = Ln(e.width) / t.offsetWidth || 1, r = Ln(e.height) / t.offsetHeight || 1;
16742
+ var e = t.getBoundingClientRect(), n = Rn(e.width) / t.offsetWidth || 1, r = Rn(e.height) / t.offsetHeight || 1;
16753
16743
  return n !== 1 || r !== 1;
16754
16744
  }
16755
16745
  function Lv(t, e, n) {
16756
16746
  n === void 0 && (n = !1);
16757
- var r = je(e), o = je(e) && Rv(e), i = Wt(e), s = Fn(t, o, n), a = {
16747
+ var r = je(e), o = je(e) && Rv(e), i = Wt(e), s = Ln(t, o, n), a = {
16758
16748
  scrollLeft: 0,
16759
16749
  scrollTop: 0
16760
16750
  }, l = {
@@ -16762,7 +16752,7 @@ function Lv(t, e, n) {
16762
16752
  y: 0
16763
16753
  };
16764
16754
  return (r || !r && !n) && ((st(e) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
16765
- qs(i)) && (a = Pv(e)), je(e) ? (l = Fn(e, !0), l.x += e.clientLeft, l.y += e.clientTop) : i && (l.x = Us(i))), {
16755
+ qs(i)) && (a = Pv(e)), je(e) ? (l = Ln(e, !0), l.x += e.clientLeft, l.y += e.clientTop) : i && (l.x = Us(i))), {
16766
16756
  x: s.left + a.scrollLeft - l.x,
16767
16757
  y: s.top + a.scrollTop - l.y,
16768
16758
  width: s.width,
@@ -16851,8 +16841,8 @@ function $v(t) {
16851
16841
  setOptions: function(b) {
16852
16842
  var w = typeof b == "function" ? b(d.options) : b;
16853
16843
  m(), d.options = Object.assign({}, i, d.options, w), d.scrollParents = {
16854
- reference: dn(a) ? ar(a) : a.contextElement ? ar(a.contextElement) : [],
16855
- popper: ar(l)
16844
+ reference: dn(a) ? sr(a) : a.contextElement ? sr(a.contextElement) : [],
16845
+ popper: sr(l)
16856
16846
  };
16857
16847
  var C = Bv(zv([].concat(r, d.options.modifiers)));
16858
16848
  return d.orderedModifiers = C.filter(function(y) {
@@ -16995,7 +16985,7 @@ function _l(t) {
16995
16985
  return t[n] !== void 0 && (e[n] = t[n]), e;
16996
16986
  }, {});
16997
16987
  }
16998
- function lr() {
16988
+ function ar() {
16999
16989
  return document.createElement("div");
17000
16990
  }
17001
16991
  function Mr(t) {
@@ -17256,7 +17246,7 @@ function fs(t, e) {
17256
17246
  t[hk()] = e;
17257
17247
  }
17258
17248
  function Wl(t) {
17259
- var e = lr();
17249
+ var e = ar();
17260
17250
  return t === !0 ? e.className = Xu : (e.className = Ju, Mr(t) ? e.appendChild(t) : fs(e, t)), e;
17261
17251
  }
17262
17252
  function Ul(t, e) {
@@ -17278,9 +17268,9 @@ function ps(t) {
17278
17268
  };
17279
17269
  }
17280
17270
  function rf(t) {
17281
- var e = lr(), n = lr();
17271
+ var e = ar(), n = ar();
17282
17272
  n.className = jv, n.setAttribute("data-state", "hidden"), n.setAttribute("tabindex", "-1");
17283
- var r = lr();
17273
+ var r = ar();
17284
17274
  r.className = Ku, r.setAttribute("data-state", "hidden"), Ul(r, t.props), e.appendChild(n), n.appendChild(r), o(t.props, t.props);
17285
17275
  function o(i, s) {
17286
17276
  var a = ps(e), l = a.box, c = a.content, d = a.arrow;
@@ -17309,7 +17299,7 @@ function gk(t, e) {
17309
17299
  // properties
17310
17300
  id: g,
17311
17301
  reference: t,
17312
- popper: lr(),
17302
+ popper: ar(),
17313
17303
  popperInstance: b,
17314
17304
  props: n,
17315
17305
  state: C,
@@ -17321,7 +17311,7 @@ function gk(t, e) {
17321
17311
  show: of,
17322
17312
  hide: sf,
17323
17313
  hideWithInteractivity: af,
17324
- enable: Kn,
17314
+ enable: qn,
17325
17315
  disable: $r,
17326
17316
  unmount: lf,
17327
17317
  destroy: cf
@@ -17333,7 +17323,7 @@ function gk(t, e) {
17333
17323
  var L = w.map(function(v) {
17334
17324
  return v.fn(y);
17335
17325
  }), M = t.hasAttribute("aria-expanded");
17336
- return fn(), ke(), ee(), ne("onCreate", [y]), n.showOnCreate && qn(), k.addEventListener("mouseenter", function() {
17326
+ return fn(), ke(), ee(), ne("onCreate", [y]), n.showOnCreate && Un(), k.addEventListener("mouseenter", function() {
17337
17327
  y.props.interactive && y.state.isVisible && y.clearDelayTimeouts();
17338
17328
  }), k.addEventListener("mouseleave", function() {
17339
17329
  y.props.interactive && y.props.trigger.indexOf("mouseenter") >= 0 && se().addEventListener("mousemove", h);
@@ -17462,21 +17452,21 @@ function gk(t, e) {
17462
17452
  });
17463
17453
  }
17464
17454
  function fn() {
17465
- _() && (At("touchstart", jn, {
17455
+ _() && (At("touchstart", Hn, {
17466
17456
  passive: !0
17467
17457
  }), At("touchend", Br, {
17468
17458
  passive: !0
17469
17459
  })), Kv(y.props.trigger).forEach(function(v) {
17470
17460
  if (v !== "manual")
17471
- switch (At(v, jn), v) {
17461
+ switch (At(v, Hn), v) {
17472
17462
  case "mouseenter":
17473
17463
  At("mouseleave", Br);
17474
17464
  break;
17475
17465
  case "focus":
17476
- At(sk ? "focusout" : "blur", Wn);
17466
+ At(sk ? "focusout" : "blur", jn);
17477
17467
  break;
17478
17468
  case "focusin":
17479
- At("focusout", Wn);
17469
+ At("focusout", jn);
17480
17470
  break;
17481
17471
  }
17482
17472
  });
@@ -17487,13 +17477,13 @@ function gk(t, e) {
17487
17477
  A.removeEventListener(R, q, U);
17488
17478
  }), p = [];
17489
17479
  }
17490
- function jn(v) {
17480
+ function Hn(v) {
17491
17481
  var A, R = !1;
17492
- if (!(!y.state.isEnabled || Un(v) || a)) {
17482
+ if (!(!y.state.isEnabled || Wn(v) || a)) {
17493
17483
  var q = ((A = d) == null ? void 0 : A.type) === "focus";
17494
17484
  d = v, m = v.currentTarget, ke(), !y.state.isVisible && Gv(v) && eo.forEach(function(U) {
17495
17485
  return U(v);
17496
- }), v.type === "click" && (y.props.trigger.indexOf("mouseenter") < 0 || s) && y.props.hideOnClick !== !1 && y.state.isVisible ? R = !0 : qn(v), v.type === "click" && (s = !R), R && !q && Ut(v);
17486
+ }), v.type === "click" && (y.props.trigger.indexOf("mouseenter") < 0 || s) && y.props.hideOnClick !== !1 && y.state.isVisible ? R = !0 : Un(v), v.type === "click" && (s = !R), R && !q && Ut(v);
17497
17487
  }
17498
17488
  }
17499
17489
  function Fr(v) {
@@ -17511,7 +17501,7 @@ function gk(t, e) {
17511
17501
  }
17512
17502
  }
17513
17503
  function Br(v) {
17514
- var A = Un(v) || y.props.trigger.indexOf("click") >= 0 && s;
17504
+ var A = Wn(v) || y.props.trigger.indexOf("click") >= 0 && s;
17515
17505
  if (!A) {
17516
17506
  if (y.props.interactive) {
17517
17507
  y.hideWithInteractivity(v);
@@ -17520,10 +17510,10 @@ function gk(t, e) {
17520
17510
  Ut(v);
17521
17511
  }
17522
17512
  }
17523
- function Wn(v) {
17513
+ function jn(v) {
17524
17514
  y.props.trigger.indexOf("focusin") < 0 && v.target !== j() || y.props.interactive && v.relatedTarget && k.contains(v.relatedTarget) || Ut(v);
17525
17515
  }
17526
- function Un(v) {
17516
+ function Wn(v) {
17527
17517
  return tt.isTouch ? _() !== v.type.indexOf("touch") >= 0 : !1;
17528
17518
  }
17529
17519
  function _r() {
@@ -17599,7 +17589,7 @@ function gk(t, e) {
17599
17589
  function Ot() {
17600
17590
  return To(k.querySelectorAll("[data-tippy-root]"));
17601
17591
  }
17602
- function qn(v) {
17592
+ function Un(v) {
17603
17593
  y.clearDelayTimeouts(), v && ne("onTrigger", [y, v]), Ne();
17604
17594
  var A = ae(!0), R = z(), q = R[0], U = R[1];
17605
17595
  tt.isTouch && q === "hold" && U && (A = U), A ? r = setTimeout(function() {
@@ -17620,7 +17610,7 @@ function gk(t, e) {
17620
17610
  });
17621
17611
  }
17622
17612
  }
17623
- function Kn() {
17613
+ function qn() {
17624
17614
  y.state.isEnabled = !0;
17625
17615
  }
17626
17616
  function $r() {
@@ -17943,7 +17933,7 @@ const Ok = !1, Tk = Q.create({
17943
17933
  init(s, a) {
17944
17934
  return {
17945
17935
  isReadyToInit: !1,
17946
- decorations: B.empty,
17936
+ decorations: F.empty,
17947
17937
  isDebugging: Ok
17948
17938
  };
17949
17939
  },
@@ -17976,7 +17966,7 @@ const Ok = !1, Tk = Q.create({
17976
17966
  },
17977
17967
  /* The view method is the most important part of the plugin */
17978
17968
  view: (s) => {
17979
- let a = B.empty;
17969
+ let a = F.empty;
17980
17970
  return {
17981
17971
  update: (l) => {
17982
17972
  !n || e || (e = !0, r = !0, Dk(t, l, a), e = !1, n = !1);
@@ -18008,9 +17998,9 @@ const Ok = !1, Tk = Q.create({
18008
17998
  }
18009
17999
  t.emit("paginationUpdate");
18010
18000
  }, Nk = (t, e, n) => {
18011
- if (!e.converter) return B.empty;
18001
+ if (!e.converter) return F.empty;
18012
18002
  const r = e.converter.pageStyles?.pageSize, { width: o, height: i } = r;
18013
- if (!o || !i) return B.empty;
18003
+ if (!o || !i) return F.empty;
18014
18004
  const s = [wb, rn], { state: a } = t, l = no.create({
18015
18005
  schema: a.schema,
18016
18006
  doc: a.doc,
@@ -18027,7 +18017,7 @@ const Ok = !1, Tk = Q.create({
18027
18017
  });
18028
18018
  e.initDefaultStyles(c);
18029
18019
  const p = Ek(l.doc, f, e, n);
18030
- return f.destroy(), document.body.removeChild(c), B.create(t.state.doc, p);
18020
+ return f.destroy(), document.body.removeChild(c), F.create(t.state.doc, p);
18031
18021
  };
18032
18022
  function Ek(t, e, n, r) {
18033
18023
  const o = [], { pageSize: i, pageMargins: s } = n.converter.pageStyles, a = i.height * 96;